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

@enonic/js-utils

Package Overview
Dependencies
Maintainers
4
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enonic/js-utils - npm Package Compare versions

Comparing version 0.38.2 to 0.38.3

11

dist/cjs/types/node/index.d.ts

@@ -37,2 +37,3 @@ import type {

Aggregation,
AggregationForGraphQLSchemaQueryArgsInputType,
Aggregations,

@@ -42,2 +43,3 @@ AggregationsResponse,

AggregationsResponseEntry,
AggregationType,
AnalysedIndexType,

@@ -49,5 +51,8 @@ BasicFilters,

DateHistogramAggregation,
DateHistogramAggregationParams,
DateRangeAggregation,
DateRangeAggregationParams,
ExistsFilter,
GeoDistanceAggregation,
GeoDistanceAggregationParams,
HasValueFilter,

@@ -57,3 +62,5 @@ Highlight,

MaxAggregation,
MaxAggregationParams,
MinAggregation,
MinAggregationParams,
NodeQueryParams,

@@ -68,2 +75,3 @@ NotExistsFilter,

RangeAggregation,
RangeAggregationParams,
SortDirection,

@@ -85,3 +93,4 @@ SortDirectionAscending,

TermsAggregationParams,
ValueCountAggregation
ValueCountAggregation,
ValueCountAggregationParams
} from './query/index.d';

