@xata.io/client 0.16.1 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/README.md +27 -25
- package/Usage.md +27 -6
- package/dist/index.cjs +546 -229
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +726 -103
- package/dist/index.mjs +526 -230
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
declare type AttributeDictionary = Record<string, string | number | boolean | undefined>;
|
2
|
+
declare type TraceFunction = <T>(name: string, fn: (options: {
|
3
|
+
setAttributes: (attrs: AttributeDictionary) => void;
|
4
|
+
}) => T, options?: AttributeDictionary) => Promise<T>;
|
5
|
+
|
1
6
|
declare type FetchImpl = (url: string, init?: {
|
2
7
|
body?: string;
|
3
8
|
headers?: Record<string, string>;
|
@@ -5,17 +10,19 @@ declare type FetchImpl = (url: string, init?: {
|
|
5
10
|
}) => Promise<{
|
6
11
|
ok: boolean;
|
7
12
|
status: number;
|
13
|
+
url: string;
|
8
14
|
json(): Promise<any>;
|
9
15
|
headers?: {
|
10
16
|
get(name: string): string | null;
|
11
17
|
};
|
12
18
|
}>;
|
13
|
-
declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Record<string, string
|
19
|
+
declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
|
14
20
|
declare type FetcherExtraProps = {
|
15
21
|
apiUrl: string;
|
16
22
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
17
23
|
fetchImpl: FetchImpl;
|
18
24
|
apiKey: string;
|
25
|
+
trace: TraceFunction;
|
19
26
|
};
|
20
27
|
declare type ErrorWrapper<TError> = TError | {
|
21
28
|
status: 'unknown';
|
@@ -52,6 +59,7 @@ declare abstract class XataPlugin {
|
|
52
59
|
declare type XataPluginOptions = {
|
53
60
|
getFetchProps: () => Promise<FetcherExtraProps>;
|
54
61
|
cache: CacheImpl;
|
62
|
+
trace?: TraceFunction;
|
55
63
|
};
|
56
64
|
|
57
65
|
/**
|
@@ -185,12 +193,28 @@ declare type Schema = {
|
|
185
193
|
tables: Table[];
|
186
194
|
tablesOrder?: string[];
|
187
195
|
};
|
196
|
+
/**
|
197
|
+
* @x-internal true
|
198
|
+
*/
|
199
|
+
declare type SchemaEditScript = {
|
200
|
+
sourceMigrationID?: string;
|
201
|
+
targetMigrationID?: string;
|
202
|
+
tables: TableEdit[];
|
203
|
+
};
|
188
204
|
declare type Table = {
|
189
205
|
id?: string;
|
190
206
|
name: TableName;
|
191
207
|
columns: Column[];
|
192
208
|
revLinks?: RevLink[];
|
193
209
|
};
|
210
|
+
/**
|
211
|
+
* @x-internal true
|
212
|
+
*/
|
213
|
+
declare type TableEdit = {
|
214
|
+
oldName?: string;
|
215
|
+
newName?: string;
|
216
|
+
columns?: MigrationColumnOp[];
|
217
|
+
};
|
194
218
|
/**
|
195
219
|
* @x-go-type xata.Column
|
196
220
|
*/
|
@@ -266,6 +290,110 @@ declare type ColumnMigration = {
|
|
266
290
|
old: Column;
|
267
291
|
['new']: Column;
|
268
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
|
+
};
|
269
397
|
declare type SortExpression = string[] | {
|
270
398
|
[key: string]: SortOrder;
|
271
399
|
} | {
|
@@ -466,7 +594,9 @@ type schemas_BranchMetadata = BranchMetadata;
|
|
466
594
|
type schemas_DBBranch = DBBranch;
|
467
595
|
type schemas_StartedFromMetadata = StartedFromMetadata;
|
468
596
|
type schemas_Schema = Schema;
|
597
|
+
type schemas_SchemaEditScript = SchemaEditScript;
|
469
598
|
type schemas_Table = Table;
|
599
|
+
type schemas_TableEdit = TableEdit;
|
470
600
|
type schemas_Column = Column;
|
471
601
|
type schemas_RevLink = RevLink;
|
472
602
|
type schemas_BranchName = BranchName;
|
@@ -479,6 +609,18 @@ type schemas_MetricsLatency = MetricsLatency;
|
|
479
609
|
type schemas_BranchMigration = BranchMigration;
|
480
610
|
type schemas_TableMigration = TableMigration;
|
481
611
|
type schemas_ColumnMigration = ColumnMigration;
|
612
|
+
type schemas_Commit = Commit;
|
613
|
+
type schemas_Migration = Migration;
|
614
|
+
type schemas_MigrationOp = MigrationOp;
|
615
|
+
type schemas_MigrationTableOp = MigrationTableOp;
|
616
|
+
type schemas_MigrationColumnOp = MigrationColumnOp;
|
617
|
+
type schemas_TableOpAdd = TableOpAdd;
|
618
|
+
type schemas_TableOpRemove = TableOpRemove;
|
619
|
+
type schemas_TableOpRename = TableOpRename;
|
620
|
+
type schemas_ColumnOpAdd = ColumnOpAdd;
|
621
|
+
type schemas_ColumnOpRemove = ColumnOpRemove;
|
622
|
+
type schemas_ColumnOpRename = ColumnOpRename;
|
623
|
+
type schemas_MigrationRequest = MigrationRequest;
|
482
624
|
type schemas_SortExpression = SortExpression;
|
483
625
|
type schemas_SortOrder = SortOrder;
|
484
626
|
type schemas_FuzzinessExpression = FuzzinessExpression;
|
@@ -525,7 +667,9 @@ declare namespace schemas {
|
|
525
667
|
schemas_DBBranch as DBBranch,
|
526
668
|
schemas_StartedFromMetadata as StartedFromMetadata,
|
527
669
|
schemas_Schema as Schema,
|
670
|
+
schemas_SchemaEditScript as SchemaEditScript,
|
528
671
|
schemas_Table as Table,
|
672
|
+
schemas_TableEdit as TableEdit,
|
529
673
|
schemas_Column as Column,
|
530
674
|
schemas_RevLink as RevLink,
|
531
675
|
schemas_BranchName as BranchName,
|
@@ -538,6 +682,18 @@ declare namespace schemas {
|
|
538
682
|
schemas_BranchMigration as BranchMigration,
|
539
683
|
schemas_TableMigration as TableMigration,
|
540
684
|
schemas_ColumnMigration as ColumnMigration,
|
685
|
+
schemas_Commit as Commit,
|
686
|
+
schemas_Migration as Migration,
|
687
|
+
schemas_MigrationOp as MigrationOp,
|
688
|
+
schemas_MigrationTableOp as MigrationTableOp,
|
689
|
+
schemas_MigrationColumnOp as MigrationColumnOp,
|
690
|
+
schemas_TableOpAdd as TableOpAdd,
|
691
|
+
schemas_TableOpRemove as TableOpRemove,
|
692
|
+
schemas_TableOpRename as TableOpRename,
|
693
|
+
schemas_ColumnOpAdd as ColumnOpAdd,
|
694
|
+
schemas_ColumnOpRemove as ColumnOpRemove,
|
695
|
+
schemas_ColumnOpRename as ColumnOpRename,
|
696
|
+
schemas_MigrationRequest as MigrationRequest,
|
541
697
|
schemas_SortExpression as SortExpression,
|
542
698
|
schemas_SortOrder as SortOrder,
|
543
699
|
schemas_FuzzinessExpression as FuzzinessExpression,
|
@@ -603,6 +759,11 @@ declare type BranchMigrationPlan = {
|
|
603
759
|
migration: BranchMigration;
|
604
760
|
};
|
605
761
|
declare type RecordResponse = XataRecord$1;
|
762
|
+
declare type SchemaCompareResponse = {
|
763
|
+
source: Schema;
|
764
|
+
target: Schema;
|
765
|
+
edits: SchemaEditScript;
|
766
|
+
};
|
606
767
|
declare type RecordUpdateResponse = XataRecord$1 | {
|
607
768
|
id: string;
|
608
769
|
xata: {
|
@@ -630,6 +791,7 @@ type responses_BulkError = BulkError;
|
|
630
791
|
type responses_BulkInsertResponse = BulkInsertResponse;
|
631
792
|
type responses_BranchMigrationPlan = BranchMigrationPlan;
|
632
793
|
type responses_RecordResponse = RecordResponse;
|
794
|
+
type responses_SchemaCompareResponse = SchemaCompareResponse;
|
633
795
|
type responses_RecordUpdateResponse = RecordUpdateResponse;
|
634
796
|
type responses_QueryResponse = QueryResponse;
|
635
797
|
type responses_SearchResponse = SearchResponse;
|
@@ -643,6 +805,7 @@ declare namespace responses {
|
|
643
805
|
responses_BulkInsertResponse as BulkInsertResponse,
|
644
806
|
responses_BranchMigrationPlan as BranchMigrationPlan,
|
645
807
|
responses_RecordResponse as RecordResponse,
|
808
|
+
responses_SchemaCompareResponse as SchemaCompareResponse,
|
646
809
|
responses_RecordUpdateResponse as RecordUpdateResponse,
|
647
810
|
responses_QueryResponse as QueryResponse,
|
648
811
|
responses_SearchResponse as SearchResponse,
|
@@ -1323,6 +1486,201 @@ declare type ResolveBranchVariables = {
|
|
1323
1486
|
* ```
|
1324
1487
|
*/
|
1325
1488
|
declare const resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
|
1489
|
+
declare type ListMigrationRequestsPathParams = {
|
1490
|
+
dbName: DBName;
|
1491
|
+
workspace: string;
|
1492
|
+
};
|
1493
|
+
declare type ListMigrationRequestsError = ErrorWrapper<{
|
1494
|
+
status: 400;
|
1495
|
+
payload: BadRequestError;
|
1496
|
+
} | {
|
1497
|
+
status: 401;
|
1498
|
+
payload: AuthError;
|
1499
|
+
} | {
|
1500
|
+
status: 404;
|
1501
|
+
payload: SimpleError;
|
1502
|
+
}>;
|
1503
|
+
declare type ListMigrationRequestsResponse = {
|
1504
|
+
migrationRequests: MigrationRequest[];
|
1505
|
+
meta: RecordsMetadata;
|
1506
|
+
};
|
1507
|
+
declare type ListMigrationRequestsRequestBody = {
|
1508
|
+
filter?: FilterExpression;
|
1509
|
+
sort?: SortExpression;
|
1510
|
+
page?: PageConfig;
|
1511
|
+
columns?: ColumnsProjection;
|
1512
|
+
};
|
1513
|
+
declare type ListMigrationRequestsVariables = {
|
1514
|
+
body?: ListMigrationRequestsRequestBody;
|
1515
|
+
pathParams: ListMigrationRequestsPathParams;
|
1516
|
+
} & FetcherExtraProps;
|
1517
|
+
declare const listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
|
1518
|
+
declare type CreateMigrationRequestPathParams = {
|
1519
|
+
dbName: DBName;
|
1520
|
+
workspace: string;
|
1521
|
+
};
|
1522
|
+
declare type CreateMigrationRequestError = ErrorWrapper<{
|
1523
|
+
status: 400;
|
1524
|
+
payload: BadRequestError;
|
1525
|
+
} | {
|
1526
|
+
status: 401;
|
1527
|
+
payload: AuthError;
|
1528
|
+
} | {
|
1529
|
+
status: 404;
|
1530
|
+
payload: SimpleError;
|
1531
|
+
}>;
|
1532
|
+
declare type CreateMigrationRequestResponse = {
|
1533
|
+
number: number;
|
1534
|
+
};
|
1535
|
+
declare type CreateMigrationRequestRequestBody = {
|
1536
|
+
source: string;
|
1537
|
+
target: string;
|
1538
|
+
title: string;
|
1539
|
+
body?: string;
|
1540
|
+
};
|
1541
|
+
declare type CreateMigrationRequestVariables = {
|
1542
|
+
body: CreateMigrationRequestRequestBody;
|
1543
|
+
pathParams: CreateMigrationRequestPathParams;
|
1544
|
+
} & FetcherExtraProps;
|
1545
|
+
declare const createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
|
1546
|
+
declare type GetMigrationRequestPathParams = {
|
1547
|
+
dbName: DBName;
|
1548
|
+
mrNumber: number;
|
1549
|
+
workspace: string;
|
1550
|
+
};
|
1551
|
+
declare type GetMigrationRequestError = ErrorWrapper<{
|
1552
|
+
status: 400;
|
1553
|
+
payload: BadRequestError;
|
1554
|
+
} | {
|
1555
|
+
status: 401;
|
1556
|
+
payload: AuthError;
|
1557
|
+
} | {
|
1558
|
+
status: 404;
|
1559
|
+
payload: SimpleError;
|
1560
|
+
}>;
|
1561
|
+
declare type GetMigrationRequestVariables = {
|
1562
|
+
pathParams: GetMigrationRequestPathParams;
|
1563
|
+
} & FetcherExtraProps;
|
1564
|
+
declare const getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
|
1565
|
+
declare type UpdateMigrationRequestPathParams = {
|
1566
|
+
dbName: DBName;
|
1567
|
+
mrNumber: number;
|
1568
|
+
workspace: string;
|
1569
|
+
};
|
1570
|
+
declare type UpdateMigrationRequestError = ErrorWrapper<{
|
1571
|
+
status: 400;
|
1572
|
+
payload: BadRequestError;
|
1573
|
+
} | {
|
1574
|
+
status: 401;
|
1575
|
+
payload: AuthError;
|
1576
|
+
} | {
|
1577
|
+
status: 404;
|
1578
|
+
payload: SimpleError;
|
1579
|
+
}>;
|
1580
|
+
declare type UpdateMigrationRequestRequestBody = {
|
1581
|
+
title?: string;
|
1582
|
+
body?: string;
|
1583
|
+
status?: 'open' | 'closed';
|
1584
|
+
};
|
1585
|
+
declare type UpdateMigrationRequestVariables = {
|
1586
|
+
body?: UpdateMigrationRequestRequestBody;
|
1587
|
+
pathParams: UpdateMigrationRequestPathParams;
|
1588
|
+
} & FetcherExtraProps;
|
1589
|
+
declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
|
1590
|
+
declare type ListMigrationRequestsCommitsPathParams = {
|
1591
|
+
dbName: DBName;
|
1592
|
+
mrNumber: number;
|
1593
|
+
workspace: string;
|
1594
|
+
};
|
1595
|
+
declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
|
1596
|
+
status: 400;
|
1597
|
+
payload: BadRequestError;
|
1598
|
+
} | {
|
1599
|
+
status: 401;
|
1600
|
+
payload: AuthError;
|
1601
|
+
} | {
|
1602
|
+
status: 404;
|
1603
|
+
payload: SimpleError;
|
1604
|
+
}>;
|
1605
|
+
declare type ListMigrationRequestsCommitsResponse = {
|
1606
|
+
meta: {
|
1607
|
+
cursor: string;
|
1608
|
+
more: boolean;
|
1609
|
+
};
|
1610
|
+
logs: Commit[];
|
1611
|
+
};
|
1612
|
+
declare type ListMigrationRequestsCommitsRequestBody = {
|
1613
|
+
page?: {
|
1614
|
+
after?: string;
|
1615
|
+
before?: string;
|
1616
|
+
size?: number;
|
1617
|
+
};
|
1618
|
+
};
|
1619
|
+
declare type ListMigrationRequestsCommitsVariables = {
|
1620
|
+
body?: ListMigrationRequestsCommitsRequestBody;
|
1621
|
+
pathParams: ListMigrationRequestsCommitsPathParams;
|
1622
|
+
} & FetcherExtraProps;
|
1623
|
+
declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
|
1624
|
+
declare type CompareMigrationRequestPathParams = {
|
1625
|
+
dbName: DBName;
|
1626
|
+
mrNumber: number;
|
1627
|
+
workspace: string;
|
1628
|
+
};
|
1629
|
+
declare type CompareMigrationRequestError = ErrorWrapper<{
|
1630
|
+
status: 400;
|
1631
|
+
payload: BadRequestError;
|
1632
|
+
} | {
|
1633
|
+
status: 401;
|
1634
|
+
payload: AuthError;
|
1635
|
+
} | {
|
1636
|
+
status: 404;
|
1637
|
+
payload: SimpleError;
|
1638
|
+
}>;
|
1639
|
+
declare type CompareMigrationRequestVariables = {
|
1640
|
+
pathParams: CompareMigrationRequestPathParams;
|
1641
|
+
} & FetcherExtraProps;
|
1642
|
+
declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
|
1643
|
+
declare type GetMigrationRequestIsMergedPathParams = {
|
1644
|
+
dbName: DBName;
|
1645
|
+
mrNumber: number;
|
1646
|
+
workspace: string;
|
1647
|
+
};
|
1648
|
+
declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
|
1649
|
+
status: 400;
|
1650
|
+
payload: BadRequestError;
|
1651
|
+
} | {
|
1652
|
+
status: 401;
|
1653
|
+
payload: AuthError;
|
1654
|
+
} | {
|
1655
|
+
status: 404;
|
1656
|
+
payload: SimpleError;
|
1657
|
+
}>;
|
1658
|
+
declare type GetMigrationRequestIsMergedResponse = {
|
1659
|
+
merged?: boolean;
|
1660
|
+
};
|
1661
|
+
declare type GetMigrationRequestIsMergedVariables = {
|
1662
|
+
pathParams: GetMigrationRequestIsMergedPathParams;
|
1663
|
+
} & FetcherExtraProps;
|
1664
|
+
declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
|
1665
|
+
declare type MergeMigrationRequestPathParams = {
|
1666
|
+
dbName: DBName;
|
1667
|
+
mrNumber: number;
|
1668
|
+
workspace: string;
|
1669
|
+
};
|
1670
|
+
declare type MergeMigrationRequestError = ErrorWrapper<{
|
1671
|
+
status: 400;
|
1672
|
+
payload: BadRequestError;
|
1673
|
+
} | {
|
1674
|
+
status: 401;
|
1675
|
+
payload: AuthError;
|
1676
|
+
} | {
|
1677
|
+
status: 404;
|
1678
|
+
payload: SimpleError;
|
1679
|
+
}>;
|
1680
|
+
declare type MergeMigrationRequestVariables = {
|
1681
|
+
pathParams: MergeMigrationRequestPathParams;
|
1682
|
+
} & FetcherExtraProps;
|
1683
|
+
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
|
1326
1684
|
declare type GetBranchDetailsPathParams = {
|
1327
1685
|
dbBranchName: DBBranchName;
|
1328
1686
|
workspace: string;
|
@@ -1508,6 +1866,157 @@ declare type GetBranchMigrationPlanVariables = {
|
|
1508
1866
|
* Compute a migration plan from a target schema the branch should be migrated too.
|
1509
1867
|
*/
|
1510
1868
|
declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
|
1869
|
+
declare type CompareBranchWithUserSchemaPathParams = {
|
1870
|
+
dbBranchName: DBBranchName;
|
1871
|
+
workspace: string;
|
1872
|
+
};
|
1873
|
+
declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
|
1874
|
+
status: 400;
|
1875
|
+
payload: BadRequestError;
|
1876
|
+
} | {
|
1877
|
+
status: 401;
|
1878
|
+
payload: AuthError;
|
1879
|
+
} | {
|
1880
|
+
status: 404;
|
1881
|
+
payload: SimpleError;
|
1882
|
+
}>;
|
1883
|
+
declare type CompareBranchWithUserSchemaRequestBody = {
|
1884
|
+
schema: Schema;
|
1885
|
+
};
|
1886
|
+
declare type CompareBranchWithUserSchemaVariables = {
|
1887
|
+
body: CompareBranchWithUserSchemaRequestBody;
|
1888
|
+
pathParams: CompareBranchWithUserSchemaPathParams;
|
1889
|
+
} & FetcherExtraProps;
|
1890
|
+
declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
|
1891
|
+
declare type CompareBranchSchemasPathParams = {
|
1892
|
+
dbBranchName: DBBranchName;
|
1893
|
+
branchName: BranchName;
|
1894
|
+
workspace: string;
|
1895
|
+
};
|
1896
|
+
declare type CompareBranchSchemasError = ErrorWrapper<{
|
1897
|
+
status: 400;
|
1898
|
+
payload: BadRequestError;
|
1899
|
+
} | {
|
1900
|
+
status: 401;
|
1901
|
+
payload: AuthError;
|
1902
|
+
} | {
|
1903
|
+
status: 404;
|
1904
|
+
payload: SimpleError;
|
1905
|
+
}>;
|
1906
|
+
declare type CompareBranchSchemasVariables = {
|
1907
|
+
body?: Record<string, any>;
|
1908
|
+
pathParams: CompareBranchSchemasPathParams;
|
1909
|
+
} & FetcherExtraProps;
|
1910
|
+
declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
|
1911
|
+
declare type UpdateBranchSchemaPathParams = {
|
1912
|
+
dbBranchName: DBBranchName;
|
1913
|
+
workspace: string;
|
1914
|
+
};
|
1915
|
+
declare type UpdateBranchSchemaError = ErrorWrapper<{
|
1916
|
+
status: 400;
|
1917
|
+
payload: BadRequestError;
|
1918
|
+
} | {
|
1919
|
+
status: 401;
|
1920
|
+
payload: AuthError;
|
1921
|
+
} | {
|
1922
|
+
status: 404;
|
1923
|
+
payload: SimpleError;
|
1924
|
+
}>;
|
1925
|
+
declare type UpdateBranchSchemaResponse = {
|
1926
|
+
id: string;
|
1927
|
+
parentID: string;
|
1928
|
+
};
|
1929
|
+
declare type UpdateBranchSchemaVariables = {
|
1930
|
+
body: Migration;
|
1931
|
+
pathParams: UpdateBranchSchemaPathParams;
|
1932
|
+
} & FetcherExtraProps;
|
1933
|
+
declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
|
1934
|
+
declare type PreviewBranchSchemaEditPathParams = {
|
1935
|
+
dbBranchName: DBBranchName;
|
1936
|
+
workspace: string;
|
1937
|
+
};
|
1938
|
+
declare type PreviewBranchSchemaEditError = ErrorWrapper<{
|
1939
|
+
status: 400;
|
1940
|
+
payload: BadRequestError;
|
1941
|
+
} | {
|
1942
|
+
status: 401;
|
1943
|
+
payload: AuthError;
|
1944
|
+
} | {
|
1945
|
+
status: 404;
|
1946
|
+
payload: SimpleError;
|
1947
|
+
}>;
|
1948
|
+
declare type PreviewBranchSchemaEditResponse = {
|
1949
|
+
original: Schema;
|
1950
|
+
updated: Schema;
|
1951
|
+
};
|
1952
|
+
declare type PreviewBranchSchemaEditRequestBody = {
|
1953
|
+
edits?: SchemaEditScript;
|
1954
|
+
operations?: MigrationOp[];
|
1955
|
+
};
|
1956
|
+
declare type PreviewBranchSchemaEditVariables = {
|
1957
|
+
body?: PreviewBranchSchemaEditRequestBody;
|
1958
|
+
pathParams: PreviewBranchSchemaEditPathParams;
|
1959
|
+
} & FetcherExtraProps;
|
1960
|
+
declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
|
1961
|
+
declare type ApplyBranchSchemaEditPathParams = {
|
1962
|
+
dbBranchName: DBBranchName;
|
1963
|
+
workspace: string;
|
1964
|
+
};
|
1965
|
+
declare type ApplyBranchSchemaEditError = ErrorWrapper<{
|
1966
|
+
status: 400;
|
1967
|
+
payload: BadRequestError;
|
1968
|
+
} | {
|
1969
|
+
status: 401;
|
1970
|
+
payload: AuthError;
|
1971
|
+
} | {
|
1972
|
+
status: 404;
|
1973
|
+
payload: SimpleError;
|
1974
|
+
}>;
|
1975
|
+
declare type ApplyBranchSchemaEditResponse = {
|
1976
|
+
id: string;
|
1977
|
+
parentID: string;
|
1978
|
+
};
|
1979
|
+
declare type ApplyBranchSchemaEditRequestBody = {
|
1980
|
+
edits: SchemaEditScript;
|
1981
|
+
};
|
1982
|
+
declare type ApplyBranchSchemaEditVariables = {
|
1983
|
+
body: ApplyBranchSchemaEditRequestBody;
|
1984
|
+
pathParams: ApplyBranchSchemaEditPathParams;
|
1985
|
+
} & FetcherExtraProps;
|
1986
|
+
declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
|
1987
|
+
declare type GetBranchSchemaHistoryPathParams = {
|
1988
|
+
dbBranchName: DBBranchName;
|
1989
|
+
workspace: string;
|
1990
|
+
};
|
1991
|
+
declare type GetBranchSchemaHistoryError = ErrorWrapper<{
|
1992
|
+
status: 400;
|
1993
|
+
payload: BadRequestError;
|
1994
|
+
} | {
|
1995
|
+
status: 401;
|
1996
|
+
payload: AuthError;
|
1997
|
+
} | {
|
1998
|
+
status: 404;
|
1999
|
+
payload: SimpleError;
|
2000
|
+
}>;
|
2001
|
+
declare type GetBranchSchemaHistoryResponse = {
|
2002
|
+
meta: {
|
2003
|
+
cursor: string;
|
2004
|
+
more: boolean;
|
2005
|
+
};
|
2006
|
+
logs: Commit[];
|
2007
|
+
};
|
2008
|
+
declare type GetBranchSchemaHistoryRequestBody = {
|
2009
|
+
page?: {
|
2010
|
+
after?: string;
|
2011
|
+
before?: string;
|
2012
|
+
size?: number;
|
2013
|
+
};
|
2014
|
+
};
|
2015
|
+
declare type GetBranchSchemaHistoryVariables = {
|
2016
|
+
body?: GetBranchSchemaHistoryRequestBody;
|
2017
|
+
pathParams: GetBranchSchemaHistoryPathParams;
|
2018
|
+
} & FetcherExtraProps;
|
2019
|
+
declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
|
1511
2020
|
declare type GetBranchStatsPathParams = {
|
1512
2021
|
dbBranchName: DBBranchName;
|
1513
2022
|
workspace: string;
|
@@ -2853,10 +3362,28 @@ declare const operationsByTag: {
|
|
2853
3362
|
deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
|
2854
3363
|
updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
|
2855
3364
|
getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
|
3365
|
+
getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
|
3366
|
+
};
|
3367
|
+
migrationRequests: {
|
3368
|
+
listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
|
3369
|
+
createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
|
3370
|
+
getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
|
3371
|
+
updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
|
3372
|
+
listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
|
3373
|
+
compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
|
3374
|
+
getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
|
3375
|
+
mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
|
3376
|
+
};
|
3377
|
+
branchSchema: {
|
2856
3378
|
getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
|
2857
3379
|
executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
|
2858
3380
|
getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
|
2859
|
-
|
3381
|
+
compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
|
3382
|
+
compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
|
3383
|
+
updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
|
3384
|
+
previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
|
3385
|
+
applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
|
3386
|
+
getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
|
2860
3387
|
};
|
2861
3388
|
table: {
|
2862
3389
|
createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
|
@@ -2895,10 +3422,8 @@ interface XataApiClientOptions {
|
|
2895
3422
|
fetch?: FetchImpl;
|
2896
3423
|
apiKey?: string;
|
2897
3424
|
host?: HostProvider;
|
3425
|
+
trace?: TraceFunction;
|
2898
3426
|
}
|
2899
|
-
/**
|
2900
|
-
* @deprecated Use XataApiPlugin instead
|
2901
|
-
*/
|
2902
3427
|
declare class XataApiClient {
|
2903
3428
|
#private;
|
2904
3429
|
constructor(options?: XataApiClientOptions);
|
@@ -2908,6 +3433,8 @@ declare class XataApiClient {
|
|
2908
3433
|
get branches(): BranchApi;
|
2909
3434
|
get tables(): TableApi;
|
2910
3435
|
get records(): RecordsApi;
|
3436
|
+
get migrationRequests(): MigrationRequestsApi;
|
3437
|
+
get branchSchema(): BranchSchemaApi;
|
2911
3438
|
}
|
2912
3439
|
declare class UserApi {
|
2913
3440
|
private extraProps;
|
@@ -2957,9 +3484,6 @@ declare class BranchApi {
|
|
2957
3484
|
deleteBranch(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<void>;
|
2958
3485
|
updateBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName, metadata?: BranchMetadata): Promise<void>;
|
2959
3486
|
getBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<BranchMetadata>;
|
2960
|
-
getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
|
2961
|
-
executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
|
2962
|
-
getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
|
2963
3487
|
getBranchStats(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<GetBranchStatsResponse>;
|
2964
3488
|
}
|
2965
3489
|
declare class TableApi {
|
@@ -2990,6 +3514,31 @@ declare class RecordsApi {
|
|
2990
3514
|
searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
|
2991
3515
|
searchBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, query: SearchBranchRequestBody): Promise<SearchResponse>;
|
2992
3516
|
}
|
3517
|
+
declare class MigrationRequestsApi {
|
3518
|
+
private extraProps;
|
3519
|
+
constructor(extraProps: FetcherExtraProps);
|
3520
|
+
listMigrationRequests(workspace: WorkspaceID, database: DBName, options?: ListMigrationRequestsRequestBody): Promise<ListMigrationRequestsResponse>;
|
3521
|
+
createMigrationRequest(workspace: WorkspaceID, database: DBName, options: CreateMigrationRequestRequestBody): Promise<CreateMigrationRequestResponse>;
|
3522
|
+
getMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<MigrationRequest>;
|
3523
|
+
updateMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number, options: UpdateMigrationRequestRequestBody): Promise<void>;
|
3524
|
+
listMigrationRequestsCommits(workspace: WorkspaceID, database: DBName, migrationRequest: number, options?: ListMigrationRequestsCommitsRequestBody): Promise<ListMigrationRequestsCommitsResponse>;
|
3525
|
+
compareMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<SchemaCompareResponse>;
|
3526
|
+
getMigrationRequestIsMerged(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<GetMigrationRequestIsMergedResponse>;
|
3527
|
+
mergeMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<Commit>;
|
3528
|
+
}
|
3529
|
+
declare class BranchSchemaApi {
|
3530
|
+
private extraProps;
|
3531
|
+
constructor(extraProps: FetcherExtraProps);
|
3532
|
+
getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
|
3533
|
+
executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
|
3534
|
+
getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
|
3535
|
+
compareBranchWithUserSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
|
3536
|
+
compareBranchSchemas(workspace: WorkspaceID, database: DBName, branch: BranchName, branchName: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
|
3537
|
+
updateBranchSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<UpdateBranchSchemaResponse>;
|
3538
|
+
previewBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<PreviewBranchSchemaEditResponse>;
|
3539
|
+
applyBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, edits: SchemaEditScript): Promise<ApplyBranchSchemaEditResponse>;
|
3540
|
+
getBranchSchemaHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchSchemaHistoryRequestBody): Promise<GetBranchSchemaHistoryResponse>;
|
3541
|
+
}
|
2993
3542
|
|
2994
3543
|
declare class XataApiPlugin implements XataPlugin {
|
2995
3544
|
build(options: XataPluginOptions): Promise<XataApiClient>;
|
@@ -3058,12 +3607,12 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
|
|
3058
3607
|
/**
|
3059
3608
|
* Retrieves a refreshed copy of the current record from the database.
|
3060
3609
|
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
3061
|
-
* @returns The persisted record with the selected columns.
|
3610
|
+
* @returns The persisted record with the selected columns, null if not found.
|
3062
3611
|
*/
|
3063
3612
|
read<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
|
3064
3613
|
/**
|
3065
3614
|
* Retrieves a refreshed copy of the current record from the database.
|
3066
|
-
* @returns The persisted record with all first level properties.
|
3615
|
+
* @returns The persisted record with all first level properties, null if not found.
|
3067
3616
|
*/
|
3068
3617
|
read(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
3069
3618
|
/**
|
@@ -3071,22 +3620,28 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
|
|
3071
3620
|
* returned and the current object is not mutated.
|
3072
3621
|
* @param partialUpdate The columns and their values that have to be updated.
|
3073
3622
|
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
3074
|
-
* @returns The persisted record with the selected columns.
|
3623
|
+
* @returns The persisted record with the selected columns, null if not found.
|
3075
3624
|
*/
|
3076
|
-
update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<
|
3625
|
+
update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<OriginalRecord>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
|
3077
3626
|
/**
|
3078
3627
|
* Performs a partial update of the current record. On success a new object is
|
3079
3628
|
* returned and the current object is not mutated.
|
3080
3629
|
* @param partialUpdate The columns and their values that have to be updated.
|
3081
|
-
* @returns The persisted record with all first level properties.
|
3630
|
+
* @returns The persisted record with all first level properties, null if not found.
|
3082
3631
|
*/
|
3083
|
-
update(partialUpdate: Partial<EditableData<
|
3632
|
+
update(partialUpdate: Partial<EditableData<OriginalRecord>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
3084
3633
|
/**
|
3085
3634
|
* Performs a deletion of the current record in the database.
|
3086
|
-
*
|
3087
|
-
* @
|
3635
|
+
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
3636
|
+
* @returns The deleted record, null if not found.
|
3088
3637
|
*/
|
3089
|
-
delete(): Promise<
|
3638
|
+
delete<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
|
3639
|
+
/**
|
3640
|
+
* Performs a deletion of the current record in the database.
|
3641
|
+
* @returns The deleted record, null if not found.
|
3642
|
+
|
3643
|
+
*/
|
3644
|
+
delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
3090
3645
|
}
|
3091
3646
|
declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update'> & {
|
3092
3647
|
/**
|
@@ -3099,7 +3654,7 @@ declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update
|
|
3099
3654
|
* @param partialUpdate The columns and their values that have to be updated.
|
3100
3655
|
* @returns A new record containing the latest values for all the columns of the current record.
|
3101
3656
|
*/
|
3102
|
-
update<K extends SelectableColumn<Record>>(partialUpdate: Partial<EditableData<
|
3657
|
+
update<K extends SelectableColumn<Record>>(partialUpdate: Partial<EditableData<Record>>, columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>>>;
|
3103
3658
|
/**
|
3104
3659
|
* Performs a deletion of the current record in the database.
|
3105
3660
|
*
|
@@ -3116,13 +3671,13 @@ declare type XataRecordMetadata = {
|
|
3116
3671
|
};
|
3117
3672
|
declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
|
3118
3673
|
declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
|
3119
|
-
declare type EditableData<O extends
|
3674
|
+
declare type EditableData<O extends XataRecord> = Identifiable & Omit<{
|
3120
3675
|
[K in keyof O]: O[K] extends XataRecord ? {
|
3121
3676
|
id: string;
|
3122
3677
|
} | string : NonNullable<O[K]> extends XataRecord ? {
|
3123
3678
|
id: string;
|
3124
3679
|
} | string | null | undefined : O[K];
|
3125
|
-
}
|
3680
|
+
}, keyof XataRecord>;
|
3126
3681
|
|
3127
3682
|
/**
|
3128
3683
|
* PropertyMatchFilter
|
@@ -3216,7 +3771,7 @@ declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFi
|
|
3216
3771
|
declare type NestedApiFilter<T> = {
|
3217
3772
|
[key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
|
3218
3773
|
};
|
3219
|
-
declare type Filter<T> = T extends Record<string, any> ? BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
|
3774
|
+
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>;
|
3220
3775
|
|
3221
3776
|
declare type DateBooster = {
|
3222
3777
|
origin?: string;
|
@@ -3273,7 +3828,7 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
|
|
3273
3828
|
[Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>[]>;
|
3274
3829
|
}>;
|
3275
3830
|
};
|
3276
|
-
declare class SearchPlugin<Schemas extends Record<string,
|
3831
|
+
declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
3277
3832
|
#private;
|
3278
3833
|
private db;
|
3279
3834
|
constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
|
@@ -3331,7 +3886,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
3331
3886
|
#private;
|
3332
3887
|
readonly meta: PaginationQueryMeta;
|
3333
3888
|
readonly records: RecordArray<Result>;
|
3334
|
-
constructor(repository: Repository<Record> | null, table:
|
3889
|
+
constructor(repository: Repository<Record> | null, table: {
|
3890
|
+
name: string;
|
3891
|
+
schema?: Table;
|
3892
|
+
}, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
|
3335
3893
|
getQueryOptions(): QueryOptions<Record>;
|
3336
3894
|
key(): string;
|
3337
3895
|
/**
|
@@ -3370,7 +3928,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
3370
3928
|
* @param value The value to filter.
|
3371
3929
|
* @returns A new Query object.
|
3372
3930
|
*/
|
3373
|
-
filter<F extends SelectableColumn<Record>>(column: F, value: Filter<ValueAtColumn<Record, F
|
3931
|
+
filter<F extends SelectableColumn<Record>>(column: F, value: Filter<NonNullable<ValueAtColumn<Record, F>>>): Query<Record, Result>;
|
3374
3932
|
/**
|
3375
3933
|
* Builds a new query object adding one or more constraints. Examples:
|
3376
3934
|
*
|
@@ -3384,14 +3942,17 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
3384
3942
|
* @param filters A filter object
|
3385
3943
|
* @returns A new Query object.
|
3386
3944
|
*/
|
3387
|
-
filter(filters
|
3945
|
+
filter(filters?: Filter<Record>): Query<Record, Result>;
|
3946
|
+
defaultFilter<T>(column: string, value: T): T | {
|
3947
|
+
$includes: (T & string) | (T & string[]);
|
3948
|
+
};
|
3388
3949
|
/**
|
3389
3950
|
* Builds a new query with a new sort option.
|
3390
3951
|
* @param column The column name.
|
3391
3952
|
* @param direction The direction. Either ascending or descending.
|
3392
3953
|
* @returns A new Query object.
|
3393
3954
|
*/
|
3394
|
-
sort<F extends SelectableColumn<Record>>(column: F, direction
|
3955
|
+
sort<F extends SelectableColumn<Record>>(column: F, direction?: SortDirection): Query<Record, Result>;
|
3395
3956
|
/**
|
3396
3957
|
* Builds a new query specifying the set of columns to be returned in the query response.
|
3397
3958
|
* @param columns Array of column names to be returned by the query.
|
@@ -3663,9 +4224,9 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
|
|
3663
4224
|
/**
|
3664
4225
|
* Common interface for performing operations on a table.
|
3665
4226
|
*/
|
3666
|
-
declare abstract class Repository<
|
3667
|
-
abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<
|
3668
|
-
abstract create(object: Omit<EditableData<
|
4227
|
+
declare abstract class Repository<Record extends XataRecord> extends Query<Record, Readonly<SelectedPick<Record, ['*']>>> {
|
4228
|
+
abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4229
|
+
abstract create(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3669
4230
|
/**
|
3670
4231
|
* Creates a single record in the table with a unique id.
|
3671
4232
|
* @param id The unique id.
|
@@ -3673,27 +4234,27 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3673
4234
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3674
4235
|
* @returns The full persisted record.
|
3675
4236
|
*/
|
3676
|
-
abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<
|
4237
|
+
abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
3677
4238
|
/**
|
3678
4239
|
* Creates a single record in the table with a unique id.
|
3679
4240
|
* @param id The unique id.
|
3680
4241
|
* @param object Object containing the column names with their values to be stored in the table.
|
3681
4242
|
* @returns The full persisted record.
|
3682
4243
|
*/
|
3683
|
-
abstract create(id: string, object: Omit<EditableData<
|
4244
|
+
abstract create(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3684
4245
|
/**
|
3685
4246
|
* Creates multiple records in the table.
|
3686
4247
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
3687
4248
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3688
4249
|
* @returns Array of the persisted records in order.
|
3689
4250
|
*/
|
3690
|
-
abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<
|
4251
|
+
abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
3691
4252
|
/**
|
3692
4253
|
* Creates multiple records in the table.
|
3693
4254
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
3694
4255
|
* @returns Array of the persisted records in order.
|
3695
4256
|
*/
|
3696
|
-
abstract create(objects: Array<Omit<EditableData<
|
4257
|
+
abstract create(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
3697
4258
|
/**
|
3698
4259
|
* Queries a single record from the table given its unique id.
|
3699
4260
|
* @param id The unique id.
|
@@ -3750,43 +4311,43 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3750
4311
|
* Partially update a single record.
|
3751
4312
|
* @param object An object with its id and the columns to be updated.
|
3752
4313
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3753
|
-
* @returns The full persisted record.
|
4314
|
+
* @returns The full persisted record, null if the record could not be found.
|
3754
4315
|
*/
|
3755
|
-
abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<
|
4316
|
+
abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
3756
4317
|
/**
|
3757
4318
|
* Partially update a single record.
|
3758
4319
|
* @param object An object with its id and the columns to be updated.
|
3759
|
-
* @returns The full persisted record.
|
4320
|
+
* @returns The full persisted record, null if the record could not be found.
|
3760
4321
|
*/
|
3761
|
-
abstract update(object: Partial<EditableData<
|
4322
|
+
abstract update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
3762
4323
|
/**
|
3763
4324
|
* Partially update a single record given its unique id.
|
3764
4325
|
* @param id The unique id.
|
3765
4326
|
* @param object The column names and their values that have to be updated.
|
3766
4327
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3767
|
-
* @returns The full persisted record.
|
4328
|
+
* @returns The full persisted record, null if the record could not be found.
|
3768
4329
|
*/
|
3769
|
-
abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<
|
4330
|
+
abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
3770
4331
|
/**
|
3771
4332
|
* Partially update a single record given its unique id.
|
3772
4333
|
* @param id The unique id.
|
3773
4334
|
* @param object The column names and their values that have to be updated.
|
3774
|
-
* @returns The full persisted record.
|
4335
|
+
* @returns The full persisted record, null if the record could not be found.
|
3775
4336
|
*/
|
3776
|
-
abstract update(id: string, object: Partial<EditableData<
|
4337
|
+
abstract update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
3777
4338
|
/**
|
3778
4339
|
* Partially updates multiple records.
|
3779
4340
|
* @param objects An array of objects with their ids and columns to be updated.
|
3780
4341
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3781
|
-
* @returns Array of the persisted records in order.
|
4342
|
+
* @returns Array of the persisted records in order (if a record could not be found null is returned).
|
3782
4343
|
*/
|
3783
|
-
abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<
|
4344
|
+
abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
3784
4345
|
/**
|
3785
4346
|
* Partially updates multiple records.
|
3786
4347
|
* @param objects An array of objects with their ids and columns to be updated.
|
3787
|
-
* @returns Array of the persisted records in order.
|
4348
|
+
* @returns Array of the persisted records in order (if a record could not be found null is returned).
|
3788
4349
|
*/
|
3789
|
-
abstract update(objects: Array<Partial<EditableData<
|
4350
|
+
abstract update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
3790
4351
|
/**
|
3791
4352
|
* Creates or updates a single record. If a record exists with the given id,
|
3792
4353
|
* it will be update, otherwise a new record will be created.
|
@@ -3794,14 +4355,14 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3794
4355
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3795
4356
|
* @returns The full persisted record.
|
3796
4357
|
*/
|
3797
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<
|
4358
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
3798
4359
|
/**
|
3799
4360
|
* Creates or updates a single record. If a record exists with the given id,
|
3800
4361
|
* it will be update, otherwise a new record will be created.
|
3801
4362
|
* @param object Object containing the column names with their values to be persisted in the table.
|
3802
4363
|
* @returns The full persisted record.
|
3803
4364
|
*/
|
3804
|
-
abstract createOrUpdate(object: EditableData<
|
4365
|
+
abstract createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3805
4366
|
/**
|
3806
4367
|
* Creates or updates a single record. If a record exists with the given id,
|
3807
4368
|
* it will be update, otherwise a new record will be created.
|
@@ -3810,7 +4371,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3810
4371
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3811
4372
|
* @returns The full persisted record.
|
3812
4373
|
*/
|
3813
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<
|
4374
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
3814
4375
|
/**
|
3815
4376
|
* Creates or updates a single record. If a record exists with the given id,
|
3816
4377
|
* it will be update, otherwise a new record will be created.
|
@@ -3818,7 +4379,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3818
4379
|
* @param object The column names and the values to be persisted.
|
3819
4380
|
* @returns The full persisted record.
|
3820
4381
|
*/
|
3821
|
-
abstract createOrUpdate(id: string, object: Omit<EditableData<
|
4382
|
+
abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
3822
4383
|
/**
|
3823
4384
|
* Creates or updates a single record. If a record exists with the given id,
|
3824
4385
|
* it will be update, otherwise a new record will be created.
|
@@ -3826,38 +4387,66 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3826
4387
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
3827
4388
|
* @returns Array of the persisted records.
|
3828
4389
|
*/
|
3829
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<
|
4390
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
3830
4391
|
/**
|
3831
4392
|
* Creates or updates a single record. If a record exists with the given id,
|
3832
4393
|
* it will be update, otherwise a new record will be created.
|
3833
4394
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
3834
4395
|
* @returns Array of the persisted records.
|
3835
4396
|
*/
|
3836
|
-
abstract createOrUpdate(objects: Array<EditableData<
|
4397
|
+
abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
3837
4398
|
/**
|
3838
4399
|
* Deletes a record given its unique id.
|
3839
|
-
* @param
|
3840
|
-
* @
|
4400
|
+
* @param object An object with a unique id.
|
4401
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4402
|
+
* @returns The deleted record, null if the record could not be found.
|
3841
4403
|
*/
|
3842
|
-
abstract delete(
|
4404
|
+
abstract delete<K extends SelectableColumn<Record>>(object: Identifiable & Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
3843
4405
|
/**
|
3844
4406
|
* Deletes a record given its unique id.
|
3845
|
-
* @param
|
3846
|
-
* @
|
4407
|
+
* @param object An object with a unique id.
|
4408
|
+
* @returns The deleted record, null if the record could not be found.
|
4409
|
+
*/
|
4410
|
+
abstract delete(object: Identifiable & Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4411
|
+
/**
|
4412
|
+
* Deletes a record given a unique id.
|
4413
|
+
* @param id The unique id.
|
4414
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4415
|
+
* @returns The deleted record, null if the record could not be found.
|
3847
4416
|
*/
|
3848
|
-
abstract delete(id:
|
4417
|
+
abstract delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
3849
4418
|
/**
|
3850
|
-
* Deletes a record given a
|
3851
|
-
* @param
|
3852
|
-
* @
|
4419
|
+
* Deletes a record given a unique id.
|
4420
|
+
* @param id The unique id.
|
4421
|
+
* @returns The deleted record, null if the record could not be found.
|
4422
|
+
*/
|
4423
|
+
abstract delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4424
|
+
/**
|
4425
|
+
* Deletes multiple records given an array of objects with ids.
|
4426
|
+
* @param objects An array of objects with unique ids.
|
4427
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4428
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
3853
4429
|
*/
|
3854
|
-
abstract delete(
|
4430
|
+
abstract delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
3855
4431
|
/**
|
3856
|
-
* Deletes
|
3857
|
-
* @param
|
3858
|
-
* @
|
4432
|
+
* Deletes multiple records given an array of objects with ids.
|
4433
|
+
* @param objects An array of objects with unique ids.
|
4434
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
3859
4435
|
*/
|
3860
|
-
abstract delete(
|
4436
|
+
abstract delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4437
|
+
/**
|
4438
|
+
* Deletes multiple records given an array of unique ids.
|
4439
|
+
* @param objects An array of ids.
|
4440
|
+
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
4441
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
4442
|
+
*/
|
4443
|
+
abstract delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4444
|
+
/**
|
4445
|
+
* Deletes multiple records given an array of unique ids.
|
4446
|
+
* @param objects An array of ids.
|
4447
|
+
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
4448
|
+
*/
|
4449
|
+
abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
3861
4450
|
/**
|
3862
4451
|
* Search for records in the table.
|
3863
4452
|
* @param query The query to search for.
|
@@ -3873,7 +4462,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
|
|
3873
4462
|
}): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
|
3874
4463
|
abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
|
3875
4464
|
}
|
3876
|
-
declare class RestRepository<
|
4465
|
+
declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
|
3877
4466
|
#private;
|
3878
4467
|
constructor(options: {
|
3879
4468
|
table: string;
|
@@ -3881,33 +4470,40 @@ declare class RestRepository<Data extends BaseData, Record extends XataRecord =
|
|
3881
4470
|
pluginOptions: XataPluginOptions;
|
3882
4471
|
schemaTables?: Table[];
|
3883
4472
|
});
|
3884
|
-
create(object: EditableData<
|
3885
|
-
create(
|
3886
|
-
create(
|
3887
|
-
create
|
3888
|
-
create<K extends SelectableColumn<Record>>(
|
3889
|
-
create
|
3890
|
-
read(
|
3891
|
-
read(
|
3892
|
-
read(
|
3893
|
-
read(
|
3894
|
-
read<K extends SelectableColumn<Record>>(
|
3895
|
-
read
|
3896
|
-
read<K extends SelectableColumn<Record>>(
|
3897
|
-
read
|
3898
|
-
update(object: Partial<EditableData<
|
3899
|
-
update(
|
3900
|
-
update(
|
3901
|
-
update
|
3902
|
-
update<K extends SelectableColumn<Record>>(
|
3903
|
-
update
|
3904
|
-
createOrUpdate(object: EditableData<
|
3905
|
-
createOrUpdate(
|
3906
|
-
createOrUpdate(
|
3907
|
-
createOrUpdate
|
3908
|
-
createOrUpdate<K extends SelectableColumn<Record>>(
|
3909
|
-
createOrUpdate
|
3910
|
-
delete(
|
4473
|
+
create<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4474
|
+
create(object: EditableData<Record> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4475
|
+
create<K extends SelectableColumn<Record>>(id: string, object: EditableData<Record>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4476
|
+
create(id: string, object: EditableData<Record>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4477
|
+
create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
4478
|
+
create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
4479
|
+
read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
4480
|
+
read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
4481
|
+
read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4482
|
+
read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4483
|
+
read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
4484
|
+
read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
4485
|
+
read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4486
|
+
read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4487
|
+
update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4488
|
+
update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4489
|
+
update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4490
|
+
update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4491
|
+
update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4492
|
+
update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4493
|
+
createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4494
|
+
createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4495
|
+
createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
4496
|
+
createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
4497
|
+
createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
4498
|
+
createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
4499
|
+
delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4500
|
+
delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4501
|
+
delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
4502
|
+
delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
4503
|
+
delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4504
|
+
delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
4505
|
+
delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
4506
|
+
delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
3911
4507
|
search(query: string, options?: {
|
3912
4508
|
fuzziness?: FuzzinessExpression;
|
3913
4509
|
prefix?: PrefixExpression;
|
@@ -3971,6 +4567,10 @@ declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
|
|
3971
4567
|
[K in ObjectColumns[number]['name']]?: PropertyType<Tables, ObjectColumns[number], K>;
|
3972
4568
|
} : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never) | null : never : never;
|
3973
4569
|
|
4570
|
+
/**
|
4571
|
+
* Operator to restrict results to only values that are greater than the given value.
|
4572
|
+
*/
|
4573
|
+
declare const greaterThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
3974
4574
|
/**
|
3975
4575
|
* Operator to restrict results to only values that are greater than the given value.
|
3976
4576
|
*/
|
@@ -3978,15 +4578,35 @@ declare const gt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
|
|
3978
4578
|
/**
|
3979
4579
|
* Operator to restrict results to only values that are greater than or equal to the given value.
|
3980
4580
|
*/
|
3981
|
-
declare const
|
4581
|
+
declare const greaterThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
4582
|
+
/**
|
4583
|
+
* Operator to restrict results to only values that are greater than or equal to the given value.
|
4584
|
+
*/
|
4585
|
+
declare const greaterEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
3982
4586
|
/**
|
3983
4587
|
* Operator to restrict results to only values that are greater than or equal to the given value.
|
3984
4588
|
*/
|
3985
4589
|
declare const gte: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
4590
|
+
/**
|
4591
|
+
* Operator to restrict results to only values that are greater than or equal to the given value.
|
4592
|
+
*/
|
4593
|
+
declare const ge: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
4594
|
+
/**
|
4595
|
+
* Operator to restrict results to only values that are lower than the given value.
|
4596
|
+
*/
|
4597
|
+
declare const lessThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
3986
4598
|
/**
|
3987
4599
|
* Operator to restrict results to only values that are lower than the given value.
|
3988
4600
|
*/
|
3989
4601
|
declare const lt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
4602
|
+
/**
|
4603
|
+
* Operator to restrict results to only values that are lower than or equal to the given value.
|
4604
|
+
*/
|
4605
|
+
declare const lessThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
4606
|
+
/**
|
4607
|
+
* Operator to restrict results to only values that are lower than or equal to the given value.
|
4608
|
+
*/
|
4609
|
+
declare const lessEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
3990
4610
|
/**
|
3991
4611
|
* Operator to restrict results to only values that are lower than or equal to the given value.
|
3992
4612
|
*/
|
@@ -4019,6 +4639,10 @@ declare const pattern: (value: string) => StringTypeFilter;
|
|
4019
4639
|
* Operator to restrict results to only values that are equal to the given value.
|
4020
4640
|
*/
|
4021
4641
|
declare const is: <T>(value: T) => PropertyFilter<T>;
|
4642
|
+
/**
|
4643
|
+
* Operator to restrict results to only values that are equal to the given value.
|
4644
|
+
*/
|
4645
|
+
declare const equals: <T>(value: T) => PropertyFilter<T>;
|
4022
4646
|
/**
|
4023
4647
|
* Operator to restrict results to only values that are not equal to the given value.
|
4024
4648
|
*/
|
@@ -4047,12 +4671,10 @@ declare const includesAny: <T>(value: T) => ArrayFilter<T>;
|
|
4047
4671
|
declare type SchemaDefinition = {
|
4048
4672
|
table: string;
|
4049
4673
|
};
|
4050
|
-
declare type SchemaPluginResult<Schemas extends Record<string,
|
4674
|
+
declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
|
4051
4675
|
[Key in keyof Schemas]: Repository<Schemas[Key]>;
|
4052
|
-
} & {
|
4053
|
-
[key: string]: Repository<XataRecord$1>;
|
4054
4676
|
};
|
4055
|
-
declare class SchemaPlugin<Schemas extends Record<string,
|
4677
|
+
declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
4056
4678
|
#private;
|
4057
4679
|
constructor(schemaTables?: Schemas.Table[]);
|
4058
4680
|
build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
|
@@ -4069,12 +4691,13 @@ declare type BaseClientOptions = {
|
|
4069
4691
|
databaseURL?: string;
|
4070
4692
|
branch?: BranchStrategyOption;
|
4071
4693
|
cache?: CacheImpl;
|
4694
|
+
trace?: TraceFunction;
|
4072
4695
|
};
|
4073
4696
|
declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
|
4074
4697
|
interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
4075
|
-
new <
|
4076
|
-
db: Awaited<ReturnType<SchemaPlugin<
|
4077
|
-
search: Awaited<ReturnType<SearchPlugin<
|
4698
|
+
new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
|
4699
|
+
db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
|
4700
|
+
search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
|
4078
4701
|
}, keyof Plugins> & {
|
4079
4702
|
[Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
|
4080
4703
|
} & {
|
@@ -4085,7 +4708,7 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
|
4085
4708
|
};
|
4086
4709
|
}
|
4087
4710
|
declare const BaseClient_base: ClientConstructor<{}>;
|
4088
|
-
declare class BaseClient extends BaseClient_base<
|
4711
|
+
declare class BaseClient extends BaseClient_base<Record<string, any>> {
|
4089
4712
|
}
|
4090
4713
|
|
4091
4714
|
declare class Serializer {
|
@@ -4193,4 +4816,4 @@ declare class XataError extends Error {
|
|
4193
4816
|
constructor(message: string, status: number);
|
4194
4817
|
}
|
4195
4818
|
|
4196
|
-
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, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|
4819
|
+
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, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaResponse, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, applyBranchSchemaEdit, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequests, listMigrationRequestsCommits, lt, lte, mergeMigrationRequest, notExists, operationsByTag, pattern, previewBranchSchemaEdit, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, updateBranchMetadata, updateBranchSchema, updateColumn, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|