@enonic-types/lib-content 8.0.0-A3 → 8.0.0-B2

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 +18 -15
  2. package/package.json +2 -2
package/content.d.ts CHANGED
@@ -11,7 +11,7 @@ declare global {
11
11
  '/lib/xp/content': typeof import('./content');
12
12
  }
13
13
  }
14
- import { Aggregations, AggregationsResult, AggregationsToAggregationResults, Attachment, ByteSource, Content, ContentComponent, ContentComponentConstraint, ContentInheritValue, Filter, FormItem, Highlight, HighlightResult, Layout, LayoutComponent, Page, PageComponent, Part, PartComponent, PublishInfo, QueryDsl, SortDsl, UserKey, ValidationError, Workflow, WorkflowState, ConfigValue } from '@enonic-types/core';
14
+ import { Aggregations, AggregationsResult, AggregationsToAggregationResults, Attachment, ByteSource, ConfigValue, Content, ContentComponent, ContentComponentConstraint, ContentInheritValue, Filter, FormItem, Highlight, HighlightResult, Layout, LayoutComponent, Page, PageComponent, Part, PartComponent, PublishInfo, QueryDsl, SortDsl, UserKey, ValidationError, Workflow, WorkflowState } from '@enonic-types/core';
15
15
  export type { Aggregation, Aggregations, AggregationsResult, Attachment, BooleanDslExpression, BooleanFilter, Bucket, BucketsAggregationResult, BucketsAggregationsUnion, ByteSource, Component, Content, ContentComponent, ContentComponentConstraint, DateBucket, DateHistogramAggregation, DateRange, DateRangeAggregation, DistanceUnit, DslOperator, DslQueryType, ExistsDslExpression, ExistsFilter, FieldSortDsl, Filter, FormItem, FormItemFormFragment, FormItemInput, FormItemLayout, FormItemOptionSet, FormItemSet, FulltextDslExpression, GeoDistanceAggregation, GeoDistanceSortDsl, GroupKey, HasValueFilter, Highlight, HighlightResult, HistogramAggregation, IdsFilter, InDslExpression, InputType, LikeDslExpression, MatchAllDslExpression, MaxAggregation, MinAggregation, NgramDslExpression, NotExistsFilter, NumericBucket, NumericRange, NumericRangeAggregation, PathMatchDslExpression, PublishInfo, QueryDsl, RangeDslExpression, Region, RoleKey, ScriptValue, SingleValueMetricAggregationResult, SingleValueMetricAggregationsUnion, SortDirection, SortDsl, StatsAggregation, StatsAggregationResult, StemmedDslExpression, TermDslExpression, TermsAggregation, UserKey, ValueCountAggregation, ValueType, ConfigValue, } from '@enonic-types/core';
16
16
  type Attachments = Content['attachments'];
17
17
  export type PageComponentWhenAutomaticTemplate = Record<string, never>;
@@ -349,7 +349,6 @@ export declare function update<Data extends Record<string, unknown> = Record<str
349
349
  export declare function patch(params: PatchContentParams): PatchContentResult;
350
350
  export interface EditableContentMetadata {
351
351
  source: Content;
352
- language?: string;
353
352
  owner?: string;
354
353
  variantOf?: string;
355
354
  }
@@ -361,7 +360,7 @@ export interface UpdateMetadataResult<Data extends Record<string, unknown> = Rec
361
360
  content: Content<Data, Type>;
362
361
  }
