@open-wa/wa-automate 4.55.4 → 4.57.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,140 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Basic Options */
4
+ "target": "ES2015" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
5
+ "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
6
+ // "lib": [
7
+ // "es5",
8
+ // "es6",
9
+ // "es7",
10
+ // "esnext",
11
+ // "dom",
12
+ // ], /* Specify library files to be included in the compilation. */
13
+ // "allowJs": true, /* Allow javascript files to be compiled. */
14
+ // "checkJs": true, /* Report errors in .js files. */
15
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
16
+ "declaration": true /* Generates corresponding '.d.ts' file. */,
17
+ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
18
+ // "sourceMap": true, /* Generates corresponding '.map' file. */
19
+ // "outFile": "./", /* Concatenate and emit output to single file. */
20
+ "outDir": "./dist" /* Redirect output structure to the directory. */,
21
+ // "rootDir": "./src/", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
22
+ // "composite": true, /* Enable project compilation */
23
+ "removeComments": false /* Do not emit comments to output. */,
24
+
25
+ "skipLibCheck": true,
26
+ // "noEmit": true, /* Do not emit outputs. */
27
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
28
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
29
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
30
+ /* Strict Type-Checking Options */
31
+ // "strict": true, /* Enable all strict type-checking options. */
32
+ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
33
+ // "strictNullChecks": true, /* Enable strict null checks. */
34
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
35
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
36
+ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
37
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
38
+ /* Additional Checks */
39
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
40
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
41
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
42
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
43
+ /* Module Resolution Options */
44
+ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
45
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
46
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
47
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
48
+ // "typeRoots": [], /* List of folders to include type definitions from. */
49
+ // "types": [], /* Type declaration files to be included in compilation. */
50
+ "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
51
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
52
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
53
+ /* Source Map Options */
54
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
55
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
56
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
57
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
58
+ /* Experimental Options */
59
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
60
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
61
+ },
62
+ "include": [
63
+ "src/**/*"
64
+ ],
65
+ "typedocOptions": {
66
+ "entryPointStrategy": "Expand",
67
+ "entryPoints": [
68
+ "./src/api",
69
+ "./src/utils",
70
+ "./src/controllers",
71
+ "./src/structures",
72
+ "./src/connect",
73
+ "./src/logging",
74
+ ],
75
+ // "mode": "file",
76
+ "out": "docs",
77
+ "exclude": [
78
+ "**.config",
79
+ "**/**ignore**",
80
+ "**/**browser.ts",
81
+ "**/popup/**",
82
+ "**/utils/**",
83
+ "**/**auth**",
84
+ "**/**launch_checks**",
85
+ "**/**preload**",
86
+ ],
87
+ "excludeExternals": false,
88
+ "includeVersion": true,
89
+ "excludeInternal": true,
90
+ "disableSources": true,
91
+ "excludeTags": true,
92
+ "categorizeByGroup": true,
93
+ "hideGenerator": true,
94
+ "defaultCategory": "api",
95
+ "readme": "./README.md",
96
+ // "theme": "pages-plugin",
97
+ "excludePrivate": true,
98
+ // "toc": [
99
+ // "Client",
100
+ // "Chat",
101
+ // "Call",
102
+ // "Contact",
103
+ // "GroupMetadata",
104
+ // "Id",
105
+ // "LiveLocationChangedEvent",
106
+ // "Message",
107
+ // "ParticipantChangedEventModel",
108
+ // "decryptMedia",
109
+ // "smartUserAgent",
110
+ // "WAPI",
111
+ // "Page",
112
+ // "ConfigObject",
113
+ // "SessionData",
114
+ // "create",
115
+ // "namespace",
116
+ // "SimpleListener",
117
+ // "SessionInfo",
118
+ // "ChatMuteDuration",
119
+ // "ERROR_NAME",
120
+ // "Webhook",
121
+ // "CustomError",
122
+ // "SessionExpiredError",
123
+ // "MessageId",
124
+ // "AddParticipantError",
125
+ // "AddParticipantErrorStatusCode",
126
+ // "Collector",
127
+ // "MessageCollector",
128
+ // "HealthCheck",
129
+ // "GroupChatCreationResponse",
130
+ // "GroupChatCreationParticipantAddResponse",
131
+ // "CollectorOptions",
132
+ // "PREPROCESSORS",
133
+ // "SocketClient",
134
+ // "LogToEvTransport",
135
+ // "ConfigLogTransport",
136
+ // "SocketClient.connect",
137
+ // "OnError",
138
+ // ]
139
+ }
140
+ }
@@ -1 +1 @@
1
- {"ChatServer":{"title":"ChatServer","description":"The suffix used to identify a non-group chat id","enum":["c.us"],"type":"string"},"GroupChatServer":{"title":"GroupChatServer","description":"The suffix used to identify a group chat id","enum":["g.us"],"type":"string"},"WaServers":{"anyOf":[{"$ref":"#/components/schemas/ChatServer","title":"WaServers"},{"$ref":"#/components/schemas/GroupChatServer","title":"WaServers"}],"title":"WaServers","description":"A type alias for all available \"servers\""},"CountryCode":{"enum":[1,7,20,27,30,31,32,33,34,36,39,40,41,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,81,82,84,86,90,91,92,93,94,95,98,211,212,213,216,218,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,248,249,250,251,252,253,254,255,256,257,258,260,261,262,263,264,265,266,267,268,269,290,291,297,298,299,350,351,352,353,354,355,356,357,358,359,370,371,372,373,374,375,376,377,378,380,381,382,383,385,386,387,389,420,421,423,500,501,502,503,504,505,506,507,508,509,590,591,592,593,594,595,596,597,598,599,670,672,673,674,675,676,677,678,679,680,681,682,683,685,686,687,688,689,690,691,692,850,852,853,855,856,880,886,960,961,962,963,964,965,966,967,968,970,971,972,973,974,975,976,977,992,993,994,995,996,998],"title":"CountryCode","description":"Type alias representing all available country codes","type":"number"},"AccountNumber":{"title":"AccountNumber","description":"The account number. It is made up of a country code and then the local number without the preceeding 0. For example, if a UK (+44) wa account is linked to the number 07123456789 then the account number will be 447123456789."},"GroupId":{"title":"GroupId","description":"A new group or community has the format of a random number followed by `@g.us`"},"GroupChatId":{"$ref":"#/components/schemas/GroupId","title":"GroupChatId","description":"A group chat ends with `@g.us` and usually has two parts, the timestamp of when it was created, and the user id of the number that created the group. For example `[creator number]-[timestamp]@g.us`\n\nExample:\n\n`\"447123456789-1445627445@g.us\"`"},"ContactId":{"title":"ContactId","description":"A contact id ends with `@c.us` and only contains the number of the contact. For example, if the country code of a contact is `44` and their number is `7123456789` then the contact id would be `447123456789@c.us`\n\nExample:\n\n`\"447123456789@c.us\"`"},"ChatId":{"anyOf":[{"$ref":"#/components/schemas/ContactId","title":"ChatId"},{"$ref":"#/components/schemas/GroupChatId","title":"ChatId"}],"title":"ChatId","description":"A chat id ends with `@c.us` or `@g.us` for group chats.\n\nExample:\n\nA group chat: `\"447123456789-1445627445@g.us\"`\nA group chat: `\"447123456789@g.us\"`"},"MessageId":{"title":"MessageId","description":"The id of a message. The format is `[boolean]_[ChatId]_[random character string]`\n\nExample:\n\n`\"false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB\"`"},"Content":{"title":"Content","description":"This is a generic type alias for the content of a message\n\nExample:\n\n`\"hello!\"`"},"NonSerializedId":{"properties":{"server":{"$ref":"#/components/schemas/WaServers","title":"NonSerializedId.server"},"user":{"$ref":"#/components/schemas/AccountNumber","title":"NonSerializedId.user"},"_serialized":{"$ref":"#/components/schemas/ContactId","title":"NonSerializedId._serialized"}},"required":["server","user","_serialized"],"additionalProperties":false,"title":"NonSerializedId","type":"object"},"DataURL":{"title":"DataURL","description":"Data URLs, URLs prefixed with the data: scheme, allow content creators to embed small files inline in documents. They were formerly known as \"data URIs\" until that name was retired by the WHATWG.\n\n\nData URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself:\n\nExample:\n`\"data:[<mediatype>][;base64],<data>\"`\n\nLearn more here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"},"Base64":{"title":"Base64","description":"Base64 is basically a file encoded as a string.\n\nBase64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding.\n\nLearn more here: https://developer.mozilla.org/en-US/docs/Glossary/Base64"},"FilePath":{"title":"FilePath","description":"The relative or absolute path of a file\n\nLearn more here: https://www.w3schools.com/html/html_filepaths.asp"},"GetURL":{"title":"GetURL","description":"A URL of a file used with a GET request"},"AdvancedFile":{"anyOf":[{"$ref":"#/components/schemas/DataURL","title":"AdvancedFile"},{"$ref":"#/components/schemas/FilePath","title":"AdvancedFile"},{"$ref":"#/components/schemas/GetURL","title":"AdvancedFile"}],"title":"AdvancedFile","description":"Some file based actions in open-wa are powerful enough to take a dataurl, url or filepath"},"Button":{"properties":{"id":{"title":"Button.id","type":"string"},"text":{"title":"Button.text","type":"string"}},"required":["id","text"],"additionalProperties":false,"title":"Button","type":"object"},"AdvancedButton":{"properties":{"id":{"title":"AdvancedButton.id","type":"string"},"text":{"title":"AdvancedButton.text","type":"string"},"url":{"title":"AdvancedButton.url","type":"string"},"number":{"title":"AdvancedButton.number","type":"string"}},"required":["text"],"additionalProperties":false,"title":"AdvancedButton","type":"object"},"Row":{"properties":{"title":{"title":"Row.title","type":"string"},"description":{"title":"Row.description","type":"string"},"rowId":{"title":"Row.rowId","type":"string"}},"required":["title","description","rowId"],"additionalProperties":false,"title":"Row","type":"object"},"Section":{"properties":{"title":{"title":"Section.title","type":"string"},"rows":{"items":{"$ref":"#/components/schemas/Row","title":"Section.rows.[]"},"title":"Section.rows","type":"array"}},"required":["title","rows"],"additionalProperties":false,"title":"Section","type":"object"},"LocationButtonBody":{"properties":{"lat":{"title":"LocationButtonBody.lat","type":"number"},"lng":{"title":"LocationButtonBody.lng","type":"number"},"caption":{"title":"LocationButtonBody.caption","type":"string"}},"required":["lat","lng","caption"],"additionalProperties":false,"title":"LocationButtonBody","type":"object"},"Call":{"properties":{"id":{"title":"Call.id","description":"The id of the call","type":"string"},"peerJid":{"$ref":"#/components/schemas/ContactId","title":"Call.peerJid","description":"The id of the account calling"},"offerTime":{"title":"Call.offerTime","description":"The epoch timestamp of the call. You will have to multiply this by 1000 to get the actual epoch timestamp","type":"number"},"isVideo":{"title":"Call.isVideo","description":"Whether or not the call is a video call","type":"boolean"},"isGroup":{"title":"Call.isGroup","description":"Whether or not the call is a group call","type":"boolean"},"canHandleLocally":{"title":"Call.canHandleLocally","type":"boolean"},"outgoing":{"title":"Call.outgoing","description":"The direction of the call.","type":"boolean"},"webClientShouldHandle":{"title":"Call.webClientShouldHandle","type":"boolean"},"participants":{"items":{"$ref":"#/components/schemas/ContactId","title":"Call.participants.[]"},"title":"Call.participants","description":"The other participants on a group call","type":"array"},"State":{"$ref":"#/components/schemas/CallState","title":"Call.State","description":"State of the call"}},"required":["id","peerJid","offerTime","isVideo","isGroup","canHandleLocally","outgoing","webClientShouldHandle","participants","State"],"additionalProperties":false,"title":"Call","type":"object"},"BaseChat":{"properties":{"archive":{"title":"BaseChat.archive","type":"boolean"},"changeNumberNewJid":{"title":"BaseChat.changeNumberNewJid"},"changeNumberOldJid":{"title":"BaseChat.changeNumberOldJid"},"contact":{"$ref":"#/components/schemas/Contact","title":"BaseChat.contact","description":"The contact related to this chat"},"groupMetadata":{"$ref":"#/components/schemas/GroupMetadata","title":"BaseChat.groupMetadata","description":"Group metadata for this chat"},"isAnnounceGrpRestrict":{"title":"BaseChat.isAnnounceGrpRestrict","description":"If the chat is a group chat is restricted"},"formattedTitle":{"title":"BaseChat.formattedTitle","description":"The title of the chat","type":"string"},"canSend":{"title":"BaseChat.canSend","description":"Whether your host account is able to send messages to this chat","type":"boolean"},"isReadOnly":{"title":"BaseChat.isReadOnly","description":"Whether the chat is a group chat and the group is restricted","type":"boolean"},"kind":{"title":"BaseChat.kind","type":"string"},"labels":{"title":"BaseChat.labels","description":"The labels attached to this chat."},"lastReceivedKey":{"title":"BaseChat.lastReceivedKey","description":"The ID of the last message received in this chat"},"modifyTag":{"title":"BaseChat.modifyTag","type":"number"},"msgs":{"title":"BaseChat.msgs","description":"The messages in the chat"},"muteExpiration":{"title":"BaseChat.muteExpiration","description":"The expiration timestamp of the chat mute","type":"number"},"name":{"title":"BaseChat.name","description":"The name of the chat","type":"string"},"notSpam":{"title":"BaseChat.notSpam","description":"Whether the chat is marked as spam","type":"boolean"},"pendingMsgs":{"title":"BaseChat.pendingMsgs","description":"Messages that are pending to be sent","type":"boolean"},"pin":{"title":"BaseChat.pin","description":"Whether the chat is pinned","type":"number"},"presence":{"title":"BaseChat.presence","description":"The presence state of the chat participant"},"t":{"title":"BaseChat.t","description":"The timestamp of the last interaction in the chat","type":"number"},"unreadCount":{"title":"BaseChat.unreadCount","description":"The number of undread messages in this chat","type":"number"},"ack":{"title":"BaseChat.ack"},"isOnline":{"title":"BaseChat.isOnline","description":"@deprecated This is unreliable. Use the method [`isChatOnline`](https://open-wa.github.io/wa-automate-nodejs/classes/client.html#ischatonline) instead."},"lastSeen":{"title":"BaseChat.lastSeen","description":"@deprecated This is unreliable. Use the method [`getLastSeen`](https://open-wa.github.io/wa-automate-nodejs/classes/client.html#getlastseen) instead."}},"required":["archive","changeNumberNewJid","changeNumberOldJid","contact","groupMetadata","isAnnounceGrpRestrict","isReadOnly","kind","labels","lastReceivedKey","modifyTag","msgs","muteExpiration","name","notSpam","pendingMsgs","pin","presence","t","unreadCount"],"additionalProperties":false,"title":"BaseChat","type":"object"},"SingleChat":{"properties":{"id":{"$ref":"#/components/schemas/ContactId","title":"SingleChat.id","description":"The id of the chat"},"isGroup":{"title":"SingleChat.isGroup","description":"Whether the chat is a group chat","enum":[false],"type":"boolean"}},"required":["id","isGroup"],"additionalProperties":false,"title":"SingleChat","type":"object"},"GroupChat":{"properties":{"id":{"$ref":"#/components/schemas/GroupChatId","title":"GroupChat.id","description":"The id of the chat"},"isGroup":{"title":"GroupChat.isGroup","description":"Whether the chat is a group chat","enum":[true],"type":"boolean"}},"required":["id","isGroup"],"additionalProperties":false,"title":"GroupChat","type":"object"},"Chat":{"anyOf":[{"$ref":"#/components/schemas/SingleChat","title":"Chat"},{"$ref":"#/components/schemas/GroupChat","title":"Chat"}],"title":"Chat"},"LiveLocationChangedEvent":{"properties":{"id":{"title":"LiveLocationChangedEvent.id","type":"string"},"lat":{"title":"LiveLocationChangedEvent.lat","type":"number"},"lng":{"title":"LiveLocationChangedEvent.lng","type":"number"},"speed":{"title":"LiveLocationChangedEvent.speed","type":"number"},"lastUpdated":{"title":"LiveLocationChangedEvent.lastUpdated","type":"number"},"accuracy":{"title":"LiveLocationChangedEvent.accuracy","type":"number"},"degrees":{"title":"LiveLocationChangedEvent.degrees"},"msgId":{"title":"LiveLocationChangedEvent.msgId","description":"The message id that was sent when the liveLocation session was started.","type":"string"}},"required":["id","lat","lng","speed","lastUpdated","accuracy","degrees"],"additionalProperties":false,"title":"LiveLocationChangedEvent","type":"object"},"GroupChatCreationParticipantAddResponse":{"properties":{"code":{"enum":[200,400,403],"title":"GroupChatCreationParticipantAddResponse.code","description":"The resultant status code for adding the participant.\n\n200 if the participant was added successfully during the creation of the group.\n\n403 if the participant does not allow their account to be added to group chats. If you receive a 403, you will also get an `invite_code` and `invite_code_exp`","type":"number"},"invite_code":{"title":"GroupChatCreationParticipantAddResponse.invite_code","description":"If the participant is not allowed to be added to group chats due to their privacy settings, you will receive an `invite_code` which you can send to them via a text.","type":"string"},"invite_code_exp":{"title":"GroupChatCreationParticipantAddResponse.invite_code_exp","description":"The expiry ts of the invite_code. It is a number wrapped in a string, in order to get the proper time you can use this:\n\n```javascript\n new Date(Number(invite_code_exp)*1000)\n```","type":"string"}},"required":["code"],"additionalProperties":false,"title":"GroupChatCreationParticipantAddResponse","type":"object"},"GroupChatCreationResponse":{"properties":{"status":{"enum":[200,400],"title":"GroupChatCreationResponse.status","description":"The resultant status code of the group chat creation.\n\n200 if the group was created successfully.\n\n400 if the initial participant does not exist","type":"number"},"gid":{"$ref":"#/components/schemas/GroupChatId","title":"GroupChatCreationResponse.gid","description":"The group chat id"},"participants":{"items":{"properties":{"ContactId":{"$ref":"#/components/schemas/GroupChatCreationParticipantAddResponse","title":"GroupChatCreationResponse.participants.[].ContactId"}},"additionalProperties":false,"title":"GroupChatCreationResponse.participants.[]","type":"object"},"title":"GroupChatCreationResponse.participants","description":"The initial requested participants and their corresponding add responses","type":"array"}},"required":["status","gid","participants"],"additionalProperties":false,"title":"GroupChatCreationResponse","type":"object"},"EphemeralDuration":{"enum":[86400,604800,7776000],"title":"EphemeralDuration","description":"Ephemeral duration can be 1 day, 7 days or 90 days. The default is 1 day.","type":"number"},"SessionData":{"properties":{"WABrowserId":{"title":"SessionData.WABrowserId","type":"string"},"WASecretBundle":{"title":"SessionData.WASecretBundle","type":"string"},"WAToken1":{"title":"SessionData.WAToken1","type":"string"},"WAToken2":{"title":"SessionData.WAToken2","type":"string"}},"additionalProperties":false,"title":"SessionData","type":"object"},"DevTools":{"properties":{"user":{"title":"DevTools.user","description":"Username for devtools","type":"string"},"pass":{"title":"DevTools.pass","description":"Password for devtools","type":"string"}},"required":["user","pass"],"additionalProperties":false,"title":"DevTools","type":"object"},"EventPayload":{"properties":{"ts":{"title":"EventPayload.ts","type":"number"},"sessionId":{"title":"EventPayload.sessionId","type":"string"},"id":{"title":"EventPayload.id","type":"string"},"event":{"$ref":"#/components/schemas/SimpleListener","title":"EventPayload.event"},"data":{"title":"EventPayload.data"}},"required":["ts","sessionId","id","event","data"],"additionalProperties":{},"title":"EventPayload","type":"object"},"Webhook":{"properties":{"url":{"title":"Webhook.url","description":"The endpoint to send (POST) the event to.","type":"string"},"requestConfig":{"$ref":"#/components/schemas/AxiosRequestConfig","title":"Webhook.requestConfig","description":"The optional AxiosRequestConfig to use for firing the webhook event. This can be useful if you want to add some authentication when POSTing data to your server.\n\nFor example, if your webhook requires the username `admin` and password `1234` for authentication, you can set the requestConfig to:\n```\n{\n auth: {\n username: \"admin\",\n password: \"1234\",\n }\n}\n```\n\nPlease note, for security reasons, this is not returned when listing webhooks however it is returned when registering a webhook for verification purposes."},"id":{"title":"Webhook.id","description":"The ID of the given webhook setup. Use this ID with [[removeWebhook]]","type":"string"},"events":{"items":{"$ref":"#/components/schemas/SimpleListener","title":"Webhook.events.[]"},"title":"Webhook.events","description":"An array of events that are registered to be sent to this webhook.","type":"array"},"ts":{"title":"Webhook.ts","description":"Time when the webhook was registered in epoch time","type":"number"}},"required":["url","id","events","ts"],"additionalProperties":false,"title":"Webhook","type":"object"},"ProxyServerCredentials":{"properties":{"protocol":{"title":"ProxyServerCredentials.protocol","description":"The protocol on which the proxy is running. E.g `http`, `https`, `socks4` or `socks5`. This is optional and can be automatically determined from the address.","type":"string"},"address":{"title":"ProxyServerCredentials.address","description":"Proxy Server address. This can include the port e.g '127.0.0.1:5005'","type":"string"},"username":{"title":"ProxyServerCredentials.username","description":"Username for Proxy Server authentication","type":"string"},"password":{"title":"ProxyServerCredentials.password","description":"Password for Proxy Server authentication","type":"string"}},"required":["address","username","password"],"additionalProperties":false,"title":"ProxyServerCredentials","type":"object"},"ConfigObject":{"properties":{"sessionData":{"anyOf":[{"$ref":"#/components/schemas/SessionData","title":"ConfigObject.sessionData"},{"$ref":"#/components/schemas/Base64","title":"ConfigObject.sessionData"}],"title":"ConfigObject.sessionData","description":"The authentication object (as a JSON object or a base64 encoded string) that is required to migrate a session from one instance to another or to just restart an existing instance.\nThis sessionData is provided in a generated JSON file (it's a json file but contains the JSON data as a base64 encoded string) upon QR scan or an event.\n\nYou can capture the event like so:\n```javascript\nimport {create, ev} from '@open-wa/wa-automate';\n\n ev.on('sessionData.**', async (sessionData, sessionId) =>{\n console.log(sessionId, sessionData)\n })\n\n//or as base64 encoded string\n\n ev.on('sessionDataBase64.**', async (sessionDatastring, sessionId) =>{\n console.log(sessionId, sessionDatastring)\n })\n```\n NOTE: You can set sessionData as an evironmental variable also! The variable name has to be [sessionId (default = 'session) in all caps]_DATA_JSON. You have to make sure to surround your session data with single quotes to maintain the formatting.\n\nFor example:\n\nsessionId = 'session'\n\nTo set env var:\n```bash\n export SESSION_DATA_JSON=`...`\n```\nwhere ... is copied from session.data.json this will be a string most likley starting in `ey...` and ending with `==`\n\nSetting the sessionData in the environmental variable will override the sessionData object in the config."},"browserWSEndpoint":{"title":"ConfigObject.browserWSEndpoint","description":"ALPHA EXPERIMENTAL FEATURE! DO NOT USE IN PRODUCTION, REQUIRES TESTING.\n\nLearn more:\n\nhttps://pptr.dev/#?product=Puppeteer&version=v3.1.0&show=api-puppeteerconnectoptions\n\nhttps://medium.com/@jaredpotter1/connecting-puppeteer-to-existing-chrome-window-8a10828149e0","type":"string"},"useStealth":{"title":"ConfigObject.useStealth","description":"This flag allows you to disable or enable the use of the puppeteer stealth plugin. It is a good idea to use it, however it can cause issues sometimes. Set this to false if you are experiencing `browser.setMaxListeneres` issue. For now the default for this is false.","default":"`false`","type":"boolean"},"sessionDataPath":{"title":"ConfigObject.sessionDataPath","description":"The path relative to the current working directory (i.e where you run the command to start your process). This will be used to store and read your `.data.json` files. defualt to ''","type":"string"},"bypassCSP":{"title":"ConfigObject.bypassCSP","description":"Disable cors see: https://pptr.dev/#?product=Puppeteer&version=v3.0.4&show=api-pagesetbypasscspenabled If you are having an issue with sending media try to set this to true. Otherwise leave it set to false.","default":"`false`","type":"boolean"},"chromiumArgs":{"items":{"title":"ConfigObject.chromiumArgs.[]","type":"string"},"title":"ConfigObject.chromiumArgs","description":"This allows you to pass any array of custom chrome/chromium argument strings to the puppeteer instance.\nYou can find all possible arguements [here](https://peter.sh/experiments/chromium-command-line-switches/).","type":"array"},"skipBrokenMethodsCheck":{"title":"ConfigObject.skipBrokenMethodsCheck","description":"If set to true, skipBrokenMethodsCheck will bypass the health check before startup. It is highly suggested to not set this to true.","default":"`false`","type":"boolean"},"skipUpdateCheck":{"title":"ConfigObject.skipUpdateCheck","description":"If set to true, `skipUpdateCheck` will bypass the latest version check. This saves some time on boot (around 150 ms).","default":"`false`","type":"boolean"},"sessionId":{"title":"ConfigObject.sessionId","description":"This is the name of the session. You have to make sure that this is unique for every session.","default":"`session`","type":"string"},"licenseKey":{"$ref":"#/components/schemas/LicenseKey","title":"ConfigObject.licenseKey","description":"In order to unlock the functionality to send texts to unknown numbers, you need a License key.\nOne License Key is valid for each number. Each License Key starts from £5 per month.\n\nPlease check README for instructions on how to get a license key.\n\nNotes:\n1. You can change the number assigned to that License Key at any time, just message me the new number on the private discord channel.\n2. In order to cancel your License Key, simply stop your membership."},"customUserAgent":{"title":"ConfigObject.customUserAgent","description":"You may set a custom user agent. However, due to recent developments, this is not really neccessary any more.","type":"string"},"devtools":{"anyOf":[{"title":"ConfigObject.devtools","type":"boolean"},{"$ref":"#/components/schemas/DevTools","title":"ConfigObject.devtools"}],"title":"ConfigObject.devtools","description":"You can enable remote devtools by setting this to trye. If you set this to true there will be security on the devtools url.\nIf you want, you can also pass a username & password."},"blockCrashLogs":{"title":"ConfigObject.blockCrashLogs","description":"Setting this to true will block any network calls to crash log servers. This should keep anything you do under the radar.","default":"`true`","type":"boolean"},"cacheEnabled":{"title":"ConfigObject.cacheEnabled","description":"Setting this to false turn off the cache. This may improve memory usage.","default":"`false`","type":"boolean"},"browserRevision":{"title":"ConfigObject.browserRevision","description":"This is the specific browser revision to be downlaoded and used. You can find browser revision strings here: http://omahaproxy.appspot.com/\nLearn more about it here: https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#class-browserfetcher\nIf you're having trouble with sending images, try '737027'.\nIf you go too far back things will start breaking !!!!!!\nNOTE: THIS WILL OVERRIDE useChrome and executablePath. ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING.","type":"string"},"throwErrorOnTosBlock":{"title":"ConfigObject.throwErrorOnTosBlock","description":"Setting this to true will throw an error if a session is not able to get a QR code or is unable to restart a session.","type":"boolean"},"headless":{"title":"ConfigObject.headless","description":"By default, all instances of @open-wa/wa-automate are headless (i.e you don't see a chrome window open), you can set this to false to show the chrome/chromium window.","default":"`true`","type":"boolean"},"autoRefresh":{"title":"ConfigObject.autoRefresh","description":"@deprecated THIS IS LOCKED TO `true` AND CANNOT BE TURNED OFF. PLEASE SEE [[authTimeout]]\n\nSetting this to true will result in new QR codes being generated if the end user takes too long to scan the QR code.","default":"`true`","type":"boolean"},"qrRefreshS":{"title":"ConfigObject.qrRefreshS","description":"@deprecated This now has no effect\n\nThis determines the interval at which to refresh the QR code. By default, WA updates the qr code every 18-19 seconds so make sure this value is set to UNDER 18 seconds!!","type":"number"},"qrTimeout":{"title":"ConfigObject.qrTimeout","description":"This determines how long the process should wait for a QR code to be scanned before killing the process entirely. To have the system wait continuously, set this to `0`.","default":"60","type":"number"},"executablePath":{"title":"ConfigObject.executablePath","description":"Some features, like video upload, do not work without a chrome instance. Set this to the path of your chrome instance or you can use `useChrome:true` to automatically detect a chrome instance for you. Please note, this overrides `useChrome`.","type":"string"},"useChrome":{"title":"ConfigObject.useChrome","description":"If true, the program will automatically try to detect the instance of chorme on the machine. Please note this DOES NOT override executablePath.","default":"`false`","type":"boolean"},"proxyServerCredentials":{"$ref":"#/components/schemas/ProxyServerCredentials","title":"ConfigObject.proxyServerCredentials","description":"If sent, adds a call to waPage.authenticate with those credentials. Set `corsFix` to true if using a proxy results in CORS errors."},"qrLogSkip":{"title":"ConfigObject.qrLogSkip","description":"If true, skips logging the QR Code to the console.","default":"`false`","type":"boolean"},"restartOnCrash":{"title":"ConfigObject.restartOnCrash","description":"If set, the program will try to recreate itself when the page crashes. You have to pass the function that you want called upon restart. Please note that when the page crashes you may miss some messages.\nE.g:\n```javascript\nconst start = async (client: Client) => {...}\ncreate({\n...\nrestartOnCrash: start,\n...\n})\n```"},"disableSpins":{"title":"ConfigObject.disableSpins","description":"Setting this to true will simplify logs for use within docker containers by disabling spins (will still print raw messages).","default":"`false`","type":"boolean"},"logConsole":{"title":"ConfigObject.logConsole","description":"If true, this will log any console messages from the browser.","default":"`false`","type":"boolean"},"logConsoleErrors":{"title":"ConfigObject.logConsoleErrors","description":"If true, this will log any error messages from the browser instance","default":"`false`","type":"boolean"},"authTimeout":{"title":"ConfigObject.authTimeout","description":"This determines how long the process should wait for the session authentication. If exceeded, checks if phone is out of reach (turned of or without internet connection) and throws an error. It does not relate to the amount of time spent waiting for a qr code scan (see [[qrTimeout]]). To have the system wait continuously, set this to `0`.","default":"`60`","type":"number"},"oorTimeout":{"title":"ConfigObject.oorTimeout","description":"phoneIsOutOfReach check timeout","default":"`60`","type":"number"},"killProcessOnBrowserClose":{"title":"ConfigObject.killProcessOnBrowserClose","description":"Setting this to `true` will kill the whole process when the client is disconnected from the page or if the browser is closed.","default":"`false`","type":"boolean"},"safeMode":{"title":"ConfigObject.safeMode","description":"If true, client will check if the page is valid before each command. If page is not valid, it will throw an error.","default":"`false`","type":"boolean"},"skipSessionSave":{"title":"ConfigObject.skipSessionSave","description":"If true, the process will not save a data.json file. This means that sessions will not be saved and you will need to pass sessionData as a config param or create the session data.json file yourself","default":"`false`","type":"boolean"},"popup":{"title":"ConfigObject.popup","description":"If true, the process will open a browser window where you will see basic event logs and QR codes to authenticate the session. Usually it will open on port 3000. It can also be set to a preferred port.\n\nYou can also get the QR code png at (if localhost and port 3000):\n\n`http://localhost:3000/qr`\n\nor if you have multiple session:\n\n `http://localhost:3000/qr?sessionId=[sessionId]`","default":"`false | 3000`","anyOf":[{"type":"boolean"},{"type":"number"}]},"qrPopUpOnly":{"title":"ConfigObject.qrPopUpOnly","description":"This needs to be used in conjuction with `popup`, if `popup` is not true or a number (representing a desired port) then this will not work.\n\nSetting this to true will make sure that only the qr code png is served via the web server. This is useful if you do not need the whole status page.\n\nAs mentioned in [popup](#popup), the url for the qr code is `http://localhost:3000/qr` if the port is 3000.","type":"boolean"},"inDocker":{"title":"ConfigObject.inDocker","description":"If true, the process will try infer as many config variables as possible from the environment variables. The format of the variables are as below:\n```\nsessionData ==> WA_SESSION_DATA\nsessionDataPath ==> WA_SESSION_DATA_PATH\nsessionId ==> WA_SESSION_ID\ncustomUserAgent ==> WA_CUSTOM_USER_AGENT\nblockCrashLogs ==> WA_BLOCK_CRASH_LOGS\nblockAssets ==> WA_BLOCK_ASSETS\ncorsFix ==> WA_CORS_FIX\ncacheEnabled ==> WA_CACHE_ENABLED\nheadless ==> WA_HEADLESS\nqrTimeout ==> WA_QR_TIMEOUT\nuseChrome ==> WA_USE_CHROME\nqrLogSkip ==> WA_QR_LOG_SKIP\ndisableSpins ==> WA_DISABLE_SPINS\nlogConsole ==> WA_LOG_CONSOLE\nlogConsoleErrors==> WA_LOG_CONSOLE_ERRORS\nauthTimeout ==> WA_AUTH_TIMEOUT\nsafeMode ==> WA_SAFE_MODE\nskipSessionSave ==> WA_SKIP_SESSION_SAVE\npopup ==> WA_POPUP\nlicensekey ==> WA_LICENSE_KEY\n```","default":"`false`","type":"boolean"},"qrQuality":{"$ref":"#/components/schemas/QRQuality","title":"ConfigObject.qrQuality","description":"The output quality of the qr code during authentication. This can be any increment of 0.1 from 0.1 to 1.0.","default":"`1.0`"},"qrFormat":{"$ref":"#/components/schemas/QRFormat","title":"ConfigObject.qrFormat","description":"The output format of the qr code. `png`, `jpeg` or `webm`.","default":"`png`"},"hostNotificationLang":{"$ref":"#/components/schemas/NotificationLanguage","title":"ConfigObject.hostNotificationLang","description":"The language of the host notification. See: https://github.com/open-wa/wa-automate-nodejs/issues/709#issuecomment-673419088"},"blockAssets":{"title":"ConfigObject.blockAssets","description":"Setting this to true will block all assets from loading onto the page. This may result in some load time improvements but also increases instability.","default":"`false`","type":"boolean"},"keepUpdated":{"title":"ConfigObject.keepUpdated","description":"[ALPHA FEATURE - ONLY IMPLEMENTED FOR TESTING - DO NOT USE IN PRODUCTION YET]\nSetting this to true will result in the library making sure it is always starting with the latest version of itself. This overrides `skipUpdateCheck`.","default":"`false`","type":"boolean"},"resizable":{"title":"ConfigObject.resizable","description":"Syncs the viewport size with the window size which is how normal browsers act. Only relevant when `headless: false` and this overrides `viewport` config.","default":"`true`","type":"boolean"},"viewport":{"properties":{"width":{"title":"ConfigObject.viewport.width","description":"Page width in pixels","default":"`1440`","type":"number"},"height":{"title":"ConfigObject.viewport.height","description":"Page height in pixels","default":"`900`","type":"number"}},"additionalProperties":false,"title":"ConfigObject.viewport","description":"Set the desired viewport height and width. For CLI, use [width]x[height] format. E.g `--viewport 1920x1080`.","type":"object"},"legacy":{"title":"ConfigObject.legacy","description":"As the library is constantly evolving, some parts will be replaced with more efficient and improved code. In some of the infinite edge cases these new changes may not work for you. Set this to true to roll back on 'late beta' features. The reason why legacy is false by default is that in order for features to be tested they have to be released and used by everyone to find the edge cases and fix them.","default":"`false`","type":"boolean"},"deleteSessionDataOnLogout":{"title":"ConfigObject.deleteSessionDataOnLogout","description":"Deletes the session data file (if found) on logout event. This results in a quicker login when you restart the process.","default":"`false`","type":"boolean"},"killProcessOnTimeout":{"title":"ConfigObject.killProcessOnTimeout","description":"If set to true, the system will kill the whole node process when either an [[authTimeout]] or a [[qrTimeout]] has been reached. This is useful to prevent hanging processes.","default":"`false`","type":"boolean"},"corsFix":{"title":"ConfigObject.corsFix","description":"Setting this to true will bypass web security. DO NOT DO THIS IF YOU DO NOT HAVE TO. CORS issue may arise when using a proxy.","default":"`false`","type":"boolean"},"callTimeout":{"title":"ConfigObject.callTimeout","description":"Amount of time (in ms) to wait for a client method (specifically methods that interact with the WA web session) to resolve. If a client method results takes longer than the timout value then it will result in a [[PageEvaluationTimeout]] error.\n\nIf you get this error, it does not automatically mean that the method failed - it just stops your program from waiting for a client method to resolve.\n\nThis is useful if you do not rely on the results of a client method (e.g the message ID).\n\nIf set to `0`, the process will wait indefinitely for a client method to resolve.","default":"0","type":"number"},"screenshotOnInitializationBrowserError":{"title":"ConfigObject.screenshotOnInitializationBrowserError","description":"When true, this option will take a screenshot of the browser when an unexpected error occurs within the browser during `create` initialization. The path will be `[working directory]/logs/[session ID]/[start timestamp]/[timestamp].jpg`","default":"`false`","type":"boolean"},"eventMode":{"title":"ConfigObject.eventMode","description":"Setting listeners may not be your cup of tea. With eventMode, all [[SimpleListener]] events will be registered automatically and be filed via the built in Events Listener.\n\nThis is useful because you can register/deregister the event listener as needed whereas the legacy method of setting callbacks are only be set once","default":"`true`;","type":"boolean"},"logFile":{"title":"ConfigObject.logFile","description":"If true, the system will automatically create a log of all processes relating to actions sent to the web session.\n\nThe location of the file will be relative to the process directory (pd)\n\n`[pd]/[sessionId]/[start timestamp].log`","default":"false","type":"boolean"},"idCorrection":{"title":"ConfigObject.idCorrection","description":"When true, the system will attempt to correct chatIds and groupChatIds. This means you can ignore `@c.us` and `@g.us` distinctions in some parameters.","default":"false","type":"boolean"},"stickerServerEndpoint":{"title":"ConfigObject.stickerServerEndpoint","description":"Redundant until self-hostable sticker server is available.","default":"`https://sticker-api.openwa.dev`","anyOf":[{"type":"string"},{"type":"boolean"}]},"ghPatch":{"title":"ConfigObject.ghPatch","description":"This will force the library to use the default cached raw github link for patches to shave a few hundred milliseconds from your launch time. If you use this option, you will need to wait about 5 minutes before trying out new patches.","default":"`false`","type":"boolean"},"cachedPatch":{"title":"ConfigObject.cachedPatch","description":"Setting this to `true` will save a local copy of the patches.json file (as patches.ignore.data.json) which will be used in subsequent instantiations of the session. While the rest of the launch procedure is running, the library will fetch and save a recent version of the patches to ensure your patches don't go stale. This will be ignored if the cached patches are more than a day old.","default":"`false`","type":"boolean"},"logDebugInfoAsObject":{"title":"ConfigObject.logDebugInfoAsObject","description":"Setting `this` to true will replace the `console.table` with a stringified logging of the debug info object instead. This would be useful to set for smaller terminal windows. If `disableSpins` is `true` then this will also be `true`.","default":"`false`","type":"boolean"},"killClientOnLogout":{"title":"ConfigObject.killClientOnLogout","description":"Kill the client when a logout is detected","default":"`false`","type":"boolean"},"throwOnExpiredSessionData":{"title":"ConfigObject.throwOnExpiredSessionData","description":"This will make the `create` command return `false` if the detected session data is expired.\n\nThis will mean, the process will not attempt to automatically get a new QR code.","default":"`false`","type":"boolean"},"useNativeProxy":{"title":"ConfigObject.useNativeProxy","description":"Some sessions may experience issues with sending media when using proxies. Using the native proxy system instead of the recommended 3rd party library may fix these issues.","default":"`false`","type":"boolean"},"raspi":{"title":"ConfigObject.raspi","description":"Set this to `true` to make the library work on Raspberry Pi OS.\n\nMake sure to run the following command before running the library the first time:\n\n```\n> sudo apt update -y && sudo apt install chromium-browser chromium-codecs-ffmpeg -y && sudo apt upgrade\n```\n\nIf you're using the CLI, you can set this value to `true` by adding the following flag to the CLI command\n\n```\n> npx @open-wa/wa-automate ... --raspi\n```","default":"`false`","type":"boolean"},"pQueueDefault":{"title":"ConfigObject.pQueueDefault","description":"Default pqueue options applied to all listeners that can take pqueue options as a second optional parameter. For now, this only includes `onMessage` and `onAnyMessage`.\n\nSee: https://github.com/sindresorhus/p-queue#options\n\nExample: process 5 events within every 3 seconds window. Make sure to only process at most 2 at any one time. Make sure there is at least 100ms between each event processing.\n\n```javascript\n {\n intervalCap: 5, //process 5 events\n interval: 3000, //within every three second window\n concurrency: 2, //make sure to process, at most, 2 events at any one time\n timeout: 100, //make sure there is a 100ms gap between each event processing.\n carryoverConcurrencyCount: true //If there are more than 5 events in that period, process them within the next 3 second period. Make sure this is always set to true!!!\n }\n```","default":"`undefined`"},"messagePreprocessor":{"title":"ConfigObject.messagePreprocessor","description":"Set a preprocessor, or multiple chained preprocessors, for messages. See [MPConfigType](/) for more info.\n\noptions: `SCRUB`, `BODY_ONLY`, `AUTO_DECRYPT`, `AUTO_DECRYPT_SAVE`, `UPLOAD_CLOUD`.","default":"`undefined`"},"preprocFilter":{"title":"ConfigObject.preprocFilter","description":"Set an array filter to be used with messagePreprocessor to limit which messages are preprocessed.\n\nE.g if you want to scrub all messages that are not from a group, you can do the following:\n`\"m=>!m.isGroupMsg\"`","default":"`undefined`","type":"string"},"cloudUploadOptions":{"properties":{"provider":{"$ref":"#/components/schemas/CLOUD_PROVIDERS","title":"ConfigObject.cloudUploadOptions.provider","description":"`AWS`, `GCP` or `WASABI`\n\nenv: `OW_CLOUD_ACCESS_KEY_ID`"},"accessKeyId":{"title":"ConfigObject.cloudUploadOptions.accessKeyId","description":"S3 compatible access key ID.\n\ne.g: `AKIAIOSFODNN7EXAMPLE` or `GOOGTS7C7FUP3AIRVJTE2BCD`\n\nenv: `OW_CLOUD_ACCESS_KEY_ID`","type":"string"},"secretAccessKey":{"title":"ConfigObject.cloudUploadOptions.secretAccessKey","description":"S3 compatible secret access key.\n\ne.g `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`\n\nenv: `OW_CLOUD_SECRET_ACCESS_KEY`","type":"string"},"bucket":{"title":"ConfigObject.cloudUploadOptions.bucket","description":"Bucket name\n\nenv: `OW_CLOUD_BUCKET`","type":"string"},"region":{"title":"ConfigObject.cloudUploadOptions.region","description":"Bucket region.\n\nNot required for `GCP` provider\n\nenv: `OW_CLOUD_REGION`","type":"string"},"ignoreHostAccount":{"title":"ConfigObject.cloudUploadOptions.ignoreHostAccount","description":"Ignore processing of messages that are sent by the host account itself\n\nenv: `OW_CLOUD_IGNORE_HOST`","type":"boolean"},"directory":{"anyOf":[{"$ref":"#/components/schemas/DIRECTORY_STRATEGY","title":"ConfigObject.cloudUploadOptions.directory"},{"title":"ConfigObject.cloudUploadOptions.directory","type":"string"}],"title":"ConfigObject.cloudUploadOptions.directory","description":"The directory strategy to use when uploading files. Or just set it to a custom directory string.\n\nenv: `OW_DIRECTORY`"},"public":{"title":"ConfigObject.cloudUploadOptions.public","description":"Setting this to true will make the uploaded file public","type":"boolean"},"headers":{"additionalProperties":{"type":"string"},"title":"ConfigObject.cloudUploadOptions.headers","description":"Extra headers to add to the upload request","type":"object"}},"required":["provider","accessKeyId","secretAccessKey","bucket"],"additionalProperties":false,"title":"ConfigObject.cloudUploadOptions","description":"REQUIRED IF `messagePreprocessor` IS SET TO `UPLOAD_CLOUD`.\n\nThis can be set via the config or the corresponding environment variables.","type":"object"},"onError":{"$ref":"#/components/schemas/OnError","title":"ConfigObject.onError","description":"What to do when an error is detected on a client method.","default":"`OnError.NOTHING`"},"multiDevice":{"title":"ConfigObject.multiDevice","description":"Please note that multi-device is still in beta so a lot of things may not work. It is HIGHLY suggested to NOT use this in production!!!!\n\nSet this to true if you're using the multidevice beta.","default":"`true`\n:::danger\nSome features (e.g [[sendLinkWithAutoPreview]]) **do not** work with multi-device beta. Check [this `api`](#).\n:::","type":"boolean"},"sessionDataBucketAuth":{"title":"ConfigObject.sessionDataBucketAuth","description":"Base64 encoded S3 Bucket & Authentication object for session data files. The object should be in the same format as cloudUploadOptions.","type":"string"},"autoEmoji":{"anyOf":[{"title":"ConfigObject.autoEmoji","type":"string"},{"title":"ConfigObject.autoEmoji","enum":[false],"type":"boolean"}],"title":"ConfigObject.autoEmoji","description":"Set the automatic emoji detection character. Set this to `false` to disable auto emoji. Default is `:`.","default":"`:`"},"maxChats":{"title":"ConfigObject.maxChats","description":"Set the maximum amount of chats to be present in a session.","type":"number"},"maxMessages":{"title":"ConfigObject.maxMessages","description":"Set the maximum amount of messages to be present in a session.","type":"number"},"discord":{"title":"ConfigObject.discord","description":"Your Discord ID to get onto the sticker leaderboard!","type":"string"},"ignoreNuke":{"title":"ConfigObject.ignoreNuke","description":"Don't implicitly determine if the host logged out.","type":"boolean"},"ensureHeadfulIntegrity":{"title":"ConfigObject.ensureHeadfulIntegrity","description":"Makes sure the headless session is usable even on first login.\nHeadful sessions are ususally only usable on reauthentication.","type":"boolean"},"waitForRipeSession":{"title":"ConfigObject.waitForRipeSession","description":"wait for a valid headful session. Not required in recent versions.\ndefault: `true`","type":"boolean"},"qrMax":{"title":"ConfigObject.qrMax","description":"Automatically kill the process after a set amount of qr codes","type":"number"},"ezqr":{"title":"ConfigObject.ezqr","description":"Expose a URL where you can easily scan the qr code","type":"boolean"},"logging":{"items":{"$ref":"#/components/schemas/ConfigLogTransport","title":"ConfigObject.logging.[]"},"title":"ConfigObject.logging","description":"An array of [winston](https://github.com/winstonjs/winston/blob/master/docs/transports.md#additional-transports) logging transport configurations.\n\n[Check this discussion to see how to set up logging](https://github.com/open-wa/wa-automate-nodejs/discussions/2373)","type":"array"},"linkParser":{"title":"ConfigObject.linkParser","description":"The URL of your instance of [serverless meta grabber](https://github.com/RemiixInc/meta-grabber-serverless) by [RemiixInc](https://github.com/RemiixInc).\n\ndefault: `https://link.openwa.cloud/api`","type":"string"},"aggressiveGarbageCollection":{"title":"ConfigObject.aggressiveGarbageCollection","description":"Setting this to true will run `gc()` on before every command sent to the browser.\n\nThis is experimental and may not work or it may have unforeseen sideeffects.","type":"boolean"}},"additionalProperties":{},"title":"ConfigObject","type":"object"},"AdvancedConfig":{"allOf":[{"$ref":"#/components/schemas/ConfigObject"},{"properties":{"licenseKey":{"$ref":"#/components/schemas/LicenseKeyConfig","title":"licenseKey"}},"required":["licenseKey"],"additionalProperties":false,"type":"object"}],"title":"AdvancedConfig"},"LicenseKey":{"title":"LicenseKey","type":"string"},"LicenseKeyConfig":{"anyOf":[{"$ref":"#/components/schemas/LicenseKeyConfigFunction","title":"LicenseKeyConfig"},{"$ref":"#/components/schemas/LicenseKeyConfigObject","title":"LicenseKeyConfig"},{"$ref":"#/components/schemas/LicenseKey","title":"LicenseKeyConfig"}],"title":"LicenseKeyConfig"},"NumberCheck":{"properties":{"id":{"$ref":"#/components/schemas/Id","title":"NumberCheck.id"},"status":{"enum":[200,404],"title":"NumberCheck.status","type":"number"},"isBusiness":{"title":"NumberCheck.isBusiness","type":"boolean"},"canReceiveMessage":{"title":"NumberCheck.canReceiveMessage","type":"boolean"},"numberExists":{"title":"NumberCheck.numberExists","type":"boolean"}},"required":["id","status","isBusiness","canReceiveMessage","numberExists"],"additionalProperties":false,"title":"NumberCheck","type":"object"},"Contact":{"properties":{"formattedName":{"title":"Contact.formattedName","type":"string"},"id":{"$ref":"#/components/schemas/ContactId","title":"Contact.id"},"isBusiness":{"title":"Contact.isBusiness","type":"boolean"},"isEnterprise":{"title":"Contact.isEnterprise","description":"Most likely true when the account has a green tick. See `verifiedLevel` also.","type":"boolean"},"isMe":{"title":"Contact.isMe","type":"boolean"},"isMyContact":{"title":"Contact.isMyContact","type":"boolean"},"isPSA":{"title":"Contact.isPSA","type":"boolean"},"isUser":{"title":"Contact.isUser","type":"boolean"},"isWAContact":{"title":"Contact.isWAContact","type":"boolean"},"labels":{"items":{"title":"Contact.labels.[]","type":"string"},"title":"Contact.labels","type":"array"},"msgs":{"items":{"$ref":"#/components/schemas/Message","title":"Contact.msgs.[]"},"title":"Contact.msgs","type":"array"},"name":{"title":"Contact.name","type":"string"},"plaintextDisabled":{"title":"Contact.plaintextDisabled","type":"boolean"},"profilePicThumbObj":{"properties":{"eurl":{"title":"Contact.profilePicThumbObj.eurl","type":"string"},"id":{"$ref":"#/components/schemas/Id","title":"Contact.profilePicThumbObj.id"},"img":{"title":"Contact.profilePicThumbObj.img","type":"string"},"imgFull":{"title":"Contact.profilePicThumbObj.imgFull","type":"string"},"raw":{"title":"Contact.profilePicThumbObj.raw","type":"string"},"tag":{"title":"Contact.profilePicThumbObj.tag","type":"string"}},"required":["eurl","id","img","imgFull","raw","tag"],"additionalProperties":false,"title":"Contact.profilePicThumbObj","type":"object"},"pushname":{"title":"Contact.pushname","type":"string"},"shortName":{"title":"Contact.shortName","type":"string"},"statusMute":{"title":"Contact.statusMute","type":"boolean"},"type":{"title":"Contact.type","type":"string"},"verifiedLevel":{"title":"Contact.verifiedLevel","description":"0 = not verified\n2 = verified (most likely represents a blue tick)","type":"number"},"verifiedName":{"title":"Contact.verifiedName","description":"The business account name verified by WA.","type":"string"},"isOnline":{"title":"Contact.isOnline","type":"boolean"},"lastSeen":{"title":"Contact.lastSeen","type":"number"}},"required":["formattedName","id","isBusiness","isEnterprise","isMe","isMyContact","isPSA","isUser","isWAContact","labels","msgs","name","plaintextDisabled","profilePicThumbObj","pushname","shortName","statusMute","type","verifiedLevel","verifiedName"],"additionalProperties":false,"title":"Contact","type":"object"},"Participant":{"properties":{"contact":{"$ref":"#/components/schemas/Contact","title":"Participant.contact"},"id":{"$ref":"#/components/schemas/NonSerializedId","title":"Participant.id"},"isAdmin":{"title":"Participant.isAdmin","type":"boolean"},"isSuperAdmin":{"title":"Participant.isSuperAdmin","type":"boolean"}},"required":["contact","id","isAdmin","isSuperAdmin"],"additionalProperties":false,"title":"Participant","type":"object"},"GroupMetadata":{"properties":{"id":{"$ref":"#/components/schemas/GroupChatId","title":"GroupMetadata.id","description":"The chat id of the group [[GroupChatId]]"},"creation":{"title":"GroupMetadata.creation","description":"The timestamp of when the group was created","type":"number"},"owner":{"$ref":"#/components/schemas/NonSerializedId","title":"GroupMetadata.owner","description":"The id of the owner of the group [[ContactId]]"},"participants":{"items":{"$ref":"#/components/schemas/Participant","title":"GroupMetadata.participants.[]"},"title":"GroupMetadata.participants","description":"An array of participants in the group","type":"array"},"pendingParticipants":{"items":{"$ref":"#/components/schemas/Participant","title":"GroupMetadata.pendingParticipants.[]"},"title":"GroupMetadata.pendingParticipants","description":"Unknown.","type":"array"},"desc":{"title":"GroupMetadata.desc","description":"The description of the group","type":"string"},"descOwner":{"$ref":"#/components/schemas/ContactId","title":"GroupMetadata.descOwner","description":"The account that set the description last."},"trusted":{"title":"GroupMetadata.trusted","type":"boolean"},"suspended":{"title":"GroupMetadata.suspended","description":"Not sure what this represents","type":"boolean"},"support":{"title":"GroupMetadata.support","description":"Not sure what this represents","type":"boolean"},"isParentGroup":{"title":"GroupMetadata.isParentGroup","description":"Is this group a parent group (a.k.a community)","type":"boolean"},"groupType":{"enum":["DEAFULT","SUBGROUP","COMMUNITY"],"title":"GroupMetadata.groupType","description":"The type of group","type":"string"},"defaultSubgroup":{"title":"GroupMetadata.defaultSubgroup","description":"Communities have a default group chat","type":"boolean"},"isParentGroupClosed":{"title":"GroupMetadata.isParentGroupClosed","type":"boolean"},"joinedSubgroups":{"items":{"$ref":"#/components/schemas/GroupId","title":"GroupMetadata.joinedSubgroups.[]"},"title":"GroupMetadata.joinedSubgroups","description":"List of Group IDs that the host account has joined as part of this community","type":"array"}},"required":["id","creation","owner","participants","pendingParticipants","groupType","defaultSubgroup","isParentGroupClosed","joinedSubgroups"],"additionalProperties":false,"title":"GroupMetadata","type":"object"},"ParticipantChangedEventModel":{"properties":{"by":{"$ref":"#/components/schemas/ContactId","title":"ParticipantChangedEventModel.by"},"action":{"$ref":"#/components/schemas/groupChangeEvent","title":"ParticipantChangedEventModel.action"},"who":{"items":{"$ref":"#/components/schemas/ContactId","title":"ParticipantChangedEventModel.who.[]"},"title":"ParticipantChangedEventModel.who","type":"array"},"chat":{"$ref":"#/components/schemas/ChatId","title":"ParticipantChangedEventModel.chat"}},"required":["by","action","who","chat"],"additionalProperties":false,"title":"ParticipantChangedEventModel","type":"object"},"NewCommunityGroup":{"properties":{"subject":{"title":"NewCommunityGroup.subject","type":"string"},"icon":{"$ref":"#/components/schemas/DataURL","title":"NewCommunityGroup.icon"},"ephemeralDuration":{"title":"NewCommunityGroup.ephemeralDuration","type":"number"}},"required":["subject"],"additionalProperties":false,"title":"NewCommunityGroup","description":"Used when creating a new community with.","type":"object"},"GenericGroupChangeEvent":{"properties":{"author":{"$ref":"#/components/schemas/Contact","title":"GenericGroupChangeEvent.author","description":"The contact who triggered this event. (E.g the contact who changed the group picture)"},"body":{"title":"GenericGroupChangeEvent.body","description":"Some more information about the event","type":"string"},"groupMetadata":{"$ref":"#/components/schemas/GroupMetadata","title":"GenericGroupChangeEvent.groupMetadata"},"groupPic":{"title":"GenericGroupChangeEvent.groupPic","description":"Base 64 encoded image","type":"string"},"id":{"$ref":"#/components/schemas/MessageId","title":"GenericGroupChangeEvent.id"},"type":{"enum":["picutre","create","delete","subject","revoke_invite","description","restrict","announce","no_frequently_forwarded","announce_msg_bounce","add","remove","demote","promote","invite","leave","modify","v4_add_invite_sent","v4_add_invite_join","growth_locked","growth_unlocked","linked_group_join"],"title":"GenericGroupChangeEvent.type","description":"Type of the event","type":"string"}},"required":["author","body","groupMetadata","groupPic","id","type"],"additionalProperties":false,"title":"GenericGroupChangeEvent","type":"object"},"Id":{"properties":{"server":{"title":"Id.server","type":"string"},"user":{"title":"Id.user","type":"string"},"_serialized":{"title":"Id._serialized","type":"string"}},"required":["server","user","_serialized"],"additionalProperties":false,"title":"Id","type":"object"},"EasyApiResponse":{"properties":{"success":{"title":"EasyApiResponse.success","type":"boolean"},"response":{"title":"EasyApiResponse.response"}},"required":["success","response"],"additionalProperties":false,"title":"EasyApiResponse","type":"object"},"Label":{"properties":{"id":{"title":"Label.id","description":"The internal ID of the label. Usually a number represented as a string e.g \"1\"","type":"string"},"name":{"title":"Label.name","description":"The text contents of the label","type":"string"},"items":{"items":{"properties":{"type":{"enum":["Chat","Contact","Message"],"title":"Label.items.[].type","description":"Labels can be applied to chats, contacts or individual messages. This represents the type of object the label is attached to.","type":"string"},"id":{"anyOf":[{"$ref":"#/components/schemas/ContactId","title":"Label.items.[].id"},{"$ref":"#/components/schemas/ChatId","title":"Label.items.[].id"},{"$ref":"#/components/schemas/MessageId","title":"Label.items.[].id"}],"title":"Label.items.[].id","description":"The ID of the object that the label is atteched to."}},"required":["type","id"],"additionalProperties":false,"title":"Label.items.[]","type":"object"},"title":"Label.items","description":"The items that are tagged with this label","type":"array"}},"required":["id","name","items"],"additionalProperties":false,"title":"Label","type":"object"},"StickerMetadata":{"properties":{"author":{"title":"StickerMetadata.author","description":"The author of the sticker","default":"``","type":"string"},"pack":{"title":"StickerMetadata.pack","description":"The pack of the sticker","default":"``","type":"string"},"removebg":{"anyOf":[{"title":"StickerMetadata.removebg","type":"boolean"},{"title":"StickerMetadata.removebg","enum":["HQ"],"type":"string"}],"title":"StickerMetadata.removebg","description":"ALPHA FEATURE - NO GUARANTEES IT WILL WORK AS EXPECTED:\n\n[REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)\n\nAttempt to remove the background of the sticker. Only valid for paid licenses.\n\noptions:\n\n `true` - remove background after resizing\n\n `HQ` - remove background before resizing (i.e on original photo)","default":"`false`"},"keepScale":{"title":"StickerMetadata.keepScale","description":"Setting this to `true` will skip the resizing/square-cropping of the sticker. It will instead 'letterbox' the image with a transparent background.","type":"boolean"},"circle":{"title":"StickerMetadata.circle","description":"Applies a circular mask to the sticker. Works on images only for now.","type":"boolean"},"discord":{"title":"StickerMetadata.discord","description":"Your Discord ID to get onto the sticker leaderboard!","type":"string"},"cropPosition":{"enum":["top","right top","right","right bottom","bottom","left bottom","left","left top","north","northeast","east","southeast","south","southwest","west","northwest","center","centre","entropy","attention"],"title":"StickerMetadata.cropPosition","description":"Crop position\n\nLearn more: https://sharp.pixelplumbing.com/api-resize","default":"`attention`","type":"string"},"cornerRadius":{"title":"StickerMetadata.cornerRadius","description":"The corner radius of the sticker when `stickerMetadata.circle` is set to true.\n@minimum `1`\n@maximum `100`\n@multipleOf `1`","default":"`100`","type":"number"}},"required":["author","pack"],"additionalProperties":false,"title":"StickerMetadata","type":"object"},"Mp4StickerConversionProcessOptions":{"properties":{"fps":{"title":"Mp4StickerConversionProcessOptions.fps","description":"Desired Frames per second of the sticker output","default":"`10`","type":"number"},"startTime":{"title":"Mp4StickerConversionProcessOptions.startTime","description":"The video start time of the sticker","default":"`00:00:00.0`","type":"string"},"endTime":{"title":"Mp4StickerConversionProcessOptions.endTime","description":"The video end time of the sticker. By default, stickers are made from the first 5 seconds of the video","default":"`00:00:05.0`","type":"string"},"loop":{"title":"Mp4StickerConversionProcessOptions.loop","description":"The amount of times the video loops in the sticker. To save processing time, leave this as 0\ndefault `0`","type":"number"},"crop":{"title":"Mp4StickerConversionProcessOptions.crop","description":"Centres and crops the video.\ndefault `true`","type":"boolean"},"log":{"title":"Mp4StickerConversionProcessOptions.log","description":"Prints ffmpeg logs in the terminal","default":"`false`","type":"boolean"},"square":{"title":"Mp4StickerConversionProcessOptions.square","description":"A number representing the WxH of the output sticker (default `512x512`). Lowering this number is a great way to process longer duration stickers. The max value is `512`.\ndefault `512`","type":"number"}},"additionalProperties":false,"title":"Mp4StickerConversionProcessOptions","type":"object"},"Message":{"properties":{"selectedButtonId":{"title":"Message.selectedButtonId","description":"The ID of the selected button","type":"string"},"id":{"$ref":"#/components/schemas/MessageId","title":"Message.id","description":"The id of the message. Consists of the Chat ID and a unique string.\n\nExample:\n\n```\nfalse_447123456789@c.us_7D914FEA78BE10277743F4B785045C37\n```"},"mId":{"title":"Message.mId","description":"The unique segment of the message id.\n\nExample:\n\n```\n7D914FEA78BE10277743F4B785045C37\n```","type":"string"},"body":{"title":"Message.body","description":"The body of the message. If the message type is `chat` , `body` will be the text of the chat. If the message type is some sort of media, then this body will be the thumbnail of the media.","type":"string"},"text":{"title":"Message.text","description":"a convenient way to get the main text content from a message.","type":"string"},"type":{"$ref":"#/components/schemas/MessageTypes","title":"Message.type","description":"The type of the message, see [[MessageTypes]]"},"filehash":{"title":"Message.filehash","description":"Used to checking the integrity of the decrypted media.","type":"string"},"mimetype":{"title":"Message.mimetype","type":"string"},"lat":{"title":"Message.lat","description":"The latitude of a location message","type":"string"},"lng":{"title":"Message.lng","description":"The longitude of a location message","type":"string"},"loc":{"title":"Message.loc","description":"The text associated with a location message","type":"string"},"t":{"title":"Message.t","description":"The timestamp of the message","type":"number"},"notifyName":{"title":"Message.notifyName","type":"string"},"from":{"$ref":"#/components/schemas/ChatId","title":"Message.from","description":"The chat from which the message was sent"},"to":{"$ref":"#/components/schemas/ChatId","title":"Message.to","description":"The chat id to which the message is being sent"},"self":{"enum":["in","out"],"title":"Message.self","description":"Indicates whether the message is coming into the session or going out of the session. You can have a message sent by the host account show as `in` when the message was sent from another\nsession or from the host account device itself.","type":"string"},"duration":{"title":"Message.duration","description":"The length of the media in the message, if it exists.","anyOf":[{"type":"string"},{"type":"number"}]},"ack":{"$ref":"#/components/schemas/MessageAck","title":"Message.ack","description":"The acknolwedgement state of a message [[MessageAck]]"},"invis":{"title":"Message.invis","type":"boolean"},"isNewMsg":{"title":"Message.isNewMsg","type":"boolean"},"star":{"title":"Message.star","type":"boolean"},"recvFresh":{"title":"Message.recvFresh","type":"boolean"},"broadcast":{"title":"Message.broadcast","description":"If the message is sent as a broadcast","type":"boolean"},"isForwarded":{"title":"Message.isForwarded","description":"If the message has been forwarded","type":"boolean"},"labels":{"items":{"title":"Message.labels.[]","type":"string"},"title":"Message.labels","description":"The labels associated with the message (used with business accounts)","type":"array"},"mentionedJidList":{"items":{"$ref":"#/components/schemas/ContactId","title":"Message.mentionedJidList.[]"},"title":"Message.mentionedJidList","description":"An array of all mentioned numbers in this message.","type":"array"},"caption":{"title":"Message.caption","description":"If the message is of a media type, it may also have a caption","type":"string"},"sender":{"$ref":"#/components/schemas/Contact","title":"Message.sender","description":"The contact object of the account that sent the message"},"timestamp":{"title":"Message.timestamp","description":"the timestanmp of the message","type":"number"},"filePath":{"title":"Message.filePath","description":"When `config.messagePreprocessor: \"AUTO_DECRYPT_SAVE\"` is set, media is decrypted and saved on disk in a folder called media relative to the current working directory.\n\nThis is the filePath of the decrypted file.","type":"string"},"filename":{"title":"Message.filename","description":"The given filename of the file","type":"string"},"content":{"title":"Message.content","type":"string"},"isGroupMsg":{"title":"Message.isGroupMsg","type":"boolean"},"isMMS":{"title":"Message.isMMS","type":"boolean"},"isMedia":{"title":"Message.isMedia","type":"boolean"},"isNotification":{"title":"Message.isNotification","type":"boolean"},"isPSA":{"title":"Message.isPSA","type":"boolean"},"fromMe":{"title":"Message.fromMe","description":"If the message is from the host account","type":"boolean"},"chat":{"$ref":"#/components/schemas/Chat","title":"Message.chat","description":"The chat object"},"chatId":{"$ref":"#/components/schemas/ChatId","title":"Message.chatId"},"author":{"title":"Message.author","type":"string"},"stickerAuthor":{"title":"Message.stickerAuthor","type":"string"},"stickerPack":{"title":"Message.stickerPack","type":"string"},"clientUrl":{"title":"Message.clientUrl","description":"@deprecated Ironically, you should be using `deprecatedMms3Url` instead","type":"string"},"deprecatedMms3Url":{"title":"Message.deprecatedMms3Url","type":"string"},"quotedMsg":{"$ref":"#/components/schemas/Message","title":"Message.quotedMsg"},"quotedMsgObj":{"$ref":"#/components/schemas/Message","title":"Message.quotedMsgObj"},"isGroupJoinRequest":{"title":"Message.isGroupJoinRequest","description":"When a user requests to join a group wihtin a community the request is received by the host as a message. This boolean will allow you to easily determine if the incoming message is a request to join a group.\n\nIf this is `true` then you need to determine within your own code whether or not to accept the user to the group which is indicated with `quotedRemoteJid` using `addParticipant`.","type":"boolean"},"senderId":{"title":"Message.senderId","description":"The ID of the message sender","type":"string"},"quotedRemoteJid":{"title":"Message.quotedRemoteJid","description":"The ID of the quoted group. Usually present when a user is requesting to join a group.","type":"string"},"quotedParentGroupJid":{"title":"Message.quotedParentGroupJid","description":"The parent group ID (community ID - communities are just groups made up of other groups) of the group represented by `quotedRemoteJid`","type":"string"},"mediaData":{"title":"Message.mediaData"},"shareDuration":{"title":"Message.shareDuration","type":"number"},"isAnimated":{"title":"Message.isAnimated","type":"boolean"},"ctwaContext":{"properties":{"sourceUrl":{"title":"Message.ctwaContext.sourceUrl","type":"string"},"thumbnail":{"title":"Message.ctwaContext.thumbnail","nullable":true,"type":"string"},"mediaType":{"title":"Message.ctwaContext.mediaType","type":"number"},"isSuspiciousLink":{"title":"Message.ctwaContext.isSuspiciousLink","nullable":true,"type":"boolean"}},"required":["sourceUrl","thumbnail","mediaType","isSuspiciousLink"],"additionalProperties":false,"title":"Message.ctwaContext","type":"object"},"isViewOnce":{"title":"Message.isViewOnce","description":"Is the message a \"view once\" message","type":"boolean"},"quoteMap":{"$ref":"#/components/schemas/QuoteMap","title":"Message.quoteMap","description":"Use this to traverse the quote chain."},"cloudUrl":{"title":"Message.cloudUrl","description":"The URL of the file after being uploaded to the cloud using a cloud upload message preprocessor.","type":"string"},"buttons":{"items":{"$ref":"#/components/schemas/Button","title":"Message.buttons.[]"},"title":"Message.buttons","description":"Buttons associated with the message","type":"array"},"listResponse":{"$ref":"#/components/schemas/Row","title":"Message.listResponse","description":"List response associated with the message"},"list":{"properties":{"\"sections\"":{"items":{"$ref":"#/components/schemas/Section","title":"Message.list.\"sections\".[]"},"title":"Message.list.\"sections\"","type":"array"},"\"title\"":{"title":"Message.list.\"title\"","type":"string"},"\"description\"":{"title":"Message.list.\"description\"","type":"string"},"\"buttonText\"":{"title":"Message.list.\"buttonText\"","type":"string"}},"required":["\"sections\"","\"title\"","\"description\"","\"buttonText\""],"additionalProperties":false,"title":"Message.list","description":"The list associated with the list message","type":"object"},"pollOptions":{"items":{"$ref":"#/components/schemas/PollOption","title":"Message.pollOptions.[]"},"title":"Message.pollOptions","description":"The options of a poll","type":"array"}},"required":["selectedButtonId","id","mId","body","text","type","t","notifyName","from","to","self","ack","invis","isNewMsg","star","recvFresh","broadcast","isForwarded","labels","mentionedJidList","caption","sender","timestamp","content","isGroupMsg","isMMS","isMedia","isNotification","isPSA","fromMe","chat","chatId","author","clientUrl","deprecatedMms3Url","mediaData","shareDuration","isAnimated","isViewOnce","quoteMap"],"additionalProperties":false,"title":"Message","type":"object"},"PollOption":{"properties":{"name":{"title":"PollOption.name","type":"string"},"localId":{"title":"PollOption.localId","type":"number"}},"required":["name","localId"],"additionalProperties":false,"title":"PollOption","type":"object"},"PollData":{"properties":{"totalVotes":{"title":"PollData.totalVotes","description":"The total amount of votes recorded so far","type":"number"},"pollOptions":{"items":{"allOf":[{"$ref":"#/components/schemas/PollOption"},{"properties":{"count":{"title":"count","type":"number"}},"required":["count"],"additionalProperties":false,"type":"object"}]},"title":"PollData.pollOptions","description":"The poll options and their respective count of votes.","type":"array"},"votes":{"items":{"$ref":"#/components/schemas/PollVote","title":"PollData.votes.[]"},"title":"PollData.votes","description":"An arrray of vote objects","type":"array"},"pollMessage":{"$ref":"#/components/schemas/Message","title":"PollData.pollMessage","description":"The message object of the poll"}},"required":["totalVotes","pollOptions","votes","pollMessage"],"additionalProperties":false,"title":"PollData","type":"object"},"PollVote":{"properties":{"ack":{"title":"PollVote.ack","type":"number"},"id":{"title":"PollVote.id","description":"The message ID of this vote. For some reason this is different from the msgKey and includes exclamaition marks.","type":"string"},"msgKey":{"title":"PollVote.msgKey","description":"The message key of this vote","type":"string"},"parentMsgKey":{"title":"PollVote.parentMsgKey","description":"The Message ID of the original Poll message","type":"string"},"pollOptions":{"items":{"$ref":"#/components/schemas/PollOption","title":"PollVote.pollOptions.[]"},"title":"PollVote.pollOptions","description":"The original poll options available on the poll","type":"array"},"selectedOptionLocalIds":{"items":{"title":"PollVote.selectedOptionLocalIds.[]","type":"number"},"title":"PollVote.selectedOptionLocalIds","description":"The selected option IDs of the voter","type":"array"},"selectedOptionValues":{"items":{"title":"PollVote.selectedOptionValues.[]","type":"string"},"title":"PollVote.selectedOptionValues","description":"The selected option values by this voter","type":"array"},"sender":{"$ref":"#/components/schemas/ContactId","title":"PollVote.sender","description":"The contact ID of the voter"},"senderObj":{"$ref":"#/components/schemas/Contact","title":"PollVote.senderObj","description":"The contact object of the voter"},"senderTimestampMs":{"title":"PollVote.senderTimestampMs","description":"Timestamp of the vote","type":"number"},"stale":{"title":"PollVote.stale","type":"boolean"}},"required":["ack","id","msgKey","parentMsgKey","pollOptions","selectedOptionLocalIds","selectedOptionValues","sender","senderObj","senderTimestampMs","stale"],"additionalProperties":false,"title":"PollVote","type":"object"},"QuoteMap":{"additionalProperties":{"properties":{"body":{"title":"body","description":"The body of the message","type":"string"},"quotes":{"$ref":"#/components/schemas/MessageId","title":"quotes","description":"The message ID of the message that was quoted. Null if no message was quoted."}},"required":["body"],"additionalProperties":false,"type":"object"},"title":"QuoteMap","type":"object"},"MessageInfoInteraction":{"properties":{"id":{"$ref":"#/components/schemas/ContactId","title":"MessageInfoInteraction.id","description":"The contact ID of the contact that interacted with the message."},"t":{"title":"MessageInfoInteraction.t","description":"The timestamp of the interaction. You have to x 1000 to use in a JS Date object.","type":"number"}},"required":["id","t"],"additionalProperties":false,"title":"MessageInfoInteraction","type":"object"},"MessageInfo":{"properties":{"deliveryRemaining":{"title":"MessageInfo.deliveryRemaining","type":"number"},"playedRemaining":{"title":"MessageInfo.playedRemaining","type":"number"},"readRemaining":{"title":"MessageInfo.readRemaining","type":"number"},"delivery":{"items":{"$ref":"#/components/schemas/MessageInfoInteraction","title":"MessageInfo.delivery.[]"},"title":"MessageInfo.delivery","type":"array"},"read":{"items":{"$ref":"#/components/schemas/MessageInfoInteraction","title":"MessageInfo.read.[]"},"title":"MessageInfo.read","type":"array"},"played":{"items":{"$ref":"#/components/schemas/MessageInfoInteraction","title":"MessageInfo.played.[]"},"title":"MessageInfo.played","type":"array"},"id":{"$ref":"#/components/schemas/MessageId","title":"MessageInfo.id","description":"The ID of the message"}},"required":["deliveryRemaining","playedRemaining","readRemaining","delivery","read","played","id"],"additionalProperties":false,"title":"MessageInfo","type":"object"},"CustomProduct":{"properties":{"name":{"title":"CustomProduct.name","description":"The main title of the product. E.g:\n`BAVARIA — 35 SPORTS CRUISER (2006)`","type":"string"},"description":{"title":"CustomProduct.description","description":"The description of the product. This shows right under the price so it is useful for subscriptions/rentals. E.g:\n\n`(per day)\\n\\nCome and have a fantastic sailing adventure aboard our boat. \\nShe is a Bavaria 35 sports cruiser and is powered by 2 economical Volvo D6’s with Bravo 2 outdrives as well as a bow thruster. This Makes maneuvering very easy. She can accommodate up to 8 people for day charters and for overnight charters she can accommodate 4 in comfort in 2 cabins.`","type":"string"},"priceAmount1000":{"title":"CustomProduct.priceAmount1000","description":"The price amount multiplied by 1000. For example, for something costing `825` units of currency:\n`825000`","type":"number"},"currency":{"title":"CustomProduct.currency","description":"The [**ISO 4217**](https://en.wikipedia.org/wiki/ISO_4217) 3 letter currency code. E.g (Swedish krona)\n`SEK`","type":"string"},"url":{"title":"CustomProduct.url","description":"The URL of the product.\n\nNOTE: At the moment, the URL DOES NOT WORK. It shows up for the recipient but they will not be able to click it. As a rememdy, it is added as a reply to the product message.","type":"string"}},"required":["name","description","priceAmount1000","currency"],"additionalProperties":false,"title":"CustomProduct","type":"object"},"CartItem":{"properties":{"id":{"title":"CartItem.id","description":"Product ID","type":"string"},"name":{"title":"CartItem.name","description":"Product name","type":"string"},"qty":{"title":"CartItem.qty","description":"Amount of this item in the cart","type":"number"},"thumbnailId":{"title":"CartItem.thumbnailId","type":"string"},"thumbnailUrl":{"title":"CartItem.thumbnailUrl","description":"URL to .enc file of the thumbnail. Just change the filetype to .jpg to view the thumbnail","type":"string"}},"required":["id","name","qty","thumbnailId","thumbnailUrl"],"additionalProperties":false,"title":"CartItem","type":"object"},"Product":{"properties":{"id":{"title":"Product.id","description":"Product ID","type":"string"},"isHidden":{"title":"Product.isHidden","description":"`true` if the product is hidden from public view.","type":"boolean"},"catalogWid":{"title":"Product.catalogWid","description":"The id of the catalog in which this product is located.","type":"string"},"url":{"title":"Product.url","description":"The URL of the product.","type":"string"},"name":{"title":"Product.name","description":"The name of the product.","type":"string"},"description":{"title":"Product.description","description":"The description of the product.","type":"string"},"availability":{"anyOf":[{"title":"Product.availability","type":"number"},{"title":"Product.availability","enum":["unknown"],"type":"string"}],"title":"Product.availability","description":"The availiable quantity of this product.","default":"\"unknown\"`"},"reviewStatus":{"enum":["NO_REVIEW","PENDING","REJECTED","APPROVED","OUTDATED"],"title":"Product.reviewStatus","description":"The review status of the product","type":"string"},"imageCdnUrl":{"title":"Product.imageCdnUrl","description":"The url of the main image of the product.\n\nNOTE: If downloading manually, the filetype must be changed to .jpg to view the image.","type":"string"},"imageCount":{"title":"Product.imageCount","description":"The number of images of the product.","type":"number"},"additionalImageCdnUrl":{"items":{"title":"Product.additionalImageCdnUrl.[]","type":"string"},"title":"Product.additionalImageCdnUrl","description":"Array of URLs of the other images of the product. Does not include the main image.","type":"array"},"priceAmount1000":{"title":"Product.priceAmount1000","description":"The price of the product in 1000 units.","type":"number"},"retailerId":{"title":"Product.retailerId","description":"The custom id of the product.","type":"string"},"t":{"title":"Product.t","description":"The timestamp when the product was created / 1000","type":"number"},"currency":{"title":"Product.currency","description":"The [**ISO 4217**](https://en.wikipedia.org/wiki/ISO_4217) 3 letter currency code. E.g (Swedish krona)\n`SEK`","type":"string"}},"required":["id","currency"],"additionalProperties":false,"title":"Product","type":"object"},"Order":{"properties":{"id":{"title":"Order.id","description":"Order ID","type":"string"},"createdAt":{"title":"Order.createdAt","description":"epoch ts divided by 1000","type":"number"},"currency":{"title":"Order.currency","description":"The [**ISO 4217**](https://en.wikipedia.org/wiki/ISO_4217) 3 letter currency code. E.g (Swedish krona)\n`SEK`","type":"string"},"products":{"items":{"$ref":"#/components/schemas/CartItem","title":"Order.products.[]"},"title":"Order.products","description":"An array of items in the cart","type":"array"},"sellerJid":{"title":"Order.sellerJid","type":"string"},"subtotal":{"title":"Order.subtotal"},"total":{"title":"Order.total"},"message":{"$ref":"#/components/schemas/Message","title":"Order.message","description":"The message object associated with the order. Only populated in `onOrder` callback."}},"required":["id","createdAt","currency","products","sellerJid","subtotal","total"],"additionalProperties":false,"title":"Order","type":"object"},"Reaction":{"properties":{"aggregateEmoji":{"title":"Reaction.aggregateEmoji","description":"The aggregate emoji used for the reaction.","type":"string"},"id":{"title":"Reaction.id","description":"The identifier of the reaction","type":"string"},"hasReactionByMe":{"title":"Reaction.hasReactionByMe","description":"If the reaction is also sent by the host account","type":"boolean"},"senders":{"items":{"$ref":"#/components/schemas/ReactionRecord","title":"Reaction.senders.[]"},"title":"Reaction.senders","description":"The senders of this spefcific reaction","type":"array"}},"required":["aggregateEmoji","id","hasReactionByMe","senders"],"additionalProperties":false,"title":"Reaction","description":"A reaction is identified the specific emoji.","type":"object"},"ReactionRecord":{"properties":{"ack":{"$ref":"#/components/schemas/MessageAck","title":"ReactionRecord.ack","description":"The acknowledgement of the reaction"},"id":{"title":"ReactionRecord.id","description":"The ID of the reaction","type":"string"},"msgKey":{"title":"ReactionRecord.msgKey","type":"string"},"parentMsgKey":{"title":"ReactionRecord.parentMsgKey","type":"string"},"orphan":{"title":"ReactionRecord.orphan","type":"number"},"reactionText":{"title":"ReactionRecord.reactionText","description":"The text of the reaction","type":"string"},"read":{"title":"ReactionRecord.read","description":"If the reaction has been read","type":"boolean"},"senderUserJid":{"$ref":"#/components/schemas/ContactId","title":"ReactionRecord.senderUserJid","description":"The ID of the reaction sender"},"timestamp":{"title":"ReactionRecord.timestamp","description":"The timestamp of the reaction","type":"number"}},"required":["ack","id","msgKey","parentMsgKey","orphan","reactionText","read","senderUserJid","timestamp"],"additionalProperties":false,"title":"ReactionRecord","description":"The specific reaction by a user","type":"object"},"ReactionEvent":{"properties":{"message":{"$ref":"#/components/schemas/Message","title":"ReactionEvent.message","description":"The message being reacted to"},"reactionByMe":{"$ref":"#/components/schemas/Reaction","title":"ReactionEvent.reactionByMe","description":"The reaction sent by the host account"},"reactions":{"items":{"$ref":"#/components/schemas/Reaction","title":"ReactionEvent.reactions.[]"},"title":"ReactionEvent.reactions","description":"An array of all reactions","type":"array"},"type":{"enum":["add","change"],"title":"ReactionEvent.type","description":"The type of the reaction event.","type":"string"}},"required":["message","reactionByMe","reactions","type"],"additionalProperties":false,"title":"ReactionEvent","description":"Emitted by onReaction","type":"object"},"SessionInfo":{"properties":{"WA_VERSION":{"title":"SessionInfo.WA_VERSION","type":"string"},"PAGE_UA":{"title":"SessionInfo.PAGE_UA","type":"string"},"WA_AUTOMATE_VERSION":{"title":"SessionInfo.WA_AUTOMATE_VERSION","type":"string"},"BROWSER_VERSION":{"title":"SessionInfo.BROWSER_VERSION","type":"string"},"LAUNCH_TIME_MS":{"title":"SessionInfo.LAUNCH_TIME_MS","type":"number"},"NUM":{"title":"SessionInfo.NUM","type":"string"},"OS":{"title":"SessionInfo.OS","type":"string"},"START_TS":{"title":"SessionInfo.START_TS","type":"number"},"PHONE_VERSION":{"title":"SessionInfo.PHONE_VERSION","type":"string"},"NUM_HASH":{"title":"SessionInfo.NUM_HASH","type":"string"},"PATCH_HASH":{"title":"SessionInfo.PATCH_HASH","type":"string"},"OW_KEY":{"title":"SessionInfo.OW_KEY","type":"string"},"INSTANCE_ID":{"title":"SessionInfo.INSTANCE_ID","type":"string"},"RAM_INFO":{"title":"SessionInfo.RAM_INFO","type":"string"},"PPTR_VERSION":{"title":"SessionInfo.PPTR_VERSION","type":"string"},"LATEST_VERSION":{"title":"SessionInfo.LATEST_VERSION","type":"boolean"},"CLI":{"title":"SessionInfo.CLI","type":"boolean"},"ACC_TYPE":{"enum":["PERSONAL","BUSINESS"],"title":"SessionInfo.ACC_TYPE","type":"string"}},"required":["WA_VERSION","PAGE_UA","WA_AUTOMATE_VERSION","BROWSER_VERSION"],"additionalProperties":false,"title":"SessionInfo","type":"object"},"HealthCheck":{"properties":{"queuedMessages":{"title":"HealthCheck.queuedMessages","description":"The number of messages queued up in the browser. Messages can start being queued up due to the web app awaiting a connection with the host device.\n\nHealthy: 0","type":"number"},"state":{"$ref":"#/components/schemas/STATE","title":"HealthCheck.state","description":"The state of the web app.\n\nHealthy: 'CONNECTED'"},"isPhoneDisconnected":{"title":"HealthCheck.isPhoneDisconnected","description":"Whether or not the \"Phone is disconnected\" message is showing within the web app.\n\nHealthy: `false`","type":"boolean"},"isHere":{"title":"HealthCheck.isHere","description":"Returns `true` if \"Use Here\" button is not detected\n\nHealthy: `true`","type":"boolean"},"wapiInjected":{"title":"HealthCheck.wapiInjected","description":"Returns `true` if the `WAPI` object is detected.\n\nHealthy: `true`","type":"boolean"},"online":{"title":"HealthCheck.online","description":"Result of `window.navigator.onLine`\n\nHealthy: `true`","type":"boolean"},"tryingToReachPhone":{"title":"HealthCheck.tryingToReachPhone","description":"Returns `true` if \"trying to reach phone\" dialog is detected\n\nHealthy: `false`","type":"boolean"},"retryingIn":{"title":"HealthCheck.retryingIn","description":"Returns the number of seconds the \"Retrying in ...\" dialog is indicating. If the dialog is not showing, it will return `0`.\n\nHealthy: `0`","type":"number"},"batteryLow":{"title":"HealthCheck.batteryLow","description":"Returns `true` if \"Phone battery low\" message is detected\n\nHealthy: `false`","type":"boolean"}},"additionalProperties":false,"title":"HealthCheck","type":"object"},"expressMiddleware":{"title":"expressMiddleware"},"ChatwootConfig":{"properties":{"chatwootUrl":{"title":"ChatwootConfig.chatwootUrl","description":"The URL of the chatwoot inbox. If you want this integration to create & manage the inbox for you, you can omit the inbox part.","type":"string"},"chatwootApiAccessToken":{"title":"ChatwootConfig.chatwootApiAccessToken","description":"The API access token which you can get from your account menu.","type":"string"},"apiHost":{"title":"ChatwootConfig.apiHost","description":"The API host which will be used as the webhook address in the Chatwoot inbox.","type":"string"},"host":{"title":"ChatwootConfig.host","description":"Similar to apiHost","type":"string"},"https":{"title":"ChatwootConfig.https","description":"Whether or not to use https for the webhook address","type":"boolean"},"cert":{"title":"ChatwootConfig.cert","description":"The certificate for https","type":"string"},"privkey":{"title":"ChatwootConfig.privkey","description":"The private key for https","type":"string"},"key":{"title":"ChatwootConfig.key","description":"The API key used to secure the instance webhook address","type":"string"},"forceUpdateCwWebhook":{"title":"ChatwootConfig.forceUpdateCwWebhook","description":"Whether or not to update the webhook address in the Chatwoot inbox on launch","type":"boolean"},"port":{"title":"ChatwootConfig.port","description":"port","type":"number"}},"required":["chatwootUrl","chatwootApiAccessToken","apiHost","host","cert","privkey","port"],"additionalProperties":false,"title":"ChatwootConfig","type":"object"},"cliFlags":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"}]},"title":"cliFlags","type":"object"},"ConfigLogTransport":{"properties":{"type":{"enum":["syslog","console","file","ev"],"title":"ConfigLogTransport.type","description":"The type of winston transport. At the moment only `file`, `console`, `ev` and `syslog` are supported.","type":"string"},"options":{"title":"ConfigLogTransport.options","description":"The options for the transport. Generally only required for syslog but you can use this to override default options for other types of transports."},"done":{"title":"ConfigLogTransport.done","description":"If the transport has already been added to the logger. The logging set up command handles this for you.","type":"boolean"}},"required":["type"],"additionalProperties":false,"title":"ConfigLogTransport","type":"object"},"CollectorOptions":{"properties":{"maxProcessed":{"title":"CollectorOptions.maxProcessed","description":"The maximum amount of items to process","type":"number"},"max":{"title":"CollectorOptions.max","description":"The maximum amount of items to collect","type":"number"},"time":{"title":"CollectorOptions.time","description":"Max time to wait for items in milliseconds","type":"number"},"idle":{"title":"CollectorOptions.idle","description":"Max time allowed idle","type":"number"},"dispose":{"title":"CollectorOptions.dispose","description":"Whether to dispose data when it's deleted","type":"boolean"}},"additionalProperties":false,"title":"CollectorOptions","description":"Options to be applied to the collector.","type":"object"},"AwaitMessagesOptions":{"properties":{"errors":{"items":{"title":"AwaitMessagesOptions.errors.[]","type":"string"},"title":"AwaitMessagesOptions.errors","description":"An array of \"reasons\" that would result in the awaitMessages command to throw an error.","type":"array"}},"additionalProperties":false,"title":"AwaitMessagesOptions","type":"object"},"CurrentDialogProps":{"additionalProperties":{},"title":"CurrentDialogProps","type":"object"},"DialogState":{"properties":{"currentStep":{"title":"DialogState.currentStep","type":"number"},"currentProps":{"title":"DialogState.currentProps"},"lastInput":{"title":"DialogState.lastInput"},"isComplete":{"title":"DialogState.isComplete","type":"boolean"},"isError":{"title":"DialogState.isError","type":"boolean"},"errorMessage":{"title":"DialogState.errorMessage","type":"string"}},"required":["currentStep","currentProps","lastInput","isComplete","isError","errorMessage"],"additionalProperties":false,"title":"DialogState","type":"object"},"DialogTemplate":{"properties":{"\"dialogId\"":{"title":"DialogTemplate.\"dialogId\"","type":"string"},"\"privateOnly\"":{"title":"DialogTemplate.\"privateOnly\"","type":"boolean"},"\"identifier\"":{"title":"DialogTemplate.\"identifier\"","type":"string"},"\"successMessage\"":{"title":"DialogTemplate.\"successMessage\"","type":"string"},"\"startMessage\"":{"title":"DialogTemplate.\"startMessage\"","type":"string"},"\"properties\"":{"additionalProperties":{"$ref":"#/components/schemas/DialogProperty"},"title":"DialogTemplate.\"properties\"","type":"object"}},"required":["\"dialogId\"","\"privateOnly\"","\"identifier\"","\"successMessage\"","\"startMessage\"","\"properties\""],"additionalProperties":false,"title":"DialogTemplate","type":"object"},"CheckFunction":{"title":"CheckFunction"},"DialogProperty":{"properties":{"\"order\"":{"title":"DialogProperty.\"order\"","type":"number"},"\"key\"":{"title":"DialogProperty.\"key\"","type":"string"},"\"prompt\"":{"title":"DialogProperty.\"prompt\"","type":"string"},"\"type\"":{"title":"DialogProperty.\"type\"","type":"string"},"\"skipCondition\"":{"$ref":"#/components/schemas/CheckFunction","title":"DialogProperty.\"skipCondition\""},"\"options\"":{"anyOf":[{"items":{"$ref":"#/components/schemas/DialogButtons","title":"DialogProperty.\"options\".[]"},"title":"DialogProperty.\"options\".[]","type":"array"},{"items":{"$ref":"#/components/schemas/DialogListMessageSection","title":"DialogProperty.\"options\".[]"},"title":"DialogProperty.\"options\".[]","type":"array"}],"title":"DialogProperty.\"options\""},"\"validation\"":{"items":{"$ref":"#/components/schemas/DialogValidation","title":"DialogProperty.\"validation\".[]"},"title":"DialogProperty.\"validation\"","type":"array"}},"required":["\"order\"","\"key\"","\"prompt\"","\"type\"","\"validation\""],"additionalProperties":false,"title":"DialogProperty","type":"object"},"DialogButtons":{"properties":{"label":{"title":"DialogButtons.label","type":"string"},"value":{"title":"DialogButtons.value","type":"string"}},"required":["label","value"],"additionalProperties":false,"title":"DialogButtons","type":"object"},"DialogListMessageSection":{"properties":{"title":{"title":"DialogListMessageSection.title","type":"string"},"rows":{"items":{"$ref":"#/components/schemas/DialogListMessageRow","title":"DialogListMessageSection.rows.[]"},"title":"DialogListMessageSection.rows","type":"array"}},"required":["title","rows"],"additionalProperties":false,"title":"DialogListMessageSection","type":"object"},"DialogListMessageRow":{"properties":{"title":{"title":"DialogListMessageRow.title","type":"string"},"description":{"title":"DialogListMessageRow.description","type":"string"},"value":{"title":"DialogListMessageRow.value","type":"string"}},"required":["title","description","value"],"additionalProperties":false,"title":"DialogListMessageRow","type":"object"},"DialogValidation":{"properties":{"\"type\"":{"$ref":"#/components/schemas/ValidationType","title":"DialogValidation.\"type\""},"\"value\"":{"anyOf":[{"title":"DialogValidation.\"value\"","type":"string"},{"$ref":"#/components/schemas/CheckFunction","title":"DialogValidation.\"value\""}],"title":"DialogValidation.\"value\""},"\"errorMessage\"":{"title":"DialogValidation.\"errorMessage\"","type":"string"}},"required":["\"type\"","\"value\"","\"errorMessage\""],"additionalProperties":false,"title":"DialogValidation","type":"object"},"MessagePreProcessor":{"title":"MessagePreProcessor"},"MPConfigType":{"anyOf":[{"$ref":"#/components/schemas/PREPROCESSORS","title":"MPConfigType"},{"$ref":"#/components/schemas/MessagePreProcessor","title":"MPConfigType"},{"items":{"anyOf":[{"$ref":"#/components/schemas/PREPROCESSORS","title":"MPConfigType.[]"},{"$ref":"#/components/schemas/MessagePreProcessor","title":"MPConfigType.[]"}],"title":"MPConfigType.[]"},"title":"MPConfigType.[]","type":"array"}],"title":"MPConfigType","description":"The actual type for [config.messagePreprocessor](/docs/api/interfaces/api_model_config.ConfigObject#messagepreprocessor)"}}
1
+ {"ChatServer":{"title":"ChatServer","description":"The suffix used to identify a non-group chat id","enum":["c.us"],"type":"string"},"GroupChatServer":{"title":"GroupChatServer","description":"The suffix used to identify a group chat id","enum":["g.us"],"type":"string"},"WaServers":{"anyOf":[{"$ref":"#/components/schemas/ChatServer","title":"WaServers"},{"$ref":"#/components/schemas/GroupChatServer","title":"WaServers"}],"title":"WaServers","description":"A type alias for all available \"servers\""},"CountryCode":{"enum":[1,7,20,27,30,31,32,33,34,36,39,40,41,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,81,82,84,86,90,91,92,93,94,95,98,211,212,213,216,218,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,248,249,250,251,252,253,254,255,256,257,258,260,261,262,263,264,265,266,267,268,269,290,291,297,298,299,350,351,352,353,354,355,356,357,358,359,370,371,372,373,374,375,376,377,378,380,381,382,383,385,386,387,389,420,421,423,500,501,502,503,504,505,506,507,508,509,590,591,592,593,594,595,596,597,598,599,670,672,673,674,675,676,677,678,679,680,681,682,683,685,686,687,688,689,690,691,692,850,852,853,855,856,880,886,960,961,962,963,964,965,966,967,968,970,971,972,973,974,975,976,977,992,993,994,995,996,998],"title":"CountryCode","description":"Type alias representing all available country codes","type":"number"},"AccountNumber":{"title":"AccountNumber","description":"The account number. It is made up of a country code and then the local number without the preceeding 0. For example, if a UK (+44) wa account is linked to the number 07123456789 then the account number will be 447123456789."},"GroupId":{"title":"GroupId","description":"A new group or community has the format of a random number followed by `@g.us`"},"GroupChatId":{"$ref":"#/components/schemas/GroupId","title":"GroupChatId","description":"A group chat ends with `@g.us` and usually has two parts, the timestamp of when it was created, and the user id of the number that created the group. For example `[creator number]-[timestamp]@g.us`\n\nExample:\n\n`\"447123456789-1445627445@g.us\"`"},"ContactId":{"title":"ContactId","description":"A contact id ends with `@c.us` and only contains the number of the contact. For example, if the country code of a contact is `44` and their number is `7123456789` then the contact id would be `447123456789@c.us`\n\nExample:\n\n`\"447123456789@c.us\"`"},"ChatId":{"anyOf":[{"$ref":"#/components/schemas/ContactId","title":"ChatId"},{"$ref":"#/components/schemas/GroupChatId","title":"ChatId"}],"title":"ChatId","description":"A chat id ends with `@c.us` or `@g.us` for group chats.\n\nExample:\n\nA group chat: `\"447123456789-1445627445@g.us\"`\nA group chat: `\"447123456789@g.us\"`"},"MessageId":{"title":"MessageId","description":"The id of a message. The format is `[boolean]_[ChatId]_[random character string]`\n\nExample:\n\n`\"false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB\"`"},"Content":{"title":"Content","description":"This is a generic type alias for the content of a message\n\nExample:\n\n`\"hello!\"`"},"NonSerializedId":{"properties":{"server":{"$ref":"#/components/schemas/WaServers","title":"NonSerializedId.server"},"user":{"$ref":"#/components/schemas/AccountNumber","title":"NonSerializedId.user"},"_serialized":{"$ref":"#/components/schemas/ContactId","title":"NonSerializedId._serialized"}},"required":["server","user","_serialized"],"additionalProperties":false,"title":"NonSerializedId","type":"object"},"DataURL":{"title":"DataURL","description":"Data URLs, URLs prefixed with the data: scheme, allow content creators to embed small files inline in documents. They were formerly known as \"data URIs\" until that name was retired by the WHATWG.\n\n\nData URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself:\n\nExample:\n`\"data:[<mediatype>][;base64],<data>\"`\n\nLearn more here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"},"Base64":{"title":"Base64","description":"Base64 is basically a file encoded as a string.\n\nBase64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding.\n\nLearn more here: https://developer.mozilla.org/en-US/docs/Glossary/Base64"},"FilePath":{"title":"FilePath","description":"The relative or absolute path of a file\n\nLearn more here: https://www.w3schools.com/html/html_filepaths.asp"},"GetURL":{"title":"GetURL","description":"A URL of a file used with a GET request"},"AdvancedFile":{"anyOf":[{"$ref":"#/components/schemas/DataURL","title":"AdvancedFile"},{"$ref":"#/components/schemas/FilePath","title":"AdvancedFile"},{"$ref":"#/components/schemas/GetURL","title":"AdvancedFile"}],"title":"AdvancedFile","description":"Some file based actions in open-wa are powerful enough to take a dataurl, url or filepath"},"Button":{"properties":{"id":{"title":"Button.id","type":"string"},"text":{"title":"Button.text","type":"string"}},"required":["id","text"],"additionalProperties":false,"title":"Button","type":"object"},"AdvancedButton":{"properties":{"id":{"title":"AdvancedButton.id","type":"string"},"text":{"title":"AdvancedButton.text","type":"string"},"url":{"title":"AdvancedButton.url","type":"string"},"number":{"title":"AdvancedButton.number","type":"string"}},"required":["text"],"additionalProperties":false,"title":"AdvancedButton","type":"object"},"Row":{"properties":{"title":{"title":"Row.title","type":"string"},"description":{"title":"Row.description","type":"string"},"rowId":{"title":"Row.rowId","type":"string"}},"required":["title","description","rowId"],"additionalProperties":false,"title":"Row","type":"object"},"Section":{"properties":{"title":{"title":"Section.title","type":"string"},"rows":{"items":{"$ref":"#/components/schemas/Row","title":"Section.rows.[]"},"title":"Section.rows","type":"array"}},"required":["title","rows"],"additionalProperties":false,"title":"Section","type":"object"},"LocationButtonBody":{"properties":{"lat":{"title":"LocationButtonBody.lat","type":"number"},"lng":{"title":"LocationButtonBody.lng","type":"number"},"caption":{"title":"LocationButtonBody.caption","type":"string"}},"required":["lat","lng","caption"],"additionalProperties":false,"title":"LocationButtonBody","type":"object"},"Call":{"properties":{"id":{"title":"Call.id","description":"The id of the call","type":"string"},"peerJid":{"$ref":"#/components/schemas/ContactId","title":"Call.peerJid","description":"The id of the account calling"},"offerTime":{"title":"Call.offerTime","description":"The epoch timestamp of the call. You will have to multiply this by 1000 to get the actual epoch timestamp","type":"number"},"isVideo":{"title":"Call.isVideo","description":"Whether or not the call is a video call","type":"boolean"},"isGroup":{"title":"Call.isGroup","description":"Whether or not the call is a group call","type":"boolean"},"canHandleLocally":{"title":"Call.canHandleLocally","type":"boolean"},"outgoing":{"title":"Call.outgoing","description":"The direction of the call.","type":"boolean"},"webClientShouldHandle":{"title":"Call.webClientShouldHandle","type":"boolean"},"participants":{"items":{"$ref":"#/components/schemas/ContactId","title":"Call.participants.[]"},"title":"Call.participants","description":"The other participants on a group call","type":"array"},"State":{"$ref":"#/components/schemas/CallState","title":"Call.State","description":"State of the call"}},"required":["id","peerJid","offerTime","isVideo","isGroup","canHandleLocally","outgoing","webClientShouldHandle","participants","State"],"additionalProperties":false,"title":"Call","type":"object"},"BaseChat":{"properties":{"archive":{"title":"BaseChat.archive","type":"boolean"},"changeNumberNewJid":{"title":"BaseChat.changeNumberNewJid"},"changeNumberOldJid":{"title":"BaseChat.changeNumberOldJid"},"contact":{"$ref":"#/components/schemas/Contact","title":"BaseChat.contact","description":"The contact related to this chat"},"groupMetadata":{"$ref":"#/components/schemas/GroupMetadata","title":"BaseChat.groupMetadata","description":"Group metadata for this chat"},"isAnnounceGrpRestrict":{"title":"BaseChat.isAnnounceGrpRestrict","description":"If the chat is a group chat is restricted"},"formattedTitle":{"title":"BaseChat.formattedTitle","description":"The title of the chat","type":"string"},"canSend":{"title":"BaseChat.canSend","description":"Whether your host account is able to send messages to this chat","type":"boolean"},"isReadOnly":{"title":"BaseChat.isReadOnly","description":"Whether the chat is a group chat and the group is restricted","type":"boolean"},"kind":{"title":"BaseChat.kind","type":"string"},"labels":{"title":"BaseChat.labels","description":"The labels attached to this chat."},"lastReceivedKey":{"title":"BaseChat.lastReceivedKey","description":"The ID of the last message received in this chat"},"modifyTag":{"title":"BaseChat.modifyTag","type":"number"},"msgs":{"title":"BaseChat.msgs","description":"The messages in the chat"},"muteExpiration":{"title":"BaseChat.muteExpiration","description":"The expiration timestamp of the chat mute","type":"number"},"name":{"title":"BaseChat.name","description":"The name of the chat","type":"string"},"notSpam":{"title":"BaseChat.notSpam","description":"Whether the chat is marked as spam","type":"boolean"},"pendingMsgs":{"title":"BaseChat.pendingMsgs","description":"Messages that are pending to be sent","type":"boolean"},"pin":{"title":"BaseChat.pin","description":"Whether the chat is pinned","type":"number"},"presence":{"title":"BaseChat.presence","description":"The presence state of the chat participant"},"t":{"title":"BaseChat.t","description":"The timestamp of the last interaction in the chat","type":"number"},"unreadCount":{"title":"BaseChat.unreadCount","description":"The number of undread messages in this chat","type":"number"},"ack":{"title":"BaseChat.ack"},"isOnline":{"title":"BaseChat.isOnline","description":"@deprecated This is unreliable. Use the method [`isChatOnline`](https://open-wa.github.io/wa-automate-nodejs/classes/client.html#ischatonline) instead."},"lastSeen":{"title":"BaseChat.lastSeen","description":"@deprecated This is unreliable. Use the method [`getLastSeen`](https://open-wa.github.io/wa-automate-nodejs/classes/client.html#getlastseen) instead."}},"required":["archive","changeNumberNewJid","changeNumberOldJid","contact","groupMetadata","isAnnounceGrpRestrict","isReadOnly","kind","labels","lastReceivedKey","modifyTag","msgs","muteExpiration","name","notSpam","pendingMsgs","pin","presence","t","unreadCount"],"additionalProperties":false,"title":"BaseChat","type":"object"},"SingleChat":{"properties":{"id":{"$ref":"#/components/schemas/ContactId","title":"SingleChat.id","description":"The id of the chat"},"isGroup":{"title":"SingleChat.isGroup","description":"Whether the chat is a group chat","enum":[false],"type":"boolean"}},"required":["id","isGroup"],"additionalProperties":false,"title":"SingleChat","type":"object"},"GroupChat":{"properties":{"id":{"$ref":"#/components/schemas/GroupChatId","title":"GroupChat.id","description":"The id of the chat"},"isGroup":{"title":"GroupChat.isGroup","description":"Whether the chat is a group chat","enum":[true],"type":"boolean"}},"required":["id","isGroup"],"additionalProperties":false,"title":"GroupChat","type":"object"},"Chat":{"anyOf":[{"$ref":"#/components/schemas/SingleChat","title":"Chat"},{"$ref":"#/components/schemas/GroupChat","title":"Chat"}],"title":"Chat"},"LiveLocationChangedEvent":{"properties":{"id":{"title":"LiveLocationChangedEvent.id","type":"string"},"lat":{"title":"LiveLocationChangedEvent.lat","type":"number"},"lng":{"title":"LiveLocationChangedEvent.lng","type":"number"},"speed":{"title":"LiveLocationChangedEvent.speed","type":"number"},"lastUpdated":{"title":"LiveLocationChangedEvent.lastUpdated","type":"number"},"accuracy":{"title":"LiveLocationChangedEvent.accuracy","type":"number"},"degrees":{"title":"LiveLocationChangedEvent.degrees"},"msgId":{"title":"LiveLocationChangedEvent.msgId","description":"The message id that was sent when the liveLocation session was started.","type":"string"}},"required":["id","lat","lng","speed","lastUpdated","accuracy","degrees"],"additionalProperties":false,"title":"LiveLocationChangedEvent","type":"object"},"GroupChatCreationParticipantAddResponse":{"properties":{"code":{"enum":[200,400,403],"title":"GroupChatCreationParticipantAddResponse.code","description":"The resultant status code for adding the participant.\n\n200 if the participant was added successfully during the creation of the group.\n\n403 if the participant does not allow their account to be added to group chats. If you receive a 403, you will also get an `invite_code` and `invite_code_exp`","type":"number"},"invite_code":{"title":"GroupChatCreationParticipantAddResponse.invite_code","description":"If the participant is not allowed to be added to group chats due to their privacy settings, you will receive an `invite_code` which you can send to them via a text.","type":"string"},"invite_code_exp":{"title":"GroupChatCreationParticipantAddResponse.invite_code_exp","description":"The expiry ts of the invite_code. It is a number wrapped in a string, in order to get the proper time you can use this:\n\n```javascript\n new Date(Number(invite_code_exp)*1000)\n```","type":"string"}},"required":["code"],"additionalProperties":false,"title":"GroupChatCreationParticipantAddResponse","type":"object"},"GroupChatCreationResponse":{"properties":{"status":{"enum":[200,400],"title":"GroupChatCreationResponse.status","description":"The resultant status code of the group chat creation.\n\n200 if the group was created successfully.\n\n400 if the initial participant does not exist","type":"number"},"gid":{"$ref":"#/components/schemas/GroupChatId","title":"GroupChatCreationResponse.gid","description":"The group chat id"},"participants":{"items":{"properties":{"ContactId":{"$ref":"#/components/schemas/GroupChatCreationParticipantAddResponse","title":"GroupChatCreationResponse.participants.[].ContactId"}},"additionalProperties":false,"title":"GroupChatCreationResponse.participants.[]","type":"object"},"title":"GroupChatCreationResponse.participants","description":"The initial requested participants and their corresponding add responses","type":"array"}},"required":["status","gid","participants"],"additionalProperties":false,"title":"GroupChatCreationResponse","type":"object"},"EphemeralDuration":{"enum":[86400,604800,7776000],"title":"EphemeralDuration","description":"Ephemeral duration can be 1 day, 7 days or 90 days. The default is 1 day.","type":"number"},"SessionData":{"properties":{"WABrowserId":{"title":"SessionData.WABrowserId","type":"string"},"WASecretBundle":{"title":"SessionData.WASecretBundle","type":"string"},"WAToken1":{"title":"SessionData.WAToken1","type":"string"},"WAToken2":{"title":"SessionData.WAToken2","type":"string"}},"additionalProperties":false,"title":"SessionData","type":"object"},"DevTools":{"properties":{"user":{"title":"DevTools.user","description":"Username for devtools","type":"string"},"pass":{"title":"DevTools.pass","description":"Password for devtools","type":"string"}},"required":["user","pass"],"additionalProperties":false,"title":"DevTools","type":"object"},"EventPayload":{"properties":{"ts":{"title":"EventPayload.ts","type":"number"},"sessionId":{"title":"EventPayload.sessionId","type":"string"},"id":{"title":"EventPayload.id","type":"string"},"event":{"$ref":"#/components/schemas/SimpleListener","title":"EventPayload.event"},"data":{"title":"EventPayload.data"}},"required":["ts","sessionId","id","event","data"],"additionalProperties":{},"title":"EventPayload","type":"object"},"Webhook":{"properties":{"url":{"title":"Webhook.url","description":"The endpoint to send (POST) the event to.","type":"string"},"requestConfig":{"$ref":"#/components/schemas/AxiosRequestConfig","title":"Webhook.requestConfig","description":"The optional AxiosRequestConfig to use for firing the webhook event. This can be useful if you want to add some authentication when POSTing data to your server.\n\nFor example, if your webhook requires the username `admin` and password `1234` for authentication, you can set the requestConfig to:\n```\n{\n auth: {\n username: \"admin\",\n password: \"1234\",\n }\n}\n```\n\nPlease note, for security reasons, this is not returned when listing webhooks however it is returned when registering a webhook for verification purposes."},"id":{"title":"Webhook.id","description":"The ID of the given webhook setup. Use this ID with [[removeWebhook]]","type":"string"},"events":{"items":{"$ref":"#/components/schemas/SimpleListener","title":"Webhook.events.[]"},"title":"Webhook.events","description":"An array of events that are registered to be sent to this webhook.","type":"array"},"ts":{"title":"Webhook.ts","description":"Time when the webhook was registered in epoch time","type":"number"}},"required":["url","id","events","ts"],"additionalProperties":false,"title":"Webhook","type":"object"},"ProxyServerCredentials":{"properties":{"protocol":{"title":"ProxyServerCredentials.protocol","description":"The protocol on which the proxy is running. E.g `http`, `https`, `socks4` or `socks5`. This is optional and can be automatically determined from the address.","type":"string"},"address":{"title":"ProxyServerCredentials.address","description":"Proxy Server address. This can include the port e.g '127.0.0.1:5005'","type":"string"},"username":{"title":"ProxyServerCredentials.username","description":"Username for Proxy Server authentication","type":"string"},"password":{"title":"ProxyServerCredentials.password","description":"Password for Proxy Server authentication","type":"string"}},"required":["address","username","password"],"additionalProperties":false,"title":"ProxyServerCredentials","type":"object"},"ConfigObject":{"properties":{"sessionData":{"anyOf":[{"$ref":"#/components/schemas/SessionData","title":"ConfigObject.sessionData"},{"$ref":"#/components/schemas/Base64","title":"ConfigObject.sessionData"}],"title":"ConfigObject.sessionData","description":"The authentication object (as a JSON object or a base64 encoded string) that is required to migrate a session from one instance to another or to just restart an existing instance.\nThis sessionData is provided in a generated JSON file (it's a json file but contains the JSON data as a base64 encoded string) upon QR scan or an event.\n\nYou can capture the event like so:\n```javascript\nimport {create, ev} from '@open-wa/wa-automate';\n\n ev.on('sessionData.**', async (sessionData, sessionId) =>{\n console.log(sessionId, sessionData)\n })\n\n//or as base64 encoded string\n\n ev.on('sessionDataBase64.**', async (sessionDatastring, sessionId) =>{\n console.log(sessionId, sessionDatastring)\n })\n```\n NOTE: You can set sessionData as an evironmental variable also! The variable name has to be [sessionId (default = 'session) in all caps]_DATA_JSON. You have to make sure to surround your session data with single quotes to maintain the formatting.\n\nFor example:\n\nsessionId = 'session'\n\nTo set env var:\n```bash\n export SESSION_DATA_JSON=`...`\n```\nwhere ... is copied from session.data.json this will be a string most likley starting in `ey...` and ending with `==`\n\nSetting the sessionData in the environmental variable will override the sessionData object in the config."},"browserWSEndpoint":{"title":"ConfigObject.browserWSEndpoint","description":"ALPHA EXPERIMENTAL FEATURE! DO NOT USE IN PRODUCTION, REQUIRES TESTING.\n\nLearn more:\n\nhttps://pptr.dev/#?product=Puppeteer&version=v3.1.0&show=api-puppeteerconnectoptions\n\nhttps://medium.com/@jaredpotter1/connecting-puppeteer-to-existing-chrome-window-8a10828149e0","type":"string"},"useStealth":{"title":"ConfigObject.useStealth","description":"This flag allows you to disable or enable the use of the puppeteer stealth plugin. It is a good idea to use it, however it can cause issues sometimes. Set this to false if you are experiencing `browser.setMaxListeneres` issue. For now the default for this is false.","default":"`false`","type":"boolean"},"sessionDataPath":{"title":"ConfigObject.sessionDataPath","description":"The path relative to the current working directory (i.e where you run the command to start your process). This will be used to store and read your `.data.json` files. defualt to ''","type":"string"},"bypassCSP":{"title":"ConfigObject.bypassCSP","description":"Disable cors see: https://pptr.dev/#?product=Puppeteer&version=v3.0.4&show=api-pagesetbypasscspenabled If you are having an issue with sending media try to set this to true. Otherwise leave it set to false.","default":"`false`","type":"boolean"},"chromiumArgs":{"items":{"title":"ConfigObject.chromiumArgs.[]","type":"string"},"title":"ConfigObject.chromiumArgs","description":"This allows you to pass any array of custom chrome/chromium argument strings to the puppeteer instance.\nYou can find all possible arguements [here](https://peter.sh/experiments/chromium-command-line-switches/).","type":"array"},"skipBrokenMethodsCheck":{"title":"ConfigObject.skipBrokenMethodsCheck","description":"If set to true, skipBrokenMethodsCheck will bypass the health check before startup. It is highly suggested to not set this to true.","default":"`false`","type":"boolean"},"skipUpdateCheck":{"title":"ConfigObject.skipUpdateCheck","description":"If set to true, `skipUpdateCheck` will bypass the latest version check. This saves some time on boot (around 150 ms).","default":"`false`","type":"boolean"},"sessionId":{"title":"ConfigObject.sessionId","description":"This is the name of the session. You have to make sure that this is unique for every session.","default":"`session`","type":"string"},"licenseKey":{"$ref":"#/components/schemas/LicenseKey","title":"ConfigObject.licenseKey","description":"In order to unlock the functionality to send texts to unknown numbers, you need a License key.\nOne License Key is valid for each number. Each License Key starts from £5 per month.\n\nPlease check README for instructions on how to get a license key.\n\nNotes:\n1. You can change the number assigned to that License Key at any time, just message me the new number on the private discord channel.\n2. In order to cancel your License Key, simply stop your membership."},"customUserAgent":{"title":"ConfigObject.customUserAgent","description":"You may set a custom user agent. However, due to recent developments, this is not really neccessary any more.","type":"string"},"devtools":{"anyOf":[{"title":"ConfigObject.devtools","type":"boolean"},{"$ref":"#/components/schemas/DevTools","title":"ConfigObject.devtools"}],"title":"ConfigObject.devtools","description":"You can enable remote devtools by setting this to trye. If you set this to true there will be security on the devtools url.\nIf you want, you can also pass a username & password."},"blockCrashLogs":{"title":"ConfigObject.blockCrashLogs","description":"Setting this to true will block any network calls to crash log servers. This should keep anything you do under the radar.","default":"`true`","type":"boolean"},"cacheEnabled":{"title":"ConfigObject.cacheEnabled","description":"Setting this to false turn off the cache. This may improve memory usage.","default":"`false`","type":"boolean"},"browserRevision":{"title":"ConfigObject.browserRevision","description":"This is the specific browser revision to be downlaoded and used. You can find browser revision strings here: http://omahaproxy.appspot.com/\nLearn more about it here: https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#class-browserfetcher\nIf you're having trouble with sending images, try '737027'.\nIf you go too far back things will start breaking !!!!!!\nNOTE: THIS WILL OVERRIDE useChrome and executablePath. ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING.","type":"string"},"throwErrorOnTosBlock":{"title":"ConfigObject.throwErrorOnTosBlock","description":"Setting this to true will throw an error if a session is not able to get a QR code or is unable to restart a session.","type":"boolean"},"headless":{"title":"ConfigObject.headless","description":"By default, all instances of @open-wa/wa-automate are headless (i.e you don't see a chrome window open), you can set this to false to show the chrome/chromium window.","default":"`true`","type":"boolean"},"autoRefresh":{"title":"ConfigObject.autoRefresh","description":"@deprecated THIS IS LOCKED TO `true` AND CANNOT BE TURNED OFF. PLEASE SEE [[authTimeout]]\n\nSetting this to true will result in new QR codes being generated if the end user takes too long to scan the QR code.","default":"`true`","type":"boolean"},"qrRefreshS":{"title":"ConfigObject.qrRefreshS","description":"@deprecated This now has no effect\n\nThis determines the interval at which to refresh the QR code. By default, WA updates the qr code every 18-19 seconds so make sure this value is set to UNDER 18 seconds!!","type":"number"},"qrTimeout":{"title":"ConfigObject.qrTimeout","description":"This determines how long the process should wait for a QR code to be scanned before killing the process entirely. To have the system wait continuously, set this to `0`.","default":"60","type":"number"},"executablePath":{"title":"ConfigObject.executablePath","description":"Some features, like video upload, do not work without a chrome instance. Set this to the path of your chrome instance or you can use `useChrome:true` to automatically detect a chrome instance for you. Please note, this overrides `useChrome`.","type":"string"},"useChrome":{"title":"ConfigObject.useChrome","description":"If true, the program will automatically try to detect the instance of chorme on the machine. Please note this DOES NOT override executablePath.","default":"`false`","type":"boolean"},"proxyServerCredentials":{"$ref":"#/components/schemas/ProxyServerCredentials","title":"ConfigObject.proxyServerCredentials","description":"If sent, adds a call to waPage.authenticate with those credentials. Set `corsFix` to true if using a proxy results in CORS errors."},"qrLogSkip":{"title":"ConfigObject.qrLogSkip","description":"If true, skips logging the QR Code to the console.","default":"`false`","type":"boolean"},"restartOnCrash":{"title":"ConfigObject.restartOnCrash","description":"If set, the program will try to recreate itself when the page crashes. You have to pass the function that you want called upon restart. Please note that when the page crashes you may miss some messages.\nE.g:\n```javascript\nconst start = async (client: Client) => {...}\ncreate({\n...\nrestartOnCrash: start,\n...\n})\n```"},"disableSpins":{"title":"ConfigObject.disableSpins","description":"Setting this to true will simplify logs for use within docker containers by disabling spins (will still print raw messages).","default":"`false`","type":"boolean"},"logConsole":{"title":"ConfigObject.logConsole","description":"If true, this will log any console messages from the browser.","default":"`false`","type":"boolean"},"logConsoleErrors":{"title":"ConfigObject.logConsoleErrors","description":"If true, this will log any error messages from the browser instance","default":"`false`","type":"boolean"},"authTimeout":{"title":"ConfigObject.authTimeout","description":"This determines how long the process should wait for the session authentication. If exceeded, checks if phone is out of reach (turned of or without internet connection) and throws an error. It does not relate to the amount of time spent waiting for a qr code scan (see [[qrTimeout]]). To have the system wait continuously, set this to `0`.","default":"`60`","type":"number"},"oorTimeout":{"title":"ConfigObject.oorTimeout","description":"phoneIsOutOfReach check timeout","default":"`60`","type":"number"},"killProcessOnBrowserClose":{"title":"ConfigObject.killProcessOnBrowserClose","description":"Setting this to `true` will kill the whole process when the client is disconnected from the page or if the browser is closed.","default":"`false`","type":"boolean"},"safeMode":{"title":"ConfigObject.safeMode","description":"If true, client will check if the page is valid before each command. If page is not valid, it will throw an error.","default":"`false`","type":"boolean"},"skipSessionSave":{"title":"ConfigObject.skipSessionSave","description":"If true, the process will not save a data.json file. This means that sessions will not be saved and you will need to pass sessionData as a config param or create the session data.json file yourself","default":"`false`","type":"boolean"},"popup":{"title":"ConfigObject.popup","description":"If true, the process will open a browser window where you will see basic event logs and QR codes to authenticate the session. Usually it will open on port 3000. It can also be set to a preferred port.\n\nYou can also get the QR code png at (if localhost and port 3000):\n\n`http://localhost:3000/qr`\n\nor if you have multiple session:\n\n `http://localhost:3000/qr?sessionId=[sessionId]`","default":"`false | 3000`","anyOf":[{"type":"boolean"},{"type":"number"}]},"qrPopUpOnly":{"title":"ConfigObject.qrPopUpOnly","description":"This needs to be used in conjuction with `popup`, if `popup` is not true or a number (representing a desired port) then this will not work.\n\nSetting this to true will make sure that only the qr code png is served via the web server. This is useful if you do not need the whole status page.\n\nAs mentioned in [popup](#popup), the url for the qr code is `http://localhost:3000/qr` if the port is 3000.","type":"boolean"},"inDocker":{"title":"ConfigObject.inDocker","description":"If true, the process will try infer as many config variables as possible from the environment variables. The format of the variables are as below:\n```\nsessionData ==> WA_SESSION_DATA\nsessionDataPath ==> WA_SESSION_DATA_PATH\nsessionId ==> WA_SESSION_ID\ncustomUserAgent ==> WA_CUSTOM_USER_AGENT\nblockCrashLogs ==> WA_BLOCK_CRASH_LOGS\nblockAssets ==> WA_BLOCK_ASSETS\ncorsFix ==> WA_CORS_FIX\ncacheEnabled ==> WA_CACHE_ENABLED\nheadless ==> WA_HEADLESS\nqrTimeout ==> WA_QR_TIMEOUT\nuseChrome ==> WA_USE_CHROME\nqrLogSkip ==> WA_QR_LOG_SKIP\ndisableSpins ==> WA_DISABLE_SPINS\nlogConsole ==> WA_LOG_CONSOLE\nlogConsoleErrors==> WA_LOG_CONSOLE_ERRORS\nauthTimeout ==> WA_AUTH_TIMEOUT\nsafeMode ==> WA_SAFE_MODE\nskipSessionSave ==> WA_SKIP_SESSION_SAVE\npopup ==> WA_POPUP\nlicensekey ==> WA_LICENSE_KEY\n```","default":"`false`","type":"boolean"},"qrQuality":{"$ref":"#/components/schemas/QRQuality","title":"ConfigObject.qrQuality","description":"The output quality of the qr code during authentication. This can be any increment of 0.1 from 0.1 to 1.0.","default":"`1.0`"},"qrFormat":{"$ref":"#/components/schemas/QRFormat","title":"ConfigObject.qrFormat","description":"The output format of the qr code. `png`, `jpeg` or `webm`.","default":"`png`"},"hostNotificationLang":{"$ref":"#/components/schemas/NotificationLanguage","title":"ConfigObject.hostNotificationLang","description":"The language of the host notification. See: https://github.com/open-wa/wa-automate-nodejs/issues/709#issuecomment-673419088"},"blockAssets":{"title":"ConfigObject.blockAssets","description":"Setting this to true will block all assets from loading onto the page. This may result in some load time improvements but also increases instability.","default":"`false`","type":"boolean"},"keepUpdated":{"title":"ConfigObject.keepUpdated","description":"[ALPHA FEATURE - ONLY IMPLEMENTED FOR TESTING - DO NOT USE IN PRODUCTION YET]\nSetting this to true will result in the library making sure it is always starting with the latest version of itself. This overrides `skipUpdateCheck`.","default":"`false`","type":"boolean"},"resizable":{"title":"ConfigObject.resizable","description":"Syncs the viewport size with the window size which is how normal browsers act. Only relevant when `headless: false` and this overrides `viewport` config.","default":"`true`","type":"boolean"},"viewport":{"properties":{"width":{"title":"ConfigObject.viewport.width","description":"Page width in pixels","default":"`1440`","type":"number"},"height":{"title":"ConfigObject.viewport.height","description":"Page height in pixels","default":"`900`","type":"number"}},"additionalProperties":false,"title":"ConfigObject.viewport","description":"Set the desired viewport height and width. For CLI, use [width]x[height] format. E.g `--viewport 1920x1080`.","type":"object"},"legacy":{"title":"ConfigObject.legacy","description":"As the library is constantly evolving, some parts will be replaced with more efficient and improved code. In some of the infinite edge cases these new changes may not work for you. Set this to true to roll back on 'late beta' features. The reason why legacy is false by default is that in order for features to be tested they have to be released and used by everyone to find the edge cases and fix them.","default":"`false`","type":"boolean"},"deleteSessionDataOnLogout":{"title":"ConfigObject.deleteSessionDataOnLogout","description":"Deletes the session data file (if found) on logout event. This results in a quicker login when you restart the process.","default":"`false`","type":"boolean"},"killProcessOnTimeout":{"title":"ConfigObject.killProcessOnTimeout","description":"If set to true, the system will kill the whole node process when either an [[authTimeout]] or a [[qrTimeout]] has been reached. This is useful to prevent hanging processes.","default":"`false`","type":"boolean"},"corsFix":{"title":"ConfigObject.corsFix","description":"Setting this to true will bypass web security. DO NOT DO THIS IF YOU DO NOT HAVE TO. CORS issue may arise when using a proxy.","default":"`false`","type":"boolean"},"callTimeout":{"title":"ConfigObject.callTimeout","description":"Amount of time (in ms) to wait for a client method (specifically methods that interact with the WA web session) to resolve. If a client method results takes longer than the timout value then it will result in a [[PageEvaluationTimeout]] error.\n\nIf you get this error, it does not automatically mean that the method failed - it just stops your program from waiting for a client method to resolve.\n\nThis is useful if you do not rely on the results of a client method (e.g the message ID).\n\nIf set to `0`, the process will wait indefinitely for a client method to resolve.","default":"0","type":"number"},"screenshotOnInitializationBrowserError":{"title":"ConfigObject.screenshotOnInitializationBrowserError","description":"When true, this option will take a screenshot of the browser when an unexpected error occurs within the browser during `create` initialization. The path will be `[working directory]/logs/[session ID]/[start timestamp]/[timestamp].jpg`","default":"`false`","type":"boolean"},"eventMode":{"title":"ConfigObject.eventMode","description":"Setting listeners may not be your cup of tea. With eventMode, all [[SimpleListener]] events will be registered automatically and be filed via the built in Events Listener.\n\nThis is useful because you can register/deregister the event listener as needed whereas the legacy method of setting callbacks are only be set once","default":"`true`;","type":"boolean"},"logFile":{"title":"ConfigObject.logFile","description":"If true, the system will automatically create a log of all processes relating to actions sent to the web session.\n\nThe location of the file will be relative to the process directory (pd)\n\n`[pd]/[sessionId]/[start timestamp].log`","default":"false","type":"boolean"},"idCorrection":{"title":"ConfigObject.idCorrection","description":"When true, the system will attempt to correct chatIds and groupChatIds. This means you can ignore `@c.us` and `@g.us` distinctions in some parameters.","default":"false","type":"boolean"},"stickerServerEndpoint":{"title":"ConfigObject.stickerServerEndpoint","description":"Redundant until self-hostable sticker server is available.","default":"`https://sticker-api.openwa.dev`","anyOf":[{"type":"string"},{"type":"boolean"}]},"ghPatch":{"title":"ConfigObject.ghPatch","description":"This will force the library to use the default cached raw github link for patches to shave a few hundred milliseconds from your launch time. If you use this option, you will need to wait about 5 minutes before trying out new patches.","default":"`false`","type":"boolean"},"cachedPatch":{"title":"ConfigObject.cachedPatch","description":"Setting this to `true` will save a local copy of the patches.json file (as patches.ignore.data.json) which will be used in subsequent instantiations of the session. While the rest of the launch procedure is running, the library will fetch and save a recent version of the patches to ensure your patches don't go stale. This will be ignored if the cached patches are more than a day old.","default":"`false`","type":"boolean"},"logDebugInfoAsObject":{"title":"ConfigObject.logDebugInfoAsObject","description":"Setting `this` to true will replace the `console.table` with a stringified logging of the debug info object instead. This would be useful to set for smaller terminal windows. If `disableSpins` is `true` then this will also be `true`.","default":"`false`","type":"boolean"},"killClientOnLogout":{"title":"ConfigObject.killClientOnLogout","description":"Kill the client when a logout is detected","default":"`false`","type":"boolean"},"throwOnExpiredSessionData":{"title":"ConfigObject.throwOnExpiredSessionData","description":"This will make the `create` command return `false` if the detected session data is expired.\n\nThis will mean, the process will not attempt to automatically get a new QR code.","default":"`false`","type":"boolean"},"useNativeProxy":{"title":"ConfigObject.useNativeProxy","description":"Some sessions may experience issues with sending media when using proxies. Using the native proxy system instead of the recommended 3rd party library may fix these issues.","default":"`false`","type":"boolean"},"raspi":{"title":"ConfigObject.raspi","description":"Set this to `true` to make the library work on Raspberry Pi OS.\n\nMake sure to run the following command before running the library the first time:\n\n```\n> sudo apt update -y && sudo apt install chromium-browser chromium-codecs-ffmpeg -y && sudo apt upgrade\n```\n\nIf you're using the CLI, you can set this value to `true` by adding the following flag to the CLI command\n\n```\n> npx @open-wa/wa-automate ... --raspi\n```","default":"`false`","type":"boolean"},"pQueueDefault":{"title":"ConfigObject.pQueueDefault","description":"Default pqueue options applied to all listeners that can take pqueue options as a second optional parameter. For now, this only includes `onMessage` and `onAnyMessage`.\n\nSee: https://github.com/sindresorhus/p-queue#options\n\nExample: process 5 events within every 3 seconds window. Make sure to only process at most 2 at any one time. Make sure there is at least 100ms between each event processing.\n\n```javascript\n {\n intervalCap: 5, //process 5 events\n interval: 3000, //within every three second window\n concurrency: 2, //make sure to process, at most, 2 events at any one time\n timeout: 100, //make sure there is a 100ms gap between each event processing.\n carryoverConcurrencyCount: true //If there are more than 5 events in that period, process them within the next 3 second period. Make sure this is always set to true!!!\n }\n```","default":"`undefined`"},"messagePreprocessor":{"title":"ConfigObject.messagePreprocessor","description":"Set a preprocessor, or multiple chained preprocessors, for messages. See [MPConfigType](/) for more info.\n\noptions: `SCRUB`, `BODY_ONLY`, `AUTO_DECRYPT`, `AUTO_DECRYPT_SAVE`, `UPLOAD_CLOUD`.","default":"`undefined`"},"preprocFilter":{"title":"ConfigObject.preprocFilter","description":"Set an array filter to be used with messagePreprocessor to limit which messages are preprocessed.\n\nE.g if you want to scrub all messages that are not from a group, you can do the following:\n`\"m=>!m.isGroupMsg\"`","default":"`undefined`","type":"string"},"cloudUploadOptions":{"properties":{"provider":{"$ref":"#/components/schemas/CLOUD_PROVIDERS","title":"ConfigObject.cloudUploadOptions.provider","description":"`AWS`, `GCP` or `WASABI`\n\nenv: `OW_CLOUD_ACCESS_KEY_ID`"},"accessKeyId":{"title":"ConfigObject.cloudUploadOptions.accessKeyId","description":"S3 compatible access key ID.\n\ne.g: `AKIAIOSFODNN7EXAMPLE` or `GOOGTS7C7FUP3AIRVJTE2BCD`\n\nenv: `OW_CLOUD_ACCESS_KEY_ID`","type":"string"},"secretAccessKey":{"title":"ConfigObject.cloudUploadOptions.secretAccessKey","description":"S3 compatible secret access key.\n\ne.g `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`\n\nenv: `OW_CLOUD_SECRET_ACCESS_KEY`","type":"string"},"bucket":{"title":"ConfigObject.cloudUploadOptions.bucket","description":"Bucket name\n\nenv: `OW_CLOUD_BUCKET`","type":"string"},"region":{"title":"ConfigObject.cloudUploadOptions.region","description":"Bucket region.\n\nNot required for `GCP` provider\n\nenv: `OW_CLOUD_REGION`","type":"string"},"ignoreHostAccount":{"title":"ConfigObject.cloudUploadOptions.ignoreHostAccount","description":"Ignore processing of messages that are sent by the host account itself\n\nenv: `OW_CLOUD_IGNORE_HOST`","type":"boolean"},"directory":{"anyOf":[{"$ref":"#/components/schemas/DIRECTORY_STRATEGY","title":"ConfigObject.cloudUploadOptions.directory"},{"title":"ConfigObject.cloudUploadOptions.directory","type":"string"}],"title":"ConfigObject.cloudUploadOptions.directory","description":"The directory strategy to use when uploading files. Or just set it to a custom directory string.\n\nenv: `OW_DIRECTORY`"},"public":{"title":"ConfigObject.cloudUploadOptions.public","description":"Setting this to true will make the uploaded file public","type":"boolean"},"headers":{"additionalProperties":{"type":"string"},"title":"ConfigObject.cloudUploadOptions.headers","description":"Extra headers to add to the upload request","type":"object"}},"required":["provider","accessKeyId","secretAccessKey","bucket"],"additionalProperties":false,"title":"ConfigObject.cloudUploadOptions","description":"REQUIRED IF `messagePreprocessor` IS SET TO `UPLOAD_CLOUD`.\n\nThis can be set via the config or the corresponding environment variables.","type":"object"},"onError":{"$ref":"#/components/schemas/OnError","title":"ConfigObject.onError","description":"What to do when an error is detected on a client method.","default":"`OnError.NOTHING`"},"multiDevice":{"title":"ConfigObject.multiDevice","description":"Please note that multi-device is still in beta so a lot of things may not work. It is HIGHLY suggested to NOT use this in production!!!!\n\nSet this to true if you're using the multidevice beta.","default":"`true`\n:::danger\nSome features (e.g [[sendLinkWithAutoPreview]]) **do not** work with multi-device beta. Check [this `api`](#).\n:::","type":"boolean"},"sessionDataBucketAuth":{"title":"ConfigObject.sessionDataBucketAuth","description":"Base64 encoded S3 Bucket & Authentication object for session data files. The object should be in the same format as cloudUploadOptions.","type":"string"},"autoEmoji":{"anyOf":[{"title":"ConfigObject.autoEmoji","type":"string"},{"title":"ConfigObject.autoEmoji","enum":[false],"type":"boolean"}],"title":"ConfigObject.autoEmoji","description":"Set the automatic emoji detection character. Set this to `false` to disable auto emoji. Default is `:`.","default":"`:`"},"maxChats":{"title":"ConfigObject.maxChats","description":"Set the maximum amount of chats to be present in a session.","type":"number"},"maxMessages":{"title":"ConfigObject.maxMessages","description":"Set the maximum amount of messages to be present in a session.","type":"number"},"discord":{"title":"ConfigObject.discord","description":"Your Discord ID to get onto the sticker leaderboard!","type":"string"},"ignoreNuke":{"title":"ConfigObject.ignoreNuke","description":"Don't implicitly determine if the host logged out.","type":"boolean"},"ensureHeadfulIntegrity":{"title":"ConfigObject.ensureHeadfulIntegrity","description":"Makes sure the headless session is usable even on first login.\nHeadful sessions are ususally only usable on reauthentication.","type":"boolean"},"waitForRipeSession":{"title":"ConfigObject.waitForRipeSession","description":"wait for a valid headful session. Not required in recent versions.\ndefault: `true`","type":"boolean"},"qrMax":{"title":"ConfigObject.qrMax","description":"Automatically kill the process after a set amount of qr codes","type":"number"},"ezqr":{"title":"ConfigObject.ezqr","description":"Expose a URL where you can easily scan the qr code","type":"boolean"},"logging":{"items":{"$ref":"#/components/schemas/ConfigLogTransport","title":"ConfigObject.logging.[]"},"title":"ConfigObject.logging","description":"An array of [winston](https://github.com/winstonjs/winston/blob/master/docs/transports.md#additional-transports) logging transport configurations.\n\n[Check this discussion to see how to set up logging](https://github.com/open-wa/wa-automate-nodejs/discussions/2373)","type":"array"},"linkParser":{"title":"ConfigObject.linkParser","description":"The URL of your instance of [serverless meta grabber](https://github.com/RemiixInc/meta-grabber-serverless) by [RemiixInc](https://github.com/RemiixInc).\n\ndefault: `https://link.openwa.cloud/api`","type":"string"},"aggressiveGarbageCollection":{"title":"ConfigObject.aggressiveGarbageCollection","description":"Setting this to true will run `gc()` on before every command sent to the browser.\n\nThis is experimental and may not work or it may have unforeseen sideeffects.","type":"boolean"}},"additionalProperties":{},"title":"ConfigObject","type":"object"},"AdvancedConfig":{"allOf":[{"$ref":"#/components/schemas/ConfigObject"},{"properties":{"licenseKey":{"$ref":"#/components/schemas/LicenseKeyConfig","title":"licenseKey"}},"required":["licenseKey"],"additionalProperties":false,"type":"object"}],"title":"AdvancedConfig"},"LicenseKey":{"title":"LicenseKey","type":"string"},"LicenseKeyConfig":{"anyOf":[{"$ref":"#/components/schemas/LicenseKeyConfigFunction","title":"LicenseKeyConfig"},{"$ref":"#/components/schemas/LicenseKeyConfigObject","title":"LicenseKeyConfig"},{"$ref":"#/components/schemas/LicenseKey","title":"LicenseKeyConfig"}],"title":"LicenseKeyConfig"},"NumberCheck":{"properties":{"id":{"$ref":"#/components/schemas/Id","title":"NumberCheck.id"},"status":{"enum":[200,404],"title":"NumberCheck.status","type":"number"},"isBusiness":{"title":"NumberCheck.isBusiness","type":"boolean"},"canReceiveMessage":{"title":"NumberCheck.canReceiveMessage","type":"boolean"},"numberExists":{"title":"NumberCheck.numberExists","type":"boolean"}},"required":["id","status","isBusiness","canReceiveMessage","numberExists"],"additionalProperties":false,"title":"NumberCheck","type":"object"},"Contact":{"properties":{"formattedName":{"title":"Contact.formattedName","type":"string"},"id":{"$ref":"#/components/schemas/ContactId","title":"Contact.id"},"isBusiness":{"title":"Contact.isBusiness","type":"boolean"},"isEnterprise":{"title":"Contact.isEnterprise","description":"Most likely true when the account has a green tick. See `verifiedLevel` also.","type":"boolean"},"isMe":{"title":"Contact.isMe","type":"boolean"},"isMyContact":{"title":"Contact.isMyContact","type":"boolean"},"isPSA":{"title":"Contact.isPSA","type":"boolean"},"isUser":{"title":"Contact.isUser","type":"boolean"},"isWAContact":{"title":"Contact.isWAContact","type":"boolean"},"labels":{"items":{"title":"Contact.labels.[]","type":"string"},"title":"Contact.labels","type":"array"},"msgs":{"items":{"$ref":"#/components/schemas/Message","title":"Contact.msgs.[]"},"title":"Contact.msgs","type":"array"},"name":{"title":"Contact.name","type":"string"},"plaintextDisabled":{"title":"Contact.plaintextDisabled","type":"boolean"},"profilePicThumbObj":{"properties":{"eurl":{"title":"Contact.profilePicThumbObj.eurl","type":"string"},"id":{"$ref":"#/components/schemas/Id","title":"Contact.profilePicThumbObj.id"},"img":{"title":"Contact.profilePicThumbObj.img","type":"string"},"imgFull":{"title":"Contact.profilePicThumbObj.imgFull","type":"string"},"raw":{"title":"Contact.profilePicThumbObj.raw","type":"string"},"tag":{"title":"Contact.profilePicThumbObj.tag","type":"string"}},"required":["eurl","id","img","imgFull","raw","tag"],"additionalProperties":false,"title":"Contact.profilePicThumbObj","type":"object"},"pushname":{"title":"Contact.pushname","type":"string"},"shortName":{"title":"Contact.shortName","type":"string"},"statusMute":{"title":"Contact.statusMute","type":"boolean"},"type":{"title":"Contact.type","type":"string"},"verifiedLevel":{"title":"Contact.verifiedLevel","description":"0 = not verified\n2 = verified (most likely represents a blue tick)","type":"number"},"verifiedName":{"title":"Contact.verifiedName","description":"The business account name verified by WA.","type":"string"},"isOnline":{"title":"Contact.isOnline","type":"boolean"},"lastSeen":{"title":"Contact.lastSeen","type":"number"}},"required":["formattedName","id","isBusiness","isEnterprise","isMe","isMyContact","isPSA","isUser","isWAContact","labels","msgs","name","plaintextDisabled","profilePicThumbObj","pushname","shortName","statusMute","type","verifiedLevel","verifiedName"],"additionalProperties":false,"title":"Contact","type":"object"},"Participant":{"properties":{"contact":{"$ref":"#/components/schemas/Contact","title":"Participant.contact"},"id":{"$ref":"#/components/schemas/NonSerializedId","title":"Participant.id"},"isAdmin":{"title":"Participant.isAdmin","type":"boolean"},"isSuperAdmin":{"title":"Participant.isSuperAdmin","type":"boolean"}},"required":["contact","id","isAdmin","isSuperAdmin"],"additionalProperties":false,"title":"Participant","type":"object"},"GroupMetadata":{"properties":{"id":{"$ref":"#/components/schemas/GroupChatId","title":"GroupMetadata.id","description":"The chat id of the group [[GroupChatId]]"},"creation":{"title":"GroupMetadata.creation","description":"The timestamp of when the group was created","type":"number"},"owner":{"$ref":"#/components/schemas/NonSerializedId","title":"GroupMetadata.owner","description":"The id of the owner of the group [[ContactId]]"},"participants":{"items":{"$ref":"#/components/schemas/Participant","title":"GroupMetadata.participants.[]"},"title":"GroupMetadata.participants","description":"An array of participants in the group","type":"array"},"pendingParticipants":{"items":{"$ref":"#/components/schemas/Participant","title":"GroupMetadata.pendingParticipants.[]"},"title":"GroupMetadata.pendingParticipants","description":"Unknown.","type":"array"},"desc":{"title":"GroupMetadata.desc","description":"The description of the group","type":"string"},"descOwner":{"$ref":"#/components/schemas/ContactId","title":"GroupMetadata.descOwner","description":"The account that set the description last."},"trusted":{"title":"GroupMetadata.trusted","type":"boolean"},"suspended":{"title":"GroupMetadata.suspended","description":"Not sure what this represents","type":"boolean"},"support":{"title":"GroupMetadata.support","description":"Not sure what this represents","type":"boolean"},"isParentGroup":{"title":"GroupMetadata.isParentGroup","description":"Is this group a parent group (a.k.a community)","type":"boolean"},"groupType":{"enum":["DEAFULT","SUBGROUP","COMMUNITY"],"title":"GroupMetadata.groupType","description":"The type of group","type":"string"},"defaultSubgroup":{"title":"GroupMetadata.defaultSubgroup","description":"Communities have a default group chat","type":"boolean"},"isParentGroupClosed":{"title":"GroupMetadata.isParentGroupClosed","type":"boolean"},"joinedSubgroups":{"items":{"$ref":"#/components/schemas/GroupId","title":"GroupMetadata.joinedSubgroups.[]"},"title":"GroupMetadata.joinedSubgroups","description":"List of Group IDs that the host account has joined as part of this community","type":"array"}},"required":["id","creation","owner","participants","pendingParticipants","groupType","defaultSubgroup","isParentGroupClosed","joinedSubgroups"],"additionalProperties":false,"title":"GroupMetadata","type":"object"},"ParticipantChangedEventModel":{"properties":{"by":{"$ref":"#/components/schemas/ContactId","title":"ParticipantChangedEventModel.by"},"action":{"$ref":"#/components/schemas/groupChangeEvent","title":"ParticipantChangedEventModel.action"},"who":{"items":{"$ref":"#/components/schemas/ContactId","title":"ParticipantChangedEventModel.who.[]"},"title":"ParticipantChangedEventModel.who","type":"array"},"chat":{"$ref":"#/components/schemas/ChatId","title":"ParticipantChangedEventModel.chat"}},"required":["by","action","who","chat"],"additionalProperties":false,"title":"ParticipantChangedEventModel","type":"object"},"NewCommunityGroup":{"properties":{"subject":{"title":"NewCommunityGroup.subject","type":"string"},"icon":{"$ref":"#/components/schemas/DataURL","title":"NewCommunityGroup.icon"},"ephemeralDuration":{"title":"NewCommunityGroup.ephemeralDuration","type":"number"}},"required":["subject"],"additionalProperties":false,"title":"NewCommunityGroup","description":"Used when creating a new community with.","type":"object"},"GenericGroupChangeEvent":{"properties":{"author":{"$ref":"#/components/schemas/Contact","title":"GenericGroupChangeEvent.author","description":"The contact who triggered this event. (E.g the contact who changed the group picture)"},"body":{"title":"GenericGroupChangeEvent.body","description":"Some more information about the event","type":"string"},"groupMetadata":{"$ref":"#/components/schemas/GroupMetadata","title":"GenericGroupChangeEvent.groupMetadata"},"groupPic":{"title":"GenericGroupChangeEvent.groupPic","description":"Base 64 encoded image","type":"string"},"id":{"$ref":"#/components/schemas/MessageId","title":"GenericGroupChangeEvent.id"},"type":{"enum":["picutre","create","delete","subject","revoke_invite","description","restrict","announce","no_frequently_forwarded","announce_msg_bounce","add","remove","demote","promote","invite","leave","modify","v4_add_invite_sent","v4_add_invite_join","growth_locked","growth_unlocked","linked_group_join"],"title":"GenericGroupChangeEvent.type","description":"Type of the event","type":"string"}},"required":["author","body","groupMetadata","groupPic","id","type"],"additionalProperties":false,"title":"GenericGroupChangeEvent","type":"object"},"Id":{"properties":{"server":{"title":"Id.server","type":"string"},"user":{"title":"Id.user","type":"string"},"_serialized":{"title":"Id._serialized","type":"string"}},"required":["server","user","_serialized"],"additionalProperties":false,"title":"Id","type":"object"},"EasyApiResponse":{"properties":{"success":{"title":"EasyApiResponse.success","type":"boolean"},"response":{"title":"EasyApiResponse.response"}},"required":["success","response"],"additionalProperties":false,"title":"EasyApiResponse","type":"object"},"Label":{"properties":{"id":{"title":"Label.id","description":"The internal ID of the label. Usually a number represented as a string e.g \"1\"","type":"string"},"name":{"title":"Label.name","description":"The text contents of the label","type":"string"},"items":{"items":{"properties":{"type":{"enum":["Chat","Contact","Message"],"title":"Label.items.[].type","description":"Labels can be applied to chats, contacts or individual messages. This represents the type of object the label is attached to.","type":"string"},"id":{"anyOf":[{"$ref":"#/components/schemas/ContactId","title":"Label.items.[].id"},{"$ref":"#/components/schemas/ChatId","title":"Label.items.[].id"},{"$ref":"#/components/schemas/MessageId","title":"Label.items.[].id"}],"title":"Label.items.[].id","description":"The ID of the object that the label is atteched to."}},"required":["type","id"],"additionalProperties":false,"title":"Label.items.[]","type":"object"},"title":"Label.items","description":"The items that are tagged with this label","type":"array"}},"required":["id","name","items"],"additionalProperties":false,"title":"Label","type":"object"},"StickerMetadata":{"properties":{"author":{"title":"StickerMetadata.author","description":"The author of the sticker","default":"``","type":"string"},"pack":{"title":"StickerMetadata.pack","description":"The pack of the sticker","default":"``","type":"string"},"removebg":{"anyOf":[{"title":"StickerMetadata.removebg","type":"boolean"},{"title":"StickerMetadata.removebg","enum":["HQ"],"type":"string"}],"title":"StickerMetadata.removebg","description":"ALPHA FEATURE - NO GUARANTEES IT WILL WORK AS EXPECTED:\n\n[REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)\n\nAttempt to remove the background of the sticker. Only valid for paid licenses.\n\noptions:\n\n `true` - remove background after resizing\n\n `HQ` - remove background before resizing (i.e on original photo)","default":"`false`"},"keepScale":{"title":"StickerMetadata.keepScale","description":"Setting this to `true` will skip the resizing/square-cropping of the sticker. It will instead 'letterbox' the image with a transparent background.","type":"boolean"},"circle":{"title":"StickerMetadata.circle","description":"Applies a circular mask to the sticker. Works on images only for now.","type":"boolean"},"discord":{"title":"StickerMetadata.discord","description":"Your Discord ID to get onto the sticker leaderboard!","type":"string"},"cropPosition":{"enum":["top","right top","right","right bottom","bottom","left bottom","left","left top","north","northeast","east","southeast","south","southwest","west","northwest","center","centre","entropy","attention"],"title":"StickerMetadata.cropPosition","description":"Crop position\n\nLearn more: https://sharp.pixelplumbing.com/api-resize","default":"`attention`","type":"string"},"cornerRadius":{"title":"StickerMetadata.cornerRadius","description":"The corner radius of the sticker when `stickerMetadata.circle` is set to true.\n@minimum `1`\n@maximum `100`\n@multipleOf `1`","default":"`100`","type":"number"}},"required":["author","pack"],"additionalProperties":false,"title":"StickerMetadata","type":"object"},"Mp4StickerConversionProcessOptions":{"properties":{"fps":{"title":"Mp4StickerConversionProcessOptions.fps","description":"Desired Frames per second of the sticker output","default":"`10`","type":"number"},"startTime":{"title":"Mp4StickerConversionProcessOptions.startTime","description":"The video start time of the sticker","default":"`00:00:00.0`","type":"string"},"endTime":{"title":"Mp4StickerConversionProcessOptions.endTime","description":"The video end time of the sticker. By default, stickers are made from the first 5 seconds of the video","default":"`00:00:05.0`","type":"string"},"loop":{"title":"Mp4StickerConversionProcessOptions.loop","description":"The amount of times the video loops in the sticker. To save processing time, leave this as 0\ndefault `0`","type":"number"},"crop":{"title":"Mp4StickerConversionProcessOptions.crop","description":"Centres and crops the video.\ndefault `true`","type":"boolean"},"log":{"title":"Mp4StickerConversionProcessOptions.log","description":"Prints ffmpeg logs in the terminal","default":"`false`","type":"boolean"},"square":{"title":"Mp4StickerConversionProcessOptions.square","description":"A number representing the WxH of the output sticker (default `512x512`). Lowering this number is a great way to process longer duration stickers. The max value is `512`.\ndefault `512`","type":"number"}},"additionalProperties":false,"title":"Mp4StickerConversionProcessOptions","type":"object"},"Message":{"properties":{"selectedButtonId":{"title":"Message.selectedButtonId","description":"The ID of the selected button","type":"string"},"id":{"$ref":"#/components/schemas/MessageId","title":"Message.id","description":"The id of the message. Consists of the Chat ID and a unique string.\n\nExample:\n\n```\nfalse_447123456789@c.us_7D914FEA78BE10277743F4B785045C37\n```"},"mId":{"title":"Message.mId","description":"The unique segment of the message id.\n\nExample:\n\n```\n7D914FEA78BE10277743F4B785045C37\n```","type":"string"},"body":{"title":"Message.body","description":"The body of the message. If the message type is `chat` , `body` will be the text of the chat. If the message type is some sort of media, then this body will be the thumbnail of the media.","type":"string"},"text":{"title":"Message.text","description":"a convenient way to get the main text content from a message.","type":"string"},"type":{"$ref":"#/components/schemas/MessageTypes","title":"Message.type","description":"The type of the message, see [[MessageTypes]]"},"filehash":{"title":"Message.filehash","description":"Used to checking the integrity of the decrypted media.","type":"string"},"mimetype":{"title":"Message.mimetype","type":"string"},"lat":{"title":"Message.lat","description":"The latitude of a location message","type":"string"},"lng":{"title":"Message.lng","description":"The longitude of a location message","type":"string"},"loc":{"title":"Message.loc","description":"The text associated with a location message","type":"string"},"t":{"title":"Message.t","description":"The timestamp of the message","type":"number"},"notifyName":{"title":"Message.notifyName","type":"string"},"from":{"$ref":"#/components/schemas/ChatId","title":"Message.from","description":"The chat from which the message was sent"},"to":{"$ref":"#/components/schemas/ChatId","title":"Message.to","description":"The chat id to which the message is being sent"},"self":{"enum":["in","out"],"title":"Message.self","description":"Indicates whether the message is coming into the session or going out of the session. You can have a message sent by the host account show as `in` when the message was sent from another\nsession or from the host account device itself.","type":"string"},"duration":{"title":"Message.duration","description":"The length of the media in the message, if it exists.","anyOf":[{"type":"string"},{"type":"number"}]},"ack":{"$ref":"#/components/schemas/MessageAck","title":"Message.ack","description":"The acknolwedgement state of a message [[MessageAck]]"},"invis":{"title":"Message.invis","type":"boolean"},"isNewMsg":{"title":"Message.isNewMsg","type":"boolean"},"star":{"title":"Message.star","type":"boolean"},"recvFresh":{"title":"Message.recvFresh","type":"boolean"},"broadcast":{"title":"Message.broadcast","description":"If the message is sent as a broadcast","type":"boolean"},"isForwarded":{"title":"Message.isForwarded","description":"If the message has been forwarded","type":"boolean"},"labels":{"items":{"title":"Message.labels.[]","type":"string"},"title":"Message.labels","description":"The labels associated with the message (used with business accounts)","type":"array"},"mentionedJidList":{"items":{"$ref":"#/components/schemas/ContactId","title":"Message.mentionedJidList.[]"},"title":"Message.mentionedJidList","description":"An array of all mentioned numbers in this message.","type":"array"},"caption":{"title":"Message.caption","description":"If the message is of a media type, it may also have a caption","type":"string"},"sender":{"$ref":"#/components/schemas/Contact","title":"Message.sender","description":"The contact object of the account that sent the message"},"timestamp":{"title":"Message.timestamp","description":"the timestanmp of the message","type":"number"},"filePath":{"title":"Message.filePath","description":"When `config.messagePreprocessor: \"AUTO_DECRYPT_SAVE\"` is set, media is decrypted and saved on disk in a folder called media relative to the current working directory.\n\nThis is the filePath of the decrypted file.","type":"string"},"filename":{"title":"Message.filename","description":"The given filename of the file","type":"string"},"content":{"title":"Message.content","type":"string"},"isGroupMsg":{"title":"Message.isGroupMsg","type":"boolean"},"isMMS":{"title":"Message.isMMS","type":"boolean"},"isMedia":{"title":"Message.isMedia","type":"boolean"},"isNotification":{"title":"Message.isNotification","type":"boolean"},"isPSA":{"title":"Message.isPSA","type":"boolean"},"fromMe":{"title":"Message.fromMe","description":"If the message is from the host account","type":"boolean"},"chat":{"$ref":"#/components/schemas/Chat","title":"Message.chat","description":"The chat object"},"chatId":{"$ref":"#/components/schemas/ChatId","title":"Message.chatId"},"author":{"title":"Message.author","type":"string"},"stickerAuthor":{"title":"Message.stickerAuthor","type":"string"},"stickerPack":{"title":"Message.stickerPack","type":"string"},"clientUrl":{"title":"Message.clientUrl","description":"@deprecated Ironically, you should be using `deprecatedMms3Url` instead","type":"string"},"deprecatedMms3Url":{"title":"Message.deprecatedMms3Url","type":"string"},"quotedMsg":{"$ref":"#/components/schemas/Message","title":"Message.quotedMsg"},"quotedMsgObj":{"$ref":"#/components/schemas/Message","title":"Message.quotedMsgObj"},"isGroupJoinRequest":{"$ref":"#/components/schemas/GroupChatId","title":"Message.isGroupJoinRequest","description":"When a user requests to join a group wihtin a community the request is received by the host as a message. This boolean will allow you to easily determine if the incoming message is a request to join a group.\n\nIf this is `true` then you need to determine within your own code whether or not to accept the user to the group which is indicated with `quotedRemoteJid` using `addParticipant`."},"senderId":{"title":"Message.senderId","description":"The ID of the message sender","type":"string"},"quotedRemoteJid":{"title":"Message.quotedRemoteJid","description":"The ID of the quoted group. Usually present when a user is requesting to join a group.","type":"string"},"quotedParentGroupJid":{"$ref":"#/components/schemas/GroupChatId","title":"Message.quotedParentGroupJid","description":"The parent group ID (community ID - communities are just groups made up of other groups) of the group represented by `quotedRemoteJid`"},"mediaData":{"title":"Message.mediaData"},"shareDuration":{"title":"Message.shareDuration","type":"number"},"isAnimated":{"title":"Message.isAnimated","type":"boolean"},"ctwaContext":{"properties":{"sourceUrl":{"title":"Message.ctwaContext.sourceUrl","type":"string"},"thumbnail":{"title":"Message.ctwaContext.thumbnail","nullable":true,"type":"string"},"mediaType":{"title":"Message.ctwaContext.mediaType","type":"number"},"isSuspiciousLink":{"title":"Message.ctwaContext.isSuspiciousLink","nullable":true,"type":"boolean"}},"required":["sourceUrl","thumbnail","mediaType","isSuspiciousLink"],"additionalProperties":false,"title":"Message.ctwaContext","type":"object"},"isViewOnce":{"title":"Message.isViewOnce","description":"Is the message a \"view once\" message","type":"boolean"},"quoteMap":{"$ref":"#/components/schemas/QuoteMap","title":"Message.quoteMap","description":"Use this to traverse the quote chain."},"cloudUrl":{"title":"Message.cloudUrl","description":"The URL of the file after being uploaded to the cloud using a cloud upload message preprocessor.","type":"string"},"buttons":{"items":{"$ref":"#/components/schemas/Button","title":"Message.buttons.[]"},"title":"Message.buttons","description":"Buttons associated with the message","type":"array"},"listResponse":{"$ref":"#/components/schemas/Row","title":"Message.listResponse","description":"List response associated with the message"},"list":{"properties":{"\"sections\"":{"items":{"$ref":"#/components/schemas/Section","title":"Message.list.\"sections\".[]"},"title":"Message.list.\"sections\"","type":"array"},"\"title\"":{"title":"Message.list.\"title\"","type":"string"},"\"description\"":{"title":"Message.list.\"description\"","type":"string"},"\"buttonText\"":{"title":"Message.list.\"buttonText\"","type":"string"}},"required":["\"sections\"","\"title\"","\"description\"","\"buttonText\""],"additionalProperties":false,"title":"Message.list","description":"The list associated with the list message","type":"object"},"pollOptions":{"items":{"$ref":"#/components/schemas/PollOption","title":"Message.pollOptions.[]"},"title":"Message.pollOptions","description":"The options of a poll","type":"array"}},"required":["selectedButtonId","id","mId","body","text","type","t","notifyName","from","to","self","ack","invis","isNewMsg","star","recvFresh","broadcast","isForwarded","labels","mentionedJidList","caption","sender","timestamp","content","isGroupMsg","isMMS","isMedia","isNotification","isPSA","fromMe","chat","chatId","author","clientUrl","deprecatedMms3Url","mediaData","shareDuration","isAnimated","isViewOnce","quoteMap"],"additionalProperties":false,"title":"Message","type":"object"},"PollOption":{"properties":{"name":{"title":"PollOption.name","type":"string"},"localId":{"title":"PollOption.localId","type":"number"}},"required":["name","localId"],"additionalProperties":false,"title":"PollOption","type":"object"},"PollData":{"properties":{"totalVotes":{"title":"PollData.totalVotes","description":"The total amount of votes recorded so far","type":"number"},"pollOptions":{"items":{"allOf":[{"$ref":"#/components/schemas/PollOption"},{"properties":{"count":{"title":"count","type":"number"}},"required":["count"],"additionalProperties":false,"type":"object"}]},"title":"PollData.pollOptions","description":"The poll options and their respective count of votes.","type":"array"},"votes":{"items":{"$ref":"#/components/schemas/PollVote","title":"PollData.votes.[]"},"title":"PollData.votes","description":"An arrray of vote objects","type":"array"},"pollMessage":{"$ref":"#/components/schemas/Message","title":"PollData.pollMessage","description":"The message object of the poll"}},"required":["totalVotes","pollOptions","votes","pollMessage"],"additionalProperties":false,"title":"PollData","type":"object"},"PollVote":{"properties":{"ack":{"title":"PollVote.ack","type":"number"},"id":{"title":"PollVote.id","description":"The message ID of this vote. For some reason this is different from the msgKey and includes exclamaition marks.","type":"string"},"msgKey":{"title":"PollVote.msgKey","description":"The message key of this vote","type":"string"},"parentMsgKey":{"title":"PollVote.parentMsgKey","description":"The Message ID of the original Poll message","type":"string"},"pollOptions":{"items":{"$ref":"#/components/schemas/PollOption","title":"PollVote.pollOptions.[]"},"title":"PollVote.pollOptions","description":"The original poll options available on the poll","type":"array"},"selectedOptionLocalIds":{"items":{"title":"PollVote.selectedOptionLocalIds.[]","type":"number"},"title":"PollVote.selectedOptionLocalIds","description":"The selected option IDs of the voter","type":"array"},"selectedOptionValues":{"items":{"title":"PollVote.selectedOptionValues.[]","type":"string"},"title":"PollVote.selectedOptionValues","description":"The selected option values by this voter","type":"array"},"sender":{"$ref":"#/components/schemas/ContactId","title":"PollVote.sender","description":"The contact ID of the voter"},"senderObj":{"$ref":"#/components/schemas/Contact","title":"PollVote.senderObj","description":"The contact object of the voter"},"senderTimestampMs":{"title":"PollVote.senderTimestampMs","description":"Timestamp of the vote","type":"number"},"stale":{"title":"PollVote.stale","type":"boolean"}},"required":["ack","id","msgKey","parentMsgKey","pollOptions","selectedOptionLocalIds","selectedOptionValues","sender","senderObj","senderTimestampMs","stale"],"additionalProperties":false,"title":"PollVote","type":"object"},"QuoteMap":{"additionalProperties":{"properties":{"body":{"title":"body","description":"The body of the message","type":"string"},"quotes":{"$ref":"#/components/schemas/MessageId","title":"quotes","description":"The message ID of the message that was quoted. Null if no message was quoted."}},"required":["body"],"additionalProperties":false,"type":"object"},"title":"QuoteMap","type":"object"},"MessageInfoInteraction":{"properties":{"id":{"$ref":"#/components/schemas/ContactId","title":"MessageInfoInteraction.id","description":"The contact ID of the contact that interacted with the message."},"t":{"title":"MessageInfoInteraction.t","description":"The timestamp of the interaction. You have to x 1000 to use in a JS Date object.","type":"number"}},"required":["id","t"],"additionalProperties":false,"title":"MessageInfoInteraction","type":"object"},"MessageInfo":{"properties":{"deliveryRemaining":{"title":"MessageInfo.deliveryRemaining","type":"number"},"playedRemaining":{"title":"MessageInfo.playedRemaining","type":"number"},"readRemaining":{"title":"MessageInfo.readRemaining","type":"number"},"delivery":{"items":{"$ref":"#/components/schemas/MessageInfoInteraction","title":"MessageInfo.delivery.[]"},"title":"MessageInfo.delivery","type":"array"},"read":{"items":{"$ref":"#/components/schemas/MessageInfoInteraction","title":"MessageInfo.read.[]"},"title":"MessageInfo.read","type":"array"},"played":{"items":{"$ref":"#/components/schemas/MessageInfoInteraction","title":"MessageInfo.played.[]"},"title":"MessageInfo.played","type":"array"},"id":{"$ref":"#/components/schemas/MessageId","title":"MessageInfo.id","description":"The ID of the message"}},"required":["deliveryRemaining","playedRemaining","readRemaining","delivery","read","played","id"],"additionalProperties":false,"title":"MessageInfo","type":"object"},"CustomProduct":{"properties":{"name":{"title":"CustomProduct.name","description":"The main title of the product. E.g:\n`BAVARIA — 35 SPORTS CRUISER (2006)`","type":"string"},"description":{"title":"CustomProduct.description","description":"The description of the product. This shows right under the price so it is useful for subscriptions/rentals. E.g:\n\n`(per day)\\n\\nCome and have a fantastic sailing adventure aboard our boat. \\nShe is a Bavaria 35 sports cruiser and is powered by 2 economical Volvo D6’s with Bravo 2 outdrives as well as a bow thruster. This Makes maneuvering very easy. She can accommodate up to 8 people for day charters and for overnight charters she can accommodate 4 in comfort in 2 cabins.`","type":"string"},"priceAmount1000":{"title":"CustomProduct.priceAmount1000","description":"The price amount multiplied by 1000. For example, for something costing `825` units of currency:\n`825000`","type":"number"},"currency":{"title":"CustomProduct.currency","description":"The [**ISO 4217**](https://en.wikipedia.org/wiki/ISO_4217) 3 letter currency code. E.g (Swedish krona)\n`SEK`","type":"string"},"url":{"title":"CustomProduct.url","description":"The URL of the product.\n\nNOTE: At the moment, the URL DOES NOT WORK. It shows up for the recipient but they will not be able to click it. As a rememdy, it is added as a reply to the product message.","type":"string"}},"required":["name","description","priceAmount1000","currency"],"additionalProperties":false,"title":"CustomProduct","type":"object"},"CartItem":{"properties":{"id":{"title":"CartItem.id","description":"Product ID","type":"string"},"name":{"title":"CartItem.name","description":"Product name","type":"string"},"qty":{"title":"CartItem.qty","description":"Amount of this item in the cart","type":"number"},"thumbnailId":{"title":"CartItem.thumbnailId","type":"string"},"thumbnailUrl":{"title":"CartItem.thumbnailUrl","description":"URL to .enc file of the thumbnail. Just change the filetype to .jpg to view the thumbnail","type":"string"}},"required":["id","name","qty","thumbnailId","thumbnailUrl"],"additionalProperties":false,"title":"CartItem","type":"object"},"Product":{"properties":{"id":{"title":"Product.id","description":"Product ID","type":"string"},"isHidden":{"title":"Product.isHidden","description":"`true` if the product is hidden from public view.","type":"boolean"},"catalogWid":{"title":"Product.catalogWid","description":"The id of the catalog in which this product is located.","type":"string"},"url":{"title":"Product.url","description":"The URL of the product.","type":"string"},"name":{"title":"Product.name","description":"The name of the product.","type":"string"},"description":{"title":"Product.description","description":"The description of the product.","type":"string"},"availability":{"anyOf":[{"title":"Product.availability","type":"number"},{"title":"Product.availability","enum":["unknown"],"type":"string"}],"title":"Product.availability","description":"The availiable quantity of this product.","default":"\"unknown\"`"},"reviewStatus":{"enum":["NO_REVIEW","PENDING","REJECTED","APPROVED","OUTDATED"],"title":"Product.reviewStatus","description":"The review status of the product","type":"string"},"imageCdnUrl":{"title":"Product.imageCdnUrl","description":"The url of the main image of the product.\n\nNOTE: If downloading manually, the filetype must be changed to .jpg to view the image.","type":"string"},"imageCount":{"title":"Product.imageCount","description":"The number of images of the product.","type":"number"},"additionalImageCdnUrl":{"items":{"title":"Product.additionalImageCdnUrl.[]","type":"string"},"title":"Product.additionalImageCdnUrl","description":"Array of URLs of the other images of the product. Does not include the main image.","type":"array"},"priceAmount1000":{"title":"Product.priceAmount1000","description":"The price of the product in 1000 units.","type":"number"},"retailerId":{"title":"Product.retailerId","description":"The custom id of the product.","type":"string"},"t":{"title":"Product.t","description":"The timestamp when the product was created / 1000","type":"number"},"currency":{"title":"Product.currency","description":"The [**ISO 4217**](https://en.wikipedia.org/wiki/ISO_4217) 3 letter currency code. E.g (Swedish krona)\n`SEK`","type":"string"}},"required":["id","currency"],"additionalProperties":false,"title":"Product","type":"object"},"Order":{"properties":{"id":{"title":"Order.id","description":"Order ID","type":"string"},"createdAt":{"title":"Order.createdAt","description":"epoch ts divided by 1000","type":"number"},"currency":{"title":"Order.currency","description":"The [**ISO 4217**](https://en.wikipedia.org/wiki/ISO_4217) 3 letter currency code. E.g (Swedish krona)\n`SEK`","type":"string"},"products":{"items":{"$ref":"#/components/schemas/CartItem","title":"Order.products.[]"},"title":"Order.products","description":"An array of items in the cart","type":"array"},"sellerJid":{"title":"Order.sellerJid","type":"string"},"subtotal":{"title":"Order.subtotal"},"total":{"title":"Order.total"},"message":{"$ref":"#/components/schemas/Message","title":"Order.message","description":"The message object associated with the order. Only populated in `onOrder` callback."}},"required":["id","createdAt","currency","products","sellerJid","subtotal","total"],"additionalProperties":false,"title":"Order","type":"object"},"Reaction":{"properties":{"aggregateEmoji":{"title":"Reaction.aggregateEmoji","description":"The aggregate emoji used for the reaction.","type":"string"},"id":{"title":"Reaction.id","description":"The identifier of the reaction","type":"string"},"hasReactionByMe":{"title":"Reaction.hasReactionByMe","description":"If the reaction is also sent by the host account","type":"boolean"},"senders":{"items":{"$ref":"#/components/schemas/ReactionRecord","title":"Reaction.senders.[]"},"title":"Reaction.senders","description":"The senders of this spefcific reaction","type":"array"}},"required":["aggregateEmoji","id","hasReactionByMe","senders"],"additionalProperties":false,"title":"Reaction","description":"A reaction is identified the specific emoji.","type":"object"},"ReactionRecord":{"properties":{"ack":{"$ref":"#/components/schemas/MessageAck","title":"ReactionRecord.ack","description":"The acknowledgement of the reaction"},"id":{"title":"ReactionRecord.id","description":"The ID of the reaction","type":"string"},"msgKey":{"title":"ReactionRecord.msgKey","type":"string"},"parentMsgKey":{"title":"ReactionRecord.parentMsgKey","type":"string"},"orphan":{"title":"ReactionRecord.orphan","type":"number"},"reactionText":{"title":"ReactionRecord.reactionText","description":"The text of the reaction","type":"string"},"read":{"title":"ReactionRecord.read","description":"If the reaction has been read","type":"boolean"},"senderUserJid":{"$ref":"#/components/schemas/ContactId","title":"ReactionRecord.senderUserJid","description":"The ID of the reaction sender"},"timestamp":{"title":"ReactionRecord.timestamp","description":"The timestamp of the reaction","type":"number"}},"required":["ack","id","msgKey","parentMsgKey","orphan","reactionText","read","senderUserJid","timestamp"],"additionalProperties":false,"title":"ReactionRecord","description":"The specific reaction by a user","type":"object"},"ReactionEvent":{"properties":{"message":{"$ref":"#/components/schemas/Message","title":"ReactionEvent.message","description":"The message being reacted to"},"reactionByMe":{"$ref":"#/components/schemas/Reaction","title":"ReactionEvent.reactionByMe","description":"The reaction sent by the host account"},"reactions":{"items":{"$ref":"#/components/schemas/Reaction","title":"ReactionEvent.reactions.[]"},"title":"ReactionEvent.reactions","description":"An array of all reactions","type":"array"},"type":{"enum":["add","change"],"title":"ReactionEvent.type","description":"The type of the reaction event.","type":"string"}},"required":["message","reactionByMe","reactions","type"],"additionalProperties":false,"title":"ReactionEvent","description":"Emitted by onReaction","type":"object"},"SessionInfo":{"properties":{"WA_VERSION":{"title":"SessionInfo.WA_VERSION","type":"string"},"PAGE_UA":{"title":"SessionInfo.PAGE_UA","type":"string"},"WA_AUTOMATE_VERSION":{"title":"SessionInfo.WA_AUTOMATE_VERSION","type":"string"},"BROWSER_VERSION":{"title":"SessionInfo.BROWSER_VERSION","type":"string"},"LAUNCH_TIME_MS":{"title":"SessionInfo.LAUNCH_TIME_MS","type":"number"},"NUM":{"title":"SessionInfo.NUM","type":"string"},"OS":{"title":"SessionInfo.OS","type":"string"},"START_TS":{"title":"SessionInfo.START_TS","type":"number"},"PHONE_VERSION":{"title":"SessionInfo.PHONE_VERSION","type":"string"},"NUM_HASH":{"title":"SessionInfo.NUM_HASH","type":"string"},"PATCH_HASH":{"title":"SessionInfo.PATCH_HASH","type":"string"},"OW_KEY":{"title":"SessionInfo.OW_KEY","type":"string"},"INSTANCE_ID":{"title":"SessionInfo.INSTANCE_ID","type":"string"},"RAM_INFO":{"title":"SessionInfo.RAM_INFO","type":"string"},"PPTR_VERSION":{"title":"SessionInfo.PPTR_VERSION","type":"string"},"LATEST_VERSION":{"title":"SessionInfo.LATEST_VERSION","type":"boolean"},"CLI":{"title":"SessionInfo.CLI","type":"boolean"},"ACC_TYPE":{"enum":["PERSONAL","BUSINESS"],"title":"SessionInfo.ACC_TYPE","type":"string"}},"required":["WA_VERSION","PAGE_UA","WA_AUTOMATE_VERSION","BROWSER_VERSION"],"additionalProperties":false,"title":"SessionInfo","type":"object"},"HealthCheck":{"properties":{"queuedMessages":{"title":"HealthCheck.queuedMessages","description":"The number of messages queued up in the browser. Messages can start being queued up due to the web app awaiting a connection with the host device.\n\nHealthy: 0","type":"number"},"state":{"$ref":"#/components/schemas/STATE","title":"HealthCheck.state","description":"The state of the web app.\n\nHealthy: 'CONNECTED'"},"isPhoneDisconnected":{"title":"HealthCheck.isPhoneDisconnected","description":"Whether or not the \"Phone is disconnected\" message is showing within the web app.\n\nHealthy: `false`","type":"boolean"},"isHere":{"title":"HealthCheck.isHere","description":"Returns `true` if \"Use Here\" button is not detected\n\nHealthy: `true`","type":"boolean"},"wapiInjected":{"title":"HealthCheck.wapiInjected","description":"Returns `true` if the `WAPI` object is detected.\n\nHealthy: `true`","type":"boolean"},"online":{"title":"HealthCheck.online","description":"Result of `window.navigator.onLine`\n\nHealthy: `true`","type":"boolean"},"tryingToReachPhone":{"title":"HealthCheck.tryingToReachPhone","description":"Returns `true` if \"trying to reach phone\" dialog is detected\n\nHealthy: `false`","type":"boolean"},"retryingIn":{"title":"HealthCheck.retryingIn","description":"Returns the number of seconds the \"Retrying in ...\" dialog is indicating. If the dialog is not showing, it will return `0`.\n\nHealthy: `0`","type":"number"},"batteryLow":{"title":"HealthCheck.batteryLow","description":"Returns `true` if \"Phone battery low\" message is detected\n\nHealthy: `false`","type":"boolean"}},"additionalProperties":false,"title":"HealthCheck","type":"object"},"expressMiddleware":{"title":"expressMiddleware"},"ChatwootConfig":{"properties":{"chatwootUrl":{"title":"ChatwootConfig.chatwootUrl","description":"The URL of the chatwoot inbox. If you want this integration to create & manage the inbox for you, you can omit the inbox part.","type":"string"},"chatwootApiAccessToken":{"title":"ChatwootConfig.chatwootApiAccessToken","description":"The API access token which you can get from your account menu.","type":"string"},"apiHost":{"title":"ChatwootConfig.apiHost","description":"The API host which will be used as the webhook address in the Chatwoot inbox.","type":"string"},"host":{"title":"ChatwootConfig.host","description":"Similar to apiHost","type":"string"},"https":{"title":"ChatwootConfig.https","description":"Whether or not to use https for the webhook address","type":"boolean"},"cert":{"title":"ChatwootConfig.cert","description":"The certificate for https","type":"string"},"privkey":{"title":"ChatwootConfig.privkey","description":"The private key for https","type":"string"},"key":{"title":"ChatwootConfig.key","description":"The API key used to secure the instance webhook address","type":"string"},"forceUpdateCwWebhook":{"title":"ChatwootConfig.forceUpdateCwWebhook","description":"Whether or not to update the webhook address in the Chatwoot inbox on launch","type":"boolean"},"port":{"title":"ChatwootConfig.port","description":"port","type":"number"}},"required":["chatwootUrl","chatwootApiAccessToken","apiHost","host","cert","privkey","port"],"additionalProperties":false,"title":"ChatwootConfig","type":"object"},"cliFlags":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"}]},"title":"cliFlags","type":"object"},"ConfigLogTransport":{"properties":{"type":{"enum":["syslog","console","file","ev"],"title":"ConfigLogTransport.type","description":"The type of winston transport. At the moment only `file`, `console`, `ev` and `syslog` are supported.","type":"string"},"options":{"title":"ConfigLogTransport.options","description":"The options for the transport. Generally only required for syslog but you can use this to override default options for other types of transports."},"done":{"title":"ConfigLogTransport.done","description":"If the transport has already been added to the logger. The logging set up command handles this for you.","type":"boolean"}},"required":["type"],"additionalProperties":false,"title":"ConfigLogTransport","type":"object"},"CollectorOptions":{"properties":{"maxProcessed":{"title":"CollectorOptions.maxProcessed","description":"The maximum amount of items to process","type":"number"},"max":{"title":"CollectorOptions.max","description":"The maximum amount of items to collect","type":"number"},"time":{"title":"CollectorOptions.time","description":"Max time to wait for items in milliseconds","type":"number"},"idle":{"title":"CollectorOptions.idle","description":"Max time allowed idle","type":"number"},"dispose":{"title":"CollectorOptions.dispose","description":"Whether to dispose data when it's deleted","type":"boolean"}},"additionalProperties":false,"title":"CollectorOptions","description":"Options to be applied to the collector.","type":"object"},"AwaitMessagesOptions":{"properties":{"errors":{"items":{"title":"AwaitMessagesOptions.errors.[]","type":"string"},"title":"AwaitMessagesOptions.errors","description":"An array of \"reasons\" that would result in the awaitMessages command to throw an error.","type":"array"}},"additionalProperties":false,"title":"AwaitMessagesOptions","type":"object"},"CurrentDialogProps":{"additionalProperties":{},"title":"CurrentDialogProps","type":"object"},"DialogState":{"properties":{"currentStep":{"title":"DialogState.currentStep","type":"number"},"currentProps":{"title":"DialogState.currentProps"},"lastInput":{"title":"DialogState.lastInput"},"isComplete":{"title":"DialogState.isComplete","type":"boolean"},"isError":{"title":"DialogState.isError","type":"boolean"},"errorMessage":{"title":"DialogState.errorMessage","type":"string"}},"required":["currentStep","currentProps","lastInput","isComplete","isError","errorMessage"],"additionalProperties":false,"title":"DialogState","type":"object"},"DialogTemplate":{"properties":{"\"dialogId\"":{"title":"DialogTemplate.\"dialogId\"","type":"string"},"\"privateOnly\"":{"title":"DialogTemplate.\"privateOnly\"","type":"boolean"},"\"identifier\"":{"title":"DialogTemplate.\"identifier\"","type":"string"},"\"successMessage\"":{"title":"DialogTemplate.\"successMessage\"","type":"string"},"\"startMessage\"":{"title":"DialogTemplate.\"startMessage\"","type":"string"},"\"properties\"":{"additionalProperties":{"$ref":"#/components/schemas/DialogProperty"},"title":"DialogTemplate.\"properties\"","type":"object"}},"required":["\"dialogId\"","\"privateOnly\"","\"identifier\"","\"successMessage\"","\"startMessage\"","\"properties\""],"additionalProperties":false,"title":"DialogTemplate","type":"object"},"CheckFunction":{"title":"CheckFunction"},"DialogProperty":{"properties":{"\"order\"":{"title":"DialogProperty.\"order\"","type":"number"},"\"key\"":{"title":"DialogProperty.\"key\"","type":"string"},"\"prompt\"":{"title":"DialogProperty.\"prompt\"","type":"string"},"\"type\"":{"title":"DialogProperty.\"type\"","type":"string"},"\"skipCondition\"":{"$ref":"#/components/schemas/CheckFunction","title":"DialogProperty.\"skipCondition\""},"\"options\"":{"anyOf":[{"items":{"$ref":"#/components/schemas/DialogButtons","title":"DialogProperty.\"options\".[]"},"title":"DialogProperty.\"options\".[]","type":"array"},{"items":{"$ref":"#/components/schemas/DialogListMessageSection","title":"DialogProperty.\"options\".[]"},"title":"DialogProperty.\"options\".[]","type":"array"}],"title":"DialogProperty.\"options\""},"\"validation\"":{"items":{"$ref":"#/components/schemas/DialogValidation","title":"DialogProperty.\"validation\".[]"},"title":"DialogProperty.\"validation\"","type":"array"}},"required":["\"order\"","\"key\"","\"prompt\"","\"type\"","\"validation\""],"additionalProperties":false,"title":"DialogProperty","type":"object"},"DialogButtons":{"properties":{"label":{"title":"DialogButtons.label","type":"string"},"value":{"title":"DialogButtons.value","type":"string"}},"required":["label","value"],"additionalProperties":false,"title":"DialogButtons","type":"object"},"DialogListMessageSection":{"properties":{"title":{"title":"DialogListMessageSection.title","type":"string"},"rows":{"items":{"$ref":"#/components/schemas/DialogListMessageRow","title":"DialogListMessageSection.rows.[]"},"title":"DialogListMessageSection.rows","type":"array"}},"required":["title","rows"],"additionalProperties":false,"title":"DialogListMessageSection","type":"object"},"DialogListMessageRow":{"properties":{"title":{"title":"DialogListMessageRow.title","type":"string"},"description":{"title":"DialogListMessageRow.description","type":"string"},"value":{"title":"DialogListMessageRow.value","type":"string"}},"required":["title","description","value"],"additionalProperties":false,"title":"DialogListMessageRow","type":"object"},"DialogValidation":{"properties":{"\"type\"":{"$ref":"#/components/schemas/ValidationType","title":"DialogValidation.\"type\""},"\"value\"":{"anyOf":[{"title":"DialogValidation.\"value\"","type":"string"},{"$ref":"#/components/schemas/CheckFunction","title":"DialogValidation.\"value\""}],"title":"DialogValidation.\"value\""},"\"errorMessage\"":{"title":"DialogValidation.\"errorMessage\"","type":"string"}},"required":["\"type\"","\"value\"","\"errorMessage\""],"additionalProperties":false,"title":"DialogValidation","type":"object"},"MessagePreProcessor":{"title":"MessagePreProcessor"},"MPConfigType":{"anyOf":[{"$ref":"#/components/schemas/PREPROCESSORS","title":"MPConfigType"},{"$ref":"#/components/schemas/MessagePreProcessor","title":"MPConfigType"},{"items":{"anyOf":[{"$ref":"#/components/schemas/PREPROCESSORS","title":"MPConfigType.[]"},{"$ref":"#/components/schemas/MessagePreProcessor","title":"MPConfigType.[]"}],"title":"MPConfigType.[]"},"title":"MPConfigType.[]","type":"array"}],"title":"MPConfigType","description":"The actual type for [config.messagePreprocessor](/docs/api/interfaces/api_model_config.ConfigObject#messagepreprocessor)"}}
@@ -4,7 +4,7 @@ import { Chat, LiveLocationChangedEvent, ChatState, ChatMuteDuration, GroupChatC
4
4
  import { Contact, NumberCheck } from './model/contact';
5
5
  import { Message, MessageInfo, PollData } from './model/message';
6
6
  import { AxiosRequestConfig } from 'axios';
7
- import { NewCommunityGroup, ParticipantChangedEventModel, GenericGroupChangeEvent } from './model/group-metadata';
7
+ import { NewCommunityGroup, ParticipantChangedEventModel, GenericGroupChangeEvent, GroupMetadata } from './model/group-metadata';
8
8
  import { ConfigObject, STATE, LicenseType, Webhook, EventPayload } from './model';
9
9
  import PQueue, { DefaultAddOptions, Options } from 'p-queue';
10
10
  import { HealthCheck, SessionInfo } from './model/sessionInfo';
@@ -98,6 +98,10 @@ export declare class Client {
98
98
  * @returns SessionInfo
99
99
  */
100
100
  getSessionInfo(): SessionInfo;
101
+ /**
102
+ * Easily resize page on the fly. Useful if you're showing screenshots in a web-app.
103
+ */
104
+ resizePage(width?: number, height?: number): Promise<boolean>;
101
105
  /**
102
106
  * Get the config which was used to set up the client. Sensitive details (like devTools username and password, and browserWSEndpoint) are scrubbed
103
107
  *
@@ -810,9 +814,12 @@ export declare class Client {
810
814
  getFeatures(): Promise<any>;
811
815
  /**
812
816
  * Returns a PNG DataURL screenshot of the session
817
+ * @param chatId Chat ID to open before taking a snapshot
818
+ * @param width Width of the viewport for the snapshot. Height also required if you want to resize.
819
+ * @param height Height of the viewport for the snapshot. Width also required if you want to resize.
813
820
  * @returns `Promise<DataURL>`
814
821
  */
815
- getSnapshot(chatId?: ChatId): Promise<DataURL>;
822
+ getSnapshot(chatId?: ChatId, width?: number, height?: number): Promise<DataURL>;
816
823
  /**
817
824
  * Returns some metrics of the session/page.
818
825
  * @returns `Promise<any>`
@@ -1035,6 +1042,11 @@ export declare class Client {
1035
1042
  * @returns array of groups
1036
1043
  */
1037
1044
  getAllGroups(withNewMessagesOnly?: boolean): Promise<Chat[]>;
1045
+ /**
1046
+ * Retrieve all commmunity Ids
1047
+ * @returns array of group ids
1048
+ */
1049
+ getAllCommunities(): Promise<GroupId[]>;
1038
1050
  /**
1039
1051
  * Retrieves group members as [Id] objects
1040
1052
  * @param groupId group id
@@ -1045,6 +1057,56 @@ export declare class Client {
1045
1057
  * @param groupId group id
1046
1058
  */
1047
1059
  getGroupInfo(groupId: GroupChatId): Promise<any>;
1060
+ /**
1061
+ * Returns the community metadata. Like group metadata but with a `subGroups` property which is the group metadata of the community subgroups.
1062
+ * @param communityId community id
1063
+ */
1064
+ getCommunityInfo(communityId: GroupChatId): Promise<GroupMetadata & {
1065
+ subGroups: GroupMetadata[];
1066
+ }>;
1067
+ /**
1068
+ *
1069
+ * Accepts a request from a recipient to join a group. Takes the message ID of the request message.
1070
+ *
1071
+ * @param {string} messageId
1072
+ */
1073
+ acceptGroupJoinRequest(messageId: MessageId): Promise<boolean>;
1074
+ /**
1075
+ * Retrieves community members Ids
1076
+ * @param communityId community id
1077
+ */
1078
+ getCommunityParticipantIds(communityId: GroupChatId): Promise<{
1079
+ id: GroupChatId;
1080
+ participants: ContactId[];
1081
+ subgroup: boolean;
1082
+ }[]>;
1083
+ /**
1084
+ * Retrieves community admin Ids
1085
+ * @param communityId community id
1086
+ */
1087
+ getCommunityAdminIds(communityId: GroupChatId): Promise<{
1088
+ id: GroupChatId;
1089
+ admins: ContactId[];
1090
+ subgroup: boolean;
1091
+ }[]>;
1092
+ /**
1093
+ * Retrieves community members as Contact objects
1094
+ * @param communityId community id
1095
+ */
1096
+ getCommunityParticipants(communityId: GroupChatId): Promise<{
1097
+ id: GroupChatId;
1098
+ participants: Contact[];
1099
+ subgroup: boolean;
1100
+ }[]>;
1101
+ /**
1102
+ * Retrieves community admins as Contact objects
1103
+ * @param communityId community id
1104
+ */
1105
+ getCommunityAdmins(communityId: GroupChatId): Promise<{
1106
+ id: GroupChatId;
1107
+ admins: Contact[];
1108
+ subgroup: boolean;
1109
+ }[]>;
1048
1110
  /** Joins a group via the invite link, code, or message
1049
1111
  * @param link This param is the string which includes the invite link or code. The following work:
1050
1112
  * - Follow this link to join my WA group: https://chat.whatsapp.com/DHTGJUfFJAV9MxOpZO1fBZ
@@ -1710,6 +1772,14 @@ export declare class Client {
1710
1772
  */
1711
1773
  sendGiphyAsSticker(to: ChatId, giphyMediaUrl: URL | string): Promise<MessageId | string | boolean>;
1712
1774
  /**
1775
+ * @deprecated
1776
+ *
1777
+ * :::danger
1778
+ *
1779
+ * Status features are broken for now. Please join our discord community for updates.
1780
+ *
1781
+ * :::
1782
+ *
1713
1783
  * [REQUIRES A TEXT STORY LICENSE-KEY](https://gum.co/open-wa)
1714
1784
  *
1715
1785
  * Sends a formatted text story.
@@ -1727,6 +1797,14 @@ export declare class Client {
1727
1797
  */
1728
1798
  postTextStatus(text: Content, textRgba: string, backgroundRgba: string, font: number): Promise<MessageId | string | boolean>;
1729
1799
  /**
1800
+ * @deprecated
1801
+ *
1802
+ * :::danger
1803
+ *
1804
+ * Status features are broken for now. Please join our discord community for updates.
1805
+ *
1806
+ * :::
1807
+ *
1730
1808
  * [REQUIRES AN IMAGE STORY LICENSE-KEY](https://gum.co/open-wa)
1731
1809
  *
1732
1810
  * Posts an image story.
@@ -1736,6 +1814,14 @@ export declare class Client {
1736
1814
  */
1737
1815
  postImageStatus(data: DataURL, caption: Content): Promise<MessageId | string | boolean>;
1738
1816
  /**
1817
+ * @deprecated
1818
+ *
1819
+ * :::danger
1820
+ *
1821
+ * Status features are broken for now. Please join our discord community for updates.
1822
+ *
1823
+ * :::
1824
+ *
1739
1825
  * [REQUIRES A VIDEO STORY LICENSE-KEY](https://gum.co/open-wa)
1740
1826
  *
1741
1827
  * Posts a video story.
@@ -482,6 +482,18 @@ class Client {
482
482
  getSessionInfo() {
483
483
  return this._sessionInfo;
484
484
  }
485
+ /**
486
+ * Easily resize page on the fly. Useful if you're showing screenshots in a web-app.
487
+ */
488
+ resizePage(width = 1920, height = 1080) {
489
+ return __awaiter(this, void 0, void 0, function* () {
490
+ yield this._page.setViewport({
491
+ width,
492
+ height
493
+ });
494
+ return true;
495
+ });
496
+ }
485
497
  /**
486
498
  * Get the config which was used to set up the client. Sensitive details (like devTools username and password, and browserWSEndpoint) are scrubbed
487
499
  *
@@ -1985,10 +1997,15 @@ class Client {
1985
1997
  }
1986
1998
  /**
1987
1999
  * Returns a PNG DataURL screenshot of the session
2000
+ * @param chatId Chat ID to open before taking a snapshot
2001
+ * @param width Width of the viewport for the snapshot. Height also required if you want to resize.
2002
+ * @param height Height of the viewport for the snapshot. Width also required if you want to resize.
1988
2003
  * @returns `Promise<DataURL>`
1989
2004
  */
1990
- getSnapshot(chatId) {
2005
+ getSnapshot(chatId, width, height) {
1991
2006
  return __awaiter(this, void 0, void 0, function* () {
2007
+ if (width && height)
2008
+ yield this.resizePage(width, height);
1992
2009
  const snapshotElement = chatId ? yield this._page.evaluateHandle(({ chatId }) => WAPI.getSnapshotElement(chatId), { chatId }) : this.getPage();
1993
2010
  const screenshot = yield snapshotElement.screenshot({
1994
2011
  type: "png",
@@ -2380,6 +2397,15 @@ class Client {
2380
2397
  }
2381
2398
  });
2382
2399
  }
2400
+ /**
2401
+ * Retrieve all commmunity Ids
2402
+ * @returns array of group ids
2403
+ */
2404
+ getAllCommunities() {
2405
+ return __awaiter(this, void 0, void 0, function* () {
2406
+ return yield this.pup(() => WAPI.getCommunities());
2407
+ });
2408
+ }
2383
2409
  /**
2384
2410
  * Retrieves group members as [Id] objects
2385
2411
  * @param groupId group id
@@ -2398,6 +2424,62 @@ class Client {
2398
2424
  return yield this.pup(groupId => WAPI.getGroupInfo(groupId), groupId);
2399
2425
  });
2400
2426
  }
2427
+ /**
2428
+ * Returns the community metadata. Like group metadata but with a `subGroups` property which is the group metadata of the community subgroups.
2429
+ * @param communityId community id
2430
+ */
2431
+ getCommunityInfo(communityId) {
2432
+ return __awaiter(this, void 0, void 0, function* () {
2433
+ return yield this.pup(communityId => WAPI.getCommunityInfo(communityId), communityId);
2434
+ });
2435
+ }
2436
+ /**
2437
+ *
2438
+ * Accepts a request from a recipient to join a group. Takes the message ID of the request message.
2439
+ *
2440
+ * @param {string} messageId
2441
+ */
2442
+ acceptGroupJoinRequest(messageId) {
2443
+ return __awaiter(this, void 0, void 0, function* () {
2444
+ return yield this.pup(messageId => WAPI.acceptGroupJoinRequest(messageId), messageId);
2445
+ });
2446
+ }
2447
+ /**
2448
+ * Retrieves community members Ids
2449
+ * @param communityId community id
2450
+ */
2451
+ getCommunityParticipantIds(communityId) {
2452
+ return __awaiter(this, void 0, void 0, function* () {
2453
+ return yield this.pup(communityId => WAPI.getCommunityParticipantIds(communityId), communityId);
2454
+ });
2455
+ }
2456
+ /**
2457
+ * Retrieves community admin Ids
2458
+ * @param communityId community id
2459
+ */
2460
+ getCommunityAdminIds(communityId) {
2461
+ return __awaiter(this, void 0, void 0, function* () {
2462
+ return yield this.pup(communityId => WAPI.getCommunityAdminIds(communityId), communityId);
2463
+ });
2464
+ }
2465
+ /**
2466
+ * Retrieves community members as Contact objects
2467
+ * @param communityId community id
2468
+ */
2469
+ getCommunityParticipants(communityId) {
2470
+ return __awaiter(this, void 0, void 0, function* () {
2471
+ return yield this.pup(communityId => WAPI.getCommunityParticipants(communityId), communityId);
2472
+ });
2473
+ }
2474
+ /**
2475
+ * Retrieves community admins as Contact objects
2476
+ * @param communityId community id
2477
+ */
2478
+ getCommunityAdmins(communityId) {
2479
+ return __awaiter(this, void 0, void 0, function* () {
2480
+ return yield this.pup(communityId => WAPI.getCommunityAdmins(communityId), communityId);
2481
+ });
2482
+ }
2401
2483
  /** Joins a group via the invite link, code, or message
2402
2484
  * @param link This param is the string which includes the invite link or code. The following work:
2403
2485
  * - Follow this link to join my WA group: https://chat.whatsapp.com/DHTGJUfFJAV9MxOpZO1fBZ
@@ -3589,6 +3671,14 @@ class Client {
3589
3671
  });
3590
3672
  }
3591
3673
  /**
3674
+ * @deprecated
3675
+ *
3676
+ * :::danger
3677
+ *
3678
+ * Status features are broken for now. Please join our discord community for updates.
3679
+ *
3680
+ * :::
3681
+ *
3592
3682
  * [REQUIRES A TEXT STORY LICENSE-KEY](https://gum.co/open-wa)
3593
3683
  *
3594
3684
  * Sends a formatted text story.
@@ -3610,6 +3700,14 @@ class Client {
3610
3700
  });
3611
3701
  }
3612
3702
  /**
3703
+ * @deprecated
3704
+ *
3705
+ * :::danger
3706
+ *
3707
+ * Status features are broken for now. Please join our discord community for updates.
3708
+ *
3709
+ * :::
3710
+ *
3613
3711
  * [REQUIRES AN IMAGE STORY LICENSE-KEY](https://gum.co/open-wa)
3614
3712
  *
3615
3713
  * Posts an image story.
@@ -3623,6 +3721,14 @@ class Client {
3623
3721
  });
3624
3722
  }
3625
3723
  /**
3724
+ * @deprecated
3725
+ *
3726
+ * :::danger
3727
+ *
3728
+ * Status features are broken for now. Please join our discord community for updates.
3729
+ *
3730
+ * :::
3731
+ *
3626
3732
  * [REQUIRES A VIDEO STORY LICENSE-KEY](https://gum.co/open-wa)
3627
3733
  *
3628
3734
  * Posts a video story.
@@ -1,4 +1,4 @@
1
- import { ChatId, ContactId, MessageId } from "./aliases";
1
+ import { ChatId, ContactId, MessageId, GroupChatId } from "./aliases";
2
2
  import { Button, Row, Section } from "./button";
3
3
  import { Chat } from "./chat";
4
4
  import { Contact } from "./contact";
@@ -156,7 +156,7 @@ export interface Message {
156
156
  *
157
157
  * If this is `true` then you need to determine within your own code whether or not to accept the user to the group which is indicated with `quotedRemoteJid` using `addParticipant`.
158
158
  */
159
- isGroupJoinRequest?: boolean;
159
+ isGroupJoinRequest?: GroupChatId;
160
160
  /**
161
161
  * The ID of the message sender
162
162
  */
@@ -168,7 +168,7 @@ export interface Message {
168
168
  /**
169
169
  * The parent group ID (community ID - communities are just groups made up of other groups) of the group represented by `quotedRemoteJid`
170
170
  */
171
- quotedParentGroupJid?: string;
171
+ quotedParentGroupJid?: GroupChatId;
172
172
  mediaData: unknown;
173
173
  shareDuration: number;
174
174
  isAnimated: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.55.4",
3
+ "version": "4.57.0",
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",