@sanity/media-library-types 0.0.1 → 0.0.2
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.mts +6 -6
- package/lib/index.d.ts +6 -6
- package/package.json +1 -1
- package/src/assets.ts +2 -105
- package/src/schema.types.ts +1 -1
package/lib/index.d.mts
CHANGED
|
@@ -109,7 +109,7 @@ export declare interface Asset<
|
|
|
109
109
|
currentVersion: {
|
|
110
110
|
_ref: string
|
|
111
111
|
}
|
|
112
|
-
aspects?: unknown
|
|
112
|
+
aspects?: Record<string, unknown>
|
|
113
113
|
versions: AssetVersion<AssetInstance>[]
|
|
114
114
|
collections: SanityAssetCollection[]
|
|
115
115
|
_createdAt: string
|
|
@@ -1910,7 +1910,7 @@ declare type SanityAsset = {
|
|
|
1910
1910
|
_updatedAt: string
|
|
1911
1911
|
_rev: string
|
|
1912
1912
|
title?: string
|
|
1913
|
-
aspects?: unknown
|
|
1913
|
+
aspects?: Record<string, unknown>
|
|
1914
1914
|
currentVersion: {
|
|
1915
1915
|
_ref: string
|
|
1916
1916
|
_type: 'reference'
|
|
@@ -1992,7 +1992,7 @@ declare interface SanityDocument {
|
|
|
1992
1992
|
[key: string]: unknown
|
|
1993
1993
|
}
|
|
1994
1994
|
|
|
1995
|
-
|
|
1995
|
+
declare type SanityFileAsset = {
|
|
1996
1996
|
_id: string
|
|
1997
1997
|
_type: 'sanity.fileAsset'
|
|
1998
1998
|
_createdAt: string
|
|
@@ -2028,7 +2028,7 @@ export declare type SanityFileAsset = {
|
|
|
2028
2028
|
url: string
|
|
2029
2029
|
}
|
|
2030
2030
|
|
|
2031
|
-
|
|
2031
|
+
declare type SanityImageAsset = {
|
|
2032
2032
|
_id: string
|
|
2033
2033
|
_type: 'sanity.imageAsset'
|
|
2034
2034
|
_createdAt: string
|
|
@@ -2124,7 +2124,7 @@ declare type SanityImagePaletteSwatch = {
|
|
|
2124
2124
|
title?: string
|
|
2125
2125
|
}
|
|
2126
2126
|
|
|
2127
|
-
|
|
2127
|
+
declare type SanityVideoAsset = {
|
|
2128
2128
|
_id: string
|
|
2129
2129
|
_type: 'sanity.videoAsset'
|
|
2130
2130
|
_createdAt: string
|
|
@@ -2161,7 +2161,7 @@ export declare type SanityVideoAsset = {
|
|
|
2161
2161
|
metadata: SanityVideoMetadata
|
|
2162
2162
|
}
|
|
2163
2163
|
|
|
2164
|
-
|
|
2164
|
+
declare type SanityVideoMetadata = {
|
|
2165
2165
|
_type: 'sanity.videoMetadata'
|
|
2166
2166
|
muxAssetId: string
|
|
2167
2167
|
muxPlaybackIds: Array<{
|
package/lib/index.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ export declare interface Asset<
|
|
|
109
109
|
currentVersion: {
|
|
110
110
|
_ref: string
|
|
111
111
|
}
|
|
112
|
-
aspects?: unknown
|
|
112
|
+
aspects?: Record<string, unknown>
|
|
113
113
|
versions: AssetVersion<AssetInstance>[]
|
|
114
114
|
collections: SanityAssetCollection[]
|
|
115
115
|
_createdAt: string
|
|
@@ -1910,7 +1910,7 @@ declare type SanityAsset = {
|
|
|
1910
1910
|
_updatedAt: string
|
|
1911
1911
|
_rev: string
|
|
1912
1912
|
title?: string
|
|
1913
|
-
aspects?: unknown
|
|
1913
|
+
aspects?: Record<string, unknown>
|
|
1914
1914
|
currentVersion: {
|
|
1915
1915
|
_ref: string
|
|
1916
1916
|
_type: 'reference'
|
|
@@ -1992,7 +1992,7 @@ declare interface SanityDocument {
|
|
|
1992
1992
|
[key: string]: unknown
|
|
1993
1993
|
}
|
|
1994
1994
|
|
|
1995
|
-
|
|
1995
|
+
declare type SanityFileAsset = {
|
|
1996
1996
|
_id: string
|
|
1997
1997
|
_type: 'sanity.fileAsset'
|
|
1998
1998
|
_createdAt: string
|
|
@@ -2028,7 +2028,7 @@ export declare type SanityFileAsset = {
|
|
|
2028
2028
|
url: string
|
|
2029
2029
|
}
|
|
2030
2030
|
|
|
2031
|
-
|
|
2031
|
+
declare type SanityImageAsset = {
|
|
2032
2032
|
_id: string
|
|
2033
2033
|
_type: 'sanity.imageAsset'
|
|
2034
2034
|
_createdAt: string
|
|
@@ -2124,7 +2124,7 @@ declare type SanityImagePaletteSwatch = {
|
|
|
2124
2124
|
title?: string
|
|
2125
2125
|
}
|
|
2126
2126
|
|
|
2127
|
-
|
|
2127
|
+
declare type SanityVideoAsset = {
|
|
2128
2128
|
_id: string
|
|
2129
2129
|
_type: 'sanity.videoAsset'
|
|
2130
2130
|
_createdAt: string
|
|
@@ -2161,7 +2161,7 @@ export declare type SanityVideoAsset = {
|
|
|
2161
2161
|
metadata: SanityVideoMetadata
|
|
2162
2162
|
}
|
|
2163
2163
|
|
|
2164
|
-
|
|
2164
|
+
declare type SanityVideoMetadata = {
|
|
2165
2165
|
_type: 'sanity.videoMetadata'
|
|
2166
2166
|
muxAssetId: string
|
|
2167
2167
|
muxPlaybackIds: Array<{
|
package/package.json
CHANGED
package/src/assets.ts
CHANGED
|
@@ -1,109 +1,6 @@
|
|
|
1
|
-
import { SanityAsset, SanityAssetCollection, SanityAssetVersion, SanityImageMetadata } from "./schema.types"
|
|
1
|
+
import { SanityAsset, SanityAssetCollection, SanityAssetVersion, SanityFileAsset, SanityImageAsset, SanityImageMetadata, SanityVideoAsset } from "./schema.types"
|
|
2
2
|
import {type FieldDefinition} from '@sanity/types'
|
|
3
3
|
|
|
4
|
-
export type SanityVideoAsset = {
|
|
5
|
-
_id: string
|
|
6
|
-
_type: 'sanity.videoAsset'
|
|
7
|
-
_createdAt: string
|
|
8
|
-
_updatedAt: string
|
|
9
|
-
_rev: string
|
|
10
|
-
title?: string
|
|
11
|
-
description?: Array<{
|
|
12
|
-
children?: Array<{
|
|
13
|
-
marks?: Array<string>
|
|
14
|
-
text?: string
|
|
15
|
-
_type: 'span'
|
|
16
|
-
_key: string
|
|
17
|
-
}>
|
|
18
|
-
style?: 'normal' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'blockquote'
|
|
19
|
-
listItem?: 'bullet' | 'number'
|
|
20
|
-
markDefs?: Array<{
|
|
21
|
-
href?: string
|
|
22
|
-
_type: 'link'
|
|
23
|
-
_key: string
|
|
24
|
-
}>
|
|
25
|
-
level?: number
|
|
26
|
-
_type: 'block'
|
|
27
|
-
_key: string
|
|
28
|
-
}>
|
|
29
|
-
state: string
|
|
30
|
-
sha1hash?: string
|
|
31
|
-
mimeType?: string
|
|
32
|
-
originalFilename?: string
|
|
33
|
-
size?: number
|
|
34
|
-
uploadId?: string
|
|
35
|
-
path?: string
|
|
36
|
-
url?: string
|
|
37
|
-
extension?: string
|
|
38
|
-
metadata: SanityVideoMetadata
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type SanityVideoMetadata = {
|
|
42
|
-
_type: 'sanity.videoMetadata'
|
|
43
|
-
muxAssetId: string
|
|
44
|
-
muxPlaybackIds: Array<{
|
|
45
|
-
_id: string
|
|
46
|
-
_type: string
|
|
47
|
-
policy: string
|
|
48
|
-
_key: string
|
|
49
|
-
}>
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export type SanityFileAsset = {
|
|
53
|
-
_id: string
|
|
54
|
-
_type: 'sanity.fileAsset'
|
|
55
|
-
_createdAt: string
|
|
56
|
-
_updatedAt: string
|
|
57
|
-
_rev: string
|
|
58
|
-
title?: string
|
|
59
|
-
description?: Array<{
|
|
60
|
-
children?: Array<{
|
|
61
|
-
marks?: Array<string>
|
|
62
|
-
text?: string
|
|
63
|
-
_type: 'span'
|
|
64
|
-
_key: string
|
|
65
|
-
}>
|
|
66
|
-
style?: 'normal' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'blockquote'
|
|
67
|
-
listItem?: 'bullet' | 'number'
|
|
68
|
-
markDefs?: Array<{
|
|
69
|
-
href?: string
|
|
70
|
-
_type: 'link'
|
|
71
|
-
_key: string
|
|
72
|
-
}>
|
|
73
|
-
level?: number
|
|
74
|
-
_type: 'block'
|
|
75
|
-
_key: string
|
|
76
|
-
}>
|
|
77
|
-
state: string
|
|
78
|
-
sha1hash?: string
|
|
79
|
-
mimeType?: string
|
|
80
|
-
originalFilename?: string
|
|
81
|
-
size?: number
|
|
82
|
-
uploadId?: string
|
|
83
|
-
path: string
|
|
84
|
-
extension?: string
|
|
85
|
-
url: string
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export type SanityImageAsset = {
|
|
89
|
-
_id: string
|
|
90
|
-
_type: 'sanity.imageAsset'
|
|
91
|
-
_createdAt: string
|
|
92
|
-
_updatedAt: string
|
|
93
|
-
_rev: string
|
|
94
|
-
altText?: string
|
|
95
|
-
state: string
|
|
96
|
-
sha1hash?: string
|
|
97
|
-
mimeType?: string
|
|
98
|
-
originalFilename?: string
|
|
99
|
-
size?: number
|
|
100
|
-
uploadId?: string
|
|
101
|
-
path?: string
|
|
102
|
-
extension?: string
|
|
103
|
-
url: string
|
|
104
|
-
metadata: SanityImageMetadata
|
|
105
|
-
}
|
|
106
|
-
|
|
107
4
|
export interface AssetVersion<AssetInstance extends AssetInstanceDocument = AssetInstanceDocument> {
|
|
108
5
|
_key: string
|
|
109
6
|
_type: SanityAssetVersion['_type']
|
|
@@ -122,7 +19,7 @@ export interface Asset<AssetInstance extends AssetInstanceDocument = AssetInstan
|
|
|
122
19
|
currentVersion: {
|
|
123
20
|
_ref: string
|
|
124
21
|
}
|
|
125
|
-
aspects?: unknown
|
|
22
|
+
aspects?: Record<string, unknown>
|
|
126
23
|
versions: AssetVersion<AssetInstance>[]
|
|
127
24
|
collections: SanityAssetCollection[]
|
|
128
25
|
_createdAt: string
|