@enonic-types/lib-node 7.11.0-RC4 → 7.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/node.d.ts +22 -6
  2. package/package.json +2 -2
package/node.d.ts CHANGED
@@ -11,8 +11,8 @@ declare global {
11
11
  '/lib/xp/node': typeof import('./node');
12
12
  }
13
13
  }
14
- import type { PrincipalKey } from '@enonic-types/core';
15
- export type { PrincipalKey, UserKey, GroupKey, RoleKey } from '@enonic-types/core';
14
+ import type { ByteSource, PrincipalKey } from '@enonic-types/core';
15
+ export type { ByteSource, GroupKey, PrincipalKey, RoleKey, UserKey, } from '@enonic-types/core';
16
16
  declare type WithRequiredProperty<T, K extends keyof T> = T & {
17
17
  [P in K]-?: T[P];
18
18
  };
@@ -251,6 +251,11 @@ export interface StemmedDslExpression {
251
251
  fields: string[];
252
252
  query: string;
253
253
  language: string;
254
+ operator?: DslOperator;
255
+ }
256
+ export interface ExistsDslExpression {
257
+ field: string;
258
+ boost?: number;
254
259
  }
255
260
  export interface BooleanDslExpression {
256
261
  should?: QueryDsl | QueryDsl[];
@@ -279,6 +284,8 @@ export declare type QueryDsl = {
279
284
  in: InDslExpression;
280
285
  } | {
281
286
  term: TermDslExpression;
287
+ } | {
288
+ exists: ExistsDslExpression;
282
289
  };
283
290
  export declare type SortDirection = 'ASC' | 'DESC';
284
291
  export declare type DistanceUnit = 'm' | 'meters' | 'in' | 'inch' | 'yd' | 'yards' | 'ft' | 'feet' | 'km' | 'kilometers' | 'NM' | 'nmi' | 'nauticalmiles' | 'mm' | 'millimeters' | 'cm' | 'centimeters' | 'mi' | 'miles';
@@ -335,7 +342,7 @@ export interface NodeMultiRepoQueryResult {
335
342
  export declare type CreateNodeParams<NodeData = unknown> = {
336
343
  _name?: string;
337
344
  _parentPath?: string;
338
- _indexConfig?: Partial<NodeIndexConfig>;
345
+ _indexConfig?: Partial<NodeIndexConfigParams>;
339
346
  _permissions?: AccessControlEntry[];
340
347
  _inheritsPermissions?: boolean;
341
348
  _manualOrderValue?: number;
@@ -409,7 +416,7 @@ export interface NodeVersion {
409
416
  nodeId: string;
410
417
  nodePath: string;
411
418
  timestamp: string;
412
- commitId: string;
419
+ commitId?: string;
413
420
  }
414
421
  export interface NodeVersionsQueryResult {
415
422
  total: number;
@@ -463,13 +470,22 @@ export interface AccessControlEntry {
463
470
  deny?: Permission[];
464
471
  }
465
472
  export interface NodeIndexConfig {
466
- analyzer: string;
473
+ analyzer?: string;
467
474
  default?: NodeConfigEntry;
468
475
  configs: {
469
476
  path: string;
470
477
  config: NodeConfigEntry;
471
478
  }[];
472
479
  }
480
+ export declare type NodeIndexConfigTemplates = 'none' | 'byType' | 'fulltext' | 'path' | 'minimal';
481
+ export interface NodeIndexConfigParams {
482
+ analyzer?: string;
483
+ default?: Partial<NodeConfigEntry> | NodeIndexConfigTemplates;
484
+ configs?: {
485
+ path: string;
486
+ config: Partial<NodeConfigEntry> | NodeIndexConfigTemplates;
487
+ }[];
488
+ }
473
489
  export interface NodeConfigEntry {
474
490
  decideByType: boolean;
475
491
  enabled: boolean;
@@ -505,7 +521,7 @@ export interface RepoConnection {
505
521
  delete(...keys: (string | string[])[]): string[];
506
522
  push(params: PushNodeParams): PushNodesResult;
507
523
  diff(params: DiffBranchesParams): DiffBranchesResult;
508
- getBinary(params: GetBinaryParams): object;
524
+ getBinary(params: GetBinaryParams): ByteSource;
509
525
  move(params: MoveNodeParams): boolean;
510
526
  setChildOrder<NodeData = Record<string, unknown>>(params: SetChildOrderParams): Node<NodeData>;
511
527
  query(params: QueryNodeParams): NodeQueryResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic-types/lib-node",
3
- "version": "7.11.0-RC4",
3
+ "version": "7.11.1",
4
4
  "description": "Type definitions for lib-node.",
5
5
  "types": "node.d.ts",
6
6
  "files": [
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/enonic/xp/tree/master#readme",
29
29
  "dependencies": {
30
- "@enonic-types/core": "7.11.0-RC4"
30
+ "@enonic-types/core": "7.11.1"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"