@xata.io/client 0.0.0-alpha.vf170c2c → 0.0.0-alpha.vf2043e7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @xata.io/client
2
2
 
3
+ ## 0.8.4
4
+
5
+ ### Patch Changes
6
+
7
+ - dd958a4: Fix search results return type
8
+ - f5ec686: Make XataApiClientOptions optional
9
+
3
10
  ## 0.8.3
4
11
 
5
12
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1385,9 +1385,10 @@ var __privateAdd$2 = (obj, member, value) => {
1385
1385
  };
1386
1386
  var _tables;
1387
1387
  class SchemaPlugin extends XataPlugin {
1388
- constructor(links) {
1388
+ constructor(links, tableNames) {
1389
1389
  super();
1390
1390
  this.links = links;
1391
+ this.tableNames = tableNames;
1391
1392
  __privateAdd$2(this, _tables, {});
1392
1393
  }
1393
1394
  build(options) {
@@ -1402,6 +1403,9 @@ class SchemaPlugin extends XataPlugin {
1402
1403
  return __privateGet$1(this, _tables)[table];
1403
1404
  }
1404
1405
  });
1406
+ for (const table of this.tableNames ?? []) {
1407
+ db[table] = new RestRepository({ db, getFetchProps, table, links });
1408
+ }
1405
1409
  return db;
1406
1410
  }
1407
1411
  }
@@ -1568,13 +1572,13 @@ var __privateMethod = (obj, member, method) => {
1568
1572
  const buildClient = (plugins) => {
1569
1573
  var _branch, _parseOptions, parseOptions_fn, _getFetchProps, getFetchProps_fn, _evaluateBranch, evaluateBranch_fn, _a;
1570
1574
  return _a = class {
1571
- constructor(options = {}, links) {
1575
+ constructor(options = {}, links, tables) {
1572
1576
  __privateAdd(this, _parseOptions);
1573
1577
  __privateAdd(this, _getFetchProps);
1574
1578
  __privateAdd(this, _evaluateBranch);
1575
1579
  __privateAdd(this, _branch, void 0);
1576
1580
  const safeOptions = __privateMethod(this, _parseOptions, parseOptions_fn).call(this, options);
1577
- const db = new SchemaPlugin(links).build({ getFetchProps: () => __privateMethod(this, _getFetchProps, getFetchProps_fn).call(this, safeOptions) });
1581
+ const db = new SchemaPlugin(links, tables).build({ getFetchProps: () => __privateMethod(this, _getFetchProps, getFetchProps_fn).call(this, safeOptions) });
1578
1582
  const search = new SearchPlugin(db, links ?? {}).build({
1579
1583
  getFetchProps: () => __privateMethod(this, _getFetchProps, getFetchProps_fn).call(this, safeOptions)
1580
1584
  });