@xata.io/client 0.0.0-alpha.vf61048f → 0.0.0-alpha.vf63d465df0d8def09bfd99d49a1c06b14e37dbe0

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @xata.io/client@0.21.6 add-version /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.29.4 add-version /home/runner/work/client-ts/client-ts/packages/client
3
3
  > node ../../scripts/add-version-file.mjs
4
4
 
@@ -1,13 +1,25 @@
1
1
 
2
- > @xata.io/client@0.21.6 build /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.29.4 build /home/runner/work/client-ts/client-ts/packages/client
3
3
  > rimraf dist && rollup -c
4
4
 
5
5
  
6
6
  src/index.ts → dist/index.cjs...
7
- created dist/index.cjs in 1s
7
+ (!) Unresolved dependencies
8
+ https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
9
+ kysely (imported by "src/schema/repository.ts", "src/kysely/index.ts", "src/schema/filters.ts" and "src/kysely/driver.ts")
10
+ pako (imported by "src/util/cursor.ts")
11
+ rfc4648 (imported by "src/util/cursor.ts")
12
+ json-stringify-deterministic (imported by "src/util/cursor.ts")
13
+ created dist/index.cjs in 1.5s
8
14
  
9
15
  src/index.ts → dist/index.mjs...
10
- created dist/index.mjs in 853ms
16
+ (!) Unresolved dependencies
17
+ https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
18
+ kysely (imported by "src/schema/repository.ts", "src/kysely/index.ts", "src/schema/filters.ts" and "src/kysely/driver.ts")
19
+ pako (imported by "src/util/cursor.ts")
20
+ rfc4648 (imported by "src/util/cursor.ts")
21
+ json-stringify-deterministic (imported by "src/util/cursor.ts")
22
+ created dist/index.mjs in 905ms
11
23
  
12
24
  src/index.ts → dist/index.d.ts...
13
- created dist/index.d.ts in 6.3s
25
+ created dist/index.d.ts in 5.2s
package/CHANGELOG.md CHANGED
@@ -1,15 +1,341 @@
1
1
  # @xata.io/client
2
2
 
3
- ## 0.0.0-alpha.vf61048f
3
+ ## 0.0.0-alpha.vf63d465df0d8def09bfd99d49a1c06b14e37dbe0
4
4
 
5
- ### Minor Changes
5
+ ### Major Changes
6
6
 
