@antfly/sdk 0.0.1 → 0.0.3

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/index.d.cts CHANGED
@@ -366,8 +366,12 @@ interface components {
366
366
  term: string;
367
367
  count: number;
368
368
  };
369
- DateRangeResult: unknown;
370
- NumericRangeResult: unknown;
369
+ DateRangeResult: components["schemas"]["DateRange"] & {
370
+ count: number;
371
+ };
372
+ NumericRangeResult: components["schemas"]["NumericRange"] & {
373
+ count: number;
374
+ };
371
375
  FacetOption: {
372
376
  field?: string;
373
377
  size?: number;
@@ -394,7 +398,14 @@ interface components {
394
398
  [key: string]: unknown;
395
399
  };
396
400
  };
397
- IndexStatus: unknown;
401
+ IndexStatus: components["schemas"]["IndexConfig"] & {
402
+ shard_status: {
403
+ [key: string]: Record<string, never>;
404
+ };
405
+ status: {
406
+ [key: string]: unknown;
407
+ };
408
+ };
398
409
  StorageStatus: {
399
410
  /**
400
411
  * Format: uint64
@@ -404,7 +415,9 @@ interface components {
404
415
  /** @description Whether the table has received data. */
405
416
  empty?: boolean;
406
417
  };
407
- TableStatus: unknown;
418
+ TableStatus: components["schemas"]["Table"] & {
419
+ storage_status: components["schemas"]["StorageStatus"];
420
+ };
408
421
  EmbedderConfig: {
409
422
  provider: string;
410
423
  model: string;
@@ -521,12 +534,12 @@ interface components {
521
534
  };
522
535
  QueryHit: {
523
536
  /** @description ID of the record. */
524
- _id?: string;
537
+ _id: string;
525
538
  /**
526
539
  * Format: float
527
540
  * @description Relevance score of the hit.
528
541
  */
529
- _score?: number;
542
+ _score: number;
530
543
  /** @description Scores partitioned by index when using RRF search. */
531
544
  _index_scores?: {
532
545
  [key: string]: unknown;
@@ -657,24 +670,6 @@ interface components {
657
670
  "application/json": components["schemas"]["Error"];
658
671
  };
659
672
  };
660
- /** @description Unauthorized */
661
- Unauthorized: {
662
- headers: {
663
- [name: string]: unknown;
664
- };
665
- content: {
666
- "application/json": components["schemas"]["Error"];
667
- };
668
- };
669
- /** @description Forbidden */
670
- Forbidden: {
671
- headers: {
672
- [name: string]: unknown;
673
- };
674
- content: {
675
- "application/json": components["schemas"]["Error"];
676
- };
677
- };
678
673
  };
679
674
  parameters: {
680
675
  /** @description The username. */
@@ -750,6 +745,7 @@ interface operations {
750
745
  "application/json": components["schemas"]["Table"][];
751
746
  };
752
747
  };
748
+ 400: components["responses"]["BadRequest"];
753
749
  500: components["responses"]["InternalServerError"];
754
750
  };
755
751
  };
@@ -1007,6 +1003,7 @@ interface operations {
1007
1003
  "application/json": components["schemas"]["IndexStatus"][];
1008
1004
  };
1009
1005
  };
1006
+ 404: components["responses"]["NotFound"];
1010
1007
  500: components["responses"]["InternalServerError"];
1011
1008
  };
1012
1009
  };
@@ -1087,6 +1084,7 @@ interface operations {
1087
1084
  };
1088
1085
  content?: never;
1089
1086
  };
1087
+ 400: components["responses"]["BadRequest"];
1090
1088
  500: components["responses"]["InternalServerError"];
1091
1089
  };
1092
1090
  };
