@enonic-types/lib-content 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.
Files changed (2) hide show
  1. package/content.d.ts +21 -9
  2. 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'];
@@ -302,16 +302,24 @@ export interface FulltextDslExpression {
302
302
  fields: string[];
303
303
  query: string;
304
304
  operator?: DslOperator;
305
+ boost?: number;
305
306
  }
306
307
  export interface NgramDslExpression {
307
308
  fields: string[];
308
309
  query: string;
309
310
  operator?: DslOperator;
311
+ boost?: number;
310
312
  }
311
313
  export interface StemmedDslExpression {
312
314
  fields: string[];
313
315
  query: string;
314
316
  language: string;
317
+ operator?: DslOperator;
318
+ boost?: number;
319
+ }
320
+ export interface ExistsDslExpression {
321
+ field: string;
322
+ boost?: number;
315
323
  }
316
324
  export interface BooleanDslExpression {
317
325
  should?: QueryDsl | QueryDsl[];
@@ -324,6 +332,8 @@ export declare type QueryDsl = {
324
332
  boolean: BooleanDslExpression;
325
333
  } | {
326
334
  ngram: NgramDslExpression;
335
+ } | {
336
+ stemmed: StemmedDslExpression;
327
337
  } | {
328
338
  fulltext: FulltextDslExpression;
329
339
  } | {
@@ -338,6 +348,8 @@ export declare type QueryDsl = {
338
348
  in: InDslExpression;
339
349
  } | {
340
350
  term: TermDslExpression;
351
+ } | {
352
+ exists: ExistsDslExpression;
341
353
  };
342
354
  export declare type SortDirection = 'ASC' | 'DESC';
343
355
  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 +402,12 @@ export interface GetAttachmentStreamParams {
390
402
  *
391
403
  * @returns {*} Stream of the attachment data.
392
404
  */
393
- export declare function getAttachmentStream(params: GetAttachmentStreamParams): object | null;
405
+ export declare function getAttachmentStream(params: GetAttachmentStreamParams): ByteSource | null;
394
406
  export interface AddAttachmentParam {
395
407
  key: string;
396
408
  name: string;
397
409
  mimeType: string;
398
- data: object;
410
+ data: ByteSource;
399
411
  label?: string;
400
412
  }
401
413
  /**
@@ -659,9 +671,9 @@ export interface CreateMediaParams {
659
671
  name: string;
660
672
  parentPath?: string;
661
673
  mimeType?: string;
662
- focalX?: string;
663
- focalY?: string;
664
- data: string;
674
+ focalX?: number;
675
+ focalY?: number;
676
+ data: ByteSource;
665
677
  idGenerator?: (v: string) => string;
666
678
  }
667
679
  /**
@@ -740,7 +752,7 @@ export interface SetPermissionsParams {
740
752
  }
741
753
  export interface Permissions {
742
754
  inheritsPermissions: boolean;
743
- permissions?: Permission[];
755
+ permissions?: AccessControlEntry[];
744
756
  }
745
757
  /**
746
758
  * Sets permissions on a content.
@@ -772,7 +784,7 @@ export interface GetPermissionsParams {
772
784
  */
773
785
  export declare function getPermissions(params: GetPermissionsParams): Permissions | null;
774
786
  export interface Icon {
775
- data: object;
787
+ data: ByteSource;
776
788
  mimeType: string;
777
789
  modifiedTime: string;
778
790
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic-types/lib-content",
3
- "version": "7.11.0",
3
+ "version": "7.11.2",
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.0"
30
+ "@enonic-types/core": "7.11.2"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"