## Functions
parseCookies()string

Parses cookies into a formatted string.

get(url, _parms)Promise.<AxiosResponse>

Sends an HTTP GET request.

post(url, data, _headers)Promise.<AxiosResponse>

Sends an HTTP POST request.

refreshCookies(response)

Refreshes cookies based on the response headers.

signinWithEmail()

Attempts to sign in with the provided email and password.

getAuthUrl()Promise.<string>

Retrieves the authentication URL for a chat.

getCrpf(input)string | null

Extracts CSRF token from a string.

grantAuth(url)Promise.<number>

Grants authorization by following redirects.

login(cache_path)Promise.<string>

Initiates the login process.

cacheLogin(path)

Caches login data to a file.

loadLoginCache(path)Promise.<string>

Loads cached login data from a file.

## parseCookies() ⇒ string Parses cookies into a formatted string. **Kind**: global function **Returns**: string - A formatted string containing parsed cookies. ## get(url, _parms) ⇒ Promise.<AxiosResponse> Sends an HTTP GET request. **Kind**: global function **Returns**: Promise.<AxiosResponse> - A Promise that resolves to the HTTP response. | Param | Type | Description | | --- | --- | --- | | url | string | The URL to send the GET request to. | | _parms | Record.<string, any> | Optional query parameters for the request. | ## post(url, data, _headers) ⇒ Promise.<AxiosResponse> Sends an HTTP POST request. **Kind**: global function **Returns**: Promise.<AxiosResponse> - A Promise that resolves to the HTTP response. | Param | Type | Description | | --- | --- | --- | | url | string | The URL to send the POST request to. | | data | Record.<string, any> | Data to include in the request body. | | _headers | Record.<string, any> | Optional additional headers for the request. | ## refreshCookies(response) Refreshes cookies based on the response headers. **Kind**: global function | Param | Type | Description | | --- | --- | --- | | response | AxiosResponse | The HTTP response to extract cookies from. | ## signinWithEmail() Attempts to sign in with the provided email and password. **Kind**: global function **Throws**: - Error If the sign-in fails. ## getAuthUrl() ⇒ Promise.<string> Retrieves the authentication URL for a chat. **Kind**: global function **Returns**: Promise.<string> - A Promise that resolves to the authentication URL. **Throws**: - Error If the URL retrieval fails. ## getCrpf(input) ⇒ string \| null Extracts CSRF token from a string. **Kind**: global function **Returns**: string \| null - The extracted CSRF token or null if not found. | Param | Type | Description | | --- | --- | --- | | input | string | The input string containing CSRF information. | ## grantAuth(url) ⇒ Promise.<number> Grants authorization by following redirects. **Kind**: global function **Returns**: Promise.<number> - A Promise that resolves to a status code. **Throws**: - Error If the authorization process fails. | Param | Type | Description | | --- | --- | --- | | url | string | The URL to grant authorization for. | ## login(cache_path) ⇒ Promise.<string> Initiates the login process. **Kind**: global function **Returns**: Promise.<string> - A Promise that resolves to the parsed cookies. **Throws**: - Error If the login process fails. | Param | Type | Description | | --- | --- | --- | | cache_path | string | Optional path for caching login data. | ## cacheLogin(path) Caches login data to a file. **Kind**: global function | Param | Type | Description | | --- | --- | --- | | path | string | The path where login data will be cached. | ## loadLoginCache(path) ⇒ Promise.<string> Loads cached login data from a file. **Kind**: global function **Returns**: Promise.<string> - A Promise that resolves to the cached login data. | Param | Type | Description | | --- | --- | --- | | path | string | The path to the cached login data file. |