Huge News!Announcing our $40M Series B led by Abstract Ventures.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.0.29 to 0.0.30

lib/event.d.ts

14

lib/content.d.ts
import { Region } from "./portal";
export interface ContentLibrary {
get<A extends object, PageConfig extends object = never>(params: GetContentParams): Content<A, PageConfig> | null;
query<A extends object>(params: QueryContentParams): QueryResponse<A>;
query<A extends object, B extends string = never>(params: QueryContentParams<B>): QueryResponse<A, B>;
create<A extends object>(params: CreateContentParams<A>): Content<A>;

@@ -76,3 +76,3 @@ modify<A extends object>(params: ModifyContentParams<A>): Content<A>;

}
export interface QueryContentParams {
export interface QueryContentParams<B extends string = never> {
readonly start?: number;

@@ -83,11 +83,11 @@ readonly count: number;

readonly sort?: string;
readonly aggregations?: Record<string, Aggregation>;
readonly aggregations?: Record<B, Aggregation>;
readonly contentTypes?: ReadonlyArray<string>;
readonly highlight?: Highlight;
}
export interface QueryResponse<A extends object> {
export interface QueryResponse<A extends object, B extends string = never> {
readonly count: number;
readonly hits: ReadonlyArray<Content<A>>;
readonly total: number;
readonly aggregations: AggregationsResponse;
readonly aggregations: AggregationsResponse<B>;
readonly highlight: HighlightResponse;

@@ -187,3 +187,5 @@ }

}
export declare type AggregationsResponse = Record<string, AggregationsResponseEntry>;
export declare type AggregationsResponse<B extends string> = {
[K in B]: AggregationsResponseEntry;
};
export interface Highlight {

@@ -190,0 +192,0 @@ encoder?: 'default' | 'html';

{
"name": "enonic-types",
"version": "0.0.29",
"version": "0.0.30",
"description": "TypeScript types for Enonic XP",

@@ -27,8 +27,8 @@ "main": "lib/index.js",

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.19.0",
"@typescript-eslint/parser": "^2.19.0",
"@typescript-eslint/eslint-plugin": "^2.19.2",
"@typescript-eslint/parser": "^2.19.2",
"eslint": "^6.8.0",
"rimraf": "^3.0.1",
"rimraf": "^3.0.2",
"typescript": "^3.7.5"
}
}
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