@platecms/delta-client 1.6.1 → 1.7.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.
Files changed (2) hide show
  1. package/README.md +11 -5
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -44,7 +44,7 @@ const articleSchema = schema.buildingBlock({
44
44
  // Array of items
45
45
  tags: schema.array(schema.tag()),
46
46
  // For related content items
47
- author: schema.contentItem({
47
+ author: schema.relatedContentItem({
48
48
  name: schema.string(),
49
49
  email: schema.string(),
50
50
  }),
@@ -85,14 +85,20 @@ const article = articleSchema.parse(buildingBlockFieldFulfillments);
85
85
 
86
86
  #### Available Types
87
87
 
88
+ Root schemas
89
+
90
+ - **`schema.contentItem()`** - Content items structures
91
+ - **`schema.buildingBlock()`** - Building block structures
92
+
93
+ Chainable or seperate schemas from the root schemas
94
+
88
95
  - **`schema.string()`** - String values
89
96
  - **`schema.number()`** - Numeric values
90
97
  - **`schema.boolean()`** - Boolean values
91
98
  - **`schema.date()`** - Date values
92
99
  - **`schema.asset()`** - Asset references
93
100
  - **`schema.smartText()`** - Rich text content
94
- - **`schema.contentItem()`** - Related content items
95
- - **`schema.buildingBlock()`** - Building block structures
101
+ - **`schema.relatedContentItem()`** - Related content items
96
102
  - **`schema.array()`** - Arrays of any schema
97
103
  - **`schema.gridPlacement()`** - Grid layout placements
98
104
  - **`schema.contentType()`** - Content type references
@@ -118,11 +124,11 @@ const tagsSchema = schema.array(
118
124
 
119
125
  // Nested structures
120
126
  const pageSchema = schema.buildingBlock({
121
- hero: schema.contentItem({
127
+ hero: schema.relatedContentItem({
122
128
  title: schema.string(),
123
129
  image: schema.asset(),
124
130
  }),
125
- sections: schema.array(schema.contentItem({
131
+ sections: schema.array(schema.relatedContentItem({
126
132
  type: schema.string(),
127
133
  content: schema.smartText(),
128
134
  })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platecms/delta-client",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "description": "Utilities and functions to interact with the Delta CMS.",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -18,7 +18,7 @@
18
18
  "src/**/*"
19
19
  ],
20
20
  "peerDependencies": {
21
- "@platecms/delta-cast": "1.6.1",
21
+ "@platecms/delta-cast": "1.7.0",
22
22
  "@graphql-typed-document-node/core": "3.2.0",
23
23
  "graphql": "16.11.0",
24
24
  "tslib": "2.8.1",