@sanity/client 3.3.1 → 3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/client",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "Client for retrieving, creating and patching data from Sanity.io",
5
5
  "main": "lib/sanityClient.js",
6
6
  "umd": "umd/sanityClient.min.js",
package/sanityClient.d.ts CHANGED
@@ -12,6 +12,7 @@ export type AssetMetadataType =
12
12
  export type DatasetAclMode = 'public' | 'private' | 'custom'
13
13
  export type ListenVisibility = 'sync' | 'async' | 'query'
14
14
  export type ListenEventName = 'mutation' | 'welcome' | 'reconnect'
15
+ export type MutationOperation = 'create' | 'delete' | 'update' | 'none'
15
16
 
16
17
  export interface ResponseEvent<T = unknown> {
17
18
  type: 'response'
@@ -214,13 +215,13 @@ export type Mutation<R = any> =
214
215
  export interface SingleMutationResult {
215
216
  transactionId: string
216
217
  documentId: string
217
- results: {id: string}[]
218
+ results: {id: string; operation: MutationOperation}[]
218
219
  }
219
220
 
220
221
  export interface MultipleMutationResult {
221
222
  transactionId: string
222
223
  documentIds: string[]
223
- results: {id: string}[]
224
+ results: {id: string; operation: MutationOperation}[]
224
225
  }
225
226
 
226
227
  export class Patch {
@@ -14,7 +14,7 @@ const getClient = (options) =>
14
14
  {
15
15
  dataset: 'prod',
16
16
  namespace: 'beerns',
17
- apiHost: `http://localhost:${options.port}`,
17
+ apiHost: `http://127.0.0.1:${options.port}`,
18
18
  useProjectHostname: false,
19
19
  useCdn: false,
20
20
  apiVersion: '1',