@xata.io/client 0.0.0-alpha.vf8f3b02 → 0.0.0-alpha.vf90263d

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.
@@ -0,0 +1,4 @@
1
+
2
+ > @xata.io/client@0.27.0 add-version /home/runner/work/client-ts/client-ts/packages/client
3
+ > node ../../scripts/add-version-file.mjs
4
+
@@ -0,0 +1,13 @@
1
+
2
+ > @xata.io/client@0.27.0 build /home/runner/work/client-ts/client-ts/packages/client
3
+ > rimraf dist && rollup -c
4
+
5
+ 
6
+ src/index.ts → dist/index.cjs...
7
+ created dist/index.cjs in 695ms
8
+ 
9
+ src/index.ts → dist/index.mjs...
10
+ created dist/index.mjs in 478ms
11
+ 
12
+ src/index.ts → dist/index.d.ts...
13
+ created dist/index.d.ts in 4.9s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,333 @@
1
1
  # @xata.io/client
2
2
 
3
+ ## 0.0.0-alpha.vf90263d
4
+
5
+ ### Patch Changes
6
+
7
+ - Force canary build
8
+
9
+ ## 0.27.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#1232](https://github.com/xataio/client-ts/pull/1232) [`d282d18f`](https://github.com/xataio/client-ts/commit/d282d18f025094e0729ade6009b34fc0d34ebbba) Thanks [@eemmiillyy](https://github.com/eemmiillyy)! - Add support for totalCount on search responses
14
+
15
+ ### Patch Changes
16
+
17
+ - [#1235](https://github.com/xataio/client-ts/pull/1235) [`19c5dd47`](https://github.com/xataio/client-ts/commit/19c5dd47e3a032fcb19d990527b8faaa9326d97d) Thanks [@eemmiillyy](https://github.com/eemmiillyy)! - Fix excessive depth on summarize
18
+
19
+ ## 0.26.9
20
+
21
+ ### Patch Changes
22
+
23
+ - [#1224](https://github.com/xataio/client-ts/pull/1224) [`302798e8`](https://github.com/xataio/client-ts/commit/302798e8d210c89f420a5c927e0f836a27dbaed9) Thanks [@SferaDev](https://github.com/SferaDev)! - Export transaction types
24
+
25
+ ## 0.26.8
26
+
27
+ ### Patch Changes
28
+
29
+ - [#1222](https://github.com/xataio/client-ts/pull/1222) [`fa2883b0`](https://github.com/xataio/client-ts/commit/fa2883b0639e48d68097401bf515c8cb95df5b4b) Thanks [@SferaDev](https://github.com/SferaDev)! - Increase recursion for circular references to 3
30
+
31
+ - [#1216](https://github.com/xataio/client-ts/pull/1216) [`c04faece`](https://github.com/xataio/client-ts/commit/c04faece8830699d978e03c89f29e383e479e824) Thanks [@SferaDev](https://github.com/SferaDev)! - Support binary upload of XataFile
32
+
33
+ - [#1217](https://github.com/xataio/client-ts/pull/1217) [`cb45cc9f`](https://github.com/xataio/client-ts/commit/cb45cc9f6829e1b555762e656cc1b0b2e977aaf9) Thanks [@eemmiillyy](https://github.com/eemmiillyy)! - JSON responses for JSON fields in summarize API
34
+
35
+ ## 0.26.7
36
+
37
+ ### Patch Changes
38
+
39
+ - [#1205](https://github.com/xataio/client-ts/pull/1205) [`0e1c50de`](https://github.com/xataio/client-ts/commit/0e1c50de5850db2dfbbdfff9d66eda3bf1322836) Thanks [@eemmiillyy](https://github.com/eemmiillyy)! - Add optional mediaType override to binary file API
40
+
41
+ - [#1203](https://github.com/xataio/client-ts/pull/1203) [`d093d363`](https://github.com/xataio/client-ts/commit/d093d363a51fc23c8513d51600bb3b31bbc45334) Thanks [@SferaDev](https://github.com/SferaDev)! - [Attachments] Fix column selection
42
+
43
+ ## 0.26.6
44
+
45
+ ### Patch Changes
46
+
47
+ - [#1180](https://github.com/xataio/client-ts/pull/1180) [`3330c9cf`](https://github.com/xataio/client-ts/commit/3330c9cf8d8db18b8e355a576e4afd589b6152bf) Thanks [@SferaDev](https://github.com/SferaDev)! - Support expanded links in `toSerialized`
48
+
49
+ - [#1191](https://github.com/xataio/client-ts/pull/1191) [`a738816d`](https://github.com/xataio/client-ts/commit/a738816d355f4415b0622bb5a23b4154f9855177) Thanks [@SferaDev](https://github.com/SferaDev)! - Add support for `percentiles` aggregation
50
+
51
+ ## 0.26.5
52
+
53
+ ### Patch Changes
54
+
55
+ - [#1166](https://github.com/xataio/client-ts/pull/1166) [`b9b9058f`](https://github.com/xataio/client-ts/commit/b9b9058f0bc81b660da45318c27191a62f041f21) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix error with Node 16
56
+
57
+ ## 0.26.4
58
+
59
+ ### Patch Changes
60
+
61
+ - [#1160](https://github.com/xataio/client-ts/pull/1160) [`7166797c`](https://github.com/xataio/client-ts/commit/7166797c28839198d20a9115d0414cebc2fed39b) Thanks [@SferaDev](https://github.com/SferaDev)! - [Files] Return file id on array
62
+
63
+ - [#1156](https://github.com/xataio/client-ts/pull/1156) [`b85df75f`](https://github.com/xataio/client-ts/commit/b85df75f2f466762a8b3d9824c9292c7e3db03fd) Thanks [@SferaDev](https://github.com/SferaDev)! - [Files] Add download transformation
64
+
65
+ ## 0.26.3
66
+
67
+ ### Patch Changes
68
+
69
+ - [#1144](https://github.com/xataio/client-ts/pull/1144) [`4910dce2`](https://github.com/xataio/client-ts/commit/4910dce29d3cc17d13aadf32e4eb476ffb571fad) Thanks [@SferaDev](https://github.com/SferaDev)! - Support for JSON and Revlinks
70
+
71
+ ## 0.26.2
72
+
73
+ ### Patch Changes
74
+
75
+ - [#1147](https://github.com/xataio/client-ts/pull/1147) [`22fccb51`](https://github.com/xataio/client-ts/commit/22fccb51709749c319897702c15749b74ce4b820) Thanks [@SferaDev](https://github.com/SferaDev)! - Expose metadataSignedUrl
76
+
77
+ ## 0.26.1
78
+
79
+ ### Patch Changes
80
+
81
+ - [#1139](https://github.com/xataio/client-ts/pull/1139) [`922e6e54`](https://github.com/xataio/client-ts/commit/922e6e54e8b31641770a36b6b4ff8f4fa65d304d) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix scenario with merging existing transformations
82
+
83
+ - [#1140](https://github.com/xataio/client-ts/pull/1140) [`13f6f3e4`](https://github.com/xataio/client-ts/commit/13f6f3e4b1a2f925d50a5380b62ef1057f5c3893) Thanks [@SferaDev](https://github.com/SferaDev)! - Add metadata url for transformations
84
+
85
+ - [#1136](https://github.com/xataio/client-ts/pull/1136) [`f02fc165`](https://github.com/xataio/client-ts/commit/f02fc165bf6558e4377eb9f8e1d0f4222f004c70) Thanks [@SferaDev](https://github.com/SferaDev)! - Fixes for Blob files in binary APIs
86
+
87
+ ## 0.26.0
88
+
89
+ ### Minor Changes
90
+
91
+ - [#893](https://github.com/xataio/client-ts/pull/893) [`6ec862f8`](https://github.com/xataio/client-ts/commit/6ec862f8f799eb692f62be79dd0b613b83a34780) Thanks [@SferaDev](https://github.com/SferaDev)! - Add SQL plugin
92
+
93
+ ### Patch Changes
94
+
95
+ - [#1134](https://github.com/xataio/client-ts/pull/1134) [`0c0149ad`](https://github.com/xataio/client-ts/commit/0c0149ad1ee3f7c0fe9d31030552b022c907edb0) Thanks [@SferaDev](https://github.com/SferaDev)! - Make transformImage accept object-shaped parameters
96
+
97
+ ## 0.25.3
98
+
99
+ ### Patch Changes
100
+
101
+ - [#1131](https://github.com/xataio/client-ts/pull/1131) [`3b9e1984`](https://github.com/xataio/client-ts/commit/3b9e1984329cd0e9f885f6af4155cc85ab61ba41) Thanks [@xata-bot](https://github.com/xata-bot)! - Add json type for columns
102
+
103
+ ## 0.25.2
104
+
105
+ ### Patch Changes
106
+
107
+ - [#1111](https://github.com/xataio/client-ts/pull/1111) [`9d1ace5f`](https://github.com/xataio/client-ts/commit/9d1ace5f12788755f3150449120b27cd030af3a9) Thanks [@SferaDev](https://github.com/SferaDev)! - Export file helpers
108
+
109
+ - [#1114](https://github.com/xataio/client-ts/pull/1114) [`f6665593`](https://github.com/xataio/client-ts/commit/f6665593c301dc9400834cbd68ae32b92bbdea5d) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix warning with default env branch
110
+
111
+ ## 0.25.1
112
+
113
+ ### Patch Changes
114
+
115
+ - [#1101](https://github.com/xataio/client-ts/pull/1101) [`321c33ff`](https://github.com/xataio/client-ts/commit/321c33ff684c416a6cc813be2a970fd8f826b885) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix bug with cancellable timeouts
116
+
117
+ ## 0.25.0
118
+
119
+ ### Minor Changes
120
+
121
+ - [#1041](https://github.com/xataio/client-ts/pull/1041) [`ac3b968f`](https://github.com/xataio/client-ts/commit/ac3b968f7ca476f2c82b1b2719d020fbd7164f38) Thanks [@SferaDev](https://github.com/SferaDev)! - Add support for files and attachments
122
+
123
+ ### Patch Changes
124
+
125
+ - [#1024](https://github.com/xataio/client-ts/pull/1024) [`aef9c834`](https://github.com/xataio/client-ts/commit/aef9c834a850494020e7585cb4ce67b446f9ccfc) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix type inconsistency with `xata` internal property
126
+
127
+ - [#1085](https://github.com/xataio/client-ts/pull/1085) [`bcce0d3b`](https://github.com/xataio/client-ts/commit/bcce0d3b0b53468937accd4fee3b5485c35f69ad) Thanks [@SferaDev](https://github.com/SferaDev)! - Add support for sessions in ask endpoint
128
+
129
+ - [#1067](https://github.com/xataio/client-ts/pull/1067) [`c1f2d264`](https://github.com/xataio/client-ts/commit/c1f2d2649e077cdffae97c90b9d2b1c75d6858fb) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix error 400 with partial filters
130
+
131
+ - [#1071](https://github.com/xataio/client-ts/pull/1071) [`6c2c2630`](https://github.com/xataio/client-ts/commit/6c2c26308d4cbd25e7a9677c7d25c836396d4965) Thanks [@SferaDev](https://github.com/SferaDev)! - Add request timeout
132
+
133
+ ## 0.24.3
134
+
135
+ ### Patch Changes
136
+
137
+ - [#1033](https://github.com/xataio/client-ts/pull/1033) [`f01d1580`](https://github.com/xataio/client-ts/commit/f01d1580fc450cbf06eb8af85d68cf052fbe83a1) Thanks [@xata-bot](https://github.com/xata-bot)! - [OpenAPI] Spec updates for column selection
138
+
139
+ - [#1044](https://github.com/xataio/client-ts/pull/1044) [`52290feb`](https://github.com/xataio/client-ts/commit/52290feb5bba57384cdc14e7722fb5d9883dc581) Thanks [@SferaDev](https://github.com/SferaDev)! - Allow undefined with createOrUpdate/createOrReplace
140
+
141
+ ## 0.24.2
142
+
143
+ ### Patch Changes
144
+
145
+ - [#1038](https://github.com/xataio/client-ts/pull/1038) [`51561b52`](https://github.com/xataio/client-ts/commit/51561b52b56ad5ed9101d8faf12929891419cb2c) Thanks [@SferaDev](https://github.com/SferaDev)! - Show internal columns in filters
146
+
147
+ ## 0.24.1
148
+
149
+ ### Patch Changes
150
+
151
+ - [#1030](https://github.com/xataio/client-ts/pull/1030) [`eaa774f5`](https://github.com/xataio/client-ts/commit/eaa774f542185ef92448155bcdff331686c4da9f) Thanks [@SferaDev](https://github.com/SferaDev)! - Make `xata` property enumerable
152
+
153
+ ## 0.24.0
154
+
155
+ ### Minor Changes
156
+
157
+ - [#1009](https://github.com/xataio/client-ts/pull/1009) [`45aa2207`](https://github.com/xataio/client-ts/commit/45aa220728e98dd716a55a9a307474732a9b2bc1) Thanks [@SferaDev](https://github.com/SferaDev)! - Add `createdAt` and `updatedAt` properties
158
+
159
+ ### Patch Changes
160
+
161
+ - [#1008](https://github.com/xataio/client-ts/pull/1008) [`f28080f0`](https://github.com/xataio/client-ts/commit/f28080f034f02704fe00d64b8f42e1127bde30c7) Thanks [@SferaDev](https://github.com/SferaDev)! - Add `failIfMissing` to delete transactions
162
+
163
+ - [#994](https://github.com/xataio/client-ts/pull/994) [`ac9c0604`](https://github.com/xataio/client-ts/commit/ac9c06042bb85105d9a38624676ce6ea5a27d488) Thanks [@xata-bot](https://github.com/xata-bot)! - Update internal endpoints
164
+
165
+ - [#1015](https://github.com/xataio/client-ts/pull/1015) [`c163b365`](https://github.com/xataio/client-ts/commit/c163b3658f23fb2eaad6243ebebc92624754099a) Thanks [@SferaDev](https://github.com/SferaDev)! - Add `factor` to date boosters
166
+
167
+ ## 0.23.5
168
+
169
+ ### Patch Changes
170
+
171
+ - [#970](https://github.com/xataio/client-ts/pull/970) [`20cc8c43`](https://github.com/xataio/client-ts/commit/20cc8c43e1659bf112ae2642948c84bfcf46a6ba) Thanks [@xata-bot](https://github.com/xata-bot)! - Add delete file endpoint
172
+
173
+ - [#976](https://github.com/xataio/client-ts/pull/976) [`5099cbbd`](https://github.com/xataio/client-ts/commit/5099cbbd3065a60dcee2f1699afa1ee8ed5edb1c) Thanks [@SferaDev](https://github.com/SferaDev)! - Re-export JSONData helper type
174
+
175
+ - [#972](https://github.com/xataio/client-ts/pull/972) [`89375e76`](https://github.com/xataio/client-ts/commit/89375e76b790fed7e6a26bf3ac4ea9eaed1aecae) Thanks [@SferaDev](https://github.com/SferaDev)! - Add types to exports
176
+
177
+ - [#979](https://github.com/xataio/client-ts/pull/979) [`5eaee932`](https://github.com/xataio/client-ts/commit/5eaee932b828907ae352d7c0d0584e860845434b) Thanks [@SferaDev](https://github.com/SferaDev)! - Add `size` to pagination meta
178
+
179
+ - [#974](https://github.com/xataio/client-ts/pull/974) [`109b8790`](https://github.com/xataio/client-ts/commit/109b8790849532d9c442e7c03c67792aeafebd88) Thanks [@xata-bot](https://github.com/xata-bot)! - Make checksum mandatory
180
+
181
+ ## 0.23.4
182
+
183
+ ### Patch Changes
184
+
185
+ - [#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
186
+
187
+ ## 0.23.3
188
+
189
+ ### Patch Changes
190
+
191
+ - [#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
192
+
193
+ ## 0.23.2
194
+
195
+ ### Patch Changes
196
+
197
+ - [#939](https://github.com/xataio/client-ts/pull/939) [`c477c177`](https://github.com/xataio/client-ts/commit/c477c17795c01cbf945be413217944a5a38655a5) Thanks [@SferaDev](https://github.com/SferaDev)! - Add deploy preview branch env variable loading
198
+
199
+ - [#945](https://github.com/xataio/client-ts/pull/945) [`ecdc6553`](https://github.com/xataio/client-ts/commit/ecdc6553d4628289e88953ab6296b80f60e8f757) Thanks [@xata-bot](https://github.com/xata-bot)! - Add new types
200
+
201
+ ## 0.23.1
202
+
203
+ ### Patch Changes
204
+
205
+ - [#941](https://github.com/xataio/client-ts/pull/941) [`3026d708`](https://github.com/xataio/client-ts/commit/3026d70847830fd0f2024413d823380ff323806c) Thanks [@SferaDev](https://github.com/SferaDev)! - Expose records in ask SSE
206
+
207
+ ## 0.23.0
208
+
209
+ ### Minor Changes
210
+
211
+ - [#867](https://github.com/xataio/client-ts/pull/867) [`5838113f`](https://github.com/xataio/client-ts/commit/5838113fca042163b44d7cc7cc1686d5ef89b302) Thanks [@SferaDev](https://github.com/SferaDev)! - [Workflow] Remove fallback branch
212
+
213
+ ## 0.22.4
214
+
215
+ ### Patch Changes
216
+
217
+ - [#927](https://github.com/xataio/client-ts/pull/927) [`22e7dd29`](https://github.com/xataio/client-ts/commit/22e7dd29f7a51dccc087d5fd7fff32084c7733af) Thanks [@SferaDev](https://github.com/SferaDev)! - Expose `ask` endpoint in the SDK
218
+
219
+ - [#921](https://github.com/xataio/client-ts/pull/921) [`07fc879d`](https://github.com/xataio/client-ts/commit/07fc879d3f778536e39588e66d7a18b5a9d52ebe) Thanks [@SferaDev](https://github.com/SferaDev)! - Remove git branch resolution
220
+
221
+ - [#925](https://github.com/xataio/client-ts/pull/925) [`58a1c24e`](https://github.com/xataio/client-ts/commit/58a1c24e5d30025dce243eecce44f09d4f65ed66) Thanks [@xata-bot](https://github.com/xata-bot)! - Add new methods to API client
222
+
223
+ - [#932](https://github.com/xataio/client-ts/pull/932) [`c2c6e244`](https://github.com/xataio/client-ts/commit/c2c6e24459b1acc07f0414066258071fbcf7dde9) Thanks [@xata-bot](https://github.com/xata-bot)! - Add new experimental copy branch endpoint
224
+
225
+ ## 0.22.3
226
+
227
+ ### Patch Changes
228
+
229
+ - [#917](https://github.com/xataio/client-ts/pull/917) [`4210b8c3`](https://github.com/xataio/client-ts/commit/4210b8c3c4169ba781a56deed7ba09c99788db1f) Thanks [@xata-bot](https://github.com/xata-bot)! - [OpenAPI] Spec updates to add better types to Record input
230
+
231
+ ## 0.22.2
232
+
233
+ ### Patch Changes
234
+
235
+ - [#898](https://github.com/xataio/client-ts/pull/898) [`72e13bf9`](https://github.com/xataio/client-ts/commit/72e13bf99d0ebefef91c984a995a28b0e8ca2a8f) Thanks [@SferaDev](https://github.com/SferaDev)! - Add methods for vector type
236
+
237
+ ## 0.22.1
238
+
239
+ ### Patch Changes
240
+
241
+ - [#885](https://github.com/xataio/client-ts/pull/885) [`4cafde72`](https://github.com/xataio/client-ts/commit/4cafde728e4e9e5e83812d475d9980397ae78362) Thanks [@SferaDev](https://github.com/SferaDev)! - Update body of compareBranchSchemas
242
+
243
+ - [#890](https://github.com/xataio/client-ts/pull/890) [`639710a5`](https://github.com/xataio/client-ts/commit/639710a52132f260bf3a26560a21ae2193abb71d) Thanks [@SferaDev](https://github.com/SferaDev)! - Expose consistency settings in summarize
244
+
245
+ ## 0.22.0
246
+
247
+ ### Minor Changes
248
+
249
+ - [#852](https://github.com/xataio/client-ts/pull/852) [`b2a4def4`](https://github.com/xataio/client-ts/commit/b2a4def4baf3eb18cd323895635e0bccb7f876f4) Thanks [@SferaDev](https://github.com/SferaDev)! - [BREAKING CHANGE] Reduce column selection depth
250
+
251
+ ### Patch Changes
252
+
253
+ - [#835](https://github.com/xataio/client-ts/pull/835) [`379e6144`](https://github.com/xataio/client-ts/commit/379e61446b21e7cbadd7fc59267736c6845ec566) Thanks [@SferaDev](https://github.com/SferaDev)! - Add helper methods `toSerializable` and `toString`
254
+
255
+ ## 0.21.6
256
+
257
+ ### Patch Changes
258
+
259
+ - [#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
260
+
261
+ - [#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
262
+
263
+ ## 0.21.5
264
+
265
+ ### Patch Changes
266
+
267
+ - [#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
268
+
269
+ ## 0.21.4
270
+
271
+ ### Patch Changes
272
+
273
+ - [#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
274
+
275
+ ## 0.21.3
276
+
277
+ ### Patch Changes
278
+
279
+ - [#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
280
+
281
+ ## 0.21.2
282
+
283
+ ### Patch Changes
284
+
285
+ - [#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
286
+
287
+ - [#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
288
+
289
+ ## 0.21.1
290
+
291
+ ### Patch Changes
292
+
293
+ - [#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
294
+
295
+ ## 0.21.0
296
+
297
+ ### Minor Changes
298
+
299
+ - [#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
300
+
301
+ ### Patch Changes
302
+
303
+ - [#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
304
+
305
+ - [#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
306
+
307
+ - [#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
308
+
309
+ - [#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
310
+
311
+ - [#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
312
+
313
+ - [#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
314
+
315
+ - [#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
316
+
317
+ - [#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
318
+
319
+ - [#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
320
+
321
+ ## 0.20.2
322
+
323
+ ### Patch Changes
324
+
325
+ - [#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
326
+
327
+ - [#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
328
+
329
+ - [#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
330
+
3
331
  ## 0.20.1
4
332
 
5
333
  ### Patch Changes
package/README.md CHANGED
@@ -1,273 +1,7 @@
1
1
  # Xata SDK for TypeScript and JavaScript
2
2
 
3
- This SDK has zero dependencies, so it can be used in many JavaScript runtimes including Node.js, Cloudflare workers, Deno, Electron, etc. It also works in browsers for the same reason. But this is strongly discouraged because you can easily leak your API keys from browsers.
3
+ The Xata SDK supports typescript definitions for your Xata database schema. It also works with JavaScript.
4
4
 
5
- ## Table of Contents
5
+ It has zero dependencies and runs in Node.js, V8, Deno and Bun.
6
6
 
7
- <!-- START doctoc generated TOC please keep comment here to allow auto update -->
8
- <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
9
-
10
- - [Installation](#installation)
11
- - [Usage](#usage)
12
- - [Schema-generated Client](#schema-generated-client)
13
- - [Schema-less Client](#schema-less-client)
14
- - [API Design](#api-design)
15
- - [Creating Records](#creating-records)
16
- - [Query a Single Record by its ID](#query-a-single-record-by-its-id)
17
- - [Querying Multiple Records](#querying-multiple-records)
18
- - [Updating Records](#updating-records)
19
- - [Deleting Records](#deleting-records)
20
- - [API Client](#api-client)
21
- - [Deno support](#deno-support)
22
-
23
- <!-- END doctoc generated TOC please keep comment here to allow auto update -->
24
-
25
- ## Installation
26
-
27
- ```bash
28
- npm install @xata.io/client
29
- ```
30
-
31
- ## Usage
32
-
33
- There are three ways to use the SDK:
34
-
35
- - **Schema-generated Client**: SDK to create/read/update/delete records in a given database following a schema file (with type-safety).
36
- - **Schema-less Client**: SDK to create/read/update/delete records in any database without schema validation (with partial type-safety).
37
- - **API Client**: SDK to interact with the whole Xata API and all its endpoints.
38
-
39
- ### Schema-generated Client
40
-
41
- To use the schema-generated client, you need to run the code generator utility that comes with [our CLI](https://docs.xata.io/cli/getting-started).
42
-
43
- To run it (and assuming you have configured the project with `xata init`):
44
-
45
- ```bash
46
- xata codegen
47
- ```
48
-
49
- In a TypeScript file, start using the generated code like this:
50
-
51
- ```ts
52
- import { XataClient } from './xata'; // or wherever you chose to generate the client
53
-
54
- const xata = new XataClient();
55
- ```
56
-
57
- The import above will differ if you chose to generate the code in a different location.
58
-
59
- The `XataClient` constructor accepts an object with configuration options, like the `fetch` parameter, which is required only if your runtime doesn't provide a global `fetch` function. There's also a `databaseURL` argument that by default will contain a URL pointing to your database (e.g. `https://myworkspace-123abc.xata.sh/db/databasename`). It can be specified in the constructor to overwrite that value if for whatever reason you need to connect to a different workspace or database.
60
-
61
- The code generator will create two TypeScript types for each schema entity. The base one will be an `Identifiable` entity with the internal properties your entity has and the `Record` one will extend it with a set of operations (update, delete, etc...) and some schema metadata (xata version).
62
-
63
- ```ts
64
- interface User extends Identifiable {
65
- email?: string | null;
66
- }
67
-
68
- type UserRecord = User & XataRecord;
69
-
70
- async function initializeDatabase(admin: User): Promise<UserRecord> {
71
- return xata.db.users.create(admin);
72
- }
73
-
74
- const admin = await initializeDatabase({ email: 'admin@example.com' });
75
- await admin.update({ email: 'admin@foo.bar' });
76
- await admin.delete();
77
- ```
78
-
79
- You will learn more about the available operations below, under the [`API Design`](#api-design) section.
80
-
81
- ### Schema-less Client
82
-
83
- If you don't have a schema file, or you are building a generic way to interact with Xata, you can use the `BaseClient` class without schema validation.
84
-
85
- ```ts
86
- import { BaseClient } from '@xata.io/client';
87
-
88
- const xata = new BaseClient({
89
- branch: 'branchname',
90
- apiKey: 'xau_1234abcdef',
91
- fetch: fetchImplementation // Required if your runtime doesn't provide a global `fetch` function.
92
- });
93
- ```
94
-
95
- It works the same way as the code-generated `XataClient` but doesn't provide type-safety for your model.
96
-
97
- You can read more on the methods available below, in the next section.
98
-
99
- ### API Design
100
-
101
- The Xata SDK to create/read/update/delete records follows the [repository pattern](https://lyz-code.github.io/blue-book/architecture/repository_pattern/). Each table will have a repository object available at `xata.db.[table-name]`.
102
-
103
- For example if you have a `users` table, there'll be a repository at `xata.db.users`. If you're using the schema-less client, you can also use the `xata.db.[table-name]` syntax to access the repository but without TypeScript auto-completion.
104
-
105
- #### Creating Records
106
-
107
- Invoke the `create()` method in the repository. Example:
108
-
109
- ```ts
110
- const user = await xata.db.users.create({
111
- fullName: 'John Smith'
112
- });
113
- ```
114
-
115
- If you want to create a record with a specific ID, you can provide the id as parameter to the `create()` method.
116
-
117
- ```ts
118
- const user = await xata.db.users.create('user_admin', {
119
- fullName: 'John Smith'
120
- });
121
- ```
122
-
123
- And if you want to create or update a record with a specific ID, you can invoke `createOrUpdate()` with an id parameter.
124
-
125
- ```ts
126
- const user = await xata.db.users.createOrUpdate('user_admin', {
127
- fullName: 'John Smith'
128
- });
129
- ```
130
-
131
- #### Query a Single Record by its ID
132
-
133
- ```ts
134
- // `user` will be null if the record cannot be found
135
- const user = await xata.db.users.read('rec_1234abcdef');
136
- ```
137
-
138
- #### Querying Multiple Records
139
-
140
- ```ts
141
- // Query records selecting all fields.
142
- const page = await xata.db.users.select().getPaginated();
143
- const user = await xata.db.users.select().getFirst();
144
-
145
- // You can also use `xata.db.users` directly, since it's an immutable Query too!
146
- const page = await xata.db.users.getPaginated();
147
- const user = await xata.db.users.getFirst();
148
-
149
- // Query records selecting just one or more fields
150
- const page = await xata.db.users.select('email', 'profile').getPaginated();
151
-
152
- // Apply constraints
153
- const page = await xata.db.users.filter('email', 'foo@example.com').getPaginated();
154
-
155
- // Sorting
156
- const page = await xata.db.users.sort('full_name', 'asc').getPaginated();
157
- ```
158
-
159
- Query operations (`select()`, `filter()`, `sort()`) return a `Query` object. These objects are immutable. You can add additional constraints, `sort`, etc. by calling their methods, and a new query will be returned. In order to finally make a query to the database you'll invoke `getPaginated()`, `getMany()`, `getAll()`, or `getFirst()`.
160
-
161
- To learn the differences between these methods, see the [reference](https://docs.xata.io/sdk/reference#query).
162
-
163
- ```ts
164
- // Operators that combine multiple conditions can be deconstructed
165
- const { filter, any, all, not, sort } = xata.db.users;
166
- const query = filter('email', 'foo@example.com');
167
-
168
- // Single-column operators are imported directly from the package
169
- import { gt, includes, startsWith } from '@xata.io/client';
170
- filter('email', startsWith('username')).not(filter('created_at', gt(somePastDate)));
171
-
172
- // Queries are immutable objects. This is useful to derive queries from other queries
173
- const admins = filter('admin', true);
174
- const spaniardsAdmins = admins.filter('country', 'Spain');
175
- await admins.getAll(); // still returns all admins
176
-
177
- // Finally fetch the results of the query
178
- const users = await query.getAll();
179
- const firstUser = await query.getFirst();
180
- ```
181
-
182
- The `getPaginated()` method will return a `Page` object. It's a wrapper that internally uses cursor based pagination.
183
-
184
- ```ts
185
- page.records; // Array of records
186
- page.hasNextPage(); // Boolean
187
-
188
- const nextPage = await page.nextPage(); // Page object
189
- const previousPage = await page.previousPage(); // Page object
190
- const startPage = await page.startPage(); // Page object
191
- const endPage = await page.endPage(); // Page object
192
- ```
193
-
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:
195
-
196
- ```ts
197
- for await (const record of xata.db.users) {
198
- console.log(record);
199
- }
200
-
201
- for await (const record of xata.db.users.filter('team.id', teamId)) {
202
- console.log(record);
203
- }
204
-
205
- for await (const records of xata.db.users.getIterator({ batchSize: 100 })) {
206
- console.log(records);
207
- }
208
- ```
209
-
210
- #### Updating Records
211
-
212
- Updating a record leaves the existing object unchanged, but returns a new object with the updated values.
213
-
214
- ```ts
215
- // Using an existing object
216
- const updatedUser = await user.update({
217
- fullName: 'John Smith Jr.'
218
- });
219
-
220
- // Using a record id
221
- const updatedUser = await xata.db.users.update('rec_1234abcdef', {
222
- fullName: 'John Smith Jr.'
223
- });
224
- ```
225
-
226
- #### Deleting Records
227
-
228
- ```ts
229
- // Using an existing object
230
- await user.delete();
231
-
232
- // Using a record id
233
- await xata.db.users.delete('rec_1234abcdef');
234
- ```
235
-
236
- ### API Client
237
-
238
- One of the main features of the SDK is the ability to interact with the whole Xata API and perform administrative operations such as creating/reading/updating/deleting [workspaces](https://docs.xata.io/concepts/workspaces), databases, tables, branches...
239
-
240
- To communicate with the SDK we provide a constructor called `XataApiClient` that accepts an API token and an optional fetch implementation method.
241
-
242
- ```ts
243
- const api = new XataApiClient({ apiKey: process.env.XATA_API_KEY });
244
- ```
245
-
246
- Once you have initialized the API client, the operations are organized following the same hiearchy as in the [official documentation](https://docs.xata.io). You have different namespaces for each entity (ie. `workspaces`, `databases`, `tables`, `branches`, `users`, `records`...).
247
-
248
- ```ts
249
- const { id: workspace } = await api.workspaces.createWorkspace({ name: 'example' });
250
- const { databaseName } = await api.database.createDatabase(workspace, 'database', { region: 'eu-west-1' });
251
-
252
- await api.branches.createBranch(workspace, databaseName, 'branch');
253
- await api.tables.createTable(workspace, databaseName, 'branch', 'table');
254
- await api.tables.setTableSchema(workspace, databaseName, 'branch', 'table', {
255
- columns: [{ name: 'email', type: 'string' }]
256
- });
257
-
258
- const { id: recordId } = await api.records.insertRecord(workspace, databaseName, 'branch', 'table', {
259
- email: 'example@foo.bar'
260
- });
261
-
262
- const record = await api.records.getRecord(workspace, databaseName, 'branch', 'table', recordId);
263
-
264
- await api.workspaces.deleteWorkspace(workspace);
265
- ```
266
-
267
- ## Deno support
268
-
269
- We publish the client on [deno.land](https://deno.land/x/xata). You can use it by changing the import in the auto-generated `xata.ts` file:
270
-
271
- ```ts
272
- import { buildClient, BaseClientOptions, XataRecord } from 'https://deno.land/x/xata/mod.ts';
273
- ```
7
+ You can find the SDK documentation [here](https://xata.io/docs/typescript-client/overview).