@xata.io/client 0.0.0-alpha.vff52a72 → 0.0.0-alpha.vff9649a

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,26 +22,28 @@ declare class SimpleCache implements CacheImpl {
22
22
  clear(): Promise<void>;
23
23
  }
24
24
 
25
- declare type AttributeDictionary = Record<string, string | number | boolean | undefined>;
26
- declare type TraceFunction = <T>(name: string, fn: (options: {
25
+ type AttributeDictionary = Record<string, string | number | boolean | undefined>;
26
+ type TraceFunction = <T>(name: string, fn: (options: {
27
+ name?: string;
27
28
  setAttributes: (attrs: AttributeDictionary) => void;
28
29
  }) => T, options?: AttributeDictionary) => Promise<T>;
29
30
 
30
31
  declare abstract class XataPlugin {
31
32
  abstract build(options: XataPluginOptions): unknown | Promise<unknown>;
32
33
  }
33
- declare type XataPluginOptions = {
34
+ type XataPluginOptions = {
34
35
  getFetchProps: () => Promise<ApiExtraProps>;
35
36
  cache: CacheImpl;
36
37
  trace?: TraceFunction;
37
38
  };
38
39
 
39
- declare type FetchImpl = (url: string, init?: {
40
+ type RequestInit = {
40
41
  body?: string;
41
42
  headers?: Record<string, string>;
42
43
  method?: string;
43
44
  signal?: any;
44
- }) => Promise<{
45
+ };
46
+ type Response = {
45
47
  ok: boolean;
46
48
  status: number;
47
49
  url: string;
@@ -49,9 +51,25 @@ declare type FetchImpl = (url: string, init?: {
49
51
  headers?: {
50
52
  get(name: string): string | null;
51
53
  };
52
- }>;
53
- declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
54
- declare type FetcherExtraProps = {
54
+ };
55
+ type FetchImpl = (url: string, init?: RequestInit) => Promise<Response>;
56
+
57
+ declare class ErrorWithCause extends Error {
58
+ cause?: Error;
59
+ constructor(message?: string, options?: {
60
+ cause?: Error;
61
+ });
62
+ }
63
+ declare class FetcherError extends ErrorWithCause {
64
+ status: number | string;
65
+ requestId: string | undefined;
66
+ errors: BulkError['errors'] | undefined;
67
+ constructor(status: number, data?: unknown, requestId?: string);
68
+ toString(): string;
69
+ }
70
+
71
+ type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
72
+ type FetcherExtraProps = {
55
73
  endpoint: 'controlPlane' | 'dataPlane';
56
74
  apiUrl: string;
57
75
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
@@ -61,9 +79,11 @@ declare type FetcherExtraProps = {
61
79
  signal?: AbortSignal;
62
80
  clientID?: string;
63
81
  sessionID?: string;
82
+ clientName?: string;
83
+ fetchOptions?: Record<string, unknown>;
64
84
  };
65
85
 
66
- declare type ControlPlaneFetcherExtraProps = {
86
+ type ControlPlaneFetcherExtraProps = {
67
87
  apiUrl: string;
68
88
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
69
89
  fetchImpl: FetchImpl;
@@ -72,8 +92,9 @@ declare type ControlPlaneFetcherExtraProps = {
72
92
  signal?: AbortSignal;
73
93
  clientID?: string;
74
94
  sessionID?: string;
95
+ clientName?: string;
75
96
  };
76
- declare type ErrorWrapper$1<TError> = TError | {
97
+ type ErrorWrapper$1<TError> = TError | {
77
98
  status: 'unknown';
78
99
  payload: string;
79
100
  };
@@ -83,7 +104,7 @@ declare type ErrorWrapper$1<TError> = TError | {
83
104
  *
84
105
  * @version 1.0
85
106
  */
86
- declare type User = {
107
+ type User = {
87
108
  /**
88
109
  * @format email
89
110
  */
@@ -94,38 +115,38 @@ declare type User = {
94
115
  /**
95
116
  * @pattern [a-zA-Z0-9_-~:]+
96
117
  */
97
- declare type UserID = string;
98
- declare type UserWithID = User & {
118
+ type UserID = string;
119
+ type UserWithID = User & {
99
120
  id: UserID;
100
121
  };
101
122
  /**
102
123
  * @format date-time
103
124
  * @x-go-type string
104
125
  */
105
- declare type DateTime$1 = string;
126
+ type DateTime$1 = string;
106
127
  /**
107
128
  * @pattern [a-zA-Z0-9_\-~]*
108
129
  */
109
- declare type APIKeyName = string;
130
+ type APIKeyName = string;
110
131
  /**
111
132
  * @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
112
133
  * @x-go-type auth.WorkspaceID
113
134
  */
114
- declare type WorkspaceID = string;
135
+ type WorkspaceID = string;
115
136
  /**
116
137
  * @x-go-type auth.Role
117
138
  */
118
- declare type Role = 'owner' | 'maintainer';
119
- declare type WorkspaceMeta = {
139
+ type Role = 'owner' | 'maintainer';
140
+ type WorkspaceMeta = {
120
141
  name: string;
121
142
  slug?: string;
122
143
  };
123
- declare type Workspace = WorkspaceMeta & {
144
+ type Workspace = WorkspaceMeta & {
124
145
  id: WorkspaceID;
125
146
  memberCount: number;
126
147
  plan: 'free' | 'pro';
127
148
  };
128
- declare type WorkspaceMember = {
149
+ type WorkspaceMember = {
129
150
  userId: UserID;
130
151
  fullname: string;
131
152
  /**
@@ -137,8 +158,8 @@ declare type WorkspaceMember = {
137
158
  /**
138
159
  * @pattern [a-zA-Z0-9]+
139
160
  */
140
- declare type InviteID = string;
141
- declare type WorkspaceInvite = {
161
+ type InviteID = string;
162
+ type WorkspaceInvite = {
142
163
  inviteId: InviteID;
143
164
  /**
144
165
  * @format email
@@ -150,18 +171,18 @@ declare type WorkspaceInvite = {
150
171
  expires: string;
151
172
  role: Role;
152
173
  };
153
- declare type WorkspaceMembers = {
174
+ type WorkspaceMembers = {
154
175
  members: WorkspaceMember[];
155
176
  invites: WorkspaceInvite[];
156
177
  };
157
178
  /**
158
179
  * @pattern ^ik_[a-zA-Z0-9]+
159
180
  */
160
- declare type InviteKey = string;
181
+ type InviteKey = string;
161
182
  /**
162
183
  * Metadata of databases
163
184
  */
164
- declare type DatabaseMetadata = {
185
+ type DatabaseMetadata = {
165
186
  /**
166
187
  * The machine-readable name of a database
167
188
  */
@@ -174,6 +195,10 @@ declare type DatabaseMetadata = {
174
195
  * The time this database was created
175
196
  */
176
197
  createdAt: DateTime$1;
198
+ /**
199
+ * @x-internal true
200
+ */
201
+ newMigrations?: boolean;
177
202
  /**
178
203
  * Metadata about the database for display in Xata user interfaces
179
204
  */
@@ -184,7 +209,7 @@ declare type DatabaseMetadata = {
184
209
  color?: string;
185
210
  };
186
211
  };
187
- declare type ListDatabasesResponse = {
212
+ type ListDatabasesResponse = {
188
213
  /**
189
214
  * A list of databases in a Xata workspace
190
215
  */
@@ -194,7 +219,7 @@ declare type ListDatabasesResponse = {
194
219
  * @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
195
220
  * @x-go-type xata.BranchMetadata
196
221
  */
197
- declare type BranchMetadata$1 = {
222
+ type BranchMetadata$1 = {
198
223
  /**
199
224
  * @minLength 1
200
225
  */
@@ -207,21 +232,25 @@ declare type BranchMetadata$1 = {
207
232
  labels?: string[];
208
233
  };
209
234
  /**
235
+ * @maxLength 255
236
+ * @minLength 1
210
237
  * @pattern [a-zA-Z0-9_\-~]+
211
238
  */
212
- declare type BranchName$1 = string;
239
+ type BranchName$1 = string;
213
240
  /**
241
+ * @maxLength 255
242
+ * @minLength 1
214
243
  * @pattern [a-zA-Z0-9_\-~]+
215
244
  */
216
- declare type DBName$1 = string;
217
- declare type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
218
- declare type ListRegionsResponse = {
245
+ type DBName$1 = string;
246
+ type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
247
+ type ListRegionsResponse = {
219
248
  /**
220
249
  * A list of regions where databases can be created
221
250
  */
222
251
  regions: Region[];
223
252
  };
224
- declare type Region = {
253
+ type Region = {
225
254
  id: string;
226
255
  };
227
256
 
@@ -230,18 +259,18 @@ declare type Region = {
230
259
  *
231
260
  * @version 1.0
232
261
  */
233
- declare type SimpleError$1 = {
262
+ type SimpleError$1 = {
234
263
  id?: string;
235
264
  message: string;
236
265
  };
237
- declare type BadRequestError$1 = {
266
+ type BadRequestError$1 = {
238
267
  id?: string;
239
268
  message: string;
240
269
  };
241
270
  /**
242
271
  * @example {"message":"invalid API key"}
243
272
  */
244
- declare type AuthError$1 = {
273
+ type AuthError$1 = {
245
274
  id?: string;
246
275
  message: string;
247
276
  };
@@ -252,7 +281,7 @@ declare type AuthError$1 = {
252
281
  * @version 1.0
253
282
  */
254
283
 
255
- declare type GetUserError = ErrorWrapper$1<{
284
+ type GetUserError = ErrorWrapper$1<{
256
285
  status: 400;
257
286
  payload: BadRequestError$1;
258
287
  } | {
@@ -262,12 +291,12 @@ declare type GetUserError = ErrorWrapper$1<{
262
291
  status: 404;
263
292
  payload: SimpleError$1;
264
293
  }>;
265
- declare type GetUserVariables = ControlPlaneFetcherExtraProps;
294
+ type GetUserVariables = ControlPlaneFetcherExtraProps;
266
295
  /**
267
296
  * Return details of the user making the request
268
297
  */
269
298
  declare const getUser: (variables: GetUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
270
- declare type UpdateUserError = ErrorWrapper$1<{
299
+ type UpdateUserError = ErrorWrapper$1<{
271
300
  status: 400;
272
301
  payload: BadRequestError$1;
273
302
  } | {
@@ -277,14 +306,14 @@ declare type UpdateUserError = ErrorWrapper$1<{
277
306
  status: 404;
278
307
  payload: SimpleError$1;
279
308
  }>;
280
- declare type UpdateUserVariables = {
309
+ type UpdateUserVariables = {
281
310
  body: User;
282
311
  } & ControlPlaneFetcherExtraProps;
283
312
  /**
284
313
  * Update user info
285
314
  */
286
315
  declare const updateUser: (variables: UpdateUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
287
- declare type DeleteUserError = ErrorWrapper$1<{
316
+ type DeleteUserError = ErrorWrapper$1<{
288
317
  status: 400;
289
318
  payload: BadRequestError$1;
290
319
  } | {
@@ -294,12 +323,12 @@ declare type DeleteUserError = ErrorWrapper$1<{
294
323
  status: 404;
295
324
  payload: SimpleError$1;
296
325
  }>;
297
- declare type DeleteUserVariables = ControlPlaneFetcherExtraProps;
326
+ type DeleteUserVariables = ControlPlaneFetcherExtraProps;
298
327
  /**
299
328
  * Delete the user making the request
300
329
  */
301
330
  declare const deleteUser: (variables: DeleteUserVariables, signal?: AbortSignal) => Promise<undefined>;
302
- declare type GetUserAPIKeysError = ErrorWrapper$1<{
331
+ type GetUserAPIKeysError = ErrorWrapper$1<{
303
332
  status: 400;
304
333
  payload: BadRequestError$1;
305
334
  } | {
@@ -309,24 +338,24 @@ declare type GetUserAPIKeysError = ErrorWrapper$1<{
309
338
  status: 404;
310
339
  payload: SimpleError$1;
311
340
  }>;
312
- declare type GetUserAPIKeysResponse = {
341
+ type GetUserAPIKeysResponse = {
313
342
  keys: {
314
343
  name: string;
315
344
  createdAt: DateTime$1;
316
345
  }[];
317
346
  };
318
- declare type GetUserAPIKeysVariables = ControlPlaneFetcherExtraProps;
347
+ type GetUserAPIKeysVariables = ControlPlaneFetcherExtraProps;
319
348
  /**
320
349
  * Retrieve a list of existing user API keys
321
350
  */
322
351
  declare const getUserAPIKeys: (variables: GetUserAPIKeysVariables, signal?: AbortSignal) => Promise<GetUserAPIKeysResponse>;
323
- declare type CreateUserAPIKeyPathParams = {
352
+ type CreateUserAPIKeyPathParams = {
324
353
  /**
325
354
  * API Key name
326
355
  */
327
356
  keyName: APIKeyName;
328
357
  };
329
- declare type CreateUserAPIKeyError = ErrorWrapper$1<{
358
+ type CreateUserAPIKeyError = ErrorWrapper$1<{
330
359
  status: 400;
331
360
  payload: BadRequestError$1;
332
361
  } | {
@@ -336,25 +365,25 @@ declare type CreateUserAPIKeyError = ErrorWrapper$1<{
336
365
  status: 404;
337
366
  payload: SimpleError$1;
338
367
  }>;
339
- declare type CreateUserAPIKeyResponse = {
368
+ type CreateUserAPIKeyResponse = {
340
369
  name: string;
341
370
  key: string;
342
371
  createdAt: DateTime$1;
343
372
  };
344
- declare type CreateUserAPIKeyVariables = {
373
+ type CreateUserAPIKeyVariables = {
345
374
  pathParams: CreateUserAPIKeyPathParams;
346
375
  } & ControlPlaneFetcherExtraProps;
347
376
  /**
348
377
  * Create and return new API key
349
378
  */
350
379
  declare const createUserAPIKey: (variables: CreateUserAPIKeyVariables, signal?: AbortSignal) => Promise<CreateUserAPIKeyResponse>;
351
- declare type DeleteUserAPIKeyPathParams = {
380
+ type DeleteUserAPIKeyPathParams = {
352
381
  /**
353
382
  * API Key name
354
383
  */
355
384
  keyName: APIKeyName;
356
385
  };
357
- declare type DeleteUserAPIKeyError = ErrorWrapper$1<{
386
+ type DeleteUserAPIKeyError = ErrorWrapper$1<{
358
387
  status: 400;
359
388
  payload: BadRequestError$1;
360
389
  } | {
@@ -364,14 +393,14 @@ declare type DeleteUserAPIKeyError = ErrorWrapper$1<{
364
393
  status: 404;
365
394
  payload: SimpleError$1;
366
395
  }>;
367
- declare type DeleteUserAPIKeyVariables = {
396
+ type DeleteUserAPIKeyVariables = {
368
397
  pathParams: DeleteUserAPIKeyPathParams;
369
398
  } & ControlPlaneFetcherExtraProps;
370
399
  /**
371
400
  * Delete an existing API key
372
401
  */
373
402
  declare const deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
374
- declare type GetWorkspacesListError = ErrorWrapper$1<{
403
+ type GetWorkspacesListError = ErrorWrapper$1<{
375
404
  status: 400;
376
405
  payload: BadRequestError$1;
377
406
  } | {
@@ -381,7 +410,7 @@ declare type GetWorkspacesListError = ErrorWrapper$1<{
381
410
  status: 404;
382
411
  payload: SimpleError$1;
383
412
  }>;
384
- declare type GetWorkspacesListResponse = {
413
+ type GetWorkspacesListResponse = {
385
414
  workspaces: {
386
415
  id: WorkspaceID;
387
416
  name: string;
@@ -389,12 +418,12 @@ declare type GetWorkspacesListResponse = {
389
418
  role: Role;
390
419
  }[];
391
420
  };
392
- declare type GetWorkspacesListVariables = ControlPlaneFetcherExtraProps;
421
+ type GetWorkspacesListVariables = ControlPlaneFetcherExtraProps;
393
422
  /**
394
423
  * Retrieve the list of workspaces the user belongs to
395
424
  */
396
425
  declare const getWorkspacesList: (variables: GetWorkspacesListVariables, signal?: AbortSignal) => Promise<GetWorkspacesListResponse>;
397
- declare type CreateWorkspaceError = ErrorWrapper$1<{
426
+ type CreateWorkspaceError = ErrorWrapper$1<{
398
427
  status: 400;
399
428
  payload: BadRequestError$1;
400
429
  } | {
@@ -404,53 +433,59 @@ declare type CreateWorkspaceError = ErrorWrapper$1<{
404
433
  status: 404;
405
434
  payload: SimpleError$1;
406
435
  }>;
407
- declare type CreateWorkspaceVariables = {
436
+ type CreateWorkspaceVariables = {
408
437
  body: WorkspaceMeta;
409
438
  } & ControlPlaneFetcherExtraProps;
410
439
  /**
411
440
  * Creates a new workspace with the user requesting it as its single owner.
412
441
  */
413
442
  declare const createWorkspace: (variables: CreateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
414
- declare type GetWorkspacePathParams = {
443
+ type GetWorkspacePathParams = {
415
444
  /**
416
445
  * Workspace ID
417
446
  */
418
447
  workspaceId: WorkspaceID;
419
448
  };
420
- declare type GetWorkspaceError = ErrorWrapper$1<{
449
+ type GetWorkspaceError = ErrorWrapper$1<{
421
450
  status: 400;
422
451
  payload: BadRequestError$1;
423
452
  } | {
424
453
  status: 401;
425
454
  payload: AuthError$1;
455
+ } | {
456
+ status: 403;
457
+ payload: AuthError$1;
426
458
  } | {
427
459
  status: 404;
428
460
  payload: SimpleError$1;
429
461
  }>;
430
- declare type GetWorkspaceVariables = {
462
+ type GetWorkspaceVariables = {
431
463
  pathParams: GetWorkspacePathParams;
432
464
  } & ControlPlaneFetcherExtraProps;
433
465
  /**
434
466
  * Retrieve workspace info from a workspace ID
435
467
  */
436
468
  declare const getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
437
- declare type UpdateWorkspacePathParams = {
469
+ type UpdateWorkspacePathParams = {
438
470
  /**
439
471
  * Workspace ID
440
472
  */
441
473
  workspaceId: WorkspaceID;
442
474
  };
443
- declare type UpdateWorkspaceError = ErrorWrapper$1<{
475
+ type UpdateWorkspaceError = ErrorWrapper$1<{
444
476
  status: 400;
445
477
  payload: BadRequestError$1;
446
478
  } | {
447
479
  status: 401;
448
480
  payload: AuthError$1;
481
+ } | {
482
+ status: 403;
483
+ payload: AuthError$1;
449
484
  } | {
450
485
  status: 404;
451
486
  payload: SimpleError$1;
452
487
  }>;
453
- declare type UpdateWorkspaceVariables = {
488
+ type UpdateWorkspaceVariables = {
454
489
  body: WorkspaceMeta;
455
490
  pathParams: UpdateWorkspacePathParams;
456
491
  } & ControlPlaneFetcherExtraProps;
@@ -458,53 +493,59 @@ declare type UpdateWorkspaceVariables = {
458
493
  * Update workspace info
459
494
  */
460
495
  declare const updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
461
- declare type DeleteWorkspacePathParams = {
496
+ type DeleteWorkspacePathParams = {
462
497
  /**
463
498
  * Workspace ID
464
499
  */
465
500
  workspaceId: WorkspaceID;
466
501
  };
467
- declare type DeleteWorkspaceError = ErrorWrapper$1<{
502
+ type DeleteWorkspaceError = ErrorWrapper$1<{
468
503
  status: 400;
469
504
  payload: BadRequestError$1;
470
505
  } | {
471
506
  status: 401;
472
507
  payload: AuthError$1;
508
+ } | {
509
+ status: 403;
510
+ payload: AuthError$1;
473
511
  } | {
474
512
  status: 404;
475
513
  payload: SimpleError$1;
476
514
  }>;
477
- declare type DeleteWorkspaceVariables = {
515
+ type DeleteWorkspaceVariables = {
478
516
  pathParams: DeleteWorkspacePathParams;
479
517
  } & ControlPlaneFetcherExtraProps;
480
518
  /**
481
519
  * Delete the workspace with the provided ID
482
520
  */
483
521
  declare const deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
484
- declare type GetWorkspaceMembersListPathParams = {
522
+ type GetWorkspaceMembersListPathParams = {
485
523
  /**
486
524
  * Workspace ID
487
525
  */
488
526
  workspaceId: WorkspaceID;
489
527
  };
490
- declare type GetWorkspaceMembersListError = ErrorWrapper$1<{
528
+ type GetWorkspaceMembersListError = ErrorWrapper$1<{
491
529
  status: 400;
492
530
  payload: BadRequestError$1;
493
531
  } | {
494
532
  status: 401;
495
533
  payload: AuthError$1;
534
+ } | {
535
+ status: 403;
536
+ payload: AuthError$1;
496
537
  } | {
497
538
  status: 404;
498
539
  payload: SimpleError$1;
499
540
  }>;
500
- declare type GetWorkspaceMembersListVariables = {
541
+ type GetWorkspaceMembersListVariables = {
501
542
  pathParams: GetWorkspaceMembersListPathParams;
502
543
  } & ControlPlaneFetcherExtraProps;
503
544
  /**
504
545
  * Retrieve the list of members of the given workspace
505
546
  */
506
547
  declare const getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal) => Promise<WorkspaceMembers>;
507
- declare type UpdateWorkspaceMemberRolePathParams = {
548
+ type UpdateWorkspaceMemberRolePathParams = {
508
549
  /**
509
550
  * Workspace ID
510
551
  */
@@ -514,20 +555,23 @@ declare type UpdateWorkspaceMemberRolePathParams = {
514
555
  */
515
556
  userId: UserID;
516
557
  };
517
- declare type UpdateWorkspaceMemberRoleError = ErrorWrapper$1<{
558
+ type UpdateWorkspaceMemberRoleError = ErrorWrapper$1<{
518
559
  status: 400;
519
560
  payload: BadRequestError$1;
520
561
  } | {
521
562
  status: 401;
522
563
  payload: AuthError$1;
564
+ } | {
565
+ status: 403;
566
+ payload: AuthError$1;
523
567
  } | {
524
568
  status: 404;
525
569
  payload: SimpleError$1;
526
570
  }>;
527
- declare type UpdateWorkspaceMemberRoleRequestBody = {
571
+ type UpdateWorkspaceMemberRoleRequestBody = {
528
572
  role: Role;
529
573
  };
530
- declare type UpdateWorkspaceMemberRoleVariables = {
574
+ type UpdateWorkspaceMemberRoleVariables = {
531
575
  body: UpdateWorkspaceMemberRoleRequestBody;
532
576
  pathParams: UpdateWorkspaceMemberRolePathParams;
533
577
  } & ControlPlaneFetcherExtraProps;
@@ -535,7 +579,7 @@ declare type UpdateWorkspaceMemberRoleVariables = {
535
579
  * Update a workspace member role. Workspaces must always have at least one owner, so this operation will fail if trying to remove owner role from the last owner in the workspace.
536
580
  */
537
581
  declare const updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal) => Promise<undefined>;
538
- declare type RemoveWorkspaceMemberPathParams = {
582
+ type RemoveWorkspaceMemberPathParams = {
539
583
  /**
540
584
  * Workspace ID
541
585
  */
@@ -545,35 +589,41 @@ declare type RemoveWorkspaceMemberPathParams = {
545
589
  */
546
590
  userId: UserID;
547
591
  };
548
- declare type RemoveWorkspaceMemberError = ErrorWrapper$1<{
592
+ type RemoveWorkspaceMemberError = ErrorWrapper$1<{
549
593
  status: 400;
550
594
  payload: BadRequestError$1;
551
595
  } | {
552
596
  status: 401;
553
597
  payload: AuthError$1;
598
+ } | {
599
+ status: 403;
600
+ payload: AuthError$1;
554
601
  } | {
555
602
  status: 404;
556
603
  payload: SimpleError$1;
557
604
  }>;
558
- declare type RemoveWorkspaceMemberVariables = {
605
+ type RemoveWorkspaceMemberVariables = {
559
606
  pathParams: RemoveWorkspaceMemberPathParams;
560
607
  } & ControlPlaneFetcherExtraProps;
561
608
  /**
562
609
  * Remove the member from the workspace
563
610
  */
564
611
  declare const removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal) => Promise<undefined>;
565
- declare type InviteWorkspaceMemberPathParams = {
612
+ type InviteWorkspaceMemberPathParams = {
566
613
  /**
567
614
  * Workspace ID
568
615
  */
569
616
  workspaceId: WorkspaceID;
570
617
  };
571
- declare type InviteWorkspaceMemberError = ErrorWrapper$1<{
618
+ type InviteWorkspaceMemberError = ErrorWrapper$1<{
572
619
  status: 400;
573
620
  payload: BadRequestError$1;
574
621
  } | {
575
622
  status: 401;
576
623
  payload: AuthError$1;
624
+ } | {
625
+ status: 403;
626
+ payload: AuthError$1;
577
627
  } | {
578
628
  status: 404;
579
629
  payload: SimpleError$1;
@@ -581,14 +631,14 @@ declare type InviteWorkspaceMemberError = ErrorWrapper$1<{
581
631
  status: 409;
582
632
  payload: SimpleError$1;
583
633
  }>;
584
- declare type InviteWorkspaceMemberRequestBody = {
634
+ type InviteWorkspaceMemberRequestBody = {
585
635
  /**
586
636
  * @format email
587
637
  */
588
638
  email: string;
589
639
  role: Role;
590
640
  };
591
- declare type InviteWorkspaceMemberVariables = {
641
+ type InviteWorkspaceMemberVariables = {
592
642
  body: InviteWorkspaceMemberRequestBody;
593
643
  pathParams: InviteWorkspaceMemberPathParams;
594
644
  } & ControlPlaneFetcherExtraProps;
@@ -596,7 +646,7 @@ declare type InviteWorkspaceMemberVariables = {
596
646
  * Invite some user to join the workspace with the given role
597
647
  */
598
648
  declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
599
- declare type UpdateWorkspaceMemberInvitePathParams = {
649
+ type UpdateWorkspaceMemberInvitePathParams = {
600
650
  /**
601
651
  * Workspace ID
602
652
  */
@@ -606,12 +656,15 @@ declare type UpdateWorkspaceMemberInvitePathParams = {
606
656
  */
607
657
  inviteId: InviteID;
608
658
  };
609
- declare type UpdateWorkspaceMemberInviteError = ErrorWrapper$1<{
659
+ type UpdateWorkspaceMemberInviteError = ErrorWrapper$1<{
610
660
  status: 400;
611
661
  payload: BadRequestError$1;
612
662
  } | {
613
663
  status: 401;
614
664
  payload: AuthError$1;
665
+ } | {
666
+ status: 403;
667
+ payload: AuthError$1;
615
668
  } | {
616
669
  status: 404;
617
670
  payload: SimpleError$1;
@@ -619,10 +672,10 @@ declare type UpdateWorkspaceMemberInviteError = ErrorWrapper$1<{
619
672
  status: 422;
620
673
  payload: SimpleError$1;
621
674
  }>;
622
- declare type UpdateWorkspaceMemberInviteRequestBody = {
675
+ type UpdateWorkspaceMemberInviteRequestBody = {
623
676
  role: Role;
624
677
  };
625
- declare type UpdateWorkspaceMemberInviteVariables = {
678
+ type UpdateWorkspaceMemberInviteVariables = {
626
679
  body: UpdateWorkspaceMemberInviteRequestBody;
627
680
  pathParams: UpdateWorkspaceMemberInvitePathParams;
628
681
  } & ControlPlaneFetcherExtraProps;
@@ -630,7 +683,7 @@ declare type UpdateWorkspaceMemberInviteVariables = {
630
683
  * This operation provides a way to update an existing invite. Updates are performed in-place; they do not change the invite link, the expiry time, nor do they re-notify the recipient of the invite.
631
684
  */
632
685
  declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
633
- declare type CancelWorkspaceMemberInvitePathParams = {
686
+ type CancelWorkspaceMemberInvitePathParams = {
634
687
  /**
635
688
  * Workspace ID
636
689
  */
@@ -640,24 +693,27 @@ declare type CancelWorkspaceMemberInvitePathParams = {
640
693
  */
641
694
  inviteId: InviteID;
642
695
  };
643
- declare type CancelWorkspaceMemberInviteError = ErrorWrapper$1<{
696
+ type CancelWorkspaceMemberInviteError = ErrorWrapper$1<{
644
697
  status: 400;
645
698
  payload: BadRequestError$1;
646
699
  } | {
647
700
  status: 401;
648
701
  payload: AuthError$1;
702
+ } | {
703
+ status: 403;
704
+ payload: AuthError$1;
649
705
  } | {
650
706
  status: 404;
651
707
  payload: SimpleError$1;
652
708
  }>;
653
- declare type CancelWorkspaceMemberInviteVariables = {
709
+ type CancelWorkspaceMemberInviteVariables = {
654
710
  pathParams: CancelWorkspaceMemberInvitePathParams;
655
711
  } & ControlPlaneFetcherExtraProps;
656
712
  /**
657
713
  * This operation provides a way to cancel invites by deleting them. Already accepted invites cannot be deleted.
658
714
  */
659
715
  declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
660
- declare type AcceptWorkspaceMemberInvitePathParams = {
716
+ type AcceptWorkspaceMemberInvitePathParams = {
661
717
  /**
662
718
  * Workspace ID
663
719
  */
@@ -667,24 +723,27 @@ declare type AcceptWorkspaceMemberInvitePathParams = {
667
723
  */
668
724
  inviteKey: InviteKey;
669
725
  };
670
- declare type AcceptWorkspaceMemberInviteError = ErrorWrapper$1<{
726
+ type AcceptWorkspaceMemberInviteError = ErrorWrapper$1<{
671
727
  status: 400;
672
728
  payload: BadRequestError$1;
673
729
  } | {
674
730
  status: 401;
675
731
  payload: AuthError$1;
732
+ } | {
733
+ status: 403;
734
+ payload: AuthError$1;
676
735
  } | {
677
736
  status: 404;
678
737
  payload: SimpleError$1;
679
738
  }>;
680
- declare type AcceptWorkspaceMemberInviteVariables = {
739
+ type AcceptWorkspaceMemberInviteVariables = {
681
740
  pathParams: AcceptWorkspaceMemberInvitePathParams;
682
741
  } & ControlPlaneFetcherExtraProps;
683
742
  /**
684
743
  * Accept the invitation to join a workspace. If the operation succeeds the user will be a member of the workspace
685
744
  */
686
745
  declare const acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
687
- declare type ResendWorkspaceMemberInvitePathParams = {
746
+ type ResendWorkspaceMemberInvitePathParams = {
688
747
  /**
689
748
  * Workspace ID
690
749
  */
@@ -694,44 +753,47 @@ declare type ResendWorkspaceMemberInvitePathParams = {
694
753
  */
695
754
  inviteId: InviteID;
696
755
  };
697
- declare type ResendWorkspaceMemberInviteError = ErrorWrapper$1<{
756
+ type ResendWorkspaceMemberInviteError = ErrorWrapper$1<{
698
757
  status: 400;
699
758
  payload: BadRequestError$1;
700
759
  } | {
701
760
  status: 401;
702
761
  payload: AuthError$1;
762
+ } | {
763
+ status: 403;
764
+ payload: AuthError$1;
703
765
  } | {
704
766
  status: 404;
705
767
  payload: SimpleError$1;
706
768
  }>;
707
- declare type ResendWorkspaceMemberInviteVariables = {
769
+ type ResendWorkspaceMemberInviteVariables = {
708
770
  pathParams: ResendWorkspaceMemberInvitePathParams;
709
771
  } & ControlPlaneFetcherExtraProps;
710
772
  /**
711
773
  * This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted.
712
774
  */
713
775
  declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
714
- declare type GetDatabaseListPathParams = {
776
+ type GetDatabaseListPathParams = {
715
777
  /**
716
778
  * Workspace ID
717
779
  */
718
780
  workspaceId: WorkspaceID;
719
781
  };
720
- declare type GetDatabaseListError = ErrorWrapper$1<{
782
+ type GetDatabaseListError = ErrorWrapper$1<{
721
783
  status: 400;
722
784
  payload: BadRequestError$1;
723
785
  } | {
724
786
  status: 401;
725
787
  payload: AuthError$1;
726
788
  }>;
727
- declare type GetDatabaseListVariables = {
789
+ type GetDatabaseListVariables = {
728
790
  pathParams: GetDatabaseListPathParams;
729
791
  } & ControlPlaneFetcherExtraProps;
730
792
  /**
731
793
  * List all databases available in your Workspace.
732
794
  */
733
795
  declare const getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal) => Promise<ListDatabasesResponse>;
734
- declare type CreateDatabasePathParams = {
796
+ type CreateDatabasePathParams = {
735
797
  /**
736
798
  * Workspace ID
737
799
  */
@@ -741,14 +803,20 @@ declare type CreateDatabasePathParams = {
741
803
  */
742
804
  dbName: DBName$1;
743
805
  };
744
- declare type CreateDatabaseError = ErrorWrapper$1<{
806
+ type CreateDatabaseError = ErrorWrapper$1<{
745
807
  status: 400;
746
808
  payload: BadRequestError$1;
747
809
  } | {
748
810
  status: 401;
749
811
  payload: AuthError$1;
812
+ } | {
813
+ status: 422;
814
+ payload: SimpleError$1;
815
+ } | {
816
+ status: 423;
817
+ payload: SimpleError$1;
750
818
  }>;
751
- declare type CreateDatabaseResponse = {
819
+ type CreateDatabaseResponse = {
752
820
  /**
753
821
  * @minLength 1
754
822
  */
@@ -756,7 +824,7 @@ declare type CreateDatabaseResponse = {
756
824
  branchName?: string;
757
825
  status: MigrationStatus$1;
758
826
  };
759
- declare type CreateDatabaseRequestBody = {
827
+ type CreateDatabaseRequestBody = {
760
828
  /**
761
829
  * @minLength 1
762
830
  */
@@ -770,7 +838,7 @@ declare type CreateDatabaseRequestBody = {
770
838
  };
771
839
  metadata?: BranchMetadata$1;
772
840
  };
773
- declare type CreateDatabaseVariables = {
841
+ type CreateDatabaseVariables = {
774
842
  body: CreateDatabaseRequestBody;
775
843
  pathParams: CreateDatabasePathParams;
776
844
  } & ControlPlaneFetcherExtraProps;
@@ -778,7 +846,7 @@ declare type CreateDatabaseVariables = {
778
846
  * Create Database with identifier name
779
847
  */
780
848
  declare const createDatabase: (variables: CreateDatabaseVariables, signal?: AbortSignal) => Promise<CreateDatabaseResponse>;
781
- declare type DeleteDatabasePathParams = {
849
+ type DeleteDatabasePathParams = {
782
850
  /**
783
851
  * Workspace ID
784
852
  */
@@ -788,7 +856,7 @@ declare type DeleteDatabasePathParams = {
788
856
  */
789
857
  dbName: DBName$1;
790
858
  };
791
- declare type DeleteDatabaseError = ErrorWrapper$1<{
859
+ type DeleteDatabaseError = ErrorWrapper$1<{
792
860
  status: 400;
793
861
  payload: BadRequestError$1;
794
862
  } | {
@@ -798,17 +866,17 @@ declare type DeleteDatabaseError = ErrorWrapper$1<{
798
866
  status: 404;
799
867
  payload: SimpleError$1;
800
868
  }>;
801
- declare type DeleteDatabaseResponse = {
869
+ type DeleteDatabaseResponse = {
802
870
  status: MigrationStatus$1;
803
871
  };
804
- declare type DeleteDatabaseVariables = {
872
+ type DeleteDatabaseVariables = {
805
873
  pathParams: DeleteDatabasePathParams;
806
874
  } & ControlPlaneFetcherExtraProps;
807
875
  /**
808
876
  * Delete a database and all of its branches and tables permanently.
809
877
  */
810
878
  declare const deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal) => Promise<DeleteDatabaseResponse>;
811
- declare type GetDatabaseMetadataPathParams = {
879
+ type GetDatabaseMetadataPathParams = {
812
880
  /**
813
881
  * Workspace ID
814
882
  */
@@ -818,7 +886,7 @@ declare type GetDatabaseMetadataPathParams = {
818
886
  */
819
887
  dbName: DBName$1;
820
888
  };
821
- declare type GetDatabaseMetadataError = ErrorWrapper$1<{
889
+ type GetDatabaseMetadataError = ErrorWrapper$1<{
822
890
  status: 400;
823
891
  payload: BadRequestError$1;
824
892
  } | {
@@ -828,14 +896,14 @@ declare type GetDatabaseMetadataError = ErrorWrapper$1<{
828
896
  status: 404;
829
897
  payload: SimpleError$1;
830
898
  }>;
831
- declare type GetDatabaseMetadataVariables = {
899
+ type GetDatabaseMetadataVariables = {
832
900
  pathParams: GetDatabaseMetadataPathParams;
833
901
  } & ControlPlaneFetcherExtraProps;
834
902
  /**
835
903
  * Retrieve metadata of the given database
836
904
  */
837
905
  declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
838
- declare type UpdateDatabaseMetadataPathParams = {
906
+ type UpdateDatabaseMetadataPathParams = {
839
907
  /**
840
908
  * Workspace ID
841
909
  */
@@ -845,7 +913,7 @@ declare type UpdateDatabaseMetadataPathParams = {
845
913
  */
846
914
  dbName: DBName$1;
847
915
  };
848
- declare type UpdateDatabaseMetadataError = ErrorWrapper$1<{
916
+ type UpdateDatabaseMetadataError = ErrorWrapper$1<{
849
917
  status: 400;
850
918
  payload: BadRequestError$1;
851
919
  } | {
@@ -855,7 +923,7 @@ declare type UpdateDatabaseMetadataError = ErrorWrapper$1<{
855
923
  status: 404;
856
924
  payload: SimpleError$1;
857
925
  }>;
858
- declare type UpdateDatabaseMetadataRequestBody = {
926
+ type UpdateDatabaseMetadataRequestBody = {
859
927
  ui?: {
860
928
  /**
861
929
  * @minLength 1
@@ -863,7 +931,7 @@ declare type UpdateDatabaseMetadataRequestBody = {
863
931
  color?: string;
864
932
  };
865
933
  };
866
- declare type UpdateDatabaseMetadataVariables = {
934
+ type UpdateDatabaseMetadataVariables = {
867
935
  body?: UpdateDatabaseMetadataRequestBody;
868
936
  pathParams: UpdateDatabaseMetadataPathParams;
869
937
  } & ControlPlaneFetcherExtraProps;
@@ -871,20 +939,20 @@ declare type UpdateDatabaseMetadataVariables = {
871
939
  * Update the color of the selected database
872
940
  */
873
941
  declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
874
- declare type ListRegionsPathParams = {
942
+ type ListRegionsPathParams = {
875
943
  /**
876
944
  * Workspace ID
877
945
  */
878
946
  workspaceId: WorkspaceID;
879
947
  };
880
- declare type ListRegionsError = ErrorWrapper$1<{
948
+ type ListRegionsError = ErrorWrapper$1<{
881
949
  status: 400;
882
950
  payload: BadRequestError$1;
883
951
  } | {
884
952
  status: 401;
885
953
  payload: AuthError$1;
886
954
  }>;
887
- declare type ListRegionsVariables = {
955
+ type ListRegionsVariables = {
888
956
  pathParams: ListRegionsPathParams;
889
957
  } & ControlPlaneFetcherExtraProps;
890
958
  /**
@@ -897,49 +965,17 @@ declare const listRegions: (variables: ListRegionsVariables, signal?: AbortSigna
897
965
  *
898
966
  * @version 1.0
899
967
  */
900
- /**
901
- * Metadata of databases
902
- */
903
- declare type DEPRECATEDDatabaseMetadata = {
904
- /**
905
- * The machine-readable name of a database
906
- */
907
- name: string;
908
- /**
909
- * The time this database was created
910
- */
911
- createdAt: DateTime;
912
- /**
913
- * The number of branches the database has
914
- */
915
- numberOfBranches: number;
916
- /**
917
- * Metadata about the database for display in Xata user interfaces
918
- */
919
- ui?: {
920
- /**
921
- * The user-selected color for this database across interfaces
922
- */
923
- color?: string;
924
- };
925
- };
926
- declare type DEPRECATEDListDatabasesResponse = {
927
- /**
928
- * A list of databases in a Xata workspace
929
- */
930
- databases?: DEPRECATEDDatabaseMetadata[];
931
- };
932
- declare type ListBranchesResponse = {
968
+ type ListBranchesResponse = {
933
969
  databaseName: string;
934
970
  branches: Branch[];
935
971
  };
936
- declare type ListGitBranchesResponse = {
972
+ type ListGitBranchesResponse = {
937
973
  mapping: {
938
974
  gitBranch: string;
939
975
  xataBranch: string;
940
976
  }[];
941
977
  };
942
- declare type Branch = {
978
+ type Branch = {
943
979
  name: string;
944
980
  createdAt: DateTime;
945
981
  };
@@ -947,7 +983,7 @@ declare type Branch = {
947
983
  * @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
948
984
  * @x-go-type xata.BranchMetadata
949
985
  */
950
- declare type BranchMetadata = {
986
+ type BranchMetadata = {
951
987
  /**
952
988
  * @minLength 1
953
989
  */
@@ -959,7 +995,7 @@ declare type BranchMetadata = {
959
995
  stage?: string;
960
996
  labels?: string[];
961
997
  };
962
- declare type DBBranch = {
998
+ type DBBranch = {
963
999
  databaseName: DBName;
964
1000
  branchName: BranchName;
965
1001
  createdAt: DateTime;
@@ -970,7 +1006,7 @@ declare type DBBranch = {
970
1006
  startedFrom?: StartedFromMetadata;
971
1007
  schema: Schema;
972
1008
  };
973
- declare type StartedFromMetadata = {
1009
+ type StartedFromMetadata = {
974
1010
  branchName: BranchName;
975
1011
  dbBranchID: string;
976
1012
  migrationID: string;
@@ -978,70 +1014,76 @@ declare type StartedFromMetadata = {
978
1014
  /**
979
1015
  * @x-go-type xata.Schema
980
1016
  */
981
- declare type Schema = {
1017
+ type Schema = {
982
1018
  tables: Table[];
983
1019
  tablesOrder?: string[];
984
1020
  };
985
- /**
986
- * @x-internal true
987
- */
988
- declare type SchemaEditScript = {
1021
+ type SchemaEditScript = {
989
1022
  sourceMigrationID?: string;
990
1023
  targetMigrationID?: string;
991
1024
  operations: MigrationOp[];
992
1025
  };
993
- declare type Table = {
1026
+ type Table = {
994
1027
  id?: string;
995
1028
  name: TableName;
996
1029
  columns: Column[];
997
1030
  revLinks?: RevLink[];
998
1031
  };
999
- declare type Column = {
1032
+ type Column = {
1000
1033
  name: string;
1001
1034
  type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime';
1002
1035
  link?: ColumnLink;
1003
1036
  notNull?: boolean;
1037
+ defaultValue?: string;
1004
1038
  unique?: boolean;
1005
1039
  columns?: Column[];
1006
1040
  };
1007
- declare type ColumnLink = {
1041
+ type ColumnLink = {
1008
1042
  table: string;
1009
1043
  };
1010
- declare type RevLink = {
1044
+ type RevLink = {
1011
1045
  linkID: string;
1012
1046
  table: string;
1013
1047
  };
1014
1048
  /**
1049
+ * @maxLength 255
1050
+ * @minLength 1
1015
1051
  * @pattern [a-zA-Z0-9_\-~]+
1016
1052
  */
1017
- declare type BranchName = string;
1053
+ type BranchName = string;
1018
1054
  /**
1055
+ * @maxLength 255
1056
+ * @minLength 1
1019
1057
  * @pattern [a-zA-Z0-9_\-~]+
1020
1058
  */
1021
- declare type DBName = string;
1059
+ type DBName = string;
1022
1060
  /**
1023
1061
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
1024
1062
  *
1063
+ * @maxLength 511
1064
+ * @minLength 1
1025
1065
  * @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
1026
1066
  */
1027
- declare type DBBranchName = string;
1067
+ type DBBranchName = string;
1028
1068
  /**
1069
+ * @maxLength 255
1070
+ * @minLength 1
1029
1071
  * @pattern [a-zA-Z0-9_\-~]+
1030
1072
  */
1031
- declare type TableName = string;
1073
+ type TableName = string;
1032
1074
  /**
1033
1075
  * @pattern [a-zA-Z0-9_\-~\.]+
1034
1076
  */
1035
- declare type ColumnName = string;
1036
- declare type MetricsDatapoint = {
1077
+ type ColumnName = string;
1078
+ type MetricsDatapoint = {
1037
1079
  timestamp: string;
1038
1080
  value: number;
1039
1081
  };
1040
- declare type MetricsLatency = {
1082
+ type MetricsLatency = {
1041
1083
  p50?: MetricsDatapoint[];
1042
1084
  p90?: MetricsDatapoint[];
1043
1085
  };
1044
- declare type BranchMigration = {
1086
+ type BranchMigration = {
1045
1087
  id?: string;
1046
1088
  parentID?: string;
1047
1089
  status: string;
@@ -1059,7 +1101,7 @@ declare type BranchMigration = {
1059
1101
  newTableOrder: string[];
1060
1102
  renamedTables?: TableRename[];
1061
1103
  };
1062
- declare type TableMigration = {
1104
+ type TableMigration = {
1063
1105
  newColumns?: {
1064
1106
  [key: string]: Column;
1065
1107
  };
@@ -1067,14 +1109,11 @@ declare type TableMigration = {
1067
1109
  modifiedColumns?: ColumnMigration[];
1068
1110
  newColumnOrder: string[];
1069
1111
  };
1070
- declare type ColumnMigration = {
1112
+ type ColumnMigration = {
1071
1113
  old: Column;
1072
1114
  ['new']: Column;
1073
1115
  };
1074
- /**
1075
- * @x-internal true
1076
- */
1077
- declare type Commit = {
1116
+ type Commit = {
1078
1117
  title?: string;
1079
1118
  message?: string;
1080
1119
  id: string;
@@ -1085,79 +1124,51 @@ declare type Commit = {
1085
1124
  modifiedAt?: DateTime;
1086
1125
  operations: MigrationOp[];
1087
1126
  };
1088
- declare type MigrationStatus = 'completed' | 'pending' | 'failed';
1127
+ type MigrationStatus = 'completed' | 'pending' | 'failed';
1089
1128
  /**
1090
1129
  * Branch schema migration.
1091
- *
1092
- * @x-internal true
1093
1130
  */
1094
- declare type Migration = {
1131
+ type Migration = {
1095
1132
  parentID?: string;
1096
1133
  operations: MigrationOp[];
1097
1134
  };
1098
1135
  /**
1099
1136
  * Branch schema migration operations.
1100
- *
1101
- * @x-internal true
1102
- */
1103
- declare type MigrationOp = MigrationTableOp | MigrationColumnOp;
1104
- /**
1105
- * @x-internal true
1106
1137
  */
1107
- declare type MigrationTableOp = {
1138
+ type MigrationOp = MigrationTableOp | MigrationColumnOp;
1139
+ type MigrationTableOp = {
1108
1140
  addTable: TableOpAdd;
1109
1141
  } | {
1110
1142
  removeTable: TableOpRemove;
1111
1143
  } | {
1112
1144
  renameTable: TableOpRename;
1113
1145
  };
1114
- /**
1115
- * @x-internal true
1116
- */
1117
- declare type MigrationColumnOp = {
1146
+ type MigrationColumnOp = {
1118
1147
  addColumn: ColumnOpAdd;
1119
1148
  } | {
1120
1149
  removeColumn: ColumnOpRemove;
1121
1150
  } | {
1122
1151
  renameColumn: ColumnOpRename;
1123
1152
  };
1124
- /**
1125
- * @x-internal true
1126
- */
1127
- declare type TableOpAdd = {
1153
+ type TableOpAdd = {
1128
1154
  table: string;
1129
1155
  };
1130
- /**
1131
- * @x-internal true
1132
- */
1133
- declare type TableOpRemove = {
1156
+ type TableOpRemove = {
1134
1157
  table: string;
1135
1158
  };
1136
- /**
1137
- * @x-internal true
1138
- */
1139
- declare type TableOpRename = {
1159
+ type TableOpRename = {
1140
1160
  oldName: string;
1141
1161
  newName: string;
1142
1162
  };
1143
- /**
1144
- * @x-internal true
1145
- */
1146
- declare type ColumnOpAdd = {
1163
+ type ColumnOpAdd = {
1147
1164
  table: string;
1148
1165
  column: Column;
1149
1166
  };
1150
- /**
1151
- * @x-internal true
1152
- */
1153
- declare type ColumnOpRemove = {
1167
+ type ColumnOpRemove = {
1154
1168
  table: string;
1155
1169
  column: string;
1156
1170
  };
1157
- /**
1158
- * @x-internal true
1159
- */
1160
- declare type ColumnOpRename = {
1171
+ type ColumnOpRename = {
1161
1172
  table: string;
1162
1173
  oldName: string;
1163
1174
  newName: string;
@@ -1168,8 +1179,8 @@ declare type ColumnOpRename = {
1168
1179
  * @minimum 0
1169
1180
  * @x-go-type migration.RequestNumber
1170
1181
  */
1171
- declare type MigrationRequestNumber = number;
1172
- declare type MigrationRequest = {
1182
+ type MigrationRequestNumber = number;
1183
+ type MigrationRequest = {
1173
1184
  number?: MigrationRequestNumber;
1174
1185
  /**
1175
1186
  * Migration request creation timestamp.
@@ -1187,7 +1198,7 @@ declare type MigrationRequest = {
1187
1198
  * Timestamp when the migration request was merged.
1188
1199
  */
1189
1200
  mergedAt?: DateTime;
1190
- status?: 'open' | 'closed' | 'merging' | 'merged';
1201
+ status?: 'open' | 'closed' | 'merging' | 'merged' | 'failed';
1191
1202
  /**
1192
1203
  * The migration request title.
1193
1204
  */
@@ -1205,12 +1216,12 @@ declare type MigrationRequest = {
1205
1216
  */
1206
1217
  target?: string;
1207
1218
  };
1208
- declare type SortExpression = string[] | {
1219
+ type SortExpression = string[] | {
1209
1220
  [key: string]: SortOrder;
1210
1221
  } | {
1211
1222
  [key: string]: SortOrder;
1212
1223
  }[];
1213
- declare type SortOrder = 'asc' | 'desc';
1224
+ type SortOrder = 'asc' | 'desc';
1214
1225
  /**
1215
1226
  * Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
1216
1227
  * distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
@@ -1221,15 +1232,15 @@ declare type SortOrder = 'asc' | 'desc';
1221
1232
  * @maximum 2
1222
1233
  * @minimum 0
1223
1234
  */
1224
- declare type FuzzinessExpression = number;
1235
+ type FuzzinessExpression = number;
1225
1236
  /**
1226
1237
  * If the prefix type is set to "disabled" (the default), the search only matches full words. If the prefix type is set to "phrase", the search will return results that match prefixes of the search phrase.
1227
1238
  */
1228
- declare type PrefixExpression = 'phrase' | 'disabled';
1239
+ type PrefixExpression = 'phrase' | 'disabled';
1229
1240
  /**
1230
1241
  * The target expression is used to filter the search results by the target columns.
1231
1242
  */
1232
- declare type TargetExpression = (string | {
1243
+ type TargetExpression = (string | {
1233
1244
  /**
1234
1245
  * The name of the column.
1235
1246
  */
@@ -1246,7 +1257,7 @@ declare type TargetExpression = (string | {
1246
1257
  /**
1247
1258
  * @minProperties 1
1248
1259
  */
1249
- declare type FilterExpression = {
1260
+ type FilterExpression = {
1250
1261
  $exists?: string;
1251
1262
  $existsNot?: string;
1252
1263
  $any?: FilterList;
@@ -1269,11 +1280,10 @@ declare type FilterExpression = {
1269
1280
  * an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
1270
1281
  * `settings.dark_mode` but not `settings` nor `settings.*`.
1271
1282
  *
1272
- * @example {"all_users":{"count":"*"}}
1273
- * @example {"total_created":{"count":"created_at"}}
1283
+ * @example {"all_users":{"count":"*"},"total_created":{"count":"created_at"},"min_cost":{"min":"cost"},"max_happiness":{"max":"happiness"},"total_revenue":{"sum":"revenue"},"average_speed":{"average":"speed"}}
1274
1284
  * @x-go-type xbquery.SummaryList
1275
1285
  */
1276
- declare type SummaryExpressionList = {
1286
+ type SummaryExpressionList = {
1277
1287
  [key: string]: SummaryExpression;
1278
1288
  };
1279
1289
  /**
@@ -1284,32 +1294,49 @@ declare type SummaryExpressionList = {
1284
1294
  * an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
1285
1295
  * `settings.dark_mode` but not `settings` nor `settings.*`.
1286
1296
  *
1287
- * We currently support the `count` operation. When using `count`, one can set a column name
1288
- * as the value. Xata will return the total number times this column is non-null in each group.
1297
+ * We currently support several aggregation functions. Not all functions can be run on all column
1298
+ * types.
1299
+ *
1300
+ * - `count` is used to count the number of records in each group. Use `{"count": "*"}` to count
1301
+ * all columns present, otherwise `{"count": "<column_path>"}` to count the number of non-null
1302
+ * values are present at column path.
1303
+ *
1304
+ * Count can be used on any column type, and always returns an int.
1305
+ *
1306
+ * - `min` calculates the minimum value in each group. `min` is compatible with most types;
1307
+ * string, multiple, text, email, int, float, and datetime. It returns a value of the same
1308
+ * type as operated on. This means that `{"lowest_latency": {"min": "latency"}}` where
1309
+ * `latency` is an int, will always return an int.
1310
+ *
1311
+ * - `max` calculates the maximum value in each group. `max` shares the same compatibility as
1312
+ * `min`.
1313
+ *
1314
+ * - `sum` adds up all values in a group. `sum` can be run on `int` and `float` types, and will
1315
+ * return a value of the same type as requested.
1289
1316
  *
1290
- * Alternately, if you'd like to count the total rows in each group - irregardless of null/not null
1291
- * status - you can set `count` to `*` to count everything.
1317
+ * - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
1318
+ * always returns a float.
1292
1319
  *
1293
1320
  * @example {"count":"deleted_at"}
1294
1321
  * @x-go-type xbquery.Summary
1295
1322
  */
1296
- declare type SummaryExpression = Record<string, any>;
1323
+ type SummaryExpression = Record<string, any>;
1297
1324
  /**
1298
1325
  * The description of the aggregations you wish to receive.
1299
1326
  *
1300
- * @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d"},"aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}
1327
+ * @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d","aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}}
1301
1328
  */
1302
- declare type AggExpressionMap = {
1329
+ type AggExpressionMap = {
1303
1330
  [key: string]: AggExpression;
1304
1331
  };
1305
1332
  /**
1306
1333
  * The description of a single aggregation operation. It is an object with only one key-value pair.
1307
- * The key represents the aggreagtion type, while the value is an object with the configuration of
1308
- * the aggreagtion.
1334
+ * The key represents the aggregation type, while the value is an object with the configuration of
1335
+ * the aggregation.
1309
1336
  *
1310
1337
  * @x-go-type xata.AggExpression
1311
1338
  */
1312
- declare type AggExpression = {
1339
+ type AggExpression = {
1313
1340
  count?: CountAgg;
1314
1341
  } | {
1315
1342
  sum?: SumAgg;
@@ -1331,13 +1358,13 @@ declare type AggExpression = {
1331
1358
  /**
1332
1359
  * Count the number of records with an optional filter.
1333
1360
  */
1334
- declare type CountAgg = {
1361
+ type CountAgg = {
1335
1362
  filter?: FilterExpression;
1336
1363
  } | '*';
1337
1364
  /**
1338
1365
  * The sum of the numeric values in a particular column.
1339
1366
  */
1340
- declare type SumAgg = {
1367
+ type SumAgg = {
1341
1368
  /**
1342
1369
  * The column on which to compute the sum. Must be a numeric type.
1343
1370
  */
@@ -1346,7 +1373,7 @@ declare type SumAgg = {
1346
1373
  /**
1347
1374
  * The max of the numeric values in a particular column.
1348
1375
  */
1349
- declare type MaxAgg = {
1376
+ type MaxAgg = {
1350
1377
  /**
1351
1378
  * The column on which to compute the max. Must be a numeric type.
1352
1379
  */
@@ -1355,7 +1382,7 @@ declare type MaxAgg = {
1355
1382
  /**
1356
1383
  * The min of the numeric values in a particular column.
1357
1384
  */
1358
- declare type MinAgg = {
1385
+ type MinAgg = {
1359
1386
  /**
1360
1387
  * The column on which to compute the min. Must be a numeric type.
1361
1388
  */
@@ -1364,7 +1391,7 @@ declare type MinAgg = {
1364
1391
  /**
1365
1392
  * The average of the numeric values in a particular column.
1366
1393
  */
1367
- declare type AverageAgg = {
1394
+ type AverageAgg = {
1368
1395
  /**
1369
1396
  * The column on which to compute the average. Must be a numeric type.
1370
1397
  */
@@ -1373,7 +1400,7 @@ declare type AverageAgg = {
1373
1400
  /**
1374
1401
  * Count the number of distinct values in a particular column.
1375
1402
  */
1376
- declare type UniqueCountAgg = {
1403
+ type UniqueCountAgg = {
1377
1404
  /**
1378
1405
  * The column from where to count the unique values.
1379
1406
  */
@@ -1388,7 +1415,7 @@ declare type UniqueCountAgg = {
1388
1415
  /**
1389
1416
  * Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
1390
1417
  */
1391
- declare type DateHistogramAgg = {
1418
+ type DateHistogramAgg = {
1392
1419
  /**
1393
1420
  * The column to use for bucketing. Must be of type datetime.
1394
1421
  */
@@ -1419,7 +1446,7 @@ declare type DateHistogramAgg = {
1419
1446
  * Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
1420
1447
  * The top values as ordered by the number of records (`$count`) are returned.
1421
1448
  */
1422
- declare type TopValuesAgg = {
1449
+ type TopValuesAgg = {
1423
1450
  /**
1424
1451
  * The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
1425
1452
  */
@@ -1436,7 +1463,7 @@ declare type TopValuesAgg = {
1436
1463
  /**
1437
1464
  * Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
1438
1465
  */
1439
- declare type NumericHistogramAgg = {
1466
+ type NumericHistogramAgg = {
1440
1467
  /**
1441
1468
  * The column to use for bucketing. Must be of numeric type.
1442
1469
  */
@@ -1459,7 +1486,7 @@ declare type NumericHistogramAgg = {
1459
1486
  offset?: number;
1460
1487
  aggs?: AggExpressionMap;
1461
1488
  };
1462
- declare type HighlightExpression = {
1489
+ type HighlightExpression = {
1463
1490
  /**
1464
1491
  * Set to `false` to disable highlighting. By default it is `true`.
1465
1492
  */
@@ -1474,7 +1501,7 @@ declare type HighlightExpression = {
1474
1501
  *
1475
1502
  * @x-go-type xata.BoosterExpression
1476
1503
  */
1477
- declare type BoosterExpression = {
1504
+ type BoosterExpression = {
1478
1505
  valueBooster?: ValueBooster$1;
1479
1506
  } | {
1480
1507
  numericBooster?: NumericBooster$1;
@@ -1484,7 +1511,7 @@ declare type BoosterExpression = {
1484
1511
  /**
1485
1512
  * Boost records with a particular value for a column.
1486
1513
  */
1487
- declare type ValueBooster$1 = {
1514
+ type ValueBooster$1 = {
1488
1515
  /**
1489
1516
  * The column in which to look for the value.
1490
1517
  */
@@ -1497,11 +1524,15 @@ declare type ValueBooster$1 = {
1497
1524
  * The factor with which to multiply the score of the record.
1498
1525
  */
1499
1526
  factor: number;
1527
+ /**
1528
+ * Only apply this booster to the records for which the provided filter matches.
1529
+ */
1530
+ ifMatchesFilter?: FilterExpression;
1500
1531
  };
1501
1532
  /**
1502
1533
  * Boost records based on the value of a numeric column.
1503
1534
  */
1504
- declare type NumericBooster$1 = {
1535
+ type NumericBooster$1 = {
1505
1536
  /**
1506
1537
  * The column in which to look for the value.
1507
1538
  */
@@ -1510,13 +1541,31 @@ declare type NumericBooster$1 = {
1510
1541
  * The factor with which to multiply the value of the column before adding it to the item score.
1511
1542
  */
1512
1543
  factor: number;
1544
+ /**
1545
+ * Modifier to be applied to the column value, before being multiplied with the factor. The possible values are:
1546
+ * - none (default).
1547
+ * - log: common logarithm (base 10)
1548
+ * - log1p: add 1 then take the common logarithm. This ensures that the value is positive if the
1549
+ * value is between 0 and 1.
1550
+ * - ln: natural logarithm (base e)
1551
+ * - ln1p: add 1 then take the natural logarithm. This ensures that the value is positive if the
1552
+ * value is between 0 and 1.
1553
+ * - square: raise the value to the power of two.
1554
+ * - sqrt: take the square root of the value.
1555
+ * - reciprocal: reciprocate the value (if the value is `x`, the reciprocal is `1/x`).
1556
+ */
1557
+ modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
1558
+ /**
1559
+ * Only apply this booster to the records for which the provided filter matches.
1560
+ */
1561
+ ifMatchesFilter?: FilterExpression;
1513
1562
  };
1514
1563
  /**
1515
1564
  * Boost records based on the value of a datetime column. It is configured via "origin", "scale", and "decay". The further away from the "origin",
1516
1565
  * 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
1517
1566
  * 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.
1518
1567
  */
1519
- declare type DateBooster$1 = {
1568
+ type DateBooster$1 = {
1520
1569
  /**
1521
1570
  * The column in which to look for the value.
1522
1571
  */
@@ -1536,25 +1585,29 @@ declare type DateBooster$1 = {
1536
1585
  * The decay factor to expect at "scale" distance from the "origin".
1537
1586
  */
1538
1587
  decay: number;
1588
+ /**
1589
+ * Only apply this booster to the records for which the provided filter matches.
1590
+ */
1591
+ ifMatchesFilter?: FilterExpression;
1539
1592
  };
1540
- declare type FilterList = FilterExpression | FilterExpression[];
1541
- declare type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
1593
+ type FilterList = FilterExpression | FilterExpression[];
1594
+ type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
1542
1595
  /**
1543
1596
  * @maxProperties 1
1544
1597
  * @minProperties 1
1545
1598
  */
1546
- declare type FilterColumnIncludes = {
1599
+ type FilterColumnIncludes = {
1547
1600
  $includes?: FilterPredicate;
1548
1601
  $includesAny?: FilterPredicate;
1549
1602
  $includesAll?: FilterPredicate;
1550
1603
  $includesNone?: FilterPredicate;
1551
1604
  };
1552
- declare type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
1605
+ type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
1553
1606
  /**
1554
1607
  * @maxProperties 1
1555
1608
  * @minProperties 1
1556
1609
  */
1557
- declare type FilterPredicateOp = {
1610
+ type FilterPredicateOp = {
1558
1611
  $any?: FilterPredicate[];
1559
1612
  $all?: FilterPredicate[];
1560
1613
  $none?: FilterPredicate | FilterPredicate[];
@@ -1574,18 +1627,18 @@ declare type FilterPredicateOp = {
1574
1627
  * @maxProperties 2
1575
1628
  * @minProperties 2
1576
1629
  */
1577
- declare type FilterPredicateRangeOp = {
1630
+ type FilterPredicateRangeOp = {
1578
1631
  $lt?: FilterRangeValue;
1579
1632
  $le?: FilterRangeValue;
1580
1633
  $gt?: FilterRangeValue;
1581
1634
  $ge?: FilterRangeValue;
1582
1635
  };
1583
- declare type FilterRangeValue = number | string;
1584
- declare type FilterValue = number | string | boolean;
1636
+ type FilterRangeValue = number | string;
1637
+ type FilterValue = number | string | boolean;
1585
1638
  /**
1586
1639
  * Pagination settings.
1587
1640
  */
1588
- declare type PageConfig = {
1641
+ type PageConfig = {
1589
1642
  /**
1590
1643
  * Query the next page that follow the cursor.
1591
1644
  */
@@ -1597,11 +1650,11 @@ declare type PageConfig = {
1597
1650
  /**
1598
1651
  * Query the first page from the cursor.
1599
1652
  */
1600
- first?: string;
1653
+ start?: string;
1601
1654
  /**
1602
1655
  * Query the last page from the cursor.
1603
1656
  */
1604
- last?: string;
1657
+ end?: string;
1605
1658
  /**
1606
1659
  * Set page size. If the size is missing it is read from the cursor. If no cursor is given Xata will choose the default page size.
1607
1660
  *
@@ -1615,16 +1668,35 @@ declare type PageConfig = {
1615
1668
  */
1616
1669
  offset?: number;
1617
1670
  };
1671
+ /**
1672
+ * Pagination settings for the search endpoints.
1673
+ */
1674
+ type SearchPageConfig = {
1675
+ /**
1676
+ * Set page size.
1677
+ *
1678
+ * @default 25
1679
+ * @maximum 200
1680
+ */
1681
+ size?: number;
1682
+ /**
1683
+ * Use offset to skip entries. To skip pages set offset to a multiple of size.
1684
+ *
1685
+ * @default 0
1686
+ * @maximum 800
1687
+ */
1688
+ offset?: number;
1689
+ };
1618
1690
  /**
1619
1691
  * @example name
1620
1692
  * @example email
1621
1693
  * @example created_at
1622
1694
  */
1623
- declare type ColumnsProjection = string[];
1695
+ type ColumnsProjection = string[];
1624
1696
  /**
1625
1697
  * Xata Table Record Metadata
1626
1698
  */
1627
- declare type RecordMeta = {
1699
+ type RecordMeta = {
1628
1700
  id: RecordID;
1629
1701
  xata: {
1630
1702
  /**
@@ -1656,11 +1728,11 @@ declare type RecordMeta = {
1656
1728
  /**
1657
1729
  * @pattern [a-zA-Z0-9_-~:]+
1658
1730
  */
1659
- declare type RecordID = string;
1731
+ type RecordID = string;
1660
1732
  /**
1661
1733
  * @example {"newName":"newName","oldName":"oldName"}
1662
1734
  */
1663
- declare type TableRename = {
1735
+ type TableRename = {
1664
1736
  /**
1665
1737
  * @minLength 1
1666
1738
  */
@@ -1673,7 +1745,7 @@ declare type TableRename = {
1673
1745
  /**
1674
1746
  * Records metadata
1675
1747
  */
1676
- declare type RecordsMetadata = {
1748
+ type RecordsMetadata = {
1677
1749
  page: {
1678
1750
  /**
1679
1751
  * last record id
@@ -1685,7 +1757,7 @@ declare type RecordsMetadata = {
1685
1757
  more: boolean;
1686
1758
  };
1687
1759
  };
1688
- declare type AggResponse$1 = (number | null) | {
1760
+ type AggResponse$1 = (number | null) | {
1689
1761
  values: ({
1690
1762
  $key: string | number;
1691
1763
  $count: number;
@@ -1693,15 +1765,162 @@ declare type AggResponse$1 = (number | null) | {
1693
1765
  [key: string]: AggResponse$1;
1694
1766
  })[];
1695
1767
  };
1768
+ /**
1769
+ * A transaction operation
1770
+ */
1771
+ type TransactionOperation$1 = {
1772
+ insert: TransactionInsertOp;
1773
+ } | {
1774
+ update: TransactionUpdateOp;
1775
+ } | {
1776
+ ['delete']: TransactionDeleteOp;
1777
+ };
1778
+ /**
1779
+ * Insert operation
1780
+ */
1781
+ type TransactionInsertOp = {
1782
+ /**
1783
+ * The table name
1784
+ */
1785
+ table: string;
1786
+ /**
1787
+ * The record to insert. The `id` field is optional; when specified, it will be used as the ID for the record.
1788
+ */
1789
+ record: {
1790
+ [key: string]: any;
1791
+ };
1792
+ /**
1793
+ * The version of the record you expect to be overwriting. Only valid with an
1794
+ * explicit ID is also set in the `record` key.
1795
+ */
1796
+ ifVersion?: number;
1797
+ /**
1798
+ * createOnly is used to change how Xata acts when an explicit ID is set in the `record` key.
1799
+ *
1800
+ * If `createOnly` is set to `true`, Xata will only attempt to insert the record. If there's a conflict, Xata
1801
+ * will cancel the transaction.
1802
+ *
1803
+ * If `createOnly` is set to `false`, Xata will attempt to insert the record. If there's no
1804
+ * conflict, the record is inserted. If there is a conflict, Xata will replace the record.
1805
+ */
1806
+ createOnly?: boolean;
1807
+ };
1808
+ /**
1809
+ * Update operation
1810
+ */
1811
+ type TransactionUpdateOp = {
1812
+ /**
1813
+ * The table name
1814
+ */
1815
+ table: string;
1816
+ id: RecordID;
1817
+ /**
1818
+ * The fields of the record you'd like to update
1819
+ */
1820
+ fields: {
1821
+ [key: string]: any;
1822
+ };
1823
+ /**
1824
+ * The version of the record you expect to be updating
1825
+ */
1826
+ ifVersion?: number;
1827
+ /**
1828
+ * Xata will insert this record if it cannot be found.
1829
+ */
1830
+ upsert?: boolean;
1831
+ };
1832
+ /**
1833
+ * A delete operation. The transaction will continue if no record matches the ID.
1834
+ */
1835
+ type TransactionDeleteOp = {
1836
+ /**
1837
+ * The table name
1838
+ */
1839
+ table: string;
1840
+ id: RecordID;
1841
+ };
1842
+ /**
1843
+ * An ordered array of results from the submitted operations.
1844
+ */
1845
+ type TransactionSuccess = {
1846
+ results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
1847
+ };
1848
+ /**
1849
+ * A result from an insert operation.
1850
+ */
1851
+ type TransactionResultInsert = {
1852
+ /**
1853
+ * The type of operation who's result is being returned.
1854
+ */
1855
+ operation: 'insert';
1856
+ /**
1857
+ * The number of affected rows
1858
+ */
1859
+ rows: number;
1860
+ id: RecordID;
1861
+ };
1862
+ /**
1863
+ * A result from an update operation.
1864
+ */
1865
+ type TransactionResultUpdate = {
1866
+ /**
1867
+ * The type of operation who's result is being returned.
1868
+ */
1869
+ operation: 'update';
1870
+ /**
1871
+ * The number of updated rows
1872
+ */
1873
+ rows: number;
1874
+ id: RecordID;
1875
+ };
1876
+ /**
1877
+ * A result from a delete operation.
1878
+ */
1879
+ type TransactionResultDelete = {
1880
+ /**
1881
+ * The type of operation who's result is being returned.
1882
+ */
1883
+ operation: 'delete';
1884
+ /**
1885
+ * The number of deleted rows
1886
+ */
1887
+ rows: number;
1888
+ };
1889
+ /**
1890
+ * An array of errors, with indicides, from the transaction.
1891
+ */
1892
+ type TransactionFailure = {
1893
+ /**
1894
+ * The request ID.
1895
+ */
1896
+ id: string;
1897
+ /**
1898
+ * An array of errors from the submitted operations.
1899
+ */
1900
+ errors: TransactionError[];
1901
+ };
1902
+ /**
1903
+ * An error message from a failing transaction operation
1904
+ */
1905
+ type TransactionError = {
1906
+ /**
1907
+ * The index of the failing operation
1908
+ */
1909
+ index: number;
1910
+ /**
1911
+ * The error message
1912
+ */
1913
+ message: string;
1914
+ };
1696
1915
  /**
1697
1916
  * @format date-time
1698
1917
  * @x-go-type string
1699
1918
  */
1700
- declare type DateTime = string;
1919
+ type DateTime = string;
1701
1920
  /**
1702
1921
  * Xata Table Record Metadata
1703
1922
  */
1704
- declare type XataRecord$1 = RecordMeta & {
1923
+ type XataRecord$1 = RecordMeta & {
1705
1924
  [key: string]: any;
1706
1925
  };
1707
1926
 
@@ -1711,42 +1930,42 @@ declare type XataRecord$1 = RecordMeta & {
1711
1930
  * @version 1.0
1712
1931
  */
1713
1932
 
1714
- declare type SimpleError = {
1933
+ type SimpleError = {
1715
1934
  id?: string;
1716
1935
  message: string;
1717
1936
  };
1718
- declare type BulkError = {
1937
+ type BulkError = {
1719
1938
  errors: {
1720
1939
  message?: string;
1721
1940
  status?: number;
1722
1941
  }[];
1723
1942
  };
1724
- declare type BulkInsertResponse = {
1943
+ type BulkInsertResponse = {
1725
1944
  recordIDs: string[];
1726
1945
  } | {
1727
1946
  records: XataRecord$1[];
1728
1947
  };
1729
- declare type BranchMigrationPlan = {
1948
+ type BranchMigrationPlan = {
1730
1949
  version: number;
1731
1950
  migration: BranchMigration;
1732
1951
  };
1733
- declare type RecordResponse = XataRecord$1;
1734
- declare type SchemaCompareResponse = {
1952
+ type RecordResponse = XataRecord$1;
1953
+ type SchemaCompareResponse = {
1735
1954
  source: Schema;
1736
1955
  target: Schema;
1737
1956
  edits: SchemaEditScript;
1738
1957
  };
1739
- declare type RecordUpdateResponse = XataRecord$1 | {
1958
+ type RecordUpdateResponse = XataRecord$1 | {
1740
1959
  id: string;
1741
1960
  xata: {
1742
1961
  version: number;
1743
1962
  };
1744
1963
  };
1745
- declare type QueryResponse = {
1964
+ type QueryResponse = {
1746
1965
  records: XataRecord$1[];
1747
1966
  meta: RecordsMetadata;
1748
1967
  };
1749
- declare type SchemaUpdateResponse = {
1968
+ type SchemaUpdateResponse = {
1750
1969
  /**
1751
1970
  * @minLength 1
1752
1971
  */
@@ -1754,34 +1973,34 @@ declare type SchemaUpdateResponse = {
1754
1973
  parentMigrationID: string;
1755
1974
  status: MigrationStatus;
1756
1975
  };
1757
- declare type SummarizeResponse = {
1976
+ type SummarizeResponse = {
1758
1977
  summaries: Record<string, any>[];
1759
1978
  };
1760
1979
  /**
1761
- * @example {"aggs":{"dailyUniqueUsers":{"values":[{"key":"2022-02-22T22:22:22Z","uniqueUsers":134},{"key":"2022-02-23T22:22:22Z","uniqueUsers":90}]}}}
1980
+ * @example {"aggs":{"dailyUniqueUsers":{"values":[{"$count":321,"$key":"2022-02-22T22:22:22Z","uniqueUsers":134},{"$count":202,"$key":"2022-02-23T22:22:22Z","uniqueUsers":90}]}}}
1762
1981
  */
1763
- declare type AggResponse = {
1982
+ type AggResponse = {
1764
1983
  aggs?: {
1765
1984
  [key: string]: AggResponse$1;
1766
1985
  };
1767
1986
  };
1768
- declare type SearchResponse = {
1987
+ type SearchResponse = {
1769
1988
  records: XataRecord$1[];
1770
1989
  warning?: string;
1771
1990
  };
1772
- declare type BadRequestError = {
1991
+ type BadRequestError = {
1773
1992
  id?: string;
1774
1993
  message: string;
1775
1994
  };
1776
1995
  /**
1777
1996
  * @example {"message":"invalid API key"}
1778
1997
  */
1779
- declare type AuthError = {
1998
+ type AuthError = {
1780
1999
  id?: string;
1781
2000
  message: string;
1782
2001
  };
1783
2002
 
1784
- declare type DataPlaneFetcherExtraProps = {
2003
+ type DataPlaneFetcherExtraProps = {
1785
2004
  apiUrl: string;
1786
2005
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
1787
2006
  fetchImpl: FetchImpl;
@@ -1790,8 +2009,9 @@ declare type DataPlaneFetcherExtraProps = {
1790
2009
  signal?: AbortSignal;
1791
2010
  clientID?: string;
1792
2011
  sessionID?: string;
2012
+ clientName?: string;
1793
2013
  };
1794
- declare type ErrorWrapper<TError> = TError | {
2014
+ type ErrorWrapper<TError> = TError | {
1795
2015
  status: 'unknown';
1796
2016
  payload: string;
1797
2017
  };
@@ -1802,25 +2022,7 @@ declare type ErrorWrapper<TError> = TError | {
1802
2022
  * @version 1.0
1803
2023
  */
1804
2024
 
1805
- declare type DEPRECATEDgetDatabaseListPathParams = {
1806
- workspace: string;
1807
- region: string;
1808
- };
1809
- declare type DEPRECATEDgetDatabaseListError = ErrorWrapper<{
1810
- status: 400;
1811
- payload: BadRequestError;
1812
- } | {
1813
- status: 401;
1814
- payload: AuthError;
1815
- }>;
1816
- declare type DEPRECATEDgetDatabaseListVariables = {
1817
- pathParams: DEPRECATEDgetDatabaseListPathParams;
1818
- } & DataPlaneFetcherExtraProps;
1819
- /**
1820
- * List all databases available in your Workspace.
1821
- */
1822
- declare const dEPRECATEDgetDatabaseList: (variables: DEPRECATEDgetDatabaseListVariables, signal?: AbortSignal) => Promise<DEPRECATEDListDatabasesResponse>;
1823
- declare type GetBranchListPathParams = {
2025
+ type GetBranchListPathParams = {
1824
2026
  /**
1825
2027
  * The Database Name
1826
2028
  */
@@ -1828,7 +2030,7 @@ declare type GetBranchListPathParams = {
1828
2030
  workspace: string;
1829
2031
  region: string;
1830
2032
  };
1831
- declare type GetBranchListError = ErrorWrapper<{
2033
+ type GetBranchListError = ErrorWrapper<{
1832
2034
  status: 400;
1833
2035
  payload: BadRequestError;
1834
2036
  } | {
@@ -1838,142 +2040,14 @@ declare type GetBranchListError = ErrorWrapper<{
1838
2040
  status: 404;
1839
2041
  payload: SimpleError;
1840
2042
  }>;
1841
- declare type GetBranchListVariables = {
2043
+ type GetBranchListVariables = {
1842
2044
  pathParams: GetBranchListPathParams;
1843
2045
  } & DataPlaneFetcherExtraProps;
1844
2046
  /**
1845
2047
  * List all available Branches
1846
2048
  */
1847
2049
  declare const getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
1848
- declare type DEPRECATEDcreateDatabasePathParams = {
1849
- /**
1850
- * The Database Name
1851
- */
1852
- dbName: DBName;
1853
- workspace: string;
1854
- region: string;
1855
- };
1856
- declare type DEPRECATEDcreateDatabaseError = ErrorWrapper<{
1857
- status: 400;
1858
- payload: BadRequestError;
1859
- } | {
1860
- status: 401;
1861
- payload: AuthError;
1862
- }>;
1863
- declare type DEPRECATEDcreateDatabaseResponse = {
1864
- /**
1865
- * @minLength 1
1866
- */
1867
- databaseName: string;
1868
- branchName?: string;
1869
- status: MigrationStatus;
1870
- };
1871
- declare type DEPRECATEDcreateDatabaseRequestBody = {
1872
- /**
1873
- * @minLength 1
1874
- */
1875
- branchName?: string;
1876
- ui?: {
1877
- color?: string;
1878
- };
1879
- metadata?: BranchMetadata;
1880
- };
1881
- declare type DEPRECATEDcreateDatabaseVariables = {
1882
- body?: DEPRECATEDcreateDatabaseRequestBody;
1883
- pathParams: DEPRECATEDcreateDatabasePathParams;
1884
- } & DataPlaneFetcherExtraProps;
1885
- /**
1886
- * Create Database with identifier name
1887
- */
1888
- declare const dEPRECATEDcreateDatabase: (variables: DEPRECATEDcreateDatabaseVariables, signal?: AbortSignal) => Promise<DEPRECATEDcreateDatabaseResponse>;
1889
- declare type DEPRECATEDdeleteDatabasePathParams = {
1890
- /**
1891
- * The Database Name
1892
- */
1893
- dbName: DBName;
1894
- workspace: string;
1895
- region: string;
1896
- };
1897
- declare type DEPRECATEDdeleteDatabaseError = ErrorWrapper<{
1898
- status: 400;
1899
- payload: BadRequestError;
1900
- } | {
1901
- status: 401;
1902
- payload: AuthError;
1903
- } | {
1904
- status: 404;
1905
- payload: SimpleError;
1906
- }>;
1907
- declare type DEPRECATEDdeleteDatabaseResponse = {
1908
- status: MigrationStatus;
1909
- };
1910
- declare type DEPRECATEDdeleteDatabaseVariables = {
1911
- pathParams: DEPRECATEDdeleteDatabasePathParams;
1912
- } & DataPlaneFetcherExtraProps;
1913
- /**
1914
- * Delete a database and all of its branches and tables permanently.
1915
- */
1916
- declare const dEPRECATEDdeleteDatabase: (variables: DEPRECATEDdeleteDatabaseVariables, signal?: AbortSignal) => Promise<DEPRECATEDdeleteDatabaseResponse>;
1917
- declare type DEPRECATEDgetDatabaseMetadataPathParams = {
1918
- /**
1919
- * The Database Name
1920
- */
1921
- dbName: DBName;
1922
- workspace: string;
1923
- region: string;
1924
- };
1925
- declare type DEPRECATEDgetDatabaseMetadataError = ErrorWrapper<{
1926
- status: 400;
1927
- payload: BadRequestError;
1928
- } | {
1929
- status: 401;
1930
- payload: AuthError;
1931
- } | {
1932
- status: 404;
1933
- payload: SimpleError;
1934
- }>;
1935
- declare type DEPRECATEDgetDatabaseMetadataVariables = {
1936
- pathParams: DEPRECATEDgetDatabaseMetadataPathParams;
1937
- } & DataPlaneFetcherExtraProps;
1938
- /**
1939
- * Retrieve metadata of the given database
1940
- */
1941
- declare const dEPRECATEDgetDatabaseMetadata: (variables: DEPRECATEDgetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DEPRECATEDDatabaseMetadata>;
1942
- declare type DEPRECATEDupdateDatabaseMetadataPathParams = {
1943
- /**
1944
- * The Database Name
1945
- */
1946
- dbName: DBName;
1947
- workspace: string;
1948
- region: string;
1949
- };
1950
- declare type DEPRECATEDupdateDatabaseMetadataError = ErrorWrapper<{
1951
- status: 400;
1952
- payload: BadRequestError;
1953
- } | {
1954
- status: 401;
1955
- payload: AuthError;
1956
- } | {
1957
- status: 404;
1958
- payload: SimpleError;
1959
- }>;
1960
- declare type DEPRECATEDupdateDatabaseMetadataRequestBody = {
1961
- ui?: {
1962
- /**
1963
- * @minLength 1
1964
- */
1965
- color?: string;
1966
- };
1967
- };
1968
- declare type DEPRECATEDupdateDatabaseMetadataVariables = {
1969
- body?: DEPRECATEDupdateDatabaseMetadataRequestBody;
1970
- pathParams: DEPRECATEDupdateDatabaseMetadataPathParams;
1971
- } & DataPlaneFetcherExtraProps;
1972
- /**
1973
- * Update the color of the selected database
1974
- */
1975
- declare const dEPRECATEDupdateDatabaseMetadata: (variables: DEPRECATEDupdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DEPRECATEDDatabaseMetadata>;
1976
- declare type GetBranchDetailsPathParams = {
2050
+ type GetBranchDetailsPathParams = {
1977
2051
  /**
1978
2052
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
1979
2053
  */
@@ -1981,7 +2055,7 @@ declare type GetBranchDetailsPathParams = {
1981
2055
  workspace: string;
1982
2056
  region: string;
1983
2057
  };
1984
- declare type GetBranchDetailsError = ErrorWrapper<{
2058
+ type GetBranchDetailsError = ErrorWrapper<{
1985
2059
  status: 400;
1986
2060
  payload: BadRequestError;
1987
2061
  } | {
@@ -1991,11 +2065,11 @@ declare type GetBranchDetailsError = ErrorWrapper<{
1991
2065
  status: 404;
1992
2066
  payload: SimpleError;
1993
2067
  }>;
1994
- declare type GetBranchDetailsVariables = {
2068
+ type GetBranchDetailsVariables = {
1995
2069
  pathParams: GetBranchDetailsPathParams;
1996
2070
  } & DataPlaneFetcherExtraProps;
1997
2071
  declare const getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal) => Promise<DBBranch>;
1998
- declare type CreateBranchPathParams = {
2072
+ type CreateBranchPathParams = {
1999
2073
  /**
2000
2074
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2001
2075
  */
@@ -2003,13 +2077,13 @@ declare type CreateBranchPathParams = {
2003
2077
  workspace: string;
2004
2078
  region: string;
2005
2079
  };
2006
- declare type CreateBranchQueryParams = {
2080
+ type CreateBranchQueryParams = {
2007
2081
  /**
2008
2082
  * Name of source branch to branch the new schema from
2009
2083
  */
2010
2084
  from?: string;
2011
2085
  };
2012
- declare type CreateBranchError = ErrorWrapper<{
2086
+ type CreateBranchError = ErrorWrapper<{
2013
2087
  status: 400;
2014
2088
  payload: BadRequestError;
2015
2089
  } | {
@@ -2018,8 +2092,11 @@ declare type CreateBranchError = ErrorWrapper<{
2018
2092
  } | {
2019
2093
  status: 404;
2020
2094
  payload: SimpleError;
2095
+ } | {
2096
+ status: 423;
2097
+ payload: SimpleError;
2021
2098
  }>;
2022
- declare type CreateBranchResponse = {
2099
+ type CreateBranchResponse = {
2023
2100
  /**
2024
2101
  * @minLength 1
2025
2102
  */
@@ -2027,20 +2104,20 @@ declare type CreateBranchResponse = {
2027
2104
  branchName: string;
2028
2105
  status: MigrationStatus;
2029
2106
  };
2030
- declare type CreateBranchRequestBody = {
2107
+ type CreateBranchRequestBody = {
2031
2108
  /**
2032
2109
  * Select the branch to fork from. Defaults to 'main'
2033
2110
  */
2034
2111
  from?: string;
2035
2112
  metadata?: BranchMetadata;
2036
2113
  };
2037
- declare type CreateBranchVariables = {
2114
+ type CreateBranchVariables = {
2038
2115
  body?: CreateBranchRequestBody;
2039
2116
  pathParams: CreateBranchPathParams;
2040
2117
  queryParams?: CreateBranchQueryParams;
2041
2118
  } & DataPlaneFetcherExtraProps;
2042
2119
  declare const createBranch: (variables: CreateBranchVariables, signal?: AbortSignal) => Promise<CreateBranchResponse>;
2043
- declare type DeleteBranchPathParams = {
2120
+ type DeleteBranchPathParams = {
2044
2121
  /**
2045
2122
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2046
2123
  */
@@ -2048,7 +2125,7 @@ declare type DeleteBranchPathParams = {
2048
2125
  workspace: string;
2049
2126
  region: string;
2050
2127
  };
2051
- declare type DeleteBranchError = ErrorWrapper<{
2128
+ type DeleteBranchError = ErrorWrapper<{
2052
2129
  status: 400;
2053
2130
  payload: BadRequestError;
2054
2131
  } | {
@@ -2057,18 +2134,21 @@ declare type DeleteBranchError = ErrorWrapper<{
2057
2134
  } | {
2058
2135
  status: 404;
2059
2136
  payload: SimpleError;
2137
+ } | {
2138
+ status: 409;
2139
+ payload: SimpleError;
2060
2140
  }>;
2061
- declare type DeleteBranchResponse = {
2141
+ type DeleteBranchResponse = {
2062
2142
  status: MigrationStatus;
2063
2143
  };
2064
- declare type DeleteBranchVariables = {
2144
+ type DeleteBranchVariables = {
2065
2145
  pathParams: DeleteBranchPathParams;
2066
2146
  } & DataPlaneFetcherExtraProps;
2067
2147
  /**
2068
2148
  * Delete the branch in the database and all its resources
2069
2149
  */
2070
2150
  declare const deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<DeleteBranchResponse>;
2071
- declare type UpdateBranchMetadataPathParams = {
2151
+ type UpdateBranchMetadataPathParams = {
2072
2152
  /**
2073
2153
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2074
2154
  */
@@ -2076,7 +2156,7 @@ declare type UpdateBranchMetadataPathParams = {
2076
2156
  workspace: string;
2077
2157
  region: string;
2078
2158
  };
2079
- declare type UpdateBranchMetadataError = ErrorWrapper<{
2159
+ type UpdateBranchMetadataError = ErrorWrapper<{
2080
2160
  status: 400;
2081
2161
  payload: BadRequestError;
2082
2162
  } | {
@@ -2086,7 +2166,7 @@ declare type UpdateBranchMetadataError = ErrorWrapper<{
2086
2166
  status: 404;
2087
2167
  payload: SimpleError;
2088
2168
  }>;
2089
- declare type UpdateBranchMetadataVariables = {
2169
+ type UpdateBranchMetadataVariables = {
2090
2170
  body?: BranchMetadata;
2091
2171
  pathParams: UpdateBranchMetadataPathParams;
2092
2172
  } & DataPlaneFetcherExtraProps;
@@ -2094,7 +2174,7 @@ declare type UpdateBranchMetadataVariables = {
2094
2174
  * Update the branch metadata
2095
2175
  */
2096
2176
  declare const updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal) => Promise<undefined>;
2097
- declare type GetBranchMetadataPathParams = {
2177
+ type GetBranchMetadataPathParams = {
2098
2178
  /**
2099
2179
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2100
2180
  */
@@ -2102,7 +2182,7 @@ declare type GetBranchMetadataPathParams = {
2102
2182
  workspace: string;
2103
2183
  region: string;
2104
2184
  };
2105
- declare type GetBranchMetadataError = ErrorWrapper<{
2185
+ type GetBranchMetadataError = ErrorWrapper<{
2106
2186
  status: 400;
2107
2187
  payload: BadRequestError;
2108
2188
  } | {
@@ -2112,11 +2192,11 @@ declare type GetBranchMetadataError = ErrorWrapper<{
2112
2192
  status: 404;
2113
2193
  payload: SimpleError;
2114
2194
  }>;
2115
- declare type GetBranchMetadataVariables = {
2195
+ type GetBranchMetadataVariables = {
2116
2196
  pathParams: GetBranchMetadataPathParams;
2117
2197
  } & DataPlaneFetcherExtraProps;
2118
2198
  declare const getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal) => Promise<BranchMetadata>;
2119
- declare type GetBranchStatsPathParams = {
2199
+ type GetBranchStatsPathParams = {
2120
2200
  /**
2121
2201
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2122
2202
  */
@@ -2124,7 +2204,7 @@ declare type GetBranchStatsPathParams = {
2124
2204
  workspace: string;
2125
2205
  region: string;
2126
2206
  };
2127
- declare type GetBranchStatsError = ErrorWrapper<{
2207
+ type GetBranchStatsError = ErrorWrapper<{
2128
2208
  status: 400;
2129
2209
  payload: SimpleError;
2130
2210
  } | {
@@ -2134,7 +2214,7 @@ declare type GetBranchStatsError = ErrorWrapper<{
2134
2214
  status: 404;
2135
2215
  payload: SimpleError;
2136
2216
  }>;
2137
- declare type GetBranchStatsResponse = {
2217
+ type GetBranchStatsResponse = {
2138
2218
  timestamp: string;
2139
2219
  interval: string;
2140
2220
  resolution: string;
@@ -2145,14 +2225,14 @@ declare type GetBranchStatsResponse = {
2145
2225
  writeLatency?: MetricsLatency;
2146
2226
  warning?: string;
2147
2227
  };
2148
- declare type GetBranchStatsVariables = {
2228
+ type GetBranchStatsVariables = {
2149
2229
  pathParams: GetBranchStatsPathParams;
2150
2230
  } & DataPlaneFetcherExtraProps;
2151
2231
  /**
2152
2232
  * Get branch usage metrics.
2153
2233
  */
2154
2234
  declare const getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal) => Promise<GetBranchStatsResponse>;
2155
- declare type GetGitBranchesMappingPathParams = {
2235
+ type GetGitBranchesMappingPathParams = {
2156
2236
  /**
2157
2237
  * The Database Name
2158
2238
  */
@@ -2160,14 +2240,14 @@ declare type GetGitBranchesMappingPathParams = {
2160
2240
  workspace: string;
2161
2241
  region: string;
2162
2242
  };
2163
- declare type GetGitBranchesMappingError = ErrorWrapper<{
2243
+ type GetGitBranchesMappingError = ErrorWrapper<{
2164
2244
  status: 400;
2165
2245
  payload: BadRequestError;
2166
2246
  } | {
2167
2247
  status: 401;
2168
2248
  payload: AuthError;
2169
2249
  }>;
2170
- declare type GetGitBranchesMappingVariables = {
2250
+ type GetGitBranchesMappingVariables = {
2171
2251
  pathParams: GetGitBranchesMappingPathParams;
2172
2252
  } & DataPlaneFetcherExtraProps;
2173
2253
  /**
@@ -2195,7 +2275,7 @@ declare type GetGitBranchesMappingVariables = {
2195
2275
  * ```
2196
2276
  */
2197
2277
  declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables, signal?: AbortSignal) => Promise<ListGitBranchesResponse>;
2198
- declare type AddGitBranchesEntryPathParams = {
2278
+ type AddGitBranchesEntryPathParams = {
2199
2279
  /**
2200
2280
  * The Database Name
2201
2281
  */
@@ -2203,20 +2283,20 @@ declare type AddGitBranchesEntryPathParams = {
2203
2283
  workspace: string;
2204
2284
  region: string;
2205
2285
  };
2206
- declare type AddGitBranchesEntryError = ErrorWrapper<{
2286
+ type AddGitBranchesEntryError = ErrorWrapper<{
2207
2287
  status: 400;
2208
2288
  payload: BadRequestError;
2209
2289
  } | {
2210
2290
  status: 401;
2211
2291
  payload: AuthError;
2212
2292
  }>;
2213
- declare type AddGitBranchesEntryResponse = {
2293
+ type AddGitBranchesEntryResponse = {
2214
2294
  /**
2215
2295
  * Warning message
2216
2296
  */
2217
2297
  warning?: string;
2218
2298
  };
2219
- declare type AddGitBranchesEntryRequestBody = {
2299
+ type AddGitBranchesEntryRequestBody = {
2220
2300
  /**
2221
2301
  * The name of the Git branch.
2222
2302
  */
@@ -2226,7 +2306,7 @@ declare type AddGitBranchesEntryRequestBody = {
2226
2306
  */
2227
2307
  xataBranch: BranchName;
2228
2308
  };
2229
- declare type AddGitBranchesEntryVariables = {
2309
+ type AddGitBranchesEntryVariables = {
2230
2310
  body: AddGitBranchesEntryRequestBody;
2231
2311
  pathParams: AddGitBranchesEntryPathParams;
2232
2312
  } & DataPlaneFetcherExtraProps;
@@ -2246,7 +2326,7 @@ declare type AddGitBranchesEntryVariables = {
2246
2326
  * ```
2247
2327
  */
2248
2328
  declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables, signal?: AbortSignal) => Promise<AddGitBranchesEntryResponse>;
2249
- declare type RemoveGitBranchesEntryPathParams = {
2329
+ type RemoveGitBranchesEntryPathParams = {
2250
2330
  /**
2251
2331
  * The Database Name
2252
2332
  */
@@ -2254,20 +2334,20 @@ declare type RemoveGitBranchesEntryPathParams = {
2254
2334
  workspace: string;
2255
2335
  region: string;
2256
2336
  };
2257
- declare type RemoveGitBranchesEntryQueryParams = {
2337
+ type RemoveGitBranchesEntryQueryParams = {
2258
2338
  /**
2259
2339
  * The Git Branch to remove from the mapping
2260
2340
  */
2261
2341
  gitBranch: string;
2262
2342
  };
2263
- declare type RemoveGitBranchesEntryError = ErrorWrapper<{
2343
+ type RemoveGitBranchesEntryError = ErrorWrapper<{
2264
2344
  status: 400;
2265
2345
  payload: BadRequestError;
2266
2346
  } | {
2267
2347
  status: 401;
2268
2348
  payload: AuthError;
2269
2349
  }>;
2270
- declare type RemoveGitBranchesEntryVariables = {
2350
+ type RemoveGitBranchesEntryVariables = {
2271
2351
  pathParams: RemoveGitBranchesEntryPathParams;
2272
2352
  queryParams: RemoveGitBranchesEntryQueryParams;
2273
2353
  } & DataPlaneFetcherExtraProps;
@@ -2281,7 +2361,7 @@ declare type RemoveGitBranchesEntryVariables = {
2281
2361
  * ```
2282
2362
  */
2283
2363
  declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal) => Promise<undefined>;
2284
- declare type ResolveBranchPathParams = {
2364
+ type ResolveBranchPathParams = {
2285
2365
  /**
2286
2366
  * The Database Name
2287
2367
  */
@@ -2289,7 +2369,7 @@ declare type ResolveBranchPathParams = {
2289
2369
  workspace: string;
2290
2370
  region: string;
2291
2371
  };
2292
- declare type ResolveBranchQueryParams = {
2372
+ type ResolveBranchQueryParams = {
2293
2373
  /**
2294
2374
  * The Git Branch
2295
2375
  */
@@ -2299,21 +2379,21 @@ declare type ResolveBranchQueryParams = {
2299
2379
  */
2300
2380
  fallbackBranch?: string;
2301
2381
  };
2302
- declare type ResolveBranchError = ErrorWrapper<{
2382
+ type ResolveBranchError = ErrorWrapper<{
2303
2383
  status: 400;
2304
2384
  payload: BadRequestError;
2305
2385
  } | {
2306
2386
  status: 401;
2307
2387
  payload: AuthError;
2308
2388
  }>;
2309
- declare type ResolveBranchResponse = {
2389
+ type ResolveBranchResponse = {
2310
2390
  branch: string;
2311
2391
  reason: {
2312
2392
  code: 'FOUND_IN_MAPPING' | 'BRANCH_EXISTS' | 'FALLBACK_BRANCH' | 'DEFAULT_BRANCH';
2313
2393
  message: string;
2314
2394
  };
2315
2395
  };
2316
- declare type ResolveBranchVariables = {
2396
+ type ResolveBranchVariables = {
2317
2397
  pathParams: ResolveBranchPathParams;
2318
2398
  queryParams?: ResolveBranchQueryParams;
2319
2399
  } & DataPlaneFetcherExtraProps;
@@ -2343,7 +2423,7 @@ declare type ResolveBranchVariables = {
2343
2423
  * ```
2344
2424
  */
2345
2425
  declare const resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal) => Promise<ResolveBranchResponse>;
2346
- declare type GetBranchMigrationHistoryPathParams = {
2426
+ type GetBranchMigrationHistoryPathParams = {
2347
2427
  /**
2348
2428
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2349
2429
  */
@@ -2351,7 +2431,7 @@ declare type GetBranchMigrationHistoryPathParams = {
2351
2431
  workspace: string;
2352
2432
  region: string;
2353
2433
  };
2354
- declare type GetBranchMigrationHistoryError = ErrorWrapper<{
2434
+ type GetBranchMigrationHistoryError = ErrorWrapper<{
2355
2435
  status: 400;
2356
2436
  payload: BadRequestError;
2357
2437
  } | {
@@ -2361,20 +2441,20 @@ declare type GetBranchMigrationHistoryError = ErrorWrapper<{
2361
2441
  status: 404;
2362
2442
  payload: SimpleError;
2363
2443
  }>;
2364
- declare type GetBranchMigrationHistoryResponse = {
2444
+ type GetBranchMigrationHistoryResponse = {
2365
2445
  startedFrom?: StartedFromMetadata;
2366
2446
  migrations?: BranchMigration[];
2367
2447
  };
2368
- declare type GetBranchMigrationHistoryRequestBody = {
2448
+ type GetBranchMigrationHistoryRequestBody = {
2369
2449
  limit?: number;
2370
2450
  startFrom?: string;
2371
2451
  };
2372
- declare type GetBranchMigrationHistoryVariables = {
2452
+ type GetBranchMigrationHistoryVariables = {
2373
2453
  body?: GetBranchMigrationHistoryRequestBody;
2374
2454
  pathParams: GetBranchMigrationHistoryPathParams;
2375
2455
  } & DataPlaneFetcherExtraProps;
2376
2456
  declare const getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal) => Promise<GetBranchMigrationHistoryResponse>;
2377
- declare type GetBranchMigrationPlanPathParams = {
2457
+ type GetBranchMigrationPlanPathParams = {
2378
2458
  /**
2379
2459
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2380
2460
  */
@@ -2382,7 +2462,7 @@ declare type GetBranchMigrationPlanPathParams = {
2382
2462
  workspace: string;
2383
2463
  region: string;
2384
2464
  };
2385
- declare type GetBranchMigrationPlanError = ErrorWrapper<{
2465
+ type GetBranchMigrationPlanError = ErrorWrapper<{
2386
2466
  status: 400;
2387
2467
  payload: BadRequestError;
2388
2468
  } | {
@@ -2392,7 +2472,7 @@ declare type GetBranchMigrationPlanError = ErrorWrapper<{
2392
2472
  status: 404;
2393
2473
  payload: SimpleError;
2394
2474
  }>;
2395
- declare type GetBranchMigrationPlanVariables = {
2475
+ type GetBranchMigrationPlanVariables = {
2396
2476
  body: Schema;
2397
2477
  pathParams: GetBranchMigrationPlanPathParams;
2398
2478
  } & DataPlaneFetcherExtraProps;
@@ -2400,7 +2480,7 @@ declare type GetBranchMigrationPlanVariables = {
2400
2480
  * Compute a migration plan from a target schema the branch should be migrated too.
2401
2481
  */
2402
2482
  declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<BranchMigrationPlan>;
2403
- declare type ExecuteBranchMigrationPlanPathParams = {
2483
+ type ExecuteBranchMigrationPlanPathParams = {
2404
2484
  /**
2405
2485
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2406
2486
  */
@@ -2408,7 +2488,7 @@ declare type ExecuteBranchMigrationPlanPathParams = {
2408
2488
  workspace: string;
2409
2489
  region: string;
2410
2490
  };
2411
- declare type ExecuteBranchMigrationPlanError = ErrorWrapper<{
2491
+ type ExecuteBranchMigrationPlanError = ErrorWrapper<{
2412
2492
  status: 400;
2413
2493
  payload: BadRequestError;
2414
2494
  } | {
@@ -2418,11 +2498,11 @@ declare type ExecuteBranchMigrationPlanError = ErrorWrapper<{
2418
2498
  status: 404;
2419
2499
  payload: SimpleError;
2420
2500
  }>;
2421
- declare type ExecuteBranchMigrationPlanRequestBody = {
2501
+ type ExecuteBranchMigrationPlanRequestBody = {
2422
2502
  version: number;
2423
2503
  migration: BranchMigration;
2424
2504
  };
2425
- declare type ExecuteBranchMigrationPlanVariables = {
2505
+ type ExecuteBranchMigrationPlanVariables = {
2426
2506
  body: ExecuteBranchMigrationPlanRequestBody;
2427
2507
  pathParams: ExecuteBranchMigrationPlanPathParams;
2428
2508
  } & DataPlaneFetcherExtraProps;
@@ -2430,7 +2510,33 @@ declare type ExecuteBranchMigrationPlanVariables = {
2430
2510
  * Apply a migration plan to the branch
2431
2511
  */
2432
2512
  declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
2433
- declare type QueryMigrationRequestsPathParams = {
2513
+ type BranchTransactionPathParams = {
2514
+ /**
2515
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2516
+ */
2517
+ dbBranchName: DBBranchName;
2518
+ workspace: string;
2519
+ region: string;
2520
+ };
2521
+ type BranchTransactionError = ErrorWrapper<{
2522
+ status: 400;
2523
+ payload: TransactionFailure;
2524
+ } | {
2525
+ status: 401;
2526
+ payload: AuthError;
2527
+ } | {
2528
+ status: 404;
2529
+ payload: SimpleError;
2530
+ }>;
2531
+ type BranchTransactionRequestBody = {
2532
+ operations: TransactionOperation$1[];
2533
+ };
2534
+ type BranchTransactionVariables = {
2535
+ body: BranchTransactionRequestBody;
2536
+ pathParams: BranchTransactionPathParams;
2537
+ } & DataPlaneFetcherExtraProps;
2538
+ declare const branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
2539
+ type QueryMigrationRequestsPathParams = {
2434
2540
  /**
2435
2541
  * The Database Name
2436
2542
  */
@@ -2438,7 +2544,7 @@ declare type QueryMigrationRequestsPathParams = {
2438
2544
  workspace: string;
2439
2545
  region: string;
2440
2546
  };
2441
- declare type QueryMigrationRequestsError = ErrorWrapper<{
2547
+ type QueryMigrationRequestsError = ErrorWrapper<{
2442
2548
  status: 400;
2443
2549
  payload: BadRequestError;
2444
2550
  } | {
@@ -2448,22 +2554,22 @@ declare type QueryMigrationRequestsError = ErrorWrapper<{
2448
2554
  status: 404;
2449
2555
  payload: SimpleError;
2450
2556
  }>;
2451
- declare type QueryMigrationRequestsResponse = {
2557
+ type QueryMigrationRequestsResponse = {
2452
2558
  migrationRequests: MigrationRequest[];
2453
2559
  meta: RecordsMetadata;
2454
2560
  };
2455
- declare type QueryMigrationRequestsRequestBody = {
2561
+ type QueryMigrationRequestsRequestBody = {
2456
2562
  filter?: FilterExpression;
2457
2563
  sort?: SortExpression;
2458
2564
  page?: PageConfig;
2459
2565
  columns?: ColumnsProjection;
2460
2566
  };
2461
- declare type QueryMigrationRequestsVariables = {
2567
+ type QueryMigrationRequestsVariables = {
2462
2568
  body?: QueryMigrationRequestsRequestBody;
2463
2569
  pathParams: QueryMigrationRequestsPathParams;
2464
2570
  } & DataPlaneFetcherExtraProps;
2465
2571
  declare const queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal) => Promise<QueryMigrationRequestsResponse>;
2466
- declare type CreateMigrationRequestPathParams = {
2572
+ type CreateMigrationRequestPathParams = {
2467
2573
  /**
2468
2574
  * The Database Name
2469
2575
  */
@@ -2471,7 +2577,7 @@ declare type CreateMigrationRequestPathParams = {
2471
2577
  workspace: string;
2472
2578
  region: string;
2473
2579
  };
2474
- declare type CreateMigrationRequestError = ErrorWrapper<{
2580
+ type CreateMigrationRequestError = ErrorWrapper<{
2475
2581
  status: 400;
2476
2582
  payload: BadRequestError;
2477
2583
  } | {
@@ -2481,10 +2587,10 @@ declare type CreateMigrationRequestError = ErrorWrapper<{
2481
2587
  status: 404;
2482
2588
  payload: SimpleError;
2483
2589
  }>;
2484
- declare type CreateMigrationRequestResponse = {
2590
+ type CreateMigrationRequestResponse = {
2485
2591
  number: number;
2486
2592
  };
2487
- declare type CreateMigrationRequestRequestBody = {
2593
+ type CreateMigrationRequestRequestBody = {
2488
2594
  /**
2489
2595
  * The source branch.
2490
2596
  */
@@ -2502,12 +2608,12 @@ declare type CreateMigrationRequestRequestBody = {
2502
2608
  */
2503
2609
  body?: string;
2504
2610
  };
2505
- declare type CreateMigrationRequestVariables = {
2611
+ type CreateMigrationRequestVariables = {
2506
2612
  body: CreateMigrationRequestRequestBody;
2507
2613
  pathParams: CreateMigrationRequestPathParams;
2508
2614
  } & DataPlaneFetcherExtraProps;
2509
2615
  declare const createMigrationRequest: (variables: CreateMigrationRequestVariables, signal?: AbortSignal) => Promise<CreateMigrationRequestResponse>;
2510
- declare type GetMigrationRequestPathParams = {
2616
+ type GetMigrationRequestPathParams = {
2511
2617
  /**
2512
2618
  * The Database Name
2513
2619
  */
@@ -2519,7 +2625,7 @@ declare type GetMigrationRequestPathParams = {
2519
2625
  workspace: string;
2520
2626
  region: string;
2521
2627
  };
2522
- declare type GetMigrationRequestError = ErrorWrapper<{
2628
+ type GetMigrationRequestError = ErrorWrapper<{
2523
2629
  status: 400;
2524
2630
  payload: BadRequestError;
2525
2631
  } | {
@@ -2529,11 +2635,11 @@ declare type GetMigrationRequestError = ErrorWrapper<{
2529
2635
  status: 404;
2530
2636
  payload: SimpleError;
2531
2637
  }>;
2532
- declare type GetMigrationRequestVariables = {
2638
+ type GetMigrationRequestVariables = {
2533
2639
  pathParams: GetMigrationRequestPathParams;
2534
2640
  } & DataPlaneFetcherExtraProps;
2535
2641
  declare const getMigrationRequest: (variables: GetMigrationRequestVariables, signal?: AbortSignal) => Promise<MigrationRequest>;
2536
- declare type UpdateMigrationRequestPathParams = {
2642
+ type UpdateMigrationRequestPathParams = {
2537
2643
  /**
2538
2644
  * The Database Name
2539
2645
  */
@@ -2545,7 +2651,7 @@ declare type UpdateMigrationRequestPathParams = {
2545
2651
  workspace: string;
2546
2652
  region: string;
2547
2653
  };
2548
- declare type UpdateMigrationRequestError = ErrorWrapper<{
2654
+ type UpdateMigrationRequestError = ErrorWrapper<{
2549
2655
  status: 400;
2550
2656
  payload: BadRequestError;
2551
2657
  } | {
@@ -2555,7 +2661,7 @@ declare type UpdateMigrationRequestError = ErrorWrapper<{
2555
2661
  status: 404;
2556
2662
  payload: SimpleError;
2557
2663
  }>;
2558
- declare type UpdateMigrationRequestRequestBody = {
2664
+ type UpdateMigrationRequestRequestBody = {
2559
2665
  /**
2560
2666
  * New migration request title.
2561
2667
  */
@@ -2569,12 +2675,12 @@ declare type UpdateMigrationRequestRequestBody = {
2569
2675
  */
2570
2676
  status?: 'open' | 'closed';
2571
2677
  };
2572
- declare type UpdateMigrationRequestVariables = {
2678
+ type UpdateMigrationRequestVariables = {
2573
2679
  body?: UpdateMigrationRequestRequestBody;
2574
2680
  pathParams: UpdateMigrationRequestPathParams;
2575
2681
  } & DataPlaneFetcherExtraProps;
2576
2682
  declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables, signal?: AbortSignal) => Promise<undefined>;
2577
- declare type ListMigrationRequestsCommitsPathParams = {
2683
+ type ListMigrationRequestsCommitsPathParams = {
2578
2684
  /**
2579
2685
  * The Database Name
2580
2686
  */
@@ -2586,7 +2692,7 @@ declare type ListMigrationRequestsCommitsPathParams = {
2586
2692
  workspace: string;
2587
2693
  region: string;
2588
2694
  };
2589
- declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
2695
+ type ListMigrationRequestsCommitsError = ErrorWrapper<{
2590
2696
  status: 400;
2591
2697
  payload: BadRequestError;
2592
2698
  } | {
@@ -2596,7 +2702,7 @@ declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
2596
2702
  status: 404;
2597
2703
  payload: SimpleError;
2598
2704
  }>;
2599
- declare type ListMigrationRequestsCommitsResponse = {
2705
+ type ListMigrationRequestsCommitsResponse = {
2600
2706
  meta: {
2601
2707
  /**
2602
2708
  * last record id
@@ -2609,7 +2715,7 @@ declare type ListMigrationRequestsCommitsResponse = {
2609
2715
  };
2610
2716
  logs: Commit[];
2611
2717
  };
2612
- declare type ListMigrationRequestsCommitsRequestBody = {
2718
+ type ListMigrationRequestsCommitsRequestBody = {
2613
2719
  page?: {
2614
2720
  /**
2615
2721
  * Query the next page that follow the cursor.
@@ -2627,12 +2733,12 @@ declare type ListMigrationRequestsCommitsRequestBody = {
2627
2733
  size?: number;
2628
2734
  };
2629
2735
  };
2630
- declare type ListMigrationRequestsCommitsVariables = {
2736
+ type ListMigrationRequestsCommitsVariables = {
2631
2737
  body?: ListMigrationRequestsCommitsRequestBody;
2632
2738
  pathParams: ListMigrationRequestsCommitsPathParams;
2633
2739
  } & DataPlaneFetcherExtraProps;
2634
2740
  declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal) => Promise<ListMigrationRequestsCommitsResponse>;
2635
- declare type CompareMigrationRequestPathParams = {
2741
+ type CompareMigrationRequestPathParams = {
2636
2742
  /**
2637
2743
  * The Database Name
2638
2744
  */
@@ -2644,7 +2750,7 @@ declare type CompareMigrationRequestPathParams = {
2644
2750
  workspace: string;
2645
2751
  region: string;
2646
2752
  };
2647
- declare type CompareMigrationRequestError = ErrorWrapper<{
2753
+ type CompareMigrationRequestError = ErrorWrapper<{
2648
2754
  status: 400;
2649
2755
  payload: BadRequestError;
2650
2756
  } | {
@@ -2654,11 +2760,11 @@ declare type CompareMigrationRequestError = ErrorWrapper<{
2654
2760
  status: 404;
2655
2761
  payload: SimpleError;
2656
2762
  }>;
2657
- declare type CompareMigrationRequestVariables = {
2763
+ type CompareMigrationRequestVariables = {
2658
2764
  pathParams: CompareMigrationRequestPathParams;
2659
2765
  } & DataPlaneFetcherExtraProps;
2660
2766
  declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
2661
- declare type GetMigrationRequestIsMergedPathParams = {
2767
+ type GetMigrationRequestIsMergedPathParams = {
2662
2768
  /**
2663
2769
  * The Database Name
2664
2770
  */
@@ -2670,7 +2776,7 @@ declare type GetMigrationRequestIsMergedPathParams = {
2670
2776
  workspace: string;
2671
2777
  region: string;
2672
2778
  };
2673
- declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
2779
+ type GetMigrationRequestIsMergedError = ErrorWrapper<{
2674
2780
  status: 400;
2675
2781
  payload: BadRequestError;
2676
2782
  } | {
@@ -2680,14 +2786,14 @@ declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
2680
2786
  status: 404;
2681
2787
  payload: SimpleError;
2682
2788
  }>;
2683
- declare type GetMigrationRequestIsMergedResponse = {
2789
+ type GetMigrationRequestIsMergedResponse = {
2684
2790
  merged?: boolean;
2685
2791
  };
2686
- declare type GetMigrationRequestIsMergedVariables = {
2792
+ type GetMigrationRequestIsMergedVariables = {
2687
2793
  pathParams: GetMigrationRequestIsMergedPathParams;
2688
2794
  } & DataPlaneFetcherExtraProps;
2689
2795
  declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal) => Promise<GetMigrationRequestIsMergedResponse>;
2690
- declare type MergeMigrationRequestPathParams = {
2796
+ type MergeMigrationRequestPathParams = {
2691
2797
  /**
2692
2798
  * The Database Name
2693
2799
  */
@@ -2699,7 +2805,7 @@ declare type MergeMigrationRequestPathParams = {
2699
2805
  workspace: string;
2700
2806
  region: string;
2701
2807
  };
2702
- declare type MergeMigrationRequestError = ErrorWrapper<{
2808
+ type MergeMigrationRequestError = ErrorWrapper<{
2703
2809
  status: 400;
2704
2810
  payload: BadRequestError;
2705
2811
  } | {
@@ -2709,11 +2815,11 @@ declare type MergeMigrationRequestError = ErrorWrapper<{
2709
2815
  status: 404;
2710
2816
  payload: SimpleError;
2711
2817
  }>;
2712
- declare type MergeMigrationRequestVariables = {
2818
+ type MergeMigrationRequestVariables = {
2713
2819
  pathParams: MergeMigrationRequestPathParams;
2714
2820
  } & DataPlaneFetcherExtraProps;
2715
2821
  declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<Commit>;
2716
- declare type GetBranchSchemaHistoryPathParams = {
2822
+ type GetBranchSchemaHistoryPathParams = {
2717
2823
  /**
2718
2824
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2719
2825
  */
@@ -2721,7 +2827,7 @@ declare type GetBranchSchemaHistoryPathParams = {
2721
2827
  workspace: string;
2722
2828
  region: string;
2723
2829
  };
2724
- declare type GetBranchSchemaHistoryError = ErrorWrapper<{
2830
+ type GetBranchSchemaHistoryError = ErrorWrapper<{
2725
2831
  status: 400;
2726
2832
  payload: BadRequestError;
2727
2833
  } | {
@@ -2731,7 +2837,7 @@ declare type GetBranchSchemaHistoryError = ErrorWrapper<{
2731
2837
  status: 404;
2732
2838
  payload: SimpleError;
2733
2839
  }>;
2734
- declare type GetBranchSchemaHistoryResponse = {
2840
+ type GetBranchSchemaHistoryResponse = {
2735
2841
  meta: {
2736
2842
  /**
2737
2843
  * last record id
@@ -2744,7 +2850,7 @@ declare type GetBranchSchemaHistoryResponse = {
2744
2850
  };
2745
2851
  logs: Commit[];
2746
2852
  };
2747
- declare type GetBranchSchemaHistoryRequestBody = {
2853
+ type GetBranchSchemaHistoryRequestBody = {
2748
2854
  page?: {
2749
2855
  /**
2750
2856
  * Query the next page that follow the cursor.
@@ -2762,12 +2868,12 @@ declare type GetBranchSchemaHistoryRequestBody = {
2762
2868
  size?: number;
2763
2869
  };
2764
2870
  };
2765
- declare type GetBranchSchemaHistoryVariables = {
2871
+ type GetBranchSchemaHistoryVariables = {
2766
2872
  body?: GetBranchSchemaHistoryRequestBody;
2767
2873
  pathParams: GetBranchSchemaHistoryPathParams;
2768
2874
  } & DataPlaneFetcherExtraProps;
2769
2875
  declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables, signal?: AbortSignal) => Promise<GetBranchSchemaHistoryResponse>;
2770
- declare type CompareBranchWithUserSchemaPathParams = {
2876
+ type CompareBranchWithUserSchemaPathParams = {
2771
2877
  /**
2772
2878
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2773
2879
  */
@@ -2775,7 +2881,7 @@ declare type CompareBranchWithUserSchemaPathParams = {
2775
2881
  workspace: string;
2776
2882
  region: string;
2777
2883
  };
2778
- declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
2884
+ type CompareBranchWithUserSchemaError = ErrorWrapper<{
2779
2885
  status: 400;
2780
2886
  payload: BadRequestError;
2781
2887
  } | {
@@ -2785,15 +2891,15 @@ declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
2785
2891
  status: 404;
2786
2892
  payload: SimpleError;
2787
2893
  }>;
2788
- declare type CompareBranchWithUserSchemaRequestBody = {
2894
+ type CompareBranchWithUserSchemaRequestBody = {
2789
2895
  schema: Schema;
2790
2896
  };
2791
- declare type CompareBranchWithUserSchemaVariables = {
2897
+ type CompareBranchWithUserSchemaVariables = {
2792
2898
  body: CompareBranchWithUserSchemaRequestBody;
2793
2899
  pathParams: CompareBranchWithUserSchemaPathParams;
2794
2900
  } & DataPlaneFetcherExtraProps;
2795
2901
  declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
2796
- declare type CompareBranchSchemasPathParams = {
2902
+ type CompareBranchSchemasPathParams = {
2797
2903
  /**
2798
2904
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2799
2905
  */
@@ -2805,7 +2911,7 @@ declare type CompareBranchSchemasPathParams = {
2805
2911
  workspace: string;
2806
2912
  region: string;
2807
2913
  };
2808
- declare type CompareBranchSchemasError = ErrorWrapper<{
2914
+ type CompareBranchSchemasError = ErrorWrapper<{
2809
2915
  status: 400;
2810
2916
  payload: BadRequestError;
2811
2917
  } | {
@@ -2815,12 +2921,12 @@ declare type CompareBranchSchemasError = ErrorWrapper<{
2815
2921
  status: 404;
2816
2922
  payload: SimpleError;
2817
2923
  }>;
2818
- declare type CompareBranchSchemasVariables = {
2924
+ type CompareBranchSchemasVariables = {
2819
2925
  body?: Record<string, any>;
2820
2926
  pathParams: CompareBranchSchemasPathParams;
2821
2927
  } & DataPlaneFetcherExtraProps;
2822
2928
  declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
2823
- declare type UpdateBranchSchemaPathParams = {
2929
+ type UpdateBranchSchemaPathParams = {
2824
2930
  /**
2825
2931
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2826
2932
  */
@@ -2828,7 +2934,7 @@ declare type UpdateBranchSchemaPathParams = {
2828
2934
  workspace: string;
2829
2935
  region: string;
2830
2936
  };
2831
- declare type UpdateBranchSchemaError = ErrorWrapper<{
2937
+ type UpdateBranchSchemaError = ErrorWrapper<{
2832
2938
  status: 400;
2833
2939
  payload: BadRequestError;
2834
2940
  } | {
@@ -2838,12 +2944,12 @@ declare type UpdateBranchSchemaError = ErrorWrapper<{
2838
2944
  status: 404;
2839
2945
  payload: SimpleError;
2840
2946
  }>;
2841
- declare type UpdateBranchSchemaVariables = {
2947
+ type UpdateBranchSchemaVariables = {
2842
2948
  body: Migration;
2843
2949
  pathParams: UpdateBranchSchemaPathParams;
2844
2950
  } & DataPlaneFetcherExtraProps;
2845
2951
  declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
2846
- declare type PreviewBranchSchemaEditPathParams = {
2952
+ type PreviewBranchSchemaEditPathParams = {
2847
2953
  /**
2848
2954
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2849
2955
  */
@@ -2851,7 +2957,7 @@ declare type PreviewBranchSchemaEditPathParams = {
2851
2957
  workspace: string;
2852
2958
  region: string;
2853
2959
  };
2854
- declare type PreviewBranchSchemaEditError = ErrorWrapper<{
2960
+ type PreviewBranchSchemaEditError = ErrorWrapper<{
2855
2961
  status: 400;
2856
2962
  payload: BadRequestError;
2857
2963
  } | {
@@ -2861,19 +2967,19 @@ declare type PreviewBranchSchemaEditError = ErrorWrapper<{
2861
2967
  status: 404;
2862
2968
  payload: SimpleError;
2863
2969
  }>;
2864
- declare type PreviewBranchSchemaEditResponse = {
2970
+ type PreviewBranchSchemaEditResponse = {
2865
2971
  original: Schema;
2866
2972
  updated: Schema;
2867
2973
  };
2868
- declare type PreviewBranchSchemaEditRequestBody = {
2974
+ type PreviewBranchSchemaEditRequestBody = {
2869
2975
  edits?: SchemaEditScript;
2870
2976
  };
2871
- declare type PreviewBranchSchemaEditVariables = {
2977
+ type PreviewBranchSchemaEditVariables = {
2872
2978
  body?: PreviewBranchSchemaEditRequestBody;
2873
2979
  pathParams: PreviewBranchSchemaEditPathParams;
2874
2980
  } & DataPlaneFetcherExtraProps;
2875
2981
  declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal) => Promise<PreviewBranchSchemaEditResponse>;
2876
- declare type ApplyBranchSchemaEditPathParams = {
2982
+ type ApplyBranchSchemaEditPathParams = {
2877
2983
  /**
2878
2984
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2879
2985
  */
@@ -2881,7 +2987,7 @@ declare type ApplyBranchSchemaEditPathParams = {
2881
2987
  workspace: string;
2882
2988
  region: string;
2883
2989
  };
2884
- declare type ApplyBranchSchemaEditError = ErrorWrapper<{
2990
+ type ApplyBranchSchemaEditError = ErrorWrapper<{
2885
2991
  status: 400;
2886
2992
  payload: BadRequestError;
2887
2993
  } | {
@@ -2891,15 +2997,15 @@ declare type ApplyBranchSchemaEditError = ErrorWrapper<{
2891
2997
  status: 404;
2892
2998
  payload: SimpleError;
2893
2999
  }>;
2894
- declare type ApplyBranchSchemaEditRequestBody = {
3000
+ type ApplyBranchSchemaEditRequestBody = {
2895
3001
  edits: SchemaEditScript;
2896
3002
  };
2897
- declare type ApplyBranchSchemaEditVariables = {
3003
+ type ApplyBranchSchemaEditVariables = {
2898
3004
  body: ApplyBranchSchemaEditRequestBody;
2899
3005
  pathParams: ApplyBranchSchemaEditPathParams;
2900
3006
  } & DataPlaneFetcherExtraProps;
2901
3007
  declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
2902
- declare type CreateTablePathParams = {
3008
+ type CreateTablePathParams = {
2903
3009
  /**
2904
3010
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2905
3011
  */
@@ -2911,7 +3017,7 @@ declare type CreateTablePathParams = {
2911
3017
  workspace: string;
2912
3018
  region: string;
2913
3019
  };
2914
- declare type CreateTableError = ErrorWrapper<{
3020
+ type CreateTableError = ErrorWrapper<{
2915
3021
  status: 400;
2916
3022
  payload: BadRequestError;
2917
3023
  } | {
@@ -2924,7 +3030,7 @@ declare type CreateTableError = ErrorWrapper<{
2924
3030
  status: 422;
2925
3031
  payload: SimpleError;
2926
3032
  }>;
2927
- declare type CreateTableResponse = {
3033
+ type CreateTableResponse = {
2928
3034
  branchName: string;
2929
3035
  /**
2930
3036
  * @minLength 1
@@ -2932,14 +3038,14 @@ declare type CreateTableResponse = {
2932
3038
  tableName: string;
2933
3039
  status: MigrationStatus;
2934
3040
  };
2935
- declare type CreateTableVariables = {
3041
+ type CreateTableVariables = {
2936
3042
  pathParams: CreateTablePathParams;
2937
3043
  } & DataPlaneFetcherExtraProps;
2938
3044
  /**
2939
3045
  * Creates a new table with the given name. Returns 422 if a table with the same name already exists.
2940
3046
  */
2941
3047
  declare const createTable: (variables: CreateTableVariables, signal?: AbortSignal) => Promise<CreateTableResponse>;
2942
- declare type DeleteTablePathParams = {
3048
+ type DeleteTablePathParams = {
2943
3049
  /**
2944
3050
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2945
3051
  */
@@ -2951,24 +3057,24 @@ declare type DeleteTablePathParams = {
2951
3057
  workspace: string;
2952
3058
  region: string;
2953
3059
  };
2954
- declare type DeleteTableError = ErrorWrapper<{
3060
+ type DeleteTableError = ErrorWrapper<{
2955
3061
  status: 400;
2956
3062
  payload: BadRequestError;
2957
3063
  } | {
2958
3064
  status: 401;
2959
3065
  payload: AuthError;
2960
3066
  }>;
2961
- declare type DeleteTableResponse = {
3067
+ type DeleteTableResponse = {
2962
3068
  status: MigrationStatus;
2963
3069
  };
2964
- declare type DeleteTableVariables = {
3070
+ type DeleteTableVariables = {
2965
3071
  pathParams: DeleteTablePathParams;
2966
3072
  } & DataPlaneFetcherExtraProps;
2967
3073
  /**
2968
3074
  * Deletes the table with the given name.
2969
3075
  */
2970
3076
  declare const deleteTable: (variables: DeleteTableVariables, signal?: AbortSignal) => Promise<DeleteTableResponse>;
2971
- declare type UpdateTablePathParams = {
3077
+ type UpdateTablePathParams = {
2972
3078
  /**
2973
3079
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2974
3080
  */
@@ -2980,7 +3086,7 @@ declare type UpdateTablePathParams = {
2980
3086
  workspace: string;
2981
3087
  region: string;
2982
3088
  };
2983
- declare type UpdateTableError = ErrorWrapper<{
3089
+ type UpdateTableError = ErrorWrapper<{
2984
3090
  status: 400;
2985
3091
  payload: BadRequestError;
2986
3092
  } | {
@@ -2989,14 +3095,17 @@ declare type UpdateTableError = ErrorWrapper<{
2989
3095
  } | {
2990
3096
  status: 404;
2991
3097
  payload: SimpleError;
3098
+ } | {
3099
+ status: 422;
3100
+ payload: SimpleError;
2992
3101
  }>;
2993
- declare type UpdateTableRequestBody = {
3102
+ type UpdateTableRequestBody = {
2994
3103
  /**
2995
3104
  * @minLength 1
2996
3105
  */
2997
3106
  name: string;
2998
3107
  };
2999
- declare type UpdateTableVariables = {
3108
+ type UpdateTableVariables = {
3000
3109
  body: UpdateTableRequestBody;
3001
3110
  pathParams: UpdateTablePathParams;
3002
3111
  } & DataPlaneFetcherExtraProps;
@@ -3014,7 +3123,7 @@ declare type UpdateTableVariables = {
3014
3123
  * ```
3015
3124
  */
3016
3125
  declare const updateTable: (variables: UpdateTableVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3017
- declare type GetTableSchemaPathParams = {
3126
+ type GetTableSchemaPathParams = {
3018
3127
  /**
3019
3128
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3020
3129
  */
@@ -3026,7 +3135,7 @@ declare type GetTableSchemaPathParams = {
3026
3135
  workspace: string;
3027
3136
  region: string;
3028
3137
  };
3029
- declare type GetTableSchemaError = ErrorWrapper<{
3138
+ type GetTableSchemaError = ErrorWrapper<{
3030
3139
  status: 400;
3031
3140
  payload: BadRequestError;
3032
3141
  } | {
@@ -3036,14 +3145,14 @@ declare type GetTableSchemaError = ErrorWrapper<{
3036
3145
  status: 404;
3037
3146
  payload: SimpleError;
3038
3147
  }>;
3039
- declare type GetTableSchemaResponse = {
3148
+ type GetTableSchemaResponse = {
3040
3149
  columns: Column[];
3041
3150
  };
3042
- declare type GetTableSchemaVariables = {
3151
+ type GetTableSchemaVariables = {
3043
3152
  pathParams: GetTableSchemaPathParams;
3044
3153
  } & DataPlaneFetcherExtraProps;
3045
3154
  declare const getTableSchema: (variables: GetTableSchemaVariables, signal?: AbortSignal) => Promise<GetTableSchemaResponse>;
3046
- declare type SetTableSchemaPathParams = {
3155
+ type SetTableSchemaPathParams = {
3047
3156
  /**
3048
3157
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3049
3158
  */
@@ -3055,7 +3164,7 @@ declare type SetTableSchemaPathParams = {
3055
3164
  workspace: string;
3056
3165
  region: string;
3057
3166
  };
3058
- declare type SetTableSchemaError = ErrorWrapper<{
3167
+ type SetTableSchemaError = ErrorWrapper<{
3059
3168
  status: 400;
3060
3169
  payload: BadRequestError;
3061
3170
  } | {
@@ -3068,15 +3177,15 @@ declare type SetTableSchemaError = ErrorWrapper<{
3068
3177
  status: 409;
3069
3178
  payload: SimpleError;
3070
3179
  }>;
3071
- declare type SetTableSchemaRequestBody = {
3180
+ type SetTableSchemaRequestBody = {
3072
3181
  columns: Column[];
3073
3182
  };
3074
- declare type SetTableSchemaVariables = {
3183
+ type SetTableSchemaVariables = {
3075
3184
  body: SetTableSchemaRequestBody;
3076
3185
  pathParams: SetTableSchemaPathParams;
3077
3186
  } & DataPlaneFetcherExtraProps;
3078
3187
  declare const setTableSchema: (variables: SetTableSchemaVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3079
- declare type GetTableColumnsPathParams = {
3188
+ type GetTableColumnsPathParams = {
3080
3189
  /**
3081
3190
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3082
3191
  */
@@ -3088,7 +3197,7 @@ declare type GetTableColumnsPathParams = {
3088
3197
  workspace: string;
3089
3198
  region: string;
3090
3199
  };
3091
- declare type GetTableColumnsError = ErrorWrapper<{
3200
+ type GetTableColumnsError = ErrorWrapper<{
3092
3201
  status: 400;
3093
3202
  payload: BadRequestError;
3094
3203
  } | {
@@ -3098,10 +3207,10 @@ declare type GetTableColumnsError = ErrorWrapper<{
3098
3207
  status: 404;
3099
3208
  payload: SimpleError;
3100
3209
  }>;
3101
- declare type GetTableColumnsResponse = {
3210
+ type GetTableColumnsResponse = {
3102
3211
  columns: Column[];
3103
3212
  };
3104
- declare type GetTableColumnsVariables = {
3213
+ type GetTableColumnsVariables = {
3105
3214
  pathParams: GetTableColumnsPathParams;
3106
3215
  } & DataPlaneFetcherExtraProps;
3107
3216
  /**
@@ -3109,7 +3218,7 @@ declare type GetTableColumnsVariables = {
3109
3218
  * full dot-separated path (flattened).
3110
3219
  */
3111
3220
  declare const getTableColumns: (variables: GetTableColumnsVariables, signal?: AbortSignal) => Promise<GetTableColumnsResponse>;
3112
- declare type AddTableColumnPathParams = {
3221
+ type AddTableColumnPathParams = {
3113
3222
  /**
3114
3223
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3115
3224
  */
@@ -3121,7 +3230,7 @@ declare type AddTableColumnPathParams = {
3121
3230
  workspace: string;
3122
3231
  region: string;
3123
3232
  };
3124
- declare type AddTableColumnError = ErrorWrapper<{
3233
+ type AddTableColumnError = ErrorWrapper<{
3125
3234
  status: 400;
3126
3235
  payload: BadRequestError;
3127
3236
  } | {
@@ -3131,7 +3240,7 @@ declare type AddTableColumnError = ErrorWrapper<{
3131
3240
  status: 404;
3132
3241
  payload: SimpleError;
3133
3242
  }>;
3134
- declare type AddTableColumnVariables = {
3243
+ type AddTableColumnVariables = {
3135
3244
  body: Column;
3136
3245
  pathParams: AddTableColumnPathParams;
3137
3246
  } & DataPlaneFetcherExtraProps;
@@ -3141,7 +3250,7 @@ declare type AddTableColumnVariables = {
3141
3250
  * passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
3142
3251
  */
3143
3252
  declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3144
- declare type GetColumnPathParams = {
3253
+ type GetColumnPathParams = {
3145
3254
  /**
3146
3255
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3147
3256
  */
@@ -3157,7 +3266,7 @@ declare type GetColumnPathParams = {
3157
3266
  workspace: string;
3158
3267
  region: string;
3159
3268
  };
3160
- declare type GetColumnError = ErrorWrapper<{
3269
+ type GetColumnError = ErrorWrapper<{
3161
3270
  status: 400;
3162
3271
  payload: BadRequestError;
3163
3272
  } | {
@@ -3167,14 +3276,14 @@ declare type GetColumnError = ErrorWrapper<{
3167
3276
  status: 404;
3168
3277
  payload: SimpleError;
3169
3278
  }>;
3170
- declare type GetColumnVariables = {
3279
+ type GetColumnVariables = {
3171
3280
  pathParams: GetColumnPathParams;
3172
3281
  } & DataPlaneFetcherExtraProps;
3173
3282
  /**
3174
3283
  * Get the definition of a single column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
3175
3284
  */
3176
3285
  declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
3177
- declare type UpdateColumnPathParams = {
3286
+ type UpdateColumnPathParams = {
3178
3287
  /**
3179
3288
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3180
3289
  */
@@ -3190,7 +3299,7 @@ declare type UpdateColumnPathParams = {
3190
3299
  workspace: string;
3191
3300
  region: string;
3192
3301
  };
3193
- declare type UpdateColumnError = ErrorWrapper<{
3302
+ type UpdateColumnError = ErrorWrapper<{
3194
3303
  status: 400;
3195
3304
  payload: BadRequestError;
3196
3305
  } | {
@@ -3200,13 +3309,13 @@ declare type UpdateColumnError = ErrorWrapper<{
3200
3309
  status: 404;
3201
3310
  payload: SimpleError;
3202
3311
  }>;
3203
- declare type UpdateColumnRequestBody = {
3312
+ type UpdateColumnRequestBody = {
3204
3313
  /**
3205
3314
  * @minLength 1
3206
3315
  */
3207
3316
  name: string;
3208
3317
  };
3209
- declare type UpdateColumnVariables = {
3318
+ type UpdateColumnVariables = {
3210
3319
  body: UpdateColumnRequestBody;
3211
3320
  pathParams: UpdateColumnPathParams;
3212
3321
  } & DataPlaneFetcherExtraProps;
@@ -3214,7 +3323,7 @@ declare type UpdateColumnVariables = {
3214
3323
  * 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`.
3215
3324
  */
3216
3325
  declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3217
- declare type DeleteColumnPathParams = {
3326
+ type DeleteColumnPathParams = {
3218
3327
  /**
3219
3328
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3220
3329
  */
@@ -3230,7 +3339,7 @@ declare type DeleteColumnPathParams = {
3230
3339
  workspace: string;
3231
3340
  region: string;
3232
3341
  };
3233
- declare type DeleteColumnError = ErrorWrapper<{
3342
+ type DeleteColumnError = ErrorWrapper<{
3234
3343
  status: 400;
3235
3344
  payload: BadRequestError;
3236
3345
  } | {
@@ -3240,14 +3349,14 @@ declare type DeleteColumnError = ErrorWrapper<{
3240
3349
  status: 404;
3241
3350
  payload: SimpleError;
3242
3351
  }>;
3243
- declare type DeleteColumnVariables = {
3352
+ type DeleteColumnVariables = {
3244
3353
  pathParams: DeleteColumnPathParams;
3245
3354
  } & DataPlaneFetcherExtraProps;
3246
3355
  /**
3247
3356
  * Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
3248
3357
  */
3249
3358
  declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3250
- declare type InsertRecordPathParams = {
3359
+ type InsertRecordPathParams = {
3251
3360
  /**
3252
3361
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3253
3362
  */
@@ -3259,13 +3368,13 @@ declare type InsertRecordPathParams = {
3259
3368
  workspace: string;
3260
3369
  region: string;
3261
3370
  };
3262
- declare type InsertRecordQueryParams = {
3371
+ type InsertRecordQueryParams = {
3263
3372
  /**
3264
3373
  * Column filters
3265
3374
  */
3266
3375
  columns?: ColumnsProjection;
3267
3376
  };
3268
- declare type InsertRecordError = ErrorWrapper<{
3377
+ type InsertRecordError = ErrorWrapper<{
3269
3378
  status: 400;
3270
3379
  payload: BadRequestError;
3271
3380
  } | {
@@ -3275,7 +3384,7 @@ declare type InsertRecordError = ErrorWrapper<{
3275
3384
  status: 404;
3276
3385
  payload: SimpleError;
3277
3386
  }>;
3278
- declare type InsertRecordVariables = {
3387
+ type InsertRecordVariables = {
3279
3388
  body?: Record<string, any>;
3280
3389
  pathParams: InsertRecordPathParams;
3281
3390
  queryParams?: InsertRecordQueryParams;
@@ -3284,7 +3393,7 @@ declare type InsertRecordVariables = {
3284
3393
  * Insert a new Record into the Table
3285
3394
  */
3286
3395
  declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
3287
- declare type GetRecordPathParams = {
3396
+ type GetRecordPathParams = {
3288
3397
  /**
3289
3398
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3290
3399
  */
@@ -3300,13 +3409,13 @@ declare type GetRecordPathParams = {
3300
3409
  workspace: string;
3301
3410
  region: string;
3302
3411
  };
3303
- declare type GetRecordQueryParams = {
3412
+ type GetRecordQueryParams = {
3304
3413
  /**
3305
3414
  * Column filters
3306
3415
  */
3307
3416
  columns?: ColumnsProjection;
3308
3417
  };
3309
- declare type GetRecordError = ErrorWrapper<{
3418
+ type GetRecordError = ErrorWrapper<{
3310
3419
  status: 400;
3311
3420
  payload: BadRequestError;
3312
3421
  } | {
@@ -3316,7 +3425,7 @@ declare type GetRecordError = ErrorWrapper<{
3316
3425
  status: 404;
3317
3426
  payload: SimpleError;
3318
3427
  }>;
3319
- declare type GetRecordVariables = {
3428
+ type GetRecordVariables = {
3320
3429
  pathParams: GetRecordPathParams;
3321
3430
  queryParams?: GetRecordQueryParams;
3322
3431
  } & DataPlaneFetcherExtraProps;
@@ -3324,7 +3433,7 @@ declare type GetRecordVariables = {
3324
3433
  * Retrieve record by ID
3325
3434
  */
3326
3435
  declare const getRecord: (variables: GetRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
3327
- declare type InsertRecordWithIDPathParams = {
3436
+ type InsertRecordWithIDPathParams = {
3328
3437
  /**
3329
3438
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3330
3439
  */
@@ -3340,7 +3449,7 @@ declare type InsertRecordWithIDPathParams = {
3340
3449
  workspace: string;
3341
3450
  region: string;
3342
3451
  };
3343
- declare type InsertRecordWithIDQueryParams = {
3452
+ type InsertRecordWithIDQueryParams = {
3344
3453
  /**
3345
3454
  * Column filters
3346
3455
  */
@@ -3348,7 +3457,7 @@ declare type InsertRecordWithIDQueryParams = {
3348
3457
  createOnly?: boolean;
3349
3458
  ifVersion?: number;
3350
3459
  };
3351
- declare type InsertRecordWithIDError = ErrorWrapper<{
3460
+ type InsertRecordWithIDError = ErrorWrapper<{
3352
3461
  status: 400;
3353
3462
  payload: BadRequestError;
3354
3463
  } | {
@@ -3361,7 +3470,7 @@ declare type InsertRecordWithIDError = ErrorWrapper<{
3361
3470
  status: 422;
3362
3471
  payload: SimpleError;
3363
3472
  }>;
3364
- declare type InsertRecordWithIDVariables = {
3473
+ type InsertRecordWithIDVariables = {
3365
3474
  body?: Record<string, any>;
3366
3475
  pathParams: InsertRecordWithIDPathParams;
3367
3476
  queryParams?: InsertRecordWithIDQueryParams;
@@ -3370,7 +3479,7 @@ declare type InsertRecordWithIDVariables = {
3370
3479
  * By default, IDs are auto-generated when data is insterted into Xata. Sending a request to this endpoint allows us to insert a record with a pre-existing ID, bypassing the default automatic ID generation.
3371
3480
  */
3372
3481
  declare const insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
3373
- declare type UpdateRecordWithIDPathParams = {
3482
+ type UpdateRecordWithIDPathParams = {
3374
3483
  /**
3375
3484
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3376
3485
  */
@@ -3386,14 +3495,14 @@ declare type UpdateRecordWithIDPathParams = {
3386
3495
  workspace: string;
3387
3496
  region: string;
3388
3497
  };
3389
- declare type UpdateRecordWithIDQueryParams = {
3498
+ type UpdateRecordWithIDQueryParams = {
3390
3499
  /**
3391
3500
  * Column filters
3392
3501
  */
3393
3502
  columns?: ColumnsProjection;
3394
3503
  ifVersion?: number;
3395
3504
  };
3396
- declare type UpdateRecordWithIDError = ErrorWrapper<{
3505
+ type UpdateRecordWithIDError = ErrorWrapper<{
3397
3506
  status: 400;
3398
3507
  payload: BadRequestError;
3399
3508
  } | {
@@ -3406,13 +3515,13 @@ declare type UpdateRecordWithIDError = ErrorWrapper<{
3406
3515
  status: 422;
3407
3516
  payload: SimpleError;
3408
3517
  }>;
3409
- declare type UpdateRecordWithIDVariables = {
3518
+ type UpdateRecordWithIDVariables = {
3410
3519
  body?: Record<string, any>;
3411
3520
  pathParams: UpdateRecordWithIDPathParams;
3412
3521
  queryParams?: UpdateRecordWithIDQueryParams;
3413
3522
  } & DataPlaneFetcherExtraProps;
3414
3523
  declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
3415
- declare type UpsertRecordWithIDPathParams = {
3524
+ type UpsertRecordWithIDPathParams = {
3416
3525
  /**
3417
3526
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3418
3527
  */
@@ -3428,14 +3537,14 @@ declare type UpsertRecordWithIDPathParams = {
3428
3537
  workspace: string;
3429
3538
  region: string;
3430
3539
  };
3431
- declare type UpsertRecordWithIDQueryParams = {
3540
+ type UpsertRecordWithIDQueryParams = {
3432
3541
  /**
3433
3542
  * Column filters
3434
3543
  */
3435
3544
  columns?: ColumnsProjection;
3436
3545
  ifVersion?: number;
3437
3546
  };
3438
- declare type UpsertRecordWithIDError = ErrorWrapper<{
3547
+ type UpsertRecordWithIDError = ErrorWrapper<{
3439
3548
  status: 400;
3440
3549
  payload: BadRequestError;
3441
3550
  } | {
@@ -3448,13 +3557,13 @@ declare type UpsertRecordWithIDError = ErrorWrapper<{
3448
3557
  status: 422;
3449
3558
  payload: SimpleError;
3450
3559
  }>;
3451
- declare type UpsertRecordWithIDVariables = {
3560
+ type UpsertRecordWithIDVariables = {
3452
3561
  body?: Record<string, any>;
3453
3562
  pathParams: UpsertRecordWithIDPathParams;
3454
3563
  queryParams?: UpsertRecordWithIDQueryParams;
3455
3564
  } & DataPlaneFetcherExtraProps;
3456
3565
  declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
3457
- declare type DeleteRecordPathParams = {
3566
+ type DeleteRecordPathParams = {
3458
3567
  /**
3459
3568
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3460
3569
  */
@@ -3470,13 +3579,13 @@ declare type DeleteRecordPathParams = {
3470
3579
  workspace: string;
3471
3580
  region: string;
3472
3581
  };
3473
- declare type DeleteRecordQueryParams = {
3582
+ type DeleteRecordQueryParams = {
3474
3583
  /**
3475
3584
  * Column filters
3476
3585
  */
3477
3586
  columns?: ColumnsProjection;
3478
3587
  };
3479
- declare type DeleteRecordError = ErrorWrapper<{
3588
+ type DeleteRecordError = ErrorWrapper<{
3480
3589
  status: 400;
3481
3590
  payload: BadRequestError;
3482
3591
  } | {
@@ -3486,12 +3595,12 @@ declare type DeleteRecordError = ErrorWrapper<{
3486
3595
  status: 404;
3487
3596
  payload: SimpleError;
3488
3597
  }>;
3489
- declare type DeleteRecordVariables = {
3598
+ type DeleteRecordVariables = {
3490
3599
  pathParams: DeleteRecordPathParams;
3491
3600
  queryParams?: DeleteRecordQueryParams;
3492
3601
  } & DataPlaneFetcherExtraProps;
3493
3602
  declare const deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
3494
- declare type BulkInsertTableRecordsPathParams = {
3603
+ type BulkInsertTableRecordsPathParams = {
3495
3604
  /**
3496
3605
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3497
3606
  */
@@ -3503,13 +3612,13 @@ declare type BulkInsertTableRecordsPathParams = {
3503
3612
  workspace: string;
3504
3613
  region: string;
3505
3614
  };
3506
- declare type BulkInsertTableRecordsQueryParams = {
3615
+ type BulkInsertTableRecordsQueryParams = {
3507
3616
  /**
3508
3617
  * Column filters
3509
3618
  */
3510
3619
  columns?: ColumnsProjection;
3511
3620
  };
3512
- declare type BulkInsertTableRecordsError = ErrorWrapper<{
3621
+ type BulkInsertTableRecordsError = ErrorWrapper<{
3513
3622
  status: 400;
3514
3623
  payload: BulkError;
3515
3624
  } | {
@@ -3522,10 +3631,10 @@ declare type BulkInsertTableRecordsError = ErrorWrapper<{
3522
3631
  status: 422;
3523
3632
  payload: SimpleError;
3524
3633
  }>;
3525
- declare type BulkInsertTableRecordsRequestBody = {
3634
+ type BulkInsertTableRecordsRequestBody = {
3526
3635
  records: Record<string, any>[];
3527
3636
  };
3528
- declare type BulkInsertTableRecordsVariables = {
3637
+ type BulkInsertTableRecordsVariables = {
3529
3638
  body: BulkInsertTableRecordsRequestBody;
3530
3639
  pathParams: BulkInsertTableRecordsPathParams;
3531
3640
  queryParams?: BulkInsertTableRecordsQueryParams;
@@ -3534,7 +3643,7 @@ declare type BulkInsertTableRecordsVariables = {
3534
3643
  * Bulk insert records
3535
3644
  */
3536
3645
  declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal) => Promise<BulkInsertResponse>;
3537
- declare type QueryTablePathParams = {
3646
+ type QueryTablePathParams = {
3538
3647
  /**
3539
3648
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3540
3649
  */
@@ -3546,7 +3655,7 @@ declare type QueryTablePathParams = {
3546
3655
  workspace: string;
3547
3656
  region: string;
3548
3657
  };
3549
- declare type QueryTableError = ErrorWrapper<{
3658
+ type QueryTableError = ErrorWrapper<{
3550
3659
  status: 400;
3551
3660
  payload: BadRequestError;
3552
3661
  } | {
@@ -3556,13 +3665,19 @@ declare type QueryTableError = ErrorWrapper<{
3556
3665
  status: 404;
3557
3666
  payload: SimpleError;
3558
3667
  }>;
3559
- declare type QueryTableRequestBody = {
3668
+ type QueryTableRequestBody = {
3560
3669
  filter?: FilterExpression;
3561
3670
  sort?: SortExpression;
3562
3671
  page?: PageConfig;
3563
3672
  columns?: ColumnsProjection;
3673
+ /**
3674
+ * The consistency level for this request.
3675
+ *
3676
+ * @default strong
3677
+ */
3678
+ consistency?: 'strong' | 'eventual';
3564
3679
  };
3565
- declare type QueryTableVariables = {
3680
+ type QueryTableVariables = {
3566
3681
  body?: QueryTableRequestBody;
3567
3682
  pathParams: QueryTablePathParams;
3568
3683
  } & DataPlaneFetcherExtraProps;
@@ -3591,6 +3706,8 @@ declare type QueryTableVariables = {
3591
3706
  * }
3592
3707
  * ```
3593
3708
  *
3709
+ * For usage, see also the [API Guide](https://xata.io/docs/api-guide/get).
3710
+ *
3594
3711
  * ### Column selection
3595
3712
  *
3596
3713
  * If the `columns` array is not specified, all columns are included. For link
@@ -3609,7 +3726,6 @@ declare type QueryTableVariables = {
3609
3726
  *
3610
3727
  * ```json {"truncate": true}
3611
3728
  * {
3612
- * "formatVersion": "1.0",
3613
3729
  * "tables": [
3614
3730
  * {
3615
3731
  * "name": "teams",
@@ -3963,9 +4079,8 @@ declare type QueryTableVariables = {
3963
4079
  *
3964
4080
  * #### Partial match
3965
4081
  *
3966
- * `$contains` is the simplest operator for partial matching. We should generally
3967
- * discourage overusing `$contains` because it typically can't make use of
3968
- * indices.
4082
+ * `$contains` is the simplest operator for partial matching. Note that `$contains` operator can
4083
+ * cause performance issues at scale, because indices cannot be used.
3969
4084
  *
3970
4085
  * ```json
3971
4086
  * {
@@ -3995,7 +4110,7 @@ declare type QueryTableVariables = {
3995
4110
  *
3996
4111
  * If you want to match a string that contains a wildcard character, you can escape them using a backslash (`\`). You can escape a backslash by usign another backslash.
3997
4112
  *
3998
- * We could also have `$endsWith` and `$startsWith` operators:
4113
+ * You can also use the `$endsWith` and `$startsWith` operators:
3999
4114
  *
4000
4115
  * ```json
4001
4116
  * {
@@ -4107,20 +4222,25 @@ declare type QueryTableVariables = {
4107
4222
  *
4108
4223
  * #### Working with arrays
4109
4224
  *
4110
- * To test that an array contains a value, use `$includes`.
4225
+ * To test that an array contains a value, use `$includesAny`.
4111
4226
  *
4112
4227
  * ```json
4113
4228
  * {
4114
4229
  * "filter": {
4115
4230
  * "<array_name>": {
4116
- * "$includes": "value"
4231
+ * "$includesAny": "value"
4117
4232
  * }
4118
4233
  * }
4119
4234
  * }
4120
4235
  * ```
4121
4236
  *
4122
- * The `$includes` operator accepts a custom predicate that will check if any
4123
- * array values matches the predicate. For example a complex predicate can include
4237
+ * ##### `includesAny`
4238
+ *
4239
+ * The `$includesAny` operator accepts a custom predicate that will check if
4240
+ * any value in the array column matches the predicate. The `$includes` operator is a
4241
+ * synonym for the `$includesAny` operator.
4242
+ *
4243
+ * For example a complex predicate can include
4124
4244
  * the `$all` , `$contains` and `$endsWith` operators:
4125
4245
  *
4126
4246
  * ```json
@@ -4138,11 +4258,26 @@ declare type QueryTableVariables = {
4138
4258
  * }
4139
4259
  * ```
4140
4260
  *
4141
- * The `$includes` all operator succeeds if any column in the array matches the
4142
- * predicate. The `$includesAll` operator succeeds if all array items match the
4143
- * predicate. The `$includesNone` operator succeeds if no array item matches the
4144
- * predicate. The `$includes` operator is a synonym for the `$includesAny`
4145
- * operator.
4261
+ * ##### `includesNone`
4262
+ *
4263
+ * The `$includesNone` operator succeeds if no array item matches the
4264
+ * predicate.
4265
+ *
4266
+ * ```json
4267
+ * {
4268
+ * "filter": {
4269
+ * "settings.labels": {
4270
+ * "$includesNone": [{ "$contains": "label" }]
4271
+ * }
4272
+ * }
4273
+ * }
4274
+ * ```
4275
+ * The above matches if none of the array values contain the string "label".
4276
+ *
4277
+ * ##### `includesAll`
4278
+ *
4279
+ * The `$includesAll` operator succeeds if all array items match the
4280
+ * predicate.
4146
4281
  *
4147
4282
  * Here is an example of using the `$includesAll` operator:
4148
4283
  *
@@ -4156,7 +4291,7 @@ declare type QueryTableVariables = {
4156
4291
  * }
4157
4292
  * ```
4158
4293
  *
4159
- * The above matches if all label values contain the string "labels".
4294
+ * The above matches if all array values contain the string "label".
4160
4295
  *
4161
4296
  * ### Sorting
4162
4297
  *
@@ -4247,12 +4382,14 @@ declare type QueryTableVariables = {
4247
4382
  *
4248
4383
  * - `after`: Return the next page 'after' the current cursor
4249
4384
  * - `before`: Return the previous page 'before' the current cursor.
4250
- * - `first`: Return the first page in the table from a cursor.
4251
- * - `last`: Return the last N records in the table from a cursor, where N is the `page.size` parameter.
4385
+ * - `start`: Resets the given cursor position to the beginning of the query result set.
4386
+ * Will return the first N records from the query result, where N is the `page.size` parameter.
4387
+ * - `end`: Resets the give cursor position to the end for the query result set.
4388
+ * Returns the last N records from the query result, where N is the `page.size` parameter.
4252
4389
  *
4253
4390
  * The request will fail if an invalid cursor value is given to `page.before`,
4254
- * `page.after`, `page.first` , or `page.last`. No other cursor setting can be
4255
- * used if `page.first` or `page.last` is set in a query.
4391
+ * `page.after`, `page.start` , or `page.end`. No other cursor setting can be
4392
+ * used if `page.start` or `page.end` is set in a query.
4256
4393
  *
4257
4394
  * If both `page.before` and `page.after` parameters are present we treat the
4258
4395
  * request as a range query. The range query will return all entries after
@@ -4274,14 +4411,14 @@ declare type QueryTableVariables = {
4274
4411
  * returned is empty, but `page.meta.cursor` will include a cursor that can be
4275
4412
  * used to "tail" the table from the end waiting for new data to be inserted.
4276
4413
  * - `page.before=end`: This cursor returns the last page.
4277
- * - `page.first=<cursor>`: Go to first page. This is equivalent to querying the
4278
- * first page without a cursor but `filter` and `sort` . Yet the `page.first`
4414
+ * - `page.start=<cursor>`: Start at the beginning of the result set of the <cursor> query. This is equivalent to querying the
4415
+ * first page without a cursor but applying `filter` and `sort` . Yet the `page.start`
4279
4416
  * cursor can be convenient at times as user code does not need to remember the
4280
4417
  * filter, sort, columns or page size configuration. All these information are
4281
4418
  * read from the cursor.
4282
- * - `page.last=<cursor>`: Go to the end of the table. This is equivalent to querying the
4419
+ * - `page.end=<cursor>`: Move to the end of the result set of the <cursor> query. This is equivalent to querying the
4283
4420
  * last page with `page.before=end`, `filter`, and `sort` . Yet the
4284
- * `page.last` cursor can be more convenient at times as user code does not
4421
+ * `page.end` cursor can be more convenient at times as user code does not
4285
4422
  * need to remember the filter, sort, columns or page size configuration. All
4286
4423
  * these information are read from the cursor.
4287
4424
  *
@@ -4301,7 +4438,7 @@ declare type QueryTableVariables = {
4301
4438
  * ```
4302
4439
  */
4303
4440
  declare const queryTable: (variables: QueryTableVariables, signal?: AbortSignal) => Promise<QueryResponse>;
4304
- declare type SearchBranchPathParams = {
4441
+ type SearchBranchPathParams = {
4305
4442
  /**
4306
4443
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4307
4444
  */
@@ -4309,7 +4446,7 @@ declare type SearchBranchPathParams = {
4309
4446
  workspace: string;
4310
4447
  region: string;
4311
4448
  };
4312
- declare type SearchBranchError = ErrorWrapper<{
4449
+ type SearchBranchError = ErrorWrapper<{
4313
4450
  status: 400;
4314
4451
  payload: BadRequestError;
4315
4452
  } | {
@@ -4319,7 +4456,7 @@ declare type SearchBranchError = ErrorWrapper<{
4319
4456
  status: 404;
4320
4457
  payload: SimpleError;
4321
4458
  }>;
4322
- declare type SearchBranchRequestBody = {
4459
+ type SearchBranchRequestBody = {
4323
4460
  /**
4324
4461
  * An array with the tables in which to search. By default, all tables are included. Optionally, filters can be included that apply to each table.
4325
4462
  */
@@ -4341,8 +4478,9 @@ declare type SearchBranchRequestBody = {
4341
4478
  fuzziness?: FuzzinessExpression;
4342
4479
  prefix?: PrefixExpression;
4343
4480
  highlight?: HighlightExpression;
4481
+ page?: SearchPageConfig;
4344
4482
  };
4345
- declare type SearchBranchVariables = {
4483
+ type SearchBranchVariables = {
4346
4484
  body: SearchBranchRequestBody;
4347
4485
  pathParams: SearchBranchPathParams;
4348
4486
  } & DataPlaneFetcherExtraProps;
@@ -4350,7 +4488,7 @@ declare type SearchBranchVariables = {
4350
4488
  * Run a free text search operation across the database branch.
4351
4489
  */
4352
4490
  declare const searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal) => Promise<SearchResponse>;
4353
- declare type SearchTablePathParams = {
4491
+ type SearchTablePathParams = {
4354
4492
  /**
4355
4493
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4356
4494
  */
@@ -4362,7 +4500,7 @@ declare type SearchTablePathParams = {
4362
4500
  workspace: string;
4363
4501
  region: string;
4364
4502
  };
4365
- declare type SearchTableError = ErrorWrapper<{
4503
+ type SearchTableError = ErrorWrapper<{
4366
4504
  status: 400;
4367
4505
  payload: BadRequestError;
4368
4506
  } | {
@@ -4372,7 +4510,7 @@ declare type SearchTableError = ErrorWrapper<{
4372
4510
  status: 404;
4373
4511
  payload: SimpleError;
4374
4512
  }>;
4375
- declare type SearchTableRequestBody = {
4513
+ type SearchTableRequestBody = {
4376
4514
  /**
4377
4515
  * The query string.
4378
4516
  *
@@ -4385,8 +4523,9 @@ declare type SearchTableRequestBody = {
4385
4523
  filter?: FilterExpression;
4386
4524
  highlight?: HighlightExpression;
4387
4525
  boosters?: BoosterExpression[];
4526
+ page?: SearchPageConfig;
4388
4527
  };
4389
- declare type SearchTableVariables = {
4528
+ type SearchTableVariables = {
4390
4529
  body: SearchTableRequestBody;
4391
4530
  pathParams: SearchTablePathParams;
4392
4531
  } & DataPlaneFetcherExtraProps;
@@ -4398,7 +4537,7 @@ declare type SearchTableVariables = {
4398
4537
  * * filtering on columns of type `multiple` is currently unsupported
4399
4538
  */
4400
4539
  declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
4401
- declare type SummarizeTablePathParams = {
4540
+ type SummarizeTablePathParams = {
4402
4541
  /**
4403
4542
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4404
4543
  */
@@ -4410,7 +4549,7 @@ declare type SummarizeTablePathParams = {
4410
4549
  workspace: string;
4411
4550
  region: string;
4412
4551
  };
4413
- declare type SummarizeTableError = ErrorWrapper<{
4552
+ type SummarizeTableError = ErrorWrapper<{
4414
4553
  status: 400;
4415
4554
  payload: BadRequestError;
4416
4555
  } | {
@@ -4420,12 +4559,18 @@ declare type SummarizeTableError = ErrorWrapper<{
4420
4559
  status: 404;
4421
4560
  payload: SimpleError;
4422
4561
  }>;
4423
- declare type SummarizeTableRequestBody = {
4562
+ type SummarizeTableRequestBody = {
4424
4563
  filter?: FilterExpression;
4425
4564
  columns?: ColumnsProjection;
4426
4565
  summaries?: SummaryExpressionList;
4427
4566
  sort?: SortExpression;
4428
4567
  summariesFilter?: FilterExpression;
4568
+ /**
4569
+ * The consistency level for this request.
4570
+ *
4571
+ * @default strong
4572
+ */
4573
+ consistency?: 'strong' | 'eventual';
4429
4574
  page?: {
4430
4575
  /**
4431
4576
  * The number of records returned by summarize. If the amount of data you have exceeds this, or you have
@@ -4438,7 +4583,7 @@ declare type SummarizeTableRequestBody = {
4438
4583
  size?: number;
4439
4584
  };
4440
4585
  };
4441
- declare type SummarizeTableVariables = {
4586
+ type SummarizeTableVariables = {
4442
4587
  body?: SummarizeTableRequestBody;
4443
4588
  pathParams: SummarizeTablePathParams;
4444
4589
  } & DataPlaneFetcherExtraProps;
@@ -4483,7 +4628,8 @@ declare type SummarizeTableVariables = {
4483
4628
  * `columns`: tells Xata how to create each group. If you add `product_id`
4484
4629
  * we will create a new group for every unique `product_id`.
4485
4630
  *
4486
- * `summaries`: tells Xata which calculations to run on each group.
4631
+ * `summaries`: tells Xata which calculations to run on each group. Xata
4632
+ * currently supports count, min, max, sum, average.
4487
4633
  *
4488
4634
  * `sort`: tells Xata in which order you'd like to see results. You may
4489
4635
  * sort by fields specified in `columns` as well as the summary names
@@ -4491,8 +4637,8 @@ declare type SummarizeTableVariables = {
4491
4637
  *
4492
4638
  * note: Sorting on summarized values can be slower on very large tables;
4493
4639
  * this will impact your rate limit significantly more than other queries.
4494
- * Try use `filter` [coming soon] to reduce the amount of data being
4495
- * processed in order to reduce impact on your limits.
4640
+ * Try use `filter` to reduce the amount of data being processed in order
4641
+ * to reduce impact on your limits.
4496
4642
  *
4497
4643
  * `summariesFilter`: tells Xata how to filter the results of a summary.
4498
4644
  * It has the same syntax as `filter`, however, by using `summariesFilter`
@@ -4506,7 +4652,7 @@ declare type SummarizeTableVariables = {
4506
4652
  * will return the default size.
4507
4653
  */
4508
4654
  declare const summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal) => Promise<SummarizeResponse>;
4509
- declare type AggregateTablePathParams = {
4655
+ type AggregateTablePathParams = {
4510
4656
  /**
4511
4657
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4512
4658
  */
@@ -4518,7 +4664,7 @@ declare type AggregateTablePathParams = {
4518
4664
  workspace: string;
4519
4665
  region: string;
4520
4666
  };
4521
- declare type AggregateTableError = ErrorWrapper<{
4667
+ type AggregateTableError = ErrorWrapper<{
4522
4668
  status: 400;
4523
4669
  payload: BadRequestError;
4524
4670
  } | {
@@ -4528,11 +4674,11 @@ declare type AggregateTableError = ErrorWrapper<{
4528
4674
  status: 404;
4529
4675
  payload: SimpleError;
4530
4676
  }>;
4531
- declare type AggregateTableRequestBody = {
4677
+ type AggregateTableRequestBody = {
4532
4678
  filter?: FilterExpression;
4533
4679
  aggs?: AggExpressionMap;
4534
4680
  };
4535
- declare type AggregateTableVariables = {
4681
+ type AggregateTableVariables = {
4536
4682
  body?: AggregateTableRequestBody;
4537
4683
  pathParams: AggregateTablePathParams;
4538
4684
  } & DataPlaneFetcherExtraProps;
@@ -4543,6 +4689,8 @@ declare type AggregateTableVariables = {
4543
4689
  * only eventually consistent. On the other hand, the aggregate endpoint uses a
4544
4690
  * store that is more appropiate for analytics, makes use of approximative algorithms
4545
4691
  * (e.g for cardinality), and is generally faster and can do more complex aggregations.
4692
+ *
4693
+ * For usage, see the [API Guide](https://xata.io/docs/api-guide/aggregate).
4546
4694
  */
4547
4695
  declare const aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
4548
4696
 
@@ -4561,6 +4709,7 @@ declare const operationsByTag: {
4561
4709
  resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal | undefined) => Promise<ResolveBranchResponse>;
4562
4710
  };
4563
4711
  records: {
4712
+ branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
4564
4713
  insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
4565
4714
  getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
4566
4715
  insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
@@ -4569,13 +4718,6 @@ declare const operationsByTag: {
4569
4718
  deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
4570
4719
  bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
4571
4720
  };
4572
- database: {
4573
- dEPRECATEDgetDatabaseList: (variables: DEPRECATEDgetDatabaseListVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDListDatabasesResponse>;
4574
- dEPRECATEDcreateDatabase: (variables: DEPRECATEDcreateDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDcreateDatabaseResponse>;
4575
- dEPRECATEDdeleteDatabase: (variables: DEPRECATEDdeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDdeleteDatabaseResponse>;
4576
- dEPRECATEDgetDatabaseMetadata: (variables: DEPRECATEDgetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDDatabaseMetadata>;
4577
- dEPRECATEDupdateDatabaseMetadata: (variables: DEPRECATEDupdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDDatabaseMetadata>;
4578
- };
4579
4721
  migrations: {
4580
4722
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchMigrationHistoryResponse>;
4581
4723
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<BranchMigrationPlan>;
@@ -4653,12 +4795,12 @@ declare const operationsByTag: {
4653
4795
  };
4654
4796
  };
4655
4797
 
4656
- declare type HostAliases = 'production' | 'staging';
4657
- declare type ProviderBuilder = {
4798
+ type HostAliases = 'production' | 'staging';
4799
+ type ProviderBuilder = {
4658
4800
  main: string;
4659
4801
  workspaces: string;
4660
4802
  };
4661
- declare type HostProvider = HostAliases | ProviderBuilder;
4803
+ type HostProvider = HostAliases | ProviderBuilder;
4662
4804
  declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder): string;
4663
4805
  declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
4664
4806
  declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
@@ -4706,8 +4848,6 @@ type schemas_BranchName = BranchName;
4706
4848
  type schemas_DBName = DBName;
4707
4849
  type schemas_DateTime = DateTime;
4708
4850
  type schemas_MigrationStatus = MigrationStatus;
4709
- type schemas_DEPRECATEDDatabaseMetadata = DEPRECATEDDatabaseMetadata;
4710
- type schemas_DEPRECATEDListDatabasesResponse = DEPRECATEDListDatabasesResponse;
4711
4851
  type schemas_ListBranchesResponse = ListBranchesResponse;
4712
4852
  type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
4713
4853
  type schemas_Branch = Branch;
@@ -4770,11 +4910,21 @@ type schemas_FilterPredicateRangeOp = FilterPredicateRangeOp;
4770
4910
  type schemas_FilterRangeValue = FilterRangeValue;
4771
4911
  type schemas_FilterValue = FilterValue;
4772
4912
  type schemas_PageConfig = PageConfig;
4913
+ type schemas_SearchPageConfig = SearchPageConfig;
4773
4914
  type schemas_ColumnsProjection = ColumnsProjection;
4774
4915
  type schemas_RecordMeta = RecordMeta;
4775
4916
  type schemas_RecordID = RecordID;
4776
4917
  type schemas_TableRename = TableRename;
4777
4918
  type schemas_RecordsMetadata = RecordsMetadata;
4919
+ type schemas_TransactionInsertOp = TransactionInsertOp;
4920
+ type schemas_TransactionUpdateOp = TransactionUpdateOp;
4921
+ type schemas_TransactionDeleteOp = TransactionDeleteOp;
4922
+ type schemas_TransactionSuccess = TransactionSuccess;
4923
+ type schemas_TransactionResultInsert = TransactionResultInsert;
4924
+ type schemas_TransactionResultUpdate = TransactionResultUpdate;
4925
+ type schemas_TransactionResultDelete = TransactionResultDelete;
4926
+ type schemas_TransactionFailure = TransactionFailure;
4927
+ type schemas_TransactionError = TransactionError;
4778
4928
  type schemas_User = User;
4779
4929
  type schemas_UserID = UserID;
4780
4930
  type schemas_UserWithID = UserWithID;
@@ -4799,8 +4949,6 @@ declare namespace schemas {
4799
4949
  schemas_DBName as DBName,
4800
4950
  schemas_DateTime as DateTime,
4801
4951
  schemas_MigrationStatus as MigrationStatus,
4802
- schemas_DEPRECATEDDatabaseMetadata as DEPRECATEDDatabaseMetadata,
4803
- schemas_DEPRECATEDListDatabasesResponse as DEPRECATEDListDatabasesResponse,
4804
4952
  schemas_ListBranchesResponse as ListBranchesResponse,
4805
4953
  schemas_ListGitBranchesResponse as ListGitBranchesResponse,
4806
4954
  schemas_Branch as Branch,
@@ -4866,12 +5014,23 @@ declare namespace schemas {
4866
5014
  schemas_FilterRangeValue as FilterRangeValue,
4867
5015
  schemas_FilterValue as FilterValue,
4868
5016
  schemas_PageConfig as PageConfig,
5017
+ schemas_SearchPageConfig as SearchPageConfig,
4869
5018
  schemas_ColumnsProjection as ColumnsProjection,
4870
5019
  schemas_RecordMeta as RecordMeta,
4871
5020
  schemas_RecordID as RecordID,
4872
5021
  schemas_TableRename as TableRename,
4873
5022
  schemas_RecordsMetadata as RecordsMetadata,
4874
5023
  AggResponse$1 as AggResponse,
5024
+ TransactionOperation$1 as TransactionOperation,
5025
+ schemas_TransactionInsertOp as TransactionInsertOp,
5026
+ schemas_TransactionUpdateOp as TransactionUpdateOp,
5027
+ schemas_TransactionDeleteOp as TransactionDeleteOp,
5028
+ schemas_TransactionSuccess as TransactionSuccess,
5029
+ schemas_TransactionResultInsert as TransactionResultInsert,
5030
+ schemas_TransactionResultUpdate as TransactionResultUpdate,
5031
+ schemas_TransactionResultDelete as TransactionResultDelete,
5032
+ schemas_TransactionFailure as TransactionFailure,
5033
+ schemas_TransactionError as TransactionError,
4875
5034
  XataRecord$1 as XataRecord,
4876
5035
  schemas_User as User,
4877
5036
  schemas_UserID as UserID,
@@ -4893,12 +5052,13 @@ declare namespace schemas {
4893
5052
  };
4894
5053
  }
4895
5054
 
4896
- declare type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
5055
+ type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
4897
5056
  interface XataApiClientOptions {
4898
5057
  fetch?: FetchImpl;
4899
5058
  apiKey?: string;
4900
5059
  host?: HostProvider;
4901
5060
  trace?: TraceFunction;
5061
+ clientName?: string;
4902
5062
  }
4903
5063
  declare class XataApiClient {
4904
5064
  #private;
@@ -5218,11 +5378,18 @@ declare class RecordsApi {
5218
5378
  records: Record<string, any>[];
5219
5379
  columns?: ColumnsProjection;
5220
5380
  }): Promise<BulkInsertResponse>;
5381
+ branchTransaction({ workspace, region, database, branch, operations }: {
5382
+ workspace: WorkspaceID;
5383
+ region: string;
5384
+ database: DBName;
5385
+ branch: BranchName;
5386
+ operations: TransactionOperation$1[];
5387
+ }): Promise<TransactionSuccess>;
5221
5388
  }
5222
5389
  declare class SearchAndFilterApi {
5223
5390
  private extraProps;
5224
5391
  constructor(extraProps: ApiExtraProps);
5225
- queryTable({ workspace, region, database, branch, table, filter, sort, page, columns }: {
5392
+ queryTable({ workspace, region, database, branch, table, filter, sort, page, columns, consistency }: {
5226
5393
  workspace: WorkspaceID;
5227
5394
  region: string;
5228
5395
  database: DBName;
@@ -5232,6 +5399,7 @@ declare class SearchAndFilterApi {
5232
5399
  sort?: SortExpression;
5233
5400
  page?: PageConfig;
5234
5401
  columns?: ColumnsProjection;
5402
+ consistency?: 'strong' | 'eventual';
5235
5403
  }): Promise<QueryResponse>;
5236
5404
  searchTable({ workspace, region, database, branch, table, query, fuzziness, target, prefix, filter, highlight, boosters }: {
5237
5405
  workspace: WorkspaceID;
@@ -5263,7 +5431,7 @@ declare class SearchAndFilterApi {
5263
5431
  prefix?: PrefixExpression;
5264
5432
  highlight?: HighlightExpression;
5265
5433
  }): Promise<SearchResponse>;
5266
- summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page }: {
5434
+ summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page, consistency }: {
5267
5435
  workspace: WorkspaceID;
5268
5436
  region: string;
5269
5437
  database: DBName;
@@ -5277,6 +5445,7 @@ declare class SearchAndFilterApi {
5277
5445
  page?: {
5278
5446
  size?: number;
5279
5447
  };
5448
+ consistency?: 'strong' | 'eventual';
5280
5449
  }): Promise<SummarizeResponse>;
5281
5450
  aggregateTable({ workspace, region, database, branch, table, filter, aggs }: {
5282
5451
  workspace: WorkspaceID;
@@ -5457,60 +5626,67 @@ declare class XataApiPlugin implements XataPlugin {
5457
5626
  build(options: XataPluginOptions): Promise<XataApiClient>;
5458
5627
  }
5459
5628
 
5460
- declare type StringKeys<O> = Extract<keyof O, string>;
5461
- declare type Values<O> = O[StringKeys<O>];
5462
- declare type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
5463
- declare type If<Condition, Then, Else> = Condition extends true ? Then : Else;
5464
- declare type IsObject<T> = T extends Record<string, any> ? true : false;
5465
- declare type IsArray<T> = T extends Array<any> ? true : false;
5466
- declare type RequiredBy<T, K extends keyof T> = T & {
5629
+ type StringKeys<O> = Extract<keyof O, string>;
5630
+ type Values<O> = O[StringKeys<O>];
5631
+ type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
5632
+ type If<Condition, Then, Else> = Condition extends true ? Then : Else;
5633
+ type IsObject<T> = T extends Record<string, any> ? true : false;
5634
+ type IsArray<T> = T extends Array<any> ? true : false;
5635
+ type RequiredBy<T, K extends keyof T> = T & {
5467
5636
  [P in K]-?: NonNullable<T[P]>;
5468
5637
  };
5469
- declare type GetArrayInnerType<T extends readonly any[]> = T[number];
5470
- declare type SingleOrArray<T> = T | T[];
5471
- declare type Dictionary<T> = Record<string, T>;
5472
- declare type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
5473
- declare type Without<T, U> = {
5638
+ type GetArrayInnerType<T extends readonly any[]> = T[number];
5639
+ type SingleOrArray<T> = T | T[];
5640
+ type Dictionary<T> = Record<string, T>;
5641
+ type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
5642
+ type Without<T, U> = {
5474
5643
  [P in Exclude<keyof T, keyof U>]?: never;
5475
5644
  };
5476
- declare type ExclusiveOr<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
5477
- declare type Explode<T> = keyof T extends infer K ? K extends unknown ? {
5645
+ type ExclusiveOr<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
5646
+ type Explode<T> = keyof T extends infer K ? K extends unknown ? {
5478
5647
  [I in keyof T]: I extends K ? T[I] : never;
5479
5648
  } : never : never;
5480
- declare type AtMostOne<T> = Explode<Partial<T>>;
5481
- declare type AtLeastOne<T, U = {
5649
+ type AtMostOne<T> = Explode<Partial<T>>;
5650
+ type AtLeastOne<T, U = {
5482
5651
  [K in keyof T]: Pick<T, K>;
5483
5652
  }> = Partial<T> & U[keyof U];
5484
- declare type ExactlyOne<T> = AtMostOne<T> & AtLeastOne<T>;
5653
+ type ExactlyOne<T> = AtMostOne<T> & AtLeastOne<T>;
5654
+ type Fn = (...args: any[]) => any;
5655
+ type NarrowRaw<A> = (A extends [] ? [] : never) | (A extends Narrowable ? A : never) | {
5656
+ [K in keyof A]: A[K] extends Fn ? A[K] : NarrowRaw<A[K]>;
5657
+ };
5658
+ type Narrowable = string | number | bigint | boolean;
5659
+ type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
5660
+ type Narrow<A> = Try<A, [], NarrowRaw<A>>;
5485
5661
 
5486
- declare type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
5487
- declare type WildcardColumns<O> = Values<{
5662
+ type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
5663
+ type WildcardColumns<O> = Values<{
5488
5664
  [K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
5489
5665
  }>;
5490
- declare type ColumnsByValue<O, Value> = Values<{
5666
+ type ColumnsByValue<O, Value> = Values<{
5491
5667
  [K in SelectableColumn<O>]: ValueAtColumn<O, K> extends infer C ? C extends Value ? K extends WildcardColumns<O> ? never : K : never : never;
5492
5668
  }>;
5493
- declare type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
5669
+ type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
5494
5670
  [K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
5495
5671
  }>>;
5496
- declare type ValueAtColumn<O, P extends SelectableColumn<O>> = P extends '*' ? Values<O> : P extends 'id' ? string : P extends keyof O ? O[P] : P extends `${infer K}.${infer V}` ? K extends keyof O ? Values<NonNullable<O[K]> extends infer Item ? Item extends Record<string, any> ? V extends SelectableColumn<Item> ? {
5672
+ type ValueAtColumn<O, P extends SelectableColumn<O>> = P extends '*' ? Values<O> : P extends 'id' ? string : P extends keyof O ? O[P] : P extends `${infer K}.${infer V}` ? K extends keyof O ? Values<NonNullable<O[K]> extends infer Item ? Item extends Record<string, any> ? V extends SelectableColumn<Item> ? {
5497
5673
  V: ValueAtColumn<Item, V>;
5498
5674
  } : never : O[K] : never> : never : never;
5499
- declare type MAX_RECURSION = 5;
5500
- declare type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
5675
+ type MAX_RECURSION = 5;
5676
+ type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
5501
5677
  [K in DataProps<O>]: NonNullable<O[K]> extends infer Item ? If<IsArray<Item>, K, // If the property is an array, we stop recursion. We don't support object arrays yet
5502
5678
  If<IsObject<Item>, Item extends XataRecord ? SelectableColumn<Item, [...RecursivePath, Item]> extends infer Column ? Column extends string ? K | `${K}.${Column}` : never : never : Item extends Date ? K : `${K}.${StringKeys<Item> | '*'}`, // This allows usage of objects that are not links
5503
5679
  K>> : never;
5504
5680
  }>, never>;
5505
- declare type DataProps<O> = Exclude<StringKeys<O>, StringKeys<XataRecord>>;
5506
- declare type NestedValueAtColumn<O, Key extends SelectableColumn<O>> = Key extends `${infer N}.${infer M}` ? N extends DataProps<O> ? {
5681
+ type DataProps<O> = Exclude<StringKeys<O>, StringKeys<XataRecord>>;
5682
+ type NestedValueAtColumn<O, Key extends SelectableColumn<O>> = Key extends `${infer N}.${infer M}` ? N extends DataProps<O> ? {
5507
5683
  [K in N]: M extends SelectableColumn<NonNullable<O[K]>> ? NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M> & XataRecord> : ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M>> : unknown;
5508
5684
  } : unknown : Key extends DataProps<O> ? {
5509
5685
  [K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], SelectedPick<NonNullable<O[K]>, ['*']>> : O[K];
5510
5686
  } : Key extends '*' ? {
5511
5687
  [K in StringKeys<O>]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Link<NonNullable<O[K]>>> : O[K];
5512
5688
  } : unknown;
5513
- declare type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
5689
+ type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
5514
5690
 
5515
5691
  /**
5516
5692
  * Represents an identifiable record from the database.
@@ -5594,8 +5770,8 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
5594
5770
  */
5595
5771
  delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
5596
5772
  }
5597
- declare type Link<Record extends XataRecord> = XataRecord<Record>;
5598
- declare type XataRecordMetadata = {
5773
+ type Link<Record extends XataRecord> = XataRecord<Record>;
5774
+ type XataRecordMetadata = {
5599
5775
  /**
5600
5776
  * Number that is increased every time the record is updated.
5601
5777
  */
@@ -5604,13 +5780,14 @@ declare type XataRecordMetadata = {
5604
5780
  };
5605
5781
  declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
5606
5782
  declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
5607
- declare type EditableData<O extends XataRecord> = Identifiable & Omit<{
5608
- [K in keyof O]: O[K] extends XataRecord ? {
5609
- id: string;
5610
- } | string : NonNullable<O[K]> extends XataRecord ? {
5611
- id: string;
5612
- } | string | null | undefined : O[K];
5613
- }, keyof XataRecord>;
5783
+ type EditableDataFields<T> = T extends XataRecord ? {
5784
+ id: string;
5785
+ } | string : NonNullable<T> extends XataRecord ? {
5786
+ id: string;
5787
+ } | string | null | undefined : T extends Date ? string | Date : NonNullable<T> extends Date ? string | Date | null | undefined : T;
5788
+ type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
5789
+ [K in keyof O]: EditableDataFields<O[K]>;
5790
+ }, keyof XataRecord>>;
5614
5791
 
5615
5792
  /**
5616
5793
  * PropertyMatchFilter
@@ -5630,10 +5807,10 @@ declare type EditableData<O extends XataRecord> = Identifiable & Omit<{
5630
5807
  }
5631
5808
  }
5632
5809
  */
5633
- declare type PropertyAccessFilter<Record> = {
5810
+ type PropertyAccessFilter<Record> = {
5634
5811
  [key in ColumnsByValue<Record, any>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
5635
5812
  };
5636
- declare type PropertyFilter<T> = T | {
5813
+ type PropertyFilter<T> = T | {
5637
5814
  $is: T;
5638
5815
  } | {
5639
5816
  $isNot: T;
@@ -5642,26 +5819,26 @@ declare type PropertyFilter<T> = T | {
5642
5819
  } | {
5643
5820
  $none: T[];
5644
5821
  } | ValueTypeFilters<T>;
5645
- declare type IncludesFilter<T> = PropertyFilter<T> | {
5822
+ type IncludesFilter<T> = PropertyFilter<T> | {
5646
5823
  [key in '$all' | '$none' | '$any']?: IncludesFilter<T> | Array<IncludesFilter<T> | {
5647
5824
  $not: IncludesFilter<T>;
5648
5825
  }>;
5649
5826
  };
5650
- declare type StringTypeFilter = {
5827
+ type StringTypeFilter = {
5651
5828
  [key in '$contains' | '$pattern' | '$startsWith' | '$endsWith']?: string;
5652
5829
  };
5653
- declare type ComparableType = number | Date;
5654
- declare type ComparableTypeFilter<T extends ComparableType> = {
5830
+ type ComparableType = number | Date;
5831
+ type ComparableTypeFilter<T extends ComparableType> = {
5655
5832
  [key in '$gt' | '$lt' | '$ge' | '$le']?: T;
5656
5833
  };
5657
- declare type ArrayFilter<T> = {
5834
+ type ArrayFilter<T> = {
5658
5835
  [key in '$includes']?: SingleOrArray<PropertyFilter<T> | ValueTypeFilters<T>> | IncludesFilter<T>;
5659
5836
  } | {
5660
5837
  [key in '$includesAll' | '$includesNone' | '$includesAny']?: T | Array<PropertyFilter<T> | {
5661
5838
  $not: PropertyFilter<T>;
5662
5839
  }>;
5663
5840
  };
5664
- declare type ValueTypeFilters<T> = T | T extends string ? StringTypeFilter : T extends number ? ComparableTypeFilter<number> : T extends Date ? ComparableTypeFilter<Date> : T extends Array<infer T> ? ArrayFilter<T> : never;
5841
+ type ValueTypeFilters<T> = T | T extends string ? StringTypeFilter : T extends number ? ComparableTypeFilter<number> : T extends Date ? ComparableTypeFilter<Date> : T extends Array<infer T> ? ArrayFilter<T> : never;
5665
5842
  /**
5666
5843
  * AggregatorFilter
5667
5844
  * Example:
@@ -5685,60 +5862,104 @@ declare type ValueTypeFilters<T> = T | T extends string ? StringTypeFilter : T e
5685
5862
  ],
5686
5863
  }
5687
5864
  */
5688
- declare type AggregatorFilter<T> = {
5865
+ type AggregatorFilter<T> = {
5689
5866
  [key in '$all' | '$any' | '$not' | '$none']?: SingleOrArray<Filter<T>>;
5690
5867
  };
5691
5868
  /**
5692
5869
  * Existance filter
5693
5870
  * Example: { filter: { $exists: "settings" } }
5694
5871
  */
5695
- declare type ExistanceFilter<Record> = {
5872
+ type ExistanceFilter<Record> = {
5696
5873
  [key in '$exists' | '$notExists']?: ColumnsByValue<Record, any>;
5697
5874
  };
5698
- declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
5875
+ type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
5699
5876
  /**
5700
5877
  * Nested filter
5701
5878
  * Injects the Api filters on nested properties
5702
5879
  * Example: { filter: { settings: { plan: { $any: ['free', 'trial'] } } } }
5703
5880
  */
5704
- declare type NestedApiFilter<T> = {
5881
+ type NestedApiFilter<T> = {
5705
5882
  [key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
5706
5883
  };
5707
- declare type Filter<T> = T extends Record<string, any> ? T extends (infer ArrayType)[] ? ArrayType | ArrayType[] | ArrayFilter<ArrayType> | ArrayFilter<ArrayType[]> : T extends Date ? PropertyFilter<T> : BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
5884
+ type Filter<T> = T extends Record<string, any> ? T extends (infer ArrayType)[] ? ArrayType | ArrayType[] | ArrayFilter<ArrayType> | ArrayFilter<ArrayType[]> : T extends Date ? PropertyFilter<T> : BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
5708
5885
 
5709
- declare type DateBooster = {
5886
+ type DateBooster = {
5710
5887
  origin?: string;
5711
5888
  scale: string;
5712
5889
  decay: number;
5713
5890
  };
5714
- declare type NumericBooster = {
5891
+ type NumericBooster = {
5715
5892
  factor: number;
5716
- };
5717
- declare type ValueBooster<T extends string | number | boolean> = {
5893
+ /**
5894
+ * Modifier to be applied to the column value, before being multiplied with the factor. The possible values are:
5895
+ * - none (default).
5896
+ * - log: common logarithm (base 10)
5897
+ * - log1p: add 1 then take the common logarithm. This ensures that the value is positive if the
5898
+ * value is between 0 and 1.
5899
+ * - ln: natural logarithm (base e)
5900
+ * - ln1p: add 1 then take the natural logarithm. This ensures that the value is positive if the
5901
+ * value is between 0 and 1.
5902
+ * - square: raise the value to the power of two.
5903
+ * - sqrt: take the square root of the value.
5904
+ * - reciprocal: reciprocate the value (if the value is `x`, the reciprocal is `1/x`).
5905
+ */
5906
+ modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
5907
+ };
5908
+ type ValueBooster<T extends string | number | boolean> = {
5718
5909
  value: T;
5719
5910
  factor: number;
5720
- };
5721
- declare type Boosters<O extends XataRecord> = Values<{
5911
+ /**
5912
+ * Modifier to be applied to the column value, before being multiplied with the factor. The possible values are:
5913
+ * - none (default).
5914
+ * - log: common logarithm (base 10)
5915
+ * - log1p: add 1 then take the common logarithm. This ensures that the value is positive if the
5916
+ * value is between 0 and 1.
5917
+ * - ln: natural logarithm (base e)
5918
+ * - ln1p: add 1 then take the natural logarithm. This ensures that the value is positive if the
5919
+ * value is between 0 and 1.
5920
+ * - square: raise the value to the power of two.
5921
+ * - sqrt: take the square root of the value.
5922
+ * - reciprocal: reciprocate the value (if the value is `x`, the reciprocal is `1/x`).
5923
+ */
5924
+ modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
5925
+ };
5926
+ type Boosters<O extends XataRecord> = Values<{
5722
5927
  [K in SelectableColumn<O>]: NonNullable<ValueAtColumn<O, K>> extends Date ? {
5723
5928
  dateBooster: {
5724
5929
  column: K;
5930
+ /**
5931
+ * Only apply this booster to the records for which the provided filter matches.
5932
+ */
5933
+ ifMatchesFilter?: Filter<O>;
5725
5934
  } & DateBooster;
5726
5935
  } : NonNullable<ValueAtColumn<O, K>> extends number ? ExclusiveOr<{
5727
5936
  numericBooster?: {
5728
5937
  column: K;
5938
+ /**
5939
+ * Only apply this booster to the records for which the provided filter matches.
5940
+ */
5941
+ ifMatchesFilter?: Filter<O>;
5729
5942
  } & NumericBooster;
5730
5943
  }, {
5731
5944
  valueBooster?: {
5732
5945
  column: K;
5946
+ /**
5947
+ * Only apply this booster to the records for which the provided filter matches.
5948
+ */
5949
+ ifMatchesFilter?: Filter<O>;
5733
5950
  } & ValueBooster<number>;
5734
5951
  }> : NonNullable<ValueAtColumn<O, K>> extends string | boolean ? {
5735
5952
  valueBooster: {
5736
5953
  column: K;
5954
+ /**
5955
+ * Only apply this booster to the records for which the provided filter matches.
5956
+ */
5957
+ ifMatchesFilter?: Filter<O>;
5737
5958
  } & ValueBooster<NonNullable<ValueAtColumn<O, K>>>;
5738
5959
  } : never;
5739
5960
  }>;
5740
5961
 
5741
- declare type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
5962
+ type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
5742
5963
  /**
5743
5964
  * The name of the column.
5744
5965
  */
@@ -5753,7 +5974,7 @@ declare type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
5753
5974
  weight?: number;
5754
5975
  };
5755
5976
 
5756
- declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
5977
+ type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
5757
5978
  fuzziness?: FuzzinessExpression;
5758
5979
  prefix?: PrefixExpression;
5759
5980
  highlight?: HighlightExpression;
@@ -5765,8 +5986,9 @@ declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables exte
5765
5986
  boosters?: Boosters<Schemas[Model] & XataRecord>[];
5766
5987
  };
5767
5988
  }>>;
5989
+ page?: SearchPageConfig;
5768
5990
  };
5769
- declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
5991
+ type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
5770
5992
  all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
5771
5993
  [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
5772
5994
  table: Model;
@@ -5780,13 +6002,13 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
5780
6002
  declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
5781
6003
  #private;
5782
6004
  private db;
5783
- constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
6005
+ constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
5784
6006
  build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
5785
6007
  }
5786
- declare type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
6008
+ type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
5787
6009
  getMetadata: () => XataRecordMetadata & SearchExtraProperties;
5788
6010
  };
5789
- declare type SearchExtraProperties = {
6011
+ type SearchExtraProperties = {
5790
6012
  table: string;
5791
6013
  highlight?: {
5792
6014
  [key: string]: string[] | {
@@ -5795,15 +6017,15 @@ declare type SearchExtraProperties = {
5795
6017
  };
5796
6018
  score?: number;
5797
6019
  };
5798
- declare type ReturnTable<Table, Tables> = Table extends Tables ? Table : never;
5799
- declare type ExtractTables<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>, TableOptions extends GetArrayInnerType<NonNullable<NonNullable<SearchOptions<Schemas, Tables>>['tables']>>> = TableOptions extends `${infer Table}` ? ReturnTable<Table, Tables> : TableOptions extends {
6020
+ type ReturnTable<Table, Tables> = Table extends Tables ? Table : never;
6021
+ type ExtractTables<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>, TableOptions extends GetArrayInnerType<NonNullable<NonNullable<SearchOptions<Schemas, Tables>>['tables']>>> = TableOptions extends `${infer Table}` ? ReturnTable<Table, Tables> : TableOptions extends {
5800
6022
  table: infer Table;
5801
6023
  } ? ReturnTable<Table, Tables> : never;
5802
6024
 
5803
6025
  /**
5804
6026
  * The description of a single aggregation operation. The key represents the
5805
6027
  */
5806
- declare type AggregationExpression<O extends XataRecord> = ExactlyOne<{
6028
+ type AggregationExpression<O extends XataRecord> = ExactlyOne<{
5807
6029
  count: CountAggregation<O>;
5808
6030
  sum: SumAggregation<O>;
5809
6031
  max: MaxAggregation<O>;
@@ -5814,23 +6036,23 @@ declare type AggregationExpression<O extends XataRecord> = ExactlyOne<{
5814
6036
  topValues: TopValuesAggregation<O>;
5815
6037
  numericHistogram: NumericHistogramAggregation<O>;
5816
6038
  }>;
5817
- declare type AggregationResult<Record extends XataRecord, Expression extends Dictionary<AggregationExpression<Record>>> = {
6039
+ type AggregationResult<Record extends XataRecord, Expression extends Dictionary<AggregationExpression<Record>>> = {
5818
6040
  aggs: {
5819
6041
  [K in keyof Expression]: AggregationResultItem<Record, Expression[K]>;
5820
6042
  };
5821
6043
  };
5822
- declare type AggregationExpressionType<T extends AggregationExpression<any>> = keyof T;
5823
- declare type AggregationResultItem<Record extends XataRecord, Expression extends AggregationExpression<Record>> = AggregationExpressionType<Expression> extends infer Type ? Type extends keyof AggregationExpressionResultTypes ? AggregationExpressionResultTypes[Type] : never : never;
6044
+ type AggregationExpressionType<T extends AggregationExpression<any>> = keyof T;
6045
+ type AggregationResultItem<Record extends XataRecord, Expression extends AggregationExpression<Record>> = AggregationExpressionType<Expression> extends infer Type ? Type extends keyof AggregationExpressionResultTypes ? AggregationExpressionResultTypes[Type] : never : never;
5824
6046
  /**
5825
6047
  * Count the number of records with an optional filter.
5826
6048
  */
5827
- declare type CountAggregation<O extends XataRecord> = {
6049
+ type CountAggregation<O extends XataRecord> = {
5828
6050
  filter?: Filter<O>;
5829
6051
  } | '*';
5830
6052
  /**
5831
6053
  * The sum of the numeric values in a particular column.
5832
6054
  */
5833
- declare type SumAggregation<O extends XataRecord> = {
6055
+ type SumAggregation<O extends XataRecord> = {
5834
6056
  /**
5835
6057
  * The column on which to compute the sum. Must be a numeric type.
5836
6058
  */
@@ -5839,7 +6061,7 @@ declare type SumAggregation<O extends XataRecord> = {
5839
6061
  /**
5840
6062
  * The max of the numeric values in a particular column.
5841
6063
  */
5842
- declare type MaxAggregation<O extends XataRecord> = {
6064
+ type MaxAggregation<O extends XataRecord> = {
5843
6065
  /**
5844
6066
  * The column on which to compute the max. Must be a numeric type.
5845
6067
  */
@@ -5848,7 +6070,7 @@ declare type MaxAggregation<O extends XataRecord> = {
5848
6070
  /**
5849
6071
  * The min of the numeric values in a particular column.
5850
6072
  */
5851
- declare type MinAggregation<O extends XataRecord> = {
6073
+ type MinAggregation<O extends XataRecord> = {
5852
6074
  /**
5853
6075
  * The column on which to compute the min. Must be a numeric type.
5854
6076
  */
@@ -5857,7 +6079,7 @@ declare type MinAggregation<O extends XataRecord> = {
5857
6079
  /**
5858
6080
  * The average of the numeric values in a particular column.
5859
6081
  */
5860
- declare type AverageAggregation<O extends XataRecord> = {
6082
+ type AverageAggregation<O extends XataRecord> = {
5861
6083
  /**
5862
6084
  * The column on which to compute the average. Must be a numeric type.
5863
6085
  */
@@ -5866,7 +6088,7 @@ declare type AverageAggregation<O extends XataRecord> = {
5866
6088
  /**
5867
6089
  * Count the number of distinct values in a particular column.
5868
6090
  */
5869
- declare type UniqueCountAggregation<O extends XataRecord> = {
6091
+ type UniqueCountAggregation<O extends XataRecord> = {
5870
6092
  /**
5871
6093
  * The column from where to count the unique values.
5872
6094
  */
@@ -5881,7 +6103,7 @@ declare type UniqueCountAggregation<O extends XataRecord> = {
5881
6103
  /**
5882
6104
  * Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
5883
6105
  */
5884
- declare type DateHistogramAggregation<O extends XataRecord> = {
6106
+ type DateHistogramAggregation<O extends XataRecord> = {
5885
6107
  /**
5886
6108
  * The column to use for bucketing. Must be of type datetime.
5887
6109
  */
@@ -5912,7 +6134,7 @@ declare type DateHistogramAggregation<O extends XataRecord> = {
5912
6134
  * Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
5913
6135
  * The top values as ordered by the number of records (`$count``) are returned.
5914
6136
  */
5915
- declare type TopValuesAggregation<O extends XataRecord> = {
6137
+ type TopValuesAggregation<O extends XataRecord> = {
5916
6138
  /**
5917
6139
  * The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
5918
6140
  */
@@ -5929,7 +6151,7 @@ declare type TopValuesAggregation<O extends XataRecord> = {
5929
6151
  /**
5930
6152
  * Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
5931
6153
  */
5932
- declare type NumericHistogramAggregation<O extends XataRecord> = {
6154
+ type NumericHistogramAggregation<O extends XataRecord> = {
5933
6155
  /**
5934
6156
  * The column to use for bucketing. Must be of numeric type.
5935
6157
  */
@@ -5952,7 +6174,7 @@ declare type NumericHistogramAggregation<O extends XataRecord> = {
5952
6174
  offset?: number;
5953
6175
  aggs?: Dictionary<AggregationExpression<O>>;
5954
6176
  };
5955
- declare type AggregationExpressionResultTypes = {
6177
+ type AggregationExpressionResultTypes = {
5956
6178
  count: number;
5957
6179
  sum: number | null;
5958
6180
  max: number | null;
@@ -5963,7 +6185,7 @@ declare type AggregationExpressionResultTypes = {
5963
6185
  topValues: ComplexAggregationResult;
5964
6186
  numericHistogram: ComplexAggregationResult;
5965
6187
  };
5966
- declare type ComplexAggregationResult = {
6188
+ type ComplexAggregationResult = {
5967
6189
  values: Array<{
5968
6190
  $key: string | number;
5969
6191
  $count: number;
@@ -5971,22 +6193,26 @@ declare type ComplexAggregationResult = {
5971
6193
  }>;
5972
6194
  };
5973
6195
 
5974
- declare type SortDirection = 'asc' | 'desc';
5975
- declare type SortFilterExtended<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = {
6196
+ type SortDirection = 'asc' | 'desc';
6197
+ type SortFilterExtended<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = {
5976
6198
  column: Columns;
5977
6199
  direction?: SortDirection;
5978
6200
  };
5979
- declare type SortFilter<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns>;
5980
- declare type SortFilterBase<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Values<{
6201
+ type SortFilter<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns>;
6202
+ type SortFilterBase<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Values<{
5981
6203
  [Key in Columns]: {
5982
6204
  [K in Key]: SortDirection;
5983
6205
  };
5984
6206
  }>;
5985
6207
 
5986
- declare type SummarizeExpression<O extends XataRecord> = ExactlyOne<{
6208
+ type SummarizeExpression<O extends XataRecord> = ExactlyOne<{
5987
6209
  count: ColumnsByValue<O, any> | '*';
6210
+ min: ColumnsByValue<O, string | number | Date | any[]>;
6211
+ max: ColumnsByValue<O, string | number | Date | any[]>;
6212
+ sum: ColumnsByValue<O, number>;
6213
+ average: ColumnsByValue<O, number>;
5988
6214
  }>;
5989
- declare type SummarizeParams<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
6215
+ type SummarizeParams<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
5990
6216
  summaries?: Expression;
5991
6217
  summariesFilter?: SummarizeFilter<Record, Expression>;
5992
6218
  filter?: Filter<Record>;
@@ -5996,38 +6222,40 @@ declare type SummarizeParams<Record extends XataRecord, Expression extends Dicti
5996
6222
  size: number;
5997
6223
  };
5998
6224
  };
5999
- declare type SummarizeResult<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
6225
+ type SummarizeResult<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
6000
6226
  summaries: SummarizeResultItem<Record, Expression, Columns>[];
6001
6227
  };
6002
- declare type SummarizeExpressionResultTypes<Value> = {
6228
+ type SummarizeExpressionResultTypes<Value> = {
6003
6229
  count: number;
6004
6230
  min: Value;
6005
6231
  max: Value;
6006
6232
  sum: number;
6007
- avg: number;
6233
+ average: number;
6008
6234
  };
6009
- declare type SummarizeSort<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = SingleOrArray<SortFilter<Record, ColumnsByValue<Record, any> | StringKeys<Expression>>>;
6010
- declare type SummarizeValuePick<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = {
6235
+ type SummarizeSort<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = SingleOrArray<SortFilter<Record, ColumnsByValue<Record, any> | StringKeys<Expression>>>;
6236
+ type SummarizeValuePick<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = {
6011
6237
  [K in StringKeys<Expression>]: StringKeys<Expression[K]> extends infer SummarizeOperation ? SummarizeOperation extends keyof Expression[K] ? Expression[K][SummarizeOperation] extends infer Column ? Column extends SelectableColumn<Record> ? SummarizeOperation extends keyof SummarizeExpressionResultTypes<any> ? SummarizeExpressionResultTypes<ValueAtColumn<Record, Column>>[SummarizeOperation] : never : never : never : never : never;
6012
6238
  };
6013
- declare type SummarizeFilter<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = Filter<Record> & Filter<SummarizeValuePick<Record, Expression>>;
6014
- declare type SummarizeResultItem<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = SummarizeValuePick<Record, Expression> & SelectedPick<Record, Columns>;
6239
+ type SummarizeFilter<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = Filter<Record & SummarizeValuePick<Record, Expression>>;
6240
+ type SummarizeResultItem<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = SummarizeValuePick<Record, Expression> & SelectedPick<Record, Columns>;
6015
6241
 
6016
- declare type BaseOptions<T extends XataRecord> = {
6242
+ type BaseOptions<T extends XataRecord> = {
6017
6243
  columns?: SelectableColumn<T>[];
6244
+ consistency?: 'strong' | 'eventual';
6018
6245
  cache?: number;
6246
+ fetchOptions?: Record<string, unknown>;
6019
6247
  };
6020
- declare type CursorQueryOptions = {
6248
+ type CursorQueryOptions = {
6021
6249
  pagination?: CursorNavigationOptions & OffsetNavigationOptions;
6022
6250
  filter?: never;
6023
- sort?: never | unknown;
6251
+ sort?: never;
6024
6252
  };
6025
- declare type OffsetQueryOptions<T extends XataRecord> = {
6253
+ type OffsetQueryOptions<T extends XataRecord> = {
6026
6254
  pagination?: OffsetNavigationOptions;
6027
6255
  filter?: FilterExpression;
6028
6256
  sort?: SingleOrArray<SortFilter<T>>;
6029
6257
  };
6030
- declare type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions | OffsetQueryOptions<T>);
6258
+ type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions | OffsetQueryOptions<T>);
6031
6259
  /**
6032
6260
  * Query objects contain the information of all filters, sorting, etc. to be included in the database query.
6033
6261
  *
@@ -6091,10 +6319,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6091
6319
  * })
6092
6320
  * ```
6093
6321
  *
6094
- * @param filters A filter object
6322
+ * @param filter A filter object
6095
6323
  * @returns A new Query object.
6096
6324
  */
6097
- filter(filters?: Filter<Record>): Query<Record, Result>;
6325
+ filter(filter?: Filter<Record>): Query<Record, Result>;
6098
6326
  /**
6099
6327
  * Builds a new query with a new sort option.
6100
6328
  * @param column The column name.
@@ -6257,24 +6485,24 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6257
6485
  */
6258
6486
  previousPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6259
6487
  /**
6260
- * Retrieve first page of records
6488
+ * Retrieve start page of records
6261
6489
  *
6262
6490
  * @returns A new page object
6263
6491
  */
6264
- firstPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6492
+ startPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6265
6493
  /**
6266
6494
  * Retrieve last page of records
6267
6495
  *
6268
6496
  * @returns A new page object
6269
6497
  */
6270
- lastPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6498
+ endPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6271
6499
  /**
6272
6500
  * @returns Boolean indicating if there is a next page
6273
6501
  */
6274
6502
  hasNextPage(): boolean;
6275
6503
  }
6276
6504
 
6277
- declare type PaginationQueryMeta = {
6505
+ type PaginationQueryMeta = {
6278
6506
  page: {
6279
6507
  cursor: string;
6280
6508
  more: boolean;
@@ -6285,8 +6513,8 @@ interface Paginable<Record extends XataRecord, Result extends XataRecord = Recor
6285
6513
  records: RecordArray<Result>;
6286
6514
  nextPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6287
6515
  previousPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6288
- firstPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6289
- lastPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6516
+ startPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6517
+ endPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6290
6518
  hasNextPage(): boolean;
6291
6519
  }
6292
6520
  /**
@@ -6319,34 +6547,34 @@ declare class Page<Record extends XataRecord, Result extends XataRecord = Record
6319
6547
  */
6320
6548
  previousPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6321
6549
  /**
6322
- * Retrieves the first page of results.
6550
+ * Retrieves the start page of results.
6323
6551
  * @param size Maximum number of results to be retrieved.
6324
6552
  * @param offset Number of results to skip when retrieving the results.
6325
- * @returns The first page or results.
6553
+ * @returns The start page or results.
6326
6554
  */
6327
- firstPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6555
+ startPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6328
6556
  /**
6329
- * Retrieves the last page of results.
6557
+ * Retrieves the end page of results.
6330
6558
  * @param size Maximum number of results to be retrieved.
6331
6559
  * @param offset Number of results to skip when retrieving the results.
6332
- * @returns The last page or results.
6560
+ * @returns The end page or results.
6333
6561
  */
6334
- lastPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6562
+ endPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
6335
6563
  /**
6336
6564
  * Shortcut method to check if there will be additional results if the next page of results is retrieved.
6337
6565
  * @returns Whether or not there will be additional results in the next page of results.
6338
6566
  */
6339
6567
  hasNextPage(): boolean;
6340
6568
  }
6341
- declare type CursorNavigationOptions = {
6342
- first?: string;
6569
+ type CursorNavigationOptions = {
6570
+ start?: string;
6343
6571
  } | {
6344
- last?: string;
6572
+ end?: string;
6345
6573
  } | {
6346
6574
  after?: string;
6347
6575
  before?: string;
6348
6576
  };
6349
- declare type OffsetNavigationOptions = {
6577
+ type OffsetNavigationOptions = {
6350
6578
  size?: number;
6351
6579
  offset?: number;
6352
6580
  };
@@ -6374,17 +6602,17 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
6374
6602
  */
6375
6603
  previousPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
6376
6604
  /**
6377
- * Retrieve first page of records
6605
+ * Retrieve start page of records
6378
6606
  *
6379
6607
  * @returns A new array of objects
6380
6608
  */
6381
- firstPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
6609
+ startPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
6382
6610
  /**
6383
- * Retrieve last page of records
6611
+ * Retrieve end page of records
6384
6612
  *
6385
6613
  * @returns A new array of objects
6386
6614
  */
6387
- lastPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
6615
+ endPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
6388
6616
  /**
6389
6617
  * @returns Boolean indicating if there is a next page
6390
6618
  */
@@ -6883,6 +7111,8 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
6883
7111
  highlight?: HighlightExpression;
6884
7112
  filter?: Filter<Record>;
6885
7113
  boosters?: Boosters<Record>[];
7114
+ page?: SearchPageConfig;
7115
+ target?: TargetColumn<Record>[];
6886
7116
  }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
6887
7117
  /**
6888
7118
  * Aggregates records in the table.
@@ -7009,13 +7239,15 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7009
7239
  highlight?: HighlightExpression;
7010
7240
  filter?: Filter<Record>;
7011
7241
  boosters?: Boosters<Record>[];
7242
+ page?: SearchPageConfig;
7243
+ target?: TargetColumn<Record>[];
7012
7244
  }): Promise<any>;
7013
7245
  aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
7014
7246
  query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
7015
7247
  summarizeTable<Result extends XataRecord>(query: Query<Record, Result>, summaries?: Dictionary<SummarizeExpression<Record>>, summariesFilter?: FilterExpression): Promise<SummarizeResponse>;
7016
7248
  }
7017
7249
 
7018
- declare type BaseSchema = {
7250
+ type BaseSchema = {
7019
7251
  name: string;
7020
7252
  columns: readonly ({
7021
7253
  name: string;
@@ -7036,13 +7268,13 @@ declare type BaseSchema = {
7036
7268
  }[];
7037
7269
  })[];
7038
7270
  };
7039
- declare type SchemaInference<T extends readonly BaseSchema[]> = T extends never[] ? Record<string, Record<string, any>> : T extends readonly unknown[] ? T[number] extends {
7271
+ type SchemaInference<T extends readonly BaseSchema[]> = T extends never[] ? Record<string, Record<string, any>> : T extends readonly unknown[] ? T[number] extends {
7040
7272
  name: string;
7041
7273
  columns: readonly unknown[];
7042
7274
  } ? {
7043
7275
  [K in T[number]['name']]: TableType<T[number], K>;
7044
7276
  } : never : never;
7045
- declare type TableType<Tables, TableName> = Tables & {
7277
+ type TableType<Tables, TableName> = Tables & {
7046
7278
  name: TableName;
7047
7279
  } extends infer Table ? Table extends {
7048
7280
  name: string;
@@ -7053,7 +7285,7 @@ declare type TableType<Tables, TableName> = Tables & {
7053
7285
  } ? Identifiable & UnionToIntersection<Values<{
7054
7286
  [K in Columns[number]['name']]: PropertyType<Tables, Columns[number], K>;
7055
7287
  }>> : never : never : never : never;
7056
- declare type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Properties & {
7288
+ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Properties & {
7057
7289
  name: PropertyName;
7058
7290
  } extends infer Property ? Property extends {
7059
7291
  name: string;
@@ -7068,7 +7300,7 @@ declare type PropertyType<Tables, Properties, PropertyName extends PropertyKey>
7068
7300
  } : {
7069
7301
  [K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
7070
7302
  } : never : never;
7071
- declare 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 {
7303
+ 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 {
7072
7304
  name: string;
7073
7305
  type: string;
7074
7306
  } ? UnionToIntersection<Values<{
@@ -7176,36 +7408,120 @@ declare const includesNone: <T>(value: T) => ArrayFilter<T>;
7176
7408
  */
7177
7409
  declare const includesAny: <T>(value: T) => ArrayFilter<T>;
7178
7410
 
7179
- declare type SchemaDefinition = {
7411
+ type SchemaDefinition = {
7180
7412
  table: string;
7181
7413
  };
7182
- declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
7414
+ type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
7183
7415
  [Key in keyof Schemas]: Repository<Schemas[Key]>;
7184
7416
  };
7185
7417
  declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
7186
7418
  #private;
7187
- constructor(schemaTables?: Schemas.Table[]);
7419
+ constructor(schemaTables?: Table[]);
7188
7420
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
7189
7421
  }
7190
7422
 
7191
- declare type BranchStrategyValue = string | undefined | null;
7192
- declare type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
7193
- declare type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
7194
- declare type BranchStrategyOption = NonNullable<BranchStrategy | BranchStrategy[]>;
7423
+ type TransactionOperation<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
7424
+ insert: Values<{
7425
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
7426
+ table: Model;
7427
+ } & InsertTransactionOperation<Schemas[Model] & XataRecord>;
7428
+ }>;
7429
+ } | {
7430
+ update: Values<{
7431
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
7432
+ table: Model;
7433
+ } & UpdateTransactionOperation<Schemas[Model] & XataRecord>;
7434
+ }>;
7435
+ } | {
7436
+ delete: Values<{
7437
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
7438
+ table: Model;
7439
+ } & DeleteTransactionOperation;
7440
+ }>;
7441
+ };
7442
+ type InsertTransactionOperation<O extends XataRecord> = {
7443
+ record: Partial<EditableData<O>>;
7444
+ ifVersion?: number;
7445
+ createOnly?: boolean;
7446
+ };
7447
+ type UpdateTransactionOperation<O extends XataRecord> = {
7448
+ id: string;
7449
+ fields: Partial<EditableData<O>>;
7450
+ ifVersion?: number;
7451
+ upsert?: boolean;
7452
+ };
7453
+ type DeleteTransactionOperation = {
7454
+ id: string;
7455
+ };
7456
+ type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Table>> = Operation extends {
7457
+ insert: {
7458
+ table: Table;
7459
+ record: {
7460
+ id: infer Id;
7461
+ };
7462
+ };
7463
+ } ? {
7464
+ operation: 'insert';
7465
+ id: Id;
7466
+ rows: number;
7467
+ } : Operation extends {
7468
+ insert: {
7469
+ table: Table;
7470
+ };
7471
+ } ? {
7472
+ operation: 'insert';
7473
+ id: string;
7474
+ rows: number;
7475
+ } : Operation extends {
7476
+ update: {
7477
+ table: Table;
7478
+ id: infer Id;
7479
+ };
7480
+ } ? {
7481
+ operation: 'update';
7482
+ id: Id;
7483
+ rows: number;
7484
+ } : Operation extends {
7485
+ delete: {
7486
+ table: Table;
7487
+ };
7488
+ } ? {
7489
+ operation: 'delete';
7490
+ rows: number;
7491
+ } : never;
7492
+ type TransactionOperationResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = Operations extends [infer Head, ...infer Rest] ? Head extends TransactionOperation<Schema, Table> ? Rest extends TransactionOperation<Schema, Table>[] ? [TransactionOperationSingleResult<Schema, Table, Head>, ...TransactionOperationResults<Schema, Table, Rest>] : never : never : [];
7493
+ type TransactionResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = {
7494
+ results: TransactionOperationResults<Schema, Table, Operations>;
7495
+ };
7496
+
7497
+ type TransactionPluginResult<Schemas extends Record<string, XataRecord>> = {
7498
+ run: <Tables extends StringKeys<Schemas>, Operations extends TransactionOperation<Schemas, Tables>[]>(operations: Narrow<Operations>) => Promise<TransactionResults<Schemas, Tables, Operations>>;
7499
+ };
7500
+ declare class TransactionPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
7501
+ build({ getFetchProps }: XataPluginOptions): TransactionPluginResult<Schemas>;
7502
+ }
7503
+
7504
+ type BranchStrategyValue = string | undefined | null;
7505
+ type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
7506
+ type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
7507
+ type BranchStrategyOption = NonNullable<BranchStrategy | BranchStrategy[]>;
7195
7508
 
7196
- declare type BaseClientOptions = {
7509
+ type BaseClientOptions = {
7197
7510
  fetch?: FetchImpl;
7198
7511
  apiKey?: string;
7199
7512
  databaseURL?: string;
7200
7513
  branch?: BranchStrategyOption;
7201
7514
  cache?: CacheImpl;
7202
7515
  trace?: TraceFunction;
7516
+ enableBrowser?: boolean;
7517
+ clientName?: string;
7203
7518
  };
7204
7519
  declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
7205
7520
  interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
7206
7521
  new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
7207
7522
  db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
7208
7523
  search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
7524
+ transactions: Awaited<ReturnType<TransactionPlugin<Schemas>['build']>>;
7209
7525
  }, keyof Plugins> & {
7210
7526
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
7211
7527
  } & {
@@ -7225,13 +7541,21 @@ declare class Serializer {
7225
7541
  toJSON<T>(data: T): string;
7226
7542
  fromJSON<T>(json: string): T;
7227
7543
  }
7228
- declare const serialize: <T>(data: T) => string;
7229
- declare const deserialize: <T>(json: string) => T;
7544
+ type SerializedString<T> = string | (string & {
7545
+ __type: T;
7546
+ });
7547
+ type DeserializedType<T> = T extends SerializedString<infer U> ? U : T;
7548
+ declare const serialize: <T>(data: T) => SerializedString<T>;
7549
+ declare const deserialize: <T extends SerializedString<any>>(json: T) => SerializerResult<DeserializedType<T>>;
7550
+ type SerializerResult<T> = T extends XataRecord ? Identifiable & Omit<{
7551
+ [K in keyof T]: SerializerResult<T[K]>;
7552
+ }, keyof XataRecord> : T extends any[] ? SerializerResult<T[number]>[] : T;
7230
7553
 
7231
- declare type BranchResolutionOptions = {
7554
+ type BranchResolutionOptions = {
7232
7555
  databaseURL?: string;
7233
7556
  apiKey?: string;
7234
7557
  fetchImpl?: FetchImpl;
7558
+ clientName?: string;
7235
7559
  };
7236
7560
  declare function getCurrentBranchName(options?: BranchResolutionOptions): Promise<string>;
7237
7561
  declare function getCurrentBranchDetails(options?: BranchResolutionOptions): Promise<DBBranch | null>;
@@ -7259,7 +7583,7 @@ interface File extends Blob {
7259
7583
  readonly name: string;
7260
7584
  readonly webkitRelativePath: string;
7261
7585
  }
7262
- declare type FormDataEntryValue = File | string;
7586
+ type FormDataEntryValue = File | string;
7263
7587
  /** 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". */
7264
7588
  interface FormData {
7265
7589
  append(name: string, value: string | Blob, fileName?: string): void;
@@ -7307,21 +7631,21 @@ interface Request extends Body {
7307
7631
  clone(): Request;
7308
7632
  }
7309
7633
 
7310
- declare type XataWorkerContext<XataClient> = {
7634
+ type XataWorkerContext<XataClient> = {
7311
7635
  xata: XataClient;
7312
7636
  request: Request;
7313
7637
  env: Record<string, string | undefined>;
7314
7638
  };
7315
- declare type RemoveFirst<T> = T extends [any, ...infer U] ? U : never;
7316
- declare type WorkerRunnerConfig = {
7639
+ type RemoveFirst<T> = T extends [any, ...infer U] ? U : never;
7640
+ type WorkerRunnerConfig = {
7317
7641
  workspace: string;
7318
7642
  worker: string;
7319
7643
  };
7320
- declare function buildWorkerRunner<XataClient>(config: WorkerRunnerConfig): <WorkerFunction extends (ctx: XataWorkerContext<XataClient>, ...args: any[]) => any>(name: string, _worker: WorkerFunction) => (...args: RemoveFirst<Parameters<WorkerFunction>>) => Promise<Awaited<ReturnType<WorkerFunction>>>;
7644
+ 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>>>>;
7321
7645
 
7322
7646
  declare class XataError extends Error {
7323
7647
  readonly status: number;
7324
7648
  constructor(message: string, status: number);
7325
7649
  }
7326
7650
 
7327
- 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, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DEPRECATEDcreateDatabaseError, DEPRECATEDcreateDatabasePathParams, DEPRECATEDcreateDatabaseRequestBody, DEPRECATEDcreateDatabaseResponse, DEPRECATEDcreateDatabaseVariables, DEPRECATEDdeleteDatabaseError, DEPRECATEDdeleteDatabasePathParams, DEPRECATEDdeleteDatabaseResponse, DEPRECATEDdeleteDatabaseVariables, DEPRECATEDgetDatabaseListError, DEPRECATEDgetDatabaseListPathParams, DEPRECATEDgetDatabaseListVariables, DEPRECATEDgetDatabaseMetadataError, DEPRECATEDgetDatabaseMetadataPathParams, DEPRECATEDgetDatabaseMetadataVariables, DEPRECATEDupdateDatabaseMetadataError, DEPRECATEDupdateDatabaseMetadataPathParams, DEPRECATEDupdateDatabaseMetadataRequestBody, DEPRECATEDupdateDatabaseMetadataVariables, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, dEPRECATEDcreateDatabase, dEPRECATEDdeleteDatabase, dEPRECATEDgetDatabaseList, dEPRECATEDgetDatabaseMetadata, dEPRECATEDupdateDatabaseMetadata, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
7651
+ export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApiExtraProps, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BranchTransactionError, BranchTransactionPathParams, BranchTransactionRequestBody, BranchTransactionVariables, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, DeserializedType, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherError, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, SerializedString, Serializer, SerializerResult, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, branchTransaction, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };