@xata.io/client 0.16.2 → 0.18.0
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 +46 -0
- package/README.md +25 -25
- package/Usage.md +2 -0
- package/dist/index.cjs +386 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +988 -120
- package/dist/index.mjs +371 -72
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
declare type AttributeDictionary = Record<string, string | number | boolean | undefined>;
|
2
2
|
declare type TraceFunction = <T>(name: string, fn: (options: {
|
3
3
|
setAttributes: (attrs: AttributeDictionary) => void;
|
4
|
-
onError: (message: string) => void;
|
5
4
|
}) => T, options?: AttributeDictionary) => Promise<T>;
|
6
5
|
|
7
6
|
declare type FetchImpl = (url: string, init?: {
|
@@ -17,7 +16,7 @@ declare type FetchImpl = (url: string, init?: {
|
|
17
16
|
get(name: string): string | null;
|
18
17
|
};
|
19
18
|
}>;
|
20
|
-
declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Record<string, string
|
19
|
+
declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
|
21
20
|
declare type FetcherExtraProps = {
|
22
21
|
apiUrl: string;
|
23
22
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
@@ -100,7 +99,7 @@ declare type WorkspaceID = string;
|
|
100
99
|
declare type Role = 'owner' | 'maintainer';
|
101
100
|
declare type WorkspaceMeta = {
|
102
101
|
name: string;
|
103
|
-
slug
|
102
|
+
slug?: string;
|
104
103
|
};
|
105
104
|
declare type Workspace = WorkspaceMeta & {
|
106
105
|
id: WorkspaceID;
|
@@ -136,7 +135,6 @@ declare type InviteKey = string;
|
|
136
135
|
*/
|
137
136
|
declare type DatabaseMetadata = {
|
138
137
|
name: string;
|
139
|
-
displayName: string;
|
140
138
|
createdAt: DateTime;
|
141
139
|
numberOfBranches: number;
|
142
140
|
ui?: {
|
@@ -148,7 +146,6 @@ declare type ListDatabasesResponse = {
|
|
148
146
|
};
|
149
147
|
declare type ListBranchesResponse = {
|
150
148
|
databaseName: string;
|
151
|
-
displayName: string;
|
152
149
|
branches: Branch[];
|
153
150
|
};
|
154
151
|
declare type ListGitBranchesResponse = {
|
@@ -194,12 +191,28 @@ declare type Schema = {
|
|
194
191
|
tables: Table[];
|
195
192
|
tablesOrder?: string[];
|
196
193
|
};
|
194
|
+
/**
|
195
|
+
* @x-internal true
|
196
|
+
*/
|
197
|
+
declare type SchemaEditScript = {
|
198
|
+
sourceMigrationID?: string;
|
199
|
+
targetMigrationID?: string;
|
200
|
+
tables: TableEdit[];
|
201
|
+
};
|
197
202
|
declare type Table = {
|
198
203
|
id?: string;
|
199
204
|
name: TableName;
|
200
205
|
columns: Column[];
|
201
206
|
revLinks?: RevLink[];
|
202
207
|
};
|
208
|
+
/**
|
209
|
+
* @x-internal true
|
210
|
+
*/
|
211
|
+
declare type TableEdit = {
|
212
|
+
oldName?: string;
|
213
|
+
newName?: string;
|
214
|
+
columns?: MigrationColumnOp[];
|
215
|
+
};
|
203
216
|
/**
|
204
217
|
* @x-go-type xata.Column
|
205
218
|
*/
|
@@ -209,6 +222,8 @@ declare type Column = {
|
|
209
222
|
link?: {
|
210
223
|
table: string;
|
211
224
|
};
|
225
|
+
notNull?: boolean;
|
226
|
+
unique?: boolean;
|
212
227
|
columns?: Column[];
|
213
228
|
};
|
214
229
|
declare type RevLink = {
|
@@ -275,6 +290,110 @@ declare type ColumnMigration = {
|
|
275
290
|
old: Column;
|
276
291
|
['new']: Column;
|
277
292
|
};
|
293
|
+
/**
|
294
|
+
* @x-internal true
|
295
|
+
*/
|
296
|
+
declare type Commit = {
|
297
|
+
meta?: {
|
298
|
+
title?: string;
|
299
|
+
message?: string;
|
300
|
+
id: string;
|
301
|
+
parentID?: string;
|
302
|
+
mergeParentID?: string;
|
303
|
+
status: string;
|
304
|
+
createdAt: DateTime;
|
305
|
+
modifiedAt?: DateTime;
|
306
|
+
};
|
307
|
+
operations: MigrationOp[];
|
308
|
+
};
|
309
|
+
/**
|
310
|
+
* Branch schema migration.
|
311
|
+
*
|
312
|
+
* @x-internal true
|
313
|
+
*/
|
314
|
+
declare type Migration = {
|
315
|
+
parentID?: string;
|
316
|
+
operations: MigrationOp[];
|
317
|
+
};
|
318
|
+
/**
|
319
|
+
* Branch schema migration operations.
|
320
|
+
*
|
321
|
+
* @x-internal true
|
322
|
+
*/
|
323
|
+
declare type MigrationOp = MigrationTableOp | MigrationColumnOp;
|
324
|
+
/**
|
325
|
+
* @x-internal true
|
326
|
+
*/
|
327
|
+
declare type MigrationTableOp = {
|
328
|
+
addTable: TableOpAdd;
|
329
|
+
} | {
|
330
|
+
removeTable: TableOpRemove;
|
331
|
+
} | {
|
332
|
+
renameTable: TableOpRename;
|
333
|
+
};
|
334
|
+
/**
|
335
|
+
* @x-internal true
|
336
|
+
*/
|
337
|
+
declare type MigrationColumnOp = {
|
338
|
+
addColumn: ColumnOpAdd;
|
339
|
+
} | {
|
340
|
+
removeColumn: ColumnOpRemove;
|
341
|
+
} | {
|
342
|
+
renameColumn: ColumnOpRename;
|
343
|
+
};
|
344
|
+
/**
|
345
|
+
* @x-internal true
|
346
|
+
*/
|
347
|
+
declare type TableOpAdd = {
|
348
|
+
table: string;
|
349
|
+
};
|
350
|
+
/**
|
351
|
+
* @x-internal true
|
352
|
+
*/
|
353
|
+
declare type TableOpRemove = {
|
354
|
+
table: string;
|
355
|
+
};
|
356
|
+
/**
|
357
|
+
* @x-internal true
|
358
|
+
*/
|
359
|
+
declare type TableOpRename = {
|
360
|
+
oldName: string;
|
361
|
+
newName: string;
|
362
|
+
};
|
363
|
+
/**
|
364
|
+
* @x-internal true
|
365
|
+
*/
|
366
|
+
declare type ColumnOpAdd = {
|
367
|
+
table?: string;
|
368
|
+
column: Column;
|
369
|
+
};
|
370
|
+
/**
|
371
|
+
* @x-internal true
|
372
|
+
*/
|
373
|
+
declare type ColumnOpRemove = {
|
374
|
+
table?: string;
|
375
|
+
column: string;
|
376
|
+
};
|
377
|
+
/**
|
378
|
+
* @x-internal true
|
379
|
+
*/
|
380
|
+
declare type ColumnOpRename = {
|
381
|
+
table?: string;
|
382
|
+
oldName: string;
|
383
|
+
newName: string;
|
384
|
+
};
|
385
|
+
declare type MigrationRequest = {
|
386
|
+
number: number;
|
387
|
+
createdAt: DateTime;
|
388
|
+
modifiedAt?: DateTime;
|
389
|
+
closedAt?: DateTime;
|
390
|
+
mergedAt?: DateTime;
|
391
|
+
status: 'open' | 'closed' | 'merging' | 'merged';
|
392
|
+
title: string;
|
393
|
+
body: string;
|
394
|
+
source: string;
|
395
|
+
target: string;
|
396
|
+
};
|
278
397
|
declare type SortExpression = string[] | {
|
279
398
|
[key: string]: SortOrder;
|
280
399
|
} | {
|
@@ -283,7 +402,7 @@ declare type SortExpression = string[] | {
|
|
283
402
|
declare type SortOrder = 'asc' | 'desc';
|
284
403
|
/**
|
285
404
|
* Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
|
286
|
-
* distance is the number of one
|
405
|
+
* distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
|
287
406
|
* character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
|
288
407
|
* to allow two typos in a word.
|
289
408
|
*
|
@@ -309,6 +428,22 @@ declare type FilterExpression = {
|
|
309
428
|
} & {
|
310
429
|
[key: string]: FilterColumn;
|
311
430
|
};
|
431
|
+
/**
|
432
|
+
* The full summary expression; the entire expression is a map of names to requests.
|
433
|
+
*
|
434
|
+
* @x-go-type xbquery.SummaryList
|
435
|
+
*/
|
436
|
+
declare type SummaryExpressionList = {
|
437
|
+
[key: string]: SummaryExpression;
|
438
|
+
};
|
439
|
+
/**
|
440
|
+
* A single summary expression. The key represents an aggregation function; the value a column to aggregate.
|
441
|
+
*
|
442
|
+
* You may only call one aggregation per key.
|
443
|
+
*
|
444
|
+
* @x-go-type xbquery.Summary
|
445
|
+
*/
|
446
|
+
declare type SummaryExpression = Record<string, any>;
|
312
447
|
declare type HighlightExpression = {
|
313
448
|
enabled?: boolean;
|
314
449
|
encodeHTML?: boolean;
|
@@ -475,7 +610,9 @@ type schemas_BranchMetadata = BranchMetadata;
|
|
475
610
|
type schemas_DBBranch = DBBranch;
|
476
611
|
type schemas_StartedFromMetadata = StartedFromMetadata;
|
477
612
|
type schemas_Schema = Schema;
|
613
|
+
type schemas_SchemaEditScript = SchemaEditScript;
|
478
614
|
type schemas_Table = Table;
|
615
|
+
type schemas_TableEdit = TableEdit;
|
479
616
|
type schemas_Column = Column;
|
480
617
|
type schemas_RevLink = RevLink;
|
481
618
|
type schemas_BranchName = BranchName;
|
@@ -488,11 +625,25 @@ type schemas_MetricsLatency = MetricsLatency;
|
|
488
625
|
type schemas_BranchMigration = BranchMigration;
|
489
626
|
type schemas_TableMigration = TableMigration;
|
490
627
|
type schemas_ColumnMigration = ColumnMigration;
|
628
|
+
type schemas_Commit = Commit;
|
629
|
+
type schemas_Migration = Migration;
|
630
|
+
type schemas_MigrationOp = MigrationOp;
|
631
|
+
type schemas_MigrationTableOp = MigrationTableOp;
|
632
|
+
type schemas_MigrationColumnOp = MigrationColumnOp;
|
633
|
+
type schemas_TableOpAdd = TableOpAdd;
|
634
|
+
type schemas_TableOpRemove = TableOpRemove;
|
635
|
+
type schemas_TableOpRename = TableOpRename;
|
636
|
+
type schemas_ColumnOpAdd = ColumnOpAdd;
|
637
|
+
type schemas_ColumnOpRemove = ColumnOpRemove;
|
638
|
+
type schemas_ColumnOpRename = ColumnOpRename;
|
639
|
+
type schemas_MigrationRequest = MigrationRequest;
|
491
640
|
type schemas_SortExpression = SortExpression;
|
492
641
|
type schemas_SortOrder = SortOrder;
|
493
642
|
type schemas_FuzzinessExpression = FuzzinessExpression;
|
494
643
|
type schemas_PrefixExpression = PrefixExpression;
|
495
644
|
type schemas_FilterExpression = FilterExpression;
|
645
|
+
type schemas_SummaryExpressionList = SummaryExpressionList;
|
646
|
+
type schemas_SummaryExpression = SummaryExpression;
|
496
647
|
type schemas_HighlightExpression = HighlightExpression;
|
497
648
|
type schemas_BoosterExpression = BoosterExpression;
|
498
649
|
type schemas_FilterList = FilterList;
|
@@ -534,7 +685,9 @@ declare namespace schemas {
|
|
534
685
|
schemas_DBBranch as DBBranch,
|
535
686
|
schemas_StartedFromMetadata as StartedFromMetadata,
|
536
687
|
schemas_Schema as Schema,
|
688
|
+
schemas_SchemaEditScript as SchemaEditScript,
|
537
689
|
schemas_Table as Table,
|
690
|
+
schemas_TableEdit as TableEdit,
|
538
691
|
schemas_Column as Column,
|
539
692
|
schemas_RevLink as RevLink,
|
540
693
|
schemas_BranchName as BranchName,
|
@@ -547,11 +700,25 @@ declare namespace schemas {
|
|
547
700
|
schemas_BranchMigration as BranchMigration,
|
548
701
|
schemas_TableMigration as TableMigration,
|
549
702
|
schemas_ColumnMigration as ColumnMigration,
|
703
|
+
schemas_Commit as Commit,
|
704
|
+
schemas_Migration as Migration,
|
705
|
+
schemas_MigrationOp as MigrationOp,
|
706
|
+
schemas_MigrationTableOp as MigrationTableOp,
|
707
|
+
schemas_MigrationColumnOp as MigrationColumnOp,
|
708
|
+
schemas_TableOpAdd as TableOpAdd,
|
709
|
+
schemas_TableOpRemove as TableOpRemove,
|
710
|
+
schemas_TableOpRename as TableOpRename,
|
711
|
+
schemas_ColumnOpAdd as ColumnOpAdd,
|
712
|
+
schemas_ColumnOpRemove as ColumnOpRemove,
|
713
|
+
schemas_ColumnOpRename as ColumnOpRename,
|
714
|
+
schemas_MigrationRequest as MigrationRequest,
|
550
715
|
schemas_SortExpression as SortExpression,
|
551
716
|
schemas_SortOrder as SortOrder,
|
552
717
|
schemas_FuzzinessExpression as FuzzinessExpression,
|
553
718
|
schemas_PrefixExpression as PrefixExpression,
|
554
719
|
schemas_FilterExpression as FilterExpression,
|
720
|
+
schemas_SummaryExpressionList as SummaryExpressionList,
|
721
|
+
schemas_SummaryExpression as SummaryExpression,
|
555
722
|
schemas_HighlightExpression as HighlightExpression,
|
556
723
|
schemas_BoosterExpression as BoosterExpression,
|
557
724
|
ValueBooster$1 as ValueBooster,
|
@@ -612,6 +779,11 @@ declare type BranchMigrationPlan = {
|
|
612
779
|
migration: BranchMigration;
|
613
780
|
};
|
614
781
|
declare type RecordResponse = XataRecord$1;
|
782
|
+
declare type SchemaCompareResponse = {
|
783
|
+
source: Schema;
|
784
|
+
target: Schema;
|
785
|
+
edits: SchemaEditScript;
|
786
|
+
};
|
615
787
|
declare type RecordUpdateResponse = XataRecord$1 | {
|
616
788
|
id: string;
|
617
789
|
xata: {
|
@@ -622,6 +794,9 @@ declare type QueryResponse = {
|
|
622
794
|
records: XataRecord$1[];
|
623
795
|
meta: RecordsMetadata;
|
624
796
|
};
|
797
|
+
declare type SummarizeResponse = {
|
798
|
+
summary: Record<string, any>[];
|
799
|
+
};
|
625
800
|
declare type SearchResponse = {
|
626
801
|
records: XataRecord$1[];
|
627
802
|
};
|
@@ -639,8 +814,10 @@ type responses_BulkError = BulkError;
|
|
639
814
|
type responses_BulkInsertResponse = BulkInsertResponse;
|
640
815
|
type responses_BranchMigrationPlan = BranchMigrationPlan;
|
641
816
|
type responses_RecordResponse = RecordResponse;
|
817
|
+
type responses_SchemaCompareResponse = SchemaCompareResponse;
|
642
818
|
type responses_RecordUpdateResponse = RecordUpdateResponse;
|
643
819
|
type responses_QueryResponse = QueryResponse;
|
820
|
+
type responses_SummarizeResponse = SummarizeResponse;
|
644
821
|
type responses_SearchResponse = SearchResponse;
|
645
822
|
type responses_MigrationIdResponse = MigrationIdResponse;
|
646
823
|
declare namespace responses {
|
@@ -652,8 +829,10 @@ declare namespace responses {
|
|
652
829
|
responses_BulkInsertResponse as BulkInsertResponse,
|
653
830
|
responses_BranchMigrationPlan as BranchMigrationPlan,
|
654
831
|
responses_RecordResponse as RecordResponse,
|
832
|
+
responses_SchemaCompareResponse as SchemaCompareResponse,
|
655
833
|
responses_RecordUpdateResponse as RecordUpdateResponse,
|
656
834
|
responses_QueryResponse as QueryResponse,
|
835
|
+
responses_SummarizeResponse as SummarizeResponse,
|
657
836
|
responses_SearchResponse as SearchResponse,
|
658
837
|
responses_MigrationIdResponse as MigrationIdResponse,
|
659
838
|
};
|
@@ -1118,7 +1297,6 @@ declare type CreateDatabaseResponse = {
|
|
1118
1297
|
branchName?: string;
|
1119
1298
|
};
|
1120
1299
|
declare type CreateDatabaseRequestBody = {
|
1121
|
-
displayName?: string;
|
1122
1300
|
branchName?: string;
|
1123
1301
|
ui?: {
|
1124
1302
|
color?: string;
|
@@ -1175,6 +1353,33 @@ declare type GetDatabaseMetadataVariables = {
|
|
1175
1353
|
* Retrieve metadata of the given database
|
1176
1354
|
*/
|
1177
1355
|
declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
1356
|
+
declare type UpdateDatabaseMetadataPathParams = {
|
1357
|
+
dbName: DBName;
|
1358
|
+
workspace: string;
|
1359
|
+
};
|
1360
|
+
declare type UpdateDatabaseMetadataError = ErrorWrapper<{
|
1361
|
+
status: 400;
|
1362
|
+
payload: BadRequestError;
|
1363
|
+
} | {
|
1364
|
+
status: 401;
|
1365
|
+
payload: AuthError;
|
1366
|
+
} | {
|
1367
|
+
status: 404;
|
1368
|
+
payload: SimpleError;
|
1369
|
+
}>;
|
1370
|
+
declare type UpdateDatabaseMetadataRequestBody = {
|
1371
|
+
ui?: {
|
1372
|
+
color?: string;
|
1373
|
+
};
|
1374
|
+
};
|
1375
|
+
declare type UpdateDatabaseMetadataVariables = {
|
1376
|
+
body?: UpdateDatabaseMetadataRequestBody;
|
1377
|
+
pathParams: UpdateDatabaseMetadataPathParams;
|
1378
|
+
} & FetcherExtraProps;
|
1379
|
+
/**
|
1380
|
+
* Update the color of the selected database
|
1381
|
+
*/
|
1382
|
+
declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
1178
1383
|
declare type GetGitBranchesMappingPathParams = {
|
1179
1384
|
dbName: DBName;
|
1180
1385
|
workspace: string;
|
@@ -1332,6 +1537,201 @@ declare type ResolveBranchVariables = {
|
|
1332
1537
|
* ```
|
1333
1538
|
*/
|
1334
1539
|
declare const resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
|
1540
|
+
declare type ListMigrationRequestsPathParams = {
|
1541
|
+
dbName: DBName;
|
1542
|
+
workspace: string;
|
1543
|
+
};
|
1544
|
+
declare type ListMigrationRequestsError = ErrorWrapper<{
|
1545
|
+
status: 400;
|
1546
|
+
payload: BadRequestError;
|
1547
|
+
} | {
|
1548
|
+
status: 401;
|
1549
|
+
payload: AuthError;
|
1550
|
+
} | {
|
1551
|
+
status: 404;
|
1552
|
+
payload: SimpleError;
|
1553
|
+
}>;
|
1554
|
+
declare type ListMigrationRequestsResponse = {
|
1555
|
+
migrationRequests: MigrationRequest[];
|
1556
|
+
meta: RecordsMetadata;
|
1557
|
+
};
|
1558
|
+
declare type ListMigrationRequestsRequestBody = {
|
1559
|
+
filter?: FilterExpression;
|
1560
|
+
sort?: SortExpression;
|
1561
|
+
page?: PageConfig;
|
1562
|
+
columns?: ColumnsProjection;
|
1563
|
+
};
|
1564
|
+
declare type ListMigrationRequestsVariables = {
|
1565
|
+
body?: ListMigrationRequestsRequestBody;
|
1566
|
+
pathParams: ListMigrationRequestsPathParams;
|
1567
|
+
} & FetcherExtraProps;
|
1568
|
+
declare const listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
|
1569
|
+
declare type CreateMigrationRequestPathParams = {
|
1570
|
+
dbName: DBName;
|
1571
|
+
workspace: string;
|
1572
|
+
};
|
1573
|
+
declare type CreateMigrationRequestError = ErrorWrapper<{
|
1574
|
+
status: 400;
|
1575
|
+
payload: BadRequestError;
|
1576
|
+
} | {
|
1577
|
+
status: 401;
|
1578
|
+
payload: AuthError;
|
1579
|
+
} | {
|
1580
|
+
status: 404;
|
1581
|
+
payload: SimpleError;
|
1582
|
+
}>;
|
1583
|
+
declare type CreateMigrationRequestResponse = {
|
1584
|
+
number: number;
|
1585
|
+
};
|
1586
|
+
declare type CreateMigrationRequestRequestBody = {
|
1587
|
+
source: string;
|
1588
|
+
target: string;
|
1589
|
+
title: string;
|
1590
|
+
body?: string;
|
1591
|
+
};
|
1592
|
+
declare type CreateMigrationRequestVariables = {
|
1593
|
+
body: CreateMigrationRequestRequestBody;
|
1594
|
+
pathParams: CreateMigrationRequestPathParams;
|
1595
|
+
} & FetcherExtraProps;
|
1596
|
+
declare const createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
|
1597
|
+
declare type GetMigrationRequestPathParams = {
|
1598
|
+
dbName: DBName;
|
1599
|
+
mrNumber: number;
|
1600
|
+
workspace: string;
|
1601
|
+
};
|
1602
|
+
declare type GetMigrationRequestError = ErrorWrapper<{
|
1603
|
+
status: 400;
|
1604
|
+
payload: BadRequestError;
|
1605
|
+
} | {
|
1606
|
+
status: 401;
|
1607
|
+
payload: AuthError;
|
1608
|
+
} | {
|
1609
|
+
status: 404;
|
1610
|
+
payload: SimpleError;
|
1611
|
+
}>;
|
1612
|
+
declare type GetMigrationRequestVariables = {
|
1613
|
+
pathParams: GetMigrationRequestPathParams;
|
1614
|
+
} & FetcherExtraProps;
|
1615
|
+
declare const getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
|
1616
|
+
declare type UpdateMigrationRequestPathParams = {
|
1617
|
+
dbName: DBName;
|
1618
|
+
mrNumber: number;
|
1619
|
+
workspace: string;
|
1620
|
+
};
|
1621
|
+
declare type UpdateMigrationRequestError = ErrorWrapper<{
|
1622
|
+
status: 400;
|
1623
|
+
payload: BadRequestError;
|
1624
|
+
} | {
|
1625
|
+
status: 401;
|
1626
|
+
payload: AuthError;
|
1627
|
+
} | {
|
1628
|
+
status: 404;
|
1629
|
+
payload: SimpleError;
|
1630
|
+
}>;
|
1631
|
+
declare type UpdateMigrationRequestRequestBody = {
|
1632
|
+
title?: string;
|
1633
|
+
body?: string;
|
1634
|
+
status?: 'open' | 'closed';
|
1635
|
+
};
|
1636
|
+
declare type UpdateMigrationRequestVariables = {
|
1637
|
+
body?: UpdateMigrationRequestRequestBody;
|
1638
|
+
pathParams: UpdateMigrationRequestPathParams;
|
1639
|
+
} & FetcherExtraProps;
|
1640
|
+
declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
|
1641
|
+
declare type ListMigrationRequestsCommitsPathParams = {
|
1642
|
+
dbName: DBName;
|
1643
|
+
mrNumber: number;
|
1644
|
+
workspace: string;
|
1645
|
+
};
|
1646
|
+
declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
|
1647
|
+
status: 400;
|
1648
|
+
payload: BadRequestError;
|
1649
|
+
} | {
|
1650
|
+
status: 401;
|
1651
|
+
payload: AuthError;
|
1652
|
+
} | {
|
1653
|
+
status: 404;
|
1654
|
+
payload: SimpleError;
|
1655
|
+
}>;
|
1656
|
+
declare type ListMigrationRequestsCommitsResponse = {
|
1657
|
+
meta: {
|
1658
|
+
cursor: string;
|
1659
|
+
more: boolean;
|
1660
|
+
};
|
1661
|
+
logs: Commit[];
|
1662
|
+
};
|
1663
|
+
declare type ListMigrationRequestsCommitsRequestBody = {
|
1664
|
+
page?: {
|
1665
|
+
after?: string;
|
1666
|
+
before?: string;
|
1667
|
+
size?: number;
|
1668
|
+
};
|
1669
|
+
};
|
1670
|
+
declare type ListMigrationRequestsCommitsVariables = {
|
1671
|
+
body?: ListMigrationRequestsCommitsRequestBody;
|
1672
|
+
pathParams: ListMigrationRequestsCommitsPathParams;
|
1673
|
+
} & FetcherExtraProps;
|
1674
|
+
declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
|
1675
|
+
declare type CompareMigrationRequestPathParams = {
|
1676
|
+
dbName: DBName;
|
1677
|
+
mrNumber: number;
|
1678
|
+
workspace: string;
|
1679
|
+
};
|
1680
|
+
declare type CompareMigrationRequestError = ErrorWrapper<{
|
1681
|
+
status: 400;
|
1682
|
+
payload: BadRequestError;
|
1683
|
+
} | {
|
1684
|
+
status: 401;
|
1685
|
+
payload: AuthError;
|
1686
|
+
} | {
|
1687
|
+
status: 404;
|
1688
|
+
payload: SimpleError;
|
1689
|
+
}>;
|
1690
|
+
declare type CompareMigrationRequestVariables = {
|
1691
|
+
pathParams: CompareMigrationRequestPathParams;
|
1692
|
+
} & FetcherExtraProps;
|
1693
|
+
declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
|
1694
|
+
declare type GetMigrationRequestIsMergedPathParams = {
|
1695
|
+
dbName: DBName;
|
1696
|
+
mrNumber: number;
|
1697
|
+
workspace: string;
|
1698
|
+
};
|
1699
|
+
declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
|
1700
|
+
status: 400;
|
1701
|
+
payload: BadRequestError;
|
1702
|
+
} | {
|
1703
|
+
status: 401;
|
1704
|
+
payload: AuthError;
|
1705
|
+
} | {
|
1706
|
+
status: 404;
|
1707
|
+
payload: SimpleError;
|
1708
|
+
}>;
|
1709
|
+
declare type GetMigrationRequestIsMergedResponse = {
|
1710
|
+
merged?: boolean;
|
1711
|
+
};
|
1712
|
+
declare type GetMigrationRequestIsMergedVariables = {
|
1713
|
+
pathParams: GetMigrationRequestIsMergedPathParams;
|
1714
|
+
} & FetcherExtraProps;
|
1715
|
+
declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
|
1716
|
+
declare type MergeMigrationRequestPathParams = {
|
1717
|
+
dbName: DBName;
|
1718
|
+
mrNumber: number;
|
1719
|
+
workspace: string;
|
1720
|
+
};
|
1721
|
+
declare type MergeMigrationRequestError = ErrorWrapper<{
|
1722
|
+
status: 400;
|
1723
|
+
payload: BadRequestError;
|
1724
|
+
} | {
|
1725
|
+
status: 401;
|
1726
|
+
payload: AuthError;
|
1727
|
+
} | {
|
1728
|
+
status: 404;
|
1729
|
+
payload: SimpleError;
|
1730
|
+
}>;
|
1731
|
+
declare type MergeMigrationRequestVariables = {
|
1732
|
+
pathParams: MergeMigrationRequestPathParams;
|
1733
|
+
} & FetcherExtraProps;
|
1734
|
+
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
|
1335
1735
|
declare type GetBranchDetailsPathParams = {
|
1336
1736
|
dbBranchName: DBBranchName;
|
1337
1737
|
workspace: string;
|
@@ -1517,6 +1917,157 @@ declare type GetBranchMigrationPlanVariables = {
|
|
1517
1917
|
* Compute a migration plan from a target schema the branch should be migrated too.
|
1518
1918
|
*/
|
1519
1919
|
declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
|
1920
|
+
declare type CompareBranchWithUserSchemaPathParams = {
|
1921
|
+
dbBranchName: DBBranchName;
|
1922
|
+
workspace: string;
|
1923
|
+
};
|
1924
|
+
declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
|
1925
|
+
status: 400;
|
1926
|
+
payload: BadRequestError;
|
1927
|
+
} | {
|
1928
|
+
status: 401;
|
1929
|
+
payload: AuthError;
|
1930
|
+
} | {
|
1931
|
+
status: 404;
|
1932
|
+
payload: SimpleError;
|
1933
|
+
}>;
|
1934
|
+
declare type CompareBranchWithUserSchemaRequestBody = {
|
1935
|
+
schema: Schema;
|
1936
|
+
};
|
1937
|
+
declare type CompareBranchWithUserSchemaVariables = {
|
1938
|
+
body: CompareBranchWithUserSchemaRequestBody;
|
1939
|
+
pathParams: CompareBranchWithUserSchemaPathParams;
|
1940
|
+
} & FetcherExtraProps;
|
1941
|
+
declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
|
1942
|
+
declare type CompareBranchSchemasPathParams = {
|
1943
|
+
dbBranchName: DBBranchName;
|
1944
|
+
branchName: BranchName;
|
1945
|
+
workspace: string;
|
1946
|
+
};
|
1947
|
+
declare type CompareBranchSchemasError = ErrorWrapper<{
|
1948
|
+
status: 400;
|
1949
|
+
payload: BadRequestError;
|
1950
|
+
} | {
|
1951
|
+
status: 401;
|
1952
|
+
payload: AuthError;
|
1953
|
+
} | {
|
1954
|
+
status: 404;
|
1955
|
+
payload: SimpleError;
|
1956
|
+
}>;
|
1957
|
+
declare type CompareBranchSchemasVariables = {
|
1958
|
+
body?: Record<string, any>;
|
1959
|
+
pathParams: CompareBranchSchemasPathParams;
|
1960
|
+
} & FetcherExtraProps;
|
1961
|
+
declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
|
1962
|
+
declare type UpdateBranchSchemaPathParams = {
|
1963
|
+
dbBranchName: DBBranchName;
|
1964
|
+
workspace: string;
|
1965
|
+
};
|
1966
|
+
declare type UpdateBranchSchemaError = ErrorWrapper<{
|
1967
|
+
status: 400;
|
1968
|
+
payload: BadRequestError;
|
1969
|
+
} | {
|
1970
|
+
status: 401;
|
1971
|
+
payload: AuthError;
|
1972
|
+
} | {
|
1973
|
+
status: 404;
|
1974
|
+
payload: SimpleError;
|
1975
|
+
}>;
|
1976
|
+
declare type UpdateBranchSchemaResponse = {
|
1977
|
+
id: string;
|
1978
|
+
parentID: string;
|
1979
|
+
};
|
1980
|
+
declare type UpdateBranchSchemaVariables = {
|
1981
|
+
body: Migration;
|
1982
|
+
pathParams: UpdateBranchSchemaPathParams;
|
1983
|
+
} & FetcherExtraProps;
|
1984
|
+
declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
|
1985
|
+
declare type PreviewBranchSchemaEditPathParams = {
|
1986
|
+
dbBranchName: DBBranchName;
|
1987
|
+
workspace: string;
|
1988
|
+
};
|
1989
|
+
declare type PreviewBranchSchemaEditError = ErrorWrapper<{
|
1990
|
+
status: 400;
|
1991
|
+
payload: BadRequestError;
|
1992
|
+
} | {
|
1993
|
+
status: 401;
|
1994
|
+
payload: AuthError;
|
1995
|
+
} | {
|
1996
|
+
status: 404;
|
1997
|
+
payload: SimpleError;
|
1998
|
+
}>;
|
1999
|
+
declare type PreviewBranchSchemaEditResponse = {
|
2000
|
+
original: Schema;
|
2001
|
+
updated: Schema;
|
2002
|
+
};
|
2003
|
+
declare type PreviewBranchSchemaEditRequestBody = {
|
2004
|
+
edits?: SchemaEditScript;
|
2005
|
+
operations?: MigrationOp[];
|
2006
|
+
};
|
2007
|
+
declare type PreviewBranchSchemaEditVariables = {
|
2008
|
+
body?: PreviewBranchSchemaEditRequestBody;
|
2009
|
+
pathParams: PreviewBranchSchemaEditPathParams;
|
2010
|
+
} & FetcherExtraProps;
|
2011
|
+
declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
|
2012
|
+
declare type ApplyBranchSchemaEditPathParams = {
|
2013
|
+
dbBranchName: DBBranchName;
|
2014
|
+
workspace: string;
|
2015
|
+
};
|
2016
|
+
declare type ApplyBranchSchemaEditError = ErrorWrapper<{
|
2017
|
+
status: 400;
|
2018
|
+
payload: BadRequestError;
|
2019
|
+
} | {
|
2020
|
+
status: 401;
|
2021
|
+
payload: AuthError;
|
2022
|
+
} | {
|
2023
|
+
status: 404;
|
2024
|
+
payload: SimpleError;
|
2025
|
+
}>;
|
2026
|
+
declare type ApplyBranchSchemaEditResponse = {
|
2027
|
+
id: string;
|
2028
|
+
parentID: string;
|
2029
|
+
};
|
2030
|
+
declare type ApplyBranchSchemaEditRequestBody = {
|
2031
|
+
edits: SchemaEditScript;
|
2032
|
+
};
|
2033
|
+
declare type ApplyBranchSchemaEditVariables = {
|
2034
|
+
body: ApplyBranchSchemaEditRequestBody;
|
2035
|
+
pathParams: ApplyBranchSchemaEditPathParams;
|
2036
|
+
} & FetcherExtraProps;
|
2037
|
+
declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
|
2038
|
+
declare type GetBranchSchemaHistoryPathParams = {
|
2039
|
+
dbBranchName: DBBranchName;
|
2040
|
+
workspace: string;
|
2041
|
+
};
|
2042
|
+
declare type GetBranchSchemaHistoryError = ErrorWrapper<{
|
2043
|
+
status: 400;
|
2044
|
+
payload: BadRequestError;
|
2045
|
+
} | {
|
2046
|
+
status: 401;
|
2047
|
+
payload: AuthError;
|
2048
|
+
} | {
|
2049
|
+
status: 404;
|
2050
|
+
payload: SimpleError;
|
2051
|
+
}>;
|
2052
|
+
declare type GetBranchSchemaHistoryResponse = {
|
2053
|
+
meta: {
|
2054
|
+
cursor: string;
|
2055
|
+
more: boolean;
|
2056
|
+
};
|
2057
|
+
logs: Commit[];
|
2058
|
+
};
|
2059
|
+
declare type GetBranchSchemaHistoryRequestBody = {
|
2060
|
+
page?: {
|
2061
|
+
after?: string;
|
2062
|
+
before?: string;
|
2063
|
+
size?: number;
|
2064
|
+
};
|
2065
|
+
};
|
2066
|
+
declare type GetBranchSchemaHistoryVariables = {
|
2067
|
+
body?: GetBranchSchemaHistoryRequestBody;
|
2068
|
+
pathParams: GetBranchSchemaHistoryPathParams;
|
2069
|
+
} & FetcherExtraProps;
|
2070
|
+
declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
|
1520
2071
|
declare type GetBranchStatsPathParams = {
|
1521
2072
|
dbBranchName: DBBranchName;
|
1522
2073
|
workspace: string;
|
@@ -2811,6 +3362,7 @@ declare type SearchBranchRequestBody = {
|
|
2811
3362
|
})[];
|
2812
3363
|
query: string;
|
2813
3364
|
fuzziness?: FuzzinessExpression;
|
3365
|
+
prefix?: PrefixExpression;
|
2814
3366
|
highlight?: HighlightExpression;
|
2815
3367
|
};
|
2816
3368
|
declare type SearchBranchVariables = {
|
@@ -2821,6 +3373,33 @@ declare type SearchBranchVariables = {
|
|
2821
3373
|
* Run a free text search operation across the database branch.
|
2822
3374
|
*/
|
2823
3375
|
declare const searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
|
3376
|
+
declare type SummarizeTablePathParams = {
|
3377
|
+
dbBranchName: DBBranchName;
|
3378
|
+
tableName: TableName;
|
3379
|
+
workspace: string;
|
3380
|
+
};
|
3381
|
+
declare type SummarizeTableError = ErrorWrapper<{
|
3382
|
+
status: 400;
|
3383
|
+
payload: BadRequestError;
|
3384
|
+
} | {
|
3385
|
+
status: 401;
|
3386
|
+
payload: AuthError;
|
3387
|
+
} | {
|
3388
|
+
status: 404;
|
3389
|
+
payload: SimpleError;
|
3390
|
+
}>;
|
3391
|
+
declare type SummarizeTableRequestBody = {
|
3392
|
+
summaries?: SummaryExpressionList;
|
3393
|
+
columns?: ColumnsProjection;
|
3394
|
+
};
|
3395
|
+
declare type SummarizeTableVariables = {
|
3396
|
+
body?: SummarizeTableRequestBody;
|
3397
|
+
pathParams: SummarizeTablePathParams;
|
3398
|
+
} & FetcherExtraProps;
|
3399
|
+
/**
|
3400
|
+
* Summarize table
|
3401
|
+
*/
|
3402
|
+
declare const summarizeTable: (variables: SummarizeTableVariables) => Promise<SummarizeResponse>;
|
2824
3403
|
declare const operationsByTag: {
|
2825
3404
|
users: {
|
2826
3405
|
getUser: (variables: GetUserVariables) => Promise<UserWithID>;
|
@@ -2850,6 +3429,7 @@ declare const operationsByTag: {
|
|
2850
3429
|
createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
|
2851
3430
|
deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
|
2852
3431
|
getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
3432
|
+
updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
2853
3433
|
getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
|
2854
3434
|
addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
|
2855
3435
|
removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
|
@@ -2862,10 +3442,28 @@ declare const operationsByTag: {
|
|
2862
3442
|
deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
|
2863
3443
|
updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
|
2864
3444
|
getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
|
3445
|
+
getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
|
3446
|
+
};
|
3447
|
+
migrationRequests: {
|
3448
|
+
listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
|
3449
|
+
createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
|
3450
|
+
getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
|
3451
|
+
updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
|
3452
|
+
listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
|
3453
|
+
compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
|
3454
|
+
getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
|
3455
|
+
mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
|
3456
|
+
};
|
3457
|
+
branchSchema: {
|
2865
3458
|
getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
|
2866
3459
|
executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
|
2867
3460
|
getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
|
2868
|
-
|
3461
|
+
compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
|
3462
|
+
compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
|
3463
|
+
updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
|
3464
|
+
previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
|
3465
|
+
applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
|
3466
|
+
getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
|
2869
3467
|
};
|
2870
3468
|
table: {
|
2871
3469
|
createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
|
@@ -2890,6 +3488,7 @@ declare const operationsByTag: {
|
|
2890
3488
|
queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
|
2891
3489
|
searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
|
2892
3490
|
searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
|
3491
|
+
summarizeTable: (variables: SummarizeTableVariables) => Promise<SummarizeResponse>;
|
2893
3492
|
};
|
2894
3493
|
};
|
2895
3494
|
|
@@ -2915,6 +3514,8 @@ declare class XataApiClient {
|
|
2915
3514
|
get branches(): BranchApi;
|
2916
3515
|
get tables(): TableApi;
|
2917
3516
|
get records(): RecordsApi;
|
3517
|
+
get migrationRequests(): MigrationRequestsApi;
|
3518
|
+
get branchSchema(): BranchSchemaApi;
|
2918
3519
|
}
|
2919
3520
|
declare class UserApi {
|
2920
3521
|
private extraProps;
|
@@ -2950,6 +3551,7 @@ declare class DatabaseApi {
|
|
2950
3551
|
createDatabase(workspace: WorkspaceID, dbName: DBName, options?: CreateDatabaseRequestBody): Promise<CreateDatabaseResponse>;
|
2951
3552
|
deleteDatabase(workspace: WorkspaceID, dbName: DBName): Promise<void>;
|
2952
3553
|
getDatabaseMetadata(workspace: WorkspaceID, dbName: DBName): Promise<DatabaseMetadata>;
|
3554
|
+
updateDatabaseMetadata(workspace: WorkspaceID, dbName: DBName, options?: UpdateDatabaseMetadataRequestBody): Promise<DatabaseMetadata>;
|
2953
3555
|
getGitBranchesMapping(workspace: WorkspaceID, dbName: DBName): Promise<ListGitBranchesResponse>;
|
2954
3556
|
addGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, body: AddGitBranchesEntryRequestBody): Promise<AddGitBranchesEntryResponse>;
|
2955
3557
|
removeGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, gitBranch: string): Promise<void>;
|
@@ -2964,9 +3566,6 @@ declare class BranchApi {
|
|
2964
3566
|
deleteBranch(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<void>;
|
2965
3567
|
updateBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName, metadata?: BranchMetadata): Promise<void>;
|
2966
3568
|
getBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<BranchMetadata>;
|
2967
|
-
getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
|
2968
|
-
executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
|
2969
|
-
getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
|
2970
3569
|
getBranchStats(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<GetBranchStatsResponse>;
|
2971
3570
|
}
|
2972
3571
|
declare class TableApi {
|
@@ -2996,6 +3595,32 @@ declare class RecordsApi {
|
|
2996
3595
|
queryTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: QueryTableRequestBody): Promise<QueryResponse>;
|
2997
3596
|
searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
|
2998
3597
|
searchBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, query: SearchBranchRequestBody): Promise<SearchResponse>;
|
3598
|
+
summarizeTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SummarizeTableRequestBody): Promise<SummarizeResponse>;
|
3599
|
+
}
|
3600
|
+
declare class MigrationRequestsApi {
|
3601
|
+
private extraProps;
|
3602
|
+
constructor(extraProps: FetcherExtraProps);
|
3603
|
+
listMigrationRequests(workspace: WorkspaceID, database: DBName, options?: ListMigrationRequestsRequestBody): Promise<ListMigrationRequestsResponse>;
|
3604
|
+
createMigrationRequest(workspace: WorkspaceID, database: DBName, options: CreateMigrationRequestRequestBody): Promise<CreateMigrationRequestResponse>;
|
3605
|
+
getMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<MigrationRequest>;
|
3606
|
+
updateMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number, options: UpdateMigrationRequestRequestBody): Promise<void>;
|
3607
|
+
listMigrationRequestsCommits(workspace: WorkspaceID, database: DBName, migrationRequest: number, options?: ListMigrationRequestsCommitsRequestBody): Promise<ListMigrationRequestsCommitsResponse>;
|
3608
|
+
compareMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<SchemaCompareResponse>;
|
3609
|
+
getMigrationRequestIsMerged(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<GetMigrationRequestIsMergedResponse>;
|
3610
|
+
mergeMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<Commit>;
|
3611
|
+
}
|
3612
|
+
declare class BranchSchemaApi {
|
3613
|
+
private extraProps;
|
3614
|
+
constructor(extraProps: FetcherExtraProps);
|
3615
|
+
getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
|
3616
|
+
executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
|
3617
|
+
getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
|
3618
|
+
compareBranchWithUserSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
|
3619
|
+
compareBranchSchemas(workspace: WorkspaceID, database: DBName, branch: BranchName, branchName: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
|
3620
|
+
updateBranchSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<UpdateBranchSchemaResponse>;
|
3621
|
+
previewBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<PreviewBranchSchemaEditResponse>;
|
3622
|
+
applyBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, edits: SchemaEditScript): Promise<ApplyBranchSchemaEditResponse>;
|
3623
|
+
getBranchSchemaHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchSchemaHistoryRequestBody): Promise<GetBranchSchemaHistoryResponse>;
|
2999
3624
|
}
|
3000
3625
|
|
3001
3626
|
declare class XataApiPlugin implements XataPlugin {
|
@@ -3065,12 +3690,12 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
|
|
3065
3690
|
/**
|
3066
3691
|
* Retrieves a refreshed copy of the current record from the database.
|
3067
3692
|
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
3068
|
-
* @returns The persisted record with the selected columns.
|
3693
|
+
* @returns The persisted record with the selected columns, null if not found.
|
3069
3694
|
*/
|
3070
3695
|
read<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
|
3071
3696
|
/**
|
3072
3697
|
* Retrieves a refreshed copy of the current record from the database.
|
3073
|
-
* @returns The persisted record with all first level properties.
|
3698
|
+
* @returns The persisted record with all first level properties, null if not found.
|
3074
3699
|
*/
|
3075
3700
|
read(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
3076
3701
|
/**
|
@@ -3078,42 +3703,30 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
|
|
3078
3703
|
* returned and the current object is not mutated.
|
3079
3704
|
* @param partialUpdate The columns and their values that have to be updated.
|
3080
3705
|
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
3081
|
-
* @returns The persisted record with the selected columns.
|
3706
|
+
* @returns The persisted record with the selected columns, null if not found.
|
3082
3707
|
*/
|
3083
|
-
update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<
|
3708
|
+
update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<OriginalRecord>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
|
3084
3709
|
/**
|
3085
3710
|
* Performs a partial update of the current record. On success a new object is
|
3086
3711
|
* returned and the current object is not mutated.
|
3087
3712
|
* @param partialUpdate The columns and their values that have to be updated.
|
3088
|
-
* @returns The persisted record with all first level properties.
|
3713
|
+
* @returns The persisted record with all first level properties, null if not found.
|
3089
3714
|
*/
|
3090
|
-
update(partialUpdate: Partial<EditableData<
|
3715
|
+
update(partialUpdate: Partial<EditableData<OriginalRecord>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
3091
3716
|
/**
|
3092
3717
|
* Performs a deletion of the current record in the database.
|
3093
|
-
*
|
3094
|
-
* @
|
3095
|
-
*/
|
3096
|
-
delete(): Promise<void>;
|
3097
|
-
}
|
3098
|
-
declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update'> & {
|
3099
|
-
/**
|
3100
|
-
* Retrieves a refreshed copy of the current record from the database.
|
3101
|
-
*/
|
3102
|
-
read<K extends SelectableColumn<Record>>(columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>> | null>;
|
3103
|
-
/**
|
3104
|
-
* Performs a partial update of the current record. On success a new object is
|
3105
|
-
* returned and the current object is not mutated.
|
3106
|
-
* @param partialUpdate The columns and their values that have to be updated.
|
3107
|
-
* @returns A new record containing the latest values for all the columns of the current record.
|
3718
|
+
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
3719
|
+
* @returns The deleted record, null if not found.
|
3108
3720
|
*/
|
3109
|
-
|
3721
|
+
delete<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
|
3110
3722
|
/**
|
3111
3723
|
* Performs a deletion of the current record in the database.
|
3112
|
-
*
|
3113
|
-
|
3724
|
+
* @returns The deleted record, null if not found.
|
3725
|
+
|
3114
3726
|
*/
|
3115
|
-
delete(): Promise<
|
3116
|
-
}
|
3727
|
+
delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
3728
|
+
}
|
3729
|
+
declare type Link<Record extends XataRecord> = XataRecord<Record>;
|
3117
3730
|
declare type XataRecordMetadata = {
|
3118
3731
|
/**
|
3119
3732
|
* Number that is increased every time the record is updated.
|
@@ -3123,13 +3736,13 @@ declare type XataRecordMetadata = {
|
|
3123
3736
|
};
|
3124
3737
|
declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
|
3125
3738
|
declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
|
3126
|
-
declare type EditableData<O extends
|
3739
|
+
declare type EditableData<O extends XataRecord> = Identifiable & Omit<{
|
3127
3740
|
[K in keyof O]: O[K] extends XataRecord ? {
|
3128
3741
|
id: string;
|
3129
3742
|
} | string : NonNullable<O[K]> extends XataRecord ? {
|
3130
3743
|
id: string;
|
3131
3744
|
} | string | null | undefined : O[K];
|
3132
|
-
}
|
3745
|
+
}, keyof XataRecord>;
|
3133
3746
|
|
3134
3747
|
/**
|
3135
3748
|
* PropertyMatchFilter
|
@@ -3223,7 +3836,7 @@ declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFi
|
|
3223
3836
|
declare type NestedApiFilter<T> = {
|
3224
3837
|
[key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
|
3225
3838
|
};
|
3226
|
-
declare type Filter<T> = T extends Record<string, any> ? T extends Date ? PropertyFilter<T> : BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
|
3839
|
+
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>;
|
3227
3840
|
|
3228
3841
|
declare type DateBooster = {
|
3229
3842
|
origin?: string;
|
@@ -3280,7 +3893,7 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
|
|
3280
3893
|
[Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>[]>;
|
3281
3894
|
}>;
|
3282
3895
|
};
|
3283
|
-
declare class SearchPlugin<Schemas extends Record<string,
|
3896
|
+
declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
3284
3897
|
#private;
|
3285
3898
|
private db;
|
3286
3899
|
constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
|
@@ -3338,7 +3951,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
3338
3951
|
#private;
|
3339
3952
|
readonly meta: PaginationQueryMeta;
|
3340
3953
|
readonly records: RecordArray<Result>;
|
3341
|
-
constructor(repository: Repository<Record> | null, table:
|
3954
|
+
constructor(repository: Repository<Record> | null, table: {
|
3955
|
+
name: string;
|
3956
|
+
schema?: Table;
|
3957
|
+
}, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
|
3342
3958
|
getQueryOptions(): QueryOptions<Record>;
|
3343
3959
|
key(): string;
|
3344
3960
|
/**
|
@@ -3391,7 +4007,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
3391
4007
|
* @param filters A filter object
|
3392
4008
|
* @returns A new Query object.
|
3393
4009
|
*/
|
3394
|
-
filter(filters
|
4010
|
+
filter(filters?: Filter<Record>): Query<Record, Result>;
|
4011
|
+
defaultFilter<T>(column: string, value: T): T | {
|
4012
|
+
$includes: (T & string) | (T & string[]);
|
4013
|
+
};
|
3395
4014
|
/**
|
3396
4015
|
* Builds a new query with a new sort option.
|
3397
4016
|
* @param column The column name.
|
@@ -3514,6 +4133,26 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
3514
4133
|
* @returns The first record that matches the query, or null if no record matched the query.
|
3515
4134
|
*/
|
3516
4135
|
getFirst(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'>): Promise<Result | null>;
|
4136
|
+
/**
|
4137
|
+
* Performs the query in the database and returns the first result.
|
4138
|
+
* @returns The first record that matches the query, or null if no record matched the query.
|
4139
|
+
* @throws if there are no results.
|
4140
|
+
*/
|
4141
|
+
getFirstOrThrow(): Promise<Result>;
|
4142
|
+
/**
|
4143
|
+
* Performs the query in the database and returns the first result.
|
4144
|
+
* @param options Additional options to be used when performing the query.
|
4145
|
+
* @returns The first record that matches the query, or null if no record matched the query.
|
4146
|
+
* @throws if there are no results.
|
4147
|
+
*/
|
4148
|
+
getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>>;
|
4149
|
+
/**
|
4150
|
+
* Performs the query in the database and returns the first result.
|
4151
|
+
* @param options Additional options to be used when performing the query.
|
4152
|
+
* @returns The first record that matches the query, or null if no record matched the query.
|
4153
|
+
* @throws if there are no results.
|
4154
|
+
*/
|
4155
|
+
getFirstOrThrow(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'>): Promise<Result>;
|
3517
4156
|
/**
|
3518
4157
|
* Builds a new query object adding a cache TTL in milliseconds.
|
3519
4158
|
* @param ttl The cache TTL in milliseconds.
|
@@ -3670,9 +4309,9 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
|
|
3670
4309
|
/**
|
3671
4310
|
* Common interface for performing operations on a table.
|
3672
4311
|
*/
|
3673
|
-
declare abstract class Repository<
|
3674
|
-
abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<
|
3675
|
-
abstract create(object: Omit<EditableData<
|
4312
|
+
declare abstract class Repository<Record extends XataRecord> extends Query<Record, Readonly<SelectedPick<Record, ['*']>>> {
|
4313
|
+
abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4314
|
+
abstract create(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3676
4315
|
/**
|
3677
4316
|
* Creates a single record in the table with a unique id.
|
3678
4317
|
* @param id The unique id.
|
@@ -3680,27 +4319,27 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3680
4319
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3681
4320
|
* @returns The full persisted record.
|
3682
4321
|
*/
|
3683
|
-
abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<
|
4322
|
+
abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
3684
4323
|
/**
|
3685
4324
|
* Creates a single record in the table with a unique id.
|
3686
4325
|
* @param id The unique id.
|
3687
4326
|
* @param object Object containing the column names with their values to be stored in the table.
|
3688
4327
|
* @returns The full persisted record.
|
3689
4328
|
*/
|
3690
|
-
abstract create(id: string, object: Omit<EditableData<
|
4329
|
+
abstract create(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3691
4330
|
/**
|
3692
4331
|
* Creates multiple records in the table.
|
3693
4332
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
3694
4333
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3695
4334
|
* @returns Array of the persisted records in order.
|
3696
4335
|
*/
|
3697
|
-
abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<
|
4336
|
+
abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
3698
4337
|
/**
|
3699
4338
|
* Creates multiple records in the table.
|
3700
4339
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
3701
4340
|
* @returns Array of the persisted records in order.
|
3702
4341
|
*/
|
3703
|
-
abstract create(objects: Array<Omit<EditableData<
|
4342
|
+
abstract create(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
3704
4343
|
/**
|
3705
4344
|
* Queries a single record from the table given its unique id.
|
3706
4345
|
* @param id The unique id.
|
@@ -3753,47 +4392,154 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3753
4392
|
* @returns The persisted records for the given ids in order (if a record could not be found null is returned).
|
3754
4393
|
*/
|
3755
4394
|
abstract read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4395
|
+
/**
|
4396
|
+
* Queries a single record from the table given its unique id.
|
4397
|
+
* @param id The unique id.
|
4398
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4399
|
+
* @returns The persisted record for the given id.
|
4400
|
+
* @throws If the record could not be found.
|
4401
|
+
*/
|
4402
|
+
abstract readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4403
|
+
/**
|
4404
|
+
* Queries a single record from the table given its unique id.
|
4405
|
+
* @param id The unique id.
|
4406
|
+
* @returns The persisted record for the given id.
|
4407
|
+
* @throws If the record could not be found.
|
4408
|
+
*/
|
4409
|
+
abstract readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4410
|
+
/**
|
4411
|
+
* Queries multiple records from the table given their unique id.
|
4412
|
+
* @param ids The unique ids array.
|
4413
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4414
|
+
* @returns The persisted records for the given ids in order.
|
4415
|
+
* @throws If one or more records could not be found.
|
4416
|
+
*/
|
4417
|
+
abstract readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
4418
|
+
/**
|
4419
|
+
* Queries multiple records from the table given their unique id.
|
4420
|
+
* @param ids The unique ids array.
|
4421
|
+
* @returns The persisted records for the given ids in order.
|
4422
|
+
* @throws If one or more records could not be found.
|
4423
|
+
*/
|
4424
|
+
abstract readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
4425
|
+
/**
|
4426
|
+
* Queries a single record from the table by the id in the object.
|
4427
|
+
* @param object Object containing the id of the record.
|
4428
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4429
|
+
* @returns The persisted record for the given id.
|
4430
|
+
* @throws If the record could not be found.
|
4431
|
+
*/
|
4432
|
+
abstract readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4433
|
+
/**
|
4434
|
+
* Queries a single record from the table by the id in the object.
|
4435
|
+
* @param object Object containing the id of the record.
|
4436
|
+
* @returns The persisted record for the given id.
|
4437
|
+
* @throws If the record could not be found.
|
4438
|
+
*/
|
4439
|
+
abstract readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4440
|
+
/**
|
4441
|
+
* Queries multiple records from the table by the ids in the objects.
|
4442
|
+
* @param objects Array of objects containing the ids of the records.
|
4443
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4444
|
+
* @returns The persisted records for the given ids in order.
|
4445
|
+
* @throws If one or more records could not be found.
|
4446
|
+
*/
|
4447
|
+
abstract readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
4448
|
+
/**
|
4449
|
+
* Queries multiple records from the table by the ids in the objects.
|
4450
|
+
* @param objects Array of objects containing the ids of the records.
|
4451
|
+
* @returns The persisted records for the given ids in order.
|
4452
|
+
* @throws If one or more records could not be found.
|
4453
|
+
*/
|
4454
|
+
abstract readOrThrow(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
4455
|
+
/**
|
4456
|
+
* Partially update a single record.
|
4457
|
+
* @param object An object with its id and the columns to be updated.
|
4458
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4459
|
+
* @returns The full persisted record, null if the record could not be found.
|
4460
|
+
*/
|
4461
|
+
abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4462
|
+
/**
|
4463
|
+
* Partially update a single record.
|
4464
|
+
* @param object An object with its id and the columns to be updated.
|
4465
|
+
* @returns The full persisted record, null if the record could not be found.
|
4466
|
+
*/
|
4467
|
+
abstract update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4468
|
+
/**
|
4469
|
+
* Partially update a single record given its unique id.
|
4470
|
+
* @param id The unique id.
|
4471
|
+
* @param object The column names and their values that have to be updated.
|
4472
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4473
|
+
* @returns The full persisted record, null if the record could not be found.
|
4474
|
+
*/
|
4475
|
+
abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4476
|
+
/**
|
4477
|
+
* Partially update a single record given its unique id.
|
4478
|
+
* @param id The unique id.
|
4479
|
+
* @param object The column names and their values that have to be updated.
|
4480
|
+
* @returns The full persisted record, null if the record could not be found.
|
4481
|
+
*/
|
4482
|
+
abstract update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4483
|
+
/**
|
4484
|
+
* Partially updates multiple records.
|
4485
|
+
* @param objects An array of objects with their ids and columns to be updated.
|
4486
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4487
|
+
* @returns Array of the persisted records in order (if a record could not be found null is returned).
|
4488
|
+
*/
|
4489
|
+
abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4490
|
+
/**
|
4491
|
+
* Partially updates multiple records.
|
4492
|
+
* @param objects An array of objects with their ids and columns to be updated.
|
4493
|
+
* @returns Array of the persisted records in order (if a record could not be found null is returned).
|
4494
|
+
*/
|
4495
|
+
abstract update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
3756
4496
|
/**
|
3757
4497
|
* Partially update a single record.
|
3758
4498
|
* @param object An object with its id and the columns to be updated.
|
3759
4499
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3760
4500
|
* @returns The full persisted record.
|
4501
|
+
* @throws If the record could not be found.
|
3761
4502
|
*/
|
3762
|
-
abstract
|
4503
|
+
abstract updateOrThrow<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
3763
4504
|
/**
|
3764
4505
|
* Partially update a single record.
|
3765
4506
|
* @param object An object with its id and the columns to be updated.
|
3766
4507
|
* @returns The full persisted record.
|
4508
|
+
* @throws If the record could not be found.
|
3767
4509
|
*/
|
3768
|
-
abstract
|
4510
|
+
abstract updateOrThrow(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3769
4511
|
/**
|
3770
4512
|
* Partially update a single record given its unique id.
|
3771
4513
|
* @param id The unique id.
|
3772
4514
|
* @param object The column names and their values that have to be updated.
|
3773
4515
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3774
4516
|
* @returns The full persisted record.
|
4517
|
+
* @throws If the record could not be found.
|
3775
4518
|
*/
|
3776
|
-
abstract
|
4519
|
+
abstract updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
3777
4520
|
/**
|
3778
4521
|
* Partially update a single record given its unique id.
|
3779
4522
|
* @param id The unique id.
|
3780
4523
|
* @param object The column names and their values that have to be updated.
|
3781
4524
|
* @returns The full persisted record.
|
4525
|
+
* @throws If the record could not be found.
|
3782
4526
|
*/
|
3783
|
-
abstract
|
4527
|
+
abstract updateOrThrow(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3784
4528
|
/**
|
3785
4529
|
* Partially updates multiple records.
|
3786
4530
|
* @param objects An array of objects with their ids and columns to be updated.
|
3787
4531
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3788
4532
|
* @returns Array of the persisted records in order.
|
4533
|
+
* @throws If one or more records could not be found.
|
3789
4534
|
*/
|
3790
|
-
abstract
|
4535
|
+
abstract updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
3791
4536
|
/**
|
3792
4537
|
* Partially updates multiple records.
|
3793
4538
|
* @param objects An array of objects with their ids and columns to be updated.
|
3794
4539
|
* @returns Array of the persisted records in order.
|
4540
|
+
* @throws If one or more records could not be found.
|
3795
4541
|
*/
|
3796
|
-
abstract
|
4542
|
+
abstract updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
3797
4543
|
/**
|
3798
4544
|
* Creates or updates a single record. If a record exists with the given id,
|
3799
4545
|
* it will be update, otherwise a new record will be created.
|
@@ -3801,14 +4547,14 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3801
4547
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3802
4548
|
* @returns The full persisted record.
|
3803
4549
|
*/
|
3804
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<
|
4550
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
3805
4551
|
/**
|
3806
4552
|
* Creates or updates a single record. If a record exists with the given id,
|
3807
4553
|
* it will be update, otherwise a new record will be created.
|
3808
4554
|
* @param object Object containing the column names with their values to be persisted in the table.
|
3809
4555
|
* @returns The full persisted record.
|
3810
4556
|
*/
|
3811
|
-
abstract createOrUpdate(object: EditableData<
|
4557
|
+
abstract createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3812
4558
|
/**
|
3813
4559
|
* Creates or updates a single record. If a record exists with the given id,
|
3814
4560
|
* it will be update, otherwise a new record will be created.
|
@@ -3817,7 +4563,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3817
4563
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3818
4564
|
* @returns The full persisted record.
|
3819
4565
|
*/
|
3820
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<
|
4566
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
3821
4567
|
/**
|
3822
4568
|
* Creates or updates a single record. If a record exists with the given id,
|
3823
4569
|
* it will be update, otherwise a new record will be created.
|
@@ -3825,7 +4571,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3825
4571
|
* @param object The column names and the values to be persisted.
|
3826
4572
|
* @returns The full persisted record.
|
3827
4573
|
*/
|
3828
|
-
abstract createOrUpdate(id: string, object: Omit<EditableData<
|
4574
|
+
abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3829
4575
|
/**
|
3830
4576
|
* Creates or updates a single record. If a record exists with the given id,
|
3831
4577
|
* it will be update, otherwise a new record will be created.
|
@@ -3833,38 +4579,126 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3833
4579
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3834
4580
|
* @returns Array of the persisted records.
|
3835
4581
|
*/
|
3836
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<
|
4582
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
3837
4583
|
/**
|
3838
4584
|
* Creates or updates a single record. If a record exists with the given id,
|
3839
4585
|
* it will be update, otherwise a new record will be created.
|
3840
4586
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
3841
4587
|
* @returns Array of the persisted records.
|
3842
4588
|
*/
|
3843
|
-
abstract createOrUpdate(objects: Array<EditableData<
|
4589
|
+
abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
4590
|
+
/**
|
4591
|
+
* Deletes a record given its unique id.
|
4592
|
+
* @param object An object with a unique id.
|
4593
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4594
|
+
* @returns The deleted record, null if the record could not be found.
|
4595
|
+
*/
|
4596
|
+
abstract delete<K extends SelectableColumn<Record>>(object: Identifiable & Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
3844
4597
|
/**
|
3845
4598
|
* Deletes a record given its unique id.
|
4599
|
+
* @param object An object with a unique id.
|
4600
|
+
* @returns The deleted record, null if the record could not be found.
|
4601
|
+
*/
|
4602
|
+
abstract delete(object: Identifiable & Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4603
|
+
/**
|
4604
|
+
* Deletes a record given a unique id.
|
3846
4605
|
* @param id The unique id.
|
3847
|
-
* @
|
4606
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4607
|
+
* @returns The deleted record, null if the record could not be found.
|
3848
4608
|
*/
|
3849
|
-
abstract delete(id: string): Promise<
|
4609
|
+
abstract delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4610
|
+
/**
|
4611
|
+
* Deletes a record given a unique id.
|
4612
|
+
* @param id The unique id.
|
4613
|
+
* @returns The deleted record, null if the record could not be found.
|
4614
|
+
*/
|
4615
|
+
abstract delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4616
|
+
/**
|
4617
|
+
* Deletes multiple records given an array of objects with ids.
|
4618
|
+
* @param objects An array of objects with unique ids.
|
4619
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4620
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
4621
|
+
*/
|
4622
|
+
abstract delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4623
|
+
/**
|
4624
|
+
* Deletes multiple records given an array of objects with ids.
|
4625
|
+
* @param objects An array of objects with unique ids.
|
4626
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
4627
|
+
*/
|
4628
|
+
abstract delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4629
|
+
/**
|
4630
|
+
* Deletes multiple records given an array of unique ids.
|
4631
|
+
* @param objects An array of ids.
|
4632
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4633
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
4634
|
+
*/
|
4635
|
+
abstract delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4636
|
+
/**
|
4637
|
+
* Deletes multiple records given an array of unique ids.
|
4638
|
+
* @param objects An array of ids.
|
4639
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
4640
|
+
*/
|
4641
|
+
abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
3850
4642
|
/**
|
3851
4643
|
* Deletes a record given its unique id.
|
3852
|
-
* @param
|
3853
|
-
* @
|
4644
|
+
* @param object An object with a unique id.
|
4645
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4646
|
+
* @returns The deleted record, null if the record could not be found.
|
4647
|
+
* @throws If the record could not be found.
|
3854
4648
|
*/
|
3855
|
-
abstract
|
4649
|
+
abstract deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
3856
4650
|
/**
|
3857
|
-
* Deletes a record given
|
3858
|
-
* @param
|
3859
|
-
* @
|
4651
|
+
* Deletes a record given its unique id.
|
4652
|
+
* @param object An object with a unique id.
|
4653
|
+
* @returns The deleted record, null if the record could not be found.
|
4654
|
+
* @throws If the record could not be found.
|
3860
4655
|
*/
|
3861
|
-
abstract
|
4656
|
+
abstract deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3862
4657
|
/**
|
3863
|
-
* Deletes a record given a
|
3864
|
-
* @param
|
3865
|
-
* @
|
4658
|
+
* Deletes a record given a unique id.
|
4659
|
+
* @param id The unique id.
|
4660
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4661
|
+
* @returns The deleted record, null if the record could not be found.
|
4662
|
+
* @throws If the record could not be found.
|
3866
4663
|
*/
|
3867
|
-
abstract
|
4664
|
+
abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4665
|
+
/**
|
4666
|
+
* Deletes a record given a unique id.
|
4667
|
+
* @param id The unique id.
|
4668
|
+
* @returns The deleted record, null if the record could not be found.
|
4669
|
+
* @throws If the record could not be found.
|
4670
|
+
*/
|
4671
|
+
abstract deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4672
|
+
/**
|
4673
|
+
* Deletes multiple records given an array of objects with ids.
|
4674
|
+
* @param objects An array of objects with unique ids.
|
4675
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4676
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
4677
|
+
* @throws If one or more records could not be found.
|
4678
|
+
*/
|
4679
|
+
abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
4680
|
+
/**
|
4681
|
+
* Deletes multiple records given an array of objects with ids.
|
4682
|
+
* @param objects An array of objects with unique ids.
|
4683
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
4684
|
+
* @throws If one or more records could not be found.
|
4685
|
+
*/
|
4686
|
+
abstract deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
4687
|
+
/**
|
4688
|
+
* Deletes multiple records given an array of unique ids.
|
4689
|
+
* @param objects An array of ids.
|
4690
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4691
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
4692
|
+
* @throws If one or more records could not be found.
|
4693
|
+
*/
|
4694
|
+
abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
4695
|
+
/**
|
4696
|
+
* Deletes multiple records given an array of unique ids.
|
4697
|
+
* @param objects An array of ids.
|
4698
|
+
* @returns Array of the deleted records in order.
|
4699
|
+
* @throws If one or more records could not be found.
|
4700
|
+
*/
|
4701
|
+
abstract deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
3868
4702
|
/**
|
3869
4703
|
* Search for records in the table.
|
3870
4704
|
* @param query The query to search for.
|
@@ -3880,7 +4714,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3880
4714
|
}): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
|
3881
4715
|
abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
|
3882
4716
|
}
|
3883
|
-
declare class RestRepository<
|
4717
|
+
declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
|
3884
4718
|
#private;
|
3885
4719
|
constructor(options: {
|
3886
4720
|
table: string;
|
@@ -3888,33 +4722,62 @@ declare class RestRepository<Data extends BaseData, Record extends XataRecord =
|
|
3888
4722
|
pluginOptions: XataPluginOptions;
|
3889
4723
|
schemaTables?: Table[];
|
3890
4724
|
});
|
3891
|
-
create(object: EditableData<
|
3892
|
-
create(
|
3893
|
-
create(
|
3894
|
-
create
|
3895
|
-
create<K extends SelectableColumn<Record>>(
|
3896
|
-
create
|
3897
|
-
read(
|
3898
|
-
read(
|
3899
|
-
read(
|
3900
|
-
read(
|
3901
|
-
read<K extends SelectableColumn<Record>>(
|
3902
|
-
read
|
3903
|
-
read<K extends SelectableColumn<Record>>(
|
3904
|
-
read
|
3905
|
-
|
3906
|
-
|
3907
|
-
|
3908
|
-
|
3909
|
-
|
3910
|
-
|
3911
|
-
|
3912
|
-
|
3913
|
-
|
3914
|
-
|
3915
|
-
|
3916
|
-
|
3917
|
-
|
4725
|
+
create<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4726
|
+
create(object: EditableData<Record> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4727
|
+
create<K extends SelectableColumn<Record>>(id: string, object: EditableData<Record>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4728
|
+
create(id: string, object: EditableData<Record>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4729
|
+
create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
4730
|
+
create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
4731
|
+
read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
4732
|
+
read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
4733
|
+
read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4734
|
+
read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4735
|
+
read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
4736
|
+
read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
4737
|
+
read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4738
|
+
read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4739
|
+
readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4740
|
+
readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4741
|
+
readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
4742
|
+
readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
4743
|
+
readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4744
|
+
readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4745
|
+
readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
4746
|
+
readOrThrow(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
4747
|
+
update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4748
|
+
update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4749
|
+
update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4750
|
+
update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4751
|
+
update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4752
|
+
update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4753
|
+
updateOrThrow<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4754
|
+
updateOrThrow(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4755
|
+
updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4756
|
+
updateOrThrow(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4757
|
+
updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
4758
|
+
updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
4759
|
+
createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4760
|
+
createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4761
|
+
createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4762
|
+
createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4763
|
+
createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
4764
|
+
createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
4765
|
+
delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4766
|
+
delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4767
|
+
delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4768
|
+
delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4769
|
+
delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4770
|
+
delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4771
|
+
delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4772
|
+
delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4773
|
+
deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4774
|
+
deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4775
|
+
deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4776
|
+
deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4777
|
+
deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
4778
|
+
deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
4779
|
+
deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
4780
|
+
deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
3918
4781
|
search(query: string, options?: {
|
3919
4782
|
fuzziness?: FuzzinessExpression;
|
3920
4783
|
prefix?: PrefixExpression;
|
@@ -3930,6 +4793,7 @@ declare type BaseSchema = {
|
|
3930
4793
|
columns: readonly ({
|
3931
4794
|
name: string;
|
3932
4795
|
type: Column['type'];
|
4796
|
+
notNull?: boolean;
|
3933
4797
|
} | {
|
3934
4798
|
name: string;
|
3935
4799
|
type: 'link';
|
@@ -3959,10 +4823,10 @@ declare type TableType<Tables, TableName> = Tables & {
|
|
3959
4823
|
} ? Columns extends readonly unknown[] ? Columns[number] extends {
|
3960
4824
|
name: string;
|
3961
4825
|
type: string;
|
3962
|
-
} ? Identifiable & {
|
3963
|
-
[K in Columns[number]['name']]
|
3964
|
-
} : never : never : never : never;
|
3965
|
-
declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
|
4826
|
+
} ? Identifiable & UnionToIntersection<Values<{
|
4827
|
+
[K in Columns[number]['name']]: PropertyType<Tables, Columns[number], K>;
|
4828
|
+
}>> : never : never : never : never;
|
4829
|
+
declare type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Properties & {
|
3966
4830
|
name: PropertyName;
|
3967
4831
|
} extends infer Property ? Property extends {
|
3968
4832
|
name: string;
|
@@ -3971,12 +4835,18 @@ declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
|
|
3971
4835
|
table: infer LinkedTable;
|
3972
4836
|
};
|
3973
4837
|
columns?: infer ObjectColumns;
|
3974
|
-
|
4838
|
+
notNull?: infer NotNull;
|
4839
|
+
} ? NotNull extends true ? {
|
4840
|
+
[K in PropertyName]: InnerType<Type, ObjectColumns, Tables, LinkedTable>;
|
4841
|
+
} : {
|
4842
|
+
[K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
|
4843
|
+
} : never : never;
|
4844
|
+
declare type InnerType<Type, ObjectColumns, Tables, LinkedTable> = Type extends 'string' | 'text' | 'email' ? string : Type extends 'int' | 'float' ? number : Type extends 'bool' ? boolean : Type extends 'datetime' ? Date : Type extends 'multiple' ? string[] : Type extends 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
|
3975
4845
|
name: string;
|
3976
4846
|
type: string;
|
3977
|
-
} ? {
|
3978
|
-
[K in ObjectColumns[number]['name']]
|
3979
|
-
} : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never
|
4847
|
+
} ? UnionToIntersection<Values<{
|
4848
|
+
[K in ObjectColumns[number]['name']]: PropertyType<Tables, ObjectColumns[number], K>;
|
4849
|
+
}>> : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never;
|
3980
4850
|
|
3981
4851
|
/**
|
3982
4852
|
* Operator to restrict results to only values that are greater than the given value.
|
@@ -4082,12 +4952,10 @@ declare const includesAny: <T>(value: T) => ArrayFilter<T>;
|
|
4082
4952
|
declare type SchemaDefinition = {
|
4083
4953
|
table: string;
|
4084
4954
|
};
|
4085
|
-
declare type SchemaPluginResult<Schemas extends Record<string,
|
4955
|
+
declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
|
4086
4956
|
[Key in keyof Schemas]: Repository<Schemas[Key]>;
|
4087
|
-
} & {
|
4088
|
-
[key: string]: Repository<XataRecord$1>;
|
4089
4957
|
};
|
4090
|
-
declare class SchemaPlugin<Schemas extends Record<string,
|
4958
|
+
declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
4091
4959
|
#private;
|
4092
4960
|
constructor(schemaTables?: Schemas.Table[]);
|
4093
4961
|
build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
|
@@ -4108,9 +4976,9 @@ declare type BaseClientOptions = {
|
|
4108
4976
|
};
|
4109
4977
|
declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
|
4110
4978
|
interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
4111
|
-
new <
|
4112
|
-
db: Awaited<ReturnType<SchemaPlugin<
|
4113
|
-
search: Awaited<ReturnType<SearchPlugin<
|
4979
|
+
new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
|
4980
|
+
db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
|
4981
|
+
search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
|
4114
4982
|
}, keyof Plugins> & {
|
4115
4983
|
[Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
|
4116
4984
|
} & {
|
@@ -4121,7 +4989,7 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
|
4121
4989
|
};
|
4122
4990
|
}
|
4123
4991
|
declare const BaseClient_base: ClientConstructor<{}>;
|
4124
|
-
declare class BaseClient extends BaseClient_base<
|
4992
|
+
declare class BaseClient extends BaseClient_base<Record<string, any>> {
|
4125
4993
|
}
|
4126
4994
|
|
4127
4995
|
declare class Serializer {
|
@@ -4229,4 +5097,4 @@ declare class XataError extends Error {
|
|
4229
5097
|
constructor(message: string, status: number);
|
4230
5098
|
}
|
4231
5099
|
|
4232
|
-
export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, 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, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, 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, 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, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, 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, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, contains, createBranch, createDatabase, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|
5100
|
+
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, 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, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaResponse, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, 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, pattern, previewBranchSchemaEdit, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|