@xata.io/client 0.0.0-alpha.ved669cc → 0.0.0-alpha.vede38ca
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 +88 -0
- package/README.md +27 -25
- package/Usage.md +60 -6
- package/dist/index.cjs +800 -358
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1256 -200
- package/dist/index.mjs +755 -359
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
declare type AttributeDictionary = Record<string, string | number | boolean | undefined>;
|
|
2
|
+
declare type TraceFunction = <T>(name: string, fn: (options: {
|
|
3
|
+
setAttributes: (attrs: AttributeDictionary) => void;
|
|
4
|
+
propagateTrace: (headers: Record<string, any>) => void;
|
|
5
|
+
}) => T, options?: AttributeDictionary) => Promise<T>;
|
|
6
|
+
|
|
1
7
|
declare type FetchImpl = (url: string, init?: {
|
|
2
8
|
body?: string;
|
|
3
9
|
headers?: Record<string, string>;
|
|
@@ -5,17 +11,19 @@ declare type FetchImpl = (url: string, init?: {
|
|
|
5
11
|
}) => Promise<{
|
|
6
12
|
ok: boolean;
|
|
7
13
|
status: number;
|
|
14
|
+
url: string;
|
|
8
15
|
json(): Promise<any>;
|
|
9
16
|
headers?: {
|
|
10
17
|
get(name: string): string | null;
|
|
11
18
|
};
|
|
12
19
|
}>;
|
|
13
|
-
declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Record<string, string
|
|
20
|
+
declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
|
|
14
21
|
declare type FetcherExtraProps = {
|
|
15
22
|
apiUrl: string;
|
|
16
23
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
|
17
24
|
fetchImpl: FetchImpl;
|
|
18
25
|
apiKey: string;
|
|
26
|
+
trace: TraceFunction;
|
|
19
27
|
};
|
|
20
28
|
declare type ErrorWrapper<TError> = TError | {
|
|
21
29
|
status: 'unknown';
|
|
@@ -23,7 +31,6 @@ declare type ErrorWrapper<TError> = TError | {
|
|
|
23
31
|
};
|
|
24
32
|
|
|
25
33
|
interface CacheImpl {
|
|
26
|
-
cacheRecords: boolean;
|
|
27
34
|
defaultQueryTTL: number;
|
|
28
35
|
getAll(): Promise<Record<string, unknown>>;
|
|
29
36
|
get: <T>(key: string) => Promise<T | null>;
|
|
@@ -33,13 +40,11 @@ interface CacheImpl {
|
|
|
33
40
|
}
|
|
34
41
|
interface SimpleCacheOptions {
|
|
35
42
|
max?: number;
|
|
36
|
-
cacheRecords?: boolean;
|
|
37
43
|
defaultQueryTTL?: number;
|
|
38
44
|
}
|
|
39
45
|
declare class SimpleCache implements CacheImpl {
|
|
40
46
|
#private;
|
|
41
47
|
capacity: number;
|
|
42
|
-
cacheRecords: boolean;
|
|
43
48
|
defaultQueryTTL: number;
|
|
44
49
|
constructor(options?: SimpleCacheOptions);
|
|
45
50
|
getAll(): Promise<Record<string, unknown>>;
|
|
@@ -55,6 +60,7 @@ declare abstract class XataPlugin {
|
|
|
55
60
|
declare type XataPluginOptions = {
|
|
56
61
|
getFetchProps: () => Promise<FetcherExtraProps>;
|
|
57
62
|
cache: CacheImpl;
|
|
63
|
+
trace?: TraceFunction;
|
|
58
64
|
};
|
|
59
65
|
|
|
60
66
|
/**
|
|
@@ -94,7 +100,7 @@ declare type WorkspaceID = string;
|
|
|
94
100
|
declare type Role = 'owner' | 'maintainer';
|
|
95
101
|
declare type WorkspaceMeta = {
|
|
96
102
|
name: string;
|
|
97
|
-
slug
|
|
103
|
+
slug?: string;
|
|
98
104
|
};
|
|
99
105
|
declare type Workspace = WorkspaceMeta & {
|
|
100
106
|
id: WorkspaceID;
|
|
@@ -125,16 +131,20 @@ declare type WorkspaceMembers = {
|
|
|
125
131
|
* @pattern ^ik_[a-zA-Z0-9]+
|
|
126
132
|
*/
|
|
127
133
|
declare type InviteKey = string;
|
|
134
|
+
/**
|
|
135
|
+
* Metadata of databases
|
|
136
|
+
*/
|
|
137
|
+
declare type DatabaseMetadata = {
|
|
138
|
+
name: string;
|
|
139
|
+
displayName: string;
|
|
140
|
+
createdAt: DateTime;
|
|
141
|
+
numberOfBranches: number;
|
|
142
|
+
ui?: {
|
|
143
|
+
color?: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
128
146
|
declare type ListDatabasesResponse = {
|
|
129
|
-
databases?:
|
|
130
|
-
name: string;
|
|
131
|
-
displayName: string;
|
|
132
|
-
createdAt: DateTime;
|
|
133
|
-
numberOfBranches: number;
|
|
134
|
-
ui?: {
|
|
135
|
-
color?: string;
|
|
136
|
-
};
|
|
137
|
-
}[];
|
|
147
|
+
databases?: DatabaseMetadata[];
|
|
138
148
|
};
|
|
139
149
|
declare type ListBranchesResponse = {
|
|
140
150
|
databaseName: string;
|
|
@@ -184,12 +194,28 @@ declare type Schema = {
|
|
|
184
194
|
tables: Table[];
|
|
185
195
|
tablesOrder?: string[];
|
|
186
196
|
};
|
|
197
|
+
/**
|
|
198
|
+
* @x-internal true
|
|
199
|
+
*/
|
|
200
|
+
declare type SchemaEditScript = {
|
|
201
|
+
sourceMigrationID?: string;
|
|
202
|
+
targetMigrationID?: string;
|
|
203
|
+
tables: TableEdit[];
|
|
204
|
+
};
|
|
187
205
|
declare type Table = {
|
|
188
206
|
id?: string;
|
|
189
207
|
name: TableName;
|
|
190
208
|
columns: Column[];
|
|
191
209
|
revLinks?: RevLink[];
|
|
192
210
|
};
|
|
211
|
+
/**
|
|
212
|
+
* @x-internal true
|
|
213
|
+
*/
|
|
214
|
+
declare type TableEdit = {
|
|
215
|
+
oldName?: string;
|
|
216
|
+
newName?: string;
|
|
217
|
+
columns?: MigrationColumnOp[];
|
|
218
|
+
};
|
|
193
219
|
/**
|
|
194
220
|
* @x-go-type xata.Column
|
|
195
221
|
*/
|
|
@@ -199,6 +225,8 @@ declare type Column = {
|
|
|
199
225
|
link?: {
|
|
200
226
|
table: string;
|
|
201
227
|
};
|
|
228
|
+
notNull?: boolean;
|
|
229
|
+
unique?: boolean;
|
|
202
230
|
columns?: Column[];
|
|
203
231
|
};
|
|
204
232
|
declare type RevLink = {
|
|
@@ -265,6 +293,110 @@ declare type ColumnMigration = {
|
|
|
265
293
|
old: Column;
|
|
266
294
|
['new']: Column;
|
|
267
295
|
};
|
|
296
|
+
/**
|
|
297
|
+
* @x-internal true
|
|
298
|
+
*/
|
|
299
|
+
declare type Commit = {
|
|
300
|
+
meta?: {
|
|
301
|
+
title?: string;
|
|
302
|
+
message?: string;
|
|
303
|
+
id: string;
|
|
304
|
+
parentID?: string;
|
|
305
|
+
mergeParentID?: string;
|
|
306
|
+
status: string;
|
|
307
|
+
createdAt: DateTime;
|
|
308
|
+
modifiedAt?: DateTime;
|
|
309
|
+
};
|
|
310
|
+
operations: MigrationOp[];
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* Branch schema migration.
|
|
314
|
+
*
|
|
315
|
+
* @x-internal true
|
|
316
|
+
*/
|
|
317
|
+
declare type Migration = {
|
|
318
|
+
parentID?: string;
|
|
319
|
+
operations: MigrationOp[];
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* Branch schema migration operations.
|
|
323
|
+
*
|
|
324
|
+
* @x-internal true
|
|
325
|
+
*/
|
|
326
|
+
declare type MigrationOp = MigrationTableOp | MigrationColumnOp;
|
|
327
|
+
/**
|
|
328
|
+
* @x-internal true
|
|
329
|
+
*/
|
|
330
|
+
declare type MigrationTableOp = {
|
|
331
|
+
addTable: TableOpAdd;
|
|
332
|
+
} | {
|
|
333
|
+
removeTable: TableOpRemove;
|
|
334
|
+
} | {
|
|
335
|
+
renameTable: TableOpRename;
|
|
336
|
+
};
|
|
337
|
+
/**
|
|
338
|
+
* @x-internal true
|
|
339
|
+
*/
|
|
340
|
+
declare type MigrationColumnOp = {
|
|
341
|
+
addColumn: ColumnOpAdd;
|
|
342
|
+
} | {
|
|
343
|
+
removeColumn: ColumnOpRemove;
|
|
344
|
+
} | {
|
|
345
|
+
renameColumn: ColumnOpRename;
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* @x-internal true
|
|
349
|
+
*/
|
|
350
|
+
declare type TableOpAdd = {
|
|
351
|
+
table: string;
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* @x-internal true
|
|
355
|
+
*/
|
|
356
|
+
declare type TableOpRemove = {
|
|
357
|
+
table: string;
|
|
358
|
+
};
|
|
359
|
+
/**
|
|
360
|
+
* @x-internal true
|
|
361
|
+
*/
|
|
362
|
+
declare type TableOpRename = {
|
|
363
|
+
oldName: string;
|
|
364
|
+
newName: string;
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* @x-internal true
|
|
368
|
+
*/
|
|
369
|
+
declare type ColumnOpAdd = {
|
|
370
|
+
table?: string;
|
|
371
|
+
column: Column;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* @x-internal true
|
|
375
|
+
*/
|
|
376
|
+
declare type ColumnOpRemove = {
|
|
377
|
+
table?: string;
|
|
378
|
+
column: string;
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* @x-internal true
|
|
382
|
+
*/
|
|
383
|
+
declare type ColumnOpRename = {
|
|
384
|
+
table?: string;
|
|
385
|
+
oldName: string;
|
|
386
|
+
newName: string;
|
|
387
|
+
};
|
|
388
|
+
declare type MigrationRequest = {
|
|
389
|
+
number: number;
|
|
390
|
+
createdAt: DateTime;
|
|
391
|
+
modifiedAt?: DateTime;
|
|
392
|
+
closedAt?: DateTime;
|
|
393
|
+
mergedAt?: DateTime;
|
|
394
|
+
status: 'open' | 'closed' | 'merging' | 'merged';
|
|
395
|
+
title: string;
|
|
396
|
+
body: string;
|
|
397
|
+
source: string;
|
|
398
|
+
target: string;
|
|
399
|
+
};
|
|
268
400
|
declare type SortExpression = string[] | {
|
|
269
401
|
[key: string]: SortOrder;
|
|
270
402
|
} | {
|
|
@@ -273,7 +405,7 @@ declare type SortExpression = string[] | {
|
|
|
273
405
|
declare type SortOrder = 'asc' | 'desc';
|
|
274
406
|
/**
|
|
275
407
|
* Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
|
|
276
|
-
* distance is the number of one
|
|
408
|
+
* distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
|
|
277
409
|
* character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
|
|
278
410
|
* to allow two typos in a word.
|
|
279
411
|
*
|
|
@@ -303,6 +435,44 @@ declare type HighlightExpression = {
|
|
|
303
435
|
enabled?: boolean;
|
|
304
436
|
encodeHTML?: boolean;
|
|
305
437
|
};
|
|
438
|
+
/**
|
|
439
|
+
* Booster Expression
|
|
440
|
+
*
|
|
441
|
+
* @x-go-type xata.BoosterExpression
|
|
442
|
+
*/
|
|
443
|
+
declare type BoosterExpression = {
|
|
444
|
+
valueBooster?: ValueBooster$1;
|
|
445
|
+
} | {
|
|
446
|
+
numericBooster?: NumericBooster$1;
|
|
447
|
+
} | {
|
|
448
|
+
dateBooster?: DateBooster$1;
|
|
449
|
+
};
|
|
450
|
+
/**
|
|
451
|
+
* Boost records with a particular value for a column.
|
|
452
|
+
*/
|
|
453
|
+
declare type ValueBooster$1 = {
|
|
454
|
+
column: string;
|
|
455
|
+
value: string | number | boolean;
|
|
456
|
+
factor: number;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* Boost records based on the value of a numeric column.
|
|
460
|
+
*/
|
|
461
|
+
declare type NumericBooster$1 = {
|
|
462
|
+
column: string;
|
|
463
|
+
factor: number;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Boost records based on the value of a datetime column. It is configured via "origin", "scale", and "decay". The further away from the "origin",
|
|
467
|
+
* the more the score is decayed. The decay function uses an exponential function. For example if origin is "now", and scale is 10 days and decay is 0.5, it
|
|
468
|
+
* should be interpreted as: a record with a date 10 days before/after origin will score 2 times less than a record with the date at origin.
|
|
469
|
+
*/
|
|
470
|
+
declare type DateBooster$1 = {
|
|
471
|
+
column: string;
|
|
472
|
+
origin?: string;
|
|
473
|
+
scale: string;
|
|
474
|
+
decay: number;
|
|
475
|
+
};
|
|
306
476
|
declare type FilterList = FilterExpression | FilterExpression[];
|
|
307
477
|
declare type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
|
|
308
478
|
/**
|
|
@@ -359,7 +529,24 @@ declare type PageConfig = {
|
|
|
359
529
|
size?: number;
|
|
360
530
|
offset?: number;
|
|
361
531
|
};
|
|
362
|
-
declare type
|
|
532
|
+
declare type ColumnsProjection = string[];
|
|
533
|
+
/**
|
|
534
|
+
* Xata Table Record Metadata
|
|
535
|
+
*/
|
|
536
|
+
declare type RecordMeta = {
|
|
537
|
+
id: RecordID;
|
|
538
|
+
xata: {
|
|
539
|
+
version: number;
|
|
540
|
+
table?: string;
|
|
541
|
+
highlight?: {
|
|
542
|
+
[key: string]: string[] | {
|
|
543
|
+
[key: string]: any;
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
score?: number;
|
|
547
|
+
warnings?: string[];
|
|
548
|
+
};
|
|
549
|
+
};
|
|
363
550
|
/**
|
|
364
551
|
* @pattern [a-zA-Z0-9_-~:]+
|
|
365
552
|
*/
|
|
@@ -381,21 +568,9 @@ declare type RecordsMetadata = {
|
|
|
381
568
|
};
|
|
382
569
|
};
|
|
383
570
|
/**
|
|
384
|
-
* Xata Table Record
|
|
571
|
+
* Xata Table Record Metadata
|
|
385
572
|
*/
|
|
386
|
-
declare type XataRecord$1 = {
|
|
387
|
-
id: RecordID;
|
|
388
|
-
xata: {
|
|
389
|
-
version: number;
|
|
390
|
-
table?: string;
|
|
391
|
-
highlight?: {
|
|
392
|
-
[key: string]: string[] | {
|
|
393
|
-
[key: string]: any;
|
|
394
|
-
};
|
|
395
|
-
};
|
|
396
|
-
warnings?: string[];
|
|
397
|
-
};
|
|
398
|
-
} & {
|
|
573
|
+
declare type XataRecord$1 = RecordMeta & {
|
|
399
574
|
[key: string]: any;
|
|
400
575
|
};
|
|
401
576
|
|
|
@@ -413,6 +588,7 @@ type schemas_InviteID = InviteID;
|
|
|
413
588
|
type schemas_WorkspaceInvite = WorkspaceInvite;
|
|
414
589
|
type schemas_WorkspaceMembers = WorkspaceMembers;
|
|
415
590
|
type schemas_InviteKey = InviteKey;
|
|
591
|
+
type schemas_DatabaseMetadata = DatabaseMetadata;
|
|
416
592
|
type schemas_ListDatabasesResponse = ListDatabasesResponse;
|
|
417
593
|
type schemas_ListBranchesResponse = ListBranchesResponse;
|
|
418
594
|
type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
|
|
@@ -421,7 +597,9 @@ type schemas_BranchMetadata = BranchMetadata;
|
|
|
421
597
|
type schemas_DBBranch = DBBranch;
|
|
422
598
|
type schemas_StartedFromMetadata = StartedFromMetadata;
|
|
423
599
|
type schemas_Schema = Schema;
|
|
600
|
+
type schemas_SchemaEditScript = SchemaEditScript;
|
|
424
601
|
type schemas_Table = Table;
|
|
602
|
+
type schemas_TableEdit = TableEdit;
|
|
425
603
|
type schemas_Column = Column;
|
|
426
604
|
type schemas_RevLink = RevLink;
|
|
427
605
|
type schemas_BranchName = BranchName;
|
|
@@ -434,12 +612,25 @@ type schemas_MetricsLatency = MetricsLatency;
|
|
|
434
612
|
type schemas_BranchMigration = BranchMigration;
|
|
435
613
|
type schemas_TableMigration = TableMigration;
|
|
436
614
|
type schemas_ColumnMigration = ColumnMigration;
|
|
615
|
+
type schemas_Commit = Commit;
|
|
616
|
+
type schemas_Migration = Migration;
|
|
617
|
+
type schemas_MigrationOp = MigrationOp;
|
|
618
|
+
type schemas_MigrationTableOp = MigrationTableOp;
|
|
619
|
+
type schemas_MigrationColumnOp = MigrationColumnOp;
|
|
620
|
+
type schemas_TableOpAdd = TableOpAdd;
|
|
621
|
+
type schemas_TableOpRemove = TableOpRemove;
|
|
622
|
+
type schemas_TableOpRename = TableOpRename;
|
|
623
|
+
type schemas_ColumnOpAdd = ColumnOpAdd;
|
|
624
|
+
type schemas_ColumnOpRemove = ColumnOpRemove;
|
|
625
|
+
type schemas_ColumnOpRename = ColumnOpRename;
|
|
626
|
+
type schemas_MigrationRequest = MigrationRequest;
|
|
437
627
|
type schemas_SortExpression = SortExpression;
|
|
438
628
|
type schemas_SortOrder = SortOrder;
|
|
439
629
|
type schemas_FuzzinessExpression = FuzzinessExpression;
|
|
440
630
|
type schemas_PrefixExpression = PrefixExpression;
|
|
441
631
|
type schemas_FilterExpression = FilterExpression;
|
|
442
632
|
type schemas_HighlightExpression = HighlightExpression;
|
|
633
|
+
type schemas_BoosterExpression = BoosterExpression;
|
|
443
634
|
type schemas_FilterList = FilterList;
|
|
444
635
|
type schemas_FilterColumn = FilterColumn;
|
|
445
636
|
type schemas_FilterColumnIncludes = FilterColumnIncludes;
|
|
@@ -449,7 +640,8 @@ type schemas_FilterPredicateRangeOp = FilterPredicateRangeOp;
|
|
|
449
640
|
type schemas_FilterRangeValue = FilterRangeValue;
|
|
450
641
|
type schemas_FilterValue = FilterValue;
|
|
451
642
|
type schemas_PageConfig = PageConfig;
|
|
452
|
-
type
|
|
643
|
+
type schemas_ColumnsProjection = ColumnsProjection;
|
|
644
|
+
type schemas_RecordMeta = RecordMeta;
|
|
453
645
|
type schemas_RecordID = RecordID;
|
|
454
646
|
type schemas_TableRename = TableRename;
|
|
455
647
|
type schemas_RecordsMetadata = RecordsMetadata;
|
|
@@ -469,6 +661,7 @@ declare namespace schemas {
|
|
|
469
661
|
schemas_WorkspaceInvite as WorkspaceInvite,
|
|
470
662
|
schemas_WorkspaceMembers as WorkspaceMembers,
|
|
471
663
|
schemas_InviteKey as InviteKey,
|
|
664
|
+
schemas_DatabaseMetadata as DatabaseMetadata,
|
|
472
665
|
schemas_ListDatabasesResponse as ListDatabasesResponse,
|
|
473
666
|
schemas_ListBranchesResponse as ListBranchesResponse,
|
|
474
667
|
schemas_ListGitBranchesResponse as ListGitBranchesResponse,
|
|
@@ -477,7 +670,9 @@ declare namespace schemas {
|
|
|
477
670
|
schemas_DBBranch as DBBranch,
|
|
478
671
|
schemas_StartedFromMetadata as StartedFromMetadata,
|
|
479
672
|
schemas_Schema as Schema,
|
|
673
|
+
schemas_SchemaEditScript as SchemaEditScript,
|
|
480
674
|
schemas_Table as Table,
|
|
675
|
+
schemas_TableEdit as TableEdit,
|
|
481
676
|
schemas_Column as Column,
|
|
482
677
|
schemas_RevLink as RevLink,
|
|
483
678
|
schemas_BranchName as BranchName,
|
|
@@ -490,12 +685,28 @@ declare namespace schemas {
|
|
|
490
685
|
schemas_BranchMigration as BranchMigration,
|
|
491
686
|
schemas_TableMigration as TableMigration,
|
|
492
687
|
schemas_ColumnMigration as ColumnMigration,
|
|
688
|
+
schemas_Commit as Commit,
|
|
689
|
+
schemas_Migration as Migration,
|
|
690
|
+
schemas_MigrationOp as MigrationOp,
|
|
691
|
+
schemas_MigrationTableOp as MigrationTableOp,
|
|
692
|
+
schemas_MigrationColumnOp as MigrationColumnOp,
|
|
693
|
+
schemas_TableOpAdd as TableOpAdd,
|
|
694
|
+
schemas_TableOpRemove as TableOpRemove,
|
|
695
|
+
schemas_TableOpRename as TableOpRename,
|
|
696
|
+
schemas_ColumnOpAdd as ColumnOpAdd,
|
|
697
|
+
schemas_ColumnOpRemove as ColumnOpRemove,
|
|
698
|
+
schemas_ColumnOpRename as ColumnOpRename,
|
|
699
|
+
schemas_MigrationRequest as MigrationRequest,
|
|
493
700
|
schemas_SortExpression as SortExpression,
|
|
494
701
|
schemas_SortOrder as SortOrder,
|
|
495
702
|
schemas_FuzzinessExpression as FuzzinessExpression,
|
|
496
703
|
schemas_PrefixExpression as PrefixExpression,
|
|
497
704
|
schemas_FilterExpression as FilterExpression,
|
|
498
705
|
schemas_HighlightExpression as HighlightExpression,
|
|
706
|
+
schemas_BoosterExpression as BoosterExpression,
|
|
707
|
+
ValueBooster$1 as ValueBooster,
|
|
708
|
+
NumericBooster$1 as NumericBooster,
|
|
709
|
+
DateBooster$1 as DateBooster,
|
|
499
710
|
schemas_FilterList as FilterList,
|
|
500
711
|
schemas_FilterColumn as FilterColumn,
|
|
501
712
|
schemas_FilterColumnIncludes as FilterColumnIncludes,
|
|
@@ -505,7 +716,8 @@ declare namespace schemas {
|
|
|
505
716
|
schemas_FilterRangeValue as FilterRangeValue,
|
|
506
717
|
schemas_FilterValue as FilterValue,
|
|
507
718
|
schemas_PageConfig as PageConfig,
|
|
508
|
-
|
|
719
|
+
schemas_ColumnsProjection as ColumnsProjection,
|
|
720
|
+
schemas_RecordMeta as RecordMeta,
|
|
509
721
|
schemas_RecordID as RecordID,
|
|
510
722
|
schemas_TableRename as TableRename,
|
|
511
723
|
schemas_RecordsMetadata as RecordsMetadata,
|
|
@@ -540,11 +752,22 @@ declare type BulkError = {
|
|
|
540
752
|
status?: number;
|
|
541
753
|
}[];
|
|
542
754
|
};
|
|
755
|
+
declare type BulkInsertResponse = {
|
|
756
|
+
recordIDs: string[];
|
|
757
|
+
} | {
|
|
758
|
+
records: XataRecord$1[];
|
|
759
|
+
};
|
|
543
760
|
declare type BranchMigrationPlan = {
|
|
544
761
|
version: number;
|
|
545
762
|
migration: BranchMigration;
|
|
546
763
|
};
|
|
547
|
-
declare type
|
|
764
|
+
declare type RecordResponse = XataRecord$1;
|
|
765
|
+
declare type SchemaCompareResponse = {
|
|
766
|
+
source: Schema;
|
|
767
|
+
target: Schema;
|
|
768
|
+
edits: SchemaEditScript;
|
|
769
|
+
};
|
|
770
|
+
declare type RecordUpdateResponse = XataRecord$1 | {
|
|
548
771
|
id: string;
|
|
549
772
|
xata: {
|
|
550
773
|
version: number;
|
|
@@ -568,7 +791,10 @@ type responses_SimpleError = SimpleError;
|
|
|
568
791
|
type responses_BadRequestError = BadRequestError;
|
|
569
792
|
type responses_AuthError = AuthError;
|
|
570
793
|
type responses_BulkError = BulkError;
|
|
794
|
+
type responses_BulkInsertResponse = BulkInsertResponse;
|
|
571
795
|
type responses_BranchMigrationPlan = BranchMigrationPlan;
|
|
796
|
+
type responses_RecordResponse = RecordResponse;
|
|
797
|
+
type responses_SchemaCompareResponse = SchemaCompareResponse;
|
|
572
798
|
type responses_RecordUpdateResponse = RecordUpdateResponse;
|
|
573
799
|
type responses_QueryResponse = QueryResponse;
|
|
574
800
|
type responses_SearchResponse = SearchResponse;
|
|
@@ -579,7 +805,10 @@ declare namespace responses {
|
|
|
579
805
|
responses_BadRequestError as BadRequestError,
|
|
580
806
|
responses_AuthError as AuthError,
|
|
581
807
|
responses_BulkError as BulkError,
|
|
808
|
+
responses_BulkInsertResponse as BulkInsertResponse,
|
|
582
809
|
responses_BranchMigrationPlan as BranchMigrationPlan,
|
|
810
|
+
responses_RecordResponse as RecordResponse,
|
|
811
|
+
responses_SchemaCompareResponse as SchemaCompareResponse,
|
|
583
812
|
responses_RecordUpdateResponse as RecordUpdateResponse,
|
|
584
813
|
responses_QueryResponse as QueryResponse,
|
|
585
814
|
responses_SearchResponse as SearchResponse,
|
|
@@ -885,6 +1114,9 @@ declare type InviteWorkspaceMemberError = ErrorWrapper<{
|
|
|
885
1114
|
} | {
|
|
886
1115
|
status: 404;
|
|
887
1116
|
payload: SimpleError;
|
|
1117
|
+
} | {
|
|
1118
|
+
status: 409;
|
|
1119
|
+
payload: SimpleError;
|
|
888
1120
|
}>;
|
|
889
1121
|
declare type InviteWorkspaceMemberRequestBody = {
|
|
890
1122
|
email: string;
|
|
@@ -898,6 +1130,34 @@ declare type InviteWorkspaceMemberVariables = {
|
|
|
898
1130
|
* Invite some user to join the workspace with the given role
|
|
899
1131
|
*/
|
|
900
1132
|
declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<WorkspaceInvite>;
|
|
1133
|
+
declare type UpdateWorkspaceMemberInvitePathParams = {
|
|
1134
|
+
workspaceId: WorkspaceID;
|
|
1135
|
+
inviteId: InviteID;
|
|
1136
|
+
};
|
|
1137
|
+
declare type UpdateWorkspaceMemberInviteError = ErrorWrapper<{
|
|
1138
|
+
status: 400;
|
|
1139
|
+
payload: BadRequestError;
|
|
1140
|
+
} | {
|
|
1141
|
+
status: 401;
|
|
1142
|
+
payload: AuthError;
|
|
1143
|
+
} | {
|
|
1144
|
+
status: 404;
|
|
1145
|
+
payload: SimpleError;
|
|
1146
|
+
} | {
|
|
1147
|
+
status: 422;
|
|
1148
|
+
payload: SimpleError;
|
|
1149
|
+
}>;
|
|
1150
|
+
declare type UpdateWorkspaceMemberInviteRequestBody = {
|
|
1151
|
+
role: Role;
|
|
1152
|
+
};
|
|
1153
|
+
declare type UpdateWorkspaceMemberInviteVariables = {
|
|
1154
|
+
body: UpdateWorkspaceMemberInviteRequestBody;
|
|
1155
|
+
pathParams: UpdateWorkspaceMemberInvitePathParams;
|
|
1156
|
+
} & FetcherExtraProps;
|
|
1157
|
+
/**
|
|
1158
|
+
* This operation provides a way to update an existing invite. Updates are performed in-place; they do not change the invite link, the expiry time, nor do they re-notify the recipient of the invite.
|
|
1159
|
+
*/
|
|
1160
|
+
declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
|
|
901
1161
|
declare type CancelWorkspaceMemberInvitePathParams = {
|
|
902
1162
|
workspaceId: WorkspaceID;
|
|
903
1163
|
inviteId: InviteID;
|
|
@@ -1051,6 +1311,54 @@ declare type DeleteDatabaseVariables = {
|
|
|
1051
1311
|
* Delete a database and all of its branches and tables permanently.
|
|
1052
1312
|
*/
|
|
1053
1313
|
declare const deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
|
|
1314
|
+
declare type GetDatabaseMetadataPathParams = {
|
|
1315
|
+
dbName: DBName;
|
|
1316
|
+
workspace: string;
|
|
1317
|
+
};
|
|
1318
|
+
declare type GetDatabaseMetadataError = ErrorWrapper<{
|
|
1319
|
+
status: 400;
|
|
1320
|
+
payload: BadRequestError;
|
|
1321
|
+
} | {
|
|
1322
|
+
status: 401;
|
|
1323
|
+
payload: AuthError;
|
|
1324
|
+
} | {
|
|
1325
|
+
status: 404;
|
|
1326
|
+
payload: SimpleError;
|
|
1327
|
+
}>;
|
|
1328
|
+
declare type GetDatabaseMetadataVariables = {
|
|
1329
|
+
pathParams: GetDatabaseMetadataPathParams;
|
|
1330
|
+
} & FetcherExtraProps;
|
|
1331
|
+
/**
|
|
1332
|
+
* Retrieve metadata of the given database
|
|
1333
|
+
*/
|
|
1334
|
+
declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
|
1335
|
+
declare type PatchDatabaseMetadataPathParams = {
|
|
1336
|
+
dbName: DBName;
|
|
1337
|
+
workspace: string;
|
|
1338
|
+
};
|
|
1339
|
+
declare type PatchDatabaseMetadataError = ErrorWrapper<{
|
|
1340
|
+
status: 400;
|
|
1341
|
+
payload: BadRequestError;
|
|
1342
|
+
} | {
|
|
1343
|
+
status: 401;
|
|
1344
|
+
payload: AuthError;
|
|
1345
|
+
} | {
|
|
1346
|
+
status: 404;
|
|
1347
|
+
payload: SimpleError;
|
|
1348
|
+
}>;
|
|
1349
|
+
declare type PatchDatabaseMetadataRequestBody = {
|
|
1350
|
+
ui?: {
|
|
1351
|
+
color?: string;
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
declare type PatchDatabaseMetadataVariables = {
|
|
1355
|
+
body?: PatchDatabaseMetadataRequestBody;
|
|
1356
|
+
pathParams: PatchDatabaseMetadataPathParams;
|
|
1357
|
+
} & FetcherExtraProps;
|
|
1358
|
+
/**
|
|
1359
|
+
* Update the color of the selected database
|
|
1360
|
+
*/
|
|
1361
|
+
declare const patchDatabaseMetadata: (variables: PatchDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
|
1054
1362
|
declare type GetGitBranchesMappingPathParams = {
|
|
1055
1363
|
dbName: DBName;
|
|
1056
1364
|
workspace: string;
|
|
@@ -1208,6 +1516,201 @@ declare type ResolveBranchVariables = {
|
|
|
1208
1516
|
* ```
|
|
1209
1517
|
*/
|
|
1210
1518
|
declare const resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
|
|
1519
|
+
declare type ListMigrationRequestsPathParams = {
|
|
1520
|
+
dbName: DBName;
|
|
1521
|
+
workspace: string;
|
|
1522
|
+
};
|
|
1523
|
+
declare type ListMigrationRequestsError = ErrorWrapper<{
|
|
1524
|
+
status: 400;
|
|
1525
|
+
payload: BadRequestError;
|
|
1526
|
+
} | {
|
|
1527
|
+
status: 401;
|
|
1528
|
+
payload: AuthError;
|
|
1529
|
+
} | {
|
|
1530
|
+
status: 404;
|
|
1531
|
+
payload: SimpleError;
|
|
1532
|
+
}>;
|
|
1533
|
+
declare type ListMigrationRequestsResponse = {
|
|
1534
|
+
migrationRequests: MigrationRequest[];
|
|
1535
|
+
meta: RecordsMetadata;
|
|
1536
|
+
};
|
|
1537
|
+
declare type ListMigrationRequestsRequestBody = {
|
|
1538
|
+
filter?: FilterExpression;
|
|
1539
|
+
sort?: SortExpression;
|
|
1540
|
+
page?: PageConfig;
|
|
1541
|
+
columns?: ColumnsProjection;
|
|
1542
|
+
};
|
|
1543
|
+
declare type ListMigrationRequestsVariables = {
|
|
1544
|
+
body?: ListMigrationRequestsRequestBody;
|
|
1545
|
+
pathParams: ListMigrationRequestsPathParams;
|
|
1546
|
+
} & FetcherExtraProps;
|
|
1547
|
+
declare const listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
|
|
1548
|
+
declare type CreateMigrationRequestPathParams = {
|
|
1549
|
+
dbName: DBName;
|
|
1550
|
+
workspace: string;
|
|
1551
|
+
};
|
|
1552
|
+
declare type CreateMigrationRequestError = ErrorWrapper<{
|
|
1553
|
+
status: 400;
|
|
1554
|
+
payload: BadRequestError;
|
|
1555
|
+
} | {
|
|
1556
|
+
status: 401;
|
|
1557
|
+
payload: AuthError;
|
|
1558
|
+
} | {
|
|
1559
|
+
status: 404;
|
|
1560
|
+
payload: SimpleError;
|
|
1561
|
+
}>;
|
|
1562
|
+
declare type CreateMigrationRequestResponse = {
|
|
1563
|
+
number: number;
|
|
1564
|
+
};
|
|
1565
|
+
declare type CreateMigrationRequestRequestBody = {
|
|
1566
|
+
source: string;
|
|
1567
|
+
target: string;
|
|
1568
|
+
title: string;
|
|
1569
|
+
body?: string;
|
|
1570
|
+
};
|
|
1571
|
+
declare type CreateMigrationRequestVariables = {
|
|
1572
|
+
body: CreateMigrationRequestRequestBody;
|
|
1573
|
+
pathParams: CreateMigrationRequestPathParams;
|
|
1574
|
+
} & FetcherExtraProps;
|
|
1575
|
+
declare const createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
|
|
1576
|
+
declare type GetMigrationRequestPathParams = {
|
|
1577
|
+
dbName: DBName;
|
|
1578
|
+
mrNumber: number;
|
|
1579
|
+
workspace: string;
|
|
1580
|
+
};
|
|
1581
|
+
declare type GetMigrationRequestError = ErrorWrapper<{
|
|
1582
|
+
status: 400;
|
|
1583
|
+
payload: BadRequestError;
|
|
1584
|
+
} | {
|
|
1585
|
+
status: 401;
|
|
1586
|
+
payload: AuthError;
|
|
1587
|
+
} | {
|
|
1588
|
+
status: 404;
|
|
1589
|
+
payload: SimpleError;
|
|
1590
|
+
}>;
|
|
1591
|
+
declare type GetMigrationRequestVariables = {
|
|
1592
|
+
pathParams: GetMigrationRequestPathParams;
|
|
1593
|
+
} & FetcherExtraProps;
|
|
1594
|
+
declare const getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
|
|
1595
|
+
declare type UpdateMigrationRequestPathParams = {
|
|
1596
|
+
dbName: DBName;
|
|
1597
|
+
mrNumber: number;
|
|
1598
|
+
workspace: string;
|
|
1599
|
+
};
|
|
1600
|
+
declare type UpdateMigrationRequestError = ErrorWrapper<{
|
|
1601
|
+
status: 400;
|
|
1602
|
+
payload: BadRequestError;
|
|
1603
|
+
} | {
|
|
1604
|
+
status: 401;
|
|
1605
|
+
payload: AuthError;
|
|
1606
|
+
} | {
|
|
1607
|
+
status: 404;
|
|
1608
|
+
payload: SimpleError;
|
|
1609
|
+
}>;
|
|
1610
|
+
declare type UpdateMigrationRequestRequestBody = {
|
|
1611
|
+
title?: string;
|
|
1612
|
+
body?: string;
|
|
1613
|
+
status?: 'open' | 'closed';
|
|
1614
|
+
};
|
|
1615
|
+
declare type UpdateMigrationRequestVariables = {
|
|
1616
|
+
body?: UpdateMigrationRequestRequestBody;
|
|
1617
|
+
pathParams: UpdateMigrationRequestPathParams;
|
|
1618
|
+
} & FetcherExtraProps;
|
|
1619
|
+
declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
|
|
1620
|
+
declare type ListMigrationRequestsCommitsPathParams = {
|
|
1621
|
+
dbName: DBName;
|
|
1622
|
+
mrNumber: number;
|
|
1623
|
+
workspace: string;
|
|
1624
|
+
};
|
|
1625
|
+
declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
|
|
1626
|
+
status: 400;
|
|
1627
|
+
payload: BadRequestError;
|
|
1628
|
+
} | {
|
|
1629
|
+
status: 401;
|
|
1630
|
+
payload: AuthError;
|
|
1631
|
+
} | {
|
|
1632
|
+
status: 404;
|
|
1633
|
+
payload: SimpleError;
|
|
1634
|
+
}>;
|
|
1635
|
+
declare type ListMigrationRequestsCommitsResponse = {
|
|
1636
|
+
meta: {
|
|
1637
|
+
cursor: string;
|
|
1638
|
+
more: boolean;
|
|
1639
|
+
};
|
|
1640
|
+
logs: Commit[];
|
|
1641
|
+
};
|
|
1642
|
+
declare type ListMigrationRequestsCommitsRequestBody = {
|
|
1643
|
+
page?: {
|
|
1644
|
+
after?: string;
|
|
1645
|
+
before?: string;
|
|
1646
|
+
size?: number;
|
|
1647
|
+
};
|
|
1648
|
+
};
|
|
1649
|
+
declare type ListMigrationRequestsCommitsVariables = {
|
|
1650
|
+
body?: ListMigrationRequestsCommitsRequestBody;
|
|
1651
|
+
pathParams: ListMigrationRequestsCommitsPathParams;
|
|
1652
|
+
} & FetcherExtraProps;
|
|
1653
|
+
declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
|
|
1654
|
+
declare type CompareMigrationRequestPathParams = {
|
|
1655
|
+
dbName: DBName;
|
|
1656
|
+
mrNumber: number;
|
|
1657
|
+
workspace: string;
|
|
1658
|
+
};
|
|
1659
|
+
declare type CompareMigrationRequestError = ErrorWrapper<{
|
|
1660
|
+
status: 400;
|
|
1661
|
+
payload: BadRequestError;
|
|
1662
|
+
} | {
|
|
1663
|
+
status: 401;
|
|
1664
|
+
payload: AuthError;
|
|
1665
|
+
} | {
|
|
1666
|
+
status: 404;
|
|
1667
|
+
payload: SimpleError;
|
|
1668
|
+
}>;
|
|
1669
|
+
declare type CompareMigrationRequestVariables = {
|
|
1670
|
+
pathParams: CompareMigrationRequestPathParams;
|
|
1671
|
+
} & FetcherExtraProps;
|
|
1672
|
+
declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
|
|
1673
|
+
declare type GetMigrationRequestIsMergedPathParams = {
|
|
1674
|
+
dbName: DBName;
|
|
1675
|
+
mrNumber: number;
|
|
1676
|
+
workspace: string;
|
|
1677
|
+
};
|
|
1678
|
+
declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
|
|
1679
|
+
status: 400;
|
|
1680
|
+
payload: BadRequestError;
|
|
1681
|
+
} | {
|
|
1682
|
+
status: 401;
|
|
1683
|
+
payload: AuthError;
|
|
1684
|
+
} | {
|
|
1685
|
+
status: 404;
|
|
1686
|
+
payload: SimpleError;
|
|
1687
|
+
}>;
|
|
1688
|
+
declare type GetMigrationRequestIsMergedResponse = {
|
|
1689
|
+
merged?: boolean;
|
|
1690
|
+
};
|
|
1691
|
+
declare type GetMigrationRequestIsMergedVariables = {
|
|
1692
|
+
pathParams: GetMigrationRequestIsMergedPathParams;
|
|
1693
|
+
} & FetcherExtraProps;
|
|
1694
|
+
declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
|
|
1695
|
+
declare type MergeMigrationRequestPathParams = {
|
|
1696
|
+
dbName: DBName;
|
|
1697
|
+
mrNumber: number;
|
|
1698
|
+
workspace: string;
|
|
1699
|
+
};
|
|
1700
|
+
declare type MergeMigrationRequestError = ErrorWrapper<{
|
|
1701
|
+
status: 400;
|
|
1702
|
+
payload: BadRequestError;
|
|
1703
|
+
} | {
|
|
1704
|
+
status: 401;
|
|
1705
|
+
payload: AuthError;
|
|
1706
|
+
} | {
|
|
1707
|
+
status: 404;
|
|
1708
|
+
payload: SimpleError;
|
|
1709
|
+
}>;
|
|
1710
|
+
declare type MergeMigrationRequestVariables = {
|
|
1711
|
+
pathParams: MergeMigrationRequestPathParams;
|
|
1712
|
+
} & FetcherExtraProps;
|
|
1713
|
+
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
|
|
1211
1714
|
declare type GetBranchDetailsPathParams = {
|
|
1212
1715
|
dbBranchName: DBBranchName;
|
|
1213
1716
|
workspace: string;
|
|
@@ -1243,6 +1746,10 @@ declare type CreateBranchError = ErrorWrapper<{
|
|
|
1243
1746
|
status: 404;
|
|
1244
1747
|
payload: SimpleError;
|
|
1245
1748
|
}>;
|
|
1749
|
+
declare type CreateBranchResponse = {
|
|
1750
|
+
databaseName: string;
|
|
1751
|
+
branchName: string;
|
|
1752
|
+
};
|
|
1246
1753
|
declare type CreateBranchRequestBody = {
|
|
1247
1754
|
from?: string;
|
|
1248
1755
|
metadata?: BranchMetadata;
|
|
@@ -1252,7 +1759,7 @@ declare type CreateBranchVariables = {
|
|
|
1252
1759
|
pathParams: CreateBranchPathParams;
|
|
1253
1760
|
queryParams?: CreateBranchQueryParams;
|
|
1254
1761
|
} & FetcherExtraProps;
|
|
1255
|
-
declare const createBranch: (variables: CreateBranchVariables) => Promise<
|
|
1762
|
+
declare const createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
|
|
1256
1763
|
declare type DeleteBranchPathParams = {
|
|
1257
1764
|
dbBranchName: DBBranchName;
|
|
1258
1765
|
workspace: string;
|
|
@@ -1385,10 +1892,161 @@ declare type GetBranchMigrationPlanVariables = {
|
|
|
1385
1892
|
body: Schema;
|
|
1386
1893
|
pathParams: GetBranchMigrationPlanPathParams;
|
|
1387
1894
|
} & FetcherExtraProps;
|
|
1388
|
-
/**
|
|
1389
|
-
* Compute a migration plan from a target schema the branch should be migrated too.
|
|
1390
|
-
*/
|
|
1391
|
-
declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
|
|
1895
|
+
/**
|
|
1896
|
+
* Compute a migration plan from a target schema the branch should be migrated too.
|
|
1897
|
+
*/
|
|
1898
|
+
declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
|
|
1899
|
+
declare type CompareBranchWithUserSchemaPathParams = {
|
|
1900
|
+
dbBranchName: DBBranchName;
|
|
1901
|
+
workspace: string;
|
|
1902
|
+
};
|
|
1903
|
+
declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
|
|
1904
|
+
status: 400;
|
|
1905
|
+
payload: BadRequestError;
|
|
1906
|
+
} | {
|
|
1907
|
+
status: 401;
|
|
1908
|
+
payload: AuthError;
|
|
1909
|
+
} | {
|
|
1910
|
+
status: 404;
|
|
1911
|
+
payload: SimpleError;
|
|
1912
|
+
}>;
|
|
1913
|
+
declare type CompareBranchWithUserSchemaRequestBody = {
|
|
1914
|
+
schema: Schema;
|
|
1915
|
+
};
|
|
1916
|
+
declare type CompareBranchWithUserSchemaVariables = {
|
|
1917
|
+
body: CompareBranchWithUserSchemaRequestBody;
|
|
1918
|
+
pathParams: CompareBranchWithUserSchemaPathParams;
|
|
1919
|
+
} & FetcherExtraProps;
|
|
1920
|
+
declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
|
|
1921
|
+
declare type CompareBranchSchemasPathParams = {
|
|
1922
|
+
dbBranchName: DBBranchName;
|
|
1923
|
+
branchName: BranchName;
|
|
1924
|
+
workspace: string;
|
|
1925
|
+
};
|
|
1926
|
+
declare type CompareBranchSchemasError = ErrorWrapper<{
|
|
1927
|
+
status: 400;
|
|
1928
|
+
payload: BadRequestError;
|
|
1929
|
+
} | {
|
|
1930
|
+
status: 401;
|
|
1931
|
+
payload: AuthError;
|
|
1932
|
+
} | {
|
|
1933
|
+
status: 404;
|
|
1934
|
+
payload: SimpleError;
|
|
1935
|
+
}>;
|
|
1936
|
+
declare type CompareBranchSchemasVariables = {
|
|
1937
|
+
body?: Record<string, any>;
|
|
1938
|
+
pathParams: CompareBranchSchemasPathParams;
|
|
1939
|
+
} & FetcherExtraProps;
|
|
1940
|
+
declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
|
|
1941
|
+
declare type UpdateBranchSchemaPathParams = {
|
|
1942
|
+
dbBranchName: DBBranchName;
|
|
1943
|
+
workspace: string;
|
|
1944
|
+
};
|
|
1945
|
+
declare type UpdateBranchSchemaError = ErrorWrapper<{
|
|
1946
|
+
status: 400;
|
|
1947
|
+
payload: BadRequestError;
|
|
1948
|
+
} | {
|
|
1949
|
+
status: 401;
|
|
1950
|
+
payload: AuthError;
|
|
1951
|
+
} | {
|
|
1952
|
+
status: 404;
|
|
1953
|
+
payload: SimpleError;
|
|
1954
|
+
}>;
|
|
1955
|
+
declare type UpdateBranchSchemaResponse = {
|
|
1956
|
+
id: string;
|
|
1957
|
+
parentID: string;
|
|
1958
|
+
};
|
|
1959
|
+
declare type UpdateBranchSchemaVariables = {
|
|
1960
|
+
body: Migration;
|
|
1961
|
+
pathParams: UpdateBranchSchemaPathParams;
|
|
1962
|
+
} & FetcherExtraProps;
|
|
1963
|
+
declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
|
|
1964
|
+
declare type PreviewBranchSchemaEditPathParams = {
|
|
1965
|
+
dbBranchName: DBBranchName;
|
|
1966
|
+
workspace: string;
|
|
1967
|
+
};
|
|
1968
|
+
declare type PreviewBranchSchemaEditError = ErrorWrapper<{
|
|
1969
|
+
status: 400;
|
|
1970
|
+
payload: BadRequestError;
|
|
1971
|
+
} | {
|
|
1972
|
+
status: 401;
|
|
1973
|
+
payload: AuthError;
|
|
1974
|
+
} | {
|
|
1975
|
+
status: 404;
|
|
1976
|
+
payload: SimpleError;
|
|
1977
|
+
}>;
|
|
1978
|
+
declare type PreviewBranchSchemaEditResponse = {
|
|
1979
|
+
original: Schema;
|
|
1980
|
+
updated: Schema;
|
|
1981
|
+
};
|
|
1982
|
+
declare type PreviewBranchSchemaEditRequestBody = {
|
|
1983
|
+
edits?: SchemaEditScript;
|
|
1984
|
+
operations?: MigrationOp[];
|
|
1985
|
+
};
|
|
1986
|
+
declare type PreviewBranchSchemaEditVariables = {
|
|
1987
|
+
body?: PreviewBranchSchemaEditRequestBody;
|
|
1988
|
+
pathParams: PreviewBranchSchemaEditPathParams;
|
|
1989
|
+
} & FetcherExtraProps;
|
|
1990
|
+
declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
|
|
1991
|
+
declare type ApplyBranchSchemaEditPathParams = {
|
|
1992
|
+
dbBranchName: DBBranchName;
|
|
1993
|
+
workspace: string;
|
|
1994
|
+
};
|
|
1995
|
+
declare type ApplyBranchSchemaEditError = ErrorWrapper<{
|
|
1996
|
+
status: 400;
|
|
1997
|
+
payload: BadRequestError;
|
|
1998
|
+
} | {
|
|
1999
|
+
status: 401;
|
|
2000
|
+
payload: AuthError;
|
|
2001
|
+
} | {
|
|
2002
|
+
status: 404;
|
|
2003
|
+
payload: SimpleError;
|
|
2004
|
+
}>;
|
|
2005
|
+
declare type ApplyBranchSchemaEditResponse = {
|
|
2006
|
+
id: string;
|
|
2007
|
+
parentID: string;
|
|
2008
|
+
};
|
|
2009
|
+
declare type ApplyBranchSchemaEditRequestBody = {
|
|
2010
|
+
edits: SchemaEditScript;
|
|
2011
|
+
};
|
|
2012
|
+
declare type ApplyBranchSchemaEditVariables = {
|
|
2013
|
+
body: ApplyBranchSchemaEditRequestBody;
|
|
2014
|
+
pathParams: ApplyBranchSchemaEditPathParams;
|
|
2015
|
+
} & FetcherExtraProps;
|
|
2016
|
+
declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
|
|
2017
|
+
declare type GetBranchSchemaHistoryPathParams = {
|
|
2018
|
+
dbBranchName: DBBranchName;
|
|
2019
|
+
workspace: string;
|
|
2020
|
+
};
|
|
2021
|
+
declare type GetBranchSchemaHistoryError = ErrorWrapper<{
|
|
2022
|
+
status: 400;
|
|
2023
|
+
payload: BadRequestError;
|
|
2024
|
+
} | {
|
|
2025
|
+
status: 401;
|
|
2026
|
+
payload: AuthError;
|
|
2027
|
+
} | {
|
|
2028
|
+
status: 404;
|
|
2029
|
+
payload: SimpleError;
|
|
2030
|
+
}>;
|
|
2031
|
+
declare type GetBranchSchemaHistoryResponse = {
|
|
2032
|
+
meta: {
|
|
2033
|
+
cursor: string;
|
|
2034
|
+
more: boolean;
|
|
2035
|
+
};
|
|
2036
|
+
logs: Commit[];
|
|
2037
|
+
};
|
|
2038
|
+
declare type GetBranchSchemaHistoryRequestBody = {
|
|
2039
|
+
page?: {
|
|
2040
|
+
after?: string;
|
|
2041
|
+
before?: string;
|
|
2042
|
+
size?: number;
|
|
2043
|
+
};
|
|
2044
|
+
};
|
|
2045
|
+
declare type GetBranchSchemaHistoryVariables = {
|
|
2046
|
+
body?: GetBranchSchemaHistoryRequestBody;
|
|
2047
|
+
pathParams: GetBranchSchemaHistoryPathParams;
|
|
2048
|
+
} & FetcherExtraProps;
|
|
2049
|
+
declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
|
|
1392
2050
|
declare type GetBranchStatsPathParams = {
|
|
1393
2051
|
dbBranchName: DBBranchName;
|
|
1394
2052
|
workspace: string;
|
|
@@ -1439,13 +2097,17 @@ declare type CreateTableError = ErrorWrapper<{
|
|
|
1439
2097
|
status: 422;
|
|
1440
2098
|
payload: SimpleError;
|
|
1441
2099
|
}>;
|
|
2100
|
+
declare type CreateTableResponse = {
|
|
2101
|
+
branchName: string;
|
|
2102
|
+
tableName: string;
|
|
2103
|
+
};
|
|
1442
2104
|
declare type CreateTableVariables = {
|
|
1443
2105
|
pathParams: CreateTablePathParams;
|
|
1444
2106
|
} & FetcherExtraProps;
|
|
1445
2107
|
/**
|
|
1446
2108
|
* Creates a new table with the given name. Returns 422 if a table with the same name already exists.
|
|
1447
2109
|
*/
|
|
1448
|
-
declare const createTable: (variables: CreateTableVariables) => Promise<
|
|
2110
|
+
declare const createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
|
|
1449
2111
|
declare type DeleteTablePathParams = {
|
|
1450
2112
|
dbBranchName: DBBranchName;
|
|
1451
2113
|
tableName: TableName;
|
|
@@ -1678,6 +2340,9 @@ declare type InsertRecordPathParams = {
|
|
|
1678
2340
|
tableName: TableName;
|
|
1679
2341
|
workspace: string;
|
|
1680
2342
|
};
|
|
2343
|
+
declare type InsertRecordQueryParams = {
|
|
2344
|
+
columns?: ColumnsProjection;
|
|
2345
|
+
};
|
|
1681
2346
|
declare type InsertRecordError = ErrorWrapper<{
|
|
1682
2347
|
status: 400;
|
|
1683
2348
|
payload: BadRequestError;
|
|
@@ -1688,20 +2353,15 @@ declare type InsertRecordError = ErrorWrapper<{
|
|
|
1688
2353
|
status: 404;
|
|
1689
2354
|
payload: SimpleError;
|
|
1690
2355
|
}>;
|
|
1691
|
-
declare type InsertRecordResponse = {
|
|
1692
|
-
id: string;
|
|
1693
|
-
xata: {
|
|
1694
|
-
version: number;
|
|
1695
|
-
};
|
|
1696
|
-
};
|
|
1697
2356
|
declare type InsertRecordVariables = {
|
|
1698
2357
|
body?: Record<string, any>;
|
|
1699
2358
|
pathParams: InsertRecordPathParams;
|
|
2359
|
+
queryParams?: InsertRecordQueryParams;
|
|
1700
2360
|
} & FetcherExtraProps;
|
|
1701
2361
|
/**
|
|
1702
2362
|
* Insert a new Record into the Table
|
|
1703
2363
|
*/
|
|
1704
|
-
declare const insertRecord: (variables: InsertRecordVariables) => Promise<
|
|
2364
|
+
declare const insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
|
|
1705
2365
|
declare type InsertRecordWithIDPathParams = {
|
|
1706
2366
|
dbBranchName: DBBranchName;
|
|
1707
2367
|
tableName: TableName;
|
|
@@ -1709,6 +2369,7 @@ declare type InsertRecordWithIDPathParams = {
|
|
|
1709
2369
|
workspace: string;
|
|
1710
2370
|
};
|
|
1711
2371
|
declare type InsertRecordWithIDQueryParams = {
|
|
2372
|
+
columns?: ColumnsProjection;
|
|
1712
2373
|
createOnly?: boolean;
|
|
1713
2374
|
ifVersion?: number;
|
|
1714
2375
|
};
|
|
@@ -1741,6 +2402,7 @@ declare type UpdateRecordWithIDPathParams = {
|
|
|
1741
2402
|
workspace: string;
|
|
1742
2403
|
};
|
|
1743
2404
|
declare type UpdateRecordWithIDQueryParams = {
|
|
2405
|
+
columns?: ColumnsProjection;
|
|
1744
2406
|
ifVersion?: number;
|
|
1745
2407
|
};
|
|
1746
2408
|
declare type UpdateRecordWithIDError = ErrorWrapper<{
|
|
@@ -1769,6 +2431,7 @@ declare type UpsertRecordWithIDPathParams = {
|
|
|
1769
2431
|
workspace: string;
|
|
1770
2432
|
};
|
|
1771
2433
|
declare type UpsertRecordWithIDQueryParams = {
|
|
2434
|
+
columns?: ColumnsProjection;
|
|
1772
2435
|
ifVersion?: number;
|
|
1773
2436
|
};
|
|
1774
2437
|
declare type UpsertRecordWithIDError = ErrorWrapper<{
|
|
@@ -1796,6 +2459,9 @@ declare type DeleteRecordPathParams = {
|
|
|
1796
2459
|
recordId: RecordID;
|
|
1797
2460
|
workspace: string;
|
|
1798
2461
|
};
|
|
2462
|
+
declare type DeleteRecordQueryParams = {
|
|
2463
|
+
columns?: ColumnsProjection;
|
|
2464
|
+
};
|
|
1799
2465
|
declare type DeleteRecordError = ErrorWrapper<{
|
|
1800
2466
|
status: 400;
|
|
1801
2467
|
payload: BadRequestError;
|
|
@@ -1808,14 +2474,18 @@ declare type DeleteRecordError = ErrorWrapper<{
|
|
|
1808
2474
|
}>;
|
|
1809
2475
|
declare type DeleteRecordVariables = {
|
|
1810
2476
|
pathParams: DeleteRecordPathParams;
|
|
2477
|
+
queryParams?: DeleteRecordQueryParams;
|
|
1811
2478
|
} & FetcherExtraProps;
|
|
1812
|
-
declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<
|
|
2479
|
+
declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
|
|
1813
2480
|
declare type GetRecordPathParams = {
|
|
1814
2481
|
dbBranchName: DBBranchName;
|
|
1815
2482
|
tableName: TableName;
|
|
1816
2483
|
recordId: RecordID;
|
|
1817
2484
|
workspace: string;
|
|
1818
2485
|
};
|
|
2486
|
+
declare type GetRecordQueryParams = {
|
|
2487
|
+
columns?: ColumnsProjection;
|
|
2488
|
+
};
|
|
1819
2489
|
declare type GetRecordError = ErrorWrapper<{
|
|
1820
2490
|
status: 400;
|
|
1821
2491
|
payload: BadRequestError;
|
|
@@ -1826,12 +2496,9 @@ declare type GetRecordError = ErrorWrapper<{
|
|
|
1826
2496
|
status: 404;
|
|
1827
2497
|
payload: SimpleError;
|
|
1828
2498
|
}>;
|
|
1829
|
-
declare type GetRecordRequestBody = {
|
|
1830
|
-
columns?: ColumnsFilter;
|
|
1831
|
-
};
|
|
1832
2499
|
declare type GetRecordVariables = {
|
|
1833
|
-
body?: GetRecordRequestBody;
|
|
1834
2500
|
pathParams: GetRecordPathParams;
|
|
2501
|
+
queryParams?: GetRecordQueryParams;
|
|
1835
2502
|
} & FetcherExtraProps;
|
|
1836
2503
|
/**
|
|
1837
2504
|
* Retrieve record by ID
|
|
@@ -1842,6 +2509,9 @@ declare type BulkInsertTableRecordsPathParams = {
|
|
|
1842
2509
|
tableName: TableName;
|
|
1843
2510
|
workspace: string;
|
|
1844
2511
|
};
|
|
2512
|
+
declare type BulkInsertTableRecordsQueryParams = {
|
|
2513
|
+
columns?: ColumnsProjection;
|
|
2514
|
+
};
|
|
1845
2515
|
declare type BulkInsertTableRecordsError = ErrorWrapper<{
|
|
1846
2516
|
status: 400;
|
|
1847
2517
|
payload: BulkError;
|
|
@@ -1851,21 +2521,22 @@ declare type BulkInsertTableRecordsError = ErrorWrapper<{
|
|
|
1851
2521
|
} | {
|
|
1852
2522
|
status: 404;
|
|
1853
2523
|
payload: SimpleError;
|
|
2524
|
+
} | {
|
|
2525
|
+
status: 422;
|
|
2526
|
+
payload: SimpleError;
|
|
1854
2527
|
}>;
|
|
1855
|
-
declare type BulkInsertTableRecordsResponse = {
|
|
1856
|
-
recordIDs: string[];
|
|
1857
|
-
};
|
|
1858
2528
|
declare type BulkInsertTableRecordsRequestBody = {
|
|
1859
2529
|
records: Record<string, any>[];
|
|
1860
2530
|
};
|
|
1861
2531
|
declare type BulkInsertTableRecordsVariables = {
|
|
1862
2532
|
body: BulkInsertTableRecordsRequestBody;
|
|
1863
2533
|
pathParams: BulkInsertTableRecordsPathParams;
|
|
2534
|
+
queryParams?: BulkInsertTableRecordsQueryParams;
|
|
1864
2535
|
} & FetcherExtraProps;
|
|
1865
2536
|
/**
|
|
1866
2537
|
* Bulk insert records
|
|
1867
2538
|
*/
|
|
1868
|
-
declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<
|
|
2539
|
+
declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
|
|
1869
2540
|
declare type QueryTablePathParams = {
|
|
1870
2541
|
dbBranchName: DBBranchName;
|
|
1871
2542
|
tableName: TableName;
|
|
@@ -1885,7 +2556,7 @@ declare type QueryTableRequestBody = {
|
|
|
1885
2556
|
filter?: FilterExpression;
|
|
1886
2557
|
sort?: SortExpression;
|
|
1887
2558
|
page?: PageConfig;
|
|
1888
|
-
columns?:
|
|
2559
|
+
columns?: ColumnsProjection;
|
|
1889
2560
|
};
|
|
1890
2561
|
declare type QueryTableVariables = {
|
|
1891
2562
|
body?: QueryTableRequestBody;
|
|
@@ -2634,6 +3305,7 @@ declare type SearchTableRequestBody = {
|
|
|
2634
3305
|
prefix?: PrefixExpression;
|
|
2635
3306
|
filter?: FilterExpression;
|
|
2636
3307
|
highlight?: HighlightExpression;
|
|
3308
|
+
boosters?: BoosterExpression[];
|
|
2637
3309
|
};
|
|
2638
3310
|
declare type SearchTableVariables = {
|
|
2639
3311
|
body: SearchTableRequestBody;
|
|
@@ -2665,9 +3337,11 @@ declare type SearchBranchRequestBody = {
|
|
|
2665
3337
|
tables?: (string | {
|
|
2666
3338
|
table: string;
|
|
2667
3339
|
filter?: FilterExpression;
|
|
3340
|
+
boosters?: BoosterExpression[];
|
|
2668
3341
|
})[];
|
|
2669
3342
|
query: string;
|
|
2670
3343
|
fuzziness?: FuzzinessExpression;
|
|
3344
|
+
prefix?: PrefixExpression;
|
|
2671
3345
|
highlight?: HighlightExpression;
|
|
2672
3346
|
};
|
|
2673
3347
|
declare type SearchBranchVariables = {
|
|
@@ -2697,6 +3371,7 @@ declare const operationsByTag: {
|
|
|
2697
3371
|
updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables) => Promise<undefined>;
|
|
2698
3372
|
removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables) => Promise<undefined>;
|
|
2699
3373
|
inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<WorkspaceInvite>;
|
|
3374
|
+
updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
|
|
2700
3375
|
cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>;
|
|
2701
3376
|
resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>;
|
|
2702
3377
|
acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables) => Promise<undefined>;
|
|
@@ -2705,6 +3380,8 @@ declare const operationsByTag: {
|
|
|
2705
3380
|
getDatabaseList: (variables: GetDatabaseListVariables) => Promise<ListDatabasesResponse>;
|
|
2706
3381
|
createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
|
|
2707
3382
|
deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
|
|
3383
|
+
getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
|
3384
|
+
patchDatabaseMetadata: (variables: PatchDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
|
2708
3385
|
getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
|
|
2709
3386
|
addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
|
|
2710
3387
|
removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
|
|
@@ -2713,17 +3390,35 @@ declare const operationsByTag: {
|
|
|
2713
3390
|
branch: {
|
|
2714
3391
|
getBranchList: (variables: GetBranchListVariables) => Promise<ListBranchesResponse>;
|
|
2715
3392
|
getBranchDetails: (variables: GetBranchDetailsVariables) => Promise<DBBranch>;
|
|
2716
|
-
createBranch: (variables: CreateBranchVariables) => Promise<
|
|
3393
|
+
createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
|
|
2717
3394
|
deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
|
|
2718
3395
|
updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
|
|
2719
3396
|
getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
|
|
3397
|
+
getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
|
|
3398
|
+
};
|
|
3399
|
+
migrationRequests: {
|
|
3400
|
+
listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
|
|
3401
|
+
createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
|
|
3402
|
+
getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
|
|
3403
|
+
updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
|
|
3404
|
+
listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
|
|
3405
|
+
compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
|
|
3406
|
+
getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
|
|
3407
|
+
mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
|
|
3408
|
+
};
|
|
3409
|
+
branchSchema: {
|
|
2720
3410
|
getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
|
|
2721
3411
|
executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
|
|
2722
3412
|
getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
|
|
2723
|
-
|
|
3413
|
+
compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
|
|
3414
|
+
compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
|
|
3415
|
+
updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
|
|
3416
|
+
previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
|
|
3417
|
+
applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
|
|
3418
|
+
getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
|
|
2724
3419
|
};
|
|
2725
3420
|
table: {
|
|
2726
|
-
createTable: (variables: CreateTableVariables) => Promise<
|
|
3421
|
+
createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
|
|
2727
3422
|
deleteTable: (variables: DeleteTableVariables) => Promise<undefined>;
|
|
2728
3423
|
updateTable: (variables: UpdateTableVariables) => Promise<undefined>;
|
|
2729
3424
|
getTableSchema: (variables: GetTableSchemaVariables) => Promise<GetTableSchemaResponse>;
|
|
@@ -2735,13 +3430,13 @@ declare const operationsByTag: {
|
|
|
2735
3430
|
updateColumn: (variables: UpdateColumnVariables) => Promise<MigrationIdResponse>;
|
|
2736
3431
|
};
|
|
2737
3432
|
records: {
|
|
2738
|
-
insertRecord: (variables: InsertRecordVariables) => Promise<
|
|
3433
|
+
insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
|
|
2739
3434
|
insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
|
|
2740
3435
|
updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<RecordUpdateResponse>;
|
|
2741
3436
|
upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
|
|
2742
|
-
deleteRecord: (variables: DeleteRecordVariables) => Promise<
|
|
3437
|
+
deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
|
|
2743
3438
|
getRecord: (variables: GetRecordVariables) => Promise<XataRecord$1>;
|
|
2744
|
-
bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<
|
|
3439
|
+
bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
|
|
2745
3440
|
queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
|
|
2746
3441
|
searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
|
|
2747
3442
|
searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
|
|
@@ -2759,10 +3454,8 @@ interface XataApiClientOptions {
|
|
|
2759
3454
|
fetch?: FetchImpl;
|
|
2760
3455
|
apiKey?: string;
|
|
2761
3456
|
host?: HostProvider;
|
|
3457
|
+
trace?: TraceFunction;
|
|
2762
3458
|
}
|
|
2763
|
-
/**
|
|
2764
|
-
* @deprecated Use XataApiPlugin instead
|
|
2765
|
-
*/
|
|
2766
3459
|
declare class XataApiClient {
|
|
2767
3460
|
#private;
|
|
2768
3461
|
constructor(options?: XataApiClientOptions);
|
|
@@ -2772,6 +3465,8 @@ declare class XataApiClient {
|
|
|
2772
3465
|
get branches(): BranchApi;
|
|
2773
3466
|
get tables(): TableApi;
|
|
2774
3467
|
get records(): RecordsApi;
|
|
3468
|
+
get migrationRequests(): MigrationRequestsApi;
|
|
3469
|
+
get branchSchema(): BranchSchemaApi;
|
|
2775
3470
|
}
|
|
2776
3471
|
declare class UserApi {
|
|
2777
3472
|
private extraProps;
|
|
@@ -2795,6 +3490,7 @@ declare class WorkspaceApi {
|
|
|
2795
3490
|
updateWorkspaceMemberRole(workspaceId: WorkspaceID, userId: UserID, role: Role): Promise<void>;
|
|
2796
3491
|
removeWorkspaceMember(workspaceId: WorkspaceID, userId: UserID): Promise<void>;
|
|
2797
3492
|
inviteWorkspaceMember(workspaceId: WorkspaceID, email: string, role: Role): Promise<WorkspaceInvite>;
|
|
3493
|
+
updateWorkspaceMemberInvite(workspaceId: WorkspaceID, inviteId: InviteID, role: Role): Promise<WorkspaceInvite>;
|
|
2798
3494
|
cancelWorkspaceMemberInvite(workspaceId: WorkspaceID, inviteId: InviteID): Promise<void>;
|
|
2799
3495
|
resendWorkspaceMemberInvite(workspaceId: WorkspaceID, inviteId: InviteID): Promise<void>;
|
|
2800
3496
|
acceptWorkspaceMemberInvite(workspaceId: WorkspaceID, inviteKey: InviteKey): Promise<void>;
|
|
@@ -2805,6 +3501,8 @@ declare class DatabaseApi {
|
|
|
2805
3501
|
getDatabaseList(workspace: WorkspaceID): Promise<ListDatabasesResponse>;
|
|
2806
3502
|
createDatabase(workspace: WorkspaceID, dbName: DBName, options?: CreateDatabaseRequestBody): Promise<CreateDatabaseResponse>;
|
|
2807
3503
|
deleteDatabase(workspace: WorkspaceID, dbName: DBName): Promise<void>;
|
|
3504
|
+
getDatabaseMetadata(workspace: WorkspaceID, dbName: DBName): Promise<DatabaseMetadata>;
|
|
3505
|
+
patchDatabaseMetadata(workspace: WorkspaceID, dbName: DBName, options?: PatchDatabaseMetadataRequestBody): Promise<DatabaseMetadata>;
|
|
2808
3506
|
getGitBranchesMapping(workspace: WorkspaceID, dbName: DBName): Promise<ListGitBranchesResponse>;
|
|
2809
3507
|
addGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, body: AddGitBranchesEntryRequestBody): Promise<AddGitBranchesEntryResponse>;
|
|
2810
3508
|
removeGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, gitBranch: string): Promise<void>;
|
|
@@ -2815,19 +3513,16 @@ declare class BranchApi {
|
|
|
2815
3513
|
constructor(extraProps: FetcherExtraProps);
|
|
2816
3514
|
getBranchList(workspace: WorkspaceID, dbName: DBName): Promise<ListBranchesResponse>;
|
|
2817
3515
|
getBranchDetails(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<DBBranch>;
|
|
2818
|
-
createBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, from?: string, options?: CreateBranchRequestBody): Promise<
|
|
3516
|
+
createBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, from?: string, options?: CreateBranchRequestBody): Promise<CreateBranchResponse>;
|
|
2819
3517
|
deleteBranch(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<void>;
|
|
2820
3518
|
updateBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName, metadata?: BranchMetadata): Promise<void>;
|
|
2821
3519
|
getBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<BranchMetadata>;
|
|
2822
|
-
getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
|
|
2823
|
-
executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
|
|
2824
|
-
getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
|
|
2825
3520
|
getBranchStats(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<GetBranchStatsResponse>;
|
|
2826
3521
|
}
|
|
2827
3522
|
declare class TableApi {
|
|
2828
3523
|
private extraProps;
|
|
2829
3524
|
constructor(extraProps: FetcherExtraProps);
|
|
2830
|
-
createTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<
|
|
3525
|
+
createTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<CreateTableResponse>;
|
|
2831
3526
|
deleteTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<void>;
|
|
2832
3527
|
updateTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, options: UpdateTableRequestBody): Promise<void>;
|
|
2833
3528
|
getTableSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<GetTableSchemaResponse>;
|
|
@@ -2841,17 +3536,42 @@ declare class TableApi {
|
|
|
2841
3536
|
declare class RecordsApi {
|
|
2842
3537
|
private extraProps;
|
|
2843
3538
|
constructor(extraProps: FetcherExtraProps);
|
|
2844
|
-
insertRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, record: Record<string, any
|
|
3539
|
+
insertRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, record: Record<string, any>, options?: InsertRecordQueryParams): Promise<RecordUpdateResponse>;
|
|
2845
3540
|
insertRecordWithID(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, record: Record<string, any>, options?: InsertRecordWithIDQueryParams): Promise<RecordUpdateResponse>;
|
|
2846
3541
|
updateRecordWithID(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, record: Record<string, any>, options?: UpdateRecordWithIDQueryParams): Promise<RecordUpdateResponse>;
|
|
2847
3542
|
upsertRecordWithID(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, record: Record<string, any>, options?: UpsertRecordWithIDQueryParams): Promise<RecordUpdateResponse>;
|
|
2848
|
-
deleteRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID): Promise<
|
|
2849
|
-
getRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, options?:
|
|
2850
|
-
bulkInsertTableRecords(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, records: Record<string, any>[]): Promise<
|
|
3543
|
+
deleteRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, options?: DeleteRecordQueryParams): Promise<RecordUpdateResponse>;
|
|
3544
|
+
getRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, options?: GetRecordQueryParams): Promise<XataRecord$1>;
|
|
3545
|
+
bulkInsertTableRecords(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, records: Record<string, any>[], options?: BulkInsertTableRecordsQueryParams): Promise<BulkInsertResponse>;
|
|
2851
3546
|
queryTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: QueryTableRequestBody): Promise<QueryResponse>;
|
|
2852
3547
|
searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
|
|
2853
3548
|
searchBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, query: SearchBranchRequestBody): Promise<SearchResponse>;
|
|
2854
3549
|
}
|
|
3550
|
+
declare class MigrationRequestsApi {
|
|
3551
|
+
private extraProps;
|
|
3552
|
+
constructor(extraProps: FetcherExtraProps);
|
|
3553
|
+
listMigrationRequests(workspace: WorkspaceID, database: DBName, options?: ListMigrationRequestsRequestBody): Promise<ListMigrationRequestsResponse>;
|
|
3554
|
+
createMigrationRequest(workspace: WorkspaceID, database: DBName, options: CreateMigrationRequestRequestBody): Promise<CreateMigrationRequestResponse>;
|
|
3555
|
+
getMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<MigrationRequest>;
|
|
3556
|
+
updateMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number, options: UpdateMigrationRequestRequestBody): Promise<void>;
|
|
3557
|
+
listMigrationRequestsCommits(workspace: WorkspaceID, database: DBName, migrationRequest: number, options?: ListMigrationRequestsCommitsRequestBody): Promise<ListMigrationRequestsCommitsResponse>;
|
|
3558
|
+
compareMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<SchemaCompareResponse>;
|
|
3559
|
+
getMigrationRequestIsMerged(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<GetMigrationRequestIsMergedResponse>;
|
|
3560
|
+
mergeMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<Commit>;
|
|
3561
|
+
}
|
|
3562
|
+
declare class BranchSchemaApi {
|
|
3563
|
+
private extraProps;
|
|
3564
|
+
constructor(extraProps: FetcherExtraProps);
|
|
3565
|
+
getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
|
|
3566
|
+
executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
|
|
3567
|
+
getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
|
|
3568
|
+
compareBranchWithUserSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
|
|
3569
|
+
compareBranchSchemas(workspace: WorkspaceID, database: DBName, branch: BranchName, branchName: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
|
|
3570
|
+
updateBranchSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<UpdateBranchSchemaResponse>;
|
|
3571
|
+
previewBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<PreviewBranchSchemaEditResponse>;
|
|
3572
|
+
applyBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, edits: SchemaEditScript): Promise<ApplyBranchSchemaEditResponse>;
|
|
3573
|
+
getBranchSchemaHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchSchemaHistoryRequestBody): Promise<GetBranchSchemaHistoryResponse>;
|
|
3574
|
+
}
|
|
2855
3575
|
|
|
2856
3576
|
declare class XataApiPlugin implements XataPlugin {
|
|
2857
3577
|
build(options: XataPluginOptions): Promise<XataApiClient>;
|
|
@@ -2863,19 +3583,20 @@ declare type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) ex
|
|
|
2863
3583
|
declare type If<Condition, Then, Else> = Condition extends true ? Then : Else;
|
|
2864
3584
|
declare type IsObject<T> = T extends Record<string, any> ? true : false;
|
|
2865
3585
|
declare type IsArray<T> = T extends Array<any> ? true : false;
|
|
2866
|
-
declare type NonEmptyArray<T> = T[] & {
|
|
2867
|
-
0: T;
|
|
2868
|
-
};
|
|
2869
3586
|
declare type RequiredBy<T, K extends keyof T> = T & {
|
|
2870
3587
|
[P in K]-?: NonNullable<T[P]>;
|
|
2871
3588
|
};
|
|
2872
3589
|
declare type GetArrayInnerType<T extends readonly any[]> = T[number];
|
|
2873
3590
|
declare type SingleOrArray<T> = T | T[];
|
|
2874
3591
|
declare type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
|
|
3592
|
+
declare type Without<T, U> = {
|
|
3593
|
+
[P in Exclude<keyof T, keyof U>]?: never;
|
|
3594
|
+
};
|
|
3595
|
+
declare type ExclusiveOr<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
|
|
2875
3596
|
|
|
2876
3597
|
declare type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
|
|
2877
|
-
declare type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord & UnionToIntersection<Values<{
|
|
2878
|
-
[K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord
|
|
3598
|
+
declare type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
|
|
3599
|
+
[K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
|
|
2879
3600
|
}>>;
|
|
2880
3601
|
declare type ValueAtColumn<O, P extends SelectableColumn<O>> = P extends '*' ? Values<O> : P extends 'id' ? string : P extends keyof O ? O[P] : P extends `${infer K}.${infer V}` ? K extends keyof O ? Values<NonNullable<O[K]> extends infer Item ? Item extends Record<string, any> ? V extends SelectableColumn<Item> ? {
|
|
2881
3602
|
V: ValueAtColumn<Item, V>;
|
|
@@ -2911,41 +3632,68 @@ interface BaseData {
|
|
|
2911
3632
|
/**
|
|
2912
3633
|
* Represents a persisted record from the database.
|
|
2913
3634
|
*/
|
|
2914
|
-
interface XataRecord<
|
|
3635
|
+
interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> extends Identifiable {
|
|
2915
3636
|
/**
|
|
2916
3637
|
* Get metadata of this record.
|
|
2917
3638
|
*/
|
|
2918
|
-
getMetadata(): XataRecordMetadata
|
|
3639
|
+
getMetadata(): XataRecordMetadata;
|
|
3640
|
+
/**
|
|
3641
|
+
* Retrieves a refreshed copy of the current record from the database.
|
|
3642
|
+
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
|
3643
|
+
* @returns The persisted record with the selected columns, null if not found.
|
|
3644
|
+
*/
|
|
3645
|
+
read<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
|
|
2919
3646
|
/**
|
|
2920
3647
|
* Retrieves a refreshed copy of the current record from the database.
|
|
3648
|
+
* @returns The persisted record with all first level properties, null if not found.
|
|
2921
3649
|
*/
|
|
2922
|
-
read(): Promise<Readonly<SelectedPick<
|
|
3650
|
+
read(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
|
2923
3651
|
/**
|
|
2924
3652
|
* Performs a partial update of the current record. On success a new object is
|
|
2925
3653
|
* returned and the current object is not mutated.
|
|
2926
3654
|
* @param partialUpdate The columns and their values that have to be updated.
|
|
2927
|
-
* @
|
|
3655
|
+
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
|
3656
|
+
* @returns The persisted record with the selected columns, null if not found.
|
|
3657
|
+
*/
|
|
3658
|
+
update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<OriginalRecord>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
|
|
3659
|
+
/**
|
|
3660
|
+
* Performs a partial update of the current record. On success a new object is
|
|
3661
|
+
* returned and the current object is not mutated.
|
|
3662
|
+
* @param partialUpdate The columns and their values that have to be updated.
|
|
3663
|
+
* @returns The persisted record with all first level properties, null if not found.
|
|
2928
3664
|
*/
|
|
2929
|
-
update(partialUpdate: Partial<EditableData<
|
|
3665
|
+
update(partialUpdate: Partial<EditableData<OriginalRecord>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
|
2930
3666
|
/**
|
|
2931
3667
|
* Performs a deletion of the current record in the database.
|
|
2932
|
-
*
|
|
2933
|
-
* @
|
|
3668
|
+
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
|
3669
|
+
* @returns The deleted record, null if not found.
|
|
2934
3670
|
*/
|
|
2935
|
-
delete(): Promise<
|
|
3671
|
+
delete<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
|
|
3672
|
+
/**
|
|
3673
|
+
* Performs a deletion of the current record in the database.
|
|
3674
|
+
* @returns The deleted record, null if not found.
|
|
3675
|
+
|
|
3676
|
+
*/
|
|
3677
|
+
delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
|
2936
3678
|
}
|
|
2937
3679
|
declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update'> & {
|
|
2938
3680
|
/**
|
|
2939
3681
|
* Retrieves a refreshed copy of the current record from the database.
|
|
2940
3682
|
*/
|
|
2941
|
-
read(): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
|
3683
|
+
read<K extends SelectableColumn<Record>>(columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>> | null>;
|
|
2942
3684
|
/**
|
|
2943
3685
|
* Performs a partial update of the current record. On success a new object is
|
|
2944
3686
|
* returned and the current object is not mutated.
|
|
2945
3687
|
* @param partialUpdate The columns and their values that have to be updated.
|
|
2946
3688
|
* @returns A new record containing the latest values for all the columns of the current record.
|
|
2947
3689
|
*/
|
|
2948
|
-
update(partialUpdate: Partial<EditableData<
|
|
3690
|
+
update<K extends SelectableColumn<Record>>(partialUpdate: Partial<EditableData<Record>>, columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>>>;
|
|
3691
|
+
/**
|
|
3692
|
+
* Performs a deletion of the current record in the database.
|
|
3693
|
+
*
|
|
3694
|
+
* @throws If the record was already deleted or if an error happened while performing the deletion.
|
|
3695
|
+
*/
|
|
3696
|
+
delete(): Promise<void>;
|
|
2949
3697
|
};
|
|
2950
3698
|
declare type XataRecordMetadata = {
|
|
2951
3699
|
/**
|
|
@@ -2956,13 +3704,13 @@ declare type XataRecordMetadata = {
|
|
|
2956
3704
|
};
|
|
2957
3705
|
declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
|
|
2958
3706
|
declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
|
|
2959
|
-
declare type EditableData<O extends
|
|
3707
|
+
declare type EditableData<O extends XataRecord> = Identifiable & Omit<{
|
|
2960
3708
|
[K in keyof O]: O[K] extends XataRecord ? {
|
|
2961
3709
|
id: string;
|
|
2962
3710
|
} | string : NonNullable<O[K]> extends XataRecord ? {
|
|
2963
3711
|
id: string;
|
|
2964
3712
|
} | string | null | undefined : O[K];
|
|
2965
|
-
}
|
|
3713
|
+
}, keyof XataRecord>;
|
|
2966
3714
|
|
|
2967
3715
|
/**
|
|
2968
3716
|
* PropertyMatchFilter
|
|
@@ -3056,7 +3804,85 @@ declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFi
|
|
|
3056
3804
|
declare type NestedApiFilter<T> = {
|
|
3057
3805
|
[key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
|
|
3058
3806
|
};
|
|
3059
|
-
declare type Filter<T> = T extends Record<string, any> ? BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
|
|
3807
|
+
declare type Filter<T> = T extends Record<string, any> ? T extends (infer ArrayType)[] ? ArrayType | ArrayType[] | ArrayFilter<ArrayType> | ArrayFilter<ArrayType[]> : T extends Date ? PropertyFilter<T> : BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
|
|
3808
|
+
|
|
3809
|
+
declare type DateBooster = {
|
|
3810
|
+
origin?: string;
|
|
3811
|
+
scale: string;
|
|
3812
|
+
decay: number;
|
|
3813
|
+
};
|
|
3814
|
+
declare type NumericBooster = {
|
|
3815
|
+
factor: number;
|
|
3816
|
+
};
|
|
3817
|
+
declare type ValueBooster<T extends string | number | boolean> = {
|
|
3818
|
+
value: T;
|
|
3819
|
+
factor: number;
|
|
3820
|
+
};
|
|
3821
|
+
declare type Boosters<O extends XataRecord> = Values<{
|
|
3822
|
+
[K in SelectableColumn<O>]: NonNullable<ValueAtColumn<O, K>> extends Date ? {
|
|
3823
|
+
dateBooster: {
|
|
3824
|
+
column: K;
|
|
3825
|
+
} & DateBooster;
|
|
3826
|
+
} : NonNullable<ValueAtColumn<O, K>> extends number ? ExclusiveOr<{
|
|
3827
|
+
numericBooster?: {
|
|
3828
|
+
column: K;
|
|
3829
|
+
} & NumericBooster;
|
|
3830
|
+
}, {
|
|
3831
|
+
valueBooster?: {
|
|
3832
|
+
column: K;
|
|
3833
|
+
} & ValueBooster<number>;
|
|
3834
|
+
}> : NonNullable<ValueAtColumn<O, K>> extends string | boolean ? {
|
|
3835
|
+
valueBooster: {
|
|
3836
|
+
column: K;
|
|
3837
|
+
} & ValueBooster<NonNullable<ValueAtColumn<O, K>>>;
|
|
3838
|
+
} : never;
|
|
3839
|
+
}>;
|
|
3840
|
+
|
|
3841
|
+
declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
|
|
3842
|
+
fuzziness?: FuzzinessExpression;
|
|
3843
|
+
prefix?: PrefixExpression;
|
|
3844
|
+
highlight?: HighlightExpression;
|
|
3845
|
+
tables?: Array<Tables | Values<{
|
|
3846
|
+
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
|
3847
|
+
table: Model;
|
|
3848
|
+
filter?: Filter<SelectedPick<Schemas[Model] & XataRecord, ['*']>>;
|
|
3849
|
+
boosters?: Boosters<Schemas[Model] & XataRecord>[];
|
|
3850
|
+
};
|
|
3851
|
+
}>>;
|
|
3852
|
+
};
|
|
3853
|
+
declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
|
|
3854
|
+
all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
|
|
3855
|
+
[Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
|
|
3856
|
+
table: Model;
|
|
3857
|
+
record: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>>;
|
|
3858
|
+
};
|
|
3859
|
+
}>[]>;
|
|
3860
|
+
byTable: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<{
|
|
3861
|
+
[Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>[]>;
|
|
3862
|
+
}>;
|
|
3863
|
+
};
|
|
3864
|
+
declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
|
3865
|
+
#private;
|
|
3866
|
+
private db;
|
|
3867
|
+
constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
|
|
3868
|
+
build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
|
|
3869
|
+
}
|
|
3870
|
+
declare type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
|
|
3871
|
+
getMetadata: () => XataRecordMetadata & SearchExtraProperties;
|
|
3872
|
+
};
|
|
3873
|
+
declare type SearchExtraProperties = {
|
|
3874
|
+
table: string;
|
|
3875
|
+
highlight?: {
|
|
3876
|
+
[key: string]: string[] | {
|
|
3877
|
+
[key: string]: any;
|
|
3878
|
+
};
|
|
3879
|
+
};
|
|
3880
|
+
score?: number;
|
|
3881
|
+
};
|
|
3882
|
+
declare type ReturnTable<Table, Tables> = Table extends Tables ? Table : never;
|
|
3883
|
+
declare type ExtractTables<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>, TableOptions extends GetArrayInnerType<NonNullable<NonNullable<SearchOptions<Schemas, Tables>>['tables']>>> = TableOptions extends `${infer Table}` ? ReturnTable<Table, Tables> : TableOptions extends {
|
|
3884
|
+
table: infer Table;
|
|
3885
|
+
} ? ReturnTable<Table, Tables> : never;
|
|
3060
3886
|
|
|
3061
3887
|
declare type SortDirection = 'asc' | 'desc';
|
|
3062
3888
|
declare type SortFilterExtended<T extends XataRecord> = {
|
|
@@ -3069,7 +3895,7 @@ declare type SortFilterBase<T extends XataRecord> = {
|
|
|
3069
3895
|
};
|
|
3070
3896
|
|
|
3071
3897
|
declare type BaseOptions<T extends XataRecord> = {
|
|
3072
|
-
columns?:
|
|
3898
|
+
columns?: SelectableColumn<T>[];
|
|
3073
3899
|
cache?: number;
|
|
3074
3900
|
};
|
|
3075
3901
|
declare type CursorQueryOptions = {
|
|
@@ -3093,7 +3919,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
|
3093
3919
|
#private;
|
|
3094
3920
|
readonly meta: PaginationQueryMeta;
|
|
3095
3921
|
readonly records: RecordArray<Result>;
|
|
3096
|
-
constructor(repository: Repository<Record> | null, table:
|
|
3922
|
+
constructor(repository: Repository<Record> | null, table: {
|
|
3923
|
+
name: string;
|
|
3924
|
+
schema?: Table;
|
|
3925
|
+
}, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
|
|
3097
3926
|
getQueryOptions(): QueryOptions<Record>;
|
|
3098
3927
|
key(): string;
|
|
3099
3928
|
/**
|
|
@@ -3132,7 +3961,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
|
3132
3961
|
* @param value The value to filter.
|
|
3133
3962
|
* @returns A new Query object.
|
|
3134
3963
|
*/
|
|
3135
|
-
filter<F extends SelectableColumn<Record>>(column: F, value: Filter<ValueAtColumn<Record, F
|
|
3964
|
+
filter<F extends SelectableColumn<Record>>(column: F, value: Filter<NonNullable<ValueAtColumn<Record, F>>>): Query<Record, Result>;
|
|
3136
3965
|
/**
|
|
3137
3966
|
* Builds a new query object adding one or more constraints. Examples:
|
|
3138
3967
|
*
|
|
@@ -3146,20 +3975,23 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
|
3146
3975
|
* @param filters A filter object
|
|
3147
3976
|
* @returns A new Query object.
|
|
3148
3977
|
*/
|
|
3149
|
-
filter(filters
|
|
3978
|
+
filter(filters?: Filter<Record>): Query<Record, Result>;
|
|
3979
|
+
defaultFilter<T>(column: string, value: T): T | {
|
|
3980
|
+
$includes: (T & string) | (T & string[]);
|
|
3981
|
+
};
|
|
3150
3982
|
/**
|
|
3151
3983
|
* Builds a new query with a new sort option.
|
|
3152
3984
|
* @param column The column name.
|
|
3153
3985
|
* @param direction The direction. Either ascending or descending.
|
|
3154
3986
|
* @returns A new Query object.
|
|
3155
3987
|
*/
|
|
3156
|
-
sort<F extends SelectableColumn<Record>>(column: F, direction
|
|
3988
|
+
sort<F extends SelectableColumn<Record>>(column: F, direction?: SortDirection): Query<Record, Result>;
|
|
3157
3989
|
/**
|
|
3158
3990
|
* Builds a new query specifying the set of columns to be returned in the query response.
|
|
3159
3991
|
* @param columns Array of column names to be returned by the query.
|
|
3160
3992
|
* @returns A new Query object.
|
|
3161
3993
|
*/
|
|
3162
|
-
select<K extends SelectableColumn<Record>>(columns:
|
|
3994
|
+
select<K extends SelectableColumn<Record>>(columns: K[]): Query<Record, SelectedPick<Record, K[]>>;
|
|
3163
3995
|
/**
|
|
3164
3996
|
* Get paginated results
|
|
3165
3997
|
*
|
|
@@ -3390,6 +4222,8 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
|
|
|
3390
4222
|
#private;
|
|
3391
4223
|
constructor(page: Paginable<any, Result>, overrideRecords?: Result[]);
|
|
3392
4224
|
static parseConstructorParams(...args: any[]): any[];
|
|
4225
|
+
toArray(): Result[];
|
|
4226
|
+
map<U>(callbackfn: (value: Result, index: number, array: Result[]) => U, thisArg?: any): U[];
|
|
3393
4227
|
/**
|
|
3394
4228
|
* Retrieve next page of records
|
|
3395
4229
|
*
|
|
@@ -3423,21 +4257,44 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
|
|
|
3423
4257
|
/**
|
|
3424
4258
|
* Common interface for performing operations on a table.
|
|
3425
4259
|
*/
|
|
3426
|
-
declare abstract class Repository<
|
|
3427
|
-
abstract create(object: EditableData<
|
|
4260
|
+
declare abstract class Repository<Record extends XataRecord> extends Query<Record, Readonly<SelectedPick<Record, ['*']>>> {
|
|
4261
|
+
abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
|
4262
|
+
abstract create(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
|
4263
|
+
/**
|
|
4264
|
+
* Creates a single record in the table with a unique id.
|
|
4265
|
+
* @param id The unique id.
|
|
4266
|
+
* @param object Object containing the column names with their values to be stored in the table.
|
|
4267
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4268
|
+
* @returns The full persisted record.
|
|
4269
|
+
*/
|
|
4270
|
+
abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
|
3428
4271
|
/**
|
|
3429
4272
|
* Creates a single record in the table with a unique id.
|
|
3430
4273
|
* @param id The unique id.
|
|
3431
4274
|
* @param object Object containing the column names with their values to be stored in the table.
|
|
3432
4275
|
* @returns The full persisted record.
|
|
3433
4276
|
*/
|
|
3434
|
-
abstract create(id: string, object: EditableData<
|
|
4277
|
+
abstract create(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
|
3435
4278
|
/**
|
|
3436
4279
|
* Creates multiple records in the table.
|
|
3437
4280
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
|
3438
|
-
* @
|
|
4281
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4282
|
+
* @returns Array of the persisted records in order.
|
|
4283
|
+
*/
|
|
4284
|
+
abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
|
4285
|
+
/**
|
|
4286
|
+
* Creates multiple records in the table.
|
|
4287
|
+
* @param objects Array of objects with the column names and the values to be stored in the table.
|
|
4288
|
+
* @returns Array of the persisted records in order.
|
|
4289
|
+
*/
|
|
4290
|
+
abstract create(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
|
4291
|
+
/**
|
|
4292
|
+
* Queries a single record from the table given its unique id.
|
|
4293
|
+
* @param id The unique id.
|
|
4294
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4295
|
+
* @returns The persisted record for the given id or null if the record could not be found.
|
|
3439
4296
|
*/
|
|
3440
|
-
abstract
|
|
4297
|
+
abstract read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
|
3441
4298
|
/**
|
|
3442
4299
|
* Queries a single record from the table given its unique id.
|
|
3443
4300
|
* @param id The unique id.
|
|
@@ -3447,9 +4304,23 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
|
3447
4304
|
/**
|
|
3448
4305
|
* Queries multiple records from the table given their unique id.
|
|
3449
4306
|
* @param ids The unique ids array.
|
|
3450
|
-
* @
|
|
4307
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4308
|
+
* @returns The persisted records for the given ids in order (if a record could not be found null is returned).
|
|
4309
|
+
*/
|
|
4310
|
+
abstract read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
|
4311
|
+
/**
|
|
4312
|
+
* Queries multiple records from the table given their unique id.
|
|
4313
|
+
* @param ids The unique ids array.
|
|
4314
|
+
* @returns The persisted records for the given ids in order (if a record could not be found null is returned).
|
|
4315
|
+
*/
|
|
4316
|
+
abstract read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
|
4317
|
+
/**
|
|
4318
|
+
* Queries a single record from the table by the id in the object.
|
|
4319
|
+
* @param object Object containing the id of the record.
|
|
4320
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4321
|
+
* @returns The persisted record for the given id or null if the record could not be found.
|
|
3451
4322
|
*/
|
|
3452
|
-
abstract read(
|
|
4323
|
+
abstract read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
|
3453
4324
|
/**
|
|
3454
4325
|
* Queries a single record from the table by the id in the object.
|
|
3455
4326
|
* @param object Object containing the id of the record.
|
|
@@ -3459,35 +4330,81 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
|
3459
4330
|
/**
|
|
3460
4331
|
* Queries multiple records from the table by the ids in the objects.
|
|
3461
4332
|
* @param objects Array of objects containing the ids of the records.
|
|
3462
|
-
* @
|
|
4333
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4334
|
+
* @returns The persisted records for the given ids in order (if a record could not be found null is returned).
|
|
4335
|
+
*/
|
|
4336
|
+
abstract read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
|
4337
|
+
/**
|
|
4338
|
+
* Queries multiple records from the table by the ids in the objects.
|
|
4339
|
+
* @param objects Array of objects containing the ids of the records.
|
|
4340
|
+
* @returns The persisted records for the given ids in order (if a record could not be found null is returned).
|
|
3463
4341
|
*/
|
|
3464
|
-
abstract read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']
|
|
4342
|
+
abstract read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
|
3465
4343
|
/**
|
|
3466
4344
|
* Partially update a single record.
|
|
3467
4345
|
* @param object An object with its id and the columns to be updated.
|
|
3468
|
-
* @
|
|
4346
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4347
|
+
* @returns The full persisted record, null if the record could not be found.
|
|
3469
4348
|
*/
|
|
3470
|
-
abstract update(object: Partial<EditableData<
|
|
4349
|
+
abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
|
4350
|
+
/**
|
|
4351
|
+
* Partially update a single record.
|
|
4352
|
+
* @param object An object with its id and the columns to be updated.
|
|
4353
|
+
* @returns The full persisted record, null if the record could not be found.
|
|
4354
|
+
*/
|
|
4355
|
+
abstract update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
|
3471
4356
|
/**
|
|
3472
4357
|
* Partially update a single record given its unique id.
|
|
3473
4358
|
* @param id The unique id.
|
|
3474
4359
|
* @param object The column names and their values that have to be updated.
|
|
3475
|
-
* @
|
|
4360
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4361
|
+
* @returns The full persisted record, null if the record could not be found.
|
|
4362
|
+
*/
|
|
4363
|
+
abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
|
4364
|
+
/**
|
|
4365
|
+
* Partially update a single record given its unique id.
|
|
4366
|
+
* @param id The unique id.
|
|
4367
|
+
* @param object The column names and their values that have to be updated.
|
|
4368
|
+
* @returns The full persisted record, null if the record could not be found.
|
|
3476
4369
|
*/
|
|
3477
|
-
abstract update(id: string, object: Partial<EditableData<
|
|
4370
|
+
abstract update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
|
3478
4371
|
/**
|
|
3479
4372
|
* Partially updates multiple records.
|
|
3480
4373
|
* @param objects An array of objects with their ids and columns to be updated.
|
|
3481
|
-
* @
|
|
4374
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4375
|
+
* @returns Array of the persisted records in order (if a record could not be found null is returned).
|
|
4376
|
+
*/
|
|
4377
|
+
abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
|
4378
|
+
/**
|
|
4379
|
+
* Partially updates multiple records.
|
|
4380
|
+
* @param objects An array of objects with their ids and columns to be updated.
|
|
4381
|
+
* @returns Array of the persisted records in order (if a record could not be found null is returned).
|
|
4382
|
+
*/
|
|
4383
|
+
abstract update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
|
4384
|
+
/**
|
|
4385
|
+
* Creates or updates a single record. If a record exists with the given id,
|
|
4386
|
+
* it will be update, otherwise a new record will be created.
|
|
4387
|
+
* @param object Object containing the column names with their values to be persisted in the table.
|
|
4388
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4389
|
+
* @returns The full persisted record.
|
|
3482
4390
|
*/
|
|
3483
|
-
abstract
|
|
4391
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
|
3484
4392
|
/**
|
|
3485
4393
|
* Creates or updates a single record. If a record exists with the given id,
|
|
3486
4394
|
* it will be update, otherwise a new record will be created.
|
|
3487
4395
|
* @param object Object containing the column names with their values to be persisted in the table.
|
|
3488
4396
|
* @returns The full persisted record.
|
|
3489
4397
|
*/
|
|
3490
|
-
abstract createOrUpdate(object: EditableData<
|
|
4398
|
+
abstract createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
|
4399
|
+
/**
|
|
4400
|
+
* Creates or updates a single record. If a record exists with the given id,
|
|
4401
|
+
* it will be update, otherwise a new record will be created.
|
|
4402
|
+
* @param id A unique id.
|
|
4403
|
+
* @param object The column names and the values to be persisted.
|
|
4404
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4405
|
+
* @returns The full persisted record.
|
|
4406
|
+
*/
|
|
4407
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
|
3491
4408
|
/**
|
|
3492
4409
|
* Creates or updates a single record. If a record exists with the given id,
|
|
3493
4410
|
* it will be update, otherwise a new record will be created.
|
|
@@ -3495,38 +4412,74 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
|
3495
4412
|
* @param object The column names and the values to be persisted.
|
|
3496
4413
|
* @returns The full persisted record.
|
|
3497
4414
|
*/
|
|
3498
|
-
abstract createOrUpdate(id: string, object: EditableData<
|
|
4415
|
+
abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
|
4416
|
+
/**
|
|
4417
|
+
* Creates or updates a single record. If a record exists with the given id,
|
|
4418
|
+
* it will be update, otherwise a new record will be created.
|
|
4419
|
+
* @param objects Array of objects with the column names and the values to be stored in the table.
|
|
4420
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4421
|
+
* @returns Array of the persisted records.
|
|
4422
|
+
*/
|
|
4423
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
|
3499
4424
|
/**
|
|
3500
4425
|
* Creates or updates a single record. If a record exists with the given id,
|
|
3501
4426
|
* it will be update, otherwise a new record will be created.
|
|
3502
4427
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
|
3503
4428
|
* @returns Array of the persisted records.
|
|
3504
4429
|
*/
|
|
3505
|
-
abstract createOrUpdate(objects: Array<EditableData<
|
|
4430
|
+
abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
|
3506
4431
|
/**
|
|
3507
4432
|
* Deletes a record given its unique id.
|
|
3508
|
-
* @param
|
|
3509
|
-
* @
|
|
4433
|
+
* @param object An object with a unique id.
|
|
4434
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4435
|
+
* @returns The deleted record, null if the record could not be found.
|
|
3510
4436
|
*/
|
|
3511
|
-
abstract delete(
|
|
4437
|
+
abstract delete<K extends SelectableColumn<Record>>(object: Identifiable & Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
|
3512
4438
|
/**
|
|
3513
4439
|
* Deletes a record given its unique id.
|
|
3514
|
-
* @param
|
|
3515
|
-
* @
|
|
4440
|
+
* @param object An object with a unique id.
|
|
4441
|
+
* @returns The deleted record, null if the record could not be found.
|
|
4442
|
+
*/
|
|
4443
|
+
abstract delete(object: Identifiable & Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
|
4444
|
+
/**
|
|
4445
|
+
* Deletes a record given a unique id.
|
|
4446
|
+
* @param id The unique id.
|
|
4447
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4448
|
+
* @returns The deleted record, null if the record could not be found.
|
|
4449
|
+
*/
|
|
4450
|
+
abstract delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
|
4451
|
+
/**
|
|
4452
|
+
* Deletes a record given a unique id.
|
|
4453
|
+
* @param id The unique id.
|
|
4454
|
+
* @returns The deleted record, null if the record could not be found.
|
|
4455
|
+
*/
|
|
4456
|
+
abstract delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
|
4457
|
+
/**
|
|
4458
|
+
* Deletes multiple records given an array of objects with ids.
|
|
4459
|
+
* @param objects An array of objects with unique ids.
|
|
4460
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4461
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
|
4462
|
+
*/
|
|
4463
|
+
abstract delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
|
4464
|
+
/**
|
|
4465
|
+
* Deletes multiple records given an array of objects with ids.
|
|
4466
|
+
* @param objects An array of objects with unique ids.
|
|
4467
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
|
3516
4468
|
*/
|
|
3517
|
-
abstract delete(
|
|
4469
|
+
abstract delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
|
3518
4470
|
/**
|
|
3519
|
-
* Deletes
|
|
3520
|
-
* @param
|
|
3521
|
-
* @
|
|
4471
|
+
* Deletes multiple records given an array of unique ids.
|
|
4472
|
+
* @param objects An array of ids.
|
|
4473
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
|
4474
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
|
3522
4475
|
*/
|
|
3523
|
-
abstract delete(
|
|
4476
|
+
abstract delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
|
3524
4477
|
/**
|
|
3525
|
-
* Deletes
|
|
3526
|
-
* @param
|
|
3527
|
-
* @
|
|
4478
|
+
* Deletes multiple records given an array of unique ids.
|
|
4479
|
+
* @param objects An array of ids.
|
|
4480
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
|
3528
4481
|
*/
|
|
3529
|
-
abstract delete(
|
|
4482
|
+
abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
|
3530
4483
|
/**
|
|
3531
4484
|
* Search for records in the table.
|
|
3532
4485
|
* @param query The query to search for.
|
|
@@ -3535,39 +4488,62 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
|
3535
4488
|
*/
|
|
3536
4489
|
abstract search(query: string, options?: {
|
|
3537
4490
|
fuzziness?: FuzzinessExpression;
|
|
4491
|
+
prefix?: PrefixExpression;
|
|
3538
4492
|
highlight?: HighlightExpression;
|
|
3539
4493
|
filter?: Filter<Record>;
|
|
3540
|
-
|
|
4494
|
+
boosters?: Boosters<Record>[];
|
|
4495
|
+
}): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
|
|
3541
4496
|
abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
|
|
3542
4497
|
}
|
|
3543
|
-
declare class RestRepository<
|
|
4498
|
+
declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
|
|
3544
4499
|
#private;
|
|
3545
|
-
db: SchemaPluginResult<any>;
|
|
3546
4500
|
constructor(options: {
|
|
3547
4501
|
table: string;
|
|
3548
4502
|
db: SchemaPluginResult<any>;
|
|
3549
4503
|
pluginOptions: XataPluginOptions;
|
|
3550
4504
|
schemaTables?: Table[];
|
|
3551
4505
|
});
|
|
3552
|
-
create(object: EditableData<
|
|
3553
|
-
create(
|
|
3554
|
-
create(
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
read(
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
4506
|
+
create<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
|
4507
|
+
create(object: EditableData<Record> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
|
4508
|
+
create<K extends SelectableColumn<Record>>(id: string, object: EditableData<Record>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
|
4509
|
+
create(id: string, object: EditableData<Record>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
|
4510
|
+
create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
|
4511
|
+
create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
|
4512
|
+
read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
|
4513
|
+
read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
|
4514
|
+
read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
|
4515
|
+
read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
|
4516
|
+
read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
|
4517
|
+
read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
|
4518
|
+
read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
|
4519
|
+
read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
|
4520
|
+
update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
|
4521
|
+
update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
|
4522
|
+
update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
|
4523
|
+
update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
|
4524
|
+
update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
|
4525
|
+
update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
|
4526
|
+
createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
|
4527
|
+
createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
|
4528
|
+
createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
|
4529
|
+
createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
|
4530
|
+
createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
|
4531
|
+
createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
|
4532
|
+
delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
|
4533
|
+
delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
|
4534
|
+
delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
|
4535
|
+
delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
|
4536
|
+
delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
|
4537
|
+
delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
|
4538
|
+
delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
|
4539
|
+
delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
|
3566
4540
|
search(query: string, options?: {
|
|
3567
4541
|
fuzziness?: FuzzinessExpression;
|
|
4542
|
+
prefix?: PrefixExpression;
|
|
3568
4543
|
highlight?: HighlightExpression;
|
|
3569
4544
|
filter?: Filter<Record>;
|
|
3570
|
-
|
|
4545
|
+
boosters?: Boosters<Record>[];
|
|
4546
|
+
}): Promise<any>;
|
|
3571
4547
|
query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
|
|
3572
4548
|
}
|
|
3573
4549
|
|
|
@@ -3605,7 +4581,7 @@ declare type TableType<Tables, TableName> = Tables & {
|
|
|
3605
4581
|
} ? Columns extends readonly unknown[] ? Columns[number] extends {
|
|
3606
4582
|
name: string;
|
|
3607
4583
|
type: string;
|
|
3608
|
-
} ? {
|
|
4584
|
+
} ? Identifiable & {
|
|
3609
4585
|
[K in Columns[number]['name']]?: PropertyType<Tables, Columns[number], K>;
|
|
3610
4586
|
} : never : never : never : never;
|
|
3611
4587
|
declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
|
|
@@ -3624,6 +4600,10 @@ declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
|
|
|
3624
4600
|
[K in ObjectColumns[number]['name']]?: PropertyType<Tables, ObjectColumns[number], K>;
|
|
3625
4601
|
} : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never) | null : never : never;
|
|
3626
4602
|
|
|
4603
|
+
/**
|
|
4604
|
+
* Operator to restrict results to only values that are greater than the given value.
|
|
4605
|
+
*/
|
|
4606
|
+
declare const greaterThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
3627
4607
|
/**
|
|
3628
4608
|
* Operator to restrict results to only values that are greater than the given value.
|
|
3629
4609
|
*/
|
|
@@ -3631,15 +4611,35 @@ declare const gt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
|
|
|
3631
4611
|
/**
|
|
3632
4612
|
* Operator to restrict results to only values that are greater than or equal to the given value.
|
|
3633
4613
|
*/
|
|
3634
|
-
declare const
|
|
4614
|
+
declare const greaterThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
4615
|
+
/**
|
|
4616
|
+
* Operator to restrict results to only values that are greater than or equal to the given value.
|
|
4617
|
+
*/
|
|
4618
|
+
declare const greaterEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
3635
4619
|
/**
|
|
3636
4620
|
* Operator to restrict results to only values that are greater than or equal to the given value.
|
|
3637
4621
|
*/
|
|
3638
4622
|
declare const gte: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
4623
|
+
/**
|
|
4624
|
+
* Operator to restrict results to only values that are greater than or equal to the given value.
|
|
4625
|
+
*/
|
|
4626
|
+
declare const ge: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
4627
|
+
/**
|
|
4628
|
+
* Operator to restrict results to only values that are lower than the given value.
|
|
4629
|
+
*/
|
|
4630
|
+
declare const lessThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
3639
4631
|
/**
|
|
3640
4632
|
* Operator to restrict results to only values that are lower than the given value.
|
|
3641
4633
|
*/
|
|
3642
4634
|
declare const lt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
4635
|
+
/**
|
|
4636
|
+
* Operator to restrict results to only values that are lower than or equal to the given value.
|
|
4637
|
+
*/
|
|
4638
|
+
declare const lessThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
4639
|
+
/**
|
|
4640
|
+
* Operator to restrict results to only values that are lower than or equal to the given value.
|
|
4641
|
+
*/
|
|
4642
|
+
declare const lessEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
3643
4643
|
/**
|
|
3644
4644
|
* Operator to restrict results to only values that are lower than or equal to the given value.
|
|
3645
4645
|
*/
|
|
@@ -3672,6 +4672,10 @@ declare const pattern: (value: string) => StringTypeFilter;
|
|
|
3672
4672
|
* Operator to restrict results to only values that are equal to the given value.
|
|
3673
4673
|
*/
|
|
3674
4674
|
declare const is: <T>(value: T) => PropertyFilter<T>;
|
|
4675
|
+
/**
|
|
4676
|
+
* Operator to restrict results to only values that are equal to the given value.
|
|
4677
|
+
*/
|
|
4678
|
+
declare const equals: <T>(value: T) => PropertyFilter<T>;
|
|
3675
4679
|
/**
|
|
3676
4680
|
* Operator to restrict results to only values that are not equal to the given value.
|
|
3677
4681
|
*/
|
|
@@ -3700,58 +4704,15 @@ declare const includesAny: <T>(value: T) => ArrayFilter<T>;
|
|
|
3700
4704
|
declare type SchemaDefinition = {
|
|
3701
4705
|
table: string;
|
|
3702
4706
|
};
|
|
3703
|
-
declare type SchemaPluginResult<Schemas extends Record<string,
|
|
4707
|
+
declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
|
|
3704
4708
|
[Key in keyof Schemas]: Repository<Schemas[Key]>;
|
|
3705
|
-
} & {
|
|
3706
|
-
[key: string]: Repository<XataRecord$1>;
|
|
3707
4709
|
};
|
|
3708
|
-
declare class SchemaPlugin<Schemas extends Record<string,
|
|
4710
|
+
declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
|
3709
4711
|
#private;
|
|
3710
4712
|
constructor(schemaTables?: Schemas.Table[]);
|
|
3711
4713
|
build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
|
|
3712
4714
|
}
|
|
3713
4715
|
|
|
3714
|
-
declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
|
|
3715
|
-
fuzziness?: FuzzinessExpression;
|
|
3716
|
-
highlight?: HighlightExpression;
|
|
3717
|
-
tables?: Array<Tables | Values<{
|
|
3718
|
-
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
|
3719
|
-
table: Model;
|
|
3720
|
-
filter?: Filter<SelectedPick<Schemas[Model] & SearchXataRecord, ['*']>>;
|
|
3721
|
-
};
|
|
3722
|
-
}>>;
|
|
3723
|
-
};
|
|
3724
|
-
declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
|
|
3725
|
-
all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
|
|
3726
|
-
[Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
|
|
3727
|
-
table: Model;
|
|
3728
|
-
record: Awaited<SelectedPick<Schemas[Model] & SearchXataRecord, ['*']>>;
|
|
3729
|
-
};
|
|
3730
|
-
}>[]>;
|
|
3731
|
-
byTable: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<{
|
|
3732
|
-
[Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SelectedPick<Schemas[Model] & SearchXataRecord, ['*']>[]>;
|
|
3733
|
-
}>;
|
|
3734
|
-
};
|
|
3735
|
-
declare class SearchPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
|
|
3736
|
-
#private;
|
|
3737
|
-
private db;
|
|
3738
|
-
constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
|
|
3739
|
-
build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
|
|
3740
|
-
}
|
|
3741
|
-
declare type SearchXataRecord = XataRecord<SearchExtraProperties>;
|
|
3742
|
-
declare type SearchExtraProperties = {
|
|
3743
|
-
table: string;
|
|
3744
|
-
highlight?: {
|
|
3745
|
-
[key: string]: string[] | {
|
|
3746
|
-
[key: string]: any;
|
|
3747
|
-
};
|
|
3748
|
-
};
|
|
3749
|
-
};
|
|
3750
|
-
declare type ReturnTable<Table, Tables> = Table extends Tables ? Table : never;
|
|
3751
|
-
declare type ExtractTables<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>, TableOptions extends GetArrayInnerType<NonNullable<NonNullable<SearchOptions<Schemas, Tables>>['tables']>>> = TableOptions extends `${infer Table}` ? ReturnTable<Table, Tables> : TableOptions extends {
|
|
3752
|
-
table: infer Table;
|
|
3753
|
-
} ? ReturnTable<Table, Tables> : never;
|
|
3754
|
-
|
|
3755
4716
|
declare type BranchStrategyValue = string | undefined | null;
|
|
3756
4717
|
declare type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
|
|
3757
4718
|
declare type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
|
|
@@ -3763,19 +4724,34 @@ declare type BaseClientOptions = {
|
|
|
3763
4724
|
databaseURL?: string;
|
|
3764
4725
|
branch?: BranchStrategyOption;
|
|
3765
4726
|
cache?: CacheImpl;
|
|
4727
|
+
trace?: TraceFunction;
|
|
3766
4728
|
};
|
|
3767
4729
|
declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
|
|
3768
4730
|
interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
|
3769
|
-
new <
|
|
3770
|
-
db: Awaited<ReturnType<SchemaPlugin<
|
|
3771
|
-
search: Awaited<ReturnType<SearchPlugin<
|
|
4731
|
+
new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
|
|
4732
|
+
db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
|
|
4733
|
+
search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
|
|
3772
4734
|
}, keyof Plugins> & {
|
|
3773
4735
|
[Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
|
|
4736
|
+
} & {
|
|
4737
|
+
getConfig(): Promise<{
|
|
4738
|
+
databaseURL: string;
|
|
4739
|
+
branch: string;
|
|
4740
|
+
}>;
|
|
3774
4741
|
};
|
|
3775
4742
|
}
|
|
3776
4743
|
declare const BaseClient_base: ClientConstructor<{}>;
|
|
3777
|
-
declare class BaseClient extends BaseClient_base<
|
|
4744
|
+
declare class BaseClient extends BaseClient_base<Record<string, any>> {
|
|
4745
|
+
}
|
|
4746
|
+
|
|
4747
|
+
declare class Serializer {
|
|
4748
|
+
classes: Record<string, any>;
|
|
4749
|
+
add(clazz: any): void;
|
|
4750
|
+
toJSON<T>(data: T): string;
|
|
4751
|
+
fromJSON<T>(json: string): T;
|
|
3778
4752
|
}
|
|
4753
|
+
declare const serialize: <T>(data: T) => string;
|
|
4754
|
+
declare const deserialize: <T>(json: string) => T;
|
|
3779
4755
|
|
|
3780
4756
|
declare type BranchResolutionOptions = {
|
|
3781
4757
|
databaseURL?: string;
|
|
@@ -3788,9 +4764,89 @@ declare function getDatabaseURL(): string | undefined;
|
|
|
3788
4764
|
|
|
3789
4765
|
declare function getAPIKey(): string | undefined;
|
|
3790
4766
|
|
|
4767
|
+
interface Body {
|
|
4768
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
4769
|
+
blob(): Promise<Blob>;
|
|
4770
|
+
formData(): Promise<FormData>;
|
|
4771
|
+
json(): Promise<any>;
|
|
4772
|
+
text(): Promise<string>;
|
|
4773
|
+
}
|
|
4774
|
+
interface Blob {
|
|
4775
|
+
readonly size: number;
|
|
4776
|
+
readonly type: string;
|
|
4777
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
4778
|
+
slice(start?: number, end?: number, contentType?: string): Blob;
|
|
4779
|
+
text(): Promise<string>;
|
|
4780
|
+
}
|
|
4781
|
+
/** Provides information about files and allows JavaScript in a web page to access their content. */
|
|
4782
|
+
interface File extends Blob {
|
|
4783
|
+
readonly lastModified: number;
|
|
4784
|
+
readonly name: string;
|
|
4785
|
+
readonly webkitRelativePath: string;
|
|
4786
|
+
}
|
|
4787
|
+
declare type FormDataEntryValue = File | string;
|
|
4788
|
+
/** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */
|
|
4789
|
+
interface FormData {
|
|
4790
|
+
append(name: string, value: string | Blob, fileName?: string): void;
|
|
4791
|
+
delete(name: string): void;
|
|
4792
|
+
get(name: string): FormDataEntryValue | null;
|
|
4793
|
+
getAll(name: string): FormDataEntryValue[];
|
|
4794
|
+
has(name: string): boolean;
|
|
4795
|
+
set(name: string, value: string | Blob, fileName?: string): void;
|
|
4796
|
+
forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
|
|
4797
|
+
}
|
|
4798
|
+
/** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
|
|
4799
|
+
interface Headers {
|
|
4800
|
+
append(name: string, value: string): void;
|
|
4801
|
+
delete(name: string): void;
|
|
4802
|
+
get(name: string): string | null;
|
|
4803
|
+
has(name: string): boolean;
|
|
4804
|
+
set(name: string, value: string): void;
|
|
4805
|
+
forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
|
|
4806
|
+
}
|
|
4807
|
+
interface Request extends Body {
|
|
4808
|
+
/** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. */
|
|
4809
|
+
readonly cache: 'default' | 'force-cache' | 'no-cache' | 'no-store' | 'only-if-cached' | 'reload';
|
|
4810
|
+
/** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. */
|
|
4811
|
+
readonly credentials: 'include' | 'omit' | 'same-origin';
|
|
4812
|
+
/** Returns the kind of resource requested by request, e.g., "document" or "script". */
|
|
4813
|
+
readonly destination: '' | 'audio' | 'audioworklet' | 'document' | 'embed' | 'font' | 'frame' | 'iframe' | 'image' | 'manifest' | 'object' | 'paintworklet' | 'report' | 'script' | 'sharedworker' | 'style' | 'track' | 'video' | 'worker' | 'xslt';
|
|
4814
|
+
/** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header. */
|
|
4815
|
+
readonly headers: Headers;
|
|
4816
|
+
/** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI] */
|
|
4817
|
+
readonly integrity: string;
|
|
4818
|
+
/** Returns a boolean indicating whether or not request can outlive the global in which it was created. */
|
|
4819
|
+
readonly keepalive: boolean;
|
|
4820
|
+
/** Returns request's HTTP method, which is "GET" by default. */
|
|
4821
|
+
readonly method: string;
|
|
4822
|
+
/** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs. */
|
|
4823
|
+
readonly mode: 'cors' | 'navigate' | 'no-cors' | 'same-origin';
|
|
4824
|
+
/** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */
|
|
4825
|
+
readonly redirect: 'error' | 'follow' | 'manual';
|
|
4826
|
+
/** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made. */
|
|
4827
|
+
readonly referrer: string;
|
|
4828
|
+
/** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer. */
|
|
4829
|
+
readonly referrerPolicy: '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
4830
|
+
/** Returns the URL of request as a string. */
|
|
4831
|
+
readonly url: string;
|
|
4832
|
+
clone(): Request;
|
|
4833
|
+
}
|
|
4834
|
+
|
|
4835
|
+
declare type XataWorkerContext<XataClient> = {
|
|
4836
|
+
xata: XataClient;
|
|
4837
|
+
request: Request;
|
|
4838
|
+
env: Record<string, string | undefined>;
|
|
4839
|
+
};
|
|
4840
|
+
declare type RemoveFirst<T> = T extends [any, ...infer U] ? U : never;
|
|
4841
|
+
declare type WorkerRunnerConfig = {
|
|
4842
|
+
workspace: string;
|
|
4843
|
+
worker: string;
|
|
4844
|
+
};
|
|
4845
|
+
declare function buildWorkerRunner<XataClient>(config: WorkerRunnerConfig): <WorkerFunction extends (ctx: XataWorkerContext<XataClient>, ...args: any[]) => any>(name: string, _worker: WorkerFunction) => (...args: RemoveFirst<Parameters<WorkerFunction>>) => Promise<Awaited<ReturnType<WorkerFunction>>>;
|
|
4846
|
+
|
|
3791
4847
|
declare class XataError extends Error {
|
|
3792
4848
|
readonly status: number;
|
|
3793
4849
|
constructor(message: string, status: number);
|
|
3794
4850
|
}
|
|
3795
4851
|
|
|
3796
|
-
export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsResponse, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateTableError, CreateTablePathParams, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetRecordError, GetRecordPathParams, GetRecordRequestBody, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordResponse, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, Query, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SelectableColumn, SelectedPick, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, 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 };
|
|
4852
|
+
export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditResponse, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListMigrationRequestsError, ListMigrationRequestsPathParams, ListMigrationRequestsRequestBody, ListMigrationRequestsResponse, ListMigrationRequestsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PatchDatabaseMetadataError, PatchDatabaseMetadataPathParams, PatchDatabaseMetadataRequestBody, PatchDatabaseMetadataVariables, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaResponse, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, applyBranchSchemaEdit, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequests, listMigrationRequestsCommits, lt, lte, mergeMigrationRequest, notExists, operationsByTag, patchDatabaseMetadata, pattern, previewBranchSchemaEdit, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, updateBranchMetadata, updateBranchSchema, updateColumn, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|