@open-wa/wa-automate 4.54.6 → 4.55.1
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/config-schema.json +1 -1
- package/bin/oas-type-schemas.json +1 -1
- package/dist/api/Client.d.ts +18 -2
- package/dist/api/Client.js +21 -1
- package/dist/api/model/config.d.ts +5 -0
- package/dist/api/model/events.d.ts +6 -1
- package/dist/api/model/events.js +5 -0
- package/dist/api/model/group-metadata.d.ts +23 -1
- package/dist/cli/integrations/chatwoot.d.ts +42 -0
- package/dist/cli/integrations/chatwoot.js +515 -302
- package/dist/controllers/initializer.d.ts +1 -1
- package/dist/controllers/initializer.js +4 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Client } from '../api/Client';
|
2
2
|
import { AdvancedConfig, ConfigObject } from '../api/model/index';
|
3
|
-
export declare const pkg: any, configWithCases: any, timeout: (ms: number) => Promise<
|
3
|
+
export declare const pkg: any, configWithCases: any, timeout: (ms: number) => Promise<string>;
|
4
4
|
export declare let screenshot: any;
|
5
5
|
/**
|
6
6
|
* Used to initialize the client session.
|
@@ -271,7 +271,10 @@ function create(config = {}) {
|
|
271
271
|
_serialized: earlyWid
|
272
272
|
}, debugInfo, spinner);
|
273
273
|
if (authenticated == 'timeout') {
|
274
|
-
const
|
274
|
+
const oorProms = [(0, auth_1.phoneIsOutOfReach)(waPage)];
|
275
|
+
if ((config === null || config === void 0 ? void 0 : config.oorTimeout) !== 0)
|
276
|
+
oorProms.push((0, exports.timeout)(((config === null || config === void 0 ? void 0 : config.oorTimeout) || 60) * 1000));
|
277
|
+
const outOfReach = yield Promise.race(oorProms);
|
275
278
|
spinner.emit(outOfReach && outOfReach !== 'timeout' ? 'appOffline' : 'authTimeout');
|
276
279
|
spinner.fail(outOfReach && outOfReach !== 'timeout' ? 'Authentication timed out. Please open the app on the phone. Shutting down' : 'Authentication timed out. Shutting down. Consider increasing authTimeout config variable: https://open-wa.github.io/wa-automate-nodejs/interfaces/configobject.html#authtimeout');
|
277
280
|
yield (0, browser_1.kill)(waPage);
|
package/package.json
CHANGED