n8n-nodes-idb2b 2.0.2 → 2.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.
@@ -141,6 +141,7 @@ async function makeRequestWithRetry(executeFunctions, options, maxRetries = 3, i
141
141
  throw lastError;
142
142
  }
143
143
  async function getAccessToken(executeFunctions, credentials) {
144
+ var _a, _b, _c, _d;
144
145
  const cacheKey = `${credentials.baseUrl}:${credentials.email}`;
145
146
  // Try to get cached token
146
147
  const cachedToken = secureTokenCache.get(cacheKey, credentials);
@@ -157,7 +158,10 @@ async function getAccessToken(executeFunctions, credentials) {
157
158
  },
158
159
  json: true,
159
160
  });
160
- const accessToken = loginResponse.data.session.access_token;
161
+ const accessToken = ((_b = (_a = loginResponse === null || loginResponse === void 0 ? void 0 : loginResponse.data) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.access_token) ||
162
+ ((_c = loginResponse === null || loginResponse === void 0 ? void 0 : loginResponse.data) === null || _c === void 0 ? void 0 : _c.access_token) ||
163
+ ((_d = loginResponse === null || loginResponse === void 0 ? void 0 : loginResponse.session) === null || _d === void 0 ? void 0 : _d.access_token) ||
164
+ (loginResponse === null || loginResponse === void 0 ? void 0 : loginResponse.access_token);
161
165
  if (!accessToken) {
162
166
  throw new Error('No access token received from authentication response');
163
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-idb2b",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "n8n community node for IDB2B - WhatsApp AI Agents",
5
5
  "main": "index.js",
6
6
  "scripts": {