import { JSONObject } from "kuzzle-sdk"; /** * @deprecated */ export declare class RequestResource { private args; constructor(args: JSONObject); /** * Document ID */ get _id(): string | null; set _id(str: string); /** * Index name */ get index(): string | null; set index(str: string); /** * Collection name */ get collection(): string | null; set collection(str: string); } /** * API request arguments are accessible here. * * Common arguments are accessible at the root level: * "jwt", "volatile", "body", "controller", "action" * * Every other arguments are accessible under the "args" property. E.g: * "_id", "index", "collection", "refresh", "onExistingUser", "foobar", etc. */ export declare class RequestInput { /** * Request arguments (e.g: "refresh"). * @example * // original JSON request sent to Kuzzle * { * controller * action, * _id, <== that * index, <== that * collection, <== that * jwt, * refresh, <== that * foobar, <== that * volatile, * body * } */ args: JSONObject; /** * Common arguments that identify Kuzzle resources. * (e.g: "_id", "index", "collection") * @deprecated Use directly`request.input.args.<_id|index|collection>` instead * @example * // original JSON request sent to Kuzzle * { * controller * action, * _id, <== that * index, <== that * collection, <== that * jwt, * refresh, * foobar, * volatile, * body * } */ resource: RequestResource; /** * Builds a Kuzzle normalized request input object * * The 'data' object accepts a request content using the same * format as the one used, for instance, for the Websocket protocol * * Any undefined option is set to null */ constructor(data: any); /** * Authentication token. * @example * // original JSON request sent to Kuzzle * { * controller * action, * _id, * index, * collection, * jwt, <== that * refresh, * foobar, * volatile, * body * } */ get jwt(): string | null; set jwt(str: string); /** * API controller name. * @example * // original JSON request sent to Kuzzle * { * controller <== that * action, * _id, * index, * collection, * jwt, * refresh, * foobar, * volatile, * body * } */ get controller(): string | null; set controller(str: string); /** * API action name. * @example * // original JSON request sent to Kuzzle * { * controller * action, <== that * _id, * index, * collection, * jwt, * refresh, * foobar, * volatile, * body * } */ get action(): string | null; set action(str: string); get triggerEvents(): boolean | undefined; set triggerEvents(bool: boolean); /** * Request body. * In Http it's the request body parsed. * @example * // original JSON request sent to Kuzzle * { * controller * action, * _id, * index, * collection, * jwt, * refresh, * foobar, * volatile, * body <== that * } */ get body(): JSONObject | null; set body(obj: JSONObject | Array); /** * Request headers (Http only). * * @deprecated Use RequestContext.connection.misc.headers instead */ get headers(): JSONObject | null; set headers(obj: JSONObject); /** * Volatile object. * @example * // original JSON request sent to Kuzzle * { * controller * action, * _id, * index, * collection, * jwt, * refresh, * foobar, * volatile, <== that * body * } */ get volatile(): JSONObject | null; set volatile(obj: JSONObject); }