@sanity/client 6.2.0-fetch.6 → 6.3.0

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.d.ts CHANGED
@@ -54,7 +54,7 @@ export declare class AssetsClient {
54
54
  upload(
55
55
  assetType: 'file',
56
56
  body: UploadBody,
57
- options?: UploadClientConfig
57
+ options?: UploadClientConfig,
58
58
  ): Promise<SanityAssetDocument>
59
59
  /**
60
60
  * Uploads an image asset to the configured dataset
@@ -66,7 +66,7 @@ export declare class AssetsClient {
66
66
  upload(
67
67
  assetType: 'image',
68
68
  body: UploadBody,
69
- options?: UploadClientConfig
69
+ options?: UploadClientConfig,
70
70
  ): Promise<SanityImageAssetDocument>
71
71
  /**
72
72
  * Uploads a file or an image asset to the configured dataset
@@ -78,7 +78,7 @@ export declare class AssetsClient {
78
78
  upload(
79
79
  assetType: 'file' | 'image',
80
80
  body: UploadBody,
81
- options?: UploadClientConfig
81
+ options?: UploadClientConfig,
82
82
  ): Promise<SanityAssetDocument | SanityImageAssetDocument>
83
83
  }
84
84
 
@@ -227,7 +227,7 @@ export declare class BaseTransaction {
227
227
  * @param doc - Document to create if it does not already exist. Requires `_id` and `_type` properties.
228
228
  */
229
229
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
230
- doc: IdentifiedSanityDocumentStub<R>
230
+ doc: IdentifiedSanityDocumentStub<R>,
231
231
  ): this
232
232
  /**
233
233
  * Creates a new Sanity document, or replaces an existing one if the same `_id` is already used.
@@ -236,7 +236,7 @@ export declare class BaseTransaction {
236
236
  * @param doc - Document to create or replace. Requires `_id` and `_type` properties.
237
237
  */
238
238
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
239
- doc: IdentifiedSanityDocumentStub<R>
239
+ doc: IdentifiedSanityDocumentStub<R>,
240
240
  ): this
241
241
  /**
242
242
  * Deletes the document with the given document ID
@@ -444,7 +444,7 @@ export declare class DatasetsClient {
444
444
  name: string,
445
445
  options?: {
446
446
  aclMode?: DatasetAclMode
447
- }
447
+ },
448
448
  ): Promise<DatasetResponse>
449
449
  /**
450
450
  * Edit a dataset with the given name
@@ -456,7 +456,7 @@ export declare class DatasetsClient {
456
456
  name: string,
457
457
  options?: {
458
458
  aclMode?: DatasetAclMode
459
- }
459
+ },
460
460
  ): Promise<DatasetResponse>
461
461
  /**
462
462
  * Delete a dataset with the given name
@@ -528,7 +528,7 @@ export declare type HttpRequestEvent<T = unknown> = ResponseEvent<T> | ProgressE
528
528
 
529
529
  /** @public */
530
530
  export declare type IdentifiedSanityDocumentStub<
