@relevanceai/sdk 1.9.0 → 1.12.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.
Files changed (33) hide show
  1. package/dist-cjs/generated/DiscoveryApi.js +595 -3
  2. package/dist-cjs/generated/_DiscoveryApiSchemaTypes.js +1 -4
  3. package/dist-cjs/generated/index.js +5 -2
  4. package/dist-cjs/index.js +6 -2
  5. package/dist-cjs/services/discovery/Dataset.js +125 -115
  6. package/dist-cjs/services/discovery/index.js +158 -179
  7. package/dist-cjs/services/index.js +2 -12
  8. package/dist-cjs/shared/generate.js +1 -1
  9. package/dist-cjs/shared/serviceConfigs.js +2 -7
  10. package/dist-es/generated/DiscoveryApi.js +898 -10
  11. package/dist-es/generated/_DiscoveryApiSchemaTypes.js +1 -4
  12. package/dist-es/generated/index.js +0 -1
  13. package/dist-es/index.js +1 -1
  14. package/dist-es/services/discovery/Dataset.js +126 -309
  15. package/dist-es/services/discovery/index.js +159 -233
  16. package/dist-es/services/index.js +3 -1
  17. package/dist-es/shared/BaseClient.js +9 -9
  18. package/dist-es/shared/generate.js +21 -20
  19. package/dist-es/shared/serviceConfigs.js +2 -7
  20. package/dist-types/generated/DiscoveryApi.d.ts +226 -4
  21. package/dist-types/generated/_DiscoveryApiSchemaTypes.d.ts +8663 -1056
  22. package/dist-types/generated/index.d.ts +0 -1
  23. package/dist-types/index.d.ts +0 -1
  24. package/dist-types/services/discovery/Dataset.d.ts +0 -50
  25. package/dist-types/services/discovery/index.d.ts +0 -366
  26. package/dist-types/services/index.d.ts +0 -1
  27. package/package.json +2 -2
  28. package/dist-cjs/generated/VectorApi.js +0 -754
  29. package/dist-cjs/generated/_VectorApiSchemaTypes.js +0 -6
  30. package/dist-es/generated/VectorApi.js +0 -1187
  31. package/dist-es/generated/_VectorApiSchemaTypes.js +0 -5
  32. package/dist-types/generated/VectorApi.d.ts +0 -284
  33. package/dist-types/generated/_VectorApiSchemaTypes.d.ts +0 -5724
@@ -6,6 +6,302 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
6
6
  constructor(config) {
7
7
  super({ ...config, service_name: 'DiscoveryApi' });
8
8
  }