7
- - [#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
7
+ - [#1473](https://github.com/xataio/client-ts/pull/1473) [`1b0b1a0`](https://github.com/xataio/client-ts/commit/1b0b1a09240cfcffc292cc5c17205eba10e5b054) Thanks [@eemmiillyy](https://github.com/eemmiillyy)! - Make XataApiClient to use ES Proxies
8
+
9
+ - [#1473](https://github.com/xataio/client-ts/pull/1473) [`0a60b36`](https://github.com/xataio/client-ts/commit/0a60b3612f7fba050eb3c73b0b3b7a73e58ff26f) Thanks [@eemmiillyy](https://github.com/eemmiillyy)! - Version 1.0
8
10
 
9
11
  ### Patch Changes
10
12
 
13
+ - [#1487](https://github.com/xataio/client-ts/pull/1487) [`6b754d2`](https://github.com/xataio/client-ts/commit/6b754d2f6a1f7b9378a96fe27502ff6c29ff5ed8) Thanks [@SferaDev](https://github.com/SferaDev)! - Add batch SQL support
14
+
11
15
  - Force canary build
12
16
 
17
+ ## 0.29.4
18
+
19
+ ### Patch Changes
20
+
21
+ - [#1429](https://github.com/xataio/client-ts/pull/1429) [`2140a24`](https://github.com/xataio/client-ts/commit/2140a24f32a94f36bab8c8268033c7dcf235dddc) Thanks [@SferaDev](https://github.com/SferaDev)! - Add more postgres types to inference
22
+
23
+ - [#1428](https://github.com/xataio/client-ts/pull/1428) [`d8032f2`](https://github.com/xataio/client-ts/commit/d8032f2e07bdcc653db1606796d27f08d397cdbe) Thanks [@SferaDev](https://github.com/SferaDev)! - Remove errors of Buffer in cloudflare
24
+
25
+ ## 0.29.3
26
+
27
+ ### Patch Changes
28
+
29
+ - [#1399](https://github.com/xataio/client-ts/pull/1399) [`02053fb`](https://github.com/xataio/client-ts/commit/02053fbb10479b8e9453691f957d3235762555aa) Thanks [@SferaDev](https://github.com/SferaDev)! - Expose `xata.sql.connectionString` helper
30
+
31
+ - [#1398](https://github.com/xataio/client-ts/pull/1398) [`e27cb74`](https://github.com/xataio/client-ts/commit/e27cb74143aa9b6c654713878e5d3776858e5290) Thanks [@SferaDev](https://github.com/SferaDev)! - Add support for array response type
32
+
33
+ ## 0.29.2
34
+
35
+ ### Patch Changes
36
+
37
+ - [#1380](https://github.com/xataio/client-ts/pull/1380) [`e8db1cd`](https://github.com/xataio/client-ts/commit/e8db1cd394ccbed32403548bf9d09a5c3973d850) Thanks [@richardgill](https://github.com/richardgill)! - Link to our docs to explain how to resolve the 'api key in browser' error message
38
+
39
+ ## 0.29.1
40
+
41
+ ### Patch Changes
42
+
43
+ - [#1364](https://github.com/xataio/client-ts/pull/1364) [`d0f5d12`](https://github.com/xataio/client-ts/commit/d0f5d125e6c2f4c82f8a0a6b4a30d255c58e8326) Thanks [@SferaDev](https://github.com/SferaDev)! - Show search properties in xata metadata object
44
+
45
+ - [#1263](https://github.com/xataio/client-ts/pull/1263) [`212b53d`](https://github.com/xataio/client-ts/commit/212b53d07498def0d2ed8942691eff982e448969) Thanks [@SferaDev](https://github.com/SferaDev)! - Don't attempt to retrieve tables on runtime
46
+
47
+ - [#1339](https://github.com/xataio/client-ts/pull/1339) [`9fd8c42`](https://github.com/xataio/client-ts/commit/9fd8c428d71b476f1951123c6cba5e803b983e54) Thanks [@SferaDev](https://github.com/SferaDev)! - Allow using normal commands with pgroll enabled branches
48
+
49
+ - [#1361](https://github.com/xataio/client-ts/pull/1361) [`368d4aa`](https://github.com/xataio/client-ts/commit/368d4aa16cd1cc1da93a142406c5d41bbc15b082) Thanks [@SferaDev](https://github.com/SferaDev)! - Add `toSerializable` to `getAll`
50
+
51
+ ## 0.29.0
52
+
53
+ ### Minor Changes
54
+
55
+ - [#1329](https://github.com/xataio/client-ts/pull/1329) [`0ec026a`](https://github.com/xataio/client-ts/commit/0ec026a92bdb1a405cb9d90cb1d506ff159f98e8) Thanks [@eemmiillyy](https://github.com/eemmiillyy)! - Remove object column type
56
+
57
+ ### Patch Changes
58
+
59
+ - [#1334](https://github.com/xataio/client-ts/pull/1334) [`6414bd3`](https://github.com/xataio/client-ts/commit/6414bd3d8bdb84961e68968df4b0b025503f0d72) Thanks [@SferaDev](https://github.com/SferaDev)! - Expose columns in SQL query
60
+
61
+ - [#1328](https://github.com/xataio/client-ts/pull/1328) [`27773df`](https://github.com/xataio/client-ts/commit/27773df5addf0013d1a7238ac490904e7aad2334) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix untagged scenario for SQL function
62
+
63
+ ## 0.28.4
64
+
65
+ ### Patch Changes
66
+
67
+ - [#1309](https://github.com/xataio/client-ts/pull/1309) [`adc961b`](https://github.com/xataio/client-ts/commit/adc961b886b789010e6512c17cb2377eceab665a) Thanks [@andrew-farries](https://github.com/andrew-farries)! - Add CLI support for running against local development environments
68
+
69
+ - [#1312](https://github.com/xataio/client-ts/pull/1312) [`6031a9d`](https://github.com/xataio/client-ts/commit/6031a9de63c264b7db5b031bb1795258c2bf8150) Thanks [@SferaDev](https://github.com/SferaDev)! - Add get to transactions
70
+
71
+ ## 0.28.3
72
+
73
+ ### Patch Changes
74
+
75
+ - [#1304](https://github.com/xataio/client-ts/pull/1304) [`b7f3ec9`](https://github.com/xataio/client-ts/commit/b7f3ec9eabe3642929131e244bd774f4d3134482) Thanks [@SferaDev](https://github.com/SferaDev)! - Rewrite upload url path
76
+
77
+ ## 0.28.2
78
+
79
+ ### Patch Changes
80
+
81
+ - [#1288](https://github.com/xataio/client-ts/pull/1288) [`c9178e1`](https://github.com/xataio/client-ts/commit/c9178e1e3f2268513e78dcfce396a99a8fca5dfb) Thanks [@SferaDev](https://github.com/SferaDev)! - Update read to use `ReadonlyArray<Identifier>`
82
+
83
+ ## 0.28.1
84
+
85
+ ### Patch Changes
86
+
87
+ - [#1281](https://github.com/xataio/client-ts/pull/1281) [`9a7e3f5`](https://github.com/xataio/client-ts/commit/9a7e3f5029e53efc6750e9c86bab936427788209) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix issue with default public access
88
+
89
+ ## 0.28.0
90
+
91
+ ### Minor Changes
92
+
93
+ - [#1251](https://github.com/xataio/client-ts/pull/1251) [`e97d1999`](https://github.com/xataio/client-ts/commit/e97d1999f3c25f149213ceca81958e1674624e05) Thanks [@SferaDev](https://github.com/SferaDev)! - Remove Xata Workers support
94
+
95
+ ## 0.27.0
96
+
97
+ ### Minor Changes
98
+
99
+ - [#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
100
+
101
+ ### Patch Changes
102
+
103
+ - [#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
104
+
105
+ ## 0.26.9
106
+
107
+ ### Patch Changes
108
+
109
+ - [#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
110
+
111
+ ## 0.26.8
112
+
113
+ ### Patch Changes
114
+
115
+ - [#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
116
+
117
+ - [#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
118
+
119
+ - [#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
120
+
121
+ ## 0.26.7
122
+
123
+ ### Patch Changes
124
+
125
+ - [#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
126
+
127
+ - [#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
128
+
129
+ ## 0.26.6
130
+
131
+ ### Patch Changes
132
+
133
+ - [#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`
134
+
135
+ - [#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
136
+
137
+ ## 0.26.5
138
+
139
+ ### Patch Changes
140
+
141
+ - [#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
142
+
143
+ ## 0.26.4
144
+
145
+ ### Patch Changes
146
+
147
+ - [#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
148
+
149
+ - [#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
150
+
151
+ ## 0.26.3
152
+
153
+ ### Patch Changes
154
+
155
+ - [#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
156
+
157
+ ## 0.26.2
158
+
159
+ ### Patch Changes
160
+
161
+ - [#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
162
+
163
+ ## 0.26.1
164
+
165
+ ### Patch Changes
166
+
167
+ - [#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
168
+
169
+ - [#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
170
+
171
+ - [#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
172
+
173
+ ## 0.26.0
174
+
175
+ ### Minor Changes
176
+
177
+ - [#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
178
+
179
+ ### Patch Changes
180
+
181
+ - [#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
182
+
183
+ ## 0.25.3
184
+
185
+ ### Patch Changes
186
+
187
+ - [#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
188
+
189
+ ## 0.25.2
190
+
191
+ ### Patch Changes
192
+
193
+ - [#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
194
+
195
+ - [#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
196
+
197
+ ## 0.25.1
198
+
199
+ ### Patch Changes
200
+
201
+ - [#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
202
+
203
+ ## 0.25.0
204
+
205
+ ### Minor Changes
206
+
207
+ - [#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
208
+
209
+ ### Patch Changes
210
+
211
+ - [#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
212
+
213
+ - [#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
214
+
215
+ - [#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
216
+
217
+ - [#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
218
+
219
+ ## 0.24.3
220
+
221
+ ### Patch Changes
222
+
223
+ - [#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
224
+
225
+ - [#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
226
+
227
+ ## 0.24.2
228
+
229
+ ### Patch Changes
230
+
231
+ - [#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
232
+
233
+ ## 0.24.1
234
+
235
+ ### Patch Changes
236
+
237
+ - [#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
238
+
239
+ ## 0.24.0
240
+
241
+ ### Minor Changes
242
+
243
+ - [#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
244
+
245
+ ### Patch Changes
246
+
247
+ - [#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
248
+
249
+ - [#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
250
+
251
+ - [#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
252
+
253
+ ## 0.23.5
254
+
255
+ ### Patch Changes
256
+
257
+ - [#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
258
+
259
+ - [#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
260
+
261
+ - [#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
262
+
263
+ - [#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
264
+
265
+ - [#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
266
+
267
+ ## 0.23.4
268
+
269
+ ### Patch Changes
270
+
271
+ - [#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
272
+
273
+ ## 0.23.3
274
+
275
+ ### Patch Changes
276
+
277
+ - [#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
278
+
279
+ ## 0.23.2
280
+
281
+ ### Patch Changes
282
+
283
+ - [#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
284
+
285
+ - [#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
286
+
287
+ ## 0.23.1
288
+
289
+ ### Patch Changes
290
+
291
+ - [#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
292
+
293
+ ## 0.23.0
294
+
295
+ ### Minor Changes
296
+
297
+ - [#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
298
+
299
+ ## 0.22.4
300
+
301
+ ### Patch Changes
302
+
303
+ - [#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
304
+
305
+ - [#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
306
+
307
+ - [#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
308
+
309
+ - [#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
310
+
311
+ ## 0.22.3
312
+
313
+ ### Patch Changes
314
+
315
+ - [#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
316
+
317
+ ## 0.22.2
318
+
319
+ ### Patch Changes
320
+
321
+ - [#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
322
+
323
+ ## 0.22.1
324
+
325
+ ### Patch Changes
326
+
327
+ - [#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
328
+
329
+ - [#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
330
+
331
+ ## 0.22.0
332
+
333
+ ### Minor Changes
334
+
335
+ - [#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
336
+
337
+ ### Patch Changes
338
+
13
339
  - [#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`
14
340
 
15
341
  ## 0.21.6
package/README.md CHANGED
@@ -4,277 +4,4 @@ The Xata SDK supports typescript definitions for your Xata database schema. It a
4
4
 
5
5
  It has zero dependencies and runs in Node.js, V8, Deno and Bun.
6
6
 
7
- ## Installation
8
-
9
- See our [docs](https://xata.io/docs/sdk/typescript#installation) to get started using the Xata SDK.
10
-
11
-
12
- ## Table of Contents
13
-
14
- <!-- START doctoc generated TOC please keep comment here to allow auto update -->
15
- <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
16
-
17
- - [Installation](#installation)
18
- - [Usage](#usage)
19
- - [Schema-generated Client](#schema-generated-client)
20
- - [Schema-less Client](#schema-less-client)
21
- - [API Design](#api-design)
22
- - [Creating Records](#creating-records)
23
- - [Query a Single Record by its ID](#query-a-single-record-by-its-id)
24
- - [Querying Multiple Records](#querying-multiple-records)
25
- - [Updating Records](#updating-records)
26
- - [Deleting Records](#deleting-records)
27
- - [API Client](#api-client)
28
- - [Deno support](#deno-support)
29
-
30
- <!-- END doctoc generated TOC please keep comment here to allow auto update -->
31
-
32
- ## Manual Installation
33
-
34
- ```bash
35
- npm install @xata.io/client
36
- ```
37
-
38
- ## Usage
39
-
40
- There are three ways to use the SDK:
41
-
42
- - **Schema-generated Client**: SDK to create/read/update/delete records in a given database following a schema file (with type-safety).
43
- - **Schema-less Client**: SDK to create/read/update/delete records in any database without schema validation (with partial type-safety).
44
- - **API Client**: SDK to interact with the whole Xata API and all its endpoints.
45
-
46
- ### Schema-generated Client
47
-
48
- 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).
49
-
50
- To run it (and assuming you have configured the project with `xata init`):
51
-
52
- ```bash
53
- xata codegen
54
- ```
55
-
56
- In a TypeScript file, start using the generated code like this:
57
-
58
- ```ts
59
- import { XataClient } from './xata'; // or wherever you chose to generate the client
60
-
61
- const xata = new XataClient();
62
- ```
63
-
64
- The import above will differ if you chose to generate the code in a different location.
65
-
66
- 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.
67
-
68
- 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).
69
-
70
- ```ts
71
- interface User extends Identifiable {
72
- email?: string | null;
73
- }
74
-
75
- type UserRecord = User & XataRecord;
76
-
77
- async function initializeDatabase(admin: User): Promise<UserRecord> {
78
- return xata.db.users.create(admin);
79
- }
80
-
81
- const admin = await initializeDatabase({ email: 'admin@example.com' });
82
- await admin.update({ email: 'admin@foo.bar' });
83
- await admin.delete();
84
- ```
85
-
86
- You will learn more about the available operations below, under the [`API Design`](#api-design) section.
87
-
88
- ### Schema-less Client
89
-
90
- 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.
91
-
92
- ```ts
93
- import { BaseClient } from '@xata.io/client';
94
-
95
- const xata = new BaseClient({
96
- branch: 'branchname',
97
- apiKey: 'xau_1234abcdef',
98
- fetch: fetchImplementation // Required if your runtime doesn't provide a global `fetch` function.
99
- });
100
- ```
101
-
102
- It works the same way as the code-generated `XataClient` but doesn't provide type-safety for your model.
103
-
104
- You can read more on the methods available below, in the next section.
105
-
106
- ### API Design
107
-
108
- 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]`.
109
-
110
- 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.
111
-
112
- #### Creating Records
113
-
114
- Invoke the `create()` method in the repository. Example:
115
-
116
- ```ts
117
- const user = await xata.db.users.create({
118
- fullName: 'John Smith'
119
- });
120
- ```
121
-
122
- If you want to create a record with a specific ID, you can provide the id as parameter to the `create()` method.
123
-
124
- ```ts
125
- const user = await xata.db.users.create('user_admin', {
126
- fullName: 'John Smith'
127
- });
128
- ```
129
-
130
- And if you want to create or update a record with a specific ID, you can invoke `createOrUpdate()` with an id parameter.
131
-
132
- ```ts
133
- const user = await xata.db.users.createOrUpdate('user_admin', {
134
- fullName: 'John Smith'
135
- });
136
- ```
137
-
138
- #### Query a Single Record by its ID
139
-
140
- ```ts
141
- // `user` will be null if the record cannot be found
142
- const user = await xata.db.users.read('rec_1234abcdef');
143
- ```
144
-
145
- #### Querying Multiple Records
146
-
147
- ```ts
148
- // Query records selecting all fields.
149
- const page = await xata.db.users.select().getPaginated();
150
- const user = await xata.db.users.select().getFirst();
151
-
152
- // You can also use `xata.db.users` directly, since it's an immutable Query too!
153
- const page = await xata.db.users.getPaginated();
154
- const user = await xata.db.users.getFirst();
155
-
156
- // Query records selecting just one or more fields
157
- const page = await xata.db.users.select('email', 'profile').getPaginated();
158
-
159
- // Apply constraints
160
- const page = await xata.db.users.filter('email', 'foo@example.com').getPaginated();
161
-
162
- // Sorting
163
- const page = await xata.db.users.sort('full_name', 'asc').getPaginated();
164
- ```
165
-
166
- 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()`.
167
-
168
- To learn the differences between these methods, see the [reference](https://docs.xata.io/sdk/reference#query).
169
-
170
- ```ts
171
- // Operators that combine multiple conditions can be deconstructed
172
- const { filter, any, all, not, sort } = xata.db.users;
173
- const query = filter('email', 'foo@example.com');
174
-
175
- // Single-column operators are imported directly from the package
176
- import { gt, includes, startsWith } from '@xata.io/client';
177
- filter('email', startsWith('username')).not(filter('created_at', gt(somePastDate)));
178
-
179
- // Queries are immutable objects. This is useful to derive queries from other queries
180
- const admins = filter('admin', true);
181
- const spaniardsAdmins = admins.filter('country', 'Spain');
182
- await admins.getAll(); // still returns all admins
183
-
184
- // Finally fetch the results of the query
185
- const users = await query.getAll();
186
- const firstUser = await query.getFirst();
187
- ```
188
-
189
- The `getPaginated()` method will return a `Page` object. It's a wrapper that internally uses cursor based pagination.
190
-
191
- ```ts
192
- page.records; // Array of records
193
- page.hasNextPage(); // Boolean
194
-
195
- const nextPage = await page.nextPage(); // Page object
196
- const previousPage = await page.previousPage(); // Page object
197
- const startPage = await page.startPage(); // Page object
198
- const endPage = await page.endPage(); // Page object
199
- ```
200
-
201
- 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:
202
-
203
- ```ts
204
- for await (const record of xata.db.users) {
205
- console.log(record);
206
- }
207
-
208
- for await (const record of xata.db.users.filter('team.id', teamId)) {
209
- console.log(record);
210
- }
211
-
212
- for await (const records of xata.db.users.getIterator({ batchSize: 100 })) {
213
- console.log(records);
214
- }
215
- ```
216
-
217
- #### Updating Records
218
-
219
- Updating a record leaves the existing object unchanged, but returns a new object with the updated values.
220
-
221
- ```ts
222
- // Using an existing object
223
- const updatedUser = await user.update({
224
- fullName: 'John Smith Jr.'
225
- });
226
-
227
- // Using a record id
228
- const updatedUser = await xata.db.users.update('rec_1234abcdef', {
229
- fullName: 'John Smith Jr.'
230
- });
231
- ```
232
-
233
- #### Deleting Records
234
-
235
- ```ts
236
- // Using an existing object
237
- await user.delete();
238
-
239
- // Using a record id
240
- await xata.db.users.delete('rec_1234abcdef');
241
- ```
242
-
243
- ### API Client
244
-
245
- 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...
246
-
247
- To communicate with the SDK we provide a constructor called `XataApiClient` that accepts an API token and an optional fetch implementation method.
248
-
249
- ```ts
250
- const api = new XataApiClient({ apiKey: process.env.XATA_API_KEY });
251
- ```
252
-
253
- 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`...).
254
-
255
- ```ts
256
- const { id: workspace } = await api.workspaces.createWorkspace({ name: 'example' });
257
- const { databaseName } = await api.database.createDatabase(workspace, 'database', { region: 'eu-west-1' });
258
-
259
- await api.branches.createBranch(workspace, databaseName, 'branch');
260
- await api.tables.createTable(workspace, databaseName, 'branch', 'table');
261
- await api.tables.setTableSchema(workspace, databaseName, 'branch', 'table', {
262
- columns: [{ name: 'email', type: 'string' }]
263
- });
264
-
265
- const { id: recordId } = await api.records.insertRecord(workspace, databaseName, 'branch', 'table', {
266
- email: 'example@foo.bar'
267
- });
268
-
269
- const record = await api.records.getRecord(workspace, databaseName, 'branch', 'table', recordId);
270
-
271
- await api.workspaces.deleteWorkspace(workspace);
272
- ```
273
-
274
- ## Deno support
275
-
276
- 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:
277
-
278
- ```ts
279
- import { buildClient, BaseClientOptions, XataRecord } from 'https://deno.land/x/xata/mod.ts';
280
- ```
7
+ You can find the SDK documentation [here](https://xata.io/docs/typescript-client/overview).