@xata.io/client 0.0.0-alpha.vff4bc47 → 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,10 +79,11 @@ declare type FetcherExtraProps = {
61
79
  signal?: AbortSignal;
62
80
  clientID?: string;
63
81
  sessionID?: string;
82
+ clientName?: string;
64
83
  fetchOptions?: Record<string, unknown>;
65
84
  };
66
85
 
67
- declare type ControlPlaneFetcherExtraProps = {
86
+ type ControlPlaneFetcherExtraProps = {
68
87
  apiUrl: string;
69
88
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
70
89
  fetchImpl: FetchImpl;
@@ -73,8 +92,9 @@ declare type ControlPlaneFetcherExtraProps = {
73
92
  signal?: AbortSignal;
74
93
  clientID?: string;
75
94
  sessionID?: string;
95
+ clientName?: string;
76
96
  };
77
- declare type ErrorWrapper$1<TError> = TError | {
97
+ type ErrorWrapper$1<TError> = TError | {
78
98
  status: 'unknown';
79
99
  payload: string;
80
100
  };
@@ -84,7 +104,7 @@ declare type ErrorWrapper$1<TError> = TError | {
84
104
  *
85
105
  * @version 1.0
86
106
  */
87
- declare type User = {
107
+ type User = {
88
108
  /**
89
109
  * @format email
90
110
  */
@@ -95,38 +115,38 @@ declare type User = {
95
115
  /**
96
116
  * @pattern [a-zA-Z0-9_-~:]+
97
117
  */
98
- declare type UserID = string;
99
- declare type UserWithID = User & {
118
+ type UserID = string;
119
+ type UserWithID = User & {
100
120
  id: UserID;
101
121
  };
102
122
  /**
103
123
  * @format date-time
104
124
  * @x-go-type string
105
125
  */
106
- declare type DateTime$1 = string;
126
+ type DateTime$1 = string;
107
127
  /**
108
128
  * @pattern [a-zA-Z0-9_\-~]*
109
129
  */
110
- declare type APIKeyName = string;
130
+ type APIKeyName = string;
111
131
  /**
112
132
  * @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
113
133
  * @x-go-type auth.WorkspaceID
114
134
  */
115
- declare type WorkspaceID = string;
135
+ type WorkspaceID = string;
116
136
  /**
117
137
  * @x-go-type auth.Role
118
138
  */
119
- declare type Role = 'owner' | 'maintainer';
120
- declare type WorkspaceMeta = {
139
+ type Role = 'owner' | 'maintainer';
140
+ type WorkspaceMeta = {
121
141
  name: string;
122
142
  slug?: string;
123
143
  };
124
- declare type Workspace = WorkspaceMeta & {
144
+ type Workspace = WorkspaceMeta & {
125
145
  id: WorkspaceID;
126
146
  memberCount: number;
127
147
  plan: 'free' | 'pro';
128
148
  };
129
- declare type WorkspaceMember = {
149
+ type WorkspaceMember = {
130
150
  userId: UserID;
131
151
  fullname: string;
132
152
  /**
@@ -138,8 +158,8 @@ declare type WorkspaceMember = {
138
158
  /**
139
159
  * @pattern [a-zA-Z0-9]+
140
160
  */
141
- declare type InviteID = string;
142
- declare type WorkspaceInvite = {
161
+ type InviteID = string;
162
+ type WorkspaceInvite = {
143
163
  inviteId: InviteID;
144
164
  /**
145
165
  * @format email
@@ -151,18 +171,18 @@ declare type WorkspaceInvite = {
151
171
  expires: string;
152
172
  role: Role;
153
173
  };
154
- declare type WorkspaceMembers = {
174
+ type WorkspaceMembers = {
155
175
  members: WorkspaceMember[];
156
176
  invites: WorkspaceInvite[];
157
177
  };
158
178
  /**
159
179
  * @pattern ^ik_[a-zA-Z0-9]+
160
180
  */
161
- declare type InviteKey = string;
181
+ type InviteKey = string;
162
182
  /**
163
183
  * Metadata of databases
164
184
  */
165
- declare type DatabaseMetadata = {
185
+ type DatabaseMetadata = {
166
186
  /**
167
187
  * The machine-readable name of a database
168
188
  */
@@ -175,6 +195,10 @@ declare type DatabaseMetadata = {
175
195
  * The time this database was created
176
196
  */
177
197
  createdAt: DateTime$1;
198
+ /**
199
+ * @x-internal true
200
+ */
201
+ newMigrations?: boolean;
178
202
  /**
179
203
  * Metadata about the database for display in Xata user interfaces
180
204
  */
@@ -185,7 +209,7 @@ declare type DatabaseMetadata = {
185
209
  color?: string;
186
210
  };
187
211
  };
188
- declare type ListDatabasesResponse = {
212
+ type ListDatabasesResponse = {
189
213
  /**
190
214
  * A list of databases in a Xata workspace
191
215
  */
@@ -195,7 +219,7 @@ declare type ListDatabasesResponse = {
195
219
  * @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
196
220
  * @x-go-type xata.BranchMetadata
197
221
  */
198
- declare type BranchMetadata$1 = {
222
+ type BranchMetadata$1 = {
199
223
  /**
200
224
  * @minLength 1
201
225
  */
@@ -208,21 +232,25 @@ declare type BranchMetadata$1 = {
208
232
  labels?: string[];
209
233
  };
210
234
  /**
235
+ * @maxLength 255
236
+ * @minLength 1
211
237
  * @pattern [a-zA-Z0-9_\-~]+
212
238
  */
213
- declare type BranchName$1 = string;
239
+ type BranchName$1 = string;
214
240
  /**
241
+ * @maxLength 255
242
+ * @minLength 1
215
243
  * @pattern [a-zA-Z0-9_\-~]+
216
244
  */
217
- declare type DBName$1 = string;
218
- declare type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
219
- declare type ListRegionsResponse = {
245
+ type DBName$1 = string;
246
+ type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
247
+ type ListRegionsResponse = {
220
248
  /**
221
249
  * A list of regions where databases can be created
222
250
  */
223
251
  regions: Region[];
224
252
  };
225
- declare type Region = {
253
+ type Region = {
226
254
  id: string;
227
255
  };
228
256
 
@@ -231,18 +259,18 @@ declare type Region = {
231
259
  *
232
260
  * @version 1.0
233
261
  */
234
- declare type SimpleError$1 = {
262
+ type SimpleError$1 = {
235
263
  id?: string;
236
264
  message: string;
237
265
  };
238
- declare type BadRequestError$1 = {
266
+ type BadRequestError$1 = {
239
267
  id?: string;
240
268
  message: string;
241
269
  };
242
270
  /**
243
271
  * @example {"message":"invalid API key"}
244
272
  */
245
- declare type AuthError$1 = {
273
+ type AuthError$1 = {
246
274
  id?: string;
247
275
  message: string;
248
276
  };
@@ -253,7 +281,7 @@ declare type AuthError$1 = {
253
281
  * @version 1.0
254
282
  */
255
283
 
256
- declare type GetUserError = ErrorWrapper$1<{
284
+ type GetUserError = ErrorWrapper$1<{
257
285
  status: 400;
258
286
  payload: BadRequestError$1;
259
287
  } | {
@@ -263,12 +291,12 @@ declare type GetUserError = ErrorWrapper$1<{
263
291
  status: 404;
264
292
  payload: SimpleError$1;
265
293
  }>;
266
- declare type GetUserVariables = ControlPlaneFetcherExtraProps;
294
+ type GetUserVariables = ControlPlaneFetcherExtraProps;
267
295
  /**
268
296
  * Return details of the user making the request
269
297
  */
270
298
  declare const getUser: (variables: GetUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
271
- declare type UpdateUserError = ErrorWrapper$1<{
299
+ type UpdateUserError = ErrorWrapper$1<{
272
300
  status: 400;
273
301
  payload: BadRequestError$1;
274
302
  } | {
@@ -278,14 +306,14 @@ declare type UpdateUserError = ErrorWrapper$1<{
278
306
  status: 404;
279
307
  payload: SimpleError$1;
280
308
  }>;
281
- declare type UpdateUserVariables = {
309
+ type UpdateUserVariables = {
282
310
  body: User;
283
311
  } & ControlPlaneFetcherExtraProps;
284
312
  /**
285
313
  * Update user info
286
314
  */
287
315
  declare const updateUser: (variables: UpdateUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
288
- declare type DeleteUserError = ErrorWrapper$1<{
316
+ type DeleteUserError = ErrorWrapper$1<{
289
317
  status: 400;
290
318
  payload: BadRequestError$1;
291
319
  } | {
@@ -295,12 +323,12 @@ declare type DeleteUserError = ErrorWrapper$1<{
295
323
  status: 404;
296
324
  payload: SimpleError$1;
297
325
  }>;
298
- declare type DeleteUserVariables = ControlPlaneFetcherExtraProps;
326
+ type DeleteUserVariables = ControlPlaneFetcherExtraProps;
299
327
  /**
300
328
  * Delete the user making the request
301
329
  */
302
330
  declare const deleteUser: (variables: DeleteUserVariables, signal?: AbortSignal) => Promise<undefined>;
303
- declare type GetUserAPIKeysError = ErrorWrapper$1<{
331
+ type GetUserAPIKeysError = ErrorWrapper$1<{
304
332
  status: 400;
305
333
  payload: BadRequestError$1;
306
334
  } | {
@@ -310,24 +338,24 @@ declare type GetUserAPIKeysError = ErrorWrapper$1<{
310
338
  status: 404;
311
339
  payload: SimpleError$1;
312
340
  }>;
313
- declare type GetUserAPIKeysResponse = {
341
+ type GetUserAPIKeysResponse = {
314
342
  keys: {
315
343
  name: string;
316
344
  createdAt: DateTime$1;
317
345
  }[];
318
346
  };
319
- declare type GetUserAPIKeysVariables = ControlPlaneFetcherExtraProps;
347
+ type GetUserAPIKeysVariables = ControlPlaneFetcherExtraProps;
320
348
  /**
321
349
  * Retrieve a list of existing user API keys
322
350
  */
323
351
  declare const getUserAPIKeys: (variables: GetUserAPIKeysVariables, signal?: AbortSignal) => Promise<GetUserAPIKeysResponse>;
324
- declare type CreateUserAPIKeyPathParams = {
352
+ type CreateUserAPIKeyPathParams = {
325
353
  /**
326
354
  * API Key name
327
355
  */
328
356
  keyName: APIKeyName;
329
357
  };
330
- declare type CreateUserAPIKeyError = ErrorWrapper$1<{
358
+ type CreateUserAPIKeyError = ErrorWrapper$1<{
331
359
  status: 400;
332
360
  payload: BadRequestError$1;
333
361
  } | {
@@ -337,25 +365,25 @@ declare type CreateUserAPIKeyError = ErrorWrapper$1<{
337
365
  status: 404;
338
366
  payload: SimpleError$1;
339
367
  }>;
340
- declare type CreateUserAPIKeyResponse = {
368
+ type CreateUserAPIKeyResponse = {
341
369
  name: string;
342
370
  key: string;
343
371
  createdAt: DateTime$1;
344
372
  };
345
- declare type CreateUserAPIKeyVariables = {
373
+ type CreateUserAPIKeyVariables = {
346
374
  pathParams: CreateUserAPIKeyPathParams;
347
375
  } & ControlPlaneFetcherExtraProps;
348
376
  /**
349
377
  * Create and return new API key
350
378
  */
351
379
  declare const createUserAPIKey: (variables: CreateUserAPIKeyVariables, signal?: AbortSignal) => Promise<CreateUserAPIKeyResponse>;
352
- declare type DeleteUserAPIKeyPathParams = {
380
+ type DeleteUserAPIKeyPathParams = {
353
381
  /**
354
382
  * API Key name
355
383
  */
356
384
  keyName: APIKeyName;
357
385
  };
358
- declare type DeleteUserAPIKeyError = ErrorWrapper$1<{
386
+ type DeleteUserAPIKeyError = ErrorWrapper$1<{
359
387
  status: 400;
360
388
  payload: BadRequestError$1;
361
389
  } | {
@@ -365,14 +393,14 @@ declare type DeleteUserAPIKeyError = ErrorWrapper$1<{
365
393
  status: 404;
366
394
  payload: SimpleError$1;
367
395
  }>;
368
- declare type DeleteUserAPIKeyVariables = {
396
+ type DeleteUserAPIKeyVariables = {
369
397
  pathParams: DeleteUserAPIKeyPathParams;
370
398
  } & ControlPlaneFetcherExtraProps;
371
399
  /**
372
400
  * Delete an existing API key
373
401
  */
374
402
  declare const deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
375
- declare type GetWorkspacesListError = ErrorWrapper$1<{
403
+ type GetWorkspacesListError = ErrorWrapper$1<{
376
404
  status: 400;
377
405
  payload: BadRequestError$1;
378
406
  } | {
@@ -382,7 +410,7 @@ declare type GetWorkspacesListError = ErrorWrapper$1<{
382
410
  status: 404;
383
411
  payload: SimpleError$1;
384
412
  }>;
385
- declare type GetWorkspacesListResponse = {
413
+ type GetWorkspacesListResponse = {
386
414
  workspaces: {
387
415
  id: WorkspaceID;
388
416
  name: string;
@@ -390,12 +418,12 @@ declare type GetWorkspacesListResponse = {
390
418
  role: Role;
391
419
  }[];
392
420
  };
393
- declare type GetWorkspacesListVariables = ControlPlaneFetcherExtraProps;
421
+ type GetWorkspacesListVariables = ControlPlaneFetcherExtraProps;
394
422
  /**
395
423
  * Retrieve the list of workspaces the user belongs to
396
424
  */
397
425
  declare const getWorkspacesList: (variables: GetWorkspacesListVariables, signal?: AbortSignal) => Promise<GetWorkspacesListResponse>;
398
- declare type CreateWorkspaceError = ErrorWrapper$1<{
426
+ type CreateWorkspaceError = ErrorWrapper$1<{
399
427
  status: 400;
400
428
  payload: BadRequestError$1;
401
429
  } | {
@@ -405,53 +433,59 @@ declare type CreateWorkspaceError = ErrorWrapper$1<{
405
433
  status: 404;
406
434
  payload: SimpleError$1;
407
435
  }>;
408
- declare type CreateWorkspaceVariables = {
436
+ type CreateWorkspaceVariables = {
409
437
  body: WorkspaceMeta;
410
438
  } & ControlPlaneFetcherExtraProps;
411
439
  /**
412
440
  * Creates a new workspace with the user requesting it as its single owner.
413
441
  */
414
442
  declare const createWorkspace: (variables: CreateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
415
- declare type GetWorkspacePathParams = {
443
+ type GetWorkspacePathParams = {
416
444
  /**
417
445
  * Workspace ID
418
446
  */
419
447
  workspaceId: WorkspaceID;
420
448
  };
421
- declare type GetWorkspaceError = ErrorWrapper$1<{
449
+ type GetWorkspaceError = ErrorWrapper$1<{
422
450
  status: 400;
423
451
  payload: BadRequestError$1;
424
452
  } | {
425
453
  status: 401;
426
454
  payload: AuthError$1;
455
+ } | {
456
+ status: 403;
457
+ payload: AuthError$1;
427
458
  } | {
428
459
  status: 404;
429
460
  payload: SimpleError$1;
430
461
  }>;
431
- declare type GetWorkspaceVariables = {
462
+ type GetWorkspaceVariables = {
432
463
  pathParams: GetWorkspacePathParams;
433
464
  } & ControlPlaneFetcherExtraProps;
434
465
  /**
435
466
  * Retrieve workspace info from a workspace ID
436
467
  */
437
468
  declare const getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
438
- declare type UpdateWorkspacePathParams = {
469
+ type UpdateWorkspacePathParams = {
439
470
  /**
440
471
  * Workspace ID
441
472
  */
442
473
  workspaceId: WorkspaceID;
443
474
  };
444
- declare type UpdateWorkspaceError = ErrorWrapper$1<{
475
+ type UpdateWorkspaceError = ErrorWrapper$1<{
445
476
  status: 400;
446
477
  payload: BadRequestError$1;
447
478
  } | {
448
479
  status: 401;
449
480
  payload: AuthError$1;
481
+ } | {
482
+ status: 403;
483
+ payload: AuthError$1;
450
484
  } | {
451
485
  status: 404;
452
486
  payload: SimpleError$1;
453
487
  }>;
454
- declare type UpdateWorkspaceVariables = {
488
+ type UpdateWorkspaceVariables = {
455
489
  body: WorkspaceMeta;
456
490
  pathParams: UpdateWorkspacePathParams;
457
491
  } & ControlPlaneFetcherExtraProps;
@@ -459,53 +493,59 @@ declare type UpdateWorkspaceVariables = {
459
493
  * Update workspace info
460
494
  */
461
495
  declare const updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
462
- declare type DeleteWorkspacePathParams = {
496
+ type DeleteWorkspacePathParams = {
463
497
  /**
464
498
  * Workspace ID
465
499
  */
466
500
  workspaceId: WorkspaceID;
467
501
  };
468
- declare type DeleteWorkspaceError = ErrorWrapper$1<{
502
+ type DeleteWorkspaceError = ErrorWrapper$1<{
469
503
  status: 400;
470
504
  payload: BadRequestError$1;
471
505
  } | {
472
506
  status: 401;
473
507
  payload: AuthError$1;
508
+ } | {
509
+ status: 403;
510
+ payload: AuthError$1;
474
511
  } | {
475
512
  status: 404;
476
513
  payload: SimpleError$1;
477
514
  }>;
478
- declare type DeleteWorkspaceVariables = {
515
+ type DeleteWorkspaceVariables = {
479
516
  pathParams: DeleteWorkspacePathParams;
480
517
  } & ControlPlaneFetcherExtraProps;
481
518
  /**
482
519
  * Delete the workspace with the provided ID
483
520
  */
484
521
  declare const deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
485
- declare type GetWorkspaceMembersListPathParams = {
522
+ type GetWorkspaceMembersListPathParams = {
486
523
  /**
487
524
  * Workspace ID
488
525
  */
489
526
  workspaceId: WorkspaceID;
490
527
  };
491
- declare type GetWorkspaceMembersListError = ErrorWrapper$1<{
528
+ type GetWorkspaceMembersListError = ErrorWrapper$1<{
492
529
  status: 400;
493
530
  payload: BadRequestError$1;
494
531
  } | {
495
532
  status: 401;
496
533
  payload: AuthError$1;
534
+ } | {
535
+ status: 403;
536
+ payload: AuthError$1;
497
537
  } | {
498
538
  status: 404;
499
539
  payload: SimpleError$1;
500
540
  }>;
501
- declare type GetWorkspaceMembersListVariables = {
541
+ type GetWorkspaceMembersListVariables = {
502
542
  pathParams: GetWorkspaceMembersListPathParams;
503
543
  } & ControlPlaneFetcherExtraProps;
504
544
  /**
505
545
  * Retrieve the list of members of the given workspace
506
546
  */
507
547
  declare const getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal) => Promise<WorkspaceMembers>;
508
- declare type UpdateWorkspaceMemberRolePathParams = {
548
+ type UpdateWorkspaceMemberRolePathParams = {
509
549
  /**
510
550
  * Workspace ID
511
551
  */
@@ -515,20 +555,23 @@ declare type UpdateWorkspaceMemberRolePathParams = {
515
555
  */
516
556
  userId: UserID;
517
557
  };
518
- declare type UpdateWorkspaceMemberRoleError = ErrorWrapper$1<{
558
+ type UpdateWorkspaceMemberRoleError = ErrorWrapper$1<{
519
559
  status: 400;
520
560
  payload: BadRequestError$1;
521
561
  } | {
522
562
  status: 401;
523
563
  payload: AuthError$1;
564
+ } | {
565
+ status: 403;
566
+ payload: AuthError$1;
524
567
  } | {
525
568
  status: 404;
526
569
  payload: SimpleError$1;
527
570
  }>;
528
- declare type UpdateWorkspaceMemberRoleRequestBody = {
571
+ type UpdateWorkspaceMemberRoleRequestBody = {
529
572
  role: Role;
530
573
  };
531
- declare type UpdateWorkspaceMemberRoleVariables = {
574
+ type UpdateWorkspaceMemberRoleVariables = {
532
575
  body: UpdateWorkspaceMemberRoleRequestBody;
533
576
  pathParams: UpdateWorkspaceMemberRolePathParams;
534
577
  } & ControlPlaneFetcherExtraProps;
@@ -536,7 +579,7 @@ declare type UpdateWorkspaceMemberRoleVariables = {
536
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.
537
580
  */
538
581
  declare const updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal) => Promise<undefined>;
539
- declare type RemoveWorkspaceMemberPathParams = {
582
+ type RemoveWorkspaceMemberPathParams = {
540
583
  /**
541
584
  * Workspace ID
542
585
  */
@@ -546,35 +589,41 @@ declare type RemoveWorkspaceMemberPathParams = {
546
589
  */
547
590
  userId: UserID;
548
591
  };
549
- declare type RemoveWorkspaceMemberError = ErrorWrapper$1<{
592
+ type RemoveWorkspaceMemberError = ErrorWrapper$1<{
550
593
  status: 400;
551
594
  payload: BadRequestError$1;
552
595
  } | {
553
596
  status: 401;
554
597
  payload: AuthError$1;
598
+ } | {
599
+ status: 403;
600
+ payload: AuthError$1;
555
601
  } | {
556
602
  status: 404;
557
603
  payload: SimpleError$1;
558
604
  }>;
559
- declare type RemoveWorkspaceMemberVariables = {
605
+ type RemoveWorkspaceMemberVariables = {
560
606
  pathParams: RemoveWorkspaceMemberPathParams;
561
607
  } & ControlPlaneFetcherExtraProps;
562
608
  /**
563
609
  * Remove the member from the workspace
564
610
  */
565
611
  declare const removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal) => Promise<undefined>;
566
- declare type InviteWorkspaceMemberPathParams = {
612
+ type InviteWorkspaceMemberPathParams = {
567
613
  /**
568
614
  * Workspace ID
569
615
  */
570
616
  workspaceId: WorkspaceID;
571
617
  };
572
- declare type InviteWorkspaceMemberError = ErrorWrapper$1<{
618
+ type InviteWorkspaceMemberError = ErrorWrapper$1<{
573
619
  status: 400;
574
620
  payload: BadRequestError$1;
575
621
  } | {
576
622
  status: 401;
577
623
  payload: AuthError$1;
624
+ } | {
625
+ status: 403;
626
+ payload: AuthError$1;
578
627
  } | {
579
628
  status: 404;
580
629
  payload: SimpleError$1;
@@ -582,14 +631,14 @@ declare type InviteWorkspaceMemberError = ErrorWrapper$1<{
582
631
  status: 409;
583
632
  payload: SimpleError$1;
584
633
  }>;
585
- declare type InviteWorkspaceMemberRequestBody = {
634
+ type InviteWorkspaceMemberRequestBody = {
586
635
  /**
587
636
  * @format email
588
637
  */
589
638
  email: string;
590
639
  role: Role;
591
640
  };
592
- declare type InviteWorkspaceMemberVariables = {
641
+ type InviteWorkspaceMemberVariables = {
593
642
  body: InviteWorkspaceMemberRequestBody;
594
643
  pathParams: InviteWorkspaceMemberPathParams;
595
644
  } & ControlPlaneFetcherExtraProps;
@@ -597,7 +646,7 @@ declare type InviteWorkspaceMemberVariables = {
597
646
  * Invite some user to join the workspace with the given role
598
647
  */
599
648
  declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
600
- declare type UpdateWorkspaceMemberInvitePathParams = {
649
+ type UpdateWorkspaceMemberInvitePathParams = {
601
650
  /**
602
651
  * Workspace ID
603
652
  */
@@ -607,12 +656,15 @@ declare type UpdateWorkspaceMemberInvitePathParams = {
607
656
  */
608
657
  inviteId: InviteID;
609
658
  };
610
- declare type UpdateWorkspaceMemberInviteError = ErrorWrapper$1<{
659
+ type UpdateWorkspaceMemberInviteError = ErrorWrapper$1<{
611
660
  status: 400;
612
661
  payload: BadRequestError$1;
613
662
  } | {
614
663
  status: 401;
615
664
  payload: AuthError$1;
665
+ } | {
666
+ status: 403;
667
+ payload: AuthError$1;
616
668
  } | {
617
669
  status: 404;
618
670
  payload: SimpleError$1;
@@ -620,10 +672,10 @@ declare type UpdateWorkspaceMemberInviteError = ErrorWrapper$1<{
620
672
  status: 422;
621
673
  payload: SimpleError$1;
622
674
  }>;
623
- declare type UpdateWorkspaceMemberInviteRequestBody = {
675
+ type UpdateWorkspaceMemberInviteRequestBody = {
624
676
  role: Role;
625
677
  };
626
- declare type UpdateWorkspaceMemberInviteVariables = {
678
+ type UpdateWorkspaceMemberInviteVariables = {
627
679
  body: UpdateWorkspaceMemberInviteRequestBody;
628
680
  pathParams: UpdateWorkspaceMemberInvitePathParams;
629
681
  } & ControlPlaneFetcherExtraProps;
@@ -631,7 +683,7 @@ declare type UpdateWorkspaceMemberInviteVariables = {
631
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.
632
684
  */
633
685
  declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
634
- declare type CancelWorkspaceMemberInvitePathParams = {
686
+ type CancelWorkspaceMemberInvitePathParams = {
635
687
  /**
636
688
  * Workspace ID
637
689
  */
@@ -641,24 +693,27 @@ declare type CancelWorkspaceMemberInvitePathParams = {
641
693
  */
642
694
  inviteId: InviteID;
643
695
  };
644
- declare type CancelWorkspaceMemberInviteError = ErrorWrapper$1<{
696
+ type CancelWorkspaceMemberInviteError = ErrorWrapper$1<{
645
697
  status: 400;
646
698
  payload: BadRequestError$1;
647
699
  } | {
648
700
  status: 401;
649
701
  payload: AuthError$1;
702
+ } | {
703
+ status: 403;
704
+ payload: AuthError$1;
650
705
  } | {
651
706
  status: 404;
652
707
  payload: SimpleError$1;
653
708
  }>;
654
- declare type CancelWorkspaceMemberInviteVariables = {
709
+ type CancelWorkspaceMemberInviteVariables = {
655
710
  pathParams: CancelWorkspaceMemberInvitePathParams;
656
711
  } & ControlPlaneFetcherExtraProps;
657
712
  /**
658
713
  * This operation provides a way to cancel invites by deleting them. Already accepted invites cannot be deleted.
659
714
  */
660
715
  declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
661
- declare type AcceptWorkspaceMemberInvitePathParams = {
716
+ type AcceptWorkspaceMemberInvitePathParams = {
662
717
  /**
663
718
  * Workspace ID
664
719
  */
@@ -668,24 +723,27 @@ declare type AcceptWorkspaceMemberInvitePathParams = {
668
723
  */
669
724
  inviteKey: InviteKey;
670
725
  };
671
- declare type AcceptWorkspaceMemberInviteError = ErrorWrapper$1<{
726
+ type AcceptWorkspaceMemberInviteError = ErrorWrapper$1<{
672
727
  status: 400;
673
728
  payload: BadRequestError$1;
674
729
  } | {
675
730
  status: 401;
676
731
  payload: AuthError$1;
732
+ } | {
733
+ status: 403;
734
+ payload: AuthError$1;
677
735
  } | {
678
736
  status: 404;
679
737
  payload: SimpleError$1;
680
738
  }>;
681
- declare type AcceptWorkspaceMemberInviteVariables = {
739
+ type AcceptWorkspaceMemberInviteVariables = {
682
740
  pathParams: AcceptWorkspaceMemberInvitePathParams;
683
741
  } & ControlPlaneFetcherExtraProps;
684
742
  /**
685
743
  * Accept the invitation to join a workspace. If the operation succeeds the user will be a member of the workspace
686
744
  */
687
745
  declare const acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
688
- declare type ResendWorkspaceMemberInvitePathParams = {
746
+ type ResendWorkspaceMemberInvitePathParams = {
689
747
  /**
690
748
  * Workspace ID
691
749
  */
@@ -695,44 +753,47 @@ declare type ResendWorkspaceMemberInvitePathParams = {
695
753
  */
696
754
  inviteId: InviteID;
697
755
  };
698
- declare type ResendWorkspaceMemberInviteError = ErrorWrapper$1<{
756
+ type ResendWorkspaceMemberInviteError = ErrorWrapper$1<{
699
757
  status: 400;
700
758
  payload: BadRequestError$1;
701
759
  } | {
702
760
  status: 401;
703
761
  payload: AuthError$1;
762
+ } | {
763
+ status: 403;
764
+ payload: AuthError$1;
704
765
  } | {
705
766
  status: 404;
706
767
  payload: SimpleError$1;
707
768
  }>;
708
- declare type ResendWorkspaceMemberInviteVariables = {
769
+ type ResendWorkspaceMemberInviteVariables = {
709
770
  pathParams: ResendWorkspaceMemberInvitePathParams;
710
771
  } & ControlPlaneFetcherExtraProps;
711
772
  /**
712
773
  * This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted.
713
774
  */
714
775
  declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
715
- declare type GetDatabaseListPathParams = {
776
+ type GetDatabaseListPathParams = {
716
777
  /**
717
778
  * Workspace ID
718
779
  */
719
780
  workspaceId: WorkspaceID;
720
781
  };
721
- declare type GetDatabaseListError = ErrorWrapper$1<{
782
+ type GetDatabaseListError = ErrorWrapper$1<{
722
783
  status: 400;
723
784
  payload: BadRequestError$1;
724
785
  } | {
725
786
  status: 401;
726
787
  payload: AuthError$1;
727
788
  }>;
728
- declare type GetDatabaseListVariables = {
789
+ type GetDatabaseListVariables = {
729
790
  pathParams: GetDatabaseListPathParams;
730
791
  } & ControlPlaneFetcherExtraProps;
731
792
  /**
732
793
  * List all databases available in your Workspace.
733
794
  */
734
795
  declare const getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal) => Promise<ListDatabasesResponse>;
735
- declare type CreateDatabasePathParams = {
796
+ type CreateDatabasePathParams = {
736
797
  /**
737
798
  * Workspace ID
738
799
  */
@@ -742,14 +803,20 @@ declare type CreateDatabasePathParams = {
742
803
  */
743
804
  dbName: DBName$1;
744
805
  };
745
- declare type CreateDatabaseError = ErrorWrapper$1<{
806
+ type CreateDatabaseError = ErrorWrapper$1<{
746
807
  status: 400;
747
808
  payload: BadRequestError$1;
748
809
  } | {
749
810
  status: 401;
750
811
  payload: AuthError$1;
812
+ } | {
813
+ status: 422;
814
+ payload: SimpleError$1;
815
+ } | {
816
+ status: 423;
817
+ payload: SimpleError$1;
751
818
  }>;
752
- declare type CreateDatabaseResponse = {
819
+ type CreateDatabaseResponse = {
753
820
  /**
754
821
  * @minLength 1
755
822
  */
@@ -757,7 +824,7 @@ declare type CreateDatabaseResponse = {
757
824
  branchName?: string;
758
825
  status: MigrationStatus$1;
759
826
  };
760
- declare type CreateDatabaseRequestBody = {
827
+ type CreateDatabaseRequestBody = {
761
828
  /**
762
829
  * @minLength 1
763
830
  */
@@ -771,7 +838,7 @@ declare type CreateDatabaseRequestBody = {
771
838
  };
772
839
  metadata?: BranchMetadata$1;
773
840
  };
774
- declare type CreateDatabaseVariables = {
841
+ type CreateDatabaseVariables = {
775
842
  body: CreateDatabaseRequestBody;
776
843
  pathParams: CreateDatabasePathParams;
777
844
  } & ControlPlaneFetcherExtraProps;
@@ -779,7 +846,7 @@ declare type CreateDatabaseVariables = {
779
846
  * Create Database with identifier name
780
847
  */
781
848
  declare const createDatabase: (variables: CreateDatabaseVariables, signal?: AbortSignal) => Promise<CreateDatabaseResponse>;
782
- declare type DeleteDatabasePathParams = {
849
+ type DeleteDatabasePathParams = {
783
850
  /**
784
851
  * Workspace ID
785
852
  */
@@ -789,7 +856,7 @@ declare type DeleteDatabasePathParams = {
789
856
  */
790
857
  dbName: DBName$1;
791
858
  };
792
- declare type DeleteDatabaseError = ErrorWrapper$1<{
859
+ type DeleteDatabaseError = ErrorWrapper$1<{
793
860
  status: 400;
794
861
  payload: BadRequestError$1;
795
862
  } | {
@@ -799,17 +866,17 @@ declare type DeleteDatabaseError = ErrorWrapper$1<{
799
866
  status: 404;
800
867
  payload: SimpleError$1;
801
868
  }>;
802
- declare type DeleteDatabaseResponse = {
869
+ type DeleteDatabaseResponse = {
803
870
  status: MigrationStatus$1;
804
871
  };
805
- declare type DeleteDatabaseVariables = {
872
+ type DeleteDatabaseVariables = {
806
873
  pathParams: DeleteDatabasePathParams;
807
874
  } & ControlPlaneFetcherExtraProps;
808
875
  /**
809
876
  * Delete a database and all of its branches and tables permanently.
810
877
  */
811
878
  declare const deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal) => Promise<DeleteDatabaseResponse>;
812
- declare type GetDatabaseMetadataPathParams = {
879
+ type GetDatabaseMetadataPathParams = {
813
880
  /**
814
881
  * Workspace ID
815
882
  */
@@ -819,7 +886,7 @@ declare type GetDatabaseMetadataPathParams = {
819
886
  */
820
887
  dbName: DBName$1;
821
888
  };
822
- declare type GetDatabaseMetadataError = ErrorWrapper$1<{
889
+ type GetDatabaseMetadataError = ErrorWrapper$1<{
823
890
  status: 400;
824
891
  payload: BadRequestError$1;
825
892
  } | {
@@ -829,14 +896,14 @@ declare type GetDatabaseMetadataError = ErrorWrapper$1<{
829
896
  status: 404;
830
897
  payload: SimpleError$1;
831
898
  }>;
832
- declare type GetDatabaseMetadataVariables = {
899
+ type GetDatabaseMetadataVariables = {
833
900
  pathParams: GetDatabaseMetadataPathParams;
834
901
  } & ControlPlaneFetcherExtraProps;
835
902
  /**
836
903
  * Retrieve metadata of the given database
837
904
  */
838
905
  declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
839
- declare type UpdateDatabaseMetadataPathParams = {
906
+ type UpdateDatabaseMetadataPathParams = {
840
907
  /**
841
908
  * Workspace ID
842
909
  */
@@ -846,7 +913,7 @@ declare type UpdateDatabaseMetadataPathParams = {
846
913
  */
847
914
  dbName: DBName$1;
848
915
  };
849
- declare type UpdateDatabaseMetadataError = ErrorWrapper$1<{
916
+ type UpdateDatabaseMetadataError = ErrorWrapper$1<{
850
917
  status: 400;
851
918
  payload: BadRequestError$1;
852
919
  } | {
@@ -856,7 +923,7 @@ declare type UpdateDatabaseMetadataError = ErrorWrapper$1<{
856
923
  status: 404;
857
924
  payload: SimpleError$1;
858
925
  }>;
859
- declare type UpdateDatabaseMetadataRequestBody = {
926
+ type UpdateDatabaseMetadataRequestBody = {
860
927
  ui?: {
861
928
  /**
862
929
  * @minLength 1
@@ -864,7 +931,7 @@ declare type UpdateDatabaseMetadataRequestBody = {
864
931
  color?: string;
865
932
  };
866
933
  };
867
- declare type UpdateDatabaseMetadataVariables = {
934
+ type UpdateDatabaseMetadataVariables = {
868
935
  body?: UpdateDatabaseMetadataRequestBody;
869
936
  pathParams: UpdateDatabaseMetadataPathParams;
870
937
  } & ControlPlaneFetcherExtraProps;
@@ -872,20 +939,20 @@ declare type UpdateDatabaseMetadataVariables = {
872
939
  * Update the color of the selected database
873
940
  */
874
941
  declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
875
- declare type ListRegionsPathParams = {
942
+ type ListRegionsPathParams = {
876
943
  /**
877
944
  * Workspace ID
878
945
  */
879
946
  workspaceId: WorkspaceID;
880
947
  };
881
- declare type ListRegionsError = ErrorWrapper$1<{
948
+ type ListRegionsError = ErrorWrapper$1<{
882
949
  status: 400;
883
950
  payload: BadRequestError$1;
884
951
  } | {
885
952
  status: 401;
886
953
  payload: AuthError$1;
887
954
  }>;
888
- declare type ListRegionsVariables = {
955
+ type ListRegionsVariables = {
889
956
  pathParams: ListRegionsPathParams;
890
957
  } & ControlPlaneFetcherExtraProps;
891
958
  /**
@@ -898,49 +965,17 @@ declare const listRegions: (variables: ListRegionsVariables, signal?: AbortSigna
898
965
  *
899
966
  * @version 1.0
900
967
  */
901
- /**
902
- * Metadata of databases
903
- */
904
- declare type DEPRECATEDDatabaseMetadata = {
905
- /**
906
- * The machine-readable name of a database
907
- */
908
- name: string;
909
- /**
910
- * The time this database was created
911
- */
912
- createdAt: DateTime;
913
- /**
914
- * The number of branches the database has
915
- */
916
- numberOfBranches: number;
917
- /**
918
- * Metadata about the database for display in Xata user interfaces
919
- */
920
- ui?: {
921
- /**
922
- * The user-selected color for this database across interfaces
923
- */
924
- color?: string;
925
- };
926
- };
927
- declare type DEPRECATEDListDatabasesResponse = {
928
- /**
929
- * A list of databases in a Xata workspace
930
- */
931
- databases?: DEPRECATEDDatabaseMetadata[];
932
- };
933
- declare type ListBranchesResponse = {
968
+ type ListBranchesResponse = {
934
969
  databaseName: string;
935
970
  branches: Branch[];
936
971
  };
937
- declare type ListGitBranchesResponse = {
972
+ type ListGitBranchesResponse = {
938
973
  mapping: {
939
974
  gitBranch: string;
940
975
  xataBranch: string;
941
976
  }[];
942
977
  };
943
- declare type Branch = {
978
+ type Branch = {
944
979
  name: string;
945
980
  createdAt: DateTime;
946
981
  };
@@ -948,7 +983,7 @@ declare type Branch = {
948
983
  * @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
949
984
  * @x-go-type xata.BranchMetadata
950
985
  */
951
- declare type BranchMetadata = {
986
+ type BranchMetadata = {
952
987
  /**
953
988
  * @minLength 1
954
989
  */
@@ -960,7 +995,7 @@ declare type BranchMetadata = {
960
995
  stage?: string;
961
996
  labels?: string[];
962
997
  };
963
- declare type DBBranch = {
998
+ type DBBranch = {
964
999
  databaseName: DBName;
965
1000
  branchName: BranchName;
966
1001
  createdAt: DateTime;
@@ -971,7 +1006,7 @@ declare type DBBranch = {
971
1006
  startedFrom?: StartedFromMetadata;
972
1007
  schema: Schema;
973
1008
  };
974
- declare type StartedFromMetadata = {
1009
+ type StartedFromMetadata = {
975
1010
  branchName: BranchName;
976
1011
  dbBranchID: string;
977
1012
  migrationID: string;
@@ -979,22 +1014,22 @@ declare type StartedFromMetadata = {
979
1014
  /**
980
1015
  * @x-go-type xata.Schema
981
1016
  */
982
- declare type Schema = {
1017
+ type Schema = {
983
1018
  tables: Table[];
984
1019
  tablesOrder?: string[];
985
1020
  };
986
- declare type SchemaEditScript = {
1021
+ type SchemaEditScript = {
987
1022
  sourceMigrationID?: string;
988
1023
  targetMigrationID?: string;
989
1024
  operations: MigrationOp[];
990
1025
  };
991
- declare type Table = {
1026
+ type Table = {
992
1027
  id?: string;
993
1028
  name: TableName;
994
1029
  columns: Column[];
995
1030
  revLinks?: RevLink[];
996
1031
  };
997
- declare type Column = {
1032
+ type Column = {
998
1033
  name: string;
999
1034
  type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime';
1000
1035
  link?: ColumnLink;
@@ -1003,44 +1038,52 @@ declare type Column = {
1003
1038
  unique?: boolean;
1004
1039
  columns?: Column[];
1005
1040
  };
1006
- declare type ColumnLink = {
1041
+ type ColumnLink = {
1007
1042
  table: string;
1008
1043
  };
1009
- declare type RevLink = {
1044
+ type RevLink = {
1010
1045
  linkID: string;
1011
1046
  table: string;
1012
1047
  };
1013
1048
  /**
1049
+ * @maxLength 255
1050
+ * @minLength 1
1014
1051
  * @pattern [a-zA-Z0-9_\-~]+
1015
1052
  */
1016
- declare type BranchName = string;
1053
+ type BranchName = string;
1017
1054
  /**
1055
+ * @maxLength 255
1056
+ * @minLength 1
1018
1057
  * @pattern [a-zA-Z0-9_\-~]+
1019
1058
  */
1020
- declare type DBName = string;
1059
+ type DBName = string;
1021
1060
  /**
1022
1061
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
1023
1062
  *
1063
+ * @maxLength 511
1064
+ * @minLength 1
1024
1065
  * @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
1025
1066
  */
1026
- declare type DBBranchName = string;
1067
+ type DBBranchName = string;
1027
1068
  /**
1069
+ * @maxLength 255
1070
+ * @minLength 1
1028
1071
  * @pattern [a-zA-Z0-9_\-~]+
1029
1072
  */
1030
- declare type TableName = string;
1073
+ type TableName = string;
1031
1074
  /**
1032
1075
  * @pattern [a-zA-Z0-9_\-~\.]+
1033
1076
  */
1034
- declare type ColumnName = string;
1035
- declare type MetricsDatapoint = {
1077
+ type ColumnName = string;
1078
+ type MetricsDatapoint = {
1036
1079
  timestamp: string;
1037
1080
  value: number;
1038
1081
  };
1039
- declare type MetricsLatency = {
1082
+ type MetricsLatency = {
1040
1083
  p50?: MetricsDatapoint[];
1041
1084
  p90?: MetricsDatapoint[];
1042
1085
  };
1043
- declare type BranchMigration = {
1086
+ type BranchMigration = {
1044
1087
  id?: string;
1045
1088
  parentID?: string;
1046
1089
  status: string;
@@ -1058,7 +1101,7 @@ declare type BranchMigration = {
1058
1101
  newTableOrder: string[];
1059
1102
  renamedTables?: TableRename[];
1060
1103
  };
1061
- declare type TableMigration = {
1104
+ type TableMigration = {
1062
1105
  newColumns?: {
1063
1106
  [key: string]: Column;
1064
1107
  };
@@ -1066,11 +1109,11 @@ declare type TableMigration = {
1066
1109
  modifiedColumns?: ColumnMigration[];
1067
1110
  newColumnOrder: string[];
1068
1111
  };
1069
- declare type ColumnMigration = {
1112
+ type ColumnMigration = {
1070
1113
  old: Column;
1071
1114
  ['new']: Column;
1072
1115
  };
1073
- declare type Commit = {
1116
+ type Commit = {
1074
1117
  title?: string;
1075
1118
  message?: string;
1076
1119
  id: string;
@@ -1081,51 +1124,51 @@ declare type Commit = {
1081
1124
  modifiedAt?: DateTime;
1082
1125
  operations: MigrationOp[];
1083
1126
  };
1084
- declare type MigrationStatus = 'completed' | 'pending' | 'failed';
1127
+ type MigrationStatus = 'completed' | 'pending' | 'failed';
1085
1128
  /**
1086
1129
  * Branch schema migration.
1087
1130
  */
1088
- declare type Migration = {
1131
+ type Migration = {
1089
1132
  parentID?: string;
1090
1133
  operations: MigrationOp[];
1091
1134
  };
1092
1135
  /**
1093
1136
  * Branch schema migration operations.
1094
1137
  */
1095
- declare type MigrationOp = MigrationTableOp | MigrationColumnOp;
1096
- declare type MigrationTableOp = {
1138
+ type MigrationOp = MigrationTableOp | MigrationColumnOp;
1139
+ type MigrationTableOp = {
1097
1140
  addTable: TableOpAdd;
1098
1141
  } | {
1099
1142
  removeTable: TableOpRemove;
1100
1143
  } | {
1101
1144
  renameTable: TableOpRename;
1102
1145
  };
1103
- declare type MigrationColumnOp = {
1146
+ type MigrationColumnOp = {
1104
1147
  addColumn: ColumnOpAdd;
1105
1148
  } | {
1106
1149
  removeColumn: ColumnOpRemove;
1107
1150
  } | {
1108
1151
  renameColumn: ColumnOpRename;
1109
1152
  };
1110
- declare type TableOpAdd = {
1153
+ type TableOpAdd = {
1111
1154
  table: string;
1112
1155
  };
1113
- declare type TableOpRemove = {
1156
+ type TableOpRemove = {
1114
1157
  table: string;
1115
1158
  };
1116
- declare type TableOpRename = {
1159
+ type TableOpRename = {
1117
1160
  oldName: string;
1118
1161
  newName: string;
1119
1162
  };
1120
- declare type ColumnOpAdd = {
1163
+ type ColumnOpAdd = {
1121
1164
  table: string;
1122
1165
  column: Column;
1123
1166
  };
1124
- declare type ColumnOpRemove = {
1167
+ type ColumnOpRemove = {
1125
1168
  table: string;
1126
1169
  column: string;
1127
1170
  };
1128
- declare type ColumnOpRename = {
1171
+ type ColumnOpRename = {
1129
1172
  table: string;
1130
1173
  oldName: string;
1131
1174
  newName: string;
@@ -1136,8 +1179,8 @@ declare type ColumnOpRename = {
1136
1179
  * @minimum 0
1137
1180
  * @x-go-type migration.RequestNumber
1138
1181
  */
1139
- declare type MigrationRequestNumber = number;
1140
- declare type MigrationRequest = {
1182
+ type MigrationRequestNumber = number;
1183
+ type MigrationRequest = {
1141
1184
  number?: MigrationRequestNumber;
1142
1185
  /**
1143
1186
  * Migration request creation timestamp.
@@ -1173,12 +1216,12 @@ declare type MigrationRequest = {
1173
1216
  */
1174
1217
  target?: string;
1175
1218
  };
1176
- declare type SortExpression = string[] | {
1219
+ type SortExpression = string[] | {
1177
1220
  [key: string]: SortOrder;
1178
1221
  } | {
1179
1222
  [key: string]: SortOrder;
1180
1223
  }[];
1181
- declare type SortOrder = 'asc' | 'desc';
1224
+ type SortOrder = 'asc' | 'desc';
1182
1225
  /**
1183
1226
  * Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
1184
1227
  * distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
@@ -1189,15 +1232,15 @@ declare type SortOrder = 'asc' | 'desc';
1189
1232
  * @maximum 2
1190
1233
  * @minimum 0
1191
1234
  */
1192
- declare type FuzzinessExpression = number;
1235
+ type FuzzinessExpression = number;
1193
1236
  /**
1194
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.
1195
1238
  */
1196
- declare type PrefixExpression = 'phrase' | 'disabled';
1239
+ type PrefixExpression = 'phrase' | 'disabled';
1197
1240
  /**
1198
1241
  * The target expression is used to filter the search results by the target columns.
1199
1242
  */
1200
- declare type TargetExpression = (string | {
1243
+ type TargetExpression = (string | {
1201
1244
  /**
1202
1245
  * The name of the column.
1203
1246
  */
@@ -1214,7 +1257,7 @@ declare type TargetExpression = (string | {
1214
1257
  /**
1215
1258
  * @minProperties 1
1216
1259
  */
1217
- declare type FilterExpression = {
1260
+ type FilterExpression = {
1218
1261
  $exists?: string;
1219
1262
  $existsNot?: string;
1220
1263
  $any?: FilterList;
@@ -1237,15 +1280,10 @@ declare type FilterExpression = {
1237
1280
  * an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
1238
1281
  * `settings.dark_mode` but not `settings` nor `settings.*`.
1239
1282
  *
1240
- * @example {"all_users":{"count":"*"}}
1241
- * @example {"total_created":{"count":"created_at"}}
1242
- * @example {"min_cost":{"min":"cost"}}
1243
- * @example {"max_happiness":{"max":"happiness"}}
1244
- * @example {"total_revenue":{"sum":"revenue"}}
1245
- * @example {"average_speed":{"average":"speed"}}
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"}}
1246
1284
  * @x-go-type xbquery.SummaryList
1247
1285
  */
1248
- declare type SummaryExpressionList = {
1286
+ type SummaryExpressionList = {
1249
1287
  [key: string]: SummaryExpression;
1250
1288
  };
1251
1289
  /**
@@ -1259,46 +1297,46 @@ declare type SummaryExpressionList = {
1259
1297
  * We currently support several aggregation functions. Not all functions can be run on all column
1260
1298
  * types.
1261
1299
  *
1262
- * - `count` is used to count the number of records in each group. Use `{"count": "*"}` to count
1263
- * all columns present, otherwise `{"count": "<column_path>"}` to count the number of non-null
1264
- * values are present at column path.
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.
1265
1303
  *
1266
- * Count can be used on any column type, and always returns an int.
1304
+ * Count can be used on any column type, and always returns an int.
1267
1305
  *
1268
- * - `min` calculates the minimum value in each group. `min` is compatible with most types;
1269
- * string, multiple, text, email, int, float, and datetime. It returns a value of the same
1270
- * type as operated on. This means that `{"lowest_latency": {"min": "latency"}}` where
1271
- * `latency` is an int, will always return an int.
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.
1272
1310
  *
1273
- * - `max` calculates the maximum value in each group. `max` shares the same compatibility as
1274
- * `min`.
1311
+ * - `max` calculates the maximum value in each group. `max` shares the same compatibility as
1312
+ * `min`.
1275
1313
  *
1276
- * - `sum` adds up all values in a group. `sum` can be run on `int` and `float` types, and will
1277
- * return a value of the same type as requested.
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.
1278
1316
  *
1279
- * - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
1280
- * always returns a float.
1317
+ * - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
1318
+ * always returns a float.
1281
1319
  *
1282
1320
  * @example {"count":"deleted_at"}
1283
1321
  * @x-go-type xbquery.Summary
1284
1322
  */
1285
- declare type SummaryExpression = Record<string, any>;
1323
+ type SummaryExpression = Record<string, any>;
1286
1324
  /**
1287
1325
  * The description of the aggregations you wish to receive.
1288
1326
  *
1289
- * @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"}}}}}}
1290
1328
  */
1291
- declare type AggExpressionMap = {
1329
+ type AggExpressionMap = {
1292
1330
  [key: string]: AggExpression;
1293
1331
  };
1294
1332
  /**
1295
1333
  * The description of a single aggregation operation. It is an object with only one key-value pair.
1296
- * The key represents the aggreagtion type, while the value is an object with the configuration of
1297
- * the aggreagtion.
1334
+ * The key represents the aggregation type, while the value is an object with the configuration of
1335
+ * the aggregation.
1298
1336
  *
1299
1337
  * @x-go-type xata.AggExpression
1300
1338
  */
1301
- declare type AggExpression = {
1339
+ type AggExpression = {
1302
1340
  count?: CountAgg;
1303
1341
  } | {
1304
1342
  sum?: SumAgg;
@@ -1320,13 +1358,13 @@ declare type AggExpression = {
1320
1358
  /**
1321
1359
  * Count the number of records with an optional filter.
1322
1360
  */
1323
- declare type CountAgg = {
1361
+ type CountAgg = {
1324
1362
  filter?: FilterExpression;
1325
1363
  } | '*';
1326
1364
  /**
1327
1365
  * The sum of the numeric values in a particular column.
1328
1366
  */
1329
- declare type SumAgg = {
1367
+ type SumAgg = {
1330
1368
  /**
1331
1369
  * The column on which to compute the sum. Must be a numeric type.
1332
1370
  */
@@ -1335,7 +1373,7 @@ declare type SumAgg = {
1335
1373
  /**
1336
1374
  * The max of the numeric values in a particular column.
1337
1375
  */
1338
- declare type MaxAgg = {
1376
+ type MaxAgg = {
1339
1377
  /**
1340
1378
  * The column on which to compute the max. Must be a numeric type.
1341
1379
  */
@@ -1344,7 +1382,7 @@ declare type MaxAgg = {
1344
1382
  /**
1345
1383
  * The min of the numeric values in a particular column.
1346
1384
  */
1347
- declare type MinAgg = {
1385
+ type MinAgg = {
1348
1386
  /**
1349
1387
  * The column on which to compute the min. Must be a numeric type.
1350
1388
  */
@@ -1353,7 +1391,7 @@ declare type MinAgg = {
1353
1391
  /**
1354
1392
  * The average of the numeric values in a particular column.
1355
1393
  */
1356
- declare type AverageAgg = {
1394
+ type AverageAgg = {
1357
1395
  /**
1358
1396
  * The column on which to compute the average. Must be a numeric type.
1359
1397
  */
@@ -1362,7 +1400,7 @@ declare type AverageAgg = {
1362
1400
  /**
1363
1401
  * Count the number of distinct values in a particular column.
1364
1402
  */
1365
- declare type UniqueCountAgg = {
1403
+ type UniqueCountAgg = {
1366
1404
  /**
1367
1405
  * The column from where to count the unique values.
1368
1406
  */
@@ -1377,7 +1415,7 @@ declare type UniqueCountAgg = {
1377
1415
  /**
1378
1416
  * Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
1379
1417
  */
1380
- declare type DateHistogramAgg = {
1418
+ type DateHistogramAgg = {
1381
1419
  /**
1382
1420
  * The column to use for bucketing. Must be of type datetime.
1383
1421
  */
@@ -1408,7 +1446,7 @@ declare type DateHistogramAgg = {
1408
1446
  * Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
1409
1447
  * The top values as ordered by the number of records (`$count`) are returned.
1410
1448
  */
1411
- declare type TopValuesAgg = {
1449
+ type TopValuesAgg = {
1412
1450
  /**
1413
1451
  * The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
1414
1452
  */
@@ -1425,7 +1463,7 @@ declare type TopValuesAgg = {
1425
1463
  /**
1426
1464
  * Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
1427
1465
  */
1428
- declare type NumericHistogramAgg = {
1466
+ type NumericHistogramAgg = {
1429
1467
  /**
1430
1468
  * The column to use for bucketing. Must be of numeric type.
1431
1469
  */
@@ -1448,7 +1486,7 @@ declare type NumericHistogramAgg = {
1448
1486
  offset?: number;
1449
1487
  aggs?: AggExpressionMap;
1450
1488
  };
1451
- declare type HighlightExpression = {
1489
+ type HighlightExpression = {
1452
1490
  /**
1453
1491
  * Set to `false` to disable highlighting. By default it is `true`.
1454
1492
  */
@@ -1463,7 +1501,7 @@ declare type HighlightExpression = {
1463
1501
  *
1464
1502
  * @x-go-type xata.BoosterExpression
1465
1503
  */
1466
- declare type BoosterExpression = {
1504
+ type BoosterExpression = {
1467
1505
  valueBooster?: ValueBooster$1;
1468
1506
  } | {
1469
1507
  numericBooster?: NumericBooster$1;
@@ -1473,7 +1511,7 @@ declare type BoosterExpression = {
1473
1511
  /**
1474
1512
  * Boost records with a particular value for a column.
1475
1513
  */
1476
- declare type ValueBooster$1 = {
1514
+ type ValueBooster$1 = {
1477
1515
  /**
1478
1516
  * The column in which to look for the value.
1479
1517
  */
@@ -1486,11 +1524,15 @@ declare type ValueBooster$1 = {
1486
1524
  * The factor with which to multiply the score of the record.
1487
1525
  */
1488
1526
  factor: number;
1527
+ /**
1528
+ * Only apply this booster to the records for which the provided filter matches.
1529
+ */
1530
+ ifMatchesFilter?: FilterExpression;
1489
1531
  };
1490
1532
  /**
1491
1533
  * Boost records based on the value of a numeric column.
1492
1534
  */
1493
- declare type NumericBooster$1 = {
1535
+ type NumericBooster$1 = {
1494
1536
  /**
1495
1537
  * The column in which to look for the value.
1496
1538
  */
@@ -1499,13 +1541,31 @@ declare type NumericBooster$1 = {
1499
1541
  * The factor with which to multiply the value of the column before adding it to the item score.
1500
1542
  */
1501
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;
1502
1562
  };
1503
1563
  /**
1504
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",
1505
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
1506
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.
1507
1567
  */
1508
- declare type DateBooster$1 = {
1568
+ type DateBooster$1 = {
1509
1569
  /**
1510
1570
  * The column in which to look for the value.
1511
1571
  */
@@ -1525,25 +1585,29 @@ declare type DateBooster$1 = {
1525
1585
  * The decay factor to expect at "scale" distance from the "origin".
1526
1586
  */
1527
1587
  decay: number;
1588
+ /**
1589
+ * Only apply this booster to the records for which the provided filter matches.
1590
+ */
1591
+ ifMatchesFilter?: FilterExpression;
1528
1592
  };
1529
- declare type FilterList = FilterExpression | FilterExpression[];
1530
- declare type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
1593
+ type FilterList = FilterExpression | FilterExpression[];
1594
+ type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
1531
1595
  /**
1532
1596
  * @maxProperties 1
1533
1597
  * @minProperties 1
1534
1598
  */
1535
- declare type FilterColumnIncludes = {
1599
+ type FilterColumnIncludes = {
1536
1600
  $includes?: FilterPredicate;
1537
1601
  $includesAny?: FilterPredicate;
1538
1602
  $includesAll?: FilterPredicate;
1539
1603
  $includesNone?: FilterPredicate;
1540
1604
  };
1541
- declare type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
1605
+ type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
1542
1606
  /**
1543
1607
  * @maxProperties 1
1544
1608
  * @minProperties 1
1545
1609
  */
1546
- declare type FilterPredicateOp = {
1610
+ type FilterPredicateOp = {
1547
1611
  $any?: FilterPredicate[];
1548
1612
  $all?: FilterPredicate[];
1549
1613
  $none?: FilterPredicate | FilterPredicate[];
@@ -1563,18 +1627,18 @@ declare type FilterPredicateOp = {
1563
1627
  * @maxProperties 2
1564
1628
  * @minProperties 2
1565
1629
  */
1566
- declare type FilterPredicateRangeOp = {
1630
+ type FilterPredicateRangeOp = {
1567
1631
  $lt?: FilterRangeValue;
1568
1632
  $le?: FilterRangeValue;
1569
1633
  $gt?: FilterRangeValue;
1570
1634
  $ge?: FilterRangeValue;
1571
1635
  };
1572
- declare type FilterRangeValue = number | string;
1573
- declare type FilterValue = number | string | boolean;
1636
+ type FilterRangeValue = number | string;
1637
+ type FilterValue = number | string | boolean;
1574
1638
  /**
1575
1639
  * Pagination settings.
1576
1640
  */
1577
- declare type PageConfig = {
1641
+ type PageConfig = {
1578
1642
  /**
1579
1643
  * Query the next page that follow the cursor.
1580
1644
  */
@@ -1604,16 +1668,35 @@ declare type PageConfig = {
1604
1668
  */
1605
1669
  offset?: number;
1606
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
+ };
1607
1690
  /**
1608
1691
  * @example name
1609
1692
  * @example email
1610
1693
  * @example created_at
1611
1694
  */
1612
- declare type ColumnsProjection = string[];
1695
+ type ColumnsProjection = string[];
1613
1696
  /**
1614
1697
  * Xata Table Record Metadata
1615
1698
  */
1616
- declare type RecordMeta = {
1699
+ type RecordMeta = {
1617
1700
  id: RecordID;
1618
1701
  xata: {
1619
1702
  /**
@@ -1645,11 +1728,11 @@ declare type RecordMeta = {
1645
1728
  /**
1646
1729
  * @pattern [a-zA-Z0-9_-~:]+
1647
1730
  */
1648
- declare type RecordID = string;
1731
+ type RecordID = string;
1649
1732
  /**
1650
1733
  * @example {"newName":"newName","oldName":"oldName"}
1651
1734
  */
1652
- declare type TableRename = {
1735
+ type TableRename = {
1653
1736
  /**
1654
1737
  * @minLength 1
1655
1738
  */
@@ -1662,7 +1745,7 @@ declare type TableRename = {
1662
1745
  /**
1663
1746
  * Records metadata
1664
1747
  */
1665
- declare type RecordsMetadata = {
1748
+ type RecordsMetadata = {
1666
1749
  page: {
1667
1750
  /**
1668
1751
  * last record id
@@ -1674,7 +1757,7 @@ declare type RecordsMetadata = {
1674
1757
  more: boolean;
1675
1758
  };
1676
1759
  };
1677
- declare type AggResponse$1 = (number | null) | {
1760
+ type AggResponse$1 = (number | null) | {
1678
1761
  values: ({
1679
1762
  $key: string | number;
1680
1763
  $count: number;
@@ -1685,7 +1768,7 @@ declare type AggResponse$1 = (number | null) | {
1685
1768
  /**
1686
1769
  * A transaction operation
1687
1770
  */
1688
- declare type TransactionOperation = {
1771
+ type TransactionOperation$1 = {
1689
1772
  insert: TransactionInsertOp;
1690
1773
  } | {
1691
1774
  update: TransactionUpdateOp;
@@ -1695,7 +1778,7 @@ declare type TransactionOperation = {
1695
1778
  /**
1696
1779
  * Insert operation
1697
1780
  */
1698
- declare type TransactionInsertOp = {
1781
+ type TransactionInsertOp = {
1699
1782
  /**
1700
1783
  * The table name
1701
1784
  */
@@ -1725,7 +1808,7 @@ declare type TransactionInsertOp = {
1725
1808
  /**
1726
1809
  * Update operation
1727
1810
  */
1728
- declare type TransactionUpdateOp = {
1811
+ type TransactionUpdateOp = {
1729
1812
  /**
1730
1813
  * The table name
1731
1814
  */
@@ -1749,17 +1832,23 @@ declare type TransactionUpdateOp = {
1749
1832
  /**
1750
1833
  * A delete operation. The transaction will continue if no record matches the ID.
1751
1834
  */
1752
- declare type TransactionDeleteOp = {
1835
+ type TransactionDeleteOp = {
1753
1836
  /**
1754
1837
  * The table name
1755
1838
  */
1756
1839
  table: string;
1757
1840
  id: RecordID;
1758
1841
  };
1842
+ /**
1843
+ * An ordered array of results from the submitted operations.
1844
+ */
1845
+ type TransactionSuccess = {
1846
+ results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
1847
+ };
1759
1848
  /**
1760
1849
  * A result from an insert operation.
1761
1850
  */
1762
- declare type TransactionResultInsert = {
1851
+ type TransactionResultInsert = {
1763
1852
  /**
1764
1853
  * The type of operation who's result is being returned.
1765
1854
  */
@@ -1773,7 +1862,7 @@ declare type TransactionResultInsert = {
1773
1862
  /**
1774
1863
  * A result from an update operation.
1775
1864
  */
1776
- declare type TransactionResultUpdate = {
1865
+ type TransactionResultUpdate = {
1777
1866
  /**
1778
1867
  * The type of operation who's result is being returned.
1779
1868
  */
@@ -1787,7 +1876,7 @@ declare type TransactionResultUpdate = {
1787
1876
  /**
1788
1877
  * A result from a delete operation.
1789
1878
  */
1790
- declare type TransactionResultDelete = {
1879
+ type TransactionResultDelete = {
1791
1880
  /**
1792
1881
  * The type of operation who's result is being returned.
1793
1882
  */
@@ -1797,16 +1886,27 @@ declare type TransactionResultDelete = {
1797
1886
  */
1798
1887
  rows: number;
1799
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
+ };
1800
1902
  /**
1801
1903
  * An error message from a failing transaction operation
1802
- *
1803
- * @x-go-type xata.ErrTxOp
1804
1904
  */
1805
- declare type TransactionError = {
1905
+ type TransactionError = {
1806
1906
  /**
1807
1907
  * The index of the failing operation
1808
1908
  */
1809
- index?: number;
1909
+ index: number;
1810
1910
  /**
1811
1911
  * The error message
1812
1912
  */
@@ -1816,11 +1916,11 @@ declare type TransactionError = {
1816
1916
  * @format date-time
1817
1917
  * @x-go-type string
1818
1918
  */
1819
- declare type DateTime = string;
1919
+ type DateTime = string;
1820
1920
  /**
1821
1921
  * Xata Table Record Metadata
1822
1922
  */
1823
- declare type XataRecord$1 = RecordMeta & {
1923
+ type XataRecord$1 = RecordMeta & {
1824
1924
  [key: string]: any;
1825
1925
  };
1826
1926
 
@@ -1830,42 +1930,42 @@ declare type XataRecord$1 = RecordMeta & {
1830
1930
  * @version 1.0
1831
1931
  */
1832
1932
 
1833
- declare type SimpleError = {
1933
+ type SimpleError = {
1834
1934
  id?: string;
1835
1935
  message: string;
1836
1936
  };
1837
- declare type BulkError = {
1937
+ type BulkError = {
1838
1938
  errors: {
1839
1939
  message?: string;
1840
1940
  status?: number;
1841
1941
  }[];
1842
1942
  };
1843
- declare type BulkInsertResponse = {
1943
+ type BulkInsertResponse = {
1844
1944
  recordIDs: string[];
1845
1945
  } | {
1846
1946
  records: XataRecord$1[];
1847
1947
  };
1848
- declare type BranchMigrationPlan = {
1948
+ type BranchMigrationPlan = {
1849
1949
  version: number;
1850
1950
  migration: BranchMigration;
1851
1951
  };
1852
- declare type RecordResponse = XataRecord$1;
1853
- declare type SchemaCompareResponse = {
1952
+ type RecordResponse = XataRecord$1;
1953
+ type SchemaCompareResponse = {
1854
1954
  source: Schema;
1855
1955
  target: Schema;
1856
1956
  edits: SchemaEditScript;
1857
1957
  };
1858
- declare type RecordUpdateResponse = XataRecord$1 | {
1958
+ type RecordUpdateResponse = XataRecord$1 | {
1859
1959
  id: string;
1860
1960
  xata: {
1861
1961
  version: number;
1862
1962
  };
1863
1963
  };
1864
- declare type QueryResponse = {
1964
+ type QueryResponse = {
1865
1965
  records: XataRecord$1[];
1866
1966
  meta: RecordsMetadata;
1867
1967
  };
1868
- declare type SchemaUpdateResponse = {
1968
+ type SchemaUpdateResponse = {
1869
1969
  /**
1870
1970
  * @minLength 1
1871
1971
  */
@@ -1873,52 +1973,34 @@ declare type SchemaUpdateResponse = {
1873
1973
  parentMigrationID: string;
1874
1974
  status: MigrationStatus;
1875
1975
  };
1876
- declare type SummarizeResponse = {
1976
+ type SummarizeResponse = {
1877
1977
  summaries: Record<string, any>[];
1878
1978
  };
1879
1979
  /**
1880
- * @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}]}}}
1881
1981
  */
1882
- declare type AggResponse = {
1982
+ type AggResponse = {
1883
1983
  aggs?: {
1884
1984
  [key: string]: AggResponse$1;
1885
1985
  };
1886
1986
  };
1887
- declare type SearchResponse = {
1987
+ type SearchResponse = {
1888
1988
  records: XataRecord$1[];
1889
1989
  warning?: string;
1890
1990
  };
1891
- /**
1892
- * @x-go-type TxSuccess
1893
- */
1894
- declare type TransactionSuccess = {
1895
- /**
1896
- * An ordered array of results from the submitted operations that were executed
1897
- */
1898
- results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
1899
- };
1900
- /**
1901
- * @x-go-type TxFailure
1902
- */
1903
- declare type TransactionFailure = {
1904
- /**
1905
- * An array of errors from the submitted operations.
1906
- */
1907
- errors: TransactionError[];
1908
- };
1909
- declare type BadRequestError = {
1991
+ type BadRequestError = {
1910
1992
  id?: string;
1911
1993
  message: string;
1912
1994
  };
1913
1995
  /**
1914
1996
  * @example {"message":"invalid API key"}
1915
1997
  */
1916
- declare type AuthError = {
1998
+ type AuthError = {
1917
1999
  id?: string;
1918
2000
  message: string;
1919
2001
  };
1920
2002
 
1921
- declare type DataPlaneFetcherExtraProps = {
2003
+ type DataPlaneFetcherExtraProps = {
1922
2004
  apiUrl: string;
1923
2005
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
1924
2006
  fetchImpl: FetchImpl;
@@ -1927,8 +2009,9 @@ declare type DataPlaneFetcherExtraProps = {
1927
2009
  signal?: AbortSignal;
1928
2010
  clientID?: string;
1929
2011
  sessionID?: string;
2012
+ clientName?: string;
1930
2013
  };
1931
- declare type ErrorWrapper<TError> = TError | {
2014
+ type ErrorWrapper<TError> = TError | {
1932
2015
  status: 'unknown';
1933
2016
  payload: string;
1934
2017
  };
@@ -1939,25 +2022,7 @@ declare type ErrorWrapper<TError> = TError | {
1939
2022
  * @version 1.0
1940
2023
  */
1941
2024
 
1942
- declare type DEPRECATEDgetDatabaseListPathParams = {
1943
- workspace: string;
1944
- region: string;
1945
- };
1946
- declare type DEPRECATEDgetDatabaseListError = ErrorWrapper<{
1947
- status: 400;
1948
- payload: BadRequestError;
1949
- } | {
1950
- status: 401;
1951
- payload: AuthError;
1952
- }>;
1953
- declare type DEPRECATEDgetDatabaseListVariables = {
1954
- pathParams: DEPRECATEDgetDatabaseListPathParams;
1955
- } & DataPlaneFetcherExtraProps;
1956
- /**
1957
- * List all databases available in your Workspace.
1958
- */
1959
- declare const dEPRECATEDgetDatabaseList: (variables: DEPRECATEDgetDatabaseListVariables, signal?: AbortSignal) => Promise<DEPRECATEDListDatabasesResponse>;
1960
- declare type GetBranchListPathParams = {
2025
+ type GetBranchListPathParams = {
1961
2026
  /**
1962
2027
  * The Database Name
1963
2028
  */
@@ -1965,7 +2030,7 @@ declare type GetBranchListPathParams = {
1965
2030
  workspace: string;
1966
2031
  region: string;
1967
2032
  };
1968
- declare type GetBranchListError = ErrorWrapper<{
2033
+ type GetBranchListError = ErrorWrapper<{
1969
2034
  status: 400;
1970
2035
  payload: BadRequestError;
1971
2036
  } | {
@@ -1975,142 +2040,14 @@ declare type GetBranchListError = ErrorWrapper<{
1975
2040
  status: 404;
1976
2041
  payload: SimpleError;
1977
2042
  }>;
1978
- declare type GetBranchListVariables = {
2043
+ type GetBranchListVariables = {
1979
2044
  pathParams: GetBranchListPathParams;
1980
2045
  } & DataPlaneFetcherExtraProps;
1981
2046
  /**
1982
2047
  * List all available Branches
1983
2048
  */
1984
2049
  declare const getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
1985
- declare type DEPRECATEDcreateDatabasePathParams = {
1986
- /**
1987
- * The Database Name
1988
- */
1989
- dbName: DBName;
1990
- workspace: string;
1991
- region: string;
1992
- };
1993
- declare type DEPRECATEDcreateDatabaseError = ErrorWrapper<{
1994
- status: 400;
1995
- payload: BadRequestError;
1996
- } | {
1997
- status: 401;
1998
- payload: AuthError;
1999
- }>;
2000
- declare type DEPRECATEDcreateDatabaseResponse = {
2001
- /**
2002
- * @minLength 1
2003
- */
2004
- databaseName: string;
2005
- branchName?: string;
2006
- status: MigrationStatus;
2007
- };
2008
- declare type DEPRECATEDcreateDatabaseRequestBody = {
2009
- /**
2010
- * @minLength 1
2011
- */
2012
- branchName?: string;
2013
- ui?: {
2014
- color?: string;
2015
- };
2016
- metadata?: BranchMetadata;
2017
- };
2018
- declare type DEPRECATEDcreateDatabaseVariables = {
2019
- body?: DEPRECATEDcreateDatabaseRequestBody;
2020
- pathParams: DEPRECATEDcreateDatabasePathParams;
2021
- } & DataPlaneFetcherExtraProps;
2022
- /**
2023
- * Create Database with identifier name
2024
- */
2025
- declare const dEPRECATEDcreateDatabase: (variables: DEPRECATEDcreateDatabaseVariables, signal?: AbortSignal) => Promise<DEPRECATEDcreateDatabaseResponse>;
2026
- declare type DEPRECATEDdeleteDatabasePathParams = {
2027
- /**
2028
- * The Database Name
2029
- */
2030
- dbName: DBName;
2031
- workspace: string;
2032
- region: string;
2033
- };
2034
- declare type DEPRECATEDdeleteDatabaseError = ErrorWrapper<{
2035
- status: 400;
2036
- payload: BadRequestError;
2037
- } | {
2038
- status: 401;
2039
- payload: AuthError;
2040
- } | {
2041
- status: 404;
2042
- payload: SimpleError;
2043
- }>;
2044
- declare type DEPRECATEDdeleteDatabaseResponse = {
2045
- status: MigrationStatus;
2046
- };
2047
- declare type DEPRECATEDdeleteDatabaseVariables = {
2048
- pathParams: DEPRECATEDdeleteDatabasePathParams;
2049
- } & DataPlaneFetcherExtraProps;
2050
- /**
2051
- * Delete a database and all of its branches and tables permanently.
2052
- */
2053
- declare const dEPRECATEDdeleteDatabase: (variables: DEPRECATEDdeleteDatabaseVariables, signal?: AbortSignal) => Promise<DEPRECATEDdeleteDatabaseResponse>;
2054
- declare type DEPRECATEDgetDatabaseMetadataPathParams = {
2055
- /**
2056
- * The Database Name
2057
- */
2058
- dbName: DBName;
2059
- workspace: string;
2060
- region: string;
2061
- };
2062
- declare type DEPRECATEDgetDatabaseMetadataError = ErrorWrapper<{
2063
- status: 400;
2064
- payload: BadRequestError;
2065
- } | {
2066
- status: 401;
2067
- payload: AuthError;
2068
- } | {
2069
- status: 404;
2070
- payload: SimpleError;
2071
- }>;
2072
- declare type DEPRECATEDgetDatabaseMetadataVariables = {
2073
- pathParams: DEPRECATEDgetDatabaseMetadataPathParams;
2074
- } & DataPlaneFetcherExtraProps;
2075
- /**
2076
- * Retrieve metadata of the given database
2077
- */
2078
- declare const dEPRECATEDgetDatabaseMetadata: (variables: DEPRECATEDgetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DEPRECATEDDatabaseMetadata>;
2079
- declare type DEPRECATEDupdateDatabaseMetadataPathParams = {
2080
- /**
2081
- * The Database Name
2082
- */
2083
- dbName: DBName;
2084
- workspace: string;
2085
- region: string;
2086
- };
2087
- declare type DEPRECATEDupdateDatabaseMetadataError = ErrorWrapper<{
2088
- status: 400;
2089
- payload: BadRequestError;
2090
- } | {
2091
- status: 401;
2092
- payload: AuthError;
2093
- } | {
2094
- status: 404;
2095
- payload: SimpleError;
2096
- }>;
2097
- declare type DEPRECATEDupdateDatabaseMetadataRequestBody = {
2098
- ui?: {
2099
- /**
2100
- * @minLength 1
2101
- */
2102
- color?: string;
2103
- };
2104
- };
2105
- declare type DEPRECATEDupdateDatabaseMetadataVariables = {
2106
- body?: DEPRECATEDupdateDatabaseMetadataRequestBody;
2107
- pathParams: DEPRECATEDupdateDatabaseMetadataPathParams;
2108
- } & DataPlaneFetcherExtraProps;
2109
- /**
2110
- * Update the color of the selected database
2111
- */
2112
- declare const dEPRECATEDupdateDatabaseMetadata: (variables: DEPRECATEDupdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DEPRECATEDDatabaseMetadata>;
2113
- declare type GetBranchDetailsPathParams = {
2050
+ type GetBranchDetailsPathParams = {
2114
2051
  /**
2115
2052
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2116
2053
  */
@@ -2118,7 +2055,7 @@ declare type GetBranchDetailsPathParams = {
2118
2055
  workspace: string;
2119
2056
  region: string;
2120
2057
  };
2121
- declare type GetBranchDetailsError = ErrorWrapper<{
2058
+ type GetBranchDetailsError = ErrorWrapper<{
2122
2059
  status: 400;
2123
2060
  payload: BadRequestError;
2124
2061
  } | {
@@ -2128,11 +2065,11 @@ declare type GetBranchDetailsError = ErrorWrapper<{
2128
2065
  status: 404;
2129
2066
  payload: SimpleError;
2130
2067
  }>;
2131
- declare type GetBranchDetailsVariables = {
2068
+ type GetBranchDetailsVariables = {
2132
2069
  pathParams: GetBranchDetailsPathParams;
2133
2070
  } & DataPlaneFetcherExtraProps;
2134
2071
  declare const getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal) => Promise<DBBranch>;
2135
- declare type CreateBranchPathParams = {
2072
+ type CreateBranchPathParams = {
2136
2073
  /**
2137
2074
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2138
2075
  */
@@ -2140,13 +2077,13 @@ declare type CreateBranchPathParams = {
2140
2077
  workspace: string;
2141
2078
  region: string;
2142
2079
  };
2143
- declare type CreateBranchQueryParams = {
2080
+ type CreateBranchQueryParams = {
2144
2081
  /**
2145
2082
  * Name of source branch to branch the new schema from
2146
2083
  */
2147
2084
  from?: string;
2148
2085
  };
2149
- declare type CreateBranchError = ErrorWrapper<{
2086
+ type CreateBranchError = ErrorWrapper<{
2150
2087
  status: 400;
2151
2088
  payload: BadRequestError;
2152
2089
  } | {
@@ -2155,8 +2092,11 @@ declare type CreateBranchError = ErrorWrapper<{
2155
2092
  } | {
2156
2093
  status: 404;
2157
2094
  payload: SimpleError;
2095
+ } | {
2096
+ status: 423;
2097
+ payload: SimpleError;
2158
2098
  }>;
2159
- declare type CreateBranchResponse = {
2099
+ type CreateBranchResponse = {
2160
2100
  /**
2161
2101
  * @minLength 1
2162
2102
  */
@@ -2164,20 +2104,20 @@ declare type CreateBranchResponse = {
2164
2104
  branchName: string;
2165
2105
  status: MigrationStatus;
2166
2106
  };
2167
- declare type CreateBranchRequestBody = {
2107
+ type CreateBranchRequestBody = {
2168
2108
  /**
2169
2109
  * Select the branch to fork from. Defaults to 'main'
2170
2110
  */
2171
2111
  from?: string;
2172
2112
  metadata?: BranchMetadata;
2173
2113
  };
2174
- declare type CreateBranchVariables = {
2114
+ type CreateBranchVariables = {
2175
2115
  body?: CreateBranchRequestBody;
2176
2116
  pathParams: CreateBranchPathParams;
2177
2117
  queryParams?: CreateBranchQueryParams;
2178
2118
  } & DataPlaneFetcherExtraProps;
2179
2119
  declare const createBranch: (variables: CreateBranchVariables, signal?: AbortSignal) => Promise<CreateBranchResponse>;
2180
- declare type DeleteBranchPathParams = {
2120
+ type DeleteBranchPathParams = {
2181
2121
  /**
2182
2122
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2183
2123
  */
@@ -2185,7 +2125,7 @@ declare type DeleteBranchPathParams = {
2185
2125
  workspace: string;
2186
2126
  region: string;
2187
2127
  };
2188
- declare type DeleteBranchError = ErrorWrapper<{
2128
+ type DeleteBranchError = ErrorWrapper<{
2189
2129
  status: 400;
2190
2130
  payload: BadRequestError;
2191
2131
  } | {
@@ -2194,18 +2134,21 @@ declare type DeleteBranchError = ErrorWrapper<{
2194
2134
  } | {
2195
2135
  status: 404;
2196
2136
  payload: SimpleError;
2137
+ } | {
2138
+ status: 409;
2139
+ payload: SimpleError;
2197
2140
  }>;
2198
- declare type DeleteBranchResponse = {
2141
+ type DeleteBranchResponse = {
2199
2142
  status: MigrationStatus;
2200
2143
  };
2201
- declare type DeleteBranchVariables = {
2144
+ type DeleteBranchVariables = {
2202
2145
  pathParams: DeleteBranchPathParams;
2203
2146
  } & DataPlaneFetcherExtraProps;
2204
2147
  /**
2205
2148
  * Delete the branch in the database and all its resources
2206
2149
  */
2207
2150
  declare const deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<DeleteBranchResponse>;
2208
- declare type UpdateBranchMetadataPathParams = {
2151
+ type UpdateBranchMetadataPathParams = {
2209
2152
  /**
2210
2153
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2211
2154
  */
@@ -2213,7 +2156,7 @@ declare type UpdateBranchMetadataPathParams = {
2213
2156
  workspace: string;
2214
2157
  region: string;
2215
2158
  };
2216
- declare type UpdateBranchMetadataError = ErrorWrapper<{
2159
+ type UpdateBranchMetadataError = ErrorWrapper<{
2217
2160
  status: 400;
2218
2161
  payload: BadRequestError;
2219
2162
  } | {
@@ -2223,7 +2166,7 @@ declare type UpdateBranchMetadataError = ErrorWrapper<{
2223
2166
  status: 404;
2224
2167
  payload: SimpleError;
2225
2168
  }>;
2226
- declare type UpdateBranchMetadataVariables = {
2169
+ type UpdateBranchMetadataVariables = {
2227
2170
  body?: BranchMetadata;
2228
2171
  pathParams: UpdateBranchMetadataPathParams;
2229
2172
  } & DataPlaneFetcherExtraProps;
@@ -2231,7 +2174,7 @@ declare type UpdateBranchMetadataVariables = {
2231
2174
  * Update the branch metadata
2232
2175
  */
2233
2176
  declare const updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal) => Promise<undefined>;
2234
- declare type GetBranchMetadataPathParams = {
2177
+ type GetBranchMetadataPathParams = {
2235
2178
  /**
2236
2179
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2237
2180
  */
@@ -2239,7 +2182,7 @@ declare type GetBranchMetadataPathParams = {
2239
2182
  workspace: string;
2240
2183
  region: string;
2241
2184
  };
2242
- declare type GetBranchMetadataError = ErrorWrapper<{
2185
+ type GetBranchMetadataError = ErrorWrapper<{
2243
2186
  status: 400;
2244
2187
  payload: BadRequestError;
2245
2188
  } | {
@@ -2249,11 +2192,11 @@ declare type GetBranchMetadataError = ErrorWrapper<{
2249
2192
  status: 404;
2250
2193
  payload: SimpleError;
2251
2194
  }>;
2252
- declare type GetBranchMetadataVariables = {
2195
+ type GetBranchMetadataVariables = {
2253
2196
  pathParams: GetBranchMetadataPathParams;
2254
2197
  } & DataPlaneFetcherExtraProps;
2255
2198
  declare const getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal) => Promise<BranchMetadata>;
2256
- declare type GetBranchStatsPathParams = {
2199
+ type GetBranchStatsPathParams = {
2257
2200
  /**
2258
2201
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2259
2202
  */
@@ -2261,7 +2204,7 @@ declare type GetBranchStatsPathParams = {
2261
2204
  workspace: string;
2262
2205
  region: string;
2263
2206
  };
2264
- declare type GetBranchStatsError = ErrorWrapper<{
2207
+ type GetBranchStatsError = ErrorWrapper<{
2265
2208
  status: 400;
2266
2209
  payload: SimpleError;
2267
2210
  } | {
@@ -2271,7 +2214,7 @@ declare type GetBranchStatsError = ErrorWrapper<{
2271
2214
  status: 404;
2272
2215
  payload: SimpleError;
2273
2216
  }>;
2274
- declare type GetBranchStatsResponse = {
2217
+ type GetBranchStatsResponse = {
2275
2218
  timestamp: string;
2276
2219
  interval: string;
2277
2220
  resolution: string;
@@ -2282,14 +2225,14 @@ declare type GetBranchStatsResponse = {
2282
2225
  writeLatency?: MetricsLatency;
2283
2226
  warning?: string;
2284
2227
  };
2285
- declare type GetBranchStatsVariables = {
2228
+ type GetBranchStatsVariables = {
2286
2229
  pathParams: GetBranchStatsPathParams;
2287
2230
  } & DataPlaneFetcherExtraProps;
2288
2231
  /**
2289
2232
  * Get branch usage metrics.
2290
2233
  */
2291
2234
  declare const getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal) => Promise<GetBranchStatsResponse>;
2292
- declare type GetGitBranchesMappingPathParams = {
2235
+ type GetGitBranchesMappingPathParams = {
2293
2236
  /**
2294
2237
  * The Database Name
2295
2238
  */
@@ -2297,14 +2240,14 @@ declare type GetGitBranchesMappingPathParams = {
2297
2240
  workspace: string;
2298
2241
  region: string;
2299
2242
  };
2300
- declare type GetGitBranchesMappingError = ErrorWrapper<{
2243
+ type GetGitBranchesMappingError = ErrorWrapper<{
2301
2244
  status: 400;
2302
2245
  payload: BadRequestError;
2303
2246
  } | {
2304
2247
  status: 401;
2305
2248
  payload: AuthError;
2306
2249
  }>;
2307
- declare type GetGitBranchesMappingVariables = {
2250
+ type GetGitBranchesMappingVariables = {
2308
2251
  pathParams: GetGitBranchesMappingPathParams;
2309
2252
  } & DataPlaneFetcherExtraProps;
2310
2253
  /**
@@ -2332,7 +2275,7 @@ declare type GetGitBranchesMappingVariables = {
2332
2275
  * ```
2333
2276
  */
2334
2277
  declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables, signal?: AbortSignal) => Promise<ListGitBranchesResponse>;
2335
- declare type AddGitBranchesEntryPathParams = {
2278
+ type AddGitBranchesEntryPathParams = {
2336
2279
  /**
2337
2280
  * The Database Name
2338
2281
  */
@@ -2340,20 +2283,20 @@ declare type AddGitBranchesEntryPathParams = {
2340
2283
  workspace: string;
2341
2284
  region: string;
2342
2285
  };
2343
- declare type AddGitBranchesEntryError = ErrorWrapper<{
2286
+ type AddGitBranchesEntryError = ErrorWrapper<{
2344
2287
  status: 400;
2345
2288
  payload: BadRequestError;
2346
2289
  } | {
2347
2290
  status: 401;
2348
2291
  payload: AuthError;
2349
2292
  }>;
2350
- declare type AddGitBranchesEntryResponse = {
2293
+ type AddGitBranchesEntryResponse = {
2351
2294
  /**
2352
2295
  * Warning message
2353
2296
  */
2354
2297
  warning?: string;
2355
2298
  };
2356
- declare type AddGitBranchesEntryRequestBody = {
2299
+ type AddGitBranchesEntryRequestBody = {
2357
2300
  /**
2358
2301
  * The name of the Git branch.
2359
2302
  */
@@ -2363,7 +2306,7 @@ declare type AddGitBranchesEntryRequestBody = {
2363
2306
  */
2364
2307
  xataBranch: BranchName;
2365
2308
  };
2366
- declare type AddGitBranchesEntryVariables = {
2309
+ type AddGitBranchesEntryVariables = {
2367
2310
  body: AddGitBranchesEntryRequestBody;
2368
2311
  pathParams: AddGitBranchesEntryPathParams;
2369
2312
  } & DataPlaneFetcherExtraProps;
@@ -2383,7 +2326,7 @@ declare type AddGitBranchesEntryVariables = {
2383
2326
  * ```
2384
2327
  */
2385
2328
  declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables, signal?: AbortSignal) => Promise<AddGitBranchesEntryResponse>;
2386
- declare type RemoveGitBranchesEntryPathParams = {
2329
+ type RemoveGitBranchesEntryPathParams = {
2387
2330
  /**
2388
2331
  * The Database Name
2389
2332
  */
@@ -2391,20 +2334,20 @@ declare type RemoveGitBranchesEntryPathParams = {
2391
2334
  workspace: string;
2392
2335
  region: string;
2393
2336
  };
2394
- declare type RemoveGitBranchesEntryQueryParams = {
2337
+ type RemoveGitBranchesEntryQueryParams = {
2395
2338
  /**
2396
2339
  * The Git Branch to remove from the mapping
2397
2340
  */
2398
2341
  gitBranch: string;
2399
2342
  };
2400
- declare type RemoveGitBranchesEntryError = ErrorWrapper<{
2343
+ type RemoveGitBranchesEntryError = ErrorWrapper<{
2401
2344
  status: 400;
2402
2345
  payload: BadRequestError;
2403
2346
  } | {
2404
2347
  status: 401;
2405
2348
  payload: AuthError;
2406
2349
  }>;
2407
- declare type RemoveGitBranchesEntryVariables = {
2350
+ type RemoveGitBranchesEntryVariables = {
2408
2351
  pathParams: RemoveGitBranchesEntryPathParams;
2409
2352
  queryParams: RemoveGitBranchesEntryQueryParams;
2410
2353
  } & DataPlaneFetcherExtraProps;
@@ -2418,7 +2361,7 @@ declare type RemoveGitBranchesEntryVariables = {
2418
2361
  * ```
2419
2362
  */
2420
2363
  declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal) => Promise<undefined>;
2421
- declare type ResolveBranchPathParams = {
2364
+ type ResolveBranchPathParams = {
2422
2365
  /**
2423
2366
  * The Database Name
2424
2367
  */
@@ -2426,7 +2369,7 @@ declare type ResolveBranchPathParams = {
2426
2369
  workspace: string;
2427
2370
  region: string;
2428
2371
  };
2429
- declare type ResolveBranchQueryParams = {
2372
+ type ResolveBranchQueryParams = {
2430
2373
  /**
2431
2374
  * The Git Branch
2432
2375
  */
@@ -2436,21 +2379,21 @@ declare type ResolveBranchQueryParams = {
2436
2379
  */
2437
2380
  fallbackBranch?: string;
2438
2381
  };
2439
- declare type ResolveBranchError = ErrorWrapper<{
2382
+ type ResolveBranchError = ErrorWrapper<{
2440
2383
  status: 400;
2441
2384
  payload: BadRequestError;
2442
2385
  } | {
2443
2386
  status: 401;
2444
2387
  payload: AuthError;
2445
2388
  }>;
2446
- declare type ResolveBranchResponse = {
2389
+ type ResolveBranchResponse = {
2447
2390
  branch: string;
2448
2391
  reason: {
2449
2392
  code: 'FOUND_IN_MAPPING' | 'BRANCH_EXISTS' | 'FALLBACK_BRANCH' | 'DEFAULT_BRANCH';
2450
2393
  message: string;
2451
2394
  };
2452
2395
  };
2453
- declare type ResolveBranchVariables = {
2396
+ type ResolveBranchVariables = {
2454
2397
  pathParams: ResolveBranchPathParams;
2455
2398
  queryParams?: ResolveBranchQueryParams;
2456
2399
  } & DataPlaneFetcherExtraProps;
@@ -2480,7 +2423,7 @@ declare type ResolveBranchVariables = {
2480
2423
  * ```
2481
2424
  */
2482
2425
  declare const resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal) => Promise<ResolveBranchResponse>;
2483
- declare type GetBranchMigrationHistoryPathParams = {
2426
+ type GetBranchMigrationHistoryPathParams = {
2484
2427
  /**
2485
2428
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2486
2429
  */
@@ -2488,7 +2431,7 @@ declare type GetBranchMigrationHistoryPathParams = {
2488
2431
  workspace: string;
2489
2432
  region: string;
2490
2433
  };
2491
- declare type GetBranchMigrationHistoryError = ErrorWrapper<{
2434
+ type GetBranchMigrationHistoryError = ErrorWrapper<{
2492
2435
  status: 400;
2493
2436
  payload: BadRequestError;
2494
2437
  } | {
@@ -2498,20 +2441,20 @@ declare type GetBranchMigrationHistoryError = ErrorWrapper<{
2498
2441
  status: 404;
2499
2442
  payload: SimpleError;
2500
2443
  }>;
2501
- declare type GetBranchMigrationHistoryResponse = {
2444
+ type GetBranchMigrationHistoryResponse = {
2502
2445
  startedFrom?: StartedFromMetadata;
2503
2446
  migrations?: BranchMigration[];
2504
2447
  };
2505
- declare type GetBranchMigrationHistoryRequestBody = {
2448
+ type GetBranchMigrationHistoryRequestBody = {
2506
2449
  limit?: number;
2507
2450
  startFrom?: string;
2508
2451
  };
2509
- declare type GetBranchMigrationHistoryVariables = {
2452
+ type GetBranchMigrationHistoryVariables = {
2510
2453
  body?: GetBranchMigrationHistoryRequestBody;
2511
2454
  pathParams: GetBranchMigrationHistoryPathParams;
2512
2455
  } & DataPlaneFetcherExtraProps;
2513
2456
  declare const getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal) => Promise<GetBranchMigrationHistoryResponse>;
2514
- declare type GetBranchMigrationPlanPathParams = {
2457
+ type GetBranchMigrationPlanPathParams = {
2515
2458
  /**
2516
2459
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2517
2460
  */
@@ -2519,7 +2462,7 @@ declare type GetBranchMigrationPlanPathParams = {
2519
2462
  workspace: string;
2520
2463
  region: string;
2521
2464
  };
2522
- declare type GetBranchMigrationPlanError = ErrorWrapper<{
2465
+ type GetBranchMigrationPlanError = ErrorWrapper<{
2523
2466
  status: 400;
2524
2467
  payload: BadRequestError;
2525
2468
  } | {
@@ -2529,7 +2472,7 @@ declare type GetBranchMigrationPlanError = ErrorWrapper<{
2529
2472
  status: 404;
2530
2473
  payload: SimpleError;
2531
2474
  }>;
2532
- declare type GetBranchMigrationPlanVariables = {
2475
+ type GetBranchMigrationPlanVariables = {
2533
2476
  body: Schema;
2534
2477
  pathParams: GetBranchMigrationPlanPathParams;
2535
2478
  } & DataPlaneFetcherExtraProps;
@@ -2537,7 +2480,7 @@ declare type GetBranchMigrationPlanVariables = {
2537
2480
  * Compute a migration plan from a target schema the branch should be migrated too.
2538
2481
  */
2539
2482
  declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<BranchMigrationPlan>;
2540
- declare type ExecuteBranchMigrationPlanPathParams = {
2483
+ type ExecuteBranchMigrationPlanPathParams = {
2541
2484
  /**
2542
2485
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2543
2486
  */
@@ -2545,7 +2488,7 @@ declare type ExecuteBranchMigrationPlanPathParams = {
2545
2488
  workspace: string;
2546
2489
  region: string;
2547
2490
  };
2548
- declare type ExecuteBranchMigrationPlanError = ErrorWrapper<{
2491
+ type ExecuteBranchMigrationPlanError = ErrorWrapper<{
2549
2492
  status: 400;
2550
2493
  payload: BadRequestError;
2551
2494
  } | {
@@ -2555,11 +2498,11 @@ declare type ExecuteBranchMigrationPlanError = ErrorWrapper<{
2555
2498
  status: 404;
2556
2499
  payload: SimpleError;
2557
2500
  }>;
2558
- declare type ExecuteBranchMigrationPlanRequestBody = {
2501
+ type ExecuteBranchMigrationPlanRequestBody = {
2559
2502
  version: number;
2560
2503
  migration: BranchMigration;
2561
2504
  };
2562
- declare type ExecuteBranchMigrationPlanVariables = {
2505
+ type ExecuteBranchMigrationPlanVariables = {
2563
2506
  body: ExecuteBranchMigrationPlanRequestBody;
2564
2507
  pathParams: ExecuteBranchMigrationPlanPathParams;
2565
2508
  } & DataPlaneFetcherExtraProps;
@@ -2567,7 +2510,7 @@ declare type ExecuteBranchMigrationPlanVariables = {
2567
2510
  * Apply a migration plan to the branch
2568
2511
  */
2569
2512
  declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
2570
- declare type BranchTransactionPathParams = {
2513
+ type BranchTransactionPathParams = {
2571
2514
  /**
2572
2515
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2573
2516
  */
@@ -2575,7 +2518,7 @@ declare type BranchTransactionPathParams = {
2575
2518
  workspace: string;
2576
2519
  region: string;
2577
2520
  };
2578
- declare type BranchTransactionError = ErrorWrapper<{
2521
+ type BranchTransactionError = ErrorWrapper<{
2579
2522
  status: 400;
2580
2523
  payload: TransactionFailure;
2581
2524
  } | {
@@ -2585,15 +2528,15 @@ declare type BranchTransactionError = ErrorWrapper<{
2585
2528
  status: 404;
2586
2529
  payload: SimpleError;
2587
2530
  }>;
2588
- declare type BranchTransactionRequestBody = {
2589
- operations: TransactionOperation[];
2531
+ type BranchTransactionRequestBody = {
2532
+ operations: TransactionOperation$1[];
2590
2533
  };
2591
- declare type BranchTransactionVariables = {
2534
+ type BranchTransactionVariables = {
2592
2535
  body: BranchTransactionRequestBody;
2593
2536
  pathParams: BranchTransactionPathParams;
2594
2537
  } & DataPlaneFetcherExtraProps;
2595
2538
  declare const branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
2596
- declare type QueryMigrationRequestsPathParams = {
2539
+ type QueryMigrationRequestsPathParams = {
2597
2540
  /**
2598
2541
  * The Database Name
2599
2542
  */
@@ -2601,7 +2544,7 @@ declare type QueryMigrationRequestsPathParams = {
2601
2544
  workspace: string;
2602
2545
  region: string;
2603
2546
  };
2604
- declare type QueryMigrationRequestsError = ErrorWrapper<{
2547
+ type QueryMigrationRequestsError = ErrorWrapper<{
2605
2548
  status: 400;
2606
2549
  payload: BadRequestError;
2607
2550
  } | {
@@ -2611,22 +2554,22 @@ declare type QueryMigrationRequestsError = ErrorWrapper<{
2611
2554
  status: 404;
2612
2555
  payload: SimpleError;
2613
2556
  }>;
2614
- declare type QueryMigrationRequestsResponse = {
2557
+ type QueryMigrationRequestsResponse = {
2615
2558
  migrationRequests: MigrationRequest[];
2616
2559
  meta: RecordsMetadata;
2617
2560
  };
2618
- declare type QueryMigrationRequestsRequestBody = {
2561
+ type QueryMigrationRequestsRequestBody = {
2619
2562
  filter?: FilterExpression;
2620
2563
  sort?: SortExpression;
2621
2564
  page?: PageConfig;
2622
2565
  columns?: ColumnsProjection;
2623
2566
  };
2624
- declare type QueryMigrationRequestsVariables = {
2567
+ type QueryMigrationRequestsVariables = {
2625
2568
  body?: QueryMigrationRequestsRequestBody;
2626
2569
  pathParams: QueryMigrationRequestsPathParams;
2627
2570
  } & DataPlaneFetcherExtraProps;
2628
2571
  declare const queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal) => Promise<QueryMigrationRequestsResponse>;
2629
- declare type CreateMigrationRequestPathParams = {
2572
+ type CreateMigrationRequestPathParams = {
2630
2573
  /**
2631
2574
  * The Database Name
2632
2575
  */
@@ -2634,7 +2577,7 @@ declare type CreateMigrationRequestPathParams = {
2634
2577
  workspace: string;
2635
2578
  region: string;
2636
2579
  };
2637
- declare type CreateMigrationRequestError = ErrorWrapper<{
2580
+ type CreateMigrationRequestError = ErrorWrapper<{
2638
2581
  status: 400;
2639
2582
  payload: BadRequestError;
2640
2583
  } | {
@@ -2644,10 +2587,10 @@ declare type CreateMigrationRequestError = ErrorWrapper<{
2644
2587
  status: 404;
2645
2588
  payload: SimpleError;
2646
2589
  }>;
2647
- declare type CreateMigrationRequestResponse = {
2590
+ type CreateMigrationRequestResponse = {
2648
2591
  number: number;
2649
2592
  };
2650
- declare type CreateMigrationRequestRequestBody = {
2593
+ type CreateMigrationRequestRequestBody = {
2651
2594
  /**
2652
2595
  * The source branch.
2653
2596
  */
@@ -2665,12 +2608,12 @@ declare type CreateMigrationRequestRequestBody = {
2665
2608
  */
2666
2609
  body?: string;
2667
2610
  };
2668
- declare type CreateMigrationRequestVariables = {
2611
+ type CreateMigrationRequestVariables = {
2669
2612
  body: CreateMigrationRequestRequestBody;
2670
2613
  pathParams: CreateMigrationRequestPathParams;
2671
2614
  } & DataPlaneFetcherExtraProps;
2672
2615
  declare const createMigrationRequest: (variables: CreateMigrationRequestVariables, signal?: AbortSignal) => Promise<CreateMigrationRequestResponse>;
2673
- declare type GetMigrationRequestPathParams = {
2616
+ type GetMigrationRequestPathParams = {
2674
2617
  /**
2675
2618
  * The Database Name
2676
2619
  */
@@ -2682,7 +2625,7 @@ declare type GetMigrationRequestPathParams = {
2682
2625
  workspace: string;
2683
2626
  region: string;
2684
2627
  };
2685
- declare type GetMigrationRequestError = ErrorWrapper<{
2628
+ type GetMigrationRequestError = ErrorWrapper<{
2686
2629
  status: 400;
2687
2630
  payload: BadRequestError;
2688
2631
  } | {
@@ -2692,11 +2635,11 @@ declare type GetMigrationRequestError = ErrorWrapper<{
2692
2635
  status: 404;
2693
2636
  payload: SimpleError;
2694
2637
  }>;
2695
- declare type GetMigrationRequestVariables = {
2638
+ type GetMigrationRequestVariables = {
2696
2639
  pathParams: GetMigrationRequestPathParams;
2697
2640
  } & DataPlaneFetcherExtraProps;
2698
2641
  declare const getMigrationRequest: (variables: GetMigrationRequestVariables, signal?: AbortSignal) => Promise<MigrationRequest>;
2699
- declare type UpdateMigrationRequestPathParams = {
2642
+ type UpdateMigrationRequestPathParams = {
2700
2643
  /**
2701
2644
  * The Database Name
2702
2645
  */
@@ -2708,7 +2651,7 @@ declare type UpdateMigrationRequestPathParams = {
2708
2651
  workspace: string;
2709
2652
  region: string;
2710
2653
  };
2711
- declare type UpdateMigrationRequestError = ErrorWrapper<{
2654
+ type UpdateMigrationRequestError = ErrorWrapper<{
2712
2655
  status: 400;
2713
2656
  payload: BadRequestError;
2714
2657
  } | {
@@ -2718,7 +2661,7 @@ declare type UpdateMigrationRequestError = ErrorWrapper<{
2718
2661
  status: 404;
2719
2662
  payload: SimpleError;
2720
2663
  }>;
2721
- declare type UpdateMigrationRequestRequestBody = {
2664
+ type UpdateMigrationRequestRequestBody = {
2722
2665
  /**
2723
2666
  * New migration request title.
2724
2667
  */
@@ -2732,12 +2675,12 @@ declare type UpdateMigrationRequestRequestBody = {
2732
2675
  */
2733
2676
  status?: 'open' | 'closed';
2734
2677
  };
2735
- declare type UpdateMigrationRequestVariables = {
2678
+ type UpdateMigrationRequestVariables = {
2736
2679
  body?: UpdateMigrationRequestRequestBody;
2737
2680
  pathParams: UpdateMigrationRequestPathParams;
2738
2681
  } & DataPlaneFetcherExtraProps;
2739
2682
  declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables, signal?: AbortSignal) => Promise<undefined>;
2740
- declare type ListMigrationRequestsCommitsPathParams = {
2683
+ type ListMigrationRequestsCommitsPathParams = {
2741
2684
  /**
2742
2685
  * The Database Name
2743
2686
  */
@@ -2749,7 +2692,7 @@ declare type ListMigrationRequestsCommitsPathParams = {
2749
2692
  workspace: string;
2750
2693
  region: string;
2751
2694
  };
2752
- declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
2695
+ type ListMigrationRequestsCommitsError = ErrorWrapper<{
2753
2696
  status: 400;
2754
2697
  payload: BadRequestError;
2755
2698
  } | {
@@ -2759,7 +2702,7 @@ declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
2759
2702
  status: 404;
2760
2703
  payload: SimpleError;
2761
2704
  }>;
2762
- declare type ListMigrationRequestsCommitsResponse = {
2705
+ type ListMigrationRequestsCommitsResponse = {
2763
2706
  meta: {
2764
2707
  /**
2765
2708
  * last record id
@@ -2772,7 +2715,7 @@ declare type ListMigrationRequestsCommitsResponse = {
2772
2715
  };
2773
2716
  logs: Commit[];
2774
2717
  };
2775
- declare type ListMigrationRequestsCommitsRequestBody = {
2718
+ type ListMigrationRequestsCommitsRequestBody = {
2776
2719
  page?: {
2777
2720
  /**
2778
2721
  * Query the next page that follow the cursor.
@@ -2790,12 +2733,12 @@ declare type ListMigrationRequestsCommitsRequestBody = {
2790
2733
  size?: number;
2791
2734
  };
2792
2735
  };
2793
- declare type ListMigrationRequestsCommitsVariables = {
2736
+ type ListMigrationRequestsCommitsVariables = {
2794
2737
  body?: ListMigrationRequestsCommitsRequestBody;
2795
2738
  pathParams: ListMigrationRequestsCommitsPathParams;
2796
2739
  } & DataPlaneFetcherExtraProps;
2797
2740
  declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal) => Promise<ListMigrationRequestsCommitsResponse>;
2798
- declare type CompareMigrationRequestPathParams = {
2741
+ type CompareMigrationRequestPathParams = {
2799
2742
  /**
2800
2743
  * The Database Name
2801
2744
  */
@@ -2807,7 +2750,7 @@ declare type CompareMigrationRequestPathParams = {
2807
2750
  workspace: string;
2808
2751
  region: string;
2809
2752
  };
2810
- declare type CompareMigrationRequestError = ErrorWrapper<{
2753
+ type CompareMigrationRequestError = ErrorWrapper<{
2811
2754
  status: 400;
2812
2755
  payload: BadRequestError;
2813
2756
  } | {
@@ -2817,11 +2760,11 @@ declare type CompareMigrationRequestError = ErrorWrapper<{
2817
2760
  status: 404;
2818
2761
  payload: SimpleError;
2819
2762
  }>;
2820
- declare type CompareMigrationRequestVariables = {
2763
+ type CompareMigrationRequestVariables = {
2821
2764
  pathParams: CompareMigrationRequestPathParams;
2822
2765
  } & DataPlaneFetcherExtraProps;
2823
2766
  declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
2824
- declare type GetMigrationRequestIsMergedPathParams = {
2767
+ type GetMigrationRequestIsMergedPathParams = {
2825
2768
  /**
2826
2769
  * The Database Name
2827
2770
  */
@@ -2833,7 +2776,7 @@ declare type GetMigrationRequestIsMergedPathParams = {
2833
2776
  workspace: string;
2834
2777
  region: string;
2835
2778
  };
2836
- declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
2779
+ type GetMigrationRequestIsMergedError = ErrorWrapper<{
2837
2780
  status: 400;
2838
2781
  payload: BadRequestError;
2839
2782
  } | {
@@ -2843,14 +2786,14 @@ declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
2843
2786
  status: 404;
2844
2787
  payload: SimpleError;
2845
2788
  }>;
2846
- declare type GetMigrationRequestIsMergedResponse = {
2789
+ type GetMigrationRequestIsMergedResponse = {
2847
2790
  merged?: boolean;
2848
2791
  };
2849
- declare type GetMigrationRequestIsMergedVariables = {
2792
+ type GetMigrationRequestIsMergedVariables = {
2850
2793
  pathParams: GetMigrationRequestIsMergedPathParams;
2851
2794
  } & DataPlaneFetcherExtraProps;
2852
2795
  declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal) => Promise<GetMigrationRequestIsMergedResponse>;
2853
- declare type MergeMigrationRequestPathParams = {
2796
+ type MergeMigrationRequestPathParams = {
2854
2797
  /**
2855
2798
  * The Database Name
2856
2799
  */
@@ -2862,7 +2805,7 @@ declare type MergeMigrationRequestPathParams = {
2862
2805
  workspace: string;
2863
2806
  region: string;
2864
2807
  };
2865
- declare type MergeMigrationRequestError = ErrorWrapper<{
2808
+ type MergeMigrationRequestError = ErrorWrapper<{
2866
2809
  status: 400;
2867
2810
  payload: BadRequestError;
2868
2811
  } | {
@@ -2872,11 +2815,11 @@ declare type MergeMigrationRequestError = ErrorWrapper<{
2872
2815
  status: 404;
2873
2816
  payload: SimpleError;
2874
2817
  }>;
2875
- declare type MergeMigrationRequestVariables = {
2818
+ type MergeMigrationRequestVariables = {
2876
2819
  pathParams: MergeMigrationRequestPathParams;
2877
2820
  } & DataPlaneFetcherExtraProps;
2878
2821
  declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<Commit>;
2879
- declare type GetBranchSchemaHistoryPathParams = {
2822
+ type GetBranchSchemaHistoryPathParams = {
2880
2823
  /**
2881
2824
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2882
2825
  */
@@ -2884,7 +2827,7 @@ declare type GetBranchSchemaHistoryPathParams = {
2884
2827
  workspace: string;
2885
2828
  region: string;
2886
2829
  };
2887
- declare type GetBranchSchemaHistoryError = ErrorWrapper<{
2830
+ type GetBranchSchemaHistoryError = ErrorWrapper<{
2888
2831
  status: 400;
2889
2832
  payload: BadRequestError;
2890
2833
  } | {
@@ -2894,7 +2837,7 @@ declare type GetBranchSchemaHistoryError = ErrorWrapper<{
2894
2837
  status: 404;
2895
2838
  payload: SimpleError;
2896
2839
  }>;
2897
- declare type GetBranchSchemaHistoryResponse = {
2840
+ type GetBranchSchemaHistoryResponse = {
2898
2841
  meta: {
2899
2842
  /**
2900
2843
  * last record id
@@ -2907,7 +2850,7 @@ declare type GetBranchSchemaHistoryResponse = {
2907
2850
  };
2908
2851
  logs: Commit[];
2909
2852
  };
2910
- declare type GetBranchSchemaHistoryRequestBody = {
2853
+ type GetBranchSchemaHistoryRequestBody = {
2911
2854
  page?: {
2912
2855
  /**
2913
2856
  * Query the next page that follow the cursor.
@@ -2925,12 +2868,12 @@ declare type GetBranchSchemaHistoryRequestBody = {
2925
2868
  size?: number;
2926
2869
  };
2927
2870
  };
2928
- declare type GetBranchSchemaHistoryVariables = {
2871
+ type GetBranchSchemaHistoryVariables = {
2929
2872
  body?: GetBranchSchemaHistoryRequestBody;
2930
2873
  pathParams: GetBranchSchemaHistoryPathParams;
2931
2874
  } & DataPlaneFetcherExtraProps;
2932
2875
  declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables, signal?: AbortSignal) => Promise<GetBranchSchemaHistoryResponse>;
2933
- declare type CompareBranchWithUserSchemaPathParams = {
2876
+ type CompareBranchWithUserSchemaPathParams = {
2934
2877
  /**
2935
2878
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2936
2879
  */
@@ -2938,7 +2881,7 @@ declare type CompareBranchWithUserSchemaPathParams = {
2938
2881
  workspace: string;
2939
2882
  region: string;
2940
2883
  };
2941
- declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
2884
+ type CompareBranchWithUserSchemaError = ErrorWrapper<{
2942
2885
  status: 400;
2943
2886
  payload: BadRequestError;
2944
2887
  } | {
@@ -2948,15 +2891,15 @@ declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
2948
2891
  status: 404;
2949
2892
  payload: SimpleError;
2950
2893
  }>;
2951
- declare type CompareBranchWithUserSchemaRequestBody = {
2894
+ type CompareBranchWithUserSchemaRequestBody = {
2952
2895
  schema: Schema;
2953
2896
  };
2954
- declare type CompareBranchWithUserSchemaVariables = {
2897
+ type CompareBranchWithUserSchemaVariables = {
2955
2898
  body: CompareBranchWithUserSchemaRequestBody;
2956
2899
  pathParams: CompareBranchWithUserSchemaPathParams;
2957
2900
  } & DataPlaneFetcherExtraProps;
2958
2901
  declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
2959
- declare type CompareBranchSchemasPathParams = {
2902
+ type CompareBranchSchemasPathParams = {
2960
2903
  /**
2961
2904
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2962
2905
  */
@@ -2968,7 +2911,7 @@ declare type CompareBranchSchemasPathParams = {
2968
2911
  workspace: string;
2969
2912
  region: string;
2970
2913
  };
2971
- declare type CompareBranchSchemasError = ErrorWrapper<{
2914
+ type CompareBranchSchemasError = ErrorWrapper<{
2972
2915
  status: 400;
2973
2916
  payload: BadRequestError;
2974
2917
  } | {
@@ -2978,12 +2921,12 @@ declare type CompareBranchSchemasError = ErrorWrapper<{
2978
2921
  status: 404;
2979
2922
  payload: SimpleError;
2980
2923
  }>;
2981
- declare type CompareBranchSchemasVariables = {
2924
+ type CompareBranchSchemasVariables = {
2982
2925
  body?: Record<string, any>;
2983
2926
  pathParams: CompareBranchSchemasPathParams;
2984
2927
  } & DataPlaneFetcherExtraProps;
2985
2928
  declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
2986
- declare type UpdateBranchSchemaPathParams = {
2929
+ type UpdateBranchSchemaPathParams = {
2987
2930
  /**
2988
2931
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2989
2932
  */
@@ -2991,7 +2934,7 @@ declare type UpdateBranchSchemaPathParams = {
2991
2934
  workspace: string;
2992
2935
  region: string;
2993
2936
  };
2994
- declare type UpdateBranchSchemaError = ErrorWrapper<{
2937
+ type UpdateBranchSchemaError = ErrorWrapper<{
2995
2938
  status: 400;
2996
2939
  payload: BadRequestError;
2997
2940
  } | {
@@ -3001,12 +2944,12 @@ declare type UpdateBranchSchemaError = ErrorWrapper<{
3001
2944
  status: 404;
3002
2945
  payload: SimpleError;
3003
2946
  }>;
3004
- declare type UpdateBranchSchemaVariables = {
2947
+ type UpdateBranchSchemaVariables = {
3005
2948
  body: Migration;
3006
2949
  pathParams: UpdateBranchSchemaPathParams;
3007
2950
  } & DataPlaneFetcherExtraProps;
3008
2951
  declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3009
- declare type PreviewBranchSchemaEditPathParams = {
2952
+ type PreviewBranchSchemaEditPathParams = {
3010
2953
  /**
3011
2954
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3012
2955
  */
@@ -3014,7 +2957,7 @@ declare type PreviewBranchSchemaEditPathParams = {
3014
2957
  workspace: string;
3015
2958
  region: string;
3016
2959
  };
3017
- declare type PreviewBranchSchemaEditError = ErrorWrapper<{
2960
+ type PreviewBranchSchemaEditError = ErrorWrapper<{
3018
2961
  status: 400;
3019
2962
  payload: BadRequestError;
3020
2963
  } | {
@@ -3024,19 +2967,19 @@ declare type PreviewBranchSchemaEditError = ErrorWrapper<{
3024
2967
  status: 404;
3025
2968
  payload: SimpleError;
3026
2969
  }>;
3027
- declare type PreviewBranchSchemaEditResponse = {
2970
+ type PreviewBranchSchemaEditResponse = {
3028
2971
  original: Schema;
3029
2972
  updated: Schema;
3030
2973
  };
3031
- declare type PreviewBranchSchemaEditRequestBody = {
2974
+ type PreviewBranchSchemaEditRequestBody = {
3032
2975
  edits?: SchemaEditScript;
3033
2976
  };
3034
- declare type PreviewBranchSchemaEditVariables = {
2977
+ type PreviewBranchSchemaEditVariables = {
3035
2978
  body?: PreviewBranchSchemaEditRequestBody;
3036
2979
  pathParams: PreviewBranchSchemaEditPathParams;
3037
2980
  } & DataPlaneFetcherExtraProps;
3038
2981
  declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal) => Promise<PreviewBranchSchemaEditResponse>;
3039
- declare type ApplyBranchSchemaEditPathParams = {
2982
+ type ApplyBranchSchemaEditPathParams = {
3040
2983
  /**
3041
2984
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3042
2985
  */
@@ -3044,7 +2987,7 @@ declare type ApplyBranchSchemaEditPathParams = {
3044
2987
  workspace: string;
3045
2988
  region: string;
3046
2989
  };
3047
- declare type ApplyBranchSchemaEditError = ErrorWrapper<{
2990
+ type ApplyBranchSchemaEditError = ErrorWrapper<{
3048
2991
  status: 400;
3049
2992
  payload: BadRequestError;
3050
2993
  } | {
@@ -3054,15 +2997,15 @@ declare type ApplyBranchSchemaEditError = ErrorWrapper<{
3054
2997
  status: 404;
3055
2998
  payload: SimpleError;
3056
2999
  }>;
3057
- declare type ApplyBranchSchemaEditRequestBody = {
3000
+ type ApplyBranchSchemaEditRequestBody = {
3058
3001
  edits: SchemaEditScript;
3059
3002
  };
3060
- declare type ApplyBranchSchemaEditVariables = {
3003
+ type ApplyBranchSchemaEditVariables = {
3061
3004
  body: ApplyBranchSchemaEditRequestBody;
3062
3005
  pathParams: ApplyBranchSchemaEditPathParams;
3063
3006
  } & DataPlaneFetcherExtraProps;
3064
3007
  declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3065
- declare type CreateTablePathParams = {
3008
+ type CreateTablePathParams = {
3066
3009
  /**
3067
3010
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3068
3011
  */
@@ -3074,7 +3017,7 @@ declare type CreateTablePathParams = {
3074
3017
  workspace: string;
3075
3018
  region: string;
3076
3019
  };
3077
- declare type CreateTableError = ErrorWrapper<{
3020
+ type CreateTableError = ErrorWrapper<{
3078
3021
  status: 400;
3079
3022
  payload: BadRequestError;
3080
3023
  } | {
@@ -3087,7 +3030,7 @@ declare type CreateTableError = ErrorWrapper<{
3087
3030
  status: 422;
3088
3031
  payload: SimpleError;
3089
3032
  }>;
3090
- declare type CreateTableResponse = {
3033
+ type CreateTableResponse = {
3091
3034
  branchName: string;
3092
3035
  /**
3093
3036
  * @minLength 1
@@ -3095,14 +3038,14 @@ declare type CreateTableResponse = {
3095
3038
  tableName: string;
3096
3039
  status: MigrationStatus;
3097
3040
  };
3098
- declare type CreateTableVariables = {
3041
+ type CreateTableVariables = {
3099
3042
  pathParams: CreateTablePathParams;
3100
3043
  } & DataPlaneFetcherExtraProps;
3101
3044
  /**
3102
3045
  * Creates a new table with the given name. Returns 422 if a table with the same name already exists.
3103
3046
  */
3104
3047
  declare const createTable: (variables: CreateTableVariables, signal?: AbortSignal) => Promise<CreateTableResponse>;
3105
- declare type DeleteTablePathParams = {
3048
+ type DeleteTablePathParams = {
3106
3049
  /**
3107
3050
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3108
3051
  */
@@ -3114,24 +3057,24 @@ declare type DeleteTablePathParams = {
3114
3057
  workspace: string;
3115
3058
  region: string;
3116
3059
  };
3117
- declare type DeleteTableError = ErrorWrapper<{
3060
+ type DeleteTableError = ErrorWrapper<{
3118
3061
  status: 400;
3119
3062
  payload: BadRequestError;
3120
3063
  } | {
3121
3064
  status: 401;
3122
3065
  payload: AuthError;
3123
3066
  }>;
3124
- declare type DeleteTableResponse = {
3067
+ type DeleteTableResponse = {
3125
3068
  status: MigrationStatus;
3126
3069
  };
3127
- declare type DeleteTableVariables = {
3070
+ type DeleteTableVariables = {
3128
3071
  pathParams: DeleteTablePathParams;
3129
3072
  } & DataPlaneFetcherExtraProps;
3130
3073
  /**
3131
3074
  * Deletes the table with the given name.
3132
3075
  */
3133
3076
  declare const deleteTable: (variables: DeleteTableVariables, signal?: AbortSignal) => Promise<DeleteTableResponse>;
3134
- declare type UpdateTablePathParams = {
3077
+ type UpdateTablePathParams = {
3135
3078
  /**
3136
3079
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3137
3080
  */
@@ -3143,7 +3086,7 @@ declare type UpdateTablePathParams = {
3143
3086
  workspace: string;
3144
3087
  region: string;
3145
3088
  };
3146
- declare type UpdateTableError = ErrorWrapper<{
3089
+ type UpdateTableError = ErrorWrapper<{
3147
3090
  status: 400;
3148
3091
  payload: BadRequestError;
3149
3092
  } | {
@@ -3152,14 +3095,17 @@ declare type UpdateTableError = ErrorWrapper<{
3152
3095
  } | {
3153
3096
  status: 404;
3154
3097
  payload: SimpleError;
3098
+ } | {
3099
+ status: 422;
3100
+ payload: SimpleError;
3155
3101
  }>;
3156
- declare type UpdateTableRequestBody = {
3102
+ type UpdateTableRequestBody = {
3157
3103
  /**
3158
3104
  * @minLength 1
3159
3105
  */
3160
3106
  name: string;
3161
3107
  };
3162
- declare type UpdateTableVariables = {
3108
+ type UpdateTableVariables = {
3163
3109
  body: UpdateTableRequestBody;
3164
3110
  pathParams: UpdateTablePathParams;
3165
3111
  } & DataPlaneFetcherExtraProps;
@@ -3177,7 +3123,7 @@ declare type UpdateTableVariables = {
3177
3123
  * ```
3178
3124
  */
3179
3125
  declare const updateTable: (variables: UpdateTableVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3180
- declare type GetTableSchemaPathParams = {
3126
+ type GetTableSchemaPathParams = {
3181
3127
  /**
3182
3128
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3183
3129
  */
@@ -3189,7 +3135,7 @@ declare type GetTableSchemaPathParams = {
3189
3135
  workspace: string;
3190
3136
  region: string;
3191
3137
  };
3192
- declare type GetTableSchemaError = ErrorWrapper<{
3138
+ type GetTableSchemaError = ErrorWrapper<{
3193
3139
  status: 400;
3194
3140
  payload: BadRequestError;
3195
3141
  } | {
@@ -3199,14 +3145,14 @@ declare type GetTableSchemaError = ErrorWrapper<{
3199
3145
  status: 404;
3200
3146
  payload: SimpleError;
3201
3147
  }>;
3202
- declare type GetTableSchemaResponse = {
3148
+ type GetTableSchemaResponse = {
3203
3149
  columns: Column[];
3204
3150
  };
3205
- declare type GetTableSchemaVariables = {
3151
+ type GetTableSchemaVariables = {
3206
3152
  pathParams: GetTableSchemaPathParams;
3207
3153
  } & DataPlaneFetcherExtraProps;
3208
3154
  declare const getTableSchema: (variables: GetTableSchemaVariables, signal?: AbortSignal) => Promise<GetTableSchemaResponse>;
3209
- declare type SetTableSchemaPathParams = {
3155
+ type SetTableSchemaPathParams = {
3210
3156
  /**
3211
3157
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3212
3158
  */
@@ -3218,7 +3164,7 @@ declare type SetTableSchemaPathParams = {
3218
3164
  workspace: string;
3219
3165
  region: string;
3220
3166
  };
3221
- declare type SetTableSchemaError = ErrorWrapper<{
3167
+ type SetTableSchemaError = ErrorWrapper<{
3222
3168
  status: 400;
3223
3169
  payload: BadRequestError;
3224
3170
  } | {
@@ -3231,15 +3177,15 @@ declare type SetTableSchemaError = ErrorWrapper<{
3231
3177
  status: 409;
3232
3178
  payload: SimpleError;
3233
3179
  }>;
3234
- declare type SetTableSchemaRequestBody = {
3180
+ type SetTableSchemaRequestBody = {
3235
3181
  columns: Column[];
3236
3182
  };
3237
- declare type SetTableSchemaVariables = {
3183
+ type SetTableSchemaVariables = {
3238
3184
  body: SetTableSchemaRequestBody;
3239
3185
  pathParams: SetTableSchemaPathParams;
3240
3186
  } & DataPlaneFetcherExtraProps;
3241
3187
  declare const setTableSchema: (variables: SetTableSchemaVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3242
- declare type GetTableColumnsPathParams = {
3188
+ type GetTableColumnsPathParams = {
3243
3189
  /**
3244
3190
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3245
3191
  */
@@ -3251,7 +3197,7 @@ declare type GetTableColumnsPathParams = {
3251
3197
  workspace: string;
3252
3198
  region: string;
3253
3199
  };
3254
- declare type GetTableColumnsError = ErrorWrapper<{
3200
+ type GetTableColumnsError = ErrorWrapper<{
3255
3201
  status: 400;
3256
3202
  payload: BadRequestError;
3257
3203
  } | {
@@ -3261,10 +3207,10 @@ declare type GetTableColumnsError = ErrorWrapper<{
3261
3207
  status: 404;
3262
3208
  payload: SimpleError;
3263
3209
  }>;
3264
- declare type GetTableColumnsResponse = {
3210
+ type GetTableColumnsResponse = {
3265
3211
  columns: Column[];
3266
3212
  };
3267
- declare type GetTableColumnsVariables = {
3213
+ type GetTableColumnsVariables = {
3268
3214
  pathParams: GetTableColumnsPathParams;
3269
3215
  } & DataPlaneFetcherExtraProps;
3270
3216
  /**
@@ -3272,7 +3218,7 @@ declare type GetTableColumnsVariables = {
3272
3218
  * full dot-separated path (flattened).
3273
3219
  */
3274
3220
  declare const getTableColumns: (variables: GetTableColumnsVariables, signal?: AbortSignal) => Promise<GetTableColumnsResponse>;
3275
- declare type AddTableColumnPathParams = {
3221
+ type AddTableColumnPathParams = {
3276
3222
  /**
3277
3223
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3278
3224
  */
@@ -3284,7 +3230,7 @@ declare type AddTableColumnPathParams = {
3284
3230
  workspace: string;
3285
3231
  region: string;
3286
3232
  };
3287
- declare type AddTableColumnError = ErrorWrapper<{
3233
+ type AddTableColumnError = ErrorWrapper<{
3288
3234
  status: 400;
3289
3235
  payload: BadRequestError;
3290
3236
  } | {
@@ -3294,7 +3240,7 @@ declare type AddTableColumnError = ErrorWrapper<{
3294
3240
  status: 404;
3295
3241
  payload: SimpleError;
3296
3242
  }>;
3297
- declare type AddTableColumnVariables = {
3243
+ type AddTableColumnVariables = {
3298
3244
  body: Column;
3299
3245
  pathParams: AddTableColumnPathParams;
3300
3246
  } & DataPlaneFetcherExtraProps;
@@ -3304,7 +3250,7 @@ declare type AddTableColumnVariables = {
3304
3250
  * passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
3305
3251
  */
3306
3252
  declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3307
- declare type GetColumnPathParams = {
3253
+ type GetColumnPathParams = {
3308
3254
  /**
3309
3255
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3310
3256
  */
@@ -3320,7 +3266,7 @@ declare type GetColumnPathParams = {
3320
3266
  workspace: string;
3321
3267
  region: string;
3322
3268
  };
3323
- declare type GetColumnError = ErrorWrapper<{
3269
+ type GetColumnError = ErrorWrapper<{
3324
3270
  status: 400;
3325
3271
  payload: BadRequestError;
3326
3272
  } | {
@@ -3330,14 +3276,14 @@ declare type GetColumnError = ErrorWrapper<{
3330
3276
  status: 404;
3331
3277
  payload: SimpleError;
3332
3278
  }>;
3333
- declare type GetColumnVariables = {
3279
+ type GetColumnVariables = {
3334
3280
  pathParams: GetColumnPathParams;
3335
3281
  } & DataPlaneFetcherExtraProps;
3336
3282
  /**
3337
3283
  * Get the definition of a single column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
3338
3284
  */
3339
3285
  declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
3340
- declare type UpdateColumnPathParams = {
3286
+ type UpdateColumnPathParams = {
3341
3287
  /**
3342
3288
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3343
3289
  */
@@ -3353,7 +3299,7 @@ declare type UpdateColumnPathParams = {
3353
3299
  workspace: string;
3354
3300
  region: string;
3355
3301
  };
3356
- declare type UpdateColumnError = ErrorWrapper<{
3302
+ type UpdateColumnError = ErrorWrapper<{
3357
3303
  status: 400;
3358
3304
  payload: BadRequestError;
3359
3305
  } | {
@@ -3363,13 +3309,13 @@ declare type UpdateColumnError = ErrorWrapper<{
3363
3309
  status: 404;
3364
3310
  payload: SimpleError;
3365
3311
  }>;
3366
- declare type UpdateColumnRequestBody = {
3312
+ type UpdateColumnRequestBody = {
3367
3313
  /**
3368
3314
  * @minLength 1
3369
3315
  */
3370
3316
  name: string;
3371
3317
  };
3372
- declare type UpdateColumnVariables = {
3318
+ type UpdateColumnVariables = {
3373
3319
  body: UpdateColumnRequestBody;
3374
3320
  pathParams: UpdateColumnPathParams;
3375
3321
  } & DataPlaneFetcherExtraProps;
@@ -3377,7 +3323,7 @@ declare type UpdateColumnVariables = {
3377
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`.
3378
3324
  */
3379
3325
  declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3380
- declare type DeleteColumnPathParams = {
3326
+ type DeleteColumnPathParams = {
3381
3327
  /**
3382
3328
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3383
3329
  */
@@ -3393,7 +3339,7 @@ declare type DeleteColumnPathParams = {
3393
3339
  workspace: string;
3394
3340
  region: string;
3395
3341
  };
3396
- declare type DeleteColumnError = ErrorWrapper<{
3342
+ type DeleteColumnError = ErrorWrapper<{
3397
3343
  status: 400;
3398
3344
  payload: BadRequestError;
3399
3345
  } | {
@@ -3403,14 +3349,14 @@ declare type DeleteColumnError = ErrorWrapper<{
3403
3349
  status: 404;
3404
3350
  payload: SimpleError;
3405
3351
  }>;
3406
- declare type DeleteColumnVariables = {
3352
+ type DeleteColumnVariables = {
3407
3353
  pathParams: DeleteColumnPathParams;
3408
3354
  } & DataPlaneFetcherExtraProps;
3409
3355
  /**
3410
3356
  * Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
3411
3357
  */
3412
3358
  declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3413
- declare type InsertRecordPathParams = {
3359
+ type InsertRecordPathParams = {
3414
3360
  /**
3415
3361
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3416
3362
  */
@@ -3422,13 +3368,13 @@ declare type InsertRecordPathParams = {
3422
3368
  workspace: string;
3423
3369
  region: string;
3424
3370
  };
3425
- declare type InsertRecordQueryParams = {
3371
+ type InsertRecordQueryParams = {
3426
3372
  /**
3427
3373
  * Column filters
3428
3374
  */
3429
3375
  columns?: ColumnsProjection;
3430
3376
  };
3431
- declare type InsertRecordError = ErrorWrapper<{
3377
+ type InsertRecordError = ErrorWrapper<{
3432
3378
  status: 400;
3433
3379
  payload: BadRequestError;
3434
3380
  } | {
@@ -3438,7 +3384,7 @@ declare type InsertRecordError = ErrorWrapper<{
3438
3384
  status: 404;
3439
3385
  payload: SimpleError;
3440
3386
  }>;
3441
- declare type InsertRecordVariables = {
3387
+ type InsertRecordVariables = {
3442
3388
  body?: Record<string, any>;
3443
3389
  pathParams: InsertRecordPathParams;
3444
3390
  queryParams?: InsertRecordQueryParams;
@@ -3447,7 +3393,7 @@ declare type InsertRecordVariables = {
3447
3393
  * Insert a new Record into the Table
3448
3394
  */
3449
3395
  declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
3450
- declare type GetRecordPathParams = {
3396
+ type GetRecordPathParams = {
3451
3397
  /**
3452
3398
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3453
3399
  */
@@ -3463,13 +3409,13 @@ declare type GetRecordPathParams = {
3463
3409
  workspace: string;
3464
3410
  region: string;
3465
3411
  };
3466
- declare type GetRecordQueryParams = {
3412
+ type GetRecordQueryParams = {
3467
3413
  /**
3468
3414
  * Column filters
3469
3415
  */
3470
3416
  columns?: ColumnsProjection;
3471
3417
  };
3472
- declare type GetRecordError = ErrorWrapper<{
3418
+ type GetRecordError = ErrorWrapper<{
3473
3419
  status: 400;
3474
3420
  payload: BadRequestError;
3475
3421
  } | {
@@ -3479,7 +3425,7 @@ declare type GetRecordError = ErrorWrapper<{
3479
3425
  status: 404;
3480
3426
  payload: SimpleError;
3481
3427
  }>;
3482
- declare type GetRecordVariables = {
3428
+ type GetRecordVariables = {
3483
3429
  pathParams: GetRecordPathParams;
3484
3430
  queryParams?: GetRecordQueryParams;
3485
3431
  } & DataPlaneFetcherExtraProps;
@@ -3487,7 +3433,7 @@ declare type GetRecordVariables = {
3487
3433
  * Retrieve record by ID
3488
3434
  */
3489
3435
  declare const getRecord: (variables: GetRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
3490
- declare type InsertRecordWithIDPathParams = {
3436
+ type InsertRecordWithIDPathParams = {
3491
3437
  /**
3492
3438
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3493
3439
  */
@@ -3503,7 +3449,7 @@ declare type InsertRecordWithIDPathParams = {
3503
3449
  workspace: string;
3504
3450
  region: string;
3505
3451
  };
3506
- declare type InsertRecordWithIDQueryParams = {
3452
+ type InsertRecordWithIDQueryParams = {
3507
3453
  /**
3508
3454
  * Column filters
3509
3455
  */
@@ -3511,7 +3457,7 @@ declare type InsertRecordWithIDQueryParams = {
3511
3457
  createOnly?: boolean;
3512
3458
  ifVersion?: number;
3513
3459
  };
3514
- declare type InsertRecordWithIDError = ErrorWrapper<{
3460
+ type InsertRecordWithIDError = ErrorWrapper<{
3515
3461
  status: 400;
3516
3462
  payload: BadRequestError;
3517
3463
  } | {
@@ -3524,7 +3470,7 @@ declare type InsertRecordWithIDError = ErrorWrapper<{
3524
3470
  status: 422;
3525
3471
  payload: SimpleError;
3526
3472
  }>;
3527
- declare type InsertRecordWithIDVariables = {
3473
+ type InsertRecordWithIDVariables = {
3528
3474
  body?: Record<string, any>;
3529
3475
  pathParams: InsertRecordWithIDPathParams;
3530
3476
  queryParams?: InsertRecordWithIDQueryParams;
@@ -3533,7 +3479,7 @@ declare type InsertRecordWithIDVariables = {
3533
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.
3534
3480
  */
3535
3481
  declare const insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
3536
- declare type UpdateRecordWithIDPathParams = {
3482
+ type UpdateRecordWithIDPathParams = {
3537
3483
  /**
3538
3484
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3539
3485
  */
@@ -3549,14 +3495,14 @@ declare type UpdateRecordWithIDPathParams = {
3549
3495
  workspace: string;
3550
3496
  region: string;
3551
3497
  };
3552
- declare type UpdateRecordWithIDQueryParams = {
3498
+ type UpdateRecordWithIDQueryParams = {
3553
3499
  /**
3554
3500
  * Column filters
3555
3501
  */
3556
3502
  columns?: ColumnsProjection;
3557
3503
  ifVersion?: number;
3558
3504
  };
3559
- declare type UpdateRecordWithIDError = ErrorWrapper<{
3505
+ type UpdateRecordWithIDError = ErrorWrapper<{
3560
3506
  status: 400;
3561
3507
  payload: BadRequestError;
3562
3508
  } | {
@@ -3569,13 +3515,13 @@ declare type UpdateRecordWithIDError = ErrorWrapper<{
3569
3515
  status: 422;
3570
3516
  payload: SimpleError;
3571
3517
  }>;
3572
- declare type UpdateRecordWithIDVariables = {
3518
+ type UpdateRecordWithIDVariables = {
3573
3519
  body?: Record<string, any>;
3574
3520
  pathParams: UpdateRecordWithIDPathParams;
3575
3521
  queryParams?: UpdateRecordWithIDQueryParams;
3576
3522
  } & DataPlaneFetcherExtraProps;
3577
3523
  declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
3578
- declare type UpsertRecordWithIDPathParams = {
3524
+ type UpsertRecordWithIDPathParams = {
3579
3525
  /**
3580
3526
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3581
3527
  */
@@ -3591,14 +3537,14 @@ declare type UpsertRecordWithIDPathParams = {
3591
3537
  workspace: string;
3592
3538
  region: string;
3593
3539
  };
3594
- declare type UpsertRecordWithIDQueryParams = {
3540
+ type UpsertRecordWithIDQueryParams = {
3595
3541
  /**
3596
3542
  * Column filters
3597
3543
  */
3598
3544
  columns?: ColumnsProjection;
3599
3545
  ifVersion?: number;
3600
3546
  };
3601
- declare type UpsertRecordWithIDError = ErrorWrapper<{
3547
+ type UpsertRecordWithIDError = ErrorWrapper<{
3602
3548
  status: 400;
3603
3549
  payload: BadRequestError;
3604
3550
  } | {
@@ -3611,13 +3557,13 @@ declare type UpsertRecordWithIDError = ErrorWrapper<{
3611
3557
  status: 422;
3612
3558
  payload: SimpleError;
3613
3559
  }>;
3614
- declare type UpsertRecordWithIDVariables = {
3560
+ type UpsertRecordWithIDVariables = {
3615
3561
  body?: Record<string, any>;
3616
3562
  pathParams: UpsertRecordWithIDPathParams;
3617
3563
  queryParams?: UpsertRecordWithIDQueryParams;
3618
3564
  } & DataPlaneFetcherExtraProps;
3619
3565
  declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
3620
- declare type DeleteRecordPathParams = {
3566
+ type DeleteRecordPathParams = {
3621
3567
  /**
3622
3568
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3623
3569
  */
@@ -3633,13 +3579,13 @@ declare type DeleteRecordPathParams = {
3633
3579
  workspace: string;
3634
3580
  region: string;
3635
3581
  };
3636
- declare type DeleteRecordQueryParams = {
3582
+ type DeleteRecordQueryParams = {
3637
3583
  /**
3638
3584
  * Column filters
3639
3585
  */
3640
3586
  columns?: ColumnsProjection;
3641
3587
  };
3642
- declare type DeleteRecordError = ErrorWrapper<{
3588
+ type DeleteRecordError = ErrorWrapper<{
3643
3589
  status: 400;
3644
3590
  payload: BadRequestError;
3645
3591
  } | {
@@ -3649,12 +3595,12 @@ declare type DeleteRecordError = ErrorWrapper<{
3649
3595
  status: 404;
3650
3596
  payload: SimpleError;
3651
3597
  }>;
3652
- declare type DeleteRecordVariables = {
3598
+ type DeleteRecordVariables = {
3653
3599
  pathParams: DeleteRecordPathParams;
3654
3600
  queryParams?: DeleteRecordQueryParams;
3655
3601
  } & DataPlaneFetcherExtraProps;
3656
3602
  declare const deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
3657
- declare type BulkInsertTableRecordsPathParams = {
3603
+ type BulkInsertTableRecordsPathParams = {
3658
3604
  /**
3659
3605
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3660
3606
  */
@@ -3666,13 +3612,13 @@ declare type BulkInsertTableRecordsPathParams = {
3666
3612
  workspace: string;
3667
3613
  region: string;
3668
3614
  };
3669
- declare type BulkInsertTableRecordsQueryParams = {
3615
+ type BulkInsertTableRecordsQueryParams = {
3670
3616
  /**
3671
3617
  * Column filters
3672
3618
  */
3673
3619
  columns?: ColumnsProjection;
3674
3620
  };
3675
- declare type BulkInsertTableRecordsError = ErrorWrapper<{
3621
+ type BulkInsertTableRecordsError = ErrorWrapper<{
3676
3622
  status: 400;
3677
3623
  payload: BulkError;
3678
3624
  } | {
@@ -3685,10 +3631,10 @@ declare type BulkInsertTableRecordsError = ErrorWrapper<{
3685
3631
  status: 422;
3686
3632
  payload: SimpleError;
3687
3633
  }>;
3688
- declare type BulkInsertTableRecordsRequestBody = {
3634
+ type BulkInsertTableRecordsRequestBody = {
3689
3635
  records: Record<string, any>[];
3690
3636
  };
3691
- declare type BulkInsertTableRecordsVariables = {
3637
+ type BulkInsertTableRecordsVariables = {
3692
3638
  body: BulkInsertTableRecordsRequestBody;
3693
3639
  pathParams: BulkInsertTableRecordsPathParams;
3694
3640
  queryParams?: BulkInsertTableRecordsQueryParams;
@@ -3697,7 +3643,7 @@ declare type BulkInsertTableRecordsVariables = {
3697
3643
  * Bulk insert records
3698
3644
  */
3699
3645
  declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal) => Promise<BulkInsertResponse>;
3700
- declare type QueryTablePathParams = {
3646
+ type QueryTablePathParams = {
3701
3647
  /**
3702
3648
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3703
3649
  */
@@ -3709,7 +3655,7 @@ declare type QueryTablePathParams = {
3709
3655
  workspace: string;
3710
3656
  region: string;
3711
3657
  };
3712
- declare type QueryTableError = ErrorWrapper<{
3658
+ type QueryTableError = ErrorWrapper<{
3713
3659
  status: 400;
3714
3660
  payload: BadRequestError;
3715
3661
  } | {
@@ -3719,7 +3665,7 @@ declare type QueryTableError = ErrorWrapper<{
3719
3665
  status: 404;
3720
3666
  payload: SimpleError;
3721
3667
  }>;
3722
- declare type QueryTableRequestBody = {
3668
+ type QueryTableRequestBody = {
3723
3669
  filter?: FilterExpression;
3724
3670
  sort?: SortExpression;
3725
3671
  page?: PageConfig;
@@ -3731,7 +3677,7 @@ declare type QueryTableRequestBody = {
3731
3677
  */
3732
3678
  consistency?: 'strong' | 'eventual';
3733
3679
  };
3734
- declare type QueryTableVariables = {
3680
+ type QueryTableVariables = {
3735
3681
  body?: QueryTableRequestBody;
3736
3682
  pathParams: QueryTablePathParams;
3737
3683
  } & DataPlaneFetcherExtraProps;
@@ -4276,20 +4222,25 @@ declare type QueryTableVariables = {
4276
4222
  *
4277
4223
  * #### Working with arrays
4278
4224
  *
4279
- * To test that an array contains a value, use `$includes`.
4225
+ * To test that an array contains a value, use `$includesAny`.
4280
4226
  *
4281
4227
  * ```json
4282
4228
  * {
4283
4229
  * "filter": {
4284
4230
  * "<array_name>": {
4285
- * "$includes": "value"
4231
+ * "$includesAny": "value"
4286
4232
  * }
4287
4233
  * }
4288
4234
  * }
4289
4235
  * ```
4290
4236
  *
4291
- * The `$includes` operator accepts a custom predicate that will check if any
4292
- * 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
4293
4244
  * the `$all` , `$contains` and `$endsWith` operators:
4294
4245
  *
4295
4246
  * ```json
@@ -4307,11 +4258,26 @@ declare type QueryTableVariables = {
4307
4258
  * }
4308
4259
  * ```
4309
4260
  *
4310
- * The `$includes` all operator succeeds if any column in the array matches the
4311
- * predicate. The `$includesAll` operator succeeds if all array items match the
4312
- * predicate. The `$includesNone` operator succeeds if no array item matches the
4313
- * predicate. The `$includes` operator is a synonym for the `$includesAny`
4314
- * 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.
4315
4281
  *
4316
4282
  * Here is an example of using the `$includesAll` operator:
4317
4283
  *
@@ -4325,7 +4291,7 @@ declare type QueryTableVariables = {
4325
4291
  * }
4326
4292
  * ```
4327
4293
  *
4328
- * The above matches if all label values contain the string "labels".
4294
+ * The above matches if all array values contain the string "label".
4329
4295
  *
4330
4296
  * ### Sorting
4331
4297
  *
@@ -4472,7 +4438,7 @@ declare type QueryTableVariables = {
4472
4438
  * ```
4473
4439
  */
4474
4440
  declare const queryTable: (variables: QueryTableVariables, signal?: AbortSignal) => Promise<QueryResponse>;
4475
- declare type SearchBranchPathParams = {
4441
+ type SearchBranchPathParams = {
4476
4442
  /**
4477
4443
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4478
4444
  */
@@ -4480,7 +4446,7 @@ declare type SearchBranchPathParams = {
4480
4446
  workspace: string;
4481
4447
  region: string;
4482
4448
  };
4483
- declare type SearchBranchError = ErrorWrapper<{
4449
+ type SearchBranchError = ErrorWrapper<{
4484
4450
  status: 400;
4485
4451
  payload: BadRequestError;
4486
4452
  } | {
@@ -4490,7 +4456,7 @@ declare type SearchBranchError = ErrorWrapper<{
4490
4456
  status: 404;
4491
4457
  payload: SimpleError;
4492
4458
  }>;
4493
- declare type SearchBranchRequestBody = {
4459
+ type SearchBranchRequestBody = {
4494
4460
  /**
4495
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.
4496
4462
  */
@@ -4512,8 +4478,9 @@ declare type SearchBranchRequestBody = {
4512
4478
  fuzziness?: FuzzinessExpression;
4513
4479
  prefix?: PrefixExpression;
4514
4480
  highlight?: HighlightExpression;
4481
+ page?: SearchPageConfig;
4515
4482
  };
4516
- declare type SearchBranchVariables = {
4483
+ type SearchBranchVariables = {
4517
4484
  body: SearchBranchRequestBody;
4518
4485
  pathParams: SearchBranchPathParams;
4519
4486
  } & DataPlaneFetcherExtraProps;
@@ -4521,7 +4488,7 @@ declare type SearchBranchVariables = {
4521
4488
  * Run a free text search operation across the database branch.
4522
4489
  */
4523
4490
  declare const searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal) => Promise<SearchResponse>;
4524
- declare type SearchTablePathParams = {
4491
+ type SearchTablePathParams = {
4525
4492
  /**
4526
4493
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4527
4494
  */
@@ -4533,7 +4500,7 @@ declare type SearchTablePathParams = {
4533
4500
  workspace: string;
4534
4501
  region: string;
4535
4502
  };
4536
- declare type SearchTableError = ErrorWrapper<{
4503
+ type SearchTableError = ErrorWrapper<{
4537
4504
  status: 400;
4538
4505
  payload: BadRequestError;
4539
4506
  } | {
@@ -4543,7 +4510,7 @@ declare type SearchTableError = ErrorWrapper<{
4543
4510
  status: 404;
4544
4511
  payload: SimpleError;
4545
4512
  }>;
4546
- declare type SearchTableRequestBody = {
4513
+ type SearchTableRequestBody = {
4547
4514
  /**
4548
4515
  * The query string.
4549
4516
  *
@@ -4556,8 +4523,9 @@ declare type SearchTableRequestBody = {
4556
4523
  filter?: FilterExpression;
4557
4524
  highlight?: HighlightExpression;
4558
4525
  boosters?: BoosterExpression[];
4526
+ page?: SearchPageConfig;
4559
4527
  };
4560
- declare type SearchTableVariables = {
4528
+ type SearchTableVariables = {
4561
4529
  body: SearchTableRequestBody;
4562
4530
  pathParams: SearchTablePathParams;
4563
4531
  } & DataPlaneFetcherExtraProps;
@@ -4569,7 +4537,7 @@ declare type SearchTableVariables = {
4569
4537
  * * filtering on columns of type `multiple` is currently unsupported
4570
4538
  */
4571
4539
  declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
4572
- declare type SummarizeTablePathParams = {
4540
+ type SummarizeTablePathParams = {
4573
4541
  /**
4574
4542
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4575
4543
  */
@@ -4581,7 +4549,7 @@ declare type SummarizeTablePathParams = {
4581
4549
  workspace: string;
4582
4550
  region: string;
4583
4551
  };
4584
- declare type SummarizeTableError = ErrorWrapper<{
4552
+ type SummarizeTableError = ErrorWrapper<{
4585
4553
  status: 400;
4586
4554
  payload: BadRequestError;
4587
4555
  } | {
@@ -4591,7 +4559,7 @@ declare type SummarizeTableError = ErrorWrapper<{
4591
4559
  status: 404;
4592
4560
  payload: SimpleError;
4593
4561
  }>;
4594
- declare type SummarizeTableRequestBody = {
4562
+ type SummarizeTableRequestBody = {
4595
4563
  filter?: FilterExpression;
4596
4564
  columns?: ColumnsProjection;
4597
4565
  summaries?: SummaryExpressionList;
@@ -4615,7 +4583,7 @@ declare type SummarizeTableRequestBody = {
4615
4583
  size?: number;
4616
4584
  };
4617
4585
  };
4618
- declare type SummarizeTableVariables = {
4586
+ type SummarizeTableVariables = {
4619
4587
  body?: SummarizeTableRequestBody;
4620
4588
  pathParams: SummarizeTablePathParams;
4621
4589
  } & DataPlaneFetcherExtraProps;
@@ -4684,7 +4652,7 @@ declare type SummarizeTableVariables = {
4684
4652
  * will return the default size.
4685
4653
  */
4686
4654
  declare const summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal) => Promise<SummarizeResponse>;
4687
- declare type AggregateTablePathParams = {
4655
+ type AggregateTablePathParams = {
4688
4656
  /**
4689
4657
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4690
4658
  */
@@ -4696,7 +4664,7 @@ declare type AggregateTablePathParams = {
4696
4664
  workspace: string;
4697
4665
  region: string;
4698
4666
  };
4699
- declare type AggregateTableError = ErrorWrapper<{
4667
+ type AggregateTableError = ErrorWrapper<{
4700
4668
  status: 400;
4701
4669
  payload: BadRequestError;
4702
4670
  } | {
@@ -4706,11 +4674,11 @@ declare type AggregateTableError = ErrorWrapper<{
4706
4674
  status: 404;
4707
4675
  payload: SimpleError;
4708
4676
  }>;
4709
- declare type AggregateTableRequestBody = {
4677
+ type AggregateTableRequestBody = {
4710
4678
  filter?: FilterExpression;
4711
4679
  aggs?: AggExpressionMap;
4712
4680
  };
4713
- declare type AggregateTableVariables = {
4681
+ type AggregateTableVariables = {
4714
4682
  body?: AggregateTableRequestBody;
4715
4683
  pathParams: AggregateTablePathParams;
4716
4684
  } & DataPlaneFetcherExtraProps;
@@ -4750,13 +4718,6 @@ declare const operationsByTag: {
4750
4718
  deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
4751
4719
  bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
4752
4720
  };
4753
- database: {
4754
- dEPRECATEDgetDatabaseList: (variables: DEPRECATEDgetDatabaseListVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDListDatabasesResponse>;
4755
- dEPRECATEDcreateDatabase: (variables: DEPRECATEDcreateDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDcreateDatabaseResponse>;
4756
- dEPRECATEDdeleteDatabase: (variables: DEPRECATEDdeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDdeleteDatabaseResponse>;
4757
- dEPRECATEDgetDatabaseMetadata: (variables: DEPRECATEDgetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDDatabaseMetadata>;
4758
- dEPRECATEDupdateDatabaseMetadata: (variables: DEPRECATEDupdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDDatabaseMetadata>;
4759
- };
4760
4721
  migrations: {
4761
4722
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchMigrationHistoryResponse>;
4762
4723
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<BranchMigrationPlan>;
@@ -4834,12 +4795,12 @@ declare const operationsByTag: {
4834
4795
  };
4835
4796
  };
4836
4797
 
4837
- declare type HostAliases = 'production' | 'staging';
4838
- declare type ProviderBuilder = {
4798
+ type HostAliases = 'production' | 'staging';
4799
+ type ProviderBuilder = {
4839
4800
  main: string;
4840
4801
  workspaces: string;
4841
4802
  };
4842
- declare type HostProvider = HostAliases | ProviderBuilder;
4803
+ type HostProvider = HostAliases | ProviderBuilder;
4843
4804
  declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder): string;
4844
4805
  declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
4845
4806
  declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
@@ -4863,8 +4824,6 @@ type responses_SchemaUpdateResponse = SchemaUpdateResponse;
4863
4824
  type responses_SummarizeResponse = SummarizeResponse;
4864
4825
  type responses_AggResponse = AggResponse;
4865
4826
  type responses_SearchResponse = SearchResponse;
4866
- type responses_TransactionSuccess = TransactionSuccess;
4867
- type responses_TransactionFailure = TransactionFailure;
4868
4827
  declare namespace responses {
4869
4828
  export {
4870
4829
  responses_AuthError as AuthError,
@@ -4881,8 +4840,6 @@ declare namespace responses {
4881
4840
  responses_SummarizeResponse as SummarizeResponse,
4882
4841
  responses_AggResponse as AggResponse,
4883
4842
  responses_SearchResponse as SearchResponse,
4884
- responses_TransactionSuccess as TransactionSuccess,
4885
- responses_TransactionFailure as TransactionFailure,
4886
4843
  };
4887
4844
  }
4888
4845
 
@@ -4891,8 +4848,6 @@ type schemas_BranchName = BranchName;
4891
4848
  type schemas_DBName = DBName;
4892
4849
  type schemas_DateTime = DateTime;
4893
4850
  type schemas_MigrationStatus = MigrationStatus;
4894
- type schemas_DEPRECATEDDatabaseMetadata = DEPRECATEDDatabaseMetadata;
4895
- type schemas_DEPRECATEDListDatabasesResponse = DEPRECATEDListDatabasesResponse;
4896
4851
  type schemas_ListBranchesResponse = ListBranchesResponse;
4897
4852
  type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
4898
4853
  type schemas_Branch = Branch;
@@ -4955,18 +4910,20 @@ type schemas_FilterPredicateRangeOp = FilterPredicateRangeOp;
4955
4910
  type schemas_FilterRangeValue = FilterRangeValue;
4956
4911
  type schemas_FilterValue = FilterValue;
4957
4912
  type schemas_PageConfig = PageConfig;
4913
+ type schemas_SearchPageConfig = SearchPageConfig;
4958
4914
  type schemas_ColumnsProjection = ColumnsProjection;
4959
4915
  type schemas_RecordMeta = RecordMeta;
4960
4916
  type schemas_RecordID = RecordID;
4961
4917
  type schemas_TableRename = TableRename;
4962
4918
  type schemas_RecordsMetadata = RecordsMetadata;
4963
- type schemas_TransactionOperation = TransactionOperation;
4964
4919
  type schemas_TransactionInsertOp = TransactionInsertOp;
4965
4920
  type schemas_TransactionUpdateOp = TransactionUpdateOp;
4966
4921
  type schemas_TransactionDeleteOp = TransactionDeleteOp;
4922
+ type schemas_TransactionSuccess = TransactionSuccess;
4967
4923
  type schemas_TransactionResultInsert = TransactionResultInsert;
4968
4924
  type schemas_TransactionResultUpdate = TransactionResultUpdate;
4969
4925
  type schemas_TransactionResultDelete = TransactionResultDelete;
4926
+ type schemas_TransactionFailure = TransactionFailure;
4970
4927
  type schemas_TransactionError = TransactionError;
4971
4928
  type schemas_User = User;
4972
4929
  type schemas_UserID = UserID;
@@ -4992,8 +4949,6 @@ declare namespace schemas {
4992
4949
  schemas_DBName as DBName,
4993
4950
  schemas_DateTime as DateTime,
4994
4951
  schemas_MigrationStatus as MigrationStatus,
4995
- schemas_DEPRECATEDDatabaseMetadata as DEPRECATEDDatabaseMetadata,
4996
- schemas_DEPRECATEDListDatabasesResponse as DEPRECATEDListDatabasesResponse,
4997
4952
  schemas_ListBranchesResponse as ListBranchesResponse,
4998
4953
  schemas_ListGitBranchesResponse as ListGitBranchesResponse,
4999
4954
  schemas_Branch as Branch,
@@ -5059,19 +5014,22 @@ declare namespace schemas {
5059
5014
  schemas_FilterRangeValue as FilterRangeValue,
5060
5015
  schemas_FilterValue as FilterValue,
5061
5016
  schemas_PageConfig as PageConfig,
5017
+ schemas_SearchPageConfig as SearchPageConfig,
5062
5018
  schemas_ColumnsProjection as ColumnsProjection,
5063
5019
  schemas_RecordMeta as RecordMeta,
5064
5020
  schemas_RecordID as RecordID,
5065
5021
  schemas_TableRename as TableRename,
5066
5022
  schemas_RecordsMetadata as RecordsMetadata,
5067
5023
  AggResponse$1 as AggResponse,
5068
- schemas_TransactionOperation as TransactionOperation,
5024
+ TransactionOperation$1 as TransactionOperation,
5069
5025
  schemas_TransactionInsertOp as TransactionInsertOp,
5070
5026
  schemas_TransactionUpdateOp as TransactionUpdateOp,
5071
5027
  schemas_TransactionDeleteOp as TransactionDeleteOp,
5028
+ schemas_TransactionSuccess as TransactionSuccess,
5072
5029
  schemas_TransactionResultInsert as TransactionResultInsert,
5073
5030
  schemas_TransactionResultUpdate as TransactionResultUpdate,
5074
5031
  schemas_TransactionResultDelete as TransactionResultDelete,
5032
+ schemas_TransactionFailure as TransactionFailure,
5075
5033
  schemas_TransactionError as TransactionError,
5076
5034
  XataRecord$1 as XataRecord,
5077
5035
  schemas_User as User,
@@ -5094,12 +5052,13 @@ declare namespace schemas {
5094
5052
  };
5095
5053
  }
5096
5054
 
5097
- declare type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
5055
+ type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
5098
5056
  interface XataApiClientOptions {
5099
5057
  fetch?: FetchImpl;
5100
5058
  apiKey?: string;
5101
5059
  host?: HostProvider;
5102
5060
  trace?: TraceFunction;
5061
+ clientName?: string;
5103
5062
  }
5104
5063
  declare class XataApiClient {
5105
5064
  #private;
@@ -5424,7 +5383,7 @@ declare class RecordsApi {
5424
5383
  region: string;
5425
5384
  database: DBName;
5426
5385
  branch: BranchName;
5427
- operations: TransactionOperation[];
5386
+ operations: TransactionOperation$1[];
5428
5387
  }): Promise<TransactionSuccess>;
5429
5388
  }
5430
5389
  declare class SearchAndFilterApi {
@@ -5667,60 +5626,67 @@ declare class XataApiPlugin implements XataPlugin {
5667
5626
  build(options: XataPluginOptions): Promise<XataApiClient>;
5668
5627
  }
5669
5628
 
5670
- declare type StringKeys<O> = Extract<keyof O, string>;
5671
- declare type Values<O> = O[StringKeys<O>];
5672
- declare type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
5673
- declare type If<Condition, Then, Else> = Condition extends true ? Then : Else;
5674
- declare type IsObject<T> = T extends Record<string, any> ? true : false;
5675
- declare type IsArray<T> = T extends Array<any> ? true : false;
5676
- 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 & {
5677
5636
  [P in K]-?: NonNullable<T[P]>;
5678
5637
  };
5679
- declare type GetArrayInnerType<T extends readonly any[]> = T[number];
5680
- declare type SingleOrArray<T> = T | T[];
5681
- declare type Dictionary<T> = Record<string, T>;
5682
- declare type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
5683
- 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> = {
5684
5643
  [P in Exclude<keyof T, keyof U>]?: never;
5685
5644
  };
5686
- declare type ExclusiveOr<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
5687
- 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 ? {
5688
5647
  [I in keyof T]: I extends K ? T[I] : never;
5689
5648
  } : never : never;
5690
- declare type AtMostOne<T> = Explode<Partial<T>>;
5691
- declare type AtLeastOne<T, U = {
5649
+ type AtMostOne<T> = Explode<Partial<T>>;
5650
+ type AtLeastOne<T, U = {
5692
5651
  [K in keyof T]: Pick<T, K>;
5693
5652
  }> = Partial<T> & U[keyof U];
5694
- 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>>;
5695
5661
 
5696
- declare type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
5697
- declare type WildcardColumns<O> = Values<{
5662
+ type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
5663
+ type WildcardColumns<O> = Values<{
5698
5664
  [K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
5699
5665
  }>;
5700
- declare type ColumnsByValue<O, Value> = Values<{
5666
+ type ColumnsByValue<O, Value> = Values<{
5701
5667
  [K in SelectableColumn<O>]: ValueAtColumn<O, K> extends infer C ? C extends Value ? K extends WildcardColumns<O> ? never : K : never : never;
5702
5668
  }>;
5703
- 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<{
5704
5670
  [K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
5705
5671
  }>>;
5706
- 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> ? {
5707
5673
  V: ValueAtColumn<Item, V>;
5708
5674
  } : never : O[K] : never> : never : never;
5709
- declare type MAX_RECURSION = 5;
5710
- 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<{
5711
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
5712
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
5713
5679
  K>> : never;
5714
5680
  }>, never>;
5715
- declare type DataProps<O> = Exclude<StringKeys<O>, StringKeys<XataRecord>>;
5716
- 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> ? {
5717
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;
5718
5684
  } : unknown : Key extends DataProps<O> ? {
5719
5685
  [K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], SelectedPick<NonNullable<O[K]>, ['*']>> : O[K];
5720
5686
  } : Key extends '*' ? {
5721
5687
  [K in StringKeys<O>]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Link<NonNullable<O[K]>>> : O[K];
5722
5688
  } : unknown;
5723
- declare type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
5689
+ type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
5724
5690
 
5725
5691
  /**
5726
5692
  * Represents an identifiable record from the database.
@@ -5804,8 +5770,8 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
5804
5770
  */
5805
5771
  delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
5806
5772
  }
5807
- declare type Link<Record extends XataRecord> = XataRecord<Record>;
5808
- declare type XataRecordMetadata = {
5773
+ type Link<Record extends XataRecord> = XataRecord<Record>;
5774
+ type XataRecordMetadata = {
5809
5775
  /**
5810
5776
  * Number that is increased every time the record is updated.
5811
5777
  */
@@ -5814,12 +5780,13 @@ declare type XataRecordMetadata = {
5814
5780
  };
5815
5781
  declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
5816
5782
  declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
5817
- declare type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
5818
- [K in keyof O]: O[K] extends XataRecord ? {
5819
- id: string;
5820
- } | string : NonNullable<O[K]> extends XataRecord ? {
5821
- id: string;
5822
- } | string | null | undefined : O[K];
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]>;
5823
5790
  }, keyof XataRecord>>;
5824
5791
 
5825
5792
  /**
@@ -5840,10 +5807,10 @@ declare type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
5840
5807
  }
5841
5808
  }
5842
5809
  */
5843
- declare type PropertyAccessFilter<Record> = {
5810
+ type PropertyAccessFilter<Record> = {
5844
5811
  [key in ColumnsByValue<Record, any>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
5845
5812
  };
5846
- declare type PropertyFilter<T> = T | {
5813
+ type PropertyFilter<T> = T | {
5847
5814
  $is: T;
5848
5815
  } | {
5849
5816
  $isNot: T;
@@ -5852,26 +5819,26 @@ declare type PropertyFilter<T> = T | {
5852
5819
  } | {
5853
5820
  $none: T[];
5854
5821
  } | ValueTypeFilters<T>;
5855
- declare type IncludesFilter<T> = PropertyFilter<T> | {
5822
+ type IncludesFilter<T> = PropertyFilter<T> | {
5856
5823
  [key in '$all' | '$none' | '$any']?: IncludesFilter<T> | Array<IncludesFilter<T> | {
5857
5824
  $not: IncludesFilter<T>;
5858
5825
  }>;
5859
5826
  };
5860
- declare type StringTypeFilter = {
5827
+ type StringTypeFilter = {
5861
5828
  [key in '$contains' | '$pattern' | '$startsWith' | '$endsWith']?: string;
5862
5829
  };
5863
- declare type ComparableType = number | Date;
5864
- declare type ComparableTypeFilter<T extends ComparableType> = {
5830
+ type ComparableType = number | Date;
5831
+ type ComparableTypeFilter<T extends ComparableType> = {
5865
5832
  [key in '$gt' | '$lt' | '$ge' | '$le']?: T;
5866
5833
  };
5867
- declare type ArrayFilter<T> = {
5834
+ type ArrayFilter<T> = {
5868
5835
  [key in '$includes']?: SingleOrArray<PropertyFilter<T> | ValueTypeFilters<T>> | IncludesFilter<T>;
5869
5836
  } | {
5870
5837
  [key in '$includesAll' | '$includesNone' | '$includesAny']?: T | Array<PropertyFilter<T> | {
5871
5838
  $not: PropertyFilter<T>;
5872
5839
  }>;
5873
5840
  };
5874
- 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;
5875
5842
  /**
5876
5843
  * AggregatorFilter
5877
5844
  * Example:
@@ -5895,60 +5862,104 @@ declare type ValueTypeFilters<T> = T | T extends string ? StringTypeFilter : T e
5895
5862
  ],
5896
5863
  }
5897
5864
  */
5898
- declare type AggregatorFilter<T> = {
5865
+ type AggregatorFilter<T> = {
5899
5866
  [key in '$all' | '$any' | '$not' | '$none']?: SingleOrArray<Filter<T>>;
5900
5867
  };
5901
5868
  /**
5902
5869
  * Existance filter
5903
5870
  * Example: { filter: { $exists: "settings" } }
5904
5871
  */
5905
- declare type ExistanceFilter<Record> = {
5872
+ type ExistanceFilter<Record> = {
5906
5873
  [key in '$exists' | '$notExists']?: ColumnsByValue<Record, any>;
5907
5874
  };
5908
- declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
5875
+ type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
5909
5876
  /**
5910
5877
  * Nested filter
5911
5878
  * Injects the Api filters on nested properties
5912
5879
  * Example: { filter: { settings: { plan: { $any: ['free', 'trial'] } } } }
5913
5880
  */
5914
- declare type NestedApiFilter<T> = {
5881
+ type NestedApiFilter<T> = {
5915
5882
  [key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
5916
5883
  };
5917
- 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>;
5918
5885
 
5919
- declare type DateBooster = {
5886
+ type DateBooster = {
5920
5887
  origin?: string;
5921
5888
  scale: string;
5922
5889
  decay: number;
5923
5890
  };
5924
- declare type NumericBooster = {
5891
+ type NumericBooster = {
5925
5892
  factor: number;
5926
- };
5927
- 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> = {
5928
5909
  value: T;
5929
5910
  factor: number;
5930
- };
5931
- 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<{
5932
5927
  [K in SelectableColumn<O>]: NonNullable<ValueAtColumn<O, K>> extends Date ? {
5933
5928
  dateBooster: {
5934
5929
  column: K;
5930
+ /**
5931
+ * Only apply this booster to the records for which the provided filter matches.
5932
+ */
5933
+ ifMatchesFilter?: Filter<O>;
5935
5934
  } & DateBooster;
5936
5935
  } : NonNullable<ValueAtColumn<O, K>> extends number ? ExclusiveOr<{
5937
5936
  numericBooster?: {
5938
5937
  column: K;
5938
+ /**
5939
+ * Only apply this booster to the records for which the provided filter matches.
5940
+ */
5941
+ ifMatchesFilter?: Filter<O>;
5939
5942
  } & NumericBooster;
5940
5943
  }, {
5941
5944
  valueBooster?: {
5942
5945
  column: K;
5946
+ /**
5947
+ * Only apply this booster to the records for which the provided filter matches.
5948
+ */
5949
+ ifMatchesFilter?: Filter<O>;
5943
5950
  } & ValueBooster<number>;
5944
5951
  }> : NonNullable<ValueAtColumn<O, K>> extends string | boolean ? {
5945
5952
  valueBooster: {
5946
5953
  column: K;
5954
+ /**
5955
+ * Only apply this booster to the records for which the provided filter matches.
5956
+ */
5957
+ ifMatchesFilter?: Filter<O>;
5947
5958
  } & ValueBooster<NonNullable<ValueAtColumn<O, K>>>;
5948
5959
  } : never;
5949
5960
  }>;
5950
5961
 
5951
- declare type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
5962
+ type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
5952
5963
  /**
5953
5964
  * The name of the column.
5954
5965
  */
@@ -5963,7 +5974,7 @@ declare type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
5963
5974
  weight?: number;
5964
5975
  };
5965
5976
 
5966
- declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
5977
+ type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
5967
5978
  fuzziness?: FuzzinessExpression;
5968
5979
  prefix?: PrefixExpression;
5969
5980
  highlight?: HighlightExpression;
@@ -5975,8 +5986,9 @@ declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables exte
5975
5986
  boosters?: Boosters<Schemas[Model] & XataRecord>[];
5976
5987
  };
5977
5988
  }>>;
5989
+ page?: SearchPageConfig;
5978
5990
  };
5979
- declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
5991
+ type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
5980
5992
  all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
5981
5993
  [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
5982
5994
  table: Model;
@@ -5990,13 +6002,13 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
5990
6002
  declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
5991
6003
  #private;
5992
6004
  private db;
5993
- constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
6005
+ constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
5994
6006
  build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
5995
6007
  }
5996
- declare type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
6008
+ type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
5997
6009
  getMetadata: () => XataRecordMetadata & SearchExtraProperties;
5998
6010
  };
5999
- declare type SearchExtraProperties = {
6011
+ type SearchExtraProperties = {
6000
6012
  table: string;
6001
6013
  highlight?: {
6002
6014
  [key: string]: string[] | {
@@ -6005,15 +6017,15 @@ declare type SearchExtraProperties = {
6005
6017
  };
6006
6018
  score?: number;
6007
6019
  };
6008
- declare type ReturnTable<Table, Tables> = Table extends Tables ? Table : never;
6009
- 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 {
6010
6022
  table: infer Table;
6011
6023
  } ? ReturnTable<Table, Tables> : never;
6012
6024
 
6013
6025
  /**
6014
6026
  * The description of a single aggregation operation. The key represents the
6015
6027
  */
6016
- declare type AggregationExpression<O extends XataRecord> = ExactlyOne<{
6028
+ type AggregationExpression<O extends XataRecord> = ExactlyOne<{
6017
6029
  count: CountAggregation<O>;
6018
6030
  sum: SumAggregation<O>;
6019
6031
  max: MaxAggregation<O>;
@@ -6024,23 +6036,23 @@ declare type AggregationExpression<O extends XataRecord> = ExactlyOne<{
6024
6036
  topValues: TopValuesAggregation<O>;
6025
6037
  numericHistogram: NumericHistogramAggregation<O>;
6026
6038
  }>;
6027
- declare type AggregationResult<Record extends XataRecord, Expression extends Dictionary<AggregationExpression<Record>>> = {
6039
+ type AggregationResult<Record extends XataRecord, Expression extends Dictionary<AggregationExpression<Record>>> = {
6028
6040
  aggs: {
6029
6041
  [K in keyof Expression]: AggregationResultItem<Record, Expression[K]>;
6030
6042
  };
6031
6043
  };
6032
- declare type AggregationExpressionType<T extends AggregationExpression<any>> = keyof T;
6033
- 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;
6034
6046
  /**
6035
6047
  * Count the number of records with an optional filter.
6036
6048
  */
6037
- declare type CountAggregation<O extends XataRecord> = {
6049
+ type CountAggregation<O extends XataRecord> = {
6038
6050
  filter?: Filter<O>;
6039
6051
  } | '*';
6040
6052
  /**
6041
6053
  * The sum of the numeric values in a particular column.
6042
6054
  */
6043
- declare type SumAggregation<O extends XataRecord> = {
6055
+ type SumAggregation<O extends XataRecord> = {
6044
6056
  /**
6045
6057
  * The column on which to compute the sum. Must be a numeric type.
6046
6058
  */
@@ -6049,7 +6061,7 @@ declare type SumAggregation<O extends XataRecord> = {
6049
6061
  /**
6050
6062
  * The max of the numeric values in a particular column.
6051
6063
  */
6052
- declare type MaxAggregation<O extends XataRecord> = {
6064
+ type MaxAggregation<O extends XataRecord> = {
6053
6065
  /**
6054
6066
  * The column on which to compute the max. Must be a numeric type.
6055
6067
  */
@@ -6058,7 +6070,7 @@ declare type MaxAggregation<O extends XataRecord> = {
6058
6070
  /**
6059
6071
  * The min of the numeric values in a particular column.
6060
6072
  */
6061
- declare type MinAggregation<O extends XataRecord> = {
6073
+ type MinAggregation<O extends XataRecord> = {
6062
6074
  /**
6063
6075
  * The column on which to compute the min. Must be a numeric type.
6064
6076
  */
@@ -6067,7 +6079,7 @@ declare type MinAggregation<O extends XataRecord> = {
6067
6079
  /**
6068
6080
  * The average of the numeric values in a particular column.
6069
6081
  */
6070
- declare type AverageAggregation<O extends XataRecord> = {
6082
+ type AverageAggregation<O extends XataRecord> = {
6071
6083
  /**
6072
6084
  * The column on which to compute the average. Must be a numeric type.
6073
6085
  */
@@ -6076,7 +6088,7 @@ declare type AverageAggregation<O extends XataRecord> = {
6076
6088
  /**
6077
6089
  * Count the number of distinct values in a particular column.
6078
6090
  */
6079
- declare type UniqueCountAggregation<O extends XataRecord> = {
6091
+ type UniqueCountAggregation<O extends XataRecord> = {
6080
6092
  /**
6081
6093
  * The column from where to count the unique values.
6082
6094
  */
@@ -6091,7 +6103,7 @@ declare type UniqueCountAggregation<O extends XataRecord> = {
6091
6103
  /**
6092
6104
  * Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
6093
6105
  */
6094
- declare type DateHistogramAggregation<O extends XataRecord> = {
6106
+ type DateHistogramAggregation<O extends XataRecord> = {
6095
6107
  /**
6096
6108
  * The column to use for bucketing. Must be of type datetime.
6097
6109
  */
@@ -6122,7 +6134,7 @@ declare type DateHistogramAggregation<O extends XataRecord> = {
6122
6134
  * Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
6123
6135
  * The top values as ordered by the number of records (`$count``) are returned.
6124
6136
  */
6125
- declare type TopValuesAggregation<O extends XataRecord> = {
6137
+ type TopValuesAggregation<O extends XataRecord> = {
6126
6138
  /**
6127
6139
  * The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
6128
6140
  */
@@ -6139,7 +6151,7 @@ declare type TopValuesAggregation<O extends XataRecord> = {
6139
6151
  /**
6140
6152
  * Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
6141
6153
  */
6142
- declare type NumericHistogramAggregation<O extends XataRecord> = {
6154
+ type NumericHistogramAggregation<O extends XataRecord> = {
6143
6155
  /**
6144
6156
  * The column to use for bucketing. Must be of numeric type.
6145
6157
  */
@@ -6162,7 +6174,7 @@ declare type NumericHistogramAggregation<O extends XataRecord> = {
6162
6174
  offset?: number;
6163
6175
  aggs?: Dictionary<AggregationExpression<O>>;
6164
6176
  };
6165
- declare type AggregationExpressionResultTypes = {
6177
+ type AggregationExpressionResultTypes = {
6166
6178
  count: number;
6167
6179
  sum: number | null;
6168
6180
  max: number | null;
@@ -6173,7 +6185,7 @@ declare type AggregationExpressionResultTypes = {
6173
6185
  topValues: ComplexAggregationResult;
6174
6186
  numericHistogram: ComplexAggregationResult;
6175
6187
  };
6176
- declare type ComplexAggregationResult = {
6188
+ type ComplexAggregationResult = {
6177
6189
  values: Array<{
6178
6190
  $key: string | number;
6179
6191
  $count: number;
@@ -6181,26 +6193,26 @@ declare type ComplexAggregationResult = {
6181
6193
  }>;
6182
6194
  };
6183
6195
 
6184
- declare type SortDirection = 'asc' | 'desc';
6185
- 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>> = {
6186
6198
  column: Columns;
6187
6199
  direction?: SortDirection;
6188
6200
  };
6189
- declare type SortFilter<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns>;
6190
- 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<{
6191
6203
  [Key in Columns]: {
6192
6204
  [K in Key]: SortDirection;
6193
6205
  };
6194
6206
  }>;
6195
6207
 
6196
- declare type SummarizeExpression<O extends XataRecord> = ExactlyOne<{
6208
+ type SummarizeExpression<O extends XataRecord> = ExactlyOne<{
6197
6209
  count: ColumnsByValue<O, any> | '*';
6198
6210
  min: ColumnsByValue<O, string | number | Date | any[]>;
6199
6211
  max: ColumnsByValue<O, string | number | Date | any[]>;
6200
6212
  sum: ColumnsByValue<O, number>;
6201
6213
  average: ColumnsByValue<O, number>;
6202
6214
  }>;
6203
- 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>[]> = {
6204
6216
  summaries?: Expression;
6205
6217
  summariesFilter?: SummarizeFilter<Record, Expression>;
6206
6218
  filter?: Filter<Record>;
@@ -6210,39 +6222,40 @@ declare type SummarizeParams<Record extends XataRecord, Expression extends Dicti
6210
6222
  size: number;
6211
6223
  };
6212
6224
  };
6213
- 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>[]> = {
6214
6226
  summaries: SummarizeResultItem<Record, Expression, Columns>[];
6215
6227
  };
6216
- declare type SummarizeExpressionResultTypes<Value> = {
6228
+ type SummarizeExpressionResultTypes<Value> = {
6217
6229
  count: number;
6218
6230
  min: Value;
6219
6231
  max: Value;
6220
6232
  sum: number;
6221
6233
  average: number;
6222
6234
  };
6223
- declare type SummarizeSort<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = SingleOrArray<SortFilter<Record, ColumnsByValue<Record, any> | StringKeys<Expression>>>;
6224
- 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>>> = {
6225
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;
6226
6238
  };
6227
- declare type SummarizeFilter<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = Filter<Record & SummarizeValuePick<Record, Expression>>;
6228
- 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>;
6229
6241
 
6230
- declare type BaseOptions<T extends XataRecord> = {
6242
+ type BaseOptions<T extends XataRecord> = {
6231
6243
  columns?: SelectableColumn<T>[];
6244
+ consistency?: 'strong' | 'eventual';
6232
6245
  cache?: number;
6233
6246
  fetchOptions?: Record<string, unknown>;
6234
6247
  };
6235
- declare type CursorQueryOptions = {
6248
+ type CursorQueryOptions = {
6236
6249
  pagination?: CursorNavigationOptions & OffsetNavigationOptions;
6237
6250
  filter?: never;
6238
- sort?: never | unknown;
6251
+ sort?: never;
6239
6252
  };
6240
- declare type OffsetQueryOptions<T extends XataRecord> = {
6253
+ type OffsetQueryOptions<T extends XataRecord> = {
6241
6254
  pagination?: OffsetNavigationOptions;
6242
6255
  filter?: FilterExpression;
6243
6256
  sort?: SingleOrArray<SortFilter<T>>;
6244
6257
  };
6245
- declare type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions | OffsetQueryOptions<T>);
6258
+ type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions | OffsetQueryOptions<T>);
6246
6259
  /**
6247
6260
  * Query objects contain the information of all filters, sorting, etc. to be included in the database query.
6248
6261
  *
@@ -6306,10 +6319,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6306
6319
  * })
6307
6320
  * ```
6308
6321
  *
6309
- * @param filters A filter object
6322
+ * @param filter A filter object
6310
6323
  * @returns A new Query object.
6311
6324
  */
6312
- filter(filters?: Filter<Record>): Query<Record, Result>;
6325
+ filter(filter?: Filter<Record>): Query<Record, Result>;
6313
6326
  /**
6314
6327
  * Builds a new query with a new sort option.
6315
6328
  * @param column The column name.
@@ -6489,7 +6502,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
6489
6502
  hasNextPage(): boolean;
6490
6503
  }
6491
6504
 
6492
- declare type PaginationQueryMeta = {
6505
+ type PaginationQueryMeta = {
6493
6506
  page: {
6494
6507
  cursor: string;
6495
6508
  more: boolean;
@@ -6553,7 +6566,7 @@ declare class Page<Record extends XataRecord, Result extends XataRecord = Record
6553
6566
  */
6554
6567
  hasNextPage(): boolean;
6555
6568
  }
6556
- declare type CursorNavigationOptions = {
6569
+ type CursorNavigationOptions = {
6557
6570
  start?: string;
6558
6571
  } | {
6559
6572
  end?: string;
@@ -6561,7 +6574,7 @@ declare type CursorNavigationOptions = {
6561
6574
  after?: string;
6562
6575
  before?: string;
6563
6576
  };
6564
- declare type OffsetNavigationOptions = {
6577
+ type OffsetNavigationOptions = {
6565
6578
  size?: number;
6566
6579
  offset?: number;
6567
6580
  };
@@ -7098,6 +7111,8 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7098
7111
  highlight?: HighlightExpression;
7099
7112
  filter?: Filter<Record>;
7100
7113
  boosters?: Boosters<Record>[];
7114
+ page?: SearchPageConfig;
7115
+ target?: TargetColumn<Record>[];
7101
7116
  }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
7102
7117
  /**
7103
7118
  * Aggregates records in the table.
@@ -7224,13 +7239,15 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7224
7239
  highlight?: HighlightExpression;
7225
7240
  filter?: Filter<Record>;
7226
7241
  boosters?: Boosters<Record>[];
7242
+ page?: SearchPageConfig;
7243
+ target?: TargetColumn<Record>[];
7227
7244
  }): Promise<any>;
7228
7245
  aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
7229
7246
  query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
7230
7247
  summarizeTable<Result extends XataRecord>(query: Query<Record, Result>, summaries?: Dictionary<SummarizeExpression<Record>>, summariesFilter?: FilterExpression): Promise<SummarizeResponse>;
7231
7248
  }
7232
7249
 
7233
- declare type BaseSchema = {
7250
+ type BaseSchema = {
7234
7251
  name: string;
7235
7252
  columns: readonly ({
7236
7253
  name: string;
@@ -7251,13 +7268,13 @@ declare type BaseSchema = {
7251
7268
  }[];
7252
7269
  })[];
7253
7270
  };
7254
- 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 {
7255
7272
  name: string;
7256
7273
  columns: readonly unknown[];
7257
7274
  } ? {
7258
7275
  [K in T[number]['name']]: TableType<T[number], K>;
7259
7276
  } : never : never;
7260
- declare type TableType<Tables, TableName> = Tables & {
7277
+ type TableType<Tables, TableName> = Tables & {
7261
7278
  name: TableName;
7262
7279
  } extends infer Table ? Table extends {
7263
7280
  name: string;
@@ -7268,7 +7285,7 @@ declare type TableType<Tables, TableName> = Tables & {
7268
7285
  } ? Identifiable & UnionToIntersection<Values<{
7269
7286
  [K in Columns[number]['name']]: PropertyType<Tables, Columns[number], K>;
7270
7287
  }>> : never : never : never : never;
7271
- declare type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Properties & {
7288
+ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Properties & {
7272
7289
  name: PropertyName;
7273
7290
  } extends infer Property ? Property extends {
7274
7291
  name: string;
@@ -7283,7 +7300,7 @@ declare type PropertyType<Tables, Properties, PropertyName extends PropertyKey>
7283
7300
  } : {
7284
7301
  [K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
7285
7302
  } : never : never;
7286
- 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 {
7287
7304
  name: string;
7288
7305
  type: string;
7289
7306
  } ? UnionToIntersection<Values<{
@@ -7391,24 +7408,105 @@ declare const includesNone: <T>(value: T) => ArrayFilter<T>;
7391
7408
  */
7392
7409
  declare const includesAny: <T>(value: T) => ArrayFilter<T>;
7393
7410
 
7394
- declare type SchemaDefinition = {
7411
+ type SchemaDefinition = {
7395
7412
  table: string;
7396
7413
  };
7397
- declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
7414
+ type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
7398
7415
  [Key in keyof Schemas]: Repository<Schemas[Key]>;
7399
7416
  };
7400
7417
  declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
7401
7418
  #private;
7402
- constructor(schemaTables?: Schemas.Table[]);
7419
+ constructor(schemaTables?: Table[]);
7403
7420
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
7404
7421
  }
7405
7422
 
7406
- declare type BranchStrategyValue = string | undefined | null;
7407
- declare type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
7408
- declare type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
7409
- 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[]>;
7410
7508
 
7411
- declare type BaseClientOptions = {
7509
+ type BaseClientOptions = {
7412
7510
  fetch?: FetchImpl;
7413
7511
  apiKey?: string;
7414
7512
  databaseURL?: string;
@@ -7416,12 +7514,14 @@ declare type BaseClientOptions = {
7416
7514
  cache?: CacheImpl;
7417
7515
  trace?: TraceFunction;
7418
7516
  enableBrowser?: boolean;
7517
+ clientName?: string;
7419
7518
  };
7420
7519
  declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
7421
7520
  interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
7422
7521
  new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
7423
7522
  db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
7424
7523
  search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
7524
+ transactions: Awaited<ReturnType<TransactionPlugin<Schemas>['build']>>;
7425
7525
  }, keyof Plugins> & {
7426
7526
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
7427
7527
  } & {
@@ -7441,13 +7541,21 @@ declare class Serializer {
7441
7541
  toJSON<T>(data: T): string;
7442
7542
  fromJSON<T>(json: string): T;
7443
7543
  }
7444
- declare const serialize: <T>(data: T) => string;
7445
- 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;
7446
7553
 
7447
- declare type BranchResolutionOptions = {
7554
+ type BranchResolutionOptions = {
7448
7555
  databaseURL?: string;
7449
7556
  apiKey?: string;
7450
7557
  fetchImpl?: FetchImpl;
7558
+ clientName?: string;
7451
7559
  };
7452
7560
  declare function getCurrentBranchName(options?: BranchResolutionOptions): Promise<string>;
7453
7561
  declare function getCurrentBranchDetails(options?: BranchResolutionOptions): Promise<DBBranch | null>;
@@ -7475,7 +7583,7 @@ interface File extends Blob {
7475
7583
  readonly name: string;
7476
7584
  readonly webkitRelativePath: string;
7477
7585
  }
7478
- declare type FormDataEntryValue = File | string;
7586
+ type FormDataEntryValue = File | string;
7479
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". */
7480
7588
  interface FormData {
7481
7589
  append(name: string, value: string | Blob, fileName?: string): void;
@@ -7523,21 +7631,21 @@ interface Request extends Body {
7523
7631
  clone(): Request;
7524
7632
  }
7525
7633
 
7526
- declare type XataWorkerContext<XataClient> = {
7634
+ type XataWorkerContext<XataClient> = {
7527
7635
  xata: XataClient;
7528
7636
  request: Request;
7529
7637
  env: Record<string, string | undefined>;
7530
7638
  };
7531
- declare type RemoveFirst<T> = T extends [any, ...infer U] ? U : never;
7532
- declare type WorkerRunnerConfig = {
7639
+ type RemoveFirst<T> = T extends [any, ...infer U] ? U : never;
7640
+ type WorkerRunnerConfig = {
7533
7641
  workspace: string;
7534
7642
  worker: string;
7535
7643
  };
7536
- 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>>>>;
7537
7645
 
7538
7646
  declare class XataError extends Error {
7539
7647
  readonly status: number;
7540
7648
  constructor(message: string, status: number);
7541
7649
  }
7542
7650
 
7543
- 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, 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, branchTransaction, 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 };