@sanity/client 5.3.1 → 5.3.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/index.browser.cjs.map +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/AssetsClient.ts +10 -9
- package/src/types.ts +9 -0
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare class AssetsClient {
|
|
|
51
51
|
*/
|
|
52
52
|
upload(
|
|
53
53
|
assetType: 'file',
|
|
54
|
-
body:
|
|
54
|
+
body: UploadBody,
|
|
55
55
|
options?: UploadClientConfig
|
|
56
56
|
): Promise<SanityAssetDocument>
|
|
57
57
|
/**
|
|
@@ -63,7 +63,7 @@ export declare class AssetsClient {
|
|
|
63
63
|
*/
|
|
64
64
|
upload(
|
|
65
65
|
assetType: 'image',
|
|
66
|
-
body:
|
|
66
|
+
body: UploadBody,
|
|
67
67
|
options?: UploadClientConfig
|
|
68
68
|
): Promise<SanityImageAssetDocument>
|
|
69
69
|
/**
|
|
@@ -75,7 +75,7 @@ export declare class AssetsClient {
|
|
|
75
75
|
*/
|
|
76
76
|
upload(
|
|
77
77
|
assetType: 'file' | 'image',
|
|
78
|
-
body:
|
|
78
|
+
body: UploadBody,
|
|
79
79
|
options?: UploadClientConfig
|
|
80
80
|
): Promise<SanityAssetDocument | SanityImageAssetDocument>
|
|
81
81
|
}
|
|
@@ -611,7 +611,7 @@ export declare class ObservableAssetsClient {
|
|
|
611
611
|
*/
|
|
612
612
|
upload(
|
|
613
613
|
assetType: 'file',
|
|
614
|
-
body:
|
|
614
|
+
body: UploadBody,
|
|
615
615
|
options?: UploadClientConfig
|
|
616
616
|
): Observable<
|
|
617
617
|
HttpRequestEvent<{
|
|
@@ -627,7 +627,7 @@ export declare class ObservableAssetsClient {
|
|
|
627
627
|
*/
|
|
628
628
|
upload(
|
|
629
629
|
assetType: 'image',
|
|
630
|
-
body:
|
|
630
|
+
body: UploadBody,
|
|
631
631
|
options?: UploadClientConfig
|
|
632
632
|
): Observable<
|
|
633
633
|
HttpRequestEvent<{
|
|
@@ -643,7 +643,7 @@ export declare class ObservableAssetsClient {
|
|
|
643
643
|
*/
|
|
644
644
|
upload(
|
|
645
645
|
assetType: 'file' | 'image',
|
|
646
|
-
body:
|
|
646
|
+
body: UploadBody,
|
|
647
647
|
options?: UploadClientConfig
|
|
648
648
|
): Observable<
|
|
649
649
|
HttpRequestEvent<{
|
|
@@ -2172,6 +2172,9 @@ export declare type UnfilteredResponseQueryOptions = RequestOptions & {
|
|
|
2172
2172
|
filterResponse: false
|
|
2173
2173
|
}
|
|
2174
2174
|
|
|
2175
|
+
/** @public */
|
|
2176
|
+
export declare type UploadBody = File | Blob | Buffer | NodeJS.ReadableStream
|
|
2177
|
+
|
|
2175
2178
|
/** @public */
|
|
2176
2179
|
export declare interface UploadClientConfig {
|
|
2177
2180
|
/**
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Observable, lastValueFrom } from 'rxjs';
|
|
|
4
4
|
import { map, filter } from 'rxjs/operators';
|
|
5
5
|
import polyfilledEventSource from '@sanity/eventsource';
|
|
6
6
|
var name = "@sanity/client";
|
|
7
|
-
var version = "5.3.
|
|
7
|
+
var version = "5.3.2";
|
|
8
8
|
const middleware = [debug({
|
|
9
9
|
verbose: true,
|
|
10
10
|
namespace: "sanity:client"
|