Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ConfigObject

Hierarchy

  • ConfigObject

Indexable

[x: string]: any

Index

Properties

Optional autoRefresh

autoRefresh: boolean

Setting this to true will result in new QR codes being generated if the end user takes too long to scan the QR code.

Optional blockCrashLogs

blockCrashLogs: boolean

Setting this to true will block any network calls to WhatsApp's crash log servers. This should keep anything you do under the radar.

Optional cacheEnabled

cacheEnabled: boolean

Setting this to false turn off the cache. This may improve memory usage.

Optional chromiumArgs

chromiumArgs: string[]

This allows you to pass any array of custom chrome/chromium argument strings to the puppeteer instance. You can find all possible arguements here.

Optional devtools

devtools: boolean | DevTools

You can enable remote devtools by setting this to trye. If you set this to true there will be security on the devtools url. If you want, you can also pass a username & password.

Optional executablePath

executablePath: string

Some features, like video upload, do not work without a chrome instance. Puppeteer only provides a chromium instance out of the box. Set this to the path of your chrome instance or you can use useChrome:true to automatically detect a chrome instance for you.

Optional headless

headless: boolean

By default, all instances of sulla are headless (i.e you don't see a chrome window open), you can set this to false to show the chrome/chromium window.

Optional killTimer

killTimer: number

This determines how long the process should wait for a QR code to be scanned before killing the process entirely.

Optional qrRefreshS

qrRefreshS: number

This determines the interval at which to refresh the QR code.

Optional sessionData

sessionData: SessionData

JSON object that is required to migrate a session from one instance to another or ot just restart an existing instance. This sessionData is provided in a generated JSON file upon QR scan or an event. You can capture the event like so:

import {create, ev} from 'sulla-hotfix';
ev.on('sessionData', async (sessionData, sessionId) =>{
         console.log(sessionId, sessionData)
     })

Optional throwErrorOnTosBlock

throwErrorOnTosBlock: boolean

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.

Optional useChrome

useChrome: boolean

If true, the program will automatically try to detect the instance of chorme on the machine. Please note this overrides executablePath.