@relevanceai/sdk 1.54.0 → 1.55.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.
@@ -46,6 +46,22 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
46
46
  options
47
47
  });
48
48
  }
49
+ async CreateDeployableInvite(input, options) {
50
+ return this.SendRequest({
51
+ input,
52
+ method: 'post',
53
+ path: '/deployables/{deployable_id}/invite',
54
+ options
55
+ });
56
+ }
57
+ async UpdateUsersDeployablePermissions(input, options) {
58
+ return this.SendRequest({
59
+ input,
60
+ method: 'post',
61
+ path: '/deployables/{deployable_id}/users/{user_id}/update',
62
+ options
63
+ });
64
+ }
49
65
  async DeleteDeployableKey(input, options) {
50
66
  return this.SendRequest({
51
67
  input,
@@ -710,11 +726,11 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
710
726
  options
711
727
  });
712
728
  }
713
- async FastSearch(input, options) {
729
+ async Search(input, options) {
714
730
  return this.SendRequest({
715
731
  input,
716
732
  method: 'post',
717
- path: '/datasets/{dataset_id}/fast_search',
733
+ path: '/datasets/{dataset_id}/search',
718
734
  options
719
735
  });
720
736
  }
@@ -126,6 +126,30 @@ var DiscoveryApiClient = /** @class */ (function (_super) {
126
126
  });
127
127
  });
128
128
  };
