@open-wa/wa-automate 4.30.13 → 4.31.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/config-schema.json +1 -1
- package/dist/api/Client.d.ts +39 -41
- package/dist/api/Client.js +43 -42
- package/dist/api/model/aliases.d.ts +10 -6
- package/dist/api/model/aliases.js +1 -0
- package/dist/api/model/config.d.ts +4 -1
- package/dist/api/model/index.d.ts +1 -0
- package/dist/api/model/index.js +1 -0
- package/dist/api/model/product.d.ts +1 -1
- package/dist/cli/cli-options.js +7 -0
- package/dist/cli/setup.js +5 -1
- package/dist/controllers/auth.d.ts +5 -1
- package/dist/controllers/auth.js +24 -9
- package/dist/controllers/browser.js +79 -12
- package/dist/controllers/patch_manager.js +3 -1
- package/dist/controllers/script_preloader.d.ts +17 -0
- package/dist/controllers/script_preloader.js +83 -0
- package/dist/lib/launch.js +1 -1
- package/dist/lib/wapi.js +3 -3
- package/package.json +3 -3
package/bin/config-schema.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
[{"env":"WA_SESSION_DATA","p":"session-data","description":"The base64 encoded sessionData used to restore a session.","type":"string","key":"sessionData"},{"env":"WA_BROWSER_WS_ENDPOINT","p":"browser-ws-endpoint","type":"string","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","key":"browserWSEndpoint"},{"env":"WA_SESSION_DATA_PATH","p":"session-data-path","type":"string","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 ''","key":"sessionDataPath"},{"env":"WA_SKIP_UPDATE_CHECK","p":"skip-update-check","type":"boolean","description":"If set to true, `skipUpdateCheck` will bypass the latest version check. This saves some time on boot (around 150 ms).","default":"`false`","key":"skipUpdateCheck"},{"env":"WA_SESSION_ID","p":"session-id","type":"string","description":"This is the name of the session. You have to make sure that this is unique for every session.","default":"`session`","key":"sessionId"},{"env":"WA_LICENSE_KEY","p":"license-key","description":"The license key to use with the session.","type":"string","key":"licenseKey"},{"env":"WA_CUSTOM_USER_AGENT","p":"custom-user-agent","type":"string","description":"You may set a custom user agent. However, due to recent developments, this is not really neccessary any more.","key":"customUserAgent"},{"env":"WA_BLOCK_CRASH_LOGS","p":"block-crash-logs","type":"boolean","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`","key":"blockCrashLogs"},{"env":"WA_CACHE_ENABLED","p":"cache-enabled","type":"boolean","description":"Setting this to false turn off the cache. This may improve memory usage.","default":"`false`","key":"cacheEnabled"},{"env":"WA_BROWSER_REVISION","p":"browser-revision","type":"string","description":"This is the specific browser revision to be downlaoded and used. You can find browser revision strings here: http://omahaproxy.appspot.com/ Learn more about it here: https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#class-browserfetcher If you're having trouble with sending images, try '737027'. If you go too far back things will start breaking !!!!!! NOTE: THIS WILL OVERRIDE useChrome and executablePath. ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING.","key":"browserRevision"},{"env":"WA_HEADLESS","p":"headless","type":"boolean","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`","key":"headless"},{"env":"WA_QR_TIMEOUT","p":"qr-timeout","type":"number","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,"key":"qrTimeout"},{"env":"WA_USE_CHROME","p":"use-chrome","type":"boolean","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`","key":"useChrome"},{"env":"WA_QR_LOG_SKIP","p":"qr-log-skip","type":"boolean","description":"If true, skips logging the QR Code to the console.","default":"`false`","key":"qrLogSkip"},{"env":"WA_DISABLE_SPINS","p":"disable-spins","type":"boolean","description":"Setting this to true will simplify logs for use within docker containers by disabling spins (will still print raw messages).","default":"`false`","key":"disableSpins"},{"env":"WA_LOG_CONSOLE","p":"log-console","type":"boolean","description":"If true, this will log any console messages from the browser.","default":"`false`","key":"logConsole"},{"env":"WA_LOG_CONSOLE_ERRORS","p":"log-console-errors","type":"boolean","description":"If true, this will log any error messages from the browser instance","default":"`false`","key":"logConsoleErrors"},{"env":"WA_AUTH_TIMEOUT","p":"auth-timeout","type":"number","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`","key":"authTimeout"},{"env":"WA_SAFE_MODE","p":"safe-mode","type":"boolean","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`","key":"safeMode"},{"env":"WA_SKIP_SESSION_SAVE","p":"skip-session-save","type":"boolean","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`","key":"skipSessionSave"},{"env":"WA_POPUP","p":"popup","type":["boolean","number"],"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`","key":"popup"},{"env":"WA_QR_POP_UP_ONLY","p":"qr-pop-up-only","type":"boolean","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.","key":"qrPopUpOnly"},{"env":"WA_BLOCK_ASSETS","p":"block-assets","type":"boolean","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`","key":"blockAssets"},{"env":"WA_KEEP_UPDATED","p":"keep-updated","type":"boolean","description":"[ALPHA FEATURE - ONLY IMPLEMENTED FOR TESTING - DO NOT USE IN PRODUCTION YET] Setting 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`","key":"keepUpdated"},{"env":"WA_RESIZABLE","p":"resizable","type":"boolean","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`","key":"resizable"},{"env":"WA_VIEWPORT","p":"viewport","type":"object","properties":{"width":{"type":"number","description":"Page width in pixels","default":"`1440`"},"height":{"type":"number","description":"Page height in pixels","default":"`900`"}},"additionalProperties":false,"description":"Set the desired viewport height and width. For CLI, use [width]x[height] format. E.g `--viewport 1920x1080`.","key":"viewport"},{"env":"WA_LEGACY","p":"legacy","type":"boolean","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`","key":"legacy"},{"env":"WA_DELETE_SESSION_DATA_ON_LOGOUT","p":"delete-session-data-on-logout","type":"boolean","description":"Deletes the session data file (if found) on logout event. This results in a quicker login when you restart the process.","default":"`false`","key":"deleteSessionDataOnLogout"},{"env":"WA_KILL_PROCESS_ON_TIMEOUT","p":"kill-process-on-timeout","type":"boolean","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`","key":"killProcessOnTimeout"},{"env":"WA_CORS_FIX","p":"cors-fix","type":"boolean","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`","key":"corsFix"},{"env":"WA_CALL_TIMEOUT","p":"call-timeout","type":"number","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,"key":"callTimeout"},{"env":"WA_SCREENSHOT_ON_INITIALIZATION_BROWSER_ERROR","p":"screenshot-on-initialization-browser-error","type":"boolean","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`","key":"screenshotOnInitializationBrowserError"},{"env":"WA_EVENT_MODE","p":"event-mode","type":"boolean","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`;","key":"eventMode"},{"env":"WA_LOG_FILE","p":"log-file","type":"boolean","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,"key":"logFile"},{"env":"WA_ID_CORRECTION","p":"id-correction","type":"boolean","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,"key":"idCorrection"},{"env":"WA_STICKER_SERVER_ENDPOINT","p":"sticker-server-endpoint","type":["string","boolean"],"description":"Redundant until self-hostable sticker server is available.","default":"`https://sticker-api.openwa.dev`","key":"stickerServerEndpoint"},{"env":"WA_GH_PATCH","p":"gh-patch","type":"boolean","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`","key":"ghPatch"},{"env":"WA_CACHED_PATCH","p":"cached-patch","type":"boolean","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`","key":"cachedPatch"},{"env":"WA_LOG_DEBUG_INFO_AS_OBJECT","p":"log-debug-info-as-object","type":"boolean","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`","key":"logDebugInfoAsObject"},{"env":"WA_KILL_CLIENT_ON_LOGOUT","p":"kill-client-on-logout","type":"boolean","description":"Kill the client when a logout is detected","default":"`false`","key":"killClientOnLogout"},{"env":"WA_THROW_ON_EXPIRED_SESSION_DATA","p":"throw-on-expired-session-data","type":"boolean","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`","key":"throwOnExpiredSessionData"},{"env":"WA_USE_NATIVE_PROXY","p":"use-native-proxy","type":"boolean","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`","key":"useNativeProxy"},{"env":"WA_RASPI","p":"raspi","type":"boolean","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``` > sudo apt update -y && sudo apt install chromium-browser chromium-codecs-ffmpeg -y && sudo apt upgrade ```\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``` > npx @open-wa/wa-automate ... --raspi ```","default":"`false`","key":"raspi"},{"env":"WA_MULTI_DEVICE","p":"multi-device","type":"boolean","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":"`false`","key":"multiDevice"},{"env":"WA_SESSION_DATA_BUCKET_AUTH","p":"session-data-bucket-auth","type":"string","description":"Base64 encoded S3 Bucket & Authentication object for session data files. The object should be in the same format as cloudUploadOptions.","key":"sessionDataBucketAuth"},{"env":"WA_AUTO_EMOJI","p":"auto-emoji","type":"string","description":"Set the automatic emoji detection character. Set this to false to disable auto emoji. Default is `:`.","default":"`:`","key":"autoEmoji"},{"env":"WA_MAX_CHATS","p":"max-chats","type":"number","description":"Set the maximum amount of chats to be present in a session.","key":"maxChats"},{"env":"WA_MAX_MESSAGES","p":"max-messages","type":"number","description":"Set the maximum amount of messages to be present in a session.","key":"maxMessages"},{"env":"WA_DISCORD","p":"discord","type":"string","description":"Your Discord ID to get onto the sticker leaderboard!","key":"discord"},{"env":"WA_IGNORE_NUKE","p":"ignore-nuke","type":"boolean","description":"Don't implicitly determine if the host logged out.","key":"ignoreNuke"},{"env":"WA_ENSURE_HEADFUL_INTEGRITY","p":"ensure-headful-integrity","type":"boolean","description":"Makes sure the headless session is usable even on first login. Headful sessions are ususally only usable on reauthentication.","key":"ensureHeadfulIntegrity"},{"env":"WA_WAIT_FOR_RIPE_SESSION","p":"wait-for-ripe-session","type":"boolean","description":"wait for a valid headful session. Not required in recent versions.","key":"waitForRipeSession"},{"env":"WA_QR_MAX","p":"qr-max","type":"number","description":"Automatically kill the process after a set amount of qr codes","key":"qrMax"},{"env":"WA_EZQR","p":"ezqr","type":"boolean","description":"Expose a URL where you can easily scan the qr code","key":"ezqr"},{"env":"WA_LOGGING","p":"logging","type":"array","items":{"$ref":"#/definitions/ConfigLogTransport"},"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)","key":"logging"}]
|
1
|
+
[{"env":"WA_SESSION_DATA","p":"session-data","description":"The base64 encoded sessionData used to restore a session.","type":"string","key":"sessionData"},{"env":"WA_BROWSER_WS_ENDPOINT","p":"browser-ws-endpoint","type":"string","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","key":"browserWSEndpoint"},{"env":"WA_SESSION_DATA_PATH","p":"session-data-path","type":"string","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 ''","key":"sessionDataPath"},{"env":"WA_SKIP_UPDATE_CHECK","p":"skip-update-check","type":"boolean","description":"If set to true, `skipUpdateCheck` will bypass the latest version check. This saves some time on boot (around 150 ms).","default":"`false`","key":"skipUpdateCheck"},{"env":"WA_SESSION_ID","p":"session-id","type":"string","description":"This is the name of the session. You have to make sure that this is unique for every session.","default":"`session`","key":"sessionId"},{"env":"WA_LICENSE_KEY","p":"license-key","description":"The license key to use with the session.","type":"string","key":"licenseKey"},{"env":"WA_CUSTOM_USER_AGENT","p":"custom-user-agent","type":"string","description":"You may set a custom user agent. However, due to recent developments, this is not really neccessary any more.","key":"customUserAgent"},{"env":"WA_BLOCK_CRASH_LOGS","p":"block-crash-logs","type":"boolean","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`","key":"blockCrashLogs"},{"env":"WA_CACHE_ENABLED","p":"cache-enabled","type":"boolean","description":"Setting this to false turn off the cache. This may improve memory usage.","default":"`false`","key":"cacheEnabled"},{"env":"WA_BROWSER_REVISION","p":"browser-revision","type":"string","description":"This is the specific browser revision to be downlaoded and used. You can find browser revision strings here: http://omahaproxy.appspot.com/ Learn more about it here: https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#class-browserfetcher If you're having trouble with sending images, try '737027'. If you go too far back things will start breaking !!!!!! NOTE: THIS WILL OVERRIDE useChrome and executablePath. ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING.","key":"browserRevision"},{"env":"WA_HEADLESS","p":"headless","type":"boolean","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`","key":"headless"},{"env":"WA_QR_TIMEOUT","p":"qr-timeout","type":"number","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,"key":"qrTimeout"},{"env":"WA_USE_CHROME","p":"use-chrome","type":"boolean","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`","key":"useChrome"},{"env":"WA_QR_LOG_SKIP","p":"qr-log-skip","type":"boolean","description":"If true, skips logging the QR Code to the console.","default":"`false`","key":"qrLogSkip"},{"env":"WA_DISABLE_SPINS","p":"disable-spins","type":"boolean","description":"Setting this to true will simplify logs for use within docker containers by disabling spins (will still print raw messages).","default":"`false`","key":"disableSpins"},{"env":"WA_LOG_CONSOLE","p":"log-console","type":"boolean","description":"If true, this will log any console messages from the browser.","default":"`false`","key":"logConsole"},{"env":"WA_LOG_CONSOLE_ERRORS","p":"log-console-errors","type":"boolean","description":"If true, this will log any error messages from the browser instance","default":"`false`","key":"logConsoleErrors"},{"env":"WA_AUTH_TIMEOUT","p":"auth-timeout","type":"number","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`","key":"authTimeout"},{"env":"WA_SAFE_MODE","p":"safe-mode","type":"boolean","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`","key":"safeMode"},{"env":"WA_SKIP_SESSION_SAVE","p":"skip-session-save","type":"boolean","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`","key":"skipSessionSave"},{"env":"WA_POPUP","p":"popup","type":["boolean","number"],"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`","key":"popup"},{"env":"WA_QR_POP_UP_ONLY","p":"qr-pop-up-only","type":"boolean","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.","key":"qrPopUpOnly"},{"env":"WA_BLOCK_ASSETS","p":"block-assets","type":"boolean","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`","key":"blockAssets"},{"env":"WA_KEEP_UPDATED","p":"keep-updated","type":"boolean","description":"[ALPHA FEATURE - ONLY IMPLEMENTED FOR TESTING - DO NOT USE IN PRODUCTION YET] Setting 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`","key":"keepUpdated"},{"env":"WA_RESIZABLE","p":"resizable","type":"boolean","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`","key":"resizable"},{"env":"WA_VIEWPORT","p":"viewport","type":"object","properties":{"width":{"type":"number","description":"Page width in pixels","default":"`1440`"},"height":{"type":"number","description":"Page height in pixels","default":"`900`"}},"additionalProperties":false,"description":"Set the desired viewport height and width. For CLI, use [width]x[height] format. E.g `--viewport 1920x1080`.","key":"viewport"},{"env":"WA_LEGACY","p":"legacy","type":"boolean","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`","key":"legacy"},{"env":"WA_DELETE_SESSION_DATA_ON_LOGOUT","p":"delete-session-data-on-logout","type":"boolean","description":"Deletes the session data file (if found) on logout event. This results in a quicker login when you restart the process.","default":"`false`","key":"deleteSessionDataOnLogout"},{"env":"WA_KILL_PROCESS_ON_TIMEOUT","p":"kill-process-on-timeout","type":"boolean","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`","key":"killProcessOnTimeout"},{"env":"WA_CORS_FIX","p":"cors-fix","type":"boolean","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`","key":"corsFix"},{"env":"WA_CALL_TIMEOUT","p":"call-timeout","type":"number","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,"key":"callTimeout"},{"env":"WA_SCREENSHOT_ON_INITIALIZATION_BROWSER_ERROR","p":"screenshot-on-initialization-browser-error","type":"boolean","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`","key":"screenshotOnInitializationBrowserError"},{"env":"WA_EVENT_MODE","p":"event-mode","type":"boolean","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`;","key":"eventMode"},{"env":"WA_LOG_FILE","p":"log-file","type":"boolean","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,"key":"logFile"},{"env":"WA_ID_CORRECTION","p":"id-correction","type":"boolean","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,"key":"idCorrection"},{"env":"WA_STICKER_SERVER_ENDPOINT","p":"sticker-server-endpoint","type":["string","boolean"],"description":"Redundant until self-hostable sticker server is available.","default":"`https://sticker-api.openwa.dev`","key":"stickerServerEndpoint"},{"env":"WA_GH_PATCH","p":"gh-patch","type":"boolean","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`","key":"ghPatch"},{"env":"WA_CACHED_PATCH","p":"cached-patch","type":"boolean","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`","key":"cachedPatch"},{"env":"WA_LOG_DEBUG_INFO_AS_OBJECT","p":"log-debug-info-as-object","type":"boolean","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`","key":"logDebugInfoAsObject"},{"env":"WA_KILL_CLIENT_ON_LOGOUT","p":"kill-client-on-logout","type":"boolean","description":"Kill the client when a logout is detected","default":"`false`","key":"killClientOnLogout"},{"env":"WA_THROW_ON_EXPIRED_SESSION_DATA","p":"throw-on-expired-session-data","type":"boolean","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`","key":"throwOnExpiredSessionData"},{"env":"WA_USE_NATIVE_PROXY","p":"use-native-proxy","type":"boolean","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`","key":"useNativeProxy"},{"env":"WA_RASPI","p":"raspi","type":"boolean","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``` > sudo apt update -y && sudo apt install chromium-browser chromium-codecs-ffmpeg -y && sudo apt upgrade ```\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``` > npx @open-wa/wa-automate ... --raspi ```","default":"`false`","key":"raspi"},{"env":"WA_MULTI_DEVICE","p":"multi-device","type":"boolean","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":"`false`\n:::danger\nSome features (e.g [[sendLinkWithAutoPreview]]) **do not** work with multi-device beta. Check [this `api`](#).\n:::","key":"multiDevice"},{"env":"WA_SESSION_DATA_BUCKET_AUTH","p":"session-data-bucket-auth","type":"string","description":"Base64 encoded S3 Bucket & Authentication object for session data files. The object should be in the same format as cloudUploadOptions.","key":"sessionDataBucketAuth"},{"env":"WA_AUTO_EMOJI","p":"auto-emoji","type":"string","description":"Set the automatic emoji detection character. Set this to false to disable auto emoji. Default is `:`.","default":"`:`","key":"autoEmoji"},{"env":"WA_MAX_CHATS","p":"max-chats","type":"number","description":"Set the maximum amount of chats to be present in a session.","key":"maxChats"},{"env":"WA_MAX_MESSAGES","p":"max-messages","type":"number","description":"Set the maximum amount of messages to be present in a session.","key":"maxMessages"},{"env":"WA_DISCORD","p":"discord","type":"string","description":"Your Discord ID to get onto the sticker leaderboard!","key":"discord"},{"env":"WA_IGNORE_NUKE","p":"ignore-nuke","type":"boolean","description":"Don't implicitly determine if the host logged out.","key":"ignoreNuke"},{"env":"WA_ENSURE_HEADFUL_INTEGRITY","p":"ensure-headful-integrity","type":"boolean","description":"Makes sure the headless session is usable even on first login. Headful sessions are ususally only usable on reauthentication.","key":"ensureHeadfulIntegrity"},{"env":"WA_WAIT_FOR_RIPE_SESSION","p":"wait-for-ripe-session","type":"boolean","description":"wait for a valid headful session. Not required in recent versions.","key":"waitForRipeSession"},{"env":"WA_QR_MAX","p":"qr-max","type":"number","description":"Automatically kill the process after a set amount of qr codes","key":"qrMax"},{"env":"WA_EZQR","p":"ezqr","type":"boolean","description":"Expose a URL where you can easily scan the qr code","key":"ezqr"},{"env":"WA_LOGGING","p":"logging","type":"array","items":{"$ref":"#/definitions/ConfigLogTransport"},"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)","key":"logging"}]
|
package/dist/api/Client.d.ts
CHANGED
@@ -74,7 +74,7 @@ export declare class Client {
|
|
74
74
|
* A convinience method to download the [[DataURL]] of a file
|
75
75
|
* @param url The url
|
76
76
|
* @param optionsOverride You can use this to override the [axios request config](https://github.com/axios/axios#request-config)
|
77
|
-
* @returns Promise<DataURL
|
77
|
+
* @returns `Promise<DataURL>`
|
78
78
|
*/
|
79
79
|
download(url: string, optionsOverride?: any): Promise<DataURL>;
|
80
80
|
/**
|
@@ -239,7 +239,8 @@ export declare class Client {
|
|
239
239
|
*
|
240
240
|
* Here is an example of the fired object:
|
241
241
|
*
|
242
|
-
* @fires
|
242
|
+
* @fires
|
243
|
+
* ```javascript
|
243
244
|
* {
|
244
245
|
* "chat": "00000000000-1111111111@g.us", //the chat in which this state is occuring
|
245
246
|
* "user": "22222222222@c.us", //the user that is causing this state
|
@@ -315,9 +316,17 @@ export declare class Client {
|
|
315
316
|
* @param chatId the chat from which you want to subscribes to live location updates
|
316
317
|
* @param fn callback that takes in a LiveLocationChangedEvent
|
317
318
|
* @returns boolean, if returns false then there were no valid live locations in the chat of chatId
|
318
|
-
* @emits
|
319
|
+
* @emits `<LiveLocationChangedEvent>` LiveLocationChangedEvent
|
319
320
|
*/
|
320
321
|
onLiveLocation(chatId: ChatId, fn: (liveLocationChangedEvent: LiveLocationChangedEvent) => void): Promise<boolean>;
|
322
|
+
/**
|
323
|
+
* Use this simple command to test firing callback events.
|
324
|
+
*
|
325
|
+
* @param callbackToTest
|
326
|
+
* @param testData
|
327
|
+
* @returns `false` if the callback was not registered/does not exist
|
328
|
+
*/
|
329
|
+
testCallback(callbackToTest: SimpleListener, testData: any): Promise<boolean>;
|
321
330
|
/**
|
322
331
|
* Set presence to available or unavailable.
|
323
332
|
* @param available if true it will set your presence to 'online', false will set to unavailable (i.e no 'online' on recipients' phone);
|
@@ -428,7 +437,7 @@ export declare class Client {
|
|
428
437
|
* A list of participants in the chat who have their live location on. If the chat does not exist, or the chat does not have any contacts actively sharing their live locations, it will return false. If it's a chat with a single contact, there will be only 1 value in the array if the contact has their livelocation on.
|
429
438
|
* Please note. This should only be called once every 30 or so seconds. This forces the phone to grab the latest live location data for the number. This can be used in conjunction with onLiveLocation (this will trigger onLiveLocation).
|
430
439
|
* @param chatId string Id of the chat you want to force the phone to get the livelocation data for.
|
431
|
-
* @returns Promise<LiveLocationChangedEvent []
|
440
|
+
* @returns `Promise<LiveLocationChangedEvent []>` | boolean
|
432
441
|
*/
|
433
442
|
forceUpdateLiveLocation(chatId: ChatId): Promise<LiveLocationChangedEvent[] | boolean>;
|
434
443
|
private link;
|
@@ -482,6 +491,8 @@ export declare class Client {
|
|
482
491
|
*/
|
483
492
|
sendBanner(to: ChatId, base64: Base64): Promise<boolean | MessageId>;
|
484
493
|
/**
|
494
|
+
* {@license:insiders@}
|
495
|
+
* <span theme="badge contrast license">Insiders</span>
|
485
496
|
* [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
|
486
497
|
*
|
487
498
|
* Send a list message. This will not work when being sent from business accounts!
|
@@ -511,7 +522,7 @@ export declare class Client {
|
|
511
522
|
* @param groupId group chat id: `xxxxx@g.us`
|
512
523
|
* @param content text message to add under all of the tags
|
513
524
|
* @param hideTags Removes all tags within the message
|
514
|
-
* @returns Promise<MessageId
|
525
|
+
* @returns `Promise<MessageId>`
|
515
526
|
*/
|
516
527
|
tagEveryone(groupId: GroupChatId, content: Content, hideTags?: boolean): Promise<boolean | MessageId>;
|
517
528
|
/**
|
@@ -542,7 +553,7 @@ export declare class Client {
|
|
542
553
|
/**
|
543
554
|
* Decrypts a media message.
|
544
555
|
* @param message This can be the serialized [[MessageId]] or the whole [[Message]] object. It is advised to just use the serialized message ID.
|
545
|
-
* @returns Promise<[[DataURL]]
|
556
|
+
* @returns `Promise<[[DataURL]]>`
|
546
557
|
*/
|
547
558
|
decryptMedia(message: Message | MessageId): Promise<DataURL>;
|
548
559
|
/**
|
@@ -553,7 +564,7 @@ export declare class Client {
|
|
553
564
|
* @param caption string xxxxx
|
554
565
|
* @param waitForKey boolean default: false set this to true if you want to wait for the id of the message. By default this is set to false as it will take a few seconds to retrieve to the key of the message and this waiting may not be desirable for the majority of users.
|
555
566
|
* @param hideTags boolean default: false [INSIDERS] set this to try silent tag someone in the caption
|
556
|
-
* @returns Promise <boolean | string
|
567
|
+
* @returns `Promise <boolean | string>` This will either return true or the id of the message. It will return true after 10 seconds even if waitForId is true
|
557
568
|
*/
|
558
569
|
sendImage(to: ChatId, file: DataURL | FilePath, filename: string, caption: Content, quotedMsgId?: MessageId, waitForId?: boolean, ptt?: boolean, withoutPreview?: boolean, hideTags?: boolean, viewOnce?: boolean): Promise<MessageId | boolean>;
|
559
570
|
/**
|
@@ -580,7 +591,7 @@ export declare class Client {
|
|
580
591
|
* @param content string reply text
|
581
592
|
* @param quotedMsgId string the msg id to reply to.
|
582
593
|
* @param sendSeen boolean If set to true, the chat will 'blue tick' all messages before sending the reply
|
583
|
-
* @returns Promise<MessageId | false
|
594
|
+
* @returns `Promise<MessageId | false>` false if didn't work, otherwise returns message id.
|
584
595
|
*/
|
585
596
|
reply(to: ChatId, content: Content, quotedMsgId: MessageId, sendSeen?: boolean): Promise<boolean | MessageId>;
|
586
597
|
/**
|
@@ -591,7 +602,7 @@ export declare class Client {
|
|
591
602
|
* This will only work if you have chats sent back and forth between you and the contact 1-1.
|
592
603
|
*
|
593
604
|
* @param contactId The Id of the contact with which you have an existing conversation with messages already.
|
594
|
-
* @returns Promise<string | boolean
|
605
|
+
* @returns `Promise<string | boolean>` true or false or a string with an explaintaion of why it wasn't able to determine the read receipts.
|
595
606
|
*
|
596
607
|
*/
|
597
608
|
checkReadReceipts(contactId: ContactId): Promise<string | boolean>;
|
@@ -612,7 +623,7 @@ export declare class Client {
|
|
612
623
|
* @param ptt boolean default: false set this to true if you want to send the file as a push to talk file.
|
613
624
|
* @param withoutPreview boolean default: false set this to true if you want to send the file without a preview (i.e as a file). This is useful for preventing auto downloads on recipient devices.
|
614
625
|
* @param hideTags boolean default: false [INSIDERS] set this to try silent tag someone in the caption
|
615
|
-
* @returns Promise <boolean | MessageId
|
626
|
+
* @returns `Promise <boolean | MessageId>` This will either return true or the id of the message. It will return true after 10 seconds even if waitForId is true
|
616
627
|
*/
|
617
628
|
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>;
|
618
629
|
/**
|
@@ -620,7 +631,7 @@ export declare class Client {
|
|
620
631
|
*
|
621
632
|
* Checks whether or not the group id provided is known to be unsafe by the contributors of the library.
|
622
633
|
* @param groupChatId The group chat you want to deteremine is unsafe
|
623
|
-
* @returns Promise <boolean | string
|
634
|
+
* @returns `Promise <boolean | string>` This will either return a boolean indiciating whether this group chat id is considered unsafe or an error message as a string
|
624
635
|
*/
|
625
636
|
isGroupIdUnsafe(groupChatId: GroupChatId): Promise<string | boolean>;
|
626
637
|
/**
|
@@ -628,7 +639,7 @@ export declare class Client {
|
|
628
639
|
* @param to chat id `xxxxx@c.us`
|
629
640
|
* @param file base64 data:image/xxx;base64,xxx or the path of the file you want to send.
|
630
641
|
* @param quotedMsgId string true_0000000000@c.us_JHB2HB23HJ4B234HJB to send as a reply to a message
|
631
|
-
* @returns Promise <boolean | string
|
642
|
+
* @returns `Promise <boolean | string>` This will either return true or the id of the message. It will return true after 10 seconds even if waitForId is true
|
632
643
|
*/
|
633
644
|
sendPtt(to: ChatId, file: DataURL | FilePath, quotedMsgId: MessageId): Promise<MessageId>;
|
634
645
|
/**
|
@@ -674,7 +685,7 @@ export declare class Client {
|
|
674
685
|
getMe(): Promise<any>;
|
675
686
|
/**
|
676
687
|
* Returns a PNG DataURL screenshot of the session
|
677
|
-
* @returns Promise<DataURL
|
688
|
+
* @returns `Promise<DataURL>`
|
678
689
|
*/
|
679
690
|
getSnapshot(): Promise<DataURL>;
|
680
691
|
/**
|
@@ -793,7 +804,7 @@ export declare class Client {
|
|
793
804
|
* Any potential abuse of this method will see it become paywalled.
|
794
805
|
* @param to: Chat id to forward the message to
|
795
806
|
* @param messageId: message id of the message to forward. Please note that if it is not loaded, this will return false - even if it exists.
|
796
|
-
* @returns Promise<MessageId | boolean
|
807
|
+
* @returns `Promise<MessageId | boolean>`
|
797
808
|
*/
|
798
809
|
ghostForward(to: ChatId, messageId: MessageId): Promise<MessageId | boolean>;
|
799
810
|
/**
|
@@ -861,7 +872,7 @@ export declare class Client {
|
|
861
872
|
getAllChatIds(): Promise<ChatId[]>;
|
862
873
|
/**
|
863
874
|
* retrieves an array of IDs of accounts blocked by the host account.
|
864
|
-
* @returns Promise<ChatId[]
|
875
|
+
* @returns `Promise<ChatId[]>`
|
865
876
|
*/
|
866
877
|
getBlockedIds(): Promise<ChatId[]>;
|
867
878
|
/**
|
@@ -900,7 +911,7 @@ export declare class Client {
|
|
900
911
|
* @param returnChatObj boolean When this is set to true and if the group was joined successfully, it will return a serialzed Chat object which includes group information and metadata. This is useful when you want to immediately do something with group metadata.
|
901
912
|
*
|
902
913
|
*
|
903
|
-
* @returns Promise<string | boolean | number
|
914
|
+
* @returns `Promise<string | boolean | number>` Either false if it didn't work, or the group id.
|
904
915
|
*/
|
905
916
|
joinGroupViaLink(link: string, returnChatObj?: boolean): Promise<string | boolean | number | Chat>;
|
906
917
|
/**
|
@@ -1165,7 +1176,7 @@ export declare class Client {
|
|
1165
1176
|
/**
|
1166
1177
|
* Retrieves an invite link for a group chat. returns false if chat is not a group.
|
1167
1178
|
* @param chatId
|
1168
|
-
* @returns Promise<string
|
1179
|
+
* @returns `Promise<string>`
|
1169
1180
|
*/
|
1170
1181
|
getGroupInviteLink(chatId: ChatId): Promise<string>;
|
1171
1182
|
/**
|
@@ -1177,7 +1188,7 @@ export declare class Client {
|
|
1177
1188
|
/**
|
1178
1189
|
* Revokes the current invite link for a group chat. Any previous links will stop working
|
1179
1190
|
* @param chatId
|
1180
|
-
* @returns Promise<boolean
|
1191
|
+
* @returns `Promise<boolean>`
|
1181
1192
|
*/
|
1182
1193
|
revokeGroupInviteLink(chatId: ChatId): Promise<boolean | string>;
|
1183
1194
|
/**
|
@@ -1200,7 +1211,9 @@ export declare class Client {
|
|
1200
1211
|
* @param use_unread_count
|
1201
1212
|
* @returns any
|
1202
1213
|
*/
|
1203
|
-
getUnreadMessages(includeMe: boolean, includeNotifications: boolean, use_unread_count: boolean): Promise<
|
1214
|
+
getUnreadMessages(includeMe: boolean, includeNotifications: boolean, use_unread_count: boolean): Promise<Chat & {
|
1215
|
+
messages: Message[];
|
1216
|
+
}>;
|
1204
1217
|
/**
|
1205
1218
|
* Retrieves all new Messages. where isNewMsg==true
|
1206
1219
|
* @returns list of messages
|
@@ -1252,21 +1265,6 @@ export declare class Client {
|
|
1252
1265
|
*
|
1253
1266
|
* @param groupName group name: 'New group'
|
1254
1267
|
* @param contacts: A single contact id or an array of contact ids.
|
1255
|
-
* @returns Promise<GroupCreationResponse> :
|
1256
|
-
* ```javascript
|
1257
|
-
* {
|
1258
|
-
* status: 200,
|
1259
|
-
* gid: {
|
1260
|
-
* server: 'g.us',
|
1261
|
-
* user: '447777777777-1583678870',
|
1262
|
-
* _serialized: '447777777777-1583678870@g.us'
|
1263
|
-
* },
|
1264
|
-
* participants: [
|
1265
|
-
* { '447777777777@c.us': [Object] },
|
1266
|
-
* { '447444444444@c.us': [Object] }
|
1267
|
-
* ]
|
1268
|
-
* }
|
1269
|
-
* ```
|
1270
1268
|
*/
|
1271
1269
|
createGroup(groupName: string, contacts: ContactId | ContactId[]): Promise<GroupChatCreationResponse>;
|
1272
1270
|
/**
|
@@ -1416,7 +1414,7 @@ export declare class Client {
|
|
1416
1414
|
* @param url: The url of the image
|
1417
1415
|
* @param requestConfig {} By default the request is a get request, however you can override that and many other options by sending this parameter. You can read more about this parameter here: https://github.com/axios/axios#request-config
|
1418
1416
|
*
|
1419
|
-
* @returns Promise<MessageId | boolean
|
1417
|
+
* @returns `Promise<MessageId | boolean>`
|
1420
1418
|
*/
|
1421
1419
|
sendStickerfromUrl(to: ChatId, url: string, requestConfig?: AxiosRequestConfig, stickerMetadata?: StickerMetadata): Promise<string | MessageId | boolean>;
|
1422
1420
|
/**
|
@@ -1428,7 +1426,7 @@ export declare class Client {
|
|
1428
1426
|
* @param messageId The id of the message to reply to
|
1429
1427
|
* @param requestConfig {} By default the request is a get request, however you can override that and many other options by sending this parameter. You can read more about this parameter here: https://github.com/axios/axios#request-config
|
1430
1428
|
*
|
1431
|
-
* @returns Promise<MessageId | boolean
|
1429
|
+
* @returns `Promise<MessageId | boolean>`
|
1432
1430
|
*/
|
1433
1431
|
sendStickerfromUrlAsReply(to: ChatId, url: string, messageId: MessageId, requestConfig?: AxiosRequestConfig, stickerMetadata?: StickerMetadata): Promise<MessageId | boolean>;
|
1434
1432
|
/**
|
@@ -1505,7 +1503,7 @@ export declare class Client {
|
|
1505
1503
|
* Turn the ephemeral setting in a chat to on or off
|
1506
1504
|
* @param chatId The ID of the chat
|
1507
1505
|
* @param ephemeral `true` to turn on the ephemeral setting, `false` to turn off the ephemeral setting. Please note, if the setting is already on the requested setting, this method will return `true`.
|
1508
|
-
* @returns Promise<boolean
|
1506
|
+
* @returns `Promise<boolean>` true if the setting was set, `false` if the chat does not exist
|
1509
1507
|
*/
|
1510
1508
|
setChatEphemeral(chatId: ChatId, ephemeral: boolean): Promise<boolean>;
|
1511
1509
|
/**
|
@@ -1528,7 +1526,7 @@ export declare class Client {
|
|
1528
1526
|
* 3: [Bryndan Write](https://www.dafontfree.net/freefonts-bryndan-write-f160189.htm)
|
1529
1527
|
* 4: [Bebasneue Regular](https://www.dafont.com/bebas-neue.font)
|
1530
1528
|
* 5: [Oswald Heavy](https://www.fontsquirrel.com/fonts/oswald)
|
1531
|
-
* @returns Promise<string | boolean
|
1529
|
+
* @returns `Promise<string | boolean>` returns status id if it worked, false if it didn't
|
1532
1530
|
*/
|
1533
1531
|
postTextStatus(text: Content, textRgba: string, backgroundRgba: string, font: number): Promise<MessageId | string | boolean>;
|
1534
1532
|
/**
|
@@ -1537,7 +1535,7 @@ export declare class Client {
|
|
1537
1535
|
* Posts an image story.
|
1538
1536
|
* @param data data url string `data:[<MIME-type>][;charset=<encoding>][;base64],<data>`
|
1539
1537
|
* @param caption The caption for the story
|
1540
|
-
* @returns Promise<string | boolean
|
1538
|
+
* @returns `Promise<string | boolean>` returns status id if it worked, false if it didn't
|
1541
1539
|
*/
|
1542
1540
|
postImageStatus(data: DataURL, caption: Content): Promise<MessageId | string | boolean>;
|
1543
1541
|
/**
|
@@ -1546,7 +1544,7 @@ export declare class Client {
|
|
1546
1544
|
* Posts a video story.
|
1547
1545
|
* @param data data url string `data:[<MIME-type>][;charset=<encoding>][;base64],<data>`
|
1548
1546
|
* @param caption The caption for the story
|
1549
|
-
* @returns Promise<string | boolean
|
1547
|
+
* @returns `Promise<string | boolean>` returns status id if it worked, false if it didn't
|
1550
1548
|
*/
|
1551
1549
|
postVideoStatus(data: DataURL, caption: Content): Promise<MessageId | string | boolean>;
|
1552
1550
|
/**
|
@@ -1632,7 +1630,7 @@ export declare class Client {
|
|
1632
1630
|
*
|
1633
1631
|
* Sets the profile pic of the host number.
|
1634
1632
|
* @param data string data url image string.
|
1635
|
-
* @returns Promise<boolean
|
1633
|
+
* @returns `Promise<boolean>` success if true
|
1636
1634
|
*/
|
1637
1635
|
setProfilePic(data: DataURL): Promise<boolean>;
|
1638
1636
|
/**
|