@open-wa/wa-automate 4.54.6 → 4.55.0
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 +1 -1
- package/dist/api/Client.js +1 -1
- package/dist/api/model/config.d.ts +5 -0
- 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
package/dist/api/Client.d.ts
CHANGED
@@ -737,7 +737,7 @@ export declare class Client {
|
|
737
737
|
* @param quotedMsgId string true_0000000000@c.us_JHB2HB23HJ4B234HJB to send as a reply to a message
|
738
738
|
* @returns `Promise <boolean | string>` This will either return true or the id of the message. It will return true after 10 seconds even if waitForId is true
|
739
739
|
*/
|
740
|
-
sendPtt(to: ChatId, file: AdvancedFile, quotedMsgId
|
740
|
+
sendPtt(to: ChatId, file: AdvancedFile, quotedMsgId?: MessageId): Promise<MessageId>;
|
741
741
|
/**
|
742
742
|
* Send an audio file with the default audio player (not PTT/voice message)
|
743
743
|
* @param to chat id `xxxxx@c.us`
|
package/dist/api/Client.js
CHANGED
@@ -1847,7 +1847,7 @@ class Client {
|
|
1847
1847
|
*/
|
1848
1848
|
sendPtt(to, file, quotedMsgId) {
|
1849
1849
|
return __awaiter(this, void 0, void 0, function* () {
|
1850
|
-
return this.sendImage(to, file, 'ptt.ogg', '', quotedMsgId, true, true);
|
1850
|
+
return this.sendImage(to, file, 'ptt.ogg', '', quotedMsgId ? quotedMsgId : null, true, true);
|
1851
1851
|
});
|
1852
1852
|
}
|
1853
1853
|
/**
|
@@ -387,6 +387,11 @@ export interface ConfigObject {
|
|
387
387
|
* @default `60`
|
388
388
|
*/
|
389
389
|
authTimeout?: number;
|
390
|
+
/**
|
391
|
+
* phoneIsOutOfReach check timeout
|
392
|
+
* @default `60`
|
393
|
+
*/
|
394
|
+
oorTimeout?: number;
|
390
395
|
/**
|
391
396
|
* Setting this to `true` will kill the whole process when the client is disconnected from the page or if the browser is closed.
|
392
397
|
* @default `false`
|
@@ -5,3 +5,45 @@ export declare const chatwoot_webhook_check_event_name = "cli.integrations.chatw
|
|
5
5
|
export type expressMiddleware = (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
6
6
|
export declare const chatwootMiddleware: (cliConfig: cliFlags, client: Client) => expressMiddleware;
|
7
7
|
export declare const setupChatwootOutgoingMessageHandler: (cliConfig: cliFlags, client: Client) => Promise<void>;
|
8
|
+
export type ChatwootConfig = {
|
9
|
+
/**
|
10
|
+
* The URL of the chatwoot inbox. If you want this integration to create & manage the inbox for you, you can omit the inbox part.
|
11
|
+
*/
|
12
|
+
chatwootUrl: string;
|
13
|
+
/**
|
14
|
+
* The API access token which you can get from your account menu.
|
15
|
+
*/
|
16
|
+
chatwootApiAccessToken: string;
|
17
|
+
/**
|
18
|
+
* The API host which will be used as the webhook address in the Chatwoot inbox.
|
19
|
+
*/
|
20
|
+
apiHost: string;
|
21
|
+
/**
|
22
|
+
* Similar to apiHost
|
23
|
+
*/
|
24
|
+
host: string;
|
25
|
+
/**
|
26
|
+
* Whether or not to use https for the webhook address
|
27
|
+
*/
|
28
|
+
https?: boolean;
|
29
|
+
/**
|
30
|
+
* The certificate for https
|
31
|
+
*/
|
32
|
+
cert: string;
|
33
|
+
/**
|
34
|
+
* The private key for https
|
35
|
+
*/
|
36
|
+
privkey: string;
|
37
|
+
/**
|
38
|
+
* The API key used to secure the instance webhook address
|
39
|
+
*/
|
40
|
+
key?: string;
|
41
|
+
/**
|
42
|
+
* Whether or not to update the webhook address in the Chatwoot inbox on launch
|
43
|
+
*/
|
44
|
+
forceUpdateCwWebhook?: boolean;
|
45
|
+
/**
|
46
|
+
* port
|
47
|
+
*/
|
48
|
+
port: number;
|
49
|
+
};
|