531
- T extends Record<string, Any> = Record<string, Any>
531
+ T extends Record<string, Any> = Record<string, Any>,
532
532
  > = {
533
533
  [P in keyof T]: T[P]
534
534
  } & {
@@ -581,7 +581,7 @@ export declare type InsertPatch =
581
581
  export declare function _listen<R extends Record<string, Any> = Record<string, Any>>(
582
582
  this: SanityClient | ObservableSanityClient,
583
583
  query: string,
584
- params?: QueryParams
584
+ params?: QueryParams,
585
585
  ): Observable<MutationEvent_2<R>>
586
586
 
587
587
  /**
@@ -596,7 +596,7 @@ export declare function _listen<R extends Record<string, Any> = Record<string, A
596
596
  this: SanityClient | ObservableSanityClient,
597
597
  query: string,
598
598
  params?: QueryParams,
599
- options?: ListenOptions
599
+ options?: ListenOptions,
600
600
  ): Observable<ListenEvent<R>>
601
601
 
602
602
  /** @public */
@@ -715,7 +715,7 @@ export declare class ObservableAssetsClient {
715
715
  upload(
716
716
  assetType: 'file',
717
717
  body: UploadBody,
718
- options?: UploadClientConfig
718
+ options?: UploadClientConfig,
719
719
  ): Observable<
720
720
  HttpRequestEvent<{
721
721
  document: SanityAssetDocument
@@ -731,7 +731,7 @@ export declare class ObservableAssetsClient {
731
731
  upload(
732
732
  assetType: 'image',
733
733
  body: UploadBody,
734
- options?: UploadClientConfig
734
+ options?: UploadClientConfig,
735
735
  ): Observable<
736
736
  HttpRequestEvent<{
737
737
  document: SanityImageAssetDocument
@@ -747,7 +747,7 @@ export declare class ObservableAssetsClient {
747
747
  upload(
748
748
  assetType: 'file' | 'image',
749
749
  body: UploadBody,
750
- options?: UploadClientConfig
750
+ options?: UploadClientConfig,
751
751
  ): Observable<
752
752
  HttpRequestEvent<{
753
753
  document: SanityAssetDocument | SanityImageAssetDocument
@@ -769,7 +769,7 @@ export declare class ObservableDatasetsClient {
769
769
  name: string,
770
770
  options?: {
771
771
  aclMode?: DatasetAclMode
772
- }
772
+ },
773
773
  ): Observable<DatasetResponse>
774
774
  /**
775
775
  * Edit a dataset with the given name
@@ -781,7 +781,7 @@ export declare class ObservableDatasetsClient {
781
781
  name: string,
782
782
  options?: {
783
783
  aclMode?: DatasetAclMode
784
- }
784
+ },
785
785
  ): Observable<DatasetResponse>
786
786
  /**
787
787
  * Delete a dataset with the given name
@@ -803,7 +803,7 @@ export declare class ObservablePatch extends BasePatch {
803
803
  constructor(
804
804
  selection: PatchSelection,
805
805
  operations?: PatchOperations,
806
- client?: ObservableSanityClient
806
+ client?: ObservableSanityClient,
807
807
  )
808
808
  /**
809
809
  * Clones the patch
@@ -815,7 +815,7 @@ export declare class ObservablePatch extends BasePatch {
815
815
  * @param options - Options for the mutation operation
816
816
  */
817
817
  commit<R extends Record<string, Any> = Record<string, Any>>(
818
- options: FirstDocumentMutationOptions
818
+ options: FirstDocumentMutationOptions,
819
819
  ): Observable<SanityDocument<R>>
820
820
  /**
821
821
  * Commit the patch, returning an observable that produces an array of the mutated documents
@@ -823,7 +823,7 @@ export declare class ObservablePatch extends BasePatch {
823
823
  * @param options - Options for the mutation operation
824
824
  */
825
825
  commit<R extends Record<string, Any> = Record<string, Any>>(
826
- options: AllDocumentsMutationOptions
826
+ options: AllDocumentsMutationOptions,
827
827
  ): Observable<SanityDocument<R>[]>
828
828
  /**
829
829
  * Commit the patch, returning an observable that produces a mutation result object
@@ -843,7 +843,7 @@ export declare class ObservablePatch extends BasePatch {
843
843
  * @param options - Options for the mutation operation
844
844
  */
845
845
  commit<R extends Record<string, Any> = Record<string, Any>>(
846
- options?: BaseMutationOptions
846
+ options?: BaseMutationOptions,
847
847
  ): Observable<SanityDocument<R>>
848
848
  }
849
849
 
@@ -855,9 +855,13 @@ export declare class ObservableProjectsClient {
855
855
  #private
856
856
  constructor(client: ObservableSanityClient, httpRequest: HttpRequest)
857
857
  /**
858
- * Fetch a list of projects the authenticated user has access to
858
+ * Fetch a list of projects the authenticated user has access to.
859
+ *
860
+ * @param options - Options for the list request
861
+ * @param options.includeMembers - Whether to include members in the response (default: true)
859
862
  */
860
- list(): Observable<SanityProject[]>
863
+ list(options?: {includeMembers?: true}): Observable<SanityProject[]>
864
+ list(options?: {includeMembers?: false}): Observable<Omit<SanityProject, 'members'>[]>
861
865
  /**
862
866
  * Fetch a project by project ID
863
867
  *
@@ -919,7 +923,7 @@ export declare class ObservableSanityClient {
919
923
  fetch<R = Any, Q = QueryParams>(
920
924
  query: string,
921
925
  params: Q | undefined,
922
- options: FilteredResponseQueryOptions
926
+ options: FilteredResponseQueryOptions,
923
927
  ): Observable<R>
924
928
  /**
925
929
  * Perform a GROQ-query against the configured dataset.
@@ -931,7 +935,7 @@ export declare class ObservableSanityClient {
931
935
  fetch<R = Any, Q = QueryParams>(
932
936
  query: string,
933
937
  params: Q | undefined,
934
- options: UnfilteredResponseQueryOptions
938
+ options: UnfilteredResponseQueryOptions,
935
939
  ): Observable<RawQueryResponse<R>>
936
940
  /**
937
941
  * Fetch a single document with the given ID.
@@ -943,7 +947,7 @@ export declare class ObservableSanityClient {
943
947
  id: string,
944
948
  options?: {
945
949
  tag?: string
946
- }
950
+ },
947
951
  ): Observable<SanityDocument<R> | undefined>
948
952
  /**
949
953
  * Fetch multiple documents in one request.
@@ -958,7 +962,7 @@ export declare class ObservableSanityClient {
958
962
  ids: string[],
959
963
  options?: {
960
964
  tag?: string
961
- }
965
+ },
962
966
  ): Observable<(SanityDocument<R> | null)[]>
963
967
  /**
964
968
  * Create a document. Requires a `_type` property. If no `_id` is provided, it will be generated by the database.
@@ -969,7 +973,7 @@ export declare class ObservableSanityClient {
969
973
  */
970
974
  create<R extends Record<string, Any> = Record<string, Any>>(
971
975
  document: SanityDocumentStub<R>,
972
- options: FirstDocumentMutationOptions
976
+ options: FirstDocumentMutationOptions,
973
977
  ): Observable<SanityDocument<R>>
974
978
  /**
975
979
  * Create a document. Requires a `_type` property. If no `_id` is provided, it will be generated by the database.
@@ -980,7 +984,7 @@ export declare class ObservableSanityClient {
980
984
  */
981
985
  create<R extends Record<string, Any> = Record<string, Any>>(
982
986
  document: SanityDocumentStub<R>,
983
- options: AllDocumentsMutationOptions
987
+ options: AllDocumentsMutationOptions,
984
988
  ): Observable<SanityDocument<R>[]>
985
989
  /**
986
990
  * Create a document. Requires a `_type` property. If no `_id` is provided, it will be generated by the database.
@@ -991,7 +995,7 @@ export declare class ObservableSanityClient {
991
995
  */
992
996
  create<R extends Record<string, Any> = Record<string, Any>>(
993
997
  document: SanityDocumentStub<R>,
994
- options: FirstDocumentIdMutationOptions
998
+ options: FirstDocumentIdMutationOptions,
995
999
  ): Observable<SingleMutationResult>
996
1000
  /**
997
1001
  * Create a document. Requires a `_type` property. If no `_id` is provided, it will be generated by the database.
@@ -1002,7 +1006,7 @@ export declare class ObservableSanityClient {
1002
1006
  */
1003
1007
  create<R extends Record<string, Any> = Record<string, Any>>(
1004
1008
  document: SanityDocumentStub<R>,
1005
- options: AllDocumentIdsMutationOptions
1009
+ options: AllDocumentIdsMutationOptions,
1006
1010
  ): Observable<MultipleMutationResult>
1007
1011
  /**
1008
1012
  * Create a document. Requires a `_type` property. If no `_id` is provided, it will be generated by the database.
@@ -1013,7 +1017,7 @@ export declare class ObservableSanityClient {
1013
1017
  */
1014
1018
  create<R extends Record<string, Any> = Record<string, Any>>(
1015
1019
  document: SanityDocumentStub<R>,
1016
- options?: BaseMutationOptions
1020
+ options?: BaseMutationOptions,
1017
1021
  ): Observable<SanityDocument<R>>
1018
1022
  /**
1019
1023
  * Create a document if no document with the same ID already exists.
@@ -1024,7 +1028,7 @@ export declare class ObservableSanityClient {
1024
1028
  */
1025
1029
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
1026
1030
  document: IdentifiedSanityDocumentStub<R>,
1027
- options: FirstDocumentMutationOptions
1031
+ options: FirstDocumentMutationOptions,
1028
1032
  ): Observable<SanityDocument<R>>
1029
1033
  /**
1030
1034
  * Create a document if no document with the same ID already exists.
@@ -1035,7 +1039,7 @@ export declare class ObservableSanityClient {
1035
1039
  */
1036
1040
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
1037
1041
  document: IdentifiedSanityDocumentStub<R>,
1038
- options: AllDocumentsMutationOptions
1042
+ options: AllDocumentsMutationOptions,
1039
1043
  ): Observable<SanityDocument<R>[]>
1040
1044
  /**
1041
1045
  * Create a document if no document with the same ID already exists.
@@ -1046,7 +1050,7 @@ export declare class ObservableSanityClient {
1046
1050
  */
1047
1051
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
1048
1052
  document: IdentifiedSanityDocumentStub<R>,
1049
- options: FirstDocumentIdMutationOptions
1053
+ options: FirstDocumentIdMutationOptions,
1050
1054
  ): Observable<SingleMutationResult>
1051
1055
  /**
1052
1056
  * Create a document if no document with the same ID already exists.
@@ -1057,7 +1061,7 @@ export declare class ObservableSanityClient {
1057
1061
  */
1058
1062
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
1059
1063
  document: IdentifiedSanityDocumentStub<R>,
1060
- options: AllDocumentIdsMutationOptions
1064
+ options: AllDocumentIdsMutationOptions,
1061
1065
  ): Observable<MultipleMutationResult>
1062
1066
  /**
1063
1067
  * Create a document if no document with the same ID already exists.
@@ -1068,7 +1072,7 @@ export declare class ObservableSanityClient {
1068
1072
  */
1069
1073
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
1070
1074
  document: IdentifiedSanityDocumentStub<R>,
1071
- options?: BaseMutationOptions
1075
+ options?: BaseMutationOptions,
1072
1076
  ): Observable<SanityDocument<R>>
1073
1077
  /**
1074
1078
  * Create a document if it does not exist, or replace a document with the same document ID
@@ -1079,7 +1083,7 @@ export declare class ObservableSanityClient {
1079
1083
  */
1080
1084
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
1081
1085
  document: IdentifiedSanityDocumentStub<R>,
1082
- options: FirstDocumentMutationOptions
1086
+ options: FirstDocumentMutationOptions,
1083
1087
  ): Observable<SanityDocument<R>>