@@ -1554,7 +1552,22 @@ declare class AntflyClient {
1554
1552
  /**
1555
1553
  * Get table details and status
1556
1554
  */
1557
- get: (tableName: string) => Promise<unknown>;
1555
+ get: (tableName: string) => Promise<{
1556
+ name: string;
1557
+ indexes: {
1558
+ [key: string]: components["schemas"]["IndexConfig"];
1559
+ };
1560
+ shards: {
1561
+ [key: string]:
1562
+ /**
1563
+ * Get the underlying OpenAPI client for advanced use cases
1564
+ */
1565
+ components["schemas"]["ShardConfig"];
1566
+ };
1567
+ schema?: components["schemas"]["TableSchema"];
1568
+ } & {
1569
+ storage_status: components["schemas"]["StorageStatus"];
1570
+ }>;
1558
1571
  /**
1559
1572
  * Create a new table
1560
1573
  */
@@ -1620,11 +1633,37 @@ declare class AntflyClient {
1620
1633
  /**
1621
1634
  * List all indexes for a table
1622
1635
  */
1623
- list: (tableName: string) => Promise<unknown[]>;
1636
+ list: (tableName: string) => Promise<({
1637
+ name: string;
1638
+ type: string;
1639
+ config: {
1640
+ [key: string]: unknown;
1641
+ };
1642
+ } & {
1643
+ shard_status: {
1644
+ [key: string]: Record<string, never>;
1645
+ };
1646
+ status: {
1647
+ [key: string]: unknown;
1648
+ };
1649
+ })[]>;
1624
1650
  /**
1625
1651
  * Get index details
1626
1652
  */
1627
- get: (tableName: string, indexName: string) => Promise<unknown>;
1653
+ get: (tableName: string, indexName: string) => Promise<{
1654
+ name: string;
1655
+ type: string;
1656
+ config: {
1657
+ [key: string]: unknown;
1658
+ };
1659
+ } & {
1660
+ shard_status: {
1661
+ [key: string]: Record<string, never>;
1662
+ };
1663
+ status: {
1664
+ [key: string]: unknown;
1665
+ };
1666
+ }>;
1628
1667
  /**
1629
1668
  * Create a new index
1630
1669
  */
package/dist/index.d.ts CHANGED
@@ -366,8 +366,12 @@ interface components {
366
366
  term: string;
367
367
  count: number;
368
368
  };
369
- DateRangeResult: unknown;
370
- NumericRangeResult: unknown;
369
+ DateRangeResult: components["schemas"]["DateRange"] & {
370
+ count: number;
371
+ };
372
+ NumericRangeResult: components["schemas"]["NumericRange"] & {
373
+ count: number;
374
+ };
371
375
  FacetOption: {
372
376
  field?: string;
373
377
  size?: number;
@@ -394,7 +398,14 @@ interface components {
394
398
  [key: string]: unknown;
395
399
  };
396
400
  };
397
- IndexStatus: unknown;
401
+ IndexStatus: components["schemas"]["IndexConfig"] & {
402
+ shard_status: {
403
+ [key: string]: Record<string, never>;
404
+ };
405
+ status: {
406
+ [key: string]: unknown;
407
+ };
408
+ };
398
409
  StorageStatus: {
399
410
  /**
400
411
  * Format: uint64
@@ -404,7 +415,9 @@ interface components {
404
415
  /** @description Whether the table has received data. */
405
416
  empty?: boolean;
406
417
  };
407
- TableStatus: unknown;
418
+ TableStatus: components["schemas"]["Table"] & {
419
+ storage_status: components["schemas"]["StorageStatus"];
420
+ };
408
421
  EmbedderConfig: {
409
422
  provider: string;
410
423
  model: string;
@@ -521,12 +534,12 @@ interface components {
521
534
  };
522
535
  QueryHit: {
523
536
  /** @description ID of the record. */
524
- _id?: string;
537
+ _id: string;
525
538
  /**
526
539
  * Format: float
527
540
  * @description Relevance score of the hit.
528
541
  */
529
- _score?: number;
542
+ _score: number;
530
543
  /** @description Scores partitioned by index when using RRF search. */
531
544
  _index_scores?: {
532
545
  [key: string]: unknown;
@@ -657,24 +670,6 @@ interface components {
657
670
  "application/json": components["schemas"]["Error"];
658
671
  };
659
672
  };
660
- /** @description Unauthorized */
661
- Unauthorized: {
662
- headers: {
663
- [name: string]: unknown;
664
- };
665
- content: {
666
- "application/json": components["schemas"]["Error"];
667
- };
668
- };
669
- /** @description Forbidden */
670
- Forbidden: {
671
- headers: {
672
- [name: string]: unknown;
673
- };
674
- content: {
675
- "application/json": components["schemas"]["Error"];
676
- };
677
- };
678
673
  };
679
674
  parameters: {
680
675
  /** @description The username. */
@@ -750,6 +745,7 @@ interface operations {
750
745
  "application/json": components["schemas"]["Table"][];
751
746
  };
752
747
  };
748
+ 400: components["responses"]["BadRequest"];
753
749
  500: components["responses"]["InternalServerError"];
754
750
  };
755
751
  };
@@ -1007,6 +1003,7 @@ interface operations {
1007
1003
  "application/json": components["schemas"]["IndexStatus"][];
1008
1004
  };
1009
1005
  };
