Definition of classes

interface Request {
id: string, // unique identifier of request
method: string, // REST request method
header?: Record<string, string>, // map of headers
url: string,
body?: string, // UTF-8 encoded into base64 string.
}
interface Response {
id: string, // unique identifier of request (see ***async methods***)
statusCode: number, // status code from response
header?: Record<string, string>, // map of headers
body?: string, // UTF-8 encoded into base64 string.
}
interface Save {
key: string,
value: string,
}
interface Get {
id: string, // identifier of get (see ***async methods***)
key: string, // key to value
}
interface Get {
id: string, // identifier of get (see ***async methods***)
key: string, // key to value
value?: string // value saved on specific key
}
interface SlaveWebView {
id: string, // identifier of webview
}
interface EvaluateJavaScriptSlaveWebView {
id: string, // identifier of webview
script: string, // script to evaluate ex. 'window.console.log('hello world');'
}
interface LoadPageURLInSlaveWebView {
id: string, // identifier of webview
url: string, // url which should be loaded
}