1084
1088
  /**
1085
1089
  * Create a document if it does not exist, or replace a document with the same document ID
@@ -1090,7 +1094,7 @@ export declare class ObservableSanityClient {
1090
1094
  */
1091
1095
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
1092
1096
  document: IdentifiedSanityDocumentStub<R>,
1093
- options: AllDocumentsMutationOptions
1097
+ options: AllDocumentsMutationOptions,
1094
1098
  ): Observable<SanityDocument<R>[]>
1095
1099
  /**
1096
1100
  * Create a document if it does not exist, or replace a document with the same document ID
@@ -1101,7 +1105,7 @@ export declare class ObservableSanityClient {
1101
1105
  */
1102
1106
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
1103
1107
  document: IdentifiedSanityDocumentStub<R>,
1104
- options: FirstDocumentIdMutationOptions
1108
+ options: FirstDocumentIdMutationOptions,
1105
1109
  ): Observable<SingleMutationResult>
1106
1110
  /**
1107
1111
  * Create a document if it does not exist, or replace a document with the same document ID
@@ -1112,7 +1116,7 @@ export declare class ObservableSanityClient {
1112
1116
  */
1113
1117
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
1114
1118
  document: IdentifiedSanityDocumentStub<R>,
1115
- options: AllDocumentIdsMutationOptions
1119
+ options: AllDocumentIdsMutationOptions,
1116
1120
  ): Observable<MultipleMutationResult>
1117
1121
  /**
1118
1122
  * Create a document if it does not exist, or replace a document with the same document ID
@@ -1123,7 +1127,7 @@ export declare class ObservableSanityClient {
1123
1127
  */
