@xata.io/client 0.26.6 → 0.26.8
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/.turbo/turbo-add-version.log +1 -1
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +18 -0
- package/dist/index.cjs +121 -197
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +328 -10
- package/dist/index.mjs +115 -198
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -242,12 +242,6 @@ function getPreviewBranch() {
|
|
242
242
|
}
|
243
243
|
}
|
244
244
|
|
245
|
-
var __defProp$8 = Object.defineProperty;
|
246
|
-
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
247
|
-
var __publicField$8 = (obj, key, value) => {
|
248
|
-
__defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
249
|
-
return value;
|
250
|
-
};
|
251
245
|
var __accessCheck$8 = (obj, member, msg) => {
|
252
246
|
if (!member.has(obj))
|
253
247
|
throw TypeError("Cannot " + msg);
|
@@ -287,8 +281,6 @@ class ApiRequestPool {
|
|
287
281
|
__privateAdd$8(this, _fetch, void 0);
|
288
282
|
__privateAdd$8(this, _queue, void 0);
|
289
283
|
__privateAdd$8(this, _concurrency, void 0);
|
290
|
-
__publicField$8(this, "running");
|
291
|
-
__publicField$8(this, "started");
|
292
284
|
__privateSet$8(this, _queue, []);
|
293
285
|
__privateSet$8(this, _concurrency, concurrency);
|
294
286
|
this.running = 0;
|
@@ -534,26 +526,16 @@ function defaultOnOpen(response) {
|
|
534
526
|
}
|
535
527
|
}
|
536
528
|
|
537
|
-
const VERSION = "0.26.
|
529
|
+
const VERSION = "0.26.8";
|
538
530
|
|
539
|
-
var __defProp$7 = Object.defineProperty;
|
540
|
-
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
541
|
-
var __publicField$7 = (obj, key, value) => {
|
542
|
-
__defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
543
|
-
return value;
|
544
|
-
};
|
545
531
|
class ErrorWithCause extends Error {
|
546
532
|
constructor(message, options) {
|
547
533
|
super(message, options);
|
548
|
-
__publicField$7(this, "cause");
|
549
534
|
}
|
550
535
|
}
|
551
536
|
class FetcherError extends ErrorWithCause {
|
552
537
|
constructor(status, data, requestId) {
|
553
538
|
super(getMessage(data));
|
554
|
-
__publicField$7(this, "status");
|
555
|
-
__publicField$7(this, "requestId");
|
556
|
-
__publicField$7(this, "errors");
|
557
539
|
this.status = status;
|
558
540
|
this.errors = isBulkError(data) ? data.errors : [{ message: getMessage(data), status }];
|
559
541
|
this.requestId = requestId;
|
@@ -803,6 +785,12 @@ const deleteBranch = (variables, signal) => dataPlaneFetch({
|
|
803
785
|
...variables,
|
804
786
|
signal
|
805
787
|
});
|
788
|
+
const getSchema = (variables, signal) => dataPlaneFetch({
|
789
|
+
url: "/db/{dbBranchName}/schema",
|
790
|
+
method: "get",
|
791
|
+
...variables,
|
792
|
+
signal
|
793
|
+
});
|
806
794
|
const copyBranch = (variables, signal) => dataPlaneFetch({
|
807
795
|
url: "/db/{dbBranchName}/copy",
|
808
796
|
method: "post",
|
@@ -1006,6 +994,7 @@ const operationsByTag$2 = {
|
|
1006
994
|
resolveBranch
|
1007
995
|
},
|
1008
996
|
migrations: {
|
997
|
+
getSchema,
|
1009
998
|
getBranchMigrationHistory,
|
1010
999
|
getBranchMigrationPlan,
|
1011
1000
|
executeBranchMigrationPlan,
|
@@ -1171,6 +1160,20 @@ const updateWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ u
|
|
1171
1160
|
const cancelWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/invites/{inviteId}", method: "delete", ...variables, signal });
|
1172
1161
|
const acceptWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/invites/{inviteKey}/accept", method: "post", ...variables, signal });
|
1173
1162
|
const resendWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/invites/{inviteId}/resend", method: "post", ...variables, signal });
|
1163
|
+
const listClusters = (variables, signal) => controlPlaneFetch({
|
1164
|
+
url: "/workspaces/{workspaceId}/clusters",
|
1165
|
+
method: "get",
|
1166
|
+
...variables,
|
1167
|
+
signal
|
1168
|
+
});
|
1169
|
+
const createCluster = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/clusters", method: "post", ...variables, signal });
|
1170
|
+
const getCluster = (variables, signal) => controlPlaneFetch({
|
1171
|
+
url: "/workspaces/{workspaceId}/clusters/{clusterId}",
|
1172
|
+
method: "get",
|
1173
|
+
...variables,
|
1174
|
+
signal
|
1175
|
+
});
|
1176
|
+
const updateCluster = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/clusters/{clusterId}", method: "patch", ...variables, signal });
|
1174
1177
|
const getDatabaseList = (variables, signal) => controlPlaneFetch({
|
1175
1178
|
url: "/workspaces/{workspaceId}/dbs",
|
1176
1179
|
method: "get",
|
@@ -1225,6 +1228,7 @@ const operationsByTag$1 = {
|
|
1225
1228
|
acceptWorkspaceMemberInvite,
|
1226
1229
|
resendWorkspaceMemberInvite
|
1227
1230
|
},
|
1231
|
+
xbcontrolOther: { listClusters, createCluster, getCluster, updateCluster },
|
1228
1232
|
databases: {
|
1229
1233
|
getDatabaseList,
|
1230
1234
|
createDatabase,
|
@@ -2620,75 +2624,6 @@ class XataApiPlugin {
|
|
2620
2624
|
class XataPlugin {
|
2621
2625
|
}
|
2622
2626
|
|
2623
|
-
class FilesPlugin extends XataPlugin {
|
2624
|
-
build(pluginOptions) {
|
2625
|
-
return {
|
2626
|
-
download: async (location) => {
|
2627
|
-
const { table, record, column, fileId = "" } = location ?? {};
|
2628
|
-
return await getFileItem({
|
2629
|
-
pathParams: {
|
2630
|
-
workspace: "{workspaceId}",
|
2631
|
-
dbBranchName: "{dbBranch}",
|
2632
|
-
region: "{region}",
|
2633
|
-
tableName: table ?? "",
|
2634
|
-
recordId: record ?? "",
|
2635
|
-
columnName: column ?? "",
|
2636
|
-
fileId
|
2637
|
-
},
|
2638
|
-
...pluginOptions,
|
2639
|
-
rawResponse: true
|
2640
|
-
});
|
2641
|
-
},
|
2642
|
-
upload: async (location, file) => {
|
2643
|
-
const { table, record, column, fileId = "" } = location ?? {};
|
2644
|
-
const contentType = getContentType(file);
|
2645
|
-
return await putFileItem({
|
2646
|
-
...pluginOptions,
|
2647
|
-
pathParams: {
|
2648
|
-
workspace: "{workspaceId}",
|
2649
|
-
dbBranchName: "{dbBranch}",
|
2650
|
-
region: "{region}",
|
2651
|
-
tableName: table ?? "",
|
2652
|
-
recordId: record ?? "",
|
2653
|
-
columnName: column ?? "",
|
2654
|
-
fileId
|
2655
|
-
},
|
2656
|
-
body: file,
|
2657
|
-
headers: { "Content-Type": contentType }
|
2658
|
-
});
|
2659
|
-
},
|
2660
|
-
delete: async (location) => {
|
2661
|
-
const { table, record, column, fileId = "" } = location ?? {};
|
2662
|
-
return await deleteFileItem({
|
2663
|
-
pathParams: {
|
2664
|
-
workspace: "{workspaceId}",
|
2665
|
-
dbBranchName: "{dbBranch}",
|
2666
|
-
region: "{region}",
|
2667
|
-
tableName: table ?? "",
|
2668
|
-
recordId: record ?? "",
|
2669
|
-
columnName: column ?? "",
|
2670
|
-
fileId
|
2671
|
-
},
|
2672
|
-
...pluginOptions
|
2673
|
-
});
|
2674
|
-
}
|
2675
|
-
};
|
2676
|
-
}
|
2677
|
-
}
|
2678
|
-
function getContentType(file) {
|
2679
|
-
if (typeof file === "string") {
|
2680
|
-
return "text/plain";
|
2681
|
-
}
|
2682
|
-
if (isBlob(file)) {
|
2683
|
-
return file.type;
|
2684
|
-
}
|
2685
|
-
try {
|
2686
|
-
return file.type;
|
2687
|
-
} catch (e) {
|
2688
|
-
}
|
2689
|
-
return "application/octet-stream";
|
2690
|
-
}
|
2691
|
-
|
2692
2627
|
function buildTransformString(transformations) {
|
2693
2628
|
return transformations.flatMap(
|
2694
2629
|
(t) => Object.entries(t).map(([key, value]) => {
|
@@ -2717,58 +2652,8 @@ function transformImage(url, ...transformations) {
|
|
2717
2652
|
return `https://${hostname}${transform}${path}${search}`;
|
2718
2653
|
}
|
2719
2654
|
|
2720
|
-
var __defProp$6 = Object.defineProperty;
|
2721
|
-
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
2722
|
-
var __publicField$6 = (obj, key, value) => {
|
2723
|
-
__defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
2724
|
-
return value;
|
2725
|
-
};
|
2726
2655
|
class XataFile {
|
2727
2656
|
constructor(file) {
|
2728
|
-
/**
|
2729
|
-
* Identifier of the file.
|
2730
|
-
*/
|
2731
|
-
__publicField$6(this, "id");
|
2732
|
-
/**
|
2733
|
-
* Name of the file.
|
2734
|
-
*/
|
2735
|
-
__publicField$6(this, "name");
|
2736
|
-
/**
|
2737
|
-
* Media type of the file.
|
2738
|
-
*/
|
2739
|
-
__publicField$6(this, "mediaType");
|
2740
|
-
/**
|
2741
|
-
* Base64 encoded content of the file.
|
2742
|
-
*/
|
2743
|
-
__publicField$6(this, "base64Content");
|
2744
|
-
/**
|
2745
|
-
* Whether to enable public url for the file.
|
2746
|
-
*/
|
2747
|
-
__publicField$6(this, "enablePublicUrl");
|
2748
|
-
/**
|
2749
|
-
* Timeout for the signed url.
|
2750
|
-
*/
|
2751
|
-
__publicField$6(this, "signedUrlTimeout");
|
2752
|
-
/**
|
2753
|
-
* Size of the file.
|
2754
|
-
*/
|
2755
|
-
__publicField$6(this, "size");
|
2756
|
-
/**
|
2757
|
-
* Version of the file.
|
2758
|
-
*/
|
2759
|
-
__publicField$6(this, "version");
|
2760
|
-
/**
|
2761
|
-
* Url of the file.
|
2762
|
-
*/
|
2763
|
-
__publicField$6(this, "url");
|
2764
|
-
/**
|
2765
|
-
* Signed url of the file.
|
2766
|
-
*/
|
2767
|
-
__publicField$6(this, "signedUrl");
|
2768
|
-
/**
|
2769
|
-
* Attributes of the file.
|
2770
|
-
*/
|
2771
|
-
__publicField$6(this, "attributes");
|
2772
2657
|
this.id = file.id;
|
2773
2658
|
this.name = file.name || "";
|
2774
2659
|
this.mediaType = file.mediaType || "application/octet-stream";
|
@@ -2927,12 +2812,6 @@ function parseJson(value) {
|
|
2927
2812
|
}
|
2928
2813
|
}
|
2929
2814
|
|
2930
|
-
var __defProp$5 = Object.defineProperty;
|
2931
|
-
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
2932
|
-
var __publicField$5 = (obj, key, value) => {
|
2933
|
-
__defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
2934
|
-
return value;
|
2935
|
-
};
|
2936
2815
|
var __accessCheck$6 = (obj, member, msg) => {
|
2937
2816
|
if (!member.has(obj))
|
2938
2817
|
throw TypeError("Cannot " + msg);
|
@@ -2955,14 +2834,6 @@ var _query, _page;
|
|
2955
2834
|
class Page {
|
2956
2835
|
constructor(query, meta, records = []) {
|
2957
2836
|
__privateAdd$6(this, _query, void 0);
|
2958
|
-
/**
|
2959
|
-
* Page metadata, required to retrieve additional records.
|
2960
|
-
*/
|
2961
|
-
__publicField$5(this, "meta");
|
2962
|
-
/**
|
2963
|
-
* The set of results for this page.
|
2964
|
-
*/
|
2965
|
-
__publicField$5(this, "records");
|
2966
2837
|
__privateSet$6(this, _query, query);
|
2967
2838
|
this.meta = meta;
|
2968
2839
|
this.records = new RecordArray(this, records);
|
@@ -3012,9 +2883,9 @@ class Page {
|
|
3012
2883
|
}
|
3013
2884
|
}
|
3014
2885
|
_query = new WeakMap();
|
3015
|
-
const PAGINATION_MAX_SIZE =
|
2886
|
+
const PAGINATION_MAX_SIZE = 1e3;
|
3016
2887
|
const PAGINATION_DEFAULT_SIZE = 20;
|
3017
|
-
const PAGINATION_MAX_OFFSET =
|
2888
|
+
const PAGINATION_MAX_OFFSET = 49e3;
|
3018
2889
|
const PAGINATION_DEFAULT_OFFSET = 0;
|
3019
2890
|
function isCursorPaginationOptions(options) {
|
3020
2891
|
return isDefined(options) && (isDefined(options.start) || isDefined(options.end) || isDefined(options.after) || isDefined(options.before));
|
@@ -3093,12 +2964,6 @@ const _RecordArray = class _RecordArray extends Array {
|
|
3093
2964
|
_page = new WeakMap();
|
3094
2965
|
let RecordArray = _RecordArray;
|
3095
2966
|
|
3096
|
-
var __defProp$4 = Object.defineProperty;
|
3097
|
-
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
3098
|
-
var __publicField$4 = (obj, key, value) => {
|
3099
|
-
__defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
3100
|
-
return value;
|
3101
|
-
};
|
3102
2967
|
var __accessCheck$5 = (obj, member, msg) => {
|
3103
2968
|
if (!member.has(obj))
|
3104
2969
|
throw TypeError("Cannot " + msg);
|
@@ -3129,8 +2994,8 @@ const _Query = class _Query {
|
|
3129
2994
|
__privateAdd$5(this, _repository, void 0);
|
3130
2995
|
__privateAdd$5(this, _data, { filter: {} });
|
3131
2996
|
// Implements pagination
|
3132
|
-
|
3133
|
-
|
2997
|
+
this.meta = { page: { cursor: "start", more: true, size: PAGINATION_DEFAULT_SIZE } };
|
2998
|
+
this.records = new RecordArray(this, []);
|
3134
2999
|
__privateSet$5(this, _table$1, table);
|
3135
3000
|
if (repository) {
|
3136
3001
|
__privateSet$5(this, _repository, repository);
|
@@ -3886,7 +3751,13 @@ class RestRepository extends Query {
|
|
3886
3751
|
},
|
3887
3752
|
...__privateGet$4(this, _getFetchProps).call(this)
|
3888
3753
|
});
|
3889
|
-
|
3754
|
+
const schemaTables = await __privateMethod$2(this, _getSchemaTables$1, getSchemaTables_fn$1).call(this);
|
3755
|
+
return {
|
3756
|
+
...result,
|
3757
|
+
summaries: result.summaries.map(
|
3758
|
+
(summary) => initObject(__privateGet$4(this, _db), schemaTables, __privateGet$4(this, _table), summary, data.columns ?? [])
|
3759
|
+
)
|
3760
|
+
};
|
3890
3761
|
});
|
3891
3762
|
}
|
3892
3763
|
ask(question, options) {
|
@@ -4257,7 +4128,9 @@ const initObject = (db, schemaTables, table, object, selectedColumns) => {
|
|
4257
4128
|
record.delete = function() {
|
4258
4129
|
return db[table].delete(record["id"]);
|
4259
4130
|
};
|
4260
|
-
|
4131
|
+
if (metadata !== void 0) {
|
4132
|
+
record.xata = Object.freeze(metadata);
|
4133
|
+
}
|
4261
4134
|
record.getMetadata = function() {
|
4262
4135
|
return record.xata;
|
4263
4136
|
};
|
@@ -4294,12 +4167,6 @@ function parseIfVersion(...args) {
|
|
4294
4167
|
return void 0;
|
4295
4168
|
}
|
4296
4169
|
|
4297
|
-
var __defProp$3 = Object.defineProperty;
|
4298
|
-
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
4299
|
-
var __publicField$3 = (obj, key, value) => {
|
4300
|
-
__defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
4301
|
-
return value;
|
4302
|
-
};
|
4303
4170
|
var __accessCheck$3 = (obj, member, msg) => {
|
4304
4171
|
if (!member.has(obj))
|
4305
4172
|
throw TypeError("Cannot " + msg);
|
@@ -4322,8 +4189,6 @@ var _map;
|
|
4322
4189
|
class SimpleCache {
|
4323
4190
|
constructor(options = {}) {
|
4324
4191
|
__privateAdd$3(this, _map, void 0);
|
4325
|
-
__publicField$3(this, "capacity");
|
4326
|
-
__publicField$3(this, "defaultQueryTTL");
|
4327
4192
|
__privateSet$3(this, _map, /* @__PURE__ */ new Map());
|
4328
4193
|
this.capacity = options.max ?? 500;
|
4329
4194
|
this.defaultQueryTTL = options.defaultQueryTTL ?? 60 * 1e3;
|
@@ -4368,10 +4233,12 @@ const notExists = (column) => ({ $notExists: column });
|
|
4368
4233
|
const startsWith = (value) => ({ $startsWith: value });
|
4369
4234
|
const endsWith = (value) => ({ $endsWith: value });
|
4370
4235
|
const pattern = (value) => ({ $pattern: value });
|
4236
|
+
const iPattern = (value) => ({ $iPattern: value });
|
4371
4237
|
const is = (value) => ({ $is: value });
|
4372
4238
|
const equals = is;
|
4373
4239
|
const isNot = (value) => ({ $isNot: value });
|
4374
4240
|
const contains = (value) => ({ $contains: value });
|
4241
|
+
const iContains = (value) => ({ $iContains: value });
|
4375
4242
|
const includes = (value) => ({ $includes: value });
|
4376
4243
|
const includesAll = (value) => ({ $includesAll: value });
|
4377
4244
|
const includesNone = (value) => ({ $includesNone: value });
|
@@ -4427,6 +4294,80 @@ class SchemaPlugin extends XataPlugin {
|
|
4427
4294
|
_tables = new WeakMap();
|
4428
4295
|
_schemaTables$1 = new WeakMap();
|
4429
4296
|
|
4297
|
+
class FilesPlugin extends XataPlugin {
|
4298
|
+
build(pluginOptions) {
|
4299
|
+
return {
|
4300
|
+
download: async (location) => {
|
4301
|
+
const { table, record, column, fileId = "" } = location ?? {};
|
4302
|
+
return await getFileItem({
|
4303
|
+
pathParams: {
|
4304
|
+
workspace: "{workspaceId}",
|
4305
|
+
dbBranchName: "{dbBranch}",
|
4306
|
+
region: "{region}",
|
4307
|
+
tableName: table ?? "",
|
4308
|
+
recordId: record ?? "",
|
4309
|
+
columnName: column ?? "",
|
4310
|
+
fileId
|
4311
|
+
},
|
4312
|
+
...pluginOptions,
|
4313
|
+
rawResponse: true
|
4314
|
+
});
|
4315
|
+
},
|
4316
|
+
upload: async (location, file, options) => {
|
4317
|
+
const { table, record, column, fileId = "" } = location ?? {};
|
4318
|
+
const resolvedFile = await file;
|
4319
|
+
const contentType = options?.mediaType || getContentType(resolvedFile);
|
4320
|
+
const body = resolvedFile instanceof XataFile ? resolvedFile.toBlob() : resolvedFile;
|
4321
|
+
return await putFileItem({
|
4322
|
+
...pluginOptions,
|
4323
|
+
pathParams: {
|
4324
|
+
workspace: "{workspaceId}",
|
4325
|
+
dbBranchName: "{dbBranch}",
|
4326
|
+
region: "{region}",
|
4327
|
+
tableName: table ?? "",
|
4328
|
+
recordId: record ?? "",
|
4329
|
+
columnName: column ?? "",
|
4330
|
+
fileId
|
4331
|
+
},
|
4332
|
+
body,
|
4333
|
+
headers: { "Content-Type": contentType }
|
4334
|
+
});
|
4335
|
+
},
|
4336
|
+
delete: async (location) => {
|
4337
|
+
const { table, record, column, fileId = "" } = location ?? {};
|
4338
|
+
return await deleteFileItem({
|
4339
|
+
pathParams: {
|
4340
|
+
workspace: "{workspaceId}",
|
4341
|
+
dbBranchName: "{dbBranch}",
|
4342
|
+
region: "{region}",
|
4343
|
+
tableName: table ?? "",
|
4344
|
+
recordId: record ?? "",
|
4345
|
+
columnName: column ?? "",
|
4346
|
+
fileId
|
4347
|
+
},
|
4348
|
+
...pluginOptions
|
4349
|
+
});
|
4350
|
+
}
|
4351
|
+
};
|
4352
|
+
}
|
4353
|
+
}
|
4354
|
+
function getContentType(file) {
|
4355
|
+
if (typeof file === "string") {
|
4356
|
+
return "text/plain";
|
4357
|
+
}
|
4358
|
+
if ("mediaType" in file) {
|
4359
|
+
return file.mediaType;
|
4360
|
+
}
|
4361
|
+
if (isBlob(file)) {
|
4362
|
+
return file.type;
|
4363
|
+
}
|
4364
|
+
try {
|
4365
|
+
return file.type;
|
4366
|
+
} catch (e) {
|
4367
|
+
}
|
4368
|
+
return "application/octet-stream";
|
4369
|
+
}
|
4370
|
+
|
4430
4371
|
var __accessCheck$1 = (obj, member, msg) => {
|
4431
4372
|
if (!member.has(obj))
|
4432
4373
|
throw TypeError("Cannot " + msg);
|
@@ -4593,12 +4534,6 @@ class TransactionPlugin extends XataPlugin {
|
|
4593
4534
|
}
|
4594
4535
|
}
|
4595
4536
|
|
4596
|
-
var __defProp$2 = Object.defineProperty;
|
4597
|
-
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
4598
|
-
var __publicField$2 = (obj, key, value) => {
|
4599
|
-
__defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
4600
|
-
return value;
|
4601
|
-
};
|
4602
4537
|
var __accessCheck = (obj, member, msg) => {
|
4603
4538
|
if (!member.has(obj))
|
4604
4539
|
throw TypeError("Cannot " + msg);
|
@@ -4628,11 +4563,6 @@ const buildClient = (plugins) => {
|
|
4628
4563
|
__privateAdd(this, _parseOptions);
|
4629
4564
|
__privateAdd(this, _getFetchProps);
|
4630
4565
|
__privateAdd(this, _options, void 0);
|
4631
|
-
__publicField$2(this, "db");
|
4632
|
-
__publicField$2(this, "search");
|
4633
|
-
__publicField$2(this, "transactions");
|
4634
|
-
__publicField$2(this, "sql");
|
4635
|
-
__publicField$2(this, "files");
|
4636
4566
|
const safeOptions = __privateMethod(this, _parseOptions, parseOptions_fn).call(this, options);
|
4637
4567
|
__privateSet(this, _options, safeOptions);
|
4638
4568
|
const pluginOptions = {
|
@@ -4746,17 +4676,11 @@ const buildClient = (plugins) => {
|
|
4746
4676
|
class BaseClient extends buildClient() {
|
4747
4677
|
}
|
4748
4678
|
|
4749
|
-
var __defProp$1 = Object.defineProperty;
|
4750
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
4751
|
-
var __publicField$1 = (obj, key, value) => {
|
4752
|
-
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
4753
|
-
return value;
|
4754
|
-
};
|
4755
4679
|
const META = "__";
|
4756
4680
|
const VALUE = "___";
|
4757
4681
|
class Serializer {
|
4758
4682
|
constructor() {
|
4759
|
-
|
4683
|
+
this.classes = {};
|
4760
4684
|
}
|
4761
4685
|
add(clazz) {
|
4762
4686
|
this.classes[clazz.name] = clazz;
|
@@ -4834,19 +4758,12 @@ function buildWorkerRunner(config) {
|
|
4834
4758
|
};
|
4835
4759
|
}
|
4836
4760
|
|
4837
|
-
var __defProp = Object.defineProperty;
|
4838
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
4839
|
-
var __publicField = (obj, key, value) => {
|
4840
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
4841
|
-
return value;
|
4842
|
-
};
|
4843
4761
|
class XataError extends Error {
|
4844
4762
|
constructor(message, status) {
|
4845
4763
|
super(message);
|
4846
|
-
__publicField(this, "status");
|
4847
4764
|
this.status = status;
|
4848
4765
|
}
|
4849
4766
|
}
|
4850
4767
|
|
4851
|
-
export { BaseClient, FetcherError, FilesPlugin, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Query, RecordArray, RecordColumnTypes, Repository, RestRepository, SQLPlugin, SchemaPlugin, SearchPlugin, Serializer, SimpleCache, XataApiClient, XataApiPlugin, XataError, XataFile, XataPlugin, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteOAuthAccessToken, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteUserOAuthClient, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, ge, getAPIKey, getAuthorizationCode, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, transformImage, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|
4768
|
+
export { BaseClient, FetcherError, FilesPlugin, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Query, RecordArray, RecordColumnTypes, Repository, RestRepository, SQLPlugin, SchemaPlugin, SearchPlugin, Serializer, SimpleCache, XataApiClient, XataApiPlugin, XataError, XataFile, XataPlugin, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createCluster, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteOAuthAccessToken, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteUserOAuthClient, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, ge, getAPIKey, getAuthorizationCode, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, iContains, iPattern, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, transformImage, updateBranchMetadata, updateBranchSchema, updateCluster, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|
4852
4769
|
//# sourceMappingURL=index.mjs.map
|