@@ -88,0 +97,0 @@ export type {

292

dist/cjs/types/node/query/Aggregation.d.ts

@@ -1,103 +0,164 @@

export interface TermsAggregationParams {
field :string;
order? :string; // _term ASC
size? :number; // Default to 10
minDocCount? :number;
//──────────────────────────────────────────────────────────────────────────────
// Params
//──────────────────────────────────────────────────────────────────────────────
export type DateHistogramAggregationParams = {
field :string
interval :string
minDocCount :number
format :string
}
export interface TermsAggregation {
terms :TermsAggregationParams;
aggregations? :{
[subaggregation :string] :Aggregation;
};
export type DateRangeAggregationParams = {
field :string
format :string
ranges :Array<{
from ?:string
to ?:string
}>
}
export interface StatsAggregationParams {
field :string;
order? :string;
size? :number;
export type GeoDistanceAggregationParams = {
field :string
ranges ?:Array<{
from ?:number
to ?:number
}>
range ?:{
from :number
to :number
}
unit :string
origin :{
lat :string
lon :string
}
}
export interface StatsAggregation {
stats :StatsAggregationParams;
aggregations? :{
[subaggregation :string] :Aggregation;
};
type MaxAggregationParams = {
field :string
}
export interface RangeAggregation {
range: {
field: string;
ranges?: Array<{
from?: number;
to?: number;
}>;
range?: {
from: number;
to: number;
};
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
type MinAggregationParams = {
field :string
}
export interface GeoDistanceAggregation {
geoDistance: {
field: string;
ranges?: Array<{
from?: number;
to?: number;
}>;
range?: {
from: number;
to: number;
};
unit: string;
origin: {
lat: string;
lon: string;
};
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
type RangeAggregationParams = {
field :string
ranges ?:Array<{
from ?:number
to ?:number
}>
range ?:{
from :number
to :number
}
}
export interface DateRangeAggregation {
dateRange: {
field: string;
format: string;
ranges: Array<{
from?: string;
to?: string;
}>;
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
export type StatsAggregationParams = {
// Required
field :string
// Optional
order ?:string // Default to ?
size ?:number // Default to ?
}
export interface DateHistogramAggregation {
dateHistogram: {
field: string;
interval: string;
minDocCount: number;
format: string;
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
export type TermsAggregationParams = {
// Required
field :string
// Optional
minDocCount ?:number
order ?:string // Default to '_term ASC'
size ?:number // Default to 10
}
export type ValueCountAggregationParams = {
field :string
}
//──────────────────────────────────────────────────────────────────────────────
// Enonic-XP Multirepo/Repo Connection Query Aggregations Parameter Aggregation Type Names
//──────────────────────────────────────────────────────────────────────────────
export type AggregationType = 'count'
|'dateHistogram'
|'dateRange'
|'geoDistance'
|'max'
|'min'
|'range'
|'stats'
|'terms'
//──────────────────────────────────────────────────────────────────────────────
// GraphQL
//──────────────────────────────────────────────────────────────────────────────
// GraphQL Schema -> Query -> Args -> Input Type -> Array<...>
export type AggregationForGraphQLSchemaQueryArgsInputType = {
name :string
count ?:ValueCountAggregationParams
dateHistogram ?:DateHistogramAggregationParams
dateRange ?:DateRangeAggregationParams
geoDistance ?:GeoDistanceAggregationParams
max ?:MaxAggregationParams
min ?:MinAggregationParams
range ?:RangeAggregationParams
stats ?:StatsAggregationParams
terms ?:TermsAggregationParams
subAggregations ?:Array<AggregationForGraphQLSchemaQueryArgsInputType>
}
//──────────────────────────────────────────────────────────────────────────────
// Aggregation types
//──────────────────────────────────────────────────────────────────────────────
export type DateHistogramAggregation = {
dateHistogram :DateHistogramAggregationParams
aggregations ?: {
[subaggregation :string]: Aggregation
}
}
export type DateRangeAggregation = {
dateRange: DateRangeAggregationParams
aggregations ?: {
[subaggregation :string]: Aggregation
}
}
export type GeoDistanceAggregation = {
geoDistance :GeoDistanceAggregationParams
aggregations ?:{
[subaggregation :string]: Aggregation
}
}
export type RangeAggregation = {
range :RangeAggregationParams
aggregations ?: {
[subaggregation :string] :Aggregation
}
}
export type StatsAggregation = {
stats :StatsAggregationParams
aggregations ?:{
[subaggregation :string] :Aggregation
}
}
export type TermsAggregation = {
terms :TermsAggregationParams
aggregations ?:{
[subaggregation :string] :Aggregation
}
}
/**
* @since 7.7.0
*/
export interface MinAggregation {
min: {
field: string;
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
export type MinAggregation = {
min :MinAggregationParams
aggregations ?:{
[subaggregation :string] :Aggregation
}
}

@@ -108,9 +169,7 @@

*/
export interface MaxAggregation {
max: {
field: string;
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
export type MaxAggregation = {
max :MaxAggregationParams
aggregations ?:{
[subaggregation :string] :Aggregation
}
}

@@ -121,11 +180,13 @@

*/
export interface ValueCountAggregation {
count: {
field: string;
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
export type ValueCountAggregation = {
count :ValueCountAggregationParams
aggregations ?:{
[subaggregation :string] :Aggregation
}
}
//──────────────────────────────────────────────────────────────────────────────
// Enonic-XP Multirepo/Repo Connection Query Aggregations Parameter
//──────────────────────────────────────────────────────────────────────────────
export type Aggregation =

@@ -140,3 +201,3 @@ | TermsAggregation

| MaxAggregation
| ValueCountAggregation;
| ValueCountAggregation

@@ -150,26 +211,29 @@

? Record<AggregationKeys, Aggregation>
: never;
: never
//──────────────────────────────────────────────────────────────────────────────
// Enonic-XP Multirepo/Repo Connection Query Result Aggregations Property
//──────────────────────────────────────────────────────────────────────────────
export interface AggregationsResponseBucket {
docCount: number;
key: string;
from?: number | string;
to?: number | string;
export type AggregationsResponseBucket = {
docCount :number
key :string
from ?:number | string
to ?:number | string
[key2: string]: any; // sub aggregations
[key2 :string] :any // sub aggregations
}
export interface AggregationsResponseEntry {
buckets: Array<AggregationsResponseBucket>;
export type AggregationsResponseEntry = {
buckets :Array<AggregationsResponseBucket>
// Max, Min, Value Count
value? :number
value ?:number
// Stats
avg? :number
count? :number
max? :number
min? :number
sum? :number
avg ?:number
count ?:number
max ?:number
min ?:number
sum ?:number
}

@@ -186,2 +250,2 @@

}*/
: never;
: never

@@ -12,2 +12,3 @@ import type {Aggregation} from './Aggregation.d';

Aggregation,
AggregationForGraphQLSchemaQueryArgsInputType,
Aggregations,

@@ -17,8 +18,15 @@ AggregationsResponse,

AggregationsResponseEntry,
AggregationType,
DateHistogramAggregation,
DateHistogramAggregationParams,
DateRangeAggregation,
DateRangeAggregationParams,
GeoDistanceAggregation,
GeoDistanceAggregationParams,
MaxAggregation,
MaxAggregationParams,
MinAggregation,
GeoDistanceAggregation,
MinAggregationParams,
RangeAggregation,
RangeAggregationParams,
StatsAggregation,

@@ -28,3 +36,4 @@ StatsAggregationParams,

TermsAggregationParams,
ValueCountAggregation
ValueCountAggregation,
ValueCountAggregationParams
} from './Aggregation.d';

@@ -31,0 +40,0 @@ export type {

@@ -64,3 +64,3 @@ {

},
"version": "0.38.2"
"version": "0.38.3"
}

@@ -37,2 +37,3 @@ import type {

Aggregation,
AggregationForGraphQLSchemaQueryArgsInputType,
Aggregations,

@@ -42,2 +43,3 @@ AggregationsResponse,

AggregationsResponseEntry,
AggregationType,
AnalysedIndexType,

@@ -49,5 +51,8 @@ BasicFilters,

DateHistogramAggregation,
DateHistogramAggregationParams,
DateRangeAggregation,
DateRangeAggregationParams,
ExistsFilter,
GeoDistanceAggregation,
GeoDistanceAggregationParams,
HasValueFilter,

@@ -57,3 +62,5 @@ Highlight,

MaxAggregation,
MaxAggregationParams,
MinAggregation,
MinAggregationParams,
NodeQueryParams,

@@ -68,2 +75,3 @@ NotExistsFilter,

RangeAggregation,
RangeAggregationParams,
SortDirection,

@@ -85,3 +93,4 @@ SortDirectionAscending,

TermsAggregationParams,
ValueCountAggregation
ValueCountAggregation,
ValueCountAggregationParams
} from './query/index.d';

@@ -88,0 +97,0 @@ export type {

@@ -1,103 +0,164 @@

export interface TermsAggregationParams {
field :string;
order? :string; // _term ASC
size? :number; // Default to 10
minDocCount? :number;
//──────────────────────────────────────────────────────────────────────────────
// Params
//──────────────────────────────────────────────────────────────────────────────
export type DateHistogramAggregationParams = {
field :string
interval :string
minDocCount :number
format :string
}
export interface TermsAggregation {
terms :TermsAggregationParams;
aggregations? :{
[subaggregation :string] :Aggregation;
};
export type DateRangeAggregationParams = {
field :string
format :string
ranges :Array<{
from ?:string
to ?:string
}>
}
export interface StatsAggregationParams {
field :string;
order? :string;
size? :number;
export type GeoDistanceAggregationParams = {
field :string
ranges ?:Array<{
from ?:number
to ?:number
}>
range ?:{
from :number
to :number
}
unit :string
origin :{
lat :string
lon :string
}
}
export interface StatsAggregation {
stats :StatsAggregationParams;
aggregations? :{
[subaggregation :string] :Aggregation;
};
type MaxAggregationParams = {
field :string
}
export interface RangeAggregation {
range: {
field: string;
ranges?: Array<{
from?: number;
to?: number;
}>;
range?: {
from: number;
to: number;
};
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
type MinAggregationParams = {
field :string
}
export interface GeoDistanceAggregation {
geoDistance: {
field: string;
ranges?: Array<{
from?: number;
to?: number;
}>;
range?: {
from: number;
to: number;
};
unit: string;
origin: {
lat: string;
lon: string;
};
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
type RangeAggregationParams = {
field :string
ranges ?:Array<{
from ?:number
to ?:number
}>
range ?:{
from :number
to :number
}
}
export interface DateRangeAggregation {
dateRange: {
field: string;
format: string;
ranges: Array<{
from?: string;
to?: string;
}>;
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
export type StatsAggregationParams = {
// Required
field :string
// Optional
order ?:string // Default to ?
size ?:number // Default to ?
}
export interface DateHistogramAggregation {
dateHistogram: {
field: string;
interval: string;
minDocCount: number;
format: string;
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
export type TermsAggregationParams = {
// Required
field :string
// Optional
minDocCount ?:number
order ?:string // Default to '_term ASC'
size ?:number // Default to 10
}
export type ValueCountAggregationParams = {
field :string
}
//──────────────────────────────────────────────────────────────────────────────
// Enonic-XP Multirepo/Repo Connection Query Aggregations Parameter Aggregation Type Names
//──────────────────────────────────────────────────────────────────────────────
export type AggregationType = 'count'
|'dateHistogram'
|'dateRange'
|'geoDistance'
|'max'
|'min'
|'range'
|'stats'
|'terms'
//──────────────────────────────────────────────────────────────────────────────
// GraphQL
//──────────────────────────────────────────────────────────────────────────────
// GraphQL Schema -> Query -> Args -> Input Type -> Array<...>
export type AggregationForGraphQLSchemaQueryArgsInputType = {
name :string
count ?:ValueCountAggregationParams
dateHistogram ?:DateHistogramAggregationParams
dateRange ?:DateRangeAggregationParams
geoDistance ?:GeoDistanceAggregationParams
max ?:MaxAggregationParams
min ?:MinAggregationParams
range ?:RangeAggregationParams
stats ?:StatsAggregationParams
terms ?:TermsAggregationParams
subAggregations ?:Array<AggregationForGraphQLSchemaQueryArgsInputType>
}
//──────────────────────────────────────────────────────────────────────────────
// Aggregation types
//──────────────────────────────────────────────────────────────────────────────
export type DateHistogramAggregation = {
dateHistogram :DateHistogramAggregationParams
aggregations ?: {
[subaggregation :string]: Aggregation
}
}
export type DateRangeAggregation = {
dateRange: DateRangeAggregationParams
aggregations ?: {
[subaggregation :string]: Aggregation
}
}
export type GeoDistanceAggregation = {
geoDistance :GeoDistanceAggregationParams
aggregations ?:{
[subaggregation :string]: Aggregation
}
}
export type RangeAggregation = {
range :RangeAggregationParams
aggregations ?: {
[subaggregation :string] :Aggregation
}
}
export type StatsAggregation = {
stats :StatsAggregationParams
aggregations ?:{
[subaggregation :string] :Aggregation
}
}
export type TermsAggregation = {
terms :TermsAggregationParams
aggregations ?:{
[subaggregation :string] :Aggregation
}
}
/**
* @since 7.7.0
*/
export interface MinAggregation {
min: {
field: string;
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
export type MinAggregation = {
min :MinAggregationParams
aggregations ?:{
[subaggregation :string] :Aggregation
}
}

@@ -108,9 +169,7 @@

*/
export interface MaxAggregation {
max: {
field: string;
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
export type MaxAggregation = {
max :MaxAggregationParams
aggregations ?:{
[subaggregation :string] :Aggregation
}
}

@@ -121,11 +180,13 @@

*/
export interface ValueCountAggregation {
count: {
field: string;
};
aggregations?: {
[subaggregation: string]: Aggregation;
};
export type ValueCountAggregation = {
count :ValueCountAggregationParams
aggregations ?:{
[subaggregation :string] :Aggregation
}
}
//──────────────────────────────────────────────────────────────────────────────
// Enonic-XP Multirepo/Repo Connection Query Aggregations Parameter
//──────────────────────────────────────────────────────────────────────────────
export type Aggregation =

@@ -140,3 +201,3 @@ | TermsAggregation

| MaxAggregation
| ValueCountAggregation;
| ValueCountAggregation

@@ -150,26 +211,29 @@

? Record<AggregationKeys, Aggregation>
: never;
: never
//──────────────────────────────────────────────────────────────────────────────
// Enonic-XP Multirepo/Repo Connection Query Result Aggregations Property
//──────────────────────────────────────────────────────────────────────────────
export interface AggregationsResponseBucket {
docCount: number;
key: string;
from?: number | string;
to?: number | string;
export type AggregationsResponseBucket = {
docCount :number
key :string
from ?:number | string
to ?:number | string
[key2: string]: any; // sub aggregations
[key2 :string] :any // sub aggregations
}
export interface AggregationsResponseEntry {
buckets: Array<AggregationsResponseBucket>;
export type AggregationsResponseEntry = {
buckets :Array<AggregationsResponseBucket>
// Max, Min, Value Count
value? :number
value ?:number
// Stats
avg? :number
count? :number
max? :number
min? :number
sum? :number
avg ?:number
count ?:number
max ?:number
min ?:number
sum ?:number
}

@@ -186,2 +250,2 @@

}*/
: never;
: never

@@ -12,2 +12,3 @@ import type {Aggregation} from './Aggregation.d';

Aggregation,
AggregationForGraphQLSchemaQueryArgsInputType,
Aggregations,

@@ -17,8 +18,15 @@ AggregationsResponse,

AggregationsResponseEntry,
AggregationType,
DateHistogramAggregation,
DateHistogramAggregationParams,
DateRangeAggregation,
DateRangeAggregationParams,
GeoDistanceAggregation,
GeoDistanceAggregationParams,
MaxAggregation,
MaxAggregationParams,
MinAggregation,
GeoDistanceAggregation,
MinAggregationParams,
RangeAggregation,
RangeAggregationParams,
StatsAggregation,

@@ -28,3 +36,4 @@ StatsAggregationParams,

TermsAggregationParams,
ValueCountAggregation
ValueCountAggregation,
ValueCountAggregationParams
} from './Aggregation.d';

@@ -31,0 +40,0 @@ export type {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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