@xata.io/client 0.0.0-alpha.vf73045e → 0.0.0-alpha.vf7d30cc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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>) => 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
  /**
@@ -91,7 +99,7 @@ declare type WorkspaceID = string;
91
99
  declare type Role = 'owner' | 'maintainer';
92
100
  declare type WorkspaceMeta = {
93
101
  name: string;
94
- slug: string;
102
+ slug?: string;
95
103
  };
96
104
  declare type Workspace = WorkspaceMeta & {
97
105
  id: WorkspaceID;
@@ -127,7 +135,6 @@ declare type InviteKey = string;
127
135
  */
128
136
  declare type DatabaseMetadata = {
129
137
  name: string;
130
- displayName: string;
131
138
  createdAt: DateTime;
132
139
  numberOfBranches: number;
133
140
  ui?: {
@@ -139,7 +146,6 @@ declare type ListDatabasesResponse = {
139
146
  };
140
147
  declare type ListBranchesResponse = {
141
148
  databaseName: string;
142
- displayName: string;
143
149
  branches: Branch[];
144
150
  };
145
151
  declare type ListGitBranchesResponse = {
@@ -185,12 +191,28 @@ declare type Schema = {
185
191
  tables: Table[];
186
192
  tablesOrder?: string[];
187
193
  };
194
+ /**
195
+ * @x-internal true
196
+ */
197
+ declare type SchemaEditScript = {
198
+ sourceMigrationID?: string;
199
+ targetMigrationID?: string;
200
+ tables: TableEdit[];
201
+ };
188
202
  declare type Table = {
189
203
  id?: string;
190
204
  name: TableName;
191
205
  columns: Column[];
192
206
  revLinks?: RevLink[];
193
207
  };
208
+ /**
209
+ * @x-internal true
210
+ */
211
+ declare type TableEdit = {
212
+ oldName?: string;
213
+ newName?: string;
214
+ columns?: MigrationColumnOp[];
215
+ };
194
216
  /**
195
217
  * @x-go-type xata.Column
196
218
  */
@@ -200,6 +222,8 @@ declare type Column = {
200
222
  link?: {
201
223
  table: string;
202
224
  };
225
+ notNull?: boolean;
226
+ unique?: boolean;
203
227
  columns?: Column[];
204
228
  };
205
229
  declare type RevLink = {
@@ -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
  } | {
@@ -274,7 +402,7 @@ declare type SortExpression = string[] | {
274
402
  declare type SortOrder = 'asc' | 'desc';
275
403
  /**
276
404
  * Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
277
- * distance is the number of one charcter changes needed to make two strings equal. The default is 1, meaning that single
405
+ * distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
278
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
279
407
  * to allow two typos in a word.
280
408
  *
@@ -300,6 +428,22 @@ declare type FilterExpression = {
300
428
  } & {
301
429
  [key: string]: FilterColumn;
302
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>;
303
447
  declare type HighlightExpression = {
304
448
  enabled?: boolean;
305
449
  encodeHTML?: boolean;
@@ -466,7 +610,9 @@ type schemas_BranchMetadata = BranchMetadata;
466
610
  type schemas_DBBranch = DBBranch;
467
611
  type schemas_StartedFromMetadata = StartedFromMetadata;
468
612
  type schemas_Schema = Schema;
613
+ type schemas_SchemaEditScript = SchemaEditScript;
469
614
  type schemas_Table = Table;
615
+ type schemas_TableEdit = TableEdit;
470
616
  type schemas_Column = Column;
471
617
  type schemas_RevLink = RevLink;
472
618
  type schemas_BranchName = BranchName;
@@ -479,11 +625,25 @@ type schemas_MetricsLatency = MetricsLatency;
479
625
  type schemas_BranchMigration = BranchMigration;
480
626
  type schemas_TableMigration = TableMigration;
481
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;
482
640
  type schemas_SortExpression = SortExpression;
483
641
  type schemas_SortOrder = SortOrder;
484
642
  type schemas_FuzzinessExpression = FuzzinessExpression;
485
643
  type schemas_PrefixExpression = PrefixExpression;
486
644
  type schemas_FilterExpression = FilterExpression;
645
+ type schemas_SummaryExpressionList = SummaryExpressionList;
646
+ type schemas_SummaryExpression = SummaryExpression;
487
647
  type schemas_HighlightExpression = HighlightExpression;
488
648
  type schemas_BoosterExpression = BoosterExpression;
489
649
  type schemas_FilterList = FilterList;
@@ -525,7 +685,9 @@ declare namespace schemas {
525
685
  schemas_DBBranch as DBBranch,
526
686
  schemas_StartedFromMetadata as StartedFromMetadata,
527
687
  schemas_Schema as Schema,
688
+ schemas_SchemaEditScript as SchemaEditScript,
528
689
  schemas_Table as Table,
690
+ schemas_TableEdit as TableEdit,
529
691
  schemas_Column as Column,
530
692
  schemas_RevLink as RevLink,
531
693
  schemas_BranchName as BranchName,
@@ -538,11 +700,25 @@ declare namespace schemas {
538
700
  schemas_BranchMigration as BranchMigration,
539
701
  schemas_TableMigration as TableMigration,
540
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,
541
715
  schemas_SortExpression as SortExpression,
542
716
  schemas_SortOrder as SortOrder,
543
717
  schemas_FuzzinessExpression as FuzzinessExpression,
544
718
  schemas_PrefixExpression as PrefixExpression,
545
719
  schemas_FilterExpression as FilterExpression,
720
+ schemas_SummaryExpressionList as SummaryExpressionList,
721
+ schemas_SummaryExpression as SummaryExpression,
546
722
  schemas_HighlightExpression as HighlightExpression,
547
723
  schemas_BoosterExpression as BoosterExpression,
548
724
  ValueBooster$1 as ValueBooster,
@@ -603,6 +779,11 @@ declare type BranchMigrationPlan = {
603
779
  migration: BranchMigration;
604
780
  };
605
781
  declare type RecordResponse = XataRecord$1;
782
+ declare type SchemaCompareResponse = {
783
+ source: Schema;
784
+ target: Schema;
785
+ edits: SchemaEditScript;
786
+ };
606
787
  declare type RecordUpdateResponse = XataRecord$1 | {
607
788
  id: string;
608
789
  xata: {
@@ -613,6 +794,9 @@ declare type QueryResponse = {
613
794
  records: XataRecord$1[];
614
795
  meta: RecordsMetadata;
615
796
  };
797
+ declare type SummarizeResponse = {
798
+ summary: Record<string, any>[];
799
+ };
616
800
  declare type SearchResponse = {
617
801
  records: XataRecord$1[];
618
802
  };
@@ -630,8 +814,10 @@ type responses_BulkError = BulkError;
630
814
  type responses_BulkInsertResponse = BulkInsertResponse;
631
815
  type responses_BranchMigrationPlan = BranchMigrationPlan;
632
816
  type responses_RecordResponse = RecordResponse;
817
+ type responses_SchemaCompareResponse = SchemaCompareResponse;
633
818
  type responses_RecordUpdateResponse = RecordUpdateResponse;
634
819
  type responses_QueryResponse = QueryResponse;
820
+ type responses_SummarizeResponse = SummarizeResponse;
635
821
  type responses_SearchResponse = SearchResponse;
636
822
  type responses_MigrationIdResponse = MigrationIdResponse;
637
823
  declare namespace responses {
@@ -643,8 +829,10 @@ declare namespace responses {
643
829
  responses_BulkInsertResponse as BulkInsertResponse,
644
830
  responses_BranchMigrationPlan as BranchMigrationPlan,
645
831
  responses_RecordResponse as RecordResponse,
832
+ responses_SchemaCompareResponse as SchemaCompareResponse,
646
833
  responses_RecordUpdateResponse as RecordUpdateResponse,
647
834
  responses_QueryResponse as QueryResponse,
835
+ responses_SummarizeResponse as SummarizeResponse,
648
836
  responses_SearchResponse as SearchResponse,
649
837
  responses_MigrationIdResponse as MigrationIdResponse,
650
838
  };
@@ -1109,7 +1297,6 @@ declare type CreateDatabaseResponse = {
1109
1297
  branchName?: string;
1110
1298
  };
1111
1299
  declare type CreateDatabaseRequestBody = {
1112
- displayName?: string;
1113
1300
  branchName?: string;
1114
1301
  ui?: {
1115
1302
  color?: string;
@@ -1166,6 +1353,33 @@ declare type GetDatabaseMetadataVariables = {
1166
1353
  * Retrieve metadata of the given database
1167
1354
  */
1168
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>;
1169
1383
  declare type GetGitBranchesMappingPathParams = {
1170
1384
  dbName: DBName;
1171
1385
  workspace: string;
@@ -1323,6 +1537,201 @@ declare type ResolveBranchVariables = {
1323
1537
  * ```
1324
1538
  */
1325
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>;
1326
1735
  declare type GetBranchDetailsPathParams = {
1327
1736
  dbBranchName: DBBranchName;
1328
1737
  workspace: string;
@@ -1508,6 +1917,157 @@ declare type GetBranchMigrationPlanVariables = {
1508
1917
  * Compute a migration plan from a target schema the branch should be migrated too.
1509
1918
  */
1510
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>;
1511
2071
  declare type GetBranchStatsPathParams = {
1512
2072
  dbBranchName: DBBranchName;
1513
2073
  workspace: string;
@@ -2802,6 +3362,7 @@ declare type SearchBranchRequestBody = {
2802
3362
  })[];
2803
3363
  query: string;
2804
3364
  fuzziness?: FuzzinessExpression;
3365
+ prefix?: PrefixExpression;
2805
3366
  highlight?: HighlightExpression;
2806
3367
  };
2807
3368
  declare type SearchBranchVariables = {
@@ -2812,6 +3373,33 @@ declare type SearchBranchVariables = {
2812
3373
  * Run a free text search operation across the database branch.
2813
3374
  */
2814
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>;
2815
3403
  declare const operationsByTag: {
2816
3404
  users: {
2817
3405
  getUser: (variables: GetUserVariables) => Promise<UserWithID>;
@@ -2841,6 +3429,7 @@ declare const operationsByTag: {
2841
3429
  createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
2842
3430
  deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
2843
3431
  getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
3432
+ updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
2844
3433
  getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
2845
3434
  addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
2846
3435
  removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
@@ -2853,10 +3442,28 @@ declare const operationsByTag: {
2853
3442
  deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
2854
3443
  updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
2855
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: {
2856
3458
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
2857
3459
  executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
2858
3460
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
2859
- getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
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>;
2860
3467
  };
2861
3468
  table: {
2862
3469
  createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
@@ -2881,6 +3488,7 @@ declare const operationsByTag: {
2881
3488
  queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
2882
3489
  searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
2883
3490
  searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
3491
+ summarizeTable: (variables: SummarizeTableVariables) => Promise<SummarizeResponse>;
2884
3492
  };
2885
3493
  };
2886
3494
 
@@ -2895,10 +3503,8 @@ interface XataApiClientOptions {
2895
3503
  fetch?: FetchImpl;
2896
3504
  apiKey?: string;
2897
3505
  host?: HostProvider;
3506
+ trace?: TraceFunction;
2898
3507
  }
2899
- /**
2900
- * @deprecated Use XataApiPlugin instead
2901
- */
2902
3508
  declare class XataApiClient {
2903
3509
  #private;
2904
3510
  constructor(options?: XataApiClientOptions);
@@ -2908,6 +3514,8 @@ declare class XataApiClient {
2908
3514
  get branches(): BranchApi;
2909
3515
  get tables(): TableApi;
2910
3516
  get records(): RecordsApi;
3517
+ get migrationRequests(): MigrationRequestsApi;
3518
+ get branchSchema(): BranchSchemaApi;
2911
3519
  }
2912
3520
  declare class UserApi {
2913
3521
  private extraProps;
@@ -2943,6 +3551,7 @@ declare class DatabaseApi {
2943
3551
  createDatabase(workspace: WorkspaceID, dbName: DBName, options?: CreateDatabaseRequestBody): Promise<CreateDatabaseResponse>;
2944
3552
  deleteDatabase(workspace: WorkspaceID, dbName: DBName): Promise<void>;
2945
3553
  getDatabaseMetadata(workspace: WorkspaceID, dbName: DBName): Promise<DatabaseMetadata>;
3554
+ updateDatabaseMetadata(workspace: WorkspaceID, dbName: DBName, options?: UpdateDatabaseMetadataRequestBody): Promise<DatabaseMetadata>;
2946
3555
  getGitBranchesMapping(workspace: WorkspaceID, dbName: DBName): Promise<ListGitBranchesResponse>;
2947
3556
  addGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, body: AddGitBranchesEntryRequestBody): Promise<AddGitBranchesEntryResponse>;
2948
3557
  removeGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, gitBranch: string): Promise<void>;
@@ -2957,9 +3566,6 @@ declare class BranchApi {
2957
3566
  deleteBranch(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<void>;
2958
3567
  updateBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName, metadata?: BranchMetadata): Promise<void>;
2959
3568
  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
3569
  getBranchStats(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<GetBranchStatsResponse>;
2964
3570
  }
2965
3571
  declare class TableApi {
@@ -2989,6 +3595,32 @@ declare class RecordsApi {
2989
3595
  queryTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: QueryTableRequestBody): Promise<QueryResponse>;
2990
3596
  searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
2991
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>;
2992
3624
  }
2993
3625
 
2994
3626
  declare class XataApiPlugin implements XataPlugin {
@@ -3058,12 +3690,12 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
3058
3690
  /**
3059
3691
  * Retrieves a refreshed copy of the current record from the database.
3060
3692
  * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3061
- * @returns The persisted record with the selected columns.
3693
+ * @returns The persisted record with the selected columns, null if not found.
3062
3694
  */
3063
3695
  read<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3064
3696
  /**
3065
3697
  * Retrieves a refreshed copy of the current record from the database.
3066
- * @returns The persisted record with all first level properties.
3698
+ * @returns The persisted record with all first level properties, null if not found.
3067
3699
  */
3068
3700
  read(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3069
3701
  /**
@@ -3071,42 +3703,30 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
3071
3703
  * returned and the current object is not mutated.
3072
3704
  * @param partialUpdate The columns and their values that have to be updated.
3073
3705
  * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3074
- * @returns The persisted record with the selected columns.
3706
+ * @returns The persisted record with the selected columns, null if not found.
3075
3707
  */
3076
- update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>>>;
3708
+ update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<OriginalRecord>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3077
3709
  /**
3078
3710
  * Performs a partial update of the current record. On success a new object is
3079
3711
  * returned and the current object is not mutated.
3080
3712
  * @param partialUpdate The columns and their values that have to be updated.
3081
- * @returns The persisted record with all first level properties.
3713
+ * @returns The persisted record with all first level properties, null if not found.
3082
3714
  */
3083
- update(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>>>;
3715
+ update(partialUpdate: Partial<EditableData<OriginalRecord>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3084
3716
  /**
3085
3717
  * Performs a deletion of the current record in the database.
3086
- *
3087
- * @throws If the record was already deleted or if an error happened while performing the deletion.
3088
- */
3089
- delete(): Promise<void>;
3090
- }
3091
- declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update'> & {
3092
- /**
3093
- * Retrieves a refreshed copy of the current record from the database.
3094
- */
3095
- read<K extends SelectableColumn<Record>>(columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>> | null>;
3096
- /**
3097
- * Performs a partial update of the current record. On success a new object is
3098
- * returned and the current object is not mutated.
3099
- * @param partialUpdate The columns and their values that have to be updated.
3100
- * @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.
3101
3720
  */
3102
- update<K extends SelectableColumn<Record>>(partialUpdate: Partial<EditableData<Omit<Record, keyof XataRecord>>>, columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>>>;
3721
+ delete<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3103
3722
  /**
3104
3723
  * Performs a deletion of the current record in the database.
3105
- *
3106
- * @throws If the record was already deleted or if an error happened while performing the deletion.
3724
+ * @returns The deleted record, null if not found.
3725
+
3107
3726
  */
3108
- delete(): Promise<void>;
3109
- };
3727
+ delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3728
+ }
3729
+ declare type Link<Record extends XataRecord> = XataRecord<Record>;
3110
3730
  declare type XataRecordMetadata = {
3111
3731
  /**
3112
3732
  * Number that is increased every time the record is updated.
@@ -3116,13 +3736,13 @@ declare type XataRecordMetadata = {
3116
3736
  };
3117
3737
  declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
3118
3738
  declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
3119
- declare type EditableData<O extends BaseData> = {
3739
+ declare type EditableData<O extends XataRecord> = Identifiable & Omit<{
3120
3740
  [K in keyof O]: O[K] extends XataRecord ? {
3121
3741
  id: string;
3122
3742
  } | string : NonNullable<O[K]> extends XataRecord ? {
3123
3743
  id: string;
3124
3744
  } | string | null | undefined : O[K];
3125
- };
3745
+ }, keyof XataRecord>;
3126
3746
 
3127
3747
  /**
3128
3748
  * PropertyMatchFilter
@@ -3216,7 +3836,7 @@ declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFi
3216
3836
  declare type NestedApiFilter<T> = {
3217
3837
  [key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
3218
3838
  };
3219
- declare type Filter<T> = T extends Record<string, any> ? 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>;
3220
3840
 
3221
3841
  declare type DateBooster = {
3222
3842
  origin?: string;
@@ -3273,7 +3893,7 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
3273
3893
  [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>[]>;
3274
3894
  }>;
3275
3895
  };
3276
- declare class SearchPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
3896
+ declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
3277
3897
  #private;
3278
3898
  private db;
3279
3899
  constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
@@ -3331,7 +3951,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3331
3951
  #private;
3332
3952
  readonly meta: PaginationQueryMeta;
3333
3953
  readonly records: RecordArray<Result>;
3334
- constructor(repository: Repository<Record> | null, table: string, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
3954
+ constructor(repository: Repository<Record> | null, table: {
3955
+ name: string;
3956
+ schema?: Table;
3957
+ }, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
3335
3958
  getQueryOptions(): QueryOptions<Record>;
3336
3959
  key(): string;
3337
3960
  /**
@@ -3370,7 +3993,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3370
3993
  * @param value The value to filter.
3371
3994
  * @returns A new Query object.
3372
3995
  */
3373
- filter<F extends SelectableColumn<Record>>(column: F, value: Filter<ValueAtColumn<Record, F>>): Query<Record, Result>;
3996
+ filter<F extends SelectableColumn<Record>>(column: F, value: Filter<NonNullable<ValueAtColumn<Record, F>>>): Query<Record, Result>;
3374
3997
  /**
3375
3998
  * Builds a new query object adding one or more constraints. Examples:
3376
3999
  *
@@ -3384,7 +4007,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3384
4007
  * @param filters A filter object
3385
4008
  * @returns A new Query object.
3386
4009
  */
3387
- filter(filters: Filter<Record>): Query<Record, Result>;
4010
+ filter(filters?: Filter<Record>): Query<Record, Result>;
4011
+ defaultFilter<T>(column: string, value: T): T | {
4012
+ $includes: (T & string) | (T & string[]);
4013
+ };
3388
4014
  /**
3389
4015
  * Builds a new query with a new sort option.
3390
4016
  * @param column The column name.
@@ -3507,6 +4133,26 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3507
4133
  * @returns The first record that matches the query, or null if no record matched the query.
3508
4134
  */
3509
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>;
3510
4156
  /**
3511
4157
  * Builds a new query object adding a cache TTL in milliseconds.
3512
4158
  * @param ttl The cache TTL in milliseconds.
@@ -3663,9 +4309,9 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
3663
4309
  /**
3664
4310
  * Common interface for performing operations on a table.
3665
4311
  */
3666
- declare abstract class Repository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, Readonly<SelectedPick<Record, ['*']>>> {
3667
- abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<Data>, 'id'> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3668
- abstract create(object: Omit<EditableData<Data>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
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, ['*']>>>;
3669
4315
  /**
3670
4316
  * Creates a single record in the table with a unique id.
3671
4317
  * @param id The unique id.
@@ -3673,27 +4319,27 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3673
4319
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3674
4320
  * @returns The full persisted record.
3675
4321
  */
3676
- abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4322
+ abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3677
4323
  /**
3678
4324
  * Creates a single record in the table with a unique id.
3679
4325
  * @param id The unique id.
3680
4326
  * @param object Object containing the column names with their values to be stored in the table.
3681
4327
  * @returns The full persisted record.
3682
4328
  */
3683
- abstract create(id: string, object: Omit<EditableData<Data>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4329
+ abstract create(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3684
4330
  /**
3685
4331
  * Creates multiple records in the table.
3686
4332
  * @param objects Array of objects with the column names and the values to be stored in the table.
3687
4333
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3688
4334
  * @returns Array of the persisted records in order.
3689
4335
  */
3690
- abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Data>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
4336
+ abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3691
4337
  /**
3692
4338
  * Creates multiple records in the table.
3693
4339
  * @param objects Array of objects with the column names and the values to be stored in the table.
3694
4340
  * @returns Array of the persisted records in order.
3695
4341
  */
3696
- abstract create(objects: Array<Omit<EditableData<Data>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
4342
+ abstract create(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3697
4343
  /**
3698
4344
  * Queries a single record from the table given its unique id.
3699
4345
  * @param id The unique id.
@@ -3746,47 +4392,154 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3746
4392
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
3747
4393
  */
3748
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>>;
3749
4496
  /**
3750
4497
  * Partially update a single record.
3751
4498
  * @param object An object with its id and the columns to be updated.
3752
4499
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3753
4500
  * @returns The full persisted record.
4501
+ * @throws If the record could not be found.
3754
4502
  */
3755
- abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Data>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4503
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3756
4504
  /**
3757
4505
  * Partially update a single record.
3758
4506
  * @param object An object with its id and the columns to be updated.
3759
4507
  * @returns The full persisted record.
4508
+ * @throws If the record could not be found.
3760
4509
  */
3761
- abstract update(object: Partial<EditableData<Data>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4510
+ abstract updateOrThrow(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3762
4511
  /**
3763
4512
  * Partially update a single record given its unique id.
3764
4513
  * @param id The unique id.
3765
4514
  * @param object The column names and their values that have to be updated.
3766
4515
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3767
4516
  * @returns The full persisted record.
4517
+ * @throws If the record could not be found.
3768
4518
  */
3769
- abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Data>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4519
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3770
4520
  /**
3771
4521
  * Partially update a single record given its unique id.
3772
4522
  * @param id The unique id.
3773
4523
  * @param object The column names and their values that have to be updated.
3774
4524
  * @returns The full persisted record.
4525
+ * @throws If the record could not be found.
3775
4526
  */
3776
- abstract update(id: string, object: Partial<EditableData<Data>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4527
+ abstract updateOrThrow(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3777
4528
  /**
3778
4529
  * Partially updates multiple records.
3779
4530
  * @param objects An array of objects with their ids and columns to be updated.
3780
4531
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3781
4532
  * @returns Array of the persisted records in order.
4533
+ * @throws If one or more records could not be found.
3782
4534
  */
3783
- abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Data>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
4535
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3784
4536
  /**
3785
4537
  * Partially updates multiple records.
3786
4538
  * @param objects An array of objects with their ids and columns to be updated.
3787
4539
  * @returns Array of the persisted records in order.
4540
+ * @throws If one or more records could not be found.
3788
4541
  */
3789
- abstract update(objects: Array<Partial<EditableData<Data>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
4542
+ abstract updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3790
4543
  /**
3791
4544
  * Creates or updates a single record. If a record exists with the given id,
3792
4545
  * it will be update, otherwise a new record will be created.
@@ -3794,14 +4547,14 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3794
4547
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3795
4548
  * @returns The full persisted record.
3796
4549
  */
3797
- abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Data> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4550
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3798
4551
  /**
3799
4552
  * Creates or updates a single record. If a record exists with the given id,
3800
4553
  * it will be update, otherwise a new record will be created.
3801
4554
  * @param object Object containing the column names with their values to be persisted in the table.
3802
4555
  * @returns The full persisted record.
3803
4556
  */
3804
- abstract createOrUpdate(object: EditableData<Data> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4557
+ abstract createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3805
4558
  /**
3806
4559
  * Creates or updates a single record. If a record exists with the given id,
3807
4560
  * it will be update, otherwise a new record will be created.
@@ -3810,7 +4563,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3810
4563
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3811
4564
  * @returns The full persisted record.
3812
4565
  */
3813
- abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4566
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3814
4567
  /**
3815
4568
  * Creates or updates a single record. If a record exists with the given id,
3816
4569
  * it will be update, otherwise a new record will be created.
@@ -3818,7 +4571,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3818
4571
  * @param object The column names and the values to be persisted.
3819
4572
  * @returns The full persisted record.
3820
4573
  */
3821
- abstract createOrUpdate(id: string, object: Omit<EditableData<Data>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4574
+ abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3822
4575
  /**
3823
4576
  * Creates or updates a single record. If a record exists with the given id,
3824
4577
  * it will be update, otherwise a new record will be created.
@@ -3826,38 +4579,126 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3826
4579
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3827
4580
  * @returns Array of the persisted records.
3828
4581
  */
3829
- abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Data> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
4582
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3830
4583
  /**
3831
4584
  * Creates or updates a single record. If a record exists with the given id,
3832
4585
  * it will be update, otherwise a new record will be created.
3833
4586
  * @param objects Array of objects with the column names and the values to be stored in the table.
3834
4587
  * @returns Array of the persisted records.
3835
4588
  */
3836
- abstract createOrUpdate(objects: Array<EditableData<Data> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
4589
+ abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3837
4590
  /**
3838
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>;
4597
+ /**
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.
4605
+ * @param id The unique id.
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.
4608
+ */
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.
3839
4612
  * @param id The unique id.
3840
- * @throws If the record could not be found or there was an error while performing the deletion.
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).
3841
4621
  */
3842
- abstract delete(id: string): Promise<void>;
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>>;
4642
+ /**
4643
+ * Deletes a record given its unique id.
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.
4648
+ */
4649
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3843
4650
  /**
3844
4651
  * Deletes a record given its unique id.
3845
- * @param id An object with a unique id.
3846
- * @throws If the record could not be found or there was an error while performing the deletion.
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.
4655
+ */
4656
+ abstract deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4657
+ /**
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.
4663
+ */
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.
3847
4685
  */
3848
- abstract delete(id: Identifiable): Promise<void>;
4686
+ abstract deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3849
4687
  /**
3850
- * Deletes a record given a list of unique ids.
3851
- * @param ids The array of unique ids.
3852
- * @throws If the record could not be found or there was an error while performing the deletion.
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.
3853
4693
  */
3854
- abstract delete(ids: string[]): Promise<void>;
4694
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3855
4695
  /**
3856
- * Deletes a record given a list of unique ids.
3857
- * @param ids An array of objects with unique ids.
3858
- * @throws If the record could not be found or there was an error while performing the deletion.
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.
3859
4700
  */
3860
- abstract delete(ids: Identifiable[]): Promise<void>;
4701
+ abstract deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3861
4702
  /**
3862
4703
  * Search for records in the table.
3863
4704
  * @param query The query to search for.
@@ -3873,7 +4714,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3873
4714
  }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
3874
4715
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
3875
4716
  }
3876
- declare class RestRepository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Data, Record> {
4717
+ declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
3877
4718
  #private;
3878
4719
  constructor(options: {
3879
4720
  table: string;
@@ -3881,33 +4722,62 @@ declare class RestRepository<Data extends BaseData, Record extends XataRecord =
3881
4722
  pluginOptions: XataPluginOptions;
3882
4723
  schemaTables?: Table[];
3883
4724
  });
3884
- create(object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3885
- create(recordId: string, object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3886
- create(objects: EditableData<Data>[]): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3887
- create<K extends SelectableColumn<Record>>(object: EditableData<Data>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3888
- create<K extends SelectableColumn<Record>>(recordId: string, object: EditableData<Data>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3889
- create<K extends SelectableColumn<Record>>(objects: EditableData<Data>[], columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3890
- read(recordId: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3891
- read(recordIds: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3892
- read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3893
- read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3894
- read<K extends SelectableColumn<Record>>(recordId: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3895
- read<K extends SelectableColumn<Record>>(recordIds: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3896
- read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3897
- read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3898
- update(object: Partial<EditableData<Data>> & Identifiable): Promise<SelectedPick<Record, ['*']>>;
3899
- update(recordId: string, object: Partial<EditableData<Data>>): Promise<SelectedPick<Record, ['*']>>;
3900
- update(objects: Array<Partial<EditableData<Data>> & Identifiable>): Promise<SelectedPick<Record, ['*']>[]>;
3901
- update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Data>> & Identifiable, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3902
- update<K extends SelectableColumn<Record>>(recordId: string, object: Partial<EditableData<Data>>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3903
- update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Data>> & Identifiable>, columns: K[]): Promise<SelectedPick<Record, typeof columns>[]>;
3904
- createOrUpdate(object: EditableData<Data>): Promise<SelectedPick<Record, ['*']>>;
3905
- createOrUpdate(recordId: string, object: EditableData<Data>): Promise<SelectedPick<Record, ['*']>>;
3906
- createOrUpdate(objects: EditableData<Data>[]): Promise<SelectedPick<Record, ['*']>[]>;
3907
- createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Data>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3908
- createOrUpdate<K extends SelectableColumn<Record>>(recordId: string, object: EditableData<Data>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3909
- createOrUpdate<K extends SelectableColumn<Record>>(objects: EditableData<Data>[], columns: K[]): Promise<SelectedPick<Record, typeof columns>[]>;
3910
- delete(a: string | Identifiable | Array<string | Identifiable>): Promise<void>;
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, ['*']>>>>;
3911
4781
  search(query: string, options?: {
3912
4782
  fuzziness?: FuzzinessExpression;
3913
4783
  prefix?: PrefixExpression;
@@ -3923,6 +4793,7 @@ declare type BaseSchema = {
3923
4793
  columns: readonly ({
3924
4794
  name: string;
3925
4795
  type: Column['type'];
4796
+ notNull?: boolean;
3926
4797
  } | {
3927
4798
  name: string;
3928
4799
  type: 'link';
@@ -3952,10 +4823,10 @@ declare type TableType<Tables, TableName> = Tables & {
3952
4823
  } ? Columns extends readonly unknown[] ? Columns[number] extends {
3953
4824
  name: string;
3954
4825
  type: string;
3955
- } ? Identifiable & {
3956
- [K in Columns[number]['name']]?: PropertyType<Tables, Columns[number], K>;
3957
- } : never : never : never : never;
3958
- 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 & {
3959
4830
  name: PropertyName;
3960
4831
  } extends infer Property ? Property extends {
3961
4832
  name: string;
@@ -3964,13 +4835,23 @@ declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
3964
4835
  table: infer LinkedTable;
3965
4836
  };
3966
4837
  columns?: infer ObjectColumns;
3967
- } ? (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 {
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 {
3968
4845
  name: string;
3969
4846
  type: string;
3970
- } ? {
3971
- [K in ObjectColumns[number]['name']]?: PropertyType<Tables, ObjectColumns[number], K>;
3972
- } : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never) | null : never : 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;
3973
4850
 
4851
+ /**
4852
+ * Operator to restrict results to only values that are greater than the given value.
4853
+ */
4854
+ declare const greaterThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3974
4855
  /**
3975
4856
  * Operator to restrict results to only values that are greater than the given value.
3976
4857
  */
@@ -3978,15 +4859,35 @@ declare const gt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
3978
4859
  /**
3979
4860
  * Operator to restrict results to only values that are greater than or equal to the given value.
3980
4861
  */
3981
- declare const ge: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4862
+ declare const greaterThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4863
+ /**
4864
+ * Operator to restrict results to only values that are greater than or equal to the given value.
4865
+ */
4866
+ declare const greaterEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3982
4867
  /**
3983
4868
  * Operator to restrict results to only values that are greater than or equal to the given value.
3984
4869
  */
3985
4870
  declare const gte: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4871
+ /**
4872
+ * Operator to restrict results to only values that are greater than or equal to the given value.
4873
+ */
4874
+ declare const ge: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4875
+ /**
4876
+ * Operator to restrict results to only values that are lower than the given value.
4877
+ */
4878
+ declare const lessThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3986
4879
  /**
3987
4880
  * Operator to restrict results to only values that are lower than the given value.
3988
4881
  */
3989
4882
  declare const lt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4883
+ /**
4884
+ * Operator to restrict results to only values that are lower than or equal to the given value.
4885
+ */
4886
+ declare const lessThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4887
+ /**
4888
+ * Operator to restrict results to only values that are lower than or equal to the given value.
4889
+ */
4890
+ declare const lessEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3990
4891
  /**
3991
4892
  * Operator to restrict results to only values that are lower than or equal to the given value.
3992
4893
  */
@@ -4019,6 +4920,10 @@ declare const pattern: (value: string) => StringTypeFilter;
4019
4920
  * Operator to restrict results to only values that are equal to the given value.
4020
4921
  */
4021
4922
  declare const is: <T>(value: T) => PropertyFilter<T>;
4923
+ /**
4924
+ * Operator to restrict results to only values that are equal to the given value.
4925
+ */
4926
+ declare const equals: <T>(value: T) => PropertyFilter<T>;
4022
4927
  /**
4023
4928
  * Operator to restrict results to only values that are not equal to the given value.
4024
4929
  */
@@ -4047,12 +4952,10 @@ declare const includesAny: <T>(value: T) => ArrayFilter<T>;
4047
4952
  declare type SchemaDefinition = {
4048
4953
  table: string;
4049
4954
  };
4050
- declare type SchemaPluginResult<Schemas extends Record<string, BaseData>> = {
4955
+ declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
4051
4956
  [Key in keyof Schemas]: Repository<Schemas[Key]>;
4052
- } & {
4053
- [key: string]: Repository<XataRecord$1>;
4054
4957
  };
4055
- declare class SchemaPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
4958
+ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
4056
4959
  #private;
4057
4960
  constructor(schemaTables?: Schemas.Table[]);
4058
4961
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
@@ -4069,12 +4972,13 @@ declare type BaseClientOptions = {
4069
4972
  databaseURL?: string;
4070
4973
  branch?: BranchStrategyOption;
4071
4974
  cache?: CacheImpl;
4975
+ trace?: TraceFunction;
4072
4976
  };
4073
4977
  declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
4074
4978
  interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
4075
- new <T extends readonly BaseSchema[]>(options?: Partial<BaseClientOptions>, schemaTables?: T): Omit<{
4076
- db: Awaited<ReturnType<SchemaPlugin<SchemaInference<NonNullable<typeof schemaTables>>>['build']>>;
4077
- search: Awaited<ReturnType<SearchPlugin<SchemaInference<NonNullable<typeof schemaTables>>>['build']>>;
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']>>;
4078
4982
  }, keyof Plugins> & {
4079
4983
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
4080
4984
  } & {
@@ -4085,7 +4989,7 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
4085
4989
  };
4086
4990
  }
4087
4991
  declare const BaseClient_base: ClientConstructor<{}>;
4088
- declare class BaseClient extends BaseClient_base<[]> {
4992
+ declare class BaseClient extends BaseClient_base<Record<string, any>> {
4089
4993
  }
4090
4994
 
4091
4995
  declare class Serializer {
@@ -4193,4 +5097,4 @@ declare class XataError extends Error {
4193
5097
  constructor(message: string, status: number);
4194
5098
  }
4195
5099
 
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 };
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 };