9
+ async CreateDeployable(input, options) {
10
+ return this.SendRequest({
11
+ input,
12
+ method: 'post',
13
+ path: '/deployables/create',
14
+ options
15
+ });
16
+ }
17
+ async GetDeployable(input, options) {
18
+ return this.SendRequest({
19
+ input,
20
+ method: 'get',
21
+ path: '/deployables/{deployable_id}/get',
22
+ options
23
+ });
24
+ }
25
+ async UpdateDeployable(input, options) {
26
+ return this.SendRequest({
27
+ input,
28
+ method: 'post',
29
+ path: '/deployables/{deployable_id}/update',
30
+ options
31
+ });
32
+ }
33
+ async DeleteDeployable(input, options) {
34
+ return this.SendRequest({
35
+ input,
36
+ method: 'post',
37
+ path: '/deployables/delete',
38
+ options
39
+ });
40
+ }
41
+ async CreateDeployableKey(input, options) {
42
+ return this.SendRequest({
43
+ input,
44
+ method: 'post',
45
+ path: '/deployables/{deployable_id}/share',
46
+ options
47
+ });
48
+ }
49
+ async DeleteDeployableKey(input, options) {
50
+ return this.SendRequest({
51
+ input,
52
+ method: 'post',
53
+ path: '/deployables/{deployable_id}/private',
54
+ options
55
+ });
56
+ }
57
+ async ListDeployables(input, options) {
58
+ return this.SendRequest({
59
+ input,
60
+ method: 'get',
61
+ path: '/deployables/list',
62
+ options
63
+ });
64
+ }
65
+ async UpdateProject(input, options) {
66
+ return this.SendRequest({
67
+ input,
68
+ method: 'post',
69
+ path: '/projects/update',
70
+ options
71
+ });
72
+ }
73
+ async ListProjects(input, options) {
74
+ return this.SendRequest({
75
+ input,
76
+ method: 'get',
77
+ path: '/projects/list',
78
+ options
79
+ });
80
+ }
81
+ async CreateUser(input, options) {
82
+ return this.SendRequest({
83
+ input,
84
+ method: 'post',
85
+ path: '/auth/users/create',
86
+ options
87
+ });
88
+ }
89
+ async ListUsers(input, options) {
90
+ return this.SendRequest({
91
+ input,
92
+ method: 'post',
93
+ path: '/auth/users/list',
94
+ options
95
+ });
96
+ }
97
+ async IsUserAuthorized(input, options) {
98
+ return this.SendRequest({
99
+ input,
100
+ method: 'post',
101
+ path: '/auth/is_authorized',
102
+ options
103
+ });
104
+ }
105
+ async GetAuthHeaderInfo(input, options) {
106
+ return this.SendRequest({
107
+ input,
108
+ method: 'get',
109
+ path: '/auth/info',
110
+ options
111
+ });
112
+ }
113
+ async CreateProjectInvite(input, options) {
114
+ return this.SendRequest({
115
+ input,
116
+ method: 'post',
117
+ path: '/auth/invite/create',
118
+ options
119
+ });
120
+ }
121
+ async ListProjectInvites(input, options) {
122
+ return this.SendRequest({
123
+ input,
124
+ method: 'post',
125
+ path: '/auth/invite/list',
126
+ options
127
+ });
128
+ }
129
+ async AcceptProjectInvite(input, options) {
130
+ return this.SendRequest({
131
+ input,
132
+ method: 'post',
133
+ path: '/auth/invite/accept',
134
+ options
135
+ });
136
+ }
137
+ async GetUser(input, options) {
138
+ return this.SendRequest({
139
+ input,
140
+ method: 'get',
141
+ path: '/auth/users/{user_id}',
142
+ options
143
+ });
144
+ }
145
+ async UpdateUser(input, options) {
146
+ return this.SendRequest({
147
+ input,
148
+ method: 'post',
149
+ path: '/auth/users/{user_id}/update',
150
+ options
151
+ });
152
+ }
153
+ async DeleteUser(input, options) {
154
+ return this.SendRequest({
155
+ input,
156
+ method: 'post',
157
+ path: '/auth/users/{user_id}/delete',
158
+ options
159
+ });
160
+ }
161
+ async CreateUserKey(input, options) {
162
+ return this.SendRequest({
163
+ input,
164
+ method: 'post',
165
+ path: '/auth/users/{user_id}/keys/create',
166
+ options
167
+ });
168
+ }
169
+ async ListUserKeys(input, options) {
170
+ return this.SendRequest({
171
+ input,
172
+ method: 'post',
173
+ path: '/auth/users/{user_id}/keys/list',
174
+ options
175
+ });
176
+ }
177
+ async DeleteUserKey(input, options) {
178
+ return this.SendRequest({
179
+ input,
180
+ method: 'post',
181
+ path: '/auth/users/{user_id}/keys/delete',
182
+ options
183
+ });
184
+ }
185
+ async InsertClusterCentroids(input, options) {
186
+ return this.SendRequest({
187
+ input,
188
+ method: 'post',
189
+ path: '/datasets/{dataset_id}/cluster/centroids/insert',
190
+ options
191
+ });
192
+ }
193
+ async UpdateClusterCentroids(input, options) {
194
+ return this.SendRequest({
195
+ input,
196
+ method: 'post',
197
+ path: '/datasets/{dataset_id}/cluster/centroids/update',
198
+ options
199
+ });
200
+ }
201
+ async CompareClusterCentroids(input, options) {
202
+ return this.SendRequest({
203
+ input,
204
+ method: 'post',
205
+ path: '/datasets/{dataset_id}/cluster/centroids/compare_centroids',
206
+ options
207
+ });
208
+ }
209
+ async Aggregate(input, options) {
210
+ return this.SendRequest({
211
+ input,
212
+ method: 'post',
213
+ path: '/datasets/{dataset_id}/aggregate',
214
+ options
215
+ });
216
+ }
217
+ async AggregateClusters(input, options) {
218
+ return this.SendRequest({
219
+ input,
220
+ method: 'post',
221
+ path: '/datasets/{dataset_id}/cluster/aggregate',
222
+ options
223
+ });
224
+ }
225
+ async ListClusterFacets(input, options) {
226
+ return this.SendRequest({
227
+ input,
228
+ method: 'post',
229
+ path: '/datasets/{dataset_id}/cluster/facets',
230
+ options
231
+ });
232
+ }
233
+ async ListClosestToCentroids(input, options) {
234
+ return this.SendRequest({
235
+ input,
236
+ method: 'post',
237
+ path: '/datasets/{dataset_id}/cluster/centroids/list_closest_to_center',
238
+ options
239
+ });
240
+ }
241
+ async ListFurthestFromCentroids(input, options) {
242
+ return this.SendRequest({
243
+ input,
244
+ method: 'post',
245
+ path: '/datasets/{dataset_id}/cluster/centroids/list_furthest_from_center',
246
+ options
247
+ });
248
+ }
249
+ async ListCentroids(input, options) {
250
+ return this.SendRequest({
251
+ input,
252
+ method: 'post',
253
+ path: '/datasets/{dataset_id}/cluster/centroids/documents',
254
+ options
255
+ });
256
+ }
257
+ async DeleteCentroid(input, options) {
258
+ return this.SendRequest({
259
+ input,
260
+ method: 'post',
261
+ path: '/datasets/{dataset_id}/cluster/centroids/{centroid_id}/delete',
262
+ options
263
+ });
264
+ }
265
+ async RealtimeClustering(input, options) {
266
+ return this.SendRequest({
267
+ input,
268
+ method: 'post',
269
+ path: '/datasets/{dataset_id}/cluster/realtime',
270
+ options
271
+ });
272
+ }
273
+ async MergeClusters(input, options) {
274
+ return this.SendRequest({
275
+ input,
276
+ method: 'post',
277
+ path: '/datasets/{dataset_id}/cluster/merge',
278
+ options
279
+ });
280
+ }
281
+ async CreateClusterSummaries(input, options) {
282
+ return this.SendRequest({
283
+ input,
284
+ method: 'post',
285
+ path: '/datasets/{dataset_id}/cluster/centroids/summaries/create',
286
+ options
287
+ });
288
+ }
289
+ async ListClusterSummaries(input, options) {
290
+ return this.SendRequest({
291
+ input,
292
+ method: 'post',
293
+ path: '/datasets/{dataset_id}/cluster/centroids/summaries/list',
294
+ options
295
+ });
296
+ }
297
+ async DeleteClusterSummaries(input, options) {
298
+ return this.SendRequest({
299
+ input,
300
+ method: 'post',
301
+ path: '/datasets/{dataset_id}/cluster/centroids/summaries/bulk_delete',
302
+ options
303
+ });
304
+ }
9
305
  async Insert(input, options) {
10
306
  return this.SendRequest({
11
307
  input,
@@ -22,11 +318,11 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
22
318
  options
23
319
  });
24
320
  }
