@relevanceai/sdk 1.19.0 → 1.20.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.
@@ -1203,8 +1203,7 @@ export interface components {
1203
1203
  join?: boolean;
1204
1204
  }>;
1205
1205
  AggregateInput: {
1206
- filters?: unknown[];
1207
- items?: Partial<{
1206
+ filters?: (Partial<{
1208
1207
  /** @description Match where document[field] is in value list. */
1209
1208
  match?: {
1210
1209
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -1419,7 +1418,7 @@ export interface components {
1419
1418
  condition_value?: unknown;
1420
1419
  fuzzy?: number;
1421
1420
  join?: boolean;
1422
- }>;
1421
+ }>)[];
1423
1422
  /** @description Aggregation query to aggregate data */
1424
1423
  aggregation_query?: {
1425
1424
  groupby?: {
@@ -1689,8 +1688,7 @@ export interface components {
1689
1688
  results?: unknown[];
1690
1689
  };
1691
1690
  AggregateClustersInput: {
1692
- filters?: unknown[];
1693
- items?: Partial<{
1691
+ filters?: (Partial<{
1694
1692
  /** @description Match where document[field] is in value list. */
1695
1693
  match?: {
1696
1694
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -1905,7 +1903,7 @@ export interface components {
1905
1903
  condition_value?: unknown;
1906
1904
  fuzzy?: number;
1907
1905
  join?: boolean;
1908
- }>;
1906
+ }>)[];
1909
1907
  /** @description Aggregation query to aggregate data */
1910
1908
  aggregation_query?: {
1911
1909
  groupby?: {
@@ -2196,12 +2194,14 @@ export interface components {
2196
2194
  /** @description Whether to sort results by ascending or descending order. */
2197
2195
  asc?: boolean;
2198
2196
  };
2197
+ /** @description For each frequency in results, also return expected_frequency as cluster_size*(count(groupbyattribute)/count(dataset)). Useful for knowing if an attribute is occurring more or less than expected. */
2198
+ include_expected_frequency?: boolean;
2199
2199
  };
2200
2200
  AggregateClustersOutput: {
2201
2201
  results: {
2202
2202
  [key: string]: unknown[];
2203
2203
  };
2204
- info: {
2204
+ cluster_stats?: {
2205
2205
  [key: string]: {
2206
2206
  percentage: number;
2207
2207
  count: number;
@@ -2209,8 +2209,7 @@ export interface components {
2209
2209
  };
2210
2210
  };
2211
2211
  ListClusterFacetsInput: {
2212
- filters?: unknown[];
2213
- items?: Partial<{
2212
+ filters?: (Partial<{
2214
2213
  /** @description Match where document[field] is in value list. */
2215
2214
  match?: {
2216
2215
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -2425,7 +2424,7 @@ export interface components {
2425
2424
  condition_value?: unknown;
2426
2425
  fuzzy?: number;
2427
2426
  join?: boolean;
2428
- }>;
2427
+ }>)[];
2429
2428
  /** @description Aggregation query to aggregate data */
2430
2429
  aggregation_query?: {
2431
2430
  groupby?: {
@@ -2755,8 +2754,7 @@ export interface components {
2755
2754
  /** @description Alias is used to name a cluster. */
2756
2755
  alias?: string;
2757
2756
  dataset_id?: string;
2758
- filters?: unknown[];
2759
- items?: Partial<{
2757
+ filters?: (Partial<{
2760
2758
  /** @description Match where document[field] is in value list. */
2761
2759
  match?: {
2762
2760
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -2971,7 +2969,7 @@ export interface components {
2971
2969
  condition_value?: unknown;
2972
2970
  fuzzy?: number;
2973
2971
  join?: boolean;
2974
- }>;
2972
+ }>)[];
2975
2973
  /** @description List of cluster IDs to retrieve */
2976
2974
  cluster_ids?: unknown[];
2977
2975
  /** @description Field to cluster on */
@@ -3031,8 +3029,7 @@ export interface components {
3031
3029
  /** @description Alias is used to name a cluster. */
3032
3030
  alias?: string;
3033
3031
  dataset_id?: string;
3034
- filters?: unknown[];
3035
- items?: Partial<{
3032
+ filters?: (Partial<{
3036
3033
  /** @description Match where document[field] is in value list. */
3037
3034
  match?: {
3038
3035
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -3247,7 +3244,7 @@ export interface components {
3247
3244
  condition_value?: unknown;
3248
3245
  fuzzy?: number;
3249
3246
  join?: boolean;
3250
- }>;
3247
+ }>)[];
3251
3248
  /** @description List of cluster IDs to retrieve */
3252
3249
  cluster_ids?: unknown[];
3253
3250
  /** @description Field to cluster on */
@@ -3778,8 +3775,7 @@ export interface components {
3778
3775
  failed_documents?: unknown[];
3779
3776
  };
3780
3777
  CopyForeignDatasetInput: {
3781
- filters?: unknown[];
3782
- items?: Partial<{
3778
+ filters?: (Partial<{
3783
3779
  /** @description Match where document[field] is in value list. */
3784
3780
  match?: {
3785
3781
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -3994,7 +3990,7 @@ export interface components {
3994
3990
  condition_value?: unknown;
3995
3991
  fuzzy?: number;
3996
3992
  join?: boolean;
3997
- }>;
3993
+ }>)[];
3998
3994
  /** @description Dataset name to copy into */
3999
3995
  dataset_id: string;
4000
3996
  /** @description project name you want to copy the dataset into */
@@ -4059,8 +4055,7 @@ export interface components {
4059
4055
  };
4060
4056
  include_fields?: string[];
4061
4057
  remove_fields?: string[];
4062
- filters?: unknown[];
4063
- items?: Partial<{
4058
+ filters?: (Partial<{
4064
4059
  /** @description Match where document[field] is in value list. */
4065
4060
  match?: {
4066
4061
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -4275,7 +4270,7 @@ export interface components {
4275
4270
  condition_value?: unknown;
4276
4271
  fuzzy?: number;
4277
4272
  join?: boolean;
4278
- }>;
4273
+ }>)[];
4279
4274
  };
4280
4275
  CombineDatasetsOutput: {
4281
4276
  job_id: string;
@@ -4555,8 +4550,7 @@ export interface components {
4555
4550
  }[];
4556
4551
  };
4557
4552
  UpdateWhereInput: {
4558
- filters?: unknown[];
4559
- items?: Partial<{
4553
+ filters?: (Partial<{
4560
4554
  /** @description Match where document[field] is in value list. */
4561
4555
  match?: {
4562
4556
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -4771,7 +4765,7 @@ export interface components {
4771
4765
  condition_value?: unknown;
4772
4766
  fuzzy?: number;
4773
4767
  join?: boolean;
4774
- }>;
4768
+ }>)[];
4775
4769
  /** @description Updates to make to the documents. It should be specified in a format of {"field_name": "value"}. e.g. {"item.status" : "Sold Out"} */
4776
4770
  updates: {
4777
4771
  [key: string]: unknown;
@@ -4820,8 +4814,7 @@ export interface components {
4820
4814
  };
4821
4815
  };
4822
4816
  GetWhereInput: {
4823
- filters?: unknown[];
4824
- items?: Partial<{
4817
+ filters?: (Partial<{
4825
4818
  /** @description Match where document[field] is in value list. */
4826
4819
  match?: {
4827
4820
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -5036,7 +5029,7 @@ export interface components {
5036
5029
  condition_value?: unknown;
5037
5030
  fuzzy?: number;
5038
5031
  join?: boolean;
5039
- }>;
5032
+ }>)[];
5040
5033
  /** @description Fields to include in the search results, empty array/list means all fields. */
5041
5034
  select_fields?: string[];
5042
5035
  /** @description Size of each page of results. */
@@ -5079,8 +5072,7 @@ export interface components {
5079
5072
  after_id: unknown[];
5080
5073
  };
5081
5074
  PaginateDocumentsInput: {
5082
- filters?: unknown[];
5083
- items?: Partial<{
5075
+ filters?: (Partial<{
5084
5076
  /** @description Match where document[field] is in value list. */
5085
5077
  match?: {
5086
5078
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -5295,7 +5287,7 @@ export interface components {
5295
5287
  condition_value?: unknown;
5296
5288
  fuzzy?: number;
5297
5289
  join?: boolean;
5298
- }>;
5290
+ }>)[];
5299
5291
  /** @description Fields to include in the search results, empty array/list means all fields. */
5300
5292
  select_fields?: string[];
5301
5293
  /** @description Size of each page of results. */
@@ -5686,8 +5678,7 @@ export interface components {
5686
5678
  weight?: number;
5687
5679
  };
5688
5680
  SimpleSearchPostInput: {
5689
- filters?: unknown[];
5690
- items?: Partial<{
5681
+ filters?: (Partial<{
5691
5682
  /** @description Match where document[field] is in value list. */
5692
5683
  match?: {
5693
5684
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -5902,7 +5893,7 @@ export interface components {
5902
5893
  condition_value?: unknown;
5903
5894
  fuzzy?: number;
5904
5895
  join?: boolean;
5905
- }>;
5896
+ }>)[];
5906
5897
  /**
5907
5898
  * @description Search for documents that contain this query string in your dataset. Use fieldsToSearch parameter to restrict which fields are searched.
5908
5899
  *
@@ -6191,8 +6182,7 @@ export interface components {
6191
6182
  aggregations: unknown;
6192
6183
  };
6193
6184
  FastSearchInput: {
6194
- filters?: unknown[];
6195
- items?: Partial<{
6185
+ filters?: (Partial<{
6196
6186
  /** @description Match where document[field] is in value list. */
6197
6187
  match?: {
6198
6188
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -6407,7 +6397,7 @@ export interface components {
6407
6397
  condition_value?: unknown;
6408
6398
  fuzzy?: number;
6409
6399
  join?: boolean;
6410
- }>;
6400
+ }>)[];
6411
6401
  /**
6412
6402
  * @description Search for documents that contain this query string in your dataset. Use fieldsToSearch parameter to restrict which fields are searched.
6413
6403
  *
@@ -6695,8 +6685,7 @@ export interface components {
6695
6685
  };
6696
6686
  /** @default */
6697
6687
  remove_fields?: string[];
6698
- filters?: unknown[];
6699
- items?: Partial<{
6688
+ filters?: (Partial<{
6700
6689
  /** @description Match where document[field] is in value list. */
6701
6690
  match?: {
6702
6691
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -6911,7 +6900,7 @@ export interface components {
6911
6900
  condition_value?: unknown;
6912
6901
  fuzzy?: number;
6913
6902
  join?: boolean;
6914
- }>;
6903
+ }>)[];
6915
6904
  };
6916
6905
  CloneDatasetOutput: {
6917
6906
  job_id: string;
@@ -8735,8 +8724,7 @@ export interface operations {
8735
8724
  dataset_id: string;
8736
8725
  };
8737
8726
  query: {
8738
- filters?: unknown[];
8739
- items?: Partial<{
8727
+ filters?: (Partial<{
8740
8728
  /** @description Match where document[field] is in value list. */
8741
8729
  match?: {
8742
8730
  /** @description If matching on text, match even if there are extra words / case insensitivity */
@@ -8961,7 +8949,7 @@ export interface operations {
8961
8949
  condition_value?: unknown;
8962
8950
  fuzzy?: number;
8963
8951
  join?: boolean;
8964
- }>;
8952
+ }>)[];
8965
8953
  /** Fields to include in the search results, empty array/list means all fields. */
8966
8954
  select_fields?: string[];
8967
8955
  /** Size of each page of results. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relevanceai/sdk",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "Javascript client for RelevanceAI APIs. Browser, Node.js and typescript support.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "types": "./dist-types/index.d.ts",