n8n-nodes-idb2b 3.1.6 → 3.1.8

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.
@@ -111,9 +111,15 @@ class IDB2B {
111
111
  if (!validation.isValid) {
112
112
  throw new Error(validation.error);
113
113
  }
114
- body = (0, common_1.buildContactRequestBody)(Object.assign({ name,
115
- email,
116
- phone_number }, additionalFields));
114
+ const contactData = Object.assign({ name }, additionalFields);
115
+ if (email)
116
+ contactData.email = email;
117
+ if (phone_number)
118
+ contactData.phone_number = phone_number;
119
+ body = (0, common_1.buildContactRequestBody)(contactData);
120
+ // DEBUG: remove after fix confirmed
121
+ console.log('[IDB2B DEBUG] contact create body:', JSON.stringify(body));
122
+ console.log('[IDB2B DEBUG] raw params - email:', JSON.stringify(email), 'phone:', JSON.stringify(phone_number), 'additionalFields:', JSON.stringify(additionalFields));
117
123
  initialBody = body;
118
124
  }
119
125
  else if (operation === "update") {
@@ -121,7 +121,6 @@ exports.contactFields = [
121
121
  name: 'phone_number',
122
122
  type: 'string',
123
123
  default: '',
124
- required: true,
125
124
  displayOptions: {
126
125
  show: {
127
126
  resource: ['contact'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-idb2b",
3
- "version": "3.1.6",
3
+ "version": "3.1.8",
4
4
  "description": "n8n community node for IDB2B - WhatsApp AI Agents",
5
5
  "main": "index.js",
6
6
  "scripts": {