New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

enonic-types

Package Overview
Dependencies
Maintainers
1
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enonic-types - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

37

controller.d.ts

@@ -1,2 +0,3 @@

export declare interface Request {
import { XOR } from "./types";
export interface Request {
readonly method: "GET" | "PUT" | "POST" | "DELETE";

@@ -21,7 +22,8 @@ readonly scheme: string;

};
readonly webSocket?: boolean;
}
export declare type ResponseType = string | object | Array<any> | ReadonlyArray<any>;
export declare interface Response {
export interface HttpResponse<A> {
readonly status?: number;
readonly body?: ResponseType;
readonly body?: A | ResponseType;
readonly contentType?: string;

@@ -39,2 +41,9 @@ readonly headers?: {

}
export interface WebSocketResponse<A = {}> {
readonly webSocket: {
readonly data?: A;
readonly subProtocols?: ReadonlyArray<string>;
};
}
export declare type Response<A = {}> = XOR<HttpResponse<A>, WebSocketResponse<A>>;
export interface MacroContext<A = never> {

@@ -112,1 +121,23 @@ readonly name: string;

}
interface AbstractWebSocketEvent<A = {}> {
readonly session: {
readonly id: string;
readonly path: string;
readonly params: Record<string, string>;
};
readonly data: A;
}
declare type WebSocketType = {
readonly type: 'open';
} | {
readonly type: 'message';
readonly message: string;
} | {
readonly type: 'error';
readonly error: string;
} | {
readonly type: 'close';
readonly closeReason: number;
};
export declare type WebSocketEvent<A = {}> = AbstractWebSocketEvent<A> & WebSocketType;
export {};

8

package.json
{
"name": "enonic-types",
"sideEffects": false,
"version": "0.1.6",
"version": "0.1.7",
"description": "TypeScript types for Enonic XP",

@@ -27,5 +27,5 @@ "typings": "index.d.ts",

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.8.2",
"@typescript-eslint/parser": "^4.8.2",
"eslint": "^7.14.0",
"@typescript-eslint/eslint-plugin": "^4.9.1",
"@typescript-eslint/parser": "^4.9.1",
"eslint": "^7.15.0",
"rimraf": "^3.0.2",

@@ -32,0 +32,0 @@ "typescript": "^4.1.2"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc