@xata.io/client 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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,
@@ -926,8 +983,7 @@ declare type UpdateWorkspaceMemberInviteVariables = {
926
983
  pathParams: UpdateWorkspaceMemberInvitePathParams;
927
984
  } & FetcherExtraProps;
928
985
  /**
929
- * This operation provides a way to update an existing invite. Updates are performed in-place; they do not
930
- * change the invite link, the expiry time, nor do they re-notify the recipient of the invite.
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.
931
987
  */
932
988
  declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
933
989
  declare type CancelWorkspaceMemberInvitePathParams = {
@@ -1275,6 +1331,10 @@ declare type CreateBranchError = ErrorWrapper<{
1275
1331
  status: 404;
1276
1332
  payload: SimpleError;
1277
1333
  }>;
1334
+ declare type CreateBranchResponse = {
1335
+ databaseName: string;
1336
+ branchName: string;
1337
+ };
1278
1338
  declare type CreateBranchRequestBody = {
1279
1339
  from?: string;
1280
1340
  metadata?: BranchMetadata;
@@ -1284,7 +1344,7 @@ declare type CreateBranchVariables = {
1284
1344
  pathParams: CreateBranchPathParams;
1285
1345
  queryParams?: CreateBranchQueryParams;
1286
1346
  } & FetcherExtraProps;
1287
- declare const createBranch: (variables: CreateBranchVariables) => Promise<undefined>;
1347
+ declare const createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
1288
1348
  declare type DeleteBranchPathParams = {
1289
1349
  dbBranchName: DBBranchName;
1290
1350
  workspace: string;
@@ -1471,13 +1531,17 @@ declare type CreateTableError = ErrorWrapper<{
1471
1531
  status: 422;
1472
1532
  payload: SimpleError;
1473
1533
  }>;
1534
+ declare type CreateTableResponse = {
1535
+ branchName: string;
1536
+ tableName: string;
1537
+ };
1474
1538
  declare type CreateTableVariables = {
1475
1539
  pathParams: CreateTablePathParams;
1476
1540
  } & FetcherExtraProps;
1477
1541
  /**
1478
1542
  * Creates a new table with the given name. Returns 422 if a table with the same name already exists.
1479
1543
  */
1480
- declare const createTable: (variables: CreateTableVariables) => Promise<undefined>;
1544
+ declare const createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
1481
1545
  declare type DeleteTablePathParams = {
1482
1546
  dbBranchName: DBBranchName;
1483
1547
  tableName: TableName;
@@ -1710,6 +1774,9 @@ declare type InsertRecordPathParams = {
1710
1774
  tableName: TableName;
1711
1775
  workspace: string;
1712
1776
  };
1777
+ declare type InsertRecordQueryParams = {
1778
+ columns?: ColumnsProjection;
1779
+ };
1713
1780
  declare type InsertRecordError = ErrorWrapper<{
1714
1781
  status: 400;
1715
1782
  payload: BadRequestError;
@@ -1720,20 +1787,15 @@ declare type InsertRecordError = ErrorWrapper<{
1720
1787
  status: 404;
1721
1788
  payload: SimpleError;
1722
1789
  }>;
1723
- declare type InsertRecordResponse = {
1724
- id: string;
1725
- xata: {
1726
- version: number;
1727
- };
1728
- };
1729
1790
  declare type InsertRecordVariables = {
1730
1791
  body?: Record<string, any>;
1731
1792
  pathParams: InsertRecordPathParams;
1793
+ queryParams?: InsertRecordQueryParams;
1732
1794
  } & FetcherExtraProps;
1733
1795
  /**
1734
1796
  * Insert a new Record into the Table
1735
1797
  */
1736
- declare const insertRecord: (variables: InsertRecordVariables) => Promise<InsertRecordResponse>;
1798
+ declare const insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
1737
1799
  declare type InsertRecordWithIDPathParams = {
1738
1800
  dbBranchName: DBBranchName;
1739
1801
  tableName: TableName;
@@ -1741,6 +1803,7 @@ declare type InsertRecordWithIDPathParams = {
1741
1803
  workspace: string;
1742
1804
  };
1743
1805
  declare type InsertRecordWithIDQueryParams = {
1806
+ columns?: ColumnsProjection;
1744
1807
  createOnly?: boolean;
1745
1808
  ifVersion?: number;
1746
1809
  };
@@ -1773,6 +1836,7 @@ declare type UpdateRecordWithIDPathParams = {
1773
1836
  workspace: string;
1774
1837
  };
1775
1838
  declare type UpdateRecordWithIDQueryParams = {
1839
+ columns?: ColumnsProjection;
1776
1840
  ifVersion?: number;
1777
1841
  };
1778
1842
  declare type UpdateRecordWithIDError = ErrorWrapper<{
@@ -1801,6 +1865,7 @@ declare type UpsertRecordWithIDPathParams = {
1801
1865
  workspace: string;
1802
1866
  };
1803
1867
  declare type UpsertRecordWithIDQueryParams = {
1868
+ columns?: ColumnsProjection;
1804
1869
  ifVersion?: number;
1805
1870
  };
1806
1871
  declare type UpsertRecordWithIDError = ErrorWrapper<{
@@ -1828,6 +1893,9 @@ declare type DeleteRecordPathParams = {
1828
1893
  recordId: RecordID;
1829
1894
  workspace: string;
1830
1895
  };
1896
+ declare type DeleteRecordQueryParams = {
1897
+ columns?: ColumnsProjection;
1898
+ };
1831
1899
  declare type DeleteRecordError = ErrorWrapper<{
1832
1900
  status: 400;
1833
1901
  payload: BadRequestError;
@@ -1840,14 +1908,18 @@ declare type DeleteRecordError = ErrorWrapper<{
1840
1908
  }>;
1841
1909
  declare type DeleteRecordVariables = {
1842
1910
  pathParams: DeleteRecordPathParams;
1911
+ queryParams?: DeleteRecordQueryParams;
1843
1912
  } & FetcherExtraProps;
1844
- declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<undefined>;
1913
+ declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
1845
1914
  declare type GetRecordPathParams = {
1846
1915
  dbBranchName: DBBranchName;
1847
1916
  tableName: TableName;
1848
1917
  recordId: RecordID;
1849
1918
  workspace: string;
1850
1919
  };
1920
+ declare type GetRecordQueryParams = {
1921
+ columns?: ColumnsProjection;
1922
+ };
1851
1923
  declare type GetRecordError = ErrorWrapper<{
1852
1924
  status: 400;
1853
1925
  payload: BadRequestError;
@@ -1858,12 +1930,9 @@ declare type GetRecordError = ErrorWrapper<{
1858
1930
  status: 404;
1859
1931
  payload: SimpleError;
1860
1932
  }>;
1861
- declare type GetRecordRequestBody = {
1862
- columns?: ColumnsFilter;
1863
- };
1864
1933
  declare type GetRecordVariables = {
1865
- body?: GetRecordRequestBody;
1866
1934
  pathParams: GetRecordPathParams;
1935
+ queryParams?: GetRecordQueryParams;
1867
1936
  } & FetcherExtraProps;
1868
1937
  /**
1869
1938
  * Retrieve record by ID
@@ -1874,6 +1943,9 @@ declare type BulkInsertTableRecordsPathParams = {
1874
1943
  tableName: TableName;
1875
1944
  workspace: string;
1876
1945
  };
1946
+ declare type BulkInsertTableRecordsQueryParams = {
1947
+ columns?: ColumnsProjection;
1948
+ };
1877
1949
  declare type BulkInsertTableRecordsError = ErrorWrapper<{
1878
1950
  status: 400;
1879
1951
  payload: BulkError;
@@ -1887,20 +1959,18 @@ declare type BulkInsertTableRecordsError = ErrorWrapper<{
1887
1959
  status: 422;
1888
1960
  payload: SimpleError;
1889
1961
  }>;
1890
- declare type BulkInsertTableRecordsResponse = {
1891
- recordIDs: string[];
1892
- };
1893
1962
  declare type BulkInsertTableRecordsRequestBody = {
1894
1963
  records: Record<string, any>[];
1895
1964
  };
1896
1965
  declare type BulkInsertTableRecordsVariables = {
1897
1966
  body: BulkInsertTableRecordsRequestBody;
1898
1967
  pathParams: BulkInsertTableRecordsPathParams;
1968
+ queryParams?: BulkInsertTableRecordsQueryParams;
1899
1969
  } & FetcherExtraProps;
1900
1970
  /**
1901
1971
  * Bulk insert records
1902
1972
  */
1903
- declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertTableRecordsResponse>;
1973
+ declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
1904
1974
  declare type QueryTablePathParams = {
1905
1975
  dbBranchName: DBBranchName;
1906
1976
  tableName: TableName;
@@ -1920,7 +1990,7 @@ declare type QueryTableRequestBody = {
1920
1990
  filter?: FilterExpression;
1921
1991
  sort?: SortExpression;
1922
1992
  page?: PageConfig;
1923
- columns?: ColumnsFilter;
1993
+ columns?: ColumnsProjection;
1924
1994
  };
1925
1995
  declare type QueryTableVariables = {
1926
1996
  body?: QueryTableRequestBody;
@@ -2669,6 +2739,7 @@ declare type SearchTableRequestBody = {
2669
2739
  prefix?: PrefixExpression;
2670
2740
  filter?: FilterExpression;
2671
2741
  highlight?: HighlightExpression;
2742
+ boosters?: BoosterExpression[];
2672
2743
  };
2673
2744
  declare type SearchTableVariables = {
2674
2745
  body: SearchTableRequestBody;
@@ -2700,6 +2771,7 @@ declare type SearchBranchRequestBody = {
2700
2771
  tables?: (string | {
2701
2772
  table: string;
2702
2773
  filter?: FilterExpression;
2774
+ boosters?: BoosterExpression[];
2703
2775
  })[];
2704
2776
  query: string;
2705
2777
  fuzziness?: FuzzinessExpression;
@@ -2749,7 +2821,7 @@ declare const operationsByTag: {
2749
2821
  branch: {
2750
2822
  getBranchList: (variables: GetBranchListVariables) => Promise<ListBranchesResponse>;
2751
2823
  getBranchDetails: (variables: GetBranchDetailsVariables) => Promise<DBBranch>;
2752
- createBranch: (variables: CreateBranchVariables) => Promise<undefined>;
2824
+ createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
2753
2825
  deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
2754
2826
  updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
2755
2827
  getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
@@ -2759,7 +2831,7 @@ declare const operationsByTag: {
2759
2831
  getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
2760
2832
  };
2761
2833
  table: {
2762
- createTable: (variables: CreateTableVariables) => Promise<undefined>;
2834
+ createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
2763
2835
  deleteTable: (variables: DeleteTableVariables) => Promise<undefined>;
2764
2836
  updateTable: (variables: UpdateTableVariables) => Promise<undefined>;
2765
2837
  getTableSchema: (variables: GetTableSchemaVariables) => Promise<GetTableSchemaResponse>;
@@ -2771,13 +2843,13 @@ declare const operationsByTag: {
2771
2843
  updateColumn: (variables: UpdateColumnVariables) => Promise<MigrationIdResponse>;
2772
2844
  };
2773
2845
  records: {
2774
- insertRecord: (variables: InsertRecordVariables) => Promise<InsertRecordResponse>;
2846
+ insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
2775
2847
  insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
2776
2848
  updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<RecordUpdateResponse>;
2777
2849
  upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
2778
- deleteRecord: (variables: DeleteRecordVariables) => Promise<undefined>;
2850
+ deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
2779
2851
  getRecord: (variables: GetRecordVariables) => Promise<XataRecord$1>;
2780
- bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertTableRecordsResponse>;
2852
+ bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
2781
2853
  queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
2782
2854
  searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
2783
2855
  searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
@@ -2852,7 +2924,7 @@ declare class BranchApi {
2852
2924
  constructor(extraProps: FetcherExtraProps);
2853
2925
  getBranchList(workspace: WorkspaceID, dbName: DBName): Promise<ListBranchesResponse>;
2854
2926
  getBranchDetails(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<DBBranch>;
2855
- 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>;
2856
2928
  deleteBranch(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<void>;
2857
2929
  updateBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName, metadata?: BranchMetadata): Promise<void>;
2858
2930
  getBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<BranchMetadata>;
@@ -2864,7 +2936,7 @@ declare class BranchApi {
2864
2936
  declare class TableApi {
2865
2937
  private extraProps;
2866
2938
  constructor(extraProps: FetcherExtraProps);
2867
- createTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<void>;
2939
+ createTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<CreateTableResponse>;
2868
2940
  deleteTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<void>;
2869
2941
  updateTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, options: UpdateTableRequestBody): Promise<void>;
2870
2942
  getTableSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName): Promise<GetTableSchemaResponse>;
@@ -2878,13 +2950,13 @@ declare class TableApi {
2878
2950
  declare class RecordsApi {
2879
2951
  private extraProps;
2880
2952
  constructor(extraProps: FetcherExtraProps);
2881
- 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>;
2882
2954
  insertRecordWithID(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, record: Record<string, any>, options?: InsertRecordWithIDQueryParams): Promise<RecordUpdateResponse>;
2883
2955
  updateRecordWithID(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, record: Record<string, any>, options?: UpdateRecordWithIDQueryParams): Promise<RecordUpdateResponse>;
2884
2956
  upsertRecordWithID(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, record: Record<string, any>, options?: UpsertRecordWithIDQueryParams): Promise<RecordUpdateResponse>;
2885
- deleteRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID): Promise<void>;
2886
- getRecord(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, recordId: RecordID, options?: GetRecordRequestBody): Promise<XataRecord$1>;
2887
- 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>;
2888
2960
  queryTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: QueryTableRequestBody): Promise<QueryResponse>;
2889
2961
  searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
2890
2962
  searchBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, query: SearchBranchRequestBody): Promise<SearchResponse>;
@@ -2900,19 +2972,20 @@ declare type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) ex
2900
2972
  declare type If<Condition, Then, Else> = Condition extends true ? Then : Else;
2901
2973
  declare type IsObject<T> = T extends Record<string, any> ? true : false;
2902
2974
  declare type IsArray<T> = T extends Array<any> ? true : false;
2903
- declare type NonEmptyArray<T> = T[] & {
2904
- 0: T;
2905
- };
2906
2975
  declare type RequiredBy<T, K extends keyof T> = T & {
2907
2976
  [P in K]-?: NonNullable<T[P]>;
2908
2977
  };
2909
2978
  declare type GetArrayInnerType<T extends readonly any[]> = T[number];
2910
2979
  declare type SingleOrArray<T> = T | T[];
2911
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;
2912
2985
 
2913
2986
  declare type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
2914
- declare type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord & UnionToIntersection<Values<{
2915
- [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>;
2916
2989
  }>>;
2917
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> ? {
2918
2991
  V: ValueAtColumn<Item, V>;
@@ -2948,22 +3021,37 @@ interface BaseData {
2948
3021
  /**
2949
3022
  * Represents a persisted record from the database.
2950
3023
  */
2951
- interface XataRecord<ExtraMetadata extends Record<string, unknown> = Record<string, unknown>> extends Identifiable {
3024
+ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> extends Identifiable {
2952
3025
  /**
2953
3026
  * Get metadata of this record.
2954
3027
  */
2955
- getMetadata(): XataRecordMetadata & ExtraMetadata;
3028
+ getMetadata(): XataRecordMetadata;
2956
3029
  /**
2957
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.
2958
3033
  */
2959
- 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>;
2960
3040
  /**
2961
3041
  * Performs a partial update of the current record. On success a new object is
2962
3042
  * returned and the current object is not mutated.
2963
3043
  * @param partialUpdate The columns and their values that have to be updated.
2964
- * @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.
3046
+ */
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.
2965
3053
  */
2966
- update(partialUpdate: Partial<EditableData<Omit<this, keyof XataRecord>>>): Promise<Readonly<SelectedPick<this, ['*']>>>;
3054
+ update(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>>>;
2967
3055
  /**
2968
3056
  * Performs a deletion of the current record in the database.
2969
3057
  *
@@ -2975,14 +3063,20 @@ declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update
2975
3063
  /**
2976
3064
  * Retrieves a refreshed copy of the current record from the database.
2977
3065
  */
2978
- 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>;
2979
3067
  /**
2980
3068
  * Performs a partial update of the current record. On success a new object is
2981
3069
  * returned and the current object is not mutated.
2982
3070
  * @param partialUpdate The columns and their values that have to be updated.
2983
3071
  * @returns A new record containing the latest values for all the columns of the current record.
2984
3072
  */
2985
- 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>;
2986
3080
  };
2987
3081
  declare type XataRecordMetadata = {
2988
3082
  /**
@@ -3095,6 +3189,84 @@ declare type NestedApiFilter<T> = {
3095
3189
  };
3096
3190
  declare type Filter<T> = T extends Record<string, any> ? BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
3097
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
+
3098
3270
  declare type SortDirection = 'asc' | 'desc';
3099
3271
  declare type SortFilterExtended<T extends XataRecord> = {
3100
3272
  column: SelectableColumn<T>;
@@ -3106,7 +3278,7 @@ declare type SortFilterBase<T extends XataRecord> = {
3106
3278
  };
3107
3279
 
3108
3280
  declare type BaseOptions<T extends XataRecord> = {
3109
- columns?: NonEmptyArray<SelectableColumn<T>>;
3281
+ columns?: SelectableColumn<T>[];
3110
3282
  cache?: number;
3111
3283
  };
3112
3284
  declare type CursorQueryOptions = {
@@ -3196,7 +3368,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3196
3368
  * @param columns Array of column names to be returned by the query.
3197
3369
  * @returns A new Query object.
3198
3370
  */
3199
- 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[]>>;
3200
3372
  /**
3201
3373
  * Get paginated results
3202
3374
  *
@@ -3463,7 +3635,16 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
3463
3635
  * Common interface for performing operations on a table.
3464
3636
  */
3465
3637
  declare abstract class Repository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, 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>>>;
3466
3639
  abstract create(object: Omit<EditableData<Data>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3640
+ /**
3641
+ * Creates a single record in the table with a unique id.
3642
+ * @param id The unique id.
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.
3645
+ * @returns The full persisted record.
3646
+ */
3647
+ abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3467
3648
  /**
3468
3649
  * Creates a single record in the table with a unique id.
3469
3650
  * @param id The unique id.
@@ -3474,9 +3655,23 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3474
3655
  /**
3475
3656
  * Creates multiple records in the table.
3476
3657
  * @param objects Array of objects with the column names and the values to be stored in the table.
3477
- * @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.
3660
+ */
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.
3478
3666
  */
3479
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>>;
3480
3675
  /**
3481
3676
  * Queries a single record from the table given its unique id.
3482
3677
  * @param id The unique id.
@@ -3486,9 +3681,23 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3486
3681
  /**
3487
3682
  * Queries multiple records from the table given their unique id.
3488
3683
  * @param ids The unique ids array.
3489
- * @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).
3490
3692
  */
3491
- abstract read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
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.
3699
+ */
3700
+ abstract read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
3492
3701
  /**
3493
3702
  * Queries a single record from the table by the id in the object.
3494
3703
  * @param object Object containing the id of the record.
@@ -3498,15 +3707,37 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3498
3707
  /**
3499
3708
  * Queries multiple records from the table by the ids in the objects.
3500
3709
  * @param objects Array of objects containing the ids of the records.
3501
- * @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).
3712
+ */
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.
3502
3725
  */
3503
- abstract read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3726
+ abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Data>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3504
3727
  /**
3505
3728
  * Partially update a single record.
3506
3729
  * @param object An object with its id and the columns to be updated.
3507
3730
  * @returns The full persisted record.
3508
3731
  */
3509
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>>>;
3510
3741
  /**
3511
3742
  * Partially update a single record given its unique id.
3512
3743
  * @param id The unique id.
@@ -3517,9 +3748,24 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3517
3748
  /**
3518
3749
  * Partially updates multiple records.
3519
3750
  * @param objects An array of objects with their ids and columns to be updated.
3520
- * @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.
3521
3759
  */
3522
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>>>;
3523
3769
  /**
3524
3770
  * Creates or updates a single record. If a record exists with the given id,
3525
3771
  * it will be update, otherwise a new record will be created.
@@ -3527,6 +3773,15 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3527
3773
  * @returns The full persisted record.
3528
3774
  */
3529
3775
  abstract createOrUpdate(object: EditableData<Data> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3776
+ /**
3777
+ * Creates or updates a single record. If a record exists with the given id,
3778
+ * it will be update, otherwise a new record will be created.
3779
+ * @param id A unique id.
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.
3782
+ * @returns The full persisted record.
3783
+ */
3784
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3530
3785
  /**
3531
3786
  * Creates or updates a single record. If a record exists with the given id,
3532
3787
  * it will be update, otherwise a new record will be created.
@@ -3535,6 +3790,14 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3535
3790
  * @returns The full persisted record.
3536
3791
  */
3537
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>>[]>;
3538
3801
  /**
3539
3802
  * Creates or updates a single record. If a record exists with the given id,
3540
3803
  * it will be update, otherwise a new record will be created.
@@ -3574,9 +3837,11 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3574
3837
  */
3575
3838
  abstract search(query: string, options?: {
3576
3839
  fuzziness?: FuzzinessExpression;
3840
+ prefix?: PrefixExpression;
3577
3841
  highlight?: HighlightExpression;
3578
3842
  filter?: Filter<Record>;
3579
- }): Promise<SelectedPick<Record, ['*']>[]>;
3843
+ boosters?: Boosters<Record>[];
3844
+ }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
3580
3845
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
3581
3846
  }
3582
3847
  declare class RestRepository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Data, Record> {
@@ -3591,22 +3856,37 @@ declare class RestRepository<Data extends BaseData, Record extends XataRecord =
3591
3856
  create(object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3592
3857
  create(recordId: string, object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3593
3858
  create(objects: EditableData<Data>[]): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3594
- 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>;
3595
3863
  read(recordIds: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3596
- read(object: Identifiable): Promise<SelectedPick<Record, ['*']> | null>;
3864
+ read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3597
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>>>>;
3598
3870
  update(object: Partial<EditableData<Data>> & Identifiable): Promise<SelectedPick<Record, ['*']>>;
3599
3871
  update(recordId: string, object: Partial<EditableData<Data>>): Promise<SelectedPick<Record, ['*']>>;
3600
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>[]>;
3601
3876
  createOrUpdate(object: EditableData<Data>): Promise<SelectedPick<Record, ['*']>>;
3602
3877
  createOrUpdate(recordId: string, object: EditableData<Data>): Promise<SelectedPick<Record, ['*']>>;
3603
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>[]>;
3604
3882
  delete(a: string | Identifiable | Array<string | Identifiable>): Promise<void>;
3605
3883
  search(query: string, options?: {
3606
3884
  fuzziness?: FuzzinessExpression;
3885
+ prefix?: PrefixExpression;
3607
3886
  highlight?: HighlightExpression;
3608
3887
  filter?: Filter<Record>;
3609
- }): Promise<SelectedPick<Record, ['*']>[]>;
3888
+ boosters?: Boosters<Record>[];
3889
+ }): Promise<any>;
3610
3890
  query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
3611
3891
  }
3612
3892
 
@@ -3750,47 +4030,6 @@ declare class SchemaPlugin<Schemas extends Record<string, BaseData>> extends Xat
3750
4030
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
3751
4031
  }
3752
4032
 
3753
- declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
3754
- fuzziness?: FuzzinessExpression;
3755
- highlight?: HighlightExpression;
3756
- tables?: Array<Tables | Values<{
3757
- [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
3758
- table: Model;
3759
- filter?: Filter<SelectedPick<Schemas[Model] & SearchXataRecord, ['*']>>;
3760
- };
3761
- }>>;
3762
- };
3763
- declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
3764
- all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
3765
- [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
3766
- table: Model;
3767
- record: Awaited<SelectedPick<Schemas[Model] & SearchXataRecord, ['*']>>;
3768
- };
3769
- }>[]>;
3770
- byTable: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<{
3771
- [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SelectedPick<Schemas[Model] & SearchXataRecord, ['*']>[]>;
3772
- }>;
3773
- };
3774
- declare class SearchPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
3775
- #private;
3776
- private db;
3777
- constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
3778
- build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
3779
- }
3780
- declare type SearchXataRecord = XataRecord<SearchExtraProperties>;
3781
- declare type SearchExtraProperties = {
3782
- table: string;
3783
- highlight?: {
3784
- [key: string]: string[] | {
3785
- [key: string]: any;
3786
- };
3787
- };
3788
- };
3789
- declare type ReturnTable<Table, Tables> = Table extends Tables ? Table : never;
3790
- 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 {
3791
- table: infer Table;
3792
- } ? ReturnTable<Table, Tables> : never;
3793
-
3794
4033
  declare type BranchStrategyValue = string | undefined | null;
3795
4034
  declare type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
3796
4035
  declare type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
@@ -3832,4 +4071,4 @@ declare class XataError extends Error {
3832
4071
  constructor(message: string, status: number);
3833
4072
  }
3834
4073
 
3835
- 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, 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 };
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 };