25
- async BlobAccessURLs(input, options) {
321
+ async GetFileUploadUrlsForDataset(input, options) {
26
322
  return this.SendRequest({
27
323
  input,
28
324
  method: 'post',
29
- path: '/datasets/{dataset_id}/blob_access_urls',
325
+ path: '/datasets/{dataset_id}/get_file_upload_urls',
30
326
  options
31
327
  });
32
328
  }
@@ -38,10 +334,122 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
38
334
  options
39
335
  });
40
336
  }
41
- async GetDocument(input, options) {
337
+ async CopyForeignDataset(input, options) {
338
+ return this.SendRequest({
339
+ input,
340
+ method: 'post',
341
+ path: '/admin/copy_foreign_dataset',
342
+ options
343
+ });
344
+ }
345
+ async CreateProjectReadKey(input, options) {
346
+ return this.SendRequest({
347
+ input,
348
+ method: 'post',
349
+ path: '/admin/request_read_api_key',
350
+ options
351
+ });
352
+ }
353
+ async DeleteDataset(input, options) {
354
+ return this.SendRequest({
355
+ input,
356
+ method: 'post',
357
+ path: '/datasets/{dataset_id}/delete',
358
+ options
359
+ });
360
+ }
361
+ async CreateDataset(input, options) {
362
+ return this.SendRequest({
363
+ input,
364
+ method: 'post',
365
+ path: '/datasets/create',
366
+ options
367
+ });
368
+ }
369
+ async GetSchema(input, options) {
370
+ return this.SendRequest({
371
+ input,
372
+ method: 'get',
373
+ path: '/datasets/{dataset_id}/schema',
374
+ options
375
+ });
376
+ }
377
+ async ListDatasets(input, options) {
378
+ return this.SendRequest({
379
+ input,
380
+ method: 'get',
381
+ path: '/datasets/list',
382
+ options
383
+ });
384
+ }
385
+ async CombineDatasets(input, options) {
386
+ return this.SendRequest({
387
+ input,
388
+ method: 'post',
389
+ path: '/datasets/combine',
390
+ options
391
+ });
392
+ }
393
+ async GetCombineJobStatus(input, options) {
394
+ return this.SendRequest({
395
+ input,
396
+ method: 'post',
397
+ path: '/datasets/combine/{job_id}/get',
398
+ options
399
+ });
400
+ }
401
+ async SearchDatasets(input, options) {
402
+ return this.SendRequest({
403
+ input,
404
+ method: 'get',
405
+ path: '/datasets/search',
406
+ options
407
+ });
408
+ }
409
+ async GetFieldHealth(input, options) {
410
+ return this.SendRequest({
411
+ input,
412
+ method: 'get',
413
+ path: '/datasets/{dataset_id}/monitor/health',
414
+ options
415
+ });
416
+ }
417
+ async GetDatasetStats(input, options) {
418
+ return this.SendRequest({
419
+ input,
420
+ method: 'get',
421
+ path: '/datasets/{dataset_id}/monitor/stats',
422
+ options
423
+ });
424
+ }
425
+ async GetDatasetUsage(input, options) {
42
426
  return this.SendRequest({
43
427
  input,
44
428
  method: 'post',
429
+ path: '/datasets/{dataset_id}/monitor/usage',
430
+ options
431
+ });
432
+ }
433
+ async GetVectorMappings(input, options) {
434
+ return this.SendRequest({
435
+ input,
436
+ method: 'get',
437
+ path: '/datasets/{dataset_id}/vector_mappings',
438
+ options
439
+ });
440
+ }
441
+ async GetDatasetDetails(input, options) {
442
+ return this.SendRequest({
443
+ input,
444
+ method: 'post',
445
+ path: '/datasets/{dataset_id}/details',
446
+ options
447
+ });
448
+ }
449
+ async GetDocument(input, options) {
450
+ return this.SendRequest({
451
+ input,
452
+ method: 'get',
45
453
  path: '/datasets/{dataset_id}/documents/get',
46
454
  options
47
455
  });
@@ -54,6 +462,38 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
54
462
  options
55
463
  });
