@sanity/client 6.4.10-dev.0 → 6.4.11
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 +7 -6
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +7 -6
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +8 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +192 -92
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/package.json +12 -14
- package/src/SanityClient.ts +61 -6
- package/src/data/listen.ts +5 -5
- package/src/types.ts +169 -80
- package/umd/sanityClient.js +27 -429
- package/umd/sanityClient.min.js +3 -3
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@ var getIt = require('get-it');
|
|
|
8
8
|
var rxjs = require('rxjs');
|
|
9
9
|
var operators = require('rxjs/operators');
|
|
10
10
|
var name = "@sanity/client";
|
|
11
|
-
var version = "6.4.
|
|
11
|
+
var version = "6.4.11";
|
|
12
12
|
const middleware = [middleware$1.debug({
|
|
13
13
|
verbose: true,
|
|
14
14
|
namespace: "sanity:client"
|
|
@@ -1722,11 +1722,12 @@ const _ObservableSanityClient = class _ObservableSanityClient {
|
|
|
1722
1722
|
/**
|
|
1723
1723
|
* Create a new buildable patch of operations to perform
|
|
1724
1724
|
*
|
|
1725
|
-
* @param
|
|
1725
|
+
* @param selection - Document ID, an array of document IDs, or an object with `query` and optional `params`, defining which document(s) to patch
|
|
1726
1726
|
* @param operations - Optional object of patch operations to initialize the patch instance with
|
|
1727
|
+
* @returns Patch instance - call `.commit()` to perform the operations defined
|
|
1727
1728
|
*/
|
|
1728
|
-
patch(
|
|
1729
|
-
return new ObservablePatch(
|
|
1729
|
+
patch(selection, operations) {
|
|
1730
|
+
return new ObservablePatch(selection, operations, this);
|
|
1730
1731
|
}
|
|
1731
1732
|
/**
|
|
1732
1733
|
* Create a new transaction of mutations
|
|
@@ -1737,9 +1738,8 @@ const _ObservableSanityClient = class _ObservableSanityClient {
|
|
|
1737
1738
|
return new ObservableTransaction(operations, this);
|
|
1738
1739
|
}
|
|
1739
1740
|
/**
|
|
1740
|
-
*
|
|
1741
|
+
* Perform an HTTP request against the Sanity API
|
|
1741
1742
|
*
|
|
1742
|
-
* @deprecated Use your own request library!
|
|
1743
1743
|
* @param options - Request options
|
|
1744
1744
|
*/
|
|
1745
1745
|
request(options) {
|
|
@@ -1870,8 +1870,9 @@ const _SanityClient = class _SanityClient {
|
|
|
1870
1870
|
/**
|
|
1871
1871
|
* Create a new buildable patch of operations to perform
|
|
1872
1872
|
*
|
|
1873
|
-
* @param
|
|
1873
|
+
* @param selection - Document ID, an array of document IDs, or an object with `query` and optional `params`, defining which document(s) to patch
|
|
1874
1874
|
* @param operations - Optional object of patch operations to initialize the patch instance with
|
|
1875
|
+
* @returns Patch instance - call `.commit()` to perform the operations defined
|
|
1875
1876
|
*/
|
|
1876
1877
|
patch(documentId, operations) {
|
|
1877
1878
|
return new Patch(documentId, operations, this);
|