@sanity/client 6.4.10 → 6.4.12
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/README.md +0 -7
- 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 -17
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/package.json +12 -17
- package/src/SanityClient.ts +61 -6
- package/src/data/listen.ts +5 -5
- package/src/types.ts +169 -7
- package/umd/sanityClient.js +7 -6
package/README.md
CHANGED
|
@@ -1165,13 +1165,6 @@ client.config({dataset: 'newDataset'})
|
|
|
1165
1165
|
|
|
1166
1166
|
Set client configuration. Required options are `projectId` and `dataset`.
|
|
1167
1167
|
|
|
1168
|
-
## Release new version
|
|
1169
|
-
|
|
1170
|
-
Run ["CI & Release" workflow](https://github.com/sanity-io/client/actions/workflows/ci.yml).
|
|
1171
|
-
Make sure to select the main branch and check "Release new version".
|
|
1172
|
-
|
|
1173
|
-
Semantic release will only release on configured branches, so it is safe to run release on any branch.
|
|
1174
|
-
|
|
1175
1168
|
## License
|
|
1176
1169
|
|
|
1177
1170
|
MIT © [Sanity.io](https://www.sanity.io/)
|
package/dist/index.browser.cjs
CHANGED
|
@@ -1702,11 +1702,12 @@ const _ObservableSanityClient = class _ObservableSanityClient {
|
|
|
1702
1702
|
/**
|
|
1703
1703
|
* Create a new buildable patch of operations to perform
|
|
1704
1704
|
*
|
|
1705
|
-
* @param
|
|
1705
|
+
* @param selection - Document ID, an array of document IDs, or an object with `query` and optional `params`, defining which document(s) to patch
|
|
1706
1706
|
* @param operations - Optional object of patch operations to initialize the patch instance with
|
|
1707
|
+
* @returns Patch instance - call `.commit()` to perform the operations defined
|
|
1707
1708
|
*/
|
|
1708
|
-
patch(
|
|
1709
|
-
return new ObservablePatch(
|
|
1709
|
+
patch(selection, operations) {
|
|
1710
|
+
return new ObservablePatch(selection, operations, this);
|
|
1710
1711
|
}
|
|
1711
1712
|
/**
|
|
1712
1713
|
* Create a new transaction of mutations
|
|
@@ -1717,9 +1718,8 @@ const _ObservableSanityClient = class _ObservableSanityClient {
|
|
|
1717
1718
|
return new ObservableTransaction(operations, this);
|
|
1718
1719
|
}
|
|
1719
1720
|
/**
|
|
1720
|
-
*
|
|
1721
|
+
* Perform an HTTP request against the Sanity API
|
|
1721
1722
|
*
|
|
1722
|
-
* @deprecated Use your own request library!
|
|
1723
1723
|
* @param options - Request options
|
|
1724
1724
|
*/
|
|
1725
1725
|
request(options) {
|
|
@@ -1850,8 +1850,9 @@ const _SanityClient = class _SanityClient {
|
|
|
1850
1850
|
/**
|
|
1851
1851
|
* Create a new buildable patch of operations to perform
|
|
1852
1852
|
*
|
|
1853
|
-
* @param
|
|
1853
|
+
* @param selection - Document ID, an array of document IDs, or an object with `query` and optional `params`, defining which document(s) to patch
|
|
1854
1854
|
* @param operations - Optional object of patch operations to initialize the patch instance with
|
|
1855
|
+
* @returns Patch instance - call `.commit()` to perform the operations defined
|
|
1855
1856
|
*/
|
|
1856
1857
|
patch(documentId, operations) {
|
|
1857
1858
|
return new Patch(documentId, operations, this);
|