@xata.io/client 0.0.0-alpha.vfbac5b5 → 0.0.0-alpha.vfc692f9

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
@@ -23,7 +23,6 @@ declare type ErrorWrapper<TError> = TError | {
23
23
  };
24
24
 
25
25
  interface CacheImpl {
26
- cacheRecords: boolean;
27
26
  defaultQueryTTL: number;
28
27
  getAll(): Promise<Record<string, unknown>>;
29
28
  get: <T>(key: string) => Promise<T | null>;
@@ -33,13 +32,11 @@ interface CacheImpl {
33
32
  }
34
33
  interface SimpleCacheOptions {
35
34
  max?: number;
36
- cacheRecords?: boolean;
37
35
  defaultQueryTTL?: number;
38
36
  }
39
37
  declare class SimpleCache implements CacheImpl {
40
38
  #private;
41
39
  capacity: number;
42
- cacheRecords: boolean;
43
40
  defaultQueryTTL: number;
44
41
  constructor(options?: SimpleCacheOptions);
45
42
  getAll(): Promise<Record<string, unknown>>;
@@ -303,6 +300,44 @@ declare type HighlightExpression = {
303
300
  enabled?: boolean;
304
301
  encodeHTML?: boolean;
305
302
  };
303
+ /**
304
+ * Booster Expression
305
+ *
306
+ * @x-go-type xata.BoosterExpression
307
+ */
308
+ declare type BoosterExpression = {
309
+ valueBooster?: ValueBooster$1;
310
+ } | {
311
+ numericBooster?: NumericBooster$1;
312
+ } | {
313
+ dateBooster?: DateBooster$1;
314
+ };
315
+ /**
316
+ * Boost records with a particular value for a column.
317
+ */
318
+ declare type ValueBooster$1 = {
319
+ column: string;
320
+ value: string | number | boolean;
321
+ factor: number;
322
+ };
323
+ /**
324
+ * Boost records based on the value of a numeric column.
325
+ */
326
+ declare type NumericBooster$1 = {
327
+ column: string;
328
+ factor: number;
329
+ };
330
+ /**
331
+ * Boost records based on the value of a datetime column. It is configured via "origin", "scale", and "decay". The further away from the "origin",
332
+ * the more the score is decayed. The decay function uses an exponential function. For example if origin is "now", and scale is 10 days and decay is 0.5, it
333
+ * should be interpreted as: a record with a date 10 days before/after origin will score 2 times less than a record with the date at origin.
334
+ */
335
+ declare type DateBooster$1 = {
336
+ column: string;
337
+ origin?: string;
338
+ scale: string;
339
+ decay: number;
340
+ };
306
341
  declare type FilterList = FilterExpression | FilterExpression[];
307
342
  declare type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
308
343
  /**
@@ -359,7 +394,24 @@ declare type PageConfig = {
359
394
  size?: number;
360
395
  offset?: number;
361
396
  };
362
- declare type ColumnsFilter = string[];
397
+ declare type ColumnsProjection = string[];
398
+ /**
399
+ * Xata Table Record Metadata
400
+ */
401
+ declare type RecordMeta = {
402
+ id: RecordID;
403
+ xata: {
404
+ version: number;
405
+ table?: string;
406
+ highlight?: {
407
+ [key: string]: string[] | {
408
+ [key: string]: any;
409
+ };
410
+ };
411
+ score?: number;
412
+ warnings?: string[];
413
+ };
414
+ };
363
415
  /**
364
416
  * @pattern [a-zA-Z0-9_-~:]+
365
417
  */
@@ -381,21 +433,9 @@ declare type RecordsMetadata = {
381
433
  };
382
434
  };
383
435
  /**
384
- * Xata Table Record
436
+ * Xata Table Record Metadata
385
437
  */
386
- declare type XataRecord$1 = {
387
- id: RecordID;
388
- xata: {
389
- version: number;
390
- table?: string;
391
- highlight?: {
392
- [key: string]: string[] | {
393
- [key: string]: any;
394
- };
395
- };
396
- warnings?: string[];
397
- };
398
- } & {
438
+ declare type XataRecord$1 = RecordMeta & {
399
439
  [key: string]: any;
400
440
  };
401
441
 
@@ -440,6 +480,7 @@ type schemas_FuzzinessExpression = FuzzinessExpression;
440
480
  type schemas_PrefixExpression = PrefixExpression;
441
481
  type schemas_FilterExpression = FilterExpression;
442
482
  type schemas_HighlightExpression = HighlightExpression;
483
+ type schemas_BoosterExpression = BoosterExpression;
443
484
  type schemas_FilterList = FilterList;
444
485
  type schemas_FilterColumn = FilterColumn;
445
486
  type schemas_FilterColumnIncludes = FilterColumnIncludes;
@@ -449,7 +490,8 @@ type schemas_FilterPredicateRangeOp = FilterPredicateRangeOp;
449
490
  type schemas_FilterRangeValue = FilterRangeValue;
450
491
  type schemas_FilterValue = FilterValue;
451
492
  type schemas_PageConfig = PageConfig;
452
- type schemas_ColumnsFilter = ColumnsFilter;
493
+ type schemas_ColumnsProjection = ColumnsProjection;
494
+ type schemas_RecordMeta = RecordMeta;
453
495
  type schemas_RecordID = RecordID;
454
496
  type schemas_TableRename = TableRename;
455
497
  type schemas_RecordsMetadata = RecordsMetadata;
@@ -496,6 +538,10 @@ declare namespace schemas {
496
538
  schemas_PrefixExpression as PrefixExpression,
497
539
  schemas_FilterExpression as FilterExpression,
498
540
  schemas_HighlightExpression as HighlightExpression,
541
+ schemas_BoosterExpression as BoosterExpression,
542
+ ValueBooster$1 as ValueBooster,
543
+ NumericBooster$1 as NumericBooster,
544
+ DateBooster$1 as DateBooster,
499
545
  schemas_FilterList as FilterList,
500
546
  schemas_FilterColumn as FilterColumn,
501
547
  schemas_FilterColumnIncludes as FilterColumnIncludes,
@@ -505,7 +551,8 @@ declare namespace schemas {
505
551
  schemas_FilterRangeValue as FilterRangeValue,
506
552
  schemas_FilterValue as FilterValue,
507
553
  schemas_PageConfig as PageConfig,
508
- schemas_ColumnsFilter as ColumnsFilter,
554
+ schemas_ColumnsProjection as ColumnsProjection,
555
+ schemas_RecordMeta as RecordMeta,
509
556
  schemas_RecordID as RecordID,
510
557
  schemas_TableRename as TableRename,
511
558
  schemas_RecordsMetadata as RecordsMetadata,
@@ -540,11 +587,17 @@ declare type BulkError = {
540
587
  status?: number;
541
588
  }[];
542
589
  };
590
+ declare type BulkInsertResponse = {
591
+ recordIDs: string[];
592
+ } | {
593
+ records: XataRecord$1[];
594
+ };
543
595
  declare type BranchMigrationPlan = {
544
596
  version: number;
545
597
  migration: BranchMigration;
546
598
  };
547
- declare type RecordUpdateResponse = {
599
+ declare type RecordResponse = XataRecord$1;
600
+ declare type RecordUpdateResponse = XataRecord$1 | {
548
601
  id: string;
549
602
  xata: {
550
603
  version: number;
@@ -568,7 +621,9 @@ type responses_SimpleError = SimpleError;
568
621
  type responses_BadRequestError = BadRequestError;
569
622
  type responses_AuthError = AuthError;
570
623
  type responses_BulkError = BulkError;
624
+ type responses_BulkInsertResponse = BulkInsertResponse;
571
625
  type responses_BranchMigrationPlan = BranchMigrationPlan;
626
+ type responses_RecordResponse = RecordResponse;
572
627
  type responses_RecordUpdateResponse = RecordUpdateResponse;
573
628
  type responses_QueryResponse = QueryResponse;
574
629
  type responses_SearchResponse = SearchResponse;
@@ -579,7 +634,9 @@ declare namespace responses {
579
634
  responses_BadRequestError as BadRequestError,
580
635
  responses_AuthError as AuthError,
581
636
  responses_BulkError as BulkError,
637
+ responses_BulkInsertResponse as BulkInsertResponse,
582
638
  responses_BranchMigrationPlan as BranchMigrationPlan,
639
+ responses_RecordResponse as RecordResponse,
583
640
  responses_RecordUpdateResponse as RecordUpdateResponse,
584
641
  responses_QueryResponse as QueryResponse,
585
642
  responses_SearchResponse as SearchResponse,
@@ -885,6 +942,9 @@ declare type InviteWorkspaceMemberError = ErrorWrapper<{
885
942
  } | {
886
943
  status: 404;
887
944
  payload: SimpleError;
945
+ } | {
946
+ status: 409;
947
+ payload: SimpleError;
888
948
  }>;
889
949
  declare type InviteWorkspaceMemberRequestBody = {
890
950
  email: string;
@@ -898,6 +958,34 @@ declare type InviteWorkspaceMemberVariables = {
898
958
  * Invite some user to join the workspace with the given role
899
959
  */
900
960
  declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<WorkspaceInvite>;
961
+ declare type UpdateWorkspaceMemberInvitePathParams = {
962
+ workspaceId: WorkspaceID;
963
+ inviteId: InviteID;
964
+ };
965
+ declare type UpdateWorkspaceMemberInviteError = ErrorWrapper<{
966
+ status: 400;
967
+ payload: BadRequestError;
968
+ } | {
969
+ status: 401;
970
+ payload: AuthError;
971
+ } | {
972
+ status: 404;
973
+ payload: SimpleError;
974
+ } | {
975
+ status: 422;
976
+ payload: SimpleError;
977
+ }>;
978
+ declare type UpdateWorkspaceMemberInviteRequestBody = {
979
+ role: Role;
980
+ };
981
+ declare type UpdateWorkspaceMemberInviteVariables = {
982
+ body: UpdateWorkspaceMemberInviteRequestBody;
983
+ pathParams: UpdateWorkspaceMemberInvitePathParams;
984
+ } & FetcherExtraProps;
985
+ /**
986
+ * This operation provides a way to update an existing invite. Updates are performed in-place; they do not change the invite link, the expiry time, nor do they re-notify the recipient of the invite.
987
+ */
988
+ declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
901
989
  declare type CancelWorkspaceMemberInvitePathParams = {
902
990
  workspaceId: WorkspaceID;
903
991
  inviteId: InviteID;
@@ -1243,6 +1331,10 @@ declare type CreateBranchError = ErrorWrapper<{
1243
1331
  status: 404;
1244
1332
  payload: SimpleError;
1245
1333
  }>;
1334
+ declare type CreateBranchResponse = {
1335
+ databaseName: string;
1336
+ branchName: string;
1337
+ };
1246
1338
  declare type CreateBranchRequestBody = {
1247
1339
  from?: string;
1248
1340
  metadata?: BranchMetadata;
@@ -1252,7 +1344,7 @@ declare type CreateBranchVariables = {
1252
1344
  pathParams: CreateBranchPathParams;
1253
1345
  queryParams?: CreateBranchQueryParams;
1254
1346
  } & FetcherExtraProps;
1255
- declare const createBranch: (variables: CreateBranchVariables) => Promise<undefined>;
1347
+ declare const createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
1256
1348
  declare type DeleteBranchPathParams = {
1257
1349
  dbBranchName: DBBranchName;
1258
1350
  workspace: string;
@@ -1439,13 +1531,17 @@ declare type CreateTableError = ErrorWrapper<{
1439
1531
  status: 422;
1440
1532
  payload: SimpleError;
1441
1533
  }>;
1534
+ declare type CreateTableResponse = {
1535
+ branchName: string;
1536
+ tableName: string;
1537
+ };
1442
1538
  declare type CreateTableVariables = {
1443
1539
  pathParams: CreateTablePathParams;
1444
1540
  } & FetcherExtraProps;
1445
1541
  /**
1446
1542
  * Creates a new table with the given name. Returns 422 if a table with the same name already exists.
1447
1543
  */
1448
- declare const createTable: (variables: CreateTableVariables) => Promise<undefined>;
1544
+ declare const createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
1449
1545
  declare type DeleteTablePathParams = {
1450
1546
  dbBranchName: DBBranchName;
1451
1547
  tableName: TableName;
@@ -1678,6 +1774,9 @@ declare type InsertRecordPathParams = {
1678
1774
  tableName: TableName;
1679
1775
  workspace: string;
1680
1776
  };
1777
+ declare type InsertRecordQueryParams = {
1778
+ columns?: ColumnsProjection;
1779
+ };
1681
1780
  declare type InsertRecordError = ErrorWrapper<{
1682
1781
  status: 400;
1683
1782
  payload: BadRequestError;
@@ -1688,20 +1787,15 @@ declare type InsertRecordError = ErrorWrapper<{
1688
1787
  status: 404;
1689
1788
  payload: SimpleError;
1690
1789
  }>;
1691
- declare type InsertRecordResponse = {
1692
- id: string;
1693
- xata: {
1694
- version: number;
1695
- };
1696
- };
1697
1790
  declare type InsertRecordVariables = {
1698
1791
  body?: Record<string, any>;
1699
1792
  pathParams: InsertRecordPathParams;
1793
+ queryParams?: InsertRecordQueryParams;
1700
1794
  } & FetcherExtraProps;
1701
1795
  /**
1702
1796
  * Insert a new Record into the Table
1703
1797
  */
1704
- declare const insertRecord: (variables: InsertRecordVariables) => Promise<InsertRecordResponse>;
1798
+ declare const insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
1705
1799
  declare type InsertRecordWithIDPathParams = {
1706
1800
  dbBranchName: DBBranchName;
1707
1801
  tableName: TableName;
@@ -1709,6 +1803,7 @@ declare type InsertRecordWithIDPathParams = {
1709
1803
  workspace: string;
1710
1804
  };
1711
1805
  declare type InsertRecordWithIDQueryParams = {
1806
+ columns?: ColumnsProjection;
1712
1807
  createOnly?: boolean;
1713
1808
  ifVersion?: number;
1714
1809
  };
@@ -1741,6 +1836,7 @@ declare type UpdateRecordWithIDPathParams = {
1741
1836
  workspace: string;
1742
1837
  };
1743
1838
  declare type UpdateRecordWithIDQueryParams = {
1839
+ columns?: ColumnsProjection;
1744
1840
  ifVersion?: number;
1745
1841
  };
1746
1842
  declare type UpdateRecordWithIDError = ErrorWrapper<{
@@ -1769,6 +1865,7 @@ declare type UpsertRecordWithIDPathParams = {
1769
1865
  workspace: string;
1770
1866
  };
1771
1867
  declare type UpsertRecordWithIDQueryParams = {
1868
+ columns?: ColumnsProjection;
1772
1869
  ifVersion?: number;
1773
1870
  };
1774
1871
  declare type UpsertRecordWithIDError = ErrorWrapper<{
@@ -1796,6 +1893,9 @@ declare type DeleteRecordPathParams = {
1796
1893
  recordId: RecordID;
1797
1894
  workspace: string;
1798
1895
  };
1896
+ declare type DeleteRecordQueryParams = {
1897
+ columns?: ColumnsProjection;
1898
+ };
1799
1899
  declare type DeleteRecordError = ErrorWrapper<{
1800
1900
  status: 400;
1801
1901
  payload: BadRequestError;
@@ -1808,14 +1908,18 @@ declare type DeleteRecordError = ErrorWrapper<{
1808
1908
  }>;
1809
1909
  declare type DeleteRecordVariables = {
1810
1910
  pathParams: DeleteRecordPathParams;
1911
+ queryParams?: DeleteRecordQueryParams;
1811
1912
  } & FetcherExtraProps;
1812
- declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<undefined>;
1913
+ declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
1813
1914
  declare type GetRecordPathParams = {
1814
1915
  dbBranchName: DBBranchName;
1815
1916
  tableName: TableName;
1816
1917
  recordId: RecordID;
1817
1918
  workspace: string;
1818
1919
  };
1920
+ declare type GetRecordQueryParams = {
1921
+ columns?: ColumnsProjection;
1922
+ };
1819
1923
  declare type GetRecordError = ErrorWrapper<{
1820
1924
  status: 400;
1821
1925
  payload: BadRequestError;
@@ -1826,12 +1930,9 @@ declare type GetRecordError = ErrorWrapper<{
1826
1930
  status: 404;
1827
1931
  payload: SimpleError;
1828
1932
  }>;
1829
- declare type GetRecordRequestBody = {
1830
- columns?: ColumnsFilter;
1831
- };
1832
1933
  declare type GetRecordVariables = {
1833
- body?: GetRecordRequestBody;
1834
1934
  pathParams: GetRecordPathParams;
1935
+ queryParams?: GetRecordQueryParams;
1835
1936
  } & FetcherExtraProps;
1836
1937
  /**
1837
1938
  * Retrieve record by ID
@@ -1842,6 +1943,9 @@ declare type BulkInsertTableRecordsPathParams = {
1842
1943
  tableName: TableName;
1843
1944
  workspace: string;
1844
1945
  };
1946
+ declare type BulkInsertTableRecordsQueryParams = {
1947
+ columns?: ColumnsProjection;
1948
+ };
1845
1949
  declare type BulkInsertTableRecordsError = ErrorWrapper<{
1846
1950
  status: 400;
1847
1951
  payload: BulkError;
@@ -1851,21 +1955,22 @@ declare type BulkInsertTableRecordsError = ErrorWrapper<{
1851
1955
  } | {
1852
1956
  status: 404;
1853
1957
  payload: SimpleError;
1958
+ } | {
1959
+ status: 422;
1960
+ payload: SimpleError;
1854
1961
  }>;
1855
- declare type BulkInsertTableRecordsResponse = {
1856
- recordIDs: string[];
1857
- };
1858
1962
  declare type BulkInsertTableRecordsRequestBody = {
1859
1963
  records: Record<string, any>[];
1860
1964
  };
1861
1965
  declare type BulkInsertTableRecordsVariables = {
1862
1966
  body: BulkInsertTableRecordsRequestBody;
1863
1967
  pathParams: BulkInsertTableRecordsPathParams;
1968
+ queryParams?: BulkInsertTableRecordsQueryParams;
1864
1969
  } & FetcherExtraProps;
1865
1970
  /**
1866
1971
  * Bulk insert records
1867
1972
  */
1868
- declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertTableRecordsResponse>;
1973
+ declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
1869
1974
  declare type QueryTablePathParams = {
1870
1975
  dbBranchName: DBBranchName;
1871
1976
  tableName: TableName;
@@ -1885,7 +1990,7 @@ declare type QueryTableRequestBody = {
1885
1990
  filter?: FilterExpression;
1886
1991
  sort?: SortExpression;
1887
1992
  page?: PageConfig;
1888
- columns?: ColumnsFilter;
1993
+ columns?: ColumnsProjection;
1889
1994
  };
1890
1995
  declare type QueryTableVariables = {
1891
1996
  body?: QueryTableRequestBody;
@@ -2634,6 +2739,7 @@ declare type SearchTableRequestBody = {
2634
2739
  prefix?: PrefixExpression;
2635
2740
  filter?: FilterExpression;
2636
2741
  highlight?: HighlightExpression;
2742
+ boosters?: BoosterExpression[];
2637
2743
  };
2638
2744
  declare type SearchTableVariables = {
2639
2745
  body: SearchTableRequestBody;
@@ -2665,6 +2771,7 @@ declare type SearchBranchRequestBody = {
2665
2771
  tables?: (string | {
2666
2772
  table: string;
2667
2773
  filter?: FilterExpression;
2774
+ boosters?: BoosterExpression[];
2668
2775
  })[];
2669
2776
  query: string;
2670
2777
  fuzziness?: FuzzinessExpression;
@@ -2697,6 +2804,7 @@ declare const operationsByTag: {
2697
2804
  updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables) => Promise<undefined>;
2698
2805
  removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables) => Promise<undefined>;
2699
2806
  inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<WorkspaceInvite>;
2807
+ updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
2700
2808
  cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>;
2701
2809
  resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>;
2702
2810
  acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables) => Promise<undefined>;
@@ -2713,7 +2821,7 @@ declare const operationsByTag: {
2713
2821
  branch: {
2714
2822
  getBranchList: (variables: GetBranchListVariables) => Promise<ListBranchesResponse>;
2715
2823
  getBranchDetails: (variables: GetBranchDetailsVariables) => Promise<DBBranch>;
2716
- createBranch: (variables: CreateBranchVariables) => Promise<undefined>;
2824
+ createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
2717
2825
  deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
2718
2826
  updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
2719
2827
  getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
@@ -2723,7 +2831,7 @@ declare const operationsByTag: {
2723
2831
  getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
2724
2832
  };
2725
2833
  table: {
2726
- createTable: (variables: CreateTableVariables) => Promise<undefined>;
2834
+ createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
2727
2835
  deleteTable: (variables: DeleteTableVariables) => Promise<undefined>;
2728
2836
  updateTable: (variables: UpdateTableVariables) => Promise<undefined>;
2729
2837
  getTableSchema: (variables: GetTableSchemaVariables) => Promise<GetTableSchemaResponse>;
@@ -2735,13 +2843,13 @@ declare const operationsByTag: {
2735
2843
  updateColumn: (variables: UpdateColumnVariables) => Promise<MigrationIdResponse>;
2736
2844
  };
2737
2845
  records: {
2738
- insertRecord: (variables: InsertRecordVariables) => Promise<InsertRecordResponse>;
2846
+ insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
2739
2847
  insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
2740
2848
  updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<RecordUpdateResponse>;
2741
2849
  upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
2742
- deleteRecord: (variables: DeleteRecordVariables) => Promise<undefined>;
2850
+ deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
2743
2851
  getRecord: (variables: GetRecordVariables) => Promise<XataRecord$1>;
2744
- bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertTableRecordsResponse>;
2852
+ bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
2745
2853
  queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
2746
2854
  searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
2747
2855
  searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
@@ -2795,6 +2903,7 @@ declare class WorkspaceApi {
2795
2903
  updateWorkspaceMemberRole(workspaceId: WorkspaceID, userId: UserID, role: Role): Promise<void>;
2796
2904
  removeWorkspaceMember(workspaceId: WorkspaceID, userId: UserID): Promise<void>;
2797
2905
  inviteWorkspaceMember(workspaceId: WorkspaceID, email: string, role: Role): Promise<WorkspaceInvite>;
2906
+ updateWorkspaceMemberInvite(workspaceId: WorkspaceID, inviteId: InviteID, role: Role): Promise<WorkspaceInvite>;
2798
2907
  cancelWorkspaceMemberInvite(workspaceId: WorkspaceID, inviteId: InviteID): Promise<void>;
2799
2908
  resendWorkspaceMemberInvite(workspaceId: WorkspaceID, inviteId: InviteID): Promise<void>;
2800
2909
  acceptWorkspaceMemberInvite(workspaceId: WorkspaceID, inviteKey: InviteKey): Promise<void>;
@@ -2815,7 +2924,7 @@ declare class BranchApi {
2815
2924
  constructor(extraProps: FetcherExtraProps);
2816
2925
  getBranchList(workspace: WorkspaceID, dbName: DBName): Promise<ListBranchesResponse>;
2817
2926
  getBranchDetails(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<DBBranch>;
2818
- createBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, from?: string, options?: CreateBranchRequestBody): Promise<void>;
2927
+ createBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, from?: string, options?: CreateBranchRequestBody): Promise<CreateBranchResponse>;
2819
2928
  deleteBranch(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<void>;
2820
2929
  updateBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName, metadata?: BranchMetadata): Promise<void>;
2821
2930
  getBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<BranchMetadata>;
@@ -2827,7 +2936,7 @@ declare class BranchApi {
2827
2936
  declare class TableApi {
2828
2937
  private extraProps;
2829
2938
  constructor(extraProps: FetcherExtraProps);
2830
- createTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<void>;
2939
+ createTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<CreateTableResponse>;
2831
2940
  deleteTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<void>;
2832
2941
  updateTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, options: UpdateTableRequestBody): Promise<void>;
2833
2942
  getTableSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<GetTableSchemaResponse>;
@@ -2841,13 +2950,13 @@ declare class TableApi {
2841
2950
  declare class RecordsApi {
2842
2951
  private extraProps;
2843
2952
  constructor(extraProps: FetcherExtraProps);
2844
- insertRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, record: Record<string, any>): Promise<InsertRecordResponse>;
2953
+ insertRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, record: Record<string, any>, options?: InsertRecordQueryParams): Promise<RecordUpdateResponse>;
2845
2954
  insertRecordWithID(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, record: Record<string, any>, options?: InsertRecordWithIDQueryParams): Promise<RecordUpdateResponse>;
2846
2955
  updateRecordWithID(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, record: Record<string, any>, options?: UpdateRecordWithIDQueryParams): Promise<RecordUpdateResponse>;
2847
2956
  upsertRecordWithID(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, record: Record<string, any>, options?: UpsertRecordWithIDQueryParams): Promise<RecordUpdateResponse>;
2848
- deleteRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID): Promise<void>;
2849
- getRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, options?: GetRecordRequestBody): Promise<XataRecord$1>;
2850
- bulkInsertTableRecords(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, records: Record<string, any>[]): Promise<BulkInsertTableRecordsResponse>;
2957
+ deleteRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, options?: DeleteRecordQueryParams): Promise<RecordUpdateResponse>;
2958
+ getRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, options?: GetRecordQueryParams): Promise<XataRecord$1>;
2959
+ bulkInsertTableRecords(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, records: Record<string, any>[], options?: BulkInsertTableRecordsQueryParams): Promise<BulkInsertResponse>;
2851
2960
  queryTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: QueryTableRequestBody): Promise<QueryResponse>;
2852
2961
  searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
2853
2962
  searchBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, query: SearchBranchRequestBody): Promise<SearchResponse>;
@@ -2863,19 +2972,20 @@ declare type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) ex
2863
2972
  declare type If<Condition, Then, Else> = Condition extends true ? Then : Else;
2864
2973
  declare type IsObject<T> = T extends Record<string, any> ? true : false;
2865
2974
  declare type IsArray<T> = T extends Array<any> ? true : false;
2866
- declare type NonEmptyArray<T> = T[] & {
2867
- 0: T;
2868
- };
2869
2975
  declare type RequiredBy<T, K extends keyof T> = T & {
2870
2976
  [P in K]-?: NonNullable<T[P]>;
2871
2977
  };
2872
2978
  declare type GetArrayInnerType<T extends readonly any[]> = T[number];
2873
2979
  declare type SingleOrArray<T> = T | T[];
2874
2980
  declare type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
2981
+ declare type Without<T, U> = {
2982
+ [P in Exclude<keyof T, keyof U>]?: never;
2983
+ };
2984
+ declare type ExclusiveOr<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
2875
2985
 
2876
2986
  declare type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
2877
- declare type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord & UnionToIntersection<Values<{
2878
- [K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord;
2987
+ declare type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
2988
+ [K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
2879
2989
  }>>;
2880
2990
  declare type ValueAtColumn<O, P extends SelectableColumn<O>> = P extends '*' ? Values<O> : P extends 'id' ? string : P extends keyof O ? O[P] : P extends `${infer K}.${infer V}` ? K extends keyof O ? Values<NonNullable<O[K]> extends infer Item ? Item extends Record<string, any> ? V extends SelectableColumn<Item> ? {
2881
2991
  V: ValueAtColumn<Item, V>;
@@ -2911,22 +3021,37 @@ interface BaseData {
2911
3021
  /**
2912
3022
  * Represents a persisted record from the database.
2913
3023
  */
2914
- interface XataRecord<ExtraMetadata extends Record<string, unknown> = Record<string, unknown>> extends Identifiable {
3024
+ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> extends Identifiable {
2915
3025
  /**
2916
3026
  * Get metadata of this record.
2917
3027
  */
2918
- getMetadata(): XataRecordMetadata & ExtraMetadata;
3028
+ getMetadata(): XataRecordMetadata;
2919
3029
  /**
2920
3030
  * Retrieves a refreshed copy of the current record from the database.
3031
+ * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3032
+ * @returns The persisted record with the selected columns.
2921
3033
  */
2922
- read(): Promise<Readonly<SelectedPick<this, ['*']>> | null>;
3034
+ read<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3035
+ /**
3036
+ * Retrieves a refreshed copy of the current record from the database.
3037
+ * @returns The persisted record with all first level properties.
3038
+ */
3039
+ read(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
2923
3040
  /**
2924
3041
  * Performs a partial update of the current record. On success a new object is
2925
3042
  * returned and the current object is not mutated.
2926
3043
  * @param partialUpdate The columns and their values that have to be updated.
2927
- * @returns A new record containing the latest values for all the columns of the current record.
3044
+ * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3045
+ * @returns The persisted record with the selected columns.
2928
3046
  */
2929
- update(partialUpdate: Partial<EditableData<Omit<this, keyof XataRecord>>>): Promise<Readonly<SelectedPick<this, ['*']>>>;
3047
+ update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>>>;
3048
+ /**
3049
+ * Performs a partial update of the current record. On success a new object is
3050
+ * returned and the current object is not mutated.
3051
+ * @param partialUpdate The columns and their values that have to be updated.
3052
+ * @returns The persisted record with all first level properties.
3053
+ */
3054
+ update(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>>>;
2930
3055
  /**
2931
3056
  * Performs a deletion of the current record in the database.
2932
3057
  *
@@ -2938,14 +3063,20 @@ declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update
2938
3063
  /**
2939
3064
  * Retrieves a refreshed copy of the current record from the database.
2940
3065
  */
2941
- read(): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3066
+ read<K extends SelectableColumn<Record>>(columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>> | null>;
2942
3067
  /**
2943
3068
  * Performs a partial update of the current record. On success a new object is
2944
3069
  * returned and the current object is not mutated.
2945
3070
  * @param partialUpdate The columns and their values that have to be updated.
2946
3071
  * @returns A new record containing the latest values for all the columns of the current record.
2947
3072
  */
2948
- update(partialUpdate: Partial<EditableData<Omit<Record, keyof XataRecord>>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3073
+ 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 : ['*']>>>;
3074
+ /**
3075
+ * Performs a deletion of the current record in the database.
3076
+ *
3077
+ * @throws If the record was already deleted or if an error happened while performing the deletion.
3078
+ */
3079
+ delete(): Promise<void>;
2949
3080
  };
2950
3081
  declare type XataRecordMetadata = {
2951
3082
  /**
@@ -3058,6 +3189,84 @@ declare type NestedApiFilter<T> = {
3058
3189
  };
3059
3190
  declare type Filter<T> = T extends Record<string, any> ? BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
3060
3191
 
3192
+ declare type DateBooster = {
3193
+ origin?: string;
3194
+ scale: string;
3195
+ decay: number;
3196
+ };
3197
+ declare type NumericBooster = {
3198
+ factor: number;
3199
+ };
3200
+ declare type ValueBooster<T extends string | number | boolean> = {
3201
+ value: T;
3202
+ factor: number;
3203
+ };
3204
+ declare type Boosters<O extends XataRecord> = Values<{
3205
+ [K in SelectableColumn<O>]: NonNullable<ValueAtColumn<O, K>> extends Date ? {
3206
+ dateBooster: {
3207
+ column: K;
3208
+ } & DateBooster;
3209
+ } : NonNullable<ValueAtColumn<O, K>> extends number ? ExclusiveOr<{
3210
+ numericBooster?: {
3211
+ column: K;
3212
+ } & NumericBooster;
3213
+ }, {
3214
+ valueBooster?: {
3215
+ column: K;
3216
+ } & ValueBooster<number>;
3217
+ }> : NonNullable<ValueAtColumn<O, K>> extends string | boolean ? {
3218
+ valueBooster: {
3219
+ column: K;
3220
+ } & ValueBooster<NonNullable<ValueAtColumn<O, K>>>;
3221
+ } : never;
3222
+ }>;
3223
+
3224
+ declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
3225
+ fuzziness?: FuzzinessExpression;
3226
+ prefix?: PrefixExpression;
3227
+ highlight?: HighlightExpression;
3228
+ tables?: Array<Tables | Values<{
3229
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
3230
+ table: Model;
3231
+ filter?: Filter<SelectedPick<Schemas[Model] & XataRecord, ['*']>>;
3232
+ boosters?: Boosters<Schemas[Model] & XataRecord>[];
3233
+ };
3234
+ }>>;
3235
+ };
3236
+ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
3237
+ all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
3238
+ [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
3239
+ table: Model;
3240
+ record: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>>;
3241
+ };
3242
+ }>[]>;
3243
+ byTable: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<{
3244
+ [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>[]>;
3245
+ }>;
3246
+ };
3247
+ declare class SearchPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
3248
+ #private;
3249
+ private db;
3250
+ constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
3251
+ build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
3252
+ }
3253
+ declare type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
3254
+ getMetadata: () => XataRecordMetadata & SearchExtraProperties;
3255
+ };
3256
+ declare type SearchExtraProperties = {
3257
+ table: string;
3258
+ highlight?: {
3259
+ [key: string]: string[] | {
3260
+ [key: string]: any;
3261
+ };
3262
+ };
3263
+ score?: number;
3264
+ };
3265
+ declare type ReturnTable<Table, Tables> = Table extends Tables ? Table : never;
3266
+ declare type ExtractTables<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>, TableOptions extends GetArrayInnerType<NonNullable<NonNullable<SearchOptions<Schemas, Tables>>['tables']>>> = TableOptions extends `${infer Table}` ? ReturnTable<Table, Tables> : TableOptions extends {
3267
+ table: infer Table;
3268
+ } ? ReturnTable<Table, Tables> : never;
3269
+
3061
3270
  declare type SortDirection = 'asc' | 'desc';
3062
3271
  declare type SortFilterExtended<T extends XataRecord> = {
3063
3272
  column: SelectableColumn<T>;
@@ -3069,7 +3278,7 @@ declare type SortFilterBase<T extends XataRecord> = {
3069
3278
  };
3070
3279
 
3071
3280
  declare type BaseOptions<T extends XataRecord> = {
3072
- columns?: NonEmptyArray<SelectableColumn<T>>;
3281
+ columns?: SelectableColumn<T>[];
3073
3282
  cache?: number;
3074
3283
  };
3075
3284
  declare type CursorQueryOptions = {
@@ -3159,7 +3368,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3159
3368
  * @param columns Array of column names to be returned by the query.
3160
3369
  * @returns A new Query object.
3161
3370
  */
3162
- select<K extends SelectableColumn<Record>>(columns: NonEmptyArray<K>): Query<Record, SelectedPick<Record, NonEmptyArray<K>>>;
3371
+ select<K extends SelectableColumn<Record>>(columns: K[]): Query<Record, SelectedPick<Record, K[]>>;
3163
3372
  /**
3164
3373
  * Get paginated results
3165
3374
  *
@@ -3426,20 +3635,43 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
3426
3635
  * Common interface for performing operations on a table.
3427
3636
  */
3428
3637
  declare abstract class Repository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, Readonly<SelectedPick<Record, ['*']>>> {
3429
- abstract create(object: EditableData<Data> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3638
+ abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<Data>, 'id'> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3639
+ abstract create(object: Omit<EditableData<Data>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3430
3640
  /**
3431
3641
  * Creates a single record in the table with a unique id.
3432
3642
  * @param id The unique id.
3433
3643
  * @param object Object containing the column names with their values to be stored in the table.
3644
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3434
3645
  * @returns The full persisted record.
3435
3646
  */
3436
- abstract create(id: string, object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3647
+ abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3648
+ /**
3649
+ * Creates a single record in the table with a unique id.
3650
+ * @param id The unique id.
3651
+ * @param object Object containing the column names with their values to be stored in the table.
3652
+ * @returns The full persisted record.
3653
+ */
3654
+ abstract create(id: string, object: Omit<EditableData<Data>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3437
3655
  /**
3438
3656
  * Creates multiple records in the table.
3439
3657
  * @param objects Array of objects with the column names and the values to be stored in the table.
3440
- * @returns Array of the persisted records.
3658
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3659
+ * @returns Array of the persisted records in order.
3441
3660
  */
3442
- abstract create(objects: Array<EditableData<Data> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3661
+ abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Data>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3662
+ /**
3663
+ * Creates multiple records in the table.
3664
+ * @param objects Array of objects with the column names and the values to be stored in the table.
3665
+ * @returns Array of the persisted records in order.
3666
+ */
3667
+ abstract create(objects: Array<Omit<EditableData<Data>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3668
+ /**
3669
+ * Queries a single record from the table given its unique id.
3670
+ * @param id The unique id.
3671
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3672
+ * @returns The persisted record for the given id or null if the record could not be found.
3673
+ */
3674
+ abstract read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
3443
3675
  /**
3444
3676
  * Queries a single record from the table given its unique id.
3445
3677
  * @param id The unique id.
@@ -3449,9 +3681,23 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3449
3681
  /**
3450
3682
  * Queries multiple records from the table given their unique id.
3451
3683
  * @param ids The unique ids array.
3452
- * @returns The persisted records for the given ids (if a record could not be found it is not returned).
3684
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3685
+ * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
3686
+ */
3687
+ abstract read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
3688
+ /**
3689
+ * Queries multiple records from the table given their unique id.
3690
+ * @param ids The unique ids array.
3691
+ * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
3692
+ */
3693
+ abstract read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
3694
+ /**
3695
+ * Queries a single record from the table by the id in the object.
3696
+ * @param object Object containing the id of the record.
3697
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3698
+ * @returns The persisted record for the given id or null if the record could not be found.
3453
3699
  */
3454
- abstract read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3700
+ abstract read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
3455
3701
  /**
3456
3702
  * Queries a single record from the table by the id in the object.
3457
3703
  * @param object Object containing the id of the record.
@@ -3461,15 +3707,37 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3461
3707
  /**
3462
3708
  * Queries multiple records from the table by the ids in the objects.
3463
3709
  * @param objects Array of objects containing the ids of the records.
3464
- * @returns The persisted records for the given ids (if a record could not be found it is not returned).
3710
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3711
+ * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
3465
3712
  */
3466
- abstract read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3713
+ abstract read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
3714
+ /**
3715
+ * Queries multiple records from the table by the ids in the objects.
3716
+ * @param objects Array of objects containing the ids of the records.
3717
+ * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
3718
+ */
3719
+ abstract read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
3720
+ /**
3721
+ * Partially update a single record.
3722
+ * @param object An object with its id and the columns to be updated.
3723
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3724
+ * @returns The full persisted record.
3725
+ */
3726
+ abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Data>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3467
3727
  /**
3468
3728
  * Partially update a single record.
3469
3729
  * @param object An object with its id and the columns to be updated.
3470
3730
  * @returns The full persisted record.
3471
3731
  */
3472
3732
  abstract update(object: Partial<EditableData<Data>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3733
+ /**
3734
+ * Partially update a single record given its unique id.
3735
+ * @param id The unique id.
3736
+ * @param object The column names and their values that have to be updated.
3737
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3738
+ * @returns The full persisted record.
3739
+ */
3740
+ abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Data>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3473
3741
  /**
3474
3742
  * Partially update a single record given its unique id.
3475
3743
  * @param id The unique id.
@@ -3480,9 +3748,24 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3480
3748
  /**
3481
3749
  * Partially updates multiple records.
3482
3750
  * @param objects An array of objects with their ids and columns to be updated.
3483
- * @returns Array of the persisted records.
3751
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3752
+ * @returns Array of the persisted records in order.
3753
+ */
3754
+ abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Data>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3755
+ /**
3756
+ * Partially updates multiple records.
3757
+ * @param objects An array of objects with their ids and columns to be updated.
3758
+ * @returns Array of the persisted records in order.
3484
3759
  */
3485
3760
  abstract update(objects: Array<Partial<EditableData<Data>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3761
+ /**
3762
+ * Creates or updates a single record. If a record exists with the given id,
3763
+ * it will be update, otherwise a new record will be created.
3764
+ * @param object Object containing the column names with their values to be persisted in the table.
3765
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3766
+ * @returns The full persisted record.
3767
+ */
3768
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Data> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3486
3769
  /**
3487
3770
  * Creates or updates a single record. If a record exists with the given id,
3488
3771
  * it will be update, otherwise a new record will be created.
@@ -3495,9 +3778,26 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3495
3778
  * it will be update, otherwise a new record will be created.
3496
3779
  * @param id A unique id.
3497
3780
  * @param object The column names and the values to be persisted.
3781
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3498
3782
  * @returns The full persisted record.
3499
3783
  */
3500
- abstract createOrUpdate(id: string, object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3784
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3785
+ /**
3786
+ * Creates or updates a single record. If a record exists with the given id,
3787
+ * it will be update, otherwise a new record will be created.
3788
+ * @param id A unique id.
3789
+ * @param object The column names and the values to be persisted.
3790
+ * @returns The full persisted record.
3791
+ */
3792
+ abstract createOrUpdate(id: string, object: Omit<EditableData<Data>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3793
+ /**
3794
+ * Creates or updates a single record. If a record exists with the given id,
3795
+ * it will be update, otherwise a new record will be created.
3796
+ * @param objects Array of objects with the column names and the values to be stored in the table.
3797
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3798
+ * @returns Array of the persisted records.
3799
+ */
3800
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Data> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3501
3801
  /**
3502
3802
  * Creates or updates a single record. If a record exists with the given id,
3503
3803
  * it will be update, otherwise a new record will be created.
@@ -3537,9 +3837,11 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3537
3837
  */
3538
3838
  abstract search(query: string, options?: {
3539
3839
  fuzziness?: FuzzinessExpression;
3840
+ prefix?: PrefixExpression;
3540
3841
  highlight?: HighlightExpression;
3541
3842
  filter?: Filter<Record>;
3542
- }): Promise<SelectedPick<Record, ['*']>[]>;
3843
+ boosters?: Boosters<Record>[];
3844
+ }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
3543
3845
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
3544
3846
  }
3545
3847
  declare class RestRepository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Data, Record> {
@@ -3554,22 +3856,37 @@ declare class RestRepository<Data extends BaseData, Record extends XataRecord =
3554
3856
  create(object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3555
3857
  create(recordId: string, object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3556
3858
  create(objects: EditableData<Data>[]): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3557
- read(recordId: string): Promise<SelectedPick<Record, ['*']> | null>;
3859
+ create<K extends SelectableColumn<Record>>(object: EditableData<Data>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3860
+ create<K extends SelectableColumn<Record>>(recordId: string, object: EditableData<Data>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3861
+ create<K extends SelectableColumn<Record>>(objects: EditableData<Data>[], columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3862
+ read(recordId: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3558
3863
  read(recordIds: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3559
- read(object: Identifiable): Promise<SelectedPick<Record, ['*']> | null>;
3864
+ read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3560
3865
  read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3866
+ read<K extends SelectableColumn<Record>>(recordId: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3867
+ read<K extends SelectableColumn<Record>>(recordIds: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3868
+ read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3869
+ read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3561
3870
  update(object: Partial<EditableData<Data>> & Identifiable): Promise<SelectedPick<Record, ['*']>>;
3562
3871
  update(recordId: string, object: Partial<EditableData<Data>>): Promise<SelectedPick<Record, ['*']>>;
3563
3872
  update(objects: Array<Partial<EditableData<Data>> & Identifiable>): Promise<SelectedPick<Record, ['*']>[]>;
3873
+ update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Data>> & Identifiable, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3874
+ update<K extends SelectableColumn<Record>>(recordId: string, object: Partial<EditableData<Data>>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3875
+ update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Data>> & Identifiable>, columns: K[]): Promise<SelectedPick<Record, typeof columns>[]>;
3564
3876
  createOrUpdate(object: EditableData<Data>): Promise<SelectedPick<Record, ['*']>>;
3565
3877
  createOrUpdate(recordId: string, object: EditableData<Data>): Promise<SelectedPick<Record, ['*']>>;
3566
3878
  createOrUpdate(objects: EditableData<Data>[]): Promise<SelectedPick<Record, ['*']>[]>;
3879
+ createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Data>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3880
+ createOrUpdate<K extends SelectableColumn<Record>>(recordId: string, object: EditableData<Data>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3881
+ createOrUpdate<K extends SelectableColumn<Record>>(objects: EditableData<Data>[], columns: K[]): Promise<SelectedPick<Record, typeof columns>[]>;
3567
3882
  delete(a: string | Identifiable | Array<string | Identifiable>): Promise<void>;
3568
3883
  search(query: string, options?: {
3569
3884
  fuzziness?: FuzzinessExpression;
3885
+ prefix?: PrefixExpression;
3570
3886
  highlight?: HighlightExpression;
3571
3887
  filter?: Filter<Record>;
3572
- }): Promise<SelectedPick<Record, ['*']>[]>;
3888
+ boosters?: Boosters<Record>[];
3889
+ }): Promise<any>;
3573
3890
  query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
3574
3891
  }
3575
3892
 
@@ -3713,47 +4030,6 @@ declare class SchemaPlugin<Schemas extends Record<string, BaseData>> extends Xat
3713
4030
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
3714
4031
  }
3715
4032
 
3716
- declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
3717
- fuzziness?: FuzzinessExpression;
3718
- highlight?: HighlightExpression;
3719
- tables?: Array<Tables | Values<{
3720
- [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
3721
- table: Model;
3722
- filter?: Filter<SelectedPick<Schemas[Model] & SearchXataRecord, ['*']>>;
3723
- };
3724
- }>>;
3725
- };
3726
- declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
3727
- all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
3728
- [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
3729
- table: Model;
3730
- record: Awaited<SelectedPick<Schemas[Model] & SearchXataRecord, ['*']>>;
3731
- };
3732
- }>[]>;
3733
- byTable: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<{
3734
- [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SelectedPick<Schemas[Model] & SearchXataRecord, ['*']>[]>;
3735
- }>;
3736
- };
3737
- declare class SearchPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
3738
- #private;
3739
- private db;
3740
- constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
3741
- build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
3742
- }
3743
- declare type SearchXataRecord = XataRecord<SearchExtraProperties>;
3744
- declare type SearchExtraProperties = {
3745
- table: string;
3746
- highlight?: {
3747
- [key: string]: string[] | {
3748
- [key: string]: any;
3749
- };
3750
- };
3751
- };
3752
- declare type ReturnTable<Table, Tables> = Table extends Tables ? Table : never;
3753
- declare type ExtractTables<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>, TableOptions extends GetArrayInnerType<NonNullable<NonNullable<SearchOptions<Schemas, Tables>>['tables']>>> = TableOptions extends `${infer Table}` ? ReturnTable<Table, Tables> : TableOptions extends {
3754
- table: infer Table;
3755
- } ? ReturnTable<Table, Tables> : never;
3756
-
3757
4033
  declare type BranchStrategyValue = string | undefined | null;
3758
4034
  declare type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
3759
4035
  declare type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
@@ -3795,4 +4071,4 @@ declare class XataError extends Error {
3795
4071
  constructor(message: string, status: number);
3796
4072
  }
3797
4073
 
3798
- export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsResponse, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateTableError, CreateTablePathParams, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetRecordError, GetRecordPathParams, GetRecordRequestBody, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordResponse, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, Query, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SelectableColumn, SelectedPick, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, buildClient, bulkInsertTableRecords, cancelWorkspaceMemberInvite, contains, createBranch, createDatabase, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, endsWith, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseURL, getGitBranchesMapping, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberRole, upsertRecordWithID };
4074
+ 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, 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, 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, bulkInsertTableRecords, cancelWorkspaceMemberInvite, contains, createBranch, createDatabase, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, endsWith, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseURL, getGitBranchesMapping, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };