@open-wa/wa-automate 4.54.4 → 4.54.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -168,10 +168,10 @@ const setupChatwootOutgoingMessageHandler = (cliConfig, client) => __awaiter(voi
168
168
  __1.log.info(`CHATWOOT INTEGRATION: inbox created. id: ${inboxId}`);
169
169
  }
170
170
  }
171
- const cwReq = (method, path, data, _headers) => {
171
+ const cwReq = (method, path, data, _headers) => __awaiter(void 0, void 0, void 0, function* () {
172
172
  const url = `${origin}/api/v1/accounts/${accountId}/${path}`.replace('app.bentonow.com', 'chat.bentonow.com');
173
173
  // console.log(url,method,data)
174
- return (0, axios_1.default)({
174
+ const response = yield (0, axios_1.default)({
175
175
  method,
176
176
  data,
177
177
  url,
@@ -181,7 +181,9 @@ const setupChatwootOutgoingMessageHandler = (cliConfig, client) => __awaiter(voi
181
181
  __1.log.error(`CW REQ ERROR: ${(_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.status} ${(_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.message}`, error === null || error === void 0 ? void 0 : error.toJSON());
182
182
  throw error;
183
183
  });
184
- };
184
+ __1.log.info(`CW REQUEST: ${response.status} ${method} ${url} ${JSON.stringify(data)}`);
185
+ return response;
186
+ });
185
187
  let { data: get_inbox } = yield cwReq('get', `inboxes/${inboxId}`);
186
188
  /**
187
189
  * Update the webhook
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.54.4",
3
+ "version": "4.54.5",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",