@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.
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +3 -1
- package/dist/index.cjs +26 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +106 -3
- package/dist/index.mjs +26 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
[36m
|
|
6
6
|
[1msrc/index.ts[22m → [1mdist/index.cjs[22m...[39m
|
|
7
|
-
[32mcreated [1mdist/index.cjs[22m in [1m1.
|
|
7
|
+
[32mcreated [1mdist/index.cjs[22m in [1m1.2s[22m[39m
|
|
8
8
|
[36m
|
|
9
9
|
[1msrc/index.ts[22m → [1mdist/index.mjs[22m...[39m
|
|
10
|
-
[32mcreated [1mdist/index.mjs[22m in [
|
|
10
|
+
[32mcreated [1mdist/index.mjs[22m in [1m1s[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1msrc/index.ts[22m → [1mdist/index.d.ts[22m...[39m
|
|
13
|
-
[32mcreated [1mdist/index.d.ts[22m in [
|
|
13
|
+
[32mcreated [1mdist/index.d.ts[22m in [1m5.6s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# @xata.io/client
|
|
2
2
|
|
|
3
|
-
## 0.0.0-alpha.
|
|
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
|