1124
1128
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
1125
1129
  document: IdentifiedSanityDocumentStub<R>,
1126
- options?: BaseMutationOptions
1130
+ options?: BaseMutationOptions,
1127
1131
  ): Observable<SanityDocument<R>>
1128
1132
  /**
1129
1133
  * Deletes a document with the given document ID.
@@ -1134,7 +1138,7 @@ export declare class ObservableSanityClient {
1134
1138
  */
1135
1139
  delete<R extends Record<string, Any> = Record<string, Any>>(
1136
1140
  id: string,
1137
- options: FirstDocumentMutationOptions
1141
+ options: FirstDocumentMutationOptions,
1138
1142
  ): Observable<SanityDocument<R>>
1139
1143
  /**
1140
1144
  * Deletes a document with the given document ID.
@@ -1145,7 +1149,7 @@ export declare class ObservableSanityClient {
1145
1149
  */
1146
1150
  delete<R extends Record<string, Any> = Record<string, Any>>(
1147
1151
  id: string,
1148
- options: AllDocumentsMutationOptions
1152
+ options: AllDocumentsMutationOptions,
1149
1153
  ): Observable<SanityDocument<R>[]>
1150
1154
  /**
1151
1155
  * Deletes a document with the given document ID.
@@ -1172,7 +1176,7 @@ export declare class ObservableSanityClient {
1172
1176
  */
1173
1177
  delete<R extends Record<string, Any> = Record<string, Any>>(
1174
1178
  id: string,
1175
- options?: BaseMutationOptions
1179
+ options?: BaseMutationOptions,
1176
1180
  ): Observable<SanityDocument<R>>
1177
1181
  /**
1178
1182
  * Deletes one or more documents matching the given query or document ID.
@@ -1183,7 +1187,7 @@ export declare class ObservableSanityClient {
1183
1187
  */
1184
1188
  delete<R extends Record<string, Any> = Record<string, Any>>(
1185
1189
  selection: MutationSelection,
1186
- options: FirstDocumentMutationOptions
1190
+ options: FirstDocumentMutationOptions,
1187
1191
  ): Observable<SanityDocument<R>>
1188
1192
  /**
1189
1193
  * Deletes one or more documents matching the given query or document ID.
@@ -1194,7 +1198,7 @@ export declare class ObservableSanityClient {
1194
1198
  */
1195
1199
  delete<R extends Record<string, Any> = Record<string, Any>>(
1196
1200
  selection: MutationSelection,
1197
- options: AllDocumentsMutationOptions
1201
+ options: AllDocumentsMutationOptions,
1198
1202
  ): Observable<SanityDocument<R>[]>
1199
1203
  /**
1200
1204
  * Deletes one or more documents matching the given query or document ID.
@@ -1205,7 +1209,7 @@ export declare class ObservableSanityClient {
1205
1209
  */
1206
1210
  delete(
1207
1211
  selection: MutationSelection,
1208
- options: FirstDocumentIdMutationOptions
1212
+ options: FirstDocumentIdMutationOptions,
1209
1213
  ): Observable<SingleMutationResult>
1210
1214
  /**
1211
1215
  * Deletes one or more documents matching the given query or document ID.
@@ -1216,7 +1220,7 @@ export declare class ObservableSanityClient {
1216
1220
  */
1217
1221
  delete(
1218
1222
  selection: MutationSelection,
1219
- options: AllDocumentIdsMutationOptions
1223
+ options: AllDocumentIdsMutationOptions,
1220
1224
  ): Observable<MultipleMutationResult>
1221
1225
  /**
1222
1226
  * Deletes one or more documents matching the given query or document ID.
@@ -1227,7 +1231,7 @@ export declare class ObservableSanityClient {
1227
1231
  */
1228
1232
  delete<R extends Record<string, Any> = Record<string, Any>>(
1229
1233
  selection: MutationSelection,
1230
- options?: BaseMutationOptions
1234
+ options?: BaseMutationOptions,
1231
1235
  ): Observable<SanityDocument<R>>
1232
1236
  /**
1233
1237
  * Perform mutation operations against the configured dataset
@@ -1238,7 +1242,7 @@ export declare class ObservableSanityClient {
1238
1242
  */
1239
1243
  mutate<R extends Record<string, Any> = Record<string, Any>>(
1240
1244
  operations: Mutation<R>[] | ObservablePatch | ObservableTransaction,
1241
- options: FirstDocumentMutationOptions
1245
+ options: FirstDocumentMutationOptions,
1242
1246
  ): Observable<SanityDocument<R>>
1243
1247
  /**
1244
1248
  * Perform mutation operations against the configured dataset.
@@ -1249,7 +1253,7 @@ export declare class ObservableSanityClient {
1249
1253
  */
1250
1254
  mutate<R extends Record<string, Any> = Record<string, Any>>(
1251
1255
  operations: Mutation<R>[] | ObservablePatch | ObservableTransaction,
1252
- options: AllDocumentsMutationOptions
1256
+ options: AllDocumentsMutationOptions,
1253
1257
  ): Observable<SanityDocument<R>[]>
1254
1258
  /**
1255
1259
  * Perform mutation operations against the configured dataset
@@ -1260,7 +1264,7 @@ export declare class ObservableSanityClient {
1260
1264
  */
1261
1265
  mutate<R extends Record<string, Any> = Record<string, Any>>(
1262
1266
  operations: Mutation<R>[] | ObservablePatch | ObservableTransaction,
1263
- options: FirstDocumentIdMutationOptions
1267
+ options: FirstDocumentIdMutationOptions,
1264
1268
  ): Observable<SingleMutationResult>
