@xata.io/client 0.23.2 → 0.23.4
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-add-version.log +1 -1
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +14 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +102 -12
- package/dist/index.mjs +14 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
|
2
|
-
> @xata.io/client@0.23.
|
2
|
+
> @xata.io/client@0.23.4 build /home/runner/work/client-ts/client-ts/packages/client
|
3
3
|
> rimraf dist && rollup -c
|
4
4
|
|
5
5
|
[36m
|
6
6
|
[1msrc/index.ts[22m → [1mdist/index.cjs[22m...[39m
|
7
|
-
[32mcreated [1mdist/index.cjs[22m in [
|
7
|
+
[32mcreated [1mdist/index.cjs[22m in [1m1.1s[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 [1m829ms[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 [1m5.
|
13
|
+
[32mcreated [1mdist/index.d.ts[22m in [1m5.4s[22m[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @xata.io/client
|
2
2
|
|
3
|
+
## 0.23.4
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#951](https://github.com/xataio/client-ts/pull/951) [`470cc71f`](https://github.com/xataio/client-ts/commit/470cc71f7c5c8b9fd50f789e157d2b2eecd0b3e8) Thanks [@SferaDev](https://github.com/SferaDev)! - Add random sorting
|
8
|
+
|
9
|
+
## 0.23.3
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- [#947](https://github.com/xataio/client-ts/pull/947) [`344b0d68`](https://github.com/xataio/client-ts/commit/344b0d687962d569872d1e90d59818d28df7579c) Thanks [@SferaDev](https://github.com/SferaDev)! - Add numeric operators
|
14
|
+
|
3
15
|
## 0.23.2
|
4
16
|
|
5
17
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
@@ -492,7 +492,7 @@ function defaultOnOpen(response) {
|
|
492
492
|
}
|
493
493
|
}
|
494
494
|
|
495
|
-
const VERSION = "0.23.
|
495
|
+
const VERSION = "0.23.4";
|
496
496
|
|
497
497
|
class ErrorWithCause extends Error {
|
498
498
|
constructor(message, options) {
|
@@ -863,6 +863,12 @@ const searchTable = (variables, signal) => dataPlaneFetch({
|
|
863
863
|
...variables,
|
864
864
|
signal
|
865
865
|
});
|
866
|
+
const sqlQuery = (variables, signal) => dataPlaneFetch({
|
867
|
+
url: "/db/{dbBranchName}/sql",
|
868
|
+
method: "post",
|
869
|
+
...variables,
|
870
|
+
signal
|
871
|
+
});
|
866
872
|
const vectorSearchTable = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/tables/{tableName}/vectorSearch", method: "post", ...variables, signal });
|
867
873
|
const askTable = (variables, signal) => dataPlaneFetch({
|
868
874
|
url: "/db/{dbBranchName}/tables/{tableName}/ask",
|
@@ -935,6 +941,7 @@ const operationsByTag$2 = {
|
|
935
941
|
queryTable,
|
936
942
|
searchBranch,
|
937
943
|
searchTable,
|
944
|
+
sqlQuery,
|
938
945
|
vectorSearchTable,
|
939
946
|
askTable,
|
940
947
|
summarizeTable,
|
@@ -2604,7 +2611,11 @@ function isSortFilterString(value) {
|
|
2604
2611
|
return isString(value);
|
2605
2612
|
}
|
2606
2613
|
function isSortFilterBase(filter) {
|
2607
|
-
return isObject(filter) && Object.
|
2614
|
+
return isObject(filter) && Object.entries(filter).every(([key, value]) => {
|
2615
|
+
if (key === "*")
|
2616
|
+
return value === "random";
|
2617
|
+
return value === "asc" || value === "desc";
|
2618
|
+
});
|
2608
2619
|
}
|
2609
2620
|
function isSortFilterObject(filter) {
|
2610
2621
|
return isObject(filter) && !isSortFilterBase(filter) && filter.column !== void 0;
|
@@ -3702,8 +3713,6 @@ const buildClient = (plugins) => {
|
|
3702
3713
|
console.warn(
|
3703
3714
|
`No branch was passed to the client constructor. Using default branch ${branch}. You can set the branch with the environment variable XATA_BRANCH or by passing the branch option to the client constructor.`
|
3704
3715
|
);
|
3705
|
-
} else {
|
3706
|
-
console.log(`Using branch ${branch}`);
|
3707
3716
|
}
|
3708
3717
|
return {
|
3709
3718
|
fetch,
|
@@ -3967,6 +3976,7 @@ exports.searchBranch = searchBranch;
|
|
3967
3976
|
exports.searchTable = searchTable;
|
3968
3977
|
exports.serialize = serialize;
|
3969
3978
|
exports.setTableSchema = setTableSchema;
|
3979
|
+
exports.sqlQuery = sqlQuery;
|
3970
3980
|
exports.startsWith = startsWith;
|
3971
3981
|
exports.summarizeTable = summarizeTable;
|
3972
3982
|
exports.updateBranchMetadata = updateBranchMetadata;
|