@sanity/client 7.15.0 → 7.16.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.
@@ -1190,6 +1190,20 @@ export declare interface CurrentSanityUser {
1190
1190
  /** @public */
1191
1191
  export declare type DatasetAclMode = 'public' | 'private' | 'custom'
1192
1192
 
1193
+ /** @public */
1194
+ export declare type DatasetCreateOptions = {
1195
+ aclMode?: DatasetAclMode
1196
+ embeddings?: {
1197
+ enabled: boolean
1198
+ projection?: string
1199
+ }
1200
+ }
1201
+
1202
+ /** @public */
1203
+ export declare type DatasetEditOptions = {
1204
+ aclMode?: DatasetAclMode
1205
+ }
1206
+
1193
1207
  /** @public */
1194
1208
  export declare type DatasetResponse = {
1195
1209
  datasetName: string
@@ -1204,26 +1218,16 @@ export declare class DatasetsClient {
1204
1218
  * Create a new dataset with the given name
1205
1219
  *
1206
1220
  * @param name - Name of the dataset to create
1207
- * @param options - Options for the dataset
1221
+ * @param options - Options for the dataset, including optional embeddings configuration
1208
1222
  */
1209
- create(
1210
- name: string,
1211
- options?: {
1212
- aclMode?: DatasetAclMode
1213
- },
1214
- ): Promise<DatasetResponse>
1223
+ create(name: string, options?: DatasetCreateOptions): Promise<DatasetResponse>
1215
1224
  /**
1216
1225
  * Edit a dataset with the given name
1217
1226
  *
1218
1227
  * @param name - Name of the dataset to edit
1219
1228
  * @param options - New options for the dataset
1220
1229
  */
1221
- edit(
1222
- name: string,
1223
- options?: {
1224
- aclMode?: DatasetAclMode
1225
- },
1226
- ): Promise<DatasetResponse>
1230
+ edit(name: string, options?: DatasetEditOptions): Promise<DatasetResponse>
1227
1231
  /**
1228
1232
  * Delete a dataset with the given name
1229
1233
  *
@@ -1236,6 +1240,19 @@ export declare class DatasetsClient {
1236
1240
  * Fetch a list of datasets for the configured project
1237
1241
  */
1238
1242
  list(): Promise<DatasetsResponse>
1243
+ /**
1244
+ * Get embeddings settings for a dataset
1245
+ *
1246
+ * @param name - Name of the dataset
1247
+ */
1248
+ getEmbeddingsSettings(name: string): Promise<EmbeddingsSettings>
1249
+ /**
1250
+ * Edit embeddings settings for a dataset
1251
+ *
1252
+ * @param name - Name of the dataset
1253
+ * @param settings - Embeddings settings to apply
1254
+ */
1255
+ editEmbeddingsSettings(name: string, settings: EmbeddingsSettingsBody): Promise<void>
1239
1256
  }
1240
1257
 
1241
1258
  /** @public */
@@ -1434,6 +1451,19 @@ export declare interface EditReleaseAction {
1434
1451
  patch: PatchOperations
1435
1452
  }
1436
1453
 
1454
+ /** @public */
1455
+ export declare type EmbeddingsSettings = {
1456
+ enabled: boolean
1457
+ projection?: string
1458
+ status: string
1459
+ }
1460
+
1461
+ /** @public */
1462
+ export declare type EmbeddingsSettingsBody = {
1463
+ enabled: boolean
1464
+ projection?: string
1465
+ }
1466
+
1437
1467
  /**
1438
1468
  * @internal
1439
1469
  */
@@ -2717,26 +2747,16 @@ export declare class ObservableDatasetsClient {
2717
2747
  * Create a new dataset with the given name
2718
2748
  *
2719
2749
  * @param name - Name of the dataset to create
2720
- * @param options - Options for the dataset
2750
+ * @param options - Options for the dataset, including optional embeddings configuration
2721
2751
  */
2722
- create(
2723
- name: string,
2724
- options?: {
2725
- aclMode?: DatasetAclMode
2726
- },
2727
- ): Observable<DatasetResponse>
2752
+ create(name: string, options?: DatasetCreateOptions): Observable<DatasetResponse>
2728
2753
  /**
2729
2754
  * Edit a dataset with the given name
2730
2755
  *
2731
2756
  * @param name - Name of the dataset to edit
2732
2757
  * @param options - New options for the dataset
2733
2758
  */
2734
- edit(
2735
- name: string,
2736
- options?: {
2737
- aclMode?: DatasetAclMode
2738
- },
2739
- ): Observable<DatasetResponse>
2759
+ edit(name: string, options?: DatasetEditOptions): Observable<DatasetResponse>
2740
2760
  /**
2741
2761
  * Delete a dataset with the given name
2742
2762
  *
@@ -2749,6 +2769,19 @@ export declare class ObservableDatasetsClient {
2749
2769
  * Fetch a list of datasets for the configured project
2750
2770
  */
2751
2771
  list(): Observable<DatasetsResponse>
2772
+ /**
2773
+ * Get embeddings settings for a dataset
2774
+ *
2775
+ * @param name - Name of the dataset
2776
+ */
2777
+ getEmbeddingsSettings(name: string): Observable<EmbeddingsSettings>
2778
+ /**
2779
+ * Edit embeddings settings for a dataset
2780
+ *
2781
+ * @param name - Name of the dataset
2782
+ * @param settings - Embeddings settings to apply
2783
+ */
2784
+ editEmbeddingsSettings(name: string, settings: EmbeddingsSettingsBody): Observable<void>
2752
2785
  }
2753
2786
 
2754
2787
  /** @internal */
@@ -1190,6 +1190,20 @@ export declare interface CurrentSanityUser {
1190
1190
  /** @public */
1191
1191
  export declare type DatasetAclMode = 'public' | 'private' | 'custom'
1192
1192
 
1193
+ /** @public */
1194
+ export declare type DatasetCreateOptions = {
1195
+ aclMode?: DatasetAclMode
1196
+ embeddings?: {
1197
+ enabled: boolean
1198
+ projection?: string
1199
+ }
1200
+ }
1201
+
1202
+ /** @public */
1203
+ export declare type DatasetEditOptions = {
1204
+ aclMode?: DatasetAclMode
1205
+ }
1206
+
1193
1207
  /** @public */
1194
1208
  export declare type DatasetResponse = {
1195
1209
  datasetName: string
@@ -1204,26 +1218,16 @@ export declare class DatasetsClient {
1204
1218
  * Create a new dataset with the given name
1205
1219
  *
1206
1220
  * @param name - Name of the dataset to create
1207
- * @param options - Options for the dataset
1221
+ * @param options - Options for the dataset, including optional embeddings configuration
1208
1222
  */
1209
- create(
1210
- name: string,
1211
- options?: {
1212
- aclMode?: DatasetAclMode
1213
- },
1214
- ): Promise<DatasetResponse>
1223
+ create(name: string, options?: DatasetCreateOptions): Promise<DatasetResponse>
1215
1224
  /**
1216
1225
  * Edit a dataset with the given name
1217
1226
  *
1218
1227
  * @param name - Name of the dataset to edit
1219
1228
  * @param options - New options for the dataset
1220
1229
  */
1221
- edit(
1222
- name: string,
1223
- options?: {
1224
- aclMode?: DatasetAclMode
1225
- },
1226
- ): Promise<DatasetResponse>
1230
+ edit(name: string, options?: DatasetEditOptions): Promise<DatasetResponse>
1227
1231
  /**
1228
1232
  * Delete a dataset with the given name
1229
1233
  *
@@ -1236,6 +1240,19 @@ export declare class DatasetsClient {
1236
1240
  * Fetch a list of datasets for the configured project
1237
1241
  */
1238
1242
  list(): Promise<DatasetsResponse>
1243
+ /**
1244
+ * Get embeddings settings for a dataset
1245
+ *
1246
+ * @param name - Name of the dataset
1247
+ */
1248
+ getEmbeddingsSettings(name: string): Promise<EmbeddingsSettings>
1249
+ /**
1250
+ * Edit embeddings settings for a dataset
1251
+ *
1252
+ * @param name - Name of the dataset
1253
+ * @param settings - Embeddings settings to apply
1254
+ */
1255
+ editEmbeddingsSettings(name: string, settings: EmbeddingsSettingsBody): Promise<void>
1239
1256
  }
1240
1257
 
1241
1258
  /** @public */
@@ -1434,6 +1451,19 @@ export declare interface EditReleaseAction {
1434
1451
  patch: PatchOperations
1435
1452
  }
1436
1453
 
1454
+ /** @public */
1455
+ export declare type EmbeddingsSettings = {
1456
+ enabled: boolean
1457
+ projection?: string
1458
+ status: string
1459
+ }
1460
+
1461
+ /** @public */
1462
+ export declare type EmbeddingsSettingsBody = {
1463
+ enabled: boolean
1464
+ projection?: string
1465
+ }
1466
+
1437
1467
  /**
1438
1468
  * @internal
1439
1469
  */
@@ -2717,26 +2747,16 @@ export declare class ObservableDatasetsClient {
2717
2747
  * Create a new dataset with the given name
2718
2748
  *
2719
2749
  * @param name - Name of the dataset to create
2720
- * @param options - Options for the dataset
2750
+ * @param options - Options for the dataset, including optional embeddings configuration
2721
2751
  */
2722
- create(
2723
- name: string,
2724
- options?: {
2725
- aclMode?: DatasetAclMode
2726
- },
2727
- ): Observable<DatasetResponse>
2752
+ create(name: string, options?: DatasetCreateOptions): Observable<DatasetResponse>
2728
2753
  /**
2729
2754
  * Edit a dataset with the given name
2730
2755
  *
2731
2756
  * @param name - Name of the dataset to edit
2732
2757
  * @param options - New options for the dataset
2733
2758
  */
2734
- edit(
2735
- name: string,
2736
- options?: {
2737
- aclMode?: DatasetAclMode
2738
- },
2739
- ): Observable<DatasetResponse>
2759
+ edit(name: string, options?: DatasetEditOptions): Observable<DatasetResponse>
2740
2760
  /**
2741
2761
  * Delete a dataset with the given name
2742
2762
  *
@@ -2749,6 +2769,19 @@ export declare class ObservableDatasetsClient {
2749
2769
  * Fetch a list of datasets for the configured project
2750
2770
  */
2751
2771
  list(): Observable<DatasetsResponse>
2772
+ /**
2773
+ * Get embeddings settings for a dataset
2774
+ *
2775
+ * @param name - Name of the dataset
2776
+ */
2777
+ getEmbeddingsSettings(name: string): Observable<EmbeddingsSettings>
2778
+ /**
2779
+ * Edit embeddings settings for a dataset
2780
+ *
2781
+ * @param name - Name of the dataset
2782
+ * @param settings - Embeddings settings to apply
2783
+ */
2784
+ editEmbeddingsSettings(name: string, settings: EmbeddingsSettingsBody): Observable<void>
2752
2785
  }
2753
2786
 
2754
2787
  /** @internal */
package/dist/stega.d.cts CHANGED
@@ -1190,6 +1190,20 @@ export declare interface CurrentSanityUser {
1190
1190
  /** @public */
1191
1191
  export declare type DatasetAclMode = 'public' | 'private' | 'custom'
1192
1192
 
1193
+ /** @public */
1194
+ export declare type DatasetCreateOptions = {
1195
+ aclMode?: DatasetAclMode
1196
+ embeddings?: {
1197
+ enabled: boolean
1198
+ projection?: string
1199
+ }
1200
+ }
1201
+
1202
+ /** @public */
1203
+ export declare type DatasetEditOptions = {
1204
+ aclMode?: DatasetAclMode
1205
+ }
1206
+
1193
1207
  /** @public */
1194
1208
  export declare type DatasetResponse = {
1195
1209
  datasetName: string
@@ -1204,26 +1218,16 @@ export declare class DatasetsClient {
1204
1218
  * Create a new dataset with the given name
1205
1219
  *
1206
1220
  * @param name - Name of the dataset to create
1207
- * @param options - Options for the dataset
1221
+ * @param options - Options for the dataset, including optional embeddings configuration
1208
1222
  */
1209
- create(
1210
- name: string,
1211
- options?: {
1212
- aclMode?: DatasetAclMode
1213
- },
1214
- ): Promise<DatasetResponse>
1223
+ create(name: string, options?: DatasetCreateOptions): Promise<DatasetResponse>
1215
1224
  /**
1216
1225
  * Edit a dataset with the given name
1217
1226
  *
1218
1227
  * @param name - Name of the dataset to edit
1219
1228
  * @param options - New options for the dataset
1220
1229
  */
1221
- edit(
1222
- name: string,
1223
- options?: {
1224
- aclMode?: DatasetAclMode
1225
- },
1226
- ): Promise<DatasetResponse>
1230
+ edit(name: string, options?: DatasetEditOptions): Promise<DatasetResponse>
1227
1231
  /**
1228
1232
  * Delete a dataset with the given name
1229
1233
  *
@@ -1236,6 +1240,19 @@ export declare class DatasetsClient {
1236
1240
  * Fetch a list of datasets for the configured project
1237
1241
  */
1238
1242
  list(): Promise<DatasetsResponse>
1243
+ /**
1244
+ * Get embeddings settings for a dataset
1245
+ *
1246
+ * @param name - Name of the dataset
1247
+ */
1248
+ getEmbeddingsSettings(name: string): Promise<EmbeddingsSettings>
1249
+ /**
1250
+ * Edit embeddings settings for a dataset
1251
+ *
1252
+ * @param name - Name of the dataset
1253
+ * @param settings - Embeddings settings to apply
1254
+ */
1255
+ editEmbeddingsSettings(name: string, settings: EmbeddingsSettingsBody): Promise<void>
1239
1256
  }
1240
1257
 
1241
1258
  /** @public */
@@ -1434,6 +1451,19 @@ export declare interface EditReleaseAction {
1434
1451
  patch: PatchOperations
1435
1452
  }
1436
1453
 
1454
+ /** @public */
1455
+ export declare type EmbeddingsSettings = {
1456
+ enabled: boolean
1457
+ projection?: string
1458
+ status: string
1459
+ }
1460
+
1461
+ /** @public */
1462
+ export declare type EmbeddingsSettingsBody = {
1463
+ enabled: boolean
1464
+ projection?: string
1465
+ }
1466
+
1437
1467
  /**
1438
1468
  * @internal
1439
1469
  */
@@ -2717,26 +2747,16 @@ export declare class ObservableDatasetsClient {
2717
2747
  * Create a new dataset with the given name
2718
2748
  *
2719
2749
  * @param name - Name of the dataset to create
2720
- * @param options - Options for the dataset
2750
+ * @param options - Options for the dataset, including optional embeddings configuration
2721
2751
  */
2722
- create(
2723
- name: string,
2724
- options?: {
2725
- aclMode?: DatasetAclMode
2726
- },
2727
- ): Observable<DatasetResponse>
2752
+ create(name: string, options?: DatasetCreateOptions): Observable<DatasetResponse>
2728
2753
  /**
2729
2754
  * Edit a dataset with the given name
2730
2755
  *
2731
2756
  * @param name - Name of the dataset to edit
2732
2757
  * @param options - New options for the dataset
2733
2758
  */
2734
- edit(
2735
- name: string,
2736
- options?: {
2737
- aclMode?: DatasetAclMode
2738
- },
2739
- ): Observable<DatasetResponse>
2759
+ edit(name: string, options?: DatasetEditOptions): Observable<DatasetResponse>
2740
2760
  /**
2741
2761
  * Delete a dataset with the given name
2742
2762
  *
@@ -2749,6 +2769,19 @@ export declare class ObservableDatasetsClient {
2749
2769
  * Fetch a list of datasets for the configured project
2750
2770
  */
2751
2771
  list(): Observable<DatasetsResponse>
2772
+ /**
2773
+ * Get embeddings settings for a dataset
2774
+ *
2775
+ * @param name - Name of the dataset
2776
+ */
2777
+ getEmbeddingsSettings(name: string): Observable<EmbeddingsSettings>
2778
+ /**
2779
+ * Edit embeddings settings for a dataset
2780
+ *
2781
+ * @param name - Name of the dataset
2782
+ * @param settings - Embeddings settings to apply
2783
+ */
2784
+ editEmbeddingsSettings(name: string, settings: EmbeddingsSettingsBody): Observable<void>
2752
2785
  }
2753
2786
 
2754
2787
  /** @internal */
package/dist/stega.d.ts CHANGED
@@ -1190,6 +1190,20 @@ export declare interface CurrentSanityUser {
1190
1190
  /** @public */
1191
1191
  export declare type DatasetAclMode = 'public' | 'private' | 'custom'
1192
1192
 
1193
+ /** @public */
1194
+ export declare type DatasetCreateOptions = {
1195
+ aclMode?: DatasetAclMode
1196
+ embeddings?: {
1197
+ enabled: boolean
1198
+ projection?: string
1199
+ }
1200
+ }
1201
+
1202
+ /** @public */
1203
+ export declare type DatasetEditOptions = {
1204
+ aclMode?: DatasetAclMode
1205
+ }
1206
+
1193
1207
  /** @public */
1194
1208
  export declare type DatasetResponse = {
1195
1209
  datasetName: string
@@ -1204,26 +1218,16 @@ export declare class DatasetsClient {
1204
1218
  * Create a new dataset with the given name
1205
1219
  *
1206
1220
  * @param name - Name of the dataset to create
1207
- * @param options - Options for the dataset
1221
+ * @param options - Options for the dataset, including optional embeddings configuration
1208
1222
  */
1209
- create(
1210
- name: string,
1211
- options?: {
1212
- aclMode?: DatasetAclMode
1213
- },
1214
- ): Promise<DatasetResponse>
1223
+ create(name: string, options?: DatasetCreateOptions): Promise<DatasetResponse>
1215
1224
  /**
1216
1225
  * Edit a dataset with the given name
1217
1226
  *
1218
1227
  * @param name - Name of the dataset to edit
1219
1228
  * @param options - New options for the dataset
1220
1229
  */
1221
- edit(
1222
- name: string,
1223
- options?: {
1224
- aclMode?: DatasetAclMode
1225
- },
1226
- ): Promise<DatasetResponse>
1230
+ edit(name: string, options?: DatasetEditOptions): Promise<DatasetResponse>
1227
1231
  /**
1228
1232
  * Delete a dataset with the given name
1229
1233
  *
@@ -1236,6 +1240,19 @@ export declare class DatasetsClient {
1236
1240
  * Fetch a list of datasets for the configured project
1237
1241
  */
1238
1242
  list(): Promise<DatasetsResponse>
1243
+ /**
1244
+ * Get embeddings settings for a dataset
1245
+ *
1246
+ * @param name - Name of the dataset
1247
+ */
1248
+ getEmbeddingsSettings(name: string): Promise<EmbeddingsSettings>
1249
+ /**
1250
+ * Edit embeddings settings for a dataset
1251
+ *
1252
+ * @param name - Name of the dataset
1253
+ * @param settings - Embeddings settings to apply
1254
+ */
1255
+ editEmbeddingsSettings(name: string, settings: EmbeddingsSettingsBody): Promise<void>
1239
1256
  }
1240
1257
 
1241
1258
  /** @public */
@@ -1434,6 +1451,19 @@ export declare interface EditReleaseAction {
1434
1451
  patch: PatchOperations
1435
1452
  }
1436
1453
 
1454
+ /** @public */
1455
+ export declare type EmbeddingsSettings = {
1456
+ enabled: boolean
1457
+ projection?: string
1458
+ status: string
1459
+ }
1460
+
1461
+ /** @public */
1462
+ export declare type EmbeddingsSettingsBody = {
1463
+ enabled: boolean
1464
+ projection?: string
1465
+ }
1466
+
1437
1467
  /**
1438
1468
  * @internal
1439
1469
  */
@@ -2717,26 +2747,16 @@ export declare class ObservableDatasetsClient {
2717
2747
  * Create a new dataset with the given name
2718
2748
  *
2719
2749
  * @param name - Name of the dataset to create
2720
- * @param options - Options for the dataset
2750
+ * @param options - Options for the dataset, including optional embeddings configuration
2721
2751
  */
2722
- create(
2723
- name: string,
2724
- options?: {
2725
- aclMode?: DatasetAclMode
2726
- },
2727
- ): Observable<DatasetResponse>
2752
+ create(name: string, options?: DatasetCreateOptions): Observable<DatasetResponse>
2728
2753
  /**
2729
2754
  * Edit a dataset with the given name
2730
2755
  *
2731
2756
  * @param name - Name of the dataset to edit
2732
2757
  * @param options - New options for the dataset
2733
2758
  */
2734
- edit(
2735
- name: string,
2736
- options?: {
2737
- aclMode?: DatasetAclMode
2738
- },
2739
- ): Observable<DatasetResponse>
2759
+ edit(name: string, options?: DatasetEditOptions): Observable<DatasetResponse>
2740
2760
  /**
2741
2761
  * Delete a dataset with the given name
2742
2762
  *
@@ -2749,6 +2769,19 @@ export declare class ObservableDatasetsClient {
2749
2769
  * Fetch a list of datasets for the configured project
2750
2770
  */
2751
2771
  list(): Observable<DatasetsResponse>
2772
+ /**
2773
+ * Get embeddings settings for a dataset
2774
+ *
2775
+ * @param name - Name of the dataset
2776
+ */
2777
+ getEmbeddingsSettings(name: string): Observable<EmbeddingsSettings>
2778
+ /**
2779
+ * Edit embeddings settings for a dataset
2780
+ *
2781
+ * @param name - Name of the dataset
2782
+ * @param settings - Embeddings settings to apply
2783
+ */
2784
+ editEmbeddingsSettings(name: string, settings: EmbeddingsSettingsBody): Observable<void>
2752
2785
  }
2753
2786
 
2754
2787
  /** @internal */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/client",
3
- "version": "7.15.0",
3
+ "version": "7.16.0",
4
4
  "description": "Client for retrieving, creating and patching data from Sanity.io",
5
5
  "keywords": [
6
6
  "sanity",