n8n-nodes-idb2b 2.0.9 → 3.0.1
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.
- package/README.md +2 -2
- package/dist/nodes/IDB2B/IDB2B.node.js +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -59,14 +59,14 @@ npm install n8n-nodes-idb2b
|
|
|
59
59
|
|
|
60
60
|
### Get All Contacts
|
|
61
61
|
|
|
62
|
-
- **Limit**: Number of contacts per page (default:
|
|
62
|
+
- **Limit**: Number of contacts per page (default: 50)
|
|
63
63
|
- **Page**: Page number (default: 1)
|
|
64
64
|
- **Fields to Return**: Optionally select specific fields (id, name, email, phone_number, tags, etc.)
|
|
65
65
|
- **Query Parameters**: Add any extra filters supported by the API
|
|
66
66
|
|
|
67
67
|
### Get All Companies
|
|
68
68
|
|
|
69
|
-
- **Limit**: Number of companies per page (default:
|
|
69
|
+
- **Limit**: Number of companies per page (default: 50)
|
|
70
70
|
- **Page**: Page number (default: 1)
|
|
71
71
|
- **Fields to Return**: Optionally select specific fields
|
|
72
72
|
- **Query Parameters**: Add any extra filters
|
|
@@ -129,12 +129,12 @@ async function makeRequestWithRetry(executeFunctions, options, maxRetries = 3, i
|
|
|
129
129
|
if (((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 429) {
|
|
130
130
|
const retryAfter = (_c = error.response.headers) === null || _c === void 0 ? void 0 : _c['retry-after'];
|
|
131
131
|
const delay = retryAfter ? parseInt(retryAfter) * 1000 : initialDelay * Math.pow(2, attempt);
|
|
132
|
-
await
|
|
132
|
+
await (0, n8n_workflow_1.sleep)(Math.min(delay, 30000));
|
|
133
133
|
}
|
|
134
134
|
else {
|
|
135
135
|
// Exponential backoff for other errors
|
|
136
136
|
const delay = initialDelay * Math.pow(2, attempt);
|
|
137
|
-
await
|
|
137
|
+
await (0, n8n_workflow_1.sleep)(Math.min(delay, 10000));
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
@@ -376,7 +376,7 @@ class IDB2B {
|
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
378
|
else if (operation === 'update') {
|
|
379
|
-
method = '
|
|
379
|
+
method = 'PATCH';
|
|
380
380
|
const contactId = this.getNodeParameter('contactId', i);
|
|
381
381
|
endpoint = `/contacts/${sanitizeId(contactId)}`;
|
|
382
382
|
const name = this.getNodeParameter('name', i, '');
|
|
@@ -447,7 +447,7 @@ class IDB2B {
|
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
else if (operation === 'update') {
|
|
450
|
-
method = '
|
|
450
|
+
method = 'PATCH';
|
|
451
451
|
const companyId = this.getNodeParameter('companyId', i);
|
|
452
452
|
endpoint = `/companies/${sanitizeId(companyId)}`;
|
|
453
453
|
const name = this.getNodeParameter('name', i, '');
|
|
@@ -484,6 +484,10 @@ class IDB2B {
|
|
|
484
484
|
if (operation === 'create' && response.message === 'success' && response.data === null) {
|
|
485
485
|
processedResponse = Object.assign(Object.assign({}, response), { data: Object.assign(Object.assign({}, body), { created: true, status: 'success', _note: 'Server did not return the created entity. Fields like id and timestamps are unavailable.' }) });
|
|
486
486
|
}
|
|
487
|
+
// Return standardized response for delete operations (n8n UX guideline)
|
|
488
|
+
if (operation === 'delete') {
|
|
489
|
+
processedResponse = { deleted: true };
|
|
490
|
+
}
|
|
487
491
|
// Apply field filtering for contact getAll operation
|
|
488
492
|
if (resource === 'contact' && operation === 'getAll') {
|
|
489
493
|
const fieldsToReturn = this.getNodeParameter('fields', i, []);
|