@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.browser.js
CHANGED
|
@@ -1698,11 +1698,12 @@ const _ObservableSanityClient = class _ObservableSanityClient {
|
|
|
1698
1698
|
/**
|
|
1699
1699
|
* Create a new buildable patch of operations to perform
|
|
1700
1700
|
*
|
|
1701
|
-
* @param
|
|
1701
|
+
* @param selection - Document ID, an array of document IDs, or an object with `query` and optional `params`, defining which document(s) to patch
|
|
1702
1702
|
* @param operations - Optional object of patch operations to initialize the patch instance with
|
|
1703
|
+
* @returns Patch instance - call `.commit()` to perform the operations defined
|
|
1703
1704
|
*/
|
|
1704
|
-
patch(
|
|
1705
|
-
return new ObservablePatch(
|
|
1705
|
+
patch(selection, operations) {
|
|
1706
|
+
return new ObservablePatch(selection, operations, this);
|
|
1706
1707
|
}
|
|
1707
1708
|
/**
|
|
1708
1709
|
* Create a new transaction of mutations
|
|
@@ -1713,9 +1714,8 @@ const _ObservableSanityClient = class _ObservableSanityClient {
|
|
|
1713
1714
|
return new ObservableTransaction(operations, this);
|
|
1714
1715
|
}
|
|
1715
1716
|
/**
|
|
1716
|
-
*
|
|
1717
|
+
* Perform an HTTP request against the Sanity API
|
|
1717
1718
|
*
|
|
1718
|
-
* @deprecated Use your own request library!
|
|
1719
1719
|
* @param options - Request options
|
|
1720
1720
|
*/
|
|
1721
1721
|
request(options) {
|
|
@@ -1846,8 +1846,9 @@ const _SanityClient = class _SanityClient {
|
|
|
1846
1846
|
/**
|
|
1847
1847
|
* Create a new buildable patch of operations to perform
|
|
1848
1848
|
*
|
|
1849
|
-
* @param
|
|
1849
|
+
* @param selection - Document ID, an array of document IDs, or an object with `query` and optional `params`, defining which document(s) to patch
|
|
1850
1850
|
* @param operations - Optional object of patch operations to initialize the patch instance with
|
|
1851
|
+
* @returns Patch instance - call `.commit()` to perform the operations defined
|
|
1851
1852
|
*/
|
|
1852
1853
|
patch(documentId, operations) {
|
|
1853
1854
|
return new Patch(documentId, operations, this);
|