1265
1269
  /**
1266
1270
  * Perform mutation operations against the configured dataset
@@ -1271,7 +1275,7 @@ export declare class ObservableSanityClient {
1271
1275
  */
1272
1276
  mutate<R extends Record<string, Any> = Record<string, Any>>(
1273
1277
  operations: Mutation<R>[] | ObservablePatch | ObservableTransaction,
1274
- options: AllDocumentIdsMutationOptions
1278
+ options: AllDocumentIdsMutationOptions,
1275
1279
  ): Observable<MultipleMutationResult>
1276
1280
  /**
1277
1281
  * Perform mutation operations against the configured dataset
@@ -1282,7 +1286,7 @@ export declare class ObservableSanityClient {
1282
1286
  */
1283
1287
  mutate<R extends Record<string, Any> = Record<string, Any>>(
1284
1288
  operations: Mutation<R>[] | ObservablePatch | ObservableTransaction,
1285
- options?: BaseMutationOptions
1289
+ options?: BaseMutationOptions,
1286
1290
  ): Observable<SanityDocument<R>>
1287
1291
  /**
1288
1292
  * Create a new buildable patch of operations to perform
@@ -1297,7 +1301,7 @@ export declare class ObservableSanityClient {
1297
1301
  * @param operations - Optional array of mutation operations to initialize the transaction instance with
1298
1302
  */
1299
1303
  transaction<R extends Record<string, Any> = Record<string, Any>>(
1300
- operations?: Mutation<R>[]
1304
+ operations?: Mutation<R>[],
1301
1305
  ): ObservableTransaction
1302
1306
  /**
1303
1307
  * DEPRECATED: Perform an HTTP request against the Sanity API
@@ -1336,7 +1340,7 @@ export declare class ObservableTransaction extends BaseTransaction {
1336
1340
  * @param options - Options for the mutation operation
1337
1341
  */
1338
1342
  commit<R extends Record<string, Any>>(
1339
- options: TransactionFirstDocumentMutationOptions
1343
+ options: TransactionFirstDocumentMutationOptions,
1340
1344
  ): Observable<SanityDocument<R>>
1341
1345
  /**
1342
1346
  * Commit the transaction, returning an observable that produces an array of the mutated documents
@@ -1344,7 +1348,7 @@ export declare class ObservableTransaction extends BaseTransaction {
1344
1348
  * @param options - Options for the mutation operation
1345
1349
  */
1346
1350
  commit<R extends Record<string, Any>>(
1347
- options: TransactionAllDocumentsMutationOptions
1351
+ options: TransactionAllDocumentsMutationOptions,
1348
1352
  ): Observable<SanityDocument<R>[]>
1349
1353
  /**
1350
1354
  * Commit the transaction, returning an observable that produces a mutation result object
@@ -1391,7 +1395,7 @@ export declare class ObservableUsersClient {
1391
1395
  * @param id - User ID of the user to fetch. If `me` is provided, a minimal response including the users role is returned.
1392
1396
  */
1393
1397
  getById<T extends 'me' | string>(
1394
- id: T
1398
+ id: T,
1395
1399
  ): Observable<T extends 'me' ? CurrentSanityUser : SanityUser>
1396
1400
  }
1397
1401
 
@@ -1409,7 +1413,7 @@ export declare class Patch extends BasePatch {
1409
1413
  * @param options - Options for the mutation operation
1410
1414
  */
1411
1415
  commit<R extends Record<string, Any> = Record<string, Any>>(
1412
- options: FirstDocumentMutationOptions
1416
+ options: FirstDocumentMutationOptions,
1413
1417
  ): Promise<SanityDocument<R>>
1414
1418
  /**
1415
1419
  * Commit the patch, returning a promise that resolves to an array of the mutated documents
@@ -1417,7 +1421,7 @@ export declare class Patch extends BasePatch {
1417
1421
  * @param options - Options for the mutation operation
1418
1422
  */
1419
1423
  commit<R extends Record<string, Any> = Record<string, Any>>(
1420
- options: AllDocumentsMutationOptions
1424
+ options: AllDocumentsMutationOptions,
1421
1425
  ): Promise<SanityDocument<R>[]>
1422
1426
  /**
1423
1427
  * Commit the patch, returning a promise that resolves to a mutation result object
@@ -1437,7 +1441,7 @@ export declare class Patch extends BasePatch {
1437
1441
  * @param options - Options for the mutation operation
1438
1442
  */
1439
1443
  commit<R extends Record<string, Any> = Record<string, Any>>(
1440
- options?: BaseMutationOptions
1444
+ options?: BaseMutationOptions,
1441
1445
  ): Promise<SanityDocument<R>>
1442
1446
  }
1443
1447
 