1006
+ 404: components["responses"]["NotFound"];
1010
1007
  500: components["responses"]["InternalServerError"];
1011
1008
  };
1012
1009
  };
@@ -1087,6 +1084,7 @@ interface operations {
1087
1084
  };
1088
1085
  content?: never;
1089
1086
  };
1087
+ 400: components["responses"]["BadRequest"];
1090
1088
  500: components["responses"]["InternalServerError"];
1091
1089
  };
1092
1090
  };
@@ -1554,7 +1552,22 @@ declare class AntflyClient {
1554
1552
  /**
1555
1553
  * Get table details and status
1556
1554
  */
1557
- get: (tableName: string) => Promise<unknown>;
1555
+ get: (tableName: string) => Promise<{
1556
+ name: string;
1557
+ indexes: {
1558
+ [key: string]: components["schemas"]["IndexConfig"];
1559
+ };
1560
+ shards: {
1561
+ [key: string]:
1562
+ /**
1563
+ * Get the underlying OpenAPI client for advanced use cases
1564
+ */
1565
+ components["schemas"]["ShardConfig"];
1566
+ };
1567
+ schema?: components["schemas"]["TableSchema"];
1568
+ } & {
1569
+ storage_status: components["schemas"]["StorageStatus"];
1570
+ }>;
1558
1571
  /**
1559
1572
  * Create a new table
1560
1573
  */
@@ -1620,11 +1633,37 @@ declare class AntflyClient {
1620
1633
  /**
1621
1634
  * List all indexes for a table
1622
1635
  */
1623
- list: (tableName: string) => Promise<unknown[]>;
1636
+ list: (tableName: string) => Promise<({
1637
+ name: string;
1638
+ type: string;
1639
+ config: {
1640
+ [key: string]: unknown;
1641
+ };
1642
+ } & {
1643
+ shard_status: {
1644
+ [key: string]: Record<string, never>;
1645
+ };
1646
+ status: {
1647
+ [key: string]: unknown;
1648
+ };
1649
+ })[]>;
1624
1650
  /**
1625
1651
  * Get index details
1626
1652
  */
1627
- get: (tableName: string, indexName: string) => Promise<unknown>;
1653
+ get: (tableName: string, indexName: string) => Promise<{
1654
+ name: string;
1655
+ type: string;
1656
+ config: {
1657
+ [key: string]: unknown;
1658
+ };
1659
+ } & {
1660
+ shard_status: {
1661
+ [key: string]: Record<string, never>;
1662
+ };
1663
+ status: {
1664
+ [key: string]: unknown;
1665
+ };
1666
+ }>;
1628
1667
  /**
1629
1668
  * Create a new index
1630
1669
  */
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@antfly/sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "TypeScript SDK for Antfly API",
5
5
  "type": "module",
6
- "main": "./dist/index.js",
6
+ "main": "./dist/index.ts",
7
7
  "module": "./dist/index.mjs",
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
11
  "types": "./dist/index.d.ts",
12
12
  "import": "./dist/index.mjs",
13
- "require": "./dist/index.js"
13
+ "require": "./dist/index.ts"
14
14
  }
15
15
  },
16
16
  "files": [
@@ -45,12 +45,12 @@
45
45
  "license": "Apache-2.0",
46
46
  "repository": {
47
47
  "type": "git",
48
- "url": "git+https://github.com/antfly/antfly-ts.git"
48
+ "url": "git+https://github.com/antflydb/antfly-ts.git"
49
49
  },
50
50
  "bugs": {
51
- "url": "https://github.com/antfly/antfly-ts/issues"
51
+ "url": "https://github.com/antflydb/antfly-ts/issues"
52
52
  },
53
- "homepage": "https://github.com/antfly/antfly-ts#readme",
53
+ "homepage": "https://github.com/antflydb/antfly-ts#readme",
54
54
  "devDependencies": {
55
55
  "@eslint/js": "^9.35.0",
56
56
  "@types/jest": "^30.0.0",