@sanity/client 0.0.0-dev.6 → 0.0.0-dev.8
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/index.browser.cjs +0 -6
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +0 -6
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +1 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +45 -1
- package/dist/index.js +1 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/data/dataMethods.ts +0 -5
- package/src/types.ts +46 -3
- package/umd/sanityClient.js +0 -6
- package/umd/sanityClient.min.js +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -298,7 +298,6 @@ export declare interface ClientConfig {
|
|
|
298
298
|
*/
|
|
299
299
|
requester?: Requester
|
|
300
300
|
resultSourceMap?: boolean
|
|
301
|
-
encodeHackySourceMap?: boolean
|
|
302
301
|
}
|
|
303
302
|
|
|
304
303
|
/** @public */
|
|
@@ -310,6 +309,13 @@ export declare class ClientError extends Error {
|
|
|
310
309
|
constructor(res: Any)
|
|
311
310
|
}
|
|
312
311
|
|
|
312
|
+
/** @internal */
|
|
313
|
+
export declare type ContentSourceMapping = {
|
|
314
|
+
mappings: Record<string, Mapping>
|
|
315
|
+
documents: Array<SanityDocument>
|
|
316
|
+
paths: Array<string>
|
|
317
|
+
}
|
|
318
|
+
|
|
313
319
|
/** @public */
|
|
314
320
|
export declare const createClient: (config: ClientConfig) => SanityClient
|
|
315
321
|
|
|
@@ -392,6 +398,15 @@ export declare type DisconnectEvent = {
|
|
|
392
398
|
reason: string
|
|
393
399
|
}
|
|
394
400
|
|
|
401
|
+
/**
|
|
402
|
+
* @internal
|
|
403
|
+
*/
|
|
404
|
+
export declare type DocumentValueSource = {
|
|
405
|
+
type: 'documentValue'
|
|
406
|
+
document: number
|
|
407
|
+
path: number
|
|
408
|
+
}
|
|
409
|
+
|
|
395
410
|
/** @public */
|
|
396
411
|
export declare interface ErrorProps {
|
|
397
412
|
message: string
|
|
@@ -521,6 +536,16 @@ export declare interface ListenOptions {
|
|
|
521
536
|
tag?: string
|
|
522
537
|
}
|
|
523
538
|
|
|
539
|
+
/**
|
|
540
|
+
* @internal
|
|
541
|
+
*/
|
|
542
|
+
export declare type LiteralSource = {
|
|
543
|
+
type: 'literal'
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/** @internal */
|
|
547
|
+
export declare type Mapping = ValueMapping
|
|
548
|
+
|
|
524
549
|
/** @internal */
|
|
525
550
|
export declare interface MultipleMutationResult {
|
|
526
551
|
transactionId: string
|
|
@@ -1410,6 +1435,7 @@ export declare interface RawQueryResponse<R> {
|
|
|
1410
1435
|
q: string
|
|
1411
1436
|
ms: number
|
|
1412
1437
|
result: R
|
|
1438
|
+
resultSourceMap: ContentSourceMapping
|
|
1413
1439
|
}
|
|
1414
1440
|
|
|
1415
1441
|
/** @internal */
|
|
@@ -2081,6 +2107,9 @@ export declare interface SingleMutationResult {
|
|
|
2081
2107
|
}[]
|
|
2082
2108
|
}
|
|
2083
2109
|
|
|
2110
|
+
/** @internal */
|
|
2111
|
+
export declare type Source = DocumentValueSource | LiteralSource | UnknownSource
|
|
2112
|
+
|
|
2084
2113
|
/** @public */
|
|
2085
2114
|
export declare class Transaction extends BaseTransaction {
|
|
2086
2115
|
#private
|
|
@@ -2176,6 +2205,13 @@ export declare type UnfilteredResponseQueryOptions = RequestOptions & {
|
|
|
2176
2205
|
filterResponse: false
|
|
2177
2206
|
}
|
|
2178
2207
|
|
|
2208
|
+
/**
|
|
2209
|
+
* @internal
|
|
2210
|
+
*/
|
|
2211
|
+
export declare type UnknownSource = {
|
|
2212
|
+
type: 'unknown'
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2179
2215
|
export {unstable__adapter}
|
|
2180
2216
|
|
|
2181
2217
|
export {unstable__environment}
|
|
@@ -2256,6 +2292,14 @@ export declare class UsersClient {
|
|
|
2256
2292
|
getById<T extends 'me' | string>(id: T): Promise<T extends 'me' ? CurrentSanityUser : SanityUser>
|
|
2257
2293
|
}
|
|
2258
2294
|
|
|
2295
|
+
/**
|
|
2296
|
+
* @internal
|
|
2297
|
+
*/
|
|
2298
|
+
export declare type ValueMapping = {
|
|
2299
|
+
type: 'value'
|
|
2300
|
+
source: Source
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2259
2303
|
/** @public */
|
|
2260
2304
|
export declare type WelcomeEvent = {
|
|
2261
2305
|
type: 'welcome'
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { adapter as unstable__adapter, environment as unstable__environment } fr
|
|
|
4
4
|
import { Observable, lastValueFrom } from 'rxjs';
|
|
5
5
|
import { map, filter } from 'rxjs/operators';
|
|
6
6
|
var name = "@sanity/client";
|
|
7
|
-
var version = "0.0.0-dev.
|
|
7
|
+
var version = "0.0.0-dev.8";
|
|
8
8
|
const middleware = [debug({
|
|
9
9
|
verbose: true,
|
|
10
10
|
namespace: "sanity:client"
|
|
@@ -819,12 +819,6 @@ function _requestObservable(client, httpRequest, options) {
|
|
|
819
819
|
...options.query
|
|
820
820
|
};
|
|
821
821
|
}
|
|
822
|
-
if (config.encodeHackySourceMap) {
|
|
823
|
-
options.query = {
|
|
824
|
-
encodeHackySourceMap: true,
|
|
825
|
-
...options.query
|
|
826
|
-
};
|
|
827
|
-
}
|
|
828
822
|
const reqOptions = requestOptions(config, Object.assign({}, options, {
|
|
829
823
|
url: _getUrl(client, uri, useCdn)
|
|
830
824
|
}));
|