56
464
  }
465
+ async UpsertDatasetSettings(input, options) {
466
+ return this.SendRequest({
467
+ input,
468
+ method: 'post',
469
+ path: '/datasets/{dataset_id}/settings',
470
+ options
471
+ });
472
+ }
473
+ async GetDatasetSettings(input, options) {
474
+ return this.SendRequest({
475
+ input,
476
+ method: 'get',
477
+ path: '/datasets/{dataset_id}/settings',
478
+ options
479
+ });
480
+ }
481
+ async UpsertDatasetMetadata(input, options) {
482
+ return this.SendRequest({
483
+ input,
484
+ method: 'post',
485
+ path: '/datasets/{dataset_id}/metadata',
486
+ options
487
+ });
488
+ }
489
+ async GetDatasetMetadata(input, options) {
490
+ return this.SendRequest({
491
+ input,
492
+ method: 'get',
493
+ path: '/datasets/{dataset_id}/metadata',
494
+ options
495
+ });
496
+ }
57
497
  async Update(input, options) {
58
498
  return this.SendRequest({
59
499
  input,
@@ -62,6 +502,14 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
62
502
  options
63
503
  });
64
504
  }
505
+ async DeleteDocumentFields(input, options) {
506
+ return this.SendRequest({
507
+ input,
508
+ method: 'post',
509
+ path: '/datasets/{dataset_id}/documents/delete_fields',
510
+ options
511
+ });
512
+ }
65
513
  async BulkUpdate(input, options) {
66
514
  return this.SendRequest({
67
515
  input,
@@ -78,6 +526,54 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
78
526
  options
79
527
  });
80
528
  }
