@enonic-types/lib-node 7.11.0 → 7.11.2
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.
- package/node.d.ts +25 -6
- 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 {
|
|
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
|
};
|
|
@@ -241,16 +241,24 @@ export interface FulltextDslExpression {
|
|
|
241
241
|
fields: string[];
|
|
242
242
|
query: string;
|
|
243
243
|
operator?: DslOperator;
|
|
244
|
+
boost?: number;
|
|
244
245
|
}
|
|
245
246
|
export interface NgramDslExpression {
|
|
246
247
|
fields: string[];
|
|
247
248
|
query: string;
|
|
248
249
|
operator?: DslOperator;
|
|
250
|
+
boost?: number;
|
|
249
251
|
}
|
|
250
252
|
export interface StemmedDslExpression {
|
|
251
253
|
fields: string[];
|
|
252
254
|
query: string;
|
|
253
255
|
language: string;
|
|
256
|
+
operator?: DslOperator;
|
|
257
|
+
boost?: number;
|
|
258
|
+
}
|
|
259
|
+
export interface ExistsDslExpression {
|
|
260
|
+
field: string;
|
|
261
|
+
boost?: number;
|
|
254
262
|
}
|
|
255
263
|
export interface BooleanDslExpression {
|
|
256
264
|
should?: QueryDsl | QueryDsl[];
|
|
@@ -279,6 +287,8 @@ export declare type QueryDsl = {
|
|
|
279
287
|
in: InDslExpression;
|
|
280
288
|
} | {
|
|
281
289
|
term: TermDslExpression;
|
|
290
|
+
} | {
|
|
291
|
+
exists: ExistsDslExpression;
|
|
282
292
|
};
|
|
283
293
|
export declare type SortDirection = 'ASC' | 'DESC';
|
|
284
294
|
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 +345,7 @@ export interface NodeMultiRepoQueryResult {
|
|
|
335
345
|
export declare type CreateNodeParams<NodeData = unknown> = {
|
|
336
346
|
_name?: string;
|
|
337
347
|
_parentPath?: string;
|
|
338
|
-
_indexConfig?: Partial<
|
|
348
|
+
_indexConfig?: Partial<NodeIndexConfigParams>;
|
|
339
349
|
_permissions?: AccessControlEntry[];
|
|
340
350
|
_inheritsPermissions?: boolean;
|
|
341
351
|
_manualOrderValue?: number;
|
|
@@ -409,7 +419,7 @@ export interface NodeVersion {
|
|
|
409
419
|
nodeId: string;
|
|
410
420
|
nodePath: string;
|
|
411
421
|
timestamp: string;
|
|
412
|
-
commitId
|
|
422
|
+
commitId?: string;
|
|
413
423
|
}
|
|
414
424
|
export interface NodeVersionsQueryResult {
|
|
415
425
|
total: number;
|
|
@@ -463,13 +473,22 @@ export interface AccessControlEntry {
|
|
|
463
473
|
deny?: Permission[];
|
|
464
474
|
}
|
|
465
475
|
export interface NodeIndexConfig {
|
|
466
|
-
analyzer
|
|
476
|
+
analyzer?: string;
|
|
467
477
|
default?: NodeConfigEntry;
|
|
468
478
|
configs: {
|
|
469
479
|
path: string;
|
|
470
480
|
config: NodeConfigEntry;
|
|
471
481
|
}[];
|
|
472
482
|
}
|
|
483
|
+
export declare type NodeIndexConfigTemplates = 'none' | 'byType' | 'fulltext' | 'path' | 'minimal';
|
|
484
|
+
export interface NodeIndexConfigParams {
|
|
485
|
+
analyzer?: string;
|
|
486
|
+
default?: Partial<NodeConfigEntry> | NodeIndexConfigTemplates;
|
|
487
|
+
configs?: {
|
|
488
|
+
path: string;
|
|
489
|
+
config: Partial<NodeConfigEntry> | NodeIndexConfigTemplates;
|
|
490
|
+
}[];
|
|
491
|
+
}
|
|
473
492
|
export interface NodeConfigEntry {
|
|
474
493
|
decideByType: boolean;
|
|
475
494
|
enabled: boolean;
|
|
@@ -505,7 +524,7 @@ export interface RepoConnection {
|
|
|
505
524
|
delete(...keys: (string | string[])[]): string[];
|
|
506
525
|
push(params: PushNodeParams): PushNodesResult;
|
|
507
526
|
diff(params: DiffBranchesParams): DiffBranchesResult;
|
|
508
|
-
getBinary(params: GetBinaryParams):
|
|
527
|
+
getBinary(params: GetBinaryParams): ByteSource;
|
|
509
528
|
move(params: MoveNodeParams): boolean;
|
|
510
529
|
setChildOrder<NodeData = Record<string, unknown>>(params: SetChildOrderParams): Node<NodeData>;
|
|
511
530
|
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.
|
|
3
|
+
"version": "7.11.2",
|
|
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.
|
|
30
|
+
"@enonic-types/core": "7.11.2"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|