@@ -1488,9 +1492,13 @@ export declare class ProjectsClient {
1488
1492
  #private
1489
1493
  constructor(client: SanityClient, httpRequest: HttpRequest)
1490
1494
  /**
1491
- * Fetch a list of projects the authenticated user has access to
1495
+ * Fetch a list of projects the authenticated user has access to.
1496
+ *
1497
+ * @param options - Options for the list request
1498
+ * @param options.includeMembers - Whether to include members in the response (default: true)
1492
1499
  */
1493
- list(): Promise<SanityProject[]>
1500
+ list(options?: {includeMembers?: true}): Promise<SanityProject[]>
1501
+ list(options?: {includeMembers?: false}): Promise<Omit<SanityProject, 'members'>[]>
1494
1502
  /**
1495
1503
  * Fetch a project by project ID
1496
1504
  *
@@ -1658,7 +1666,7 @@ export declare class SanityClient {
1658
1666
  fetch<R = Any, Q = QueryParams>(
1659
1667
  query: string,
1660
1668
  params: Q | undefined,
1661
- options: FilteredResponseQueryOptions
1669
+ options: FilteredResponseQueryOptions,
1662
1670
  ): Promise<R>
1663
1671
  /**
1664
1672
  * Perform a GROQ-query against the configured dataset.
@@ -1670,7 +1678,7 @@ export declare class SanityClient {
1670
1678
  fetch<R = Any, Q = QueryParams>(
1671
1679
  query: string,
1672
1680
  params: Q | undefined,
1673
- options: UnfilteredResponseQueryOptions
1681
+ options: UnfilteredResponseQueryOptions,
1674
1682
  ): Promise<RawQueryResponse<R>>
1675
1683
  /**
1676
1684
  * Fetch a single document with the given ID.
@@ -1682,7 +1690,7 @@ export declare class SanityClient {
1682
1690
  id: string,
1683
1691
  options?: {
1684
1692
  tag?: string
1685
- }
1693
+ },
1686
1694
  ): Promise<SanityDocument<R> | undefined>
1687
1695
  /**
1688
1696
  * Fetch multiple documents in one request.
@@ -1697,7 +1705,7 @@ export declare class SanityClient {
1697
1705
  ids: string[],
1698
1706
  options?: {
1699
1707
  tag?: string
1700
- }
1708
+ },
1701
1709
  ): Promise<(SanityDocument<R> | null)[]>
1702
1710
  /**
1703
1711
  * Create a document. Requires a `_type` property. If no `_id` is provided, it will be generated by the database.
@@ -1708,7 +1716,7 @@ export declare class SanityClient {
1708
1716
  */
1709
1717
  create<R extends Record<string, Any> = Record<string, Any>>(
1710
1718
  document: SanityDocumentStub<R>,
1711
- options: FirstDocumentMutationOptions
1719
+ options: FirstDocumentMutationOptions,
1712
1720
  ): Promise<SanityDocument<R>>
1713
1721
  /**
1714
1722
  * Create a document. Requires a `_type` property. If no `_id` is provided, it will be generated by the database.
@@ -1719,7 +1727,7 @@ export declare class SanityClient {
1719
1727
  */
1720
1728
  create<R extends Record<string, Any> = Record<string, Any>>(
1721
1729
  document: SanityDocumentStub<R>,
1722
- options: AllDocumentsMutationOptions
1730
+ options: AllDocumentsMutationOptions,
1723
1731
  ): Promise<SanityDocument<R>[]>
1724
1732
  /**
1725
1733
  * Create a document. Requires a `_type` property. If no `_id` is provided, it will be generated by the database.
@@ -1730,7 +1738,7 @@ export declare class SanityClient {
1730
1738
  */
1731
1739
  create<R extends Record<string, Any> = Record<string, Any>>(
1732
1740
  document: SanityDocumentStub<R>,
1733
- options: FirstDocumentIdMutationOptions
1741
+ options: FirstDocumentIdMutationOptions,
1734
1742
  ): Promise<SingleMutationResult>
1735
1743
  /**
1736
1744
  * Create a document. Requires a `_type` property. If no `_id` is provided, it will be generated by the database.
@@ -1741,7 +1749,7 @@ export declare class SanityClient {
1741
1749
  */
1742
1750
  create<R extends Record<string, Any> = Record<string, Any>>(
1743
1751
  document: SanityDocumentStub<R>,
1744
- options: AllDocumentIdsMutationOptions
1752
+ options: AllDocumentIdsMutationOptions,
1745
1753
  ): Promise<MultipleMutationResult>
1746
1754
  /**
1747
1755
  * Create a document. Requires a `_type` property. If no `_id` is provided, it will be generated by the database.
@@ -1752,7 +1760,7 @@ export declare class SanityClient {
1752
1760
  */
1753
1761
  create<R extends Record<string, Any> = Record<string, Any>>(
1754
1762
  document: SanityDocumentStub<R>,
1755
- options?: BaseMutationOptions
1763
+ options?: BaseMutationOptions,
1756
1764
  ): Promise<SanityDocument<R>>
1757
1765
  /**
1758
1766
  * Create a document if no document with the same ID already exists.
@@ -1763,7 +1771,7 @@ export declare class SanityClient {
1763
1771
  */
1764
1772
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
1765
1773
  document: IdentifiedSanityDocumentStub<R>,
1766
- options: FirstDocumentMutationOptions
1774
+ options: FirstDocumentMutationOptions,
1767
1775
  ): Promise<SanityDocument<R>>
1768
1776
  /**
1769
1777
  * Create a document if no document with the same ID already exists.
@@ -1774,7 +1782,7 @@ export declare class SanityClient {
1774
1782
  */
1775
1783
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
1776
1784
  document: IdentifiedSanityDocumentStub<R>,
1777
- options: AllDocumentsMutationOptions
1785
+ options: AllDocumentsMutationOptions,
1778
1786
  ): Promise<SanityDocument<R>[]>
1779
1787
  /**
1780
1788
  * Create a document if no document with the same ID already exists.
@@ -1785,7 +1793,7 @@ export declare class SanityClient {
1785
1793
  */
1786
1794
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
1787
1795
  document: IdentifiedSanityDocumentStub<R>,
1788
- options: FirstDocumentIdMutationOptions
1796
+ options: FirstDocumentIdMutationOptions,
1789
1797
  ): Promise<SingleMutationResult>