529
+ async ListFacets(input, options) {
530
+ return this.SendRequest({
531
+ input,
532
+ method: 'post',
533
+ path: '/datasets/{dataset_id}/facets',
534
+ options
535
+ });
536
+ }
537
+ async GetWhere(input, options) {
538
+ return this.SendRequest({
539
+ input,
540
+ method: 'post',
541
+ path: '/datasets/{dataset_id}/documents/get_where',
542
+ options
543
+ });
544
+ }
545
+ async PaginateDocuments(input, options) {
546
+ return this.SendRequest({
547
+ input,
548
+ method: 'post',
549
+ path: '/datasets/{dataset_id}/documents/paginate',
550
+ options
551
+ });
552
+ }
553
+ async BulkGetDocuments(input, options) {
554
+ return this.SendRequest({
555
+ input,
556
+ method: 'post',
557
+ path: '/datasets/{dataset_id}/documents/bulk_get',
558
+ options
559
+ });
560
+ }
561
+ async BulkDeleteDocuments(input, options) {
562
+ return this.SendRequest({
563
+ input,
564
+ method: 'post',
565
+ path: '/datasets/{dataset_id}/documents/bulk_delete',
566
+ options
567
+ });
568
+ }
569
+ async ListDocuments(input, options) {
570
+ return this.SendRequest({
571
+ input,
572
+ method: 'get',
573
+ path: '/datasets/{dataset_id}/documents/list',
574
+ options
575
+ });
576
+ }
81
577
  async DeleteWhere(input, options) {
82
578
  return this.SendRequest({
83
579
  input,
@@ -102,5 +598,101 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
102
598
  options
103
599
  });
104
600
  }
601
+ async Recommend(input, options) {
602
+ return this.SendRequest({
603
+ input,
604
+ method: 'post',
605
+ path: '/datasets/{dataset_id}/recommend',
606
+ options
607
+ });
608
+ }
609
+ async CloneDataset(input, options) {
610
+ return this.SendRequest({
611
+ input,
612
+ method: 'post',
613
+ path: '/datasets/{dataset_id}/clone',
614
+ options
615
+ });
616
+ }
617
+ async PredictKNNRegression(input, options) {
618
+ return this.SendRequest({
619
+ input,
620
+ method: 'post',
621
+ path: '/services/prediction/regression/knn',
622
+ options
623
+ });
624
+ }
625
+ async PredictKNNFromResults(input, options) {
626
+ return this.SendRequest({
627
+ input,
628
+ method: 'post',
629
+ path: '/services/prediction/knn_from_results',
630
+ options
631
+ });
632
+ }
633
+ async BiasEvaluation(input, options) {
634
+ return this.SendRequest({
635
+ input,
636
+ method: 'post',
637
+ path: '/services/evaluation/bias',
638
+ options
639
+ });
640
+ }
641
+ async Vectorize(input, options) {
642
+ return this.SendRequest({
643
+ input,
644
+ method: 'post',
645
+ path: '/services/vectorize',
646
+ options
647
+ });
648
+ }
649
+ async VectorizeAndInsert(input, options) {
650
+ return this.SendRequest({
651
+ input,
652
+ method: 'post',
653
+ path: '/services/vectorize/{dataset_id}/vectorize_and_insert',
654
+ options
655
+ });
656
+ }
657
+ async VectorizeField(input, options) {
658
+ return this.SendRequest({
659
+ input,
660
+ method: 'post',
661
+ path: '/services/vectorize/{dataset_id}',
662
+ options
663
+ });
664
+ }
665
+ async TriggerWorkflow(input, options) {
666
+ return this.SendRequest({
667
+ input,
668
+ method: 'post',
669
+ path: '/workflows/trigger',
670
+ options
671
+ });
672
+ }
673
+ async ListWorkflows(input, options) {
674
+ return this.SendRequest({
675
+ input,
676
+ method: 'get',
677
+ path: '/workflows/list',
678
+ options
679
+ });
680
+ }
681
+ async GetWorkflowStatus(input, options) {
682
+ return this.SendRequest({
683
+ input,
684
+ method: 'post',
685
+ path: '/workflows/{workflow_id}/get',
686
+ options
687
+ });
688
+ }
689
+ async UpsertWorkflowMetadata(input, options) {
690
+ return this.SendRequest({
691
+ input,
692
+ method: 'post',
693
+ path: '/workflows/{workflow_id}/metadata',
694
+ options
695
+ });
696
+ }
105
697
  }
106
698
  exports.DiscoveryApiClient = DiscoveryApiClient;
@@ -1,6 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * This file was auto-generated by openapi-typescript.
4
- * Do not make direct changes to the file.
5
- */
6
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -11,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./DiscoveryApi"), exports);
14
- __exportStar(require("./VectorApi"), exports);
package/dist-cjs/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -11,4 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./generated"), exports);
14
- __exportStar(require("./services"), exports);
18
+ // export * from './services';