@xata.io/client 0.0.0-alpha.vf9f8d99 → 0.0.0-alpha.vfa1407e

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
@@ -27,6 +27,7 @@ declare abstract class XataPlugin {
27
27
  }
28
28
  type XataPluginOptions = ApiExtraProps & {
29
29
  cache: CacheImpl;
30
+ host: HostProvider;
30
31
  };
31
32
 
32
33
  type AttributeDictionary = Record<string, string | number | boolean | undefined>;
@@ -36,7 +37,7 @@ type TraceFunction = <T>(name: string, fn: (options: {
36
37
  }) => T, options?: AttributeDictionary) => Promise<T>;
37
38
 
38
39
  type RequestInit = {
39
- body?: string;
40
+ body?: any;
40
41
  headers?: Record<string, string>;
41
42
  method?: string;
42
43
  signal?: any;
@@ -46,6 +47,8 @@ type Response = {
46
47
  status: number;
47
48
  url: string;
48
49
  json(): Promise<any>;
50
+ text(): Promise<string>;
51
+ blob(): Promise<Blob>;
49
52
  headers?: {
50
53
  get(name: string): string | null;
51
54
  };
@@ -80,6 +83,8 @@ type FetcherExtraProps = {
80
83
  clientName?: string;
81
84
  xataAgentExtra?: Record<string, string>;
82
85
  fetchOptions?: Record<string, unknown>;
86
+ rawResponse?: boolean;
87
+ headers?: Record<string, unknown>;
83
88
  };
84
89
 
85
90
  type ControlPlaneFetcherExtraProps = {
@@ -104,6 +109,26 @@ type ErrorWrapper$1<TError> = TError | {
104
109
  *
105
110
  * @version 1.0
106
111
  */
112
+ type OAuthResponseType = 'code';
113
+ type OAuthScope = 'admin:all';
114
+ type AuthorizationCodeResponse = {
115
+ state?: string;
116
+ redirectUri?: string;
117
+ scopes?: OAuthScope[];
118
+ clientId?: string;
119
+ /**
120
+ * @format date-time
121
+ */
122
+ expires?: string;
123
+ code?: string;
124
+ };
125
+ type AuthorizationCodeRequest = {
126
+ state?: string;
127
+ redirectUri?: string;
128
+ scopes?: OAuthScope[];
129
+ clientId: string;
130
+ responseType: OAuthResponseType;
131
+ };
107
132
  type User = {
108
133
  /**
109
134
  * @format email
@@ -128,6 +153,31 @@ type DateTime$1 = string;
128
153
  * @pattern [a-zA-Z0-9_\-~]*
129
154
  */
130
155
  type APIKeyName = string;
156
+ type OAuthClientPublicDetails = {
157
+ name?: string;
158
+ description?: string;
159
+ icon?: string;
160
+ clientId: string;
161
+ };
162
+ type OAuthClientID = string;
163
+ type OAuthAccessToken = {
164
+ token: string;
165
+ scopes: string[];
166
+ /**
167
+ * @format date-time
168
+ */
169
+ createdAt: string;
170
+ /**
171
+ * @format date-time
172
+ */
173
+ updatedAt: string;
174
+ /**
175
+ * @format date-time
176
+ */
177
+ expiresAt: string;
178
+ clientId: string;
179
+ };
180
+ type AccessToken = string;
131
181
  /**
132
182
  * @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
133
183
  * @x-go-type auth.WorkspaceID
@@ -259,6 +309,7 @@ type DatabaseGithubSettings = {
259
309
  };
260
310
  type Region = {
261
311
  id: string;
312
+ name: string;
262
313
  };
263
314
  type ListRegionsResponse = {
264
315
  /**
@@ -294,6 +345,53 @@ type SimpleError$1 = {
294
345
  * @version 1.0
295
346
  */
296
347
 
348
+ type GetAuthorizationCodeQueryParams = {
349
+ clientID: string;
350
+ responseType: OAuthResponseType;
351
+ redirectUri?: string;
352
+ scopes?: OAuthScope[];
353
+ state?: string;
354
+ };
355
+ type GetAuthorizationCodeError = ErrorWrapper$1<{
356
+ status: 400;
357
+ payload: BadRequestError$1;
358
+ } | {
359
+ status: 401;
360
+ payload: AuthError$1;
361
+ } | {
362
+ status: 404;
363
+ payload: SimpleError$1;
364
+ } | {
365
+ status: 409;
366
+ payload: SimpleError$1;
367
+ }>;
368
+ type GetAuthorizationCodeVariables = {
369
+ queryParams: GetAuthorizationCodeQueryParams;
370
+ } & ControlPlaneFetcherExtraProps;
371
+ /**
372
+ * Creates, stores and returns an authorization code to be used by a third party app. Supporting use of GET is required by OAuth2 spec
373
+ */
374
+ declare const getAuthorizationCode: (variables: GetAuthorizationCodeVariables, signal?: AbortSignal) => Promise<AuthorizationCodeResponse>;
375
+ type GrantAuthorizationCodeError = ErrorWrapper$1<{
376
+ status: 400;
377
+ payload: BadRequestError$1;
378
+ } | {
379
+ status: 401;
380
+ payload: AuthError$1;
381
+ } | {
382
+ status: 404;
383
+ payload: SimpleError$1;
384
+ } | {
385
+ status: 409;
386
+ payload: SimpleError$1;
387
+ }>;
388
+ type GrantAuthorizationCodeVariables = {
389
+ body: AuthorizationCodeRequest;
390
+ } & ControlPlaneFetcherExtraProps;
391
+ /**
392
+ * Creates, stores and returns an authorization code to be used by a third party app
393
+ */
394
+ declare const grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal) => Promise<AuthorizationCodeResponse>;
297
395
  type GetUserError = ErrorWrapper$1<{
298
396
  status: 400;
299
397
  payload: BadRequestError$1;
@@ -413,6 +511,115 @@ type DeleteUserAPIKeyVariables = {
413
511
  * Delete an existing API key
414
512
  */
415
513
  declare const deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
514
+ type GetUserOAuthClientsError = ErrorWrapper$1<{
515
+ status: 400;
516
+ payload: BadRequestError$1;
517
+ } | {
518
+ status: 401;
519
+ payload: AuthError$1;
520
+ } | {
521
+ status: 404;
522
+ payload: SimpleError$1;
523
+ }>;
524
+ type GetUserOAuthClientsResponse = {
525
+ clients?: OAuthClientPublicDetails[];
526
+ };
527
+ type GetUserOAuthClientsVariables = ControlPlaneFetcherExtraProps;
528
+ /**
529
+ * Retrieve the list of OAuth Clients that a user has authorized
530
+ */
531
+ declare const getUserOAuthClients: (variables: GetUserOAuthClientsVariables, signal?: AbortSignal) => Promise<GetUserOAuthClientsResponse>;
532
+ type DeleteUserOAuthClientPathParams = {
533
+ clientId: OAuthClientID;
534
+ };
535
+ type DeleteUserOAuthClientError = ErrorWrapper$1<{
536
+ status: 400;
537
+ payload: BadRequestError$1;
538
+ } | {
539
+ status: 401;
540
+ payload: AuthError$1;
541
+ } | {
542
+ status: 404;
543
+ payload: SimpleError$1;
544
+ }>;
545
+ type DeleteUserOAuthClientVariables = {
546
+ pathParams: DeleteUserOAuthClientPathParams;
547
+ } & ControlPlaneFetcherExtraProps;
548
+ /**
549
+ * Delete the oauth client for the user and revoke all access
550
+ */
551
+ declare const deleteUserOAuthClient: (variables: DeleteUserOAuthClientVariables, signal?: AbortSignal) => Promise<undefined>;
552
+ type GetUserOAuthAccessTokensError = ErrorWrapper$1<{
553
+ status: 400;
554
+ payload: BadRequestError$1;
555
+ } | {
556
+ status: 401;
557
+ payload: AuthError$1;
558
+ } | {
559
+ status: 404;
560
+ payload: SimpleError$1;
561
+ }>;
562
+ type GetUserOAuthAccessTokensResponse = {
563
+ accessTokens: OAuthAccessToken[];
564
+ };
565
+ type GetUserOAuthAccessTokensVariables = ControlPlaneFetcherExtraProps;
566
+ /**
567
+ * Retrieve the list of valid OAuth Access Tokens on the current user's account
568
+ */
569
+ declare const getUserOAuthAccessTokens: (variables: GetUserOAuthAccessTokensVariables, signal?: AbortSignal) => Promise<GetUserOAuthAccessTokensResponse>;
570
+ type DeleteOAuthAccessTokenPathParams = {
571
+ token: AccessToken;
572
+ };
573
+ type DeleteOAuthAccessTokenError = ErrorWrapper$1<{
574
+ status: 400;
575
+ payload: BadRequestError$1;
576
+ } | {
577
+ status: 401;
578
+ payload: AuthError$1;
579
+ } | {
580
+ status: 404;
581
+ payload: SimpleError$1;
582
+ } | {
583
+ status: 409;
584
+ payload: SimpleError$1;
585
+ }>;
586
+ type DeleteOAuthAccessTokenVariables = {
587
+ pathParams: DeleteOAuthAccessTokenPathParams;
588
+ } & ControlPlaneFetcherExtraProps;
589
+ /**
590
+ * Expires the access token for a third party app
591
+ */
592
+ declare const deleteOAuthAccessToken: (variables: DeleteOAuthAccessTokenVariables, signal?: AbortSignal) => Promise<undefined>;
593
+ type UpdateOAuthAccessTokenPathParams = {
594
+ token: AccessToken;
595
+ };
596
+ type UpdateOAuthAccessTokenError = ErrorWrapper$1<{
597
+ status: 400;
598
+ payload: BadRequestError$1;
599
+ } | {
600
+ status: 401;
601
+ payload: AuthError$1;
602
+ } | {
603
+ status: 404;
604
+ payload: SimpleError$1;
605
+ } | {
606
+ status: 409;
607
+ payload: SimpleError$1;
608
+ }>;
609
+ type UpdateOAuthAccessTokenRequestBody = {
610
+ /**
611
+ * expiration time of the token as a unix timestamp
612
+ */
613
+ expires: number;
614
+ };
615
+ type UpdateOAuthAccessTokenVariables = {
616
+ body: UpdateOAuthAccessTokenRequestBody;
617
+ pathParams: UpdateOAuthAccessTokenPathParams;
618
+ } & ControlPlaneFetcherExtraProps;
619
+ /**
620
+ * Updates partially the access token for a third party app
621
+ */
622
+ declare const updateOAuthAccessToken: (variables: UpdateOAuthAccessTokenVariables, signal?: AbortSignal) => Promise<OAuthAccessToken>;
416
623
  type GetWorkspacesListError = ErrorWrapper$1<{
417
624
  status: 400;
418
625
  payload: BadRequestError$1;
@@ -952,6 +1159,43 @@ type UpdateDatabaseMetadataVariables = {
952
1159
  * Update the color of the selected database
953
1160
  */
954
1161
  declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
1162
+ type RenameDatabasePathParams = {
1163
+ /**
1164
+ * Workspace ID
1165
+ */
1166
+ workspaceId: WorkspaceID;
1167
+ /**
1168
+ * The Database Name
1169
+ */
1170
+ dbName: DBName$1;
1171
+ };
1172
+ type RenameDatabaseError = ErrorWrapper$1<{
1173
+ status: 400;
1174
+ payload: BadRequestError$1;
1175
+ } | {
1176
+ status: 401;
1177
+ payload: AuthError$1;
1178
+ } | {
1179
+ status: 422;
1180
+ payload: SimpleError$1;
1181
+ } | {
1182
+ status: 423;
1183
+ payload: SimpleError$1;
1184
+ }>;
1185
+ type RenameDatabaseRequestBody = {
1186
+ /**
1187
+ * @minLength 1
1188
+ */
1189
+ newName: string;
1190
+ };
1191
+ type RenameDatabaseVariables = {
1192
+ body: RenameDatabaseRequestBody;
1193
+ pathParams: RenameDatabasePathParams;
1194
+ } & ControlPlaneFetcherExtraProps;
1195
+ /**
1196
+ * Change the name of an existing database
1197
+ */
1198
+ declare const renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
955
1199
  type GetDatabaseGithubSettingsPathParams = {
956
1200
  /**
957
1201
  * Workspace ID
@@ -1133,19 +1377,24 @@ type ColumnVector = {
1133
1377
  */
1134
1378
  dimension: number;
1135
1379
  };
1380
+ type ColumnFile = {
1381
+ defaultPublicAccess?: boolean;
1382
+ };
1136
1383
  type Column = {
1137
1384
  name: string;
1138
- type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'fileArray';
1385
+ type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file' | 'json';
1139
1386
  link?: ColumnLink;
1140
1387
  vector?: ColumnVector;
1388
+ file?: ColumnFile;
1389
+ ['file[]']?: ColumnFile;
1141
1390
  notNull?: boolean;
1142
1391
  defaultValue?: string;
1143
1392
  unique?: boolean;
1144
1393
  columns?: Column[];
1145
1394
  };
1146
1395
  type RevLink = {
1147
- linkID: string;
1148
1396
  table: string;
1397
+ column: string;
1149
1398
  };
1150
1399
  type Table = {
1151
1400
  id?: string;
@@ -1172,6 +1421,11 @@ type DBBranch = {
1172
1421
  schema: Schema;
1173
1422
  };
1174
1423
  type MigrationStatus = 'completed' | 'pending' | 'failed';
1424
+ type BranchWithCopyID = {
1425
+ branchName: BranchName;
1426
+ dbBranchID: string;
1427
+ copyID: string;
1428
+ };
1175
1429
  type MetricsDatapoint = {
1176
1430
  timestamp: string;
1177
1431
  value: number;
@@ -1287,7 +1541,7 @@ type FilterColumnIncludes = {
1287
1541
  $includesNone?: FilterPredicate;
1288
1542
  };
1289
1543
  type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
1290
- type SortOrder = 'asc' | 'desc';
1544
+ type SortOrder = 'asc' | 'desc' | 'random';
1291
1545
  type SortExpression = string[] | {
1292
1546
  [key: string]: SortOrder;
1293
1547
  } | {
@@ -1385,9 +1639,13 @@ type RecordsMetadata = {
1385
1639
  */
1386
1640
  cursor: string;
1387
1641
  /**
1388
- * true if more records can be fetch
1642
+ * true if more records can be fetched
1389
1643
  */
1390
1644
  more: boolean;
1645
+ /**
1646
+ * the number of records returned per page
1647
+ */
1648
+ size: number;
1391
1649
  };
1392
1650
  };
1393
1651
  type TableOpAdd = {
@@ -1436,10 +1694,9 @@ type Commit = {
1436
1694
  message?: string;
1437
1695
  id: string;
1438
1696
  parentID?: string;
1697
+ checksum: string;
1439
1698
  mergeParentID?: string;
1440
- status: MigrationStatus;
1441
1699
  createdAt: DateTime;
1442
- modifiedAt?: DateTime;
1443
1700
  operations: MigrationOp[];
1444
1701
  };
1445
1702
  type SchemaEditScript = {
@@ -1447,6 +1704,16 @@ type SchemaEditScript = {
1447
1704
  targetMigrationID?: string;
1448
1705
  operations: MigrationOp[];
1449
1706
  };
1707
+ type BranchOp = {
1708
+ id: string;
1709
+ parentID?: string;
1710
+ title?: string;
1711
+ message?: string;
1712
+ status: MigrationStatus;
1713
+ createdAt: DateTime;
1714
+ modifiedAt?: DateTime;
1715
+ migration?: Commit;
1716
+ };
1450
1717
  /**
1451
1718
  * Branch schema migration.
1452
1719
  */
@@ -1454,6 +1721,14 @@ type Migration = {
1454
1721
  parentID?: string;
1455
1722
  operations: MigrationOp[];
1456
1723
  };
1724
+ type MigrationObject = {
1725
+ title?: string;
1726
+ message?: string;
1727
+ id: string;
1728
+ parentID?: string;
1729
+ checksum: string;
1730
+ operations: MigrationOp[];
1731
+ };
1457
1732
  /**
1458
1733
  * @pattern [a-zA-Z0-9_\-~\.]+
1459
1734
  */
@@ -1527,9 +1802,27 @@ type TransactionUpdateOp = {
1527
1802
  columns?: string[];
1528
1803
  };
1529
1804
  /**
1530
- * A delete operation. The transaction will continue if no record matches the ID.
1805
+ * A delete operation. The transaction will continue if no record matches the ID by default. To override this behaviour, set failIfMissing to true.
1531
1806
  */
1532
1807
  type TransactionDeleteOp = {
1808
+ /**
1809
+ * The table name
1810
+ */
1811
+ table: string;
1812
+ id: RecordID;
1813
+ /**
1814
+ * If true, the transaction will fail when the record doesn't exist.
1815
+ */
1816
+ failIfMissing?: boolean;
1817
+ /**
1818
+ * If set, the call will return the requested fields as part of the response.
1819
+ */
1820
+ columns?: string[];
1821
+ };
1822
+ /**
1823
+ * Get by id operation.
1824
+ */
1825
+ type TransactionGetOp = {
1533
1826
  /**
1534
1827
  * The table name
1535
1828
  */
@@ -1549,6 +1842,8 @@ type TransactionOperation$1 = {
1549
1842
  update: TransactionUpdateOp;
1550
1843
  } | {
1551
1844
  ['delete']: TransactionDeleteOp;
1845
+ } | {
1846
+ get: TransactionGetOp;
1552
1847
  };
1553
1848
  /**
1554
1849
  * Fields to return in the transaction result.
@@ -1600,11 +1895,21 @@ type TransactionResultDelete = {
1600
1895
  rows: number;
1601
1896
  columns?: TransactionResultColumns;
1602
1897
  };
1898
+ /**
1899
+ * A result from a get operation.
1900
+ */
1901
+ type TransactionResultGet = {
1902
+ /**
1903
+ * The type of operation who's result is being returned.
1904
+ */
1905
+ operation: 'get';
1906
+ columns?: TransactionResultColumns;
1907
+ };
1603
1908
  /**
1604
1909
  * An ordered array of results from the submitted operations.
1605
1910
  */
1606
1911
  type TransactionSuccess = {
1607
- results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
1912
+ results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete | TransactionResultGet)[];
1608
1913
  };
1609
1914
  /**
1610
1915
  * An error message from a failing transaction operation
@@ -1620,7 +1925,7 @@ type TransactionError = {
1620
1925
  message: string;
1621
1926
  };
1622
1927
  /**
1623
- * An array of errors, with indicides, from the transaction.
1928
+ * An array of errors, with indices, from the transaction.
1624
1929
  */
1625
1930
  type TransactionFailure = {
1626
1931
  /**
@@ -1639,27 +1944,36 @@ type ObjectValue = {
1639
1944
  [key: string]: string | boolean | number | string[] | number[] | DateTime | ObjectValue;
1640
1945
  };
1641
1946
  /**
1642
- * Object representing a file
1947
+ * Unique file identifier
1643
1948
  *
1644
- * @x-go-type file.InputFile
1949
+ * @maxLength 255
1950
+ * @minLength 1
1951
+ * @pattern [a-zA-Z0-9_-~:]+
1952
+ */
1953
+ type FileItemID = string;
1954
+ /**
1955
+ * File name
1956
+ *
1957
+ * @maxLength 1024
1958
+ * @minLength 0
1959
+ * @pattern [0-9a-zA-Z!\-_\.\*'\(\)]*
1960
+ */
1961
+ type FileName = string;
1962
+ /**
1963
+ * Media type
1964
+ *
1965
+ * @maxLength 255
1966
+ * @minLength 3
1967
+ * @pattern ^\w+/[-+.\w]+$
1968
+ */
1969
+ type MediaType = string;
1970
+ /**
1971
+ * Object representing a file in an array
1645
1972
  */
1646
1973
  type InputFileEntry = {
1647
- /**
1648
- * File name
1649
- *
1650
- * @maxLength 1024
1651
- * @minLength 1
1652
- * @pattern [0-9a-zA-Z!\-_\.\*'\(\)]+
1653
- */
1654
- name: string;
1655
- /**
1656
- * Media type
1657
- *
1658
- * @maxLength 255
1659
- * @minLength 3
1660
- * @pattern ^\w+/[-+.\w]+$
1661
- */
1662
- mediaType?: string;
1974
+ id?: FileItemID;
1975
+ name?: FileName;
1976
+ mediaType?: MediaType;
1663
1977
  /**
1664
1978
  * Base64 encoded content
1665
1979
  *
@@ -1681,11 +1995,34 @@ type InputFileEntry = {
1681
1995
  * @maxItems 50
1682
1996
  */
1683
1997
  type InputFileArray = InputFileEntry[];
1998
+ /**
1999
+ * Object representing a file
2000
+ *
2001
+ * @x-go-type file.InputFile
2002
+ */
2003
+ type InputFile = {
2004
+ name: FileName;
2005
+ mediaType?: MediaType;
2006
+ /**
2007
+ * Base64 encoded content
2008
+ *
2009
+ * @maxLength 20971520
2010
+ */
2011
+ base64Content?: string;
2012
+ /**
2013
+ * Enable public access to the file
2014
+ */
2015
+ enablePublicUrl?: boolean;
2016
+ /**
2017
+ * Time to live for signed URLs
2018
+ */
2019
+ signedUrlTimeout?: number;
2020
+ };
1684
2021
  /**
1685
2022
  * Xata input record
1686
2023
  */
1687
2024
  type DataInputRecord = {
1688
- [key: string]: RecordID | string | boolean | number | string[] | number[] | DateTime | ObjectValue | InputFileArray | InputFileEntry;
2025
+ [key: string]: RecordID | string | boolean | number | string[] | number[] | DateTime | ObjectValue | InputFileArray | InputFile | null;
1689
2026
  };
1690
2027
  /**
1691
2028
  * Xata Table Record Metadata
@@ -1697,6 +2034,14 @@ type RecordMeta = {
1697
2034
  * The record's version. Can be used for optimistic concurrency control.
1698
2035
  */
1699
2036
  version: number;
2037
+ /**
2038
+ * The time when the record was created.
2039
+ */
2040
+ createdAt?: string;
2041
+ /**
2042
+ * The time when the record was last updated.
2043
+ */
2044
+ updatedAt?: string;
1700
2045
  /**
1701
2046
  * The record's table name. APIs that return records from multiple tables will set this field accordingly.
1702
2047
  */
@@ -1720,21 +2065,62 @@ type RecordMeta = {
1720
2065
  };
1721
2066
  };
1722
2067
  /**
1723
- * The target expression is used to filter the search results by the target columns.
2068
+ * File metadata
1724
2069
  */
1725
- type TargetExpression = (string | {
2070
+ type FileResponse = {
2071
+ id?: FileItemID;
2072
+ name: FileName;
2073
+ mediaType: MediaType;
1726
2074
  /**
1727
- * The name of the column.
2075
+ * @format int64
1728
2076
  */
1729
- column: string;
2077
+ size: number;
1730
2078
  /**
1731
- * The weight of the column.
1732
- *
1733
- * @default 1
1734
- * @maximum 10
1735
- * @minimum 1
2079
+ * @format int64
1736
2080
  */
1737
- weight?: number;
2081
+ version: number;
2082
+ attributes?: Record<string, any>;
2083
+ };
2084
+ type QueryColumnsProjection = (string | ProjectionConfig)[];
2085
+ /**
2086
+ * A structured projection that allows for some configuration.
2087
+ */
2088
+ type ProjectionConfig = {
2089
+ /**
2090
+ * The name of the column to project or a reverse link specification, see [API Guide](https://xata.io/docs/concepts/data-model#links-and-relations).
2091
+ */
2092
+ name?: string;
2093
+ columns?: QueryColumnsProjection;
2094
+ /**
2095
+ * An alias for the projected field, this is how it will be returned in the response.
2096
+ */
2097
+ as?: string;
2098
+ sort?: SortExpression;
2099
+ /**
2100
+ * @default 20
2101
+ */
2102
+ limit?: number;
2103
+ /**
2104
+ * @default 0
2105
+ */
2106
+ offset?: number;
2107
+ };
2108
+ /**
2109
+ * The target expression is used to filter the search results by the target columns.
2110
+ */
2111
+ type TargetExpression = (string | {
2112
+ /**
2113
+ * The name of the column.
2114
+ */
2115
+ column: string;
2116
+ /**
2117
+ * The weight of the column.
2118
+ *
2119
+ * @default 1
2120
+ * @maximum 10
2121
+ * @minimum 1
2122
+ */
2123
+ weight?: number;
1738
2124
  })[];
1739
2125
  /**
1740
2126
  * Boost records with a particular value for a column.
@@ -1749,7 +2135,7 @@ type ValueBooster$1 = {
1749
2135
  */
1750
2136
  value: string | number | boolean;
1751
2137
  /**
1752
- * The factor with which to multiply the score of the record.
2138
+ * The factor with which to multiply the added boost.
1753
2139
  */
1754
2140
  factor: number;
1755
2141
  /**
@@ -1791,7 +2177,8 @@ type NumericBooster$1 = {
1791
2177
  /**
1792
2178
  * Boost records based on the value of a datetime column. It is configured via "origin", "scale", and "decay". The further away from the "origin",
1793
2179
  * 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
1794
- * 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.
2180
+ * should be interpreted as: a record with a date 10 days before/after origin will be boosted 2 times less than a record with the date at origin.
2181
+ * The result of the exponential function is a boost between 0 and 1. The "factor" allows you to control how impactful this boost is, by multiplying it with a given value.
1795
2182
  */
1796
2183
  type DateBooster$1 = {
1797
2184
  /**
@@ -1804,7 +2191,7 @@ type DateBooster$1 = {
1804
2191
  */
1805
2192
  origin?: string;
1806
2193
  /**
1807
- * The duration at which distance from origin the score is decayed with factor, using an exponential function. It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
2194
+ * The duration at which distance from origin the score is decayed with factor, using an exponential function. It is formatted as number + units, for example: `5d`, `20m`, `10s`.
1808
2195
  *
1809
2196
  * @pattern ^(\d+)(d|h|m|s|ms)$
1810
2197
  */
@@ -1813,6 +2200,12 @@ type DateBooster$1 = {
1813
2200
  * The decay factor to expect at "scale" distance from the "origin".
1814
2201
  */
1815
2202
  decay: number;
2203
+ /**
2204
+ * The factor with which to multiply the added boost.
2205
+ *
2206
+ * @minimum 0
2207
+ */
2208
+ factor?: number;
1816
2209
  /**
1817
2210
  * Only apply this booster to the records for which the provided filter matches.
1818
2211
  */
@@ -1833,7 +2226,7 @@ type BoosterExpression = {
1833
2226
  /**
1834
2227
  * Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
1835
2228
  * distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
1836
- * character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
2229
+ * character typos per word are tolerated by search. You can set it to 0 to remove the typo tolerance or set it to 2
1837
2230
  * to allow two typos in a word.
1838
2231
  *
1839
2232
  * @default 1
@@ -1980,7 +2373,7 @@ type UniqueCountAgg = {
1980
2373
  column: string;
1981
2374
  /**
1982
2375
  * The threshold under which the unique count is exact. If the number of unique
1983
- * values in the column is higher than this threshold, the results are approximative.
2376
+ * values in the column is higher than this threshold, the results are approximate.
1984
2377
  * Maximum value is 40,000, default value is 3000.
1985
2378
  */
1986
2379
  precisionThreshold?: number;
@@ -2003,7 +2396,7 @@ type DateHistogramAgg = {
2003
2396
  column: string;
2004
2397
  /**
2005
2398
  * The fixed interval to use when bucketing.
2006
- * It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
2399
+ * It is formatted as number + units, for example: `5d`, `20m`, `10s`.
2007
2400
  *
2008
2401
  * @pattern ^(\d+)(d|h|m|s|ms)$
2009
2402
  */
@@ -2058,7 +2451,7 @@ type NumericHistogramAgg = {
2058
2451
  interval: number;
2059
2452
  /**
2060
2453
  * By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
2061
- * boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
2454
+ * boundaries can be shifted by using the offset option. For example, if the `interval` is 100,
2062
2455
  * but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
2063
2456
  * to 50.
2064
2457
  *
@@ -2101,6 +2494,24 @@ type AggResponse$1 = (number | null) | {
2101
2494
  [key: string]: AggResponse$1;
2102
2495
  })[];
2103
2496
  };
2497
+ /**
2498
+ * File identifier in access URLs
2499
+ *
2500
+ * @maxLength 296
2501
+ * @minLength 88
2502
+ * @pattern [a-v0-9=]+
2503
+ */
2504
+ type FileAccessID = string;
2505
+ /**
2506
+ * File signature
2507
+ */
2508
+ type FileSignature = string;
2509
+ /**
2510
+ * Xata Table SQL Record
2511
+ */
2512
+ type SQLRecord = {
2513
+ [key: string]: any;
2514
+ };
2104
2515
  /**
2105
2516
  * Xata Table Record Metadata
2106
2517
  */
@@ -2146,12 +2557,19 @@ type SchemaCompareResponse = {
2146
2557
  target: Schema;
2147
2558
  edits: SchemaEditScript;
2148
2559
  };
2560
+ type RateLimitError = {
2561
+ id?: string;
2562
+ message: string;
2563
+ };
2149
2564
  type RecordUpdateResponse = XataRecord$1 | {
2150
2565
  id: string;
2151
2566
  xata: {
2152
2567
  version: number;
2568
+ createdAt: string;
2569
+ updatedAt: string;
2153
2570
  };
2154
2571
  };
2572
+ type PutFileResponse = FileResponse;
2155
2573
  type RecordResponse = XataRecord$1;
2156
2574
  type BulkInsertResponse = {
2157
2575
  recordIDs: string[];
@@ -2168,13 +2586,17 @@ type QueryResponse = {
2168
2586
  records: XataRecord$1[];
2169
2587
  meta: RecordsMetadata;
2170
2588
  };
2589
+ type ServiceUnavailableError = {
2590
+ id?: string;
2591
+ message: string;
2592
+ };
2171
2593
  type SearchResponse = {
2172
2594
  records: XataRecord$1[];
2173
2595
  warning?: string;
2174
- };
2175
- type RateLimitError = {
2176
- id?: string;
2177
- message: string;
2596
+ /**
2597
+ * The total count of records matched. It will be accurately returned up to 10000 records.
2598
+ */
2599
+ totalCount: number;
2178
2600
  };
2179
2601
  type SummarizeResponse = {
2180
2602
  summaries: Record<string, any>[];
@@ -2187,6 +2609,10 @@ type AggResponse = {
2187
2609
  [key: string]: AggResponse$1;
2188
2610
  };
2189
2611
  };
2612
+ type SQLResponse = {
2613
+ records?: SQLRecord[];
2614
+ warning?: string;
2615
+ };
2190
2616
 
2191
2617
  type DataPlaneFetcherExtraProps = {
2192
2618
  apiUrl: string;
@@ -2199,6 +2625,8 @@ type DataPlaneFetcherExtraProps = {
2199
2625
  sessionID?: string;
2200
2626
  clientName?: string;
2201
2627
  xataAgentExtra?: Record<string, string>;
2628
+ rawResponse?: boolean;
2629
+ headers?: Record<string, unknown>;
2202
2630
  };
2203
2631
  type ErrorWrapper<TError> = TError | {
2204
2632
  status: 'unknown';
@@ -2337,6 +2765,36 @@ type DeleteBranchVariables = {
2337
2765
  * Delete the branch in the database and all its resources
2338
2766
  */
2339
2767
  declare const deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<DeleteBranchResponse>;
2768
+ type CopyBranchPathParams = {
2769
+ /**
2770
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2771
+ */
2772
+ dbBranchName: DBBranchName;
2773
+ workspace: string;
2774
+ region: string;
2775
+ };
2776
+ type CopyBranchError = ErrorWrapper<{
2777
+ status: 400;
2778
+ payload: BadRequestError;
2779
+ } | {
2780
+ status: 401;
2781
+ payload: AuthError;
2782
+ } | {
2783
+ status: 404;
2784
+ payload: SimpleError;
2785
+ }>;
2786
+ type CopyBranchRequestBody = {
2787
+ destinationBranch: string;
2788
+ limit?: number;
2789
+ };
2790
+ type CopyBranchVariables = {
2791
+ body: CopyBranchRequestBody;
2792
+ pathParams: CopyBranchPathParams;
2793
+ } & DataPlaneFetcherExtraProps;
2794
+ /**
2795
+ * Create a copy of the branch
2796
+ */
2797
+ declare const copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal) => Promise<BranchWithCopyID>;
2340
2798
  type UpdateBranchMetadataPathParams = {
2341
2799
  /**
2342
2800
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -2981,7 +3439,7 @@ type MergeMigrationRequestError = ErrorWrapper<{
2981
3439
  type MergeMigrationRequestVariables = {
2982
3440
  pathParams: MergeMigrationRequestPathParams;
2983
3441
  } & DataPlaneFetcherExtraProps;
2984
- declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<Commit>;
3442
+ declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<BranchOp>;
2985
3443
  type GetBranchSchemaHistoryPathParams = {
2986
3444
  /**
2987
3445
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3178,6 +3636,44 @@ type ApplyBranchSchemaEditVariables = {
3178
3636
  pathParams: ApplyBranchSchemaEditPathParams;
3179
3637
  } & DataPlaneFetcherExtraProps;
3180
3638
  declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3639
+ type PushBranchMigrationsPathParams = {
3640
+ /**
3641
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3642
+ */
3643
+ dbBranchName: DBBranchName;
3644
+ workspace: string;
3645
+ region: string;
3646
+ };
3647
+ type PushBranchMigrationsError = ErrorWrapper<{
3648
+ status: 400;
3649
+ payload: BadRequestError;
3650
+ } | {
3651
+ status: 401;
3652
+ payload: AuthError;
3653
+ } | {
3654
+ status: 404;
3655
+ payload: SimpleError;
3656
+ }>;
3657
+ type PushBranchMigrationsRequestBody = {
3658
+ migrations: MigrationObject[];
3659
+ };
3660
+ type PushBranchMigrationsVariables = {
3661
+ body: PushBranchMigrationsRequestBody;
3662
+ pathParams: PushBranchMigrationsPathParams;
3663
+ } & DataPlaneFetcherExtraProps;
3664
+ /**
3665
+ * The `schema/push` API accepts a list of migrations to be applied to the
3666
+ * current branch. A list of applicable migrations can be fetched using
3667
+ * the `schema/history` API from another branch or database.
3668
+ *
3669
+ * The most recent migration must be part of the list or referenced (via
3670
+ * `parentID`) by the first migration in the list of migrations to be pushed.
3671
+ *
3672
+ * Each migration in the list has an `id`, `parentID`, and `checksum`. The
3673
+ * checksum for migrations are generated and verified by xata. The
3674
+ * operation fails if any migration in the list has an invalid checksum.
3675
+ */
3676
+ declare const pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3181
3677
  type CreateTablePathParams = {
3182
3678
  /**
3183
3679
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3418,9 +3914,7 @@ type AddTableColumnVariables = {
3418
3914
  pathParams: AddTableColumnPathParams;
3419
3915
  } & DataPlaneFetcherExtraProps;
3420
3916
  /**
3421
- * Adds a new column to the table. The body of the request should contain the column definition. In the column definition, the 'name' field should
3422
- * contain the full path separated by dots. If the parent objects do not exists, they will be automatically created. For example,
3423
- * passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
3917
+ * Adds a new column to the table. The body of the request should contain the column definition.
3424
3918
  */
3425
3919
  declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3426
3920
  type GetColumnPathParams = {
@@ -3453,7 +3947,7 @@ type GetColumnVariables = {
3453
3947
  pathParams: GetColumnPathParams;
3454
3948
  } & DataPlaneFetcherExtraProps;
3455
3949
  /**
3456
- * Get the definition of a single column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
3950
+ * Get the definition of a single column.
3457
3951
  */
3458
3952
  declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
3459
3953
  type UpdateColumnPathParams = {
@@ -3493,7 +3987,7 @@ type UpdateColumnVariables = {
3493
3987
  pathParams: UpdateColumnPathParams;
3494
3988
  } & DataPlaneFetcherExtraProps;
3495
3989
  /**
3496
- * Update column with partial data. Can be used for renaming the column by providing a new "name" field. To refer to sub-objects, the column name can contain dots. For example `address.country`.
3990
+ * Update column with partial data. Can be used for renaming the column by providing a new "name" field.
3497
3991
  */
3498
3992
  declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3499
3993
  type DeleteColumnPathParams = {
@@ -3526,7 +4020,7 @@ type DeleteColumnVariables = {
3526
4020
  pathParams: DeleteColumnPathParams;
3527
4021
  } & DataPlaneFetcherExtraProps;
3528
4022
  /**
3529
- * Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
4023
+ * Deletes the specified column.
3530
4024
  */
3531
4025
  declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3532
4026
  type BranchTransactionPathParams = {
@@ -3546,6 +4040,9 @@ type BranchTransactionError = ErrorWrapper<{
3546
4040
  } | {
3547
4041
  status: 404;
3548
4042
  payload: SimpleError;
4043
+ } | {
4044
+ status: 429;
4045
+ payload: RateLimitError;
3549
4046
  }>;
3550
4047
  type BranchTransactionRequestBody = {
3551
4048
  operations: TransactionOperation$1[];
@@ -3592,6 +4089,248 @@ type InsertRecordVariables = {
3592
4089
  * Insert a new Record into the Table
3593
4090
  */
3594
4091
  declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
4092
+ type GetFileItemPathParams = {
4093
+ /**
4094
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4095
+ */
4096
+ dbBranchName: DBBranchName;
4097
+ /**
4098
+ * The Table name
4099
+ */
4100
+ tableName: TableName;
4101
+ /**
4102
+ * The Record name
4103
+ */
4104
+ recordId: RecordID;
4105
+ /**
4106
+ * The Column name
4107
+ */
4108
+ columnName: ColumnName;
4109
+ /**
4110
+ * The File Identifier
4111
+ */
4112
+ fileId: FileItemID;
4113
+ workspace: string;
4114
+ region: string;
4115
+ };
4116
+ type GetFileItemError = ErrorWrapper<{
4117
+ status: 400;
4118
+ payload: BadRequestError;
4119
+ } | {
4120
+ status: 401;
4121
+ payload: AuthError;
4122
+ } | {
4123
+ status: 404;
4124
+ payload: SimpleError;
4125
+ }>;
4126
+ type GetFileItemVariables = {
4127
+ pathParams: GetFileItemPathParams;
4128
+ } & DataPlaneFetcherExtraProps;
4129
+ /**
4130
+ * Retrieves file content from an array by file ID
4131
+ */
4132
+ declare const getFileItem: (variables: GetFileItemVariables, signal?: AbortSignal) => Promise<Blob>;
4133
+ type PutFileItemPathParams = {
4134
+ /**
4135
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4136
+ */
4137
+ dbBranchName: DBBranchName;
4138
+ /**
4139
+ * The Table name
4140
+ */
4141
+ tableName: TableName;
4142
+ /**
4143
+ * The Record name
4144
+ */
4145
+ recordId: RecordID;
4146
+ /**
4147
+ * The Column name
4148
+ */
4149
+ columnName: ColumnName;
4150
+ /**
4151
+ * The File Identifier
4152
+ */
4153
+ fileId: FileItemID;
4154
+ workspace: string;
4155
+ region: string;
4156
+ };
4157
+ type PutFileItemError = ErrorWrapper<{
4158
+ status: 400;
4159
+ payload: BadRequestError;
4160
+ } | {
4161
+ status: 401;
4162
+ payload: AuthError;
4163
+ } | {
4164
+ status: 404;
4165
+ payload: SimpleError;
4166
+ } | {
4167
+ status: 422;
4168
+ payload: SimpleError;
4169
+ }>;
4170
+ type PutFileItemVariables = {
4171
+ body?: Blob;
4172
+ pathParams: PutFileItemPathParams;
4173
+ } & DataPlaneFetcherExtraProps;
4174
+ /**
4175
+ * Uploads the file content to an array given the file ID
4176
+ */
4177
+ declare const putFileItem: (variables: PutFileItemVariables, signal?: AbortSignal) => Promise<FileResponse>;
4178
+ type DeleteFileItemPathParams = {
4179
+ /**
4180
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4181
+ */
4182
+ dbBranchName: DBBranchName;
4183
+ /**
4184
+ * The Table name
4185
+ */
4186
+ tableName: TableName;
4187
+ /**
4188
+ * The Record name
4189
+ */
4190
+ recordId: RecordID;
4191
+ /**
4192
+ * The Column name
4193
+ */
4194
+ columnName: ColumnName;
4195
+ /**
4196
+ * The File Identifier
4197
+ */
4198
+ fileId: FileItemID;
4199
+ workspace: string;
4200
+ region: string;
4201
+ };
4202
+ type DeleteFileItemError = ErrorWrapper<{
4203
+ status: 400;
4204
+ payload: BadRequestError;
4205
+ } | {
4206
+ status: 401;
4207
+ payload: AuthError;
4208
+ } | {
4209
+ status: 404;
4210
+ payload: SimpleError;
4211
+ }>;
4212
+ type DeleteFileItemVariables = {
4213
+ pathParams: DeleteFileItemPathParams;
4214
+ } & DataPlaneFetcherExtraProps;
4215
+ /**
4216
+ * Deletes an item from an file array column given the file ID
4217
+ */
4218
+ declare const deleteFileItem: (variables: DeleteFileItemVariables, signal?: AbortSignal) => Promise<FileResponse>;
4219
+ type GetFilePathParams = {
4220
+ /**
4221
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4222
+ */
4223
+ dbBranchName: DBBranchName;
4224
+ /**
4225
+ * The Table name
4226
+ */
4227
+ tableName: TableName;
4228
+ /**
4229
+ * The Record name
4230
+ */
4231
+ recordId: RecordID;
4232
+ /**
4233
+ * The Column name
4234
+ */
4235
+ columnName: ColumnName;
4236
+ workspace: string;
4237
+ region: string;
4238
+ };
4239
+ type GetFileError = ErrorWrapper<{
4240
+ status: 400;
4241
+ payload: BadRequestError;
4242
+ } | {
4243
+ status: 401;
4244
+ payload: AuthError;
4245
+ } | {
4246
+ status: 404;
4247
+ payload: SimpleError;
4248
+ }>;
4249
+ type GetFileVariables = {
4250
+ pathParams: GetFilePathParams;
4251
+ } & DataPlaneFetcherExtraProps;
4252
+ /**
4253
+ * Retrieves the file content from a file column
4254
+ */
4255
+ declare const getFile: (variables: GetFileVariables, signal?: AbortSignal) => Promise<Blob>;
4256
+ type PutFilePathParams = {
4257
+ /**
4258
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4259
+ */
4260
+ dbBranchName: DBBranchName;
4261
+ /**
4262
+ * The Table name
4263
+ */
4264
+ tableName: TableName;
4265
+ /**
4266
+ * The Record name
4267
+ */
4268
+ recordId: RecordID;
4269
+ /**
4270
+ * The Column name
4271
+ */
4272
+ columnName: ColumnName;
4273
+ workspace: string;
4274
+ region: string;
4275
+ };
4276
+ type PutFileError = ErrorWrapper<{
4277
+ status: 400;
4278
+ payload: BadRequestError;
4279
+ } | {
4280
+ status: 401;
4281
+ payload: AuthError;
4282
+ } | {
4283
+ status: 404;
4284
+ payload: SimpleError;
4285
+ } | {
4286
+ status: 422;
4287
+ payload: SimpleError;
4288
+ }>;
4289
+ type PutFileVariables = {
4290
+ body?: Blob;
4291
+ pathParams: PutFilePathParams;
4292
+ } & DataPlaneFetcherExtraProps;
4293
+ /**
4294
+ * Uploads the file content to the given file column
4295
+ */
4296
+ declare const putFile: (variables: PutFileVariables, signal?: AbortSignal) => Promise<FileResponse>;
4297
+ type DeleteFilePathParams = {
4298
+ /**
4299
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4300
+ */
4301
+ dbBranchName: DBBranchName;
4302
+ /**
4303
+ * The Table name
4304
+ */
4305
+ tableName: TableName;
4306
+ /**
4307
+ * The Record name
4308
+ */
4309
+ recordId: RecordID;
4310
+ /**
4311
+ * The Column name
4312
+ */
4313
+ columnName: ColumnName;
4314
+ workspace: string;
4315
+ region: string;
4316
+ };
4317
+ type DeleteFileError = ErrorWrapper<{
4318
+ status: 400;
4319
+ payload: BadRequestError;
4320
+ } | {
4321
+ status: 401;
4322
+ payload: AuthError;
4323
+ } | {
4324
+ status: 404;
4325
+ payload: SimpleError;
4326
+ }>;
4327
+ type DeleteFileVariables = {
4328
+ pathParams: DeleteFilePathParams;
4329
+ } & DataPlaneFetcherExtraProps;
4330
+ /**
4331
+ * Deletes a file referred in a file column
4332
+ */
4333
+ declare const deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal) => Promise<FileResponse>;
3595
4334
  type GetRecordPathParams = {
3596
4335
  /**
3597
4336
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3863,12 +4602,15 @@ type QueryTableError = ErrorWrapper<{
3863
4602
  } | {
3864
4603
  status: 404;
3865
4604
  payload: SimpleError;
4605
+ } | {
4606
+ status: 503;
4607
+ payload: ServiceUnavailableError;
3866
4608
  }>;
3867
4609
  type QueryTableRequestBody = {
3868
4610
  filter?: FilterExpression;
3869
4611
  sort?: SortExpression;
3870
4612
  page?: PageConfig;
3871
- columns?: ColumnsProjection;
4613
+ columns?: QueryColumnsProjection;
3872
4614
  /**
3873
4615
  * The consistency level for this request.
3874
4616
  *
@@ -4532,25 +5274,40 @@ type QueryTableVariables = {
4532
5274
  * }
4533
5275
  * ```
4534
5276
  *
4535
- * ### Pagination
5277
+ * It is also possible to sort results randomly:
5278
+ *
5279
+ * ```json
5280
+ * POST /db/demo:main/tables/table/query
5281
+ * {
5282
+ * "sort": {
5283
+ * "*": "random"
5284
+ * }
5285
+ * }
5286
+ * ```
4536
5287
  *
4537
- * We offer cursor pagination and offset pagination. For queries that are expected to return more than 1000 records,
4538
- * cursor pagination is needed in order to retrieve all of their results. The offset pagination method is limited to 1000 records.
5288
+ * Note that a random sort does not apply to a specific column, hence the special column name `"*"`.
4539
5289
  *
4540
- * Example of size + offset pagination:
5290
+ * A random sort can be combined with an ascending or descending sort on a specific column:
4541
5291
  *
4542
5292
  * ```json
4543
5293
  * POST /db/demo:main/tables/table/query
4544
5294
  * {
4545
- * "page": {
4546
- * "size": 100,
4547
- * "offset": 200
4548
- * }
5295
+ * "sort": [
5296
+ * {
5297
+ * "name": "desc"
5298
+ * },
5299
+ * {
5300
+ * "*": "random"
5301
+ * }
5302
+ * ]
4549
5303
  * }
4550
5304
  * ```
4551
5305
  *
4552
- * The `page.size` parameter represents the maximum number of records returned by this query. It has a default value of 20 and a maximum value of 200.
4553
- * The `page.offset` parameter represents the number of matching records to skip. It has a default value of 0 and a maximum value of 800.
5306
+ * This will sort on the `name` column, breaking ties randomly.
5307
+ *
5308
+ * ### Pagination
5309
+ *
5310
+ * We offer cursor pagination and offset pagination. The cursor pagination method can be used for sequential scrolling with unrestricted depth. The offset pagination can be used to skip pages and is limited to 1000 records.
4554
5311
  *
4555
5312
  * Example of cursor pagination:
4556
5313
  *
@@ -4604,18 +5361,46 @@ type QueryTableVariables = {
4604
5361
  * `filter` or `sort` is set. The columns returned and page size can be changed
4605
5362
  * anytime by passing the `columns` or `page.size` settings to the next query.
4606
5363
  *
5364
+ * In the following example of size + offset pagination we retrieve the third page of up to 100 results:
5365
+ *
5366
+ * ```json
5367
+ * POST /db/demo:main/tables/table/query
5368
+ * {
5369
+ * "page": {
5370
+ * "size": 100,
5371
+ * "offset": 200
5372
+ * }
5373
+ * }
5374
+ * ```
5375
+ *
5376
+ * The `page.size` parameter represents the maximum number of records returned by this query. It has a default value of 20 and a maximum value of 200.
5377
+ * The `page.offset` parameter represents the number of matching records to skip. It has a default value of 0 and a maximum value of 800.
5378
+ *
5379
+ * Cursor pagination also works in combination with offset pagination. For example, starting from a specific cursor position, using a page size of 200 and an offset of 800, you can skip up to 5 pages of 200 records forwards or backwards from the cursor's position:
5380
+ *
5381
+ * ```json
5382
+ * POST /db/demo:main/tables/table/query
5383
+ * {
5384
+ * "page": {
5385
+ * "size": 200,
5386
+ * "offset": 800,
5387
+ * "after": "fMoxCsIwFIDh3WP8c4amDai5hO5SJCRNfaVSeC9b6d1FD"
5388
+ * }
5389
+ * }
5390
+ * ```
5391
+ *
4607
5392
  * **Special cursors:**
4608
5393
  *
4609
5394
  * - `page.after=end`: Result points past the last entry. The list of records
4610
5395
  * returned is empty, but `page.meta.cursor` will include a cursor that can be
4611
5396
  * used to "tail" the table from the end waiting for new data to be inserted.
4612
5397
  * - `page.before=end`: This cursor returns the last page.
4613
- * - `page.start=<cursor>`: Start at the beginning of the result set of the <cursor> query. This is equivalent to querying the
5398
+ * - `page.start=$cursor`: Start at the beginning of the result set of the $cursor query. This is equivalent to querying the
4614
5399
  * first page without a cursor but applying `filter` and `sort` . Yet the `page.start`
4615
5400
  * cursor can be convenient at times as user code does not need to remember the
4616
5401
  * filter, sort, columns or page size configuration. All these information are
4617
5402
  * read from the cursor.
4618
- * - `page.end=<cursor>`: Move to the end of the result set of the <cursor> query. This is equivalent to querying the
5403
+ * - `page.end=$cursor`: Move to the end of the result set of the $cursor query. This is equivalent to querying the
4619
5404
  * last page with `page.before=end`, `filter`, and `sort` . Yet the
4620
5405
  * `page.end` cursor can be more convenient at times as user code does not
4621
5406
  * need to remember the filter, sort, columns or page size configuration. All
@@ -4654,6 +5439,9 @@ type SearchBranchError = ErrorWrapper<{
4654
5439
  } | {
4655
5440
  status: 404;
4656
5441
  payload: SimpleError;
5442
+ } | {
5443
+ status: 503;
5444
+ payload: ServiceUnavailableError;
4657
5445
  }>;
4658
5446
  type SearchBranchRequestBody = {
4659
5447
  /**
@@ -4825,7 +5613,11 @@ type AskTableResponse = {
4825
5613
  /**
4826
5614
  * The answer to the input question
4827
5615
  */
4828
- answer?: string;
5616
+ answer: string;
5617
+ /**
5618
+ * The session ID for the chat session.
5619
+ */
5620
+ sessionId: string;
4829
5621
  };
4830
5622
  type AskTableRequestBody = {
4831
5623
  /**
@@ -4834,11 +5626,42 @@ type AskTableRequestBody = {
4834
5626
  * @minLength 3
4835
5627
  */
4836
5628
  question: string;
4837
- fuzziness?: FuzzinessExpression;
4838
- target?: TargetExpression;
4839
- prefix?: PrefixExpression;
4840
- filter?: FilterExpression;
4841
- boosters?: BoosterExpression[];
5629
+ /**
5630
+ * The type of search to use. If set to `keyword` (the default), the search can be configured by passing
5631
+ * a `search` object with the following fields. For more details about each, see the Search endpoint documentation.
5632
+ * All fields are optional.
5633
+ * * fuzziness - typo tolerance
5634
+ * * target - columns to search into, and weights.
5635
+ * * prefix - prefix search type.
5636
+ * * filter - pre-filter before searching.
5637
+ * * boosters - control relevancy.
5638
+ * If set to `vector`, a `vectorSearch` object must be passed, with the following parameters. For more details, see the Vector
5639
+ * Search endpoint documentation. The `column` and `contentColumn` parameters are required.
5640
+ * * column - the vector column containing the embeddings.
5641
+ * * contentColumn - the column that contains the text from which the embeddings where computed.
5642
+ * * filter - pre-filter before searching.
5643
+ *
5644
+ * @default keyword
5645
+ */
5646
+ searchType?: 'keyword' | 'vector';
5647
+ search?: {
5648
+ fuzziness?: FuzzinessExpression;
5649
+ target?: TargetExpression;
5650
+ prefix?: PrefixExpression;
5651
+ filter?: FilterExpression;
5652
+ boosters?: BoosterExpression[];
5653
+ };
5654
+ vectorSearch?: {
5655
+ /**
5656
+ * The column to use for vector search. It must be of type `vector`.
5657
+ */
5658
+ column: string;
5659
+ /**
5660
+ * The column containing the text for vector search. Must be of type `text`.
5661
+ */
5662
+ contentColumn: string;
5663
+ filter?: FilterExpression;
5664
+ };
4842
5665
  rules?: string[];
4843
5666
  };
4844
5667
  type AskTableVariables = {
@@ -4849,6 +5672,61 @@ type AskTableVariables = {
4849
5672
  * Ask your table a question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
4850
5673
  */
4851
5674
  declare const askTable: (variables: AskTableVariables, signal?: AbortSignal) => Promise<AskTableResponse>;
5675
+ type AskTableSessionPathParams = {
5676
+ /**
5677
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
5678
+ */
5679
+ dbBranchName: DBBranchName;
5680
+ /**
5681
+ * The Table name
5682
+ */
5683
+ tableName: TableName;
5684
+ /**
5685
+ * @maxLength 36
5686
+ * @minLength 36
5687
+ */
5688
+ sessionId: string;
5689
+ workspace: string;
5690
+ region: string;
5691
+ };
5692
+ type AskTableSessionError = ErrorWrapper<{
5693
+ status: 400;
5694
+ payload: BadRequestError;
5695
+ } | {
5696
+ status: 401;
5697
+ payload: AuthError;
5698
+ } | {
5699
+ status: 404;
5700
+ payload: SimpleError;
5701
+ } | {
5702
+ status: 429;
5703
+ payload: RateLimitError;
5704
+ } | {
5705
+ status: 503;
5706
+ payload: ServiceUnavailableError;
5707
+ }>;
5708
+ type AskTableSessionResponse = {
5709
+ /**
5710
+ * The answer to the input question
5711
+ */
5712
+ answer: string;
5713
+ };
5714
+ type AskTableSessionRequestBody = {
5715
+ /**
5716
+ * The question you'd like to ask.
5717
+ *
5718
+ * @minLength 3
5719
+ */
5720
+ message?: string;
5721
+ };
5722
+ type AskTableSessionVariables = {
5723
+ body?: AskTableSessionRequestBody;
5724
+ pathParams: AskTableSessionPathParams;
5725
+ } & DataPlaneFetcherExtraProps;
5726
+ /**
5727
+ * Ask a follow-up question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
5728
+ */
5729
+ declare const askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal) => Promise<AskTableSessionResponse>;
4852
5730
  type SummarizeTablePathParams = {
4853
5731
  /**
4854
5732
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -4976,7 +5854,76 @@ type AggregateTablePathParams = {
4976
5854
  workspace: string;
4977
5855
  region: string;
4978
5856
  };
4979
- type AggregateTableError = ErrorWrapper<{
5857
+ type AggregateTableError = ErrorWrapper<{
5858
+ status: 400;
5859
+ payload: BadRequestError;
5860
+ } | {
5861
+ status: 401;
5862
+ payload: AuthError;
5863
+ } | {
5864
+ status: 404;
5865
+ payload: SimpleError;
5866
+ }>;
5867
+ type AggregateTableRequestBody = {
5868
+ filter?: FilterExpression;
5869
+ aggs?: AggExpressionMap;
5870
+ };
5871
+ type AggregateTableVariables = {
5872
+ body?: AggregateTableRequestBody;
5873
+ pathParams: AggregateTablePathParams;
5874
+ } & DataPlaneFetcherExtraProps;
5875
+ /**
5876
+ * This endpoint allows you to run aggregations (analytics) on the data from one table.
5877
+ * While the summary endpoint is served from a transactional store and the results are strongly
5878
+ * consistent, the aggregate endpoint is served from our columnar store and the results are
5879
+ * only eventually consistent. On the other hand, the aggregate endpoint uses a
5880
+ * store that is more appropiate for analytics, makes use of approximative algorithms
5881
+ * (e.g for cardinality), and is generally faster and can do more complex aggregations.
5882
+ *
5883
+ * For usage, see the [API Guide](https://xata.io/docs/api-guide/aggregate).
5884
+ */
5885
+ declare const aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
5886
+ type FileAccessPathParams = {
5887
+ /**
5888
+ * The File Access Identifier
5889
+ */
5890
+ fileId: FileAccessID;
5891
+ workspace: string;
5892
+ region: string;
5893
+ };
5894
+ type FileAccessQueryParams = {
5895
+ /**
5896
+ * File access signature
5897
+ */
5898
+ verify?: FileSignature;
5899
+ };
5900
+ type FileAccessError = ErrorWrapper<{
5901
+ status: 400;
5902
+ payload: BadRequestError;
5903
+ } | {
5904
+ status: 401;
5905
+ payload: AuthError;
5906
+ } | {
5907
+ status: 404;
5908
+ payload: SimpleError;
5909
+ }>;
5910
+ type FileAccessVariables = {
5911
+ pathParams: FileAccessPathParams;
5912
+ queryParams?: FileAccessQueryParams;
5913
+ } & DataPlaneFetcherExtraProps;
5914
+ /**
5915
+ * Retrieve file content by access id
5916
+ */
5917
+ declare const fileAccess: (variables: FileAccessVariables, signal?: AbortSignal) => Promise<Blob>;
5918
+ type SqlQueryPathParams = {
5919
+ /**
5920
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
5921
+ */
5922
+ dbBranchName: DBBranchName;
5923
+ workspace: string;
5924
+ region: string;
5925
+ };
5926
+ type SqlQueryError = ErrorWrapper<{
4980
5927
  status: 400;
4981
5928
  payload: BadRequestError;
4982
5929
  } | {
@@ -4985,26 +5932,36 @@ type AggregateTableError = ErrorWrapper<{
4985
5932
  } | {
4986
5933
  status: 404;
4987
5934
  payload: SimpleError;
5935
+ } | {
5936
+ status: 503;
5937
+ payload: ServiceUnavailableError;
4988
5938
  }>;
4989
- type AggregateTableRequestBody = {
4990
- filter?: FilterExpression;
4991
- aggs?: AggExpressionMap;
5939
+ type SqlQueryRequestBody = {
5940
+ /**
5941
+ * The SQL statement.
5942
+ *
5943
+ * @minLength 1
5944
+ */
5945
+ statement: string;
5946
+ /**
5947
+ * The query parameter list.
5948
+ */
5949
+ params?: any[] | null;
5950
+ /**
5951
+ * The consistency level for this request.
5952
+ *
5953
+ * @default strong
5954
+ */
5955
+ consistency?: 'strong' | 'eventual';
4992
5956
  };
4993
- type AggregateTableVariables = {
4994
- body?: AggregateTableRequestBody;
4995
- pathParams: AggregateTablePathParams;
5957
+ type SqlQueryVariables = {
5958
+ body: SqlQueryRequestBody;
5959
+ pathParams: SqlQueryPathParams;
4996
5960
  } & DataPlaneFetcherExtraProps;
4997
5961
  /**
4998
- * This endpoint allows you to run aggragations (analytics) on the data from one table.
4999
- * While the summary endpoint is served from a transactional store and the results are strongly
5000
- * consistent, the aggregate endpoint is served from our columnar store and the results are
5001
- * only eventually consistent. On the other hand, the aggregate endpoint uses a
5002
- * store that is more appropiate for analytics, makes use of approximative algorithms
5003
- * (e.g for cardinality), and is generally faster and can do more complex aggregations.
5004
- *
5005
- * For usage, see the [API Guide](https://xata.io/docs/api-guide/aggregate).
5962
+ * Run an SQL query across the database branch.
5006
5963
  */
5007
- declare const aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
5964
+ declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<SQLResponse>;
5008
5965
 
5009
5966
  declare const operationsByTag: {
5010
5967
  branch: {
@@ -5012,6 +5969,7 @@ declare const operationsByTag: {
5012
5969
  getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal | undefined) => Promise<DBBranch>;
5013
5970
  createBranch: (variables: CreateBranchVariables, signal?: AbortSignal | undefined) => Promise<CreateBranchResponse>;
5014
5971
  deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal | undefined) => Promise<DeleteBranchResponse>;
5972
+ copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal | undefined) => Promise<BranchWithCopyID>;
5015
5973
  updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
5016
5974
  getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<BranchMetadata>;
5017
5975
  getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal | undefined) => Promise<GetBranchStatsResponse>;
@@ -5020,16 +5978,6 @@ declare const operationsByTag: {
5020
5978
  removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
5021
5979
  resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal | undefined) => Promise<ResolveBranchResponse>;
5022
5980
  };
5023
- records: {
5024
- branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
5025
- insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
5026
- getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
5027
- insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
5028
- updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
5029
- upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
5030
- deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
5031
- bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
5032
- };
5033
5981
  migrations: {
5034
5982
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchMigrationHistoryResponse>;
5035
5983
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<BranchMigrationPlan>;
@@ -5040,6 +5988,17 @@ declare const operationsByTag: {
5040
5988
  updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
5041
5989
  previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<PreviewBranchSchemaEditResponse>;
5042
5990
  applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
5991
+ pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
5992
+ };
5993
+ records: {
5994
+ branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
5995
+ insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
5996
+ getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
5997
+ insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
5998
+ updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
5999
+ upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
6000
+ deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
6001
+ bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
5043
6002
  };
5044
6003
  migrationRequests: {
5045
6004
  queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal | undefined) => Promise<QueryMigrationRequestsResponse>;
@@ -5049,7 +6008,7 @@ declare const operationsByTag: {
5049
6008
  listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal | undefined) => Promise<ListMigrationRequestsCommitsResponse>;
5050
6009
  compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<SchemaCompareResponse>;
5051
6010
  getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal | undefined) => Promise<GetMigrationRequestIsMergedResponse>;
5052
- mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<Commit>;
6011
+ mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<BranchOp>;
5053
6012
  };
5054
6013
  table: {
5055
6014
  createTable: (variables: CreateTableVariables, signal?: AbortSignal | undefined) => Promise<CreateTableResponse>;
@@ -5063,15 +6022,37 @@ declare const operationsByTag: {
5063
6022
  updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
5064
6023
  deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
5065
6024
  };
6025
+ files: {
6026
+ getFileItem: (variables: GetFileItemVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
6027
+ putFileItem: (variables: PutFileItemVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6028
+ deleteFileItem: (variables: DeleteFileItemVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6029
+ getFile: (variables: GetFileVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
6030
+ putFile: (variables: PutFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6031
+ deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6032
+ fileAccess: (variables: FileAccessVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
6033
+ };
5066
6034
  searchAndFilter: {
5067
6035
  queryTable: (variables: QueryTableVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
5068
6036
  searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
5069
6037
  searchTable: (variables: SearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
5070
6038
  vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
5071
6039
  askTable: (variables: AskTableVariables, signal?: AbortSignal | undefined) => Promise<AskTableResponse>;
6040
+ askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal | undefined) => Promise<AskTableSessionResponse>;
5072
6041
  summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal | undefined) => Promise<SummarizeResponse>;
5073
6042
  aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal | undefined) => Promise<AggResponse>;
5074
6043
  };
6044
+ sql: {
6045
+ sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal | undefined) => Promise<SQLResponse>;
6046
+ };
6047
+ oAuth: {
6048
+ getAuthorizationCode: (variables: GetAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<AuthorizationCodeResponse>;
6049
+ grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<AuthorizationCodeResponse>;
6050
+ getUserOAuthClients: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserOAuthClientsResponse>;
6051
+ deleteUserOAuthClient: (variables: DeleteUserOAuthClientVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6052
+ getUserOAuthAccessTokens: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserOAuthAccessTokensResponse>;
6053
+ deleteOAuthAccessToken: (variables: DeleteOAuthAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6054
+ updateOAuthAccessToken: (variables: UpdateOAuthAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<OAuthAccessToken>;
6055
+ };
5075
6056
  users: {
5076
6057
  getUser: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<UserWithID>;
5077
6058
  updateUser: (variables: UpdateUserVariables, signal?: AbortSignal | undefined) => Promise<UserWithID>;
@@ -5105,6 +6086,7 @@ declare const operationsByTag: {
5105
6086
  deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DeleteDatabaseResponse>;
5106
6087
  getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
5107
6088
  updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
6089
+ renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
5108
6090
  getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
5109
6091
  updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
5110
6092
  deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
@@ -5112,7 +6094,7 @@ declare const operationsByTag: {
5112
6094
  };
5113
6095
  };
5114
6096
 
5115
- type HostAliases = 'production' | 'staging';
6097
+ type HostAliases = 'production' | 'staging' | 'dev';
5116
6098
  type ProviderBuilder = {
5117
6099
  main: string;
5118
6100
  workspaces: string;
@@ -5122,6 +6104,7 @@ declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder)
5122
6104
  declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
5123
6105
  declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
5124
6106
  declare function parseProviderString(provider?: string): HostProvider | null;
6107
+ declare function buildProviderString(provider: HostProvider): string;
5125
6108
  declare function parseWorkspacesUrlParts(url: string): {
5126
6109
  workspace: string;
5127
6110
  region: string;
@@ -5133,45 +6116,38 @@ type responses_BadRequestError = BadRequestError;
5133
6116
  type responses_BranchMigrationPlan = BranchMigrationPlan;
5134
6117
  type responses_BulkError = BulkError;
5135
6118
  type responses_BulkInsertResponse = BulkInsertResponse;
6119
+ type responses_PutFileResponse = PutFileResponse;
5136
6120
  type responses_QueryResponse = QueryResponse;
5137
6121
  type responses_RateLimitError = RateLimitError;
5138
6122
  type responses_RecordResponse = RecordResponse;
5139
6123
  type responses_RecordUpdateResponse = RecordUpdateResponse;
6124
+ type responses_SQLResponse = SQLResponse;
5140
6125
  type responses_SchemaCompareResponse = SchemaCompareResponse;
5141
6126
  type responses_SchemaUpdateResponse = SchemaUpdateResponse;
5142
6127
  type responses_SearchResponse = SearchResponse;
6128
+ type responses_ServiceUnavailableError = ServiceUnavailableError;
5143
6129
  type responses_SimpleError = SimpleError;
5144
6130
  type responses_SummarizeResponse = SummarizeResponse;
5145
6131
  declare namespace responses {
5146
- export {
5147
- responses_AggResponse as AggResponse,
5148
- responses_AuthError as AuthError,
5149
- responses_BadRequestError as BadRequestError,
5150
- responses_BranchMigrationPlan as BranchMigrationPlan,
5151
- responses_BulkError as BulkError,
5152
- responses_BulkInsertResponse as BulkInsertResponse,
5153
- responses_QueryResponse as QueryResponse,
5154
- responses_RateLimitError as RateLimitError,
5155
- responses_RecordResponse as RecordResponse,
5156
- responses_RecordUpdateResponse as RecordUpdateResponse,
5157
- responses_SchemaCompareResponse as SchemaCompareResponse,
5158
- responses_SchemaUpdateResponse as SchemaUpdateResponse,
5159
- responses_SearchResponse as SearchResponse,
5160
- responses_SimpleError as SimpleError,
5161
- responses_SummarizeResponse as SummarizeResponse,
5162
- };
6132
+ export type { responses_AggResponse as AggResponse, responses_AuthError as AuthError, responses_BadRequestError as BadRequestError, responses_BranchMigrationPlan as BranchMigrationPlan, responses_BulkError as BulkError, responses_BulkInsertResponse as BulkInsertResponse, responses_PutFileResponse as PutFileResponse, responses_QueryResponse as QueryResponse, responses_RateLimitError as RateLimitError, responses_RecordResponse as RecordResponse, responses_RecordUpdateResponse as RecordUpdateResponse, responses_SQLResponse as SQLResponse, responses_SchemaCompareResponse as SchemaCompareResponse, responses_SchemaUpdateResponse as SchemaUpdateResponse, responses_SearchResponse as SearchResponse, responses_ServiceUnavailableError as ServiceUnavailableError, responses_SimpleError as SimpleError, responses_SummarizeResponse as SummarizeResponse };
5163
6133
  }
5164
6134
 
5165
6135
  type schemas_APIKeyName = APIKeyName;
6136
+ type schemas_AccessToken = AccessToken;
5166
6137
  type schemas_AggExpression = AggExpression;
5167
6138
  type schemas_AggExpressionMap = AggExpressionMap;
6139
+ type schemas_AuthorizationCodeRequest = AuthorizationCodeRequest;
6140
+ type schemas_AuthorizationCodeResponse = AuthorizationCodeResponse;
5168
6141
  type schemas_AverageAgg = AverageAgg;
5169
6142
  type schemas_BoosterExpression = BoosterExpression;
5170
6143
  type schemas_Branch = Branch;
5171
6144
  type schemas_BranchMetadata = BranchMetadata;
5172
6145
  type schemas_BranchMigration = BranchMigration;
5173
6146
  type schemas_BranchName = BranchName;
6147
+ type schemas_BranchOp = BranchOp;
6148
+ type schemas_BranchWithCopyID = BranchWithCopyID;
5174
6149
  type schemas_Column = Column;
6150
+ type schemas_ColumnFile = ColumnFile;
5175
6151
  type schemas_ColumnLink = ColumnLink;
5176
6152
  type schemas_ColumnMigration = ColumnMigration;
5177
6153
  type schemas_ColumnName = ColumnName;
@@ -5190,6 +6166,11 @@ type schemas_DatabaseGithubSettings = DatabaseGithubSettings;
5190
6166
  type schemas_DatabaseMetadata = DatabaseMetadata;
5191
6167
  type schemas_DateHistogramAgg = DateHistogramAgg;
5192
6168
  type schemas_DateTime = DateTime;
6169
+ type schemas_FileAccessID = FileAccessID;
6170
+ type schemas_FileItemID = FileItemID;
6171
+ type schemas_FileName = FileName;
6172
+ type schemas_FileResponse = FileResponse;
6173
+ type schemas_FileSignature = FileSignature;
5193
6174
  type schemas_FilterColumn = FilterColumn;
5194
6175
  type schemas_FilterColumnIncludes = FilterColumnIncludes;
5195
6176
  type schemas_FilterExpression = FilterExpression;
@@ -5201,6 +6182,7 @@ type schemas_FilterRangeValue = FilterRangeValue;
5201
6182
  type schemas_FilterValue = FilterValue;
5202
6183
  type schemas_FuzzinessExpression = FuzzinessExpression;
5203
6184
  type schemas_HighlightExpression = HighlightExpression;
6185
+ type schemas_InputFile = InputFile;
5204
6186
  type schemas_InputFileArray = InputFileArray;
5205
6187
  type schemas_InputFileEntry = InputFileEntry;
5206
6188
  type schemas_InviteID = InviteID;
@@ -5210,10 +6192,12 @@ type schemas_ListDatabasesResponse = ListDatabasesResponse;
5210
6192
  type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
5211
6193
  type schemas_ListRegionsResponse = ListRegionsResponse;
5212
6194
  type schemas_MaxAgg = MaxAgg;
6195
+ type schemas_MediaType = MediaType;
5213
6196
  type schemas_MetricsDatapoint = MetricsDatapoint;
5214
6197
  type schemas_MetricsLatency = MetricsLatency;
5215
6198
  type schemas_Migration = Migration;
5216
6199
  type schemas_MigrationColumnOp = MigrationColumnOp;
6200
+ type schemas_MigrationObject = MigrationObject;
5217
6201
  type schemas_MigrationOp = MigrationOp;
5218
6202
  type schemas_MigrationRequest = MigrationRequest;
5219
6203
  type schemas_MigrationRequestNumber = MigrationRequestNumber;
@@ -5221,15 +6205,23 @@ type schemas_MigrationStatus = MigrationStatus;
5221
6205
  type schemas_MigrationTableOp = MigrationTableOp;
5222
6206
  type schemas_MinAgg = MinAgg;
5223
6207
  type schemas_NumericHistogramAgg = NumericHistogramAgg;
6208
+ type schemas_OAuthAccessToken = OAuthAccessToken;
6209
+ type schemas_OAuthClientID = OAuthClientID;
6210
+ type schemas_OAuthClientPublicDetails = OAuthClientPublicDetails;
6211
+ type schemas_OAuthResponseType = OAuthResponseType;
6212
+ type schemas_OAuthScope = OAuthScope;
5224
6213
  type schemas_ObjectValue = ObjectValue;
5225
6214
  type schemas_PageConfig = PageConfig;
5226
6215
  type schemas_PrefixExpression = PrefixExpression;
6216
+ type schemas_ProjectionConfig = ProjectionConfig;
6217
+ type schemas_QueryColumnsProjection = QueryColumnsProjection;
5227
6218
  type schemas_RecordID = RecordID;
5228
6219
  type schemas_RecordMeta = RecordMeta;
5229
6220
  type schemas_RecordsMetadata = RecordsMetadata;
5230
6221
  type schemas_Region = Region;
5231
6222
  type schemas_RevLink = RevLink;
5232
6223
  type schemas_Role = Role;
6224
+ type schemas_SQLRecord = SQLRecord;
5233
6225
  type schemas_Schema = Schema;
5234
6226
  type schemas_SchemaEditScript = SchemaEditScript;
5235
6227
  type schemas_SearchPageConfig = SearchPageConfig;
@@ -5251,9 +6243,11 @@ type schemas_TopValuesAgg = TopValuesAgg;
5251
6243
  type schemas_TransactionDeleteOp = TransactionDeleteOp;
5252
6244
  type schemas_TransactionError = TransactionError;
5253
6245
  type schemas_TransactionFailure = TransactionFailure;
6246
+ type schemas_TransactionGetOp = TransactionGetOp;
5254
6247
  type schemas_TransactionInsertOp = TransactionInsertOp;
5255
6248
  type schemas_TransactionResultColumns = TransactionResultColumns;
5256
6249
  type schemas_TransactionResultDelete = TransactionResultDelete;
6250
+ type schemas_TransactionResultGet = TransactionResultGet;
5257
6251
  type schemas_TransactionResultInsert = TransactionResultInsert;
5258
6252
  type schemas_TransactionResultUpdate = TransactionResultUpdate;
5259
6253
  type schemas_TransactionSuccess = TransactionSuccess;
@@ -5269,120 +6263,7 @@ type schemas_WorkspaceMember = WorkspaceMember;
5269
6263
  type schemas_WorkspaceMembers = WorkspaceMembers;
5270
6264
  type schemas_WorkspaceMeta = WorkspaceMeta;
5271
6265
  declare namespace schemas {
5272
- export {
5273
- schemas_APIKeyName as APIKeyName,
5274
- schemas_AggExpression as AggExpression,
5275
- schemas_AggExpressionMap as AggExpressionMap,
5276
- AggResponse$1 as AggResponse,
5277
- schemas_AverageAgg as AverageAgg,
5278
- schemas_BoosterExpression as BoosterExpression,
5279
- schemas_Branch as Branch,
5280
- schemas_BranchMetadata as BranchMetadata,
5281
- schemas_BranchMigration as BranchMigration,
5282
- schemas_BranchName as BranchName,
5283
- schemas_Column as Column,
5284
- schemas_ColumnLink as ColumnLink,
5285
- schemas_ColumnMigration as ColumnMigration,
5286
- schemas_ColumnName as ColumnName,
5287
- schemas_ColumnOpAdd as ColumnOpAdd,
5288
- schemas_ColumnOpRemove as ColumnOpRemove,
5289
- schemas_ColumnOpRename as ColumnOpRename,
5290
- schemas_ColumnVector as ColumnVector,
5291
- schemas_ColumnsProjection as ColumnsProjection,
5292
- schemas_Commit as Commit,
5293
- schemas_CountAgg as CountAgg,
5294
- schemas_DBBranch as DBBranch,
5295
- schemas_DBBranchName as DBBranchName,
5296
- schemas_DBName as DBName,
5297
- schemas_DataInputRecord as DataInputRecord,
5298
- schemas_DatabaseGithubSettings as DatabaseGithubSettings,
5299
- schemas_DatabaseMetadata as DatabaseMetadata,
5300
- DateBooster$1 as DateBooster,
5301
- schemas_DateHistogramAgg as DateHistogramAgg,
5302
- schemas_DateTime as DateTime,
5303
- schemas_FilterColumn as FilterColumn,
5304
- schemas_FilterColumnIncludes as FilterColumnIncludes,
5305
- schemas_FilterExpression as FilterExpression,
5306
- schemas_FilterList as FilterList,
5307
- schemas_FilterPredicate as FilterPredicate,
5308
- schemas_FilterPredicateOp as FilterPredicateOp,
5309
- schemas_FilterPredicateRangeOp as FilterPredicateRangeOp,
5310
- schemas_FilterRangeValue as FilterRangeValue,
5311
- schemas_FilterValue as FilterValue,
5312
- schemas_FuzzinessExpression as FuzzinessExpression,
5313
- schemas_HighlightExpression as HighlightExpression,
5314
- schemas_InputFileArray as InputFileArray,
5315
- schemas_InputFileEntry as InputFileEntry,
5316
- schemas_InviteID as InviteID,
5317
- schemas_InviteKey as InviteKey,
5318
- schemas_ListBranchesResponse as ListBranchesResponse,
5319
- schemas_ListDatabasesResponse as ListDatabasesResponse,
5320
- schemas_ListGitBranchesResponse as ListGitBranchesResponse,
5321
- schemas_ListRegionsResponse as ListRegionsResponse,
5322
- schemas_MaxAgg as MaxAgg,
5323
- schemas_MetricsDatapoint as MetricsDatapoint,
5324
- schemas_MetricsLatency as MetricsLatency,
5325
- schemas_Migration as Migration,
5326
- schemas_MigrationColumnOp as MigrationColumnOp,
5327
- schemas_MigrationOp as MigrationOp,
5328
- schemas_MigrationRequest as MigrationRequest,
5329
- schemas_MigrationRequestNumber as MigrationRequestNumber,
5330
- schemas_MigrationStatus as MigrationStatus,
5331
- schemas_MigrationTableOp as MigrationTableOp,
5332
- schemas_MinAgg as MinAgg,
5333
- NumericBooster$1 as NumericBooster,
5334
- schemas_NumericHistogramAgg as NumericHistogramAgg,
5335
- schemas_ObjectValue as ObjectValue,
5336
- schemas_PageConfig as PageConfig,
5337
- schemas_PrefixExpression as PrefixExpression,
5338
- schemas_RecordID as RecordID,
5339
- schemas_RecordMeta as RecordMeta,
5340
- schemas_RecordsMetadata as RecordsMetadata,
5341
- schemas_Region as Region,
5342
- schemas_RevLink as RevLink,
5343
- schemas_Role as Role,
5344
- schemas_Schema as Schema,
5345
- schemas_SchemaEditScript as SchemaEditScript,
5346
- schemas_SearchPageConfig as SearchPageConfig,
5347
- schemas_SortExpression as SortExpression,
5348
- schemas_SortOrder as SortOrder,
5349
- schemas_StartedFromMetadata as StartedFromMetadata,
5350
- schemas_SumAgg as SumAgg,
5351
- schemas_SummaryExpression as SummaryExpression,
5352
- schemas_SummaryExpressionList as SummaryExpressionList,
5353
- schemas_Table as Table,
5354
- schemas_TableMigration as TableMigration,
5355
- schemas_TableName as TableName,
5356
- schemas_TableOpAdd as TableOpAdd,
5357
- schemas_TableOpRemove as TableOpRemove,
5358
- schemas_TableOpRename as TableOpRename,
5359
- schemas_TableRename as TableRename,
5360
- schemas_TargetExpression as TargetExpression,
5361
- schemas_TopValuesAgg as TopValuesAgg,
5362
- schemas_TransactionDeleteOp as TransactionDeleteOp,
5363
- schemas_TransactionError as TransactionError,
5364
- schemas_TransactionFailure as TransactionFailure,
5365
- schemas_TransactionInsertOp as TransactionInsertOp,
5366
- TransactionOperation$1 as TransactionOperation,
5367
- schemas_TransactionResultColumns as TransactionResultColumns,
5368
- schemas_TransactionResultDelete as TransactionResultDelete,
5369
- schemas_TransactionResultInsert as TransactionResultInsert,
5370
- schemas_TransactionResultUpdate as TransactionResultUpdate,
5371
- schemas_TransactionSuccess as TransactionSuccess,
5372
- schemas_TransactionUpdateOp as TransactionUpdateOp,
5373
- schemas_UniqueCountAgg as UniqueCountAgg,
5374
- schemas_User as User,
5375
- schemas_UserID as UserID,
5376
- schemas_UserWithID as UserWithID,
5377
- ValueBooster$1 as ValueBooster,
5378
- schemas_Workspace as Workspace,
5379
- schemas_WorkspaceID as WorkspaceID,
5380
- schemas_WorkspaceInvite as WorkspaceInvite,
5381
- schemas_WorkspaceMember as WorkspaceMember,
5382
- schemas_WorkspaceMembers as WorkspaceMembers,
5383
- schemas_WorkspaceMeta as WorkspaceMeta,
5384
- XataRecord$1 as XataRecord,
5385
- };
6266
+ export type { schemas_APIKeyName as APIKeyName, schemas_AccessToken as AccessToken, schemas_AggExpression as AggExpression, schemas_AggExpressionMap as AggExpressionMap, AggResponse$1 as AggResponse, schemas_AuthorizationCodeRequest as AuthorizationCodeRequest, schemas_AuthorizationCodeResponse as AuthorizationCodeResponse, schemas_AverageAgg as AverageAgg, schemas_BoosterExpression as BoosterExpression, schemas_Branch as Branch, schemas_BranchMetadata as BranchMetadata, schemas_BranchMigration as BranchMigration, schemas_BranchName as BranchName, schemas_BranchOp as BranchOp, schemas_BranchWithCopyID as BranchWithCopyID, schemas_Column as Column, schemas_ColumnFile as ColumnFile, schemas_ColumnLink as ColumnLink, schemas_ColumnMigration as ColumnMigration, schemas_ColumnName as ColumnName, schemas_ColumnOpAdd as ColumnOpAdd, schemas_ColumnOpRemove as ColumnOpRemove, schemas_ColumnOpRename as ColumnOpRename, schemas_ColumnVector as ColumnVector, schemas_ColumnsProjection as ColumnsProjection, schemas_Commit as Commit, schemas_CountAgg as CountAgg, schemas_DBBranch as DBBranch, schemas_DBBranchName as DBBranchName, schemas_DBName as DBName, schemas_DataInputRecord as DataInputRecord, schemas_DatabaseGithubSettings as DatabaseGithubSettings, schemas_DatabaseMetadata as DatabaseMetadata, DateBooster$1 as DateBooster, schemas_DateHistogramAgg as DateHistogramAgg, schemas_DateTime as DateTime, schemas_FileAccessID as FileAccessID, schemas_FileItemID as FileItemID, schemas_FileName as FileName, schemas_FileResponse as FileResponse, schemas_FileSignature as FileSignature, schemas_FilterColumn as FilterColumn, schemas_FilterColumnIncludes as FilterColumnIncludes, schemas_FilterExpression as FilterExpression, schemas_FilterList as FilterList, schemas_FilterPredicate as FilterPredicate, schemas_FilterPredicateOp as FilterPredicateOp, schemas_FilterPredicateRangeOp as FilterPredicateRangeOp, schemas_FilterRangeValue as FilterRangeValue, schemas_FilterValue as FilterValue, schemas_FuzzinessExpression as FuzzinessExpression, schemas_HighlightExpression as HighlightExpression, schemas_InputFile as InputFile, schemas_InputFileArray as InputFileArray, schemas_InputFileEntry as InputFileEntry, schemas_InviteID as InviteID, schemas_InviteKey as InviteKey, schemas_ListBranchesResponse as ListBranchesResponse, schemas_ListDatabasesResponse as ListDatabasesResponse, schemas_ListGitBranchesResponse as ListGitBranchesResponse, schemas_ListRegionsResponse as ListRegionsResponse, schemas_MaxAgg as MaxAgg, schemas_MediaType as MediaType, schemas_MetricsDatapoint as MetricsDatapoint, schemas_MetricsLatency as MetricsLatency, schemas_Migration as Migration, schemas_MigrationColumnOp as MigrationColumnOp, schemas_MigrationObject as MigrationObject, schemas_MigrationOp as MigrationOp, schemas_MigrationRequest as MigrationRequest, schemas_MigrationRequestNumber as MigrationRequestNumber, schemas_MigrationStatus as MigrationStatus, schemas_MigrationTableOp as MigrationTableOp, schemas_MinAgg as MinAgg, NumericBooster$1 as NumericBooster, schemas_NumericHistogramAgg as NumericHistogramAgg, schemas_OAuthAccessToken as OAuthAccessToken, schemas_OAuthClientID as OAuthClientID, schemas_OAuthClientPublicDetails as OAuthClientPublicDetails, schemas_OAuthResponseType as OAuthResponseType, schemas_OAuthScope as OAuthScope, schemas_ObjectValue as ObjectValue, schemas_PageConfig as PageConfig, schemas_PrefixExpression as PrefixExpression, schemas_ProjectionConfig as ProjectionConfig, schemas_QueryColumnsProjection as QueryColumnsProjection, schemas_RecordID as RecordID, schemas_RecordMeta as RecordMeta, schemas_RecordsMetadata as RecordsMetadata, schemas_Region as Region, schemas_RevLink as RevLink, schemas_Role as Role, schemas_SQLRecord as SQLRecord, schemas_Schema as Schema, schemas_SchemaEditScript as SchemaEditScript, schemas_SearchPageConfig as SearchPageConfig, schemas_SortExpression as SortExpression, schemas_SortOrder as SortOrder, schemas_StartedFromMetadata as StartedFromMetadata, schemas_SumAgg as SumAgg, schemas_SummaryExpression as SummaryExpression, schemas_SummaryExpressionList as SummaryExpressionList, schemas_Table as Table, schemas_TableMigration as TableMigration, schemas_TableName as TableName, schemas_TableOpAdd as TableOpAdd, schemas_TableOpRemove as TableOpRemove, schemas_TableOpRename as TableOpRename, schemas_TableRename as TableRename, schemas_TargetExpression as TargetExpression, schemas_TopValuesAgg as TopValuesAgg, schemas_TransactionDeleteOp as TransactionDeleteOp, schemas_TransactionError as TransactionError, schemas_TransactionFailure as TransactionFailure, schemas_TransactionGetOp as TransactionGetOp, schemas_TransactionInsertOp as TransactionInsertOp, TransactionOperation$1 as TransactionOperation, schemas_TransactionResultColumns as TransactionResultColumns, schemas_TransactionResultDelete as TransactionResultDelete, schemas_TransactionResultGet as TransactionResultGet, schemas_TransactionResultInsert as TransactionResultInsert, schemas_TransactionResultUpdate as TransactionResultUpdate, schemas_TransactionSuccess as TransactionSuccess, schemas_TransactionUpdateOp as TransactionUpdateOp, schemas_UniqueCountAgg as UniqueCountAgg, schemas_User as User, schemas_UserID as UserID, schemas_UserWithID as UserWithID, ValueBooster$1 as ValueBooster, schemas_Workspace as Workspace, schemas_WorkspaceID as WorkspaceID, schemas_WorkspaceInvite as WorkspaceInvite, schemas_WorkspaceMember as WorkspaceMember, schemas_WorkspaceMembers as WorkspaceMembers, schemas_WorkspaceMeta as WorkspaceMeta, XataRecord$1 as XataRecord };
5386
6267
  }
5387
6268
 
5388
6269
  type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
@@ -5407,6 +6288,7 @@ declare class XataApiClient {
5407
6288
  get migrationRequests(): MigrationRequestsApi;
5408
6289
  get tables(): TableApi;
5409
6290
  get records(): RecordsApi;
6291
+ get files(): FilesApi;
5410
6292
  get searchAndFilter(): SearchAndFilterApi;
5411
6293
  }
5412
6294
  declare class UserApi {
@@ -5513,6 +6395,14 @@ declare class BranchApi {
5513
6395
  database: DBName;
5514
6396
  branch: BranchName;
5515
6397
  }): Promise<DeleteBranchResponse>;
6398
+ copyBranch({ workspace, region, database, branch, destinationBranch, limit }: {
6399
+ workspace: WorkspaceID;
6400
+ region: string;
6401
+ database: DBName;
6402
+ branch: BranchName;
6403
+ destinationBranch: BranchName;
6404
+ limit?: number;
6405
+ }): Promise<BranchWithCopyID>;
5516
6406
  updateBranchMetadata({ workspace, region, database, branch, metadata }: {
5517
6407
  workspace: WorkspaceID;
5518
6408
  region: string;
@@ -5720,6 +6610,75 @@ declare class RecordsApi {
5720
6610
  operations: TransactionOperation$1[];
5721
6611
  }): Promise<TransactionSuccess>;
5722
6612
  }
6613
+ declare class FilesApi {
6614
+ private extraProps;
6615
+ constructor(extraProps: ApiExtraProps);
6616
+ getFileItem({ workspace, region, database, branch, table, record, column, fileId }: {
6617
+ workspace: WorkspaceID;
6618
+ region: string;
6619
+ database: DBName;
6620
+ branch: BranchName;
6621
+ table: TableName;
6622
+ record: RecordID;
6623
+ column: ColumnName;
6624
+ fileId: string;
6625
+ }): Promise<any>;
6626
+ putFileItem({ workspace, region, database, branch, table, record, column, fileId, file }: {
6627
+ workspace: WorkspaceID;
6628
+ region: string;
6629
+ database: DBName;
6630
+ branch: BranchName;
6631
+ table: TableName;
6632
+ record: RecordID;
6633
+ column: ColumnName;
6634
+ fileId: string;
6635
+ file: any;
6636
+ }): Promise<PutFileResponse>;
6637
+ deleteFileItem({ workspace, region, database, branch, table, record, column, fileId }: {
6638
+ workspace: WorkspaceID;
6639
+ region: string;
6640
+ database: DBName;
6641
+ branch: BranchName;
6642
+ table: TableName;
6643
+ record: RecordID;
6644
+ column: ColumnName;
6645
+ fileId: string;
6646
+ }): Promise<PutFileResponse>;
6647
+ getFile({ workspace, region, database, branch, table, record, column }: {
6648
+ workspace: WorkspaceID;
6649
+ region: string;
6650
+ database: DBName;
6651
+ branch: BranchName;
6652
+ table: TableName;
6653
+ record: RecordID;
6654
+ column: ColumnName;
6655
+ }): Promise<any>;
6656
+ putFile({ workspace, region, database, branch, table, record, column, file }: {
6657
+ workspace: WorkspaceID;
6658
+ region: string;
6659
+ database: DBName;
6660
+ branch: BranchName;
6661
+ table: TableName;
6662
+ record: RecordID;
6663
+ column: ColumnName;
6664
+ file: Blob;
6665
+ }): Promise<PutFileResponse>;
6666
+ deleteFile({ workspace, region, database, branch, table, record, column }: {
6667
+ workspace: WorkspaceID;
6668
+ region: string;
6669
+ database: DBName;
6670
+ branch: BranchName;
6671
+ table: TableName;
6672
+ record: RecordID;
6673
+ column: ColumnName;
6674
+ }): Promise<PutFileResponse>;
6675
+ fileAccess({ workspace, region, fileId, verify }: {
6676
+ workspace: WorkspaceID;
6677
+ region: string;
6678
+ fileId: string;
6679
+ verify?: FileSignature;
6680
+ }): Promise<any>;
6681
+ }
5723
6682
  declare class SearchAndFilterApi {
5724
6683
  private extraProps;
5725
6684
  constructor(extraProps: ApiExtraProps);
@@ -5777,20 +6736,23 @@ declare class SearchAndFilterApi {
5777
6736
  size?: number;
5778
6737
  filter?: FilterExpression;
5779
6738
  }): Promise<SearchResponse>;
5780
- askTable({ workspace, region, database, branch, table, question, fuzziness, target, prefix, filter, boosters, rules }: {
6739
+ askTable({ workspace, region, database, branch, table, options }: {
5781
6740
  workspace: WorkspaceID;
5782
6741
  region: string;
5783
6742
  database: DBName;
5784
6743
  branch: BranchName;
5785
6744
  table: TableName;
5786
- question: string;
5787
- fuzziness?: FuzzinessExpression;
5788
- target?: TargetExpression;
5789
- prefix?: PrefixExpression;
5790
- filter?: FilterExpression;
5791
- boosters?: BoosterExpression[];
5792
- rules?: string[];
6745
+ options: AskTableRequestBody;
5793
6746
  }): Promise<AskTableResponse>;
6747
+ askTableSession({ workspace, region, database, branch, table, sessionId, message }: {
6748
+ workspace: WorkspaceID;
6749
+ region: string;
6750
+ database: DBName;
6751
+ branch: BranchName;
6752
+ table: TableName;
6753
+ sessionId: string;
6754
+ message: string;
6755
+ }): Promise<AskTableSessionResponse>;
5794
6756
  summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page, consistency }: {
5795
6757
  workspace: WorkspaceID;
5796
6758
  region: string;
@@ -5876,7 +6838,7 @@ declare class MigrationRequestsApi {
5876
6838
  region: string;
5877
6839
  database: DBName;
5878
6840
  migrationRequest: MigrationRequestNumber;
5879
- }): Promise<Commit>;
6841
+ }): Promise<BranchOp>;
5880
6842
  }
5881
6843
  declare class MigrationsApi {
5882
6844
  private extraProps;
@@ -5955,6 +6917,13 @@ declare class MigrationsApi {
5955
6917
  branch: BranchName;
5956
6918
  edits: SchemaEditScript;
5957
6919
  }): Promise<SchemaUpdateResponse>;
6920
+ pushBranchMigrations({ workspace, region, database, branch, migrations }: {
6921
+ workspace: WorkspaceID;
6922
+ region: string;
6923
+ database: DBName;
6924
+ branch: BranchName;
6925
+ migrations: MigrationObject[];
6926
+ }): Promise<SchemaUpdateResponse>;
5958
6927
  }
5959
6928
  declare class DatabaseApi {
5960
6929
  private extraProps;
@@ -5962,10 +6931,11 @@ declare class DatabaseApi {
5962
6931
  getDatabaseList({ workspace }: {
5963
6932
  workspace: WorkspaceID;
5964
6933
  }): Promise<ListDatabasesResponse>;
5965
- createDatabase({ workspace, database, data }: {
6934
+ createDatabase({ workspace, database, data, headers }: {
5966
6935
  workspace: WorkspaceID;
5967
6936
  database: DBName;
5968
6937
  data: CreateDatabaseRequestBody;
6938
+ headers?: Record<string, string>;
5969
6939
  }): Promise<CreateDatabaseResponse>;
5970
6940
  deleteDatabase({ workspace, database }: {
5971
6941
  workspace: WorkspaceID;
@@ -5980,6 +6950,11 @@ declare class DatabaseApi {
5980
6950
  database: DBName;
5981
6951
  metadata: DatabaseMetadata;
5982
6952
  }): Promise<DatabaseMetadata>;
6953
+ renameDatabase({ workspace, database, newName }: {
6954
+ workspace: WorkspaceID;
6955
+ database: DBName;
6956
+ newName: DBName;
6957
+ }): Promise<DatabaseMetadata>;
5983
6958
  getDatabaseGithubSettings({ workspace, database }: {
5984
6959
  workspace: WorkspaceID;
5985
6960
  database: DBName;
@@ -6035,35 +7010,293 @@ type Narrowable = string | number | bigint | boolean;
6035
7010
  type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
6036
7011
  type Narrow<A> = Try<A, [], NarrowRaw<A>>;
6037
7012
 
6038
- type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
7013
+ interface ImageTransformations {
7014
+ /**
7015
+ * Whether to preserve animation frames from input files. Default is true.
7016
+ * Setting it to false reduces animations to still images. This setting is
7017
+ * recommended when enlarging images or processing arbitrary user content,
7018
+ * because large GIF animations can weigh tens or even hundreds of megabytes.
7019
+ * It is also useful to set anim:false when using format:"json" to get the
7020
+ * response quicker without the number of frames.
7021
+ */
7022
+ anim?: boolean;
7023
+ /**
7024
+ * Background color to add underneath the image. Applies only to images with
7025
+ * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
7026
+ * hsl(…), etc.)
7027
+ */
7028
+ background?: string;
7029
+ /**
7030
+ * Radius of a blur filter (approximate gaussian). Maximum supported radius
7031
+ * is 250.
7032
+ */
7033
+ blur?: number;
7034
+ /**
7035
+ * Increase brightness by a factor. A value of 1.0 equals no change, a value
7036
+ * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
7037
+ * 0 is ignored.
7038
+ */
7039
+ brightness?: number;
7040
+ /**
7041
+ * Slightly reduces latency on a cache miss by selecting a
7042
+ * quickest-to-compress file format, at a cost of increased file size and
7043
+ * lower image quality. It will usually override the format option and choose
7044
+ * JPEG over WebP or AVIF. We do not recommend using this option, except in
7045
+ * unusual circumstances like resizing uncacheable dynamically-generated
7046
+ * images.
7047
+ */
7048
+ compression?: 'fast';
7049
+ /**
7050
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
7051
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
7052
+ * ignored.
7053
+ */
7054
+ contrast?: number;
7055
+ /**
7056
+ * Download file. Forces browser to download the image.
7057
+ * Value is used for the download file name. Extension is optional.
7058
+ */
7059
+ download?: string;
7060
+ /**
7061
+ * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
7062
+ * easier to specify higher-DPI sizes in <img srcset>.
7063
+ */
7064
+ dpr?: number;
7065
+ /**
7066
+ * Resizing mode as a string. It affects interpretation of width and height
7067
+ * options:
7068
+ * - scale-down: Similar to contain, but the image is never enlarged. If
7069
+ * the image is larger than given width or height, it will be resized.
7070
+ * Otherwise its original size will be kept.
7071
+ * - contain: Resizes to maximum size that fits within the given width and
7072
+ * height. If only a single dimension is given (e.g. only width), the
7073
+ * image will be shrunk or enlarged to exactly match that dimension.
7074
+ * Aspect ratio is always preserved.
7075
+ * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
7076
+ * and height. If the image has an aspect ratio different from the ratio
7077
+ * of width and height, it will be cropped to fit.
7078
+ * - crop: The image will be shrunk and cropped to fit within the area
7079
+ * specified by width and height. The image will not be enlarged. For images
7080
+ * smaller than the given dimensions it's the same as scale-down. For
7081
+ * images larger than the given dimensions, it's the same as cover.
7082
+ * See also trim.
7083
+ * - pad: Resizes to the maximum size that fits within the given width and
7084
+ * height, and then fills the remaining area with a background color
7085
+ * (white by default). Use of this mode is not recommended, as the same
7086
+ * effect can be more efficiently achieved with the contain mode and the
7087
+ * CSS object-fit: contain property.
7088
+ */
7089
+ fit?: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad';
7090
+ /**
7091
+ * Output format to generate. It can be:
7092
+ * - avif: generate images in AVIF format.
7093
+ * - webp: generate images in Google WebP format. Set quality to 100 to get
7094
+ * the WebP-lossless format.
7095
+ * - json: instead of generating an image, outputs information about the
7096
+ * image, in JSON format. The JSON object will contain image size
7097
+ * (before and after resizing), source image’s MIME type, file size, etc.
7098
+ * - jpeg: generate images in JPEG format.
7099
+ * - png: generate images in PNG format.
7100
+ */
7101
+ format?: 'auto' | 'avif' | 'webp' | 'json' | 'jpeg' | 'png';
7102
+ /**
7103
+ * Increase exposure by a factor. A value of 1.0 equals no change, a value of
7104
+ * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
7105
+ */
7106
+ gamma?: number;
7107
+ /**
7108
+ * When cropping with fit: "cover", this defines the side or point that should
7109
+ * be left uncropped. The value is either a string
7110
+ * "left", "right", "top", "bottom", "auto", or "center" (the default),
7111
+ * or an object {x, y} containing focal point coordinates in the original
7112
+ * image expressed as fractions ranging from 0.0 (top or left) to 1.0
7113
+ * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
7114
+ * crop bottom or left and right sides as necessary, but won’t crop anything
7115
+ * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
7116
+ * preserve as much as possible around a point at 20% of the height of the
7117
+ * source image.
7118
+ */
7119
+ gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | {
7120
+ x: number;
7121
+ y: number;
7122
+ };
7123
+ /**
7124
+ * Maximum height in image pixels. The value must be an integer.
7125
+ */
7126
+ height?: number;
7127
+ /**
7128
+ * What EXIF data should be preserved in the output image. Note that EXIF
7129
+ * rotation and embedded color profiles are always applied ("baked in" into
7130
+ * the image), and aren't affected by this option. Note that if the Polish
7131
+ * feature is enabled, all metadata may have been removed already and this
7132
+ * option may have no effect.
7133
+ * - keep: Preserve most of EXIF metadata, including GPS location if there's
7134
+ * any.
7135
+ * - copyright: Only keep the copyright tag, and discard everything else.
7136
+ * This is the default behavior for JPEG files.
7137
+ * - none: Discard all invisible EXIF metadata. Currently WebP and PNG
7138
+ * output formats always discard metadata.
7139
+ */
7140
+ metadata?: 'keep' | 'copyright' | 'none';
7141
+ /**
7142
+ * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
7143
+ * make images look worse, but load faster. The default is 85. It applies only
7144
+ * to JPEG and WebP images. It doesn’t have any effect on PNG.
7145
+ */
7146
+ quality?: number;
7147
+ /**
7148
+ * Number of degrees (90, 180, 270) to rotate the image by. width and height
7149
+ * options refer to axes after rotation.
7150
+ */
7151
+ rotate?: 0 | 90 | 180 | 270 | 360;
7152
+ /**
7153
+ * Strength of sharpening filter to apply to the image. Floating-point
7154
+ * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
7155
+ * recommended value for downscaled images.
7156
+ */
7157
+ sharpen?: number;
7158
+ /**
7159
+ * An object with four properties {left, top, right, bottom} that specify
7160
+ * a number of pixels to cut off on each side. Allows removal of borders
7161
+ * or cutting out a specific fragment of an image. Trimming is performed
7162
+ * before resizing or rotation. Takes dpr into account.
7163
+ */
7164
+ trim?: {
7165
+ left?: number;
7166
+ top?: number;
7167
+ right?: number;
7168
+ bottom?: number;
7169
+ };
7170
+ /**
7171
+ * Maximum width in image pixels. The value must be an integer.
7172
+ */
7173
+ width?: number;
7174
+ }
7175
+ declare function transformImage(url: string, ...transformations: ImageTransformations[]): string;
7176
+ declare function transformImage(url: string | undefined, ...transformations: ImageTransformations[]): string | undefined;
7177
+
7178
+ type XataFileEditableFields = Partial<Pick<XataArrayFile, keyof InputFileEntry>>;
7179
+ declare class XataFile {
7180
+ /**
7181
+ * Identifier of the file.
7182
+ */
7183
+ id?: string;
7184
+ /**
7185
+ * Name of the file.
7186
+ */
7187
+ name: string;
7188
+ /**
7189
+ * Media type of the file.
7190
+ */
7191
+ mediaType: string;
7192
+ /**
7193
+ * Base64 encoded content of the file.
7194
+ */
7195
+ base64Content?: string;
7196
+ /**
7197
+ * Whether to enable public url for the file.
7198
+ */
7199
+ enablePublicUrl: boolean;
7200
+ /**
7201
+ * Timeout for the signed url.
7202
+ */
7203
+ signedUrlTimeout: number;
7204
+ /**
7205
+ * Size of the file.
7206
+ */
7207
+ size?: number;
7208
+ /**
7209
+ * Version of the file.
7210
+ */
7211
+ version: number;
7212
+ /**
7213
+ * Url of the file.
7214
+ */
7215
+ url: string;
7216
+ /**
7217
+ * Signed url of the file.
7218
+ */
7219
+ signedUrl?: string;
7220
+ /**
7221
+ * Attributes of the file.
7222
+ */
7223
+ attributes: Record<string, any>;
7224
+ constructor(file: Partial<XataFile>);
7225
+ static fromBuffer(buffer: Buffer, options?: XataFileEditableFields): XataFile;
7226
+ toBuffer(): Buffer;
7227
+ static fromArrayBuffer(arrayBuffer: ArrayBuffer, options?: XataFileEditableFields): XataFile;
7228
+ toArrayBuffer(): ArrayBuffer;
7229
+ static fromUint8Array(uint8Array: Uint8Array, options?: XataFileEditableFields): XataFile;
7230
+ toUint8Array(): Uint8Array;
7231
+ static fromBlob(file: Blob, options?: XataFileEditableFields): Promise<XataFile>;
7232
+ toBlob(): Blob;
7233
+ static fromString(string: string, options?: XataFileEditableFields): XataFile;
7234
+ toString(): string;
7235
+ static fromBase64(base64Content: string, options?: XataFileEditableFields): XataFile;
7236
+ toBase64(): string;
7237
+ transform(...options: ImageTransformations[]): {
7238
+ url: string;
7239
+ signedUrl: string | undefined;
7240
+ metadataUrl: string;
7241
+ metadataSignedUrl: string | undefined;
7242
+ };
7243
+ }
7244
+ type XataArrayFile = Identifiable & XataFile;
7245
+
7246
+ type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | `xata.${'version' | 'createdAt' | 'updatedAt'}` | DataProps<O> | NestedColumns<O, RecursivePath>;
7247
+ type ExpandedColumnNotation = {
7248
+ name: string;
7249
+ columns?: SelectableColumn<any>[];
7250
+ as?: string;
7251
+ limit?: number;
7252
+ offset?: number;
7253
+ order?: {
7254
+ column: string;
7255
+ order: 'asc' | 'desc';
7256
+ }[];
7257
+ };
7258
+ type SelectableColumnWithObjectNotation<O, RecursivePath extends any[] = []> = SelectableColumn<O, RecursivePath> | ExpandedColumnNotation;
7259
+ declare function isValidExpandedColumn(column: any): column is ExpandedColumnNotation;
7260
+ declare function isValidSelectableColumns(columns: any): columns is SelectableColumn<any>[];
7261
+ type StringColumns<T> = T extends string ? T : never;
7262
+ type ProjectionColumns<T> = T extends string ? never : T extends {
7263
+ as: infer As;
7264
+ } ? NonNullable<As> extends string ? NonNullable<As> : never : never;
6039
7265
  type WildcardColumns<O> = Values<{
6040
7266
  [K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
6041
7267
  }>;
6042
7268
  type ColumnsByValue<O, Value> = Values<{
6043
7269
  [K in SelectableColumn<O>]: ValueAtColumn<O, K> extends infer C ? C extends Value ? K extends WildcardColumns<O> ? never : K : never : never;
6044
7270
  }>;
6045
- type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
6046
- [K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
7271
+ type SelectedPick<O extends XataRecord, Key extends SelectableColumnWithObjectNotation<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
7272
+ [K in StringColumns<Key[number]>]: NestedValueAtColumn<O, K> & XataRecord<O>;
7273
+ }>> & UnionToIntersection<Values<{
7274
+ [K in ProjectionColumns<Key[number]>]: {
7275
+ [Key in K]: {
7276
+ records: (Record<string, any> & XataRecord<O>)[];
7277
+ };
7278
+ };
6047
7279
  }>>;
6048
- 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> ? {
7280
+ type ValueAtColumn<Object, Key> = Key extends '*' ? Values<Object> : Key extends 'id' ? string : Key extends 'xata.version' ? number : Key extends 'xata.createdAt' ? Date : Key extends 'xata.updatedAt' ? Date : Key extends keyof Object ? Object[Key] : Key extends `${infer K}.${infer V}` ? K extends keyof Object ? Values<NonNullable<Object[K]> extends infer Item ? Item extends Record<string, any> ? V extends SelectableColumn<Item> ? {
6049
7281
  V: ValueAtColumn<Item, V>;
6050
- } : never : O[K] : never> : never : never;
7282
+ } : never : Object[K] : never> : never : never;
6051
7283
  type MAX_RECURSION = 2;
6052
7284
  type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
6053
- [K in DataProps<O>]: NonNullable<O[K]> extends infer Item ? If<IsArray<Item>, K, // If the property is an array, we stop recursion. We don't support object arrays yet
6054
- If<IsObject<Item>, Item extends XataRecord ? SelectableColumn<Item, [...RecursivePath, Item]> extends infer Column ? Column extends string ? K | `${K}.${Column}` : never : never : Item extends Date ? K : `${K}.${StringKeys<Item> | '*'}`, // This allows usage of objects that are not links
7285
+ [K in DataProps<O>]: NonNullable<O[K]> extends infer Item ? If<IsArray<Item>, Item extends (infer Type)[] ? Type extends XataArrayFile ? K | `${K}.${keyof XataFileEditableFields | '*'}` : K | `${K}.${StringKeys<Type> | '*'}` : never, If<IsObject<Item>, Item extends XataRecord ? SelectableColumn<Item, [...RecursivePath, Item]> extends infer Column ? Column extends string ? K | `${K}.${Column}` : never : never : Item extends Date ? K : Item extends XataFile ? K | `${K}.${keyof XataFileEditableFields | '*'}` : `${K}.${StringKeys<Item> | '*'}`, // This allows usage of objects that are not links
6055
7286
  K>> : never;
6056
7287
  }>, never>;
6057
7288
  type DataProps<O> = Exclude<StringKeys<O>, StringKeys<XataRecord>>;
6058
7289
  type NestedValueAtColumn<O, Key extends SelectableColumn<O>> = Key extends `${infer N}.${infer M}` ? N extends DataProps<O> ? {
6059
- [K in N]: M extends SelectableColumn<NonNullable<O[K]>> ? NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M> & XataRecord> : ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M>> : unknown;
7290
+ [K in N]: M extends SelectableColumn<NonNullable<O[K]>> ? NonNullable<O[K]> extends XataFile ? ForwardNullable<O[K], XataFile> : NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M> & XataRecord> : ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M>> : NonNullable<O[K]> extends (infer ArrayType)[] ? ArrayType extends XataArrayFile ? ForwardNullable<O[K], XataArrayFile[]> : M extends SelectableColumn<NonNullable<ArrayType>> ? ForwardNullable<O[K], NestedValueAtColumn<NonNullable<ArrayType>, M>[]> : unknown : unknown;
6060
7291
  } : unknown : Key extends DataProps<O> ? {
6061
- [K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], SelectedPick<NonNullable<O[K]>, ['*']>> : O[K];
7292
+ [K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Omit<SelectedPick<NonNullable<O[K]>, ['*']>, 'xata' | 'getMetadata'>> : O[K];
6062
7293
  } : Key extends '*' ? {
6063
7294
  [K in StringKeys<O>]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Link<NonNullable<O[K]>>> : O[K];
6064
7295
  } : unknown;
6065
7296
  type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
6066
7297
 
7298
+ declare const RecordColumnTypes: readonly ["bool", "int", "float", "string", "text", "email", "multiple", "link", "object", "datetime", "vector", "file[]", "file", "json"];
7299
+ type Identifier = string;
6067
7300
  /**
6068
7301
  * Represents an identifiable record from the database.
6069
7302
  */
@@ -6071,7 +7304,7 @@ interface Identifiable {
6071
7304
  /**
6072
7305
  * Unique id of this record.
6073
7306
  */
6074
- id: string;
7307
+ id: Identifier;
6075
7308
  }
6076
7309
  interface BaseData {
6077
7310
  [key: string]: any;
@@ -6080,8 +7313,13 @@ interface BaseData {
6080
7313
  * Represents a persisted record from the database.
6081
7314
  */
6082
7315
  interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> extends Identifiable {
7316
+ /**
7317
+ * Metadata of this record.
7318
+ */
7319
+ xata: XataRecordMetadata;
6083
7320
  /**
6084
7321
  * Get metadata of this record.
7322
+ * @deprecated Use `xata` property instead.
6085
7323
  */
6086
7324
  getMetadata(): XataRecordMetadata;
6087
7325
  /**
@@ -6160,23 +7398,71 @@ type XataRecordMetadata = {
6160
7398
  * Number that is increased every time the record is updated.
6161
7399
  */
6162
7400
  version: number;
6163
- warnings?: string[];
7401
+ /**
7402
+ * Timestamp when the record was created.
7403
+ */
7404
+ createdAt: Date;
7405
+ /**
7406
+ * Timestamp when the record was last updated.
7407
+ */
7408
+ updatedAt: Date;
6164
7409
  };
6165
7410
  declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
6166
7411
  declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
7412
+ type NumericOperator = ExclusiveOr<{
7413
+ $increment?: number;
7414
+ }, ExclusiveOr<{
7415
+ $decrement?: number;
7416
+ }, ExclusiveOr<{
7417
+ $multiply?: number;
7418
+ }, {
7419
+ $divide?: number;
7420
+ }>>>;
7421
+ type InputXataFile = Partial<XataArrayFile> | Promise<Partial<XataArrayFile>>;
6167
7422
  type EditableDataFields<T> = T extends XataRecord ? {
6168
- id: string;
6169
- } | string : NonNullable<T> extends XataRecord ? {
6170
- id: string;
6171
- } | string | null | undefined : T extends Date ? string | Date : NonNullable<T> extends Date ? string | Date | null | undefined : T;
7423
+ id: Identifier;
7424
+ } | Identifier : NonNullable<T> extends XataRecord ? {
7425
+ id: Identifier;
7426
+ } | Identifier | null | undefined : T extends Date ? string | Date : NonNullable<T> extends Date ? string | Date | null | undefined : T extends XataFile ? InputXataFile : T extends XataFile[] ? InputXataFile[] : T extends number ? number | NumericOperator : T;
6172
7427
  type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
6173
7428
  [K in keyof O]: EditableDataFields<O[K]>;
6174
7429
  }, keyof XataRecord>>;
6175
- type JSONDataFields<T> = T extends XataRecord ? string : NonNullable<T> extends XataRecord ? string | null | undefined : T extends Date ? string : NonNullable<T> extends Date ? string | null | undefined : T;
6176
- type JSONData<O> = Identifiable & Partial<Omit<{
7430
+ type JSONDataFile = {
7431
+ [K in keyof XataFile]: XataFile[K] extends Function ? never : XataFile[K];
7432
+ };
7433
+ type JSONDataFields<T> = T extends XataFile ? JSONDataFile : NonNullable<T> extends XataFile ? JSONDataFile | null | undefined : T extends XataRecord ? string : NonNullable<T> extends XataRecord ? string | null | undefined : T extends Date ? string : NonNullable<T> extends Date ? string | null | undefined : T;
7434
+ type JSONDataBase = Identifiable & {
7435
+ /**
7436
+ * Metadata about the record.
7437
+ */
7438
+ xata: {
7439
+ /**
7440
+ * Timestamp when the record was created.
7441
+ */
7442
+ createdAt: string;
7443
+ /**
7444
+ * Timestamp when the record was last updated.
7445
+ */
7446
+ updatedAt: string;
7447
+ /**
7448
+ * Number that is increased every time the record is updated.
7449
+ */
7450
+ version: number;
7451
+ };
7452
+ };
7453
+ type JSONData<O> = JSONDataBase & Partial<Omit<{
6177
7454
  [K in keyof O]: JSONDataFields<O[K]>;
6178
7455
  }, keyof XataRecord>>;
6179
7456
 
7457
+ type JSONValue<Value> = Value & {
7458
+ __json: true;
7459
+ };
7460
+
7461
+ type JSONFilterColumns<Record> = Values<{
7462
+ [K in keyof Record]: NonNullable<Record[K]> extends JSONValue<any> ? K extends string ? `${K}->${string}` : never : never;
7463
+ }>;
7464
+ type FilterColumns<T> = ColumnsByValue<T, any> | `xata.${keyof XataRecordMetadata}`;
7465
+ type FilterValueAtColumn<Record, F> = NonNullable<ValueAtColumn<Record, F>> extends JSONValue<any> ? PropertyFilter<any> : Filter<NonNullable<ValueAtColumn<Record, F>>>;
6180
7466
  /**
6181
7467
  * PropertyMatchFilter
6182
7468
  * Example:
@@ -6196,7 +7482,9 @@ type JSONData<O> = Identifiable & Partial<Omit<{
6196
7482
  }
6197
7483
  */
6198
7484
  type PropertyAccessFilter<Record> = {
6199
- [key in ColumnsByValue<Record, any>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
7485
+ [key in FilterColumns<Record>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
7486
+ } & {
7487
+ [key in JSONFilterColumns<Record>]?: PropertyFilter<Record[keyof Record]>;
6200
7488
  };
6201
7489
  type PropertyFilter<T> = T | {
6202
7490
  $is: T;
@@ -6258,7 +7546,7 @@ type AggregatorFilter<T> = {
6258
7546
  * Example: { filter: { $exists: "settings" } }
6259
7547
  */
6260
7548
  type ExistanceFilter<Record> = {
6261
- [key in '$exists' | '$notExists']?: ColumnsByValue<Record, any>;
7549
+ [key in '$exists' | '$notExists']?: FilterColumns<Record>;
6262
7550
  };
6263
7551
  type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
6264
7552
  /**
@@ -6275,6 +7563,12 @@ type DateBooster = {
6275
7563
  origin?: string;
6276
7564
  scale: string;
6277
7565
  decay: number;
7566
+ /**
7567
+ * The factor with which to multiply the added boost.
7568
+ *
7569
+ * @minimum 0
7570
+ */
7571
+ factor?: number;
6278
7572
  };
6279
7573
  type NumericBooster = {
6280
7574
  factor: number;
@@ -6581,13 +7875,57 @@ type ComplexAggregationResult = {
6581
7875
  }>;
6582
7876
  };
6583
7877
 
7878
+ type KeywordAskOptions<Record extends XataRecord> = {
7879
+ searchType?: 'keyword';
7880
+ search?: {
7881
+ fuzziness?: FuzzinessExpression;
7882
+ target?: TargetColumn<Record>[];
7883
+ prefix?: PrefixExpression;
7884
+ filter?: Filter<Record>;
7885
+ boosters?: Boosters<Record>[];
7886
+ };
7887
+ };
7888
+ type VectorAskOptions<Record extends XataRecord> = {
7889
+ searchType?: 'vector';
7890
+ vectorSearch?: {
7891
+ /**
7892
+ * The column to use for vector search. It must be of type `vector`.
7893
+ */
7894
+ column: string;
7895
+ /**
7896
+ * The column containing the text for vector search. Must be of type `text`.
7897
+ */
7898
+ contentColumn: string;
7899
+ filter?: Filter<Record>;
7900
+ };
7901
+ };
7902
+ type TypeAskOptions<Record extends XataRecord> = KeywordAskOptions<Record> | VectorAskOptions<Record>;
7903
+ type BaseAskOptions = {
7904
+ rules?: string[];
7905
+ sessionId?: string;
7906
+ };
7907
+ type AskOptions<Record extends XataRecord> = TypeAskOptions<Record> & BaseAskOptions;
7908
+ type AskResult = {
7909
+ answer?: string;
7910
+ records?: string[];
7911
+ sessionId?: string;
7912
+ };
7913
+
6584
7914
  type SortDirection = 'asc' | 'desc';
6585
- type SortFilterExtended<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = {
7915
+ type RandomFilter = {
7916
+ '*': 'random';
7917
+ };
7918
+ type RandomFilterExtended = {
7919
+ column: '*';
7920
+ direction: 'random';
7921
+ };
7922
+ type SortColumns<T extends XataRecord> = ColumnsByValue<T, any> | `xata.${keyof XataRecordMetadata}`;
7923
+ type SortFilterExtended<T extends XataRecord, Columns extends string = SortColumns<T>> = RandomFilterExtended | {
6586
7924
  column: Columns;
6587
7925
  direction?: SortDirection;
6588
7926
  };
6589
- type SortFilter<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns>;
6590
- type SortFilterBase<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Values<{
7927
+ type SortFilter<T extends XataRecord, Columns extends string = SortColumns<T>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns> | RandomFilter;
7928
+ type SortFilterBase<T extends XataRecord, Columns extends string = SortColumns<T>> = Values<{
6591
7929
  [Key in Columns]: {
6592
7930
  [K in Key]: SortDirection;
6593
7931
  };
@@ -6629,7 +7967,7 @@ type SummarizeFilter<Record extends XataRecord, Expression extends Dictionary<Su
6629
7967
  type SummarizeResultItem<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = SummarizeValuePick<Record, Expression> & SelectedPick<Record, Columns>;
6630
7968
 
6631
7969
  type BaseOptions<T extends XataRecord> = {
6632
- columns?: SelectableColumn<T>[];
7970
+ columns?: SelectableColumnWithObjectNotation<T>[];
6633
7971
  consistency?: 'strong' | 'eventual';
6634
7972
  cache?: number;
6635
7973
  fetchOptions?: Record<string, unknown>;
@@ -6697,7 +8035,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6697
8035
  * @param value The value to filter.
6698
8036
  * @returns A new Query object.
6699
8037
  */
6700
- filter<F extends SelectableColumn<Record>>(column: F, value: Filter<NonNullable<ValueAtColumn<Record, F>>>): Query<Record, Result>;
8038
+ filter<F extends FilterColumns<Record> | JSONFilterColumns<Record>>(column: F, value: FilterValueAtColumn<Record, F>): Query<Record, Result>;
6701
8039
  /**
6702
8040
  * Builds a new query object adding one or more constraints. Examples:
6703
8041
  *
@@ -6718,13 +8056,15 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6718
8056
  * @param direction The direction. Either ascending or descending.
6719
8057
  * @returns A new Query object.
6720
8058
  */
6721
- sort<F extends ColumnsByValue<Record, any>>(column: F, direction?: SortDirection): Query<Record, Result>;
8059
+ sort<F extends SortColumns<Record>>(column: F, direction: SortDirection): Query<Record, Result>;
8060
+ sort(column: '*', direction: 'random'): Query<Record, Result>;
8061
+ sort<F extends SortColumns<Record>>(column: F): Query<Record, Result>;
6722
8062
  /**
6723
8063
  * Builds a new query specifying the set of columns to be returned in the query response.
6724
8064
  * @param columns Array of column names to be returned by the query.
6725
8065
  * @returns A new Query object.
6726
8066
  */
6727
- select<K extends SelectableColumn<Record>>(columns: K[]): Query<Record, SelectedPick<Record, K[]>>;
8067
+ select<K extends SelectableColumnWithObjectNotation<Record>>(columns: K[]): Query<Record, SelectedPick<Record, K[]>>;
6728
8068
  /**
6729
8069
  * Get paginated results
6730
8070
  *
@@ -6744,7 +8084,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6744
8084
  * @param options Pagination options
6745
8085
  * @returns A page of results
6746
8086
  */
6747
- getPaginated<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<Page<Record, SelectedPick<Record, typeof options['columns']>>>;
8087
+ getPaginated<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<Page<Record, SelectedPick<Record, (typeof options)['columns']>>>;
6748
8088
  /**
6749
8089
  * Get results in an iterator
6750
8090
  *
@@ -6775,7 +8115,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6775
8115
  */
6776
8116
  getIterator<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
6777
8117
  batchSize?: number;
6778
- }>(options: Options): AsyncGenerator<SelectedPick<Record, typeof options['columns']>[]>;
8118
+ }>(options: Options): AsyncGenerator<SelectedPick<Record, (typeof options)['columns']>[]>;
6779
8119
  /**
6780
8120
  * Performs the query in the database and returns a set of results.
6781
8121
  * @returns An array of records from the database.
@@ -6786,7 +8126,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6786
8126
  * @param options Additional options to be used when performing the query.
6787
8127
  * @returns An array of records from the database.
6788
8128
  */
6789
- getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, typeof options['columns']>>>;
8129
+ getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
6790
8130
  /**
6791
8131
  * Performs the query in the database and returns a set of results.
6792
8132
  * @param options Additional options to be used when performing the query.
@@ -6807,7 +8147,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6807
8147
  */
6808
8148
  getAll<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
6809
8149
  batchSize?: number;
6810
- }>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>[]>;
8150
+ }>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>[]>;
6811
8151
  /**
6812
8152
  * Performs the query in the database and returns all the results.
6813
8153
  * Warning: If there are a large number of results, this method can have performance implications.
@@ -6827,7 +8167,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6827
8167
  * @param options Additional options to be used when performing the query.
6828
8168
  * @returns The first record that matches the query, or null if no record matched the query.
6829
8169
  */
6830
- getFirst<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']> | null>;
8170
+ getFirst<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']> | null>;
6831
8171
  /**
6832
8172
  * Performs the query in the database and returns the first result.
6833
8173
  * @param options Additional options to be used when performing the query.
@@ -6846,7 +8186,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6846
8186
  * @returns The first record that matches the query, or null if no record matched the query.
6847
8187
  * @throws if there are no results.
6848
8188
  */
6849
- getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>>;
8189
+ getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>>;
6850
8190
  /**
6851
8191
  * Performs the query in the database and returns the first result.
6852
8192
  * @param options Additional options to be used when performing the query.
@@ -6895,6 +8235,7 @@ type PaginationQueryMeta = {
6895
8235
  page: {
6896
8236
  cursor: string;
6897
8237
  more: boolean;
8238
+ size: number;
6898
8239
  };
6899
8240
  };
6900
8241
  interface Paginable<Record extends XataRecord, Result extends XataRecord = Record> {
@@ -7027,7 +8368,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7027
8368
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7028
8369
  * @returns The full persisted record.
7029
8370
  */
7030
- abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8371
+ abstract create<K extends SelectableColumn<Record>>(id: Identifier, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
7031
8372
  ifVersion?: number;
7032
8373
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7033
8374
  /**
@@ -7036,7 +8377,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7036
8377
  * @param object Object containing the column names with their values to be stored in the table.
7037
8378
  * @returns The full persisted record.
7038
8379
  */
7039
- abstract create(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8380
+ abstract create(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
7040
8381
  ifVersion?: number;
7041
8382
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7042
8383
  /**
@@ -7058,26 +8399,26 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7058
8399
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7059
8400
  * @returns The persisted record for the given id or null if the record could not be found.
7060
8401
  */
7061
- abstract read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
8402
+ abstract read<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
7062
8403
  /**
7063
8404
  * Queries a single record from the table given its unique id.
7064
8405
  * @param id The unique id.
7065
8406
  * @returns The persisted record for the given id or null if the record could not be found.
7066
8407
  */
7067
- abstract read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
8408
+ abstract read(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
7068
8409
  /**
7069
8410
  * Queries multiple records from the table given their unique id.
7070
8411
  * @param ids The unique ids array.
7071
8412
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7072
8413
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
7073
8414
  */
7074
- abstract read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8415
+ abstract read<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7075
8416
  /**
7076
8417
  * Queries multiple records from the table given their unique id.
7077
8418
  * @param ids The unique ids array.
7078
8419
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
7079
8420
  */
7080
- abstract read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8421
+ abstract read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7081
8422
  /**
7082
8423
  * Queries a single record from the table by the id in the object.
7083
8424
  * @param object Object containing the id of the record.
@@ -7111,14 +8452,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7111
8452
  * @returns The persisted record for the given id.
7112
8453
  * @throws If the record could not be found.
7113
8454
  */
7114
- abstract readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8455
+ abstract readOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7115
8456
  /**
7116
8457
  * Queries a single record from the table given its unique id.
7117
8458
  * @param id The unique id.
7118
8459
  * @returns The persisted record for the given id.
7119
8460
  * @throws If the record could not be found.
7120
8461
  */
7121
- abstract readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8462
+ abstract readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7122
8463
  /**
7123
8464
  * Queries multiple records from the table given their unique id.
7124
8465
  * @param ids The unique ids array.
@@ -7126,14 +8467,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7126
8467
  * @returns The persisted records for the given ids in order.
7127
8468
  * @throws If one or more records could not be found.
7128
8469
  */
7129
- abstract readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
8470
+ abstract readOrThrow<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7130
8471
  /**
7131
8472
  * Queries multiple records from the table given their unique id.
7132
8473
  * @param ids The unique ids array.
7133
8474
  * @returns The persisted records for the given ids in order.
7134
8475
  * @throws If one or more records could not be found.
7135
8476
  */
7136
- abstract readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8477
+ abstract readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7137
8478
  /**
7138
8479
  * Queries a single record from the table by the id in the object.
7139
8480
  * @param object Object containing the id of the record.
@@ -7188,7 +8529,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7188
8529
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7189
8530
  * @returns The full persisted record, null if the record could not be found.
7190
8531
  */
7191
- abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
8532
+ abstract update<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
7192
8533
  ifVersion?: number;
7193
8534
  }): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7194
8535
  /**
@@ -7197,7 +8538,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7197
8538
  * @param object The column names and their values that have to be updated.
7198
8539
  * @returns The full persisted record, null if the record could not be found.
7199
8540
  */
7200
- abstract update(id: string, object: Partial<EditableData<Record>>, options?: {
8541
+ abstract update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
7201
8542
  ifVersion?: number;
7202
8543
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7203
8544
  /**
@@ -7240,7 +8581,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7240
8581
  * @returns The full persisted record.
7241
8582
  * @throws If the record could not be found.
7242
8583
  */
7243
- abstract updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
8584
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
7244
8585
  ifVersion?: number;
7245
8586
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7246
8587
  /**
@@ -7250,7 +8591,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7250
8591
  * @returns The full persisted record.
7251
8592
  * @throws If the record could not be found.
7252
8593
  */
7253
- abstract updateOrThrow(id: string, object: Partial<EditableData<Record>>, options?: {
8594
+ abstract updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
7254
8595
  ifVersion?: number;
7255
8596
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7256
8597
  /**
@@ -7275,7 +8616,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7275
8616
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7276
8617
  * @returns The full persisted record.
7277
8618
  */
7278
- abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
8619
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[], options?: {
7279
8620
  ifVersion?: number;
7280
8621
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7281
8622
  /**
@@ -7284,7 +8625,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7284
8625
  * @param object Object containing the column names with their values to be persisted in the table.
7285
8626
  * @returns The full persisted record.
7286
8627
  */
7287
- abstract createOrUpdate(object: EditableData<Record> & Identifiable, options?: {
8628
+ abstract createOrUpdate(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
7288
8629
  ifVersion?: number;
7289
8630
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7290
8631
  /**
@@ -7295,7 +8636,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7295
8636
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7296
8637
  * @returns The full persisted record.
7297
8638
  */
7298
- abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8639
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
7299
8640
  ifVersion?: number;
7300
8641
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7301
8642
  /**
@@ -7305,7 +8646,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7305
8646
  * @param object The column names and the values to be persisted.
7306
8647
  * @returns The full persisted record.
7307
8648
  */
7308
- abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8649
+ abstract createOrUpdate(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
7309
8650
  ifVersion?: number;
7310
8651
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7311
8652
  /**
@@ -7315,14 +8656,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7315
8656
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7316
8657
  * @returns Array of the persisted records.
7317
8658
  */
7318
- abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8659
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7319
8660
  /**
7320
8661
  * Creates or updates a single record. If a record exists with the given id,
7321
8662
  * it will be partially updated, otherwise a new record will be created.
7322
8663
  * @param objects Array of objects with the column names and the values to be stored in the table.
7323
8664
  * @returns Array of the persisted records.
7324
8665
  */
7325
- abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8666
+ abstract createOrUpdate(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7326
8667
  /**
7327
8668
  * Creates or replaces a single record. If a record exists with the given id,
7328
8669
  * it will be replaced, otherwise a new record will be created.
@@ -7330,7 +8671,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7330
8671
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7331
8672
  * @returns The full persisted record.
7332
8673
  */
7333
- abstract createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
8674
+ abstract createOrReplace<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[], options?: {
7334
8675
  ifVersion?: number;
7335
8676
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7336
8677
  /**
@@ -7339,7 +8680,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7339
8680
  * @param object Object containing the column names with their values to be persisted in the table.
7340
8681
  * @returns The full persisted record.
7341
8682
  */
7342
- abstract createOrReplace(object: EditableData<Record> & Identifiable, options?: {
8683
+ abstract createOrReplace(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
7343
8684
  ifVersion?: number;
7344
8685
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7345
8686
  /**
@@ -7350,7 +8691,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7350
8691
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7351
8692
  * @returns The full persisted record.
7352
8693
  */
7353
- abstract createOrReplace<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8694
+ abstract createOrReplace<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
7354
8695
  ifVersion?: number;
7355
8696
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7356
8697
  /**
@@ -7360,7 +8701,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7360
8701
  * @param object The column names and the values to be persisted.
7361
8702
  * @returns The full persisted record.
7362
8703
  */
7363
- abstract createOrReplace(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8704
+ abstract createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
7364
8705
  ifVersion?: number;
7365
8706
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7366
8707
  /**
@@ -7370,14 +8711,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7370
8711
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7371
8712
  * @returns Array of the persisted records.
7372
8713
  */
7373
- abstract createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8714
+ abstract createOrReplace<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7374
8715
  /**
7375
8716
  * Creates or replaces a single record. If a record exists with the given id,
7376
8717
  * it will be replaced, otherwise a new record will be created.
7377
8718
  * @param objects Array of objects with the column names and the values to be stored in the table.
7378
8719
  * @returns Array of the persisted records.
7379
8720
  */
7380
- abstract createOrReplace(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8721
+ abstract createOrReplace(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7381
8722
  /**
7382
8723
  * Deletes a record given its unique id.
7383
8724
  * @param object An object with a unique id.
@@ -7397,13 +8738,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7397
8738
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7398
8739
  * @returns The deleted record, null if the record could not be found.
7399
8740
  */
7400
- abstract delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
8741
+ abstract delete<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7401
8742
  /**
7402
8743
  * Deletes a record given a unique id.
7403
8744
  * @param id The unique id.
7404
8745
  * @returns The deleted record, null if the record could not be found.
7405
8746
  */
7406
- abstract delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
8747
+ abstract delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7407
8748
  /**
7408
8749
  * Deletes multiple records given an array of objects with ids.
7409
8750
  * @param objects An array of objects with unique ids.
@@ -7423,13 +8764,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7423
8764
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7424
8765
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
7425
8766
  */
7426
- abstract delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8767
+ abstract delete<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7427
8768
  /**
7428
8769
  * Deletes multiple records given an array of unique ids.
7429
8770
  * @param objects An array of ids.
7430
8771
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
7431
8772
  */
7432
- abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8773
+ abstract delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7433
8774
  /**
7434
8775
  * Deletes a record given its unique id.
7435
8776
  * @param object An object with a unique id.
@@ -7452,14 +8793,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7452
8793
  * @returns The deleted record, null if the record could not be found.
7453
8794
  * @throws If the record could not be found.
7454
8795
  */
7455
- abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8796
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7456
8797
  /**
7457
8798
  * Deletes a record given a unique id.
7458
8799
  * @param id The unique id.
7459
8800
  * @returns The deleted record, null if the record could not be found.
7460
8801
  * @throws If the record could not be found.
7461
8802
  */
7462
- abstract deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8803
+ abstract deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7463
8804
  /**
7464
8805
  * Deletes multiple records given an array of objects with ids.
7465
8806
  * @param objects An array of objects with unique ids.
@@ -7482,14 +8823,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7482
8823
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
7483
8824
  * @throws If one or more records could not be found.
7484
8825
  */
7485
- abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
8826
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7486
8827
  /**
7487
8828
  * Deletes multiple records given an array of unique ids.
7488
8829
  * @param objects An array of ids.
7489
8830
  * @returns Array of the deleted records in order.
7490
8831
  * @throws If one or more records could not be found.
7491
8832
  */
7492
- abstract deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8833
+ abstract deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7493
8834
  /**
7494
8835
  * Search for records in the table.
7495
8836
  * @param query The query to search for.
@@ -7536,6 +8877,20 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7536
8877
  * @returns The requested aggregations.
7537
8878
  */
7538
8879
  abstract aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(expression?: Expression, filter?: Filter<Record>): Promise<AggregationResult<Record, Expression>>;
8880
+ /**
8881
+ * Experimental: Ask the database to perform a natural language question.
8882
+ */
8883
+ abstract ask(question: string, options?: AskOptions<Record>): Promise<AskResult>;
8884
+ /**
8885
+ * Experimental: Ask the database to perform a natural language question.
8886
+ */
8887
+ abstract ask(question: string, options: AskOptions<Record>): Promise<AskResult>;
8888
+ /**
8889
+ * Experimental: Ask the database to perform a natural language question.
8890
+ */
8891
+ abstract ask(question: string, options: AskOptions<Record> & {
8892
+ onMessage: (message: AskResult) => void;
8893
+ }): void;
7539
8894
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
7540
8895
  }
7541
8896
  declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
@@ -7552,26 +8907,26 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7552
8907
  create(object: EditableData<Record> & Partial<Identifiable>, options?: {
7553
8908
  ifVersion?: number;
7554
8909
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7555
- create<K extends SelectableColumn<Record>>(id: string, object: EditableData<Record>, columns: K[], options?: {
8910
+ create<K extends SelectableColumn<Record>>(id: Identifier, object: EditableData<Record>, columns: K[], options?: {
7556
8911
  ifVersion?: number;
7557
8912
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7558
- create(id: string, object: EditableData<Record>, options?: {
8913
+ create(id: Identifier, object: EditableData<Record>, options?: {
7559
8914
  ifVersion?: number;
7560
8915
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7561
8916
  create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7562
8917
  create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7563
- read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
8918
+ read<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
7564
8919
  read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
7565
- read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7566
- read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8920
+ read<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8921
+ read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7567
8922
  read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
7568
8923
  read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
7569
8924
  read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7570
8925
  read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7571
- readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7572
- readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7573
- readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7574
- readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8926
+ readOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8927
+ readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8928
+ readOrThrow<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
8929
+ readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7575
8930
  readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7576
8931
  readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7577
8932
  readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
@@ -7582,10 +8937,10 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7582
8937
  update(object: Partial<EditableData<Record>> & Identifiable, options?: {
7583
8938
  ifVersion?: number;
7584
8939
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7585
- update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
8940
+ update<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
7586
8941
  ifVersion?: number;
7587
8942
  }): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7588
- update(id: string, object: Partial<EditableData<Record>>, options?: {
8943
+ update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
7589
8944
  ifVersion?: number;
7590
8945
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7591
8946
  update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
@@ -7596,58 +8951,58 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7596
8951
  updateOrThrow(object: Partial<EditableData<Record>> & Identifiable, options?: {
7597
8952
  ifVersion?: number;
7598
8953
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7599
- updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
8954
+ updateOrThrow<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
7600
8955
  ifVersion?: number;
7601
8956
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7602
- updateOrThrow(id: string, object: Partial<EditableData<Record>>, options?: {
8957
+ updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
7603
8958
  ifVersion?: number;
7604
8959
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7605
8960
  updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7606
8961
  updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7607
- createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
8962
+ createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[], options?: {
7608
8963
  ifVersion?: number;
7609
8964
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7610
- createOrUpdate(object: EditableData<Record> & Identifiable, options?: {
8965
+ createOrUpdate(object: EditableData<Record> & Partial<Identifiable>, options?: {
7611
8966
  ifVersion?: number;
7612
8967
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7613
- createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8968
+ createOrUpdate<K extends SelectableColumn<Record>>(id: Identifier, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
7614
8969
  ifVersion?: number;
7615
8970
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7616
- createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8971
+ createOrUpdate(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
7617
8972
  ifVersion?: number;
7618
8973
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7619
- createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7620
- createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7621
- createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
8974
+ createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8975
+ createOrUpdate(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8976
+ createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[], options?: {
7622
8977
  ifVersion?: number;
7623
8978
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7624
- createOrReplace(object: EditableData<Record> & Identifiable, options?: {
8979
+ createOrReplace(object: EditableData<Record> & Partial<Identifiable>, options?: {
7625
8980
  ifVersion?: number;
7626
8981
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7627
- createOrReplace<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8982
+ createOrReplace<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
7628
8983
  ifVersion?: number;
7629
8984
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7630
- createOrReplace(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8985
+ createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
7631
8986
  ifVersion?: number;
7632
8987
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7633
- createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7634
- createOrReplace(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8988
+ createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8989
+ createOrReplace(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7635
8990
  delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7636
8991
  delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7637
- delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7638
- delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
8992
+ delete<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
8993
+ delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7639
8994
  delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7640
8995
  delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7641
- delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7642
- delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8996
+ delete<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8997
+ delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7643
8998
  deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7644
8999
  deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7645
- deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7646
- deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
9000
+ deleteOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
9001
+ deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7647
9002
  deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7648
9003
  deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7649
- deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7650
- deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
9004
+ deleteOrThrow<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
9005
+ deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7651
9006
  search(query: string, options?: {
7652
9007
  fuzziness?: FuzzinessExpression;
7653
9008
  prefix?: PrefixExpression;
@@ -7665,6 +9020,9 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7665
9020
  aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
7666
9021
  query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
7667
9022
  summarizeTable<Result extends XataRecord>(query: Query<Record, Result>, summaries?: Dictionary<SummarizeExpression<Record>>, summariesFilter?: FilterExpression): Promise<SummarizeResponse>;
9023
+ ask(question: string, options?: AskOptions<Record> & {
9024
+ onMessage?: (message: AskResult) => void;
9025
+ }): any;
7668
9026
  }
7669
9027
 
7670
9028
  type BaseSchema = {
@@ -7720,7 +9078,7 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
7720
9078
  } : {
7721
9079
  [K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
7722
9080
  } : never : never;
7723
- type InnerType<Type, ObjectColumns, Tables, LinkedTable> = Type extends 'string' | 'text' | 'email' ? string : Type extends 'int' | 'float' ? number : Type extends 'bool' ? boolean : Type extends 'datetime' ? Date : Type extends 'multiple' ? string[] : Type extends 'vector' ? number[] : Type extends 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
9081
+ type InnerType<Type, ObjectColumns, Tables, LinkedTable> = Type extends 'string' | 'text' | 'email' ? string : Type extends 'int' | 'float' ? number : Type extends 'bool' ? boolean : Type extends 'datetime' ? Date : Type extends 'multiple' ? string[] : Type extends 'vector' ? number[] : Type extends 'file' ? XataFile : Type extends 'file[]' ? XataArrayFile[] : Type extends 'json' ? JSONValue<any> : Type extends 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
7724
9082
  name: string;
7725
9083
  type: string;
7726
9084
  } ? UnionToIntersection<Values<{
@@ -7778,11 +9136,11 @@ declare const le: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
7778
9136
  /**
7779
9137
  * Operator to restrict results to only values that are not null.
7780
9138
  */
7781
- declare const exists: <T>(column?: ColumnsByValue<T, any> | undefined) => ExistanceFilter<T>;
9139
+ declare const exists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
7782
9140
  /**
7783
9141
  * Operator to restrict results to only values that are null.
7784
9142
  */
7785
- declare const notExists: <T>(column?: ColumnsByValue<T, any> | undefined) => ExistanceFilter<T>;
9143
+ declare const notExists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
7786
9144
  /**
7787
9145
  * Operator to restrict results to only values that start with the given prefix.
7788
9146
  */
@@ -7840,6 +9198,54 @@ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends X
7840
9198
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
7841
9199
  }
7842
9200
 
9201
+ type BinaryFile = string | Blob | ArrayBuffer;
9202
+ type FilesPluginResult<Schemas extends Record<string, BaseData>> = {
9203
+ download: <Tables extends StringKeys<Schemas>>(location: DownloadDestination<Schemas, Tables>) => Promise<Blob>;
9204
+ upload: <Tables extends StringKeys<Schemas>>(location: UploadDestination<Schemas, Tables>, file: BinaryFile) => Promise<FileResponse>;
9205
+ delete: <Tables extends StringKeys<Schemas>>(location: DownloadDestination<Schemas, Tables>) => Promise<FileResponse>;
9206
+ };
9207
+ type UploadDestination<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = Values<{
9208
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
9209
+ table: Model;
9210
+ column: ColumnsByValue<Schemas[Model], XataFile>;
9211
+ record: string;
9212
+ } | {
9213
+ table: Model;
9214
+ column: ColumnsByValue<Schemas[Model], XataArrayFile[]>;
9215
+ record: string;
9216
+ fileId?: string;
9217
+ };
9218
+ }>;
9219
+ type DownloadDestination<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = Values<{
9220
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
9221
+ table: Model;
9222
+ column: ColumnsByValue<Schemas[Model], XataFile>;
9223
+ record: string;
9224
+ } | {
9225
+ table: Model;
9226
+ column: ColumnsByValue<Schemas[Model], XataArrayFile[]>;
9227
+ record: string;
9228
+ fileId: string;
9229
+ };
9230
+ }>;
9231
+ declare class FilesPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
9232
+ build(pluginOptions: XataPluginOptions): FilesPluginResult<Schemas>;
9233
+ }
9234
+
9235
+ type SQLQueryParams<T = any[]> = {
9236
+ statement: string;
9237
+ params?: T;
9238
+ consistency?: 'strong' | 'eventual';
9239
+ };
9240
+ type SQLQuery = TemplateStringsArray | SQLQueryParams | string;
9241
+ type SQLPluginResult = <T>(query: SQLQuery, ...parameters: any[]) => Promise<{
9242
+ records: T[];
9243
+ warning?: string;
9244
+ }>;
9245
+ declare class SQLPlugin extends XataPlugin {
9246
+ build(pluginOptions: XataPluginOptions): SQLPluginResult;
9247
+ }
9248
+
7843
9249
  type TransactionOperation<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
7844
9250
  insert: Values<{
7845
9251
  [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
@@ -7872,6 +9278,7 @@ type UpdateTransactionOperation<O extends XataRecord> = {
7872
9278
  };
7873
9279
  type DeleteTransactionOperation = {
7874
9280
  id: string;
9281
+ failIfMissing?: boolean;
7875
9282
  };
7876
9283
  type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Table>> = Operation extends {
7877
9284
  insert: {
@@ -7939,6 +9346,8 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
7939
9346
  db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
7940
9347
  search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
7941
9348
  transactions: Awaited<ReturnType<TransactionPlugin<Schemas>['build']>>;
9349
+ sql: Awaited<ReturnType<SQLPlugin['build']>>;
9350
+ files: Awaited<ReturnType<FilesPlugin<Schemas>['build']>>;
7942
9351
  }, keyof Plugins> & {
7943
9352
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
7944
9353
  } & {
@@ -7968,27 +9377,31 @@ type SerializerResult<T> = T extends XataRecord ? Identifiable & Omit<{
7968
9377
  [K in keyof T]: SerializerResult<T[K]>;
7969
9378
  }, keyof XataRecord> : T extends any[] ? SerializerResult<T[number]>[] : T;
7970
9379
 
7971
- declare function getAPIKey(): string | undefined;
7972
-
7973
9380
  declare function getDatabaseURL(): string | undefined;
9381
+ declare function getAPIKey(): string | undefined;
7974
9382
  declare function getBranch(): string | undefined;
9383
+ declare function buildPreviewBranchName({ org, branch }: {
9384
+ org: string;
9385
+ branch: string;
9386
+ }): string;
9387
+ declare function getPreviewBranch(): string | undefined;
7975
9388
 
7976
9389
  interface Body {
7977
9390
  arrayBuffer(): Promise<ArrayBuffer>;
7978
- blob(): Promise<Blob>;
9391
+ blob(): Promise<Blob$1>;
7979
9392
  formData(): Promise<FormData>;
7980
9393
  json(): Promise<any>;
7981
9394
  text(): Promise<string>;
7982
9395
  }
7983
- interface Blob {
9396
+ interface Blob$1 {
7984
9397
  readonly size: number;
7985
9398
  readonly type: string;
7986
9399
  arrayBuffer(): Promise<ArrayBuffer>;
7987
- slice(start?: number, end?: number, contentType?: string): Blob;
9400
+ slice(start?: number, end?: number, contentType?: string): Blob$1;
7988
9401
  text(): Promise<string>;
7989
9402
  }
7990
9403
  /** Provides information about files and allows JavaScript in a web page to access their content. */
7991
- interface File extends Blob {
9404
+ interface File extends Blob$1 {
7992
9405
  readonly lastModified: number;
7993
9406
  readonly name: string;
7994
9407
  readonly webkitRelativePath: string;
@@ -7996,12 +9409,12 @@ interface File extends Blob {
7996
9409
  type FormDataEntryValue = File | string;
7997
9410
  /** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */
7998
9411
  interface FormData {
7999
- append(name: string, value: string | Blob, fileName?: string): void;
9412
+ append(name: string, value: string | Blob$1, fileName?: string): void;
8000
9413
  delete(name: string): void;
8001
9414
  get(name: string): FormDataEntryValue | null;
8002
9415
  getAll(name: string): FormDataEntryValue[];
8003
9416
  has(name: string): boolean;
8004
- set(name: string, value: string | Blob, fileName?: string): void;
9417
+ set(name: string, value: string | Blob$1, fileName?: string): void;
8005
9418
  forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
8006
9419
  }
8007
9420
  /** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
@@ -8058,4 +9471,4 @@ declare class XataError extends Error {
8058
9471
  constructor(message: string, status: number);
8059
9472
  }
8060
9473
 
8061
- export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApiExtraProps, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditVariables, AskTableError, AskTablePathParams, AskTableRequestBody, AskTableResponse, AskTableVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BranchTransactionError, BranchTransactionPathParams, BranchTransactionRequestBody, BranchTransactionVariables, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasRequestBody, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabaseGithubSettingsError, DeleteDatabaseGithubSettingsPathParams, DeleteDatabaseGithubSettingsVariables, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, DeserializedType, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherError, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseGithubSettingsError, GetDatabaseGithubSettingsPathParams, GetDatabaseGithubSettingsVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, 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, SerializedString, Serializer, SerializerResult, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseGithubSettingsError, UpdateDatabaseGithubSettingsPathParams, UpdateDatabaseGithubSettingsVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, VectorSearchTableError, VectorSearchTablePathParams, VectorSearchTableRequestBody, VectorSearchTableVariables, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, askTable, branchTransaction, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
9474
+ export { type AcceptWorkspaceMemberInviteError, type AcceptWorkspaceMemberInvitePathParams, type AcceptWorkspaceMemberInviteVariables, type AddGitBranchesEntryError, type AddGitBranchesEntryPathParams, type AddGitBranchesEntryRequestBody, type AddGitBranchesEntryResponse, type AddGitBranchesEntryVariables, type AddTableColumnError, type AddTableColumnPathParams, type AddTableColumnVariables, type AggregateTableError, type AggregateTablePathParams, type AggregateTableRequestBody, type AggregateTableVariables, type ApiExtraProps, type ApplyBranchSchemaEditError, type ApplyBranchSchemaEditPathParams, type ApplyBranchSchemaEditRequestBody, type ApplyBranchSchemaEditVariables, type AskOptions, type AskResult, type AskTableError, type AskTablePathParams, type AskTableRequestBody, type AskTableResponse, type AskTableSessionError, type AskTableSessionPathParams, type AskTableSessionRequestBody, type AskTableSessionResponse, type AskTableSessionVariables, type AskTableVariables, BaseClient, type BaseClientOptions, type BaseData, type BaseSchema, type BinaryFile, type BranchTransactionError, type BranchTransactionPathParams, type BranchTransactionRequestBody, type BranchTransactionVariables, type BulkInsertTableRecordsError, type BulkInsertTableRecordsPathParams, type BulkInsertTableRecordsQueryParams, type BulkInsertTableRecordsRequestBody, type BulkInsertTableRecordsVariables, type CacheImpl, type CancelWorkspaceMemberInviteError, type CancelWorkspaceMemberInvitePathParams, type CancelWorkspaceMemberInviteVariables, type ClientConstructor, type ColumnsByValue, type CompareBranchSchemasError, type CompareBranchSchemasPathParams, type CompareBranchSchemasRequestBody, type CompareBranchSchemasVariables, type CompareBranchWithUserSchemaError, type CompareBranchWithUserSchemaPathParams, type CompareBranchWithUserSchemaRequestBody, type CompareBranchWithUserSchemaVariables, type CompareMigrationRequestError, type CompareMigrationRequestPathParams, type CompareMigrationRequestVariables, type CopyBranchError, type CopyBranchPathParams, type CopyBranchRequestBody, type CopyBranchVariables, type CreateBranchError, type CreateBranchPathParams, type CreateBranchQueryParams, type CreateBranchRequestBody, type CreateBranchResponse, type CreateBranchVariables, type CreateDatabaseError, type CreateDatabasePathParams, type CreateDatabaseRequestBody, type CreateDatabaseResponse, type CreateDatabaseVariables, type CreateMigrationRequestError, type CreateMigrationRequestPathParams, type CreateMigrationRequestRequestBody, type CreateMigrationRequestResponse, type CreateMigrationRequestVariables, type CreateTableError, type CreateTablePathParams, type CreateTableResponse, type CreateTableVariables, type CreateUserAPIKeyError, type CreateUserAPIKeyPathParams, type CreateUserAPIKeyResponse, type CreateUserAPIKeyVariables, type CreateWorkspaceError, type CreateWorkspaceVariables, type CursorNavigationOptions, type DeleteBranchError, type DeleteBranchPathParams, type DeleteBranchResponse, type DeleteBranchVariables, type DeleteColumnError, type DeleteColumnPathParams, type DeleteColumnVariables, type DeleteDatabaseError, type DeleteDatabaseGithubSettingsError, type DeleteDatabaseGithubSettingsPathParams, type DeleteDatabaseGithubSettingsVariables, type DeleteDatabasePathParams, type DeleteDatabaseResponse, type DeleteDatabaseVariables, type DeleteFileError, type DeleteFileItemError, type DeleteFileItemPathParams, type DeleteFileItemVariables, type DeleteFilePathParams, type DeleteFileVariables, type DeleteOAuthAccessTokenError, type DeleteOAuthAccessTokenPathParams, type DeleteOAuthAccessTokenVariables, type DeleteRecordError, type DeleteRecordPathParams, type DeleteRecordQueryParams, type DeleteRecordVariables, type DeleteTableError, type DeleteTablePathParams, type DeleteTableResponse, type DeleteTableVariables, type DeleteUserAPIKeyError, type DeleteUserAPIKeyPathParams, type DeleteUserAPIKeyVariables, type DeleteUserError, type DeleteUserOAuthClientError, type DeleteUserOAuthClientPathParams, type DeleteUserOAuthClientVariables, type DeleteUserVariables, type DeleteWorkspaceError, type DeleteWorkspacePathParams, type DeleteWorkspaceVariables, type DeserializedType, type DownloadDestination, type EditableData, type ExecuteBranchMigrationPlanError, type ExecuteBranchMigrationPlanPathParams, type ExecuteBranchMigrationPlanRequestBody, type ExecuteBranchMigrationPlanVariables, type FetchImpl, FetcherError, type FetcherExtraProps, type FileAccessError, type FileAccessPathParams, type FileAccessQueryParams, type FileAccessVariables, FilesPlugin, type FilesPluginResult, type GetAuthorizationCodeError, type GetAuthorizationCodeQueryParams, type GetAuthorizationCodeVariables, type GetBranchDetailsError, type GetBranchDetailsPathParams, type GetBranchDetailsVariables, type GetBranchListError, type GetBranchListPathParams, type GetBranchListVariables, type GetBranchMetadataError, type GetBranchMetadataPathParams, type GetBranchMetadataVariables, type GetBranchMigrationHistoryError, type GetBranchMigrationHistoryPathParams, type GetBranchMigrationHistoryRequestBody, type GetBranchMigrationHistoryResponse, type GetBranchMigrationHistoryVariables, type GetBranchMigrationPlanError, type GetBranchMigrationPlanPathParams, type GetBranchMigrationPlanVariables, type GetBranchSchemaHistoryError, type GetBranchSchemaHistoryPathParams, type GetBranchSchemaHistoryRequestBody, type GetBranchSchemaHistoryResponse, type GetBranchSchemaHistoryVariables, type GetBranchStatsError, type GetBranchStatsPathParams, type GetBranchStatsResponse, type GetBranchStatsVariables, type GetColumnError, type GetColumnPathParams, type GetColumnVariables, type GetDatabaseGithubSettingsError, type GetDatabaseGithubSettingsPathParams, type GetDatabaseGithubSettingsVariables, type GetDatabaseListError, type GetDatabaseListPathParams, type GetDatabaseListVariables, type GetDatabaseMetadataError, type GetDatabaseMetadataPathParams, type GetDatabaseMetadataVariables, type GetFileError, type GetFileItemError, type GetFileItemPathParams, type GetFileItemVariables, type GetFilePathParams, type GetFileVariables, type GetGitBranchesMappingError, type GetGitBranchesMappingPathParams, type GetGitBranchesMappingVariables, type GetMigrationRequestError, type GetMigrationRequestIsMergedError, type GetMigrationRequestIsMergedPathParams, type GetMigrationRequestIsMergedResponse, type GetMigrationRequestIsMergedVariables, type GetMigrationRequestPathParams, type GetMigrationRequestVariables, type GetRecordError, type GetRecordPathParams, type GetRecordQueryParams, type GetRecordVariables, type GetTableColumnsError, type GetTableColumnsPathParams, type GetTableColumnsResponse, type GetTableColumnsVariables, type GetTableSchemaError, type GetTableSchemaPathParams, type GetTableSchemaResponse, type GetTableSchemaVariables, type GetUserAPIKeysError, type GetUserAPIKeysResponse, type GetUserAPIKeysVariables, type GetUserError, type GetUserOAuthAccessTokensError, type GetUserOAuthAccessTokensResponse, type GetUserOAuthAccessTokensVariables, type GetUserOAuthClientsError, type GetUserOAuthClientsResponse, type GetUserOAuthClientsVariables, type GetUserVariables, type GetWorkspaceError, type GetWorkspaceMembersListError, type GetWorkspaceMembersListPathParams, type GetWorkspaceMembersListVariables, type GetWorkspacePathParams, type GetWorkspaceVariables, type GetWorkspacesListError, type GetWorkspacesListResponse, type GetWorkspacesListVariables, type GrantAuthorizationCodeError, type GrantAuthorizationCodeVariables, type HostProvider, type Identifiable, type ImageTransformations, type InsertRecordError, type InsertRecordPathParams, type InsertRecordQueryParams, type InsertRecordVariables, type InsertRecordWithIDError, type InsertRecordWithIDPathParams, type InsertRecordWithIDQueryParams, type InsertRecordWithIDVariables, type InviteWorkspaceMemberError, type InviteWorkspaceMemberPathParams, type InviteWorkspaceMemberRequestBody, type InviteWorkspaceMemberVariables, type JSONData, type KeywordAskOptions, type Link, type ListMigrationRequestsCommitsError, type ListMigrationRequestsCommitsPathParams, type ListMigrationRequestsCommitsRequestBody, type ListMigrationRequestsCommitsResponse, type ListMigrationRequestsCommitsVariables, type ListRegionsError, type ListRegionsPathParams, type ListRegionsVariables, type MergeMigrationRequestError, type MergeMigrationRequestPathParams, type MergeMigrationRequestVariables, type OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, type Paginable, type PaginationQueryMeta, type PreviewBranchSchemaEditError, type PreviewBranchSchemaEditPathParams, type PreviewBranchSchemaEditRequestBody, type PreviewBranchSchemaEditResponse, type PreviewBranchSchemaEditVariables, type PushBranchMigrationsError, type PushBranchMigrationsPathParams, type PushBranchMigrationsRequestBody, type PushBranchMigrationsVariables, type PutFileError, type PutFileItemError, type PutFileItemPathParams, type PutFileItemVariables, type PutFilePathParams, type PutFileVariables, Query, type QueryMigrationRequestsError, type QueryMigrationRequestsPathParams, type QueryMigrationRequestsRequestBody, type QueryMigrationRequestsResponse, type QueryMigrationRequestsVariables, type QueryTableError, type QueryTablePathParams, type QueryTableRequestBody, type QueryTableVariables, RecordArray, RecordColumnTypes, type RemoveGitBranchesEntryError, type RemoveGitBranchesEntryPathParams, type RemoveGitBranchesEntryQueryParams, type RemoveGitBranchesEntryVariables, type RemoveWorkspaceMemberError, type RemoveWorkspaceMemberPathParams, type RemoveWorkspaceMemberVariables, type RenameDatabaseError, type RenameDatabasePathParams, type RenameDatabaseRequestBody, type RenameDatabaseVariables, Repository, type ResendWorkspaceMemberInviteError, type ResendWorkspaceMemberInvitePathParams, type ResendWorkspaceMemberInviteVariables, type ResolveBranchError, type ResolveBranchPathParams, type ResolveBranchQueryParams, type ResolveBranchResponse, type ResolveBranchVariables, responses as Responses, RestRepository, SQLPlugin, type SQLPluginResult, type SQLQuery, type SQLQueryParams, type SchemaDefinition, type SchemaInference, SchemaPlugin, type SchemaPluginResult, schemas as Schemas, type SearchBranchError, type SearchBranchPathParams, type SearchBranchRequestBody, type SearchBranchVariables, type SearchOptions, SearchPlugin, type SearchPluginResult, type SearchTableError, type SearchTablePathParams, type SearchTableRequestBody, type SearchTableVariables, type SearchXataRecord, type SelectableColumn, type SelectableColumnWithObjectNotation, type SelectedPick, type SerializedString, Serializer, type SerializerResult, type SetTableSchemaError, type SetTableSchemaPathParams, type SetTableSchemaRequestBody, type SetTableSchemaVariables, SimpleCache, type SimpleCacheOptions, type SqlQueryError, type SqlQueryPathParams, type SqlQueryRequestBody, type SqlQueryVariables, type SummarizeTableError, type SummarizeTablePathParams, type SummarizeTableRequestBody, type SummarizeTableVariables, type UpdateBranchMetadataError, type UpdateBranchMetadataPathParams, type UpdateBranchMetadataVariables, type UpdateBranchSchemaError, type UpdateBranchSchemaPathParams, type UpdateBranchSchemaVariables, type UpdateColumnError, type UpdateColumnPathParams, type UpdateColumnRequestBody, type UpdateColumnVariables, type UpdateDatabaseGithubSettingsError, type UpdateDatabaseGithubSettingsPathParams, type UpdateDatabaseGithubSettingsVariables, type UpdateDatabaseMetadataError, type UpdateDatabaseMetadataPathParams, type UpdateDatabaseMetadataRequestBody, type UpdateDatabaseMetadataVariables, type UpdateMigrationRequestError, type UpdateMigrationRequestPathParams, type UpdateMigrationRequestRequestBody, type UpdateMigrationRequestVariables, type UpdateOAuthAccessTokenError, type UpdateOAuthAccessTokenPathParams, type UpdateOAuthAccessTokenRequestBody, type UpdateOAuthAccessTokenVariables, type UpdateRecordWithIDError, type UpdateRecordWithIDPathParams, type UpdateRecordWithIDQueryParams, type UpdateRecordWithIDVariables, type UpdateTableError, type UpdateTablePathParams, type UpdateTableRequestBody, type UpdateTableVariables, type UpdateUserError, type UpdateUserVariables, type UpdateWorkspaceError, type UpdateWorkspaceMemberInviteError, type UpdateWorkspaceMemberInvitePathParams, type UpdateWorkspaceMemberInviteRequestBody, type UpdateWorkspaceMemberInviteVariables, type UpdateWorkspaceMemberRoleError, type UpdateWorkspaceMemberRolePathParams, type UpdateWorkspaceMemberRoleRequestBody, type UpdateWorkspaceMemberRoleVariables, type UpdateWorkspacePathParams, type UpdateWorkspaceVariables, type UploadDestination, type UpsertRecordWithIDError, type UpsertRecordWithIDPathParams, type UpsertRecordWithIDQueryParams, type UpsertRecordWithIDVariables, type ValueAtColumn, type VectorAskOptions, type VectorSearchTableError, type VectorSearchTablePathParams, type VectorSearchTableRequestBody, type VectorSearchTableVariables, XataApiClient, type XataApiClientOptions, XataApiPlugin, type XataArrayFile, XataError, XataFile, XataPlugin, type XataPluginOptions, type XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteOAuthAccessToken, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteUserOAuthClient, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, ge, getAPIKey, getAuthorizationCode, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, transformImage, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };