@xata.io/client 0.0.0-alpha.vff52a72 → 0.0.0-alpha.vff9649a
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/.eslintrc.cjs +3 -2
- package/.turbo/turbo-add-version.log +4 -0
- package/.turbo/turbo-build.log +13 -0
- package/CHANGELOG.md +110 -0
- package/README.md +2 -2
- package/Usage.md +5 -5
- package/dist/index.cjs +439 -183
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1136 -812
- package/dist/index.mjs +438 -160
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -8
- package/rollup.config.mjs +44 -0
- package/rollup.config.js +0 -29
package/.eslintrc.cjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module.exports = {
|
2
|
-
ignorePatterns: [
|
2
|
+
ignorePatterns: ['dist'],
|
3
3
|
parserOptions: {
|
4
4
|
ecmaVersion: 2020,
|
5
5
|
sourceType: 'module',
|
@@ -7,6 +7,7 @@ module.exports = {
|
|
7
7
|
},
|
8
8
|
rules: {
|
9
9
|
'@typescript-eslint/no-floating-promises': 'error',
|
10
|
-
|
10
|
+
'@typescript-eslint/strict-boolean-expressions': ['error', { allowNullableString: true, allowNullableObject: true }],
|
11
|
+
"@typescript-eslint/ban-types": "off",
|
11
12
|
}
|
12
13
|
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
> @xata.io/client@0.21.6 build /home/runner/work/client-ts/client-ts/packages/client
|
3
|
+
> rimraf dist && rollup -c
|
4
|
+
|
5
|
+
[36m
|
6
|
+
[1msrc/index.ts[22m → [1mdist/index.cjs[22m...[39m
|
7
|
+
[32mcreated [1mdist/index.cjs[22m in [1m1.1s[22m[39m
|
8
|
+
[36m
|
9
|
+
[1msrc/index.ts[22m → [1mdist/index.mjs[22m...[39m
|
10
|
+
[32mcreated [1mdist/index.mjs[22m in [1m848ms[22m[39m
|
11
|
+
[36m
|
12
|
+
[1msrc/index.ts[22m → [1mdist/index.d.ts[22m...[39m
|
13
|
+
[32mcreated [1mdist/index.d.ts[22m in [1m6.5s[22m[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,115 @@
|
|
1
1
|
# @xata.io/client
|
2
2
|
|
3
|
+
## 0.0.0-alpha.vff9649a
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Force canary build
|
8
|
+
|
9
|
+
## 0.21.6
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- [#828](https://github.com/xataio/client-ts/pull/828) [`039e35bf`](https://github.com/xataio/client-ts/commit/039e35bf9f01149f39bca39e1867908ca3468bb5) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix enableBrowser with Deno
|
14
|
+
|
15
|
+
- [#828](https://github.com/xataio/client-ts/pull/828) [`039e35bf`](https://github.com/xataio/client-ts/commit/039e35bf9f01149f39bca39e1867908ca3468bb5) Thanks [@SferaDev](https://github.com/SferaDev)! - Add branded types to serializer
|
16
|
+
|
17
|
+
## 0.21.5
|
18
|
+
|
19
|
+
### Patch Changes
|
20
|
+
|
21
|
+
- [#825](https://github.com/xataio/client-ts/pull/825) [`41c4d29f`](https://github.com/xataio/client-ts/commit/41c4d29f9f9fc7ce87b755e447a2030fe8c10d70) Thanks [@SferaDev](https://github.com/SferaDev)! - Export fetcher error
|
22
|
+
|
23
|
+
## 0.21.4
|
24
|
+
|
25
|
+
### Patch Changes
|
26
|
+
|
27
|
+
- [#816](https://github.com/xataio/client-ts/pull/816) [`a0149435`](https://github.com/xataio/client-ts/commit/a01494358ae3a8dd9d7eba3a276fe6f8b7827a33) Thanks [@SferaDev](https://github.com/SferaDev)! - Improve types for datetime fields accepting strings
|
28
|
+
|
29
|
+
## 0.21.3
|
30
|
+
|
31
|
+
### Patch Changes
|
32
|
+
|
33
|
+
- [#792](https://github.com/xataio/client-ts/pull/792) [`6c96da45`](https://github.com/xataio/client-ts/commit/6c96da4533500ec236547f47310e99461d5457e8) Thanks [@SferaDev](https://github.com/SferaDev)! - Update workers return type helper
|
34
|
+
|
35
|
+
## 0.21.2
|
36
|
+
|
37
|
+
### Patch Changes
|
38
|
+
|
39
|
+
- [#787](https://github.com/xataio/client-ts/pull/787) [`93f5beed`](https://github.com/xataio/client-ts/commit/93f5beed77785b03409c614f5e2c3eca4c69c574) Thanks [@SferaDev](https://github.com/SferaDev)! - Expose consistency options
|
40
|
+
|
41
|
+
- [#784](https://github.com/xataio/client-ts/pull/784) [`cbe0609e`](https://github.com/xataio/client-ts/commit/cbe0609ec9d6650030efbda712a1eb243287525d) Thanks [@SferaDev](https://github.com/SferaDev)! - Update resolveBranch behaviour
|
42
|
+
|
43
|
+
## 0.21.1
|
44
|
+
|
45
|
+
### Patch Changes
|
46
|
+
|
47
|
+
- [#781](https://github.com/xataio/client-ts/pull/781) [`fdfa47de`](https://github.com/xataio/client-ts/commit/fdfa47de93ec772170ff00a4341fc14434347df5) Thanks [@SferaDev](https://github.com/SferaDev)! - Send header to disable encoding
|
48
|
+
|
49
|
+
## 0.21.0
|
50
|
+
|
51
|
+
### Minor Changes
|
52
|
+
|
53
|
+
- [#757](https://github.com/xataio/client-ts/pull/757) [`7da604d2`](https://github.com/xataio/client-ts/commit/7da604d27990e20ecadba6122434fca563e6a8c9) Thanks [@SferaDev](https://github.com/SferaDev)! - Add promise pool for retries
|
54
|
+
|
55
|
+
### Patch Changes
|
56
|
+
|
57
|
+
- [#764](https://github.com/xataio/client-ts/pull/764) [`b131040a`](https://github.com/xataio/client-ts/commit/b131040a2d142c4e71a2e586fbf05cd9295af9a1) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix bun
|
58
|
+
|
59
|
+
- [#759](https://github.com/xataio/client-ts/pull/759) [`7ea810dc`](https://github.com/xataio/client-ts/commit/7ea810dc083ec284447e3bd27bd0465f887481e6) Thanks [@SferaDev](https://github.com/SferaDev)! - Expose new transaction API
|
60
|
+
|
61
|
+
- [#767](https://github.com/xataio/client-ts/pull/767) [`d124cbfb`](https://github.com/xataio/client-ts/commit/d124cbfb93d3d591e79bbe9e94c4b6304d825e71) Thanks [@SferaDev](https://github.com/SferaDev)! - Remove formatVersion from schema
|
62
|
+
|
63
|
+
- [#767](https://github.com/xataio/client-ts/pull/767) [`d124cbfb`](https://github.com/xataio/client-ts/commit/d124cbfb93d3d591e79bbe9e94c4b6304d825e71) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix null value returning on date columns
|
64
|
+
|
65
|
+
- [#775](https://github.com/xataio/client-ts/pull/775) [`fb5ccdf9`](https://github.com/xataio/client-ts/commit/fb5ccdf9fa95c37d54fbc5d9c0bb45872c831609) Thanks [@SferaDev](https://github.com/SferaDev)! - Add missing target field to search
|
66
|
+
|
67
|
+
- [#760](https://github.com/xataio/client-ts/pull/760) [`4ae00036`](https://github.com/xataio/client-ts/commit/4ae00036b53c6c89e02a1fcfdd992f1a3c22892c) Thanks [@SferaDev](https://github.com/SferaDev)! - Add support for filters in boosters
|
68
|
+
|
69
|
+
- [#766](https://github.com/xataio/client-ts/pull/766) [`bdae6668`](https://github.com/xataio/client-ts/commit/bdae6668fb571d29f1b1068a54f6866a80d9b174) Thanks [@SferaDev](https://github.com/SferaDev)! - Remove beta for Workers
|
70
|
+
|
71
|
+
- [#771](https://github.com/xataio/client-ts/pull/771) [`9486bdcc`](https://github.com/xataio/client-ts/commit/9486bdccc0af567bc5f2e8f91592b0143c539c45) Thanks [@SferaDev](https://github.com/SferaDev)! - Add modifier for numeric booster
|
72
|
+
|
73
|
+
- [#771](https://github.com/xataio/client-ts/pull/771) [`9486bdcc`](https://github.com/xataio/client-ts/commit/9486bdccc0af567bc5f2e8f91592b0143c539c45) Thanks [@SferaDev](https://github.com/SferaDev)! - Add pagination to search
|
74
|
+
|
75
|
+
## 0.20.2
|
76
|
+
|
77
|
+
### Patch Changes
|
78
|
+
|
79
|
+
- [#756](https://github.com/xataio/client-ts/pull/756) [`27b73745`](https://github.com/xataio/client-ts/commit/27b737451227cf12774115ccb70649f6bbf76180) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix update method with id in payload
|
80
|
+
|
81
|
+
- [#726](https://github.com/xataio/client-ts/pull/726) [`47a1f878`](https://github.com/xataio/client-ts/commit/47a1f87850a7178dad656a16d2584eee6ce68f29) Thanks [@SferaDev](https://github.com/SferaDev)! - Use transactions API internally for bulk operations
|
82
|
+
|
83
|
+
- [#726](https://github.com/xataio/client-ts/pull/726) [`adde9b10`](https://github.com/xataio/client-ts/commit/adde9b10708182295dee07c203c7bf737806e49e) Thanks [@SferaDev](https://github.com/SferaDev)! - Allow sending bulk operations of more than the limit
|
84
|
+
|
85
|
+
## 0.20.1
|
86
|
+
|
87
|
+
### Patch Changes
|
88
|
+
|
89
|
+
- [#744](https://github.com/xataio/client-ts/pull/744) [`98298ca`](https://github.com/xataio/client-ts/commit/98298ca1312a2256ee3e9d2700a9f3d3e316abe5) Thanks [@xata-bot](https://github.com/xata-bot)! - Add deno entry point
|
90
|
+
|
91
|
+
## 0.20.0
|
92
|
+
|
93
|
+
### Minor Changes
|
94
|
+
|
95
|
+
- [#737](https://github.com/xataio/client-ts/pull/737) [`6cbeaa0`](https://github.com/xataio/client-ts/commit/6cbeaa00050b5aa99ab7c98052a906487263e026) Thanks [@SferaDev](https://github.com/SferaDev)! - Rename first to start and last to end in pagination
|
96
|
+
|
97
|
+
### Patch Changes
|
98
|
+
|
99
|
+
- [#732](https://github.com/xataio/client-ts/pull/732) [`a5a9aa5`](https://github.com/xataio/client-ts/commit/a5a9aa59987faa1d3d701d7431b8a96031e01ac7) Thanks [@SferaDev](https://github.com/SferaDev)! - [Experimental] Allow passing fetch options in some queries
|
100
|
+
|
101
|
+
- [#735](https://github.com/xataio/client-ts/pull/735) [`c64b2eb`](https://github.com/xataio/client-ts/commit/c64b2eb9add70e75d419d418ab9608caac0dbfa1) Thanks [@SferaDev](https://github.com/SferaDev)! - Add support for default values
|
102
|
+
|
103
|
+
- [#730](https://github.com/xataio/client-ts/pull/730) [`485b217`](https://github.com/xataio/client-ts/commit/485b217079c4b2091d697e68622c48eddd130ceb) Thanks [@SferaDev](https://github.com/SferaDev)! - Add more summarize functions
|
104
|
+
|
105
|
+
- [#730](https://github.com/xataio/client-ts/pull/730) [`4d7499c`](https://github.com/xataio/client-ts/commit/4d7499ccbb135691350334fd8022f7a5da41c5f2) Thanks [@SferaDev](https://github.com/SferaDev)! - Add a check for browser execution
|
106
|
+
|
107
|
+
## 0.19.1
|
108
|
+
|
109
|
+
### Patch Changes
|
110
|
+
|
111
|
+
- [#723](https://github.com/xataio/client-ts/pull/723) [`ad5feeb`](https://github.com/xataio/client-ts/commit/ad5feebad5983f724ea4067b884bfae428447470) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix replace operation not hidden
|
112
|
+
|
3
113
|
## 0.19.0
|
4
114
|
|
5
115
|
### Minor Changes
|
package/README.md
CHANGED
@@ -187,8 +187,8 @@ page.hasNextPage(); // Boolean
|
|
187
187
|
|
188
188
|
const nextPage = await page.nextPage(); // Page object
|
189
189
|
const previousPage = await page.previousPage(); // Page object
|
190
|
-
const
|
191
|
-
const
|
190
|
+
const startPage = await page.startPage(); // Page object
|
191
|
+
const endPage = await page.endPage(); // Page object
|
192
192
|
```
|
193
193
|
|
194
194
|
If you want to use an iterator, both the Repository and the Query classes implement an `AsyncIterable`. Alternatively you can use `getIterator()` and customize the batch size of the iterator:
|
package/Usage.md
CHANGED
@@ -329,8 +329,8 @@ It contains:
|
|
329
329
|
- `hasNextPage`: Function that returns a boolean indicating if there is a next page.
|
330
330
|
- `nextPage`: Async function that can be used to get the next page.
|
331
331
|
- `previousPage`: Async function that can be used to get the previous page.
|
332
|
-
- `
|
333
|
-
- `
|
332
|
+
- `startPage`: Async function that can be used to get the start page.
|
333
|
+
- `endPage`: Async function that can be used to get the end page.
|
334
334
|
- `meta`: Information about the current page and its cursor.
|
335
335
|
|
336
336
|
```ts
|
@@ -344,14 +344,14 @@ page2.records; // Array of `XataRecord` objects.
|
|
344
344
|
const page1 = await page2.previousPage();
|
345
345
|
page1.records; // Array of `XataRecord` objects.
|
346
346
|
|
347
|
-
const
|
348
|
-
|
347
|
+
const startPage = await page1.startPage();
|
348
|
+
startPage.records; // Array of `XataRecord` objects.
|
349
349
|
```
|
350
350
|
|
351
351
|
The `Repository` class implements the `Query` interface, so you can use it to paginate the records in the table too.
|
352
352
|
|
353
353
|
```ts
|
354
|
-
const page = await xata.db.users.
|
354
|
+
const page = await xata.db.users.startPage();
|
355
355
|
page.records; // Array of `XataRecord` objects.
|
356
356
|
```
|
357
357
|
|