@xata.io/client 0.0.0-alpha.vf0c7bc2 → 0.0.0-alpha.vf0e0021

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
@@ -1,7 +1,6 @@
1
1
  declare type AttributeDictionary = Record<string, string | number | boolean | undefined>;
2
2
  declare type TraceFunction = <T>(name: string, fn: (options: {
3
3
  setAttributes: (attrs: AttributeDictionary) => void;
4
- onError: (message: string) => void;
5
4
  }) => T, options?: AttributeDictionary) => Promise<T>;
6
5
 
7
6
  declare type FetchImpl = (url: string, init?: {
@@ -17,7 +16,7 @@ declare type FetchImpl = (url: string, init?: {
17
16
  get(name: string): string | null;
18
17
  };
19
18
  }>;
20
- declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Record<string, string>) => string;
19
+ declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
21
20
  declare type FetcherExtraProps = {
22
21
  apiUrl: string;
23
22
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
@@ -69,6 +68,9 @@ declare type XataPluginOptions = {
69
68
  * @version 1.0
70
69
  */
71
70
  declare type User = {
71
+ /**
72
+ * @format email
73
+ */
72
74
  email: string;
73
75
  fullname: string;
74
76
  image: string;
@@ -100,7 +102,7 @@ declare type WorkspaceID = string;
100
102
  declare type Role = 'owner' | 'maintainer';
101
103
  declare type WorkspaceMeta = {
102
104
  name: string;
103
- slug: string;
105
+ slug?: string;
104
106
  };
105
107
  declare type Workspace = WorkspaceMeta & {
106
108
  id: WorkspaceID;
@@ -110,6 +112,9 @@ declare type Workspace = WorkspaceMeta & {
110
112
  declare type WorkspaceMember = {
111
113
  userId: UserID;
112
114
  fullname: string;
115
+ /**
116
+ * @format email
117
+ */
113
118
  email: string;
114
119
  role: Role;
115
120
  };
@@ -119,7 +124,13 @@ declare type WorkspaceMember = {
119
124
  declare type InviteID = string;
120
125
  declare type WorkspaceInvite = {
121
126
  inviteId: InviteID;
127
+ /**
128
+ * @format email
129
+ */
122
130
  email: string;
131
+ /**
132
+ * @format date-time
133
+ */
123
134
  expires: string;
124
135
  role: Role;
125
136
  };
@@ -135,20 +146,36 @@ declare type InviteKey = string;
135
146
  * Metadata of databases
136
147
  */
137
148
  declare type DatabaseMetadata = {
149
+ /**
150
+ * The machine-readable name of a database
151
+ */
138
152
  name: string;
139
- displayName: string;
153
+ /**
154
+ * The time this database was created
155
+ */
140
156
  createdAt: DateTime;
157
+ /**
158
+ * The number of branches the database has
159
+ */
141
160
  numberOfBranches: number;
161
+ /**
162
+ * Metadata about the database for display in Xata user interfaces
163
+ */
142
164
  ui?: {
165
+ /**
166
+ * The user-selected color for this database across interfaces
167
+ */
143
168
  color?: string;
144
169
  };
145
170
  };
146
171
  declare type ListDatabasesResponse = {
172
+ /**
173
+ * A list of databases in a Xata workspace
174
+ */
147
175
  databases?: DatabaseMetadata[];
148
176
  };
149
177
  declare type ListBranchesResponse = {
150
178
  databaseName: string;
151
- displayName: string;
152
179
  branches: Branch[];
153
180
  };
154
181
  declare type ListGitBranchesResponse = {
@@ -166,8 +193,14 @@ declare type Branch = {
166
193
  * @x-go-type xata.BranchMetadata
167
194
  */
168
195
  declare type BranchMetadata = {
196
+ /**
197
+ * @minLength 1
198
+ */
169
199
  repository?: string;
170
200
  branch?: BranchName;
201
+ /**
202
+ * @minLength 1
203
+ */
171
204
  stage?: string;
172
205
  labels?: string[];
173
206
  };
@@ -194,12 +227,28 @@ declare type Schema = {
194
227
  tables: Table[];
195
228
  tablesOrder?: string[];
196
229
  };
230
+ /**
231
+ * @x-internal true
232
+ */
233
+ declare type SchemaEditScript = {
234
+ sourceMigrationID?: string;
235
+ targetMigrationID?: string;
236
+ tables: TableEdit[];
237
+ };
197
238
  declare type Table = {
198
239
  id?: string;
199
240
  name: TableName;
200
241
  columns: Column[];
201
242
  revLinks?: RevLink[];
202
243
  };
244
+ /**
245
+ * @x-internal true
246
+ */
247
+ declare type TableEdit = {
248
+ oldName?: string;
249
+ newName?: string;
250
+ columns?: MigrationColumnOp[];
251
+ };
203
252
  /**
204
253
  * @x-go-type xata.Column
205
254
  */
@@ -209,6 +258,8 @@ declare type Column = {
209
258
  link?: {
210
259
  table: string;
211
260
  };
261
+ notNull?: boolean;
262
+ unique?: boolean;
212
263
  columns?: Column[];
213
264
  };
214
265
  declare type RevLink = {
@@ -275,6 +326,137 @@ declare type ColumnMigration = {
275
326
  old: Column;
276
327
  ['new']: Column;
277
328
  };
329
+ /**
330
+ * @x-internal true
331
+ */
332
+ declare type Commit = {
333
+ meta?: {
334
+ title?: string;
335
+ message?: string;
336
+ id: string;
337
+ parentID?: string;
338
+ mergeParentID?: string;
339
+ status: string;
340
+ createdAt: DateTime;
341
+ modifiedAt?: DateTime;
342
+ };
343
+ operations: MigrationOp[];
344
+ };
345
+ /**
346
+ * Branch schema migration.
347
+ *
348
+ * @x-internal true
349
+ */
350
+ declare type Migration = {
351
+ parentID?: string;
352
+ operations: MigrationOp[];
353
+ };
354
+ /**
355
+ * Branch schema migration operations.
356
+ *
357
+ * @x-internal true
358
+ */
359
+ declare type MigrationOp = MigrationTableOp | MigrationColumnOp;
360
+ /**
361
+ * @x-internal true
362
+ */
363
+ declare type MigrationTableOp = {
364
+ addTable: TableOpAdd;
365
+ } | {
366
+ removeTable: TableOpRemove;
367
+ } | {
368
+ renameTable: TableOpRename;
369
+ };
370
+ /**
371
+ * @x-internal true
372
+ */
373
+ declare type MigrationColumnOp = {
374
+ addColumn: ColumnOpAdd;
375
+ } | {
376
+ removeColumn: ColumnOpRemove;
377
+ } | {
378
+ renameColumn: ColumnOpRename;
379
+ };
380
+ /**
381
+ * @x-internal true
382
+ */
383
+ declare type TableOpAdd = {
384
+ table: string;
385
+ };
386
+ /**
387
+ * @x-internal true
388
+ */
389
+ declare type TableOpRemove = {
390
+ table: string;
391
+ };
392
+ /**
393
+ * @x-internal true
394
+ */
395
+ declare type TableOpRename = {
396
+ oldName: string;
397
+ newName: string;
398
+ };
399
+ /**
400
+ * @x-internal true
401
+ */
402
+ declare type ColumnOpAdd = {
403
+ table?: string;
404
+ column: Column;
405
+ };
406
+ /**
407
+ * @x-internal true
408
+ */
409
+ declare type ColumnOpRemove = {
410
+ table?: string;
411
+ column: string;
412
+ };
413
+ /**
414
+ * @x-internal true
415
+ */
416
+ declare type ColumnOpRename = {
417
+ table?: string;
418
+ oldName: string;
419
+ newName: string;
420
+ };
421
+ declare type MigrationRequest = {
422
+ /**
423
+ * The migration request number.
424
+ */
425
+ number: number;
426
+ /**
427
+ * Migration request creation timestamp.
428
+ */
429
+ createdAt: DateTime;
430
+ /**
431
+ * Last modified timestamp.
432
+ */
433
+ modifiedAt?: DateTime;
434
+ /**
435
+ * Timestamp when the migration request was closed.
436
+ */
437
+ closedAt?: DateTime;
438
+ /**
439
+ * Timestamp when the migration request was merged.
440
+ */
441
+ mergedAt?: DateTime;
442
+ status: 'open' | 'closed' | 'merging' | 'merged';
443
+ /**
444
+ * The migration request title.
445
+ */
446
+ title: string;
447
+ /**
448
+ * The migration request body with detailed description.
449
+ */
450
+ body: string;
451
+ /**
452
+ * Name of the source branch.
453
+ */
454
+ source: string;
455
+ /**
456
+ * Name of the target branch.
457
+ */
458
+ target: string;
459
+ };
278
460
  declare type SortExpression = string[] | {
279
461
  [key: string]: SortOrder;
280
462
  } | {
@@ -283,7 +465,7 @@ declare type SortExpression = string[] | {
283
465
  declare type SortOrder = 'asc' | 'desc';
284
466
  /**
285
467
  * Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
286
- * distance is the number of one charcter changes needed to make two strings equal. The default is 1, meaning that single
468
+ * distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
287
469
  * character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
288
470
  * to allow two typos in a word.
289
471
  *
@@ -309,8 +491,52 @@ declare type FilterExpression = {
309
491
  } & {
310
492
  [key: string]: FilterColumn;
311
493
  };
494
+ /**
495
+ * The description of the summaries you wish to receive. Set each key to be the field name
496
+ * you'd like for the summary. These names must not collide with other columns you've
497
+ * requested from `columns`; including implicit requests like `settings.*`.
498
+ *
499
+ * The value for each key needs to be an object. This object should contain one key and one
500
+ * value only. In this object, the key should be set to the summary function you wish to use
501
+ * and the value set to the column name to be summarized.
502
+ *
503
+ * The column being summarized cannot be an internal column (id, xata.*), nor the base of
504
+ * an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
505
+ * `settings.dark_mode` but not `settings` nor `settings.*`.
506
+ *
507
+ * @example {"all_users":{"count":"*"}}
508
+ * @example {"total_created":{"count":"created_at"}}
509
+ * @x-go-type xbquery.SummaryList
510
+ */
511
+ declare type SummaryExpressionList = {
512
+ [key: string]: SummaryExpression;
513
+ };
514
+ /**
515
+ * A summary expression is the description of a single summary operation. It consists of a single
516
+ * key representing the operation, and a value representing the column to be operated on.
517
+ *
518
+ * The column being summarized cannot be an internal column (id, xata.*), nor the base of
519
+ * an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
520
+ * `settings.dark_mode` but not `settings` nor `settings.*`.
521
+ *
522
+ * We currently support the `count` operation. When using `count`, one can set a column name
523
+ * as the value. Xata will return the total number times this column is non-null in each group.
524
+ *
525
+ * Alternately, if you'd like to count the total rows in each group - irregardless of null/not null
526
+ * status - you can set `count` to `*` to count everything.
527
+ *
528
+ * @example {"count":"deleted_at"}
529
+ * @x-go-type xbquery.Summary
530
+ */
531
+ declare type SummaryExpression = Record<string, any>;
312
532
  declare type HighlightExpression = {
533
+ /**
534
+ * Set to `false` to disable highlighting. By default it is `true`.
535
+ */
313
536
  enabled?: boolean;
537
+ /**
538
+ * Set to `false` to disable HTML encoding in highlight snippets. By default it is `true`.
539
+ */
314
540
  encodeHTML?: boolean;
315
541
  };
316
542
  /**
@@ -329,15 +555,30 @@ declare type BoosterExpression = {
329
555
  * Boost records with a particular value for a column.
330
556
  */
331
557
  declare type ValueBooster$1 = {
558
+ /**
559
+ * The column in which to look for the value.
560
+ */
332
561
  column: string;
562
+ /**
563
+ * The exact value to boost.
564
+ */
333
565
  value: string | number | boolean;
566
+ /**
567
+ * The factor with which to multiply the score of the record.
568
+ */
334
569
  factor: number;
335
570
  };
336
571
  /**
337
572
  * Boost records based on the value of a numeric column.
338
573
  */
339
574
  declare type NumericBooster$1 = {
575
+ /**
576
+ * The column in which to look for the value.
577
+ */
340
578
  column: string;
579
+ /**
580
+ * The factor with which to multiply the value of the column before adding it to the item score.
581
+ */
341
582
  factor: number;
342
583
  };
343
584
  /**
@@ -346,9 +587,24 @@ declare type NumericBooster$1 = {
346
587
  * 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.
347
588
  */
348
589
  declare type DateBooster$1 = {
590
+ /**
591
+ * The column in which to look for the value.
592
+ */
349
593
  column: string;
594
+ /**
595
+ * The datetime (formatted as RFC3339) from where to apply the score decay function. The maximum boost will be applied for records with values at this time.
596
+ * If it is not specified, the current date and time is used.
597
+ */
350
598
  origin?: string;
599
+ /**
600
+ * The duration at which distance from origin the score is decayed with factor, using an exponential function. It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
601
+ *
602
+ * @pattern ^(\d+)(d|h|m|s|ms)$
603
+ */
351
604
  scale: string;
605
+ /**
606
+ * The decay factor to expect at "scale" distance from the "origin".
607
+ */
352
608
  decay: number;
353
609
  };
354
610
  declare type FilterList = FilterExpression | FilterExpression[];
@@ -400,13 +656,40 @@ declare type FilterValue = number | string | boolean;
400
656
  * Pagination settings.
401
657
  */
402
658
  declare type PageConfig = {
659
+ /**
660
+ * Query the next page that follow the cursor.
661
+ */
403
662
  after?: string;
663
+ /**
664
+ * Query the previous page before the cursor.
665
+ */
404
666
  before?: string;
667
+ /**
668
+ * Query the first page from the cursor.
669
+ */
405
670
  first?: string;
671
+ /**
672
+ * Query the last page from the cursor.
673
+ */
406
674
  last?: string;
675
+ /**
676
+ * Set page size. If the size is missing it is read from the cursor. If no cursor is given xata will choose the default page size.
677
+ *
678
+ * @default 20
679
+ */
407
680
  size?: number;
681
+ /**
682
+ * Use offset to skip entries. To skip pages set offset to a multiple of size.
683
+ *
684
+ * @default 0
685
+ */
408
686
  offset?: number;
409
687
  };
688
+ /**
689
+ * @example name
690
+ * @example email
691
+ * @example created_at
692
+ */
410
693
  declare type ColumnsProjection = string[];
411
694
  /**
412
695
  * Xata Table Record Metadata
@@ -414,14 +697,29 @@ declare type ColumnsProjection = string[];
414
697
  declare type RecordMeta = {
415
698
  id: RecordID;
416
699
  xata: {
700
+ /**
701
+ * The record's version. Can be used for optimistic concurrency control.
702
+ */
417
703
  version: number;
704
+ /**
705
+ * The record's table name. APIs that return records from multiple tables will set this field accordingly.
706
+ */
418
707
  table?: string;
708
+ /**
709
+ * Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
710
+ */
419
711
  highlight?: {
420
712
  [key: string]: string[] | {
421
713
  [key: string]: any;
422
714
  };
423
715
  };
716
+ /**
717
+ * The record's relevancy score. This is returned by the search APIs.
718
+ */
424
719
  score?: number;
720
+ /**
721
+ * Encoding/Decoding errors
722
+ */
425
723
  warnings?: string[];
426
724
  };
427
725
  };
@@ -433,7 +731,13 @@ declare type RecordID = string;
433
731
  * @example {"newName":"newName","oldName":"oldName"}
434
732
  */
435
733
  declare type TableRename = {
734
+ /**
735
+ * @minLength 1
736
+ */
436
737
  newName: string;
738
+ /**
739
+ * @minLength 1
740
+ */
437
741
  oldName: string;
438
742
  };
439
743
  /**
@@ -441,10 +745,48 @@ declare type TableRename = {
441
745
  */
442
746
  declare type RecordsMetadata = {
443
747
  page: {
748
+ /**
749
+ * last record id
750
+ */
444
751
  cursor: string;
752
+ /**
753
+ * true if more records can be fetch
754
+ */
445
755
  more: boolean;
446
756
  };
447
757
  };
758
+ /**
759
+ * Metadata of databases
760
+ */
761
+ declare type CPDatabaseMetadata = {
762
+ /**
763
+ * The machine-readable name of a database
764
+ */
765
+ name: string;
766
+ /**
767
+ * Region where this database is hosted
768
+ */
769
+ region: string;
770
+ /**
771
+ * The time this database was created
772
+ */
773
+ createdAt: DateTime;
774
+ /**
775
+ * Metadata about the database for display in Xata user interfaces
776
+ */
777
+ ui?: {
778
+ /**
779
+ * The user-selected color for this database across interfaces
780
+ */
781
+ color?: string;
782
+ };
783
+ };
784
+ declare type CPListDatabasesResponse = {
785
+ /**
786
+ * A list of databases in a Xata workspace
787
+ */
788
+ databases?: CPDatabaseMetadata[];
789
+ };
448
790
  /**
449
791
  * Xata Table Record Metadata
450
792
  */
@@ -475,7 +817,9 @@ type schemas_BranchMetadata = BranchMetadata;
475
817
  type schemas_DBBranch = DBBranch;
476
818
  type schemas_StartedFromMetadata = StartedFromMetadata;
477
819
  type schemas_Schema = Schema;
820
+ type schemas_SchemaEditScript = SchemaEditScript;
478
821
  type schemas_Table = Table;
822
+ type schemas_TableEdit = TableEdit;
479
823
  type schemas_Column = Column;
480
824
  type schemas_RevLink = RevLink;
481
825
  type schemas_BranchName = BranchName;
@@ -488,11 +832,25 @@ type schemas_MetricsLatency = MetricsLatency;
488
832
  type schemas_BranchMigration = BranchMigration;
489
833
  type schemas_TableMigration = TableMigration;
490
834
  type schemas_ColumnMigration = ColumnMigration;
835
+ type schemas_Commit = Commit;
836
+ type schemas_Migration = Migration;
837
+ type schemas_MigrationOp = MigrationOp;
838
+ type schemas_MigrationTableOp = MigrationTableOp;
839
+ type schemas_MigrationColumnOp = MigrationColumnOp;
840
+ type schemas_TableOpAdd = TableOpAdd;
841
+ type schemas_TableOpRemove = TableOpRemove;
842
+ type schemas_TableOpRename = TableOpRename;
843
+ type schemas_ColumnOpAdd = ColumnOpAdd;
844
+ type schemas_ColumnOpRemove = ColumnOpRemove;
845
+ type schemas_ColumnOpRename = ColumnOpRename;
846
+ type schemas_MigrationRequest = MigrationRequest;
491
847
  type schemas_SortExpression = SortExpression;
492
848
  type schemas_SortOrder = SortOrder;
493
849
  type schemas_FuzzinessExpression = FuzzinessExpression;
494
850
  type schemas_PrefixExpression = PrefixExpression;
495
851
  type schemas_FilterExpression = FilterExpression;
852
+ type schemas_SummaryExpressionList = SummaryExpressionList;
853
+ type schemas_SummaryExpression = SummaryExpression;
496
854
  type schemas_HighlightExpression = HighlightExpression;
497
855
  type schemas_BoosterExpression = BoosterExpression;
498
856
  type schemas_FilterList = FilterList;
@@ -509,6 +867,8 @@ type schemas_RecordMeta = RecordMeta;
509
867
  type schemas_RecordID = RecordID;
510
868
  type schemas_TableRename = TableRename;
511
869
  type schemas_RecordsMetadata = RecordsMetadata;
870
+ type schemas_CPDatabaseMetadata = CPDatabaseMetadata;
871
+ type schemas_CPListDatabasesResponse = CPListDatabasesResponse;
512
872
  declare namespace schemas {
513
873
  export {
514
874
  schemas_User as User,
@@ -534,7 +894,9 @@ declare namespace schemas {
534
894
  schemas_DBBranch as DBBranch,
535
895
  schemas_StartedFromMetadata as StartedFromMetadata,
536
896
  schemas_Schema as Schema,
897
+ schemas_SchemaEditScript as SchemaEditScript,
537
898
  schemas_Table as Table,
899
+ schemas_TableEdit as TableEdit,
538
900
  schemas_Column as Column,
539
901
  schemas_RevLink as RevLink,
540
902
  schemas_BranchName as BranchName,
@@ -547,11 +909,25 @@ declare namespace schemas {
547
909
  schemas_BranchMigration as BranchMigration,
548
910
  schemas_TableMigration as TableMigration,
549
911
  schemas_ColumnMigration as ColumnMigration,
912
+ schemas_Commit as Commit,
913
+ schemas_Migration as Migration,
914
+ schemas_MigrationOp as MigrationOp,
915
+ schemas_MigrationTableOp as MigrationTableOp,
916
+ schemas_MigrationColumnOp as MigrationColumnOp,
917
+ schemas_TableOpAdd as TableOpAdd,
918
+ schemas_TableOpRemove as TableOpRemove,
919
+ schemas_TableOpRename as TableOpRename,
920
+ schemas_ColumnOpAdd as ColumnOpAdd,
921
+ schemas_ColumnOpRemove as ColumnOpRemove,
922
+ schemas_ColumnOpRename as ColumnOpRename,
923
+ schemas_MigrationRequest as MigrationRequest,
550
924
  schemas_SortExpression as SortExpression,
551
925
  schemas_SortOrder as SortOrder,
552
926
  schemas_FuzzinessExpression as FuzzinessExpression,
553
927
  schemas_PrefixExpression as PrefixExpression,
554
928
  schemas_FilterExpression as FilterExpression,
929
+ schemas_SummaryExpressionList as SummaryExpressionList,
930
+ schemas_SummaryExpression as SummaryExpression,
555
931
  schemas_HighlightExpression as HighlightExpression,
556
932
  schemas_BoosterExpression as BoosterExpression,
557
933
  ValueBooster$1 as ValueBooster,
@@ -571,6 +947,8 @@ declare namespace schemas {
571
947
  schemas_RecordID as RecordID,
572
948
  schemas_TableRename as TableRename,
573
949
  schemas_RecordsMetadata as RecordsMetadata,
950
+ schemas_CPDatabaseMetadata as CPDatabaseMetadata,
951
+ schemas_CPListDatabasesResponse as CPListDatabasesResponse,
574
952
  XataRecord$1 as XataRecord,
575
953
  };
576
954
  }
@@ -612,6 +990,11 @@ declare type BranchMigrationPlan = {
612
990
  migration: BranchMigration;
613
991
  };
614
992
  declare type RecordResponse = XataRecord$1;
993
+ declare type SchemaCompareResponse = {
994
+ source: Schema;
995
+ target: Schema;
996
+ edits: SchemaEditScript;
997
+ };
615
998
  declare type RecordUpdateResponse = XataRecord$1 | {
616
999
  id: string;
617
1000
  xata: {
@@ -622,6 +1005,9 @@ declare type QueryResponse = {
622
1005
  records: XataRecord$1[];
623
1006
  meta: RecordsMetadata;
624
1007
  };
1008
+ declare type SummarizeResponse = {
1009
+ summary: Record<string, any>[];
1010
+ };
625
1011
  declare type SearchResponse = {
626
1012
  records: XataRecord$1[];
627
1013
  };
@@ -629,6 +1015,9 @@ declare type SearchResponse = {
629
1015
  * @example {"migrationID":"mig_c7m19ilcefoebpqj12p0"}
630
1016
  */
631
1017
  declare type MigrationIdResponse = {
1018
+ /**
1019
+ * @minLength 1
1020
+ */
632
1021
  migrationID: string;
633
1022
  };
634
1023
 
@@ -639,8 +1028,10 @@ type responses_BulkError = BulkError;
639
1028
  type responses_BulkInsertResponse = BulkInsertResponse;
640
1029
  type responses_BranchMigrationPlan = BranchMigrationPlan;
641
1030
  type responses_RecordResponse = RecordResponse;
1031
+ type responses_SchemaCompareResponse = SchemaCompareResponse;
642
1032
  type responses_RecordUpdateResponse = RecordUpdateResponse;
643
1033
  type responses_QueryResponse = QueryResponse;
1034
+ type responses_SummarizeResponse = SummarizeResponse;
644
1035
  type responses_SearchResponse = SearchResponse;
645
1036
  type responses_MigrationIdResponse = MigrationIdResponse;
646
1037
  declare namespace responses {
@@ -652,8 +1043,10 @@ declare namespace responses {
652
1043
  responses_BulkInsertResponse as BulkInsertResponse,
653
1044
  responses_BranchMigrationPlan as BranchMigrationPlan,
654
1045
  responses_RecordResponse as RecordResponse,
1046
+ responses_SchemaCompareResponse as SchemaCompareResponse,
655
1047
  responses_RecordUpdateResponse as RecordUpdateResponse,
656
1048
  responses_QueryResponse as QueryResponse,
1049
+ responses_SummarizeResponse as SummarizeResponse,
657
1050
  responses_SearchResponse as SearchResponse,
658
1051
  responses_MigrationIdResponse as MigrationIdResponse,
659
1052
  };
@@ -734,6 +1127,9 @@ declare type GetUserAPIKeysVariables = FetcherExtraProps;
734
1127
  */
735
1128
  declare const getUserAPIKeys: (variables: GetUserAPIKeysVariables) => Promise<GetUserAPIKeysResponse>;
736
1129
  declare type CreateUserAPIKeyPathParams = {
1130
+ /**
1131
+ * API Key name
1132
+ */
737
1133
  keyName: APIKeyName;
738
1134
  };
739
1135
  declare type CreateUserAPIKeyError = ErrorWrapper<{
@@ -759,6 +1155,9 @@ declare type CreateUserAPIKeyVariables = {
759
1155
  */
760
1156
  declare const createUserAPIKey: (variables: CreateUserAPIKeyVariables) => Promise<CreateUserAPIKeyResponse>;
761
1157
  declare type DeleteUserAPIKeyPathParams = {
1158
+ /**
1159
+ * API Key name
1160
+ */
762
1161
  keyName: APIKeyName;
763
1162
  };
764
1163
  declare type DeleteUserAPIKeyError = ErrorWrapper<{
@@ -819,6 +1218,9 @@ declare type GetWorkspacesListVariables = FetcherExtraProps;
819
1218
  */
820
1219
  declare const getWorkspacesList: (variables: GetWorkspacesListVariables) => Promise<GetWorkspacesListResponse>;
821
1220
  declare type GetWorkspacePathParams = {
1221
+ /**
1222
+ * Workspace name
1223
+ */
822
1224
  workspaceId: WorkspaceID;
823
1225
  };
824
1226
  declare type GetWorkspaceError = ErrorWrapper<{
@@ -839,6 +1241,9 @@ declare type GetWorkspaceVariables = {
839
1241
  */
840
1242
  declare const getWorkspace: (variables: GetWorkspaceVariables) => Promise<Workspace>;
841
1243
  declare type UpdateWorkspacePathParams = {
1244
+ /**
1245
+ * Workspace name
1246
+ */
842
1247
  workspaceId: WorkspaceID;
843
1248
  };
844
1249
  declare type UpdateWorkspaceError = ErrorWrapper<{
@@ -860,6 +1265,9 @@ declare type UpdateWorkspaceVariables = {
860
1265
  */
861
1266
  declare const updateWorkspace: (variables: UpdateWorkspaceVariables) => Promise<Workspace>;
862
1267
  declare type DeleteWorkspacePathParams = {
1268
+ /**
1269
+ * Workspace name
1270
+ */
863
1271
  workspaceId: WorkspaceID;
864
1272
  };
865
1273
  declare type DeleteWorkspaceError = ErrorWrapper<{
@@ -880,6 +1288,9 @@ declare type DeleteWorkspaceVariables = {
880
1288
  */
881
1289
  declare const deleteWorkspace: (variables: DeleteWorkspaceVariables) => Promise<undefined>;
882
1290
  declare type GetWorkspaceMembersListPathParams = {
1291
+ /**
1292
+ * Workspace name
1293
+ */
883
1294
  workspaceId: WorkspaceID;
884
1295
  };
885
1296
  declare type GetWorkspaceMembersListError = ErrorWrapper<{
@@ -900,7 +1311,13 @@ declare type GetWorkspaceMembersListVariables = {
900
1311
  */
901
1312
  declare const getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables) => Promise<WorkspaceMembers>;
902
1313
  declare type UpdateWorkspaceMemberRolePathParams = {
1314
+ /**
1315
+ * Workspace name
1316
+ */
903
1317
  workspaceId: WorkspaceID;
1318
+ /**
1319
+ * UserID
1320
+ */
904
1321
  userId: UserID;
905
1322
  };
906
1323
  declare type UpdateWorkspaceMemberRoleError = ErrorWrapper<{
@@ -925,7 +1342,13 @@ declare type UpdateWorkspaceMemberRoleVariables = {
925
1342
  */
926
1343
  declare const updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables) => Promise<undefined>;
927
1344
  declare type RemoveWorkspaceMemberPathParams = {
1345
+ /**
1346
+ * Workspace name
1347
+ */
928
1348
  workspaceId: WorkspaceID;
1349
+ /**
1350
+ * UserID
1351
+ */
929
1352
  userId: UserID;
930
1353
  };
931
1354
  declare type RemoveWorkspaceMemberError = ErrorWrapper<{
@@ -946,6 +1369,9 @@ declare type RemoveWorkspaceMemberVariables = {
946
1369
  */
947
1370
  declare const removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables) => Promise<undefined>;
948
1371
  declare type InviteWorkspaceMemberPathParams = {
1372
+ /**
1373
+ * Workspace name
1374
+ */
949
1375
  workspaceId: WorkspaceID;
950
1376
  };
951
1377
  declare type InviteWorkspaceMemberError = ErrorWrapper<{
@@ -962,6 +1388,9 @@ declare type InviteWorkspaceMemberError = ErrorWrapper<{
962
1388
  payload: SimpleError;
963
1389
  }>;
964
1390
  declare type InviteWorkspaceMemberRequestBody = {
1391
+ /**
1392
+ * @format email
1393
+ */
965
1394
  email: string;
966
1395
  role: Role;
967
1396
  };
@@ -974,7 +1403,13 @@ declare type InviteWorkspaceMemberVariables = {
974
1403
  */
975
1404
  declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<WorkspaceInvite>;
976
1405
  declare type UpdateWorkspaceMemberInvitePathParams = {
1406
+ /**
1407
+ * Workspace name
1408
+ */
977
1409
  workspaceId: WorkspaceID;
1410
+ /**
1411
+ * Invite identifier
1412
+ */
978
1413
  inviteId: InviteID;
979
1414
  };
980
1415
  declare type UpdateWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1002,7 +1437,13 @@ declare type UpdateWorkspaceMemberInviteVariables = {
1002
1437
  */
1003
1438
  declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
1004
1439
  declare type CancelWorkspaceMemberInvitePathParams = {
1440
+ /**
1441
+ * Workspace name
1442
+ */
1005
1443
  workspaceId: WorkspaceID;
1444
+ /**
1445
+ * Invite identifier
1446
+ */
1006
1447
  inviteId: InviteID;
1007
1448
  };
1008
1449
  declare type CancelWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1023,7 +1464,13 @@ declare type CancelWorkspaceMemberInviteVariables = {
1023
1464
  */
1024
1465
  declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>;
1025
1466
  declare type ResendWorkspaceMemberInvitePathParams = {
1467
+ /**
1468
+ * Workspace name
1469
+ */
1026
1470
  workspaceId: WorkspaceID;
1471
+ /**
1472
+ * Invite identifier
1473
+ */
1027
1474
  inviteId: InviteID;
1028
1475
  };
1029
1476
  declare type ResendWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1044,7 +1491,13 @@ declare type ResendWorkspaceMemberInviteVariables = {
1044
1491
  */
1045
1492
  declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>;
1046
1493
  declare type AcceptWorkspaceMemberInvitePathParams = {
1494
+ /**
1495
+ * Workspace name
1496
+ */
1047
1497
  workspaceId: WorkspaceID;
1498
+ /**
1499
+ * Invite Key (secret) for the invited user
1500
+ */
1048
1501
  inviteKey: InviteKey;
1049
1502
  };
1050
1503
  declare type AcceptWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1082,6 +1535,9 @@ declare type GetDatabaseListVariables = {
1082
1535
  */
1083
1536
  declare const getDatabaseList: (variables: GetDatabaseListVariables) => Promise<ListDatabasesResponse>;
1084
1537
  declare type GetBranchListPathParams = {
1538
+ /**
1539
+ * The Database Name
1540
+ */
1085
1541
  dbName: DBName;
1086
1542
  workspace: string;
1087
1543
  };
@@ -1103,6 +1559,9 @@ declare type GetBranchListVariables = {
1103
1559
  */
1104
1560
  declare const getBranchList: (variables: GetBranchListVariables) => Promise<ListBranchesResponse>;
1105
1561
  declare type CreateDatabasePathParams = {
1562
+ /**
1563
+ * The Database Name
1564
+ */
1106
1565
  dbName: DBName;
1107
1566
  workspace: string;
1108
1567
  };
@@ -1114,11 +1573,16 @@ declare type CreateDatabaseError = ErrorWrapper<{
1114
1573
  payload: AuthError;
1115
1574
  }>;
1116
1575
  declare type CreateDatabaseResponse = {
1576
+ /**
1577
+ * @minLength 1
1578
+ */
1117
1579
  databaseName: string;
1118
1580
  branchName?: string;
1119
1581
  };
1120
1582
  declare type CreateDatabaseRequestBody = {
1121
- displayName?: string;
1583
+ /**
1584
+ * @minLength 1
1585
+ */
1122
1586
  branchName?: string;
1123
1587
  ui?: {
1124
1588
  color?: string;
@@ -1134,6 +1598,9 @@ declare type CreateDatabaseVariables = {
1134
1598
  */
1135
1599
  declare const createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
1136
1600
  declare type DeleteDatabasePathParams = {
1601
+ /**
1602
+ * The Database Name
1603
+ */
1137
1604
  dbName: DBName;
1138
1605
  workspace: string;
1139
1606
  };
@@ -1155,6 +1622,9 @@ declare type DeleteDatabaseVariables = {
1155
1622
  */
1156
1623
  declare const deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
1157
1624
  declare type GetDatabaseMetadataPathParams = {
1625
+ /**
1626
+ * The Database Name
1627
+ */
1158
1628
  dbName: DBName;
1159
1629
  workspace: string;
1160
1630
  };
@@ -1175,7 +1645,43 @@ declare type GetDatabaseMetadataVariables = {
1175
1645
  * Retrieve metadata of the given database
1176
1646
  */
1177
1647
  declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
1648
+ declare type UpdateDatabaseMetadataPathParams = {
1649
+ /**
1650
+ * The Database Name
1651
+ */
1652
+ dbName: DBName;
1653
+ workspace: string;
1654
+ };
1655
+ declare type UpdateDatabaseMetadataError = ErrorWrapper<{
1656
+ status: 400;
1657
+ payload: BadRequestError;
1658
+ } | {
1659
+ status: 401;
1660
+ payload: AuthError;
1661
+ } | {
1662
+ status: 404;
1663
+ payload: SimpleError;
1664
+ }>;
1665
+ declare type UpdateDatabaseMetadataRequestBody = {
1666
+ ui?: {
1667
+ /**
1668
+ * @minLength 1
1669
+ */
1670
+ color?: string;
1671
+ };
1672
+ };
1673
+ declare type UpdateDatabaseMetadataVariables = {
1674
+ body?: UpdateDatabaseMetadataRequestBody;
1675
+ pathParams: UpdateDatabaseMetadataPathParams;
1676
+ } & FetcherExtraProps;
1677
+ /**
1678
+ * Update the color of the selected database
1679
+ */
1680
+ declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
1178
1681
  declare type GetGitBranchesMappingPathParams = {
1682
+ /**
1683
+ * The Database Name
1684
+ */
1179
1685
  dbName: DBName;
1180
1686
  workspace: string;
1181
1687
  };
@@ -1215,6 +1721,9 @@ declare type GetGitBranchesMappingVariables = {
1215
1721
  */
1216
1722
  declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
1217
1723
  declare type AddGitBranchesEntryPathParams = {
1724
+ /**
1725
+ * The Database Name
1726
+ */
1218
1727
  dbName: DBName;
1219
1728
  workspace: string;
1220
1729
  };
@@ -1226,10 +1735,19 @@ declare type AddGitBranchesEntryError = ErrorWrapper<{
1226
1735
  payload: AuthError;
1227
1736
  }>;
1228
1737
  declare type AddGitBranchesEntryResponse = {
1738
+ /**
1739
+ * Warning message
1740
+ */
1229
1741
  warning?: string;
1230
1742
  };
1231
1743
  declare type AddGitBranchesEntryRequestBody = {
1744
+ /**
1745
+ * The name of the Git branch.
1746
+ */
1232
1747
  gitBranch: string;
1748
+ /**
1749
+ * The name of the Xata branch.
1750
+ */
1233
1751
  xataBranch: BranchName;
1234
1752
  };
1235
1753
  declare type AddGitBranchesEntryVariables = {
@@ -1253,10 +1771,16 @@ declare type AddGitBranchesEntryVariables = {
1253
1771
  */
1254
1772
  declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
1255
1773
  declare type RemoveGitBranchesEntryPathParams = {
1774
+ /**
1775
+ * The Database Name
1776
+ */
1256
1777
  dbName: DBName;
1257
1778
  workspace: string;
1258
1779
  };
1259
1780
  declare type RemoveGitBranchesEntryQueryParams = {
1781
+ /**
1782
+ * The Git Branch to remove from the mapping
1783
+ */
1260
1784
  gitBranch: string;
1261
1785
  };
1262
1786
  declare type RemoveGitBranchesEntryError = ErrorWrapper<{
@@ -1281,11 +1805,20 @@ declare type RemoveGitBranchesEntryVariables = {
1281
1805
  */
1282
1806
  declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
1283
1807
  declare type ResolveBranchPathParams = {
1808
+ /**
1809
+ * The Database Name
1810
+ */
1284
1811
  dbName: DBName;
1285
1812
  workspace: string;
1286
1813
  };
1287
1814
  declare type ResolveBranchQueryParams = {
1815
+ /**
1816
+ * The Git Branch
1817
+ */
1288
1818
  gitBranch?: string;
1819
+ /**
1820
+ * Default branch to fallback to
1821
+ */
1289
1822
  fallbackBranch?: string;
1290
1823
  };
1291
1824
  declare type ResolveBranchError = ErrorWrapper<{
@@ -1332,7 +1865,285 @@ declare type ResolveBranchVariables = {
1332
1865
  * ```
1333
1866
  */
1334
1867
  declare const resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
1868
+ declare type ListMigrationRequestsPathParams = {
1869
+ /**
1870
+ * The Database Name
1871
+ */
1872
+ dbName: DBName;
1873
+ workspace: string;
1874
+ };
1875
+ declare type ListMigrationRequestsError = ErrorWrapper<{
1876
+ status: 400;
1877
+ payload: BadRequestError;
1878
+ } | {
1879
+ status: 401;
1880
+ payload: AuthError;
1881
+ } | {
1882
+ status: 404;
1883
+ payload: SimpleError;
1884
+ }>;
1885
+ declare type ListMigrationRequestsResponse = {
1886
+ migrationRequests: MigrationRequest[];
1887
+ meta: RecordsMetadata;
1888
+ };
1889
+ declare type ListMigrationRequestsRequestBody = {
1890
+ filter?: FilterExpression;
1891
+ sort?: SortExpression;
1892
+ page?: PageConfig;
1893
+ columns?: ColumnsProjection;
1894
+ };
1895
+ declare type ListMigrationRequestsVariables = {
1896
+ body?: ListMigrationRequestsRequestBody;
1897
+ pathParams: ListMigrationRequestsPathParams;
1898
+ } & FetcherExtraProps;
1899
+ declare const listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
1900
+ declare type CreateMigrationRequestPathParams = {
1901
+ /**
1902
+ * The Database Name
1903
+ */
1904
+ dbName: DBName;
1905
+ workspace: string;
1906
+ };
1907
+ declare type CreateMigrationRequestError = ErrorWrapper<{
1908
+ status: 400;
1909
+ payload: BadRequestError;
1910
+ } | {
1911
+ status: 401;
1912
+ payload: AuthError;
1913
+ } | {
1914
+ status: 404;
1915
+ payload: SimpleError;
1916
+ }>;
1917
+ declare type CreateMigrationRequestResponse = {
1918
+ number: number;
1919
+ };
1920
+ declare type CreateMigrationRequestRequestBody = {
1921
+ /**
1922
+ * The source branch.
1923
+ */
1924
+ source: string;
1925
+ /**
1926
+ * The target branch.
1927
+ */
1928
+ target: string;
1929
+ /**
1930
+ * The title.
1931
+ */
1932
+ title: string;
1933
+ /**
1934
+ * Optional migration request description.
1935
+ */
1936
+ body?: string;
1937
+ };
1938
+ declare type CreateMigrationRequestVariables = {
1939
+ body: CreateMigrationRequestRequestBody;
1940
+ pathParams: CreateMigrationRequestPathParams;
1941
+ } & FetcherExtraProps;
1942
+ declare const createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
1943
+ declare type GetMigrationRequestPathParams = {
1944
+ /**
1945
+ * The Database Name
1946
+ */
1947
+ dbName: DBName;
1948
+ /**
1949
+ * The migration request number.
1950
+ */
1951
+ mrNumber: number;
1952
+ workspace: string;
1953
+ };
1954
+ declare type GetMigrationRequestError = ErrorWrapper<{
1955
+ status: 400;
1956
+ payload: BadRequestError;
1957
+ } | {
1958
+ status: 401;
1959
+ payload: AuthError;
1960
+ } | {
1961
+ status: 404;
1962
+ payload: SimpleError;
1963
+ }>;
1964
+ declare type GetMigrationRequestVariables = {
1965
+ pathParams: GetMigrationRequestPathParams;
1966
+ } & FetcherExtraProps;
1967
+ declare const getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
1968
+ declare type UpdateMigrationRequestPathParams = {
1969
+ /**
1970
+ * The Database Name
1971
+ */
1972
+ dbName: DBName;
1973
+ /**
1974
+ * The migration request number.
1975
+ */
1976
+ mrNumber: number;
1977
+ workspace: string;
1978
+ };
1979
+ declare type UpdateMigrationRequestError = ErrorWrapper<{
1980
+ status: 400;
1981
+ payload: BadRequestError;
1982
+ } | {
1983
+ status: 401;
1984
+ payload: AuthError;
1985
+ } | {
1986
+ status: 404;
1987
+ payload: SimpleError;
1988
+ }>;
1989
+ declare type UpdateMigrationRequestRequestBody = {
1990
+ /**
1991
+ * New migration request title.
1992
+ */
1993
+ title?: string;
1994
+ /**
1995
+ * New migration request description.
1996
+ */
1997
+ body?: string;
1998
+ /**
1999
+ * Change the migration request status.
2000
+ */
2001
+ status?: 'open' | 'closed';
2002
+ };
2003
+ declare type UpdateMigrationRequestVariables = {
2004
+ body?: UpdateMigrationRequestRequestBody;
2005
+ pathParams: UpdateMigrationRequestPathParams;
2006
+ } & FetcherExtraProps;
2007
+ declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
2008
+ declare type ListMigrationRequestsCommitsPathParams = {
2009
+ /**
2010
+ * The Database Name
2011
+ */
2012
+ dbName: DBName;
2013
+ /**
2014
+ * The migration request number.
2015
+ */
2016
+ mrNumber: number;
2017
+ workspace: string;
2018
+ };
2019
+ declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
2020
+ status: 400;
2021
+ payload: BadRequestError;
2022
+ } | {
2023
+ status: 401;
2024
+ payload: AuthError;
2025
+ } | {
2026
+ status: 404;
2027
+ payload: SimpleError;
2028
+ }>;
2029
+ declare type ListMigrationRequestsCommitsResponse = {
2030
+ meta: {
2031
+ /**
2032
+ * last record id
2033
+ */
2034
+ cursor: string;
2035
+ /**
2036
+ * true if more records can be fetch
2037
+ */
2038
+ more: boolean;
2039
+ };
2040
+ logs: Commit[];
2041
+ };
2042
+ declare type ListMigrationRequestsCommitsRequestBody = {
2043
+ page?: {
2044
+ /**
2045
+ * Query the next page that follow the cursor.
2046
+ */
2047
+ after?: string;
2048
+ /**
2049
+ * Query the previous page before the cursor.
2050
+ */
2051
+ before?: string;
2052
+ /**
2053
+ * Set page size. If the size is missing it is read from the cursor. If no cursor is given xata will choose the default page size.
2054
+ *
2055
+ * @default 20
2056
+ */
2057
+ size?: number;
2058
+ };
2059
+ };
2060
+ declare type ListMigrationRequestsCommitsVariables = {
2061
+ body?: ListMigrationRequestsCommitsRequestBody;
2062
+ pathParams: ListMigrationRequestsCommitsPathParams;
2063
+ } & FetcherExtraProps;
2064
+ declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
2065
+ declare type CompareMigrationRequestPathParams = {
2066
+ /**
2067
+ * The Database Name
2068
+ */
2069
+ dbName: DBName;
2070
+ /**
2071
+ * The migration request number.
2072
+ */
2073
+ mrNumber: number;
2074
+ workspace: string;
2075
+ };
2076
+ declare type CompareMigrationRequestError = ErrorWrapper<{
2077
+ status: 400;
2078
+ payload: BadRequestError;
2079
+ } | {
2080
+ status: 401;
2081
+ payload: AuthError;
2082
+ } | {
2083
+ status: 404;
2084
+ payload: SimpleError;
2085
+ }>;
2086
+ declare type CompareMigrationRequestVariables = {
2087
+ pathParams: CompareMigrationRequestPathParams;
2088
+ } & FetcherExtraProps;
2089
+ declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
2090
+ declare type GetMigrationRequestIsMergedPathParams = {
2091
+ /**
2092
+ * The Database Name
2093
+ */
2094
+ dbName: DBName;
2095
+ /**
2096
+ * The migration request number.
2097
+ */
2098
+ mrNumber: number;
2099
+ workspace: string;
2100
+ };
2101
+ declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
2102
+ status: 400;
2103
+ payload: BadRequestError;
2104
+ } | {
2105
+ status: 401;
2106
+ payload: AuthError;
2107
+ } | {
2108
+ status: 404;
2109
+ payload: SimpleError;
2110
+ }>;
2111
+ declare type GetMigrationRequestIsMergedResponse = {
2112
+ merged?: boolean;
2113
+ };
2114
+ declare type GetMigrationRequestIsMergedVariables = {
2115
+ pathParams: GetMigrationRequestIsMergedPathParams;
2116
+ } & FetcherExtraProps;
2117
+ declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
2118
+ declare type MergeMigrationRequestPathParams = {
2119
+ /**
2120
+ * The Database Name
2121
+ */
2122
+ dbName: DBName;
2123
+ /**
2124
+ * The migration request number.
2125
+ */
2126
+ mrNumber: number;
2127
+ workspace: string;
2128
+ };
2129
+ declare type MergeMigrationRequestError = ErrorWrapper<{
2130
+ status: 400;
2131
+ payload: BadRequestError;
2132
+ } | {
2133
+ status: 401;
2134
+ payload: AuthError;
2135
+ } | {
2136
+ status: 404;
2137
+ payload: SimpleError;
2138
+ }>;
2139
+ declare type MergeMigrationRequestVariables = {
2140
+ pathParams: MergeMigrationRequestPathParams;
2141
+ } & FetcherExtraProps;
2142
+ declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
1335
2143
  declare type GetBranchDetailsPathParams = {
2144
+ /**
2145
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2146
+ */
1336
2147
  dbBranchName: DBBranchName;
1337
2148
  workspace: string;
1338
2149
  };
@@ -1351,10 +2162,16 @@ declare type GetBranchDetailsVariables = {
1351
2162
  } & FetcherExtraProps;
1352
2163
  declare const getBranchDetails: (variables: GetBranchDetailsVariables) => Promise<DBBranch>;
1353
2164
  declare type CreateBranchPathParams = {
2165
+ /**
2166
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2167
+ */
1354
2168
  dbBranchName: DBBranchName;
1355
2169
  workspace: string;
1356
2170
  };
1357
2171
  declare type CreateBranchQueryParams = {
2172
+ /**
2173
+ * Name of source branch to branch the new schema from
2174
+ */
1358
2175
  from?: string;
1359
2176
  };
1360
2177
  declare type CreateBranchError = ErrorWrapper<{
@@ -1368,10 +2185,16 @@ declare type CreateBranchError = ErrorWrapper<{
1368
2185
  payload: SimpleError;
1369
2186
  }>;
1370
2187
  declare type CreateBranchResponse = {
2188
+ /**
2189
+ * @minLength 1
2190
+ */
1371
2191
  databaseName: string;
1372
2192
  branchName: string;
1373
2193
  };
1374
2194
  declare type CreateBranchRequestBody = {
2195
+ /**
2196
+ * Select the branch to fork from. Defaults to 'main'
2197
+ */
1375
2198
  from?: string;
1376
2199
  metadata?: BranchMetadata;
1377
2200
  };
@@ -1382,6 +2205,9 @@ declare type CreateBranchVariables = {
1382
2205
  } & FetcherExtraProps;
1383
2206
  declare const createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
1384
2207
  declare type DeleteBranchPathParams = {
2208
+ /**
2209
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2210
+ */
1385
2211
  dbBranchName: DBBranchName;
1386
2212
  workspace: string;
1387
2213
  };
@@ -1403,6 +2229,9 @@ declare type DeleteBranchVariables = {
1403
2229
  */
1404
2230
  declare const deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
1405
2231
  declare type UpdateBranchMetadataPathParams = {
2232
+ /**
2233
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2234
+ */
1406
2235
  dbBranchName: DBBranchName;
1407
2236
  workspace: string;
1408
2237
  };
@@ -1425,6 +2254,9 @@ declare type UpdateBranchMetadataVariables = {
1425
2254
  */
1426
2255
  declare const updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
1427
2256
  declare type GetBranchMetadataPathParams = {
2257
+ /**
2258
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2259
+ */
1428
2260
  dbBranchName: DBBranchName;
1429
2261
  workspace: string;
1430
2262
  };
@@ -1443,6 +2275,9 @@ declare type GetBranchMetadataVariables = {
1443
2275
  } & FetcherExtraProps;
1444
2276
  declare const getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
1445
2277
  declare type GetBranchMigrationHistoryPathParams = {
2278
+ /**
2279
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2280
+ */
1446
2281
  dbBranchName: DBBranchName;
1447
2282
  workspace: string;
1448
2283
  };
@@ -1470,6 +2305,9 @@ declare type GetBranchMigrationHistoryVariables = {
1470
2305
  } & FetcherExtraProps;
1471
2306
  declare const getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
1472
2307
  declare type ExecuteBranchMigrationPlanPathParams = {
2308
+ /**
2309
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2310
+ */
1473
2311
  dbBranchName: DBBranchName;
1474
2312
  workspace: string;
1475
2313
  };
@@ -1496,6 +2334,9 @@ declare type ExecuteBranchMigrationPlanVariables = {
1496
2334
  */
1497
2335
  declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
1498
2336
  declare type GetBranchMigrationPlanPathParams = {
2337
+ /**
2338
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2339
+ */
1499
2340
  dbBranchName: DBBranchName;
1500
2341
  workspace: string;
1501
2342
  };
@@ -1517,7 +2358,199 @@ declare type GetBranchMigrationPlanVariables = {
1517
2358
  * Compute a migration plan from a target schema the branch should be migrated too.
1518
2359
  */
1519
2360
  declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
2361
+ declare type CompareBranchWithUserSchemaPathParams = {
2362
+ /**
2363
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2364
+ */
2365
+ dbBranchName: DBBranchName;
2366
+ workspace: string;
2367
+ };
2368
+ declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
2369
+ status: 400;
2370
+ payload: BadRequestError;
2371
+ } | {
2372
+ status: 401;
2373
+ payload: AuthError;
2374
+ } | {
2375
+ status: 404;
2376
+ payload: SimpleError;
2377
+ }>;
2378
+ declare type CompareBranchWithUserSchemaRequestBody = {
2379
+ schema: Schema;
2380
+ };
2381
+ declare type CompareBranchWithUserSchemaVariables = {
2382
+ body: CompareBranchWithUserSchemaRequestBody;
2383
+ pathParams: CompareBranchWithUserSchemaPathParams;
2384
+ } & FetcherExtraProps;
2385
+ declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
2386
+ declare type CompareBranchSchemasPathParams = {
2387
+ /**
2388
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2389
+ */
2390
+ dbBranchName: DBBranchName;
2391
+ /**
2392
+ * The Database Name
2393
+ */
2394
+ branchName: BranchName;
2395
+ workspace: string;
2396
+ };
2397
+ declare type CompareBranchSchemasError = ErrorWrapper<{
2398
+ status: 400;
2399
+ payload: BadRequestError;
2400
+ } | {
2401
+ status: 401;
2402
+ payload: AuthError;
2403
+ } | {
2404
+ status: 404;
2405
+ payload: SimpleError;
2406
+ }>;
2407
+ declare type CompareBranchSchemasVariables = {
2408
+ body?: Record<string, any>;
2409
+ pathParams: CompareBranchSchemasPathParams;
2410
+ } & FetcherExtraProps;
2411
+ declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
2412
+ declare type UpdateBranchSchemaPathParams = {
2413
+ /**
2414
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2415
+ */
2416
+ dbBranchName: DBBranchName;
2417
+ workspace: string;
2418
+ };
2419
+ declare type UpdateBranchSchemaError = ErrorWrapper<{
2420
+ status: 400;
2421
+ payload: BadRequestError;
2422
+ } | {
2423
+ status: 401;
2424
+ payload: AuthError;
2425
+ } | {
2426
+ status: 404;
2427
+ payload: SimpleError;
2428
+ }>;
2429
+ declare type UpdateBranchSchemaResponse = {
2430
+ id: string;
2431
+ parentID: string;
2432
+ };
2433
+ declare type UpdateBranchSchemaVariables = {
2434
+ body: Migration;
2435
+ pathParams: UpdateBranchSchemaPathParams;
2436
+ } & FetcherExtraProps;
2437
+ declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
2438
+ declare type PreviewBranchSchemaEditPathParams = {
2439
+ /**
2440
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2441
+ */
2442
+ dbBranchName: DBBranchName;
2443
+ workspace: string;
2444
+ };
2445
+ declare type PreviewBranchSchemaEditError = ErrorWrapper<{
2446
+ status: 400;
2447
+ payload: BadRequestError;
2448
+ } | {
2449
+ status: 401;
2450
+ payload: AuthError;
2451
+ } | {
2452
+ status: 404;
2453
+ payload: SimpleError;
2454
+ }>;
2455
+ declare type PreviewBranchSchemaEditResponse = {
2456
+ original: Schema;
2457
+ updated: Schema;
2458
+ };
2459
+ declare type PreviewBranchSchemaEditRequestBody = {
2460
+ edits?: SchemaEditScript;
2461
+ operations?: MigrationOp[];
2462
+ };
2463
+ declare type PreviewBranchSchemaEditVariables = {
2464
+ body?: PreviewBranchSchemaEditRequestBody;
2465
+ pathParams: PreviewBranchSchemaEditPathParams;
2466
+ } & FetcherExtraProps;
2467
+ declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
2468
+ declare type ApplyBranchSchemaEditPathParams = {
2469
+ /**
2470
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2471
+ */
2472
+ dbBranchName: DBBranchName;
2473
+ workspace: string;
2474
+ };
2475
+ declare type ApplyBranchSchemaEditError = ErrorWrapper<{
2476
+ status: 400;
2477
+ payload: BadRequestError;
2478
+ } | {
2479
+ status: 401;
2480
+ payload: AuthError;
2481
+ } | {
2482
+ status: 404;
2483
+ payload: SimpleError;
2484
+ }>;
2485
+ declare type ApplyBranchSchemaEditResponse = {
2486
+ id: string;
2487
+ parentID: string;
2488
+ };
2489
+ declare type ApplyBranchSchemaEditRequestBody = {
2490
+ edits: SchemaEditScript;
2491
+ };
2492
+ declare type ApplyBranchSchemaEditVariables = {
2493
+ body: ApplyBranchSchemaEditRequestBody;
2494
+ pathParams: ApplyBranchSchemaEditPathParams;
2495
+ } & FetcherExtraProps;
2496
+ declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
2497
+ declare type GetBranchSchemaHistoryPathParams = {
2498
+ /**
2499
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2500
+ */
2501
+ dbBranchName: DBBranchName;
2502
+ workspace: string;
2503
+ };
2504
+ declare type GetBranchSchemaHistoryError = ErrorWrapper<{
2505
+ status: 400;
2506
+ payload: BadRequestError;
2507
+ } | {
2508
+ status: 401;
2509
+ payload: AuthError;
2510
+ } | {
2511
+ status: 404;
2512
+ payload: SimpleError;
2513
+ }>;
2514
+ declare type GetBranchSchemaHistoryResponse = {
2515
+ meta: {
2516
+ /**
2517
+ * last record id
2518
+ */
2519
+ cursor: string;
2520
+ /**
2521
+ * true if more records can be fetch
2522
+ */
2523
+ more: boolean;
2524
+ };
2525
+ logs: Commit[];
2526
+ };
2527
+ declare type GetBranchSchemaHistoryRequestBody = {
2528
+ page?: {
2529
+ /**
2530
+ * Query the next page that follow the cursor.
2531
+ */
2532
+ after?: string;
2533
+ /**
2534
+ * Query the previous page before the cursor.
2535
+ */
2536
+ before?: string;
2537
+ /**
2538
+ * Set page size. If the size is missing it is read from the cursor. If no cursor is given xata will choose the default page size.
2539
+ *
2540
+ * @default 20
2541
+ */
2542
+ size?: number;
2543
+ };
2544
+ };
2545
+ declare type GetBranchSchemaHistoryVariables = {
2546
+ body?: GetBranchSchemaHistoryRequestBody;
2547
+ pathParams: GetBranchSchemaHistoryPathParams;
2548
+ } & FetcherExtraProps;
2549
+ declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
1520
2550
  declare type GetBranchStatsPathParams = {
2551
+ /**
2552
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2553
+ */
1521
2554
  dbBranchName: DBBranchName;
1522
2555
  workspace: string;
1523
2556
  };
@@ -1550,7 +2583,13 @@ declare type GetBranchStatsVariables = {
1550
2583
  */
1551
2584
  declare const getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
1552
2585
  declare type CreateTablePathParams = {
2586
+ /**
2587
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2588
+ */
1553
2589
  dbBranchName: DBBranchName;
2590
+ /**
2591
+ * The Table name
2592
+ */
1554
2593
  tableName: TableName;
1555
2594
  workspace: string;
1556
2595
  };
@@ -1569,6 +2608,9 @@ declare type CreateTableError = ErrorWrapper<{
1569
2608
  }>;
1570
2609
  declare type CreateTableResponse = {
1571
2610
  branchName: string;
2611
+ /**
2612
+ * @minLength 1
2613
+ */
1572
2614
  tableName: string;
1573
2615
  };
1574
2616
  declare type CreateTableVariables = {
@@ -1579,7 +2621,13 @@ declare type CreateTableVariables = {
1579
2621
  */
1580
2622
  declare const createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
1581
2623
  declare type DeleteTablePathParams = {
2624
+ /**
2625
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2626
+ */
1582
2627
  dbBranchName: DBBranchName;
2628
+ /**
2629
+ * The Table name
2630
+ */
1583
2631
  tableName: TableName;
1584
2632
  workspace: string;
1585
2633
  };
@@ -1598,7 +2646,13 @@ declare type DeleteTableVariables = {
1598
2646
  */
1599
2647
  declare const deleteTable: (variables: DeleteTableVariables) => Promise<undefined>;
1600
2648
  declare type UpdateTablePathParams = {
2649
+ /**
2650
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2651
+ */
1601
2652
  dbBranchName: DBBranchName;
2653
+ /**
2654
+ * The Table name
2655
+ */
1602
2656
  tableName: TableName;
1603
2657
  workspace: string;
1604
2658
  };
@@ -1613,6 +2667,9 @@ declare type UpdateTableError = ErrorWrapper<{
1613
2667
  payload: SimpleError;
1614
2668
  }>;
1615
2669
  declare type UpdateTableRequestBody = {
2670
+ /**
2671
+ * @minLength 1
2672
+ */
1616
2673
  name: string;
1617
2674
  };
1618
2675
  declare type UpdateTableVariables = {
@@ -1634,7 +2691,13 @@ declare type UpdateTableVariables = {
1634
2691
  */
1635
2692
  declare const updateTable: (variables: UpdateTableVariables) => Promise<undefined>;
1636
2693
  declare type GetTableSchemaPathParams = {
2694
+ /**
2695
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2696
+ */
1637
2697
  dbBranchName: DBBranchName;
2698
+ /**
2699
+ * The Table name
2700
+ */
1638
2701
  tableName: TableName;
1639
2702
  workspace: string;
1640
2703
  };
@@ -1656,7 +2719,13 @@ declare type GetTableSchemaVariables = {
1656
2719
  } & FetcherExtraProps;
1657
2720
  declare const getTableSchema: (variables: GetTableSchemaVariables) => Promise<GetTableSchemaResponse>;
1658
2721
  declare type SetTableSchemaPathParams = {
2722
+ /**
2723
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2724
+ */
1659
2725
  dbBranchName: DBBranchName;
2726
+ /**
2727
+ * The Table name
2728
+ */
1660
2729
  tableName: TableName;
1661
2730
  workspace: string;
1662
2731
  };
@@ -1682,7 +2751,13 @@ declare type SetTableSchemaVariables = {
1682
2751
  } & FetcherExtraProps;
1683
2752
  declare const setTableSchema: (variables: SetTableSchemaVariables) => Promise<undefined>;
1684
2753
  declare type GetTableColumnsPathParams = {
2754
+ /**
2755
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2756
+ */
1685
2757
  dbBranchName: DBBranchName;
2758
+ /**
2759
+ * The Table name
2760
+ */
1686
2761
  tableName: TableName;
1687
2762
  workspace: string;
1688
2763
  };
@@ -1708,7 +2783,13 @@ declare type GetTableColumnsVariables = {
1708
2783
  */
1709
2784
  declare const getTableColumns: (variables: GetTableColumnsVariables) => Promise<GetTableColumnsResponse>;
1710
2785
  declare type AddTableColumnPathParams = {
2786
+ /**
2787
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2788
+ */
1711
2789
  dbBranchName: DBBranchName;
2790
+ /**
2791
+ * The Table name
2792
+ */
1712
2793
  tableName: TableName;
1713
2794
  workspace: string;
1714
2795
  };
@@ -1733,8 +2814,17 @@ declare type AddTableColumnVariables = {
1733
2814
  */
1734
2815
  declare const addTableColumn: (variables: AddTableColumnVariables) => Promise<MigrationIdResponse>;
1735
2816
  declare type GetColumnPathParams = {
2817
+ /**
2818
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2819
+ */
1736
2820
  dbBranchName: DBBranchName;
2821
+ /**
2822
+ * The Table name
2823
+ */
1737
2824
  tableName: TableName;
2825
+ /**
2826
+ * The Column name
2827
+ */
1738
2828
  columnName: ColumnName;
1739
2829
  workspace: string;
1740
2830
  };
@@ -1756,8 +2846,17 @@ declare type GetColumnVariables = {
1756
2846
  */
1757
2847
  declare const getColumn: (variables: GetColumnVariables) => Promise<Column>;
1758
2848
  declare type DeleteColumnPathParams = {
2849
+ /**
2850
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2851
+ */
1759
2852
  dbBranchName: DBBranchName;
2853
+ /**
2854
+ * The Table name
2855
+ */
1760
2856
  tableName: TableName;
2857
+ /**
2858
+ * The Column name
2859
+ */
1761
2860
  columnName: ColumnName;
1762
2861
  workspace: string;
1763
2862
  };
@@ -1779,8 +2878,17 @@ declare type DeleteColumnVariables = {
1779
2878
  */
1780
2879
  declare const deleteColumn: (variables: DeleteColumnVariables) => Promise<MigrationIdResponse>;
1781
2880
  declare type UpdateColumnPathParams = {
2881
+ /**
2882
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2883
+ */
1782
2884
  dbBranchName: DBBranchName;
2885
+ /**
2886
+ * The Table name
2887
+ */
1783
2888
  tableName: TableName;
2889
+ /**
2890
+ * The Column name
2891
+ */
1784
2892
  columnName: ColumnName;
1785
2893
  workspace: string;
1786
2894
  };
@@ -1795,6 +2903,9 @@ declare type UpdateColumnError = ErrorWrapper<{
1795
2903
  payload: SimpleError;
1796
2904
  }>;
1797
2905
  declare type UpdateColumnRequestBody = {
2906
+ /**
2907
+ * @minLength 1
2908
+ */
1798
2909
  name: string;
1799
2910
  };
1800
2911
  declare type UpdateColumnVariables = {
@@ -1806,11 +2917,20 @@ declare type UpdateColumnVariables = {
1806
2917
  */
1807
2918
  declare const updateColumn: (variables: UpdateColumnVariables) => Promise<MigrationIdResponse>;
1808
2919
  declare type InsertRecordPathParams = {
2920
+ /**
2921
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2922
+ */
1809
2923
  dbBranchName: DBBranchName;
2924
+ /**
2925
+ * The Table name
2926
+ */
1810
2927
  tableName: TableName;
1811
2928
  workspace: string;
1812
2929
  };
1813
2930
  declare type InsertRecordQueryParams = {
2931
+ /**
2932
+ * Column filters
2933
+ */
1814
2934
  columns?: ColumnsProjection;
1815
2935
  };
1816
2936
  declare type InsertRecordError = ErrorWrapper<{
@@ -1833,12 +2953,24 @@ declare type InsertRecordVariables = {
1833
2953
  */
1834
2954
  declare const insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
1835
2955
  declare type InsertRecordWithIDPathParams = {
2956
+ /**
2957
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2958
+ */
1836
2959
  dbBranchName: DBBranchName;
2960
+ /**
2961
+ * The Table name
2962
+ */
1837
2963
  tableName: TableName;
2964
+ /**
2965
+ * The Record name
2966
+ */
1838
2967
  recordId: RecordID;
1839
2968
  workspace: string;
1840
2969
  };
1841
2970
  declare type InsertRecordWithIDQueryParams = {
2971
+ /**
2972
+ * Column filters
2973
+ */
1842
2974
  columns?: ColumnsProjection;
1843
2975
  createOnly?: boolean;
1844
2976
  ifVersion?: number;
@@ -1866,12 +2998,24 @@ declare type InsertRecordWithIDVariables = {
1866
2998
  */
1867
2999
  declare const insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
1868
3000
  declare type UpdateRecordWithIDPathParams = {
3001
+ /**
3002
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3003
+ */
1869
3004
  dbBranchName: DBBranchName;
3005
+ /**
3006
+ * The Table name
3007
+ */
1870
3008
  tableName: TableName;
3009
+ /**
3010
+ * The Record name
3011
+ */
1871
3012
  recordId: RecordID;
1872
3013
  workspace: string;
1873
3014
  };
1874
3015
  declare type UpdateRecordWithIDQueryParams = {
3016
+ /**
3017
+ * Column filters
3018
+ */
1875
3019
  columns?: ColumnsProjection;
1876
3020
  ifVersion?: number;
1877
3021
  };
@@ -1895,12 +3039,24 @@ declare type UpdateRecordWithIDVariables = {
1895
3039
  } & FetcherExtraProps;
1896
3040
  declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<RecordUpdateResponse>;
1897
3041
  declare type UpsertRecordWithIDPathParams = {
3042
+ /**
3043
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3044
+ */
1898
3045
  dbBranchName: DBBranchName;
3046
+ /**
3047
+ * The Table name
3048
+ */
1899
3049
  tableName: TableName;
3050
+ /**
3051
+ * The Record name
3052
+ */
1900
3053
  recordId: RecordID;
1901
3054
  workspace: string;
1902
3055
  };
1903
3056
  declare type UpsertRecordWithIDQueryParams = {
3057
+ /**
3058
+ * Column filters
3059
+ */
1904
3060
  columns?: ColumnsProjection;
1905
3061
  ifVersion?: number;
1906
3062
  };
@@ -1924,12 +3080,24 @@ declare type UpsertRecordWithIDVariables = {
1924
3080
  } & FetcherExtraProps;
1925
3081
  declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
1926
3082
  declare type DeleteRecordPathParams = {
3083
+ /**
3084
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3085
+ */
1927
3086
  dbBranchName: DBBranchName;
3087
+ /**
3088
+ * The Table name
3089
+ */
1928
3090
  tableName: TableName;
3091
+ /**
3092
+ * The Record name
3093
+ */
1929
3094
  recordId: RecordID;
1930
3095
  workspace: string;
1931
3096
  };
1932
3097
  declare type DeleteRecordQueryParams = {
3098
+ /**
3099
+ * Column filters
3100
+ */
1933
3101
  columns?: ColumnsProjection;
1934
3102
  };
1935
3103
  declare type DeleteRecordError = ErrorWrapper<{
@@ -1948,12 +3116,24 @@ declare type DeleteRecordVariables = {
1948
3116
  } & FetcherExtraProps;
1949
3117
  declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
1950
3118
  declare type GetRecordPathParams = {
3119
+ /**
3120
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3121
+ */
1951
3122
  dbBranchName: DBBranchName;
3123
+ /**
3124
+ * The Table name
3125
+ */
1952
3126
  tableName: TableName;
3127
+ /**
3128
+ * The Record name
3129
+ */
1953
3130
  recordId: RecordID;
1954
3131
  workspace: string;
1955
3132
  };
1956
3133
  declare type GetRecordQueryParams = {
3134
+ /**
3135
+ * Column filters
3136
+ */
1957
3137
  columns?: ColumnsProjection;
1958
3138
  };
1959
3139
  declare type GetRecordError = ErrorWrapper<{
@@ -1975,11 +3155,20 @@ declare type GetRecordVariables = {
1975
3155
  */
1976
3156
  declare const getRecord: (variables: GetRecordVariables) => Promise<XataRecord$1>;
1977
3157
  declare type BulkInsertTableRecordsPathParams = {
3158
+ /**
3159
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3160
+ */
1978
3161
  dbBranchName: DBBranchName;
3162
+ /**
3163
+ * The Table name
3164
+ */
1979
3165
  tableName: TableName;
1980
3166
  workspace: string;
1981
3167
  };
1982
3168
  declare type BulkInsertTableRecordsQueryParams = {
3169
+ /**
3170
+ * Column filters
3171
+ */
1983
3172
  columns?: ColumnsProjection;
1984
3173
  };
1985
3174
  declare type BulkInsertTableRecordsError = ErrorWrapper<{
@@ -2008,7 +3197,13 @@ declare type BulkInsertTableRecordsVariables = {
2008
3197
  */
2009
3198
  declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
2010
3199
  declare type QueryTablePathParams = {
3200
+ /**
3201
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3202
+ */
2011
3203
  dbBranchName: DBBranchName;
3204
+ /**
3205
+ * The Table name
3206
+ */
2012
3207
  tableName: TableName;
2013
3208
  workspace: string;
2014
3209
  };
@@ -2062,8 +3257,9 @@ declare type QueryTableVariables = {
2062
3257
  * If the `columns` array is not specified, all columns are included. For link
2063
3258
  * fields, only the ID column of the linked records is included in the response.
2064
3259
  *
2065
- * If the `columns` array is specified, only the selected columns are included.
2066
- * The `*` wildcard can be used to select all columns of the given array
3260
+ * If the `columns` array is specified, only the selected and internal
3261
+ * columns `id` and `xata` are included. The `*` wildcard can be used to
3262
+ * select all columns.
2067
3263
  *
2068
3264
  * For objects and link fields, if the column name of the object is specified, we
2069
3265
  * include all of its sub-keys. If only some sub-keys are specified (via dotted
@@ -2179,6 +3375,10 @@ declare type QueryTableVariables = {
2179
3375
  *
2180
3376
  * ```json
2181
3377
  * {
3378
+ * "id": "id1"
3379
+ * "xata": {
3380
+ * "version": 0
3381
+ * }
2182
3382
  * "name": "Kilian",
2183
3383
  * "address": {
2184
3384
  * "street": "New street"
@@ -2198,6 +3398,10 @@ declare type QueryTableVariables = {
2198
3398
  *
2199
3399
  * ```json
2200
3400
  * {
3401
+ * "id": "id1"
3402
+ * "xata": {
3403
+ * "version": 0
3404
+ * }
2201
3405
  * "name": "Kilian",
2202
3406
  * "email": "kilian@gmail.com",
2203
3407
  * "address": {
@@ -2227,6 +3431,10 @@ declare type QueryTableVariables = {
2227
3431
  *
2228
3432
  * ```json
2229
3433
  * {
3434
+ * "id": "id1"
3435
+ * "xata": {
3436
+ * "version": 0
3437
+ * }
2230
3438
  * "name": "Kilian",
2231
3439
  * "email": "kilian@gmail.com",
2232
3440
  * "address": {
@@ -2755,11 +3963,246 @@ declare type QueryTableVariables = {
2755
3963
  */
2756
3964
  declare const queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
2757
3965
  declare type SearchTablePathParams = {
3966
+ /**
3967
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3968
+ */
3969
+ dbBranchName: DBBranchName;
3970
+ /**
3971
+ * The Table name
3972
+ */
3973
+ tableName: TableName;
3974
+ workspace: string;
3975
+ };
3976
+ declare type SearchTableError = ErrorWrapper<{
3977
+ status: 400;
3978
+ payload: BadRequestError;
3979
+ } | {
3980
+ status: 401;
3981
+ payload: AuthError;
3982
+ } | {
3983
+ status: 404;
3984
+ payload: SimpleError;
3985
+ }>;
3986
+ declare type SearchTableRequestBody = {
3987
+ /**
3988
+ * The query string.
3989
+ *
3990
+ * @minLength 1
3991
+ */
3992
+ query: string;
3993
+ fuzziness?: FuzzinessExpression;
3994
+ prefix?: PrefixExpression;
3995
+ filter?: FilterExpression;
3996
+ highlight?: HighlightExpression;
3997
+ boosters?: BoosterExpression[];
3998
+ };
3999
+ declare type SearchTableVariables = {
4000
+ body: SearchTableRequestBody;
4001
+ pathParams: SearchTablePathParams;
4002
+ } & FetcherExtraProps;
4003
+ /**
4004
+ * Run a free text search operation in a particular table.
4005
+ *
4006
+ * The endpoint accepts a `query` parameter that is used for the free text search and a set of structured filters (via the `filter` parameter) that are applied before the search. The `filter` parameter uses the same syntax as the [query endpoint](/api-reference/db/db_branch_name/tables/table_name/) with the following exceptions:
4007
+ * * filters `$contains`, `$startsWith`, `$endsWith` don't work on columns of type `text`
4008
+ * * filtering on columns of type `multiple` is currently unsupported
4009
+ */
4010
+ declare const searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
4011
+ declare type SearchBranchPathParams = {
4012
+ /**
4013
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4014
+ */
4015
+ dbBranchName: DBBranchName;
4016
+ workspace: string;
4017
+ };
4018
+ declare type SearchBranchError = ErrorWrapper<{
4019
+ status: 400;
4020
+ payload: BadRequestError;
4021
+ } | {
4022
+ status: 401;
4023
+ payload: AuthError;
4024
+ } | {
4025
+ status: 404;
4026
+ payload: SimpleError;
4027
+ }>;
4028
+ declare type SearchBranchRequestBody = {
4029
+ /**
4030
+ * 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.
4031
+ */
4032
+ tables?: (string | {
4033
+ /**
4034
+ * The name of the table.
4035
+ */
4036
+ table: string;
4037
+ filter?: FilterExpression;
4038
+ boosters?: BoosterExpression[];
4039
+ })[];
4040
+ /**
4041
+ * The query string.
4042
+ *
4043
+ * @minLength 1
4044
+ */
4045
+ query: string;
4046
+ fuzziness?: FuzzinessExpression;
4047
+ prefix?: PrefixExpression;
4048
+ highlight?: HighlightExpression;
4049
+ };
4050
+ declare type SearchBranchVariables = {
4051
+ body: SearchBranchRequestBody;
4052
+ pathParams: SearchBranchPathParams;
4053
+ } & FetcherExtraProps;
4054
+ /**
4055
+ * Run a free text search operation across the database branch.
4056
+ */
4057
+ declare const searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
4058
+ declare type SummarizeTablePathParams = {
4059
+ /**
4060
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4061
+ */
2758
4062
  dbBranchName: DBBranchName;
4063
+ /**
4064
+ * The Table name
4065
+ */
2759
4066
  tableName: TableName;
2760
4067
  workspace: string;
2761
4068
  };
2762
- declare type SearchTableError = ErrorWrapper<{
4069
+ declare type SummarizeTableError = ErrorWrapper<{
4070
+ status: 400;
4071
+ payload: BadRequestError;
4072
+ } | {
4073
+ status: 401;
4074
+ payload: AuthError;
4075
+ } | {
4076
+ status: 404;
4077
+ payload: SimpleError;
4078
+ }>;
4079
+ declare type SummarizeTableRequestBody = {
4080
+ columns?: ColumnsProjection;
4081
+ summaries?: SummaryExpressionList;
4082
+ sort?: SortExpression;
4083
+ };
4084
+ declare type SummarizeTableVariables = {
4085
+ body?: SummarizeTableRequestBody;
4086
+ pathParams: SummarizeTablePathParams;
4087
+ } & FetcherExtraProps;
4088
+ /**
4089
+ * This endpoint allows you to (optionally) define groups, and then to run
4090
+ * calculations on the values in each group. This is most helpful when you'd
4091
+ * like to understand the data you have in your database.
4092
+ *
4093
+ * A group is a combination of unique values. If you create a group for `sold_by`,
4094
+ * `product_name`, we will return one row for every combination of `sold_by` and
4095
+ * `product_name` you have in your database. When you want to calculate statistics,
4096
+ * you define these groups and ask Xata to calculate data on each group.
4097
+ *
4098
+ * **Some questions you can ask of your data:**
4099
+ *
4100
+ * How many records do I have in this table?
4101
+ * - Set `columns: []` as we we want data from the entire table, so we ask for no groups.
4102
+ * - Set `summaries: {"total": {"count": "*"}}` in order to see the count of all records.
4103
+ * We use `count: *` here we'd like to know the total amount of rows; ignoring whether
4104
+ * they are `null` or not.
4105
+ *
4106
+ * What are the top total sales for each product?
4107
+ * - Set `columns: [product_name]` as we'd like to run calculations on each unique product
4108
+ * name in our table. Setting `columns` like this will produce one row per unique product
4109
+ * name.
4110
+ * - Set `summaries: {"total_sales": {"count": "product_name"}}` as we'd like to create a
4111
+ * field called "total_sales" for each group. This field will count all rows in each group
4112
+ * with non-null product names.
4113
+ * - Set `sort: [{"total_sales": "desc"}]` in order to bring the rows with the highest
4114
+ * total_sales field to the top.
4115
+ *
4116
+ * `columns`: tells Xata how to create each group. If you add `product_id` we will create
4117
+ * a new group for every unique `product_id`.
4118
+ *
4119
+ * `summaries`: tells Xata which calculations to run on each group.
4120
+ *
4121
+ * `sort`: tells Xata in which order you'd like to see results. You may sort by fields
4122
+ * specified in `columns` as well as the summary names defined in `summaries`.
4123
+ *
4124
+ * note: Sorting on summarized values can be slower on very large tables; this will impact
4125
+ * your rate limit significantly more than other queries. Try use `filter` [coming soon] to
4126
+ * reduce the amount of data being processed in order to reduce impact on your limits.
4127
+ */
4128
+ declare const summarizeTable: (variables: SummarizeTableVariables) => Promise<SummarizeResponse>;
4129
+ declare type CPgetDatabaseListPathParams = {
4130
+ /**
4131
+ * Workspace name
4132
+ */
4133
+ workspaceId: WorkspaceID;
4134
+ };
4135
+ declare type CPgetDatabaseListError = ErrorWrapper<{
4136
+ status: 400;
4137
+ payload: BadRequestError;
4138
+ } | {
4139
+ status: 401;
4140
+ payload: AuthError;
4141
+ }>;
4142
+ declare type CPgetDatabaseListVariables = {
4143
+ pathParams: CPgetDatabaseListPathParams;
4144
+ } & FetcherExtraProps;
4145
+ /**
4146
+ * List all databases available in your Workspace.
4147
+ */
4148
+ declare const cPgetDatabaseList: (variables: CPgetDatabaseListVariables) => Promise<CPListDatabasesResponse>;
4149
+ declare type CPcreateDatabasePathParams = {
4150
+ /**
4151
+ * Workspace name
4152
+ */
4153
+ workspaceId: WorkspaceID;
4154
+ /**
4155
+ * The Database Name
4156
+ */
4157
+ dbName: DBName;
4158
+ };
4159
+ declare type CPcreateDatabaseError = ErrorWrapper<{
4160
+ status: 400;
4161
+ payload: BadRequestError;
4162
+ } | {
4163
+ status: 401;
4164
+ payload: AuthError;
4165
+ }>;
4166
+ declare type CPcreateDatabaseResponse = {
4167
+ /**
4168
+ * @minLength 1
4169
+ */
4170
+ databaseName?: string;
4171
+ branchName?: string;
4172
+ };
4173
+ declare type CPcreateDatabaseRequestBody = {
4174
+ /**
4175
+ * @minLength 1
4176
+ */
4177
+ branchName?: string;
4178
+ /**
4179
+ * @minLength 1
4180
+ */
4181
+ region?: string;
4182
+ ui?: {
4183
+ color?: string;
4184
+ };
4185
+ metadata?: BranchMetadata;
4186
+ };
4187
+ declare type CPcreateDatabaseVariables = {
4188
+ body?: CPcreateDatabaseRequestBody;
4189
+ pathParams: CPcreateDatabasePathParams;
4190
+ } & FetcherExtraProps;
4191
+ /**
4192
+ * Create Database with identifier name
4193
+ */
4194
+ declare const cPcreateDatabase: (variables: CPcreateDatabaseVariables) => Promise<CPcreateDatabaseResponse>;
4195
+ declare type CPdeleteDatabasePathParams = {
4196
+ /**
4197
+ * Workspace name
4198
+ */
4199
+ workspaceId: WorkspaceID;
4200
+ /**
4201
+ * The Database Name
4202
+ */
4203
+ dbName: DBName;
4204
+ };
4205
+ declare type CPdeleteDatabaseError = ErrorWrapper<{
2763
4206
  status: 400;
2764
4207
  payload: BadRequestError;
2765
4208
  } | {
@@ -2769,31 +4212,51 @@ declare type SearchTableError = ErrorWrapper<{
2769
4212
  status: 404;
2770
4213
  payload: SimpleError;
2771
4214
  }>;
2772
- declare type SearchTableRequestBody = {
2773
- query: string;
2774
- fuzziness?: FuzzinessExpression;
2775
- prefix?: PrefixExpression;
2776
- filter?: FilterExpression;
2777
- highlight?: HighlightExpression;
2778
- boosters?: BoosterExpression[];
4215
+ declare type CPdeleteDatabaseVariables = {
4216
+ pathParams: CPdeleteDatabasePathParams;
4217
+ } & FetcherExtraProps;
4218
+ /**
4219
+ * Delete a database and all of its branches and tables permanently.
4220
+ */
4221
+ declare const cPdeleteDatabase: (variables: CPdeleteDatabaseVariables) => Promise<undefined>;
4222
+ declare type CPgetCPDatabaseMetadataPathParams = {
4223
+ /**
4224
+ * Workspace name
4225
+ */
4226
+ workspaceId: WorkspaceID;
4227
+ /**
4228
+ * The Database Name
4229
+ */
4230
+ dbName: DBName;
2779
4231
  };
2780
- declare type SearchTableVariables = {
2781
- body: SearchTableRequestBody;
2782
- pathParams: SearchTablePathParams;
4232
+ declare type CPgetCPDatabaseMetadataError = ErrorWrapper<{
4233
+ status: 400;
4234
+ payload: BadRequestError;
4235
+ } | {
4236
+ status: 401;
4237
+ payload: AuthError;
4238
+ } | {
4239
+ status: 404;
4240
+ payload: SimpleError;
4241
+ }>;
4242
+ declare type CPgetCPDatabaseMetadataVariables = {
4243
+ pathParams: CPgetCPDatabaseMetadataPathParams;
2783
4244
  } & FetcherExtraProps;
2784
4245
  /**
2785
- * Run a free text search operation in a particular table.
2786
- *
2787
- * The endpoint accepts a `query` parameter that is used for the free text search and a set of structured filters (via the `filter` parameter) that are applied before the search. The `filter` parameter uses the same syntax as the [query endpoint](/api-reference/db/db_branch_name/tables/table_name/) with the following exceptions:
2788
- * * filters `$contains`, `$startsWith`, `$endsWith` don't work on columns of type `text`
2789
- * * filtering on columns of type `multiple` is currently unsupported
4246
+ * Retrieve metadata of the given database
2790
4247
  */
2791
- declare const searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
2792
- declare type SearchBranchPathParams = {
2793
- dbBranchName: DBBranchName;
2794
- workspace: string;
4248
+ declare const cPgetCPDatabaseMetadata: (variables: CPgetCPDatabaseMetadataVariables) => Promise<CPDatabaseMetadata>;
4249
+ declare type CPupdateCPDatabaseMetadataPathParams = {
4250
+ /**
4251
+ * Workspace name
4252
+ */
4253
+ workspaceId: WorkspaceID;
4254
+ /**
4255
+ * The Database Name
4256
+ */
4257
+ dbName: DBName;
2795
4258
  };
2796
- declare type SearchBranchError = ErrorWrapper<{
4259
+ declare type CPupdateCPDatabaseMetadataError = ErrorWrapper<{
2797
4260
  status: 400;
2798
4261
  payload: BadRequestError;
2799
4262
  } | {
@@ -2803,24 +4266,22 @@ declare type SearchBranchError = ErrorWrapper<{
2803
4266
  status: 404;
2804
4267
  payload: SimpleError;
2805
4268
  }>;
2806
- declare type SearchBranchRequestBody = {
2807
- tables?: (string | {
2808
- table: string;
2809
- filter?: FilterExpression;
2810
- boosters?: BoosterExpression[];
2811
- })[];
2812
- query: string;
2813
- fuzziness?: FuzzinessExpression;
2814
- highlight?: HighlightExpression;
4269
+ declare type CPupdateCPDatabaseMetadataRequestBody = {
4270
+ ui?: {
4271
+ /**
4272
+ * @minLength 1
4273
+ */
4274
+ color?: string;
4275
+ };
2815
4276
  };
2816
- declare type SearchBranchVariables = {
2817
- body: SearchBranchRequestBody;
2818
- pathParams: SearchBranchPathParams;
4277
+ declare type CPupdateCPDatabaseMetadataVariables = {
4278
+ body?: CPupdateCPDatabaseMetadataRequestBody;
4279
+ pathParams: CPupdateCPDatabaseMetadataPathParams;
2819
4280
  } & FetcherExtraProps;
2820
4281
  /**
2821
- * Run a free text search operation across the database branch.
4282
+ * Update the color of the selected database
2822
4283
  */
2823
- declare const searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
4284
+ declare const cPupdateCPDatabaseMetadata: (variables: CPupdateCPDatabaseMetadataVariables) => Promise<CPDatabaseMetadata>;
2824
4285
  declare const operationsByTag: {
2825
4286
  users: {
2826
4287
  getUser: (variables: GetUserVariables) => Promise<UserWithID>;
@@ -2850,6 +4311,7 @@ declare const operationsByTag: {
2850
4311
  createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
2851
4312
  deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
2852
4313
  getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
4314
+ updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
2853
4315
  getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
2854
4316
  addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
2855
4317
  removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
@@ -2862,10 +4324,28 @@ declare const operationsByTag: {
2862
4324
  deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
2863
4325
  updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
2864
4326
  getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
4327
+ getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
4328
+ };
4329
+ migrationRequests: {
4330
+ listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
4331
+ createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
4332
+ getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
4333
+ updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
4334
+ listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
4335
+ compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
4336
+ getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
4337
+ mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
4338
+ };
4339
+ branchSchema: {
2865
4340
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
2866
4341
  executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
2867
4342
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
2868
- getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
4343
+ compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
4344
+ compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
4345
+ updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
4346
+ previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
4347
+ applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
4348
+ getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
2869
4349
  };
2870
4350
  table: {
2871
4351
  createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
@@ -2890,6 +4370,14 @@ declare const operationsByTag: {
2890
4370
  queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
2891
4371
  searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
2892
4372
  searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
4373
+ summarizeTable: (variables: SummarizeTableVariables) => Promise<SummarizeResponse>;
4374
+ };
4375
+ databases: {
4376
+ cPgetDatabaseList: (variables: CPgetDatabaseListVariables) => Promise<CPListDatabasesResponse>;
4377
+ cPcreateDatabase: (variables: CPcreateDatabaseVariables) => Promise<CPcreateDatabaseResponse>;
4378
+ cPdeleteDatabase: (variables: CPdeleteDatabaseVariables) => Promise<undefined>;
4379
+ cPgetCPDatabaseMetadata: (variables: CPgetCPDatabaseMetadataVariables) => Promise<CPDatabaseMetadata>;
4380
+ cPupdateCPDatabaseMetadata: (variables: CPupdateCPDatabaseMetadataVariables) => Promise<CPDatabaseMetadata>;
2893
4381
  };
2894
4382
  };
2895
4383
 
@@ -2915,6 +4403,8 @@ declare class XataApiClient {
2915
4403
  get branches(): BranchApi;
2916
4404
  get tables(): TableApi;
2917
4405
  get records(): RecordsApi;
4406
+ get migrationRequests(): MigrationRequestsApi;
4407
+ get branchSchema(): BranchSchemaApi;
2918
4408
  }
2919
4409
  declare class UserApi {
2920
4410
  private extraProps;
@@ -2950,6 +4440,7 @@ declare class DatabaseApi {
2950
4440
  createDatabase(workspace: WorkspaceID, dbName: DBName, options?: CreateDatabaseRequestBody): Promise<CreateDatabaseResponse>;
2951
4441
  deleteDatabase(workspace: WorkspaceID, dbName: DBName): Promise<void>;
2952
4442
  getDatabaseMetadata(workspace: WorkspaceID, dbName: DBName): Promise<DatabaseMetadata>;
4443
+ updateDatabaseMetadata(workspace: WorkspaceID, dbName: DBName, options?: UpdateDatabaseMetadataRequestBody): Promise<DatabaseMetadata>;
2953
4444
  getGitBranchesMapping(workspace: WorkspaceID, dbName: DBName): Promise<ListGitBranchesResponse>;
2954
4445
  addGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, body: AddGitBranchesEntryRequestBody): Promise<AddGitBranchesEntryResponse>;
2955
4446
  removeGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, gitBranch: string): Promise<void>;
@@ -2964,9 +4455,6 @@ declare class BranchApi {
2964
4455
  deleteBranch(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<void>;
2965
4456
  updateBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName, metadata?: BranchMetadata): Promise<void>;
2966
4457
  getBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<BranchMetadata>;
2967
- getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
2968
- executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
2969
- getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
2970
4458
  getBranchStats(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<GetBranchStatsResponse>;
2971
4459
  }
2972
4460
  declare class TableApi {
@@ -2996,6 +4484,32 @@ declare class RecordsApi {
2996
4484
  queryTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: QueryTableRequestBody): Promise<QueryResponse>;
2997
4485
  searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
2998
4486
  searchBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, query: SearchBranchRequestBody): Promise<SearchResponse>;
4487
+ summarizeTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SummarizeTableRequestBody): Promise<SummarizeResponse>;
4488
+ }
4489
+ declare class MigrationRequestsApi {
4490
+ private extraProps;
4491
+ constructor(extraProps: FetcherExtraProps);
4492
+ listMigrationRequests(workspace: WorkspaceID, database: DBName, options?: ListMigrationRequestsRequestBody): Promise<ListMigrationRequestsResponse>;
4493
+ createMigrationRequest(workspace: WorkspaceID, database: DBName, options: CreateMigrationRequestRequestBody): Promise<CreateMigrationRequestResponse>;
4494
+ getMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<MigrationRequest>;
4495
+ updateMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number, options: UpdateMigrationRequestRequestBody): Promise<void>;
4496
+ listMigrationRequestsCommits(workspace: WorkspaceID, database: DBName, migrationRequest: number, options?: ListMigrationRequestsCommitsRequestBody): Promise<ListMigrationRequestsCommitsResponse>;
4497
+ compareMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<SchemaCompareResponse>;
4498
+ getMigrationRequestIsMerged(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<GetMigrationRequestIsMergedResponse>;
4499
+ mergeMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<Commit>;
4500
+ }
4501
+ declare class BranchSchemaApi {
4502
+ private extraProps;
4503
+ constructor(extraProps: FetcherExtraProps);
4504
+ getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
4505
+ executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
4506
+ getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
4507
+ compareBranchWithUserSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
4508
+ compareBranchSchemas(workspace: WorkspaceID, database: DBName, branch: BranchName, branchName: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
4509
+ updateBranchSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<UpdateBranchSchemaResponse>;
4510
+ previewBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<PreviewBranchSchemaEditResponse>;
4511
+ applyBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, edits: SchemaEditScript): Promise<ApplyBranchSchemaEditResponse>;
4512
+ getBranchSchemaHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchSchemaHistoryRequestBody): Promise<GetBranchSchemaHistoryResponse>;
2999
4513
  }
3000
4514
 
3001
4515
  declare class XataApiPlugin implements XataPlugin {
@@ -3065,12 +4579,12 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
3065
4579
  /**
3066
4580
  * Retrieves a refreshed copy of the current record from the database.
3067
4581
  * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3068
- * @returns The persisted record with the selected columns.
4582
+ * @returns The persisted record with the selected columns, null if not found.
3069
4583
  */
3070
4584
  read<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3071
4585
  /**
3072
4586
  * Retrieves a refreshed copy of the current record from the database.
3073
- * @returns The persisted record with all first level properties.
4587
+ * @returns The persisted record with all first level properties, null if not found.
3074
4588
  */
3075
4589
  read(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3076
4590
  /**
@@ -3078,42 +4592,30 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
3078
4592
  * returned and the current object is not mutated.
3079
4593
  * @param partialUpdate The columns and their values that have to be updated.
3080
4594
  * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3081
- * @returns The persisted record with the selected columns.
4595
+ * @returns The persisted record with the selected columns, null if not found.
3082
4596
  */
3083
- update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>>>;
4597
+ update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<OriginalRecord>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3084
4598
  /**
3085
4599
  * Performs a partial update of the current record. On success a new object is
3086
4600
  * returned and the current object is not mutated.
3087
4601
  * @param partialUpdate The columns and their values that have to be updated.
3088
- * @returns The persisted record with all first level properties.
4602
+ * @returns The persisted record with all first level properties, null if not found.
3089
4603
  */
3090
- update(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>>>;
4604
+ update(partialUpdate: Partial<EditableData<OriginalRecord>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3091
4605
  /**
3092
4606
  * Performs a deletion of the current record in the database.
3093
- *
3094
- * @throws If the record was already deleted or if an error happened while performing the deletion.
3095
- */
3096
- delete(): Promise<void>;
3097
- }
3098
- declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update'> & {
3099
- /**
3100
- * Retrieves a refreshed copy of the current record from the database.
3101
- */
3102
- read<K extends SelectableColumn<Record>>(columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>> | null>;
3103
- /**
3104
- * Performs a partial update of the current record. On success a new object is
3105
- * returned and the current object is not mutated.
3106
- * @param partialUpdate The columns and their values that have to be updated.
3107
- * @returns A new record containing the latest values for all the columns of the current record.
4607
+ * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
4608
+ * @returns The deleted record, null if not found.
3108
4609
  */
3109
- update<K extends SelectableColumn<Record>>(partialUpdate: Partial<EditableData<Omit<Record, keyof XataRecord>>>, columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>>>;
4610
+ delete<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3110
4611
  /**
3111
4612
  * Performs a deletion of the current record in the database.
3112
- *
3113
- * @throws If the record was already deleted or if an error happened while performing the deletion.
4613
+ * @returns The deleted record, null if not found.
4614
+
3114
4615
  */
3115
- delete(): Promise<void>;
3116
- };
4616
+ delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
4617
+ }
4618
+ declare type Link<Record extends XataRecord> = XataRecord<Record>;
3117
4619
  declare type XataRecordMetadata = {
3118
4620
  /**
3119
4621
  * Number that is increased every time the record is updated.
@@ -3123,13 +4625,13 @@ declare type XataRecordMetadata = {
3123
4625
  };
3124
4626
  declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
3125
4627
  declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
3126
- declare type EditableData<O extends BaseData> = {
4628
+ declare type EditableData<O extends XataRecord> = Identifiable & Omit<{
3127
4629
  [K in keyof O]: O[K] extends XataRecord ? {
3128
4630
  id: string;
3129
4631
  } | string : NonNullable<O[K]> extends XataRecord ? {
3130
4632
  id: string;
3131
4633
  } | string | null | undefined : O[K];
3132
- };
4634
+ }, keyof XataRecord>;
3133
4635
 
3134
4636
  /**
3135
4637
  * PropertyMatchFilter
@@ -3223,7 +4725,7 @@ declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFi
3223
4725
  declare type NestedApiFilter<T> = {
3224
4726
  [key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
3225
4727
  };
3226
- declare type Filter<T> = T extends Record<string, any> ? BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
4728
+ 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>;
3227
4729
 
3228
4730
  declare type DateBooster = {
3229
4731
  origin?: string;
@@ -3257,6 +4759,21 @@ declare type Boosters<O extends XataRecord> = Values<{
3257
4759
  } : never;
3258
4760
  }>;
3259
4761
 
4762
+ declare type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
4763
+ /**
4764
+ * The name of the column.
4765
+ */
4766
+ column: SelectableColumn<T>;
4767
+ /**
4768
+ * The weight of the column.
4769
+ *
4770
+ * @default 1
4771
+ * @maximum 10
4772
+ * @minimum 1
4773
+ */
4774
+ weight?: number;
4775
+ };
4776
+
3260
4777
  declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
3261
4778
  fuzziness?: FuzzinessExpression;
3262
4779
  prefix?: PrefixExpression;
@@ -3264,6 +4781,7 @@ declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables exte
3264
4781
  tables?: Array<Tables | Values<{
3265
4782
  [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
3266
4783
  table: Model;
4784
+ target?: TargetColumn<Schemas[Model] & XataRecord>[];
3267
4785
  filter?: Filter<SelectedPick<Schemas[Model] & XataRecord, ['*']>>;
3268
4786
  boosters?: Boosters<Schemas[Model] & XataRecord>[];
3269
4787
  };
@@ -3280,7 +4798,7 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
3280
4798
  [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>[]>;
3281
4799
  }>;
3282
4800
  };
3283
- declare class SearchPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
4801
+ declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
3284
4802
  #private;
3285
4803
  private db;
3286
4804
  constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
@@ -3338,7 +4856,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3338
4856
  #private;
3339
4857
  readonly meta: PaginationQueryMeta;
3340
4858
  readonly records: RecordArray<Result>;
3341
- constructor(repository: Repository<Record> | null, table: string, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
4859
+ constructor(repository: Repository<Record> | null, table: {
4860
+ name: string;
4861
+ schema?: Table;
4862
+ }, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
3342
4863
  getQueryOptions(): QueryOptions<Record>;
3343
4864
  key(): string;
3344
4865
  /**
@@ -3377,7 +4898,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3377
4898
  * @param value The value to filter.
3378
4899
  * @returns A new Query object.
3379
4900
  */
3380
- filter<F extends SelectableColumn<Record>>(column: F, value: Filter<ValueAtColumn<Record, F>>): Query<Record, Result>;
4901
+ filter<F extends SelectableColumn<Record>>(column: F, value: Filter<NonNullable<ValueAtColumn<Record, F>>>): Query<Record, Result>;
3381
4902
  /**
3382
4903
  * Builds a new query object adding one or more constraints. Examples:
3383
4904
  *
@@ -3391,7 +4912,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3391
4912
  * @param filters A filter object
3392
4913
  * @returns A new Query object.
3393
4914
  */
3394
- filter(filters: Filter<Record>): Query<Record, Result>;
4915
+ filter(filters?: Filter<Record>): Query<Record, Result>;
3395
4916
  /**
3396
4917
  * Builds a new query with a new sort option.
3397
4918
  * @param column The column name.
@@ -3514,6 +5035,26 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3514
5035
  * @returns The first record that matches the query, or null if no record matched the query.
3515
5036
  */
3516
5037
  getFirst(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'>): Promise<Result | null>;
5038
+ /**
5039
+ * Performs the query in the database and returns the first result.
5040
+ * @returns The first record that matches the query, or null if no record matched the query.
5041
+ * @throws if there are no results.
5042
+ */
5043
+ getFirstOrThrow(): Promise<Result>;
5044
+ /**
5045
+ * Performs the query in the database and returns the first result.
5046
+ * @param options Additional options to be used when performing the query.
5047
+ * @returns The first record that matches the query, or null if no record matched the query.
5048
+ * @throws if there are no results.
5049
+ */
5050
+ getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>>;
5051
+ /**
5052
+ * Performs the query in the database and returns the first result.
5053
+ * @param options Additional options to be used when performing the query.
5054
+ * @returns The first record that matches the query, or null if no record matched the query.
5055
+ * @throws if there are no results.
5056
+ */
5057
+ getFirstOrThrow(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'>): Promise<Result>;
3517
5058
  /**
3518
5059
  * Builds a new query object adding a cache TTL in milliseconds.
3519
5060
  * @param ttl The cache TTL in milliseconds.
@@ -3670,9 +5211,9 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
3670
5211
  /**
3671
5212
  * Common interface for performing operations on a table.
3672
5213
  */
3673
- declare abstract class Repository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, Readonly<SelectedPick<Record, ['*']>>> {
3674
- abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<Data>, 'id'> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3675
- abstract create(object: Omit<EditableData<Data>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5214
+ declare abstract class Repository<Record extends XataRecord> extends Query<Record, Readonly<SelectedPick<Record, ['*']>>> {
5215
+ abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5216
+ abstract create(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3676
5217
  /**
3677
5218
  * Creates a single record in the table with a unique id.
3678
5219
  * @param id The unique id.
@@ -3680,27 +5221,27 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3680
5221
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3681
5222
  * @returns The full persisted record.
3682
5223
  */
3683
- abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5224
+ abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3684
5225
  /**
3685
5226
  * Creates a single record in the table with a unique id.
3686
5227
  * @param id The unique id.
3687
5228
  * @param object Object containing the column names with their values to be stored in the table.
3688
5229
  * @returns The full persisted record.
3689
5230
  */
3690
- abstract create(id: string, object: Omit<EditableData<Data>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5231
+ abstract create(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3691
5232
  /**
3692
5233
  * Creates multiple records in the table.
3693
5234
  * @param objects Array of objects with the column names and the values to be stored in the table.
3694
5235
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3695
5236
  * @returns Array of the persisted records in order.
3696
5237
  */
3697
- abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Data>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5238
+ abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3698
5239
  /**
3699
5240
  * Creates multiple records in the table.
3700
5241
  * @param objects Array of objects with the column names and the values to be stored in the table.
3701
5242
  * @returns Array of the persisted records in order.
3702
5243
  */
3703
- abstract create(objects: Array<Omit<EditableData<Data>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5244
+ abstract create(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3704
5245
  /**
3705
5246
  * Queries a single record from the table given its unique id.
3706
5247
  * @param id The unique id.
@@ -3753,47 +5294,154 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3753
5294
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
3754
5295
  */
3755
5296
  abstract read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5297
+ /**
5298
+ * Queries a single record from the table given its unique id.
5299
+ * @param id The unique id.
5300
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5301
+ * @returns The persisted record for the given id.
5302
+ * @throws If the record could not be found.
5303
+ */
5304
+ abstract readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5305
+ /**
5306
+ * Queries a single record from the table given its unique id.
5307
+ * @param id The unique id.
5308
+ * @returns The persisted record for the given id.
5309
+ * @throws If the record could not be found.
5310
+ */
5311
+ abstract readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5312
+ /**
5313
+ * Queries multiple records from the table given their unique id.
5314
+ * @param ids The unique ids array.
5315
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5316
+ * @returns The persisted records for the given ids in order.
5317
+ * @throws If one or more records could not be found.
5318
+ */
5319
+ abstract readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5320
+ /**
5321
+ * Queries multiple records from the table given their unique id.
5322
+ * @param ids The unique ids array.
5323
+ * @returns The persisted records for the given ids in order.
5324
+ * @throws If one or more records could not be found.
5325
+ */
5326
+ abstract readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5327
+ /**
5328
+ * Queries a single record from the table by the id in the object.
5329
+ * @param object Object containing the id of the record.
5330
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5331
+ * @returns The persisted record for the given id.
5332
+ * @throws If the record could not be found.
5333
+ */
5334
+ abstract readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5335
+ /**
5336
+ * Queries a single record from the table by the id in the object.
5337
+ * @param object Object containing the id of the record.
5338
+ * @returns The persisted record for the given id.
5339
+ * @throws If the record could not be found.
5340
+ */
5341
+ abstract readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5342
+ /**
5343
+ * Queries multiple records from the table by the ids in the objects.
5344
+ * @param objects Array of objects containing the ids of the records.
5345
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5346
+ * @returns The persisted records for the given ids in order.
5347
+ * @throws If one or more records could not be found.
5348
+ */
5349
+ abstract readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5350
+ /**
5351
+ * Queries multiple records from the table by the ids in the objects.
5352
+ * @param objects Array of objects containing the ids of the records.
5353
+ * @returns The persisted records for the given ids in order.
5354
+ * @throws If one or more records could not be found.
5355
+ */
5356
+ abstract readOrThrow(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5357
+ /**
5358
+ * Partially update a single record.
5359
+ * @param object An object with its id and the columns to be updated.
5360
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5361
+ * @returns The full persisted record, null if the record could not be found.
5362
+ */
5363
+ abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5364
+ /**
5365
+ * Partially update a single record.
5366
+ * @param object An object with its id and the columns to be updated.
5367
+ * @returns The full persisted record, null if the record could not be found.
5368
+ */
5369
+ abstract update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5370
+ /**
5371
+ * Partially update a single record given its unique id.
5372
+ * @param id The unique id.
5373
+ * @param object The column names and their values that have to be updated.
5374
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5375
+ * @returns The full persisted record, null if the record could not be found.
5376
+ */
5377
+ abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5378
+ /**
5379
+ * Partially update a single record given its unique id.
5380
+ * @param id The unique id.
5381
+ * @param object The column names and their values that have to be updated.
5382
+ * @returns The full persisted record, null if the record could not be found.
5383
+ */
5384
+ abstract update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5385
+ /**
5386
+ * Partially updates multiple records.
5387
+ * @param objects An array of objects with their ids and columns to be updated.
5388
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5389
+ * @returns Array of the persisted records in order (if a record could not be found null is returned).
5390
+ */
5391
+ abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5392
+ /**
5393
+ * Partially updates multiple records.
5394
+ * @param objects An array of objects with their ids and columns to be updated.
5395
+ * @returns Array of the persisted records in order (if a record could not be found null is returned).
5396
+ */
5397
+ abstract update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
3756
5398
  /**
3757
5399
  * Partially update a single record.
3758
5400
  * @param object An object with its id and the columns to be updated.
3759
5401
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3760
5402
  * @returns The full persisted record.
5403
+ * @throws If the record could not be found.
3761
5404
  */
3762
- abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Data>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5405
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3763
5406
  /**
3764
5407
  * Partially update a single record.
3765
5408
  * @param object An object with its id and the columns to be updated.
3766
5409
  * @returns The full persisted record.
5410
+ * @throws If the record could not be found.
3767
5411
  */
3768
- abstract update(object: Partial<EditableData<Data>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5412
+ abstract updateOrThrow(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3769
5413
  /**
3770
5414
  * Partially update a single record given its unique id.
3771
5415
  * @param id The unique id.
3772
5416
  * @param object The column names and their values that have to be updated.
3773
5417
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3774
5418
  * @returns The full persisted record.
5419
+ * @throws If the record could not be found.
3775
5420
  */
3776
- abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Data>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5421
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3777
5422
  /**
3778
5423
  * Partially update a single record given its unique id.
3779
5424
  * @param id The unique id.
3780
5425
  * @param object The column names and their values that have to be updated.
3781
5426
  * @returns The full persisted record.
5427
+ * @throws If the record could not be found.
3782
5428
  */
3783
- abstract update(id: string, object: Partial<EditableData<Data>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5429
+ abstract updateOrThrow(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3784
5430
  /**
3785
5431
  * Partially updates multiple records.
3786
5432
  * @param objects An array of objects with their ids and columns to be updated.
3787
5433
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3788
5434
  * @returns Array of the persisted records in order.
5435
+ * @throws If one or more records could not be found.
3789
5436
  */
3790
- abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Data>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5437
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3791
5438
  /**
3792
5439
  * Partially updates multiple records.
3793
5440
  * @param objects An array of objects with their ids and columns to be updated.
3794
5441
  * @returns Array of the persisted records in order.
5442
+ * @throws If one or more records could not be found.
3795
5443
  */
3796
- abstract update(objects: Array<Partial<EditableData<Data>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5444
+ abstract updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3797
5445
  /**
3798
5446
  * Creates or updates a single record. If a record exists with the given id,
3799
5447
  * it will be update, otherwise a new record will be created.
@@ -3801,14 +5449,14 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3801
5449
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3802
5450
  * @returns The full persisted record.
3803
5451
  */
3804
- abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Data> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5452
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3805
5453
  /**
3806
5454
  * Creates or updates a single record. If a record exists with the given id,
3807
5455
  * it will be update, otherwise a new record will be created.
3808
5456
  * @param object Object containing the column names with their values to be persisted in the table.
3809
5457
  * @returns The full persisted record.
3810
5458
  */
3811
- abstract createOrUpdate(object: EditableData<Data> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5459
+ abstract createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3812
5460
  /**
3813
5461
  * Creates or updates a single record. If a record exists with the given id,
3814
5462
  * it will be update, otherwise a new record will be created.
@@ -3817,7 +5465,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3817
5465
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3818
5466
  * @returns The full persisted record.
3819
5467
  */
3820
- abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5468
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3821
5469
  /**
3822
5470
  * Creates or updates a single record. If a record exists with the given id,
3823
5471
  * it will be update, otherwise a new record will be created.
@@ -3825,7 +5473,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3825
5473
  * @param object The column names and the values to be persisted.
3826
5474
  * @returns The full persisted record.
3827
5475
  */
3828
- abstract createOrUpdate(id: string, object: Omit<EditableData<Data>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5476
+ abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3829
5477
  /**
3830
5478
  * Creates or updates a single record. If a record exists with the given id,
3831
5479
  * it will be update, otherwise a new record will be created.
@@ -3833,38 +5481,126 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3833
5481
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3834
5482
  * @returns Array of the persisted records.
3835
5483
  */
3836
- abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Data> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5484
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3837
5485
  /**
3838
5486
  * Creates or updates a single record. If a record exists with the given id,
3839
5487
  * it will be update, otherwise a new record will be created.
3840
5488
  * @param objects Array of objects with the column names and the values to be stored in the table.
3841
5489
  * @returns Array of the persisted records.
3842
5490
  */
3843
- abstract createOrUpdate(objects: Array<EditableData<Data> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5491
+ abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5492
+ /**
5493
+ * Deletes a record given its unique id.
5494
+ * @param object An object with a unique id.
5495
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5496
+ * @returns The deleted record, null if the record could not be found.
5497
+ */
5498
+ abstract delete<K extends SelectableColumn<Record>>(object: Identifiable & Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3844
5499
  /**
3845
5500
  * Deletes a record given its unique id.
5501
+ * @param object An object with a unique id.
5502
+ * @returns The deleted record, null if the record could not be found.
5503
+ */
5504
+ abstract delete(object: Identifiable & Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5505
+ /**
5506
+ * Deletes a record given a unique id.
5507
+ * @param id The unique id.
5508
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5509
+ * @returns The deleted record, null if the record could not be found.
5510
+ */
5511
+ abstract delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5512
+ /**
5513
+ * Deletes a record given a unique id.
3846
5514
  * @param id The unique id.
3847
- * @throws If the record could not be found or there was an error while performing the deletion.
5515
+ * @returns The deleted record, null if the record could not be found.
5516
+ */
5517
+ abstract delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5518
+ /**
5519
+ * Deletes multiple records given an array of objects with ids.
5520
+ * @param objects An array of objects with unique ids.
5521
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5522
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5523
+ */
5524
+ abstract delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5525
+ /**
5526
+ * Deletes multiple records given an array of objects with ids.
5527
+ * @param objects An array of objects with unique ids.
5528
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
3848
5529
  */
3849
- abstract delete(id: string): Promise<void>;
5530
+ abstract delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5531
+ /**
5532
+ * Deletes multiple records given an array of unique ids.
5533
+ * @param objects An array of ids.
5534
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5535
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5536
+ */
5537
+ abstract delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5538
+ /**
5539
+ * Deletes multiple records given an array of unique ids.
5540
+ * @param objects An array of ids.
5541
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5542
+ */
5543
+ abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5544
+ /**
5545
+ * Deletes a record given its unique id.
5546
+ * @param object An object with a unique id.
5547
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5548
+ * @returns The deleted record, null if the record could not be found.
5549
+ * @throws If the record could not be found.
5550
+ */
5551
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3850
5552
  /**
3851
5553
  * Deletes a record given its unique id.
3852
- * @param id An object with a unique id.
3853
- * @throws If the record could not be found or there was an error while performing the deletion.
5554
+ * @param object An object with a unique id.
5555
+ * @returns The deleted record, null if the record could not be found.
5556
+ * @throws If the record could not be found.
5557
+ */
5558
+ abstract deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5559
+ /**
5560
+ * Deletes a record given a unique id.
5561
+ * @param id The unique id.
5562
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5563
+ * @returns The deleted record, null if the record could not be found.
5564
+ * @throws If the record could not be found.
5565
+ */
5566
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5567
+ /**
5568
+ * Deletes a record given a unique id.
5569
+ * @param id The unique id.
5570
+ * @returns The deleted record, null if the record could not be found.
5571
+ * @throws If the record could not be found.
3854
5572
  */
3855
- abstract delete(id: Identifiable): Promise<void>;
5573
+ abstract deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3856
5574
  /**
3857
- * Deletes a record given a list of unique ids.
3858
- * @param ids The array of unique ids.
3859
- * @throws If the record could not be found or there was an error while performing the deletion.
5575
+ * Deletes multiple records given an array of objects with ids.
5576
+ * @param objects An array of objects with unique ids.
5577
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5578
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5579
+ * @throws If one or more records could not be found.
5580
+ */
5581
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5582
+ /**
5583
+ * Deletes multiple records given an array of objects with ids.
5584
+ * @param objects An array of objects with unique ids.
5585
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5586
+ * @throws If one or more records could not be found.
5587
+ */
5588
+ abstract deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5589
+ /**
5590
+ * Deletes multiple records given an array of unique ids.
5591
+ * @param objects An array of ids.
5592
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5593
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5594
+ * @throws If one or more records could not be found.
3860
5595
  */
3861
- abstract delete(ids: string[]): Promise<void>;
5596
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3862
5597
  /**
3863
- * Deletes a record given a list of unique ids.
3864
- * @param ids An array of objects with unique ids.
3865
- * @throws If the record could not be found or there was an error while performing the deletion.
5598
+ * Deletes multiple records given an array of unique ids.
5599
+ * @param objects An array of ids.
5600
+ * @returns Array of the deleted records in order.
5601
+ * @throws If one or more records could not be found.
3866
5602
  */
3867
- abstract delete(ids: Identifiable[]): Promise<void>;
5603
+ abstract deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3868
5604
  /**
3869
5605
  * Search for records in the table.
3870
5606
  * @param query The query to search for.
@@ -3880,7 +5616,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3880
5616
  }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
3881
5617
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
3882
5618
  }
3883
- declare class RestRepository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Data, Record> {
5619
+ declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
3884
5620
  #private;
3885
5621
  constructor(options: {
3886
5622
  table: string;
@@ -3888,33 +5624,62 @@ declare class RestRepository<Data extends BaseData, Record extends XataRecord =
3888
5624
  pluginOptions: XataPluginOptions;
3889
5625
  schemaTables?: Table[];
3890
5626
  });
3891
- create(object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3892
- create(recordId: string, object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3893
- create(objects: EditableData<Data>[]): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3894
- create<K extends SelectableColumn<Record>>(object: EditableData<Data>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3895
- create<K extends SelectableColumn<Record>>(recordId: string, object: EditableData<Data>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3896
- create<K extends SelectableColumn<Record>>(objects: EditableData<Data>[], columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3897
- read(recordId: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3898
- read(recordIds: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3899
- read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3900
- read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3901
- read<K extends SelectableColumn<Record>>(recordId: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3902
- read<K extends SelectableColumn<Record>>(recordIds: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3903
- read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3904
- read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3905
- update(object: Partial<EditableData<Data>> & Identifiable): Promise<SelectedPick<Record, ['*']>>;
3906
- update(recordId: string, object: Partial<EditableData<Data>>): Promise<SelectedPick<Record, ['*']>>;
3907
- update(objects: Array<Partial<EditableData<Data>> & Identifiable>): Promise<SelectedPick<Record, ['*']>[]>;
3908
- update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Data>> & Identifiable, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3909
- update<K extends SelectableColumn<Record>>(recordId: string, object: Partial<EditableData<Data>>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3910
- update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Data>> & Identifiable>, columns: K[]): Promise<SelectedPick<Record, typeof columns>[]>;
3911
- createOrUpdate(object: EditableData<Data>): Promise<SelectedPick<Record, ['*']>>;
3912
- createOrUpdate(recordId: string, object: EditableData<Data>): Promise<SelectedPick<Record, ['*']>>;
3913
- createOrUpdate(objects: EditableData<Data>[]): Promise<SelectedPick<Record, ['*']>[]>;
3914
- createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Data>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3915
- createOrUpdate<K extends SelectableColumn<Record>>(recordId: string, object: EditableData<Data>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3916
- createOrUpdate<K extends SelectableColumn<Record>>(objects: EditableData<Data>[], columns: K[]): Promise<SelectedPick<Record, typeof columns>[]>;
3917
- delete(a: string | Identifiable | Array<string | Identifiable>): Promise<void>;
5627
+ create<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5628
+ create(object: EditableData<Record> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5629
+ create<K extends SelectableColumn<Record>>(id: string, object: EditableData<Record>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5630
+ create(id: string, object: EditableData<Record>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5631
+ create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5632
+ create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5633
+ read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
5634
+ read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
5635
+ read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5636
+ read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5637
+ read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
5638
+ read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
5639
+ read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5640
+ read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5641
+ readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5642
+ readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5643
+ readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5644
+ readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5645
+ readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5646
+ readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5647
+ readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5648
+ readOrThrow(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5649
+ update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5650
+ update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5651
+ update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5652
+ update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5653
+ update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5654
+ update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5655
+ updateOrThrow<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5656
+ updateOrThrow(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5657
+ updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5658
+ updateOrThrow(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5659
+ updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5660
+ updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5661
+ createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5662
+ createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5663
+ createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5664
+ createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5665
+ createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5666
+ createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5667
+ delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5668
+ delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5669
+ delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5670
+ delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5671
+ delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5672
+ delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5673
+ delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5674
+ delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5675
+ deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5676
+ deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5677
+ deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5678
+ deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5679
+ deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5680
+ deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5681
+ deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5682
+ deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3918
5683
  search(query: string, options?: {
3919
5684
  fuzziness?: FuzzinessExpression;
3920
5685
  prefix?: PrefixExpression;
@@ -3930,6 +5695,7 @@ declare type BaseSchema = {
3930
5695
  columns: readonly ({
3931
5696
  name: string;
3932
5697
  type: Column['type'];
5698
+ notNull?: boolean;
3933
5699
  } | {
3934
5700
  name: string;
3935
5701
  type: 'link';
@@ -3959,10 +5725,10 @@ declare type TableType<Tables, TableName> = Tables & {
3959
5725
  } ? Columns extends readonly unknown[] ? Columns[number] extends {
3960
5726
  name: string;
3961
5727
  type: string;
3962
- } ? Identifiable & {
3963
- [K in Columns[number]['name']]?: PropertyType<Tables, Columns[number], K>;
3964
- } : never : never : never : never;
3965
- declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
5728
+ } ? Identifiable & UnionToIntersection<Values<{
5729
+ [K in Columns[number]['name']]: PropertyType<Tables, Columns[number], K>;
5730
+ }>> : never : never : never : never;
5731
+ declare type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Properties & {
3966
5732
  name: PropertyName;
3967
5733
  } extends infer Property ? Property extends {
3968
5734
  name: string;
@@ -3971,13 +5737,23 @@ declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
3971
5737
  table: infer LinkedTable;
3972
5738
  };
3973
5739
  columns?: infer ObjectColumns;
3974
- } ? (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 {
5740
+ notNull?: infer NotNull;
5741
+ } ? NotNull extends true ? {
5742
+ [K in PropertyName]: InnerType<Type, ObjectColumns, Tables, LinkedTable>;
5743
+ } : {
5744
+ [K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
5745
+ } : never : never;
5746
+ 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 {
3975
5747
  name: string;
3976
5748
  type: string;
3977
- } ? {
3978
- [K in ObjectColumns[number]['name']]?: PropertyType<Tables, ObjectColumns[number], K>;
3979
- } : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never) | null : never : never;
5749
+ } ? UnionToIntersection<Values<{
5750
+ [K in ObjectColumns[number]['name']]: PropertyType<Tables, ObjectColumns[number], K>;
5751
+ }>> : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never;
3980
5752
 
5753
+ /**
5754
+ * Operator to restrict results to only values that are greater than the given value.
5755
+ */
5756
+ declare const greaterThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3981
5757
  /**
3982
5758
  * Operator to restrict results to only values that are greater than the given value.
3983
5759
  */
@@ -3985,15 +5761,35 @@ declare const gt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
3985
5761
  /**
3986
5762
  * Operator to restrict results to only values that are greater than or equal to the given value.
3987
5763
  */
3988
- declare const ge: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
5764
+ declare const greaterThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
5765
+ /**
5766
+ * Operator to restrict results to only values that are greater than or equal to the given value.
5767
+ */
5768
+ declare const greaterEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3989
5769
  /**
3990
5770
  * Operator to restrict results to only values that are greater than or equal to the given value.
3991
5771
  */
3992
5772
  declare const gte: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
5773
+ /**
5774
+ * Operator to restrict results to only values that are greater than or equal to the given value.
5775
+ */
5776
+ declare const ge: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
5777
+ /**
5778
+ * Operator to restrict results to only values that are lower than the given value.
5779
+ */
5780
+ declare const lessThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3993
5781
  /**
3994
5782
  * Operator to restrict results to only values that are lower than the given value.
3995
5783
  */
3996
5784
  declare const lt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
5785
+ /**
5786
+ * Operator to restrict results to only values that are lower than or equal to the given value.
5787
+ */
5788
+ declare const lessThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
5789
+ /**
5790
+ * Operator to restrict results to only values that are lower than or equal to the given value.
5791
+ */
5792
+ declare const lessEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
3997
5793
  /**
3998
5794
  * Operator to restrict results to only values that are lower than or equal to the given value.
3999
5795
  */
@@ -4026,6 +5822,10 @@ declare const pattern: (value: string) => StringTypeFilter;
4026
5822
  * Operator to restrict results to only values that are equal to the given value.
4027
5823
  */
4028
5824
  declare const is: <T>(value: T) => PropertyFilter<T>;
5825
+ /**
5826
+ * Operator to restrict results to only values that are equal to the given value.
5827
+ */
5828
+ declare const equals: <T>(value: T) => PropertyFilter<T>;
4029
5829
  /**
4030
5830
  * Operator to restrict results to only values that are not equal to the given value.
4031
5831
  */
@@ -4054,12 +5854,10 @@ declare const includesAny: <T>(value: T) => ArrayFilter<T>;
4054
5854
  declare type SchemaDefinition = {
4055
5855
  table: string;
4056
5856
  };
4057
- declare type SchemaPluginResult<Schemas extends Record<string, BaseData>> = {
5857
+ declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
4058
5858
  [Key in keyof Schemas]: Repository<Schemas[Key]>;
4059
- } & {
4060
- [key: string]: Repository<XataRecord$1>;
4061
5859
  };
4062
- declare class SchemaPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
5860
+ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
4063
5861
  #private;
4064
5862
  constructor(schemaTables?: Schemas.Table[]);
4065
5863
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
@@ -4080,9 +5878,9 @@ declare type BaseClientOptions = {
4080
5878
  };
4081
5879
  declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
4082
5880
  interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
4083
- new <T extends readonly BaseSchema[]>(options?: Partial<BaseClientOptions>, schemaTables?: T): Omit<{
4084
- db: Awaited<ReturnType<SchemaPlugin<SchemaInference<NonNullable<typeof schemaTables>>>['build']>>;
4085
- search: Awaited<ReturnType<SearchPlugin<SchemaInference<NonNullable<typeof schemaTables>>>['build']>>;
5881
+ new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
5882
+ db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
5883
+ search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
4086
5884
  }, keyof Plugins> & {
4087
5885
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
4088
5886
  } & {
@@ -4093,7 +5891,7 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
4093
5891
  };
4094
5892
  }
4095
5893
  declare const BaseClient_base: ClientConstructor<{}>;
4096
- declare class BaseClient extends BaseClient_base<[]> {
5894
+ declare class BaseClient extends BaseClient_base<Record<string, any>> {
4097
5895
  }
4098
5896
 
4099
5897
  declare class Serializer {
@@ -4201,4 +5999,4 @@ declare class XataError extends Error {
4201
5999
  constructor(message: string, status: number);
4202
6000
  }
4203
6001
 
4204
- export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, 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, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, 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, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, Query, 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, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, 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, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, contains, createBranch, createDatabase, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
6002
+ export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditResponse, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CPcreateDatabaseError, CPcreateDatabasePathParams, CPcreateDatabaseRequestBody, CPcreateDatabaseResponse, CPcreateDatabaseVariables, CPdeleteDatabaseError, CPdeleteDatabasePathParams, CPdeleteDatabaseVariables, CPgetCPDatabaseMetadataError, CPgetCPDatabaseMetadataPathParams, CPgetCPDatabaseMetadataVariables, CPgetDatabaseListError, CPgetDatabaseListPathParams, CPgetDatabaseListVariables, CPupdateCPDatabaseMetadataError, CPupdateCPDatabaseMetadataPathParams, CPupdateCPDatabaseMetadataRequestBody, CPupdateCPDatabaseMetadataVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, 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, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, 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, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListMigrationRequestsError, ListMigrationRequestsPathParams, ListMigrationRequestsRequestBody, ListMigrationRequestsResponse, ListMigrationRequestsVariables, 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, 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, UpdateBranchSchemaResponse, 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, applyBranchSchemaEdit, buildClient, buildWorkerRunner, bulkInsertTableRecords, cPcreateDatabase, cPdeleteDatabase, cPgetCPDatabaseMetadata, cPgetDatabaseList, cPupdateCPDatabaseMetadata, 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, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequests, listMigrationRequestsCommits, lt, lte, mergeMigrationRequest, notExists, operationsByTag, pattern, previewBranchSchemaEdit, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };