@enonic-types/lib-content 7.11.0 → 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.
- package/content.d.ts +18 -9
- package/package.json +2 -2
package/content.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ declare global {
|
|
|
13
13
|
interface XpXData {
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
import type { Content, PublishInfo } from '@enonic-types/core';
|
|
17
|
-
export type { Attachment, PublishInfo, Content, Component, Region } from '@enonic-types/core';
|
|
16
|
+
import type { ByteSource, Content, PublishInfo } from '@enonic-types/core';
|
|
17
|
+
export type { Attachment, ByteSource, PublishInfo, Content, Component, Region, } from '@enonic-types/core';
|
|
18
18
|
declare type Attachments = Content['attachments'];
|
|
19
19
|
declare type ContentInheritType = Content['inherit'];
|
|
20
20
|
declare type Workflow = Content['workflow'];
|
|
@@ -312,6 +312,11 @@ export interface StemmedDslExpression {
|
|
|
312
312
|
fields: string[];
|
|
313
313
|
query: string;
|
|
314
314
|
language: string;
|
|
315
|
+
operator?: DslOperator;
|
|
316
|
+
}
|
|
317
|
+
export interface ExistsDslExpression {
|
|
318
|
+
field: string;
|
|
319
|
+
boost?: number;
|
|
315
320
|
}
|
|
316
321
|
export interface BooleanDslExpression {
|
|
317
322
|
should?: QueryDsl | QueryDsl[];
|
|
@@ -324,6 +329,8 @@ export declare type QueryDsl = {
|
|
|
324
329
|
boolean: BooleanDslExpression;
|
|
325
330
|
} | {
|
|
326
331
|
ngram: NgramDslExpression;
|
|
332
|
+
} | {
|
|
333
|
+
stemmed: StemmedDslExpression;
|
|
327
334
|
} | {
|
|
328
335
|
fulltext: FulltextDslExpression;
|
|
329
336
|
} | {
|
|
@@ -338,6 +345,8 @@ export declare type QueryDsl = {
|
|
|
338
345
|
in: InDslExpression;
|
|
339
346
|
} | {
|
|
340
347
|
term: TermDslExpression;
|
|
348
|
+
} | {
|
|
349
|
+
exists: ExistsDslExpression;
|
|
341
350
|
};
|
|
342
351
|
export declare type SortDirection = 'ASC' | 'DESC';
|
|
343
352
|
export declare type DistanceUnit = 'm' | 'meters' | 'in' | 'inch' | 'yd' | 'yards' | 'ft' | 'feet' | 'km' | 'kilometers' | 'NM' | 'nmi' | 'nauticalmiles' | 'mm' | 'millimeters' | 'cm' | 'centimeters' | 'mi' | 'miles';
|
|
@@ -390,12 +399,12 @@ export interface GetAttachmentStreamParams {
|
|
|
390
399
|
*
|
|
391
400
|
* @returns {*} Stream of the attachment data.
|
|
392
401
|
*/
|
|
393
|
-
export declare function getAttachmentStream(params: GetAttachmentStreamParams):
|
|
402
|
+
export declare function getAttachmentStream(params: GetAttachmentStreamParams): ByteSource | null;
|
|
394
403
|
export interface AddAttachmentParam {
|
|
395
404
|
key: string;
|
|
396
405
|
name: string;
|
|
397
406
|
mimeType: string;
|
|
398
|
-
data:
|
|
407
|
+
data: ByteSource;
|
|
399
408
|
label?: string;
|
|
400
409
|
}
|
|
401
410
|
/**
|
|
@@ -659,9 +668,9 @@ export interface CreateMediaParams {
|
|
|
659
668
|
name: string;
|
|
660
669
|
parentPath?: string;
|
|
661
670
|
mimeType?: string;
|
|
662
|
-
focalX?:
|
|
663
|
-
focalY?:
|
|
664
|
-
data:
|
|
671
|
+
focalX?: number;
|
|
672
|
+
focalY?: number;
|
|
673
|
+
data: ByteSource;
|
|
665
674
|
idGenerator?: (v: string) => string;
|
|
666
675
|
}
|
|
667
676
|
/**
|
|
@@ -740,7 +749,7 @@ export interface SetPermissionsParams {
|
|
|
740
749
|
}
|
|
741
750
|
export interface Permissions {
|
|
742
751
|
inheritsPermissions: boolean;
|
|
743
|
-
permissions?:
|
|
752
|
+
permissions?: AccessControlEntry[];
|
|
744
753
|
}
|
|
745
754
|
/**
|
|
746
755
|
* Sets permissions on a content.
|
|
@@ -772,7 +781,7 @@ export interface GetPermissionsParams {
|
|
|
772
781
|
*/
|
|
773
782
|
export declare function getPermissions(params: GetPermissionsParams): Permissions | null;
|
|
774
783
|
export interface Icon {
|
|
775
|
-
data:
|
|
784
|
+
data: ByteSource;
|
|
776
785
|
mimeType: string;
|
|
777
786
|
modifiedTime: string;
|
|
778
787
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enonic-types/lib-content",
|
|
3
|
-
"version": "7.11.
|
|
3
|
+
"version": "7.11.1",
|
|
4
4
|
"description": "Type definitions for lib-content.",
|
|
5
5
|
"types": "content.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.1"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|