@xata.io/client 0.16.0 → 0.16.1
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 +10 -0
- package/dist/index.cjs +154 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +133 -11
- package/dist/index.mjs +150 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# @xata.io/client
|
2
2
|
|
3
|
+
## 0.16.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#531](https://github.com/xataio/client-ts/pull/531) [`e33d8fb`](https://github.com/xataio/client-ts/commit/e33d8fbca264d3ab1597ed698d5e79484dcba8a3) Thanks [@xata-bot](https://github.com/xata-bot)! - Add new method to list database metadata in the API client
|
8
|
+
|
9
|
+
* [#524](https://github.com/xataio/client-ts/pull/524) [`a3b1044`](https://github.com/xataio/client-ts/commit/a3b1044038c4ae73b4aacaa112818e69b7d380e1) Thanks [@SferaDev](https://github.com/SferaDev)! - Expose internal config information
|
10
|
+
|
11
|
+
- [#525](https://github.com/xataio/client-ts/pull/525) [`5f0f2c2`](https://github.com/xataio/client-ts/commit/5f0f2c2bb42da360e810f0a61ce360f8f8b07a04) Thanks [@xata-bot](https://github.com/xata-bot)! - Update dependencies
|
12
|
+
|
3
13
|
## 0.16.0
|
4
14
|
|
5
15
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
@@ -143,12 +143,14 @@ function getFetchImplementation(userFetch) {
|
|
143
143
|
const globalFetch = typeof fetch !== "undefined" ? fetch : void 0;
|
144
144
|
const fetchImpl = userFetch ?? globalFetch;
|
145
145
|
if (!fetchImpl) {
|
146
|
-
throw new Error(
|
146
|
+
throw new Error(
|
147
|
+
`The \`fetch\` option passed to the Xata client is resolving to a falsy value and may not be correctly imported.`
|
148
|
+
);
|
147
149
|
}
|
148
150
|
return fetchImpl;
|
149
151
|
}
|
150
152
|
|
151
|
-
const VERSION = "0.16.
|
153
|
+
const VERSION = "0.16.1";
|
152
154
|
|
153
155
|
class ErrorWithCause extends Error {
|
154
156
|
constructor(message, options) {
|
@@ -349,6 +351,11 @@ const deleteDatabase = (variables) => fetch$1({
|
|
349
351
|
method: "delete",
|
350
352
|
...variables
|
351
353
|
});
|
354
|
+
const getDatabaseMetadata = (variables) => fetch$1({
|
355
|
+
url: "/dbs/{dbName}/metadata",
|
356
|
+
method: "get",
|
357
|
+
...variables
|
358
|
+
});
|
352
359
|
const getGitBranchesMapping = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "get", ...variables });
|
353
360
|
const addGitBranchesEntry = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "post", ...variables });
|
354
361
|
const removeGitBranchesEntry = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "delete", ...variables });
|
@@ -487,6 +494,7 @@ const operationsByTag = {
|
|
487
494
|
getDatabaseList,
|
488
495
|
createDatabase,
|
489
496
|
deleteDatabase,
|
497
|
+
getDatabaseMetadata,
|
490
498
|
getGitBranchesMapping,
|
491
499
|
addGitBranchesEntry,
|
492
500
|
removeGitBranchesEntry,
|
@@ -759,6 +767,12 @@ class DatabaseApi {
|
|
759
767
|
...this.extraProps
|
760
768
|
});
|
761
769
|
}
|
770
|
+
getDatabaseMetadata(workspace, dbName) {
|
771
|
+
return operationsByTag.database.getDatabaseMetadata({
|
772
|
+
pathParams: { workspace, dbName },
|
773
|
+
...this.extraProps
|
774
|
+
});
|
775
|
+
}
|
762
776
|
getGitBranchesMapping(workspace, dbName) {
|
763
777
|
return operationsByTag.database.getGitBranchesMapping({
|
764
778
|
pathParams: { workspace, dbName },
|
@@ -1204,7 +1218,12 @@ const _Query = class {
|
|
1204
1218
|
return new _Query(__privateGet$5(this, _repository), __privateGet$5(this, _table$1), { sort }, __privateGet$5(this, _data));
|
1205
1219
|
}
|
1206
1220
|
select(columns) {
|
1207
|
-
return new _Query(
|
1221
|
+
return new _Query(
|
1222
|
+
__privateGet$5(this, _repository),
|
1223
|
+
__privateGet$5(this, _table$1),
|
1224
|
+
{ columns },
|
1225
|
+
__privateGet$5(this, _data)
|
1226
|
+
);
|
1208
1227
|
}
|
1209
1228
|
getPaginated(options = {}) {
|
1210
1229
|
const query = new _Query(__privateGet$5(this, _repository), __privateGet$5(this, _table$1), options, __privateGet$5(this, _data));
|
@@ -1329,7 +1348,7 @@ var __privateMethod$2 = (obj, member, method) => {
|
|
1329
1348
|
__accessCheck$4(obj, member, "access private method");
|
1330
1349
|
return method;
|
1331
1350
|
};
|
1332
|
-
var _table, _getFetchProps, _cache, _schemaTables$2, _insertRecordWithoutId, insertRecordWithoutId_fn, _insertRecordWithId, insertRecordWithId_fn, _bulkInsertTableRecords, bulkInsertTableRecords_fn, _updateRecordWithID, updateRecordWithID_fn, _upsertRecordWithID, upsertRecordWithID_fn, _deleteRecord, deleteRecord_fn, _setCacheQuery, setCacheQuery_fn, _getCacheQuery, getCacheQuery_fn, _getSchemaTables$1, getSchemaTables_fn$1;
|
1351
|
+
var _table, _getFetchProps, _db, _cache, _schemaTables$2, _insertRecordWithoutId, insertRecordWithoutId_fn, _insertRecordWithId, insertRecordWithId_fn, _bulkInsertTableRecords, bulkInsertTableRecords_fn, _updateRecordWithID, updateRecordWithID_fn, _upsertRecordWithID, upsertRecordWithID_fn, _deleteRecord, deleteRecord_fn, _setCacheQuery, setCacheQuery_fn, _getCacheQuery, getCacheQuery_fn, _getSchemaTables$1, getSchemaTables_fn$1;
|
1333
1352
|
class Repository extends Query {
|
1334
1353
|
}
|
1335
1354
|
class RestRepository extends Query {
|
@@ -1346,11 +1365,12 @@ class RestRepository extends Query {
|
|
1346
1365
|
__privateAdd$4(this, _getSchemaTables$1);
|
1347
1366
|
__privateAdd$4(this, _table, void 0);
|
1348
1367
|
__privateAdd$4(this, _getFetchProps, void 0);
|
1368
|
+
__privateAdd$4(this, _db, void 0);
|
1349
1369
|
__privateAdd$4(this, _cache, void 0);
|
1350
1370
|
__privateAdd$4(this, _schemaTables$2, void 0);
|
1351
1371
|
__privateSet$4(this, _table, options.table);
|
1352
1372
|
__privateSet$4(this, _getFetchProps, options.pluginOptions.getFetchProps);
|
1353
|
-
this
|
1373
|
+
__privateSet$4(this, _db, options.db);
|
1354
1374
|
__privateSet$4(this, _cache, options.pluginOptions.cache);
|
1355
1375
|
__privateSet$4(this, _schemaTables$2, options.schemaTables);
|
1356
1376
|
}
|
@@ -1402,7 +1422,7 @@ class RestRepository extends Query {
|
|
1402
1422
|
...fetchProps
|
1403
1423
|
});
|
1404
1424
|
const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
|
1405
|
-
return initObject(this
|
1425
|
+
return initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), response);
|
1406
1426
|
} catch (e) {
|
1407
1427
|
if (isObject(e) && e.status === 404) {
|
1408
1428
|
return null;
|
@@ -1487,7 +1507,7 @@ class RestRepository extends Query {
|
|
1487
1507
|
...fetchProps
|
1488
1508
|
});
|
1489
1509
|
const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
|
1490
|
-
return records.map((item) => initObject(this
|
1510
|
+
return records.map((item) => initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), item));
|
1491
1511
|
}
|
1492
1512
|
async query(query) {
|
1493
1513
|
const cacheQuery = await __privateMethod$2(this, _getCacheQuery, getCacheQuery_fn).call(this, query);
|
@@ -1507,13 +1527,14 @@ class RestRepository extends Query {
|
|
1507
1527
|
...fetchProps
|
1508
1528
|
});
|
1509
1529
|
const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
|
1510
|
-
const records = objects.map((record) => initObject(this
|
1530
|
+
const records = objects.map((record) => initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), record));
|
1511
1531
|
await __privateMethod$2(this, _setCacheQuery, setCacheQuery_fn).call(this, query, meta, records);
|
1512
1532
|
return new Page(query, meta, records);
|
1513
1533
|
}
|
1514
1534
|
}
|
1515
1535
|
_table = new WeakMap();
|
1516
1536
|
_getFetchProps = new WeakMap();
|
1537
|
+
_db = new WeakMap();
|
1517
1538
|
_cache = new WeakMap();
|
1518
1539
|
_schemaTables$2 = new WeakMap();
|
1519
1540
|
_insertRecordWithoutId = new WeakSet();
|
@@ -1531,7 +1552,7 @@ insertRecordWithoutId_fn = async function(object, columns = ["*"]) {
|
|
1531
1552
|
...fetchProps
|
1532
1553
|
});
|
1533
1554
|
const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
|
1534
|
-
return initObject(this
|
1555
|
+
return initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), response);
|
1535
1556
|
};
|
1536
1557
|
_insertRecordWithId = new WeakSet();
|
1537
1558
|
insertRecordWithId_fn = async function(recordId, object, columns = ["*"]) {
|
@@ -1549,7 +1570,7 @@ insertRecordWithId_fn = async function(recordId, object, columns = ["*"]) {
|
|
1549
1570
|
...fetchProps
|
1550
1571
|
});
|
1551
1572
|
const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
|
1552
|
-
return initObject(this
|
1573
|
+
return initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), response);
|
1553
1574
|
};
|
1554
1575
|
_bulkInsertTableRecords = new WeakSet();
|
1555
1576
|
bulkInsertTableRecords_fn = async function(objects, columns = ["*"]) {
|
@@ -1565,7 +1586,7 @@ bulkInsertTableRecords_fn = async function(objects, columns = ["*"]) {
|
|
1565
1586
|
throw new Error("Request included columns but server didn't include them");
|
1566
1587
|
}
|
1567
1588
|
const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
|
1568
|
-
return response.records?.map((item) => initObject(this
|
1589
|
+
return response.records?.map((item) => initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), item));
|
1569
1590
|
};
|
1570
1591
|
_updateRecordWithID = new WeakSet();
|
1571
1592
|
updateRecordWithID_fn = async function(recordId, object, columns = ["*"]) {
|
@@ -1578,7 +1599,7 @@ updateRecordWithID_fn = async function(recordId, object, columns = ["*"]) {
|
|
1578
1599
|
...fetchProps
|
1579
1600
|
});
|
1580
1601
|
const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
|
1581
|
-
return initObject(this
|
1602
|
+
return initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), response);
|
1582
1603
|
};
|
1583
1604
|
_upsertRecordWithID = new WeakSet();
|
1584
1605
|
upsertRecordWithID_fn = async function(recordId, object, columns = ["*"]) {
|
@@ -1590,7 +1611,7 @@ upsertRecordWithID_fn = async function(recordId, object, columns = ["*"]) {
|
|
1590
1611
|
...fetchProps
|
1591
1612
|
});
|
1592
1613
|
const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
|
1593
|
-
return initObject(this
|
1614
|
+
return initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), response);
|
1594
1615
|
};
|
1595
1616
|
_deleteRecord = new WeakSet();
|
1596
1617
|
deleteRecord_fn = async function(recordId) {
|
@@ -1782,16 +1803,19 @@ class SchemaPlugin extends XataPlugin {
|
|
1782
1803
|
__privateSet$2(this, _schemaTables$1, schemaTables);
|
1783
1804
|
}
|
1784
1805
|
build(pluginOptions) {
|
1785
|
-
const db = new Proxy(
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1806
|
+
const db = new Proxy(
|
1807
|
+
{},
|
1808
|
+
{
|
1809
|
+
get: (_target, table) => {
|
1810
|
+
if (!isString(table))
|
1811
|
+
throw new Error("Invalid table name");
|
1812
|
+
if (__privateGet$2(this, _tables)[table] === void 0) {
|
1813
|
+
__privateGet$2(this, _tables)[table] = new RestRepository({ db, pluginOptions, table, schemaTables: __privateGet$2(this, _schemaTables$1) });
|
1814
|
+
}
|
1815
|
+
return __privateGet$2(this, _tables)[table];
|
1791
1816
|
}
|
1792
|
-
return __privateGet$2(this, _tables)[table];
|
1793
1817
|
}
|
1794
|
-
|
1818
|
+
);
|
1795
1819
|
const tableNames = __privateGet$2(this, _schemaTables$1)?.map(({ name }) => name) ?? [];
|
1796
1820
|
for (const table of tableNames) {
|
1797
1821
|
db[table] = new RestRepository({ db, pluginOptions, table, schemaTables: __privateGet$2(this, _schemaTables$1) });
|
@@ -1905,9 +1929,13 @@ async function resolveXataBranch(gitBranch, options) {
|
|
1905
1929
|
const databaseURL = options?.databaseURL || getDatabaseURL();
|
1906
1930
|
const apiKey = options?.apiKey || getAPIKey();
|
1907
1931
|
if (!databaseURL)
|
1908
|
-
throw new Error(
|
1932
|
+
throw new Error(
|
1933
|
+
"A databaseURL was not defined. Either set the XATA_DATABASE_URL env variable or pass the argument explicitely"
|
1934
|
+
);
|
1909
1935
|
if (!apiKey)
|
1910
|
-
throw new Error(
|
1936
|
+
throw new Error(
|
1937
|
+
"An API key was not defined. Either set the XATA_API_KEY env variable or pass the argument explicitely"
|
1938
|
+
);
|
1911
1939
|
const [protocol, , host, , dbName] = databaseURL.split("/");
|
1912
1940
|
const [workspace] = host.split(".");
|
1913
1941
|
const { fallbackBranch } = getEnvironment();
|
@@ -1925,9 +1953,13 @@ async function getDatabaseBranch(branch, options) {
|
|
1925
1953
|
const databaseURL = options?.databaseURL || getDatabaseURL();
|
1926
1954
|
const apiKey = options?.apiKey || getAPIKey();
|
1927
1955
|
if (!databaseURL)
|
1928
|
-
throw new Error(
|
1956
|
+
throw new Error(
|
1957
|
+
"A databaseURL was not defined. Either set the XATA_DATABASE_URL env variable or pass the argument explicitely"
|
1958
|
+
);
|
1929
1959
|
if (!apiKey)
|
1930
|
-
throw new Error(
|
1960
|
+
throw new Error(
|
1961
|
+
"An API key was not defined. Either set the XATA_API_KEY env variable or pass the argument explicitely"
|
1962
|
+
);
|
1931
1963
|
const [protocol, , host, , database] = databaseURL.split("/");
|
1932
1964
|
const [workspace] = host.split(".");
|
1933
1965
|
const dbBranchName = `${database}:${branch}`;
|
@@ -1977,14 +2009,16 @@ var __privateMethod = (obj, member, method) => {
|
|
1977
2009
|
return method;
|
1978
2010
|
};
|
1979
2011
|
const buildClient = (plugins) => {
|
1980
|
-
var _branch, _parseOptions, parseOptions_fn, _getFetchProps, getFetchProps_fn, _evaluateBranch, evaluateBranch_fn, _a;
|
2012
|
+
var _branch, _options, _parseOptions, parseOptions_fn, _getFetchProps, getFetchProps_fn, _evaluateBranch, evaluateBranch_fn, _a;
|
1981
2013
|
return _a = class {
|
1982
2014
|
constructor(options = {}, schemaTables) {
|
1983
2015
|
__privateAdd(this, _parseOptions);
|
1984
2016
|
__privateAdd(this, _getFetchProps);
|
1985
2017
|
__privateAdd(this, _evaluateBranch);
|
1986
2018
|
__privateAdd(this, _branch, void 0);
|
2019
|
+
__privateAdd(this, _options, void 0);
|
1987
2020
|
const safeOptions = __privateMethod(this, _parseOptions, parseOptions_fn).call(this, options);
|
2021
|
+
__privateSet(this, _options, safeOptions);
|
1988
2022
|
const pluginOptions = {
|
1989
2023
|
getFetchProps: () => __privateMethod(this, _getFetchProps, getFetchProps_fn).call(this, safeOptions),
|
1990
2024
|
cache: safeOptions.cache
|
@@ -2006,7 +2040,12 @@ const buildClient = (plugins) => {
|
|
2006
2040
|
}
|
2007
2041
|
}
|
2008
2042
|
}
|
2009
|
-
|
2043
|
+
async getConfig() {
|
2044
|
+
const databaseURL = __privateGet(this, _options).databaseURL;
|
2045
|
+
const branch = await __privateGet(this, _options).branch();
|
2046
|
+
return { databaseURL, branch };
|
2047
|
+
}
|
2048
|
+
}, _branch = new WeakMap(), _options = new WeakMap(), _parseOptions = new WeakSet(), parseOptions_fn = function(options) {
|
2010
2049
|
const fetch = getFetchImplementation(options?.fetch);
|
2011
2050
|
const databaseURL = options?.databaseURL || getDatabaseURL();
|
2012
2051
|
const apiKey = options?.apiKey || getAPIKey();
|
@@ -2016,12 +2055,7 @@ const buildClient = (plugins) => {
|
|
2016
2055
|
throw new Error("Options databaseURL and apiKey are required");
|
2017
2056
|
}
|
2018
2057
|
return { fetch, databaseURL, apiKey, branch, cache };
|
2019
|
-
}, _getFetchProps = new WeakSet(), getFetchProps_fn = async function({
|
2020
|
-
fetch,
|
2021
|
-
apiKey,
|
2022
|
-
databaseURL,
|
2023
|
-
branch
|
2024
|
-
}) {
|
2058
|
+
}, _getFetchProps = new WeakSet(), getFetchProps_fn = async function({ fetch, apiKey, databaseURL, branch }) {
|
2025
2059
|
const branchValue = await __privateMethod(this, _evaluateBranch, evaluateBranch_fn).call(this, branch);
|
2026
2060
|
if (!branchValue)
|
2027
2061
|
throw new Error("Unable to resolve branch value");
|
@@ -2056,6 +2090,88 @@ const buildClient = (plugins) => {
|
|
2056
2090
|
class BaseClient extends buildClient() {
|
2057
2091
|
}
|
2058
2092
|
|
2093
|
+
const META = "__";
|
2094
|
+
const VALUE = "___";
|
2095
|
+
class Serializer {
|
2096
|
+
constructor() {
|
2097
|
+
this.classes = {};
|
2098
|
+
}
|
2099
|
+
add(clazz) {
|
2100
|
+
this.classes[clazz.name] = clazz;
|
2101
|
+
}
|
2102
|
+
toJSON(data) {
|
2103
|
+
function visit(obj) {
|
2104
|
+
if (Array.isArray(obj))
|
2105
|
+
return obj.map(visit);
|
2106
|
+
const type = typeof obj;
|
2107
|
+
if (type === "undefined")
|
2108
|
+
return { [META]: "undefined" };
|
2109
|
+
if (type === "bigint")
|
2110
|
+
return { [META]: "bigint", [VALUE]: obj.toString() };
|
2111
|
+
if (obj === null || type !== "object")
|
2112
|
+
return obj;
|
2113
|
+
const constructor = obj.constructor;
|
2114
|
+
const o = { [META]: constructor.name };
|
2115
|
+
for (const [key, value] of Object.entries(obj)) {
|
2116
|
+
o[key] = visit(value);
|
2117
|
+
}
|
2118
|
+
if (constructor === Date)
|
2119
|
+
o[VALUE] = obj.toISOString();
|
2120
|
+
if (constructor === Map)
|
2121
|
+
o[VALUE] = Object.fromEntries(obj);
|
2122
|
+
if (constructor === Set)
|
2123
|
+
o[VALUE] = [...obj];
|
2124
|
+
return o;
|
2125
|
+
}
|
2126
|
+
return JSON.stringify(visit(data));
|
2127
|
+
}
|
2128
|
+
fromJSON(json) {
|
2129
|
+
return JSON.parse(json, (key, value) => {
|
2130
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
2131
|
+
const { [META]: clazz, [VALUE]: val, ...rest } = value;
|
2132
|
+
const constructor = this.classes[clazz];
|
2133
|
+
if (constructor) {
|
2134
|
+
return Object.assign(Object.create(constructor.prototype), rest);
|
2135
|
+
}
|
2136
|
+
if (clazz === "Date")
|
2137
|
+
return new Date(val);
|
2138
|
+
if (clazz === "Set")
|
2139
|
+
return new Set(val);
|
2140
|
+
if (clazz === "Map")
|
2141
|
+
return new Map(Object.entries(val));
|
2142
|
+
if (clazz === "bigint")
|
2143
|
+
return BigInt(val);
|
2144
|
+
if (clazz === "undefined")
|
2145
|
+
return void 0;
|
2146
|
+
return rest;
|
2147
|
+
}
|
2148
|
+
return value;
|
2149
|
+
});
|
2150
|
+
}
|
2151
|
+
}
|
2152
|
+
const defaultSerializer = new Serializer();
|
2153
|
+
const serialize = (data) => {
|
2154
|
+
return defaultSerializer.toJSON(data);
|
2155
|
+
};
|
2156
|
+
const deserialize = (json) => {
|
2157
|
+
return defaultSerializer.fromJSON(json);
|
2158
|
+
};
|
2159
|
+
|
2160
|
+
function buildWorkerRunner(config) {
|
2161
|
+
return function xataWorker(name, _worker) {
|
2162
|
+
return async (...args) => {
|
2163
|
+
const url = process.env.NODE_ENV === "development" ? `http://localhost:64749/${name}` : `https://dispatcher.xata.workers.dev/${config.workspace}/${config.worker}/${name}`;
|
2164
|
+
const result = await fetch(url, {
|
2165
|
+
method: "POST",
|
2166
|
+
headers: { "Content-Type": "application/json" },
|
2167
|
+
body: serialize({ args })
|
2168
|
+
});
|
2169
|
+
const text = await result.text();
|
2170
|
+
return deserialize(text);
|
2171
|
+
};
|
2172
|
+
};
|
2173
|
+
}
|
2174
|
+
|
2059
2175
|
class XataError extends Error {
|
2060
2176
|
constructor(message, status) {
|
2061
2177
|
super(message);
|
@@ -2076,6 +2192,7 @@ exports.Repository = Repository;
|
|
2076
2192
|
exports.RestRepository = RestRepository;
|
2077
2193
|
exports.SchemaPlugin = SchemaPlugin;
|
2078
2194
|
exports.SearchPlugin = SearchPlugin;
|
2195
|
+
exports.Serializer = Serializer;
|
2079
2196
|
exports.SimpleCache = SimpleCache;
|
2080
2197
|
exports.XataApiClient = XataApiClient;
|
2081
2198
|
exports.XataApiPlugin = XataApiPlugin;
|
@@ -2085,6 +2202,7 @@ exports.acceptWorkspaceMemberInvite = acceptWorkspaceMemberInvite;
|
|
2085
2202
|
exports.addGitBranchesEntry = addGitBranchesEntry;
|
2086
2203
|
exports.addTableColumn = addTableColumn;
|
2087
2204
|
exports.buildClient = buildClient;
|
2205
|
+
exports.buildWorkerRunner = buildWorkerRunner;
|
2088
2206
|
exports.bulkInsertTableRecords = bulkInsertTableRecords;
|
2089
2207
|
exports.cancelWorkspaceMemberInvite = cancelWorkspaceMemberInvite;
|
2090
2208
|
exports.contains = contains;
|
@@ -2101,6 +2219,7 @@ exports.deleteTable = deleteTable;
|
|
2101
2219
|
exports.deleteUser = deleteUser;
|
2102
2220
|
exports.deleteUserAPIKey = deleteUserAPIKey;
|
2103
2221
|
exports.deleteWorkspace = deleteWorkspace;
|
2222
|
+
exports.deserialize = deserialize;
|
2104
2223
|
exports.endsWith = endsWith;
|
2105
2224
|
exports.executeBranchMigrationPlan = executeBranchMigrationPlan;
|
2106
2225
|
exports.exists = exists;
|
@@ -2116,6 +2235,7 @@ exports.getColumn = getColumn;
|
|
2116
2235
|
exports.getCurrentBranchDetails = getCurrentBranchDetails;
|
2117
2236
|
exports.getCurrentBranchName = getCurrentBranchName;
|
2118
2237
|
exports.getDatabaseList = getDatabaseList;
|
2238
|
+
exports.getDatabaseMetadata = getDatabaseMetadata;
|
2119
2239
|
exports.getDatabaseURL = getDatabaseURL;
|
2120
2240
|
exports.getGitBranchesMapping = getGitBranchesMapping;
|
2121
2241
|
exports.getRecord = getRecord;
|
@@ -2153,6 +2273,7 @@ exports.resendWorkspaceMemberInvite = resendWorkspaceMemberInvite;
|
|
2153
2273
|
exports.resolveBranch = resolveBranch;
|
2154
2274
|
exports.searchBranch = searchBranch;
|
2155
2275
|
exports.searchTable = searchTable;
|
2276
|
+
exports.serialize = serialize;
|
2156
2277
|
exports.setTableSchema = setTableSchema;
|
2157
2278
|
exports.startsWith = startsWith;
|
2158
2279
|
exports.updateBranchMetadata = updateBranchMetadata;
|