@item-enonic-types/global
Advanced tools
+47
-47
| export interface Request { | ||
| readonly method: "GET" | "PUT" | "POST" | "DELETE" | "HEAD" | "PATCH" | "OPTIONS" | "TRACE" | "CONNECT"; | ||
| readonly scheme: string; | ||
| readonly host: string; | ||
| readonly port: number; | ||
| readonly path: string; | ||
| readonly rawPath: string; | ||
| readonly url: string; | ||
| readonly remoteAddress: string; | ||
| readonly mode: "inline" | "edit" | "preview" | "live"; | ||
| readonly webSocket?: boolean; | ||
| readonly repositoryId: string; | ||
| readonly branch: "draft" | "master"; | ||
| readonly contextPath: string; | ||
| readonly body: string; | ||
| readonly params: { readonly [key: string]: string | undefined }; | ||
| readonly headers: { readonly [key: string]: string | undefined }; | ||
| readonly cookies: { readonly [key: string]: string | undefined }; | ||
| readonly contentType: string; | ||
| method: "GET" | "PUT" | "POST" | "DELETE" | "HEAD" | "PATCH" | "OPTIONS" | "TRACE" | "CONNECT"; | ||
| scheme: string; | ||
| host: string; | ||
| port: number; | ||
| path: string; | ||
| rawPath: string; | ||
| url: string; | ||
| remoteAddress: string; | ||
| mode: "inline" | "edit" | "preview" | "live"; | ||
| webSocket?: boolean; | ||
| repositoryId: string; | ||
| branch: "draft" | "master"; | ||
| contextPath: string; | ||
| body: string; | ||
| params: { [key: string]: string | undefined }; | ||
| headers: { [key: string]: string | undefined }; | ||
| cookies: { [key: string]: string | undefined }; | ||
| contentType: string; | ||
| } | ||
@@ -26,4 +26,4 @@ | ||
| contentType?: "text/html" | "application/json" | "application/problem+json" | "text/xml" | "application/xml" | string; | ||
| headers?: { readonly [key: string]: string | undefined }; | ||
| cookies?: { readonly [key: string]: string | Cookie | undefined }; | ||
| headers?: { [key: string]: string | undefined }; | ||
| cookies?: { [key: string]: string | Cookie | undefined }; | ||
| redirect?: string; | ||
@@ -38,3 +38,3 @@ postProcess?: boolean; | ||
| data?: WebSocketData; | ||
| subProtocols?: ReadonlyArray<string>; | ||
| subProtocols?: string[]; | ||
| }; | ||
@@ -44,7 +44,7 @@ } | ||
| export interface MacroContext<Params = never> { | ||
| readonly name: string; | ||
| readonly body: string; | ||
| readonly params: Params; | ||
| readonly document: string; | ||
| readonly request: Request; | ||
| name: string; | ||
| body: string; | ||
| params: Params; | ||
| document: string; | ||
| request: Request; | ||
| } | ||
@@ -56,6 +56,6 @@ | ||
| export interface ErrorRequest { | ||
| readonly status: number; | ||
| readonly message: string; | ||
| readonly exception?: unknown; | ||
| readonly request: Request; | ||
| status: number; | ||
| message: string; | ||
| exception?: unknown; | ||
| request: Request; | ||
| } | ||
@@ -67,8 +67,8 @@ | ||
| export interface CustomSelectorServiceRequestParams { | ||
| readonly count: string; | ||
| readonly start?: string; | ||
| readonly ids?: string; | ||
| readonly query?: string; | ||
| count: string; | ||
| start?: string; | ||
| ids?: string; | ||
| query?: string; | ||
| readonly [key: string]: string | undefined; | ||
| [key: string]: string | undefined; | ||
| } | ||
@@ -103,27 +103,27 @@ | ||
| interface AbstractWebSocketEvent<WebSocketData = {}> { | ||
| readonly session: { | ||
| readonly id: string; | ||
| readonly path: string; | ||
| readonly params: { readonly [key: string]: string | undefined }; | ||
| session: { | ||
| id: string; | ||
| path: string; | ||
| params: { [key: string]: string | undefined }; | ||
| }; | ||
| readonly data: WebSocketData; | ||
| data: WebSocketData; | ||
| } | ||
| export interface OpenWebSocketEvent<WebSocketData = {}> extends AbstractWebSocketEvent<WebSocketData> { | ||
| readonly type: "open"; | ||
| type: "open"; | ||
| } | ||
| export interface MessageWebSocketEvent<WebSocketData = {}> extends AbstractWebSocketEvent<WebSocketData> { | ||
| readonly type: "message"; | ||
| readonly message: string; | ||
| type: "message"; | ||
| message: string; | ||
| } | ||
| export interface CloseWebSocketEvent<WebSocketData = {}> extends AbstractWebSocketEvent<WebSocketData> { | ||
| readonly type: "close"; | ||
| readonly closeReason: number; | ||
| type: "close"; | ||
| closeReason: number; | ||
| } | ||
| export interface ErrorWebSocketEvent<WebSocketData = {}> extends AbstractWebSocketEvent<WebSocketData> { | ||
| readonly type: "error"; | ||
| readonly error: string; | ||
| type: "error"; | ||
| error: string; | ||
| } | ||
@@ -130,0 +130,0 @@ |
+0
-2
@@ -1,3 +0,1 @@ | ||
| import { AdminWidgetResponse } from "./controller"; | ||
| declare namespace XP { | ||
@@ -4,0 +2,0 @@ type Request = import("./controller").Request; |
+1
-1
@@ -5,3 +5,3 @@ { | ||
| "sideEffects": false, | ||
| "version": "7.12.2", | ||
| "version": "7.13.0", | ||
| "description": "Global variables and functions type definition.", | ||
@@ -8,0 +8,0 @@ "typings": "index.d.ts", |
7501
-6.44%163
-0.61%