import { JSONObject } from "kuzzle-sdk"; import { Token } from "../../model/security/token"; import { User } from "../../model/security/user"; export type ContextMisc = { /** * HTTP url * @deprecated use "path" instead */ url?: string; /** * HTTP path */ path?: string; /** * HTTP headers */ verb?: string; /** * HTTP headers */ headers?: JSONObject; [key: string]: any; }; /** * Information about the connection at the origin of the request. */ export declare class Connection { constructor(connection: any); /** * Unique identifier of the user connection */ set id(str: string); get id(): string | null; /** * Network protocol name */ set protocol(str: string); get protocol(): string | null; /** * Chain of IP addresses, starting from the client */ set ips(arr: string[]); get ips(): string[]; /** * Additional informations about the connection */ get misc(): ContextMisc; /** * Serializes the Connection object */ toJSON(): JSONObject; } /** * Kuzzle execution context for the request. * * Contains informations about identity (token, user) * and origin (connection, protocol). */ export declare class RequestContext { constructor(options?: any); /** * Serializes the RequestContext object */ toJSON(): JSONObject; /** * @deprecated use connection.id instead * Internal connection ID */ get connectionId(): string | null; set connectionId(str: string); /** * @deprecated use connection.protocol instead */ get protocol(): string | null; set protocol(str: string); /** * Connection that initiated the request */ get connection(): Connection; /** * Authentication token */ get token(): Token | null; set token(obj: Token | null); /** * Associated user */ get user(): User | null; set user(obj: User | null); }