@platecms/delta-types 0.12.1 → 1.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platecms/delta-types",
3
- "version": "0.12.1",
3
+ "version": "1.2.0",
4
4
  "description": "This package contains various utility types.",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -17,8 +17,8 @@
17
17
  "src/**/*"
18
18
  ],
19
19
  "peerDependencies": {
20
- "@platecms/delta-cast": "0.12.1",
21
- "@platecms/delta-plate-resource-notation": "0.12.1",
20
+ "@platecms/delta-cast": "1.2.0",
21
+ "@platecms/delta-plate-resource-notation": "1.2.0",
22
22
  "class-transformer": "0.5.1",
23
23
  "reflect-metadata": "0.2.2",
24
24
  "tslib": "2.8.1"
@@ -12,10 +12,24 @@ export enum ContentValueTypeNames {
12
12
  PATH_PART = "PATH_PART",
13
13
  GRID_PLACEMENT = "GRID_PLACEMENT",
14
14
  SMART_TEXT = "SMART_TEXT",
15
- TAG = "TAG",
16
15
  CONTENT_TYPE = "CONTENT_TYPE",
16
+ TAG = "TAG",
17
17
  }
18
18
 
19
+ /**
20
+ * Maps PRN resource types to ContentValueTypeNames for relation values.
21
+ */
22
+ export const PRN_RESOURCE_TYPE_TO_CONTENT_VALUE_TYPE_NAME_MAP: Record<string, ContentValueTypeNames> = {
23
+ /* eslint-disable @typescript-eslint/naming-convention */
24
+ "content-item": ContentValueTypeNames.CONTENT_ITEM,
25
+ "content-type": ContentValueTypeNames.CONTENT_TYPE,
26
+ "grid-placement": ContentValueTypeNames.GRID_PLACEMENT,
27
+ "path-part": ContentValueTypeNames.PATH_PART,
28
+ asset: ContentValueTypeNames.ASSET,
29
+ tag: ContentValueTypeNames.TAG,
30
+ /* eslint-enable @typescript-eslint/naming-convention */
31
+ };
32
+
19
33
  export type ContentValueType = Primitive | PRN | Root;
20
34
 
21
35
  export type ContentValueTypeName<T> = T extends string