Readonly
onAn event fired when the backend has completed censoring a request and the client can continue.
Optional
requestThis property was part of legacy functionality and will be removed in a future release.
Request cancellation of a previously sent censoring request.
Details of the censoring request to cancel.
Some backends may not support this, but should handle the cancellation request regardless.
Censor a given image based on the given censoring request.
The image censoring request.
Either the censored image response, or true
if the server has accepted the request asynchronously and
will return it through the onImageCensored
event.
Checks the current backend's availability and readiness for requests.
Optional
host: stringThe host address to check for availability. When not specified, should use the backend's default address.
Requests any assets of the specified type stored by the backend.
The asset type to fetch from the backend.
This is mostly used by clients to determine what backend-side assets are available for selection by the user (like stickers)
Returns any user preferences stored by the backend.
If the backend doesn't store user preferences, return undefined
from the Promise.
Fetches censoring statistics from the backend.
Not all backends support this. If not, just return a Promise<undefined>
Updates/saves user preferences as stored by the backend/
The new user preferences to store in the backend.
If the backend doesn't store user preferences, just return a Promise<false>
Generated using TypeDoc
The interface that clients (like the browser extension) use to communicate with backends. This is essentially the "bare minimum" of shared functionality that a client will use to communicate with a backend
Remarks
As a result of the multi-purpose design of the
beta-*
packages, clients can require additional functionality beyond this interface to match their environment. For example, the extension has a separate provider abstraction to bridge this interface into the browser environment.