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

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;
@@ -185,12 +193,28 @@ declare type Schema = {
185
193
  tables: Table[];
186
194
  tablesOrder?: string[];
187
195
  };
196
+ /**
197
+ * @x-internal true
198
+ */
199
+ declare type SchemaEditScript = {
200
+ sourceMigrationID?: string;
201
+ targetMigrationID?: string;
202
+ tables: TableEdit[];
203
+ };
188
204
  declare type Table = {
189
205
  id?: string;
190
206
  name: TableName;
191
207
  columns: Column[];
192
208
  revLinks?: RevLink[];
193
209
  };
210
+ /**
211
+ * @x-internal true
212
+ */
213
+ declare type TableEdit = {
214
+ oldName?: string;
215
+ newName?: string;
216
+ columns?: MigrationColumnOp[];
217
+ };
194
218
  /**
195
219
  * @x-go-type xata.Column
196
220
  */
@@ -200,6 +224,8 @@ declare type Column = {
200
224
  link?: {
201
225
  table: string;
202
226
  };
227
+ notNull?: boolean;
228
+ unique?: boolean;
203
229
  columns?: Column[];
204
230
  };
205
231
  declare type RevLink = {
@@ -266,6 +292,110 @@ declare type ColumnMigration = {
266
292
  old: Column;
267
293
  ['new']: Column;
268
294
  };
295
+ /**
296
+ * @x-internal true
297
+ */
298
+ declare type Commit = {
299
+ meta?: {
300
+ title?: string;
301
+ message?: string;
302
+ id: string;
303
+ parentID?: string;
304
+ mergeParentID?: string;
305
+ status: string;
306
+ createdAt: DateTime;
307
+ modifiedAt?: DateTime;
308
+ };
309
+ operations: MigrationOp[];
310
+ };
311
+ /**
312
+ * Branch schema migration.
313
+ *
314
+ * @x-internal true
315
+ */
316
+ declare type Migration = {
317
+ parentID?: string;
318
+ operations: MigrationOp[];
319
+ };
320
+ /**
321
+ * Branch schema migration operations.
322
+ *
323
+ * @x-internal true
324
+ */
325
+ declare type MigrationOp = MigrationTableOp | MigrationColumnOp;
326
+ /**
327
+ * @x-internal true
328
+ */
329
+ declare type MigrationTableOp = {
330
+ addTable: TableOpAdd;
331
+ } | {
332
+ removeTable: TableOpRemove;
333
+ } | {
334
+ renameTable: TableOpRename;
335
+ };
336
+ /**
337
+ * @x-internal true
338
+ */
339
+ declare type MigrationColumnOp = {
340
+ addColumn: ColumnOpAdd;
341
+ } | {
342
+ removeColumn: ColumnOpRemove;
343
+ } | {
344
+ renameColumn: ColumnOpRename;
345
+ };
346
+ /**
347
+ * @x-internal true
348
+ */
349
+ declare type TableOpAdd = {
350
+ table: string;
351
+ };
352
+ /**
353
+ * @x-internal true
354
+ */
355
+ declare type TableOpRemove = {
356
+ table: string;
357
+ };
358
+ /**
359
+ * @x-internal true
360
+ */
361
+ declare type TableOpRename = {
362
+ oldName: string;
363
+ newName: string;
364
+ };
365
+ /**
366
+ * @x-internal true
367
+ */
368
+ declare type ColumnOpAdd = {
369
+ table?: string;
370
+ column: Column;
371
+ };
372
+ /**
373
+ * @x-internal true
374
+ */
375
+ declare type ColumnOpRemove = {
376
+ table?: string;
377
+ column: string;
378
+ };
379
+ /**
380
+ * @x-internal true
381
+ */
382
+ declare type ColumnOpRename = {
383
+ table?: string;
384
+ oldName: string;
385
+ newName: string;
386
+ };
387
+ declare type MigrationRequest = {
388
+ number: number;
389
+ createdAt: DateTime;
390
+ modifiedAt?: DateTime;
391
+ closedAt?: DateTime;
392
+ mergedAt?: DateTime;
393
+ status: 'open' | 'closed' | 'merging' | 'merged';
394
+ title: string;
395
+ body: string;
396
+ source: string;
397
+ target: string;
398
+ };
269
399
  declare type SortExpression = string[] | {
270
400
  [key: string]: SortOrder;
271
401
  } | {
@@ -274,7 +404,7 @@ declare type SortExpression = string[] | {
274
404
  declare type SortOrder = 'asc' | 'desc';
275
405
  /**
276
406
  * 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
407
+ * distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
278
408
  * 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
409
  * to allow two typos in a word.
280
410
  *
@@ -466,7 +596,9 @@ type schemas_BranchMetadata = BranchMetadata;
466
596
  type schemas_DBBranch = DBBranch;
467
597
  type schemas_StartedFromMetadata = StartedFromMetadata;
468
598
  type schemas_Schema = Schema;
599
+ type schemas_SchemaEditScript = SchemaEditScript;
469
600
  type schemas_Table = Table;
601
+ type schemas_TableEdit = TableEdit;
470
602
  type schemas_Column = Column;
471
603
  type schemas_RevLink = RevLink;
472
604
  type schemas_BranchName = BranchName;
@@ -479,6 +611,18 @@ type schemas_MetricsLatency = MetricsLatency;
479
611
  type schemas_BranchMigration = BranchMigration;
480
612
  type schemas_TableMigration = TableMigration;
481
613
  type schemas_ColumnMigration = ColumnMigration;
614
+ type schemas_Commit = Commit;
615
+ type schemas_Migration = Migration;
616
+ type schemas_MigrationOp = MigrationOp;
617
+ type schemas_MigrationTableOp = MigrationTableOp;
618
+ type schemas_MigrationColumnOp = MigrationColumnOp;
619
+ type schemas_TableOpAdd = TableOpAdd;
620
+ type schemas_TableOpRemove = TableOpRemove;
621
+ type schemas_TableOpRename = TableOpRename;
622
+ type schemas_ColumnOpAdd = ColumnOpAdd;
623
+ type schemas_ColumnOpRemove = ColumnOpRemove;
624
+ type schemas_ColumnOpRename = ColumnOpRename;
625
+ type schemas_MigrationRequest = MigrationRequest;
482
626
  type schemas_SortExpression = SortExpression;
483
627
  type schemas_SortOrder = SortOrder;
484
628
  type schemas_FuzzinessExpression = FuzzinessExpression;
@@ -525,7 +669,9 @@ declare namespace schemas {
525
669
  schemas_DBBranch as DBBranch,
526
670
  schemas_StartedFromMetadata as StartedFromMetadata,
527
671
  schemas_Schema as Schema,
672
+ schemas_SchemaEditScript as SchemaEditScript,
528
673
  schemas_Table as Table,
674
+ schemas_TableEdit as TableEdit,
529
675
  schemas_Column as Column,
530
676
  schemas_RevLink as RevLink,
531
677
  schemas_BranchName as BranchName,
@@ -538,6 +684,18 @@ declare namespace schemas {
538
684
  schemas_BranchMigration as BranchMigration,
539
685
  schemas_TableMigration as TableMigration,
540
686
  schemas_ColumnMigration as ColumnMigration,
687
+ schemas_Commit as Commit,
688
+ schemas_Migration as Migration,
689
+ schemas_MigrationOp as MigrationOp,
690
+ schemas_MigrationTableOp as MigrationTableOp,
691
+ schemas_MigrationColumnOp as MigrationColumnOp,
692
+ schemas_TableOpAdd as TableOpAdd,
693
+ schemas_TableOpRemove as TableOpRemove,
694
+ schemas_TableOpRename as TableOpRename,
695
+ schemas_ColumnOpAdd as ColumnOpAdd,
696
+ schemas_ColumnOpRemove as ColumnOpRemove,
697
+ schemas_ColumnOpRename as ColumnOpRename,
698
+ schemas_MigrationRequest as MigrationRequest,
541
699
  schemas_SortExpression as SortExpression,
542
700
  schemas_SortOrder as SortOrder,
543
701
  schemas_FuzzinessExpression as FuzzinessExpression,
@@ -603,6 +761,11 @@ declare type BranchMigrationPlan = {
603
761
  migration: BranchMigration;
604
762
  };
605
763
  declare type RecordResponse = XataRecord$1;
764
+ declare type SchemaCompareResponse = {
765
+ source: Schema;
766
+ target: Schema;
767
+ edits: SchemaEditScript;
768
+ };
606
769
  declare type RecordUpdateResponse = XataRecord$1 | {
607
770
  id: string;
608
771
  xata: {
@@ -630,6 +793,7 @@ type responses_BulkError = BulkError;
630
793
  type responses_BulkInsertResponse = BulkInsertResponse;
631
794
  type responses_BranchMigrationPlan = BranchMigrationPlan;
632
795
  type responses_RecordResponse = RecordResponse;
796
+ type responses_SchemaCompareResponse = SchemaCompareResponse;
633
797
  type responses_RecordUpdateResponse = RecordUpdateResponse;
634
798
  type responses_QueryResponse = QueryResponse;
635
799
  type responses_SearchResponse = SearchResponse;
@@ -643,6 +807,7 @@ declare namespace responses {
643
807
  responses_BulkInsertResponse as BulkInsertResponse,
644
808
  responses_BranchMigrationPlan as BranchMigrationPlan,
645
809
  responses_RecordResponse as RecordResponse,
810
+ responses_SchemaCompareResponse as SchemaCompareResponse,
646
811
  responses_RecordUpdateResponse as RecordUpdateResponse,
647
812
  responses_QueryResponse as QueryResponse,
648
813
  responses_SearchResponse as SearchResponse,
@@ -1166,6 +1331,33 @@ declare type GetDatabaseMetadataVariables = {
1166
1331
  * Retrieve metadata of the given database
1167
1332
  */
1168
1333
  declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
1334
+ declare type PatchDatabaseMetadataPathParams = {
1335
+ dbName: DBName;
1336
+ workspace: string;
1337
+ };
1338
+ declare type PatchDatabaseMetadataError = ErrorWrapper<{
1339
+ status: 400;
1340
+ payload: BadRequestError;
1341
+ } | {
1342
+ status: 401;
1343
+ payload: AuthError;
1344
+ } | {
1345
+ status: 404;
1346
+ payload: SimpleError;
1347
+ }>;
1348
+ declare type PatchDatabaseMetadataRequestBody = {
1349
+ ui?: {
1350
+ color?: string;
1351
+ };
1352
+ };
1353
+ declare type PatchDatabaseMetadataVariables = {
1354
+ body?: PatchDatabaseMetadataRequestBody;
1355
+ pathParams: PatchDatabaseMetadataPathParams;
1356
+ } & FetcherExtraProps;
1357
+ /**
1358
+ * Update the color of the selected database
1359
+ */
1360
+ declare const patchDatabaseMetadata: (variables: PatchDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
1169
1361
  declare type GetGitBranchesMappingPathParams = {
1170
1362
  dbName: DBName;
1171
1363
  workspace: string;
@@ -1323,6 +1515,201 @@ declare type ResolveBranchVariables = {
1323
1515
  * ```
1324
1516
  */
1325
1517
  declare const resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
1518
+ declare type ListMigrationRequestsPathParams = {
1519
+ dbName: DBName;
1520
+ workspace: string;
1521
+ };
1522
+ declare type ListMigrationRequestsError = ErrorWrapper<{
1523
+ status: 400;
1524
+ payload: BadRequestError;
1525
+ } | {
1526
+ status: 401;
1527
+ payload: AuthError;
1528
+ } | {
1529
+ status: 404;
1530
+ payload: SimpleError;
1531
+ }>;
1532
+ declare type ListMigrationRequestsResponse = {
1533
+ migrationRequests: MigrationRequest[];
1534
+ meta: RecordsMetadata;
1535
+ };
1536
+ declare type ListMigrationRequestsRequestBody = {
1537
+ filter?: FilterExpression;
1538
+ sort?: SortExpression;
1539
+ page?: PageConfig;
1540
+ columns?: ColumnsProjection;
1541
+ };
1542
+ declare type ListMigrationRequestsVariables = {
1543
+ body?: ListMigrationRequestsRequestBody;
1544
+ pathParams: ListMigrationRequestsPathParams;
1545
+ } & FetcherExtraProps;
1546
+ declare const listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
1547
+ declare type CreateMigrationRequestPathParams = {
1548
+ dbName: DBName;
1549
+ workspace: string;
1550
+ };
1551
+ declare type CreateMigrationRequestError = ErrorWrapper<{
1552
+ status: 400;
1553
+ payload: BadRequestError;
1554
+ } | {
1555
+ status: 401;
1556
+ payload: AuthError;
1557
+ } | {
1558
+ status: 404;
1559
+ payload: SimpleError;
1560
+ }>;
1561
+ declare type CreateMigrationRequestResponse = {
1562
+ number: number;
1563
+ };
1564
+ declare type CreateMigrationRequestRequestBody = {
1565
+ source: string;
1566
+ target: string;
1567
+ title: string;
1568
+ body?: string;
1569
+ };
1570
+ declare type CreateMigrationRequestVariables = {
1571
+ body: CreateMigrationRequestRequestBody;
1572
+ pathParams: CreateMigrationRequestPathParams;
1573
+ } & FetcherExtraProps;
1574
+ declare const createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
1575
+ declare type GetMigrationRequestPathParams = {
1576
+ dbName: DBName;
1577
+ mrNumber: number;
1578
+ workspace: string;
1579
+ };
1580
+ declare type GetMigrationRequestError = ErrorWrapper<{
1581
+ status: 400;
1582
+ payload: BadRequestError;
1583
+ } | {
1584
+ status: 401;
1585
+ payload: AuthError;
1586
+ } | {
1587
+ status: 404;
1588
+ payload: SimpleError;
1589
+ }>;
1590
+ declare type GetMigrationRequestVariables = {
1591
+ pathParams: GetMigrationRequestPathParams;
1592
+ } & FetcherExtraProps;
1593
+ declare const getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
1594
+ declare type UpdateMigrationRequestPathParams = {
1595
+ dbName: DBName;
1596
+ mrNumber: number;
1597
+ workspace: string;
1598
+ };
1599
+ declare type UpdateMigrationRequestError = ErrorWrapper<{
1600
+ status: 400;
1601
+ payload: BadRequestError;
1602
+ } | {
1603
+ status: 401;
1604
+ payload: AuthError;
1605
+ } | {
1606
+ status: 404;
1607
+ payload: SimpleError;
1608
+ }>;
1609
+ declare type UpdateMigrationRequestRequestBody = {
1610
+ title?: string;
1611
+ body?: string;
1612
+ status?: 'open' | 'closed';
1613
+ };
1614
+ declare type UpdateMigrationRequestVariables = {
1615
+ body?: UpdateMigrationRequestRequestBody;
1616
+ pathParams: UpdateMigrationRequestPathParams;
1617
+ } & FetcherExtraProps;
1618
+ declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
1619
+ declare type ListMigrationRequestsCommitsPathParams = {
1620
+ dbName: DBName;
1621
+ mrNumber: number;
1622
+ workspace: string;
1623
+ };
1624
+ declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
1625
+ status: 400;
1626
+ payload: BadRequestError;
1627
+ } | {
1628
+ status: 401;
1629
+ payload: AuthError;
1630
+ } | {
1631
+ status: 404;
1632
+ payload: SimpleError;
1633
+ }>;
1634
+ declare type ListMigrationRequestsCommitsResponse = {
1635
+ meta: {
1636
+ cursor: string;
1637
+ more: boolean;
1638
+ };
1639
+ logs: Commit[];
1640
+ };
1641
+ declare type ListMigrationRequestsCommitsRequestBody = {
1642
+ page?: {
1643
+ after?: string;
1644
+ before?: string;
1645
+ size?: number;
1646
+ };
1647
+ };
1648
+ declare type ListMigrationRequestsCommitsVariables = {
1649
+ body?: ListMigrationRequestsCommitsRequestBody;
1650
+ pathParams: ListMigrationRequestsCommitsPathParams;
1651
+ } & FetcherExtraProps;
1652
+ declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
1653
+ declare type CompareMigrationRequestPathParams = {
1654
+ dbName: DBName;
1655
+ mrNumber: number;
1656
+ workspace: string;
1657
+ };
1658
+ declare type CompareMigrationRequestError = ErrorWrapper<{
1659
+ status: 400;
1660
+ payload: BadRequestError;
1661
+ } | {
1662
+ status: 401;
1663
+ payload: AuthError;
1664
+ } | {
1665
+ status: 404;
1666
+ payload: SimpleError;
1667
+ }>;
1668
+ declare type CompareMigrationRequestVariables = {
1669
+ pathParams: CompareMigrationRequestPathParams;
1670
+ } & FetcherExtraProps;
1671
+ declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
1672
+ declare type GetMigrationRequestIsMergedPathParams = {
1673
+ dbName: DBName;
1674
+ mrNumber: number;
1675
+ workspace: string;
1676
+ };
1677
+ declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
1678
+ status: 400;
1679
+ payload: BadRequestError;
1680
+ } | {
1681
+ status: 401;
1682
+ payload: AuthError;
1683
+ } | {
1684
+ status: 404;
1685
+ payload: SimpleError;
1686
+ }>;
1687
+ declare type GetMigrationRequestIsMergedResponse = {
1688
+ merged?: boolean;
1689
+ };
1690
+ declare type GetMigrationRequestIsMergedVariables = {
1691
+ pathParams: GetMigrationRequestIsMergedPathParams;
1692
+ } & FetcherExtraProps;
1693
+ declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
1694
+ declare type MergeMigrationRequestPathParams = {
1695
+ dbName: DBName;
1696
+ mrNumber: number;
1697
+ workspace: string;
1698
+ };
1699
+ declare type MergeMigrationRequestError = 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 MergeMigrationRequestVariables = {
1710
+ pathParams: MergeMigrationRequestPathParams;
1711
+ } & FetcherExtraProps;
1712
+ declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
1326
1713
  declare type GetBranchDetailsPathParams = {
1327
1714
  dbBranchName: DBBranchName;
1328
1715
  workspace: string;
@@ -1508,6 +1895,157 @@ declare type GetBranchMigrationPlanVariables = {
1508
1895
  * Compute a migration plan from a target schema the branch should be migrated too.
1509
1896
  */
1510
1897
  declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
1898
+ declare type CompareBranchWithUserSchemaPathParams = {
1899
+ dbBranchName: DBBranchName;
1900
+ workspace: string;
1901
+ };
1902
+ declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
1903
+ status: 400;
1904
+ payload: BadRequestError;
1905
+ } | {
1906
+ status: 401;
1907
+ payload: AuthError;
1908
+ } | {
1909
+ status: 404;
1910
+ payload: SimpleError;
1911
+ }>;
1912
+ declare type CompareBranchWithUserSchemaRequestBody = {
1913
+ schema: Schema;
1914
+ };
1915
+ declare type CompareBranchWithUserSchemaVariables = {
1916
+ body: CompareBranchWithUserSchemaRequestBody;
1917
+ pathParams: CompareBranchWithUserSchemaPathParams;
1918
+ } & FetcherExtraProps;
1919
+ declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
1920
+ declare type CompareBranchSchemasPathParams = {
1921
+ dbBranchName: DBBranchName;
1922
+ branchName: BranchName;
1923
+ workspace: string;
1924
+ };
1925
+ declare type CompareBranchSchemasError = ErrorWrapper<{
1926
+ status: 400;
1927
+ payload: BadRequestError;
1928
+ } | {
1929
+ status: 401;
1930
+ payload: AuthError;
1931
+ } | {
1932
+ status: 404;
1933
+ payload: SimpleError;
1934
+ }>;
1935
+ declare type CompareBranchSchemasVariables = {
1936
+ body?: Record<string, any>;
1937
+ pathParams: CompareBranchSchemasPathParams;
1938
+ } & FetcherExtraProps;
1939
+ declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
1940
+ declare type UpdateBranchSchemaPathParams = {
1941
+ dbBranchName: DBBranchName;
1942
+ workspace: string;
1943
+ };
1944
+ declare type UpdateBranchSchemaError = ErrorWrapper<{
1945
+ status: 400;
1946
+ payload: BadRequestError;
1947
+ } | {
1948
+ status: 401;
1949
+ payload: AuthError;
1950
+ } | {
1951
+ status: 404;
1952
+ payload: SimpleError;
1953
+ }>;
1954
+ declare type UpdateBranchSchemaResponse = {
1955
+ id: string;
1956
+ parentID: string;
1957
+ };
1958
+ declare type UpdateBranchSchemaVariables = {
1959
+ body: Migration;
1960
+ pathParams: UpdateBranchSchemaPathParams;
1961
+ } & FetcherExtraProps;
1962
+ declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
1963
+ declare type PreviewBranchSchemaEditPathParams = {
1964
+ dbBranchName: DBBranchName;
1965
+ workspace: string;
1966
+ };
1967
+ declare type PreviewBranchSchemaEditError = ErrorWrapper<{
1968
+ status: 400;
1969
+ payload: BadRequestError;
1970
+ } | {
1971
+ status: 401;
1972
+ payload: AuthError;
1973
+ } | {
1974
+ status: 404;
1975
+ payload: SimpleError;
1976
+ }>;
1977
+ declare type PreviewBranchSchemaEditResponse = {
1978
+ original: Schema;
1979
+ updated: Schema;
1980
+ };
1981
+ declare type PreviewBranchSchemaEditRequestBody = {
1982
+ edits?: SchemaEditScript;
1983
+ operations?: MigrationOp[];
1984
+ };
1985
+ declare type PreviewBranchSchemaEditVariables = {
1986
+ body?: PreviewBranchSchemaEditRequestBody;
1987
+ pathParams: PreviewBranchSchemaEditPathParams;
1988
+ } & FetcherExtraProps;
1989
+ declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
1990
+ declare type ApplyBranchSchemaEditPathParams = {
1991
+ dbBranchName: DBBranchName;
1992
+ workspace: string;
1993
+ };
1994
+ declare type ApplyBranchSchemaEditError = ErrorWrapper<{
1995
+ status: 400;
1996
+ payload: BadRequestError;
1997
+ } | {
1998
+ status: 401;
1999
+ payload: AuthError;
2000
+ } | {
2001
+ status: 404;
2002
+ payload: SimpleError;
2003
+ }>;
2004
+ declare type ApplyBranchSchemaEditResponse = {
2005
+ id: string;
2006
+ parentID: string;
2007
+ };
2008
+ declare type ApplyBranchSchemaEditRequestBody = {
2009
+ edits: SchemaEditScript;
2010
+ };
2011
+ declare type ApplyBranchSchemaEditVariables = {
2012
+ body: ApplyBranchSchemaEditRequestBody;
2013
+ pathParams: ApplyBranchSchemaEditPathParams;
2014
+ } & FetcherExtraProps;
2015
+ declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
2016
+ declare type GetBranchSchemaHistoryPathParams = {
2017
+ dbBranchName: DBBranchName;
2018
+ workspace: string;
2019
+ };
2020
+ declare type GetBranchSchemaHistoryError = ErrorWrapper<{
2021
+ status: 400;
2022
+ payload: BadRequestError;
2023
+ } | {
2024
+ status: 401;
2025
+ payload: AuthError;
2026
+ } | {
2027
+ status: 404;
2028
+ payload: SimpleError;
2029
+ }>;
2030
+ declare type GetBranchSchemaHistoryResponse = {
2031
+ meta: {
2032
+ cursor: string;
2033
+ more: boolean;
2034
+ };
2035
+ logs: Commit[];
2036
+ };
2037
+ declare type GetBranchSchemaHistoryRequestBody = {
2038
+ page?: {
2039
+ after?: string;
2040
+ before?: string;
2041
+ size?: number;
2042
+ };
2043
+ };
2044
+ declare type GetBranchSchemaHistoryVariables = {
2045
+ body?: GetBranchSchemaHistoryRequestBody;
2046
+ pathParams: GetBranchSchemaHistoryPathParams;
2047
+ } & FetcherExtraProps;
2048
+ declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
1511
2049
  declare type GetBranchStatsPathParams = {
1512
2050
  dbBranchName: DBBranchName;
1513
2051
  workspace: string;
@@ -2802,6 +3340,7 @@ declare type SearchBranchRequestBody = {
2802
3340
  })[];
2803
3341
  query: string;
2804
3342
  fuzziness?: FuzzinessExpression;
3343
+ prefix?: PrefixExpression;
2805
3344
  highlight?: HighlightExpression;
2806
3345
  };
2807
3346
  declare type SearchBranchVariables = {
@@ -2841,6 +3380,7 @@ declare const operationsByTag: {
2841
3380
  createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
2842
3381
  deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
2843
3382
  getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
3383
+ patchDatabaseMetadata: (variables: PatchDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
2844
3384
  getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
2845
3385
  addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
2846
3386
  removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
@@ -2853,10 +3393,28 @@ declare const operationsByTag: {
2853
3393
  deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
2854
3394
  updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
2855
3395
  getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
3396
+ getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
3397
+ };
3398
+ migrationRequests: {
3399
+ listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
3400
+ createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
3401
+ getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
3402
+ updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
3403
+ listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
3404
+ compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
3405
+ getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
3406
+ mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
3407
+ };
3408
+ branchSchema: {
2856
3409
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
2857
3410
  executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
2858
3411
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
2859
- getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
3412
+ compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
3413
+ compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
3414
+ updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
3415
+ previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
3416
+ applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
3417
+ getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
2860
3418
  };
2861
3419
  table: {
2862
3420
  createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
@@ -2895,10 +3453,8 @@ interface XataApiClientOptions {
2895
3453
  fetch?: FetchImpl;
2896
3454
  apiKey?: string;
2897
3455
  host?: HostProvider;
3456
+ trace?: TraceFunction;
2898
3457
  }
2899
- /**
2900
- * @deprecated Use XataApiPlugin instead
2901
- */
2902
3458
  declare class XataApiClient {
2903
3459
  #private;
2904
3460
  constructor(options?: XataApiClientOptions);
@@ -2908,6 +3464,8 @@ declare class XataApiClient {
2908
3464
  get branches(): BranchApi;
2909
3465
  get tables(): TableApi;
2910
3466
  get records(): RecordsApi;
3467
+ get migrationRequests(): MigrationRequestsApi;
3468
+ get branchSchema(): BranchSchemaApi;
2911
3469
  }
2912
3470
  declare class UserApi {
2913
3471
  private extraProps;
@@ -2943,6 +3501,7 @@ declare class DatabaseApi {
2943
3501
  createDatabase(workspace: WorkspaceID, dbName: DBName, options?: CreateDatabaseRequestBody): Promise<CreateDatabaseResponse>;
2944
3502
  deleteDatabase(workspace: WorkspaceID, dbName: DBName): Promise<void>;
2945
3503
  getDatabaseMetadata(workspace: WorkspaceID, dbName: DBName): Promise<DatabaseMetadata>;
3504
+ patchDatabaseMetadata(workspace: WorkspaceID, dbName: DBName, options?: PatchDatabaseMetadataRequestBody): Promise<DatabaseMetadata>;
2946
3505
  getGitBranchesMapping(workspace: WorkspaceID, dbName: DBName): Promise<ListGitBranchesResponse>;
2947
3506
  addGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, body: AddGitBranchesEntryRequestBody): Promise<AddGitBranchesEntryResponse>;
2948
3507
  removeGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, gitBranch: string): Promise<void>;
@@ -2957,9 +3516,6 @@ declare class BranchApi {
2957
3516
  deleteBranch(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<void>;
2958
3517
  updateBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName, metadata?: BranchMetadata): Promise<void>;
2959
3518
  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
3519
  getBranchStats(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<GetBranchStatsResponse>;
2964
3520
  }
2965
3521
  declare class TableApi {
@@ -2990,6 +3546,31 @@ declare class RecordsApi {
2990
3546
  searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
2991
3547
  searchBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, query: SearchBranchRequestBody): Promise<SearchResponse>;
2992
3548
  }
3549
+ declare class MigrationRequestsApi {
3550
+ private extraProps;
3551
+ constructor(extraProps: FetcherExtraProps);
3552
+ listMigrationRequests(workspace: WorkspaceID, database: DBName, options?: ListMigrationRequestsRequestBody): Promise<ListMigrationRequestsResponse>;
3553
+ createMigrationRequest(workspace: WorkspaceID, database: DBName, options: CreateMigrationRequestRequestBody): Promise<CreateMigrationRequestResponse>;
3554
+ getMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<MigrationRequest>;
3555
+ updateMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number, options: UpdateMigrationRequestRequestBody): Promise<void>;
3556
+ listMigrationRequestsCommits(workspace: WorkspaceID, database: DBName, migrationRequest: number, options?: ListMigrationRequestsCommitsRequestBody): Promise<ListMigrationRequestsCommitsResponse>;
3557
+ compareMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<SchemaCompareResponse>;
3558
+ getMigrationRequestIsMerged(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<GetMigrationRequestIsMergedResponse>;
3559
+ mergeMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<Commit>;
3560
+ }
3561
+ declare class BranchSchemaApi {
3562
+ private extraProps;
3563
+ constructor(extraProps: FetcherExtraProps);
3564
+ getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
3565
+ executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
3566
+ getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
3567
+ compareBranchWithUserSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
3568
+ compareBranchSchemas(workspace: WorkspaceID, database: DBName, branch: BranchName, branchName: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
3569
+ updateBranchSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<UpdateBranchSchemaResponse>;
3570
+ previewBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<PreviewBranchSchemaEditResponse>;
3571
+ applyBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, edits: SchemaEditScript): Promise<ApplyBranchSchemaEditResponse>;
3572
+ getBranchSchemaHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchSchemaHistoryRequestBody): Promise<GetBranchSchemaHistoryResponse>;
3573
+ }
2993
3574
 
2994
3575
  declare class XataApiPlugin implements XataPlugin {
2995
3576
  build(options: XataPluginOptions): Promise<XataApiClient>;
@@ -3058,12 +3639,12 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
3058
3639
  /**
3059
3640
  * Retrieves a refreshed copy of the current record from the database.
3060
3641
  * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3061
- * @returns The persisted record with the selected columns.
3642
+ * @returns The persisted record with the selected columns, null if not found.
3062
3643
  */
3063
3644
  read<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3064
3645
  /**
3065
3646
  * Retrieves a refreshed copy of the current record from the database.
3066
- * @returns The persisted record with all first level properties.
3647
+ * @returns The persisted record with all first level properties, null if not found.
3067
3648
  */
3068
3649
  read(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3069
3650
  /**
@@ -3071,22 +3652,28 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
3071
3652
  * returned and the current object is not mutated.
3072
3653
  * @param partialUpdate The columns and their values that have to be updated.
3073
3654
  * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3074
- * @returns The persisted record with the selected columns.
3655
+ * @returns The persisted record with the selected columns, null if not found.
3075
3656
  */
3076
- update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>>>;
3657
+ update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<OriginalRecord>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3077
3658
  /**
3078
3659
  * Performs a partial update of the current record. On success a new object is
3079
3660
  * returned and the current object is not mutated.
3080
3661
  * @param partialUpdate The columns and their values that have to be updated.
3081
- * @returns The persisted record with all first level properties.
3662
+ * @returns The persisted record with all first level properties, null if not found.
3082
3663
  */
3083
- update(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>>>;
3664
+ update(partialUpdate: Partial<EditableData<OriginalRecord>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3084
3665
  /**
3085
3666
  * 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.
3667
+ * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3668
+ * @returns The deleted record, null if not found.
3088
3669
  */
3089
- delete(): Promise<void>;
3670
+ delete<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3671
+ /**
3672
+ * Performs a deletion of the current record in the database.
3673
+ * @returns The deleted record, null if not found.
3674
+
3675
+ */
3676
+ delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3090
3677
  }
3091
3678
  declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update'> & {
3092
3679
  /**
@@ -3099,7 +3686,7 @@ declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update
3099
3686
  * @param partialUpdate The columns and their values that have to be updated.
3100
3687
  * @returns A new record containing the latest values for all the columns of the current record.
3101
3688
  */
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 : ['*']>>>;
3689
+ update<K extends SelectableColumn<Record>>(partialUpdate: Partial<EditableData<Record>>, columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>>>;
3103
3690
  /**
3104
3691
  * Performs a deletion of the current record in the database.
3105
3692
  *
@@ -3116,13 +3703,13 @@ declare type XataRecordMetadata = {
3116
3703
  };
3117
3704
  declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
3118
3705
  declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
3119
- declare type EditableData<O extends BaseData> = {
3706
+ declare type EditableData<O extends XataRecord> = Identifiable & Omit<{
3120
3707
  [K in keyof O]: O[K] extends XataRecord ? {
3121
3708
  id: string;
3122
3709
  } | string : NonNullable<O[K]> extends XataRecord ? {
3123
3710
  id: string;
3124
3711
  } | string | null | undefined : O[K];
3125
- };
3712
+ }, keyof XataRecord>;
3126
3713
 
3127
3714
  /**
3128
3715
  * PropertyMatchFilter
@@ -3216,7 +3803,7 @@ declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFi
3216
3803
  declare type NestedApiFilter<T> = {
3217
3804
  [key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
3218
3805
  };
3219
- declare type Filter<T> = T extends Record<string, any> ? BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
3806
+ 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
3807
 
3221
3808
  declare type DateBooster = {
3222
3809
  origin?: string;
@@ -3273,7 +3860,7 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
3273
3860
  [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>[]>;
3274
3861
  }>;
3275
3862
  };
3276
- declare class SearchPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
3863
+ declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
3277
3864
  #private;
3278
3865
  private db;
3279
3866
  constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
@@ -3331,7 +3918,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3331
3918
  #private;
3332
3919
  readonly meta: PaginationQueryMeta;
3333
3920
  readonly records: RecordArray<Result>;
3334
- constructor(repository: Repository<Record> | null, table: string, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
3921
+ constructor(repository: Repository<Record> | null, table: {
3922
+ name: string;
3923
+ schema?: Table;
3924
+ }, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
3335
3925
  getQueryOptions(): QueryOptions<Record>;
3336
3926
  key(): string;
3337
3927
  /**
@@ -3370,7 +3960,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3370
3960
  * @param value The value to filter.
3371
3961
  * @returns A new Query object.
3372
3962
  */
3373
- filter<F extends SelectableColumn<Record>>(column: F, value: Filter<ValueAtColumn<Record, F>>): Query<Record, Result>;
3963
+ filter<F extends SelectableColumn<Record>>(column: F, value: Filter<NonNullable<ValueAtColumn<Record, F>>>): Query<Record, Result>;
3374
3964
  /**
3375
3965
  * Builds a new query object adding one or more constraints. Examples:
3376
3966
  *
@@ -3384,7 +3974,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3384
3974
  * @param filters A filter object
3385
3975
  * @returns A new Query object.
3386
3976
  */
3387
- filter(filters: Filter<Record>): Query<Record, Result>;
3977
+ filter(filters?: Filter<Record>): Query<Record, Result>;
3978
+ defaultFilter<T>(column: string, value: T): T | {
3979
+ $includes: (T & string) | (T & string[]);
3980
+ };
3388
3981
  /**
3389
3982
  * Builds a new query with a new sort option.
3390
3983
  * @param column The column name.
@@ -3663,9 +4256,9 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
3663
4256
  /**
3664
4257
  * Common interface for performing operations on a table.
3665
4258
  */
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, ['*']>>>;
4259
+ declare abstract class Repository<Record extends XataRecord> extends Query<Record, Readonly<SelectedPick<Record, ['*']>>> {
4260
+ abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4261
+ abstract create(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3669
4262
  /**
3670
4263
  * Creates a single record in the table with a unique id.
3671
4264
  * @param id The unique id.
@@ -3673,27 +4266,27 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3673
4266
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3674
4267
  * @returns The full persisted record.
3675
4268
  */
3676
- abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4269
+ abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3677
4270
  /**
3678
4271
  * Creates a single record in the table with a unique id.
3679
4272
  * @param id The unique id.
3680
4273
  * @param object Object containing the column names with their values to be stored in the table.
3681
4274
  * @returns The full persisted record.
3682
4275
  */
3683
- abstract create(id: string, object: Omit<EditableData<Data>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4276
+ abstract create(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3684
4277
  /**
3685
4278
  * Creates multiple records in the table.
3686
4279
  * @param objects Array of objects with the column names and the values to be stored in the table.
3687
4280
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3688
4281
  * @returns Array of the persisted records in order.
3689
4282
  */
3690
- abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Data>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
4283
+ abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3691
4284
  /**
3692
4285
  * Creates multiple records in the table.
3693
4286
  * @param objects Array of objects with the column names and the values to be stored in the table.
3694
4287
  * @returns Array of the persisted records in order.
3695
4288
  */
3696
- abstract create(objects: Array<Omit<EditableData<Data>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
4289
+ abstract create(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3697
4290
  /**
3698
4291
  * Queries a single record from the table given its unique id.
3699
4292
  * @param id The unique id.
@@ -3750,43 +4343,43 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3750
4343
  * Partially update a single record.
3751
4344
  * @param object An object with its id and the columns to be updated.
3752
4345
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3753
- * @returns The full persisted record.
4346
+ * @returns The full persisted record, null if the record could not be found.
3754
4347
  */
3755
- abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Data>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4348
+ abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3756
4349
  /**
3757
4350
  * Partially update a single record.
3758
4351
  * @param object An object with its id and the columns to be updated.
3759
- * @returns The full persisted record.
4352
+ * @returns The full persisted record, null if the record could not be found.
3760
4353
  */
3761
- abstract update(object: Partial<EditableData<Data>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4354
+ abstract update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3762
4355
  /**
3763
4356
  * Partially update a single record given its unique id.
3764
4357
  * @param id The unique id.
3765
4358
  * @param object The column names and their values that have to be updated.
3766
4359
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3767
- * @returns The full persisted record.
4360
+ * @returns The full persisted record, null if the record could not be found.
3768
4361
  */
3769
- abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Data>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4362
+ abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3770
4363
  /**
3771
4364
  * Partially update a single record given its unique id.
3772
4365
  * @param id The unique id.
3773
4366
  * @param object The column names and their values that have to be updated.
3774
- * @returns The full persisted record.
4367
+ * @returns The full persisted record, null if the record could not be found.
3775
4368
  */
3776
- abstract update(id: string, object: Partial<EditableData<Data>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4369
+ abstract update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3777
4370
  /**
3778
4371
  * Partially updates multiple records.
3779
4372
  * @param objects An array of objects with their ids and columns to be updated.
3780
4373
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3781
- * @returns Array of the persisted records in order.
4374
+ * @returns Array of the persisted records in order (if a record could not be found null is returned).
3782
4375
  */
3783
- abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Data>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
4376
+ abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
3784
4377
  /**
3785
4378
  * Partially updates multiple records.
3786
4379
  * @param objects An array of objects with their ids and columns to be updated.
3787
- * @returns Array of the persisted records in order.
4380
+ * @returns Array of the persisted records in order (if a record could not be found null is returned).
3788
4381
  */
3789
- abstract update(objects: Array<Partial<EditableData<Data>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
4382
+ abstract update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
3790
4383
  /**
3791
4384
  * Creates or updates a single record. If a record exists with the given id,
3792
4385
  * it will be update, otherwise a new record will be created.
@@ -3794,14 +4387,14 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3794
4387
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3795
4388
  * @returns The full persisted record.
3796
4389
  */
3797
- abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Data> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4390
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3798
4391
  /**
3799
4392
  * Creates or updates a single record. If a record exists with the given id,
3800
4393
  * it will be update, otherwise a new record will be created.
3801
4394
  * @param object Object containing the column names with their values to be persisted in the table.
3802
4395
  * @returns The full persisted record.
3803
4396
  */
3804
- abstract createOrUpdate(object: EditableData<Data> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4397
+ abstract createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3805
4398
  /**
3806
4399
  * Creates or updates a single record. If a record exists with the given id,
3807
4400
  * it will be update, otherwise a new record will be created.
@@ -3810,7 +4403,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3810
4403
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3811
4404
  * @returns The full persisted record.
3812
4405
  */
3813
- abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4406
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3814
4407
  /**
3815
4408
  * Creates or updates a single record. If a record exists with the given id,
3816
4409
  * it will be update, otherwise a new record will be created.
@@ -3818,7 +4411,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3818
4411
  * @param object The column names and the values to be persisted.
3819
4412
  * @returns The full persisted record.
3820
4413
  */
3821
- abstract createOrUpdate(id: string, object: Omit<EditableData<Data>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4414
+ abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3822
4415
  /**
3823
4416
  * Creates or updates a single record. If a record exists with the given id,
3824
4417
  * it will be update, otherwise a new record will be created.
@@ -3826,38 +4419,66 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3826
4419
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3827
4420
  * @returns Array of the persisted records.
3828
4421
  */
3829
- abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Data> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
4422
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3830
4423
  /**
3831
4424
  * Creates or updates a single record. If a record exists with the given id,
3832
4425
  * it will be update, otherwise a new record will be created.
3833
4426
  * @param objects Array of objects with the column names and the values to be stored in the table.
3834
4427
  * @returns Array of the persisted records.
3835
4428
  */
3836
- abstract createOrUpdate(objects: Array<EditableData<Data> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
4429
+ abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3837
4430
  /**
3838
4431
  * Deletes a record given its unique id.
3839
- * @param id The unique id.
3840
- * @throws If the record could not be found or there was an error while performing the deletion.
4432
+ * @param object An object with a unique id.
4433
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
4434
+ * @returns The deleted record, null if the record could not be found.
3841
4435
  */
3842
- abstract delete(id: string): Promise<void>;
4436
+ abstract delete<K extends SelectableColumn<Record>>(object: Identifiable & Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3843
4437
  /**
3844
4438
  * 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.
4439
+ * @param object An object with a unique id.
4440
+ * @returns The deleted record, null if the record could not be found.
3847
4441
  */
3848
- abstract delete(id: Identifiable): Promise<void>;
4442
+ abstract delete(object: Identifiable & Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3849
4443
  /**
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.
4444
+ * Deletes a record given a unique id.
4445
+ * @param id The unique id.
4446
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
4447
+ * @returns The deleted record, null if the record could not be found.
3853
4448
  */
3854
- abstract delete(ids: string[]): Promise<void>;
4449
+ abstract delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3855
4450
  /**
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.
4451
+ * Deletes a record given a unique id.
4452
+ * @param id The unique id.
4453
+ * @returns The deleted record, null if the record could not be found.
3859
4454
  */
3860
- abstract delete(ids: Identifiable[]): Promise<void>;
4455
+ abstract delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
4456
+ /**
4457
+ * Deletes multiple records given an array of objects with ids.
4458
+ * @param objects An array of objects with unique ids.
4459
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
4460
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
4461
+ */
4462
+ abstract delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
4463
+ /**
4464
+ * Deletes multiple records given an array of objects with ids.
4465
+ * @param objects An array of objects with unique ids.
4466
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
4467
+ */
4468
+ abstract delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
4469
+ /**
4470
+ * Deletes multiple records given an array of unique ids.
4471
+ * @param objects An array of ids.
4472
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
4473
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
4474
+ */
4475
+ abstract delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
4476
+ /**
4477
+ * Deletes multiple records given an array of unique ids.
4478
+ * @param objects An array of ids.
4479
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
4480
+ */
4481
+ abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
3861
4482
  /**
3862
4483
  * Search for records in the table.
3863
4484
  * @param query The query to search for.
@@ -3873,7 +4494,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3873
4494
  }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
3874
4495
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
3875
4496
  }
3876
- declare class RestRepository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Data, Record> {
4497
+ declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
3877
4498
  #private;
3878
4499
  constructor(options: {
3879
4500
  table: string;
@@ -3881,33 +4502,40 @@ declare class RestRepository<Data extends BaseData, Record extends XataRecord =
3881
4502
  pluginOptions: XataPluginOptions;
3882
4503
  schemaTables?: Table[];
3883
4504
  });
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>;
4505
+ create<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4506
+ create(object: EditableData<Record> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4507
+ create<K extends SelectableColumn<Record>>(id: string, object: EditableData<Record>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4508
+ create(id: string, object: EditableData<Record>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4509
+ create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
4510
+ create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
4511
+ read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
4512
+ read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
4513
+ read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
4514
+ read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
4515
+ read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
4516
+ read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
4517
+ read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
4518
+ read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
4519
+ update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
4520
+ update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
4521
+ update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
4522
+ update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
4523
+ update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
4524
+ update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
4525
+ createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4526
+ createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4527
+ createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
4528
+ createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4529
+ createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
4530
+ createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
4531
+ delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
4532
+ delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
4533
+ delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
4534
+ delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
4535
+ delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
4536
+ delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
4537
+ delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
4538
+ delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
3911
4539
  search(query: string, options?: {
3912
4540
  fuzziness?: FuzzinessExpression;
3913
4541
  prefix?: PrefixExpression;
@@ -3971,6 +4599,10 @@ declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
3971
4599
  [K in ObjectColumns[number]['name']]?: PropertyType<Tables, ObjectColumns[number], K>;
3972
4600
  } : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never) | null : never : never;
3973
4601
 
4602
+ /**
4603
+ * Operator to restrict results to only values that are greater than the given value.
4604
+ */
4605
+ declare const greaterThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3974
4606
  /**
3975
4607
  * Operator to restrict results to only values that are greater than the given value.
3976
4608
  */
@@ -3978,15 +4610,35 @@ declare const gt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
3978
4610
  /**
3979
4611
  * Operator to restrict results to only values that are greater than or equal to the given value.
3980
4612
  */
3981
- declare const ge: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4613
+ declare const greaterThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4614
+ /**
4615
+ * Operator to restrict results to only values that are greater than or equal to the given value.
4616
+ */
4617
+ declare const greaterEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3982
4618
  /**
3983
4619
  * Operator to restrict results to only values that are greater than or equal to the given value.
3984
4620
  */
3985
4621
  declare const gte: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4622
+ /**
4623
+ * Operator to restrict results to only values that are greater than or equal to the given value.
4624
+ */
4625
+ declare const ge: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4626
+ /**
4627
+ * Operator to restrict results to only values that are lower than the given value.
4628
+ */
4629
+ declare const lessThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3986
4630
  /**
3987
4631
  * Operator to restrict results to only values that are lower than the given value.
3988
4632
  */
3989
4633
  declare const lt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4634
+ /**
4635
+ * Operator to restrict results to only values that are lower than or equal to the given value.
4636
+ */
4637
+ declare const lessThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
4638
+ /**
4639
+ * Operator to restrict results to only values that are lower than or equal to the given value.
4640
+ */
4641
+ declare const lessEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3990
4642
  /**
3991
4643
  * Operator to restrict results to only values that are lower than or equal to the given value.
3992
4644
  */
@@ -4019,6 +4671,10 @@ declare const pattern: (value: string) => StringTypeFilter;
4019
4671
  * Operator to restrict results to only values that are equal to the given value.
4020
4672
  */
4021
4673
  declare const is: <T>(value: T) => PropertyFilter<T>;
4674
+ /**
4675
+ * Operator to restrict results to only values that are equal to the given value.
4676
+ */
4677
+ declare const equals: <T>(value: T) => PropertyFilter<T>;
4022
4678
  /**
4023
4679
  * Operator to restrict results to only values that are not equal to the given value.
4024
4680
  */
@@ -4047,12 +4703,10 @@ declare const includesAny: <T>(value: T) => ArrayFilter<T>;
4047
4703
  declare type SchemaDefinition = {
4048
4704
  table: string;
4049
4705
  };
4050
- declare type SchemaPluginResult<Schemas extends Record<string, BaseData>> = {
4706
+ declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
4051
4707
  [Key in keyof Schemas]: Repository<Schemas[Key]>;
4052
- } & {
4053
- [key: string]: Repository<XataRecord$1>;
4054
4708
  };
4055
- declare class SchemaPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
4709
+ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
4056
4710
  #private;
4057
4711
  constructor(schemaTables?: Schemas.Table[]);
4058
4712
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
@@ -4069,12 +4723,13 @@ declare type BaseClientOptions = {
4069
4723
  databaseURL?: string;
4070
4724
  branch?: BranchStrategyOption;
4071
4725
  cache?: CacheImpl;
4726
+ trace?: TraceFunction;
4072
4727
  };
4073
4728
  declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
4074
4729
  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']>>;
4730
+ new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
4731
+ db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
4732
+ search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
4078
4733
  }, keyof Plugins> & {
4079
4734
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
4080
4735
  } & {
@@ -4085,7 +4740,7 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
4085
4740
  };
4086
4741
  }
4087
4742
  declare const BaseClient_base: ClientConstructor<{}>;
4088
- declare class BaseClient extends BaseClient_base<[]> {
4743
+ declare class BaseClient extends BaseClient_base<Record<string, any>> {
4089
4744
  }
4090
4745
 
4091
4746
  declare class Serializer {
@@ -4193,4 +4848,4 @@ declare class XataError extends Error {
4193
4848
  constructor(message: string, status: number);
4194
4849
  }
4195
4850
 
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 };
4851
+ export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditResponse, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListMigrationRequestsError, ListMigrationRequestsPathParams, ListMigrationRequestsRequestBody, ListMigrationRequestsResponse, ListMigrationRequestsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PatchDatabaseMetadataError, PatchDatabaseMetadataPathParams, PatchDatabaseMetadataRequestBody, PatchDatabaseMetadataVariables, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaResponse, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, applyBranchSchemaEdit, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequests, listMigrationRequestsCommits, lt, lte, mergeMigrationRequest, notExists, operationsByTag, patchDatabaseMetadata, pattern, previewBranchSchemaEdit, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, updateBranchMetadata, updateBranchSchema, updateColumn, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };