@contentchef/contentchef-types 2.5.4 → 2.5.5
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.
|
@@ -18,7 +18,8 @@ export declare enum SchemaTypeIds {
|
|
|
18
18
|
ONE_FRAGMENT_OF = "oneFragmentOf",
|
|
19
19
|
ONE_LINKED_CONTENT_OF = "oneLinkedContentOf",
|
|
20
20
|
ARRAY = "array",
|
|
21
|
-
SLUG = "slug"
|
|
21
|
+
SLUG = "slug",
|
|
22
|
+
MEDIA = "media"
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* This enum represent al possible long text sub types
|
|
@@ -328,6 +329,15 @@ export declare type SlugConstraints = {
|
|
|
328
329
|
prefix?: string;
|
|
329
330
|
allowSlash?: boolean;
|
|
330
331
|
};
|
|
332
|
+
/**
|
|
333
|
+
* Constraints of a `media` field
|
|
334
|
+
*/
|
|
335
|
+
export declare type MediaConstraints = {
|
|
336
|
+
/**
|
|
337
|
+
* Determines type of media (raw, video, image)
|
|
338
|
+
*/
|
|
339
|
+
type: MediaType;
|
|
340
|
+
};
|
|
331
341
|
/**
|
|
332
342
|
* This type represent the model of a Schema Type Field
|
|
333
343
|
* @template T The type of the field
|
|
@@ -403,6 +413,10 @@ export declare type CloudinaryVideoSchemaType = TranslatableSchemaType<SchemaTyp
|
|
|
403
413
|
* This type represent a cloudinary raw field schema type
|
|
404
414
|
*/
|
|
405
415
|
export declare type CloudinaryRawSchemaType = TranslatableSchemaType<SchemaType<SchemaTypeIds.CLOUDINARY_RAW, {}>>;
|
|
416
|
+
/**
|
|
417
|
+
* Media field schema type
|
|
418
|
+
*/
|
|
419
|
+
export declare type MediaSchemaType = TranslatableSchemaType<SchemaType<SchemaTypeIds.MEDIA, MediaConstraints>>;
|
|
406
420
|
/**
|
|
407
421
|
* This type represent a number field schema type
|
|
408
422
|
* A number field can be indexed and searched when requesting the content
|
|
@@ -451,7 +465,7 @@ export declare type IndexableSchemaTypes = TextSchemaType | LongTextSchemaType |
|
|
|
451
465
|
/**
|
|
452
466
|
* This are all the fields that can be localized
|
|
453
467
|
*/
|
|
454
|
-
export declare type TranslatableSchemaTypes = TextSchemaType | LongTextSchemaType | CloudinaryPublicIdSchemaType | CloudinaryImageSchemaType | CloudinaryVideoSchemaType | CloudinaryRawSchemaType;
|
|
468
|
+
export declare type TranslatableSchemaTypes = TextSchemaType | LongTextSchemaType | CloudinaryPublicIdSchemaType | CloudinaryImageSchemaType | CloudinaryVideoSchemaType | CloudinaryRawSchemaType | MediaSchemaType;
|
|
455
469
|
/**
|
|
456
470
|
* This type group all the schema types of a content definition that are not indexable
|
|
457
471
|
*/
|
|
@@ -22,6 +22,7 @@ var SchemaTypeIds;
|
|
|
22
22
|
SchemaTypeIds["ONE_LINKED_CONTENT_OF"] = "oneLinkedContentOf";
|
|
23
23
|
SchemaTypeIds["ARRAY"] = "array";
|
|
24
24
|
SchemaTypeIds["SLUG"] = "slug";
|
|
25
|
+
SchemaTypeIds["MEDIA"] = "media";
|
|
25
26
|
})(SchemaTypeIds = exports.SchemaTypeIds || (exports.SchemaTypeIds = {}));
|
|
26
27
|
/**
|
|
27
28
|
* This enum represent al possible long text sub types
|
|
@@ -20,6 +20,7 @@ export enum SchemaTypeIds {
|
|
|
20
20
|
ONE_LINKED_CONTENT_OF = 'oneLinkedContentOf',
|
|
21
21
|
ARRAY = 'array',
|
|
22
22
|
SLUG = 'slug',
|
|
23
|
+
MEDIA = 'media',
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
/**
|
|
@@ -360,6 +361,16 @@ export type SlugConstraints = {
|
|
|
360
361
|
allowSlash?: boolean;
|
|
361
362
|
};
|
|
362
363
|
|
|
364
|
+
/**
|
|
365
|
+
* Constraints of a `media` field
|
|
366
|
+
*/
|
|
367
|
+
export type MediaConstraints = {
|
|
368
|
+
/**
|
|
369
|
+
* Determines type of media (raw, video, image)
|
|
370
|
+
*/
|
|
371
|
+
type: MediaType;
|
|
372
|
+
};
|
|
373
|
+
|
|
363
374
|
/**
|
|
364
375
|
* This type represent the model of a Schema Type Field
|
|
365
376
|
* @template T The type of the field
|
|
@@ -440,6 +451,10 @@ export type CloudinaryVideoSchemaType = TranslatableSchemaType<SchemaType<Schema
|
|
|
440
451
|
* This type represent a cloudinary raw field schema type
|
|
441
452
|
*/
|
|
442
453
|
export type CloudinaryRawSchemaType = TranslatableSchemaType<SchemaType<SchemaTypeIds.CLOUDINARY_RAW, {}>>;
|
|
454
|
+
/**
|
|
455
|
+
* Media field schema type
|
|
456
|
+
*/
|
|
457
|
+
export type MediaSchemaType = TranslatableSchemaType<SchemaType<SchemaTypeIds.MEDIA, MediaConstraints>>;
|
|
443
458
|
/**
|
|
444
459
|
* This type represent a number field schema type
|
|
445
460
|
* A number field can be indexed and searched when requesting the content
|
|
@@ -495,7 +510,7 @@ export type IndexableSchemaTypes = TextSchemaType | LongTextSchemaType | LinkedC
|
|
|
495
510
|
/**
|
|
496
511
|
* This are all the fields that can be localized
|
|
497
512
|
*/
|
|
498
|
-
export type TranslatableSchemaTypes = TextSchemaType | LongTextSchemaType | CloudinaryPublicIdSchemaType | CloudinaryImageSchemaType | CloudinaryVideoSchemaType | CloudinaryRawSchemaType;
|
|
513
|
+
export type TranslatableSchemaTypes = TextSchemaType | LongTextSchemaType | CloudinaryPublicIdSchemaType | CloudinaryImageSchemaType | CloudinaryVideoSchemaType | CloudinaryRawSchemaType | MediaSchemaType;
|
|
499
514
|
|
|
500
515
|
/**
|
|
501
516
|
* This type group all the schema types of a content definition that are not indexable
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentchef/contentchef-types",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"description": "ContentChef types",
|
|
5
5
|
"author": "PierpaoloIannone <piannone@byte-code.com>",
|
|
6
6
|
"homepage": "https://github.com/ContentChef/contentchef-management-js-client#readme",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"typescript": "^4.0.5"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "74ebc47fe87871c7e31fb1e8803e31589c7158d4"
|
|
38
38
|
}
|