@xata.io/client 0.26.5 → 0.26.6

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.26.5 add-version /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.26.6 add-version /home/runner/work/client-ts/client-ts/packages/client
3
3
  > node ../../scripts/add-version-file.mjs
4
4
 
@@ -1,13 +1,13 @@
1
1
 
2
- > @xata.io/client@0.26.5 build /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.26.6 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
+ created dist/index.cjs in 1.3s
8
8
  
9
9
  src/index.ts → dist/index.mjs...
10
- created dist/index.mjs in 797ms
10
+ created dist/index.mjs in 843ms
11
11
  
12
12
  src/index.ts → dist/index.d.ts...
13
- created dist/index.d.ts in 8s
13
+ created dist/index.d.ts in 10.3s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @xata.io/client
2
2
 
3
+ ## 0.26.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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`
8
+
9
+ - [#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
10
+
3
11
  ## 0.26.5
4
12
 
5
13
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -536,7 +536,7 @@ function defaultOnOpen(response) {
536
536
  }
537
537
  }
538
538
 
539
- const VERSION = "0.26.5";
539
+ const VERSION = "0.26.6";
540
540
 
541
541
  var __defProp$7 = Object.defineProperty;
542
542
  var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -4176,13 +4176,6 @@ transformObjectToApi_fn = async function(object) {
4176
4176
  }
4177
4177
  return result;
4178
4178
  };
4179
- const removeLinksFromObject = (object) => {
4180
- return Object.entries(object).reduce((acc, [key, value]) => {
4181
- if (key === "xata")
4182
- return acc;
4183
- return { ...acc, [key]: isIdentifiable(value) ? value.id : value };
4184
- }, {});
4185
- };
4186
4179
  const initObject = (db, schemaTables, table, object, selectedColumns) => {
4187
4180
  const data = {};
4188
4181
  const { xata, ...rest } = object ?? {};
@@ -4249,7 +4242,6 @@ const initObject = (db, schemaTables, table, object, selectedColumns) => {
4249
4242
  }
4250
4243
  }
4251
4244
  const record = { ...data };
4252
- const serializable = { xata, ...removeLinksFromObject(data) };
4253
4245
  const metadata = xata !== void 0 ? { ...xata, createdAt: new Date(xata.createdAt), updatedAt: new Date(xata.updatedAt) } : void 0;
4254
4246
  record.read = function(columns2) {
4255
4247
  return db[table].read(record["id"], columns2);
@@ -4272,10 +4264,10 @@ const initObject = (db, schemaTables, table, object, selectedColumns) => {
4272
4264
  return record.xata;
4273
4265
  };
4274
4266
  record.toSerializable = function() {
4275
- return JSON.parse(JSON.stringify(serializable));
4267
+ return JSON.parse(JSON.stringify(record));
4276
4268
  };
4277
4269
  record.toString = function() {
4278
- return JSON.stringify(serializable);
4270
+ return JSON.stringify(record);
4279
4271
  };
4280
4272
  for (const prop of ["read", "update", "replace", "delete", "getMetadata", "toSerializable", "toString"]) {
4281
4273
  Object.defineProperty(record, prop, { enumerable: false });