@sanity/client 6.24.2-canary.0 → 6.24.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/dist/csm.d.cts +34 -99
- package/dist/csm.d.ts +34 -99
- package/dist/index.browser.d.cts +4 -3
- package/dist/index.browser.d.ts +4 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/dist/stega.browser.d.cts +122 -3336
- package/dist/stega.browser.d.ts +122 -3336
- package/dist/stega.d.cts +122 -3336
- package/dist/stega.d.ts +122 -3336
- package/package.json +2 -2
package/dist/csm.d.cts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import {Any} from '@sanity/client'
|
|
2
|
+
import {ClientPerspective} from '@sanity/client'
|
|
3
|
+
import {ContentSourceMap} from '@sanity/client'
|
|
4
|
+
import {ContentSourceMapDocument} from '@sanity/client'
|
|
5
|
+
import {ContentSourceMapDocumentBase} from '@sanity/client'
|
|
6
|
+
import {ContentSourceMapDocuments} from '@sanity/client'
|
|
7
|
+
import {ContentSourceMapDocumentValueSource} from '@sanity/client'
|
|
8
|
+
import {ContentSourceMapLiteralSource} from '@sanity/client'
|
|
9
|
+
import {ContentSourceMapMapping} from '@sanity/client'
|
|
10
|
+
import {ContentSourceMapMappings} from '@sanity/client'
|
|
11
|
+
import {ContentSourceMapPaths} from '@sanity/client'
|
|
12
|
+
import {ContentSourceMapRemoteDocument} from '@sanity/client'
|
|
13
|
+
import {ContentSourceMapSource} from '@sanity/client'
|
|
14
|
+
import {ContentSourceMapUnknownSource} from '@sanity/client'
|
|
15
|
+
import {ContentSourceMapValueMapping} from '@sanity/client'
|
|
16
|
+
import {SanityDocument} from '@sanity/client'
|
|
17
|
+
|
|
18
|
+
export {Any}
|
|
6
19
|
|
|
7
20
|
/**
|
|
8
21
|
* Optimistically applies source documents to a result, using the content source map to trace fields.
|
|
@@ -32,62 +45,23 @@ export declare type ApplySourceDocumentsUpdateFunction = <T = unknown>(
|
|
|
32
45
|
},
|
|
33
46
|
) => T
|
|
34
47
|
|
|
35
|
-
|
|
36
|
-
export declare type ClientPerspective =
|
|
37
|
-
| 'previewDrafts'
|
|
38
|
-
| 'published'
|
|
39
|
-
| 'drafts'
|
|
40
|
-
| 'raw'
|
|
41
|
-
| ('published' | 'drafts' | ReleaseId)[]
|
|
42
|
-
|
|
43
|
-
/** @public */
|
|
44
|
-
export declare interface ContentSourceMap {
|
|
45
|
-
mappings: ContentSourceMapMappings
|
|
46
|
-
documents: ContentSourceMapDocuments
|
|
47
|
-
paths: ContentSourceMapPaths
|
|
48
|
-
}
|
|
48
|
+
export {ClientPerspective}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
export declare interface ContentSourceMapDocument extends ContentSourceMapDocumentBase {
|
|
52
|
-
_projectId?: undefined
|
|
53
|
-
_dataset?: undefined
|
|
54
|
-
}
|
|
50
|
+
export {ContentSourceMap}
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
export declare interface ContentSourceMapDocumentBase {
|
|
58
|
-
_id: string
|
|
59
|
-
_type: string
|
|
60
|
-
}
|
|
52
|
+
export {ContentSourceMapDocument}
|
|
61
53
|
|
|
62
|
-
|
|
63
|
-
export declare type ContentSourceMapDocuments = (
|
|
64
|
-
| ContentSourceMapDocument
|
|
65
|
-
| ContentSourceMapRemoteDocument
|
|
66
|
-
)[]
|
|
54
|
+
export {ContentSourceMapDocumentBase}
|
|
67
55
|
|
|
68
|
-
|
|
69
|
-
* DocumentValueSource is a path to a value within a document
|
|
70
|
-
* @public
|
|
71
|
-
*/
|
|
72
|
-
export declare interface ContentSourceMapDocumentValueSource {
|
|
73
|
-
type: 'documentValue'
|
|
74
|
-
document: number
|
|
75
|
-
path: number
|
|
76
|
-
}
|
|
56
|
+
export {ContentSourceMapDocuments}
|
|
77
57
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
*/
|
|
82
|
-
export declare interface ContentSourceMapLiteralSource {
|
|
83
|
-
type: 'literal'
|
|
84
|
-
}
|
|
58
|
+
export {ContentSourceMapDocumentValueSource}
|
|
59
|
+
|
|
60
|
+
export {ContentSourceMapLiteralSource}
|
|
85
61
|
|
|
86
|
-
|
|
87
|
-
export declare type ContentSourceMapMapping = ContentSourceMapValueMapping
|
|
62
|
+
export {ContentSourceMapMapping}
|
|
88
63
|
|
|
89
|
-
|
|
90
|
-
export declare type ContentSourceMapMappings = Record<string, ContentSourceMapMapping>
|
|
64
|
+
export {ContentSourceMapMappings}
|
|
91
65
|
|
|
92
66
|
/** @alpha */
|
|
93
67
|
export declare type ContentSourceMapParsedPath = (
|
|
@@ -108,38 +82,15 @@ export declare type ContentSourceMapParsedPathKeyedSegment = {
|
|
|
108
82
|
*/
|
|
109
83
|
export declare type ContentSourceMapParsedPathSegment = ContentSourceMapParsedPath[number]
|
|
110
84
|
|
|
111
|
-
|
|
112
|
-
export declare type ContentSourceMapPaths = string[]
|
|
85
|
+
export {ContentSourceMapPaths}
|
|
113
86
|
|
|
114
|
-
|
|
115
|
-
export declare interface ContentSourceMapRemoteDocument extends ContentSourceMapDocumentBase {
|
|
116
|
-
_projectId: string
|
|
117
|
-
_dataset: string
|
|
118
|
-
}
|
|
87
|
+
export {ContentSourceMapRemoteDocument}
|
|
119
88
|
|
|
120
|
-
|
|
121
|
-
export declare type ContentSourceMapSource =
|
|
122
|
-
| ContentSourceMapDocumentValueSource
|
|
123
|
-
| ContentSourceMapLiteralSource
|
|
124
|
-
| ContentSourceMapUnknownSource
|
|
89
|
+
export {ContentSourceMapSource}
|
|
125
90
|
|
|
126
|
-
|
|
127
|
-
* When a field source is unknown
|
|
128
|
-
* @public
|
|
129
|
-
*/
|
|
130
|
-
export declare interface ContentSourceMapUnknownSource {
|
|
131
|
-
type: 'unknown'
|
|
132
|
-
}
|
|
91
|
+
export {ContentSourceMapUnknownSource}
|
|
133
92
|
|
|
134
|
-
|
|
135
|
-
* ValueMapping is a mapping when for value that is from a single source value
|
|
136
|
-
* It may refer to a field within a document or a literal value
|
|
137
|
-
* @public
|
|
138
|
-
*/
|
|
139
|
-
export declare interface ContentSourceMapValueMapping {
|
|
140
|
-
type: 'value'
|
|
141
|
-
source: ContentSourceMapSource
|
|
142
|
-
}
|
|
93
|
+
export {ContentSourceMapValueMapping}
|
|
143
94
|
|
|
144
95
|
/** @internal */
|
|
145
96
|
export declare function createEditUrl(
|
|
@@ -218,9 +169,6 @@ export declare type PathSegment = string | number | KeyedSegment | IndexTuple
|
|
|
218
169
|
/** @internal */
|
|
219
170
|
declare const reKeySegment: RegExp
|
|
220
171
|
|
|
221
|
-
/** @public */
|
|
222
|
-
declare type ReleaseId = `r${string}`
|
|
223
|
-
|
|
224
172
|
/**
|
|
225
173
|
* @internal
|
|
226
174
|
*/
|
|
@@ -271,20 +219,7 @@ export declare type ResolveStudioUrl = (
|
|
|
271
219
|
sourceDocument: ContentSourceMapDocuments[number],
|
|
272
220
|
) => StudioUrl
|
|
273
221
|
|
|
274
|
-
|
|
275
|
-
export declare type SanityDocument<T extends Record<string, Any> = Record<string, Any>> = {
|
|
276
|
-
[P in keyof T]: T[P]
|
|
277
|
-
} & {
|
|
278
|
-
_id: string
|
|
279
|
-
_rev: string
|
|
280
|
-
_type: string
|
|
281
|
-
_createdAt: string
|
|
282
|
-
_updatedAt: string
|
|
283
|
-
/**
|
|
284
|
-
* Present when `perspective` is set to `previewDrafts`
|
|
285
|
-
*/
|
|
286
|
-
_originalId?: string
|
|
287
|
-
}
|
|
222
|
+
export {SanityDocument}
|
|
288
223
|
|
|
289
224
|
/** @alpha */
|
|
290
225
|
export declare type StudioBaseRoute = {
|
package/dist/csm.d.ts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import {Any} from '@sanity/client'
|
|
2
|
+
import {ClientPerspective} from '@sanity/client'
|
|
3
|
+
import {ContentSourceMap} from '@sanity/client'
|
|
4
|
+
import {ContentSourceMapDocument} from '@sanity/client'
|
|
5
|
+
import {ContentSourceMapDocumentBase} from '@sanity/client'
|
|
6
|
+
import {ContentSourceMapDocuments} from '@sanity/client'
|
|
7
|
+
import {ContentSourceMapDocumentValueSource} from '@sanity/client'
|
|
8
|
+
import {ContentSourceMapLiteralSource} from '@sanity/client'
|
|
9
|
+
import {ContentSourceMapMapping} from '@sanity/client'
|
|
10
|
+
import {ContentSourceMapMappings} from '@sanity/client'
|
|
11
|
+
import {ContentSourceMapPaths} from '@sanity/client'
|
|
12
|
+
import {ContentSourceMapRemoteDocument} from '@sanity/client'
|
|
13
|
+
import {ContentSourceMapSource} from '@sanity/client'
|
|
14
|
+
import {ContentSourceMapUnknownSource} from '@sanity/client'
|
|
15
|
+
import {ContentSourceMapValueMapping} from '@sanity/client'
|
|
16
|
+
import {SanityDocument} from '@sanity/client'
|
|
17
|
+
|
|
18
|
+
export {Any}
|
|
6
19
|
|
|
7
20
|
/**
|
|
8
21
|
* Optimistically applies source documents to a result, using the content source map to trace fields.
|
|
@@ -32,62 +45,23 @@ export declare type ApplySourceDocumentsUpdateFunction = <T = unknown>(
|
|
|
32
45
|
},
|
|
33
46
|
) => T
|
|
34
47
|
|
|
35
|
-
|
|
36
|
-
export declare type ClientPerspective =
|
|
37
|
-
| 'previewDrafts'
|
|
38
|
-
| 'published'
|
|
39
|
-
| 'drafts'
|
|
40
|
-
| 'raw'
|
|
41
|
-
| ('published' | 'drafts' | ReleaseId)[]
|
|
42
|
-
|
|
43
|
-
/** @public */
|
|
44
|
-
export declare interface ContentSourceMap {
|
|
45
|
-
mappings: ContentSourceMapMappings
|
|
46
|
-
documents: ContentSourceMapDocuments
|
|
47
|
-
paths: ContentSourceMapPaths
|
|
48
|
-
}
|
|
48
|
+
export {ClientPerspective}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
export declare interface ContentSourceMapDocument extends ContentSourceMapDocumentBase {
|
|
52
|
-
_projectId?: undefined
|
|
53
|
-
_dataset?: undefined
|
|
54
|
-
}
|
|
50
|
+
export {ContentSourceMap}
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
export declare interface ContentSourceMapDocumentBase {
|
|
58
|
-
_id: string
|
|
59
|
-
_type: string
|
|
60
|
-
}
|
|
52
|
+
export {ContentSourceMapDocument}
|
|
61
53
|
|
|
62
|
-
|
|
63
|
-
export declare type ContentSourceMapDocuments = (
|
|
64
|
-
| ContentSourceMapDocument
|
|
65
|
-
| ContentSourceMapRemoteDocument
|
|
66
|
-
)[]
|
|
54
|
+
export {ContentSourceMapDocumentBase}
|
|
67
55
|
|
|
68
|
-
|
|
69
|
-
* DocumentValueSource is a path to a value within a document
|
|
70
|
-
* @public
|
|
71
|
-
*/
|
|
72
|
-
export declare interface ContentSourceMapDocumentValueSource {
|
|
73
|
-
type: 'documentValue'
|
|
74
|
-
document: number
|
|
75
|
-
path: number
|
|
76
|
-
}
|
|
56
|
+
export {ContentSourceMapDocuments}
|
|
77
57
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
*/
|
|
82
|
-
export declare interface ContentSourceMapLiteralSource {
|
|
83
|
-
type: 'literal'
|
|
84
|
-
}
|
|
58
|
+
export {ContentSourceMapDocumentValueSource}
|
|
59
|
+
|
|
60
|
+
export {ContentSourceMapLiteralSource}
|
|
85
61
|
|
|
86
|
-
|
|
87
|
-
export declare type ContentSourceMapMapping = ContentSourceMapValueMapping
|
|
62
|
+
export {ContentSourceMapMapping}
|
|
88
63
|
|
|
89
|
-
|
|
90
|
-
export declare type ContentSourceMapMappings = Record<string, ContentSourceMapMapping>
|
|
64
|
+
export {ContentSourceMapMappings}
|
|
91
65
|
|
|
92
66
|
/** @alpha */
|
|
93
67
|
export declare type ContentSourceMapParsedPath = (
|
|
@@ -108,38 +82,15 @@ export declare type ContentSourceMapParsedPathKeyedSegment = {
|
|
|
108
82
|
*/
|
|
109
83
|
export declare type ContentSourceMapParsedPathSegment = ContentSourceMapParsedPath[number]
|
|
110
84
|
|
|
111
|
-
|
|
112
|
-
export declare type ContentSourceMapPaths = string[]
|
|
85
|
+
export {ContentSourceMapPaths}
|
|
113
86
|
|
|
114
|
-
|
|
115
|
-
export declare interface ContentSourceMapRemoteDocument extends ContentSourceMapDocumentBase {
|
|
116
|
-
_projectId: string
|
|
117
|
-
_dataset: string
|
|
118
|
-
}
|
|
87
|
+
export {ContentSourceMapRemoteDocument}
|
|
119
88
|
|
|
120
|
-
|
|
121
|
-
export declare type ContentSourceMapSource =
|
|
122
|
-
| ContentSourceMapDocumentValueSource
|
|
123
|
-
| ContentSourceMapLiteralSource
|
|
124
|
-
| ContentSourceMapUnknownSource
|
|
89
|
+
export {ContentSourceMapSource}
|
|
125
90
|
|
|
126
|
-
|
|
127
|
-
* When a field source is unknown
|
|
128
|
-
* @public
|
|
129
|
-
*/
|
|
130
|
-
export declare interface ContentSourceMapUnknownSource {
|
|
131
|
-
type: 'unknown'
|
|
132
|
-
}
|
|
91
|
+
export {ContentSourceMapUnknownSource}
|
|
133
92
|
|
|
134
|
-
|
|
135
|
-
* ValueMapping is a mapping when for value that is from a single source value
|
|
136
|
-
* It may refer to a field within a document or a literal value
|
|
137
|
-
* @public
|
|
138
|
-
*/
|
|
139
|
-
export declare interface ContentSourceMapValueMapping {
|
|
140
|
-
type: 'value'
|
|
141
|
-
source: ContentSourceMapSource
|
|
142
|
-
}
|
|
93
|
+
export {ContentSourceMapValueMapping}
|
|
143
94
|
|
|
144
95
|
/** @internal */
|
|
145
96
|
export declare function createEditUrl(
|
|
@@ -218,9 +169,6 @@ export declare type PathSegment = string | number | KeyedSegment | IndexTuple
|
|
|
218
169
|
/** @internal */
|
|
219
170
|
declare const reKeySegment: RegExp
|
|
220
171
|
|
|
221
|
-
/** @public */
|
|
222
|
-
declare type ReleaseId = `r${string}`
|
|
223
|
-
|
|
224
172
|
/**
|
|
225
173
|
* @internal
|
|
226
174
|
*/
|
|
@@ -271,20 +219,7 @@ export declare type ResolveStudioUrl = (
|
|
|
271
219
|
sourceDocument: ContentSourceMapDocuments[number],
|
|
272
220
|
) => StudioUrl
|
|
273
221
|
|
|
274
|
-
|
|
275
|
-
export declare type SanityDocument<T extends Record<string, Any> = Record<string, Any>> = {
|
|
276
|
-
[P in keyof T]: T[P]
|
|
277
|
-
} & {
|
|
278
|
-
_id: string
|
|
279
|
-
_rev: string
|
|
280
|
-
_type: string
|
|
281
|
-
_createdAt: string
|
|
282
|
-
_updatedAt: string
|
|
283
|
-
/**
|
|
284
|
-
* Present when `perspective` is set to `previewDrafts`
|
|
285
|
-
*/
|
|
286
|
-
_originalId?: string
|
|
287
|
-
}
|
|
222
|
+
export {SanityDocument}
|
|
288
223
|
|
|
289
224
|
/** @alpha */
|
|
290
225
|
export declare type StudioBaseRoute = {
|
package/dist/index.browser.d.cts
CHANGED
|
@@ -826,7 +826,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
826
826
|
this: SanityClient | ObservableSanityClient,
|
|
827
827
|
query: string,
|
|
828
828
|
params?: ListenParams,
|
|
829
|
-
): Observable<
|
|
829
|
+
): Observable<MutationEvent_2<R>>
|
|
830
830
|
|
|
831
831
|
/**
|
|
832
832
|
* Set up a listener that will be notified when mutations occur on documents matching the provided query/filter.
|
|
@@ -845,7 +845,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
845
845
|
|
|
846
846
|
/** @public */
|
|
847
847
|
export declare type ListenEvent<R extends Record<string, Any>> =
|
|
848
|
-
|
|
|
848
|
+
| MutationEvent_2<R>
|
|
849
849
|
| ChannelErrorEvent
|
|
850
850
|
| DisconnectEvent
|
|
851
851
|
| ReconnectEvent
|
|
@@ -1031,7 +1031,7 @@ export declare interface MutationErrorItem {
|
|
|
1031
1031
|
*
|
|
1032
1032
|
* @public
|
|
1033
1033
|
*/
|
|
1034
|
-
|
|
1034
|
+
declare type MutationEvent_2<R extends Record<string, Any> = Record<string, Any>> = {
|
|
1035
1035
|
type: 'mutation'
|
|
1036
1036
|
/**
|
|
1037
1037
|
* The ID of the document that was affected
|
|
@@ -1120,6 +1120,7 @@ export declare type MutationEvent<R extends Record<string, Any> = Record<string,
|
|
|
1120
1120
|
*/
|
|
1121
1121
|
transactionCurrentEvent: number
|
|
1122
1122
|
}
|
|
1123
|
+
export {MutationEvent_2 as MutationEvent}
|
|
1123
1124
|
|
|
1124
1125
|
/** @internal */
|
|
1125
1126
|
export declare type MutationOperation = 'create' | 'delete' | 'update' | 'none'
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -826,7 +826,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
826
826
|
this: SanityClient | ObservableSanityClient,
|
|
827
827
|
query: string,
|
|
828
828
|
params?: ListenParams,
|
|
829
|
-
): Observable<
|
|
829
|
+
): Observable<MutationEvent_2<R>>
|
|
830
830
|
|
|
831
831
|
/**
|
|
832
832
|
* Set up a listener that will be notified when mutations occur on documents matching the provided query/filter.
|
|
@@ -845,7 +845,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
845
845
|
|
|
846
846
|
/** @public */
|
|
847
847
|
export declare type ListenEvent<R extends Record<string, Any>> =
|
|
848
|
-
|
|
|
848
|
+
| MutationEvent_2<R>
|
|
849
849
|
| ChannelErrorEvent
|
|
850
850
|
| DisconnectEvent
|
|
851
851
|
| ReconnectEvent
|
|
@@ -1031,7 +1031,7 @@ export declare interface MutationErrorItem {
|
|
|
1031
1031
|
*
|
|
1032
1032
|
* @public
|
|
1033
1033
|
*/
|
|
1034
|
-
|
|
1034
|
+
declare type MutationEvent_2<R extends Record<string, Any> = Record<string, Any>> = {
|
|
1035
1035
|
type: 'mutation'
|
|
1036
1036
|
/**
|
|
1037
1037
|
* The ID of the document that was affected
|
|
@@ -1120,6 +1120,7 @@ export declare type MutationEvent<R extends Record<string, Any> = Record<string,
|
|
|
1120
1120
|
*/
|
|
1121
1121
|
transactionCurrentEvent: number
|
|
1122
1122
|
}
|
|
1123
|
+
export {MutationEvent_2 as MutationEvent}
|
|
1123
1124
|
|
|
1124
1125
|
/** @internal */
|
|
1125
1126
|
export declare type MutationOperation = 'create' | 'delete' | 'update' | 'none'
|
package/dist/index.cjs
CHANGED
|
@@ -1582,7 +1582,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
1582
1582
|
return printNoDefaultExport(), createClient2(config);
|
|
1583
1583
|
};
|
|
1584
1584
|
}
|
|
1585
|
-
var name = "@sanity/client", version = "6.24.2
|
|
1585
|
+
var name = "@sanity/client", version = "6.24.2";
|
|
1586
1586
|
const middleware = [
|
|
1587
1587
|
middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
|
|
1588
1588
|
middleware$1.headers({ "User-Agent": `${name} ${version}` }),
|
package/dist/index.d.cts
CHANGED
|
@@ -826,7 +826,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
826
826
|
this: SanityClient | ObservableSanityClient,
|
|
827
827
|
query: string,
|
|
828
828
|
params?: ListenParams,
|
|
829
|
-
): Observable<
|
|
829
|
+
): Observable<MutationEvent_2<R>>
|
|
830
830
|
|
|
831
831
|
/**
|
|
832
832
|
* Set up a listener that will be notified when mutations occur on documents matching the provided query/filter.
|
|
@@ -845,7 +845,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
845
845
|
|
|
846
846
|
/** @public */
|
|
847
847
|
export declare type ListenEvent<R extends Record<string, Any>> =
|
|
848
|
-
|
|
|
848
|
+
| MutationEvent_2<R>
|
|
849
849
|
| ChannelErrorEvent
|
|
850
850
|
| DisconnectEvent
|
|
851
851
|
| ReconnectEvent
|
|
@@ -1031,7 +1031,7 @@ export declare interface MutationErrorItem {
|
|
|
1031
1031
|
*
|
|
1032
1032
|
* @public
|
|
1033
1033
|
*/
|
|
1034
|
-
|
|
1034
|
+
declare type MutationEvent_2<R extends Record<string, Any> = Record<string, Any>> = {
|
|
1035
1035
|
type: 'mutation'
|
|
1036
1036
|
/**
|
|
1037
1037
|
* The ID of the document that was affected
|
|
@@ -1120,6 +1120,7 @@ export declare type MutationEvent<R extends Record<string, Any> = Record<string,
|
|
|
1120
1120
|
*/
|
|
1121
1121
|
transactionCurrentEvent: number
|
|
1122
1122
|
}
|
|
1123
|
+
export {MutationEvent_2 as MutationEvent}
|
|
1123
1124
|
|
|
1124
1125
|
/** @internal */
|
|
1125
1126
|
export declare type MutationOperation = 'create' | 'delete' | 'update' | 'none'
|
package/dist/index.d.ts
CHANGED
|
@@ -826,7 +826,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
826
826
|
this: SanityClient | ObservableSanityClient,
|
|
827
827
|
query: string,
|
|
828
828
|
params?: ListenParams,
|
|
829
|
-
): Observable<
|
|
829
|
+
): Observable<MutationEvent_2<R>>
|
|
830
830
|
|
|
831
831
|
/**
|
|
832
832
|
* Set up a listener that will be notified when mutations occur on documents matching the provided query/filter.
|
|
@@ -845,7 +845,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
|
|
|
845
845
|
|
|
846
846
|
/** @public */
|
|
847
847
|
export declare type ListenEvent<R extends Record<string, Any>> =
|
|
848
|
-
|
|
|
848
|
+
| MutationEvent_2<R>
|
|
849
849
|
| ChannelErrorEvent
|
|
850
850
|
| DisconnectEvent
|
|
851
851
|
| ReconnectEvent
|
|
@@ -1031,7 +1031,7 @@ export declare interface MutationErrorItem {
|
|
|
1031
1031
|
*
|
|
1032
1032
|
* @public
|
|
1033
1033
|
*/
|
|
1034
|
-
|
|
1034
|
+
declare type MutationEvent_2<R extends Record<string, Any> = Record<string, Any>> = {
|
|
1035
1035
|
type: 'mutation'
|
|
1036
1036
|
/**
|
|
1037
1037
|
* The ID of the document that was affected
|
|
@@ -1120,6 +1120,7 @@ export declare type MutationEvent<R extends Record<string, Any> = Record<string,
|
|
|
1120
1120
|
*/
|
|
1121
1121
|
transactionCurrentEvent: number
|
|
1122
1122
|
}
|
|
1123
|
+
export {MutationEvent_2 as MutationEvent}
|
|
1123
1124
|
|
|
1124
1125
|
/** @internal */
|
|
1125
1126
|
export declare type MutationOperation = 'create' | 'delete' | 'update' | 'none'
|
package/dist/index.js
CHANGED
|
@@ -1564,7 +1564,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
1564
1564
|
return printNoDefaultExport(), createClient2(config);
|
|
1565
1565
|
};
|
|
1566
1566
|
}
|
|
1567
|
-
var name = "@sanity/client", version = "6.24.2
|
|
1567
|
+
var name = "@sanity/client", version = "6.24.2";
|
|
1568
1568
|
const middleware = [
|
|
1569
1569
|
debug({ verbose: !0, namespace: "sanity:client" }),
|
|
1570
1570
|
headers({ "User-Agent": `${name} ${version}` }),
|