@xata.io/client 0.0.0-alpha.vfd68f4d → 0.0.0-alpha.vfd6ce53

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: () => Promise<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,7 +74,7 @@ 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;
@@ -82,12 +83,14 @@ type FetcherExtraProps = {
82
83
  clientName?: string;
83
84
  xataAgentExtra?: Record<string, string>;
84
85
  fetchOptions?: Record<string, unknown>;
86
+ rawResponse?: boolean;
87
+ headers?: Record<string, unknown>;
85
88
  };
86
89
 
87
90
  type ControlPlaneFetcherExtraProps = {
88
91
  apiUrl: string;
89
92
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
90
- fetchImpl: FetchImpl;
93
+ fetch: FetchImpl;
91
94
  apiKey: string;
92
95
  trace: TraceFunction;
93
96
  signal?: AbortSignal;
@@ -106,6 +109,26 @@ type ErrorWrapper$1<TError> = TError | {
106
109
  *
107
110
  * @version 1.0
108
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
+ };
109
132
  type User = {
110
133
  /**
111
134
  * @format email
@@ -130,6 +153,31 @@ type DateTime$1 = string;
130
153
  * @pattern [a-zA-Z0-9_\-~]*
131
154
  */
132
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;
133
181
  /**
134
182
  * @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
135
183
  * @x-go-type auth.WorkspaceID
@@ -139,6 +187,7 @@ type WorkspaceID = string;
139
187
  * @x-go-type auth.Role
140
188
  */
141
189
  type Role = 'owner' | 'maintainer';
190
+ type WorkspacePlan = 'free' | 'pro';
142
191
  type WorkspaceMeta = {
143
192
  name: string;
144
193
  slug?: string;
@@ -146,7 +195,7 @@ type WorkspaceMeta = {
146
195
  type Workspace = WorkspaceMeta & {
147
196
  id: WorkspaceID;
148
197
  memberCount: number;
149
- plan: 'free' | 'pro';
198
+ plan: WorkspacePlan;
150
199
  };
151
200
  type WorkspaceMember = {
152
201
  userId: UserID;
@@ -181,6 +230,170 @@ type WorkspaceMembers = {
181
230
  * @pattern ^ik_[a-zA-Z0-9]+
182
231
  */
183
232
  type InviteKey = string;
233
+ /**
234
+ * @x-internal true
235
+ * @pattern [a-zA-Z0-9_-~:]+
236
+ */
237
+ type ClusterID = string;
238
+ /**
239
+ * @x-internal true
240
+ */
241
+ type ClusterShortMetadata = {
242
+ id: ClusterID;
243
+ state: string;
244
+ region: string;
245
+ name: string;
246
+ /**
247
+ * @format int64
248
+ */
249
+ branches: number;
250
+ };
251
+ /**
252
+ * @x-internal true
253
+ */
254
+ type ListClustersResponse = {
255
+ clusters: ClusterShortMetadata[];
256
+ };
257
+ /**
258
+ * @x-internal true
259
+ */
260
+ type AutoscalingConfig = {
261
+ /**
262
+ * @format double
263
+ * @default 2
264
+ */
265
+ minCapacity?: number;
266
+ /**
267
+ * @format double
268
+ * @default 16
269
+ */
270
+ maxCapacity?: number;
271
+ };
272
+ /**
273
+ * @x-internal true
274
+ */
275
+ type WeeklyTimeWindow = {
276
+ day: 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
277
+ /**
278
+ * @maximum 24
279
+ * @minimum 0
280
+ */
281
+ hour: number;
282
+ /**
283
+ * @maximum 60
284
+ * @minimum 0
285
+ */
286
+ minute: number;
287
+ /**
288
+ * @format float
289
+ * @maximum 23.5
290
+ * @minimum 0.5
291
+ */
292
+ duration: number;
293
+ };
294
+ /**
295
+ * @x-internal true
296
+ */
297
+ type DailyTimeWindow = {
298
+ /**
299
+ * @maximum 24
300
+ * @minimum 0
301
+ */
302
+ hour: number;
303
+ /**
304
+ * @maximum 60
305
+ * @minimum 0
306
+ */
307
+ minute: number;
308
+ /**
309
+ * @format float
310
+ */
311
+ duration: number;
312
+ };
313
+ /**
314
+ * @x-internal true
315
+ */
316
+ type MaintenanceConfig = {
317
+ /**
318
+ * @default false
319
+ */
320
+ autoMinorVersionUpgrade?: boolean;
321
+ /**
322
+ * @default false
323
+ */
324
+ applyImmediately?: boolean;
325
+ maintenanceWindow?: WeeklyTimeWindow;
326
+ backupWindow?: DailyTimeWindow;
327
+ };
328
+ /**
329
+ * @x-internal true
330
+ */
331
+ type ClusterConfiguration = {
332
+ engineVersion: string;
333
+ instanceType: string;
334
+ /**
335
+ * @format int64
336
+ */
337
+ replicas?: number;
338
+ /**
339
+ * @default false
340
+ */
341
+ deletionProtection?: boolean;
342
+ autoscaling?: AutoscalingConfig;
343
+ maintenance?: MaintenanceConfig;
344
+ };
345
+ /**
346
+ * @x-internal true
347
+ */
348
+ type ClusterCreateDetails = {
349
+ /**
350
+ * @minLength 1
351
+ */
352
+ region: string;
353
+ /**
354
+ * @maxLength 63
355
+ * @minLength 1
356
+ * @pattern [a-zA-Z0-9_-~:]+
357
+ */
358
+ name: string;
359
+ configuration: ClusterConfiguration;
360
+ };
361
+ /**
362
+ * @x-internal true
363
+ */
364
+ type ClusterResponse = {
365
+ state: string;
366
+ clusterID: string;
367
+ };
368
+ /**
369
+ * @x-internal true
370
+ */
371
+ type ClusterMetadata = {
372
+ id: ClusterID;
373
+ state: string;
374
+ region: string;
375
+ name: string;
376
+ /**
377
+ * @format int64
378
+ */
379
+ branches: number;
380
+ configuration?: ClusterConfiguration;
381
+ };
382
+ /**
383
+ * @x-internal true
384
+ */
385
+ type ClusterUpdateDetails = {
386
+ id: ClusterID;
387
+ /**
388
+ * @maxLength 63
389
+ * @minLength 1
390
+ * @pattern [a-zA-Z0-9_-~:]+
391
+ */
392
+ name?: string;
393
+ configuration?: ClusterConfiguration;
394
+ state?: string;
395
+ region?: string;
396
+ };
184
397
  /**
185
398
  * Metadata of databases
186
399
  */
@@ -201,6 +414,10 @@ type DatabaseMetadata = {
201
414
  * @x-internal true
202
415
  */
203
416
  newMigrations?: boolean;
417
+ /**
418
+ * @x-internal true
419
+ */
420
+ defaultClusterID?: string;
204
421
  /**
205
422
  * Metadata about the database for display in Xata user interfaces
206
423
  */
@@ -261,6 +478,7 @@ type DatabaseGithubSettings = {
261
478
  };
262
479
  type Region = {
263
480
  id: string;
481
+ name: string;
264
482
  };
265
483
  type ListRegionsResponse = {
266
484
  /**
@@ -296,6 +514,53 @@ type SimpleError$1 = {
296
514
  * @version 1.0
297
515
  */
298
516
 
517
+ type GetAuthorizationCodeQueryParams = {
518
+ clientID: string;
519
+ responseType: OAuthResponseType;
520
+ redirectUri?: string;
521
+ scopes?: OAuthScope[];
522
+ state?: string;
523
+ };
524
+ type GetAuthorizationCodeError = ErrorWrapper$1<{
525
+ status: 400;
526
+ payload: BadRequestError$1;
527
+ } | {
528
+ status: 401;
529
+ payload: AuthError$1;
530
+ } | {
531
+ status: 404;
532
+ payload: SimpleError$1;
533
+ } | {
534
+ status: 409;
535
+ payload: SimpleError$1;
536
+ }>;
537
+ type GetAuthorizationCodeVariables = {
538
+ queryParams: GetAuthorizationCodeQueryParams;
539
+ } & ControlPlaneFetcherExtraProps;
540
+ /**
541
+ * Creates, stores and returns an authorization code to be used by a third party app. Supporting use of GET is required by OAuth2 spec
542
+ */
543
+ declare const getAuthorizationCode: (variables: GetAuthorizationCodeVariables, signal?: AbortSignal) => Promise<AuthorizationCodeResponse>;
544
+ type GrantAuthorizationCodeError = ErrorWrapper$1<{
545
+ status: 400;
546
+ payload: BadRequestError$1;
547
+ } | {
548
+ status: 401;
549
+ payload: AuthError$1;
550
+ } | {
551
+ status: 404;
552
+ payload: SimpleError$1;
553
+ } | {
554
+ status: 409;
555
+ payload: SimpleError$1;
556
+ }>;
557
+ type GrantAuthorizationCodeVariables = {
558
+ body: AuthorizationCodeRequest;
559
+ } & ControlPlaneFetcherExtraProps;
560
+ /**
561
+ * Creates, stores and returns an authorization code to be used by a third party app
562
+ */
563
+ declare const grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal) => Promise<AuthorizationCodeResponse>;
299
564
  type GetUserError = ErrorWrapper$1<{
300
565
  status: 400;
301
566
  payload: BadRequestError$1;
@@ -415,6 +680,115 @@ type DeleteUserAPIKeyVariables = {
415
680
  * Delete an existing API key
416
681
  */
417
682
  declare const deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
683
+ type GetUserOAuthClientsError = ErrorWrapper$1<{
684
+ status: 400;
685
+ payload: BadRequestError$1;
686
+ } | {
687
+ status: 401;
688
+ payload: AuthError$1;
689
+ } | {
690
+ status: 404;
691
+ payload: SimpleError$1;
692
+ }>;
693
+ type GetUserOAuthClientsResponse = {
694
+ clients?: OAuthClientPublicDetails[];
695
+ };
696
+ type GetUserOAuthClientsVariables = ControlPlaneFetcherExtraProps;
697
+ /**
698
+ * Retrieve the list of OAuth Clients that a user has authorized
699
+ */
700
+ declare const getUserOAuthClients: (variables: GetUserOAuthClientsVariables, signal?: AbortSignal) => Promise<GetUserOAuthClientsResponse>;
701
+ type DeleteUserOAuthClientPathParams = {
702
+ clientId: OAuthClientID;
703
+ };
704
+ type DeleteUserOAuthClientError = ErrorWrapper$1<{
705
+ status: 400;
706
+ payload: BadRequestError$1;
707
+ } | {
708
+ status: 401;
709
+ payload: AuthError$1;
710
+ } | {
711
+ status: 404;
712
+ payload: SimpleError$1;
713
+ }>;
714
+ type DeleteUserOAuthClientVariables = {
715
+ pathParams: DeleteUserOAuthClientPathParams;
716
+ } & ControlPlaneFetcherExtraProps;
717
+ /**
718
+ * Delete the oauth client for the user and revoke all access
719
+ */
720
+ declare const deleteUserOAuthClient: (variables: DeleteUserOAuthClientVariables, signal?: AbortSignal) => Promise<undefined>;
721
+ type GetUserOAuthAccessTokensError = ErrorWrapper$1<{
722
+ status: 400;
723
+ payload: BadRequestError$1;
724
+ } | {
725
+ status: 401;
726
+ payload: AuthError$1;
727
+ } | {
728
+ status: 404;
729
+ payload: SimpleError$1;
730
+ }>;
731
+ type GetUserOAuthAccessTokensResponse = {
732
+ accessTokens: OAuthAccessToken[];
733
+ };
734
+ type GetUserOAuthAccessTokensVariables = ControlPlaneFetcherExtraProps;
735
+ /**
736
+ * Retrieve the list of valid OAuth Access Tokens on the current user's account
737
+ */
738
+ declare const getUserOAuthAccessTokens: (variables: GetUserOAuthAccessTokensVariables, signal?: AbortSignal) => Promise<GetUserOAuthAccessTokensResponse>;
739
+ type DeleteOAuthAccessTokenPathParams = {
740
+ token: AccessToken;
741
+ };
742
+ type DeleteOAuthAccessTokenError = ErrorWrapper$1<{
743
+ status: 400;
744
+ payload: BadRequestError$1;
745
+ } | {
746
+ status: 401;
747
+ payload: AuthError$1;
748
+ } | {
749
+ status: 404;
750
+ payload: SimpleError$1;
751
+ } | {
752
+ status: 409;
753
+ payload: SimpleError$1;
754
+ }>;
755
+ type DeleteOAuthAccessTokenVariables = {
756
+ pathParams: DeleteOAuthAccessTokenPathParams;
757
+ } & ControlPlaneFetcherExtraProps;
758
+ /**
759
+ * Expires the access token for a third party app
760
+ */
761
+ declare const deleteOAuthAccessToken: (variables: DeleteOAuthAccessTokenVariables, signal?: AbortSignal) => Promise<undefined>;
762
+ type UpdateOAuthAccessTokenPathParams = {
763
+ token: AccessToken;
764
+ };
765
+ type UpdateOAuthAccessTokenError = ErrorWrapper$1<{
766
+ status: 400;
767
+ payload: BadRequestError$1;
768
+ } | {
769
+ status: 401;
770
+ payload: AuthError$1;
771
+ } | {
772
+ status: 404;
773
+ payload: SimpleError$1;
774
+ } | {
775
+ status: 409;
776
+ payload: SimpleError$1;
777
+ }>;
778
+ type UpdateOAuthAccessTokenRequestBody = {
779
+ /**
780
+ * expiration time of the token as a unix timestamp
781
+ */
782
+ expires: number;
783
+ };
784
+ type UpdateOAuthAccessTokenVariables = {
785
+ body: UpdateOAuthAccessTokenRequestBody;
786
+ pathParams: UpdateOAuthAccessTokenPathParams;
787
+ } & ControlPlaneFetcherExtraProps;
788
+ /**
789
+ * Updates partially the access token for a third party app
790
+ */
791
+ declare const updateOAuthAccessToken: (variables: UpdateOAuthAccessTokenVariables, signal?: AbortSignal) => Promise<OAuthAccessToken>;
418
792
  type GetWorkspacesListError = ErrorWrapper$1<{
419
793
  status: 400;
420
794
  payload: BadRequestError$1;
@@ -431,6 +805,7 @@ type GetWorkspacesListResponse = {
431
805
  name: string;
432
806
  slug: string;
433
807
  role: Role;
808
+ plan: WorkspacePlan;
434
809
  }[];
435
810
  };
436
811
  type GetWorkspacesListVariables = ControlPlaneFetcherExtraProps;
@@ -788,6 +1163,99 @@ type ResendWorkspaceMemberInviteVariables = {
788
1163
  * This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted.
789
1164
  */
790
1165
  declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
1166
+ type ListClustersPathParams = {
1167
+ /**
1168
+ * Workspace ID
1169
+ */
1170
+ workspaceId: WorkspaceID;
1171
+ };
1172
+ type ListClustersError = ErrorWrapper$1<{
1173
+ status: 400;
1174
+ payload: BadRequestError$1;
1175
+ } | {
1176
+ status: 401;
1177
+ payload: AuthError$1;
1178
+ }>;
1179
+ type ListClustersVariables = {
1180
+ pathParams: ListClustersPathParams;
1181
+ } & ControlPlaneFetcherExtraProps;
1182
+ /**
1183
+ * List all clusters available in your Workspace.
1184
+ */
1185
+ declare const listClusters: (variables: ListClustersVariables, signal?: AbortSignal) => Promise<ListClustersResponse>;
1186
+ type CreateClusterPathParams = {
1187
+ /**
1188
+ * Workspace ID
1189
+ */
1190
+ workspaceId: WorkspaceID;
1191
+ };
1192
+ type CreateClusterError = ErrorWrapper$1<{
1193
+ status: 400;
1194
+ payload: BadRequestError$1;
1195
+ } | {
1196
+ status: 401;
1197
+ payload: AuthError$1;
1198
+ } | {
1199
+ status: 422;
1200
+ payload: SimpleError$1;
1201
+ } | {
1202
+ status: 423;
1203
+ payload: SimpleError$1;
1204
+ }>;
1205
+ type CreateClusterVariables = {
1206
+ body: ClusterCreateDetails;
1207
+ pathParams: CreateClusterPathParams;
1208
+ } & ControlPlaneFetcherExtraProps;
1209
+ declare const createCluster: (variables: CreateClusterVariables, signal?: AbortSignal) => Promise<ClusterResponse>;
1210
+ type GetClusterPathParams = {
1211
+ /**
1212
+ * Workspace ID
1213
+ */
1214
+ workspaceId: WorkspaceID;
1215
+ /**
1216
+ * Cluster ID
1217
+ */
1218
+ clusterId: ClusterID;
1219
+ };
1220
+ type GetClusterError = ErrorWrapper$1<{
1221
+ status: 400;
1222
+ payload: BadRequestError$1;
1223
+ } | {
1224
+ status: 401;
1225
+ payload: AuthError$1;
1226
+ }>;
1227
+ type GetClusterVariables = {
1228
+ pathParams: GetClusterPathParams;
1229
+ } & ControlPlaneFetcherExtraProps;
1230
+ /**
1231
+ * Retrieve metadata for given cluster ID
1232
+ */
1233
+ declare const getCluster: (variables: GetClusterVariables, signal?: AbortSignal) => Promise<ClusterMetadata>;
1234
+ type UpdateClusterPathParams = {
1235
+ /**
1236
+ * Workspace ID
1237
+ */
1238
+ workspaceId: WorkspaceID;
1239
+ /**
1240
+ * Cluster ID
1241
+ */
1242
+ clusterId: ClusterID;
1243
+ };
1244
+ type UpdateClusterError = ErrorWrapper$1<{
1245
+ status: 400;
1246
+ payload: BadRequestError$1;
1247
+ } | {
1248
+ status: 401;
1249
+ payload: AuthError$1;
1250
+ }>;
1251
+ type UpdateClusterVariables = {
1252
+ body: ClusterUpdateDetails;
1253
+ pathParams: UpdateClusterPathParams;
1254
+ } & ControlPlaneFetcherExtraProps;
1255
+ /**
1256
+ * Update cluster for given cluster ID
1257
+ */
1258
+ declare const updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal) => Promise<ClusterMetadata>;
791
1259
  type GetDatabaseListPathParams = {
792
1260
  /**
793
1261
  * Workspace ID
@@ -848,6 +1316,13 @@ type CreateDatabaseRequestBody = {
848
1316
  * @minLength 1
849
1317
  */
850
1318
  region: string;
1319
+ /**
1320
+ * The dedicated cluster where branches from this database will be created. Defaults to 'shared-cluster'.
1321
+ *
1322
+ * @minLength 1
1323
+ * @x-internal true
1324
+ */
1325
+ defaultClusterID?: string;
851
1326
  ui?: {
852
1327
  color?: string;
853
1328
  };
@@ -945,6 +1420,13 @@ type UpdateDatabaseMetadataRequestBody = {
945
1420
  */
946
1421
  color?: string;
947
1422
  };
1423
+ /**
1424
+ * The dedicated cluster where branches from this database will be created. Defaults to 'shared-cluster'.
1425
+ *
1426
+ * @minLength 1
1427
+ * @x-internal true
1428
+ */
1429
+ defaultClusterID?: string;
948
1430
  };
949
1431
  type UpdateDatabaseMetadataVariables = {
950
1432
  body?: UpdateDatabaseMetadataRequestBody;
@@ -954,6 +1436,43 @@ type UpdateDatabaseMetadataVariables = {
954
1436
  * Update the color of the selected database
955
1437
  */
956
1438
  declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
1439
+ type RenameDatabasePathParams = {
1440
+ /**
1441
+ * Workspace ID
1442
+ */
1443
+ workspaceId: WorkspaceID;
1444
+ /**
1445
+ * The Database Name
1446
+ */
1447
+ dbName: DBName$1;
1448
+ };
1449
+ type RenameDatabaseError = ErrorWrapper$1<{
1450
+ status: 400;
1451
+ payload: BadRequestError$1;
1452
+ } | {
1453
+ status: 401;
1454
+ payload: AuthError$1;
1455
+ } | {
1456
+ status: 422;
1457
+ payload: SimpleError$1;
1458
+ } | {
1459
+ status: 423;
1460
+ payload: SimpleError$1;
1461
+ }>;
1462
+ type RenameDatabaseRequestBody = {
1463
+ /**
1464
+ * @minLength 1
1465
+ */
1466
+ newName: string;
1467
+ };
1468
+ type RenameDatabaseVariables = {
1469
+ body: RenameDatabaseRequestBody;
1470
+ pathParams: RenameDatabasePathParams;
1471
+ } & ControlPlaneFetcherExtraProps;
1472
+ /**
1473
+ * Change the name of an existing database
1474
+ */
1475
+ declare const renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
957
1476
  type GetDatabaseGithubSettingsPathParams = {
958
1477
  /**
959
1478
  * Workspace ID
@@ -1065,6 +1584,31 @@ declare const listRegions: (variables: ListRegionsVariables, signal?: AbortSigna
1065
1584
  *
1066
1585
  * @version 1.0
1067
1586
  */
1587
+ /**
1588
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
1589
+ *
1590
+ * @maxLength 511
1591
+ * @minLength 1
1592
+ * @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
1593
+ */
1594
+ type DBBranchName = string;
1595
+ type PgRollApplyMigrationResponse = {
1596
+ /**
1597
+ * The id of the applied migration
1598
+ */
1599
+ migrationID: string;
1600
+ };
1601
+ type PgRollMigrationStatus = 'no migrations' | 'in progress' | 'complete';
1602
+ type PgRollStatusResponse = {
1603
+ /**
1604
+ * The status of the most recent migration
1605
+ */
1606
+ status: PgRollMigrationStatus;
1607
+ /**
1608
+ * The name of the most recent version
1609
+ */
1610
+ version: string;
1611
+ };
1068
1612
  /**
1069
1613
  * @maxLength 255
1070
1614
  * @minLength 1
@@ -1084,14 +1628,6 @@ type ListBranchesResponse = {
1084
1628
  databaseName: string;
1085
1629
  branches: Branch[];
1086
1630
  };
1087
- /**
1088
- * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
1089
- *
1090
- * @maxLength 511
1091
- * @minLength 1
1092
- * @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
1093
- */
1094
- type DBBranchName = string;
1095
1631
  /**
1096
1632
  * @maxLength 255
1097
1633
  * @minLength 1
@@ -1128,18 +1664,31 @@ type TableName = string;
1128
1664
  type ColumnLink = {
1129
1665
  table: string;
1130
1666
  };
1667
+ type ColumnVector = {
1668
+ /**
1669
+ * @maximum 10000
1670
+ * @minimum 2
1671
+ */
1672
+ dimension: number;
1673
+ };
1674
+ type ColumnFile = {
1675
+ defaultPublicAccess?: boolean;
1676
+ };
1131
1677
  type Column = {
1132
1678
  name: string;
1133
- type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime';
1679
+ type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file' | 'json';
1134
1680
  link?: ColumnLink;
1681
+ vector?: ColumnVector;
1682
+ file?: ColumnFile;
1683
+ ['file[]']?: ColumnFile;
1135
1684
  notNull?: boolean;
1136
1685
  defaultValue?: string;
1137
1686
  unique?: boolean;
1138
1687
  columns?: Column[];
1139
1688
  };
1140
1689
  type RevLink = {
1141
- linkID: string;
1142
1690
  table: string;
1691
+ column: string;
1143
1692
  };
1144
1693
  type Table = {
1145
1694
  id?: string;
@@ -1166,6 +1715,11 @@ type DBBranch = {
1166
1715
  schema: Schema;
1167
1716
  };
1168
1717
  type MigrationStatus = 'completed' | 'pending' | 'failed';
1718
+ type BranchWithCopyID = {
1719
+ branchName: BranchName;
1720
+ dbBranchID: string;
1721
+ copyID: string;
1722
+ };
1169
1723
  type MetricsDatapoint = {
1170
1724
  timestamp: string;
1171
1725
  value: number;
@@ -1256,9 +1810,11 @@ type FilterPredicateOp = {
1256
1810
  $gt?: FilterRangeValue;
1257
1811
  $ge?: FilterRangeValue;
1258
1812
  $contains?: string;
1813
+ $iContains?: string;
1259
1814
  $startsWith?: string;
1260
1815
  $endsWith?: string;
1261
1816
  $pattern?: string;
1817
+ $iPattern?: string;
1262
1818
  };
1263
1819
  /**
1264
1820
  * @maxProperties 2
@@ -1281,7 +1837,7 @@ type FilterColumnIncludes = {
1281
1837
  $includesNone?: FilterPredicate;
1282
1838
  };
1283
1839
  type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
1284
- type SortOrder = 'asc' | 'desc';
1840
+ type SortOrder = 'asc' | 'desc' | 'random';
1285
1841
  type SortExpression = string[] | {
1286
1842
  [key: string]: SortOrder;
1287
1843
  } | {
@@ -1379,9 +1935,13 @@ type RecordsMetadata = {
1379
1935
  */
1380
1936
  cursor: string;
1381
1937
  /**
1382
- * true if more records can be fetch
1938
+ * true if more records can be fetched
1383
1939
  */
1384
1940
  more: boolean;
1941
+ /**
1942
+ * the number of records returned per page
1943
+ */
1944
+ size: number;
1385
1945
  };
1386
1946
  };
1387
1947
  type TableOpAdd = {
@@ -1430,10 +1990,9 @@ type Commit = {
1430
1990
  message?: string;
1431
1991
  id: string;
1432
1992
  parentID?: string;
1993
+ checksum: string;
1433
1994
  mergeParentID?: string;
1434
- status: MigrationStatus;
1435
1995
  createdAt: DateTime;
1436
- modifiedAt?: DateTime;
1437
1996
  operations: MigrationOp[];
1438
1997
  };
1439
1998
  type SchemaEditScript = {
@@ -1441,6 +2000,16 @@ type SchemaEditScript = {
1441
2000
  targetMigrationID?: string;
1442
2001
  operations: MigrationOp[];
1443
2002
  };
2003
+ type BranchOp = {
2004
+ id: string;
2005
+ parentID?: string;
2006
+ title?: string;
2007
+ message?: string;
2008
+ status: MigrationStatus;
2009
+ createdAt: DateTime;
2010
+ modifiedAt?: DateTime;
2011
+ migration?: Commit;
2012
+ };
1444
2013
  /**
1445
2014
  * Branch schema migration.
1446
2015
  */
@@ -1448,6 +2017,14 @@ type Migration = {
1448
2017
  parentID?: string;
1449
2018
  operations: MigrationOp[];
1450
2019
  };
2020
+ type MigrationObject = {
2021
+ title?: string;
2022
+ message?: string;
2023
+ id: string;
2024
+ parentID?: string;
2025
+ checksum: string;
2026
+ operations: MigrationOp[];
2027
+ };
1451
2028
  /**
1452
2029
  * @pattern [a-zA-Z0-9_\-~\.]+
1453
2030
  */
@@ -1481,8 +2058,14 @@ type TransactionInsertOp = {
1481
2058
  * conflict, the record is inserted. If there is a conflict, Xata will replace the record.
1482
2059
  */
1483
2060
  createOnly?: boolean;
2061
+ /**
2062
+ * If set, the call will return the requested fields as part of the response.
2063
+ */
2064
+ columns?: string[];
1484
2065
  };
1485
2066
  /**
2067
+ * @maxLength 255
2068
+ * @minLength 1
1486
2069
  * @pattern [a-zA-Z0-9_-~:]+
1487
2070
  */
1488
2071
  type RecordID = string;
@@ -1509,9 +2092,13 @@ type TransactionUpdateOp = {
1509
2092
  * Xata will insert this record if it cannot be found.
1510
2093
  */
1511
2094
  upsert?: boolean;
2095
+ /**
2096
+ * If set, the call will return the requested fields as part of the response.
2097
+ */
2098
+ columns?: string[];
1512
2099
  };
1513
2100
  /**
1514
- * A delete operation. The transaction will continue if no record matches the ID.
2101
+ * A delete operation. The transaction will continue if no record matches the ID by default. To override this behaviour, set failIfMissing to true.
1515
2102
  */
1516
2103
  type TransactionDeleteOp = {
1517
2104
  /**
@@ -1519,6 +2106,28 @@ type TransactionDeleteOp = {
1519
2106
  */
1520
2107
  table: string;
1521
2108
  id: RecordID;
2109
+ /**
2110
+ * If true, the transaction will fail when the record doesn't exist.
2111
+ */
2112
+ failIfMissing?: boolean;
2113
+ /**
2114
+ * If set, the call will return the requested fields as part of the response.
2115
+ */
2116
+ columns?: string[];
2117
+ };
2118
+ /**
2119
+ * Get by id operation.
2120
+ */
2121
+ type TransactionGetOp = {
2122
+ /**
2123
+ * The table name
2124
+ */
2125
+ table: string;
2126
+ id: RecordID;
2127
+ /**
2128
+ * If set, the call will return the requested fields as part of the response.
2129
+ */
2130
+ columns?: string[];
1522
2131
  };
1523
2132
  /**
1524
2133
  * A transaction operation
@@ -1529,6 +2138,14 @@ type TransactionOperation$1 = {
1529
2138
  update: TransactionUpdateOp;
1530
2139
  } | {
1531
2140
  ['delete']: TransactionDeleteOp;
2141
+ } | {
2142
+ get: TransactionGetOp;
2143
+ };
2144
+ /**
2145
+ * Fields to return in the transaction result.
2146
+ */
2147
+ type TransactionResultColumns = {
2148
+ [key: string]: any;
1532
2149
  };
1533
2150
  /**
1534
2151
  * A result from an insert operation.
@@ -1543,6 +2160,7 @@ type TransactionResultInsert = {
1543
2160
  */
1544
2161
  rows: number;
1545
2162
  id: RecordID;
2163
+ columns?: TransactionResultColumns;
1546
2164
  };
1547
2165
  /**
1548
2166
  * A result from an update operation.
@@ -1557,6 +2175,7 @@ type TransactionResultUpdate = {
1557
2175
  */
1558
2176
  rows: number;
1559
2177
  id: RecordID;
2178
+ columns?: TransactionResultColumns;
1560
2179
  };
1561
2180
  /**
1562
2181
  * A result from a delete operation.
@@ -1570,12 +2189,23 @@ type TransactionResultDelete = {
1570
2189
  * The number of deleted rows
1571
2190
  */
1572
2191
  rows: number;
2192
+ columns?: TransactionResultColumns;
2193
+ };
2194
+ /**
2195
+ * A result from a get operation.
2196
+ */
2197
+ type TransactionResultGet = {
2198
+ /**
2199
+ * The type of operation who's result is being returned.
2200
+ */
2201
+ operation: 'get';
2202
+ columns?: TransactionResultColumns;
1573
2203
  };
1574
2204
  /**
1575
2205
  * An ordered array of results from the submitted operations.
1576
2206
  */
1577
2207
  type TransactionSuccess = {
1578
- results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
2208
+ results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete | TransactionResultGet)[];
1579
2209
  };
1580
2210
  /**
1581
2211
  * An error message from a failing transaction operation
@@ -1591,7 +2221,7 @@ type TransactionError = {
1591
2221
  message: string;
1592
2222
  };
1593
2223
  /**
1594
- * An array of errors, with indicides, from the transaction.
2224
+ * An array of errors, with indices, from the transaction.
1595
2225
  */
1596
2226
  type TransactionFailure = {
1597
2227
  /**
@@ -1603,6 +2233,93 @@ type TransactionFailure = {
1603
2233
  */
1604
2234
  errors: TransactionError[];
1605
2235
  };
2236
+ /**
2237
+ * Object column value
2238
+ */
2239
+ type ObjectValue = {
2240
+ [key: string]: string | boolean | number | string[] | number[] | DateTime | ObjectValue;
2241
+ };
2242
+ /**
2243
+ * Unique file identifier
2244
+ *
2245
+ * @maxLength 255
2246
+ * @minLength 1
2247
+ * @pattern [a-zA-Z0-9_-~:]+
2248
+ */
2249
+ type FileItemID = string;
2250
+ /**
2251
+ * File name
2252
+ *
2253
+ * @maxLength 1024
2254
+ * @minLength 0
2255
+ * @pattern [0-9a-zA-Z!\-_\.\*'\(\)]*
2256
+ */
2257
+ type FileName = string;
2258
+ /**
2259
+ * Media type
2260
+ *
2261
+ * @maxLength 255
2262
+ * @minLength 3
2263
+ * @pattern ^\w+/[-+.\w]+$
2264
+ */
2265
+ type MediaType = string;
2266
+ /**
2267
+ * Object representing a file in an array
2268
+ */
2269
+ type InputFileEntry = {
2270
+ id?: FileItemID;
2271
+ name?: FileName;
2272
+ mediaType?: MediaType;
2273
+ /**
2274
+ * Base64 encoded content
2275
+ *
2276
+ * @maxLength 20971520
2277
+ */
2278
+ base64Content?: string;
2279
+ /**
2280
+ * Enable public access to the file
2281
+ */
2282
+ enablePublicUrl?: boolean;
2283
+ /**
2284
+ * Time to live for signed URLs
2285
+ */
2286
+ signedUrlTimeout?: number;
2287
+ };
2288
+ /**
2289
+ * Array of file entries
2290
+ *
2291
+ * @maxItems 50
2292
+ */
2293
+ type InputFileArray = InputFileEntry[];
2294
+ /**
2295
+ * Object representing a file
2296
+ *
2297
+ * @x-go-type file.InputFile
2298
+ */
2299
+ type InputFile = {
2300
+ name: FileName;
2301
+ mediaType?: MediaType;
2302
+ /**
2303
+ * Base64 encoded content
2304
+ *
2305
+ * @maxLength 20971520
2306
+ */
2307
+ base64Content?: string;
2308
+ /**
2309
+ * Enable public access to the file
2310
+ */
2311
+ enablePublicUrl?: boolean;
2312
+ /**
2313
+ * Time to live for signed URLs
2314
+ */
2315
+ signedUrlTimeout?: number;
2316
+ };
2317
+ /**
2318
+ * Xata input record
2319
+ */
2320
+ type DataInputRecord = {
2321
+ [key: string]: RecordID | string | boolean | number | string[] | number[] | DateTime | ObjectValue | InputFileArray | InputFile | null;
2322
+ };
1606
2323
  /**
1607
2324
  * Xata Table Record Metadata
1608
2325
  */
@@ -1613,6 +2330,14 @@ type RecordMeta = {
1613
2330
  * The record's version. Can be used for optimistic concurrency control.
1614
2331
  */
1615
2332
  version: number;
2333
+ /**
2334
+ * The time when the record was created.
2335
+ */
2336
+ createdAt?: string;
2337
+ /**
2338
+ * The time when the record was last updated.
2339
+ */
2340
+ updatedAt?: string;
1616
2341
  /**
1617
2342
  * The record's table name. APIs that return records from multiple tables will set this field accordingly.
1618
2343
  */
@@ -1635,6 +2360,47 @@ type RecordMeta = {
1635
2360
  warnings?: string[];
1636
2361
  };
1637
2362
  };
2363
+ /**
2364
+ * File metadata
2365
+ */
2366
+ type FileResponse = {
2367
+ id?: FileItemID;
2368
+ name: FileName;
2369
+ mediaType: MediaType;
2370
+ /**
2371
+ * @format int64
2372
+ */
2373
+ size: number;
2374
+ /**
2375
+ * @format int64
2376
+ */
2377
+ version: number;
2378
+ attributes?: Record<string, any>;
2379
+ };
2380
+ type QueryColumnsProjection = (string | ProjectionConfig)[];
2381
+ /**
2382
+ * A structured projection that allows for some configuration.
2383
+ */
2384
+ type ProjectionConfig = {
2385
+ /**
2386
+ * 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).
2387
+ */
2388
+ name?: string;
2389
+ columns?: QueryColumnsProjection;
2390
+ /**
2391
+ * An alias for the projected field, this is how it will be returned in the response.
2392
+ */
2393
+ as?: string;
2394
+ sort?: SortExpression;
2395
+ /**
2396
+ * @default 20
2397
+ */
2398
+ limit?: number;
2399
+ /**
2400
+ * @default 0
2401
+ */
2402
+ offset?: number;
2403
+ };
1638
2404
  /**
1639
2405
  * The target expression is used to filter the search results by the target columns.
1640
2406
  */
@@ -1665,7 +2431,7 @@ type ValueBooster$1 = {
1665
2431
  */
1666
2432
  value: string | number | boolean;
1667
2433
  /**
1668
- * The factor with which to multiply the score of the record.
2434
+ * The factor with which to multiply the added boost.
1669
2435
  */
1670
2436
  factor: number;
1671
2437
  /**
@@ -1707,7 +2473,8 @@ type NumericBooster$1 = {
1707
2473
  /**
1708
2474
  * Boost records based on the value of a datetime column. It is configured via "origin", "scale", and "decay". The further away from the "origin",
1709
2475
  * 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
1710
- * 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.
2476
+ * 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.
2477
+ * 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.
1711
2478
  */
1712
2479
  type DateBooster$1 = {
1713
2480
  /**
@@ -1720,7 +2487,7 @@ type DateBooster$1 = {
1720
2487
  */
1721
2488
  origin?: string;
1722
2489
  /**
1723
- * 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`.
2490
+ * 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`.
1724
2491
  *
1725
2492
  * @pattern ^(\d+)(d|h|m|s|ms)$
1726
2493
  */
@@ -1729,6 +2496,12 @@ type DateBooster$1 = {
1729
2496
  * The decay factor to expect at "scale" distance from the "origin".
1730
2497
  */
1731
2498
  decay: number;
2499
+ /**
2500
+ * The factor with which to multiply the added boost.
2501
+ *
2502
+ * @minimum 0
2503
+ */
2504
+ factor?: number;
1732
2505
  /**
1733
2506
  * Only apply this booster to the records for which the provided filter matches.
1734
2507
  */
@@ -1749,7 +2522,7 @@ type BoosterExpression = {
1749
2522
  /**
1750
2523
  * Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
1751
2524
  * distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
1752
- * character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
2525
+ * character typos per word are tolerated by search. You can set it to 0 to remove the typo tolerance or set it to 2
1753
2526
  * to allow two typos in a word.
1754
2527
  *
1755
2528
  * @default 1
@@ -1886,6 +2659,16 @@ type AverageAgg = {
1886
2659
  */
1887
2660
  column: string;
1888
2661
  };
2662
+ /**
2663
+ * Calculate given percentiles of the numeric values in a particular column.
2664
+ */
2665
+ type PercentilesAgg = {
2666
+ /**
2667
+ * The column on which to compute the average. Must be a numeric type.
2668
+ */
2669
+ column: string;
2670
+ percentiles: number[];
2671
+ };
1889
2672
  /**
1890
2673
  * Count the number of distinct values in a particular column.
1891
2674
  */
@@ -1896,7 +2679,7 @@ type UniqueCountAgg = {
1896
2679
  column: string;
1897
2680
  /**
1898
2681
  * The threshold under which the unique count is exact. If the number of unique
1899
- * values in the column is higher than this threshold, the results are approximative.
2682
+ * values in the column is higher than this threshold, the results are approximate.
1900
2683
  * Maximum value is 40,000, default value is 3000.
1901
2684
  */
1902
2685
  precisionThreshold?: number;
@@ -1919,7 +2702,7 @@ type DateHistogramAgg = {
1919
2702
  column: string;
1920
2703
  /**
1921
2704
  * The fixed interval to use when bucketing.
1922
- * It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
2705
+ * It is formatted as number + units, for example: `5d`, `20m`, `10s`.
1923
2706
  *
1924
2707
  * @pattern ^(\d+)(d|h|m|s|ms)$
1925
2708
  */
@@ -1974,7 +2757,7 @@ type NumericHistogramAgg = {
1974
2757
  interval: number;
1975
2758
  /**
1976
2759
  * By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
1977
- * boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
2760
+ * boundaries can be shifted by using the offset option. For example, if the `interval` is 100,
1978
2761
  * but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
1979
2762
  * to 50.
1980
2763
  *
@@ -2000,6 +2783,8 @@ type AggExpression = {
2000
2783
  min?: MinAgg;
2001
2784
  } | {
2002
2785
  average?: AverageAgg;
2786
+ } | {
2787
+ percentiles?: PercentilesAgg;
2003
2788
  } | {
2004
2789
  uniqueCount?: UniqueCountAgg;
2005
2790
  } | {
@@ -2015,7 +2800,27 @@ type AggResponse$1 = (number | null) | {
2015
2800
  $count: number;
2016
2801
  } & {
2017
2802
  [key: string]: AggResponse$1;
2018
- })[];
2803
+ })[] | {
2804
+ [key: string]: number;
2805
+ };
2806
+ };
2807
+ /**
2808
+ * File identifier in access URLs
2809
+ *
2810
+ * @maxLength 296
2811
+ * @minLength 88
2812
+ * @pattern [a-v0-9=]+
2813
+ */
2814
+ type FileAccessID = string;
2815
+ /**
2816
+ * File signature
2817
+ */
2818
+ type FileSignature = string;
2819
+ /**
2820
+ * Xata Table SQL Record
2821
+ */
2822
+ type SQLRecord = {
2823
+ [key: string]: any;
2019
2824
  };
2020
2825
  /**
2021
2826
  * Xata Table Record Metadata
@@ -2062,12 +2867,19 @@ type SchemaCompareResponse = {
2062
2867
  target: Schema;
2063
2868
  edits: SchemaEditScript;
2064
2869
  };
2870
+ type RateLimitError = {
2871
+ id?: string;
2872
+ message: string;
2873
+ };
2065
2874
  type RecordUpdateResponse = XataRecord$1 | {
2066
2875
  id: string;
2067
2876
  xata: {
2068
2877
  version: number;
2878
+ createdAt: string;
2879
+ updatedAt: string;
2069
2880
  };
2070
2881
  };
2882
+ type PutFileResponse = FileResponse;
2071
2883
  type RecordResponse = XataRecord$1;
2072
2884
  type BulkInsertResponse = {
2073
2885
  recordIDs: string[];
@@ -2084,9 +2896,17 @@ type QueryResponse = {
2084
2896
  records: XataRecord$1[];
2085
2897
  meta: RecordsMetadata;
2086
2898
  };
2899
+ type ServiceUnavailableError = {
2900
+ id?: string;
2901
+ message: string;
2902
+ };
2087
2903
  type SearchResponse = {
2088
2904
  records: XataRecord$1[];
2089
2905
  warning?: string;
2906
+ /**
2907
+ * The total count of records matched. It will be accurately returned up to 10000 records.
2908
+ */
2909
+ totalCount: number;
2090
2910
  };
2091
2911
  type SummarizeResponse = {
2092
2912
  summaries: Record<string, any>[];
@@ -2099,11 +2919,23 @@ type AggResponse = {
2099
2919
  [key: string]: AggResponse$1;
2100
2920
  };
2101
2921
  };
2922
+ type SQLResponse = {
2923
+ records?: SQLRecord[];
2924
+ /**
2925
+ * Name of the column and its PostgreSQL type
2926
+ */
2927
+ columns?: Record<string, any>;
2928
+ /**
2929
+ * Number of selected columns
2930
+ */
2931
+ total?: number;
2932
+ warning?: string;
2933
+ };
2102
2934
 
2103
2935
  type DataPlaneFetcherExtraProps = {
2104
2936
  apiUrl: string;
2105
2937
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
2106
- fetchImpl: FetchImpl;
2938
+ fetch: FetchImpl;
2107
2939
  apiKey: string;
2108
2940
  trace: TraceFunction;
2109
2941
  signal?: AbortSignal;
@@ -2111,6 +2943,8 @@ type DataPlaneFetcherExtraProps = {
2111
2943
  sessionID?: string;
2112
2944
  clientName?: string;
2113
2945
  xataAgentExtra?: Record<string, string>;
2946
+ rawResponse?: boolean;
2947
+ headers?: Record<string, unknown>;
2114
2948
  };
2115
2949
  type ErrorWrapper<TError> = TError | {
2116
2950
  status: 'unknown';
@@ -2123,6 +2957,57 @@ type ErrorWrapper<TError> = TError | {
2123
2957
  * @version 1.0
2124
2958
  */
2125
2959
 
2960
+ type ApplyMigrationPathParams = {
2961
+ /**
2962
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2963
+ */
2964
+ dbBranchName: DBBranchName;
2965
+ workspace: string;
2966
+ region: string;
2967
+ };
2968
+ type ApplyMigrationError = ErrorWrapper<{
2969
+ status: 400;
2970
+ payload: BadRequestError;
2971
+ } | {
2972
+ status: 401;
2973
+ payload: AuthError;
2974
+ } | {
2975
+ status: 404;
2976
+ payload: SimpleError;
2977
+ }>;
2978
+ type ApplyMigrationRequestBody = {
2979
+ [key: string]: any;
2980
+ }[];
2981
+ type ApplyMigrationVariables = {
2982
+ body?: ApplyMigrationRequestBody;
2983
+ pathParams: ApplyMigrationPathParams;
2984
+ } & DataPlaneFetcherExtraProps;
2985
+ /**
2986
+ * Applies a pgroll migration to the specified database.
2987
+ */
2988
+ declare const applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal) => Promise<PgRollApplyMigrationResponse>;
2989
+ type PgRollStatusPathParams = {
2990
+ /**
2991
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2992
+ */
2993
+ dbBranchName: DBBranchName;
2994
+ workspace: string;
2995
+ region: string;
2996
+ };
2997
+ type PgRollStatusError = ErrorWrapper<{
2998
+ status: 400;
2999
+ payload: BadRequestError;
3000
+ } | {
3001
+ status: 401;
3002
+ payload: AuthError;
3003
+ } | {
3004
+ status: 404;
3005
+ payload: SimpleError;
3006
+ }>;
3007
+ type PgRollStatusVariables = {
3008
+ pathParams: PgRollStatusPathParams;
3009
+ } & DataPlaneFetcherExtraProps;
3010
+ declare const pgRollStatus: (variables: PgRollStatusVariables, signal?: AbortSignal) => Promise<PgRollStatusResponse>;
2126
3011
  type GetBranchListPathParams = {
2127
3012
  /**
2128
3013
  * The Database Name
@@ -2210,6 +3095,13 @@ type CreateBranchRequestBody = {
2210
3095
  * Select the branch to fork from. Defaults to 'main'
2211
3096
  */
2212
3097
  from?: string;
3098
+ /**
3099
+ * Select the dedicated cluster to create on. Defaults to 'xata-cloud'
3100
+ *
3101
+ * @minLength 1
3102
+ * @x-internal true
3103
+ */
3104
+ clusterID?: string;
2213
3105
  metadata?: BranchMetadata;
2214
3106
  };
2215
3107
  type CreateBranchVariables = {
@@ -2226,7 +3118,38 @@ type DeleteBranchPathParams = {
2226
3118
  workspace: string;
2227
3119
  region: string;
2228
3120
  };
2229
- type DeleteBranchError = ErrorWrapper<{
3121
+ type DeleteBranchError = ErrorWrapper<{
3122
+ status: 400;
3123
+ payload: BadRequestError;
3124
+ } | {
3125
+ status: 401;
3126
+ payload: AuthError;
3127
+ } | {
3128
+ status: 404;
3129
+ payload: SimpleError;
3130
+ } | {
3131
+ status: 409;
3132
+ payload: SimpleError;
3133
+ }>;
3134
+ type DeleteBranchResponse = {
3135
+ status: MigrationStatus;
3136
+ };
3137
+ type DeleteBranchVariables = {
3138
+ pathParams: DeleteBranchPathParams;
3139
+ } & DataPlaneFetcherExtraProps;
3140
+ /**
3141
+ * Delete the branch in the database and all its resources
3142
+ */
3143
+ declare const deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<DeleteBranchResponse>;
3144
+ type GetSchemaPathParams = {
3145
+ /**
3146
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3147
+ */
3148
+ dbBranchName: DBBranchName;
3149
+ workspace: string;
3150
+ region: string;
3151
+ };
3152
+ type GetSchemaError = ErrorWrapper<{
2230
3153
  status: 400;
2231
3154
  payload: BadRequestError;
2232
3155
  } | {
@@ -2235,20 +3158,44 @@ type DeleteBranchError = ErrorWrapper<{
2235
3158
  } | {
2236
3159
  status: 404;
2237
3160
  payload: SimpleError;
3161
+ }>;
3162
+ type GetSchemaResponse = {
3163
+ schema: Record<string, any>;
3164
+ };
3165
+ type GetSchemaVariables = {
3166
+ pathParams: GetSchemaPathParams;
3167
+ } & DataPlaneFetcherExtraProps;
3168
+ declare const getSchema: (variables: GetSchemaVariables, signal?: AbortSignal) => Promise<GetSchemaResponse>;
3169
+ type CopyBranchPathParams = {
3170
+ /**
3171
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3172
+ */
3173
+ dbBranchName: DBBranchName;
3174
+ workspace: string;
3175
+ region: string;
3176
+ };
3177
+ type CopyBranchError = ErrorWrapper<{
3178
+ status: 400;
3179
+ payload: BadRequestError;
2238
3180
  } | {
2239
- status: 409;
3181
+ status: 401;
3182
+ payload: AuthError;
3183
+ } | {
3184
+ status: 404;
2240
3185
  payload: SimpleError;
2241
3186
  }>;
2242
- type DeleteBranchResponse = {
2243
- status: MigrationStatus;
3187
+ type CopyBranchRequestBody = {
3188
+ destinationBranch: string;
3189
+ limit?: number;
2244
3190
  };
2245
- type DeleteBranchVariables = {
2246
- pathParams: DeleteBranchPathParams;
3191
+ type CopyBranchVariables = {
3192
+ body: CopyBranchRequestBody;
3193
+ pathParams: CopyBranchPathParams;
2247
3194
  } & DataPlaneFetcherExtraProps;
2248
3195
  /**
2249
- * Delete the branch in the database and all its resources
3196
+ * Create a copy of the branch
2250
3197
  */
2251
- declare const deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<DeleteBranchResponse>;
3198
+ declare const copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal) => Promise<BranchWithCopyID>;
2252
3199
  type UpdateBranchMetadataPathParams = {
2253
3200
  /**
2254
3201
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -2893,7 +3840,7 @@ type MergeMigrationRequestError = ErrorWrapper<{
2893
3840
  type MergeMigrationRequestVariables = {
2894
3841
  pathParams: MergeMigrationRequestPathParams;
2895
3842
  } & DataPlaneFetcherExtraProps;
2896
- declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<Commit>;
3843
+ declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<BranchOp>;
2897
3844
  type GetBranchSchemaHistoryPathParams = {
2898
3845
  /**
2899
3846
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3090,6 +4037,44 @@ type ApplyBranchSchemaEditVariables = {
3090
4037
  pathParams: ApplyBranchSchemaEditPathParams;
3091
4038
  } & DataPlaneFetcherExtraProps;
3092
4039
  declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
4040
+ type PushBranchMigrationsPathParams = {
4041
+ /**
4042
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4043
+ */
4044
+ dbBranchName: DBBranchName;
4045
+ workspace: string;
4046
+ region: string;
4047
+ };
4048
+ type PushBranchMigrationsError = ErrorWrapper<{
4049
+ status: 400;
4050
+ payload: BadRequestError;
4051
+ } | {
4052
+ status: 401;
4053
+ payload: AuthError;
4054
+ } | {
4055
+ status: 404;
4056
+ payload: SimpleError;
4057
+ }>;
4058
+ type PushBranchMigrationsRequestBody = {
4059
+ migrations: MigrationObject[];
4060
+ };
4061
+ type PushBranchMigrationsVariables = {
4062
+ body: PushBranchMigrationsRequestBody;
4063
+ pathParams: PushBranchMigrationsPathParams;
4064
+ } & DataPlaneFetcherExtraProps;
4065
+ /**
4066
+ * The `schema/push` API accepts a list of migrations to be applied to the
4067
+ * current branch. A list of applicable migrations can be fetched using
4068
+ * the `schema/history` API from another branch or database.
4069
+ *
4070
+ * The most recent migration must be part of the list or referenced (via
4071
+ * `parentID`) by the first migration in the list of migrations to be pushed.
4072
+ *
4073
+ * Each migration in the list has an `id`, `parentID`, and `checksum`. The
4074
+ * checksum for migrations are generated and verified by xata. The
4075
+ * operation fails if any migration in the list has an invalid checksum.
4076
+ */
4077
+ declare const pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3093
4078
  type CreateTablePathParams = {
3094
4079
  /**
3095
4080
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3330,9 +4315,7 @@ type AddTableColumnVariables = {
3330
4315
  pathParams: AddTableColumnPathParams;
3331
4316
  } & DataPlaneFetcherExtraProps;
3332
4317
  /**
3333
- * 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
3334
- * contain the full path separated by dots. If the parent objects do not exists, they will be automatically created. For example,
3335
- * passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
4318
+ * Adds a new column to the table. The body of the request should contain the column definition.
3336
4319
  */
3337
4320
  declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3338
4321
  type GetColumnPathParams = {
@@ -3365,7 +4348,7 @@ type GetColumnVariables = {
3365
4348
  pathParams: GetColumnPathParams;
3366
4349
  } & DataPlaneFetcherExtraProps;
3367
4350
  /**
3368
- * Get the definition of a single column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
4351
+ * Get the definition of a single column.
3369
4352
  */
3370
4353
  declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
3371
4354
  type UpdateColumnPathParams = {
@@ -3405,7 +4388,7 @@ type UpdateColumnVariables = {
3405
4388
  pathParams: UpdateColumnPathParams;
3406
4389
  } & DataPlaneFetcherExtraProps;
3407
4390
  /**
3408
- * 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`.
4391
+ * Update column with partial data. Can be used for renaming the column by providing a new "name" field.
3409
4392
  */
3410
4393
  declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3411
4394
  type DeleteColumnPathParams = {
@@ -3438,7 +4421,7 @@ type DeleteColumnVariables = {
3438
4421
  pathParams: DeleteColumnPathParams;
3439
4422
  } & DataPlaneFetcherExtraProps;
3440
4423
  /**
3441
- * Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
4424
+ * Deletes the specified column.
3442
4425
  */
3443
4426
  declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3444
4427
  type BranchTransactionPathParams = {
@@ -3458,6 +4441,9 @@ type BranchTransactionError = ErrorWrapper<{
3458
4441
  } | {
3459
4442
  status: 404;
3460
4443
  payload: SimpleError;
4444
+ } | {
4445
+ status: 429;
4446
+ payload: RateLimitError;
3461
4447
  }>;
3462
4448
  type BranchTransactionRequestBody = {
3463
4449
  operations: TransactionOperation$1[];
@@ -3485,7 +4471,251 @@ type InsertRecordQueryParams = {
3485
4471
  */
3486
4472
  columns?: ColumnsProjection;
3487
4473
  };
3488
- type InsertRecordError = ErrorWrapper<{
4474
+ type InsertRecordError = ErrorWrapper<{
4475
+ status: 400;
4476
+ payload: BadRequestError;
4477
+ } | {
4478
+ status: 401;
4479
+ payload: AuthError;
4480
+ } | {
4481
+ status: 404;
4482
+ payload: SimpleError;
4483
+ }>;
4484
+ type InsertRecordVariables = {
4485
+ body?: DataInputRecord;
4486
+ pathParams: InsertRecordPathParams;
4487
+ queryParams?: InsertRecordQueryParams;
4488
+ } & DataPlaneFetcherExtraProps;
4489
+ /**
4490
+ * Insert a new Record into the Table
4491
+ */
4492
+ declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
4493
+ type GetFileItemPathParams = {
4494
+ /**
4495
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4496
+ */
4497
+ dbBranchName: DBBranchName;
4498
+ /**
4499
+ * The Table name
4500
+ */
4501
+ tableName: TableName;
4502
+ /**
4503
+ * The Record name
4504
+ */
4505
+ recordId: RecordID;
4506
+ /**
4507
+ * The Column name
4508
+ */
4509
+ columnName: ColumnName;
4510
+ /**
4511
+ * The File Identifier
4512
+ */
4513
+ fileId: FileItemID;
4514
+ workspace: string;
4515
+ region: string;
4516
+ };
4517
+ type GetFileItemError = ErrorWrapper<{
4518
+ status: 400;
4519
+ payload: BadRequestError;
4520
+ } | {
4521
+ status: 401;
4522
+ payload: AuthError;
4523
+ } | {
4524
+ status: 404;
4525
+ payload: SimpleError;
4526
+ }>;
4527
+ type GetFileItemVariables = {
4528
+ pathParams: GetFileItemPathParams;
4529
+ } & DataPlaneFetcherExtraProps;
4530
+ /**
4531
+ * Retrieves file content from an array by file ID
4532
+ */
4533
+ declare const getFileItem: (variables: GetFileItemVariables, signal?: AbortSignal) => Promise<Blob>;
4534
+ type PutFileItemPathParams = {
4535
+ /**
4536
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4537
+ */
4538
+ dbBranchName: DBBranchName;
4539
+ /**
4540
+ * The Table name
4541
+ */
4542
+ tableName: TableName;
4543
+ /**
4544
+ * The Record name
4545
+ */
4546
+ recordId: RecordID;
4547
+ /**
4548
+ * The Column name
4549
+ */
4550
+ columnName: ColumnName;
4551
+ /**
4552
+ * The File Identifier
4553
+ */
4554
+ fileId: FileItemID;
4555
+ workspace: string;
4556
+ region: string;
4557
+ };
4558
+ type PutFileItemError = ErrorWrapper<{
4559
+ status: 400;
4560
+ payload: BadRequestError;
4561
+ } | {
4562
+ status: 401;
4563
+ payload: AuthError;
4564
+ } | {
4565
+ status: 404;
4566
+ payload: SimpleError;
4567
+ } | {
4568
+ status: 422;
4569
+ payload: SimpleError;
4570
+ }>;
4571
+ type PutFileItemVariables = {
4572
+ body?: Blob;
4573
+ pathParams: PutFileItemPathParams;
4574
+ } & DataPlaneFetcherExtraProps;
4575
+ /**
4576
+ * Uploads the file content to an array given the file ID
4577
+ */
4578
+ declare const putFileItem: (variables: PutFileItemVariables, signal?: AbortSignal) => Promise<FileResponse>;
4579
+ type DeleteFileItemPathParams = {
4580
+ /**
4581
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4582
+ */
4583
+ dbBranchName: DBBranchName;
4584
+ /**
4585
+ * The Table name
4586
+ */
4587
+ tableName: TableName;
4588
+ /**
4589
+ * The Record name
4590
+ */
4591
+ recordId: RecordID;
4592
+ /**
4593
+ * The Column name
4594
+ */
4595
+ columnName: ColumnName;
4596
+ /**
4597
+ * The File Identifier
4598
+ */
4599
+ fileId: FileItemID;
4600
+ workspace: string;
4601
+ region: string;
4602
+ };
4603
+ type DeleteFileItemError = ErrorWrapper<{
4604
+ status: 400;
4605
+ payload: BadRequestError;
4606
+ } | {
4607
+ status: 401;
4608
+ payload: AuthError;
4609
+ } | {
4610
+ status: 404;
4611
+ payload: SimpleError;
4612
+ }>;
4613
+ type DeleteFileItemVariables = {
4614
+ pathParams: DeleteFileItemPathParams;
4615
+ } & DataPlaneFetcherExtraProps;
4616
+ /**
4617
+ * Deletes an item from an file array column given the file ID
4618
+ */
4619
+ declare const deleteFileItem: (variables: DeleteFileItemVariables, signal?: AbortSignal) => Promise<FileResponse>;
4620
+ type GetFilePathParams = {
4621
+ /**
4622
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4623
+ */
4624
+ dbBranchName: DBBranchName;
4625
+ /**
4626
+ * The Table name
4627
+ */
4628
+ tableName: TableName;
4629
+ /**
4630
+ * The Record name
4631
+ */
4632
+ recordId: RecordID;
4633
+ /**
4634
+ * The Column name
4635
+ */
4636
+ columnName: ColumnName;
4637
+ workspace: string;
4638
+ region: string;
4639
+ };
4640
+ type GetFileError = ErrorWrapper<{
4641
+ status: 400;
4642
+ payload: BadRequestError;
4643
+ } | {
4644
+ status: 401;
4645
+ payload: AuthError;
4646
+ } | {
4647
+ status: 404;
4648
+ payload: SimpleError;
4649
+ }>;
4650
+ type GetFileVariables = {
4651
+ pathParams: GetFilePathParams;
4652
+ } & DataPlaneFetcherExtraProps;
4653
+ /**
4654
+ * Retrieves the file content from a file column
4655
+ */
4656
+ declare const getFile: (variables: GetFileVariables, signal?: AbortSignal) => Promise<Blob>;
4657
+ type PutFilePathParams = {
4658
+ /**
4659
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4660
+ */
4661
+ dbBranchName: DBBranchName;
4662
+ /**
4663
+ * The Table name
4664
+ */
4665
+ tableName: TableName;
4666
+ /**
4667
+ * The Record name
4668
+ */
4669
+ recordId: RecordID;
4670
+ /**
4671
+ * The Column name
4672
+ */
4673
+ columnName: ColumnName;
4674
+ workspace: string;
4675
+ region: string;
4676
+ };
4677
+ type PutFileError = ErrorWrapper<{
4678
+ status: 400;
4679
+ payload: BadRequestError;
4680
+ } | {
4681
+ status: 401;
4682
+ payload: AuthError;
4683
+ } | {
4684
+ status: 404;
4685
+ payload: SimpleError;
4686
+ } | {
4687
+ status: 422;
4688
+ payload: SimpleError;
4689
+ }>;
4690
+ type PutFileVariables = {
4691
+ body?: Blob;
4692
+ pathParams: PutFilePathParams;
4693
+ } & DataPlaneFetcherExtraProps;
4694
+ /**
4695
+ * Uploads the file content to the given file column
4696
+ */
4697
+ declare const putFile: (variables: PutFileVariables, signal?: AbortSignal) => Promise<FileResponse>;
4698
+ type DeleteFilePathParams = {
4699
+ /**
4700
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4701
+ */
4702
+ dbBranchName: DBBranchName;
4703
+ /**
4704
+ * The Table name
4705
+ */
4706
+ tableName: TableName;
4707
+ /**
4708
+ * The Record name
4709
+ */
4710
+ recordId: RecordID;
4711
+ /**
4712
+ * The Column name
4713
+ */
4714
+ columnName: ColumnName;
4715
+ workspace: string;
4716
+ region: string;
4717
+ };
4718
+ type DeleteFileError = ErrorWrapper<{
3489
4719
  status: 400;
3490
4720
  payload: BadRequestError;
3491
4721
  } | {
@@ -3495,15 +4725,13 @@ type InsertRecordError = ErrorWrapper<{
3495
4725
  status: 404;
3496
4726
  payload: SimpleError;
3497
4727
  }>;
3498
- type InsertRecordVariables = {
3499
- body?: Record<string, any>;
3500
- pathParams: InsertRecordPathParams;
3501
- queryParams?: InsertRecordQueryParams;
4728
+ type DeleteFileVariables = {
4729
+ pathParams: DeleteFilePathParams;
3502
4730
  } & DataPlaneFetcherExtraProps;
3503
4731
  /**
3504
- * Insert a new Record into the Table
4732
+ * Deletes a file referred in a file column
3505
4733
  */
3506
- declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
4734
+ declare const deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal) => Promise<FileResponse>;
3507
4735
  type GetRecordPathParams = {
3508
4736
  /**
3509
4737
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3582,7 +4810,7 @@ type InsertRecordWithIDError = ErrorWrapper<{
3582
4810
  payload: SimpleError;
3583
4811
  }>;
3584
4812
  type InsertRecordWithIDVariables = {
3585
- body?: Record<string, any>;
4813
+ body?: DataInputRecord;
3586
4814
  pathParams: InsertRecordWithIDPathParams;
3587
4815
  queryParams?: InsertRecordWithIDQueryParams;
3588
4816
  } & DataPlaneFetcherExtraProps;
@@ -3627,7 +4855,7 @@ type UpdateRecordWithIDError = ErrorWrapper<{
3627
4855
  payload: SimpleError;
3628
4856
  }>;
3629
4857
  type UpdateRecordWithIDVariables = {
3630
- body?: Record<string, any>;
4858
+ body?: DataInputRecord;
3631
4859
  pathParams: UpdateRecordWithIDPathParams;
3632
4860
  queryParams?: UpdateRecordWithIDQueryParams;
3633
4861
  } & DataPlaneFetcherExtraProps;
@@ -3669,7 +4897,7 @@ type UpsertRecordWithIDError = ErrorWrapper<{
3669
4897
  payload: SimpleError;
3670
4898
  }>;
3671
4899
  type UpsertRecordWithIDVariables = {
3672
- body?: Record<string, any>;
4900
+ body?: DataInputRecord;
3673
4901
  pathParams: UpsertRecordWithIDPathParams;
3674
4902
  queryParams?: UpsertRecordWithIDQueryParams;
3675
4903
  } & DataPlaneFetcherExtraProps;
@@ -3743,7 +4971,7 @@ type BulkInsertTableRecordsError = ErrorWrapper<{
3743
4971
  payload: SimpleError;
3744
4972
  }>;
3745
4973
  type BulkInsertTableRecordsRequestBody = {
3746
- records: Record<string, any>[];
4974
+ records: DataInputRecord[];
3747
4975
  };
3748
4976
  type BulkInsertTableRecordsVariables = {
3749
4977
  body: BulkInsertTableRecordsRequestBody;
@@ -3775,12 +5003,15 @@ type QueryTableError = ErrorWrapper<{
3775
5003
  } | {
3776
5004
  status: 404;
3777
5005
  payload: SimpleError;
5006
+ } | {
5007
+ status: 503;
5008
+ payload: ServiceUnavailableError;
3778
5009
  }>;
3779
5010
  type QueryTableRequestBody = {
3780
5011
  filter?: FilterExpression;
3781
5012
  sort?: SortExpression;
3782
5013
  page?: PageConfig;
3783
- columns?: ColumnsProjection;
5014
+ columns?: QueryColumnsProjection;
3784
5015
  /**
3785
5016
  * The consistency level for this request.
3786
5017
  *
@@ -4444,25 +5675,40 @@ type QueryTableVariables = {
4444
5675
  * }
4445
5676
  * ```
4446
5677
  *
4447
- * ### Pagination
5678
+ * It is also possible to sort results randomly:
5679
+ *
5680
+ * ```json
5681
+ * POST /db/demo:main/tables/table/query
5682
+ * {
5683
+ * "sort": {
5684
+ * "*": "random"
5685
+ * }
5686
+ * }
5687
+ * ```
4448
5688
  *
4449
- * We offer cursor pagination and offset pagination. For queries that are expected to return more than 1000 records,
4450
- * cursor pagination is needed in order to retrieve all of their results. The offset pagination method is limited to 1000 records.
5689
+ * Note that a random sort does not apply to a specific column, hence the special column name `"*"`.
4451
5690
  *
4452
- * Example of size + offset pagination:
5691
+ * A random sort can be combined with an ascending or descending sort on a specific column:
4453
5692
  *
4454
5693
  * ```json
4455
5694
  * POST /db/demo:main/tables/table/query
4456
5695
  * {
4457
- * "page": {
4458
- * "size": 100,
4459
- * "offset": 200
4460
- * }
5696
+ * "sort": [
5697
+ * {
5698
+ * "name": "desc"
5699
+ * },
5700
+ * {
5701
+ * "*": "random"
5702
+ * }
5703
+ * ]
4461
5704
  * }
4462
5705
  * ```
4463
5706
  *
4464
- * 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.
4465
- * 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.
5707
+ * This will sort on the `name` column, breaking ties randomly.
5708
+ *
5709
+ * ### Pagination
5710
+ *
5711
+ * 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.
4466
5712
  *
4467
5713
  * Example of cursor pagination:
4468
5714
  *
@@ -4516,18 +5762,46 @@ type QueryTableVariables = {
4516
5762
  * `filter` or `sort` is set. The columns returned and page size can be changed
4517
5763
  * anytime by passing the `columns` or `page.size` settings to the next query.
4518
5764
  *
5765
+ * In the following example of size + offset pagination we retrieve the third page of up to 100 results:
5766
+ *
5767
+ * ```json
5768
+ * POST /db/demo:main/tables/table/query
5769
+ * {
5770
+ * "page": {
5771
+ * "size": 100,
5772
+ * "offset": 200
5773
+ * }
5774
+ * }
5775
+ * ```
5776
+ *
5777
+ * 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.
5778
+ * 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.
5779
+ *
5780
+ * 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:
5781
+ *
5782
+ * ```json
5783
+ * POST /db/demo:main/tables/table/query
5784
+ * {
5785
+ * "page": {
5786
+ * "size": 200,
5787
+ * "offset": 800,
5788
+ * "after": "fMoxCsIwFIDh3WP8c4amDai5hO5SJCRNfaVSeC9b6d1FD"
5789
+ * }
5790
+ * }
5791
+ * ```
5792
+ *
4519
5793
  * **Special cursors:**
4520
5794
  *
4521
5795
  * - `page.after=end`: Result points past the last entry. The list of records
4522
5796
  * returned is empty, but `page.meta.cursor` will include a cursor that can be
4523
5797
  * used to "tail" the table from the end waiting for new data to be inserted.
4524
5798
  * - `page.before=end`: This cursor returns the last page.
4525
- * - `page.start=<cursor>`: Start at the beginning of the result set of the <cursor> query. This is equivalent to querying the
5799
+ * - `page.start=$cursor`: Start at the beginning of the result set of the $cursor query. This is equivalent to querying the
4526
5800
  * first page without a cursor but applying `filter` and `sort` . Yet the `page.start`
4527
5801
  * cursor can be convenient at times as user code does not need to remember the
4528
5802
  * filter, sort, columns or page size configuration. All these information are
4529
5803
  * read from the cursor.
4530
- * - `page.end=<cursor>`: Move to the end of the result set of the <cursor> query. This is equivalent to querying the
5804
+ * - `page.end=$cursor`: Move to the end of the result set of the $cursor query. This is equivalent to querying the
4531
5805
  * last page with `page.before=end`, `filter`, and `sort` . Yet the
4532
5806
  * `page.end` cursor can be more convenient at times as user code does not
4533
5807
  * need to remember the filter, sort, columns or page size configuration. All
@@ -4566,6 +5840,9 @@ type SearchBranchError = ErrorWrapper<{
4566
5840
  } | {
4567
5841
  status: 404;
4568
5842
  payload: SimpleError;
5843
+ } | {
5844
+ status: 503;
5845
+ payload: ServiceUnavailableError;
4569
5846
  }>;
4570
5847
  type SearchBranchRequestBody = {
4571
5848
  /**
@@ -4648,6 +5925,209 @@ type SearchTableVariables = {
4648
5925
  * * filtering on columns of type `multiple` is currently unsupported
4649
5926
  */
4650
5927
  declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
5928
+ type VectorSearchTablePathParams = {
5929
+ /**
5930
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
5931
+ */
5932
+ dbBranchName: DBBranchName;
5933
+ /**
5934
+ * The Table name
5935
+ */
5936
+ tableName: TableName;
5937
+ workspace: string;
5938
+ region: string;
5939
+ };
5940
+ type VectorSearchTableError = ErrorWrapper<{
5941
+ status: 400;
5942
+ payload: BadRequestError;
5943
+ } | {
5944
+ status: 401;
5945
+ payload: AuthError;
5946
+ } | {
5947
+ status: 404;
5948
+ payload: SimpleError;
5949
+ }>;
5950
+ type VectorSearchTableRequestBody = {
5951
+ /**
5952
+ * The vector to search for similarities. Must have the same dimension as
5953
+ * the vector column used.
5954
+ */
5955
+ queryVector: number[];
5956
+ /**
5957
+ * The vector column in which to search. It must be of type `vector`.
5958
+ */
5959
+ column: string;
5960
+ /**
5961
+ * The function used to measure the distance between two points. Can be one of:
5962
+ * `cosineSimilarity`, `l1`, `l2`. The default is `cosineSimilarity`.
5963
+ *
5964
+ * @default cosineSimilarity
5965
+ */
5966
+ similarityFunction?: string;
5967
+ /**
5968
+ * Number of results to return.
5969
+ *
5970
+ * @default 10
5971
+ * @maximum 100
5972
+ * @minimum 1
5973
+ */
5974
+ size?: number;
5975
+ filter?: FilterExpression;
5976
+ };
5977
+ type VectorSearchTableVariables = {
5978
+ body: VectorSearchTableRequestBody;
5979
+ pathParams: VectorSearchTablePathParams;
5980
+ } & DataPlaneFetcherExtraProps;
5981
+ /**
5982
+ * This endpoint can be used to perform vector-based similarity searches in a table.
5983
+ * It can be used for implementing semantic search and product recommendation. To use this
5984
+ * endpoint, you need a column of type vector. The input vector must have the same
5985
+ * dimension as the vector column.
5986
+ */
5987
+ declare const vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
5988
+ type AskTablePathParams = {
5989
+ /**
5990
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
5991
+ */
5992
+ dbBranchName: DBBranchName;
5993
+ /**
5994
+ * The Table name
5995
+ */
5996
+ tableName: TableName;
5997
+ workspace: string;
5998
+ region: string;
5999
+ };
6000
+ type AskTableError = ErrorWrapper<{
6001
+ status: 400;
6002
+ payload: BadRequestError;
6003
+ } | {
6004
+ status: 401;
6005
+ payload: AuthError;
6006
+ } | {
6007
+ status: 404;
6008
+ payload: SimpleError;
6009
+ } | {
6010
+ status: 429;
6011
+ payload: RateLimitError;
6012
+ }>;
6013
+ type AskTableResponse = {
6014
+ /**
6015
+ * The answer to the input question
6016
+ */
6017
+ answer: string;
6018
+ /**
6019
+ * The session ID for the chat session.
6020
+ */
6021
+ sessionId: string;
6022
+ };
6023
+ type AskTableRequestBody = {
6024
+ /**
6025
+ * The question you'd like to ask.
6026
+ *
6027
+ * @minLength 3
6028
+ */
6029
+ question: string;
6030
+ /**
6031
+ * The type of search to use. If set to `keyword` (the default), the search can be configured by passing
6032
+ * a `search` object with the following fields. For more details about each, see the Search endpoint documentation.
6033
+ * All fields are optional.
6034
+ * * fuzziness - typo tolerance
6035
+ * * target - columns to search into, and weights.
6036
+ * * prefix - prefix search type.
6037
+ * * filter - pre-filter before searching.
6038
+ * * boosters - control relevancy.
6039
+ * If set to `vector`, a `vectorSearch` object must be passed, with the following parameters. For more details, see the Vector
6040
+ * Search endpoint documentation. The `column` and `contentColumn` parameters are required.
6041
+ * * column - the vector column containing the embeddings.
6042
+ * * contentColumn - the column that contains the text from which the embeddings where computed.
6043
+ * * filter - pre-filter before searching.
6044
+ *
6045
+ * @default keyword
6046
+ */
6047
+ searchType?: 'keyword' | 'vector';
6048
+ search?: {
6049
+ fuzziness?: FuzzinessExpression;
6050
+ target?: TargetExpression;
6051
+ prefix?: PrefixExpression;
6052
+ filter?: FilterExpression;
6053
+ boosters?: BoosterExpression[];
6054
+ };
6055
+ vectorSearch?: {
6056
+ /**
6057
+ * The column to use for vector search. It must be of type `vector`.
6058
+ */
6059
+ column: string;
6060
+ /**
6061
+ * The column containing the text for vector search. Must be of type `text`.
6062
+ */
6063
+ contentColumn: string;
6064
+ filter?: FilterExpression;
6065
+ };
6066
+ rules?: string[];
6067
+ };
6068
+ type AskTableVariables = {
6069
+ body: AskTableRequestBody;
6070
+ pathParams: AskTablePathParams;
6071
+ } & DataPlaneFetcherExtraProps;
6072
+ /**
6073
+ * Ask your table a question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
6074
+ */
6075
+ declare const askTable: (variables: AskTableVariables, signal?: AbortSignal) => Promise<AskTableResponse>;
6076
+ type AskTableSessionPathParams = {
6077
+ /**
6078
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
6079
+ */
6080
+ dbBranchName: DBBranchName;
6081
+ /**
6082
+ * The Table name
6083
+ */
6084
+ tableName: TableName;
6085
+ /**
6086
+ * @maxLength 36
6087
+ * @minLength 36
6088
+ */
6089
+ sessionId: string;
6090
+ workspace: string;
6091
+ region: string;
6092
+ };
6093
+ type AskTableSessionError = ErrorWrapper<{
6094
+ status: 400;
6095
+ payload: BadRequestError;
6096
+ } | {
6097
+ status: 401;
6098
+ payload: AuthError;
6099
+ } | {
6100
+ status: 404;
6101
+ payload: SimpleError;
6102
+ } | {
6103
+ status: 429;
6104
+ payload: RateLimitError;
6105
+ } | {
6106
+ status: 503;
6107
+ payload: ServiceUnavailableError;
6108
+ }>;
6109
+ type AskTableSessionResponse = {
6110
+ /**
6111
+ * The answer to the input question
6112
+ */
6113
+ answer: string;
6114
+ };
6115
+ type AskTableSessionRequestBody = {
6116
+ /**
6117
+ * The question you'd like to ask.
6118
+ *
6119
+ * @minLength 3
6120
+ */
6121
+ message?: string;
6122
+ };
6123
+ type AskTableSessionVariables = {
6124
+ body?: AskTableSessionRequestBody;
6125
+ pathParams: AskTableSessionPathParams;
6126
+ } & DataPlaneFetcherExtraProps;
6127
+ /**
6128
+ * Ask a follow-up question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
6129
+ */
6130
+ declare const askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal) => Promise<AskTableSessionResponse>;
4651
6131
  type SummarizeTablePathParams = {
4652
6132
  /**
4653
6133
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -4794,7 +6274,7 @@ type AggregateTableVariables = {
4794
6274
  pathParams: AggregateTablePathParams;
4795
6275
  } & DataPlaneFetcherExtraProps;
4796
6276
  /**
4797
- * This endpoint allows you to run aggragations (analytics) on the data from one table.
6277
+ * This endpoint allows you to run aggregations (analytics) on the data from one table.
4798
6278
  * While the summary endpoint is served from a transactional store and the results are strongly
4799
6279
  * consistent, the aggregate endpoint is served from our columnar store and the results are
4800
6280
  * only eventually consistent. On the other hand, the aggregate endpoint uses a
@@ -4804,13 +6284,95 @@ type AggregateTableVariables = {
4804
6284
  * For usage, see the [API Guide](https://xata.io/docs/api-guide/aggregate).
4805
6285
  */
4806
6286
  declare const aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
6287
+ type FileAccessPathParams = {
6288
+ /**
6289
+ * The File Access Identifier
6290
+ */
6291
+ fileId: FileAccessID;
6292
+ workspace: string;
6293
+ region: string;
6294
+ };
6295
+ type FileAccessQueryParams = {
6296
+ /**
6297
+ * File access signature
6298
+ */
6299
+ verify?: FileSignature;
6300
+ };
6301
+ type FileAccessError = ErrorWrapper<{
6302
+ status: 400;
6303
+ payload: BadRequestError;
6304
+ } | {
6305
+ status: 401;
6306
+ payload: AuthError;
6307
+ } | {
6308
+ status: 404;
6309
+ payload: SimpleError;
6310
+ }>;
6311
+ type FileAccessVariables = {
6312
+ pathParams: FileAccessPathParams;
6313
+ queryParams?: FileAccessQueryParams;
6314
+ } & DataPlaneFetcherExtraProps;
6315
+ /**
6316
+ * Retrieve file content by access id
6317
+ */
6318
+ declare const fileAccess: (variables: FileAccessVariables, signal?: AbortSignal) => Promise<Blob>;
6319
+ type SqlQueryPathParams = {
6320
+ /**
6321
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
6322
+ */
6323
+ dbBranchName: DBBranchName;
6324
+ workspace: string;
6325
+ region: string;
6326
+ };
6327
+ type SqlQueryError = ErrorWrapper<{
6328
+ status: 400;
6329
+ payload: BadRequestError;
6330
+ } | {
6331
+ status: 401;
6332
+ payload: AuthError;
6333
+ } | {
6334
+ status: 404;
6335
+ payload: SimpleError;
6336
+ } | {
6337
+ status: 503;
6338
+ payload: ServiceUnavailableError;
6339
+ }>;
6340
+ type SqlQueryRequestBody = {
6341
+ /**
6342
+ * The SQL statement.
6343
+ *
6344
+ * @minLength 1
6345
+ */
6346
+ statement: string;
6347
+ /**
6348
+ * The query parameter list.
6349
+ */
6350
+ params?: any[] | null;
6351
+ /**
6352
+ * The consistency level for this request.
6353
+ *
6354
+ * @default strong
6355
+ */
6356
+ consistency?: 'strong' | 'eventual';
6357
+ };
6358
+ type SqlQueryVariables = {
6359
+ body: SqlQueryRequestBody;
6360
+ pathParams: SqlQueryPathParams;
6361
+ } & DataPlaneFetcherExtraProps;
6362
+ /**
6363
+ * Run an SQL query across the database branch.
6364
+ */
6365
+ declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<SQLResponse>;
4807
6366
 
4808
6367
  declare const operationsByTag: {
4809
6368
  branch: {
6369
+ applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal | undefined) => Promise<PgRollApplyMigrationResponse>;
6370
+ pgRollStatus: (variables: PgRollStatusVariables, signal?: AbortSignal | undefined) => Promise<PgRollStatusResponse>;
4810
6371
  getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal | undefined) => Promise<ListBranchesResponse>;
4811
6372
  getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal | undefined) => Promise<DBBranch>;
4812
6373
  createBranch: (variables: CreateBranchVariables, signal?: AbortSignal | undefined) => Promise<CreateBranchResponse>;
4813
6374
  deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal | undefined) => Promise<DeleteBranchResponse>;
6375
+ copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal | undefined) => Promise<BranchWithCopyID>;
4814
6376
  updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
4815
6377
  getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<BranchMetadata>;
4816
6378
  getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal | undefined) => Promise<GetBranchStatsResponse>;
@@ -4819,17 +6381,8 @@ declare const operationsByTag: {
4819
6381
  removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
4820
6382
  resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal | undefined) => Promise<ResolveBranchResponse>;
4821
6383
  };
4822
- records: {
4823
- branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
4824
- insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
4825
- getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
4826
- insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
4827
- updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
4828
- upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
4829
- deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
4830
- bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
4831
- };
4832
6384
  migrations: {
6385
+ getSchema: (variables: GetSchemaVariables, signal?: AbortSignal | undefined) => Promise<GetSchemaResponse>;
4833
6386
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchMigrationHistoryResponse>;
4834
6387
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<BranchMigrationPlan>;
4835
6388
  executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
@@ -4839,6 +6392,17 @@ declare const operationsByTag: {
4839
6392
  updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
4840
6393
  previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<PreviewBranchSchemaEditResponse>;
4841
6394
  applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
6395
+ pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
6396
+ };
6397
+ records: {
6398
+ branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
6399
+ insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
6400
+ getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
6401
+ insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
6402
+ updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
6403
+ upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
6404
+ deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
6405
+ bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
4842
6406
  };
4843
6407
  migrationRequests: {
4844
6408
  queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal | undefined) => Promise<QueryMigrationRequestsResponse>;
@@ -4848,7 +6412,7 @@ declare const operationsByTag: {
4848
6412
  listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal | undefined) => Promise<ListMigrationRequestsCommitsResponse>;
4849
6413
  compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<SchemaCompareResponse>;
4850
6414
  getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal | undefined) => Promise<GetMigrationRequestIsMergedResponse>;
4851
- mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<Commit>;
6415
+ mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<BranchOp>;
4852
6416
  };
4853
6417
  table: {
4854
6418
  createTable: (variables: CreateTableVariables, signal?: AbortSignal | undefined) => Promise<CreateTableResponse>;
@@ -4862,13 +6426,37 @@ declare const operationsByTag: {
4862
6426
  updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
4863
6427
  deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
4864
6428
  };
6429
+ files: {
6430
+ getFileItem: (variables: GetFileItemVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
6431
+ putFileItem: (variables: PutFileItemVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6432
+ deleteFileItem: (variables: DeleteFileItemVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6433
+ getFile: (variables: GetFileVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
6434
+ putFile: (variables: PutFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6435
+ deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6436
+ fileAccess: (variables: FileAccessVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
6437
+ };
4865
6438
  searchAndFilter: {
4866
6439
  queryTable: (variables: QueryTableVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
4867
6440
  searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
4868
6441
  searchTable: (variables: SearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
6442
+ vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
6443
+ askTable: (variables: AskTableVariables, signal?: AbortSignal | undefined) => Promise<AskTableResponse>;
6444
+ askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal | undefined) => Promise<AskTableSessionResponse>;
4869
6445
  summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal | undefined) => Promise<SummarizeResponse>;
4870
6446
  aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal | undefined) => Promise<AggResponse>;
4871
6447
  };
6448
+ sql: {
6449
+ sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal | undefined) => Promise<SQLResponse>;
6450
+ };
6451
+ oAuth: {
6452
+ getAuthorizationCode: (variables: GetAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<AuthorizationCodeResponse>;
6453
+ grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<AuthorizationCodeResponse>;
6454
+ getUserOAuthClients: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserOAuthClientsResponse>;
6455
+ deleteUserOAuthClient: (variables: DeleteUserOAuthClientVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6456
+ getUserOAuthAccessTokens: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserOAuthAccessTokensResponse>;
6457
+ deleteOAuthAccessToken: (variables: DeleteOAuthAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6458
+ updateOAuthAccessToken: (variables: UpdateOAuthAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<OAuthAccessToken>;
6459
+ };
4872
6460
  users: {
4873
6461
  getUser: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<UserWithID>;
4874
6462
  updateUser: (variables: UpdateUserVariables, signal?: AbortSignal | undefined) => Promise<UserWithID>;
@@ -4896,12 +6484,19 @@ declare const operationsByTag: {
4896
6484
  acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
4897
6485
  resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
4898
6486
  };
6487
+ xbcontrolOther: {
6488
+ listClusters: (variables: ListClustersVariables, signal?: AbortSignal | undefined) => Promise<ListClustersResponse>;
6489
+ createCluster: (variables: CreateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterResponse>;
6490
+ getCluster: (variables: GetClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterMetadata>;
6491
+ updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterMetadata>;
6492
+ };
4899
6493
  databases: {
4900
6494
  getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal | undefined) => Promise<ListDatabasesResponse>;
4901
6495
  createDatabase: (variables: CreateDatabaseVariables, signal?: AbortSignal | undefined) => Promise<CreateDatabaseResponse>;
4902
6496
  deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DeleteDatabaseResponse>;
4903
6497
  getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
4904
6498
  updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
6499
+ renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
4905
6500
  getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
4906
6501
  updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
4907
6502
  deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
@@ -4909,7 +6504,7 @@ declare const operationsByTag: {
4909
6504
  };
4910
6505
  };
4911
6506
 
4912
- type HostAliases = 'production' | 'staging';
6507
+ type HostAliases = 'production' | 'staging' | 'dev';
4913
6508
  type ProviderBuilder = {
4914
6509
  main: string;
4915
6510
  workspaces: string;
@@ -4919,6 +6514,7 @@ declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder)
4919
6514
  declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
4920
6515
  declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
4921
6516
  declare function parseProviderString(provider?: string): HostProvider | null;
6517
+ declare function buildProviderString(provider: HostProvider): string;
4922
6518
  declare function parseWorkspacesUrlParts(url: string): {
4923
6519
  workspace: string;
4924
6520
  region: string;
@@ -4930,59 +6526,70 @@ type responses_BadRequestError = BadRequestError;
4930
6526
  type responses_BranchMigrationPlan = BranchMigrationPlan;
4931
6527
  type responses_BulkError = BulkError;
4932
6528
  type responses_BulkInsertResponse = BulkInsertResponse;
6529
+ type responses_PutFileResponse = PutFileResponse;
4933
6530
  type responses_QueryResponse = QueryResponse;
6531
+ type responses_RateLimitError = RateLimitError;
4934
6532
  type responses_RecordResponse = RecordResponse;
4935
6533
  type responses_RecordUpdateResponse = RecordUpdateResponse;
6534
+ type responses_SQLResponse = SQLResponse;
4936
6535
  type responses_SchemaCompareResponse = SchemaCompareResponse;
4937
6536
  type responses_SchemaUpdateResponse = SchemaUpdateResponse;
4938
6537
  type responses_SearchResponse = SearchResponse;
6538
+ type responses_ServiceUnavailableError = ServiceUnavailableError;
4939
6539
  type responses_SimpleError = SimpleError;
4940
6540
  type responses_SummarizeResponse = SummarizeResponse;
4941
6541
  declare namespace responses {
4942
- export {
4943
- responses_AggResponse as AggResponse,
4944
- responses_AuthError as AuthError,
4945
- responses_BadRequestError as BadRequestError,
4946
- responses_BranchMigrationPlan as BranchMigrationPlan,
4947
- responses_BulkError as BulkError,
4948
- responses_BulkInsertResponse as BulkInsertResponse,
4949
- responses_QueryResponse as QueryResponse,
4950
- responses_RecordResponse as RecordResponse,
4951
- responses_RecordUpdateResponse as RecordUpdateResponse,
4952
- responses_SchemaCompareResponse as SchemaCompareResponse,
4953
- responses_SchemaUpdateResponse as SchemaUpdateResponse,
4954
- responses_SearchResponse as SearchResponse,
4955
- responses_SimpleError as SimpleError,
4956
- responses_SummarizeResponse as SummarizeResponse,
4957
- };
6542
+ 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 };
4958
6543
  }
4959
6544
 
4960
6545
  type schemas_APIKeyName = APIKeyName;
6546
+ type schemas_AccessToken = AccessToken;
4961
6547
  type schemas_AggExpression = AggExpression;
4962
6548
  type schemas_AggExpressionMap = AggExpressionMap;
6549
+ type schemas_AuthorizationCodeRequest = AuthorizationCodeRequest;
6550
+ type schemas_AuthorizationCodeResponse = AuthorizationCodeResponse;
6551
+ type schemas_AutoscalingConfig = AutoscalingConfig;
4963
6552
  type schemas_AverageAgg = AverageAgg;
4964
6553
  type schemas_BoosterExpression = BoosterExpression;
4965
6554
  type schemas_Branch = Branch;
4966
6555
  type schemas_BranchMetadata = BranchMetadata;
4967
6556
  type schemas_BranchMigration = BranchMigration;
4968
6557
  type schemas_BranchName = BranchName;
6558
+ type schemas_BranchOp = BranchOp;
6559
+ type schemas_BranchWithCopyID = BranchWithCopyID;
6560
+ type schemas_ClusterConfiguration = ClusterConfiguration;
6561
+ type schemas_ClusterCreateDetails = ClusterCreateDetails;
6562
+ type schemas_ClusterID = ClusterID;
6563
+ type schemas_ClusterMetadata = ClusterMetadata;
6564
+ type schemas_ClusterResponse = ClusterResponse;
6565
+ type schemas_ClusterShortMetadata = ClusterShortMetadata;
6566
+ type schemas_ClusterUpdateDetails = ClusterUpdateDetails;
4969
6567
  type schemas_Column = Column;
6568
+ type schemas_ColumnFile = ColumnFile;
4970
6569
  type schemas_ColumnLink = ColumnLink;
4971
6570
  type schemas_ColumnMigration = ColumnMigration;
4972
6571
  type schemas_ColumnName = ColumnName;
4973
6572
  type schemas_ColumnOpAdd = ColumnOpAdd;
4974
6573
  type schemas_ColumnOpRemove = ColumnOpRemove;
4975
6574
  type schemas_ColumnOpRename = ColumnOpRename;
6575
+ type schemas_ColumnVector = ColumnVector;
4976
6576
  type schemas_ColumnsProjection = ColumnsProjection;
4977
6577
  type schemas_Commit = Commit;
4978
6578
  type schemas_CountAgg = CountAgg;
4979
6579
  type schemas_DBBranch = DBBranch;
4980
6580
  type schemas_DBBranchName = DBBranchName;
4981
6581
  type schemas_DBName = DBName;
6582
+ type schemas_DailyTimeWindow = DailyTimeWindow;
6583
+ type schemas_DataInputRecord = DataInputRecord;
4982
6584
  type schemas_DatabaseGithubSettings = DatabaseGithubSettings;
4983
6585
  type schemas_DatabaseMetadata = DatabaseMetadata;
4984
6586
  type schemas_DateHistogramAgg = DateHistogramAgg;
4985
6587
  type schemas_DateTime = DateTime;
6588
+ type schemas_FileAccessID = FileAccessID;
6589
+ type schemas_FileItemID = FileItemID;
6590
+ type schemas_FileName = FileName;
6591
+ type schemas_FileResponse = FileResponse;
6592
+ type schemas_FileSignature = FileSignature;
4986
6593
  type schemas_FilterColumn = FilterColumn;
4987
6594
  type schemas_FilterColumnIncludes = FilterColumnIncludes;
4988
6595
  type schemas_FilterExpression = FilterExpression;
@@ -4994,17 +6601,24 @@ type schemas_FilterRangeValue = FilterRangeValue;
4994
6601
  type schemas_FilterValue = FilterValue;
4995
6602
  type schemas_FuzzinessExpression = FuzzinessExpression;
4996
6603
  type schemas_HighlightExpression = HighlightExpression;
6604
+ type schemas_InputFile = InputFile;
6605
+ type schemas_InputFileArray = InputFileArray;
6606
+ type schemas_InputFileEntry = InputFileEntry;
4997
6607
  type schemas_InviteID = InviteID;
4998
6608
  type schemas_InviteKey = InviteKey;
4999
6609
  type schemas_ListBranchesResponse = ListBranchesResponse;
6610
+ type schemas_ListClustersResponse = ListClustersResponse;
5000
6611
  type schemas_ListDatabasesResponse = ListDatabasesResponse;
5001
6612
  type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
5002
6613
  type schemas_ListRegionsResponse = ListRegionsResponse;
6614
+ type schemas_MaintenanceConfig = MaintenanceConfig;
5003
6615
  type schemas_MaxAgg = MaxAgg;
6616
+ type schemas_MediaType = MediaType;
5004
6617
  type schemas_MetricsDatapoint = MetricsDatapoint;
5005
6618
  type schemas_MetricsLatency = MetricsLatency;
5006
6619
  type schemas_Migration = Migration;
5007
6620
  type schemas_MigrationColumnOp = MigrationColumnOp;
6621
+ type schemas_MigrationObject = MigrationObject;
5008
6622
  type schemas_MigrationOp = MigrationOp;
5009
6623
  type schemas_MigrationRequest = MigrationRequest;
5010
6624
  type schemas_MigrationRequestNumber = MigrationRequestNumber;
@@ -5012,14 +6626,27 @@ type schemas_MigrationStatus = MigrationStatus;
5012
6626
  type schemas_MigrationTableOp = MigrationTableOp;
5013
6627
  type schemas_MinAgg = MinAgg;
5014
6628
  type schemas_NumericHistogramAgg = NumericHistogramAgg;
6629
+ type schemas_OAuthAccessToken = OAuthAccessToken;
6630
+ type schemas_OAuthClientID = OAuthClientID;
6631
+ type schemas_OAuthClientPublicDetails = OAuthClientPublicDetails;
6632
+ type schemas_OAuthResponseType = OAuthResponseType;
6633
+ type schemas_OAuthScope = OAuthScope;
6634
+ type schemas_ObjectValue = ObjectValue;
5015
6635
  type schemas_PageConfig = PageConfig;
6636
+ type schemas_PercentilesAgg = PercentilesAgg;
6637
+ type schemas_PgRollApplyMigrationResponse = PgRollApplyMigrationResponse;
6638
+ type schemas_PgRollMigrationStatus = PgRollMigrationStatus;
6639
+ type schemas_PgRollStatusResponse = PgRollStatusResponse;
5016
6640
  type schemas_PrefixExpression = PrefixExpression;
6641
+ type schemas_ProjectionConfig = ProjectionConfig;
6642
+ type schemas_QueryColumnsProjection = QueryColumnsProjection;
5017
6643
  type schemas_RecordID = RecordID;
5018
6644
  type schemas_RecordMeta = RecordMeta;
5019
6645
  type schemas_RecordsMetadata = RecordsMetadata;
5020
6646
  type schemas_Region = Region;
5021
6647
  type schemas_RevLink = RevLink;
5022
6648
  type schemas_Role = Role;
6649
+ type schemas_SQLRecord = SQLRecord;
5023
6650
  type schemas_Schema = Schema;
5024
6651
  type schemas_SchemaEditScript = SchemaEditScript;
5025
6652
  type schemas_SearchPageConfig = SearchPageConfig;
@@ -5041,8 +6668,11 @@ type schemas_TopValuesAgg = TopValuesAgg;
5041
6668
  type schemas_TransactionDeleteOp = TransactionDeleteOp;
5042
6669
  type schemas_TransactionError = TransactionError;
5043
6670
  type schemas_TransactionFailure = TransactionFailure;
6671
+ type schemas_TransactionGetOp = TransactionGetOp;
5044
6672
  type schemas_TransactionInsertOp = TransactionInsertOp;
6673
+ type schemas_TransactionResultColumns = TransactionResultColumns;
5045
6674
  type schemas_TransactionResultDelete = TransactionResultDelete;
6675
+ type schemas_TransactionResultGet = TransactionResultGet;
5046
6676
  type schemas_TransactionResultInsert = TransactionResultInsert;
5047
6677
  type schemas_TransactionResultUpdate = TransactionResultUpdate;
5048
6678
  type schemas_TransactionSuccess = TransactionSuccess;
@@ -5051,121 +6681,16 @@ type schemas_UniqueCountAgg = UniqueCountAgg;
5051
6681
  type schemas_User = User;
5052
6682
  type schemas_UserID = UserID;
5053
6683
  type schemas_UserWithID = UserWithID;
6684
+ type schemas_WeeklyTimeWindow = WeeklyTimeWindow;
5054
6685
  type schemas_Workspace = Workspace;
5055
6686
  type schemas_WorkspaceID = WorkspaceID;
5056
6687
  type schemas_WorkspaceInvite = WorkspaceInvite;
5057
6688
  type schemas_WorkspaceMember = WorkspaceMember;
5058
6689
  type schemas_WorkspaceMembers = WorkspaceMembers;
5059
6690
  type schemas_WorkspaceMeta = WorkspaceMeta;
6691
+ type schemas_WorkspacePlan = WorkspacePlan;
5060
6692
  declare namespace schemas {
5061
- export {
5062
- schemas_APIKeyName as APIKeyName,
5063
- schemas_AggExpression as AggExpression,
5064
- schemas_AggExpressionMap as AggExpressionMap,
5065
- AggResponse$1 as AggResponse,
5066
- schemas_AverageAgg as AverageAgg,
5067
- schemas_BoosterExpression as BoosterExpression,
5068
- schemas_Branch as Branch,
5069
- schemas_BranchMetadata as BranchMetadata,
5070
- schemas_BranchMigration as BranchMigration,
5071
- schemas_BranchName as BranchName,
5072
- schemas_Column as Column,
5073
- schemas_ColumnLink as ColumnLink,
5074
- schemas_ColumnMigration as ColumnMigration,
5075
- schemas_ColumnName as ColumnName,
5076
- schemas_ColumnOpAdd as ColumnOpAdd,
5077
- schemas_ColumnOpRemove as ColumnOpRemove,
5078
- schemas_ColumnOpRename as ColumnOpRename,
5079
- schemas_ColumnsProjection as ColumnsProjection,
5080
- schemas_Commit as Commit,
5081
- schemas_CountAgg as CountAgg,
5082
- schemas_DBBranch as DBBranch,
5083
- schemas_DBBranchName as DBBranchName,
5084
- schemas_DBName as DBName,
5085
- schemas_DatabaseGithubSettings as DatabaseGithubSettings,
5086
- schemas_DatabaseMetadata as DatabaseMetadata,
5087
- DateBooster$1 as DateBooster,
5088
- schemas_DateHistogramAgg as DateHistogramAgg,
5089
- schemas_DateTime as DateTime,
5090
- schemas_FilterColumn as FilterColumn,
5091
- schemas_FilterColumnIncludes as FilterColumnIncludes,
5092
- schemas_FilterExpression as FilterExpression,
5093
- schemas_FilterList as FilterList,
5094
- schemas_FilterPredicate as FilterPredicate,
5095
- schemas_FilterPredicateOp as FilterPredicateOp,
5096
- schemas_FilterPredicateRangeOp as FilterPredicateRangeOp,
5097
- schemas_FilterRangeValue as FilterRangeValue,
5098
- schemas_FilterValue as FilterValue,
5099
- schemas_FuzzinessExpression as FuzzinessExpression,
5100
- schemas_HighlightExpression as HighlightExpression,
5101
- schemas_InviteID as InviteID,
5102
- schemas_InviteKey as InviteKey,
5103
- schemas_ListBranchesResponse as ListBranchesResponse,
5104
- schemas_ListDatabasesResponse as ListDatabasesResponse,
5105
- schemas_ListGitBranchesResponse as ListGitBranchesResponse,
5106
- schemas_ListRegionsResponse as ListRegionsResponse,
5107
- schemas_MaxAgg as MaxAgg,
5108
- schemas_MetricsDatapoint as MetricsDatapoint,
5109
- schemas_MetricsLatency as MetricsLatency,
5110
- schemas_Migration as Migration,
5111
- schemas_MigrationColumnOp as MigrationColumnOp,
5112
- schemas_MigrationOp as MigrationOp,
5113
- schemas_MigrationRequest as MigrationRequest,
5114
- schemas_MigrationRequestNumber as MigrationRequestNumber,
5115
- schemas_MigrationStatus as MigrationStatus,
5116
- schemas_MigrationTableOp as MigrationTableOp,
5117
- schemas_MinAgg as MinAgg,
5118
- NumericBooster$1 as NumericBooster,
5119
- schemas_NumericHistogramAgg as NumericHistogramAgg,
5120
- schemas_PageConfig as PageConfig,
5121
- schemas_PrefixExpression as PrefixExpression,
5122
- schemas_RecordID as RecordID,
5123
- schemas_RecordMeta as RecordMeta,
5124
- schemas_RecordsMetadata as RecordsMetadata,
5125
- schemas_Region as Region,
5126
- schemas_RevLink as RevLink,
5127
- schemas_Role as Role,
5128
- schemas_Schema as Schema,
5129
- schemas_SchemaEditScript as SchemaEditScript,
5130
- schemas_SearchPageConfig as SearchPageConfig,
5131
- schemas_SortExpression as SortExpression,
5132
- schemas_SortOrder as SortOrder,
5133
- schemas_StartedFromMetadata as StartedFromMetadata,
5134
- schemas_SumAgg as SumAgg,
5135
- schemas_SummaryExpression as SummaryExpression,
5136
- schemas_SummaryExpressionList as SummaryExpressionList,
5137
- schemas_Table as Table,
5138
- schemas_TableMigration as TableMigration,
5139
- schemas_TableName as TableName,
5140
- schemas_TableOpAdd as TableOpAdd,
5141
- schemas_TableOpRemove as TableOpRemove,
5142
- schemas_TableOpRename as TableOpRename,
5143
- schemas_TableRename as TableRename,
5144
- schemas_TargetExpression as TargetExpression,
5145
- schemas_TopValuesAgg as TopValuesAgg,
5146
- schemas_TransactionDeleteOp as TransactionDeleteOp,
5147
- schemas_TransactionError as TransactionError,
5148
- schemas_TransactionFailure as TransactionFailure,
5149
- schemas_TransactionInsertOp as TransactionInsertOp,
5150
- TransactionOperation$1 as TransactionOperation,
5151
- schemas_TransactionResultDelete as TransactionResultDelete,
5152
- schemas_TransactionResultInsert as TransactionResultInsert,
5153
- schemas_TransactionResultUpdate as TransactionResultUpdate,
5154
- schemas_TransactionSuccess as TransactionSuccess,
5155
- schemas_TransactionUpdateOp as TransactionUpdateOp,
5156
- schemas_UniqueCountAgg as UniqueCountAgg,
5157
- schemas_User as User,
5158
- schemas_UserID as UserID,
5159
- schemas_UserWithID as UserWithID,
5160
- ValueBooster$1 as ValueBooster,
5161
- schemas_Workspace as Workspace,
5162
- schemas_WorkspaceID as WorkspaceID,
5163
- schemas_WorkspaceInvite as WorkspaceInvite,
5164
- schemas_WorkspaceMember as WorkspaceMember,
5165
- schemas_WorkspaceMembers as WorkspaceMembers,
5166
- schemas_WorkspaceMeta as WorkspaceMeta,
5167
- XataRecord$1 as XataRecord,
5168
- };
6693
+ 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_AutoscalingConfig as AutoscalingConfig, 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_ClusterConfiguration as ClusterConfiguration, schemas_ClusterCreateDetails as ClusterCreateDetails, schemas_ClusterID as ClusterID, schemas_ClusterMetadata as ClusterMetadata, schemas_ClusterResponse as ClusterResponse, schemas_ClusterShortMetadata as ClusterShortMetadata, schemas_ClusterUpdateDetails as ClusterUpdateDetails, 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_DailyTimeWindow as DailyTimeWindow, 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_ListClustersResponse as ListClustersResponse, schemas_ListDatabasesResponse as ListDatabasesResponse, schemas_ListGitBranchesResponse as ListGitBranchesResponse, schemas_ListRegionsResponse as ListRegionsResponse, schemas_MaintenanceConfig as MaintenanceConfig, 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_PercentilesAgg as PercentilesAgg, schemas_PgRollApplyMigrationResponse as PgRollApplyMigrationResponse, schemas_PgRollMigrationStatus as PgRollMigrationStatus, schemas_PgRollStatusResponse as PgRollStatusResponse, 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_WeeklyTimeWindow as WeeklyTimeWindow, schemas_Workspace as Workspace, schemas_WorkspaceID as WorkspaceID, schemas_WorkspaceInvite as WorkspaceInvite, schemas_WorkspaceMember as WorkspaceMember, schemas_WorkspaceMembers as WorkspaceMembers, schemas_WorkspaceMeta as WorkspaceMeta, schemas_WorkspacePlan as WorkspacePlan, XataRecord$1 as XataRecord };
5169
6694
  }
5170
6695
 
5171
6696
  type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
@@ -5190,6 +6715,7 @@ declare class XataApiClient {
5190
6715
  get migrationRequests(): MigrationRequestsApi;
5191
6716
  get tables(): TableApi;
5192
6717
  get records(): RecordsApi;
6718
+ get files(): FilesApi;
5193
6719
  get searchAndFilter(): SearchAndFilterApi;
5194
6720
  }
5195
6721
  declare class UserApi {
@@ -5295,7 +6821,15 @@ declare class BranchApi {
5295
6821
  region: string;
5296
6822
  database: DBName;
5297
6823
  branch: BranchName;
5298
- }): Promise<DeleteBranchResponse>;
6824
+ }): Promise<DeleteBranchResponse>;
6825
+ copyBranch({ workspace, region, database, branch, destinationBranch, limit }: {
6826
+ workspace: WorkspaceID;
6827
+ region: string;
6828
+ database: DBName;
6829
+ branch: BranchName;
6830
+ destinationBranch: BranchName;
6831
+ limit?: number;
6832
+ }): Promise<BranchWithCopyID>;
5299
6833
  updateBranchMetadata({ workspace, region, database, branch, metadata }: {
5300
6834
  workspace: WorkspaceID;
5301
6835
  region: string;
@@ -5503,6 +7037,75 @@ declare class RecordsApi {
5503
7037
  operations: TransactionOperation$1[];
5504
7038
  }): Promise<TransactionSuccess>;
5505
7039
  }
7040
+ declare class FilesApi {
7041
+ private extraProps;
7042
+ constructor(extraProps: ApiExtraProps);
7043
+ getFileItem({ workspace, region, database, branch, table, record, column, fileId }: {
7044
+ workspace: WorkspaceID;
7045
+ region: string;
7046
+ database: DBName;
7047
+ branch: BranchName;
7048
+ table: TableName;
7049
+ record: RecordID;
7050
+ column: ColumnName;
7051
+ fileId: string;
7052
+ }): Promise<any>;
7053
+ putFileItem({ workspace, region, database, branch, table, record, column, fileId, file }: {
7054
+ workspace: WorkspaceID;
7055
+ region: string;
7056
+ database: DBName;
7057
+ branch: BranchName;
7058
+ table: TableName;
7059
+ record: RecordID;
7060
+ column: ColumnName;
7061
+ fileId: string;
7062
+ file: any;
7063
+ }): Promise<PutFileResponse>;
7064
+ deleteFileItem({ workspace, region, database, branch, table, record, column, fileId }: {
7065
+ workspace: WorkspaceID;
7066
+ region: string;
7067
+ database: DBName;
7068
+ branch: BranchName;
7069
+ table: TableName;
7070
+ record: RecordID;
7071
+ column: ColumnName;
7072
+ fileId: string;
7073
+ }): Promise<PutFileResponse>;
7074
+ getFile({ workspace, region, database, branch, table, record, column }: {
7075
+ workspace: WorkspaceID;
7076
+ region: string;
7077
+ database: DBName;
7078
+ branch: BranchName;
7079
+ table: TableName;
7080
+ record: RecordID;
7081
+ column: ColumnName;
7082
+ }): Promise<any>;
7083
+ putFile({ workspace, region, database, branch, table, record, column, file }: {
7084
+ workspace: WorkspaceID;
7085
+ region: string;
7086
+ database: DBName;
7087
+ branch: BranchName;
7088
+ table: TableName;
7089
+ record: RecordID;
7090
+ column: ColumnName;
7091
+ file: Blob;
7092
+ }): Promise<PutFileResponse>;
7093
+ deleteFile({ workspace, region, database, branch, table, record, column }: {
7094
+ workspace: WorkspaceID;
7095
+ region: string;
7096
+ database: DBName;
7097
+ branch: BranchName;
7098
+ table: TableName;
7099
+ record: RecordID;
7100
+ column: ColumnName;
7101
+ }): Promise<PutFileResponse>;
7102
+ fileAccess({ workspace, region, fileId, verify }: {
7103
+ workspace: WorkspaceID;
7104
+ region: string;
7105
+ fileId: string;
7106
+ verify?: FileSignature;
7107
+ }): Promise<any>;
7108
+ }
5506
7109
  declare class SearchAndFilterApi {
5507
7110
  private extraProps;
5508
7111
  constructor(extraProps: ApiExtraProps);
@@ -5548,6 +7151,35 @@ declare class SearchAndFilterApi {
5548
7151
  prefix?: PrefixExpression;
5549
7152
  highlight?: HighlightExpression;
5550
7153
  }): Promise<SearchResponse>;
7154
+ vectorSearchTable({ workspace, region, database, branch, table, queryVector, column, similarityFunction, size, filter }: {
7155
+ workspace: WorkspaceID;
7156
+ region: string;
7157
+ database: DBName;
7158
+ branch: BranchName;
7159
+ table: TableName;
7160
+ queryVector: number[];
7161
+ column: string;
7162
+ similarityFunction?: string;
7163
+ size?: number;
7164
+ filter?: FilterExpression;
7165
+ }): Promise<SearchResponse>;
7166
+ askTable({ workspace, region, database, branch, table, options }: {
7167
+ workspace: WorkspaceID;
7168
+ region: string;
7169
+ database: DBName;
7170
+ branch: BranchName;
7171
+ table: TableName;
7172
+ options: AskTableRequestBody;
7173
+ }): Promise<AskTableResponse>;
7174
+ askTableSession({ workspace, region, database, branch, table, sessionId, message }: {
7175
+ workspace: WorkspaceID;
7176
+ region: string;
7177
+ database: DBName;
7178
+ branch: BranchName;
7179
+ table: TableName;
7180
+ sessionId: string;
7181
+ message: string;
7182
+ }): Promise<AskTableSessionResponse>;
5551
7183
  summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page, consistency }: {
5552
7184
  workspace: WorkspaceID;
5553
7185
  region: string;
@@ -5633,7 +7265,7 @@ declare class MigrationRequestsApi {
5633
7265
  region: string;
5634
7266
  database: DBName;
5635
7267
  migrationRequest: MigrationRequestNumber;
5636
- }): Promise<Commit>;
7268
+ }): Promise<BranchOp>;
5637
7269
  }
5638
7270
  declare class MigrationsApi {
5639
7271
  private extraProps;
@@ -5712,6 +7344,13 @@ declare class MigrationsApi {
5712
7344
  branch: BranchName;
5713
7345
  edits: SchemaEditScript;
5714
7346
  }): Promise<SchemaUpdateResponse>;
7347
+ pushBranchMigrations({ workspace, region, database, branch, migrations }: {
7348
+ workspace: WorkspaceID;
7349
+ region: string;
7350
+ database: DBName;
7351
+ branch: BranchName;
7352
+ migrations: MigrationObject[];
7353
+ }): Promise<SchemaUpdateResponse>;
5715
7354
  }
5716
7355
  declare class DatabaseApi {
5717
7356
  private extraProps;
@@ -5719,10 +7358,11 @@ declare class DatabaseApi {
5719
7358
  getDatabaseList({ workspace }: {
5720
7359
  workspace: WorkspaceID;
5721
7360
  }): Promise<ListDatabasesResponse>;
5722
- createDatabase({ workspace, database, data }: {
7361
+ createDatabase({ workspace, database, data, headers }: {
5723
7362
  workspace: WorkspaceID;
5724
7363
  database: DBName;
5725
7364
  data: CreateDatabaseRequestBody;
7365
+ headers?: Record<string, string>;
5726
7366
  }): Promise<CreateDatabaseResponse>;
5727
7367
  deleteDatabase({ workspace, database }: {
5728
7368
  workspace: WorkspaceID;
@@ -5737,6 +7377,11 @@ declare class DatabaseApi {
5737
7377
  database: DBName;
5738
7378
  metadata: DatabaseMetadata;
5739
7379
  }): Promise<DatabaseMetadata>;
7380
+ renameDatabase({ workspace, database, newName }: {
7381
+ workspace: WorkspaceID;
7382
+ database: DBName;
7383
+ newName: DBName;
7384
+ }): Promise<DatabaseMetadata>;
5740
7385
  getDatabaseGithubSettings({ workspace, database }: {
5741
7386
  workspace: WorkspaceID;
5742
7387
  database: DBName;
@@ -5756,7 +7401,7 @@ declare class DatabaseApi {
5756
7401
  }
5757
7402
 
5758
7403
  declare class XataApiPlugin implements XataPlugin {
5759
- build(options: XataPluginOptions): Promise<XataApiClient>;
7404
+ build(options: XataPluginOptions): XataApiClient;
5760
7405
  }
5761
7406
 
5762
7407
  type StringKeys<O> = Extract<keyof O, string>;
@@ -5792,35 +7437,296 @@ type Narrowable = string | number | bigint | boolean;
5792
7437
  type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
5793
7438
  type Narrow<A> = Try<A, [], NarrowRaw<A>>;
5794
7439
 
5795
- type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
7440
+ interface ImageTransformations {
7441
+ /**
7442
+ * Whether to preserve animation frames from input files. Default is true.
7443
+ * Setting it to false reduces animations to still images. This setting is
7444
+ * recommended when enlarging images or processing arbitrary user content,
7445
+ * because large GIF animations can weigh tens or even hundreds of megabytes.
7446
+ * It is also useful to set anim:false when using format:"json" to get the
7447
+ * response quicker without the number of frames.
7448
+ */
7449
+ anim?: boolean;
7450
+ /**
7451
+ * Background color to add underneath the image. Applies only to images with
7452
+ * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
7453
+ * hsl(…), etc.)
7454
+ */
7455
+ background?: string;
7456
+ /**
7457
+ * Radius of a blur filter (approximate gaussian). Maximum supported radius
7458
+ * is 250.
7459
+ */
7460
+ blur?: number;
7461
+ /**
7462
+ * Increase brightness by a factor. A value of 1.0 equals no change, a value
7463
+ * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
7464
+ * 0 is ignored.
7465
+ */
7466
+ brightness?: number;
7467
+ /**
7468
+ * Slightly reduces latency on a cache miss by selecting a
7469
+ * quickest-to-compress file format, at a cost of increased file size and
7470
+ * lower image quality. It will usually override the format option and choose
7471
+ * JPEG over WebP or AVIF. We do not recommend using this option, except in
7472
+ * unusual circumstances like resizing uncacheable dynamically-generated
7473
+ * images.
7474
+ */
7475
+ compression?: 'fast';
7476
+ /**
7477
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
7478
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
7479
+ * ignored.
7480
+ */
7481
+ contrast?: number;
7482
+ /**
7483
+ * Download file. Forces browser to download the image.
7484
+ * Value is used for the download file name. Extension is optional.
7485
+ */
7486
+ download?: string;
7487
+ /**
7488
+ * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
7489
+ * easier to specify higher-DPI sizes in <img srcset>.
7490
+ */
7491
+ dpr?: number;
7492
+ /**
7493
+ * Resizing mode as a string. It affects interpretation of width and height
7494
+ * options:
7495
+ * - scale-down: Similar to contain, but the image is never enlarged. If
7496
+ * the image is larger than given width or height, it will be resized.
7497
+ * Otherwise its original size will be kept.
7498
+ * - contain: Resizes to maximum size that fits within the given width and
7499
+ * height. If only a single dimension is given (e.g. only width), the
7500
+ * image will be shrunk or enlarged to exactly match that dimension.
7501
+ * Aspect ratio is always preserved.
7502
+ * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
7503
+ * and height. If the image has an aspect ratio different from the ratio
7504
+ * of width and height, it will be cropped to fit.
7505
+ * - crop: The image will be shrunk and cropped to fit within the area
7506
+ * specified by width and height. The image will not be enlarged. For images
7507
+ * smaller than the given dimensions it's the same as scale-down. For
7508
+ * images larger than the given dimensions, it's the same as cover.
7509
+ * See also trim.
7510
+ * - pad: Resizes to the maximum size that fits within the given width and
7511
+ * height, and then fills the remaining area with a background color
7512
+ * (white by default). Use of this mode is not recommended, as the same
7513
+ * effect can be more efficiently achieved with the contain mode and the
7514
+ * CSS object-fit: contain property.
7515
+ */
7516
+ fit?: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad';
7517
+ /**
7518
+ * Output format to generate. It can be:
7519
+ * - avif: generate images in AVIF format.
7520
+ * - webp: generate images in Google WebP format. Set quality to 100 to get
7521
+ * the WebP-lossless format.
7522
+ * - json: instead of generating an image, outputs information about the
7523
+ * image, in JSON format. The JSON object will contain image size
7524
+ * (before and after resizing), source image’s MIME type, file size, etc.
7525
+ * - jpeg: generate images in JPEG format.
7526
+ * - png: generate images in PNG format.
7527
+ */
7528
+ format?: 'auto' | 'avif' | 'webp' | 'json' | 'jpeg' | 'png';
7529
+ /**
7530
+ * Increase exposure by a factor. A value of 1.0 equals no change, a value of
7531
+ * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
7532
+ */
7533
+ gamma?: number;
7534
+ /**
7535
+ * When cropping with fit: "cover", this defines the side or point that should
7536
+ * be left uncropped. The value is either a string
7537
+ * "left", "right", "top", "bottom", "auto", or "center" (the default),
7538
+ * or an object {x, y} containing focal point coordinates in the original
7539
+ * image expressed as fractions ranging from 0.0 (top or left) to 1.0
7540
+ * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
7541
+ * crop bottom or left and right sides as necessary, but won’t crop anything
7542
+ * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
7543
+ * preserve as much as possible around a point at 20% of the height of the
7544
+ * source image.
7545
+ */
7546
+ gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | {
7547
+ x: number;
7548
+ y: number;
7549
+ };
7550
+ /**
7551
+ * Maximum height in image pixels. The value must be an integer.
7552
+ */
7553
+ height?: number;
7554
+ /**
7555
+ * What EXIF data should be preserved in the output image. Note that EXIF
7556
+ * rotation and embedded color profiles are always applied ("baked in" into
7557
+ * the image), and aren't affected by this option. Note that if the Polish
7558
+ * feature is enabled, all metadata may have been removed already and this
7559
+ * option may have no effect.
7560
+ * - keep: Preserve most of EXIF metadata, including GPS location if there's
7561
+ * any.
7562
+ * - copyright: Only keep the copyright tag, and discard everything else.
7563
+ * This is the default behavior for JPEG files.
7564
+ * - none: Discard all invisible EXIF metadata. Currently WebP and PNG
7565
+ * output formats always discard metadata.
7566
+ */
7567
+ metadata?: 'keep' | 'copyright' | 'none';
7568
+ /**
7569
+ * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
7570
+ * make images look worse, but load faster. The default is 85. It applies only
7571
+ * to JPEG and WebP images. It doesn’t have any effect on PNG.
7572
+ */
7573
+ quality?: number;
7574
+ /**
7575
+ * Number of degrees (90, 180, 270) to rotate the image by. width and height
7576
+ * options refer to axes after rotation.
7577
+ */
7578
+ rotate?: 0 | 90 | 180 | 270 | 360;
7579
+ /**
7580
+ * Strength of sharpening filter to apply to the image. Floating-point
7581
+ * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
7582
+ * recommended value for downscaled images.
7583
+ */
7584
+ sharpen?: number;
7585
+ /**
7586
+ * An object with four properties {left, top, right, bottom} that specify
7587
+ * a number of pixels to cut off on each side. Allows removal of borders
7588
+ * or cutting out a specific fragment of an image. Trimming is performed
7589
+ * before resizing or rotation. Takes dpr into account.
7590
+ */
7591
+ trim?: {
7592
+ left?: number;
7593
+ top?: number;
7594
+ right?: number;
7595
+ bottom?: number;
7596
+ };
7597
+ /**
7598
+ * Maximum width in image pixels. The value must be an integer.
7599
+ */
7600
+ width?: number;
7601
+ }
7602
+ declare function transformImage(url: string, ...transformations: ImageTransformations[]): string;
7603
+ declare function transformImage(url: string | undefined, ...transformations: ImageTransformations[]): string | undefined;
7604
+
7605
+ type XataFileEditableFields = Partial<Pick<XataArrayFile, keyof InputFileEntry>>;
7606
+ type XataFileFields = Partial<Pick<XataArrayFile, {
7607
+ [K in StringKeys<XataArrayFile>]: XataArrayFile[K] extends Function ? never : K;
7608
+ }[keyof XataArrayFile]>>;
7609
+ declare class XataFile {
7610
+ /**
7611
+ * Identifier of the file.
7612
+ */
7613
+ id?: string;
7614
+ /**
7615
+ * Name of the file.
7616
+ */
7617
+ name: string;
7618
+ /**
7619
+ * Media type of the file.
7620
+ */
7621
+ mediaType: string;
7622
+ /**
7623
+ * Base64 encoded content of the file.
7624
+ */
7625
+ base64Content?: string;
7626
+ /**
7627
+ * Whether to enable public url for the file.
7628
+ */
7629
+ enablePublicUrl: boolean;
7630
+ /**
7631
+ * Timeout for the signed url.
7632
+ */
7633
+ signedUrlTimeout: number;
7634
+ /**
7635
+ * Size of the file.
7636
+ */
7637
+ size?: number;
7638
+ /**
7639
+ * Version of the file.
7640
+ */
7641
+ version: number;
7642
+ /**
7643
+ * Url of the file.
7644
+ */
7645
+ url: string;
7646
+ /**
7647
+ * Signed url of the file.
7648
+ */
7649
+ signedUrl?: string;
7650
+ /**
7651
+ * Attributes of the file.
7652
+ */
7653
+ attributes: Record<string, any>;
7654
+ constructor(file: Partial<XataFile>);
7655
+ static fromBuffer(buffer: Buffer, options?: XataFileEditableFields): XataFile;
7656
+ toBuffer(): Buffer;
7657
+ static fromArrayBuffer(arrayBuffer: ArrayBuffer, options?: XataFileEditableFields): XataFile;
7658
+ toArrayBuffer(): ArrayBuffer;
7659
+ static fromUint8Array(uint8Array: Uint8Array, options?: XataFileEditableFields): XataFile;
7660
+ toUint8Array(): Uint8Array;
7661
+ static fromBlob(file: Blob, options?: XataFileEditableFields): Promise<XataFile>;
7662
+ toBlob(): Blob;
7663
+ static fromString(string: string, options?: XataFileEditableFields): XataFile;
7664
+ toString(): string;
7665
+ static fromBase64(base64Content: string, options?: XataFileEditableFields): XataFile;
7666
+ toBase64(): string;
7667
+ transform(...options: ImageTransformations[]): {
7668
+ url: string;
7669
+ signedUrl: string | undefined;
7670
+ metadataUrl: string;
7671
+ metadataSignedUrl: string | undefined;
7672
+ };
7673
+ }
7674
+ type XataArrayFile = Identifiable & XataFile;
7675
+
7676
+ type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | `xata.${'version' | 'createdAt' | 'updatedAt'}` | DataProps<O> | NestedColumns<O, RecursivePath>;
7677
+ type ExpandedColumnNotation = {
7678
+ name: string;
7679
+ columns?: SelectableColumn<any>[];
7680
+ as?: string;
7681
+ limit?: number;
7682
+ offset?: number;
7683
+ order?: {
7684
+ column: string;
7685
+ order: 'asc' | 'desc';
7686
+ }[];
7687
+ };
7688
+ type SelectableColumnWithObjectNotation<O, RecursivePath extends any[] = []> = SelectableColumn<O, RecursivePath> | ExpandedColumnNotation;
7689
+ declare function isValidExpandedColumn(column: any): column is ExpandedColumnNotation;
7690
+ declare function isValidSelectableColumns(columns: any): columns is SelectableColumn<any>[];
7691
+ type StringColumns<T> = T extends string ? T : never;
7692
+ type ProjectionColumns<T> = T extends string ? never : T extends {
7693
+ as: infer As;
7694
+ } ? NonNullable<As> extends string ? NonNullable<As> : never : never;
5796
7695
  type WildcardColumns<O> = Values<{
5797
7696
  [K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
5798
7697
  }>;
5799
7698
  type ColumnsByValue<O, Value> = Values<{
5800
7699
  [K in SelectableColumn<O>]: ValueAtColumn<O, K> extends infer C ? C extends Value ? K extends WildcardColumns<O> ? never : K : never : never;
5801
7700
  }>;
5802
- type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
5803
- [K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
7701
+ type SelectedPick<O extends XataRecord, Key extends SelectableColumnWithObjectNotation<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
7702
+ [K in StringColumns<Key[number]>]: NestedValueAtColumn<O, K> & XataRecord<O>;
7703
+ }>> & UnionToIntersection<Values<{
7704
+ [K in ProjectionColumns<Key[number]>]: {
7705
+ [Key in K]: {
7706
+ records: (Record<string, any> & XataRecord<O>)[];
7707
+ };
7708
+ };
5804
7709
  }>>;
5805
- 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> ? {
5806
- V: ValueAtColumn<Item, V>;
5807
- } : never : O[K] : never> : never : never;
5808
- type MAX_RECURSION = 2;
7710
+ type ValueAtColumn<Object, Key, RecursivePath extends any[] = []> = RecursivePath['length'] extends MAX_RECURSION ? never : 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> ? {
7711
+ V: ValueAtColumn<Item, V, [...RecursivePath, Item]>;
7712
+ } : never : Object[K] : never> : never : never;
7713
+ type MAX_RECURSION = 3;
5809
7714
  type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
5810
- [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
5811
- 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
7715
+ [K in DataProps<O>]: NonNullable<O[K]> extends infer Item ? If<IsArray<Item>, Item extends (infer Type)[] ? Type extends XataArrayFile ? K | `${K}.${keyof XataFileFields | '*'}` : 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 XataFileFields | '*'}` : `${K}.${StringKeys<Item> | '*'}`, // This allows usage of objects that are not links
5812
7716
  K>> : never;
5813
7717
  }>, never>;
5814
7718
  type DataProps<O> = Exclude<StringKeys<O>, StringKeys<XataRecord>>;
5815
7719
  type NestedValueAtColumn<O, Key extends SelectableColumn<O>> = Key extends `${infer N}.${infer M}` ? N extends DataProps<O> ? {
5816
- [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;
7720
+ [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;
5817
7721
  } : unknown : Key extends DataProps<O> ? {
5818
- [K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], SelectedPick<NonNullable<O[K]>, ['*']>> : O[K];
7722
+ [K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Omit<SelectedPick<NonNullable<O[K]>, ['*']>, 'xata' | 'getMetadata'>> : O[K];
5819
7723
  } : Key extends '*' ? {
5820
7724
  [K in StringKeys<O>]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Link<NonNullable<O[K]>>> : O[K];
5821
7725
  } : unknown;
5822
7726
  type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
5823
7727
 
7728
+ declare const RecordColumnTypes: readonly ["bool", "int", "float", "string", "text", "email", "multiple", "link", "object", "datetime", "vector", "file[]", "file", "json"];
7729
+ type Identifier = string;
5824
7730
  /**
5825
7731
  * Represents an identifiable record from the database.
5826
7732
  */
@@ -5828,7 +7734,7 @@ interface Identifiable {
5828
7734
  /**
5829
7735
  * Unique id of this record.
5830
7736
  */
5831
- id: string;
7737
+ id: Identifier;
5832
7738
  }
5833
7739
  interface BaseData {
5834
7740
  [key: string]: any;
@@ -5837,8 +7743,13 @@ interface BaseData {
5837
7743
  * Represents a persisted record from the database.
5838
7744
  */
5839
7745
  interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> extends Identifiable {
7746
+ /**
7747
+ * Metadata of this record.
7748
+ */
7749
+ xata: XataRecordMetadata;
5840
7750
  /**
5841
7751
  * Get metadata of this record.
7752
+ * @deprecated Use `xata` property instead.
5842
7753
  */
5843
7754
  getMetadata(): XataRecordMetadata;
5844
7755
  /**
@@ -5917,23 +7828,71 @@ type XataRecordMetadata = {
5917
7828
  * Number that is increased every time the record is updated.
5918
7829
  */
5919
7830
  version: number;
5920
- warnings?: string[];
7831
+ /**
7832
+ * Timestamp when the record was created.
7833
+ */
7834
+ createdAt: Date;
7835
+ /**
7836
+ * Timestamp when the record was last updated.
7837
+ */
7838
+ updatedAt: Date;
5921
7839
  };
5922
7840
  declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
5923
7841
  declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
7842
+ type NumericOperator = ExclusiveOr<{
7843
+ $increment?: number;
7844
+ }, ExclusiveOr<{
7845
+ $decrement?: number;
7846
+ }, ExclusiveOr<{
7847
+ $multiply?: number;
7848
+ }, {
7849
+ $divide?: number;
7850
+ }>>>;
7851
+ type InputXataFile = Partial<XataArrayFile> | Promise<Partial<XataArrayFile>>;
5924
7852
  type EditableDataFields<T> = T extends XataRecord ? {
5925
- id: string;
5926
- } | string : NonNullable<T> extends XataRecord ? {
5927
- id: string;
5928
- } | string | null | undefined : T extends Date ? string | Date : NonNullable<T> extends Date ? string | Date | null | undefined : T;
7853
+ id: Identifier;
7854
+ } | Identifier : NonNullable<T> extends XataRecord ? {
7855
+ id: Identifier;
7856
+ } | 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;
5929
7857
  type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
5930
7858
  [K in keyof O]: EditableDataFields<O[K]>;
5931
7859
  }, keyof XataRecord>>;
5932
- 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;
5933
- type JSONData<O> = Identifiable & Partial<Omit<{
7860
+ type JSONDataFile = {
7861
+ [K in keyof XataFile]: XataFile[K] extends Function ? never : XataFile[K];
7862
+ };
7863
+ type JSONDataFields<T> = T extends XataFile ? JSONDataFile : NonNullable<T> extends XataFile ? JSONDataFile | null | undefined : T extends XataRecord ? JSONData<T> : NonNullable<T> extends XataRecord ? JSONData<T> | null | undefined : T extends Date ? string : NonNullable<T> extends Date ? string | null | undefined : T;
7864
+ type JSONDataBase = Identifiable & {
7865
+ /**
7866
+ * Metadata about the record.
7867
+ */
7868
+ xata: {
7869
+ /**
7870
+ * Timestamp when the record was created.
7871
+ */
7872
+ createdAt: string;
7873
+ /**
7874
+ * Timestamp when the record was last updated.
7875
+ */
7876
+ updatedAt: string;
7877
+ /**
7878
+ * Number that is increased every time the record is updated.
7879
+ */
7880
+ version: number;
7881
+ };
7882
+ };
7883
+ type JSONData<O> = JSONDataBase & Partial<Omit<{
5934
7884
  [K in keyof O]: JSONDataFields<O[K]>;
5935
7885
  }, keyof XataRecord>>;
5936
7886
 
7887
+ type JSONValue<Value> = Value & {
7888
+ __json: true;
7889
+ };
7890
+
7891
+ type JSONFilterColumns<Record> = Values<{
7892
+ [K in keyof Record]: NonNullable<Record[K]> extends JSONValue<any> ? K extends string ? `${K}->${string}` : never : never;
7893
+ }>;
7894
+ type FilterColumns<T> = ColumnsByValue<T, any> | `xata.${keyof XataRecordMetadata}`;
7895
+ type FilterValueAtColumn<Record, F> = NonNullable<ValueAtColumn<Record, F>> extends JSONValue<any> ? PropertyFilter<any> : Filter<NonNullable<ValueAtColumn<Record, F>>>;
5937
7896
  /**
5938
7897
  * PropertyMatchFilter
5939
7898
  * Example:
@@ -5953,7 +7912,9 @@ type JSONData<O> = Identifiable & Partial<Omit<{
5953
7912
  }
5954
7913
  */
5955
7914
  type PropertyAccessFilter<Record> = {
5956
- [key in ColumnsByValue<Record, any>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
7915
+ [key in FilterColumns<Record>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
7916
+ } & {
7917
+ [key in JSONFilterColumns<Record>]?: PropertyFilter<Record[keyof Record]>;
5957
7918
  };
5958
7919
  type PropertyFilter<T> = T | {
5959
7920
  $is: T;
@@ -5970,7 +7931,7 @@ type IncludesFilter<T> = PropertyFilter<T> | {
5970
7931
  }>;
5971
7932
  };
5972
7933
  type StringTypeFilter = {
5973
- [key in '$contains' | '$pattern' | '$startsWith' | '$endsWith']?: string;
7934
+ [key in '$contains' | '$iContains' | '$pattern' | '$iPattern' | '$startsWith' | '$endsWith']?: string;
5974
7935
  };
5975
7936
  type ComparableType = number | Date;
5976
7937
  type ComparableTypeFilter<T extends ComparableType> = {
@@ -6015,7 +7976,7 @@ type AggregatorFilter<T> = {
6015
7976
  * Example: { filter: { $exists: "settings" } }
6016
7977
  */
6017
7978
  type ExistanceFilter<Record> = {
6018
- [key in '$exists' | '$notExists']?: ColumnsByValue<Record, any>;
7979
+ [key in '$exists' | '$notExists']?: FilterColumns<Record>;
6019
7980
  };
6020
7981
  type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
6021
7982
  /**
@@ -6032,6 +7993,12 @@ type DateBooster = {
6032
7993
  origin?: string;
6033
7994
  scale: string;
6034
7995
  decay: number;
7996
+ /**
7997
+ * The factor with which to multiply the added boost.
7998
+ *
7999
+ * @minimum 0
8000
+ */
8001
+ factor?: number;
6035
8002
  };
6036
8003
  type NumericBooster = {
6037
8004
  factor: number;
@@ -6133,22 +8100,27 @@ type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends Stri
6133
8100
  }>>;
6134
8101
  page?: SearchPageConfig;
6135
8102
  };
8103
+ type TotalCount = Pick<SearchResponse, 'totalCount'>;
6136
8104
  type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
6137
- all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
6138
- [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
6139
- table: Model;
6140
- record: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>>;
8105
+ all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<TotalCount & {
8106
+ records: Values<{
8107
+ [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
8108
+ table: Model;
8109
+ record: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>>;
8110
+ };
8111
+ }>[];
8112
+ }>;
8113
+ byTable: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<TotalCount & {
8114
+ records: {
8115
+ [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>[]>;
6141
8116
  };
6142
- }>[]>;
6143
- byTable: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<{
6144
- [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>[]>;
6145
8117
  }>;
6146
8118
  };
6147
8119
  declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
6148
8120
  #private;
6149
8121
  private db;
6150
8122
  constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
6151
- build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
8123
+ build(pluginOptions: XataPluginOptions): SearchPluginResult<Schemas>;
6152
8124
  }
6153
8125
  type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
6154
8126
  getMetadata: () => XataRecordMetadata & SearchExtraProperties;
@@ -6176,6 +8148,7 @@ type AggregationExpression<O extends XataRecord> = ExactlyOne<{
6176
8148
  max: MaxAggregation<O>;
6177
8149
  min: MinAggregation<O>;
6178
8150
  average: AverageAggregation<O>;
8151
+ percentiles: PercentilesAggregation<O>;
6179
8152
  uniqueCount: UniqueCountAggregation<O>;
6180
8153
  dateHistogram: DateHistogramAggregation<O>;
6181
8154
  topValues: TopValuesAggregation<O>;
@@ -6230,6 +8203,16 @@ type AverageAggregation<O extends XataRecord> = {
6230
8203
  */
6231
8204
  column: ColumnsByValue<O, number>;
6232
8205
  };
8206
+ /**
8207
+ * Calculate given percentiles of the numeric values in a particular column.
8208
+ */
8209
+ type PercentilesAggregation<O extends XataRecord> = {
8210
+ /**
8211
+ * The column on which to compute the average. Must be a numeric type.
8212
+ */
8213
+ column: ColumnsByValue<O, number>;
8214
+ percentiles: number[];
8215
+ };
6233
8216
  /**
6234
8217
  * Count the number of distinct values in a particular column.
6235
8218
  */
@@ -6325,6 +8308,11 @@ type AggregationExpressionResultTypes = {
6325
8308
  max: number | null;
6326
8309
  min: number | null;
6327
8310
  average: number | null;
8311
+ percentiles: {
8312
+ values: {
8313
+ [key: string]: number;
8314
+ };
8315
+ };
6328
8316
  uniqueCount: number;
6329
8317
  dateHistogram: ComplexAggregationResult;
6330
8318
  topValues: ComplexAggregationResult;
@@ -6338,13 +8326,57 @@ type ComplexAggregationResult = {
6338
8326
  }>;
6339
8327
  };
6340
8328
 
8329
+ type KeywordAskOptions<Record extends XataRecord> = {
8330
+ searchType?: 'keyword';
8331
+ search?: {
8332
+ fuzziness?: FuzzinessExpression;
8333
+ target?: TargetColumn<Record>[];
8334
+ prefix?: PrefixExpression;
8335
+ filter?: Filter<Record>;
8336
+ boosters?: Boosters<Record>[];
8337
+ };
8338
+ };
8339
+ type VectorAskOptions<Record extends XataRecord> = {
8340
+ searchType?: 'vector';
8341
+ vectorSearch?: {
8342
+ /**
8343
+ * The column to use for vector search. It must be of type `vector`.
8344
+ */
8345
+ column: string;
8346
+ /**
8347
+ * The column containing the text for vector search. Must be of type `text`.
8348
+ */
8349
+ contentColumn: string;
8350
+ filter?: Filter<Record>;
8351
+ };
8352
+ };
8353
+ type TypeAskOptions<Record extends XataRecord> = KeywordAskOptions<Record> | VectorAskOptions<Record>;
8354
+ type BaseAskOptions = {
8355
+ rules?: string[];
8356
+ sessionId?: string;
8357
+ };
8358
+ type AskOptions<Record extends XataRecord> = TypeAskOptions<Record> & BaseAskOptions;
8359
+ type AskResult = {
8360
+ answer?: string;
8361
+ records?: string[];
8362
+ sessionId?: string;
8363
+ };
8364
+
6341
8365
  type SortDirection = 'asc' | 'desc';
6342
- type SortFilterExtended<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = {
8366
+ type RandomFilter = {
8367
+ '*': 'random';
8368
+ };
8369
+ type RandomFilterExtended = {
8370
+ column: '*';
8371
+ direction: 'random';
8372
+ };
8373
+ type SortColumns<T extends XataRecord> = ColumnsByValue<T, any> | `xata.${keyof XataRecordMetadata}`;
8374
+ type SortFilterExtended<T extends XataRecord, Columns extends string = SortColumns<T>> = RandomFilterExtended | {
6343
8375
  column: Columns;
6344
8376
  direction?: SortDirection;
6345
8377
  };
6346
- type SortFilter<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns>;
6347
- type SortFilterBase<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Values<{
8378
+ type SortFilter<T extends XataRecord, Columns extends string = SortColumns<T>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns> | RandomFilter;
8379
+ type SortFilterBase<T extends XataRecord, Columns extends string = SortColumns<T>> = Values<{
6348
8380
  [Key in Columns]: {
6349
8381
  [K in Key]: SortDirection;
6350
8382
  };
@@ -6366,6 +8398,7 @@ type SummarizeParams<Record extends XataRecord, Expression extends Dictionary<Su
6366
8398
  pagination?: {
6367
8399
  size: number;
6368
8400
  };
8401
+ consistency?: 'strong' | 'eventual';
6369
8402
  };
6370
8403
  type SummarizeResult<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
6371
8404
  summaries: SummarizeResultItem<Record, Expression, Columns>[];
@@ -6385,7 +8418,7 @@ type SummarizeFilter<Record extends XataRecord, Expression extends Dictionary<Su
6385
8418
  type SummarizeResultItem<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = SummarizeValuePick<Record, Expression> & SelectedPick<Record, Columns>;
6386
8419
 
6387
8420
  type BaseOptions<T extends XataRecord> = {
6388
- columns?: SelectableColumn<T>[];
8421
+ columns?: SelectableColumnWithObjectNotation<T>[];
6389
8422
  consistency?: 'strong' | 'eventual';
6390
8423
  cache?: number;
6391
8424
  fetchOptions?: Record<string, unknown>;
@@ -6453,7 +8486,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6453
8486
  * @param value The value to filter.
6454
8487
  * @returns A new Query object.
6455
8488
  */
6456
- filter<F extends SelectableColumn<Record>>(column: F, value: Filter<NonNullable<ValueAtColumn<Record, F>>>): Query<Record, Result>;
8489
+ filter<F extends FilterColumns<Record> | JSONFilterColumns<Record>>(column: F, value: FilterValueAtColumn<Record, F>): Query<Record, Result>;
6457
8490
  /**
6458
8491
  * Builds a new query object adding one or more constraints. Examples:
6459
8492
  *
@@ -6474,13 +8507,15 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6474
8507
  * @param direction The direction. Either ascending or descending.
6475
8508
  * @returns A new Query object.
6476
8509
  */
6477
- sort<F extends ColumnsByValue<Record, any>>(column: F, direction?: SortDirection): Query<Record, Result>;
8510
+ sort<F extends SortColumns<Record>>(column: F, direction: SortDirection): Query<Record, Result>;
8511
+ sort(column: '*', direction: 'random'): Query<Record, Result>;
8512
+ sort<F extends SortColumns<Record>>(column: F): Query<Record, Result>;
6478
8513
  /**
6479
8514
  * Builds a new query specifying the set of columns to be returned in the query response.
6480
8515
  * @param columns Array of column names to be returned by the query.
6481
8516
  * @returns A new Query object.
6482
8517
  */
6483
- select<K extends SelectableColumn<Record>>(columns: K[]): Query<Record, SelectedPick<Record, K[]>>;
8518
+ select<K extends SelectableColumnWithObjectNotation<Record>>(columns: K[]): Query<Record, SelectedPick<Record, K[]>>;
6484
8519
  /**
6485
8520
  * Get paginated results
6486
8521
  *
@@ -6500,7 +8535,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6500
8535
  * @param options Pagination options
6501
8536
  * @returns A page of results
6502
8537
  */
6503
- getPaginated<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<Page<Record, SelectedPick<Record, typeof options['columns']>>>;
8538
+ getPaginated<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<Page<Record, SelectedPick<Record, (typeof options)['columns']>>>;
6504
8539
  /**
6505
8540
  * Get results in an iterator
6506
8541
  *
@@ -6531,7 +8566,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6531
8566
  */
6532
8567
  getIterator<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
6533
8568
  batchSize?: number;
6534
- }>(options: Options): AsyncGenerator<SelectedPick<Record, typeof options['columns']>[]>;
8569
+ }>(options: Options): AsyncGenerator<SelectedPick<Record, (typeof options)['columns']>[]>;
6535
8570
  /**
6536
8571
  * Performs the query in the database and returns a set of results.
6537
8572
  * @returns An array of records from the database.
@@ -6542,7 +8577,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6542
8577
  * @param options Additional options to be used when performing the query.
6543
8578
  * @returns An array of records from the database.
6544
8579
  */
6545
- getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, typeof options['columns']>>>;
8580
+ getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
6546
8581
  /**
6547
8582
  * Performs the query in the database and returns a set of results.
6548
8583
  * @param options Additional options to be used when performing the query.
@@ -6563,7 +8598,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6563
8598
  */
6564
8599
  getAll<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
6565
8600
  batchSize?: number;
6566
- }>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>[]>;
8601
+ }>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>[]>;
6567
8602
  /**
6568
8603
  * Performs the query in the database and returns all the results.
6569
8604
  * Warning: If there are a large number of results, this method can have performance implications.
@@ -6583,7 +8618,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6583
8618
  * @param options Additional options to be used when performing the query.
6584
8619
  * @returns The first record that matches the query, or null if no record matched the query.
6585
8620
  */
6586
- getFirst<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']> | null>;
8621
+ getFirst<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']> | null>;
6587
8622
  /**
6588
8623
  * Performs the query in the database and returns the first result.
6589
8624
  * @param options Additional options to be used when performing the query.
@@ -6602,7 +8637,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6602
8637
  * @returns The first record that matches the query, or null if no record matched the query.
6603
8638
  * @throws if there are no results.
6604
8639
  */
6605
- getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>>;
8640
+ getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>>;
6606
8641
  /**
6607
8642
  * Performs the query in the database and returns the first result.
6608
8643
  * @param options Additional options to be used when performing the query.
@@ -6651,6 +8686,7 @@ type PaginationQueryMeta = {
6651
8686
  page: {
6652
8687
  cursor: string;
6653
8688
  more: boolean;
8689
+ size: number;
6654
8690
  };
6655
8691
  };
6656
8692
  interface Paginable<Record extends XataRecord, Result extends XataRecord = Record> {
@@ -6723,9 +8759,9 @@ type OffsetNavigationOptions = {
6723
8759
  size?: number;
6724
8760
  offset?: number;
6725
8761
  };
6726
- declare const PAGINATION_MAX_SIZE = 200;
8762
+ declare const PAGINATION_MAX_SIZE = 1000;
6727
8763
  declare const PAGINATION_DEFAULT_SIZE = 20;
6728
- declare const PAGINATION_MAX_OFFSET = 800;
8764
+ declare const PAGINATION_MAX_OFFSET = 49000;
6729
8765
  declare const PAGINATION_DEFAULT_OFFSET = 0;
6730
8766
  declare function isCursorPaginationOptions(options: Record<string, unknown> | undefined | null): options is CursorNavigationOptions;
6731
8767
  declare class RecordArray<Result extends XataRecord> extends Array<Result> {
@@ -6783,7 +8819,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6783
8819
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6784
8820
  * @returns The full persisted record.
6785
8821
  */
6786
- abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8822
+ abstract create<K extends SelectableColumn<Record>>(id: Identifier, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
6787
8823
  ifVersion?: number;
6788
8824
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
6789
8825
  /**
@@ -6792,7 +8828,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6792
8828
  * @param object Object containing the column names with their values to be stored in the table.
6793
8829
  * @returns The full persisted record.
6794
8830
  */
6795
- abstract create(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8831
+ abstract create(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
6796
8832
  ifVersion?: number;
6797
8833
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
6798
8834
  /**
@@ -6814,26 +8850,26 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6814
8850
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6815
8851
  * @returns The persisted record for the given id or null if the record could not be found.
6816
8852
  */
6817
- abstract read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
8853
+ abstract read<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
6818
8854
  /**
6819
8855
  * Queries a single record from the table given its unique id.
6820
8856
  * @param id The unique id.
6821
8857
  * @returns The persisted record for the given id or null if the record could not be found.
6822
8858
  */
6823
- abstract read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
8859
+ abstract read(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
6824
8860
  /**
6825
8861
  * Queries multiple records from the table given their unique id.
6826
8862
  * @param ids The unique ids array.
6827
8863
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6828
8864
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
6829
8865
  */
6830
- abstract read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8866
+ abstract read<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
6831
8867
  /**
6832
8868
  * Queries multiple records from the table given their unique id.
6833
8869
  * @param ids The unique ids array.
6834
8870
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
6835
8871
  */
6836
- abstract read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8872
+ abstract read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
6837
8873
  /**
6838
8874
  * Queries a single record from the table by the id in the object.
6839
8875
  * @param object Object containing the id of the record.
@@ -6867,14 +8903,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6867
8903
  * @returns The persisted record for the given id.
6868
8904
  * @throws If the record could not be found.
6869
8905
  */
6870
- abstract readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8906
+ abstract readOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
6871
8907
  /**
6872
8908
  * Queries a single record from the table given its unique id.
6873
8909
  * @param id The unique id.
6874
8910
  * @returns The persisted record for the given id.
6875
8911
  * @throws If the record could not be found.
6876
8912
  */
6877
- abstract readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8913
+ abstract readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
6878
8914
  /**
6879
8915
  * Queries multiple records from the table given their unique id.
6880
8916
  * @param ids The unique ids array.
@@ -6882,14 +8918,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6882
8918
  * @returns The persisted records for the given ids in order.
6883
8919
  * @throws If one or more records could not be found.
6884
8920
  */
6885
- abstract readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
8921
+ abstract readOrThrow<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
6886
8922
  /**
6887
8923
  * Queries multiple records from the table given their unique id.
6888
8924
  * @param ids The unique ids array.
6889
8925
  * @returns The persisted records for the given ids in order.
6890
8926
  * @throws If one or more records could not be found.
6891
8927
  */
6892
- abstract readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8928
+ abstract readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
6893
8929
  /**
6894
8930
  * Queries a single record from the table by the id in the object.
6895
8931
  * @param object Object containing the id of the record.
@@ -6944,7 +8980,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6944
8980
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
6945
8981
  * @returns The full persisted record, null if the record could not be found.
6946
8982
  */
6947
- abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
8983
+ abstract update<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
6948
8984
  ifVersion?: number;
6949
8985
  }): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
6950
8986
  /**
@@ -6953,7 +8989,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6953
8989
  * @param object The column names and their values that have to be updated.
6954
8990
  * @returns The full persisted record, null if the record could not be found.
6955
8991
  */
6956
- abstract update(id: string, object: Partial<EditableData<Record>>, options?: {
8992
+ abstract update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
6957
8993
  ifVersion?: number;
6958
8994
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
6959
8995
  /**
@@ -6996,7 +9032,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6996
9032
  * @returns The full persisted record.
6997
9033
  * @throws If the record could not be found.
6998
9034
  */
6999
- abstract updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
9035
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
7000
9036
  ifVersion?: number;
7001
9037
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7002
9038
  /**
@@ -7006,7 +9042,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7006
9042
  * @returns The full persisted record.
7007
9043
  * @throws If the record could not be found.
7008
9044
  */
7009
- abstract updateOrThrow(id: string, object: Partial<EditableData<Record>>, options?: {
9045
+ abstract updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
7010
9046
  ifVersion?: number;
7011
9047
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7012
9048
  /**
@@ -7031,7 +9067,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7031
9067
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7032
9068
  * @returns The full persisted record.
7033
9069
  */
7034
- abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
9070
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[], options?: {
7035
9071
  ifVersion?: number;
7036
9072
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7037
9073
  /**
@@ -7040,7 +9076,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7040
9076
  * @param object Object containing the column names with their values to be persisted in the table.
7041
9077
  * @returns The full persisted record.
7042
9078
  */
7043
- abstract createOrUpdate(object: EditableData<Record> & Identifiable, options?: {
9079
+ abstract createOrUpdate(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
7044
9080
  ifVersion?: number;
7045
9081
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7046
9082
  /**
@@ -7051,7 +9087,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7051
9087
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7052
9088
  * @returns The full persisted record.
7053
9089
  */
7054
- abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
9090
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
7055
9091
  ifVersion?: number;
7056
9092
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7057
9093
  /**
@@ -7061,7 +9097,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7061
9097
  * @param object The column names and the values to be persisted.
7062
9098
  * @returns The full persisted record.
7063
9099
  */
7064
- abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
9100
+ abstract createOrUpdate(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
7065
9101
  ifVersion?: number;
7066
9102
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7067
9103
  /**
@@ -7071,14 +9107,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7071
9107
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7072
9108
  * @returns Array of the persisted records.
7073
9109
  */
7074
- abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
9110
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7075
9111
  /**
7076
9112
  * Creates or updates a single record. If a record exists with the given id,
7077
9113
  * it will be partially updated, otherwise a new record will be created.
7078
9114
  * @param objects Array of objects with the column names and the values to be stored in the table.
7079
9115
  * @returns Array of the persisted records.
7080
9116
  */
7081
- abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
9117
+ abstract createOrUpdate(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7082
9118
  /**
7083
9119
  * Creates or replaces a single record. If a record exists with the given id,
7084
9120
  * it will be replaced, otherwise a new record will be created.
@@ -7086,7 +9122,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7086
9122
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7087
9123
  * @returns The full persisted record.
7088
9124
  */
7089
- abstract createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
9125
+ abstract createOrReplace<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[], options?: {
7090
9126
  ifVersion?: number;
7091
9127
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7092
9128
  /**
@@ -7095,7 +9131,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7095
9131
  * @param object Object containing the column names with their values to be persisted in the table.
7096
9132
  * @returns The full persisted record.
7097
9133
  */
7098
- abstract createOrReplace(object: EditableData<Record> & Identifiable, options?: {
9134
+ abstract createOrReplace(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
7099
9135
  ifVersion?: number;
7100
9136
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7101
9137
  /**
@@ -7106,7 +9142,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7106
9142
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7107
9143
  * @returns The full persisted record.
7108
9144
  */
7109
- abstract createOrReplace<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
9145
+ abstract createOrReplace<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
7110
9146
  ifVersion?: number;
7111
9147
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7112
9148
  /**
@@ -7116,7 +9152,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7116
9152
  * @param object The column names and the values to be persisted.
7117
9153
  * @returns The full persisted record.
7118
9154
  */
7119
- abstract createOrReplace(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
9155
+ abstract createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
7120
9156
  ifVersion?: number;
7121
9157
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7122
9158
  /**
@@ -7126,14 +9162,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7126
9162
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7127
9163
  * @returns Array of the persisted records.
7128
9164
  */
7129
- abstract createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
9165
+ abstract createOrReplace<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7130
9166
  /**
7131
9167
  * Creates or replaces a single record. If a record exists with the given id,
7132
9168
  * it will be replaced, otherwise a new record will be created.
7133
9169
  * @param objects Array of objects with the column names and the values to be stored in the table.
7134
9170
  * @returns Array of the persisted records.
7135
9171
  */
7136
- abstract createOrReplace(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
9172
+ abstract createOrReplace(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7137
9173
  /**
7138
9174
  * Deletes a record given its unique id.
7139
9175
  * @param object An object with a unique id.
@@ -7153,13 +9189,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7153
9189
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7154
9190
  * @returns The deleted record, null if the record could not be found.
7155
9191
  */
7156
- abstract delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
9192
+ abstract delete<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7157
9193
  /**
7158
9194
  * Deletes a record given a unique id.
7159
9195
  * @param id The unique id.
7160
9196
  * @returns The deleted record, null if the record could not be found.
7161
9197
  */
7162
- abstract delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
9198
+ abstract delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7163
9199
  /**
7164
9200
  * Deletes multiple records given an array of objects with ids.
7165
9201
  * @param objects An array of objects with unique ids.
@@ -7179,13 +9215,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7179
9215
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7180
9216
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
7181
9217
  */
7182
- abstract delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
9218
+ abstract delete<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7183
9219
  /**
7184
9220
  * Deletes multiple records given an array of unique ids.
7185
9221
  * @param objects An array of ids.
7186
9222
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
7187
9223
  */
7188
- abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
9224
+ abstract delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7189
9225
  /**
7190
9226
  * Deletes a record given its unique id.
7191
9227
  * @param object An object with a unique id.
@@ -7208,14 +9244,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7208
9244
  * @returns The deleted record, null if the record could not be found.
7209
9245
  * @throws If the record could not be found.
7210
9246
  */
7211
- abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
9247
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7212
9248
  /**
7213
9249
  * Deletes a record given a unique id.
7214
9250
  * @param id The unique id.
7215
9251
  * @returns The deleted record, null if the record could not be found.
7216
9252
  * @throws If the record could not be found.
7217
9253
  */
7218
- abstract deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
9254
+ abstract deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7219
9255
  /**
7220
9256
  * Deletes multiple records given an array of objects with ids.
7221
9257
  * @param objects An array of objects with unique ids.
@@ -7238,14 +9274,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7238
9274
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
7239
9275
  * @throws If one or more records could not be found.
7240
9276
  */
7241
- abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
9277
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7242
9278
  /**
7243
9279
  * Deletes multiple records given an array of unique ids.
7244
9280
  * @param objects An array of ids.
7245
9281
  * @returns Array of the deleted records in order.
7246
9282
  * @throws If one or more records could not be found.
7247
9283
  */
7248
- abstract deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
9284
+ abstract deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7249
9285
  /**
7250
9286
  * Search for records in the table.
7251
9287
  * @param query The query to search for.
@@ -7260,7 +9296,35 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7260
9296
  boosters?: Boosters<Record>[];
7261
9297
  page?: SearchPageConfig;
7262
9298
  target?: TargetColumn<Record>[];
7263
- }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
9299
+ }): Promise<{
9300
+ records: SearchXataRecord<SelectedPick<Record, ['*']>>[];
9301
+ } & TotalCount>;
9302
+ /**
9303
+ * Search for vectors in the table.
9304
+ * @param column The column to search for.
9305
+ * @param query The vector to search for similarities. Must have the same dimension as the vector column used.
9306
+ * @param options The options to search with (like: spaceFunction)
9307
+ */
9308
+ abstract vectorSearch<F extends ColumnsByValue<Record, number[]>>(column: F, query: number[], options?: {
9309
+ /**
9310
+ * The function used to measure the distance between two points. Can be one of:
9311
+ * `cosineSimilarity`, `l1`, `l2`. The default is `cosineSimilarity`.
9312
+ *
9313
+ * @default cosineSimilarity
9314
+ */
9315
+ similarityFunction?: string;
9316
+ /**
9317
+ * Number of results to return.
9318
+ *
9319
+ * @default 10
9320
+ * @maximum 100
9321
+ * @minimum 1
9322
+ */
9323
+ size?: number;
9324
+ filter?: Filter<Record>;
9325
+ }): Promise<{
9326
+ records: SearchXataRecord<SelectedPick<Record, ['*']>>[];
9327
+ } & TotalCount>;
7264
9328
  /**
7265
9329
  * Aggregates records in the table.
7266
9330
  * @param expression The aggregations to perform.
@@ -7268,6 +9332,20 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7268
9332
  * @returns The requested aggregations.
7269
9333
  */
7270
9334
  abstract aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(expression?: Expression, filter?: Filter<Record>): Promise<AggregationResult<Record, Expression>>;
9335
+ /**
9336
+ * Experimental: Ask the database to perform a natural language question.
9337
+ */
9338
+ abstract ask(question: string, options?: AskOptions<Record>): Promise<AskResult>;
9339
+ /**
9340
+ * Experimental: Ask the database to perform a natural language question.
9341
+ */
9342
+ abstract ask(question: string, options: AskOptions<Record>): Promise<AskResult>;
9343
+ /**
9344
+ * Experimental: Ask the database to perform a natural language question.
9345
+ */
9346
+ abstract ask(question: string, options: AskOptions<Record> & {
9347
+ onMessage: (message: AskResult) => void;
9348
+ }): void;
7271
9349
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
7272
9350
  }
7273
9351
  declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
@@ -7284,26 +9362,26 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7284
9362
  create(object: EditableData<Record> & Partial<Identifiable>, options?: {
7285
9363
  ifVersion?: number;
7286
9364
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7287
- create<K extends SelectableColumn<Record>>(id: string, object: EditableData<Record>, columns: K[], options?: {
9365
+ create<K extends SelectableColumn<Record>>(id: Identifier, object: EditableData<Record>, columns: K[], options?: {
7288
9366
  ifVersion?: number;
7289
9367
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7290
- create(id: string, object: EditableData<Record>, options?: {
9368
+ create(id: Identifier, object: EditableData<Record>, options?: {
7291
9369
  ifVersion?: number;
7292
9370
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7293
9371
  create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7294
9372
  create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7295
- read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
9373
+ read<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
7296
9374
  read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
7297
- read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7298
- read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
9375
+ read<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
9376
+ read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7299
9377
  read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
7300
9378
  read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
7301
9379
  read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7302
9380
  read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7303
- readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7304
- readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7305
- readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7306
- readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
9381
+ readOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
9382
+ readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
9383
+ readOrThrow<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
9384
+ readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7307
9385
  readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7308
9386
  readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7309
9387
  readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
@@ -7314,10 +9392,10 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7314
9392
  update(object: Partial<EditableData<Record>> & Identifiable, options?: {
7315
9393
  ifVersion?: number;
7316
9394
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7317
- update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
9395
+ update<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
7318
9396
  ifVersion?: number;
7319
9397
  }): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7320
- update(id: string, object: Partial<EditableData<Record>>, options?: {
9398
+ update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
7321
9399
  ifVersion?: number;
7322
9400
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7323
9401
  update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
@@ -7328,58 +9406,58 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7328
9406
  updateOrThrow(object: Partial<EditableData<Record>> & Identifiable, options?: {
7329
9407
  ifVersion?: number;
7330
9408
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7331
- updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
9409
+ updateOrThrow<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
7332
9410
  ifVersion?: number;
7333
9411
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7334
- updateOrThrow(id: string, object: Partial<EditableData<Record>>, options?: {
9412
+ updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
7335
9413
  ifVersion?: number;
7336
9414
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7337
9415
  updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7338
9416
  updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7339
- createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
9417
+ createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[], options?: {
7340
9418
  ifVersion?: number;
7341
9419
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7342
- createOrUpdate(object: EditableData<Record> & Identifiable, options?: {
9420
+ createOrUpdate(object: EditableData<Record> & Partial<Identifiable>, options?: {
7343
9421
  ifVersion?: number;
7344
9422
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7345
- createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
9423
+ createOrUpdate<K extends SelectableColumn<Record>>(id: Identifier, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
7346
9424
  ifVersion?: number;
7347
9425
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7348
- createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
9426
+ createOrUpdate(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
7349
9427
  ifVersion?: number;
7350
9428
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7351
- createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7352
- createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7353
- createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
9429
+ createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
9430
+ createOrUpdate(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
9431
+ createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[], options?: {
7354
9432
  ifVersion?: number;
7355
9433
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7356
- createOrReplace(object: EditableData<Record> & Identifiable, options?: {
9434
+ createOrReplace(object: EditableData<Record> & Partial<Identifiable>, options?: {
7357
9435
  ifVersion?: number;
7358
9436
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7359
- createOrReplace<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
9437
+ createOrReplace<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
7360
9438
  ifVersion?: number;
7361
9439
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7362
- createOrReplace(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
9440
+ createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
7363
9441
  ifVersion?: number;
7364
9442
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7365
- createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
7366
- createOrReplace(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
9443
+ createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
9444
+ createOrReplace(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
7367
9445
  delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7368
9446
  delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7369
- delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
7370
- delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
9447
+ delete<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
9448
+ delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
7371
9449
  delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7372
9450
  delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7373
- delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7374
- delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
9451
+ delete<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
9452
+ delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7375
9453
  deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7376
9454
  deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7377
- deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7378
- deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
9455
+ deleteOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
9456
+ deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7379
9457
  deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7380
9458
  deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7381
- deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7382
- deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
9459
+ deleteOrThrow<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
9460
+ deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
7383
9461
  search(query: string, options?: {
7384
9462
  fuzziness?: FuzzinessExpression;
7385
9463
  prefix?: PrefixExpression;
@@ -7388,10 +9466,25 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7388
9466
  boosters?: Boosters<Record>[];
7389
9467
  page?: SearchPageConfig;
7390
9468
  target?: TargetColumn<Record>[];
7391
- }): Promise<any>;
9469
+ }): Promise<{
9470
+ records: any;
9471
+ totalCount: number;
9472
+ }>;
9473
+ vectorSearch<F extends ColumnsByValue<Record, number[]>>(column: F, query: number[], options?: {
9474
+ similarityFunction?: string | undefined;
9475
+ size?: number | undefined;
9476
+ filter?: Filter<Record> | undefined;
9477
+ } | undefined): Promise<{
9478
+ records: SearchXataRecord<SelectedPick<Record, ['*']>>[];
9479
+ } & TotalCount>;
7392
9480
  aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
7393
9481
  query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
7394
- summarizeTable<Result extends XataRecord>(query: Query<Record, Result>, summaries?: Dictionary<SummarizeExpression<Record>>, summariesFilter?: FilterExpression): Promise<SummarizeResponse>;
9482
+ summarizeTable<Result extends XataRecord>(query: Query<Record, Result>, summaries?: Dictionary<SummarizeExpression<Record>>, summariesFilter?: FilterExpression): Promise<{
9483
+ summaries: Record[];
9484
+ }>;
9485
+ ask(question: string, options?: AskOptions<Record> & {
9486
+ onMessage?: (message: AskResult) => void;
9487
+ }): any;
7395
9488
  }
7396
9489
 
7397
9490
  type BaseSchema = {
@@ -7447,7 +9540,7 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
7447
9540
  } : {
7448
9541
  [K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
7449
9542
  } : never : never;
7450
- 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 {
9543
+ 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 {
7451
9544
  name: string;
7452
9545
  type: string;
7453
9546
  } ? UnionToIntersection<Values<{
@@ -7505,11 +9598,11 @@ declare const le: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
7505
9598
  /**
7506
9599
  * Operator to restrict results to only values that are not null.
7507
9600
  */
7508
- declare const exists: <T>(column?: ColumnsByValue<T, any> | undefined) => ExistanceFilter<T>;
9601
+ declare const exists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
7509
9602
  /**
7510
9603
  * Operator to restrict results to only values that are null.
7511
9604
  */
7512
- declare const notExists: <T>(column?: ColumnsByValue<T, any> | undefined) => ExistanceFilter<T>;
9605
+ declare const notExists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
7513
9606
  /**
7514
9607
  * Operator to restrict results to only values that start with the given prefix.
7515
9608
  */
@@ -7522,6 +9615,10 @@ declare const endsWith: (value: string) => StringTypeFilter;
7522
9615
  * Operator to restrict results to only values that match the given pattern.
7523
9616
  */
7524
9617
  declare const pattern: (value: string) => StringTypeFilter;
9618
+ /**
9619
+ * Operator to restrict results to only values that match the given pattern (case insensitive).
9620
+ */
9621
+ declare const iPattern: (value: string) => StringTypeFilter;
7525
9622
  /**
7526
9623
  * Operator to restrict results to only values that are equal to the given value.
7527
9624
  */
@@ -7538,6 +9635,10 @@ declare const isNot: <T>(value: T) => PropertyFilter<T>;
7538
9635
  * Operator to restrict results to only values that contain the given value.
7539
9636
  */
7540
9637
  declare const contains: (value: string) => StringTypeFilter;
9638
+ /**
9639
+ * Operator to restrict results to only values that contain the given value (case insensitive).
9640
+ */
9641
+ declare const iContains: (value: string) => StringTypeFilter;
7541
9642
  /**
7542
9643
  * Operator to restrict results if some array items match the predicate.
7543
9644
  */
@@ -7567,6 +9668,56 @@ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends X
7567
9668
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
7568
9669
  }
7569
9670
 
9671
+ type BinaryFile = string | Blob | ArrayBuffer | XataFile | Promise<XataFile>;
9672
+ type FilesPluginResult<Schemas extends Record<string, BaseData>> = {
9673
+ download: <Tables extends StringKeys<Schemas>>(location: DownloadDestination<Schemas, Tables>) => Promise<Blob>;
9674
+ upload: <Tables extends StringKeys<Schemas>>(location: UploadDestination<Schemas, Tables>, file: BinaryFile, options?: {
9675
+ mediaType?: string;
9676
+ }) => Promise<FileResponse>;
9677
+ delete: <Tables extends StringKeys<Schemas>>(location: DownloadDestination<Schemas, Tables>) => Promise<FileResponse>;
9678
+ };
9679
+ type UploadDestination<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = Values<{
9680
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
9681
+ table: Model;
9682
+ column: ColumnsByValue<Schemas[Model], XataFile>;
9683
+ record: string;
9684
+ } | {
9685
+ table: Model;
9686
+ column: ColumnsByValue<Schemas[Model], XataArrayFile[]>;
9687
+ record: string;
9688
+ fileId?: string;
9689
+ };
9690
+ }>;
9691
+ type DownloadDestination<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = Values<{
9692
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
9693
+ table: Model;
9694
+ column: ColumnsByValue<Schemas[Model], XataFile>;
9695
+ record: string;
9696
+ } | {
9697
+ table: Model;
9698
+ column: ColumnsByValue<Schemas[Model], XataArrayFile[]>;
9699
+ record: string;
9700
+ fileId: string;
9701
+ };
9702
+ }>;
9703
+ declare class FilesPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
9704
+ build(pluginOptions: XataPluginOptions): FilesPluginResult<Schemas>;
9705
+ }
9706
+
9707
+ type SQLQueryParams<T = any[]> = {
9708
+ statement: string;
9709
+ params?: T;
9710
+ consistency?: 'strong' | 'eventual';
9711
+ };
9712
+ type SQLQuery = TemplateStringsArray | SQLQueryParams | string;
9713
+ type SQLPluginResult = <T>(query: SQLQuery, ...parameters: any[]) => Promise<{
9714
+ records: T[];
9715
+ warning?: string;
9716
+ }>;
9717
+ declare class SQLPlugin extends XataPlugin {
9718
+ build(pluginOptions: XataPluginOptions): SQLPluginResult;
9719
+ }
9720
+
7570
9721
  type TransactionOperation<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
7571
9722
  insert: Values<{
7572
9723
  [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
@@ -7599,6 +9750,7 @@ type UpdateTransactionOperation<O extends XataRecord> = {
7599
9750
  };
7600
9751
  type DeleteTransactionOperation = {
7601
9752
  id: string;
9753
+ failIfMissing?: boolean;
7602
9754
  };
7603
9755
  type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Table>> = Operation extends {
7604
9756
  insert: {
@@ -7645,19 +9797,15 @@ type TransactionPluginResult<Schemas extends Record<string, XataRecord>> = {
7645
9797
  run: <Tables extends StringKeys<Schemas>, Operations extends TransactionOperation<Schemas, Tables>[]>(operations: Narrow<Operations>) => Promise<TransactionResults<Schemas, Tables, Operations>>;
7646
9798
  };
7647
9799
  declare class TransactionPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
7648
- build({ getFetchProps }: XataPluginOptions): TransactionPluginResult<Schemas>;
9800
+ build(pluginOptions: XataPluginOptions): TransactionPluginResult<Schemas>;
7649
9801
  }
7650
9802
 
7651
- type BranchStrategyValue = string | undefined | null;
7652
- type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
7653
- type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
7654
- type BranchStrategyOption = NonNullable<BranchStrategy | BranchStrategy[]>;
7655
-
7656
9803
  type BaseClientOptions = {
7657
9804
  fetch?: FetchImpl;
9805
+ host?: HostProvider;
7658
9806
  apiKey?: string;
7659
9807
  databaseURL?: string;
7660
- branch?: BranchStrategyOption;
9808
+ branch?: string;
7661
9809
  cache?: CacheImpl;
7662
9810
  trace?: TraceFunction;
7663
9811
  enableBrowser?: boolean;
@@ -7670,6 +9818,8 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
7670
9818
  db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
7671
9819
  search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
7672
9820
  transactions: Awaited<ReturnType<TransactionPlugin<Schemas>['build']>>;
9821
+ sql: Awaited<ReturnType<SQLPlugin['build']>>;
9822
+ files: Awaited<ReturnType<FilesPlugin<Schemas>['build']>>;
7673
9823
  }, keyof Plugins> & {
7674
9824
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
7675
9825
  } & {
@@ -7699,102 +9849,18 @@ type SerializerResult<T> = T extends XataRecord ? Identifiable & Omit<{
7699
9849
  [K in keyof T]: SerializerResult<T[K]>;
7700
9850
  }, keyof XataRecord> : T extends any[] ? SerializerResult<T[number]>[] : T;
7701
9851
 
7702
- type BranchResolutionOptions = {
7703
- databaseURL?: string;
7704
- apiKey?: string;
7705
- fetchImpl?: FetchImpl;
7706
- clientName?: string;
7707
- xataAgentExtra?: Record<string, string>;
7708
- };
7709
- declare function getCurrentBranchName(options?: BranchResolutionOptions): Promise<string>;
7710
- declare function getCurrentBranchDetails(options?: BranchResolutionOptions): Promise<DBBranch | null>;
7711
9852
  declare function getDatabaseURL(): string | undefined;
7712
-
7713
9853
  declare function getAPIKey(): string | undefined;
7714
-
7715
- interface Body {
7716
- arrayBuffer(): Promise<ArrayBuffer>;
7717
- blob(): Promise<Blob>;
7718
- formData(): Promise<FormData>;
7719
- json(): Promise<any>;
7720
- text(): Promise<string>;
7721
- }
7722
- interface Blob {
7723
- readonly size: number;
7724
- readonly type: string;
7725
- arrayBuffer(): Promise<ArrayBuffer>;
7726
- slice(start?: number, end?: number, contentType?: string): Blob;
7727
- text(): Promise<string>;
7728
- }
7729
- /** Provides information about files and allows JavaScript in a web page to access their content. */
7730
- interface File extends Blob {
7731
- readonly lastModified: number;
7732
- readonly name: string;
7733
- readonly webkitRelativePath: string;
7734
- }
7735
- type FormDataEntryValue = File | string;
7736
- /** 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". */
7737
- interface FormData {
7738
- append(name: string, value: string | Blob, fileName?: string): void;
7739
- delete(name: string): void;
7740
- get(name: string): FormDataEntryValue | null;
7741
- getAll(name: string): FormDataEntryValue[];
7742
- has(name: string): boolean;
7743
- set(name: string, value: string | Blob, fileName?: string): void;
7744
- forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
7745
- }
7746
- /** 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. */
7747
- interface Headers {
7748
- append(name: string, value: string): void;
7749
- delete(name: string): void;
7750
- get(name: string): string | null;
7751
- has(name: string): boolean;
7752
- set(name: string, value: string): void;
7753
- forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
7754
- }
7755
- interface Request extends Body {
7756
- /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. */
7757
- readonly cache: 'default' | 'force-cache' | 'no-cache' | 'no-store' | 'only-if-cached' | 'reload';
7758
- /** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. */
7759
- readonly credentials: 'include' | 'omit' | 'same-origin';
7760
- /** Returns the kind of resource requested by request, e.g., "document" or "script". */
7761
- readonly destination: '' | 'audio' | 'audioworklet' | 'document' | 'embed' | 'font' | 'frame' | 'iframe' | 'image' | 'manifest' | 'object' | 'paintworklet' | 'report' | 'script' | 'sharedworker' | 'style' | 'track' | 'video' | 'worker' | 'xslt';
7762
- /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header. */
7763
- readonly headers: Headers;
7764
- /** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI] */
7765
- readonly integrity: string;
7766
- /** Returns a boolean indicating whether or not request can outlive the global in which it was created. */
7767
- readonly keepalive: boolean;
7768
- /** Returns request's HTTP method, which is "GET" by default. */
7769
- readonly method: string;
7770
- /** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs. */
7771
- readonly mode: 'cors' | 'navigate' | 'no-cors' | 'same-origin';
7772
- /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */
7773
- readonly redirect: 'error' | 'follow' | 'manual';
7774
- /** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made. */
7775
- readonly referrer: string;
7776
- /** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer. */
7777
- readonly referrerPolicy: '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
7778
- /** Returns the URL of request as a string. */
7779
- readonly url: string;
7780
- clone(): Request;
7781
- }
7782
-
7783
- type XataWorkerContext<XataClient> = {
7784
- xata: XataClient;
7785
- request: Request;
7786
- env: Record<string, string | undefined>;
7787
- };
7788
- type RemoveFirst<T> = T extends [any, ...infer U] ? U : never;
7789
- type WorkerRunnerConfig = {
7790
- workspace: string;
7791
- worker: string;
7792
- };
7793
- declare function buildWorkerRunner<XataClient>(config: WorkerRunnerConfig): <WorkerFunction extends (ctx: XataWorkerContext<XataClient>, ...args: any[]) => any>(name: string, worker: WorkerFunction) => (...args: RemoveFirst<Parameters<WorkerFunction>>) => Promise<SerializerResult<Awaited<ReturnType<WorkerFunction>>>>;
9854
+ declare function getBranch(): string | undefined;
9855
+ declare function buildPreviewBranchName({ org, branch }: {
9856
+ org: string;
9857
+ branch: string;
9858
+ }): string;
9859
+ declare function getPreviewBranch(): string | undefined;
7794
9860
 
7795
9861
  declare class XataError extends Error {
7796
9862
  readonly status: number;
7797
9863
  constructor(message: string, status: number);
7798
9864
  }
7799
9865
 
7800
- 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, CompareBranchSchemasRequestBody, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabaseGithubSettingsError, DeleteDatabaseGithubSettingsPathParams, DeleteDatabaseGithubSettingsVariables, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, DeserializedType, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherError, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseGithubSettingsError, GetDatabaseGithubSettingsPathParams, GetDatabaseGithubSettingsVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, SerializedString, Serializer, SerializerResult, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseGithubSettingsError, UpdateDatabaseGithubSettingsPathParams, UpdateDatabaseGithubSettingsVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, 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, deleteDatabaseGithubSettings, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
9866
+ 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 ApplyMigrationError, type ApplyMigrationPathParams, type ApplyMigrationRequestBody, type ApplyMigrationVariables, 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 CreateClusterError, type CreateClusterPathParams, type CreateClusterVariables, 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 DeleteTransactionOperation, 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 GetClusterError, type GetClusterPathParams, type GetClusterVariables, 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 GetSchemaError, type GetSchemaPathParams, type GetSchemaResponse, type GetSchemaVariables, 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 InsertTransactionOperation, type InviteWorkspaceMemberError, type InviteWorkspaceMemberPathParams, type InviteWorkspaceMemberRequestBody, type InviteWorkspaceMemberVariables, type JSONData, type KeywordAskOptions, type Link, type ListClustersError, type ListClustersPathParams, type ListClustersVariables, 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 PgRollStatusError, type PgRollStatusPathParams, type PgRollStatusVariables, 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 TotalCount, type TransactionOperation, TransactionPlugin, type TransactionPluginResult, type TransactionResults, type UpdateBranchMetadataError, type UpdateBranchMetadataPathParams, type UpdateBranchMetadataVariables, type UpdateBranchSchemaError, type UpdateBranchSchemaPathParams, type UpdateBranchSchemaVariables, type UpdateClusterError, type UpdateClusterPathParams, type UpdateClusterVariables, 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 UpdateTransactionOperation, 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, applyMigration, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createCluster, 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, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, iContains, iPattern, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, pgRollStatus, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, transformImage, updateBranchMetadata, updateBranchSchema, updateCluster, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };