@xata.io/client 0.0.0-alpha.vf59e81b → 0.0.0-alpha.vf5a2120

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
@@ -22,23 +22,22 @@ declare class SimpleCache implements CacheImpl {
22
22
  clear(): Promise<void>;
23
23
  }
24
24
 
25
+ declare abstract class XataPlugin {
26
+ abstract build(options: XataPluginOptions): unknown;
27
+ }
28
+ type XataPluginOptions = ApiExtraProps & {
29
+ cache: CacheImpl;
30
+ host: HostProvider;
31
+ };
32
+
25
33
  type AttributeDictionary = Record<string, string | number | boolean | undefined>;
26
34
  type TraceFunction = <T>(name: string, fn: (options: {
27
35
  name?: string;
28
36
  setAttributes: (attrs: AttributeDictionary) => void;
29
37
  }) => T, options?: AttributeDictionary) => Promise<T>;
30
38
 
31
- declare abstract class XataPlugin {
32
- abstract build(options: XataPluginOptions): unknown | Promise<unknown>;
33
- }
34
- type XataPluginOptions = {
35
- getFetchProps: () => ApiExtraProps;
36
- cache?: CacheImpl;
37
- trace?: TraceFunction;
38
- };
39
-
40
39
  type RequestInit = {
41
- body?: string;
40
+ body?: any;
42
41
  headers?: Record<string, string>;
43
42
  method?: string;
44
43
  signal?: any;
@@ -48,6 +47,8 @@ type Response = {
48
47
  status: number;
49
48
  url: string;
50
49
  json(): Promise<any>;
50
+ text(): Promise<string>;
51
+ blob(): Promise<Blob>;
51
52
  headers?: {
52
53
  get(name: string): string | null;
53
54
  };
@@ -73,26 +74,30 @@ type FetcherExtraProps = {
73
74
  endpoint: 'controlPlane' | 'dataPlane';
74
75
  apiUrl: string;
75
76
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
76
- fetchImpl: FetchImpl;
77
+ fetch: FetchImpl;
77
78
  apiKey: string;
78
79
  trace: TraceFunction;
79
80
  signal?: AbortSignal;
80
81
  clientID?: string;
81
82
  sessionID?: string;
82
83
  clientName?: string;
84
+ xataAgentExtra?: Record<string, string>;
83
85
  fetchOptions?: Record<string, unknown>;
86
+ rawResponse?: boolean;
87
+ headers?: Record<string, unknown>;
84
88
  };
85
89
 
86
90
  type ControlPlaneFetcherExtraProps = {
87
91
  apiUrl: string;
88
92
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
89
- fetchImpl: FetchImpl;
93
+ fetch: FetchImpl;
90
94
  apiKey: string;
91
95
  trace: TraceFunction;
92
96
  signal?: AbortSignal;
93
97
  clientID?: string;
94
98
  sessionID?: string;
95
99
  clientName?: string;
100
+ xataAgentExtra?: Record<string, string>;
96
101
  };
97
102
  type ErrorWrapper$1<TError> = TError | {
98
103
  status: 'unknown';
@@ -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
@@ -244,8 +294,22 @@ type BranchMetadata$1 = {
244
294
  labels?: string[];
245
295
  };
246
296
  type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
297
+ /**
298
+ * Github repository settings for this database (optional)
299
+ */
300
+ type DatabaseGithubSettings = {
301
+ /**
302
+ * Repository owner (user or organization)
303
+ */
304
+ owner: string;
305
+ /**
306
+ * Repository name
307
+ */
308
+ repo: string;
309
+ };
247
310
  type Region = {
248
311
  id: string;
312
+ name: string;
249
313
  };
250
314
  type ListRegionsResponse = {
251
315
  /**
@@ -281,6 +345,53 @@ type SimpleError$1 = {
281
345
  * @version 1.0
282
346
  */
283
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>;
284
395
  type GetUserError = ErrorWrapper$1<{
285
396
  status: 400;
286
397
  payload: BadRequestError$1;
@@ -400,6 +511,115 @@ type DeleteUserAPIKeyVariables = {
400
511
  * Delete an existing API key
401
512
  */
402
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>;
403
623
  type GetWorkspacesListError = ErrorWrapper$1<{
404
624
  status: 400;
405
625
  payload: BadRequestError$1;
@@ -939,6 +1159,128 @@ type UpdateDatabaseMetadataVariables = {
939
1159
  * Update the color of the selected database
940
1160
  */
941
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>;
1199
+ type GetDatabaseGithubSettingsPathParams = {
1200
+ /**
1201
+ * Workspace ID
1202
+ */
1203
+ workspaceId: WorkspaceID;
1204
+ /**
1205
+ * The Database Name
1206
+ */
1207
+ dbName: DBName$1;
1208
+ };
1209
+ type GetDatabaseGithubSettingsError = ErrorWrapper$1<{
1210
+ status: 400;
1211
+ payload: BadRequestError$1;
1212
+ } | {
1213
+ status: 401;
1214
+ payload: AuthError$1;
1215
+ } | {
1216
+ status: 404;
1217
+ payload: SimpleError$1;
1218
+ }>;
1219
+ type GetDatabaseGithubSettingsVariables = {
1220
+ pathParams: GetDatabaseGithubSettingsPathParams;
1221
+ } & ControlPlaneFetcherExtraProps;
1222
+ /**
1223
+ * Retrieve current Github database settings
1224
+ */
1225
+ declare const getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<DatabaseGithubSettings>;
1226
+ type UpdateDatabaseGithubSettingsPathParams = {
1227
+ /**
1228
+ * Workspace ID
1229
+ */
1230
+ workspaceId: WorkspaceID;
1231
+ /**
1232
+ * The Database Name
1233
+ */
1234
+ dbName: DBName$1;
1235
+ };
1236
+ type UpdateDatabaseGithubSettingsError = ErrorWrapper$1<{
1237
+ status: 400;
1238
+ payload: BadRequestError$1;
1239
+ } | {
1240
+ status: 401;
1241
+ payload: AuthError$1;
1242
+ } | {
1243
+ status: 422;
1244
+ payload: SimpleError$1;
1245
+ } | {
1246
+ status: 423;
1247
+ payload: SimpleError$1;
1248
+ }>;
1249
+ type UpdateDatabaseGithubSettingsVariables = {
1250
+ body: DatabaseGithubSettings;
1251
+ pathParams: UpdateDatabaseGithubSettingsPathParams;
1252
+ } & ControlPlaneFetcherExtraProps;
1253
+ /**
1254
+ * Map the database to a Github repository, Xata will create database branch previews for all new branches/PRs in the repo.
1255
+ */
1256
+ declare const updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<DatabaseGithubSettings>;
1257
+ type DeleteDatabaseGithubSettingsPathParams = {
1258
+ /**
1259
+ * Workspace ID
1260
+ */
1261
+ workspaceId: WorkspaceID;
1262
+ /**
1263
+ * The Database Name
1264
+ */
1265
+ dbName: DBName$1;
1266
+ };
1267
+ type DeleteDatabaseGithubSettingsError = ErrorWrapper$1<{
1268
+ status: 400;
1269
+ payload: BadRequestError$1;
1270
+ } | {
1271
+ status: 401;
1272
+ payload: AuthError$1;
1273
+ } | {
1274
+ status: 404;
1275
+ payload: SimpleError$1;
1276
+ }>;
1277
+ type DeleteDatabaseGithubSettingsVariables = {
1278
+ pathParams: DeleteDatabaseGithubSettingsPathParams;
1279
+ } & ControlPlaneFetcherExtraProps;
1280
+ /**
1281
+ * Delete any existing database Github settings
1282
+ */
1283
+ declare const deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<undefined>;
942
1284
  type ListRegionsPathParams = {
943
1285
  /**
944
1286
  * Workspace ID
@@ -1028,18 +1370,31 @@ type TableName = string;
1028
1370
  type ColumnLink = {
1029
1371
  table: string;
1030
1372
  };
1373
+ type ColumnVector = {
1374
+ /**
1375
+ * @maximum 10000
1376
+ * @minimum 2
1377
+ */
1378
+ dimension: number;
1379
+ };
1380
+ type ColumnFile = {
1381
+ defaultPublicAccess?: boolean;
1382
+ };
1031
1383
  type Column = {
1032
1384
  name: string;
1033
- type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime';
1385
+ type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file' | 'json';
1034
1386
  link?: ColumnLink;
1387
+ vector?: ColumnVector;
1388
+ file?: ColumnFile;
1389
+ ['file[]']?: ColumnFile;
1035
1390
  notNull?: boolean;
1036
1391
  defaultValue?: string;
1037
1392
  unique?: boolean;
1038
1393
  columns?: Column[];
1039
1394
  };
1040
1395
  type RevLink = {
1041
- linkID: string;
1042
1396
  table: string;
1397
+ column: string;
1043
1398
  };
1044
1399
  type Table = {
1045
1400
  id?: string;
@@ -1066,6 +1421,11 @@ type DBBranch = {
1066
1421
  schema: Schema;
1067
1422
  };
1068
1423
  type MigrationStatus = 'completed' | 'pending' | 'failed';
1424
+ type BranchWithCopyID = {
1425
+ branchName: BranchName;
1426
+ dbBranchID: string;
1427
+ copyID: string;
1428
+ };
1069
1429
  type MetricsDatapoint = {
1070
1430
  timestamp: string;
1071
1431
  value: number;
@@ -1181,7 +1541,7 @@ type FilterColumnIncludes = {
1181
1541
  $includesNone?: FilterPredicate;
1182
1542
  };
1183
1543
  type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
1184
- type SortOrder = 'asc' | 'desc';
1544
+ type SortOrder = 'asc' | 'desc' | 'random';
1185
1545
  type SortExpression = string[] | {
1186
1546
  [key: string]: SortOrder;
1187
1547
  } | {
@@ -1279,9 +1639,13 @@ type RecordsMetadata = {
1279
1639
  */
1280
1640
  cursor: string;
1281
1641
  /**
1282
- * true if more records can be fetch
1642
+ * true if more records can be fetched
1283
1643
  */
1284
1644
  more: boolean;
1645
+ /**
1646
+ * the number of records returned per page
1647
+ */
1648
+ size: number;
1285
1649
  };
1286
1650
  };
1287
1651
  type TableOpAdd = {
@@ -1330,10 +1694,9 @@ type Commit = {
1330
1694
  message?: string;
1331
1695
  id: string;
1332
1696
  parentID?: string;
1697
+ checksum: string;
1333
1698
  mergeParentID?: string;
1334
- status: MigrationStatus;
1335
1699
  createdAt: DateTime;
1336
- modifiedAt?: DateTime;
1337
1700
  operations: MigrationOp[];
1338
1701
  };
1339
1702
  type SchemaEditScript = {
@@ -1341,6 +1704,16 @@ type SchemaEditScript = {
1341
1704
  targetMigrationID?: string;
1342
1705
  operations: MigrationOp[];
1343
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
+ };
1344
1717
  /**
1345
1718
  * Branch schema migration.
1346
1719
  */
@@ -1348,6 +1721,14 @@ type Migration = {
1348
1721
  parentID?: string;
1349
1722
  operations: MigrationOp[];
1350
1723
  };
1724
+ type MigrationObject = {
1725
+ title?: string;
1726
+ message?: string;
1727
+ id: string;
1728
+ parentID?: string;
1729
+ checksum: string;
1730
+ operations: MigrationOp[];
1731
+ };
1351
1732
  /**
1352
1733
  * @pattern [a-zA-Z0-9_\-~\.]+
1353
1734
  */
@@ -1381,8 +1762,14 @@ type TransactionInsertOp = {
1381
1762
  * conflict, the record is inserted. If there is a conflict, Xata will replace the record.
1382
1763
  */
1383
1764
  createOnly?: boolean;
1765
+ /**
1766
+ * If set, the call will return the requested fields as part of the response.
1767
+ */
1768
+ columns?: string[];
1384
1769
  };
1385
1770
  /**
1771
+ * @maxLength 255
1772
+ * @minLength 1
1386
1773
  * @pattern [a-zA-Z0-9_-~:]+
1387
1774
  */
1388
1775
  type RecordID = string;
@@ -1409,9 +1796,13 @@ type TransactionUpdateOp = {
1409
1796
  * Xata will insert this record if it cannot be found.
1410
1797
  */
1411
1798
  upsert?: boolean;
1799
+ /**
1800
+ * If set, the call will return the requested fields as part of the response.
1801
+ */
1802
+ columns?: string[];
1412
1803
  };
1413
1804
  /**
1414
- * 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.
1415
1806
  */
1416
1807
  type TransactionDeleteOp = {
1417
1808
  /**
@@ -1419,6 +1810,28 @@ type TransactionDeleteOp = {
1419
1810
  */
1420
1811
  table: string;
1421
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 = {
1826
+ /**
1827
+ * The table name
1828
+ */
1829
+ table: string;
1830
+ id: RecordID;
1831
+ /**
1832
+ * If set, the call will return the requested fields as part of the response.
1833
+ */
1834
+ columns?: string[];
1422
1835
  };
1423
1836
  /**
1424
1837
  * A transaction operation
@@ -1429,6 +1842,14 @@ type TransactionOperation$1 = {
1429
1842
  update: TransactionUpdateOp;
1430
1843
  } | {
1431
1844
  ['delete']: TransactionDeleteOp;
1845
+ } | {
1846
+ get: TransactionGetOp;
1847
+ };
1848
+ /**
1849
+ * Fields to return in the transaction result.
1850
+ */
1851
+ type TransactionResultColumns = {
1852
+ [key: string]: any;
1432
1853
  };
1433
1854
  /**
1434
1855
  * A result from an insert operation.
@@ -1443,6 +1864,7 @@ type TransactionResultInsert = {
1443
1864
  */
1444
1865
  rows: number;
1445
1866
  id: RecordID;
1867
+ columns?: TransactionResultColumns;
1446
1868
  };
1447
1869
  /**
1448
1870
  * A result from an update operation.
@@ -1457,6 +1879,7 @@ type TransactionResultUpdate = {
1457
1879
  */
1458
1880
  rows: number;
1459
1881
  id: RecordID;
1882
+ columns?: TransactionResultColumns;
1460
1883
  };
1461
1884
  /**
1462
1885
  * A result from a delete operation.
@@ -1470,12 +1893,23 @@ type TransactionResultDelete = {
1470
1893
  * The number of deleted rows
1471
1894
  */
1472
1895
  rows: number;
1896
+ columns?: TransactionResultColumns;
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;
1473
1907
  };
1474
1908
  /**
1475
1909
  * An ordered array of results from the submitted operations.
1476
1910
  */
1477
1911
  type TransactionSuccess = {
1478
- results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
1912
+ results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete | TransactionResultGet)[];
1479
1913
  };
1480
1914
  /**
1481
1915
  * An error message from a failing transaction operation
@@ -1491,7 +1925,7 @@ type TransactionError = {
1491
1925
  message: string;
1492
1926
  };
1493
1927
  /**
1494
- * An array of errors, with indicides, from the transaction.
1928
+ * An array of errors, with indices, from the transaction.
1495
1929
  */
1496
1930
  type TransactionFailure = {
1497
1931
  /**
@@ -1503,6 +1937,93 @@ type TransactionFailure = {
1503
1937
  */
1504
1938
  errors: TransactionError[];
1505
1939
  };
1940
+ /**
1941
+ * Object column value
1942
+ */
1943
+ type ObjectValue = {
1944
+ [key: string]: string | boolean | number | string[] | number[] | DateTime | ObjectValue;
1945
+ };
1946
+ /**
1947
+ * Unique file identifier
1948
+ *
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
1972
+ */
1973
+ type InputFileEntry = {
1974
+ id?: FileItemID;
1975
+ name?: FileName;
1976
+ mediaType?: MediaType;
1977
+ /**
1978
+ * Base64 encoded content
1979
+ *
1980
+ * @maxLength 20971520
1981
+ */
1982
+ base64Content?: string;
1983
+ /**
1984
+ * Enable public access to the file
1985
+ */
1986
+ enablePublicUrl?: boolean;
1987
+ /**
1988
+ * Time to live for signed URLs
1989
+ */
1990
+ signedUrlTimeout?: number;
1991
+ };
1992
+ /**
1993
+ * Array of file entries
1994
+ *
1995
+ * @maxItems 50
1996
+ */
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
+ };
2021
+ /**
2022
+ * Xata input record
2023
+ */
2024
+ type DataInputRecord = {
2025
+ [key: string]: RecordID | string | boolean | number | string[] | number[] | DateTime | ObjectValue | InputFileArray | InputFile | null;
2026
+ };
1506
2027
  /**
1507
2028
  * Xata Table Record Metadata
1508
2029
  */
@@ -1513,6 +2034,14 @@ type RecordMeta = {
1513
2034
  * The record's version. Can be used for optimistic concurrency control.
1514
2035
  */
1515
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;
1516
2045
  /**
1517
2046
  * The record's table name. APIs that return records from multiple tables will set this field accordingly.
1518
2047
  */
@@ -1535,6 +2064,47 @@ type RecordMeta = {
1535
2064
  warnings?: string[];
1536
2065
  };
1537
2066
  };
2067
+ /**
2068
+ * File metadata
2069
+ */
2070
+ type FileResponse = {
2071
+ id?: FileItemID;
2072
+ name: FileName;
2073
+ mediaType: MediaType;
2074
+ /**
2075
+ * @format int64
2076
+ */
2077
+ size: number;
2078
+ /**
2079
+ * @format int64
2080
+ */
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
+ };
1538
2108
  /**
1539
2109
  * The target expression is used to filter the search results by the target columns.
1540
2110
  */
@@ -1565,7 +2135,7 @@ type ValueBooster$1 = {
1565
2135
  */
1566
2136
  value: string | number | boolean;
1567
2137
  /**
1568
- * The factor with which to multiply the score of the record.
2138
+ * The factor with which to multiply the added boost.
1569
2139
  */
1570
2140
  factor: number;
1571
2141
  /**
@@ -1607,7 +2177,8 @@ type NumericBooster$1 = {
1607
2177
  /**
1608
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",
1609
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
1610
- * 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.
1611
2182
  */
1612
2183
  type DateBooster$1 = {
1613
2184
  /**
@@ -1620,7 +2191,7 @@ type DateBooster$1 = {
1620
2191
  */
1621
2192
  origin?: string;
1622
2193
  /**
1623
- * 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`.
1624
2195
  *
1625
2196
  * @pattern ^(\d+)(d|h|m|s|ms)$
1626
2197
  */
@@ -1629,6 +2200,12 @@ type DateBooster$1 = {
1629
2200
  * The decay factor to expect at "scale" distance from the "origin".
1630
2201
  */
1631
2202
  decay: number;
2203
+ /**
2204
+ * The factor with which to multiply the added boost.
2205
+ *
2206
+ * @minimum 0
2207
+ */
2208
+ factor?: number;
1632
2209
  /**
1633
2210
  * Only apply this booster to the records for which the provided filter matches.
1634
2211
  */
@@ -1649,7 +2226,7 @@ type BoosterExpression = {
1649
2226
  /**
1650
2227
  * Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
1651
2228
  * distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
1652
- * 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
1653
2230
  * to allow two typos in a word.
1654
2231
  *
1655
2232
  * @default 1
@@ -1796,7 +2373,7 @@ type UniqueCountAgg = {
1796
2373
  column: string;
1797
2374
  /**
1798
2375
  * The threshold under which the unique count is exact. If the number of unique
1799
- * 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.
1800
2377
  * Maximum value is 40,000, default value is 3000.
1801
2378
  */
1802
2379
  precisionThreshold?: number;
@@ -1819,7 +2396,7 @@ type DateHistogramAgg = {
1819
2396
  column: string;
1820
2397
  /**
1821
2398
  * The fixed interval to use when bucketing.
1822
- * It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
2399
+ * It is formatted as number + units, for example: `5d`, `20m`, `10s`.
1823
2400
  *
1824
2401
  * @pattern ^(\d+)(d|h|m|s|ms)$
1825
2402
  */
@@ -1874,7 +2451,7 @@ type NumericHistogramAgg = {
1874
2451
  interval: number;
1875
2452
  /**
1876
2453
  * By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
1877
- * 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,
1878
2455
  * but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
1879
2456
  * to 50.
1880
2457
  *
@@ -1917,6 +2494,24 @@ type AggResponse$1 = (number | null) | {
1917
2494
  [key: string]: AggResponse$1;
1918
2495
  })[];
1919
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
+ };
1920
2515
  /**
1921
2516
  * Xata Table Record Metadata
1922
2517
  */
@@ -1962,12 +2557,19 @@ type SchemaCompareResponse = {
1962
2557
  target: Schema;
1963
2558
  edits: SchemaEditScript;
1964
2559
  };
2560
+ type RateLimitError = {
2561
+ id?: string;
2562
+ message: string;
2563
+ };
1965
2564
  type RecordUpdateResponse = XataRecord$1 | {
1966
2565
  id: string;
1967
2566
  xata: {
1968
2567
  version: number;
2568
+ createdAt: string;
2569
+ updatedAt: string;
1969
2570
  };
1970
2571
  };
2572
+ type PutFileResponse = FileResponse;
1971
2573
  type RecordResponse = XataRecord$1;
1972
2574
  type BulkInsertResponse = {
1973
2575
  recordIDs: string[];
@@ -1984,9 +2586,17 @@ type QueryResponse = {
1984
2586
  records: XataRecord$1[];
1985
2587
  meta: RecordsMetadata;
1986
2588
  };
2589
+ type ServiceUnavailableError = {
2590
+ id?: string;
2591
+ message: string;
2592
+ };
1987
2593
  type SearchResponse = {
1988
2594
  records: XataRecord$1[];
1989
2595
  warning?: string;
2596
+ /**
2597
+ * The total count of records matched. It will be accurately returned up to 10000 records.
2598
+ */
2599
+ totalCount: number;
1990
2600
  };
1991
2601
  type SummarizeResponse = {
1992
2602
  summaries: Record<string, any>[];
@@ -1999,17 +2609,24 @@ type AggResponse = {
1999
2609
  [key: string]: AggResponse$1;
2000
2610
  };
2001
2611
  };
2612
+ type SQLResponse = {
2613
+ records?: SQLRecord[];
2614
+ warning?: string;
2615
+ };
2002
2616
 
2003
2617
  type DataPlaneFetcherExtraProps = {
2004
2618
  apiUrl: string;
2005
2619
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
2006
- fetchImpl: FetchImpl;
2620
+ fetch: FetchImpl;
2007
2621
  apiKey: string;
2008
2622
  trace: TraceFunction;
2009
2623
  signal?: AbortSignal;
2010
2624
  clientID?: string;
2011
2625
  sessionID?: string;
2012
2626
  clientName?: string;
2627
+ xataAgentExtra?: Record<string, string>;
2628
+ rawResponse?: boolean;
2629
+ headers?: Record<string, unknown>;
2013
2630
  };
2014
2631
  type ErrorWrapper<TError> = TError | {
2015
2632
  status: 'unknown';
@@ -2148,6 +2765,36 @@ type DeleteBranchVariables = {
2148
2765
  * Delete the branch in the database and all its resources
2149
2766
  */
2150
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>;
2151
2798
  type UpdateBranchMetadataPathParams = {
2152
2799
  /**
2153
2800
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -2792,7 +3439,7 @@ type MergeMigrationRequestError = ErrorWrapper<{
2792
3439
  type MergeMigrationRequestVariables = {
2793
3440
  pathParams: MergeMigrationRequestPathParams;
2794
3441
  } & DataPlaneFetcherExtraProps;
2795
- declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<Commit>;
3442
+ declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<BranchOp>;
2796
3443
  type GetBranchSchemaHistoryPathParams = {
2797
3444
  /**
2798
3445
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -2841,6 +3488,10 @@ type GetBranchSchemaHistoryRequestBody = {
2841
3488
  */
2842
3489
  size?: number;
2843
3490
  };
3491
+ /**
3492
+ * Report only migrations that have been added since the given Migration ID.
3493
+ */
3494
+ since?: string;
2844
3495
  };
2845
3496
  type GetBranchSchemaHistoryVariables = {
2846
3497
  body?: GetBranchSchemaHistoryRequestBody;
@@ -2867,6 +3518,8 @@ type CompareBranchWithUserSchemaError = ErrorWrapper<{
2867
3518
  }>;
2868
3519
  type CompareBranchWithUserSchemaRequestBody = {
2869
3520
  schema: Schema;
3521
+ schemaOperations?: MigrationOp[];
3522
+ branchOperations?: MigrationOp[];
2870
3523
  };
2871
3524
  type CompareBranchWithUserSchemaVariables = {
2872
3525
  body: CompareBranchWithUserSchemaRequestBody;
@@ -2895,8 +3548,12 @@ type CompareBranchSchemasError = ErrorWrapper<{
2895
3548
  status: 404;
2896
3549
  payload: SimpleError;
2897
3550
  }>;
3551
+ type CompareBranchSchemasRequestBody = {
3552
+ sourceBranchOperations?: MigrationOp[];
3553
+ targetBranchOperations?: MigrationOp[];
3554
+ };
2898
3555
  type CompareBranchSchemasVariables = {
2899
- body?: Record<string, any>;
3556
+ body: CompareBranchSchemasRequestBody;
2900
3557
  pathParams: CompareBranchSchemasPathParams;
2901
3558
  } & DataPlaneFetcherExtraProps;
2902
3559
  declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
@@ -2979,6 +3636,44 @@ type ApplyBranchSchemaEditVariables = {
2979
3636
  pathParams: ApplyBranchSchemaEditPathParams;
2980
3637
  } & DataPlaneFetcherExtraProps;
2981
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>;
2982
3677
  type CreateTablePathParams = {
2983
3678
  /**
2984
3679
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3219,9 +3914,7 @@ type AddTableColumnVariables = {
3219
3914
  pathParams: AddTableColumnPathParams;
3220
3915
  } & DataPlaneFetcherExtraProps;
3221
3916
  /**
3222
- * 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
3223
- * contain the full path separated by dots. If the parent objects do not exists, they will be automatically created. For example,
3224
- * 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.
3225
3918
  */
3226
3919
  declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3227
3920
  type GetColumnPathParams = {
@@ -3254,7 +3947,7 @@ type GetColumnVariables = {
3254
3947
  pathParams: GetColumnPathParams;
3255
3948
  } & DataPlaneFetcherExtraProps;
3256
3949
  /**
3257
- * 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.
3258
3951
  */
3259
3952
  declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
3260
3953
  type UpdateColumnPathParams = {
@@ -3294,7 +3987,7 @@ type UpdateColumnVariables = {
3294
3987
  pathParams: UpdateColumnPathParams;
3295
3988
  } & DataPlaneFetcherExtraProps;
3296
3989
  /**
3297
- * 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.
3298
3991
  */
3299
3992
  declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3300
3993
  type DeleteColumnPathParams = {
@@ -3327,36 +4020,281 @@ type DeleteColumnVariables = {
3327
4020
  pathParams: DeleteColumnPathParams;
3328
4021
  } & DataPlaneFetcherExtraProps;
3329
4022
  /**
3330
- * Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
4023
+ * Deletes the specified column.
3331
4024
  */
3332
4025
  declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3333
4026
  type BranchTransactionPathParams = {
3334
4027
  /**
3335
4028
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3336
4029
  */
3337
- dbBranchName: DBBranchName;
4030
+ dbBranchName: DBBranchName;
4031
+ workspace: string;
4032
+ region: string;
4033
+ };
4034
+ type BranchTransactionError = ErrorWrapper<{
4035
+ status: 400;
4036
+ payload: TransactionFailure;
4037
+ } | {
4038
+ status: 401;
4039
+ payload: AuthError;
4040
+ } | {
4041
+ status: 404;
4042
+ payload: SimpleError;
4043
+ } | {
4044
+ status: 429;
4045
+ payload: RateLimitError;
4046
+ }>;
4047
+ type BranchTransactionRequestBody = {
4048
+ operations: TransactionOperation$1[];
4049
+ };
4050
+ type BranchTransactionVariables = {
4051
+ body: BranchTransactionRequestBody;
4052
+ pathParams: BranchTransactionPathParams;
4053
+ } & DataPlaneFetcherExtraProps;
4054
+ declare const branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
4055
+ type InsertRecordPathParams = {
4056
+ /**
4057
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4058
+ */
4059
+ dbBranchName: DBBranchName;
4060
+ /**
4061
+ * The Table name
4062
+ */
4063
+ tableName: TableName;
4064
+ workspace: string;
4065
+ region: string;
4066
+ };
4067
+ type InsertRecordQueryParams = {
4068
+ /**
4069
+ * Column filters
4070
+ */
4071
+ columns?: ColumnsProjection;
4072
+ };
4073
+ type InsertRecordError = ErrorWrapper<{
4074
+ status: 400;
4075
+ payload: BadRequestError;
4076
+ } | {
4077
+ status: 401;
4078
+ payload: AuthError;
4079
+ } | {
4080
+ status: 404;
4081
+ payload: SimpleError;
4082
+ }>;
4083
+ type InsertRecordVariables = {
4084
+ body?: DataInputRecord;
4085
+ pathParams: InsertRecordPathParams;
4086
+ queryParams?: InsertRecordQueryParams;
4087
+ } & DataPlaneFetcherExtraProps;
4088
+ /**
4089
+ * Insert a new Record into the Table
4090
+ */
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;
3338
4273
  workspace: string;
3339
4274
  region: string;
3340
4275
  };
3341
- type BranchTransactionError = ErrorWrapper<{
4276
+ type PutFileError = ErrorWrapper<{
3342
4277
  status: 400;
3343
- payload: TransactionFailure;
4278
+ payload: BadRequestError;
3344
4279
  } | {
3345
4280
  status: 401;
3346
4281
  payload: AuthError;
3347
4282
  } | {
3348
4283
  status: 404;
3349
4284
  payload: SimpleError;
4285
+ } | {
4286
+ status: 422;
4287
+ payload: SimpleError;
3350
4288
  }>;
3351
- type BranchTransactionRequestBody = {
3352
- operations: TransactionOperation$1[];
3353
- };
3354
- type BranchTransactionVariables = {
3355
- body: BranchTransactionRequestBody;
3356
- pathParams: BranchTransactionPathParams;
4289
+ type PutFileVariables = {
4290
+ body?: Blob;
4291
+ pathParams: PutFilePathParams;
3357
4292
  } & DataPlaneFetcherExtraProps;
3358
- declare const branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
3359
- type InsertRecordPathParams = {
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 = {
3360
4298
  /**
3361
4299
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3362
4300
  */
@@ -3365,16 +4303,18 @@ type InsertRecordPathParams = {
3365
4303
  * The Table name
3366
4304
  */
3367
4305
  tableName: TableName;
3368
- workspace: string;
3369
- region: string;
3370
- };
3371
- type InsertRecordQueryParams = {
3372
4306
  /**
3373
- * Column filters
4307
+ * The Record name
3374
4308
  */
3375
- columns?: ColumnsProjection;
4309
+ recordId: RecordID;
4310
+ /**
4311
+ * The Column name
4312
+ */
4313
+ columnName: ColumnName;
4314
+ workspace: string;
4315
+ region: string;
3376
4316
  };
3377
- type InsertRecordError = ErrorWrapper<{
4317
+ type DeleteFileError = ErrorWrapper<{
3378
4318
  status: 400;
3379
4319
  payload: BadRequestError;
3380
4320
  } | {
@@ -3384,15 +4324,13 @@ type InsertRecordError = ErrorWrapper<{
3384
4324
  status: 404;
3385
4325
  payload: SimpleError;
3386
4326
  }>;
3387
- type InsertRecordVariables = {
3388
- body?: Record<string, any>;
3389
- pathParams: InsertRecordPathParams;
3390
- queryParams?: InsertRecordQueryParams;
4327
+ type DeleteFileVariables = {
4328
+ pathParams: DeleteFilePathParams;
3391
4329
  } & DataPlaneFetcherExtraProps;
3392
4330
  /**
3393
- * Insert a new Record into the Table
4331
+ * Deletes a file referred in a file column
3394
4332
  */
3395
- declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
4333
+ declare const deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal) => Promise<FileResponse>;
3396
4334
  type GetRecordPathParams = {
3397
4335
  /**
3398
4336
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3471,7 +4409,7 @@ type InsertRecordWithIDError = ErrorWrapper<{
3471
4409
  payload: SimpleError;
3472
4410
  }>;
3473
4411
  type InsertRecordWithIDVariables = {
3474
- body?: Record<string, any>;
4412
+ body?: DataInputRecord;
3475
4413
  pathParams: InsertRecordWithIDPathParams;
3476
4414
  queryParams?: InsertRecordWithIDQueryParams;
3477
4415
  } & DataPlaneFetcherExtraProps;
@@ -3516,7 +4454,7 @@ type UpdateRecordWithIDError = ErrorWrapper<{
3516
4454
  payload: SimpleError;
3517
4455
  }>;
3518
4456
  type UpdateRecordWithIDVariables = {
3519
- body?: Record<string, any>;
4457
+ body?: DataInputRecord;
3520
4458
  pathParams: UpdateRecordWithIDPathParams;
3521
4459
  queryParams?: UpdateRecordWithIDQueryParams;
3522
4460
  } & DataPlaneFetcherExtraProps;
@@ -3558,7 +4496,7 @@ type UpsertRecordWithIDError = ErrorWrapper<{
3558
4496
  payload: SimpleError;
3559
4497
  }>;
3560
4498
  type UpsertRecordWithIDVariables = {
3561
- body?: Record<string, any>;
4499
+ body?: DataInputRecord;
3562
4500
  pathParams: UpsertRecordWithIDPathParams;
3563
4501
  queryParams?: UpsertRecordWithIDQueryParams;
3564
4502
  } & DataPlaneFetcherExtraProps;
@@ -3632,7 +4570,7 @@ type BulkInsertTableRecordsError = ErrorWrapper<{
3632
4570
  payload: SimpleError;
3633
4571
  }>;
3634
4572
  type BulkInsertTableRecordsRequestBody = {
3635
- records: Record<string, any>[];
4573
+ records: DataInputRecord[];
3636
4574
  };
3637
4575
  type BulkInsertTableRecordsVariables = {
3638
4576
  body: BulkInsertTableRecordsRequestBody;
@@ -3664,12 +4602,15 @@ type QueryTableError = ErrorWrapper<{
3664
4602
  } | {
3665
4603
  status: 404;
3666
4604
  payload: SimpleError;
4605
+ } | {
4606
+ status: 503;
4607
+ payload: ServiceUnavailableError;
3667
4608
  }>;
3668
4609
  type QueryTableRequestBody = {
3669
4610
  filter?: FilterExpression;
3670
4611
  sort?: SortExpression;
3671
4612
  page?: PageConfig;
3672
- columns?: ColumnsProjection;
4613
+ columns?: QueryColumnsProjection;
3673
4614
  /**
3674
4615
  * The consistency level for this request.
3675
4616
  *
@@ -4333,25 +5274,40 @@ type QueryTableVariables = {
4333
5274
  * }
4334
5275
  * ```
4335
5276
  *
4336
- * ### 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
+ * ```
4337
5287
  *
4338
- * We offer cursor pagination and offset pagination. For queries that are expected to return more than 1000 records,
4339
- * 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 `"*"`.
4340
5289
  *
4341
- * Example of size + offset pagination:
5290
+ * A random sort can be combined with an ascending or descending sort on a specific column:
4342
5291
  *
4343
5292
  * ```json
4344
5293
  * POST /db/demo:main/tables/table/query
4345
5294
  * {
4346
- * "page": {
4347
- * "size": 100,
4348
- * "offset": 200
4349
- * }
5295
+ * "sort": [
5296
+ * {
5297
+ * "name": "desc"
5298
+ * },
5299
+ * {
5300
+ * "*": "random"
5301
+ * }
5302
+ * ]
4350
5303
  * }
4351
5304
  * ```
4352
5305
  *
4353
- * 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.
4354
- * 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.
4355
5311
  *
4356
5312
  * Example of cursor pagination:
4357
5313
  *
@@ -4405,18 +5361,46 @@ type QueryTableVariables = {
4405
5361
  * `filter` or `sort` is set. The columns returned and page size can be changed
4406
5362
  * anytime by passing the `columns` or `page.size` settings to the next query.
4407
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
+ *
4408
5392
  * **Special cursors:**
4409
5393
  *
4410
5394
  * - `page.after=end`: Result points past the last entry. The list of records
4411
5395
  * returned is empty, but `page.meta.cursor` will include a cursor that can be
4412
5396
  * used to "tail" the table from the end waiting for new data to be inserted.
4413
5397
  * - `page.before=end`: This cursor returns the last page.
4414
- * - `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
4415
5399
  * first page without a cursor but applying `filter` and `sort` . Yet the `page.start`
4416
5400
  * cursor can be convenient at times as user code does not need to remember the
4417
5401
  * filter, sort, columns or page size configuration. All these information are
4418
5402
  * read from the cursor.
4419
- * - `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
4420
5404
  * last page with `page.before=end`, `filter`, and `sort` . Yet the
4421
5405
  * `page.end` cursor can be more convenient at times as user code does not
4422
5406
  * need to remember the filter, sort, columns or page size configuration. All
@@ -4455,6 +5439,9 @@ type SearchBranchError = ErrorWrapper<{
4455
5439
  } | {
4456
5440
  status: 404;
4457
5441
  payload: SimpleError;
5442
+ } | {
5443
+ status: 503;
5444
+ payload: ServiceUnavailableError;
4458
5445
  }>;
4459
5446
  type SearchBranchRequestBody = {
4460
5447
  /**
@@ -4537,6 +5524,209 @@ type SearchTableVariables = {
4537
5524
  * * filtering on columns of type `multiple` is currently unsupported
4538
5525
  */
4539
5526
  declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
5527
+ type VectorSearchTablePathParams = {
5528
+ /**
5529
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
5530
+ */
5531
+ dbBranchName: DBBranchName;
5532
+ /**
5533
+ * The Table name
5534
+ */
5535
+ tableName: TableName;
5536
+ workspace: string;
5537
+ region: string;
5538
+ };
5539
+ type VectorSearchTableError = ErrorWrapper<{
5540
+ status: 400;
5541
+ payload: BadRequestError;
5542
+ } | {
5543
+ status: 401;
5544
+ payload: AuthError;
5545
+ } | {
5546
+ status: 404;
5547
+ payload: SimpleError;
5548
+ }>;
5549
+ type VectorSearchTableRequestBody = {
5550
+ /**
5551
+ * The vector to search for similarities. Must have the same dimension as
5552
+ * the vector column used.
5553
+ */
5554
+ queryVector: number[];
5555
+ /**
5556
+ * The vector column in which to search. It must be of type `vector`.
5557
+ */
5558
+ column: string;
5559
+ /**
5560
+ * The function used to measure the distance between two points. Can be one of:
5561
+ * `cosineSimilarity`, `l1`, `l2`. The default is `cosineSimilarity`.
5562
+ *
5563
+ * @default cosineSimilarity
5564
+ */
5565
+ similarityFunction?: string;
5566
+ /**
5567
+ * Number of results to return.
5568
+ *
5569
+ * @default 10
5570
+ * @maximum 100
5571
+ * @minimum 1
5572
+ */
5573
+ size?: number;
5574
+ filter?: FilterExpression;
5575
+ };
5576
+ type VectorSearchTableVariables = {
5577
+ body: VectorSearchTableRequestBody;
5578
+ pathParams: VectorSearchTablePathParams;
5579
+ } & DataPlaneFetcherExtraProps;
5580
+ /**
5581
+ * This endpoint can be used to perform vector-based similarity searches in a table.
5582
+ * It can be used for implementing semantic search and product recommendation. To use this
5583
+ * endpoint, you need a column of type vector. The input vector must have the same
5584
+ * dimension as the vector column.
5585
+ */
5586
+ declare const vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
5587
+ type AskTablePathParams = {
5588
+ /**
5589
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
5590
+ */
5591
+ dbBranchName: DBBranchName;
5592
+ /**
5593
+ * The Table name
5594
+ */
5595
+ tableName: TableName;
5596
+ workspace: string;
5597
+ region: string;
5598
+ };
5599
+ type AskTableError = ErrorWrapper<{
5600
+ status: 400;
5601
+ payload: BadRequestError;
5602
+ } | {
5603
+ status: 401;
5604
+ payload: AuthError;
5605
+ } | {
5606
+ status: 404;
5607
+ payload: SimpleError;
5608
+ } | {
5609
+ status: 429;
5610
+ payload: RateLimitError;
5611
+ }>;
5612
+ type AskTableResponse = {
5613
+ /**
5614
+ * The answer to the input question
5615
+ */
5616
+ answer: string;
5617
+ /**
5618
+ * The session ID for the chat session.
5619
+ */
5620
+ sessionId: string;
5621
+ };
5622
+ type AskTableRequestBody = {
5623
+ /**
5624
+ * The question you'd like to ask.
5625
+ *
5626
+ * @minLength 3
5627
+ */
5628
+ question: string;
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
+ };
5665
+ rules?: string[];
5666
+ };
5667
+ type AskTableVariables = {
5668
+ body: AskTableRequestBody;
5669
+ pathParams: AskTablePathParams;
5670
+ } & DataPlaneFetcherExtraProps;
5671
+ /**
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.
5673
+ */
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>;
4540
5730
  type SummarizeTablePathParams = {
4541
5731
  /**
4542
5732
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -4683,7 +5873,7 @@ type AggregateTableVariables = {
4683
5873
  pathParams: AggregateTablePathParams;
4684
5874
  } & DataPlaneFetcherExtraProps;
4685
5875
  /**
4686
- * This endpoint allows you to run aggragations (analytics) on the data from one table.
5876
+ * This endpoint allows you to run aggregations (analytics) on the data from one table.
4687
5877
  * While the summary endpoint is served from a transactional store and the results are strongly
4688
5878
  * consistent, the aggregate endpoint is served from our columnar store and the results are
4689
5879
  * only eventually consistent. On the other hand, the aggregate endpoint uses a
@@ -4692,7 +5882,86 @@ type AggregateTableVariables = {
4692
5882
  *
4693
5883
  * For usage, see the [API Guide](https://xata.io/docs/api-guide/aggregate).
4694
5884
  */
4695
- declare const aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
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<{
5927
+ status: 400;
5928
+ payload: BadRequestError;
5929
+ } | {
5930
+ status: 401;
5931
+ payload: AuthError;
5932
+ } | {
5933
+ status: 404;
5934
+ payload: SimpleError;
5935
+ } | {
5936
+ status: 503;
5937
+ payload: ServiceUnavailableError;
5938
+ }>;
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';
5956
+ };
5957
+ type SqlQueryVariables = {
5958
+ body: SqlQueryRequestBody;
5959
+ pathParams: SqlQueryPathParams;
5960
+ } & DataPlaneFetcherExtraProps;
5961
+ /**
5962
+ * Run an SQL query across the database branch.
5963
+ */
5964
+ declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<SQLResponse>;
4696
5965
 
4697
5966
  declare const operationsByTag: {
4698
5967
  branch: {
@@ -4700,6 +5969,7 @@ declare const operationsByTag: {
4700
5969
  getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal | undefined) => Promise<DBBranch>;
4701
5970
  createBranch: (variables: CreateBranchVariables, signal?: AbortSignal | undefined) => Promise<CreateBranchResponse>;
4702
5971
  deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal | undefined) => Promise<DeleteBranchResponse>;
5972
+ copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal | undefined) => Promise<BranchWithCopyID>;
4703
5973
  updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
4704
5974
  getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<BranchMetadata>;
4705
5975
  getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal | undefined) => Promise<GetBranchStatsResponse>;
@@ -4708,16 +5978,6 @@ declare const operationsByTag: {
4708
5978
  removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
4709
5979
  resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal | undefined) => Promise<ResolveBranchResponse>;
4710
5980
  };
4711
- records: {
4712
- branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
4713
- insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
4714
- getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
4715
- insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
4716
- updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
4717
- upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
4718
- deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
4719
- bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
4720
- };
4721
5981
  migrations: {
4722
5982
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchMigrationHistoryResponse>;
4723
5983
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<BranchMigrationPlan>;
@@ -4728,6 +5988,17 @@ declare const operationsByTag: {
4728
5988
  updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
4729
5989
  previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<PreviewBranchSchemaEditResponse>;
4730
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>;
4731
6002
  };
4732
6003
  migrationRequests: {
4733
6004
  queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal | undefined) => Promise<QueryMigrationRequestsResponse>;
@@ -4737,7 +6008,7 @@ declare const operationsByTag: {
4737
6008
  listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal | undefined) => Promise<ListMigrationRequestsCommitsResponse>;
4738
6009
  compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<SchemaCompareResponse>;
4739
6010
  getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal | undefined) => Promise<GetMigrationRequestIsMergedResponse>;
4740
- mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<Commit>;
6011
+ mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<BranchOp>;
4741
6012
  };
4742
6013
  table: {
4743
6014
  createTable: (variables: CreateTableVariables, signal?: AbortSignal | undefined) => Promise<CreateTableResponse>;
@@ -4751,13 +6022,37 @@ declare const operationsByTag: {
4751
6022
  updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
4752
6023
  deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
4753
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
+ };
4754
6034
  searchAndFilter: {
4755
6035
  queryTable: (variables: QueryTableVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
4756
6036
  searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
4757
6037
  searchTable: (variables: SearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
6038
+ vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
6039
+ askTable: (variables: AskTableVariables, signal?: AbortSignal | undefined) => Promise<AskTableResponse>;
6040
+ askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal | undefined) => Promise<AskTableSessionResponse>;
4758
6041
  summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal | undefined) => Promise<SummarizeResponse>;
4759
6042
  aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal | undefined) => Promise<AggResponse>;
4760
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
+ };
4761
6056
  users: {
4762
6057
  getUser: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<UserWithID>;
4763
6058
  updateUser: (variables: UpdateUserVariables, signal?: AbortSignal | undefined) => Promise<UserWithID>;
@@ -4791,11 +6086,15 @@ declare const operationsByTag: {
4791
6086
  deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DeleteDatabaseResponse>;
4792
6087
  getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
4793
6088
  updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
6089
+ renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
6090
+ getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
6091
+ updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
6092
+ deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
4794
6093
  listRegions: (variables: ListRegionsVariables, signal?: AbortSignal | undefined) => Promise<ListRegionsResponse>;
4795
6094
  };
4796
6095
  };
4797
6096
 
4798
- type HostAliases = 'production' | 'staging';
6097
+ type HostAliases = 'production' | 'staging' | 'dev';
4799
6098
  type ProviderBuilder = {
4800
6099
  main: string;
4801
6100
  workspaces: string;
@@ -4805,6 +6104,7 @@ declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder)
4805
6104
  declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
4806
6105
  declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
4807
6106
  declare function parseProviderString(provider?: string): HostProvider | null;
6107
+ declare function buildProviderString(provider: HostProvider): string;
4808
6108
  declare function parseWorkspacesUrlParts(url: string): {
4809
6109
  workspace: string;
4810
6110
  region: string;
@@ -4816,58 +6116,61 @@ type responses_BadRequestError = BadRequestError;
4816
6116
  type responses_BranchMigrationPlan = BranchMigrationPlan;
4817
6117
  type responses_BulkError = BulkError;
4818
6118
  type responses_BulkInsertResponse = BulkInsertResponse;
6119
+ type responses_PutFileResponse = PutFileResponse;
4819
6120
  type responses_QueryResponse = QueryResponse;
6121
+ type responses_RateLimitError = RateLimitError;
4820
6122
  type responses_RecordResponse = RecordResponse;
4821
6123
  type responses_RecordUpdateResponse = RecordUpdateResponse;
6124
+ type responses_SQLResponse = SQLResponse;
4822
6125
  type responses_SchemaCompareResponse = SchemaCompareResponse;
4823
6126
  type responses_SchemaUpdateResponse = SchemaUpdateResponse;
4824
6127
  type responses_SearchResponse = SearchResponse;
6128
+ type responses_ServiceUnavailableError = ServiceUnavailableError;
4825
6129
  type responses_SimpleError = SimpleError;
4826
6130
  type responses_SummarizeResponse = SummarizeResponse;
4827
6131
  declare namespace responses {
4828
- export {
4829
- responses_AggResponse as AggResponse,
4830
- responses_AuthError as AuthError,
4831
- responses_BadRequestError as BadRequestError,
4832
- responses_BranchMigrationPlan as BranchMigrationPlan,
4833
- responses_BulkError as BulkError,
4834
- responses_BulkInsertResponse as BulkInsertResponse,
4835
- responses_QueryResponse as QueryResponse,
4836
- responses_RecordResponse as RecordResponse,
4837
- responses_RecordUpdateResponse as RecordUpdateResponse,
4838
- responses_SchemaCompareResponse as SchemaCompareResponse,
4839
- responses_SchemaUpdateResponse as SchemaUpdateResponse,
4840
- responses_SearchResponse as SearchResponse,
4841
- responses_SimpleError as SimpleError,
4842
- responses_SummarizeResponse as SummarizeResponse,
4843
- };
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 };
4844
6133
  }
4845
6134
 
4846
6135
  type schemas_APIKeyName = APIKeyName;
6136
+ type schemas_AccessToken = AccessToken;
4847
6137
  type schemas_AggExpression = AggExpression;
4848
6138
  type schemas_AggExpressionMap = AggExpressionMap;
6139
+ type schemas_AuthorizationCodeRequest = AuthorizationCodeRequest;
6140
+ type schemas_AuthorizationCodeResponse = AuthorizationCodeResponse;
4849
6141
  type schemas_AverageAgg = AverageAgg;
4850
6142
  type schemas_BoosterExpression = BoosterExpression;
4851
6143
  type schemas_Branch = Branch;
4852
6144
  type schemas_BranchMetadata = BranchMetadata;
4853
6145
  type schemas_BranchMigration = BranchMigration;
4854
6146
  type schemas_BranchName = BranchName;
6147
+ type schemas_BranchOp = BranchOp;
6148
+ type schemas_BranchWithCopyID = BranchWithCopyID;
4855
6149
  type schemas_Column = Column;
6150
+ type schemas_ColumnFile = ColumnFile;
4856
6151
  type schemas_ColumnLink = ColumnLink;
4857
6152
  type schemas_ColumnMigration = ColumnMigration;
4858
6153
  type schemas_ColumnName = ColumnName;
4859
6154
  type schemas_ColumnOpAdd = ColumnOpAdd;
4860
6155
  type schemas_ColumnOpRemove = ColumnOpRemove;
4861
6156
  type schemas_ColumnOpRename = ColumnOpRename;
6157
+ type schemas_ColumnVector = ColumnVector;
4862
6158
  type schemas_ColumnsProjection = ColumnsProjection;
4863
6159
  type schemas_Commit = Commit;
4864
6160
  type schemas_CountAgg = CountAgg;
4865
6161
  type schemas_DBBranch = DBBranch;
4866
6162
  type schemas_DBBranchName = DBBranchName;
4867
6163
  type schemas_DBName = DBName;
6164
+ type schemas_DataInputRecord = DataInputRecord;
6165
+ type schemas_DatabaseGithubSettings = DatabaseGithubSettings;
4868
6166
  type schemas_DatabaseMetadata = DatabaseMetadata;
4869
6167
  type schemas_DateHistogramAgg = DateHistogramAgg;
4870
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;
4871
6174
  type schemas_FilterColumn = FilterColumn;
4872
6175
  type schemas_FilterColumnIncludes = FilterColumnIncludes;
4873
6176
  type schemas_FilterExpression = FilterExpression;
@@ -4879,6 +6182,9 @@ type schemas_FilterRangeValue = FilterRangeValue;
4879
6182
  type schemas_FilterValue = FilterValue;
4880
6183
  type schemas_FuzzinessExpression = FuzzinessExpression;
4881
6184
  type schemas_HighlightExpression = HighlightExpression;
6185
+ type schemas_InputFile = InputFile;
6186
+ type schemas_InputFileArray = InputFileArray;
6187
+ type schemas_InputFileEntry = InputFileEntry;
4882
6188
  type schemas_InviteID = InviteID;
4883
6189
  type schemas_InviteKey = InviteKey;
4884
6190
  type schemas_ListBranchesResponse = ListBranchesResponse;
@@ -4886,10 +6192,12 @@ type schemas_ListDatabasesResponse = ListDatabasesResponse;
4886
6192
  type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
4887
6193
  type schemas_ListRegionsResponse = ListRegionsResponse;
4888
6194
  type schemas_MaxAgg = MaxAgg;
6195
+ type schemas_MediaType = MediaType;
4889
6196
  type schemas_MetricsDatapoint = MetricsDatapoint;
4890
6197
  type schemas_MetricsLatency = MetricsLatency;
4891
6198
  type schemas_Migration = Migration;
4892
6199
  type schemas_MigrationColumnOp = MigrationColumnOp;
6200
+ type schemas_MigrationObject = MigrationObject;
4893
6201
  type schemas_MigrationOp = MigrationOp;
4894
6202
  type schemas_MigrationRequest = MigrationRequest;
4895
6203
  type schemas_MigrationRequestNumber = MigrationRequestNumber;
@@ -4897,14 +6205,23 @@ type schemas_MigrationStatus = MigrationStatus;
4897
6205
  type schemas_MigrationTableOp = MigrationTableOp;
4898
6206
  type schemas_MinAgg = MinAgg;
4899
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;
6213
+ type schemas_ObjectValue = ObjectValue;
4900
6214
  type schemas_PageConfig = PageConfig;
4901
6215
  type schemas_PrefixExpression = PrefixExpression;
6216
+ type schemas_ProjectionConfig = ProjectionConfig;
6217
+ type schemas_QueryColumnsProjection = QueryColumnsProjection;
4902
6218
  type schemas_RecordID = RecordID;
4903
6219
  type schemas_RecordMeta = RecordMeta;
4904
6220
  type schemas_RecordsMetadata = RecordsMetadata;
4905
6221
  type schemas_Region = Region;
4906
6222
  type schemas_RevLink = RevLink;
4907
6223
  type schemas_Role = Role;
6224
+ type schemas_SQLRecord = SQLRecord;
4908
6225
  type schemas_Schema = Schema;
4909
6226
  type schemas_SchemaEditScript = SchemaEditScript;
4910
6227
  type schemas_SearchPageConfig = SearchPageConfig;
@@ -4926,8 +6243,11 @@ type schemas_TopValuesAgg = TopValuesAgg;
4926
6243
  type schemas_TransactionDeleteOp = TransactionDeleteOp;
4927
6244
  type schemas_TransactionError = TransactionError;
4928
6245
  type schemas_TransactionFailure = TransactionFailure;
6246
+ type schemas_TransactionGetOp = TransactionGetOp;
4929
6247
  type schemas_TransactionInsertOp = TransactionInsertOp;
6248
+ type schemas_TransactionResultColumns = TransactionResultColumns;
4930
6249
  type schemas_TransactionResultDelete = TransactionResultDelete;
6250
+ type schemas_TransactionResultGet = TransactionResultGet;
4931
6251
  type schemas_TransactionResultInsert = TransactionResultInsert;
4932
6252
  type schemas_TransactionResultUpdate = TransactionResultUpdate;
4933
6253
  type schemas_TransactionSuccess = TransactionSuccess;
@@ -4943,113 +6263,7 @@ type schemas_WorkspaceMember = WorkspaceMember;
4943
6263
  type schemas_WorkspaceMembers = WorkspaceMembers;
4944
6264
  type schemas_WorkspaceMeta = WorkspaceMeta;
4945
6265
  declare namespace schemas {
4946
- export {
4947
- schemas_APIKeyName as APIKeyName,
4948
- schemas_AggExpression as AggExpression,
4949
- schemas_AggExpressionMap as AggExpressionMap,
4950
- AggResponse$1 as AggResponse,
4951
- schemas_AverageAgg as AverageAgg,
4952
- schemas_BoosterExpression as BoosterExpression,
4953
- schemas_Branch as Branch,
4954
- schemas_BranchMetadata as BranchMetadata,
4955
- schemas_BranchMigration as BranchMigration,
4956
- schemas_BranchName as BranchName,
4957
- schemas_Column as Column,
4958
- schemas_ColumnLink as ColumnLink,
4959
- schemas_ColumnMigration as ColumnMigration,
4960
- schemas_ColumnName as ColumnName,
4961
- schemas_ColumnOpAdd as ColumnOpAdd,
4962
- schemas_ColumnOpRemove as ColumnOpRemove,
4963
- schemas_ColumnOpRename as ColumnOpRename,
4964
- schemas_ColumnsProjection as ColumnsProjection,
4965
- schemas_Commit as Commit,
4966
- schemas_CountAgg as CountAgg,
4967
- schemas_DBBranch as DBBranch,
4968
- schemas_DBBranchName as DBBranchName,
4969
- schemas_DBName as DBName,
4970
- schemas_DatabaseMetadata as DatabaseMetadata,
4971
- DateBooster$1 as DateBooster,
4972
- schemas_DateHistogramAgg as DateHistogramAgg,
4973
- schemas_DateTime as DateTime,
4974
- schemas_FilterColumn as FilterColumn,
4975
- schemas_FilterColumnIncludes as FilterColumnIncludes,
4976
- schemas_FilterExpression as FilterExpression,
4977
- schemas_FilterList as FilterList,
4978
- schemas_FilterPredicate as FilterPredicate,
4979
- schemas_FilterPredicateOp as FilterPredicateOp,
4980
- schemas_FilterPredicateRangeOp as FilterPredicateRangeOp,
4981
- schemas_FilterRangeValue as FilterRangeValue,
4982
- schemas_FilterValue as FilterValue,
4983
- schemas_FuzzinessExpression as FuzzinessExpression,
4984
- schemas_HighlightExpression as HighlightExpression,
4985
- schemas_InviteID as InviteID,
4986
- schemas_InviteKey as InviteKey,
4987
- schemas_ListBranchesResponse as ListBranchesResponse,
4988
- schemas_ListDatabasesResponse as ListDatabasesResponse,
4989
- schemas_ListGitBranchesResponse as ListGitBranchesResponse,
4990
- schemas_ListRegionsResponse as ListRegionsResponse,
4991
- schemas_MaxAgg as MaxAgg,
4992
- schemas_MetricsDatapoint as MetricsDatapoint,
4993
- schemas_MetricsLatency as MetricsLatency,
4994
- schemas_Migration as Migration,
4995
- schemas_MigrationColumnOp as MigrationColumnOp,
4996
- schemas_MigrationOp as MigrationOp,
4997
- schemas_MigrationRequest as MigrationRequest,
4998
- schemas_MigrationRequestNumber as MigrationRequestNumber,
4999
- schemas_MigrationStatus as MigrationStatus,
5000
- schemas_MigrationTableOp as MigrationTableOp,
5001
- schemas_MinAgg as MinAgg,
5002
- NumericBooster$1 as NumericBooster,
5003
- schemas_NumericHistogramAgg as NumericHistogramAgg,
5004
- schemas_PageConfig as PageConfig,
5005
- schemas_PrefixExpression as PrefixExpression,
5006
- schemas_RecordID as RecordID,
5007
- schemas_RecordMeta as RecordMeta,
5008
- schemas_RecordsMetadata as RecordsMetadata,
5009
- schemas_Region as Region,
5010
- schemas_RevLink as RevLink,
5011
- schemas_Role as Role,
5012
- schemas_Schema as Schema,
5013
- schemas_SchemaEditScript as SchemaEditScript,
5014
- schemas_SearchPageConfig as SearchPageConfig,
5015
- schemas_SortExpression as SortExpression,
5016
- schemas_SortOrder as SortOrder,
5017
- schemas_StartedFromMetadata as StartedFromMetadata,
5018
- schemas_SumAgg as SumAgg,
5019
- schemas_SummaryExpression as SummaryExpression,
5020
- schemas_SummaryExpressionList as SummaryExpressionList,
5021
- schemas_Table as Table,
5022
- schemas_TableMigration as TableMigration,
5023
- schemas_TableName as TableName,
5024
- schemas_TableOpAdd as TableOpAdd,
5025
- schemas_TableOpRemove as TableOpRemove,
5026
- schemas_TableOpRename as TableOpRename,
5027
- schemas_TableRename as TableRename,
5028
- schemas_TargetExpression as TargetExpression,
5029
- schemas_TopValuesAgg as TopValuesAgg,
5030
- schemas_TransactionDeleteOp as TransactionDeleteOp,
5031
- schemas_TransactionError as TransactionError,
5032
- schemas_TransactionFailure as TransactionFailure,
5033
- schemas_TransactionInsertOp as TransactionInsertOp,
5034
- TransactionOperation$1 as TransactionOperation,
5035
- schemas_TransactionResultDelete as TransactionResultDelete,
5036
- schemas_TransactionResultInsert as TransactionResultInsert,
5037
- schemas_TransactionResultUpdate as TransactionResultUpdate,
5038
- schemas_TransactionSuccess as TransactionSuccess,
5039
- schemas_TransactionUpdateOp as TransactionUpdateOp,
5040
- schemas_UniqueCountAgg as UniqueCountAgg,
5041
- schemas_User as User,
5042
- schemas_UserID as UserID,
5043
- schemas_UserWithID as UserWithID,
5044
- ValueBooster$1 as ValueBooster,
5045
- schemas_Workspace as Workspace,
5046
- schemas_WorkspaceID as WorkspaceID,
5047
- schemas_WorkspaceInvite as WorkspaceInvite,
5048
- schemas_WorkspaceMember as WorkspaceMember,
5049
- schemas_WorkspaceMembers as WorkspaceMembers,
5050
- schemas_WorkspaceMeta as WorkspaceMeta,
5051
- XataRecord$1 as XataRecord,
5052
- };
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 };
5053
6267
  }
5054
6268
 
5055
6269
  type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
@@ -5059,6 +6273,7 @@ interface XataApiClientOptions {
5059
6273
  host?: HostProvider;
5060
6274
  trace?: TraceFunction;
5061
6275
  clientName?: string;
6276
+ xataAgentExtra?: Record<string, string>;
5062
6277
  }
5063
6278
  declare class XataApiClient {
5064
6279
  #private;
@@ -5073,6 +6288,7 @@ declare class XataApiClient {
5073
6288
  get migrationRequests(): MigrationRequestsApi;
5074
6289
  get tables(): TableApi;
5075
6290
  get records(): RecordsApi;
6291
+ get files(): FilesApi;
5076
6292
  get searchAndFilter(): SearchAndFilterApi;
5077
6293
  }
5078
6294
  declare class UserApi {
@@ -5179,6 +6395,14 @@ declare class BranchApi {
5179
6395
  database: DBName;
5180
6396
  branch: BranchName;
5181
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>;
5182
6406
  updateBranchMetadata({ workspace, region, database, branch, metadata }: {
5183
6407
  workspace: WorkspaceID;
5184
6408
  region: string;
@@ -5386,6 +6610,75 @@ declare class RecordsApi {
5386
6610
  operations: TransactionOperation$1[];
5387
6611
  }): Promise<TransactionSuccess>;
5388
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
+ }
5389
6682
  declare class SearchAndFilterApi {
5390
6683
  private extraProps;
5391
6684
  constructor(extraProps: ApiExtraProps);
@@ -5431,6 +6724,35 @@ declare class SearchAndFilterApi {
5431
6724
  prefix?: PrefixExpression;
5432
6725
  highlight?: HighlightExpression;
5433
6726
  }): Promise<SearchResponse>;
6727
+ vectorSearchTable({ workspace, region, database, branch, table, queryVector, column, similarityFunction, size, filter }: {
6728
+ workspace: WorkspaceID;
6729
+ region: string;
6730
+ database: DBName;
6731
+ branch: BranchName;
6732
+ table: TableName;
6733
+ queryVector: number[];
6734
+ column: string;
6735
+ similarityFunction?: string;
6736
+ size?: number;
6737
+ filter?: FilterExpression;
6738
+ }): Promise<SearchResponse>;
6739
+ askTable({ workspace, region, database, branch, table, options }: {
6740
+ workspace: WorkspaceID;
6741
+ region: string;
6742
+ database: DBName;
6743
+ branch: BranchName;
6744
+ table: TableName;
6745
+ options: AskTableRequestBody;
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>;
5434
6756
  summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page, consistency }: {
5435
6757
  workspace: WorkspaceID;
5436
6758
  region: string;
@@ -5516,7 +6838,7 @@ declare class MigrationRequestsApi {
5516
6838
  region: string;
5517
6839
  database: DBName;
5518
6840
  migrationRequest: MigrationRequestNumber;
5519
- }): Promise<Commit>;
6841
+ }): Promise<BranchOp>;
5520
6842
  }
5521
6843
  declare class MigrationsApi {
5522
6844
  private extraProps;
@@ -5554,20 +6876,23 @@ declare class MigrationsApi {
5554
6876
  size?: number;
5555
6877
  };
5556
6878
  }): Promise<GetBranchSchemaHistoryResponse>;
5557
- compareBranchWithUserSchema({ workspace, region, database, branch, schema }: {
6879
+ compareBranchWithUserSchema({ workspace, region, database, branch, schema, schemaOperations, branchOperations }: {
5558
6880
  workspace: WorkspaceID;
5559
6881
  region: string;
5560
6882
  database: DBName;
5561
6883
  branch: BranchName;
5562
6884
  schema: Schema;
6885
+ schemaOperations?: MigrationOp[];
6886
+ branchOperations?: MigrationOp[];
5563
6887
  }): Promise<SchemaCompareResponse>;
5564
- compareBranchSchemas({ workspace, region, database, branch, compare, schema }: {
6888
+ compareBranchSchemas({ workspace, region, database, branch, compare, sourceBranchOperations, targetBranchOperations }: {
5565
6889
  workspace: WorkspaceID;
5566
6890
  region: string;
5567
6891
  database: DBName;
5568
6892
  branch: BranchName;
5569
6893
  compare: BranchName;
5570
- schema: Schema;
6894
+ sourceBranchOperations?: MigrationOp[];
6895
+ targetBranchOperations?: MigrationOp[];
5571
6896
  }): Promise<SchemaCompareResponse>;
5572
6897
  updateBranchSchema({ workspace, region, database, branch, migration }: {
5573
6898
  workspace: WorkspaceID;
@@ -5592,6 +6917,13 @@ declare class MigrationsApi {
5592
6917
  branch: BranchName;
5593
6918
  edits: SchemaEditScript;
5594
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>;
5595
6927
  }
5596
6928
  declare class DatabaseApi {
5597
6929
  private extraProps;
@@ -5599,10 +6931,11 @@ declare class DatabaseApi {
5599
6931
  getDatabaseList({ workspace }: {
5600
6932
  workspace: WorkspaceID;
5601
6933
  }): Promise<ListDatabasesResponse>;
5602
- createDatabase({ workspace, database, data }: {
6934
+ createDatabase({ workspace, database, data, headers }: {
5603
6935
  workspace: WorkspaceID;
5604
6936
  database: DBName;
5605
6937
  data: CreateDatabaseRequestBody;
6938
+ headers?: Record<string, string>;
5606
6939
  }): Promise<CreateDatabaseResponse>;
5607
6940
  deleteDatabase({ workspace, database }: {
5608
6941
  workspace: WorkspaceID;
@@ -5617,6 +6950,24 @@ declare class DatabaseApi {
5617
6950
  database: DBName;
5618
6951
  metadata: DatabaseMetadata;
5619
6952
  }): Promise<DatabaseMetadata>;
6953
+ renameDatabase({ workspace, database, newName }: {
6954
+ workspace: WorkspaceID;
6955
+ database: DBName;
6956
+ newName: DBName;
6957
+ }): Promise<DatabaseMetadata>;
6958
+ getDatabaseGithubSettings({ workspace, database }: {
6959
+ workspace: WorkspaceID;
6960
+ database: DBName;
6961
+ }): Promise<DatabaseGithubSettings>;
6962
+ updateDatabaseGithubSettings({ workspace, database, settings }: {
6963
+ workspace: WorkspaceID;
6964
+ database: DBName;
6965
+ settings: DatabaseGithubSettings;
6966
+ }): Promise<DatabaseGithubSettings>;
6967
+ deleteDatabaseGithubSettings({ workspace, database }: {
6968
+ workspace: WorkspaceID;
6969
+ database: DBName;
6970
+ }): Promise<void>;
5620
6971
  listRegions({ workspace }: {
5621
6972
  workspace: WorkspaceID;
5622
6973
  }): Promise<ListRegionsResponse>;
@@ -5659,35 +7010,293 @@ type Narrowable = string | number | bigint | boolean;
5659
7010
  type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
5660
7011
  type Narrow<A> = Try<A, [], NarrowRaw<A>>;
5661
7012
 
5662
- 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;
5663
7265
  type WildcardColumns<O> = Values<{
5664
7266
  [K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
5665
7267
  }>;
5666
7268
  type ColumnsByValue<O, Value> = Values<{
5667
7269
  [K in SelectableColumn<O>]: ValueAtColumn<O, K> extends infer C ? C extends Value ? K extends WildcardColumns<O> ? never : K : never : never;
5668
7270
  }>;
5669
- type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
5670
- [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
+ };
5671
7279
  }>>;
5672
- 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> ? {
5673
7281
  V: ValueAtColumn<Item, V>;
5674
- } : never : O[K] : never> : never : never;
7282
+ } : never : Object[K] : never> : never : never;
5675
7283
  type MAX_RECURSION = 2;
5676
7284
  type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
5677
- [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
5678
- 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
5679
7286
  K>> : never;
5680
7287
  }>, never>;
5681
7288
  type DataProps<O> = Exclude<StringKeys<O>, StringKeys<XataRecord>>;
5682
7289
  type NestedValueAtColumn<O, Key extends SelectableColumn<O>> = Key extends `${infer N}.${infer M}` ? N extends DataProps<O> ? {
5683
- [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;
5684
7291
  } : unknown : Key extends DataProps<O> ? {
5685
- [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];
5686
7293
  } : Key extends '*' ? {
5687
7294
  [K in StringKeys<O>]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Link<NonNullable<O[K]>>> : O[K];
5688
7295
  } : unknown;
5689
7296
  type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
5690
7297
 
7298
+ declare const RecordColumnTypes: readonly ["bool", "int", "float", "string", "text", "email", "multiple", "link", "object", "datetime", "vector", "file[]", "file", "json"];
7299
+ type Identifier = string;
5691
7300
  /**
5692
7301
  * Represents an identifiable record from the database.
5693
7302
  */
@@ -5695,7 +7304,7 @@ interface Identifiable {
5695
7304
  /**
5696
7305
  * Unique id of this record.
5697
7306
  */
5698
- id: string;
7307
+ id: Identifier;
5699
7308
  }
5700
7309
  interface BaseData {
5701
7310
  [key: string]: any;
@@ -5704,8 +7313,13 @@ interface BaseData {
5704
7313
  * Represents a persisted record from the database.
5705
7314
  */
5706
7315
  interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> extends Identifiable {
7316
+ /**
7317
+ * Metadata of this record.
7318
+ */
7319
+ xata: XataRecordMetadata;
5707
7320
  /**
5708
7321
  * Get metadata of this record.
7322
+ * @deprecated Use `xata` property instead.
5709
7323
  */
5710
7324
  getMetadata(): XataRecordMetadata;
5711
7325
  /**
@@ -5784,23 +7398,71 @@ type XataRecordMetadata = {
5784
7398
  * Number that is increased every time the record is updated.
5785
7399
  */
5786
7400
  version: number;
5787
- 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;
5788
7409
  };
5789
7410
  declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
5790
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>>;
5791
7422
  type EditableDataFields<T> = T extends XataRecord ? {
5792
- id: string;
5793
- } | string : NonNullable<T> extends XataRecord ? {
5794
- id: string;
5795
- } | 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;
5796
7427
  type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
5797
7428
  [K in keyof O]: EditableDataFields<O[K]>;
5798
7429
  }, keyof XataRecord>>;
5799
- 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;
5800
- 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<{
5801
7454
  [K in keyof O]: JSONDataFields<O[K]>;
5802
7455
  }, keyof XataRecord>>;
5803
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>>>;
5804
7466
  /**
5805
7467
  * PropertyMatchFilter
5806
7468
  * Example:
@@ -5820,7 +7482,9 @@ type JSONData<O> = Identifiable & Partial<Omit<{
5820
7482
  }
5821
7483
  */
5822
7484
  type PropertyAccessFilter<Record> = {
5823
- [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]>;
5824
7488
  };
5825
7489
  type PropertyFilter<T> = T | {
5826
7490
  $is: T;
@@ -5882,7 +7546,7 @@ type AggregatorFilter<T> = {
5882
7546
  * Example: { filter: { $exists: "settings" } }
5883
7547
  */
5884
7548
  type ExistanceFilter<Record> = {
5885
- [key in '$exists' | '$notExists']?: ColumnsByValue<Record, any>;
7549
+ [key in '$exists' | '$notExists']?: FilterColumns<Record>;
5886
7550
  };
5887
7551
  type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
5888
7552
  /**
@@ -5899,6 +7563,12 @@ type DateBooster = {
5899
7563
  origin?: string;
5900
7564
  scale: string;
5901
7565
  decay: number;
7566
+ /**
7567
+ * The factor with which to multiply the added boost.
7568
+ *
7569
+ * @minimum 0
7570
+ */
7571
+ factor?: number;
5902
7572
  };
5903
7573
  type NumericBooster = {
5904
7574
  factor: number;
@@ -6015,7 +7685,7 @@ declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends X
6015
7685
  #private;
6016
7686
  private db;
6017
7687
  constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
6018
- build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
7688
+ build(pluginOptions: XataPluginOptions): SearchPluginResult<Schemas>;
6019
7689
  }
6020
7690
  type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
6021
7691
  getMetadata: () => XataRecordMetadata & SearchExtraProperties;
@@ -6205,13 +7875,57 @@ type ComplexAggregationResult = {
6205
7875
  }>;
6206
7876
  };
6207
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
+
6208
7914
  type SortDirection = 'asc' | 'desc';
6209
- 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 | {
6210
7924
  column: Columns;
6211
7925
  direction?: SortDirection;
6212
7926
  };
6213
- type SortFilter<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns>;
6214
- 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<{
6215
7929
  [Key in Columns]: {
6216
7930
  [K in Key]: SortDirection;
6217
7931
  };
@@ -6233,6 +7947,7 @@ type SummarizeParams<Record extends XataRecord, Expression extends Dictionary<Su
6233
7947
  pagination?: {
6234
7948
  size: number;
6235
7949
  };
7950
+ consistency?: 'strong' | 'eventual';
6236
7951
  };
6237
7952
  type SummarizeResult<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
6238
7953
  summaries: SummarizeResultItem<Record, Expression, Columns>[];
@@ -6252,7 +7967,7 @@ type SummarizeFilter<Record extends XataRecord, Expression extends Dictionary<Su
6252
7967
  type SummarizeResultItem<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = SummarizeValuePick<Record, Expression> & SelectedPick<Record, Columns>;
6253
7968
 
6254
7969
  type BaseOptions<T extends XataRecord> = {
6255
- columns?: SelectableColumn<T>[];
7970
+ columns?: SelectableColumnWithObjectNotation<T>[];
6256
7971
  consistency?: 'strong' | 'eventual';
6257
7972
  cache?: number;
6258
7973
  fetchOptions?: Record<string, unknown>;
@@ -6320,7 +8035,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6320
8035
  * @param value The value to filter.
6321
8036
  * @returns A new Query object.
6322
8037
  */
6323
- 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>;
6324
8039
  /**
6325
8040
  * Builds a new query object adding one or more constraints. Examples:
6326
8041
  *
@@ -6341,13 +8056,15 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6341
8056
  * @param direction The direction. Either ascending or descending.
6342
8057
  * @returns A new Query object.
6343
8058
  */
6344
- 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>;
6345
8062
  /**
6346
8063
  * Builds a new query specifying the set of columns to be returned in the query response.
6347
8064
  * @param columns Array of column names to be returned by the query.
6348
8065
  * @returns A new Query object.
6349
8066
  */
6350
- 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[]>>;
6351
8068
  /**
6352
8069
  * Get paginated results
6353
8070
  *
@@ -6367,7 +8084,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6367
8084
  * @param options Pagination options
6368
8085
  * @returns A page of results
6369
8086
  */
6370
- 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']>>>;
6371
8088
  /**
6372
8089
  * Get results in an iterator
6373
8090
  *
@@ -6398,7 +8115,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6398
8115
  */
6399
8116
  getIterator<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
6400
8117
  batchSize?: number;
6401
- }>(options: Options): AsyncGenerator<SelectedPick<Record, typeof options['columns']>[]>;
8118
+ }>(options: Options): AsyncGenerator<SelectedPick<Record, (typeof options)['columns']>[]>;
6402
8119
  /**
6403
8120
  * Performs the query in the database and returns a set of results.
6404
8121
  * @returns An array of records from the database.
@@ -6409,7 +8126,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6409
8126
  * @param options Additional options to be used when performing the query.
6410
8127
  * @returns An array of records from the database.
6411
8128
  */
6412
- 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']>>>;
6413
8130
  /**
6414
8131
  * Performs the query in the database and returns a set of results.
6415
8132
  * @param options Additional options to be used when performing the query.
@@ -6430,7 +8147,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6430
8147
  */
6431
8148
  getAll<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
6432
8149
  batchSize?: number;
6433
- }>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>[]>;
8150
+ }>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>[]>;
6434
8151
  /**
6435
8152
  * Performs the query in the database and returns all the results.
6436
8153
  * Warning: If there are a large number of results, this method can have performance implications.
@@ -6450,7 +8167,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6450
8167
  * @param options Additional options to be used when performing the query.
6451
8168
  * @returns The first record that matches the query, or null if no record matched the query.
6452
8169
  */
6453
- 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>;
6454
8171
  /**
6455
8172
  * Performs the query in the database and returns the first result.
6456
8173
  * @param options Additional options to be used when performing the query.
@@ -6469,7 +8186,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6469
8186
  * @returns The first record that matches the query, or null if no record matched the query.
6470
8187
  * @throws if there are no results.
6471
8188
  */
6472
- 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']>>;
6473
8190
  /**
6474
8191
  * Performs the query in the database and returns the first result.
6475
8192
  * @param options Additional options to be used when performing the query.
@@ -6518,6 +8235,7 @@ type PaginationQueryMeta = {
6518
8235
  page: {
6519
8236
  cursor: string;
6520
8237
  more: boolean;
8238
+ size: number;
6521
8239
  };
6522
8240
  };
6523
8241
  interface Paginable<Record extends XataRecord, Result extends XataRecord = Record> {
@@ -6650,7 +8368,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6650
8368
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6651
8369
  * @returns The full persisted record.
6652
8370
  */
6653
- 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?: {
6654
8372
  ifVersion?: number;
6655
8373
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
6656
8374
  /**
@@ -6659,7 +8377,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6659
8377
  * @param object Object containing the column names with their values to be stored in the table.
6660
8378
  * @returns The full persisted record.
6661
8379
  */
6662
- abstract create(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8380
+ abstract create(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
6663
8381
  ifVersion?: number;
6664
8382
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
6665
8383
  /**
@@ -6681,26 +8399,26 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6681
8399
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6682
8400
  * @returns The persisted record for the given id or null if the record could not be found.
6683
8401
  */
6684
- 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>>;
6685
8403
  /**
6686
8404
  * Queries a single record from the table given its unique id.
6687
8405
  * @param id The unique id.
6688
8406
  * @returns The persisted record for the given id or null if the record could not be found.
6689
8407
  */
6690
- abstract read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
8408
+ abstract read(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
6691
8409
  /**
6692
8410
  * Queries multiple records from the table given their unique id.
6693
8411
  * @param ids The unique ids array.
6694
8412
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6695
8413
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
6696
8414
  */
6697
- 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>>;
6698
8416
  /**
6699
8417
  * Queries multiple records from the table given their unique id.
6700
8418
  * @param ids The unique ids array.
6701
8419
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
6702
8420
  */
6703
- abstract read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8421
+ abstract read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
6704
8422
  /**
6705
8423
  * Queries a single record from the table by the id in the object.
6706
8424
  * @param object Object containing the id of the record.
@@ -6734,14 +8452,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6734
8452
  * @returns The persisted record for the given id.
6735
8453
  * @throws If the record could not be found.
6736
8454
  */
6737
- 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>>>;
6738
8456
  /**
6739
8457
  * Queries a single record from the table given its unique id.
6740
8458
  * @param id The unique id.
6741
8459
  * @returns The persisted record for the given id.
6742
8460
  * @throws If the record could not be found.
6743
8461
  */
6744
- abstract readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8462
+ abstract readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
6745
8463
  /**
6746
8464
  * Queries multiple records from the table given their unique id.
6747
8465
  * @param ids The unique ids array.
@@ -6749,14 +8467,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6749
8467
  * @returns The persisted records for the given ids in order.
6750
8468
  * @throws If one or more records could not be found.
6751
8469
  */
6752
- 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>>>>;
6753
8471
  /**
6754
8472
  * Queries multiple records from the table given their unique id.
6755
8473
  * @param ids The unique ids array.
6756
8474
  * @returns The persisted records for the given ids in order.
6757
8475
  * @throws If one or more records could not be found.
6758
8476
  */
6759
- abstract readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8477
+ abstract readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
6760
8478
  /**
6761
8479
  * Queries a single record from the table by the id in the object.
6762
8480
  * @param object Object containing the id of the record.
@@ -6811,7 +8529,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6811
8529
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6812
8530
  * @returns The full persisted record, null if the record could not be found.
6813
8531
  */
6814
- 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?: {
6815
8533
  ifVersion?: number;
6816
8534
  }): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
6817
8535
  /**
@@ -6820,7 +8538,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6820
8538
  * @param object The column names and their values that have to be updated.
6821
8539
  * @returns The full persisted record, null if the record could not be found.
6822
8540
  */
6823
- abstract update(id: string, object: Partial<EditableData<Record>>, options?: {
8541
+ abstract update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
6824
8542
  ifVersion?: number;
6825
8543
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
6826
8544
  /**
@@ -6863,7 +8581,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6863
8581
  * @returns The full persisted record.
6864
8582
  * @throws If the record could not be found.
6865
8583
  */
6866
- 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?: {
6867
8585
  ifVersion?: number;
6868
8586
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
6869
8587
  /**
@@ -6873,7 +8591,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6873
8591
  * @returns The full persisted record.
6874
8592
  * @throws If the record could not be found.
6875
8593
  */
6876
- abstract updateOrThrow(id: string, object: Partial<EditableData<Record>>, options?: {
8594
+ abstract updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
6877
8595
  ifVersion?: number;
6878
8596
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
6879
8597
  /**
@@ -6898,7 +8616,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6898
8616
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6899
8617
  * @returns The full persisted record.
6900
8618
  */
6901
- 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?: {
6902
8620
  ifVersion?: number;
6903
8621
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
6904
8622
  /**
@@ -6907,7 +8625,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6907
8625
  * @param object Object containing the column names with their values to be persisted in the table.
6908
8626
  * @returns The full persisted record.
6909
8627
  */
6910
- abstract createOrUpdate(object: EditableData<Record> & Identifiable, options?: {
8628
+ abstract createOrUpdate(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
6911
8629
  ifVersion?: number;
6912
8630
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
6913
8631
  /**
@@ -6918,7 +8636,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6918
8636
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6919
8637
  * @returns The full persisted record.
6920
8638
  */
6921
- 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?: {
6922
8640
  ifVersion?: number;
6923
8641
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
6924
8642
  /**
@@ -6928,7 +8646,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6928
8646
  * @param object The column names and the values to be persisted.
6929
8647
  * @returns The full persisted record.
6930
8648
  */
6931
- abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8649
+ abstract createOrUpdate(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
6932
8650
  ifVersion?: number;
6933
8651
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
6934
8652
  /**
@@ -6938,14 +8656,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6938
8656
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6939
8657
  * @returns Array of the persisted records.
6940
8658
  */
6941
- 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>>[]>;
6942
8660
  /**
6943
8661
  * Creates or updates a single record. If a record exists with the given id,
6944
8662
  * it will be partially updated, otherwise a new record will be created.
6945
8663
  * @param objects Array of objects with the column names and the values to be stored in the table.
6946
8664
  * @returns Array of the persisted records.
6947
8665
  */
6948
- 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, ['*']>>[]>;
6949
8667
  /**
6950
8668
  * Creates or replaces a single record. If a record exists with the given id,
6951
8669
  * it will be replaced, otherwise a new record will be created.
@@ -6953,7 +8671,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6953
8671
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6954
8672
  * @returns The full persisted record.
6955
8673
  */
6956
- 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?: {
6957
8675
  ifVersion?: number;
6958
8676
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
6959
8677
  /**
@@ -6962,7 +8680,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6962
8680
  * @param object Object containing the column names with their values to be persisted in the table.
6963
8681
  * @returns The full persisted record.
6964
8682
  */
6965
- abstract createOrReplace(object: EditableData<Record> & Identifiable, options?: {
8683
+ abstract createOrReplace(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
6966
8684
  ifVersion?: number;
6967
8685
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
6968
8686
  /**
@@ -6973,7 +8691,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6973
8691
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6974
8692
  * @returns The full persisted record.
6975
8693
  */
6976
- 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?: {
6977
8695
  ifVersion?: number;
6978
8696
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
6979
8697
  /**
@@ -6983,7 +8701,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6983
8701
  * @param object The column names and the values to be persisted.
6984
8702
  * @returns The full persisted record.
6985
8703
  */
6986
- abstract createOrReplace(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8704
+ abstract createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
6987
8705
  ifVersion?: number;
6988
8706
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
6989
8707
  /**
@@ -6993,14 +8711,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6993
8711
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6994
8712
  * @returns Array of the persisted records.
6995
8713
  */
6996
- 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>>[]>;
6997
8715
  /**
6998
8716
  * Creates or replaces a single record. If a record exists with the given id,
6999
8717
  * it will be replaced, otherwise a new record will be created.
7000
8718
  * @param objects Array of objects with the column names and the values to be stored in the table.
7001
8719
  * @returns Array of the persisted records.
7002
8720
  */
7003
- 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, ['*']>>[]>;
7004
8722
  /**
7005
8723
  * Deletes a record given its unique id.
7006
8724
  * @param object An object with a unique id.
@@ -7020,13 +8738,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7020
8738
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7021
8739
  * @returns The deleted record, null if the record could not be found.
7022
8740
  */
7023
- 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>;
7024
8742
  /**
7025
8743
  * Deletes a record given a unique id.
7026
8744
  * @param id The unique id.
7027
8745
  * @returns The deleted record, null if the record could not be found.
7028
8746
  */
7029
- abstract delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
8747
+ abstract delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7030
8748
  /**
7031
8749
  * Deletes multiple records given an array of objects with ids.
7032
8750
  * @param objects An array of objects with unique ids.
@@ -7046,13 +8764,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7046
8764
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7047
8765
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
7048
8766
  */
7049
- 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>>;
7050
8768
  /**
7051
8769
  * Deletes multiple records given an array of unique ids.
7052
8770
  * @param objects An array of ids.
7053
8771
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
7054
8772
  */
7055
- abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8773
+ abstract delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7056
8774
  /**
7057
8775
  * Deletes a record given its unique id.
7058
8776
  * @param object An object with a unique id.
@@ -7075,14 +8793,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7075
8793
  * @returns The deleted record, null if the record could not be found.
7076
8794
  * @throws If the record could not be found.
7077
8795
  */
7078
- 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>>>;
7079
8797
  /**
7080
8798
  * Deletes a record given a unique id.
7081
8799
  * @param id The unique id.
7082
8800
  * @returns The deleted record, null if the record could not be found.
7083
8801
  * @throws If the record could not be found.
7084
8802
  */
7085
- abstract deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8803
+ abstract deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7086
8804
  /**
7087
8805
  * Deletes multiple records given an array of objects with ids.
7088
8806
  * @param objects An array of objects with unique ids.
@@ -7105,14 +8823,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7105
8823
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
7106
8824
  * @throws If one or more records could not be found.
7107
8825
  */
7108
- 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>>>>;
7109
8827
  /**
7110
8828
  * Deletes multiple records given an array of unique ids.
7111
8829
  * @param objects An array of ids.
7112
8830
  * @returns Array of the deleted records in order.
7113
8831
  * @throws If one or more records could not be found.
7114
8832
  */
7115
- abstract deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8833
+ abstract deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7116
8834
  /**
7117
8835
  * Search for records in the table.
7118
8836
  * @param query The query to search for.
@@ -7128,6 +8846,30 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7128
8846
  page?: SearchPageConfig;
7129
8847
  target?: TargetColumn<Record>[];
7130
8848
  }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
8849
+ /**
8850
+ * Search for vectors in the table.
8851
+ * @param column The column to search for.
8852
+ * @param query The vector to search for similarities. Must have the same dimension as the vector column used.
8853
+ * @param options The options to search with (like: spaceFunction)
8854
+ */
8855
+ abstract vectorSearch<F extends ColumnsByValue<Record, number[]>>(column: F, query: number[], options?: {
8856
+ /**
8857
+ * The function used to measure the distance between two points. Can be one of:
8858
+ * `cosineSimilarity`, `l1`, `l2`. The default is `cosineSimilarity`.
8859
+ *
8860
+ * @default cosineSimilarity
8861
+ */
8862
+ similarityFunction?: string;
8863
+ /**
8864
+ * Number of results to return.
8865
+ *
8866
+ * @default 10
8867
+ * @maximum 100
8868
+ * @minimum 1
8869
+ */
8870
+ size?: number;
8871
+ filter?: Filter<Record>;
8872
+ }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
7131
8873
  /**
7132
8874
  * Aggregates records in the table.
7133
8875
  * @param expression The aggregations to perform.
@@ -7135,6 +8877,20 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7135
8877
  * @returns The requested aggregations.
7136
8878
  */
7137
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;
7138
8894
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
7139
8895
  }
7140
8896
  declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
@@ -7151,26 +8907,26 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7151
8907
  create(object: EditableData<Record> & Partial<Identifiable>, options?: {
7152
8908
  ifVersion?: number;
7153
8909
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7154
- 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?: {
7155
8911
  ifVersion?: number;
7156
8912
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7157
- create(id: string, object: EditableData<Record>, options?: {
8913
+ create(id: Identifier, object: EditableData<Record>, options?: {
7158
8914
  ifVersion?: number;
7159
8915
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7160
8916
  create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7161
8917
  create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7162
- 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>>;
7163
8919
  read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
7164
- read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7165
- 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>>;
7166
8922
  read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
7167
8923
  read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
7168
8924
  read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7169
8925
  read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7170
- readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7171
- readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7172
- readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7173
- 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, ['*']>>>>;
7174
8930
  readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7175
8931
  readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7176
8932
  readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
@@ -7181,10 +8937,10 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7181
8937
  update(object: Partial<EditableData<Record>> & Identifiable, options?: {
7182
8938
  ifVersion?: number;
7183
8939
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7184
- 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?: {
7185
8941
  ifVersion?: number;
7186
8942
  }): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7187
- update(id: string, object: Partial<EditableData<Record>>, options?: {
8943
+ update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
7188
8944
  ifVersion?: number;
7189
8945
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7190
8946
  update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
@@ -7195,58 +8951,58 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7195
8951
  updateOrThrow(object: Partial<EditableData<Record>> & Identifiable, options?: {
7196
8952
  ifVersion?: number;
7197
8953
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7198
- 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?: {
7199
8955
  ifVersion?: number;
7200
8956
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7201
- updateOrThrow(id: string, object: Partial<EditableData<Record>>, options?: {
8957
+ updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
7202
8958
  ifVersion?: number;
7203
8959
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7204
8960
  updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7205
8961
  updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7206
- 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?: {
7207
8963
  ifVersion?: number;
7208
8964
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7209
- createOrUpdate(object: EditableData<Record> & Identifiable, options?: {
8965
+ createOrUpdate(object: EditableData<Record> & Partial<Identifiable>, options?: {
7210
8966
  ifVersion?: number;
7211
8967
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7212
- 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?: {
7213
8969
  ifVersion?: number;
7214
8970
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7215
- createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8971
+ createOrUpdate(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
7216
8972
  ifVersion?: number;
7217
8973
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7218
- createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7219
- createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7220
- 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?: {
7221
8977
  ifVersion?: number;
7222
8978
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7223
- createOrReplace(object: EditableData<Record> & Identifiable, options?: {
8979
+ createOrReplace(object: EditableData<Record> & Partial<Identifiable>, options?: {
7224
8980
  ifVersion?: number;
7225
8981
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7226
- 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?: {
7227
8983
  ifVersion?: number;
7228
8984
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7229
- createOrReplace(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8985
+ createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
7230
8986
  ifVersion?: number;
7231
8987
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7232
- createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7233
- 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, ['*']>>[]>;
7234
8990
  delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7235
8991
  delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7236
- delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7237
- 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>;
7238
8994
  delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7239
8995
  delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7240
- delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7241
- 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>>;
7242
8998
  deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7243
8999
  deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7244
- deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7245
- 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, ['*']>>>;
7246
9002
  deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7247
9003
  deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7248
- deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7249
- 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, ['*']>>>>;
7250
9006
  search(query: string, options?: {
7251
9007
  fuzziness?: FuzzinessExpression;
7252
9008
  prefix?: PrefixExpression;
@@ -7256,9 +9012,17 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7256
9012
  page?: SearchPageConfig;
7257
9013
  target?: TargetColumn<Record>[];
7258
9014
  }): Promise<any>;
9015
+ vectorSearch<F extends ColumnsByValue<Record, number[]>>(column: F, query: number[], options?: {
9016
+ similarityFunction?: string | undefined;
9017
+ size?: number | undefined;
9018
+ filter?: Filter<Record> | undefined;
9019
+ } | undefined): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
7259
9020
  aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
7260
9021
  query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
7261
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;
7262
9026
  }
7263
9027
 
7264
9028
  type BaseSchema = {
@@ -7314,7 +9078,7 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
7314
9078
  } : {
7315
9079
  [K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
7316
9080
  } : never : never;
7317
- type InnerType<Type, ObjectColumns, Tables, LinkedTable> = Type extends 'string' | 'text' | 'email' ? string : Type extends 'int' | 'float' ? number : Type extends 'bool' ? boolean : Type extends 'datetime' ? Date : Type extends 'multiple' ? string[] : Type extends 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
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 {
7318
9082
  name: string;
7319
9083
  type: string;
7320
9084
  } ? UnionToIntersection<Values<{
@@ -7372,11 +9136,11 @@ declare const le: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
7372
9136
  /**
7373
9137
  * Operator to restrict results to only values that are not null.
7374
9138
  */
7375
- declare const exists: <T>(column?: ColumnsByValue<T, any> | undefined) => ExistanceFilter<T>;
9139
+ declare const exists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
7376
9140
  /**
7377
9141
  * Operator to restrict results to only values that are null.
7378
9142
  */
7379
- declare const notExists: <T>(column?: ColumnsByValue<T, any> | undefined) => ExistanceFilter<T>;
9143
+ declare const notExists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
7380
9144
  /**
7381
9145
  * Operator to restrict results to only values that start with the given prefix.
7382
9146
  */
@@ -7434,6 +9198,54 @@ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends X
7434
9198
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
7435
9199
  }
7436
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
+
7437
9249
  type TransactionOperation<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
7438
9250
  insert: Values<{
7439
9251
  [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
@@ -7466,6 +9278,7 @@ type UpdateTransactionOperation<O extends XataRecord> = {
7466
9278
  };
7467
9279
  type DeleteTransactionOperation = {
7468
9280
  id: string;
9281
+ failIfMissing?: boolean;
7469
9282
  };
7470
9283
  type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Table>> = Operation extends {
7471
9284
  insert: {
@@ -7512,24 +9325,20 @@ type TransactionPluginResult<Schemas extends Record<string, XataRecord>> = {
7512
9325
  run: <Tables extends StringKeys<Schemas>, Operations extends TransactionOperation<Schemas, Tables>[]>(operations: Narrow<Operations>) => Promise<TransactionResults<Schemas, Tables, Operations>>;
7513
9326
  };
7514
9327
  declare class TransactionPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
7515
- build({ getFetchProps }: XataPluginOptions): TransactionPluginResult<Schemas>;
9328
+ build(pluginOptions: XataPluginOptions): TransactionPluginResult<Schemas>;
7516
9329
  }
7517
9330
 
7518
- type BranchStrategyValue = string | undefined | null;
7519
- type BranchStrategyBuilder = () => BranchStrategyValue;
7520
- type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
7521
- type BranchStrategyOption = NonNullable<BranchStrategy | BranchStrategy[]>;
7522
-
7523
9331
  type BaseClientOptions = {
7524
9332
  fetch?: FetchImpl;
7525
9333
  host?: HostProvider;
7526
9334
  apiKey?: string;
7527
9335
  databaseURL?: string;
7528
- branch?: BranchStrategyOption;
9336
+ branch?: string;
7529
9337
  cache?: CacheImpl;
7530
9338
  trace?: TraceFunction;
7531
9339
  enableBrowser?: boolean;
7532
9340
  clientName?: string;
9341
+ xataAgentExtra?: Record<string, string>;
7533
9342
  };
7534
9343
  declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
7535
9344
  interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
@@ -7537,6 +9346,8 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
7537
9346
  db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
7538
9347
  search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
7539
9348
  transactions: Awaited<ReturnType<TransactionPlugin<Schemas>['build']>>;
9349
+ sql: Awaited<ReturnType<SQLPlugin['build']>>;
9350
+ files: Awaited<ReturnType<FilesPlugin<Schemas>['build']>>;
7540
9351
  }, keyof Plugins> & {
7541
9352
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
7542
9353
  } & {
@@ -7568,23 +9379,29 @@ type SerializerResult<T> = T extends XataRecord ? Identifiable & Omit<{
7568
9379
 
7569
9380
  declare function getDatabaseURL(): string | undefined;
7570
9381
  declare function getAPIKey(): string | undefined;
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;
7571
9388
 
7572
9389
  interface Body {
7573
9390
  arrayBuffer(): Promise<ArrayBuffer>;
7574
- blob(): Promise<Blob>;
9391
+ blob(): Promise<Blob$1>;
7575
9392
  formData(): Promise<FormData>;
7576
9393
  json(): Promise<any>;
7577
9394
  text(): Promise<string>;
7578
9395
  }
7579
- interface Blob {
9396
+ interface Blob$1 {
7580
9397
  readonly size: number;
7581
9398
  readonly type: string;
7582
9399
  arrayBuffer(): Promise<ArrayBuffer>;
7583
- slice(start?: number, end?: number, contentType?: string): Blob;
9400
+ slice(start?: number, end?: number, contentType?: string): Blob$1;
7584
9401
  text(): Promise<string>;
7585
9402
  }
7586
9403
  /** Provides information about files and allows JavaScript in a web page to access their content. */
7587
- interface File extends Blob {
9404
+ interface File extends Blob$1 {
7588
9405
  readonly lastModified: number;
7589
9406
  readonly name: string;
7590
9407
  readonly webkitRelativePath: string;
@@ -7592,12 +9409,12 @@ interface File extends Blob {
7592
9409
  type FormDataEntryValue = File | string;
7593
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". */
7594
9411
  interface FormData {
7595
- append(name: string, value: string | Blob, fileName?: string): void;
9412
+ append(name: string, value: string | Blob$1, fileName?: string): void;
7596
9413
  delete(name: string): void;
7597
9414
  get(name: string): FormDataEntryValue | null;
7598
9415
  getAll(name: string): FormDataEntryValue[];
7599
9416
  has(name: string): boolean;
7600
- set(name: string, value: string | Blob, fileName?: string): void;
9417
+ set(name: string, value: string | Blob$1, fileName?: string): void;
7601
9418
  forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
7602
9419
  }
7603
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. */
@@ -7654,4 +9471,4 @@ declare class XataError extends Error {
7654
9471
  constructor(message: string, status: number);
7655
9472
  }
7656
9473
 
7657
- export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApiExtraProps, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BranchTransactionError, BranchTransactionPathParams, BranchTransactionRequestBody, BranchTransactionVariables, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, 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, 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, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, branchTransaction, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, 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, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
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 };