129
+ DiscoveryApiClient.prototype.CreateDeployableInvite = function (input, options) {
130
+ return __awaiter(this, void 0, void 0, function () {
131
+ return __generator(this, function (_a) {
132
+ return [2 /*return*/, this.SendRequest({
133
+ input: input,
134
+ method: 'post',
135
+ path: '/deployables/{deployable_id}/invite',
136
+ options: options
137
+ })];
138
+ });
139
+ });
140
+ };
141
+ DiscoveryApiClient.prototype.UpdateUsersDeployablePermissions = function (input, options) {
142
+ return __awaiter(this, void 0, void 0, function () {
143
+ return __generator(this, function (_a) {
144
+ return [2 /*return*/, this.SendRequest({
145
+ input: input,
146
+ method: 'post',
147
+ path: '/deployables/{deployable_id}/users/{user_id}/update',
148
+ options: options
149
+ })];
150
+ });
151
+ });
152
+ };
129
153
  DiscoveryApiClient.prototype.DeleteDeployableKey = function (input, options) {
130
154
  return __awaiter(this, void 0, void 0, function () {
131
155
  return __generator(this, function (_a) {
@@ -1122,13 +1146,13 @@ var DiscoveryApiClient = /** @class */ (function (_super) {
1122
1146
  });
1123
1147
  });
1124
1148
  };
1125
- DiscoveryApiClient.prototype.FastSearch = function (input, options) {
1149
+ DiscoveryApiClient.prototype.Search = function (input, options) {
1126
1150
  return __awaiter(this, void 0, void 0, function () {
1127
1151
  return __generator(this, function (_a) {
1128
1152
  return [2 /*return*/, this.SendRequest({
1129
1153
  input: input,
1130
1154
  method: 'post',
1131
- path: '/datasets/{dataset_id}/fast_search',
1155
+ path: '/datasets/{dataset_id}/search',
1132
1156
  options: options
1133
1157
  })];
1134
1158
  });
@@ -10,6 +10,10 @@ export declare type DeleteDeployableInput = operations['DeleteDeployable']['requ
10
10
  export declare type DeleteDeployableOutput = operations['DeleteDeployable']['responses']['200']['content']['application/json'];
11
11
  export declare type CreateDeployableKeyInput = operations['CreateDeployableKey']['requestBody']['content']['application/json'];
12
12
  export declare type CreateDeployableKeyOutput = operations['CreateDeployableKey']['responses']['200']['content']['application/json'];
13
+ export declare type CreateDeployableInviteInput = operations['CreateDeployableInvite']['requestBody']['content']['application/json'];
14
+ export declare type CreateDeployableInviteOutput = operations['CreateDeployableInvite']['responses']['200']['content']['application/json'];
15
+ export declare type UpdateUsersDeployablePermissionsInput = operations['UpdateUsersDeployablePermissions']['requestBody']['content']['application/json'];
16
+ export declare type UpdateUsersDeployablePermissionsOutput = operations['UpdateUsersDeployablePermissions']['responses']['200']['content']['application/json'];
13
17
  export declare type DeleteDeployableKeyInput = operations['DeleteDeployableKey']['requestBody']['content']['application/json'];
14
18
  export declare type DeleteDeployableKeyOutput = operations['DeleteDeployableKey']['responses']['200']['content']['application/json'];
15
19
  export declare type ListDeployablesInput = {};
@@ -176,8 +180,8 @@ export declare type DeleteWhereInput = operations['DeleteWhere']['requestBody'][
176
180
  export declare type DeleteWhereOutput = operations['DeleteWhere']['responses']['200']['content']['application/json'];
177
181
  export declare type SimpleSearchPostInput = operations['SimpleSearchPost']['requestBody']['content']['application/json'];
178
182
  export declare type SimpleSearchPostOutput = operations['SimpleSearchPost']['responses']['200']['content']['application/json'];
179
- export declare type FastSearchInput = operations['FastSearch']['requestBody']['content']['application/json'];
180
- export declare type FastSearchOutput = operations['FastSearch']['responses']['200']['content']['application/json'];
183
+ export declare type SearchInput = operations['Search']['requestBody']['content']['application/json'];
184
+ export declare type SearchOutput = operations['Search']['responses']['200']['content']['application/json'];
181
185
  export declare type RecommendInput = operations['Recommend']['requestBody']['content']['application/json'];
182
186
  export declare type RecommendOutput = operations['Recommend']['responses']['200']['content']['application/json'];
183
187
  export declare type CloneDatasetInput = operations['CloneDataset']['requestBody']['content']['application/json'];
@@ -225,6 +229,8 @@ export declare class DiscoveryApiClient extends _GenericClient {
225
229
  UpdateDeployable(input: CommandInput<UpdateDeployableInput>, options?: _GenericMethodOptions): Promise<CommandOutput<UpdateDeployableOutput>>;
226
230
  DeleteDeployable(input: CommandInput<DeleteDeployableInput>, options?: _GenericMethodOptions): Promise<CommandOutput<DeleteDeployableOutput>>;
227
231
  CreateDeployableKey(input: CommandInput<CreateDeployableKeyInput>, options?: _GenericMethodOptions): Promise<CommandOutput<CreateDeployableKeyOutput>>;
232
+ CreateDeployableInvite(input: CommandInput<CreateDeployableInviteInput>, options?: _GenericMethodOptions): Promise<CommandOutput<CreateDeployableInviteOutput>>;
233
+ UpdateUsersDeployablePermissions(input: CommandInput<UpdateUsersDeployablePermissionsInput>, options?: _GenericMethodOptions): Promise<CommandOutput<UpdateUsersDeployablePermissionsOutput>>;
228
234
  DeleteDeployableKey(input: CommandInput<DeleteDeployableKeyInput>, options?: _GenericMethodOptions): Promise<CommandOutput<DeleteDeployableKeyOutput>>;
229
235
  ListDeployables(input: CommandInput<ListDeployablesInput>, options?: _GenericMethodOptions): Promise<CommandOutput<ListDeployablesOutput>>;
230
236
  CreateProject(input: CommandInput<CreateProjectInput>, options?: _GenericMethodOptions): Promise<CommandOutput<CreateProjectOutput>>;
@@ -308,7 +314,7 @@ export declare class DiscoveryApiClient extends _GenericClient {
308
314
  ListDocuments(input: CommandInput<ListDocumentsInput>, options?: _GenericMethodOptions): Promise<CommandOutput<ListDocumentsOutput>>;
309
315
  DeleteWhere(input: CommandInput<DeleteWhereInput>, options?: _GenericMethodOptions): Promise<CommandOutput<DeleteWhereOutput>>;
310
316
  SimpleSearchPost(input: CommandInput<SimpleSearchPostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<SimpleSearchPostOutput>>;
311
- FastSearch(input: CommandInput<FastSearchInput>, options?: _GenericMethodOptions): Promise<CommandOutput<FastSearchOutput>>;
317
+ Search(input: CommandInput<SearchInput>, options?: _GenericMethodOptions): Promise<CommandOutput<SearchOutput>>;
312
318
  Recommend(input: CommandInput<RecommendInput>, options?: _GenericMethodOptions): Promise<CommandOutput<RecommendOutput>>;
313
319
  CloneDataset(input: CommandInput<CloneDatasetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<CloneDatasetOutput>>;
314
320
  PredictKNNRegression(input: CommandInput<PredictKNNRegressionInput>, options?: _GenericMethodOptions): Promise<CommandOutput<PredictKNNRegressionOutput>>;
@@ -25,6 +25,12 @@ export interface paths {
25
25
  /** Share a private deployable. */
26
26
  post: operations["CreateDeployableKey"];
27
27
  };
28
+ "/deployables/{deployable_id}/invite": {
29
+ post: operations["CreateDeployableInvite"];
30
+ };
31
+ "/deployables/{deployable_id}/users/{user_id}/update": {
32
+ post: operations["UpdateUsersDeployablePermissions"];
33
+ };
28
34
  "/deployables/{deployable_id}/private": {
29
35
  /** Unshare a shared deployable, making it private. */
30
36
  post: operations["DeleteDeployableKey"];
@@ -487,9 +493,9 @@ export interface paths {
487
493
  /** SimpleSearch is an easy way to use vector search and traditional text matching to search your dataset. It also supports filtering, sorting and aggregating results. */
488
494
  post: operations["SimpleSearchPost"];
489
495
  };
490
- "/datasets/{dataset_id}/fast_search": {
496
+ "/datasets/{dataset_id}/search": {
491
497
  /** SimpleSearch is an easy way to use vector search and traditional text matching to search your dataset. It also supports filtering, sorting and aggregating results. */
492
- post: operations["FastSearch"];
498
+ post: operations["Search"];
493
499
  };
494
500
  "/datasets/{dataset_id}/recommend": {
495
501
  /** Recommend documents similar to specific documents. Specify which vector field must be used for recommendation using the documentsToRecommend property. */
@@ -620,6 +626,17 @@ export interface components {
620
626
  status: string;
621
627
  message: string;
622
628
  };
629
+ CreateDeployableInviteInput: {
630
+ email: string;
631
+ type: "read" | "write";
632
+ };
633
+ CreateDeployableInviteOutput: {
634
+ invite_code: string;
635
+ };
636
+ UpdateUsersDeployablePermissionsInput: {
637
+ type: "read" | "write" | "none";
638
+ };
639
+ UpdateUsersDeployablePermissionsOutput: unknown;
623
640
  DeleteDeployableKeyInput: unknown;
624
641
  DeleteDeployableKeyOutput: {
625
642
  status: string;
@@ -919,6 +936,7 @@ export interface components {
919
936
  };
920
937
  email?: string;
921
938
  user_id?: string;
939
+ type?: "deployable" | "project";
922
940
  };
923
941
  CreateProjectInviteOutput: {
924
942
  invite_code: string;
@@ -2417,6 +2435,8 @@ export interface components {
2417
2435
  };
2418
2436
  /** @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. */
2419
2437
  include_expected_frequency?: boolean;
2438
+ /** @description Return the number of clusters in the dataset in the field "count", and the number of documents belonging to at least one cluster in "document_count". */
2439
+ include_counts?: boolean;
2420
2440
  };
2421
2441
  AggregateClustersOutput: {
2422
2442
  results: {
@@ -2428,6 +2448,10 @@ export interface components {
2428
2448
  count: number;
2429
2449
  };
2430
2450
  };
2451
+ /** @description Total number of clusters in the dataset. */
2452
+ count?: number;
2453
+ /** @description Total number of documents that are part of at least one cluster. */
2454
+ document_count?: number;
2431
2455
  };
2432
2456
  ListClusterFacetsInput: {
2433
2457
  filters?: (Partial<{
@@ -6524,7 +6548,7 @@ export interface components {
6524
6548
  } & {
6525
6549
  aggregations: unknown;
6526
6550
  };
6527
- FastSearchInput: {
6551
+ SearchInput: {
6528
6552
  filters?: (Partial<{
6529
6553
  /** @description Match where document[field] is in value list. */
6530
6554
  match?: {
@@ -6945,7 +6969,7 @@ export interface components {
6945
6969
  /** @description Used in future requests to retrieve items after these values in the sort order. */
6946
6970
  afterId?: unknown[];
6947
6971
  };
6948
- FastSearchOutput: {
6972
+ SearchOutput: {
6949
6973
  /**
6950
6974
  * @description List of documents. List items are affected by page, pageSize, query, filters. Items order is affected by vectorSeachQuery, sort, textSort.
6951
6975
  *
@@ -7429,6 +7453,7 @@ export interface components {
7429
7453
  job_message: string;
7430
7454
  creation_time: string;
7431
7455
  notebook_path?: string;
7456
+ instance_type?: string;
7432
7457
  dataset_id?: string;
7433
7458
  status?: string;
7434
7459
  params?: {
@@ -7448,6 +7473,7 @@ export interface components {
7448
7473
  job_message: string;
7449
7474
  creation_time: string;
7450
7475
  notebook_path?: string;
7476
+ instance_type?: string;
7451
7477
  dataset_id?: string;
7452
7478
  status?: string;
7453
7479
  params?: {
@@ -7480,6 +7506,8 @@ export interface components {
7480
7506
  workflow_name?: string;
7481
7507
  /** @description Additional information of the workflow that is passed into the email. */
7482
7508
  additional_information?: string;
7509
+ /** @description Whether to send an email on workflow completion. */
7510
+ send_email?: boolean;
7483
7511
  };
7484
7512
  UpsertWorkflowStatusOutput: unknown;
7485
7513
  DeleteFieldChildrenInput: unknown;
@@ -7617,6 +7645,50 @@ export interface operations {
7617
7645
  };
7618
7646
  };
7619
7647
  };
7648
+ CreateDeployableInvite: {
7649
+ parameters: {
7650
+ path: {
7651
+ /** ID of deployable */
7652
+ deployable_id: string;
7653
+ };
7654
+ };
7655
+ responses: {
7656
+ /** successful operation */
7657
+ 200: {
7658
+ content: {
7659
+ "application/json": components["schemas"]["CreateDeployableInviteOutput"];
7660
+ };
7661
+ };
7662
+ };
7663
+ requestBody: {
7664
+ content: {
7665
+ "application/json": components["schemas"]["CreateDeployableInviteInput"];
7666
+ };
7667
+ };
7668
+ };
7669
+ UpdateUsersDeployablePermissions: {
7670
+ parameters: {
7671
+ path: {
7672
+ /** ID of deployable */
7673
+ deployable_id: string;
7674
+ /** ID of user */
7675
+ user_id: string;
7676
+ };
7677
+ };
7678
+ responses: {
7679
+ /** successful operation */
7680
+ 200: {
7681
+ content: {
7682
+ "application/json": components["schemas"]["UpdateUsersDeployablePermissionsOutput"];
7683
+ };
7684
+ };
7685
+ };
7686
+ requestBody: {
7687
+ content: {
7688
+ "application/json": components["schemas"]["UpdateUsersDeployablePermissionsInput"];
7689
+ };
7690
+ };
7691
+ };
7620
7692
  /** Unshare a shared deployable, making it private. */
7621
7693
  DeleteDeployableKey: {
7622
7694
  parameters: {
@@ -9635,7 +9707,7 @@ export interface operations {
9635
9707
  };
9636
9708
  };
9637
9709
  /** SimpleSearch is an easy way to use vector search and traditional text matching to search your dataset. It also supports filtering, sorting and aggregating results. */
9638
- FastSearch: {
9710
+ Search: {
9639
9711
  parameters: {
9640
9712
  path: {
9641
9713
  /** ID of dataset */
@@ -9646,13 +9718,13 @@ export interface operations {
9646
9718
  /** successful operation */
9647
9719
  200: {
9648
9720
  content: {
9649
- "application/json": components["schemas"]["FastSearchOutput"];
9721
+ "application/json": components["schemas"]["SearchOutput"];
9650
9722
  };
9651
9723
  };
9652
9724
  };
9653
9725
  requestBody: {
9654
9726
  content: {
9655
- "application/json": components["schemas"]["FastSearchInput"];
9727
+ "application/json": components["schemas"]["SearchInput"];
9656
9728
  };
9657
9729
  };
9658
9730
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relevanceai/sdk",
3
- "version": "1.54.0",
3
+ "version": "1.55.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",