ImageCensorRequest: {
    context: {
        domain?: string;
    };
    force: boolean;
    id: string;
    preferences: IPreferences;
    requestData?: {
        [key: string]: any;
    };
    srcId: string | number | undefined;
    srcUrl?: string;
    url: string;
}

The request message sent to censoring backends to censor an image.

Type declaration

  • context: {
        domain?: string;
    }

    Context for the current request.

    • Optional domain?: string

      The domain (not the page URL) that this request originated from.

      Remarks

      This may not be set, and might also be set to fake values. Trust the client.

  • force: boolean

    Whether this request is a "forced" or manually invoked action.

    Remarks

    How to interpret this is up to you but, as an example, other transports will skip caches when this is true.

  • id: string

    A unique identifier for this image request.

    Remarks

    You can use this ID internally if you want, the important part is for this ID to be present in the response body.

  • preferences: IPreferences

    The current user preferences to be used with this request.

  • Optional requestData?: {
        [key: string]: any;
    }

    An optional collection of additional key-value pairs for use with this request. Some clients may not specify these.

    Remarks

    Always check this carefully as some requests will not include any keys, and not all keys will be relevant to all backends (or clients for that matter).

    • [key: string]: any
  • srcId: string | number | undefined

    An identifier for the source context of the current request. In browsers, this is the tab ID.

    Remarks

    This should not be used to differentiate requests (that's the id) but can be used to group requests.

  • Optional srcUrl?: string

    The original URL of the image as it appeared for the user (i.e. its HTTP URI for browser contexts).

    Remarks

    This will not always be set, but if the url property is a Data URI this should be the original HTTP URI for clients that don't support/understand Data URIs.

  • url: string

    The URL of the image to be censored. Note that this can be a HTTP(S) URI or a Data URI.

Generated using TypeDoc