1790
1798
  /**
1791
1799
  * Create a document if no document with the same ID already exists.
@@ -1796,7 +1804,7 @@ export declare class SanityClient {
1796
1804
  */
1797
1805
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
1798
1806
  document: IdentifiedSanityDocumentStub<R>,
1799
- options: AllDocumentIdsMutationOptions
1807
+ options: AllDocumentIdsMutationOptions,
1800
1808
  ): Promise<MultipleMutationResult>
1801
1809
  /**
1802
1810
  * Create a document if no document with the same ID already exists.
@@ -1807,7 +1815,7 @@ export declare class SanityClient {
1807
1815
  */
1808
1816
  createIfNotExists<R extends Record<string, Any> = Record<string, Any>>(
1809
1817
  document: IdentifiedSanityDocumentStub<R>,
1810
- options?: BaseMutationOptions
1818
+ options?: BaseMutationOptions,
1811
1819
  ): Promise<SanityDocument<R>>
1812
1820
  /**
1813
1821
  * Create a document if it does not exist, or replace a document with the same document ID
@@ -1818,7 +1826,7 @@ export declare class SanityClient {
1818
1826
  */
1819
1827
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
1820
1828
  document: IdentifiedSanityDocumentStub<R>,
1821
- options: FirstDocumentMutationOptions
1829
+ options: FirstDocumentMutationOptions,
1822
1830
  ): Promise<SanityDocument<R>>
1823
1831
  /**
1824
1832
  * Create a document if it does not exist, or replace a document with the same document ID
@@ -1829,7 +1837,7 @@ export declare class SanityClient {
1829
1837
  */
1830
1838
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
1831
1839
  document: IdentifiedSanityDocumentStub<R>,
1832
- options: AllDocumentsMutationOptions
1840
+ options: AllDocumentsMutationOptions,
1833
1841
  ): Promise<SanityDocument<R>[]>
1834
1842
  /**
1835
1843
  * Create a document if it does not exist, or replace a document with the same document ID
@@ -1840,7 +1848,7 @@ export declare class SanityClient {
1840
1848
  */
1841
1849
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
1842
1850
  document: IdentifiedSanityDocumentStub<R>,
1843
- options: FirstDocumentIdMutationOptions
1851
+ options: FirstDocumentIdMutationOptions,
1844
1852
  ): Promise<SingleMutationResult>
1845
1853
  /**
1846
1854
  * Create a document if it does not exist, or replace a document with the same document ID
@@ -1851,7 +1859,7 @@ export declare class SanityClient {
1851
1859
  */
1852
1860
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
1853
1861
  document: IdentifiedSanityDocumentStub<R>,
1854
- options: AllDocumentIdsMutationOptions
1862
+ options: AllDocumentIdsMutationOptions,
1855
1863
  ): Promise<MultipleMutationResult>
1856
1864
  /**
1857
1865
  * Create a document if it does not exist, or replace a document with the same document ID
@@ -1862,7 +1870,7 @@ export declare class SanityClient {
1862
1870
  */
1863
1871
  createOrReplace<R extends Record<string, Any> = Record<string, Any>>(
1864
1872
  document: IdentifiedSanityDocumentStub<R>,
1865
- options?: BaseMutationOptions
1873
+ options?: BaseMutationOptions,
1866
1874
  ): Promise<SanityDocument<R>>
1867
1875
  /**
1868
1876
  * Deletes a document with the given document ID.
@@ -1873,7 +1881,7 @@ export declare class SanityClient {
1873
1881
  */
1874
1882
  delete<R extends Record<string, Any> = Record<string, Any>>(
1875
1883
  id: string,
1876
- options: FirstDocumentMutationOptions
1884
+ options: FirstDocumentMutationOptions,
1877
1885
  ): Promise<SanityDocument<R>>
1878
1886
  /**
1879
1887
  * Deletes a document with the given document ID.
@@ -1884,7 +1892,7 @@ export declare class SanityClient {
1884
1892
  */
1885
1893
  delete<R extends Record<string, Any> = Record<string, Any>>(
1886
1894
  id: string,
1887
- options: AllDocumentsMutationOptions
1895
+ options: AllDocumentsMutationOptions,
1888
1896
  ): Promise<SanityDocument<R>[]>
1889
1897
  /**
1890
1898
  * Deletes a document with the given document ID.
@@ -1911,7 +1919,7 @@ export declare class SanityClient {
1911
1919
  */
1912
1920
  delete<R extends Record<string, Any> = Record<string, Any>>(
1913
1921
  id: string,
1914
- options?: BaseMutationOptions
1922
+ options?: BaseMutationOptions,
1915
1923
  ): Promise<SanityDocument<R>>
1916
1924
  /**
1917
1925
  * Deletes one or more documents matching the given query or document ID.
@@ -1922,7 +1930,7 @@ export declare class SanityClient {
1922
1930
  */
1923
1931
  delete<R extends Record<string, Any> = Record<string, Any>>(
1924
1932
  selection: MutationSelection,
1925
- options: FirstDocumentMutationOptions
1933
+ options: FirstDocumentMutationOptions,
1926
1934
  ): Promise<SanityDocument<R>>
1927
1935
  /**
1928
1936
  * Deletes one or more documents matching the given query or document ID.
@@ -1933,7 +1941,7 @@ export declare class SanityClient {
1933
1941
  */
1934
1942
  delete<R extends Record<string, Any> = Record<string, Any>>(
1935
1943
  selection: MutationSelection,
1936
- options: AllDocumentsMutationOptions
1944
+ options: AllDocumentsMutationOptions,
1937
1945
  ): Promise<SanityDocument<R>[]>