363
362
  /**
364
- * This function updates metadata (language, owner, and variantOf) for a content.
363
+ * This function updates metadata (owner and variantOf) for a content.
365
364
  * The update is applied to both master and draft branches.
366
365
  *
367
366
  * @example-ref examples/content/updateMetadata.js
@@ -460,9 +459,13 @@ export declare function exists(params: ContentExistsParams): boolean;
460
459
  export interface CreateMediaParams {
461
460
  name: string;
462
461
  parentPath?: string;
463
- mimeType?: string;
464
462
  focalX?: number;
465
463
  focalY?: number;
464
+ artist?: string | string[];
465
+ tags?: string | string[];
466
+ caption?: string;
467
+ altText?: string;
468
+ copyright?: string;
466
469
  data: ByteSource;
467
470
  idGenerator?: (v: string) => string;
468
471
  }
@@ -474,9 +477,13 @@ export interface CreateMediaParams {
474
477
  * @param {object} params JSON with the parameters.
475
478
  * @param {string} params.name Name of content.
476
479
  * @param {string} [params.parentPath=/] Path to place content under.
477
- * @param {string} [params.mimeType] Mime-type of the data.
478
- * @param {number} [params.focalX=0.5] Focal point for X axis (if it's an image).
479
- * @param {number} [params.focalY=0.5] Focal point for Y axis (if it's an image).
480
+ * @param {number} [params.focalX] Focal point for X axis (if it's an image).
481
+ * @param {number} [params.focalY] Focal point for Y axis (if it's an image).
482
+ * @param {string|string[]} [params.artist] Artist of the media.
483
+ * @param {string|string[]} [params.tags] Tags of the media.
484
+ * @param {string} [params.caption] Caption of the media.
485
+ * @param {string} [params.altText] Alt text of the media.
486
+ * @param {string} [params.copyright] Copyright of the media.
480
487
  * @param params.data Data (as stream) to use.
481
488
  *
482
489
  * @returns {object} Returns the created media content.
@@ -674,7 +681,6 @@ export interface ModifyMediaParams {
674
681
  copyright?: string;
675
682
  focalX?: number;
676
683
  focalY?: number;
677
- mimeType?: string;
678
684
  tags?: string | string[];
679
685
  workflow?: Workflow;
680
686
  }
@@ -687,7 +693,6 @@ export interface UpdateMediaParams {
687
693
  copyright?: string;
688
694
  focalX?: number;
689
695
  focalY?: number;
690
- mimeType?: string;
691
696
  tags?: string | string[];
692
697
  workflow?: Workflow;
693
698
  }
@@ -699,14 +704,13 @@ export interface UpdateMediaParams {
699
704
  * @param {string} params.key Path or id to the content.
700
705
  * @param {string} params.name Name to the content.
701
706
  * @param {function} params.data Data (as stream) to use.
702
- * @param {string} [params.mimeType] Mime-type of the data.
703
707
  * @param {string|string[]} [params.artist] Artist to the content.
704
708
  * @param {string} [params.caption] Caption to the content.
705
709
  * @param {string} [params.copyright] Copyright to the content.
706
710
  * @param {string|string[]} [params.tags] Tags to the content.
707
711
  * @param {object} [params.workflow] Workflow information to use. Default has state READY and empty check list.
708
- * @param {number} [params.focalX=0.5] Focal point for X axis (if it's an image).
709
- * @param {number} [params.focalY=0.5] Focal point for Y axis (if it's an image).
712
+ * @param {number} [params.focalX] Focal point for X axis (if it's an image).
713
+ * @param {number} [params.focalY] Focal point for Y axis (if it's an image).
710
714
  *
711
715
  * @returns {object} Modified content as JSON.
712
716
  */
@@ -719,14 +723,13 @@ export declare function modifyMedia<Data = Record<string, unknown>, Type extends
719
723
  * @param {string} params.key Path or id to the content.
720
724
  * @param {string} params.name Name to the content.
721
725
  * @param {function} params.data Data (as stream) to use.
722
- * @param {string} [params.mimeType] Mime-type of the data.
723
726
  * @param {string|string[]} [params.artist] Artist to the content.
724
727
  * @param {string} [params.caption] Caption to the content.
725
728
  * @param {string} [params.copyright] Copyright to the content.
726
729
  * @param {string|string[]} [params.tags] Tags to the content.
727
730
  * @param {object} [params.workflow] Workflow information to use. Default has state READY and empty check list.
728
- * @param {number} [params.focalX=0.5] Focal point for X axis (if it's an image).
729
- * @param {number} [params.focalY=0.5] Focal point for Y axis (if it's an image).
731
+ * @param {number} [params.focalX] Focal point for X axis (if it's an image).
732
+ * @param {number} [params.focalY] Focal point for Y axis (if it's an image).
730
733
  *
731
734
  * @returns {object} Modified content as JSON.
732
735
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic-types/lib-content",
3
- "version": "8.0.0-A3",
3
+ "version": "8.0.0-B2",
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": "8.0.0-A3"
30
+ "@enonic-types/core": "8.0.0-B2"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"