@xata.io/client 0.0.0-alpha.veb9d0dd → 0.0.0-alpha.vebc4a36

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.
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  src/index.ts → dist/index.cjs...
7
- created dist/index.cjs in 1.5s
7
+ created dist/index.cjs in 1.2s
8
8
  
9
9
  src/index.ts → dist/index.mjs...
10
- created dist/index.mjs in 1.3s
10
+ created dist/index.mjs in 1s
11
11
  
12
12
  src/index.ts → dist/index.d.ts...
13
- created dist/index.d.ts in 7.9s
13
+ created dist/index.d.ts in 5.6s
package/CHANGELOG.md CHANGED
@@ -1,11 +1,13 @@
1
1
  # @xata.io/client
2
2
 
3
- ## 0.0.0-alpha.veb9d0dd
3
+ ## 0.0.0-alpha.vebc4a36
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Force canary build
8
8
 
9
+ - [#898](https://github.com/xataio/client-ts/pull/898) [`1a124532`](https://github.com/xataio/client-ts/commit/1a1245320f3671f6dfc961a7d827ee251f94906a) Thanks [@SferaDev](https://github.com/SferaDev)! - Add methods for vector type
10
+
9
11
  ## 0.22.1
10
12
 
11
13
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -613,6 +613,7 @@ const searchTable = (variables, signal) => dataPlaneFetch({
613
613
  ...variables,
614
614
  signal
615
615
  });
616
+ const vectorSearchTable = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/tables/{tableName}/vectorSearch", method: "post", ...variables, signal });
616
617
  const summarizeTable = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/tables/{tableName}/summarize", method: "post", ...variables, signal });
617
618
  const aggregateTable = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/tables/{tableName}/aggregate", method: "post", ...variables, signal });
618
619
  const operationsByTag$2 = {
@@ -672,7 +673,7 @@ const operationsByTag$2 = {
672
673
  deleteRecord,
673
674
  bulkInsertTableRecords
674
675
  },
675
- searchAndFilter: { queryTable, searchBranch, searchTable, summarizeTable, aggregateTable }
676
+ searchAndFilter: { queryTable, searchBranch, searchTable, vectorSearchTable, summarizeTable, aggregateTable }
676
677
  };
677
678
 
678
679
  const controlPlaneFetch = async (options) => fetch$1({ ...options, endpoint: "controlPlane" });
@@ -2616,6 +2617,29 @@ class RestRepository extends Query {
2616
2617
  return records.map((item) => initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), item, ["*"]));
2617
2618
  });
2618
2619
  }
2620
+ async vectorSearch(column, query, options) {
2621
+ return __privateGet$4(this, _trace).call(this, "searchVector", async () => {
2622
+ const fetchProps = await __privateGet$4(this, _getFetchProps).call(this);
2623
+ const { records } = await vectorSearchTable({
2624
+ pathParams: {
2625
+ workspace: "{workspaceId}",
2626
+ dbBranchName: "{dbBranch}",
2627
+ region: "{region}",
2628
+ tableName: __privateGet$4(this, _table)
2629
+ },
2630
+ body: {
2631
+ column,
2632
+ queryVector: query,
2633
+ spaceFunction: options?.spaceFunction,
2634
+ size: options?.size,
2635
+ filter: options?.filter
2636
+ },
2637
+ ...fetchProps
2638
+ });
2639
+ const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
2640
+ return records.map((item) => initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), item, ["*"]));
2641
+ });
2642
+ }
2619
2643
  async aggregate(aggs, filter) {
2620
2644
  return __privateGet$4(this, _trace).call(this, "aggregate", async () => {
2621
2645
  const fetchProps = await __privateGet$4(this, _getFetchProps).call(this);
@@ -3708,4 +3732,5 @@ exports.updateWorkspace = updateWorkspace;
3708
3732
  exports.updateWorkspaceMemberInvite = updateWorkspaceMemberInvite;
3709
3733
  exports.updateWorkspaceMemberRole = updateWorkspaceMemberRole;
3710
3734
  exports.upsertRecordWithID = upsertRecordWithID;
3735
+ exports.vectorSearchTable = vectorSearchTable;
3711
3736
  //# sourceMappingURL=index.cjs.map