@sanity/types 6.16.0-next.28 → 6.16.0-next.82
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/lib/index.d.ts +13 -4
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ interface SanityDocument {
|
|
|
10
10
|
_rev: string;
|
|
11
11
|
/**
|
|
12
12
|
* System-managed attributes. Which fields are present depends on the document (e.g.
|
|
13
|
-
* `
|
|
13
|
+
* `variants`/`scopeId` only exist on version documents, and documents predating the `_system`
|
|
14
14
|
* migration may carry only some of them), hence the partial shape.
|
|
15
15
|
*/
|
|
16
16
|
_system?: Partial<DocumentSystem>;
|
|
@@ -31,7 +31,7 @@ interface SanityDocumentLike {
|
|
|
31
31
|
_rev?: string;
|
|
32
32
|
/**
|
|
33
33
|
* System-managed attributes. Which fields are present depends on the document (e.g.
|
|
34
|
-
* `
|
|
34
|
+
* `variants`/`scopeId` only exist on version documents, and documents predating the `_system`
|
|
35
35
|
* migration may carry only some of them), hence the partial shape.
|
|
36
36
|
*/
|
|
37
37
|
_system?: Partial<DocumentSystem>;
|
|
@@ -67,9 +67,18 @@ interface DocumentSystem {
|
|
|
67
67
|
*/
|
|
68
68
|
release?: DocumentSystemRef;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* References to the variant documents that the version belongs to. Content Lake currently
|
|
71
|
+
* limits this to a single entry, so `variants[0]` is the variant of the document.
|
|
71
72
|
*/
|
|
72
|
-
|
|
73
|
+
variants?: (Omit<DocumentSystemRef, '_weak'> & {
|
|
74
|
+
_key: string;
|
|
75
|
+
})[];
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated Use `variants[0]` instead. This single-reference field remains only on
|
|
78
|
+
* documents that have not been migrated yet; read it as a fallback from `variants[0]`,
|
|
79
|
+
* never as the primary source.
|
|
80
|
+
*/
|
|
81
|
+
variant?: Omit<DocumentSystemRef, '_weak'>;
|
|
73
82
|
/**
|
|
74
83
|
* A weak reference to the group document (aka published document).
|
|
75
84
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/types",
|
|
3
|
-
"version": "6.16.0-next.
|
|
3
|
+
"version": "6.16.0-next.82",
|
|
4
4
|
"description": "Type definitions for common Sanity data structures",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@sanity/client": "^8.6.2",
|
|
37
|
-
"@sanity/media-library-types": "^1.
|
|
37
|
+
"@sanity/media-library-types": "^1.7.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@repo/test-config": "6.9.2",
|