chromadb 3.2.2 → 3.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/chromadb.d.ts +45 -8
- package/dist/chromadb.legacy-esm.js +404 -177
- package/dist/chromadb.mjs +404 -177
- package/dist/chromadb.mjs.map +1 -1
- package/dist/cjs/chromadb.cjs +404 -177
- package/dist/cjs/chromadb.cjs.map +1 -1
- package/dist/cjs/chromadb.d.cts +45 -8
- package/package.json +6 -6
- package/src/admin-client.ts +7 -7
- package/src/api/sdk.gen.ts +360 -135
- package/src/api/types.gen.ts +152 -58
- package/src/chroma-client.ts +18 -13
- package/src/collection.ts +18 -18
- package/src/execution/expression/key.ts +27 -6
- package/src/types.ts +28 -5
- package/src/utils.ts +72 -17
package/dist/chromadb.mjs
CHANGED
|
@@ -365,27 +365,170 @@ var client = J(w({
|
|
|
365
365
|
}));
|
|
366
366
|
|
|
367
367
|
// src/api/sdk.gen.ts
|
|
368
|
-
var
|
|
368
|
+
var AuthenticationService = class {
|
|
369
369
|
/**
|
|
370
|
-
*
|
|
370
|
+
* Get user identity
|
|
371
|
+
* Returns the current user's identity, tenant, and databases.
|
|
371
372
|
*/
|
|
372
373
|
static getUserIdentity(options) {
|
|
373
374
|
return (options?.client ?? client).get({
|
|
375
|
+
security: [
|
|
376
|
+
{
|
|
377
|
+
name: "x-chroma-token",
|
|
378
|
+
type: "apiKey"
|
|
379
|
+
}
|
|
380
|
+
],
|
|
374
381
|
url: "/api/v2/auth/identity",
|
|
375
382
|
...options
|
|
376
383
|
});
|
|
377
384
|
}
|
|
385
|
+
};
|
|
386
|
+
var CollectionService = class {
|
|
378
387
|
/**
|
|
379
|
-
*
|
|
388
|
+
* Get collection by CRN
|
|
389
|
+
* Returns a collection by Chroma Resource Name.
|
|
380
390
|
*/
|
|
381
391
|
static getCollectionByCrn(options) {
|
|
382
392
|
return (options.client ?? client).get({
|
|
393
|
+
security: [
|
|
394
|
+
{
|
|
395
|
+
name: "x-chroma-token",
|
|
396
|
+
type: "apiKey"
|
|
397
|
+
}
|
|
398
|
+
],
|
|
383
399
|
url: "/api/v2/collections/{crn}",
|
|
384
400
|
...options
|
|
385
401
|
});
|
|
386
402
|
}
|
|
387
403
|
/**
|
|
388
|
-
*
|
|
404
|
+
* List collections
|
|
405
|
+
* Lists all collections in a database.
|
|
406
|
+
*/
|
|
407
|
+
static listCollections(options) {
|
|
408
|
+
return (options.client ?? client).get({
|
|
409
|
+
security: [
|
|
410
|
+
{
|
|
411
|
+
name: "x-chroma-token",
|
|
412
|
+
type: "apiKey"
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
url: "/api/v2/tenants/{tenant}/databases/{database}/collections",
|
|
416
|
+
...options
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Create collection
|
|
421
|
+
* Creates a new collection in a database.
|
|
422
|
+
*/
|
|
423
|
+
static createCollection(options) {
|
|
424
|
+
return (options.client ?? client).post({
|
|
425
|
+
security: [
|
|
426
|
+
{
|
|
427
|
+
name: "x-chroma-token",
|
|
428
|
+
type: "apiKey"
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
url: "/api/v2/tenants/{tenant}/databases/{database}/collections",
|
|
432
|
+
...options,
|
|
433
|
+
headers: {
|
|
434
|
+
"Content-Type": "application/json",
|
|
435
|
+
...options?.headers
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Delete collection
|
|
441
|
+
* Deletes a collection in a database.
|
|
442
|
+
*/
|
|
443
|
+
static deleteCollection(options) {
|
|
444
|
+
return (options.client ?? client).delete({
|
|
445
|
+
security: [
|
|
446
|
+
{
|
|
447
|
+
name: "x-chroma-token",
|
|
448
|
+
type: "apiKey"
|
|
449
|
+
}
|
|
450
|
+
],
|
|
451
|
+
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}",
|
|
452
|
+
...options
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Get collection
|
|
457
|
+
* Returns a collection by ID or name.
|
|
458
|
+
*/
|
|
459
|
+
static getCollection(options) {
|
|
460
|
+
return (options.client ?? client).get({
|
|
461
|
+
security: [
|
|
462
|
+
{
|
|
463
|
+
name: "x-chroma-token",
|
|
464
|
+
type: "apiKey"
|
|
465
|
+
}
|
|
466
|
+
],
|
|
467
|
+
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}",
|
|
468
|
+
...options
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Update collection
|
|
473
|
+
* Updates an existing collection's name or metadata.
|
|
474
|
+
*/
|
|
475
|
+
static updateCollection(options) {
|
|
476
|
+
return (options.client ?? client).put({
|
|
477
|
+
security: [
|
|
478
|
+
{
|
|
479
|
+
name: "x-chroma-token",
|
|
480
|
+
type: "apiKey"
|
|
481
|
+
}
|
|
482
|
+
],
|
|
483
|
+
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}",
|
|
484
|
+
...options,
|
|
485
|
+
headers: {
|
|
486
|
+
"Content-Type": "application/json",
|
|
487
|
+
...options?.headers
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Fork collection
|
|
493
|
+
* Creates a fork of an existing collection.
|
|
494
|
+
*/
|
|
495
|
+
static forkCollection(options) {
|
|
496
|
+
return (options.client ?? client).post({
|
|
497
|
+
security: [
|
|
498
|
+
{
|
|
499
|
+
name: "x-chroma-token",
|
|
500
|
+
type: "apiKey"
|
|
501
|
+
}
|
|
502
|
+
],
|
|
503
|
+
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/fork",
|
|
504
|
+
...options,
|
|
505
|
+
headers: {
|
|
506
|
+
"Content-Type": "application/json",
|
|
507
|
+
...options?.headers
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Get number of collections
|
|
513
|
+
* Returns the total number of collections in a database.
|
|
514
|
+
*/
|
|
515
|
+
static countCollections(options) {
|
|
516
|
+
return (options.client ?? client).get({
|
|
517
|
+
security: [
|
|
518
|
+
{
|
|
519
|
+
name: "x-chroma-token",
|
|
520
|
+
type: "apiKey"
|
|
521
|
+
}
|
|
522
|
+
],
|
|
523
|
+
url: "/api/v2/tenants/{tenant}/databases/{database}/collections_count",
|
|
524
|
+
...options
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
var SystemService = class {
|
|
529
|
+
/**
|
|
530
|
+
* Healthcheck
|
|
531
|
+
* Returns the health status of the service.
|
|
389
532
|
*/
|
|
390
533
|
static healthcheck(options) {
|
|
391
534
|
return (options?.client ?? client).get({
|
|
@@ -394,7 +537,8 @@ var DefaultService = class {
|
|
|
394
537
|
});
|
|
395
538
|
}
|
|
396
539
|
/**
|
|
397
|
-
* Heartbeat
|
|
540
|
+
* Heartbeat
|
|
541
|
+
* Returns a nanosecond timestamp of the current time.
|
|
398
542
|
*/
|
|
399
543
|
static heartbeat(options) {
|
|
400
544
|
return (options?.client ?? client).get({
|
|
@@ -403,7 +547,8 @@ var DefaultService = class {
|
|
|
403
547
|
});
|
|
404
548
|
}
|
|
405
549
|
/**
|
|
406
|
-
* Pre-flight checks
|
|
550
|
+
* Pre-flight checks
|
|
551
|
+
* Returns basic readiness information.
|
|
407
552
|
*/
|
|
408
553
|
static preFlightChecks(options) {
|
|
409
554
|
return (options?.client ?? client).get({
|
|
@@ -412,19 +557,45 @@ var DefaultService = class {
|
|
|
412
557
|
});
|
|
413
558
|
}
|
|
414
559
|
/**
|
|
415
|
-
* Reset
|
|
560
|
+
* Reset database
|
|
561
|
+
* Resets the database. Requires authorization.
|
|
416
562
|
*/
|
|
417
563
|
static reset(options) {
|
|
418
564
|
return (options?.client ?? client).post({
|
|
565
|
+
security: [
|
|
566
|
+
{
|
|
567
|
+
name: "x-chroma-token",
|
|
568
|
+
type: "apiKey"
|
|
569
|
+
}
|
|
570
|
+
],
|
|
419
571
|
url: "/api/v2/reset",
|
|
420
572
|
...options
|
|
421
573
|
});
|
|
422
574
|
}
|
|
423
575
|
/**
|
|
576
|
+
* Get version
|
|
577
|
+
* Returns the version of the server.
|
|
578
|
+
*/
|
|
579
|
+
static version(options) {
|
|
580
|
+
return (options?.client ?? client).get({
|
|
581
|
+
url: "/api/v2/version",
|
|
582
|
+
...options
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
var TenantService = class {
|
|
587
|
+
/**
|
|
588
|
+
* Create tenant
|
|
424
589
|
* Creates a new tenant.
|
|
425
590
|
*/
|
|
426
591
|
static createTenant(options) {
|
|
427
592
|
return (options.client ?? client).post({
|
|
593
|
+
security: [
|
|
594
|
+
{
|
|
595
|
+
name: "x-chroma-token",
|
|
596
|
+
type: "apiKey"
|
|
597
|
+
}
|
|
598
|
+
],
|
|
428
599
|
url: "/api/v2/tenants",
|
|
429
600
|
...options,
|
|
430
601
|
headers: {
|
|
@@ -434,19 +605,33 @@ var DefaultService = class {
|
|
|
434
605
|
});
|
|
435
606
|
}
|
|
436
607
|
/**
|
|
608
|
+
* Get tenant
|
|
437
609
|
* Returns an existing tenant by name.
|
|
438
610
|
*/
|
|
439
611
|
static getTenant(options) {
|
|
440
612
|
return (options.client ?? client).get({
|
|
613
|
+
security: [
|
|
614
|
+
{
|
|
615
|
+
name: "x-chroma-token",
|
|
616
|
+
type: "apiKey"
|
|
617
|
+
}
|
|
618
|
+
],
|
|
441
619
|
url: "/api/v2/tenants/{tenant_name}",
|
|
442
620
|
...options
|
|
443
621
|
});
|
|
444
622
|
}
|
|
445
623
|
/**
|
|
624
|
+
* Update tenant
|
|
446
625
|
* Updates an existing tenant by name.
|
|
447
626
|
*/
|
|
448
627
|
static updateTenant(options) {
|
|
449
628
|
return (options.client ?? client).patch({
|
|
629
|
+
security: [
|
|
630
|
+
{
|
|
631
|
+
name: "x-chroma-token",
|
|
632
|
+
type: "apiKey"
|
|
633
|
+
}
|
|
634
|
+
],
|
|
450
635
|
url: "/api/v2/tenants/{tenant_name}",
|
|
451
636
|
...options,
|
|
452
637
|
headers: {
|
|
@@ -455,20 +640,36 @@ var DefaultService = class {
|
|
|
455
640
|
}
|
|
456
641
|
});
|
|
457
642
|
}
|
|
643
|
+
};
|
|
644
|
+
var DatabaseService = class {
|
|
458
645
|
/**
|
|
459
|
-
*
|
|
646
|
+
* List databases
|
|
647
|
+
* Lists all databases for a tenant.
|
|
460
648
|
*/
|
|
461
649
|
static listDatabases(options) {
|
|
462
650
|
return (options.client ?? client).get({
|
|
651
|
+
security: [
|
|
652
|
+
{
|
|
653
|
+
name: "x-chroma-token",
|
|
654
|
+
type: "apiKey"
|
|
655
|
+
}
|
|
656
|
+
],
|
|
463
657
|
url: "/api/v2/tenants/{tenant}/databases",
|
|
464
658
|
...options
|
|
465
659
|
});
|
|
466
660
|
}
|
|
467
661
|
/**
|
|
468
|
-
*
|
|
662
|
+
* Create database
|
|
663
|
+
* Creates a new database for a tenant.
|
|
469
664
|
*/
|
|
470
665
|
static createDatabase(options) {
|
|
471
666
|
return (options.client ?? client).post({
|
|
667
|
+
security: [
|
|
668
|
+
{
|
|
669
|
+
name: "x-chroma-token",
|
|
670
|
+
type: "apiKey"
|
|
671
|
+
}
|
|
672
|
+
],
|
|
472
673
|
url: "/api/v2/tenants/{tenant}/databases",
|
|
473
674
|
...options,
|
|
474
675
|
headers: {
|
|
@@ -478,81 +679,51 @@ var DefaultService = class {
|
|
|
478
679
|
});
|
|
479
680
|
}
|
|
480
681
|
/**
|
|
481
|
-
*
|
|
682
|
+
* Delete database
|
|
683
|
+
* Deletes a database by name.
|
|
482
684
|
*/
|
|
483
685
|
static deleteDatabase(options) {
|
|
484
686
|
return (options.client ?? client).delete({
|
|
687
|
+
security: [
|
|
688
|
+
{
|
|
689
|
+
name: "x-chroma-token",
|
|
690
|
+
type: "apiKey"
|
|
691
|
+
}
|
|
692
|
+
],
|
|
485
693
|
url: "/api/v2/tenants/{tenant}/databases/{database}",
|
|
486
694
|
...options
|
|
487
695
|
});
|
|
488
696
|
}
|
|
489
697
|
/**
|
|
490
|
-
*
|
|
698
|
+
* Get database
|
|
699
|
+
* Returns a database by name.
|
|
491
700
|
*/
|
|
492
701
|
static getDatabase(options) {
|
|
493
702
|
return (options.client ?? client).get({
|
|
703
|
+
security: [
|
|
704
|
+
{
|
|
705
|
+
name: "x-chroma-token",
|
|
706
|
+
type: "apiKey"
|
|
707
|
+
}
|
|
708
|
+
],
|
|
494
709
|
url: "/api/v2/tenants/{tenant}/databases/{database}",
|
|
495
710
|
...options
|
|
496
711
|
});
|
|
497
712
|
}
|
|
713
|
+
};
|
|
714
|
+
var RecordService = class {
|
|
498
715
|
/**
|
|
499
|
-
*
|
|
500
|
-
*/
|
|
501
|
-
static listCollections(options) {
|
|
502
|
-
return (options.client ?? client).get({
|
|
503
|
-
url: "/api/v2/tenants/{tenant}/databases/{database}/collections",
|
|
504
|
-
...options
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
/**
|
|
508
|
-
* Creates a new collection under the specified database.
|
|
509
|
-
*/
|
|
510
|
-
static createCollection(options) {
|
|
511
|
-
return (options.client ?? client).post({
|
|
512
|
-
url: "/api/v2/tenants/{tenant}/databases/{database}/collections",
|
|
513
|
-
...options,
|
|
514
|
-
headers: {
|
|
515
|
-
"Content-Type": "application/json",
|
|
516
|
-
...options?.headers
|
|
517
|
-
}
|
|
518
|
-
});
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Deletes a collection in a given database.
|
|
522
|
-
*/
|
|
523
|
-
static deleteCollection(options) {
|
|
524
|
-
return (options.client ?? client).delete({
|
|
525
|
-
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}",
|
|
526
|
-
...options
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
/**
|
|
530
|
-
* Retrieves a collection by ID or name.
|
|
531
|
-
*/
|
|
532
|
-
static getCollection(options) {
|
|
533
|
-
return (options.client ?? client).get({
|
|
534
|
-
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}",
|
|
535
|
-
...options
|
|
536
|
-
});
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* Updates an existing collection's name or metadata.
|
|
540
|
-
*/
|
|
541
|
-
static updateCollection(options) {
|
|
542
|
-
return (options.client ?? client).put({
|
|
543
|
-
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}",
|
|
544
|
-
...options,
|
|
545
|
-
headers: {
|
|
546
|
-
"Content-Type": "application/json",
|
|
547
|
-
...options?.headers
|
|
548
|
-
}
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
/**
|
|
716
|
+
* Add records
|
|
552
717
|
* Adds records to a collection.
|
|
553
718
|
*/
|
|
554
719
|
static collectionAdd(options) {
|
|
555
720
|
return (options.client ?? client).post({
|
|
721
|
+
security: [
|
|
722
|
+
{
|
|
723
|
+
name: "x-chroma-token",
|
|
724
|
+
type: "apiKey"
|
|
725
|
+
}
|
|
726
|
+
],
|
|
556
727
|
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/add",
|
|
557
728
|
...options,
|
|
558
729
|
headers: {
|
|
@@ -562,32 +733,33 @@ var DefaultService = class {
|
|
|
562
733
|
});
|
|
563
734
|
}
|
|
564
735
|
/**
|
|
565
|
-
*
|
|
566
|
-
|
|
567
|
-
static detachFunction(options) {
|
|
568
|
-
return (options.client ?? client).post({
|
|
569
|
-
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/attached_functions/{name}/detach",
|
|
570
|
-
...options,
|
|
571
|
-
headers: {
|
|
572
|
-
"Content-Type": "application/json",
|
|
573
|
-
...options?.headers
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Retrieves the number of records in a collection.
|
|
736
|
+
* Get number of records
|
|
737
|
+
* Returns the number of records in a collection.
|
|
579
738
|
*/
|
|
580
739
|
static collectionCount(options) {
|
|
581
740
|
return (options.client ?? client).get({
|
|
741
|
+
security: [
|
|
742
|
+
{
|
|
743
|
+
name: "x-chroma-token",
|
|
744
|
+
type: "apiKey"
|
|
745
|
+
}
|
|
746
|
+
],
|
|
582
747
|
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/count",
|
|
583
748
|
...options
|
|
584
749
|
});
|
|
585
750
|
}
|
|
586
751
|
/**
|
|
752
|
+
* Delete records
|
|
587
753
|
* Deletes records in a collection. Can filter by IDs or metadata.
|
|
588
754
|
*/
|
|
589
755
|
static collectionDelete(options) {
|
|
590
756
|
return (options.client ?? client).post({
|
|
757
|
+
security: [
|
|
758
|
+
{
|
|
759
|
+
name: "x-chroma-token",
|
|
760
|
+
type: "apiKey"
|
|
761
|
+
}
|
|
762
|
+
],
|
|
591
763
|
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/delete",
|
|
592
764
|
...options,
|
|
593
765
|
headers: {
|
|
@@ -597,45 +769,17 @@ var DefaultService = class {
|
|
|
597
769
|
});
|
|
598
770
|
}
|
|
599
771
|
/**
|
|
600
|
-
*
|
|
601
|
-
|
|
602
|
-
static forkCollection(options) {
|
|
603
|
-
return (options.client ?? client).post({
|
|
604
|
-
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/fork",
|
|
605
|
-
...options,
|
|
606
|
-
headers: {
|
|
607
|
-
"Content-Type": "application/json",
|
|
608
|
-
...options?.headers
|
|
609
|
-
}
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
/**
|
|
613
|
-
* Attach a function to a collection
|
|
614
|
-
*/
|
|
615
|
-
static attachFunction(options) {
|
|
616
|
-
return (options.client ?? client).post({
|
|
617
|
-
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/attach",
|
|
618
|
-
...options,
|
|
619
|
-
headers: {
|
|
620
|
-
"Content-Type": "application/json",
|
|
621
|
-
...options?.headers
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
/**
|
|
626
|
-
* Get an attached function by name
|
|
627
|
-
*/
|
|
628
|
-
static getAttachedFunction(options) {
|
|
629
|
-
return (options.client ?? client).get({
|
|
630
|
-
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/{function_name}",
|
|
631
|
-
...options
|
|
632
|
-
});
|
|
633
|
-
}
|
|
634
|
-
/**
|
|
635
|
-
* Retrieves records from a collection by ID or metadata filter.
|
|
772
|
+
* Get records
|
|
773
|
+
* Returns records from a collection by ID or metadata filter.
|
|
636
774
|
*/
|
|
637
775
|
static collectionGet(options) {
|
|
638
776
|
return (options.client ?? client).post({
|
|
777
|
+
security: [
|
|
778
|
+
{
|
|
779
|
+
name: "x-chroma-token",
|
|
780
|
+
type: "apiKey"
|
|
781
|
+
}
|
|
782
|
+
],
|
|
639
783
|
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/get",
|
|
640
784
|
...options,
|
|
641
785
|
headers: {
|
|
@@ -645,19 +789,33 @@ var DefaultService = class {
|
|
|
645
789
|
});
|
|
646
790
|
}
|
|
647
791
|
/**
|
|
648
|
-
*
|
|
792
|
+
* Get indexing status
|
|
793
|
+
* Returns the indexing status of a collection.
|
|
649
794
|
*/
|
|
650
795
|
static indexingStatus(options) {
|
|
651
796
|
return (options.client ?? client).get({
|
|
797
|
+
security: [
|
|
798
|
+
{
|
|
799
|
+
name: "x-chroma-token",
|
|
800
|
+
type: "apiKey"
|
|
801
|
+
}
|
|
802
|
+
],
|
|
652
803
|
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/indexing_status",
|
|
653
804
|
...options
|
|
654
805
|
});
|
|
655
806
|
}
|
|
656
807
|
/**
|
|
657
|
-
* Query
|
|
808
|
+
* Query collection
|
|
809
|
+
* Queries a collection using dense vector search with metadata and full-text search filtering.
|
|
658
810
|
*/
|
|
659
811
|
static collectionQuery(options) {
|
|
660
812
|
return (options.client ?? client).post({
|
|
813
|
+
security: [
|
|
814
|
+
{
|
|
815
|
+
name: "x-chroma-token",
|
|
816
|
+
type: "apiKey"
|
|
817
|
+
}
|
|
818
|
+
],
|
|
661
819
|
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/query",
|
|
662
820
|
...options,
|
|
663
821
|
headers: {
|
|
@@ -667,10 +825,17 @@ var DefaultService = class {
|
|
|
667
825
|
});
|
|
668
826
|
}
|
|
669
827
|
/**
|
|
670
|
-
* Search records
|
|
828
|
+
* Search records
|
|
829
|
+
* Searches records from a collection with dense, sparse, or hybrid vector search.
|
|
671
830
|
*/
|
|
672
831
|
static collectionSearch(options) {
|
|
673
832
|
return (options.client ?? client).post({
|
|
833
|
+
security: [
|
|
834
|
+
{
|
|
835
|
+
name: "x-chroma-token",
|
|
836
|
+
type: "apiKey"
|
|
837
|
+
}
|
|
838
|
+
],
|
|
674
839
|
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/search",
|
|
675
840
|
...options,
|
|
676
841
|
headers: {
|
|
@@ -680,10 +845,17 @@ var DefaultService = class {
|
|
|
680
845
|
});
|
|
681
846
|
}
|
|
682
847
|
/**
|
|
848
|
+
* Update records
|
|
683
849
|
* Updates records in a collection by ID.
|
|
684
850
|
*/
|
|
685
851
|
static collectionUpdate(options) {
|
|
686
852
|
return (options.client ?? client).post({
|
|
853
|
+
security: [
|
|
854
|
+
{
|
|
855
|
+
name: "x-chroma-token",
|
|
856
|
+
type: "apiKey"
|
|
857
|
+
}
|
|
858
|
+
],
|
|
687
859
|
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/update",
|
|
688
860
|
...options,
|
|
689
861
|
headers: {
|
|
@@ -693,10 +865,17 @@ var DefaultService = class {
|
|
|
693
865
|
});
|
|
694
866
|
}
|
|
695
867
|
/**
|
|
868
|
+
* Upsert records
|
|
696
869
|
* Upserts records in a collection (create if not exists, otherwise update).
|
|
697
870
|
*/
|
|
698
871
|
static collectionUpsert(options) {
|
|
699
872
|
return (options.client ?? client).post({
|
|
873
|
+
security: [
|
|
874
|
+
{
|
|
875
|
+
name: "x-chroma-token",
|
|
876
|
+
type: "apiKey"
|
|
877
|
+
}
|
|
878
|
+
],
|
|
700
879
|
url: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/upsert",
|
|
701
880
|
...options,
|
|
702
881
|
headers: {
|
|
@@ -705,24 +884,6 @@ var DefaultService = class {
|
|
|
705
884
|
}
|
|
706
885
|
});
|
|
707
886
|
}
|
|
708
|
-
/**
|
|
709
|
-
* Retrieves the total number of collections in a given database.
|
|
710
|
-
*/
|
|
711
|
-
static countCollections(options) {
|
|
712
|
-
return (options.client ?? client).get({
|
|
713
|
-
url: "/api/v2/tenants/{tenant}/databases/{database}/collections_count",
|
|
714
|
-
...options
|
|
715
|
-
});
|
|
716
|
-
}
|
|
717
|
-
/**
|
|
718
|
-
* Returns the version of the server.
|
|
719
|
-
*/
|
|
720
|
-
static version(options) {
|
|
721
|
-
return (options?.client ?? client).get({
|
|
722
|
-
url: "/api/v2/version",
|
|
723
|
-
...options
|
|
724
|
-
});
|
|
725
|
-
}
|
|
726
887
|
};
|
|
727
888
|
|
|
728
889
|
// src/errors.ts
|
|
@@ -990,11 +1151,39 @@ var validateMetadata = (metadata) => {
|
|
|
990
1151
|
if (Object.keys(metadata).length === 0) {
|
|
991
1152
|
throw new ChromaValueError("Expected metadata to be non-empty");
|
|
992
1153
|
}
|
|
993
|
-
|
|
994
|
-
(v
|
|
995
|
-
|
|
1154
|
+
const validateMetadataListValue = (key, v) => {
|
|
1155
|
+
if (v.length === 0) {
|
|
1156
|
+
throw new ChromaValueError(
|
|
1157
|
+
`Expected metadata list value for key '${key}' to be non-empty`
|
|
1158
|
+
);
|
|
1159
|
+
}
|
|
1160
|
+
const firstType = typeof v[0];
|
|
1161
|
+
for (const item of v) {
|
|
1162
|
+
if (typeof item !== "string" && typeof item !== "number" && typeof item !== "boolean") {
|
|
1163
|
+
throw new ChromaValueError(
|
|
1164
|
+
`Expected metadata list value for key '${key}' to contain only strings, numbers, or booleans, got ${typeof item}`
|
|
1165
|
+
);
|
|
1166
|
+
}
|
|
1167
|
+
if (typeof item !== firstType) {
|
|
1168
|
+
throw new ChromaValueError(
|
|
1169
|
+
`Expected metadata list value for key '${key}' to contain only the same type, got mixed types`
|
|
1170
|
+
);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
for (const [key, v] of Object.entries(metadata)) {
|
|
1175
|
+
if (v === null || v === void 0 || typeof v === "string" || typeof v === "number" || typeof v === "boolean") {
|
|
1176
|
+
continue;
|
|
1177
|
+
}
|
|
1178
|
+
if (validateSparseVector(v)) {
|
|
1179
|
+
continue;
|
|
1180
|
+
}
|
|
1181
|
+
if (Array.isArray(v)) {
|
|
1182
|
+
validateMetadataListValue(key, v);
|
|
1183
|
+
continue;
|
|
1184
|
+
}
|
|
996
1185
|
throw new ChromaValueError(
|
|
997
|
-
|
|
1186
|
+
`Expected metadata value for key '${key}' to be a string, number, boolean, SparseVector, typed array (string[], number[], boolean[]), or null`
|
|
998
1187
|
);
|
|
999
1188
|
}
|
|
1000
1189
|
};
|
|
@@ -1013,10 +1202,13 @@ var serializeMetadata = (metadata) => {
|
|
|
1013
1202
|
}
|
|
1014
1203
|
const result = {};
|
|
1015
1204
|
Object.entries(metadata).forEach(([key, value]) => {
|
|
1205
|
+
if (value === null || value === void 0) {
|
|
1206
|
+
return;
|
|
1207
|
+
}
|
|
1016
1208
|
if (validateSparseVector(value)) {
|
|
1017
1209
|
result[key] = toSerializedSparseVector(value);
|
|
1018
1210
|
} else {
|
|
1019
|
-
result[key] = value
|
|
1211
|
+
result[key] = value;
|
|
1020
1212
|
}
|
|
1021
1213
|
});
|
|
1022
1214
|
return result;
|
|
@@ -1169,11 +1361,25 @@ var validateWhere = (where) => {
|
|
|
1169
1361
|
`Expected operand value to be an array for ${operator}, but got ${operand}`
|
|
1170
1362
|
);
|
|
1171
1363
|
}
|
|
1172
|
-
if (
|
|
1173
|
-
|
|
1174
|
-
|
|
1364
|
+
if (["$contains", "$not_contains"].includes(operator) && !["string", "number", "boolean"].includes(typeof operand)) {
|
|
1365
|
+
throw new ChromaValueError(
|
|
1366
|
+
`Expected operand value to be a string, number, or boolean for ${operator}, but got ${typeof operand}`
|
|
1367
|
+
);
|
|
1368
|
+
}
|
|
1369
|
+
if (![
|
|
1370
|
+
"$gt",
|
|
1371
|
+
"$gte",
|
|
1372
|
+
"$lt",
|
|
1373
|
+
"$lte",
|
|
1374
|
+
"$ne",
|
|
1375
|
+
"$eq",
|
|
1376
|
+
"$in",
|
|
1377
|
+
"$nin",
|
|
1378
|
+
"$contains",
|
|
1379
|
+
"$not_contains"
|
|
1380
|
+
].includes(operator)) {
|
|
1175
1381
|
throw new ChromaValueError(
|
|
1176
|
-
`Expected operator to be one of $gt, $gte, $lt, $lte, $ne, $eq, $in, $nin, but got ${operator}`
|
|
1382
|
+
`Expected operator to be one of $gt, $gte, $lt, $lte, $ne, $eq, $in, $nin, $contains, $not_contains, but got ${operator}`
|
|
1177
1383
|
);
|
|
1178
1384
|
}
|
|
1179
1385
|
if (!["string", "number", "boolean"].includes(typeof operand) && !Array.isArray(operand)) {
|
|
@@ -1847,15 +2053,36 @@ var _Key = class _Key {
|
|
|
1847
2053
|
assertNonEmptyArray(array, "$nin requires at least one value");
|
|
1848
2054
|
return createComparisonWhere(this.name, "$nin", array);
|
|
1849
2055
|
}
|
|
2056
|
+
/**
|
|
2057
|
+
* Contains filter.
|
|
2058
|
+
*
|
|
2059
|
+
* On `Key.DOCUMENT`: substring search (value must be a string).
|
|
2060
|
+
* On metadata fields: checks if the array field contains the scalar value.
|
|
2061
|
+
*
|
|
2062
|
+
* @example
|
|
2063
|
+
* K.DOCUMENT.contains("machine learning") // document substring
|
|
2064
|
+
* K("tags").contains("action") // metadata array contains
|
|
2065
|
+
* K("scores").contains(42) // metadata array contains
|
|
2066
|
+
*/
|
|
1850
2067
|
contains(value) {
|
|
1851
|
-
if (typeof value !== "string") {
|
|
1852
|
-
throw new TypeError("
|
|
2068
|
+
if (this.name === "#document" && typeof value !== "string") {
|
|
2069
|
+
throw new TypeError("K.DOCUMENT.contains requires a string value");
|
|
1853
2070
|
}
|
|
1854
2071
|
return createComparisonWhere(this.name, "$contains", value);
|
|
1855
2072
|
}
|
|
2073
|
+
/**
|
|
2074
|
+
* Not-contains filter.
|
|
2075
|
+
*
|
|
2076
|
+
* On `Key.DOCUMENT`: excludes documents containing the substring.
|
|
2077
|
+
* On metadata fields: checks that the array field does not contain the scalar value.
|
|
2078
|
+
*
|
|
2079
|
+
* @example
|
|
2080
|
+
* K.DOCUMENT.notContains("deprecated") // document substring exclusion
|
|
2081
|
+
* K("tags").notContains("draft") // metadata array not-contains
|
|
2082
|
+
*/
|
|
1856
2083
|
notContains(value) {
|
|
1857
|
-
if (typeof value !== "string") {
|
|
1858
|
-
throw new TypeError("
|
|
2084
|
+
if (this.name === "#document" && typeof value !== "string") {
|
|
2085
|
+
throw new TypeError("K.DOCUMENT.notContains requires a string value");
|
|
1859
2086
|
}
|
|
1860
2087
|
return createComparisonWhere(this.name, "$not_contains", value);
|
|
1861
2088
|
}
|
|
@@ -4042,7 +4269,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4042
4269
|
if (whereDocument) validateWhereDocument(whereDocument);
|
|
4043
4270
|
}
|
|
4044
4271
|
async count() {
|
|
4045
|
-
const { data } = await
|
|
4272
|
+
const { data } = await RecordService.collectionCount({
|
|
4046
4273
|
client: this.apiClient,
|
|
4047
4274
|
path: await this.path()
|
|
4048
4275
|
});
|
|
@@ -4063,7 +4290,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4063
4290
|
uris
|
|
4064
4291
|
};
|
|
4065
4292
|
const preparedRecordSet = await this.prepareRecords({ recordSet });
|
|
4066
|
-
await
|
|
4293
|
+
await RecordService.collectionAdd({
|
|
4067
4294
|
client: this.apiClient,
|
|
4068
4295
|
path: await this.path(),
|
|
4069
4296
|
body: {
|
|
@@ -4085,7 +4312,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4085
4312
|
include = ["documents", "metadatas"]
|
|
4086
4313
|
} = args;
|
|
4087
4314
|
this.validateGet(include, ids, where, whereDocument);
|
|
4088
|
-
const { data } = await
|
|
4315
|
+
const { data } = await RecordService.collectionGet({
|
|
4089
4316
|
client: this.apiClient,
|
|
4090
4317
|
path: await this.path(),
|
|
4091
4318
|
body: {
|
|
@@ -4133,7 +4360,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4133
4360
|
whereDocument,
|
|
4134
4361
|
nResults
|
|
4135
4362
|
);
|
|
4136
|
-
const { data } = await
|
|
4363
|
+
const { data } = await RecordService.collectionQuery({
|
|
4137
4364
|
client: this.apiClient,
|
|
4138
4365
|
path: await this.path(),
|
|
4139
4366
|
body: {
|
|
@@ -4169,7 +4396,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4169
4396
|
return this.embedSearchPayload(payload);
|
|
4170
4397
|
})
|
|
4171
4398
|
);
|
|
4172
|
-
const { data } = await
|
|
4399
|
+
const { data } = await RecordService.collectionSearch({
|
|
4173
4400
|
client: this.apiClient,
|
|
4174
4401
|
path: await this.path(),
|
|
4175
4402
|
body: {
|
|
@@ -4206,7 +4433,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4206
4433
|
embeddingFunction: updateConfiguration.embedding_function
|
|
4207
4434
|
};
|
|
4208
4435
|
}
|
|
4209
|
-
await
|
|
4436
|
+
await CollectionService.updateCollection({
|
|
4210
4437
|
client: this.apiClient,
|
|
4211
4438
|
path: await this.path(),
|
|
4212
4439
|
body: {
|
|
@@ -4217,7 +4444,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4217
4444
|
});
|
|
4218
4445
|
}
|
|
4219
4446
|
async fork({ name }) {
|
|
4220
|
-
const { data } = await
|
|
4447
|
+
const { data } = await CollectionService.forkCollection({
|
|
4221
4448
|
client: this.apiClient,
|
|
4222
4449
|
path: await this.path(),
|
|
4223
4450
|
body: { new_name: name }
|
|
@@ -4252,7 +4479,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4252
4479
|
recordSet,
|
|
4253
4480
|
update: true
|
|
4254
4481
|
});
|
|
4255
|
-
await
|
|
4482
|
+
await RecordService.collectionUpdate({
|
|
4256
4483
|
client: this.apiClient,
|
|
4257
4484
|
path: await this.path(),
|
|
4258
4485
|
body: {
|
|
@@ -4281,7 +4508,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4281
4508
|
const preparedRecordSet = await this.prepareRecords({
|
|
4282
4509
|
recordSet
|
|
4283
4510
|
});
|
|
4284
|
-
await
|
|
4511
|
+
await RecordService.collectionUpsert({
|
|
4285
4512
|
client: this.apiClient,
|
|
4286
4513
|
path: await this.path(),
|
|
4287
4514
|
body: {
|
|
@@ -4299,7 +4526,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4299
4526
|
whereDocument
|
|
4300
4527
|
}) {
|
|
4301
4528
|
this.validateDelete(ids, where, whereDocument);
|
|
4302
|
-
await
|
|
4529
|
+
await RecordService.collectionDelete({
|
|
4303
4530
|
client: this.apiClient,
|
|
4304
4531
|
path: await this.path(),
|
|
4305
4532
|
body: {
|
|
@@ -4310,7 +4537,7 @@ var CollectionImpl = class _CollectionImpl {
|
|
|
4310
4537
|
});
|
|
4311
4538
|
}
|
|
4312
4539
|
async getIndexingStatus() {
|
|
4313
|
-
const { data } = await
|
|
4540
|
+
const { data } = await RecordService.indexingStatus({
|
|
4314
4541
|
client: this.apiClient,
|
|
4315
4542
|
path: await this.path()
|
|
4316
4543
|
});
|
|
@@ -4444,7 +4671,7 @@ var AdminClient = class {
|
|
|
4444
4671
|
name,
|
|
4445
4672
|
tenant
|
|
4446
4673
|
}) {
|
|
4447
|
-
await
|
|
4674
|
+
await DatabaseService.createDatabase({
|
|
4448
4675
|
client: this.apiClient,
|
|
4449
4676
|
path: { tenant },
|
|
4450
4677
|
body: { name }
|
|
@@ -4461,7 +4688,7 @@ var AdminClient = class {
|
|
|
4461
4688
|
name,
|
|
4462
4689
|
tenant
|
|
4463
4690
|
}) {
|
|
4464
|
-
const { data } = await
|
|
4691
|
+
const { data } = await DatabaseService.getDatabase({
|
|
4465
4692
|
client: this.apiClient,
|
|
4466
4693
|
path: { tenant, database: name }
|
|
4467
4694
|
});
|
|
@@ -4478,7 +4705,7 @@ var AdminClient = class {
|
|
|
4478
4705
|
name,
|
|
4479
4706
|
tenant
|
|
4480
4707
|
}) {
|
|
4481
|
-
await
|
|
4708
|
+
await DatabaseService.deleteDatabase({
|
|
4482
4709
|
client: this.apiClient,
|
|
4483
4710
|
path: { tenant, database: name }
|
|
4484
4711
|
});
|
|
@@ -4490,7 +4717,7 @@ var AdminClient = class {
|
|
|
4490
4717
|
*/
|
|
4491
4718
|
async listDatabases(args) {
|
|
4492
4719
|
const { limit = 100, offset = 0, tenant } = args;
|
|
4493
|
-
const { data } = await
|
|
4720
|
+
const { data } = await DatabaseService.listDatabases({
|
|
4494
4721
|
client: this.apiClient,
|
|
4495
4722
|
path: { tenant },
|
|
4496
4723
|
query: { limit, offset }
|
|
@@ -4503,7 +4730,7 @@ var AdminClient = class {
|
|
|
4503
4730
|
* @param options.name - Name of the tenant to create
|
|
4504
4731
|
*/
|
|
4505
4732
|
async createTenant({ name }) {
|
|
4506
|
-
await
|
|
4733
|
+
await TenantService.createTenant({
|
|
4507
4734
|
client: this.apiClient,
|
|
4508
4735
|
body: { name }
|
|
4509
4736
|
});
|
|
@@ -4515,7 +4742,7 @@ var AdminClient = class {
|
|
|
4515
4742
|
* @returns Promise resolving to the tenant name
|
|
4516
4743
|
*/
|
|
4517
4744
|
async getTenant({ name }) {
|
|
4518
|
-
const { data } = await
|
|
4745
|
+
const { data } = await TenantService.getTenant({
|
|
4519
4746
|
client: this.apiClient,
|
|
4520
4747
|
path: { tenant_name: name }
|
|
4521
4748
|
});
|
|
@@ -4641,7 +4868,7 @@ var ChromaClient = class {
|
|
|
4641
4868
|
* @returns Promise resolving to user identity data
|
|
4642
4869
|
*/
|
|
4643
4870
|
async getUserIdentity() {
|
|
4644
|
-
const { data } = await
|
|
4871
|
+
const { data } = await AuthenticationService.getUserIdentity({
|
|
4645
4872
|
client: this.apiClient
|
|
4646
4873
|
});
|
|
4647
4874
|
return data;
|
|
@@ -4651,7 +4878,7 @@ var ChromaClient = class {
|
|
|
4651
4878
|
* @returns Promise resolving to the server's nanosecond heartbeat timestamp
|
|
4652
4879
|
*/
|
|
4653
4880
|
async heartbeat() {
|
|
4654
|
-
const { data } = await
|
|
4881
|
+
const { data } = await SystemService.heartbeat({
|
|
4655
4882
|
client: this.apiClient
|
|
4656
4883
|
});
|
|
4657
4884
|
return data["nanosecond heartbeat"];
|
|
@@ -4665,7 +4892,7 @@ var ChromaClient = class {
|
|
|
4665
4892
|
*/
|
|
4666
4893
|
async listCollections(args) {
|
|
4667
4894
|
const { limit = 100, offset = 0 } = args || {};
|
|
4668
|
-
const { data } = await
|
|
4895
|
+
const { data } = await CollectionService.listCollections({
|
|
4669
4896
|
client: this.apiClient,
|
|
4670
4897
|
path: await this._path(),
|
|
4671
4898
|
query: { limit, offset }
|
|
@@ -4702,7 +4929,7 @@ var ChromaClient = class {
|
|
|
4702
4929
|
* @returns Promise resolving to the collection count
|
|
4703
4930
|
*/
|
|
4704
4931
|
async countCollections() {
|
|
4705
|
-
const { data } = await
|
|
4932
|
+
const { data } = await CollectionService.countCollections({
|
|
4706
4933
|
client: this.apiClient,
|
|
4707
4934
|
path: await this._path()
|
|
4708
4935
|
});
|
|
@@ -4731,7 +4958,7 @@ var ChromaClient = class {
|
|
|
4731
4958
|
metadata,
|
|
4732
4959
|
schema
|
|
4733
4960
|
});
|
|
4734
|
-
const { data } = await
|
|
4961
|
+
const { data } = await CollectionService.createCollection({
|
|
4735
4962
|
client: this.apiClient,
|
|
4736
4963
|
path: await this._path(),
|
|
4737
4964
|
body: {
|
|
@@ -4777,7 +5004,7 @@ var ChromaClient = class {
|
|
|
4777
5004
|
name,
|
|
4778
5005
|
embeddingFunction
|
|
4779
5006
|
}) {
|
|
4780
|
-
const { data } = await
|
|
5007
|
+
const { data } = await CollectionService.getCollection({
|
|
4781
5008
|
client: this.apiClient,
|
|
4782
5009
|
path: { ...await this._path(), collection_id: name }
|
|
4783
5010
|
});
|
|
@@ -4808,7 +5035,7 @@ var ChromaClient = class {
|
|
|
4808
5035
|
* @throws Error if the collection does not exist
|
|
4809
5036
|
*/
|
|
4810
5037
|
async getCollectionByCrn(crn) {
|
|
4811
|
-
const { data } = await
|
|
5038
|
+
const { data } = await CollectionService.getCollectionByCrn({
|
|
4812
5039
|
client: this.apiClient,
|
|
4813
5040
|
path: { crn }
|
|
4814
5041
|
});
|
|
@@ -4874,7 +5101,7 @@ var ChromaClient = class {
|
|
|
4874
5101
|
metadata,
|
|
4875
5102
|
schema
|
|
4876
5103
|
});
|
|
4877
|
-
const { data } = await
|
|
5104
|
+
const { data } = await CollectionService.createCollection({
|
|
4878
5105
|
client: this.apiClient,
|
|
4879
5106
|
path: await this._path(),
|
|
4880
5107
|
body: {
|
|
@@ -4914,7 +5141,7 @@ var ChromaClient = class {
|
|
|
4914
5141
|
* @param options.name - The name of the collection to delete
|
|
4915
5142
|
*/
|
|
4916
5143
|
async deleteCollection({ name }) {
|
|
4917
|
-
await
|
|
5144
|
+
await CollectionService.deleteCollection({
|
|
4918
5145
|
client: this.apiClient,
|
|
4919
5146
|
path: { ...await this._path(), collection_id: name }
|
|
4920
5147
|
});
|
|
@@ -4925,7 +5152,7 @@ var ChromaClient = class {
|
|
|
4925
5152
|
* @warning This operation is irreversible and will delete all data
|
|
4926
5153
|
*/
|
|
4927
5154
|
async reset() {
|
|
4928
|
-
await
|
|
5155
|
+
await SystemService.reset({
|
|
4929
5156
|
client: this.apiClient
|
|
4930
5157
|
});
|
|
4931
5158
|
}
|
|
@@ -4934,7 +5161,7 @@ var ChromaClient = class {
|
|
|
4934
5161
|
* @returns Promise resolving to the server version string
|
|
4935
5162
|
*/
|
|
4936
5163
|
async version() {
|
|
4937
|
-
const { data } = await
|
|
5164
|
+
const { data } = await SystemService.version({
|
|
4938
5165
|
client: this.apiClient
|
|
4939
5166
|
});
|
|
4940
5167
|
return data;
|
|
@@ -4945,7 +5172,7 @@ var ChromaClient = class {
|
|
|
4945
5172
|
*/
|
|
4946
5173
|
async getPreflightChecks() {
|
|
4947
5174
|
if (!this.preflightChecks) {
|
|
4948
|
-
const { data } = await
|
|
5175
|
+
const { data } = await SystemService.preFlightChecks({
|
|
4949
5176
|
client: this.apiClient
|
|
4950
5177
|
});
|
|
4951
5178
|
this.preflightChecks = data;
|