@open-wa/wa-automate 4.43.0 → 4.43.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/oas-type-schemas.json +1 -1
- package/dist/api/Client.d.ts +45 -36
- package/dist/api/Client.js +51 -34
- package/dist/api/model/message.d.ts +38 -0
- package/package.json +1 -1
@@ -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."},"GroupChatId":{"anyOf":[],"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"},"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"}},"required":["id","peerJid","offerTime","isVideo","isGroup","canHandleLocally","outgoing","webClientShouldHandle","participants"],"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"},"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":{"$ref":"#/components/schemas/PREPROCESSORS","title":"ConfigObject.messagePreprocessor","description":"Set a preprocessor for messages. See [[PREPROCESSORS]] 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`"}},"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":{"id":{"$ref":"#/components/schemas/NonSerializedId","title":"Participant.id"},"isAdmin":{"title":"Participant.isAdmin","type":"boolean"},"isSuperAdmin":{"title":"Participant.isSuperAdmin","type":"boolean"}},"required":["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"}},"required":["id","creation","owner","participants","pendingParticipants"],"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"},"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"},"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 was sent by the host account","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"},"mediaData":{"title":"Message.mediaData"},"shareDuration":{"title":"Message.shareDuration","type":"number"},"isAnimated":{"title":"Message.isAnimated","type":"boolean"},"isViewOnce":{"title":"Message.isViewOnce","description":"Is the message a \"view once\" message","type":"boolean"},"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"}},"required":["selectedButtonId","id","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"],"additionalProperties":false,"title":"Message","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"},"cliFlags":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"}]},"title":"cliFlags","type":"object"},"ClientMethods":{"title":"ClientMethods","description":"A convenience type that includes all keys from the `Client`."},"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"}}
|
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."},"GroupChatId":{"anyOf":[],"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"},"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"}},"required":["id","peerJid","offerTime","isVideo","isGroup","canHandleLocally","outgoing","webClientShouldHandle","participants"],"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"},"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":{"$ref":"#/components/schemas/PREPROCESSORS","title":"ConfigObject.messagePreprocessor","description":"Set a preprocessor for messages. See [[PREPROCESSORS]] 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`"}},"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":{"id":{"$ref":"#/components/schemas/NonSerializedId","title":"Participant.id"},"isAdmin":{"title":"Participant.isAdmin","type":"boolean"},"isSuperAdmin":{"title":"Participant.isSuperAdmin","type":"boolean"}},"required":["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"}},"required":["id","creation","owner","participants","pendingParticipants"],"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"},"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"},"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 was sent by the host account","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"},"mediaData":{"title":"Message.mediaData"},"shareDuration":{"title":"Message.shareDuration","type":"number"},"isAnimated":{"title":"Message.isAnimated","type":"boolean"},"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"}},"required":["selectedButtonId","id","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"},"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"},"cliFlags":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"}]},"title":"cliFlags","type":"object"},"ClientMethods":{"title":"ClientMethods","description":"A convenience type that includes all keys from the `Client`."},"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"}}
|
package/dist/api/Client.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
import { Page } from 'puppeteer';
|
3
3
|
import { Chat, LiveLocationChangedEvent, ChatState, ChatMuteDuration, GroupChatCreationResponse, EphemeralDuration } from './model/chat';
|
4
4
|
import { Contact, NumberCheck } from './model/contact';
|
5
|
-
import { Message } from './model/message';
|
5
|
+
import { Message, MessageInfo } from './model/message';
|
6
6
|
import { AxiosRequestConfig } from 'axios';
|
7
7
|
import { ParticipantChangedEventModel } from './model/group-metadata';
|
8
8
|
import { ConfigObject, STATE, LicenseType, Webhook, EventPayload } from './model';
|
@@ -39,6 +39,7 @@ export declare class Client {
|
|
39
39
|
private _page;
|
40
40
|
private _currentlyBeingKilled;
|
41
41
|
private _refreshing;
|
42
|
+
private _loaded;
|
42
43
|
private _prio;
|
43
44
|
private _pageListeners;
|
44
45
|
private _registeredPageListeners;
|
@@ -244,19 +245,19 @@ export declare class Client {
|
|
244
245
|
*/
|
245
246
|
onLabel(fn: (label: Label) => void): Promise<Listener | boolean>;
|
246
247
|
/**
|
247
|
-
*
|
248
|
+
*{@license:insiders@}
|
248
249
|
*
|
249
250
|
* Listens to new orders. Only works on business accounts
|
250
251
|
*/
|
251
252
|
onOrder(fn: (order: Order) => void): Promise<Listener | boolean>;
|
252
253
|
/**
|
253
|
-
*
|
254
|
+
*{@license:insiders@}
|
254
255
|
*
|
255
256
|
* Listens to new orders. Only works on business accounts
|
256
257
|
*/
|
257
258
|
onNewProduct(fn: (product: Product) => void): Promise<Listener | boolean>;
|
258
259
|
/**
|
259
|
-
*
|
260
|
+
* {@license:insiders@}
|
260
261
|
*
|
261
262
|
* Listens to reaction add and change events
|
262
263
|
*
|
@@ -266,7 +267,7 @@ export declare class Client {
|
|
266
267
|
*/
|
267
268
|
onReaction(fn: (reactionEvent: ReactionEvent) => void): Promise<Listener | boolean>;
|
268
269
|
/**
|
269
|
-
*
|
270
|
+
* {@license:insiders@}
|
270
271
|
*
|
271
272
|
* Listens to chat state, including when a specific user is recording and typing within a group chat.
|
272
273
|
*
|
@@ -309,7 +310,7 @@ export declare class Client {
|
|
309
310
|
*/
|
310
311
|
onAddedToGroup(fn: (chat: Chat) => any): Promise<Listener | boolean>;
|
311
312
|
/**
|
312
|
-
*
|
313
|
+
* {@license:insiders@}
|
313
314
|
*
|
314
315
|
* Fires callback with Chat object every time the host phone is removed to a group.
|
315
316
|
*
|
@@ -319,7 +320,7 @@ export declare class Client {
|
|
319
320
|
*/
|
320
321
|
onRemovedFromGroup(fn: (chat: Chat) => any): Promise<Listener | boolean>;
|
321
322
|
/**
|
322
|
-
*
|
323
|
+
* {@license:insiders@}
|
323
324
|
*
|
324
325
|
* Fires callback with the relevant chat id every time the user clicks on a chat. This will only work in headful mode.
|
325
326
|
*
|
@@ -329,7 +330,7 @@ export declare class Client {
|
|
329
330
|
*/
|
330
331
|
onChatOpened(fn: (chat: Chat) => any): Promise<Listener | boolean>;
|
331
332
|
/**
|
332
|
-
*
|
333
|
+
* {@license:insiders@}
|
333
334
|
*
|
334
335
|
* Fires callback with contact id when a new contact is added on the host phone.
|
335
336
|
*
|
@@ -373,7 +374,7 @@ export declare class Client {
|
|
373
374
|
*/
|
374
375
|
setMyStatus(newStatus: string): Promise<boolean | void>;
|
375
376
|
/**
|
376
|
-
*
|
377
|
+
* {@license:insiders@}
|
377
378
|
*
|
378
379
|
* Adds label from chat, message or contact. Only for business accounts.
|
379
380
|
* @param label: The desired text of the new label. id will be something simple like anhy nnumber from 1-10, name is the label of the label if that makes sense.
|
@@ -486,6 +487,9 @@ export declare class Client {
|
|
486
487
|
testButtons(chatId: ChatId): Promise<any>;
|
487
488
|
private link;
|
488
489
|
/**
|
490
|
+
*
|
491
|
+
* {@license:restricted@}
|
492
|
+
*
|
489
493
|
* Sends a text message to given chat
|
490
494
|
* If you need to send a message to new numbers please see [these instructions:](https://docs.openwa.dev/pages/The%20Client/licensed-features.html#sending-messages-to-non-contact-numbers)
|
491
495
|
* @param to chat id: `xxxxx@c.us`
|
@@ -551,8 +555,6 @@ export declare class Client {
|
|
551
555
|
/**
|
552
556
|
* {@license:insiders@}
|
553
557
|
*
|
554
|
-
* [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
|
555
|
-
*
|
556
558
|
* Send a list message. This will not work when being sent from business accounts!
|
557
559
|
*
|
558
560
|
* @param {ChatId} to
|
@@ -575,7 +577,7 @@ export declare class Client {
|
|
575
577
|
*/
|
576
578
|
sendReplyWithMentions(to: ChatId, content: Content, replyMessageId: MessageId, hideTags?: boolean, mentions?: ContactId[]): Promise<boolean | MessageId>;
|
577
579
|
/**
|
578
|
-
*
|
580
|
+
* {@license:insiders@}
|
579
581
|
*
|
580
582
|
* Tags everyone in the group with a message
|
581
583
|
*
|
@@ -660,7 +662,7 @@ export declare class Client {
|
|
660
662
|
*/
|
661
663
|
reply(to: ChatId, content: Content, quotedMsgId: MessageId, sendSeen?: boolean): Promise<boolean | MessageId>;
|
662
664
|
/**
|
663
|
-
*
|
665
|
+
* {@license:insiders@}
|
664
666
|
*
|
665
667
|
* Check if a recipient has read receipts on.
|
666
668
|
*
|
@@ -692,7 +694,7 @@ export declare class Client {
|
|
692
694
|
*/
|
693
695
|
sendFile(to: ChatId, file: DataURL | FilePath, filename: string, caption: Content, quotedMsgId?: MessageId, waitForId?: boolean, ptt?: boolean, withoutPreview?: boolean, hideTags?: boolean, viewOnce?: boolean): Promise<MessageId | boolean>;
|
694
696
|
/**
|
695
|
-
*
|
697
|
+
* {@license:insiders@}
|
696
698
|
*
|
697
699
|
* Checks whether or not the group id provided is known to be unsafe by the contributors of the library.
|
698
700
|
* @param groupChatId The group chat you want to deteremine is unsafe
|
@@ -812,7 +814,7 @@ export declare class Client {
|
|
812
814
|
sendContact(to: ChatId, contactId: ContactId | ContactId[]): Promise<MessageId | boolean>;
|
813
815
|
/**
|
814
816
|
*
|
815
|
-
*
|
817
|
+
* {@license:insiders@}
|
816
818
|
*
|
817
819
|
* Sends multiple contacts as a single message
|
818
820
|
*
|
@@ -848,7 +850,7 @@ export declare class Client {
|
|
848
850
|
pinChat(id: ChatId, pin: boolean): Promise<boolean>;
|
849
851
|
/**
|
850
852
|
*
|
851
|
-
*
|
853
|
+
* {@license:insiders@}
|
852
854
|
*
|
853
855
|
* Mutes a conversation for a given duration. If already muted, this will update the muted duration. Mute durations are relative from when the method is called.
|
854
856
|
* @param chatId The id of the conversation you want to mute
|
@@ -864,7 +866,7 @@ export declare class Client {
|
|
864
866
|
isChatMuted(chatId: ChatId): Promise<boolean>;
|
865
867
|
/**
|
866
868
|
*
|
867
|
-
*
|
869
|
+
* {@license:insiders@}
|
868
870
|
*
|
869
871
|
* Unmutes a conversation.
|
870
872
|
* @param id The id of the conversation you want to mute
|
@@ -1000,9 +1002,9 @@ export declare class Client {
|
|
1000
1002
|
*/
|
1001
1003
|
contactBlock(id: ContactId): Promise<boolean>;
|
1002
1004
|
/**
|
1003
|
-
*
|
1005
|
+
* {@license:restricted@}
|
1004
1006
|
*
|
1005
|
-
*
|
1007
|
+
* Report a contact for spam, block them and attempt to clear chat.
|
1006
1008
|
*
|
1007
1009
|
* @param {string} id '000000000000@c.us'
|
1008
1010
|
*/
|
@@ -1058,7 +1060,14 @@ export declare class Client {
|
|
1058
1060
|
*/
|
1059
1061
|
getMessageById(messageId: MessageId): Promise<Message>;
|
1060
1062
|
/**
|
1061
|
-
*
|
1063
|
+
* {@license:insiders@}
|
1064
|
+
*
|
1065
|
+
* Get the detailed message info for a group message sent out by the host account.
|
1066
|
+
* @param messageId The message Id
|
1067
|
+
*/
|
1068
|
+
getMessageInfo(messageId: MessageId): Promise<MessageInfo>;
|
1069
|
+
/**
|
1070
|
+
* {@license:insiders@}
|
1062
1071
|
*
|
1063
1072
|
* Retrieves an order object
|
1064
1073
|
* @param messageId or OrderId
|
@@ -1066,7 +1075,7 @@ export declare class Client {
|
|
1066
1075
|
*/
|
1067
1076
|
getOrder(id: MessageId | string): Promise<Order>;
|
1068
1077
|
/**
|
1069
|
-
*
|
1078
|
+
* {@license:insiders@}
|
1070
1079
|
*
|
1071
1080
|
* Add a product to your catalog
|
1072
1081
|
*
|
@@ -1082,7 +1091,7 @@ export declare class Client {
|
|
1082
1091
|
*/
|
1083
1092
|
createNewProduct(name: string, price: number, currency: string, images: string[], description: string, url?: string, internalId?: string, isHidden?: boolean): Promise<Product>;
|
1084
1093
|
/**
|
1085
|
-
*
|
1094
|
+
* {@license:insiders@}
|
1086
1095
|
*
|
1087
1096
|
* Edit a product in your catalog
|
1088
1097
|
*
|
@@ -1099,7 +1108,7 @@ export declare class Client {
|
|
1099
1108
|
*/
|
1100
1109
|
editProduct(productId: string, name?: string, price?: number, currency?: string, images?: DataURL[], description?: string, url?: string, internalId?: string, isHidden?: boolean): Promise<Product>;
|
1101
1110
|
/**
|
1102
|
-
*
|
1111
|
+
* {@license:insiders@}
|
1103
1112
|
*
|
1104
1113
|
* Send a product to a chat
|
1105
1114
|
*
|
@@ -1119,9 +1128,9 @@ export declare class Client {
|
|
1119
1128
|
/**
|
1120
1129
|
* Retrieves the last message sent by the host account in any given chat or globally.
|
1121
1130
|
* @param chatId This is optional. If no chat Id is set then the last message sent by the host account will be returned.
|
1122
|
-
* @returns message object
|
1131
|
+
* @returns message object or `undefined` if the host account's last message could not be found.
|
1123
1132
|
*/
|
1124
|
-
getMyLastMessage(chatId?: ChatId): Promise<Message>;
|
1133
|
+
getMyLastMessage(chatId?: ChatId): Promise<Message | undefined>;
|
1125
1134
|
/**
|
1126
1135
|
* Retrieves the starred messages in a given chat
|
1127
1136
|
* @param chatId Chat ID to filter starred messages by
|
@@ -1160,7 +1169,7 @@ export declare class Client {
|
|
1160
1169
|
getStickerDecryptable(messageId: MessageId): Promise<Message | false>;
|
1161
1170
|
/**
|
1162
1171
|
*
|
1163
|
-
*
|
1172
|
+
* {@license:insiders@}
|
1164
1173
|
*
|
1165
1174
|
* If a file is old enough, it will 404 if you try to decrypt it. This will allow you to force the host account to re upload the file and return a decryptable message.
|
1166
1175
|
*
|
@@ -1177,7 +1186,7 @@ export declare class Client {
|
|
1177
1186
|
*/
|
1178
1187
|
getChat(contactId: ContactId): Promise<Chat>;
|
1179
1188
|
/**
|
1180
|
-
*
|
1189
|
+
* {@license:insiders@}
|
1181
1190
|
*
|
1182
1191
|
* Retrieves the groups that you have in common with a contact
|
1183
1192
|
* @param contactId
|
@@ -1245,7 +1254,7 @@ export declare class Client {
|
|
1245
1254
|
}>;
|
1246
1255
|
/**
|
1247
1256
|
*
|
1248
|
-
*
|
1257
|
+
* {@license:insiders@}
|
1249
1258
|
*
|
1250
1259
|
* Use a Baileys payload within your open-wa session
|
1251
1260
|
*
|
@@ -1474,7 +1483,7 @@ export declare class Client {
|
|
1474
1483
|
*/
|
1475
1484
|
setGroupDescription(groupId: GroupChatId, description: string): Promise<boolean>;
|
1476
1485
|
/**
|
1477
|
-
*
|
1486
|
+
* {@license:insiders@}
|
1478
1487
|
*
|
1479
1488
|
* Change the group chat title
|
1480
1489
|
* @param groupId '0000000000-00000000@g.us' the group id.
|
@@ -1488,7 +1497,7 @@ export declare class Client {
|
|
1488
1497
|
*/
|
1489
1498
|
getGroupAdmins(groupId: GroupChatId): Promise<ContactId[]>;
|
1490
1499
|
/**
|
1491
|
-
*
|
1500
|
+
* {@license:insiders@}
|
1492
1501
|
*
|
1493
1502
|
* Set the wallpaper background colour
|
1494
1503
|
* @param {string} hex '#FFF123'
|
@@ -1525,7 +1534,7 @@ export declare class Client {
|
|
1525
1534
|
*/
|
1526
1535
|
sendStickerfromUrl(to: ChatId, url: string, requestConfig?: AxiosRequestConfig, stickerMetadata?: StickerMetadata): Promise<string | MessageId | boolean>;
|
1527
1536
|
/**
|
1528
|
-
*
|
1537
|
+
* {@license:insiders@}
|
1529
1538
|
*
|
1530
1539
|
* Sends a sticker from a given URL
|
1531
1540
|
* @param to The recipient id.
|
@@ -1537,7 +1546,7 @@ export declare class Client {
|
|
1537
1546
|
*/
|
1538
1547
|
sendStickerfromUrlAsReply(to: ChatId, url: string, messageId: MessageId, requestConfig?: AxiosRequestConfig, stickerMetadata?: StickerMetadata): Promise<MessageId | boolean>;
|
1539
1548
|
/**
|
1540
|
-
*
|
1549
|
+
* {@license:insiders@}
|
1541
1550
|
*
|
1542
1551
|
* This function takes an image and sends it as a sticker to the recipient as a reply to another message.
|
1543
1552
|
*
|
@@ -1576,7 +1585,7 @@ export declare class Client {
|
|
1576
1585
|
*
|
1577
1586
|
* @param to ChatId The chat id you want to send the webp sticker to
|
1578
1587
|
* @param file [[DataURL]], [[Base64]], URL (string GET), Relative filepath (string), or Buffer of the mp4 file
|
1579
|
-
* @param messageId message id of the message you want this sticker to reply to.
|
1588
|
+
* @param messageId message id of the message you want this sticker to reply to. {@license:insiders@}
|
1580
1589
|
*/
|
1581
1590
|
sendMp4AsSticker(to: ChatId, file: DataURL | Buffer | Base64 | string, processOptions?: Mp4StickerConversionProcessOptions, stickerMetadata?: StickerMetadata, messageId?: MessageId): Promise<MessageId | string | boolean>;
|
1582
1591
|
/**
|
@@ -1584,7 +1593,7 @@ export declare class Client {
|
|
1584
1593
|
*
|
1585
1594
|
* @param to ChatId The chat id you want to send the webp sticker to
|
1586
1595
|
* @param emojiId The discord emoji id without indentifying chars. In discord you would write `:who:`, here use `who`
|
1587
|
-
* @param messageId message id of the message you want this sticker to reply to.
|
1596
|
+
* @param messageId message id of the message you want this sticker to reply to. {@license:insiders@}
|
1588
1597
|
*/
|
1589
1598
|
sendEmoji(to: ChatId, emojiId: string, messageId?: MessageId): Promise<MessageId | boolean | string>;
|
1590
1599
|
/**
|
@@ -1595,7 +1604,7 @@ export declare class Client {
|
|
1595
1604
|
*/
|
1596
1605
|
sendRawWebpAsSticker(to: ChatId, webpBase64: Base64, animated?: boolean): Promise<MessageId | string | boolean>;
|
1597
1606
|
/**
|
1598
|
-
*
|
1607
|
+
* {@license:insiders@}
|
1599
1608
|
*
|
1600
1609
|
* You can use this to send a raw webp file.
|
1601
1610
|
* @param to ChatId The chat id you want to send the webp sticker to
|
@@ -1605,7 +1614,7 @@ export declare class Client {
|
|
1605
1614
|
*/
|
1606
1615
|
sendRawWebpAsStickerAsReply(to: ChatId, messageId: MessageId, webpBase64: Base64, animated?: boolean): Promise<MessageId | string | boolean>;
|
1607
1616
|
/**
|
1608
|
-
*
|
1617
|
+
* {@license:insiders@}
|
1609
1618
|
*
|
1610
1619
|
* Turn the ephemeral setting in a chat to on or off
|
1611
1620
|
* @param chatId The ID of the chat
|
package/dist/api/Client.js
CHANGED
@@ -87,6 +87,7 @@ class Client {
|
|
87
87
|
constructor(page, createConfig, sessionInfo) {
|
88
88
|
this._currentlyBeingKilled = false;
|
89
89
|
this._refreshing = false;
|
90
|
+
this._loaded = false;
|
90
91
|
this._prio = Number.MAX_SAFE_INTEGER;
|
91
92
|
this._pageListeners = [];
|
92
93
|
this._registeredPageListeners = [];
|
@@ -288,6 +289,7 @@ class Client {
|
|
288
289
|
}), -1);
|
289
290
|
this._onLogoutSet = true;
|
290
291
|
}
|
292
|
+
this._loaded = true;
|
291
293
|
});
|
292
294
|
}
|
293
295
|
registerAllSimpleListenersOnEv() {
|
@@ -505,6 +507,9 @@ class Client {
|
|
505
507
|
});
|
506
508
|
}
|
507
509
|
responseWrap(res) {
|
510
|
+
if (this._loaded && typeof res === "string" && res.includes("requires") && res.includes("license")) {
|
511
|
+
console.info('\x1b[36m', "🔶", res, "🔶", '\x1b[0m');
|
512
|
+
}
|
508
513
|
if (this._createConfig.onError && typeof res == "string" && (res.startsWith("Error") || res.startsWith("ERROR"))) {
|
509
514
|
const e = this._createConfig.onError;
|
510
515
|
/**
|
@@ -859,7 +864,7 @@ class Client {
|
|
859
864
|
});
|
860
865
|
}
|
861
866
|
/**
|
862
|
-
*
|
867
|
+
*{@license:insiders@}
|
863
868
|
*
|
864
869
|
* Listens to new orders. Only works on business accounts
|
865
870
|
*/
|
@@ -869,7 +874,7 @@ class Client {
|
|
869
874
|
});
|
870
875
|
}
|
871
876
|
/**
|
872
|
-
*
|
877
|
+
*{@license:insiders@}
|
873
878
|
*
|
874
879
|
* Listens to new orders. Only works on business accounts
|
875
880
|
*/
|
@@ -879,7 +884,7 @@ class Client {
|
|
879
884
|
});
|
880
885
|
}
|
881
886
|
/**
|
882
|
-
*
|
887
|
+
* {@license:insiders@}
|
883
888
|
*
|
884
889
|
* Listens to reaction add and change events
|
885
890
|
*
|
@@ -893,7 +898,7 @@ class Client {
|
|
893
898
|
});
|
894
899
|
}
|
895
900
|
/**
|
896
|
-
*
|
901
|
+
* {@license:insiders@}
|
897
902
|
*
|
898
903
|
* Listens to chat state, including when a specific user is recording and typing within a group chat.
|
899
904
|
*
|
@@ -953,7 +958,7 @@ class Client {
|
|
953
958
|
});
|
954
959
|
}
|
955
960
|
/**
|
956
|
-
*
|
961
|
+
* {@license:insiders@}
|
957
962
|
*
|
958
963
|
* Fires callback with Chat object every time the host phone is removed to a group.
|
959
964
|
*
|
@@ -967,7 +972,7 @@ class Client {
|
|
967
972
|
});
|
968
973
|
}
|
969
974
|
/**
|
970
|
-
*
|
975
|
+
* {@license:insiders@}
|
971
976
|
*
|
972
977
|
* Fires callback with the relevant chat id every time the user clicks on a chat. This will only work in headful mode.
|
973
978
|
*
|
@@ -981,7 +986,7 @@ class Client {
|
|
981
986
|
});
|
982
987
|
}
|
983
988
|
/**
|
984
|
-
*
|
989
|
+
* {@license:insiders@}
|
985
990
|
*
|
986
991
|
* Fires callback with contact id when a new contact is added on the host phone.
|
987
992
|
*
|
@@ -1065,7 +1070,7 @@ class Client {
|
|
1065
1070
|
});
|
1066
1071
|
}
|
1067
1072
|
/**
|
1068
|
-
*
|
1073
|
+
* {@license:insiders@}
|
1069
1074
|
*
|
1070
1075
|
* Adds label from chat, message or contact. Only for business accounts.
|
1071
1076
|
* @param label: The desired text of the new label. id will be something simple like anhy nnumber from 1-10, name is the label of the label if that makes sense.
|
@@ -1285,6 +1290,9 @@ class Client {
|
|
1285
1290
|
});
|
1286
1291
|
}
|
1287
1292
|
/**
|
1293
|
+
*
|
1294
|
+
* {@license:restricted@}
|
1295
|
+
*
|
1288
1296
|
* Sends a text message to given chat
|
1289
1297
|
* If you need to send a message to new numbers please see [these instructions:](https://docs.openwa.dev/pages/The%20Client/licensed-features.html#sending-messages-to-non-contact-numbers)
|
1290
1298
|
* @param to chat id: `xxxxx@c.us`
|
@@ -1429,8 +1437,6 @@ class Client {
|
|
1429
1437
|
/**
|
1430
1438
|
* {@license:insiders@}
|
1431
1439
|
*
|
1432
|
-
* [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
|
1433
|
-
*
|
1434
1440
|
* Send a list message. This will not work when being sent from business accounts!
|
1435
1441
|
*
|
1436
1442
|
* @param {ChatId} to
|
@@ -1468,7 +1474,7 @@ class Client {
|
|
1468
1474
|
});
|
1469
1475
|
}
|
1470
1476
|
/**
|
1471
|
-
*
|
1477
|
+
* {@license:insiders@}
|
1472
1478
|
*
|
1473
1479
|
* Tags everyone in the group with a message
|
1474
1480
|
*
|
@@ -1657,7 +1663,7 @@ class Client {
|
|
1657
1663
|
});
|
1658
1664
|
}
|
1659
1665
|
/**
|
1660
|
-
*
|
1666
|
+
* {@license:insiders@}
|
1661
1667
|
*
|
1662
1668
|
* Check if a recipient has read receipts on.
|
1663
1669
|
*
|
@@ -1697,7 +1703,7 @@ class Client {
|
|
1697
1703
|
});
|
1698
1704
|
}
|
1699
1705
|
/**
|
1700
|
-
*
|
1706
|
+
* {@license:insiders@}
|
1701
1707
|
*
|
1702
1708
|
* Checks whether or not the group id provided is known to be unsafe by the contributors of the library.
|
1703
1709
|
* @param groupChatId The group chat you want to deteremine is unsafe
|
@@ -1934,7 +1940,7 @@ class Client {
|
|
1934
1940
|
}
|
1935
1941
|
/**
|
1936
1942
|
*
|
1937
|
-
*
|
1943
|
+
* {@license:insiders@}
|
1938
1944
|
*
|
1939
1945
|
* Sends multiple contacts as a single message
|
1940
1946
|
*
|
@@ -1990,7 +1996,7 @@ class Client {
|
|
1990
1996
|
}
|
1991
1997
|
/**
|
1992
1998
|
*
|
1993
|
-
*
|
1999
|
+
* {@license:insiders@}
|
1994
2000
|
*
|
1995
2001
|
* Mutes a conversation for a given duration. If already muted, this will update the muted duration. Mute durations are relative from when the method is called.
|
1996
2002
|
* @param chatId The id of the conversation you want to mute
|
@@ -2014,7 +2020,7 @@ class Client {
|
|
2014
2020
|
}
|
2015
2021
|
/**
|
2016
2022
|
*
|
2017
|
-
*
|
2023
|
+
* {@license:insiders@}
|
2018
2024
|
*
|
2019
2025
|
* Unmutes a conversation.
|
2020
2026
|
* @param id The id of the conversation you want to mute
|
@@ -2249,9 +2255,9 @@ class Client {
|
|
2249
2255
|
});
|
2250
2256
|
}
|
2251
2257
|
/**
|
2252
|
-
*
|
2258
|
+
* {@license:restricted@}
|
2253
2259
|
*
|
2254
|
-
*
|
2260
|
+
* Report a contact for spam, block them and attempt to clear chat.
|
2255
2261
|
*
|
2256
2262
|
* @param {string} id '000000000000@c.us'
|
2257
2263
|
*/
|
@@ -2349,7 +2355,18 @@ class Client {
|
|
2349
2355
|
});
|
2350
2356
|
}
|
2351
2357
|
/**
|
2352
|
-
*
|
2358
|
+
* {@license:insiders@}
|
2359
|
+
*
|
2360
|
+
* Get the detailed message info for a group message sent out by the host account.
|
2361
|
+
* @param messageId The message Id
|
2362
|
+
*/
|
2363
|
+
getMessageInfo(messageId) {
|
2364
|
+
return __awaiter(this, void 0, void 0, function* () {
|
2365
|
+
return yield this.pup(messageId => WAPI.getMessageInfo(messageId), messageId);
|
2366
|
+
});
|
2367
|
+
}
|
2368
|
+
/**
|
2369
|
+
* {@license:insiders@}
|
2353
2370
|
*
|
2354
2371
|
* Retrieves an order object
|
2355
2372
|
* @param messageId or OrderId
|
@@ -2361,7 +2378,7 @@ class Client {
|
|
2361
2378
|
});
|
2362
2379
|
}
|
2363
2380
|
/**
|
2364
|
-
*
|
2381
|
+
* {@license:insiders@}
|
2365
2382
|
*
|
2366
2383
|
* Add a product to your catalog
|
2367
2384
|
*
|
@@ -2384,7 +2401,7 @@ class Client {
|
|
2384
2401
|
});
|
2385
2402
|
}
|
2386
2403
|
/**
|
2387
|
-
*
|
2404
|
+
* {@license:insiders@}
|
2388
2405
|
*
|
2389
2406
|
* Edit a product in your catalog
|
2390
2407
|
*
|
@@ -2405,7 +2422,7 @@ class Client {
|
|
2405
2422
|
});
|
2406
2423
|
}
|
2407
2424
|
/**
|
2408
|
-
*
|
2425
|
+
* {@license:insiders@}
|
2409
2426
|
*
|
2410
2427
|
* Send a product to a chat
|
2411
2428
|
*
|
@@ -2433,7 +2450,7 @@ class Client {
|
|
2433
2450
|
/**
|
2434
2451
|
* Retrieves the last message sent by the host account in any given chat or globally.
|
2435
2452
|
* @param chatId This is optional. If no chat Id is set then the last message sent by the host account will be returned.
|
2436
|
-
* @returns message object
|
2453
|
+
* @returns message object or `undefined` if the host account's last message could not be found.
|
2437
2454
|
*/
|
2438
2455
|
getMyLastMessage(chatId) {
|
2439
2456
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -2501,7 +2518,7 @@ class Client {
|
|
2501
2518
|
}
|
2502
2519
|
/**
|
2503
2520
|
*
|
2504
|
-
*
|
2521
|
+
* {@license:insiders@}
|
2505
2522
|
*
|
2506
2523
|
* If a file is old enough, it will 404 if you try to decrypt it. This will allow you to force the host account to re upload the file and return a decryptable message.
|
2507
2524
|
*
|
@@ -2529,7 +2546,7 @@ class Client {
|
|
2529
2546
|
});
|
2530
2547
|
}
|
2531
2548
|
/**
|
2532
|
-
*
|
2549
|
+
* {@license:insiders@}
|
2533
2550
|
*
|
2534
2551
|
* Retrieves the groups that you have in common with a contact
|
2535
2552
|
* @param contactId
|
@@ -2627,7 +2644,7 @@ class Client {
|
|
2627
2644
|
}
|
2628
2645
|
/**
|
2629
2646
|
*
|
2630
|
-
*
|
2647
|
+
* {@license:insiders@}
|
2631
2648
|
*
|
2632
2649
|
* Use a Baileys payload within your open-wa session
|
2633
2650
|
*
|
@@ -2981,7 +2998,7 @@ class Client {
|
|
2981
2998
|
});
|
2982
2999
|
}
|
2983
3000
|
/**
|
2984
|
-
*
|
3001
|
+
* {@license:insiders@}
|
2985
3002
|
*
|
2986
3003
|
* Change the group chat title
|
2987
3004
|
* @param groupId '0000000000-00000000@g.us' the group id.
|
@@ -3003,7 +3020,7 @@ class Client {
|
|
3003
3020
|
});
|
3004
3021
|
}
|
3005
3022
|
/**
|
3006
|
-
*
|
3023
|
+
* {@license:insiders@}
|
3007
3024
|
*
|
3008
3025
|
* Set the wallpaper background colour
|
3009
3026
|
* @param {string} hex '#FFF123'
|
@@ -3061,7 +3078,7 @@ class Client {
|
|
3061
3078
|
});
|
3062
3079
|
}
|
3063
3080
|
/**
|
3064
|
-
*
|
3081
|
+
* {@license:insiders@}
|
3065
3082
|
*
|
3066
3083
|
* Sends a sticker from a given URL
|
3067
3084
|
* @param to The recipient id.
|
@@ -3082,7 +3099,7 @@ class Client {
|
|
3082
3099
|
});
|
3083
3100
|
}
|
3084
3101
|
/**
|
3085
|
-
*
|
3102
|
+
* {@license:insiders@}
|
3086
3103
|
*
|
3087
3104
|
* This function takes an image and sends it as a sticker to the recipient as a reply to another message.
|
3088
3105
|
*
|
@@ -3247,7 +3264,7 @@ class Client {
|
|
3247
3264
|
*
|
3248
3265
|
* @param to ChatId The chat id you want to send the webp sticker to
|
3249
3266
|
* @param file [[DataURL]], [[Base64]], URL (string GET), Relative filepath (string), or Buffer of the mp4 file
|
3250
|
-
* @param messageId message id of the message you want this sticker to reply to.
|
3267
|
+
* @param messageId message id of the message you want this sticker to reply to. {@license:insiders@}
|
3251
3268
|
*/
|
3252
3269
|
sendMp4AsSticker(to, file, processOptions = media_1.defaultProcessOptions, stickerMetadata, messageId) {
|
3253
3270
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -3297,7 +3314,7 @@ class Client {
|
|
3297
3314
|
*
|
3298
3315
|
* @param to ChatId The chat id you want to send the webp sticker to
|
3299
3316
|
* @param emojiId The discord emoji id without indentifying chars. In discord you would write `:who:`, here use `who`
|
3300
|
-
* @param messageId message id of the message you want this sticker to reply to.
|
3317
|
+
* @param messageId message id of the message you want this sticker to reply to. {@license:insiders@}
|
3301
3318
|
*/
|
3302
3319
|
sendEmoji(to, emojiId, messageId) {
|
3303
3320
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -3331,7 +3348,7 @@ class Client {
|
|
3331
3348
|
});
|
3332
3349
|
}
|
3333
3350
|
/**
|
3334
|
-
*
|
3351
|
+
* {@license:insiders@}
|
3335
3352
|
*
|
3336
3353
|
* You can use this to send a raw webp file.
|
3337
3354
|
* @param to ChatId The chat id you want to send the webp sticker to
|
@@ -3352,7 +3369,7 @@ class Client {
|
|
3352
3369
|
});
|
3353
3370
|
}
|
3354
3371
|
/**
|
3355
|
-
*
|
3372
|
+
* {@license:insiders@}
|
3356
3373
|
*
|
3357
3374
|
* Turn the ephemeral setting in a chat to on or off
|
3358
3375
|
* @param chatId The ID of the chat
|
@@ -141,6 +141,10 @@ export interface Message {
|
|
141
141
|
* Is the message a "view once" message
|
142
142
|
*/
|
143
143
|
isViewOnce: boolean;
|
144
|
+
/**
|
145
|
+
* Use this to traverse the quote chain.
|
146
|
+
*/
|
147
|
+
quoteMap: QuoteMap;
|
144
148
|
/**
|
145
149
|
* The URL of the file after being uploaded to the cloud using a cloud upload message preprocessor.
|
146
150
|
*/
|
@@ -163,6 +167,40 @@ export interface Message {
|
|
163
167
|
"buttonText": string;
|
164
168
|
};
|
165
169
|
}
|
170
|
+
export interface QuoteMap {
|
171
|
+
[messageId: string]: {
|
172
|
+
/**
|
173
|
+
* The body of the message
|
174
|
+
*/
|
175
|
+
body: string;
|
176
|
+
/**
|
177
|
+
* The message ID of the message that was quoted. Null if no message was quoted.
|
178
|
+
*/
|
179
|
+
quotes?: MessageId;
|
180
|
+
};
|
181
|
+
}
|
182
|
+
export interface MessageInfoInteraction {
|
183
|
+
/**
|
184
|
+
* The contact ID of the contact that interacted with the message.
|
185
|
+
*/
|
186
|
+
id: ContactId;
|
187
|
+
/**
|
188
|
+
* The timestamp of the interaction. You have to x 1000 to use in a JS Date object.
|
189
|
+
*/
|
190
|
+
t: number;
|
191
|
+
}
|
192
|
+
export interface MessageInfo {
|
193
|
+
deliveryRemaining: number;
|
194
|
+
playedRemaining: number;
|
195
|
+
readRemaining: number;
|
196
|
+
delivery: MessageInfoInteraction[];
|
197
|
+
read: MessageInfoInteraction[];
|
198
|
+
played: MessageInfoInteraction[];
|
199
|
+
/**
|
200
|
+
* The ID of the message
|
201
|
+
*/
|
202
|
+
id: MessageId;
|
203
|
+
}
|
166
204
|
/**
|
167
205
|
* Message types
|
168
206
|
* @readonly
|
package/package.json
CHANGED