@xata.io/client 0.14.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/dist/index.mjs CHANGED
@@ -13,6 +13,9 @@ function isDefined(value) {
13
13
  function isString(value) {
14
14
  return isDefined(value) && typeof value === "string";
15
15
  }
16
+ function isStringArray(value) {
17
+ return isDefined(value) && Array.isArray(value) && value.every(isString);
18
+ }
16
19
  function toBase64(value) {
17
20
  try {
18
21
  return btoa(value);
@@ -85,18 +88,20 @@ function getGlobalFallbackBranch() {
85
88
  }
86
89
  async function getGitBranch() {
87
90
  const cmd = ["git", "branch", "--show-current"];
91
+ const fullCmd = cmd.join(" ");
88
92
  const nodeModule = ["child", "process"].join("_");
93
+ const execOptions = { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] };
89
94
  try {
90
95
  if (typeof require === "function") {
91
- return require(nodeModule).execSync(cmd.join(" "), { encoding: "utf-8" }).trim();
96
+ return require(nodeModule).execSync(fullCmd, execOptions).trim();
92
97
  }
93
98
  const { execSync } = await import(nodeModule);
94
- return execSync(cmd.join(" "), { encoding: "utf-8" }).toString().trim();
99
+ return execSync(fullCmd, execOptions).toString().trim();
95
100
  } catch (err) {
96
101
  }
97
102
  try {
98
103
  if (isObject(Deno)) {
99
- const process2 = Deno.run({ cmd, stdout: "piped", stderr: "piped" });
104
+ const process2 = Deno.run({ cmd, stdout: "piped", stderr: "null" });
100
105
  return new TextDecoder().decode(await process2.output()).trim();
101
106
  }
102
107
  } catch (err) {
@@ -116,12 +121,14 @@ function getFetchImplementation(userFetch) {
116
121
  const globalFetch = typeof fetch !== "undefined" ? fetch : void 0;
117
122
  const fetchImpl = userFetch ?? globalFetch;
118
123
  if (!fetchImpl) {
119
- throw new Error(`The \`fetch\` option passed to the Xata client is resolving to a falsy value and may not be correctly imported.`);
124
+ throw new Error(
125
+ `The \`fetch\` option passed to the Xata client is resolving to a falsy value and may not be correctly imported.`
126
+ );
120
127
  }
121
128
  return fetchImpl;
122
129
  }
123
130
 
124
- const VERSION = "0.14.0";
131
+ const VERSION = "0.16.1";
125
132
 
126
133
  class ErrorWithCause extends Error {
127
134
  constructor(message, options) {
@@ -286,6 +293,7 @@ const removeWorkspaceMember = (variables) => fetch$1({
286
293
  ...variables
287
294
  });
288
295
  const inviteWorkspaceMember = (variables) => fetch$1({ url: "/workspaces/{workspaceId}/invites", method: "post", ...variables });
296
+ const updateWorkspaceMemberInvite = (variables) => fetch$1({ url: "/workspaces/{workspaceId}/invites/{inviteId}", method: "patch", ...variables });
289
297
  const cancelWorkspaceMemberInvite = (variables) => fetch$1({
290
298
  url: "/workspaces/{workspaceId}/invites/{inviteId}",
291
299
  method: "delete",
@@ -321,6 +329,11 @@ const deleteDatabase = (variables) => fetch$1({
321
329
  method: "delete",
322
330
  ...variables
323
331
  });
332
+ const getDatabaseMetadata = (variables) => fetch$1({
333
+ url: "/dbs/{dbName}/metadata",
334
+ method: "get",
335
+ ...variables
336
+ });
324
337
  const getGitBranchesMapping = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "get", ...variables });
325
338
  const addGitBranchesEntry = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "post", ...variables });
326
339
  const removeGitBranchesEntry = (variables) => fetch$1({ url: "/dbs/{dbName}/gitBranches", method: "delete", ...variables });
@@ -334,11 +347,7 @@ const getBranchDetails = (variables) => fetch$1({
334
347
  method: "get",
335
348
  ...variables
336
349
  });
337
- const createBranch = (variables) => fetch$1({
338
- url: "/db/{dbBranchName}",
339
- method: "put",
340
- ...variables
341
- });
350
+ const createBranch = (variables) => fetch$1({ url: "/db/{dbBranchName}", method: "put", ...variables });
342
351
  const deleteBranch = (variables) => fetch$1({
343
352
  url: "/db/{dbBranchName}",
344
353
  method: "delete",
@@ -412,11 +421,7 @@ const updateColumn = (variables) => fetch$1({
412
421
  method: "patch",
413
422
  ...variables
414
423
  });
415
- const insertRecord = (variables) => fetch$1({
416
- url: "/db/{dbBranchName}/tables/{tableName}/data",
417
- method: "post",
418
- ...variables
419
- });
424
+ const insertRecord = (variables) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data", method: "post", ...variables });
420
425
  const insertRecordWithID = (variables) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}", method: "put", ...variables });
421
426
  const updateRecordWithID = (variables) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}", method: "patch", ...variables });
422
427
  const upsertRecordWithID = (variables) => fetch$1({ url: "/db/{dbBranchName}/tables/{tableName}/data/{recordId}", method: "post", ...variables });
@@ -458,6 +463,7 @@ const operationsByTag = {
458
463
  updateWorkspaceMemberRole,
459
464
  removeWorkspaceMember,
460
465
  inviteWorkspaceMember,
466
+ updateWorkspaceMemberInvite,
461
467
  cancelWorkspaceMemberInvite,
462
468
  resendWorkspaceMemberInvite,
463
469
  acceptWorkspaceMemberInvite
@@ -466,6 +472,7 @@ const operationsByTag = {
466
472
  getDatabaseList,
467
473
  createDatabase,
468
474
  deleteDatabase,
475
+ getDatabaseMetadata,
469
476
  getGitBranchesMapping,
470
477
  addGitBranchesEntry,
471
478
  removeGitBranchesEntry,
@@ -689,6 +696,13 @@ class WorkspaceApi {
689
696
  ...this.extraProps
690
697
  });
691
698
  }
699
+ updateWorkspaceMemberInvite(workspaceId, inviteId, role) {
700
+ return operationsByTag.workspaces.updateWorkspaceMemberInvite({
701
+ pathParams: { workspaceId, inviteId },
702
+ body: { role },
703
+ ...this.extraProps
704
+ });
705
+ }
692
706
  cancelWorkspaceMemberInvite(workspaceId, inviteId) {
693
707
  return operationsByTag.workspaces.cancelWorkspaceMemberInvite({
694
708
  pathParams: { workspaceId, inviteId },
@@ -731,6 +745,12 @@ class DatabaseApi {
731
745
  ...this.extraProps
732
746
  });
733
747
  }
748
+ getDatabaseMetadata(workspace, dbName) {
749
+ return operationsByTag.database.getDatabaseMetadata({
750
+ pathParams: { workspace, dbName },
751
+ ...this.extraProps
752
+ });
753
+ }
734
754
  getGitBranchesMapping(workspace, dbName) {
735
755
  return operationsByTag.database.getGitBranchesMapping({
736
756
  pathParams: { workspace, dbName },
@@ -903,9 +923,10 @@ class RecordsApi {
903
923
  constructor(extraProps) {
904
924
  this.extraProps = extraProps;
905
925
  }
906
- insertRecord(workspace, database, branch, tableName, record) {
926
+ insertRecord(workspace, database, branch, tableName, record, options = {}) {
907
927
  return operationsByTag.records.insertRecord({
908
928
  pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName },
929
+ queryParams: options,
909
930
  body: record,
910
931
  ...this.extraProps
911
932
  });
@@ -934,21 +955,24 @@ class RecordsApi {
934
955
  ...this.extraProps
935
956
  });
936
957
  }
937
- deleteRecord(workspace, database, branch, tableName, recordId) {
958
+ deleteRecord(workspace, database, branch, tableName, recordId, options = {}) {
938
959
  return operationsByTag.records.deleteRecord({
939
960
  pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName, recordId },
961
+ queryParams: options,
940
962
  ...this.extraProps
941
963
  });
942
964
  }
943
965
  getRecord(workspace, database, branch, tableName, recordId, options = {}) {
944
966
  return operationsByTag.records.getRecord({
945
967
  pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName, recordId },
968
+ queryParams: options,
946
969
  ...this.extraProps
947
970
  });
948
971
  }
949
- bulkInsertTableRecords(workspace, database, branch, tableName, records) {
972
+ bulkInsertTableRecords(workspace, database, branch, tableName, records, options = {}) {
950
973
  return operationsByTag.records.bulkInsertTableRecords({
951
974
  pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName },
975
+ queryParams: options,
952
976
  body: { records },
953
977
  ...this.extraProps
954
978
  });
@@ -1172,7 +1196,12 @@ const _Query = class {
1172
1196
  return new _Query(__privateGet$5(this, _repository), __privateGet$5(this, _table$1), { sort }, __privateGet$5(this, _data));
1173
1197
  }
1174
1198
  select(columns) {
1175
- return new _Query(__privateGet$5(this, _repository), __privateGet$5(this, _table$1), { columns }, __privateGet$5(this, _data));
1199
+ return new _Query(
1200
+ __privateGet$5(this, _repository),
1201
+ __privateGet$5(this, _table$1),
1202
+ { columns },
1203
+ __privateGet$5(this, _data)
1204
+ );
1176
1205
  }
1177
1206
  getPaginated(options = {}) {
1178
1207
  const query = new _Query(__privateGet$5(this, _repository), __privateGet$5(this, _table$1), options, __privateGet$5(this, _data));
@@ -1297,7 +1326,7 @@ var __privateMethod$2 = (obj, member, method) => {
1297
1326
  __accessCheck$4(obj, member, "access private method");
1298
1327
  return method;
1299
1328
  };
1300
- var _table, _getFetchProps, _cache, _schemaTables$2, _insertRecordWithoutId, insertRecordWithoutId_fn, _insertRecordWithId, insertRecordWithId_fn, _bulkInsertTableRecords, bulkInsertTableRecords_fn, _updateRecordWithID, updateRecordWithID_fn, _upsertRecordWithID, upsertRecordWithID_fn, _deleteRecord, deleteRecord_fn, _invalidateCache, invalidateCache_fn, _setCacheRecord, setCacheRecord_fn, _getCacheRecord, getCacheRecord_fn, _setCacheQuery, setCacheQuery_fn, _getCacheQuery, getCacheQuery_fn, _getSchemaTables$1, getSchemaTables_fn$1;
1329
+ 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;
1301
1330
  class Repository extends Query {
1302
1331
  }
1303
1332
  class RestRepository extends Query {
@@ -1309,71 +1338,69 @@ class RestRepository extends Query {
1309
1338
  __privateAdd$4(this, _updateRecordWithID);
1310
1339
  __privateAdd$4(this, _upsertRecordWithID);
1311
1340
  __privateAdd$4(this, _deleteRecord);
1312
- __privateAdd$4(this, _invalidateCache);
1313
- __privateAdd$4(this, _setCacheRecord);
1314
- __privateAdd$4(this, _getCacheRecord);
1315
1341
  __privateAdd$4(this, _setCacheQuery);
1316
1342
  __privateAdd$4(this, _getCacheQuery);
1317
1343
  __privateAdd$4(this, _getSchemaTables$1);
1318
1344
  __privateAdd$4(this, _table, void 0);
1319
1345
  __privateAdd$4(this, _getFetchProps, void 0);
1346
+ __privateAdd$4(this, _db, void 0);
1320
1347
  __privateAdd$4(this, _cache, void 0);
1321
1348
  __privateAdd$4(this, _schemaTables$2, void 0);
1322
1349
  __privateSet$4(this, _table, options.table);
1323
1350
  __privateSet$4(this, _getFetchProps, options.pluginOptions.getFetchProps);
1324
- this.db = options.db;
1351
+ __privateSet$4(this, _db, options.db);
1325
1352
  __privateSet$4(this, _cache, options.pluginOptions.cache);
1326
1353
  __privateSet$4(this, _schemaTables$2, options.schemaTables);
1327
1354
  }
1328
- async create(a, b) {
1355
+ async create(a, b, c) {
1329
1356
  if (Array.isArray(a)) {
1330
1357
  if (a.length === 0)
1331
1358
  return [];
1332
- const records = await __privateMethod$2(this, _bulkInsertTableRecords, bulkInsertTableRecords_fn).call(this, a);
1333
- await Promise.all(records.map((record) => __privateMethod$2(this, _setCacheRecord, setCacheRecord_fn).call(this, record)));
1334
- return records;
1359
+ const columns = isStringArray(b) ? b : void 0;
1360
+ return __privateMethod$2(this, _bulkInsertTableRecords, bulkInsertTableRecords_fn).call(this, a, columns);
1335
1361
  }
1336
1362
  if (isString(a) && isObject(b)) {
1337
1363
  if (a === "")
1338
1364
  throw new Error("The id can't be empty");
1339
- const record = await __privateMethod$2(this, _insertRecordWithId, insertRecordWithId_fn).call(this, a, b);
1340
- await __privateMethod$2(this, _setCacheRecord, setCacheRecord_fn).call(this, record);
1341
- return record;
1365
+ const columns = isStringArray(c) ? c : void 0;
1366
+ return __privateMethod$2(this, _insertRecordWithId, insertRecordWithId_fn).call(this, a, b, columns);
1342
1367
  }
1343
1368
  if (isObject(a) && isString(a.id)) {
1344
1369
  if (a.id === "")
1345
1370
  throw new Error("The id can't be empty");
1346
- const record = await __privateMethod$2(this, _insertRecordWithId, insertRecordWithId_fn).call(this, a.id, { ...a, id: void 0 });
1347
- await __privateMethod$2(this, _setCacheRecord, setCacheRecord_fn).call(this, record);
1348
- return record;
1371
+ const columns = isStringArray(b) ? b : void 0;
1372
+ return __privateMethod$2(this, _insertRecordWithId, insertRecordWithId_fn).call(this, a.id, { ...a, id: void 0 }, columns);
1349
1373
  }
1350
1374
  if (isObject(a)) {
1351
- const record = await __privateMethod$2(this, _insertRecordWithoutId, insertRecordWithoutId_fn).call(this, a);
1352
- await __privateMethod$2(this, _setCacheRecord, setCacheRecord_fn).call(this, record);
1353
- return record;
1375
+ const columns = isStringArray(b) ? b : void 0;
1376
+ return __privateMethod$2(this, _insertRecordWithoutId, insertRecordWithoutId_fn).call(this, a, columns);
1354
1377
  }
1355
1378
  throw new Error("Invalid arguments for create method");
1356
1379
  }
1357
- async read(a) {
1380
+ async read(a, b) {
1381
+ const columns = isStringArray(b) ? b : ["*"];
1358
1382
  if (Array.isArray(a)) {
1359
1383
  if (a.length === 0)
1360
1384
  return [];
1361
1385
  const ids = a.map((item) => isString(item) ? item : item.id).filter((id2) => isString(id2));
1362
- return this.getAll({ filter: { id: { $any: ids } } });
1386
+ const finalObjects = await this.getAll({ filter: { id: { $any: ids } }, columns });
1387
+ const dictionary = finalObjects.reduce((acc, object) => {
1388
+ acc[object.id] = object;
1389
+ return acc;
1390
+ }, {});
1391
+ return ids.map((id2) => dictionary[id2] ?? null);
1363
1392
  }
1364
1393
  const id = isString(a) ? a : a.id;
1365
1394
  if (isString(id)) {
1366
- const cacheRecord = await __privateMethod$2(this, _getCacheRecord, getCacheRecord_fn).call(this, id);
1367
- if (cacheRecord)
1368
- return cacheRecord;
1369
1395
  const fetchProps = await __privateGet$4(this, _getFetchProps).call(this);
1370
1396
  try {
1371
1397
  const response = await getRecord({
1372
1398
  pathParams: { workspace: "{workspaceId}", dbBranchName: "{dbBranch}", tableName: __privateGet$4(this, _table), recordId: id },
1399
+ queryParams: { columns },
1373
1400
  ...fetchProps
1374
1401
  });
1375
1402
  const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
1376
- return initObject(this.db, schemaTables, __privateGet$4(this, _table), response);
1403
+ return initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), response);
1377
1404
  } catch (e) {
1378
1405
  if (isObject(e) && e.status === 404) {
1379
1406
  return null;
@@ -1381,50 +1408,45 @@ class RestRepository extends Query {
1381
1408
  throw e;
1382
1409
  }
1383
1410
  }
1411
+ return null;
1384
1412
  }
1385
- async update(a, b) {
1413
+ async update(a, b, c) {
1386
1414
  if (Array.isArray(a)) {
1387
1415
  if (a.length === 0)
1388
1416
  return [];
1389
1417
  if (a.length > 100) {
1390
1418
  console.warn("Bulk update operation is not optimized in the Xata API yet, this request might be slow");
1391
1419
  }
1392
- return Promise.all(a.map((object) => this.update(object)));
1420
+ const columns = isStringArray(b) ? b : ["*"];
1421
+ return Promise.all(a.map((object) => this.update(object, columns)));
1393
1422
  }
1394
1423
  if (isString(a) && isObject(b)) {
1395
- await __privateMethod$2(this, _invalidateCache, invalidateCache_fn).call(this, a);
1396
- const record = await __privateMethod$2(this, _updateRecordWithID, updateRecordWithID_fn).call(this, a, b);
1397
- await __privateMethod$2(this, _setCacheRecord, setCacheRecord_fn).call(this, record);
1398
- return record;
1424
+ const columns = isStringArray(c) ? c : void 0;
1425
+ return __privateMethod$2(this, _updateRecordWithID, updateRecordWithID_fn).call(this, a, b, columns);
1399
1426
  }
1400
1427
  if (isObject(a) && isString(a.id)) {
1401
- await __privateMethod$2(this, _invalidateCache, invalidateCache_fn).call(this, a.id);
1402
- const record = await __privateMethod$2(this, _updateRecordWithID, updateRecordWithID_fn).call(this, a.id, { ...a, id: void 0 });
1403
- await __privateMethod$2(this, _setCacheRecord, setCacheRecord_fn).call(this, record);
1404
- return record;
1428
+ const columns = isStringArray(b) ? b : void 0;
1429
+ return __privateMethod$2(this, _updateRecordWithID, updateRecordWithID_fn).call(this, a.id, { ...a, id: void 0 }, columns);
1405
1430
  }
1406
1431
  throw new Error("Invalid arguments for update method");
1407
1432
  }
1408
- async createOrUpdate(a, b) {
1433
+ async createOrUpdate(a, b, c) {
1409
1434
  if (Array.isArray(a)) {
1410
1435
  if (a.length === 0)
1411
1436
  return [];
1412
1437
  if (a.length > 100) {
1413
1438
  console.warn("Bulk update operation is not optimized in the Xata API yet, this request might be slow");
1414
1439
  }
1415
- return Promise.all(a.map((object) => this.createOrUpdate(object)));
1440
+ const columns = isStringArray(b) ? b : ["*"];
1441
+ return Promise.all(a.map((object) => this.createOrUpdate(object, columns)));
1416
1442
  }
1417
1443
  if (isString(a) && isObject(b)) {
1418
- await __privateMethod$2(this, _invalidateCache, invalidateCache_fn).call(this, a);
1419
- const record = await __privateMethod$2(this, _upsertRecordWithID, upsertRecordWithID_fn).call(this, a, b);
1420
- await __privateMethod$2(this, _setCacheRecord, setCacheRecord_fn).call(this, record);
1421
- return record;
1444
+ const columns = isStringArray(c) ? c : void 0;
1445
+ return __privateMethod$2(this, _upsertRecordWithID, upsertRecordWithID_fn).call(this, a, b, columns);
1422
1446
  }
1423
1447
  if (isObject(a) && isString(a.id)) {
1424
- await __privateMethod$2(this, _invalidateCache, invalidateCache_fn).call(this, a.id);
1425
- const record = await __privateMethod$2(this, _upsertRecordWithID, upsertRecordWithID_fn).call(this, a.id, { ...a, id: void 0 });
1426
- await __privateMethod$2(this, _setCacheRecord, setCacheRecord_fn).call(this, record);
1427
- return record;
1448
+ const columns = isStringArray(c) ? c : void 0;
1449
+ return __privateMethod$2(this, _upsertRecordWithID, upsertRecordWithID_fn).call(this, a.id, { ...a, id: void 0 }, columns);
1428
1450
  }
1429
1451
  throw new Error("Invalid arguments for createOrUpdate method");
1430
1452
  }
@@ -1440,12 +1462,10 @@ class RestRepository extends Query {
1440
1462
  }
1441
1463
  if (isString(a)) {
1442
1464
  await __privateMethod$2(this, _deleteRecord, deleteRecord_fn).call(this, a);
1443
- await __privateMethod$2(this, _invalidateCache, invalidateCache_fn).call(this, a);
1444
1465
  return;
1445
1466
  }
1446
1467
  if (isObject(a) && isString(a.id)) {
1447
1468
  await __privateMethod$2(this, _deleteRecord, deleteRecord_fn).call(this, a.id);
1448
- await __privateMethod$2(this, _invalidateCache, invalidateCache_fn).call(this, a.id);
1449
1469
  return;
1450
1470
  }
1451
1471
  throw new Error("Invalid arguments for delete method");
@@ -1457,13 +1477,15 @@ class RestRepository extends Query {
1457
1477
  body: {
1458
1478
  query,
1459
1479
  fuzziness: options.fuzziness,
1480
+ prefix: options.prefix,
1460
1481
  highlight: options.highlight,
1461
- filter: options.filter
1482
+ filter: options.filter,
1483
+ boosters: options.boosters
1462
1484
  },
1463
1485
  ...fetchProps
1464
1486
  });
1465
1487
  const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
1466
- return records.map((item) => initObject(this.db, schemaTables, __privateGet$4(this, _table), item));
1488
+ return records.map((item) => initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), item));
1467
1489
  }
1468
1490
  async query(query) {
1469
1491
  const cacheQuery = await __privateMethod$2(this, _getCacheQuery, getCacheQuery_fn).call(this, query);
@@ -1483,17 +1505,18 @@ class RestRepository extends Query {
1483
1505
  ...fetchProps
1484
1506
  });
1485
1507
  const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
1486
- const records = objects.map((record) => initObject(this.db, schemaTables, __privateGet$4(this, _table), record));
1508
+ const records = objects.map((record) => initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), record));
1487
1509
  await __privateMethod$2(this, _setCacheQuery, setCacheQuery_fn).call(this, query, meta, records);
1488
1510
  return new Page(query, meta, records);
1489
1511
  }
1490
1512
  }
1491
1513
  _table = new WeakMap();
1492
1514
  _getFetchProps = new WeakMap();
1515
+ _db = new WeakMap();
1493
1516
  _cache = new WeakMap();
1494
1517
  _schemaTables$2 = new WeakMap();
1495
1518
  _insertRecordWithoutId = new WeakSet();
1496
- insertRecordWithoutId_fn = async function(object) {
1519
+ insertRecordWithoutId_fn = async function(object, columns = ["*"]) {
1497
1520
  const fetchProps = await __privateGet$4(this, _getFetchProps).call(this);
1498
1521
  const record = transformObjectLinks(object);
1499
1522
  const response = await insertRecord({
@@ -1502,17 +1525,15 @@ insertRecordWithoutId_fn = async function(object) {
1502
1525
  dbBranchName: "{dbBranch}",
1503
1526
  tableName: __privateGet$4(this, _table)
1504
1527
  },
1528
+ queryParams: { columns },
1505
1529
  body: record,
1506
1530
  ...fetchProps
1507
1531
  });
1508
- const finalObject = await this.read(response.id);
1509
- if (!finalObject) {
1510
- throw new Error("The server failed to save the record");
1511
- }
1512
- return finalObject;
1532
+ const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
1533
+ return initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), response);
1513
1534
  };
1514
1535
  _insertRecordWithId = new WeakSet();
1515
- insertRecordWithId_fn = async function(recordId, object) {
1536
+ insertRecordWithId_fn = async function(recordId, object, columns = ["*"]) {
1516
1537
  const fetchProps = await __privateGet$4(this, _getFetchProps).call(this);
1517
1538
  const record = transformObjectLinks(object);
1518
1539
  const response = await insertRecordWithID({
@@ -1523,60 +1544,52 @@ insertRecordWithId_fn = async function(recordId, object) {
1523
1544
  recordId
1524
1545
  },
1525
1546
  body: record,
1526
- queryParams: { createOnly: true },
1547
+ queryParams: { createOnly: true, columns },
1527
1548
  ...fetchProps
1528
1549
  });
1529
- const finalObject = await this.read(response.id);
1530
- if (!finalObject) {
1531
- throw new Error("The server failed to save the record");
1532
- }
1533
- return finalObject;
1550
+ const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
1551
+ return initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), response);
1534
1552
  };
1535
1553
  _bulkInsertTableRecords = new WeakSet();
1536
- bulkInsertTableRecords_fn = async function(objects) {
1554
+ bulkInsertTableRecords_fn = async function(objects, columns = ["*"]) {
1537
1555
  const fetchProps = await __privateGet$4(this, _getFetchProps).call(this);
1538
1556
  const records = objects.map((object) => transformObjectLinks(object));
1539
- const { recordIDs } = await bulkInsertTableRecords({
1557
+ const response = await bulkInsertTableRecords({
1540
1558
  pathParams: { workspace: "{workspaceId}", dbBranchName: "{dbBranch}", tableName: __privateGet$4(this, _table) },
1559
+ queryParams: { columns },
1541
1560
  body: { records },
1542
1561
  ...fetchProps
1543
1562
  });
1544
- const finalObjects = await this.read(recordIDs);
1545
- if (finalObjects.length !== objects.length) {
1546
- throw new Error("The server failed to save some records");
1563
+ if (!isResponseWithRecords(response)) {
1564
+ throw new Error("Request included columns but server didn't include them");
1547
1565
  }
1548
- const dictionary = finalObjects.reduce((acc, object) => {
1549
- acc[object.id] = object;
1550
- return acc;
1551
- }, {});
1552
- return recordIDs.map((id) => dictionary[id]);
1566
+ const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
1567
+ return response.records?.map((item) => initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), item));
1553
1568
  };
1554
1569
  _updateRecordWithID = new WeakSet();
1555
- updateRecordWithID_fn = async function(recordId, object) {
1570
+ updateRecordWithID_fn = async function(recordId, object, columns = ["*"]) {
1556
1571
  const fetchProps = await __privateGet$4(this, _getFetchProps).call(this);
1557
1572
  const record = transformObjectLinks(object);
1558
1573
  const response = await updateRecordWithID({
1559
1574
  pathParams: { workspace: "{workspaceId}", dbBranchName: "{dbBranch}", tableName: __privateGet$4(this, _table), recordId },
1575
+ queryParams: { columns },
1560
1576
  body: record,
1561
1577
  ...fetchProps
1562
1578
  });
1563
- const item = await this.read(response.id);
1564
- if (!item)
1565
- throw new Error("The server failed to save the record");
1566
- return item;
1579
+ const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
1580
+ return initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), response);
1567
1581
  };
1568
1582
  _upsertRecordWithID = new WeakSet();
1569
- upsertRecordWithID_fn = async function(recordId, object) {
1583
+ upsertRecordWithID_fn = async function(recordId, object, columns = ["*"]) {
1570
1584
  const fetchProps = await __privateGet$4(this, _getFetchProps).call(this);
1571
1585
  const response = await upsertRecordWithID({
1572
1586
  pathParams: { workspace: "{workspaceId}", dbBranchName: "{dbBranch}", tableName: __privateGet$4(this, _table), recordId },
1587
+ queryParams: { columns },
1573
1588
  body: object,
1574
1589
  ...fetchProps
1575
1590
  });
1576
- const item = await this.read(response.id);
1577
- if (!item)
1578
- throw new Error("The server failed to save the record");
1579
- return item;
1591
+ const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
1592
+ return initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), response);
1580
1593
  };
1581
1594
  _deleteRecord = new WeakSet();
1582
1595
  deleteRecord_fn = async function(recordId) {
@@ -1586,29 +1599,6 @@ deleteRecord_fn = async function(recordId) {
1586
1599
  ...fetchProps
1587
1600
  });
1588
1601
  };
1589
- _invalidateCache = new WeakSet();
1590
- invalidateCache_fn = async function(recordId) {
1591
- await __privateGet$4(this, _cache).delete(`rec_${__privateGet$4(this, _table)}:${recordId}`);
1592
- const cacheItems = await __privateGet$4(this, _cache).getAll();
1593
- const queries = Object.entries(cacheItems).filter(([key]) => key.startsWith("query_"));
1594
- for (const [key, value] of queries) {
1595
- const ids = getIds(value);
1596
- if (ids.includes(recordId))
1597
- await __privateGet$4(this, _cache).delete(key);
1598
- }
1599
- };
1600
- _setCacheRecord = new WeakSet();
1601
- setCacheRecord_fn = async function(record) {
1602
- if (!__privateGet$4(this, _cache).cacheRecords)
1603
- return;
1604
- await __privateGet$4(this, _cache).set(`rec_${__privateGet$4(this, _table)}:${record.id}`, record);
1605
- };
1606
- _getCacheRecord = new WeakSet();
1607
- getCacheRecord_fn = async function(recordId) {
1608
- if (!__privateGet$4(this, _cache).cacheRecords)
1609
- return null;
1610
- return __privateGet$4(this, _cache).get(`rec_${__privateGet$4(this, _table)}:${recordId}`);
1611
- };
1612
1602
  _setCacheQuery = new WeakSet();
1613
1603
  setCacheQuery_fn = async function(query, meta, records) {
1614
1604
  await __privateGet$4(this, _cache).set(`query_${__privateGet$4(this, _table)}:${query.key()}`, { date: new Date(), meta, records });
@@ -1674,11 +1664,11 @@ const initObject = (db, schemaTables, table, object) => {
1674
1664
  }
1675
1665
  }
1676
1666
  }
1677
- result.read = function() {
1678
- return db[table].read(result["id"]);
1667
+ result.read = function(columns2) {
1668
+ return db[table].read(result["id"], columns2);
1679
1669
  };
1680
- result.update = function(data) {
1681
- return db[table].update(result["id"], data);
1670
+ result.update = function(data, columns2) {
1671
+ return db[table].update(result["id"], data, columns2);
1682
1672
  };
1683
1673
  result.delete = function() {
1684
1674
  return db[table].delete(result["id"]);
@@ -1692,14 +1682,8 @@ const initObject = (db, schemaTables, table, object) => {
1692
1682
  Object.freeze(result);
1693
1683
  return result;
1694
1684
  };
1695
- function getIds(value) {
1696
- if (Array.isArray(value)) {
1697
- return value.map((item) => getIds(item)).flat();
1698
- }
1699
- if (!isObject(value))
1700
- return [];
1701
- const nestedIds = Object.values(value).map((item) => getIds(item)).flat();
1702
- return isString(value.id) ? [value.id, ...nestedIds] : nestedIds;
1685
+ function isResponseWithRecords(value) {
1686
+ return isObject(value) && Array.isArray(value.records);
1703
1687
  }
1704
1688
 
1705
1689
  var __accessCheck$3 = (obj, member, msg) => {
@@ -1726,7 +1710,6 @@ class SimpleCache {
1726
1710
  __privateAdd$3(this, _map, void 0);
1727
1711
  __privateSet$3(this, _map, /* @__PURE__ */ new Map());
1728
1712
  this.capacity = options.max ?? 500;
1729
- this.cacheRecords = options.cacheRecords ?? true;
1730
1713
  this.defaultQueryTTL = options.defaultQueryTTL ?? 60 * 1e3;
1731
1714
  }
1732
1715
  async getAll() {
@@ -1798,16 +1781,19 @@ class SchemaPlugin extends XataPlugin {
1798
1781
  __privateSet$2(this, _schemaTables$1, schemaTables);
1799
1782
  }
1800
1783
  build(pluginOptions) {
1801
- const db = new Proxy({}, {
1802
- get: (_target, table) => {
1803
- if (!isString(table))
1804
- throw new Error("Invalid table name");
1805
- if (__privateGet$2(this, _tables)[table] === void 0) {
1806
- __privateGet$2(this, _tables)[table] = new RestRepository({ db, pluginOptions, table, schemaTables: __privateGet$2(this, _schemaTables$1) });
1784
+ const db = new Proxy(
1785
+ {},
1786
+ {
1787
+ get: (_target, table) => {
1788
+ if (!isString(table))
1789
+ throw new Error("Invalid table name");
1790
+ if (__privateGet$2(this, _tables)[table] === void 0) {
1791
+ __privateGet$2(this, _tables)[table] = new RestRepository({ db, pluginOptions, table, schemaTables: __privateGet$2(this, _schemaTables$1) });
1792
+ }
1793
+ return __privateGet$2(this, _tables)[table];
1807
1794
  }
1808
- return __privateGet$2(this, _tables)[table];
1809
1795
  }
1810
- });
1796
+ );
1811
1797
  const tableNames = __privateGet$2(this, _schemaTables$1)?.map(({ name }) => name) ?? [];
1812
1798
  for (const table of tableNames) {
1813
1799
  db[table] = new RestRepository({ db, pluginOptions, table, schemaTables: __privateGet$2(this, _schemaTables$1) });
@@ -1877,10 +1863,10 @@ _schemaTables = new WeakMap();
1877
1863
  _search = new WeakSet();
1878
1864
  search_fn = async function(query, options, getFetchProps) {
1879
1865
  const fetchProps = await getFetchProps();
1880
- const { tables, fuzziness, highlight } = options ?? {};
1866
+ const { tables, fuzziness, highlight, prefix } = options ?? {};
1881
1867
  const { records } = await searchBranch({
1882
1868
  pathParams: { workspace: "{workspaceId}", dbBranchName: "{dbBranch}" },
1883
- body: { tables, query, fuzziness, highlight },
1869
+ body: { tables, query, fuzziness, prefix, highlight },
1884
1870
  ...fetchProps
1885
1871
  });
1886
1872
  return records;
@@ -1921,9 +1907,13 @@ async function resolveXataBranch(gitBranch, options) {
1921
1907
  const databaseURL = options?.databaseURL || getDatabaseURL();
1922
1908
  const apiKey = options?.apiKey || getAPIKey();
1923
1909
  if (!databaseURL)
1924
- throw new Error("A databaseURL was not defined. Either set the XATA_DATABASE_URL env variable or pass the argument explicitely");
1910
+ throw new Error(
1911
+ "A databaseURL was not defined. Either set the XATA_DATABASE_URL env variable or pass the argument explicitely"
1912
+ );
1925
1913
  if (!apiKey)
1926
- throw new Error("An API key was not defined. Either set the XATA_API_KEY env variable or pass the argument explicitely");
1914
+ throw new Error(
1915
+ "An API key was not defined. Either set the XATA_API_KEY env variable or pass the argument explicitely"
1916
+ );
1927
1917
  const [protocol, , host, , dbName] = databaseURL.split("/");
1928
1918
  const [workspace] = host.split(".");
1929
1919
  const { fallbackBranch } = getEnvironment();
@@ -1941,9 +1931,13 @@ async function getDatabaseBranch(branch, options) {
1941
1931
  const databaseURL = options?.databaseURL || getDatabaseURL();
1942
1932
  const apiKey = options?.apiKey || getAPIKey();
1943
1933
  if (!databaseURL)
1944
- throw new Error("A databaseURL was not defined. Either set the XATA_DATABASE_URL env variable or pass the argument explicitely");
1934
+ throw new Error(
1935
+ "A databaseURL was not defined. Either set the XATA_DATABASE_URL env variable or pass the argument explicitely"
1936
+ );
1945
1937
  if (!apiKey)
1946
- throw new Error("An API key was not defined. Either set the XATA_API_KEY env variable or pass the argument explicitely");
1938
+ throw new Error(
1939
+ "An API key was not defined. Either set the XATA_API_KEY env variable or pass the argument explicitely"
1940
+ );
1947
1941
  const [protocol, , host, , database] = databaseURL.split("/");
1948
1942
  const [workspace] = host.split(".");
1949
1943
  const dbBranchName = `${database}:${branch}`;
@@ -1993,14 +1987,16 @@ var __privateMethod = (obj, member, method) => {
1993
1987
  return method;
1994
1988
  };
1995
1989
  const buildClient = (plugins) => {
1996
- var _branch, _parseOptions, parseOptions_fn, _getFetchProps, getFetchProps_fn, _evaluateBranch, evaluateBranch_fn, _a;
1990
+ var _branch, _options, _parseOptions, parseOptions_fn, _getFetchProps, getFetchProps_fn, _evaluateBranch, evaluateBranch_fn, _a;
1997
1991
  return _a = class {
1998
1992
  constructor(options = {}, schemaTables) {
1999
1993
  __privateAdd(this, _parseOptions);
2000
1994
  __privateAdd(this, _getFetchProps);
2001
1995
  __privateAdd(this, _evaluateBranch);
2002
1996
  __privateAdd(this, _branch, void 0);
1997
+ __privateAdd(this, _options, void 0);
2003
1998
  const safeOptions = __privateMethod(this, _parseOptions, parseOptions_fn).call(this, options);
1999
+ __privateSet(this, _options, safeOptions);
2004
2000
  const pluginOptions = {
2005
2001
  getFetchProps: () => __privateMethod(this, _getFetchProps, getFetchProps_fn).call(this, safeOptions),
2006
2002
  cache: safeOptions.cache
@@ -2022,22 +2018,22 @@ const buildClient = (plugins) => {
2022
2018
  }
2023
2019
  }
2024
2020
  }
2025
- }, _branch = new WeakMap(), _parseOptions = new WeakSet(), parseOptions_fn = function(options) {
2021
+ async getConfig() {
2022
+ const databaseURL = __privateGet(this, _options).databaseURL;
2023
+ const branch = await __privateGet(this, _options).branch();
2024
+ return { databaseURL, branch };
2025
+ }
2026
+ }, _branch = new WeakMap(), _options = new WeakMap(), _parseOptions = new WeakSet(), parseOptions_fn = function(options) {
2026
2027
  const fetch = getFetchImplementation(options?.fetch);
2027
2028
  const databaseURL = options?.databaseURL || getDatabaseURL();
2028
2029
  const apiKey = options?.apiKey || getAPIKey();
2029
- const cache = options?.cache ?? new SimpleCache({ cacheRecords: false, defaultQueryTTL: 0 });
2030
+ const cache = options?.cache ?? new SimpleCache({ defaultQueryTTL: 0 });
2030
2031
  const branch = async () => options?.branch !== void 0 ? await __privateMethod(this, _evaluateBranch, evaluateBranch_fn).call(this, options.branch) : await getCurrentBranchName({ apiKey, databaseURL, fetchImpl: options?.fetch });
2031
2032
  if (!databaseURL || !apiKey) {
2032
2033
  throw new Error("Options databaseURL and apiKey are required");
2033
2034
  }
2034
2035
  return { fetch, databaseURL, apiKey, branch, cache };
2035
- }, _getFetchProps = new WeakSet(), getFetchProps_fn = async function({
2036
- fetch,
2037
- apiKey,
2038
- databaseURL,
2039
- branch
2040
- }) {
2036
+ }, _getFetchProps = new WeakSet(), getFetchProps_fn = async function({ fetch, apiKey, databaseURL, branch }) {
2041
2037
  const branchValue = await __privateMethod(this, _evaluateBranch, evaluateBranch_fn).call(this, branch);
2042
2038
  if (!branchValue)
2043
2039
  throw new Error("Unable to resolve branch value");
@@ -2072,6 +2068,88 @@ const buildClient = (plugins) => {
2072
2068
  class BaseClient extends buildClient() {
2073
2069
  }
2074
2070
 
2071
+ const META = "__";
2072
+ const VALUE = "___";
2073
+ class Serializer {
2074
+ constructor() {
2075
+ this.classes = {};
2076
+ }
2077
+ add(clazz) {
2078
+ this.classes[clazz.name] = clazz;
2079
+ }
2080
+ toJSON(data) {
2081
+ function visit(obj) {
2082
+ if (Array.isArray(obj))
2083
+ return obj.map(visit);
2084
+ const type = typeof obj;
2085
+ if (type === "undefined")
2086
+ return { [META]: "undefined" };
2087
+ if (type === "bigint")
2088
+ return { [META]: "bigint", [VALUE]: obj.toString() };
2089
+ if (obj === null || type !== "object")
2090
+ return obj;
2091
+ const constructor = obj.constructor;
2092
+ const o = { [META]: constructor.name };
2093
+ for (const [key, value] of Object.entries(obj)) {
2094
+ o[key] = visit(value);
2095
+ }
2096
+ if (constructor === Date)
2097
+ o[VALUE] = obj.toISOString();
2098
+ if (constructor === Map)
2099
+ o[VALUE] = Object.fromEntries(obj);
2100
+ if (constructor === Set)
2101
+ o[VALUE] = [...obj];
2102
+ return o;
2103
+ }
2104
+ return JSON.stringify(visit(data));
2105
+ }
2106
+ fromJSON(json) {
2107
+ return JSON.parse(json, (key, value) => {
2108
+ if (value && typeof value === "object" && !Array.isArray(value)) {
2109
+ const { [META]: clazz, [VALUE]: val, ...rest } = value;
2110
+ const constructor = this.classes[clazz];
2111
+ if (constructor) {
2112
+ return Object.assign(Object.create(constructor.prototype), rest);
2113
+ }
2114
+ if (clazz === "Date")
2115
+ return new Date(val);
2116
+ if (clazz === "Set")
2117
+ return new Set(val);
2118
+ if (clazz === "Map")
2119
+ return new Map(Object.entries(val));
2120
+ if (clazz === "bigint")
2121
+ return BigInt(val);
2122
+ if (clazz === "undefined")
2123
+ return void 0;
2124
+ return rest;
2125
+ }
2126
+ return value;
2127
+ });
2128
+ }
2129
+ }
2130
+ const defaultSerializer = new Serializer();
2131
+ const serialize = (data) => {
2132
+ return defaultSerializer.toJSON(data);
2133
+ };
2134
+ const deserialize = (json) => {
2135
+ return defaultSerializer.fromJSON(json);
2136
+ };
2137
+
2138
+ function buildWorkerRunner(config) {
2139
+ return function xataWorker(name, _worker) {
2140
+ return async (...args) => {
2141
+ const url = process.env.NODE_ENV === "development" ? `http://localhost:64749/${name}` : `https://dispatcher.xata.workers.dev/${config.workspace}/${config.worker}/${name}`;
2142
+ const result = await fetch(url, {
2143
+ method: "POST",
2144
+ headers: { "Content-Type": "application/json" },
2145
+ body: serialize({ args })
2146
+ });
2147
+ const text = await result.text();
2148
+ return deserialize(text);
2149
+ };
2150
+ };
2151
+ }
2152
+
2075
2153
  class XataError extends Error {
2076
2154
  constructor(message, status) {
2077
2155
  super(message);
@@ -2079,5 +2157,5 @@ class XataError extends Error {
2079
2157
  }
2080
2158
  }
2081
2159
 
2082
- export { BaseClient, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Query, RecordArray, Repository, RestRepository, SchemaPlugin, SearchPlugin, SimpleCache, XataApiClient, XataApiPlugin, XataError, XataPlugin, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, buildClient, bulkInsertTableRecords, cancelWorkspaceMemberInvite, contains, createBranch, createDatabase, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, endsWith, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseURL, getGitBranchesMapping, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberRole, upsertRecordWithID };
2160
+ export { BaseClient, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Query, RecordArray, Repository, RestRepository, SchemaPlugin, SearchPlugin, Serializer, SimpleCache, XataApiClient, XataApiPlugin, XataError, XataPlugin, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, contains, createBranch, createDatabase, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
2083
2161
  //# sourceMappingURL=index.mjs.map