1938
1946
  /**
1939
1947
  * Deletes one or more documents matching the given query or document ID.
@@ -1944,7 +1952,7 @@ export declare class SanityClient {
1944
1952
  */
1945
1953
  delete(
1946
1954
  selection: MutationSelection,
1947
- options: FirstDocumentIdMutationOptions
1955
+ options: FirstDocumentIdMutationOptions,
1948
1956
  ): Promise<SingleMutationResult>
1949
1957
  /**
1950
1958
  * Deletes one or more documents matching the given query or document ID.
@@ -1955,7 +1963,7 @@ export declare class SanityClient {
1955
1963
  */
1956
1964
  delete(
1957
1965
  selection: MutationSelection,
1958
- options: AllDocumentIdsMutationOptions
1966
+ options: AllDocumentIdsMutationOptions,
1959
1967
  ): Promise<MultipleMutationResult>
1960
1968
  /**
1961
1969
  * Deletes one or more documents matching the given query or document ID.
@@ -1966,7 +1974,7 @@ export declare class SanityClient {
1966
1974
  */
1967
1975
  delete<R extends Record<string, Any> = Record<string, Any>>(
1968
1976
  selection: MutationSelection,
1969
- options?: BaseMutationOptions
1977
+ options?: BaseMutationOptions,
1970
1978
  ): Promise<SanityDocument<R>>
1971
1979
  /**
1972
1980
  * Perform mutation operations against the configured dataset
@@ -1977,7 +1985,7 @@ export declare class SanityClient {
1977
1985
  */
1978
1986
  mutate<R extends Record<string, Any> = Record<string, Any>>(
1979
1987
  operations: Mutation<R>[] | Patch | Transaction,
1980
- options: FirstDocumentMutationOptions
1988
+ options: FirstDocumentMutationOptions,
1981
1989
  ): Promise<SanityDocument<R>>
1982
1990
  /**
1983
1991
  * Perform mutation operations against the configured dataset.
@@ -1988,7 +1996,7 @@ export declare class SanityClient {
1988
1996
  */
1989
1997
  mutate<R extends Record<string, Any> = Record<string, Any>>(
1990
1998
  operations: Mutation<R>[] | Patch | Transaction,
1991
- options: AllDocumentsMutationOptions
1999
+ options: AllDocumentsMutationOptions,
1992
2000
  ): Promise<SanityDocument<R>[]>
1993
2001
  /**
1994
2002
  * Perform mutation operations against the configured dataset
@@ -1999,7 +2007,7 @@ export declare class SanityClient {
1999
2007
  */
2000
2008
  mutate<R extends Record<string, Any> = Record<string, Any>>(
2001
2009
  operations: Mutation<R>[] | Patch | Transaction,
2002
- options: FirstDocumentIdMutationOptions
2010
+ options: FirstDocumentIdMutationOptions,
2003
2011
  ): Promise<SingleMutationResult>
2004
2012
  /**
2005
2013
  * Perform mutation operations against the configured dataset
@@ -2010,7 +2018,7 @@ export declare class SanityClient {
2010
2018
  */
2011
2019
  mutate<R extends Record<string, Any>>(
2012
2020
  operations: Mutation<R>[] | Patch | Transaction,
2013
- options: AllDocumentIdsMutationOptions
2021
+ options: AllDocumentIdsMutationOptions,
2014
2022
  ): Promise<MultipleMutationResult>
2015
2023
  /**
2016
2024
  * Perform mutation operations against the configured dataset
@@ -2021,7 +2029,7 @@ export declare class SanityClient {
2021
2029
  */
2022
2030
  mutate<R extends Record<string, Any> = Record<string, Any>>(
2023
2031
  operations: Mutation<R>[] | Patch | Transaction,
2024
- options?: BaseMutationOptions
2032
+ options?: BaseMutationOptions,
2025
2033
  ): Promise<SanityDocument<R>>
2026
2034
  /**
2027
2035
  * Create a new buildable patch of operations to perform
@@ -2036,7 +2044,7 @@ export declare class SanityClient {
2036
2044
  * @param operations - Optional array of mutation operations to initialize the transaction instance with
2037
2045
  */
2038
2046
  transaction<R extends Record<string, Any> = Record<string, Any>>(
2039
- operations?: Mutation<R>[]
2047
+ operations?: Mutation<R>[],
2040
2048
  ): Transaction
2041
2049
  /**
2042
2050
  * Perform a request against the Sanity API
@@ -2217,7 +2225,7 @@ export declare class Transaction extends BaseTransaction {
2217
2225
  * @param options - Options for the mutation operation
2218
2226
  */
2219
2227
  commit<R extends Record<string, Any>>(
2220
- options: TransactionFirstDocumentMutationOptions
2228
+ options: TransactionFirstDocumentMutationOptions,
2221
2229
  ): Promise<SanityDocument<R>>
2222
2230
  /**
2223
2231
  * Commit the transaction, returning a promise that resolves to an array of the mutated documents
@@ -2225,7 +2233,7 @@ export declare class Transaction extends BaseTransaction {
2225
2233
  * @param options - Options for the mutation operation
2226
2234
  */
2227
2235
  commit<R extends Record<string, Any>>(
2228
- options: TransactionAllDocumentsMutationOptions
2236
+ options: TransactionAllDocumentsMutationOptions,
2229
2237
  ): Promise<SanityDocument<R>[]>
2230
2238
  /**
2231
2239
  * Commit the transaction, returning a promise that resolves to a mutation result object