@xata.io/client 0.0.0-alpha.vfbd878f → 0.0.0-alpha.vfbe46c7

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,13 +1,13 @@
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?: {
8
7
  body?: string;
9
8
  headers?: Record<string, string>;
10
9
  method?: string;
10
+ signal?: any;
11
11
  }) => Promise<{
12
12
  ok: boolean;
13
13
  status: number;
@@ -17,13 +17,14 @@ declare type FetchImpl = (url: string, init?: {
17
17
  get(name: string): string | null;
18
18
  };
19
19
  }>;
20
- declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Record<string, string>) => string;
20
+ declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
21
21
  declare type FetcherExtraProps = {
22
22
  apiUrl: string;
23
23
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
24
24
  fetchImpl: FetchImpl;
25
25
  apiKey: string;
26
26
  trace: TraceFunction;
27
+ signal?: AbortSignal;
27
28
  };
28
29
  declare type ErrorWrapper<TError> = TError | {
29
30
  status: 'unknown';
@@ -69,6 +70,9 @@ declare type XataPluginOptions = {
69
70
  * @version 1.0
70
71
  */
71
72
  declare type User = {
73
+ /**
74
+ * @format email
75
+ */
72
76
  email: string;
73
77
  fullname: string;
74
78
  image: string;
@@ -100,16 +104,19 @@ declare type WorkspaceID = string;
100
104
  declare type Role = 'owner' | 'maintainer';
101
105
  declare type WorkspaceMeta = {
102
106
  name: string;
103
- slug: string;
107
+ slug?: string;
104
108
  };
105
109
  declare type Workspace = WorkspaceMeta & {
106
110
  id: WorkspaceID;
107
111
  memberCount: number;
108
- plan: 'free';
112
+ plan: 'free' | 'pro';
109
113
  };
110
114
  declare type WorkspaceMember = {
111
115
  userId: UserID;
112
116
  fullname: string;
117
+ /**
118
+ * @format email
119
+ */
113
120
  email: string;
114
121
  role: Role;
115
122
  };
@@ -119,7 +126,13 @@ declare type WorkspaceMember = {
119
126
  declare type InviteID = string;
120
127
  declare type WorkspaceInvite = {
121
128
  inviteId: InviteID;
129
+ /**
130
+ * @format email
131
+ */
122
132
  email: string;
133
+ /**
134
+ * @format date-time
135
+ */
123
136
  expires: string;
124
137
  role: Role;
125
138
  };
@@ -135,20 +148,36 @@ declare type InviteKey = string;
135
148
  * Metadata of databases
136
149
  */
137
150
  declare type DatabaseMetadata = {
151
+ /**
152
+ * The machine-readable name of a database
153
+ */
138
154
  name: string;
139
- displayName: string;
155
+ /**
156
+ * The time this database was created
157
+ */
140
158
  createdAt: DateTime;
159
+ /**
160
+ * The number of branches the database has
161
+ */
141
162
  numberOfBranches: number;
163
+ /**
164
+ * Metadata about the database for display in Xata user interfaces
165
+ */
142
166
  ui?: {
167
+ /**
168
+ * The user-selected color for this database across interfaces
169
+ */
143
170
  color?: string;
144
171
  };
145
172
  };
146
173
  declare type ListDatabasesResponse = {
174
+ /**
175
+ * A list of databases in a Xata workspace
176
+ */
147
177
  databases?: DatabaseMetadata[];
148
178
  };
149
179
  declare type ListBranchesResponse = {
150
180
  databaseName: string;
151
- displayName: string;
152
181
  branches: Branch[];
153
182
  };
154
183
  declare type ListGitBranchesResponse = {
@@ -166,8 +195,14 @@ declare type Branch = {
166
195
  * @x-go-type xata.BranchMetadata
167
196
  */
168
197
  declare type BranchMetadata = {
198
+ /**
199
+ * @minLength 1
200
+ */
169
201
  repository?: string;
170
202
  branch?: BranchName;
203
+ /**
204
+ * @minLength 1
205
+ */
171
206
  stage?: string;
172
207
  labels?: string[];
173
208
  };
@@ -194,12 +229,28 @@ declare type Schema = {
194
229
  tables: Table[];
195
230
  tablesOrder?: string[];
196
231
  };
232
+ /**
233
+ * @x-internal true
234
+ */
235
+ declare type SchemaEditScript = {
236
+ sourceMigrationID?: string;
237
+ targetMigrationID?: string;
238
+ tables: TableEdit[];
239
+ };
197
240
  declare type Table = {
198
241
  id?: string;
199
242
  name: TableName;
200
243
  columns: Column[];
201
244
  revLinks?: RevLink[];
202
245
  };
246
+ /**
247
+ * @x-internal true
248
+ */
249
+ declare type TableEdit = {
250
+ oldName?: string;
251
+ newName?: string;
252
+ columns?: MigrationColumnOp[];
253
+ };
203
254
  /**
204
255
  * @x-go-type xata.Column
205
256
  */
@@ -209,6 +260,8 @@ declare type Column = {
209
260
  link?: {
210
261
  table: string;
211
262
  };
263
+ notNull?: boolean;
264
+ unique?: boolean;
212
265
  columns?: Column[];
213
266
  };
214
267
  declare type RevLink = {
@@ -275,6 +328,137 @@ declare type ColumnMigration = {
275
328
  old: Column;
276
329
  ['new']: Column;
277
330
  };
331
+ /**
332
+ * @x-internal true
333
+ */
334
+ declare type Commit = {
335
+ meta?: {
336
+ title?: string;
337
+ message?: string;
338
+ id: string;
339
+ parentID?: string;
340
+ mergeParentID?: string;
341
+ status: string;
342
+ createdAt: DateTime;
343
+ modifiedAt?: DateTime;
344
+ };
345
+ operations: MigrationOp[];
346
+ };
347
+ /**
348
+ * Branch schema migration.
349
+ *
350
+ * @x-internal true
351
+ */
352
+ declare type Migration = {
353
+ parentID?: string;
354
+ operations: MigrationOp[];
355
+ };
356
+ /**
357
+ * Branch schema migration operations.
358
+ *
359
+ * @x-internal true
360
+ */
361
+ declare type MigrationOp = MigrationTableOp | MigrationColumnOp;
362
+ /**
363
+ * @x-internal true
364
+ */
365
+ declare type MigrationTableOp = {
366
+ addTable: TableOpAdd;
367
+ } | {
368
+ removeTable: TableOpRemove;
369
+ } | {
370
+ renameTable: TableOpRename;
371
+ };
372
+ /**
373
+ * @x-internal true
374
+ */
375
+ declare type MigrationColumnOp = {
376
+ addColumn: ColumnOpAdd;
377
+ } | {
378
+ removeColumn: ColumnOpRemove;
379
+ } | {
380
+ renameColumn: ColumnOpRename;
381
+ };
382
+ /**
383
+ * @x-internal true
384
+ */
385
+ declare type TableOpAdd = {
386
+ table: string;
387
+ };
388
+ /**
389
+ * @x-internal true
390
+ */
391
+ declare type TableOpRemove = {
392
+ table: string;
393
+ };
394
+ /**
395
+ * @x-internal true
396
+ */
397
+ declare type TableOpRename = {
398
+ oldName: string;
399
+ newName: string;
400
+ };
401
+ /**
402
+ * @x-internal true
403
+ */
404
+ declare type ColumnOpAdd = {
405
+ table?: string;
406
+ column: Column;
407
+ };
408
+ /**
409
+ * @x-internal true
410
+ */
411
+ declare type ColumnOpRemove = {
412
+ table?: string;
413
+ column: string;
414
+ };
415
+ /**
416
+ * @x-internal true
417
+ */
418
+ declare type ColumnOpRename = {
419
+ table?: string;
420
+ oldName: string;
421
+ newName: string;
422
+ };
423
+ declare type MigrationRequest = {
424
+ /**
425
+ * The migration request number.
426
+ */
427
+ number: number;
428
+ /**
429
+ * Migration request creation timestamp.
430
+ */
431
+ createdAt: DateTime;
432
+ /**
433
+ * Last modified timestamp.
434
+ */
435
+ modifiedAt?: DateTime;
436
+ /**
437
+ * Timestamp when the migration request was closed.
438
+ */
439
+ closedAt?: DateTime;
440
+ /**
441
+ * Timestamp when the migration request was merged.
442
+ */
443
+ mergedAt?: DateTime;
444
+ status: 'open' | 'closed' | 'merging' | 'merged';
445
+ /**
446
+ * The migration request title.
447
+ */
448
+ title: string;
449
+ /**
450
+ * The migration request body with detailed description.
451
+ */
452
+ body: string;
453
+ /**
454
+ * Name of the source branch.
455
+ */
456
+ source: string;
457
+ /**
458
+ * Name of the target branch.
459
+ */
460
+ target: string;
461
+ };
278
462
  declare type SortExpression = string[] | {
279
463
  [key: string]: SortOrder;
280
464
  } | {
@@ -283,7 +467,7 @@ declare type SortExpression = string[] | {
283
467
  declare type SortOrder = 'asc' | 'desc';
284
468
  /**
285
469
  * 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
470
+ * distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
287
471
  * 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
472
  * to allow two typos in a word.
289
473
  *
@@ -296,6 +480,23 @@ declare type FuzzinessExpression = number;
296
480
  * If the prefix type is set to "disabled" (the default), the search only matches full words. If the prefix type is set to "phrase", the search will return results that match prefixes of the search phrase.
297
481
  */
298
482
  declare type PrefixExpression = 'phrase' | 'disabled';
483
+ /**
484
+ * The target expression is used to filter the search results by the target columns.
485
+ */
486
+ declare type TargetExpression = (string | {
487
+ /**
488
+ * The name of the column.
489
+ */
490
+ column: string;
491
+ /**
492
+ * The weight of the column.
493
+ *
494
+ * @default 1
495
+ * @maximum 10
496
+ * @minimum 1
497
+ */
498
+ weight?: number;
499
+ })[];
299
500
  /**
300
501
  * @minProperties 1
301
502
  */
@@ -309,8 +510,215 @@ declare type FilterExpression = {
309
510
  } & {
310
511
  [key: string]: FilterColumn;
311
512
  };
513
+ /**
514
+ * The description of the summaries you wish to receive. Set each key to be the field name
515
+ * you'd like for the summary. These names must not collide with other columns you've
516
+ * requested from `columns`; including implicit requests like `settings.*`.
517
+ *
518
+ * The value for each key needs to be an object. This object should contain one key and one
519
+ * value only. In this object, the key should be set to the summary function you wish to use
520
+ * and the value set to the column name to be summarized.
521
+ *
522
+ * The column being summarized cannot be an internal column (id, xata.*), nor the base of
523
+ * an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
524
+ * `settings.dark_mode` but not `settings` nor `settings.*`.
525
+ *
526
+ * @example {"all_users":{"count":"*"}}
527
+ * @example {"total_created":{"count":"created_at"}}
528
+ * @x-go-type xbquery.SummaryList
529
+ */
530
+ declare type SummaryExpressionList = {
531
+ [key: string]: SummaryExpression;
532
+ };
533
+ /**
534
+ * A summary expression is the description of a single summary operation. It consists of a single
535
+ * key representing the operation, and a value representing the column to be operated on.
536
+ *
537
+ * The column being summarized cannot be an internal column (id, xata.*), nor the base of
538
+ * an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
539
+ * `settings.dark_mode` but not `settings` nor `settings.*`.
540
+ *
541
+ * We currently support the `count` operation. When using `count`, one can set a column name
542
+ * as the value. Xata will return the total number times this column is non-null in each group.
543
+ *
544
+ * Alternately, if you'd like to count the total rows in each group - irregardless of null/not null
545
+ * status - you can set `count` to `*` to count everything.
546
+ *
547
+ * @example {"count":"deleted_at"}
548
+ * @x-go-type xbquery.Summary
549
+ */
550
+ declare type SummaryExpression = Record<string, any>;
551
+ /**
552
+ * The description of the aggregations you wish to receive.
553
+ *
554
+ * @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d"},"aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}
555
+ */
556
+ declare type AggExpressionMap = {
557
+ [key: string]: AggExpression;
558
+ };
559
+ /**
560
+ * The description of a single aggregation operation. The key represents the
561
+ *
562
+ * @x-go-type xata.AggExpression
563
+ */
564
+ declare type AggExpression = {
565
+ count?: CountAgg;
566
+ } | {
567
+ sum?: SumAgg;
568
+ } | {
569
+ max?: MaxAgg;
570
+ } | {
571
+ min?: MinAgg;
572
+ } | {
573
+ average?: AverageAgg;
574
+ } | {
575
+ uniqueCount?: UniqueCountAgg;
576
+ } | {
577
+ dateHistogram?: DateHistogramAgg;
578
+ } | {
579
+ topValues?: TopValuesAgg;
580
+ } | {
581
+ numericHistogram?: NumericHistogramAgg;
582
+ };
583
+ /**
584
+ * Count the number of records with an optional filter.
585
+ */
586
+ declare type CountAgg = {
587
+ filter?: FilterExpression;
588
+ } | '*';
589
+ /**
590
+ * The sum of the numeric values in a particular column.
591
+ */
592
+ declare type SumAgg = {
593
+ /**
594
+ * The column on which to compute the sum. Must be a numeric type.
595
+ */
596
+ column: string;
597
+ };
598
+ /**
599
+ * The max of the numeric values in a particular column.
600
+ */
601
+ declare type MaxAgg = {
602
+ /**
603
+ * The column on which to compute the max. Must be a numeric type.
604
+ */
605
+ column: string;
606
+ };
607
+ /**
608
+ * The min of the numeric values in a particular column.
609
+ */
610
+ declare type MinAgg = {
611
+ /**
612
+ * The column on which to compute the min. Must be a numeric type.
613
+ */
614
+ column: string;
615
+ };
616
+ /**
617
+ * The average of the numeric values in a particular column.
618
+ */
619
+ declare type AverageAgg = {
620
+ /**
621
+ * The column on which to compute the average. Must be a numeric type.
622
+ */
623
+ column: string;
624
+ };
625
+ /**
626
+ * Count the number of distinct values in a particular column.
627
+ */
628
+ declare type UniqueCountAgg = {
629
+ /**
630
+ * The column from where to count the unique values.
631
+ */
632
+ column: string;
633
+ /**
634
+ * The threshold under which the unique count is exact. If the number of unique
635
+ * values in the column is higher than this threshold, the results are approximative.
636
+ * Maximum value is 40,000, default value is 3000.
637
+ */
638
+ precisionThreshold?: number;
639
+ };
640
+ /**
641
+ * Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
642
+ */
643
+ declare type DateHistogramAgg = {
644
+ /**
645
+ * The column to use for bucketing. Must be of type datetime.
646
+ */
647
+ column: string;
648
+ /**
649
+ * The fixed interval to use when bucketing.
650
+ * It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
651
+ *
652
+ * @pattern ^(\d+)(d|h|m|s|ms)$
653
+ */
654
+ interval?: string;
655
+ /**
656
+ * The calendar-aware interval to use when bucketing. Possible values are: `minute`,
657
+ * `hour`, `day`, `week`, `month`, `quarter`, `year`.
658
+ */
659
+ calendarInterval?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
660
+ /**
661
+ * The timezone to use for bucketing. By default, UTC is assumed.
662
+ * The accepted format is as an ISO 8601 UTC offset. For example: `+01:00` or
663
+ * `-08:00`.
664
+ *
665
+ * @pattern ^[+-][01]\d:[0-5]\d$
666
+ */
667
+ timezone?: string;
668
+ aggs?: AggExpressionMap;
669
+ };
670
+ /**
671
+ * Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
672
+ * The top values as ordered by the number of records (`$count``) are returned.
673
+ */
674
+ declare type TopValuesAgg = {
675
+ /**
676
+ * The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
677
+ */
678
+ column: string;
679
+ aggs?: AggExpressionMap;
680
+ /**
681
+ * The maximum number of unique values to return.
682
+ *
683
+ * @default 10
684
+ * @maximum 1000
685
+ */
686
+ size?: number;
687
+ };
688
+ /**
689
+ * Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
690
+ */
691
+ declare type NumericHistogramAgg = {
692
+ /**
693
+ * The column to use for bucketing. Must be of numeric type.
694
+ */
695
+ column: string;
696
+ /**
697
+ * The numeric interval to use for bucketing. The resulting buckets will be ranges
698
+ * with this value as size.
699
+ *
700
+ * @minimum 0
701
+ */
702
+ interval: number;
703
+ /**
704
+ * By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
705
+ * boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
706
+ * but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
707
+ * to 50.
708
+ *
709
+ * @default 0
710
+ */
711
+ offset?: number;
712
+ aggs?: AggExpressionMap;
713
+ };
312
714
  declare type HighlightExpression = {
715
+ /**
716
+ * Set to `false` to disable highlighting. By default it is `true`.
717
+ */
313
718
  enabled?: boolean;
719
+ /**
720
+ * Set to `false` to disable HTML encoding in highlight snippets. By default it is `true`.
721
+ */
314
722
  encodeHTML?: boolean;
315
723
  };
316
724
  /**
@@ -329,15 +737,30 @@ declare type BoosterExpression = {
329
737
  * Boost records with a particular value for a column.
330
738
  */
331
739
  declare type ValueBooster$1 = {
740
+ /**
741
+ * The column in which to look for the value.
742
+ */
332
743
  column: string;
744
+ /**
745
+ * The exact value to boost.
746
+ */
333
747
  value: string | number | boolean;
748
+ /**
749
+ * The factor with which to multiply the score of the record.
750
+ */
334
751
  factor: number;
335
752
  };
336
753
  /**
337
754
  * Boost records based on the value of a numeric column.
338
755
  */
339
756
  declare type NumericBooster$1 = {
757
+ /**
758
+ * The column in which to look for the value.
759
+ */
340
760
  column: string;
761
+ /**
762
+ * The factor with which to multiply the value of the column before adding it to the item score.
763
+ */
341
764
  factor: number;
342
765
  };
343
766
  /**
@@ -346,9 +769,24 @@ declare type NumericBooster$1 = {
346
769
  * 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
770
  */
348
771
  declare type DateBooster$1 = {
772
+ /**
773
+ * The column in which to look for the value.
774
+ */
349
775
  column: string;
776
+ /**
777
+ * 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.
778
+ * If it is not specified, the current date and time is used.
779
+ */
350
780
  origin?: string;
781
+ /**
782
+ * 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`.
783
+ *
784
+ * @pattern ^(\d+)(d|h|m|s|ms)$
785
+ */
351
786
  scale: string;
787
+ /**
788
+ * The decay factor to expect at "scale" distance from the "origin".
789
+ */
352
790
  decay: number;
353
791
  };
354
792
  declare type FilterList = FilterExpression | FilterExpression[];
@@ -400,13 +838,40 @@ declare type FilterValue = number | string | boolean;
400
838
  * Pagination settings.
401
839
  */
402
840
  declare type PageConfig = {
841
+ /**
842
+ * Query the next page that follow the cursor.
843
+ */
403
844
  after?: string;
845
+ /**
846
+ * Query the previous page before the cursor.
847
+ */
404
848
  before?: string;
849
+ /**
850
+ * Query the first page from the cursor.
851
+ */
405
852
  first?: string;
853
+ /**
854
+ * Query the last page from the cursor.
855
+ */
406
856
  last?: string;
857
+ /**
858
+ * 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.
859
+ *
860
+ * @default 20
861
+ */
407
862
  size?: number;
863
+ /**
864
+ * Use offset to skip entries. To skip pages set offset to a multiple of size.
865
+ *
866
+ * @default 0
867
+ */
408
868
  offset?: number;
409
869
  };
870
+ /**
871
+ * @example name
872
+ * @example email
873
+ * @example created_at
874
+ */
410
875
  declare type ColumnsProjection = string[];
411
876
  /**
412
877
  * Xata Table Record Metadata
@@ -414,14 +879,29 @@ declare type ColumnsProjection = string[];
414
879
  declare type RecordMeta = {
415
880
  id: RecordID;
416
881
  xata: {
882
+ /**
883
+ * The record's version. Can be used for optimistic concurrency control.
884
+ */
417
885
  version: number;
886
+ /**
887
+ * The record's table name. APIs that return records from multiple tables will set this field accordingly.
888
+ */
418
889
  table?: string;
890
+ /**
891
+ * Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
892
+ */
419
893
  highlight?: {
420
894
  [key: string]: string[] | {
421
895
  [key: string]: any;
422
896
  };
423
897
  };
898
+ /**
899
+ * The record's relevancy score. This is returned by the search APIs.
900
+ */
424
901
  score?: number;
902
+ /**
903
+ * Encoding/Decoding errors
904
+ */
425
905
  warnings?: string[];
426
906
  };
427
907
  };
@@ -433,7 +913,13 @@ declare type RecordID = string;
433
913
  * @example {"newName":"newName","oldName":"oldName"}
434
914
  */
435
915
  declare type TableRename = {
916
+ /**
917
+ * @minLength 1
918
+ */
436
919
  newName: string;
920
+ /**
921
+ * @minLength 1
922
+ */
437
923
  oldName: string;
438
924
  };
439
925
  /**
@@ -441,10 +927,23 @@ declare type TableRename = {
441
927
  */
442
928
  declare type RecordsMetadata = {
443
929
  page: {
930
+ /**
931
+ * last record id
932
+ */
444
933
  cursor: string;
934
+ /**
935
+ * true if more records can be fetch
936
+ */
445
937
  more: boolean;
446
938
  };
447
939
  };
940
+ declare type AggResponse$1 = number | {
941
+ values?: {
942
+ $key?: string | number;
943
+ $count?: number;
944
+ additionalProperties?: AggResponse$1;
945
+ }[];
946
+ };
448
947
  /**
449
948
  * Xata Table Record Metadata
450
949
  */
@@ -475,7 +974,9 @@ type schemas_BranchMetadata = BranchMetadata;
475
974
  type schemas_DBBranch = DBBranch;
476
975
  type schemas_StartedFromMetadata = StartedFromMetadata;
477
976
  type schemas_Schema = Schema;
977
+ type schemas_SchemaEditScript = SchemaEditScript;
478
978
  type schemas_Table = Table;
979
+ type schemas_TableEdit = TableEdit;
479
980
  type schemas_Column = Column;
480
981
  type schemas_RevLink = RevLink;
481
982
  type schemas_BranchName = BranchName;
@@ -488,11 +989,37 @@ type schemas_MetricsLatency = MetricsLatency;
488
989
  type schemas_BranchMigration = BranchMigration;
489
990
  type schemas_TableMigration = TableMigration;
490
991
  type schemas_ColumnMigration = ColumnMigration;
992
+ type schemas_Commit = Commit;
993
+ type schemas_Migration = Migration;
994
+ type schemas_MigrationOp = MigrationOp;
995
+ type schemas_MigrationTableOp = MigrationTableOp;
996
+ type schemas_MigrationColumnOp = MigrationColumnOp;
997
+ type schemas_TableOpAdd = TableOpAdd;
998
+ type schemas_TableOpRemove = TableOpRemove;
999
+ type schemas_TableOpRename = TableOpRename;
1000
+ type schemas_ColumnOpAdd = ColumnOpAdd;
1001
+ type schemas_ColumnOpRemove = ColumnOpRemove;
1002
+ type schemas_ColumnOpRename = ColumnOpRename;
1003
+ type schemas_MigrationRequest = MigrationRequest;
491
1004
  type schemas_SortExpression = SortExpression;
492
1005
  type schemas_SortOrder = SortOrder;
493
1006
  type schemas_FuzzinessExpression = FuzzinessExpression;
494
1007
  type schemas_PrefixExpression = PrefixExpression;
1008
+ type schemas_TargetExpression = TargetExpression;
495
1009
  type schemas_FilterExpression = FilterExpression;
1010
+ type schemas_SummaryExpressionList = SummaryExpressionList;
1011
+ type schemas_SummaryExpression = SummaryExpression;
1012
+ type schemas_AggExpressionMap = AggExpressionMap;
1013
+ type schemas_AggExpression = AggExpression;
1014
+ type schemas_CountAgg = CountAgg;
1015
+ type schemas_SumAgg = SumAgg;
1016
+ type schemas_MaxAgg = MaxAgg;
1017
+ type schemas_MinAgg = MinAgg;
1018
+ type schemas_AverageAgg = AverageAgg;
1019
+ type schemas_UniqueCountAgg = UniqueCountAgg;
1020
+ type schemas_DateHistogramAgg = DateHistogramAgg;
1021
+ type schemas_TopValuesAgg = TopValuesAgg;
1022
+ type schemas_NumericHistogramAgg = NumericHistogramAgg;
496
1023
  type schemas_HighlightExpression = HighlightExpression;
497
1024
  type schemas_BoosterExpression = BoosterExpression;
498
1025
  type schemas_FilterList = FilterList;
@@ -534,7 +1061,9 @@ declare namespace schemas {
534
1061
  schemas_DBBranch as DBBranch,
535
1062
  schemas_StartedFromMetadata as StartedFromMetadata,
536
1063
  schemas_Schema as Schema,
1064
+ schemas_SchemaEditScript as SchemaEditScript,
537
1065
  schemas_Table as Table,
1066
+ schemas_TableEdit as TableEdit,
538
1067
  schemas_Column as Column,
539
1068
  schemas_RevLink as RevLink,
540
1069
  schemas_BranchName as BranchName,
@@ -547,11 +1076,37 @@ declare namespace schemas {
547
1076
  schemas_BranchMigration as BranchMigration,
548
1077
  schemas_TableMigration as TableMigration,
549
1078
  schemas_ColumnMigration as ColumnMigration,
1079
+ schemas_Commit as Commit,
1080
+ schemas_Migration as Migration,
1081
+ schemas_MigrationOp as MigrationOp,
1082
+ schemas_MigrationTableOp as MigrationTableOp,
1083
+ schemas_MigrationColumnOp as MigrationColumnOp,
1084
+ schemas_TableOpAdd as TableOpAdd,
1085
+ schemas_TableOpRemove as TableOpRemove,
1086
+ schemas_TableOpRename as TableOpRename,
1087
+ schemas_ColumnOpAdd as ColumnOpAdd,
1088
+ schemas_ColumnOpRemove as ColumnOpRemove,
1089
+ schemas_ColumnOpRename as ColumnOpRename,
1090
+ schemas_MigrationRequest as MigrationRequest,
550
1091
  schemas_SortExpression as SortExpression,
551
1092
  schemas_SortOrder as SortOrder,
552
1093
  schemas_FuzzinessExpression as FuzzinessExpression,
553
1094
  schemas_PrefixExpression as PrefixExpression,
1095
+ schemas_TargetExpression as TargetExpression,
554
1096
  schemas_FilterExpression as FilterExpression,
1097
+ schemas_SummaryExpressionList as SummaryExpressionList,
1098
+ schemas_SummaryExpression as SummaryExpression,
1099
+ schemas_AggExpressionMap as AggExpressionMap,
1100
+ schemas_AggExpression as AggExpression,
1101
+ schemas_CountAgg as CountAgg,
1102
+ schemas_SumAgg as SumAgg,
1103
+ schemas_MaxAgg as MaxAgg,
1104
+ schemas_MinAgg as MinAgg,
1105
+ schemas_AverageAgg as AverageAgg,
1106
+ schemas_UniqueCountAgg as UniqueCountAgg,
1107
+ schemas_DateHistogramAgg as DateHistogramAgg,
1108
+ schemas_TopValuesAgg as TopValuesAgg,
1109
+ schemas_NumericHistogramAgg as NumericHistogramAgg,
555
1110
  schemas_HighlightExpression as HighlightExpression,
556
1111
  schemas_BoosterExpression as BoosterExpression,
557
1112
  ValueBooster$1 as ValueBooster,
@@ -571,6 +1126,7 @@ declare namespace schemas {
571
1126
  schemas_RecordID as RecordID,
572
1127
  schemas_TableRename as TableRename,
573
1128
  schemas_RecordsMetadata as RecordsMetadata,
1129
+ AggResponse$1 as AggResponse,
574
1130
  XataRecord$1 as XataRecord,
575
1131
  };
576
1132
  }
@@ -612,6 +1168,11 @@ declare type BranchMigrationPlan = {
612
1168
  migration: BranchMigration;
613
1169
  };
614
1170
  declare type RecordResponse = XataRecord$1;
1171
+ declare type SchemaCompareResponse = {
1172
+ source: Schema;
1173
+ target: Schema;
1174
+ edits: SchemaEditScript;
1175
+ };
615
1176
  declare type RecordUpdateResponse = XataRecord$1 | {
616
1177
  id: string;
617
1178
  xata: {
@@ -622,13 +1183,28 @@ declare type QueryResponse = {
622
1183
  records: XataRecord$1[];
623
1184
  meta: RecordsMetadata;
624
1185
  };
625
- declare type SearchResponse = {
626
- records: XataRecord$1[];
1186
+ declare type SummarizeResponse = {
1187
+ summaries: Record<string, any>[];
627
1188
  };
628
1189
  /**
629
- * @example {"migrationID":"mig_c7m19ilcefoebpqj12p0"}
1190
+ * @example {"aggs":{"dailyUniqueUsers":{"values":[{"key":"2022-02-22T22:22:22","uniqueUsers":134},{"key":"2022-02-23T22:22:22","uniqueUsers":90}]}}}
630
1191
  */
631
- declare type MigrationIdResponse = {
1192
+ declare type AggResponse = {
1193
+ aggs?: {
1194
+ [key: string]: AggResponse$1;
1195
+ };
1196
+ };
1197
+ declare type SearchResponse = {
1198
+ records: XataRecord$1[];
1199
+ warning?: string;
1200
+ };
1201
+ /**
1202
+ * @example {"migrationID":"mig_c7m19ilcefoebpqj12p0"}
1203
+ */
1204
+ declare type MigrationIdResponse = {
1205
+ /**
1206
+ * @minLength 1
1207
+ */
632
1208
  migrationID: string;
633
1209
  };
634
1210
 
@@ -639,8 +1215,11 @@ type responses_BulkError = BulkError;
639
1215
  type responses_BulkInsertResponse = BulkInsertResponse;
640
1216
  type responses_BranchMigrationPlan = BranchMigrationPlan;
641
1217
  type responses_RecordResponse = RecordResponse;
1218
+ type responses_SchemaCompareResponse = SchemaCompareResponse;
642
1219
  type responses_RecordUpdateResponse = RecordUpdateResponse;
643
1220
  type responses_QueryResponse = QueryResponse;
1221
+ type responses_SummarizeResponse = SummarizeResponse;
1222
+ type responses_AggResponse = AggResponse;
644
1223
  type responses_SearchResponse = SearchResponse;
645
1224
  type responses_MigrationIdResponse = MigrationIdResponse;
646
1225
  declare namespace responses {
@@ -652,8 +1231,11 @@ declare namespace responses {
652
1231
  responses_BulkInsertResponse as BulkInsertResponse,
653
1232
  responses_BranchMigrationPlan as BranchMigrationPlan,
654
1233
  responses_RecordResponse as RecordResponse,
1234
+ responses_SchemaCompareResponse as SchemaCompareResponse,
655
1235
  responses_RecordUpdateResponse as RecordUpdateResponse,
656
1236
  responses_QueryResponse as QueryResponse,
1237
+ responses_SummarizeResponse as SummarizeResponse,
1238
+ responses_AggResponse as AggResponse,
657
1239
  responses_SearchResponse as SearchResponse,
658
1240
  responses_MigrationIdResponse as MigrationIdResponse,
659
1241
  };
@@ -679,7 +1261,7 @@ declare type GetUserVariables = FetcherExtraProps;
679
1261
  /**
680
1262
  * Return details of the user making the request
681
1263
  */
682
- declare const getUser: (variables: GetUserVariables) => Promise<UserWithID>;
1264
+ declare const getUser: (variables: GetUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
683
1265
  declare type UpdateUserError = ErrorWrapper<{
684
1266
  status: 400;
685
1267
  payload: BadRequestError;
@@ -696,7 +1278,7 @@ declare type UpdateUserVariables = {
696
1278
  /**
697
1279
  * Update user info
698
1280
  */
699
- declare const updateUser: (variables: UpdateUserVariables) => Promise<UserWithID>;
1281
+ declare const updateUser: (variables: UpdateUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
700
1282
  declare type DeleteUserError = ErrorWrapper<{
701
1283
  status: 400;
702
1284
  payload: BadRequestError;
@@ -711,7 +1293,7 @@ declare type DeleteUserVariables = FetcherExtraProps;
711
1293
  /**
712
1294
  * Delete the user making the request
713
1295
  */
714
- declare const deleteUser: (variables: DeleteUserVariables) => Promise<undefined>;
1296
+ declare const deleteUser: (variables: DeleteUserVariables, signal?: AbortSignal) => Promise<undefined>;
715
1297
  declare type GetUserAPIKeysError = ErrorWrapper<{
716
1298
  status: 400;
717
1299
  payload: BadRequestError;
@@ -732,8 +1314,11 @@ declare type GetUserAPIKeysVariables = FetcherExtraProps;
732
1314
  /**
733
1315
  * Retrieve a list of existing user API keys
734
1316
  */
735
- declare const getUserAPIKeys: (variables: GetUserAPIKeysVariables) => Promise<GetUserAPIKeysResponse>;
1317
+ declare const getUserAPIKeys: (variables: GetUserAPIKeysVariables, signal?: AbortSignal) => Promise<GetUserAPIKeysResponse>;
736
1318
  declare type CreateUserAPIKeyPathParams = {
1319
+ /**
1320
+ * API Key name
1321
+ */
737
1322
  keyName: APIKeyName;
738
1323
  };
739
1324
  declare type CreateUserAPIKeyError = ErrorWrapper<{
@@ -757,8 +1342,11 @@ declare type CreateUserAPIKeyVariables = {
757
1342
  /**
758
1343
  * Create and return new API key
759
1344
  */
760
- declare const createUserAPIKey: (variables: CreateUserAPIKeyVariables) => Promise<CreateUserAPIKeyResponse>;
1345
+ declare const createUserAPIKey: (variables: CreateUserAPIKeyVariables, signal?: AbortSignal) => Promise<CreateUserAPIKeyResponse>;
761
1346
  declare type DeleteUserAPIKeyPathParams = {
1347
+ /**
1348
+ * API Key name
1349
+ */
762
1350
  keyName: APIKeyName;
763
1351
  };
764
1352
  declare type DeleteUserAPIKeyError = ErrorWrapper<{
@@ -777,7 +1365,7 @@ declare type DeleteUserAPIKeyVariables = {
777
1365
  /**
778
1366
  * Delete an existing API key
779
1367
  */
780
- declare const deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables) => Promise<undefined>;
1368
+ declare const deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
781
1369
  declare type CreateWorkspaceError = ErrorWrapper<{
782
1370
  status: 400;
783
1371
  payload: BadRequestError;
@@ -794,7 +1382,7 @@ declare type CreateWorkspaceVariables = {
794
1382
  /**
795
1383
  * Creates a new workspace with the user requesting it as its single owner.
796
1384
  */
797
- declare const createWorkspace: (variables: CreateWorkspaceVariables) => Promise<Workspace>;
1385
+ declare const createWorkspace: (variables: CreateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
798
1386
  declare type GetWorkspacesListError = ErrorWrapper<{
799
1387
  status: 400;
800
1388
  payload: BadRequestError;
@@ -817,8 +1405,11 @@ declare type GetWorkspacesListVariables = FetcherExtraProps;
817
1405
  /**
818
1406
  * Retrieve the list of workspaces the user belongs to
819
1407
  */
820
- declare const getWorkspacesList: (variables: GetWorkspacesListVariables) => Promise<GetWorkspacesListResponse>;
1408
+ declare const getWorkspacesList: (variables: GetWorkspacesListVariables, signal?: AbortSignal) => Promise<GetWorkspacesListResponse>;
821
1409
  declare type GetWorkspacePathParams = {
1410
+ /**
1411
+ * Workspace ID
1412
+ */
822
1413
  workspaceId: WorkspaceID;
823
1414
  };
824
1415
  declare type GetWorkspaceError = ErrorWrapper<{
@@ -837,8 +1428,11 @@ declare type GetWorkspaceVariables = {
837
1428
  /**
838
1429
  * Retrieve workspace info from a workspace ID
839
1430
  */
840
- declare const getWorkspace: (variables: GetWorkspaceVariables) => Promise<Workspace>;
1431
+ declare const getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
841
1432
  declare type UpdateWorkspacePathParams = {
1433
+ /**
1434
+ * Workspace ID
1435
+ */
842
1436
  workspaceId: WorkspaceID;
843
1437
  };
844
1438
  declare type UpdateWorkspaceError = ErrorWrapper<{
@@ -858,8 +1452,11 @@ declare type UpdateWorkspaceVariables = {
858
1452
  /**
859
1453
  * Update workspace info
860
1454
  */
861
- declare const updateWorkspace: (variables: UpdateWorkspaceVariables) => Promise<Workspace>;
1455
+ declare const updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
862
1456
  declare type DeleteWorkspacePathParams = {
1457
+ /**
1458
+ * Workspace ID
1459
+ */
863
1460
  workspaceId: WorkspaceID;
864
1461
  };
865
1462
  declare type DeleteWorkspaceError = ErrorWrapper<{
@@ -878,8 +1475,11 @@ declare type DeleteWorkspaceVariables = {
878
1475
  /**
879
1476
  * Delete the workspace with the provided ID
880
1477
  */
881
- declare const deleteWorkspace: (variables: DeleteWorkspaceVariables) => Promise<undefined>;
1478
+ declare const deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
882
1479
  declare type GetWorkspaceMembersListPathParams = {
1480
+ /**
1481
+ * Workspace ID
1482
+ */
883
1483
  workspaceId: WorkspaceID;
884
1484
  };
885
1485
  declare type GetWorkspaceMembersListError = ErrorWrapper<{
@@ -898,9 +1498,15 @@ declare type GetWorkspaceMembersListVariables = {
898
1498
  /**
899
1499
  * Retrieve the list of members of the given workspace
900
1500
  */
901
- declare const getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables) => Promise<WorkspaceMembers>;
1501
+ declare const getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal) => Promise<WorkspaceMembers>;
902
1502
  declare type UpdateWorkspaceMemberRolePathParams = {
1503
+ /**
1504
+ * Workspace ID
1505
+ */
903
1506
  workspaceId: WorkspaceID;
1507
+ /**
1508
+ * UserID
1509
+ */
904
1510
  userId: UserID;
905
1511
  };
906
1512
  declare type UpdateWorkspaceMemberRoleError = ErrorWrapper<{
@@ -923,9 +1529,15 @@ declare type UpdateWorkspaceMemberRoleVariables = {
923
1529
  /**
924
1530
  * Update a workspace member role. Workspaces must always have at least one owner, so this operation will fail if trying to remove owner role from the last owner in the workspace.
925
1531
  */
926
- declare const updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables) => Promise<undefined>;
1532
+ declare const updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal) => Promise<undefined>;
927
1533
  declare type RemoveWorkspaceMemberPathParams = {
1534
+ /**
1535
+ * Workspace ID
1536
+ */
928
1537
  workspaceId: WorkspaceID;
1538
+ /**
1539
+ * UserID
1540
+ */
929
1541
  userId: UserID;
930
1542
  };
931
1543
  declare type RemoveWorkspaceMemberError = ErrorWrapper<{
@@ -944,8 +1556,11 @@ declare type RemoveWorkspaceMemberVariables = {
944
1556
  /**
945
1557
  * Remove the member from the workspace
946
1558
  */
947
- declare const removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables) => Promise<undefined>;
1559
+ declare const removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal) => Promise<undefined>;
948
1560
  declare type InviteWorkspaceMemberPathParams = {
1561
+ /**
1562
+ * Workspace ID
1563
+ */
949
1564
  workspaceId: WorkspaceID;
950
1565
  };
951
1566
  declare type InviteWorkspaceMemberError = ErrorWrapper<{
@@ -962,6 +1577,9 @@ declare type InviteWorkspaceMemberError = ErrorWrapper<{
962
1577
  payload: SimpleError;
963
1578
  }>;
964
1579
  declare type InviteWorkspaceMemberRequestBody = {
1580
+ /**
1581
+ * @format email
1582
+ */
965
1583
  email: string;
966
1584
  role: Role;
967
1585
  };
@@ -972,9 +1590,15 @@ declare type InviteWorkspaceMemberVariables = {
972
1590
  /**
973
1591
  * Invite some user to join the workspace with the given role
974
1592
  */
975
- declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<WorkspaceInvite>;
1593
+ declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
976
1594
  declare type UpdateWorkspaceMemberInvitePathParams = {
1595
+ /**
1596
+ * Workspace ID
1597
+ */
977
1598
  workspaceId: WorkspaceID;
1599
+ /**
1600
+ * Invite identifier
1601
+ */
978
1602
  inviteId: InviteID;
979
1603
  };
980
1604
  declare type UpdateWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1000,9 +1624,15 @@ declare type UpdateWorkspaceMemberInviteVariables = {
1000
1624
  /**
1001
1625
  * This operation provides a way to update an existing invite. Updates are performed in-place; they do not change the invite link, the expiry time, nor do they re-notify the recipient of the invite.
1002
1626
  */
1003
- declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
1627
+ declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
1004
1628
  declare type CancelWorkspaceMemberInvitePathParams = {
1629
+ /**
1630
+ * Workspace ID
1631
+ */
1005
1632
  workspaceId: WorkspaceID;
1633
+ /**
1634
+ * Invite identifier
1635
+ */
1006
1636
  inviteId: InviteID;
1007
1637
  };
1008
1638
  declare type CancelWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1021,9 +1651,15 @@ declare type CancelWorkspaceMemberInviteVariables = {
1021
1651
  /**
1022
1652
  * This operation provides a way to cancel invites by deleting them. Already accepted invites cannot be deleted.
1023
1653
  */
1024
- declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>;
1654
+ declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
1025
1655
  declare type ResendWorkspaceMemberInvitePathParams = {
1656
+ /**
1657
+ * Workspace ID
1658
+ */
1026
1659
  workspaceId: WorkspaceID;
1660
+ /**
1661
+ * Invite identifier
1662
+ */
1027
1663
  inviteId: InviteID;
1028
1664
  };
1029
1665
  declare type ResendWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1042,9 +1678,15 @@ declare type ResendWorkspaceMemberInviteVariables = {
1042
1678
  /**
1043
1679
  * This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted.
1044
1680
  */
1045
- declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>;
1681
+ declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
1046
1682
  declare type AcceptWorkspaceMemberInvitePathParams = {
1683
+ /**
1684
+ * Workspace ID
1685
+ */
1047
1686
  workspaceId: WorkspaceID;
1687
+ /**
1688
+ * Invite Key (secret) for the invited user
1689
+ */
1048
1690
  inviteKey: InviteKey;
1049
1691
  };
1050
1692
  declare type AcceptWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1063,7 +1705,7 @@ declare type AcceptWorkspaceMemberInviteVariables = {
1063
1705
  /**
1064
1706
  * Accept the invitation to join a workspace. If the operation succeeds the user will be a member of the workspace
1065
1707
  */
1066
- declare const acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables) => Promise<undefined>;
1708
+ declare const acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
1067
1709
  declare type GetDatabaseListPathParams = {
1068
1710
  workspace: string;
1069
1711
  };
@@ -1080,8 +1722,11 @@ declare type GetDatabaseListVariables = {
1080
1722
  /**
1081
1723
  * List all databases available in your Workspace.
1082
1724
  */
1083
- declare const getDatabaseList: (variables: GetDatabaseListVariables) => Promise<ListDatabasesResponse>;
1725
+ declare const getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal) => Promise<ListDatabasesResponse>;
1084
1726
  declare type GetBranchListPathParams = {
1727
+ /**
1728
+ * The Database Name
1729
+ */
1085
1730
  dbName: DBName;
1086
1731
  workspace: string;
1087
1732
  };
@@ -1101,8 +1746,11 @@ declare type GetBranchListVariables = {
1101
1746
  /**
1102
1747
  * List all available Branches
1103
1748
  */
1104
- declare const getBranchList: (variables: GetBranchListVariables) => Promise<ListBranchesResponse>;
1749
+ declare const getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
1105
1750
  declare type CreateDatabasePathParams = {
1751
+ /**
1752
+ * The Database Name
1753
+ */
1106
1754
  dbName: DBName;
1107
1755
  workspace: string;
1108
1756
  };
@@ -1114,11 +1762,16 @@ declare type CreateDatabaseError = ErrorWrapper<{
1114
1762
  payload: AuthError;
1115
1763
  }>;
1116
1764
  declare type CreateDatabaseResponse = {
1765
+ /**
1766
+ * @minLength 1
1767
+ */
1117
1768
  databaseName: string;
1118
1769
  branchName?: string;
1119
1770
  };
1120
1771
  declare type CreateDatabaseRequestBody = {
1121
- displayName?: string;
1772
+ /**
1773
+ * @minLength 1
1774
+ */
1122
1775
  branchName?: string;
1123
1776
  ui?: {
1124
1777
  color?: string;
@@ -1132,8 +1785,11 @@ declare type CreateDatabaseVariables = {
1132
1785
  /**
1133
1786
  * Create Database with identifier name
1134
1787
  */
1135
- declare const createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
1788
+ declare const createDatabase: (variables: CreateDatabaseVariables, signal?: AbortSignal) => Promise<CreateDatabaseResponse>;
1136
1789
  declare type DeleteDatabasePathParams = {
1790
+ /**
1791
+ * The Database Name
1792
+ */
1137
1793
  dbName: DBName;
1138
1794
  workspace: string;
1139
1795
  };
@@ -1153,8 +1809,11 @@ declare type DeleteDatabaseVariables = {
1153
1809
  /**
1154
1810
  * Delete a database and all of its branches and tables permanently.
1155
1811
  */
1156
- declare const deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
1812
+ declare const deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal) => Promise<undefined>;
1157
1813
  declare type GetDatabaseMetadataPathParams = {
1814
+ /**
1815
+ * The Database Name
1816
+ */
1158
1817
  dbName: DBName;
1159
1818
  workspace: string;
1160
1819
  };
@@ -1174,8 +1833,44 @@ declare type GetDatabaseMetadataVariables = {
1174
1833
  /**
1175
1834
  * Retrieve metadata of the given database
1176
1835
  */
1177
- declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
1836
+ declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
1837
+ declare type UpdateDatabaseMetadataPathParams = {
1838
+ /**
1839
+ * The Database Name
1840
+ */
1841
+ dbName: DBName;
1842
+ workspace: string;
1843
+ };
1844
+ declare type UpdateDatabaseMetadataError = ErrorWrapper<{
1845
+ status: 400;
1846
+ payload: BadRequestError;
1847
+ } | {
1848
+ status: 401;
1849
+ payload: AuthError;
1850
+ } | {
1851
+ status: 404;
1852
+ payload: SimpleError;
1853
+ }>;
1854
+ declare type UpdateDatabaseMetadataRequestBody = {
1855
+ ui?: {
1856
+ /**
1857
+ * @minLength 1
1858
+ */
1859
+ color?: string;
1860
+ };
1861
+ };
1862
+ declare type UpdateDatabaseMetadataVariables = {
1863
+ body?: UpdateDatabaseMetadataRequestBody;
1864
+ pathParams: UpdateDatabaseMetadataPathParams;
1865
+ } & FetcherExtraProps;
1866
+ /**
1867
+ * Update the color of the selected database
1868
+ */
1869
+ declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
1178
1870
  declare type GetGitBranchesMappingPathParams = {
1871
+ /**
1872
+ * The Database Name
1873
+ */
1179
1874
  dbName: DBName;
1180
1875
  workspace: string;
1181
1876
  };
@@ -1213,8 +1908,11 @@ declare type GetGitBranchesMappingVariables = {
1213
1908
  * }
1214
1909
  * ```
1215
1910
  */
1216
- declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
1911
+ declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables, signal?: AbortSignal) => Promise<ListGitBranchesResponse>;
1217
1912
  declare type AddGitBranchesEntryPathParams = {
1913
+ /**
1914
+ * The Database Name
1915
+ */
1218
1916
  dbName: DBName;
1219
1917
  workspace: string;
1220
1918
  };
@@ -1226,10 +1924,19 @@ declare type AddGitBranchesEntryError = ErrorWrapper<{
1226
1924
  payload: AuthError;
1227
1925
  }>;
1228
1926
  declare type AddGitBranchesEntryResponse = {
1927
+ /**
1928
+ * Warning message
1929
+ */
1229
1930
  warning?: string;
1230
1931
  };
1231
1932
  declare type AddGitBranchesEntryRequestBody = {
1933
+ /**
1934
+ * The name of the Git branch.
1935
+ */
1232
1936
  gitBranch: string;
1937
+ /**
1938
+ * The name of the Xata branch.
1939
+ */
1233
1940
  xataBranch: BranchName;
1234
1941
  };
1235
1942
  declare type AddGitBranchesEntryVariables = {
@@ -1251,12 +1958,18 @@ declare type AddGitBranchesEntryVariables = {
1251
1958
  * }
1252
1959
  * ```
1253
1960
  */
1254
- declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
1961
+ declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables, signal?: AbortSignal) => Promise<AddGitBranchesEntryResponse>;
1255
1962
  declare type RemoveGitBranchesEntryPathParams = {
1963
+ /**
1964
+ * The Database Name
1965
+ */
1256
1966
  dbName: DBName;
1257
1967
  workspace: string;
1258
1968
  };
1259
1969
  declare type RemoveGitBranchesEntryQueryParams = {
1970
+ /**
1971
+ * The Git Branch to remove from the mapping
1972
+ */
1260
1973
  gitBranch: string;
1261
1974
  };
1262
1975
  declare type RemoveGitBranchesEntryError = ErrorWrapper<{
@@ -1279,13 +1992,22 @@ declare type RemoveGitBranchesEntryVariables = {
1279
1992
  * // DELETE https://tutorial-ng7s8c.xata.sh/dbs/demo/gitBranches?gitBranch=fix%2Fbug123
1280
1993
  * ```
1281
1994
  */
1282
- declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
1995
+ declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal) => Promise<undefined>;
1283
1996
  declare type ResolveBranchPathParams = {
1997
+ /**
1998
+ * The Database Name
1999
+ */
1284
2000
  dbName: DBName;
1285
2001
  workspace: string;
1286
2002
  };
1287
2003
  declare type ResolveBranchQueryParams = {
2004
+ /**
2005
+ * The Git Branch
2006
+ */
1288
2007
  gitBranch?: string;
2008
+ /**
2009
+ * Default branch to fallback to
2010
+ */
1289
2011
  fallbackBranch?: string;
1290
2012
  };
1291
2013
  declare type ResolveBranchError = ErrorWrapper<{
@@ -1331,8 +2053,286 @@ declare type ResolveBranchVariables = {
1331
2053
  * }
1332
2054
  * ```
1333
2055
  */
1334
- declare const resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
2056
+ declare const resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal) => Promise<ResolveBranchResponse>;
2057
+ declare type QueryMigrationRequestsPathParams = {
2058
+ /**
2059
+ * The Database Name
2060
+ */
2061
+ dbName: DBName;
2062
+ workspace: string;
2063
+ };
2064
+ declare type QueryMigrationRequestsError = ErrorWrapper<{
2065
+ status: 400;
2066
+ payload: BadRequestError;
2067
+ } | {
2068
+ status: 401;
2069
+ payload: AuthError;
2070
+ } | {
2071
+ status: 404;
2072
+ payload: SimpleError;
2073
+ }>;
2074
+ declare type QueryMigrationRequestsResponse = {
2075
+ migrationRequests: MigrationRequest[];
2076
+ meta: RecordsMetadata;
2077
+ };
2078
+ declare type QueryMigrationRequestsRequestBody = {
2079
+ filter?: FilterExpression;
2080
+ sort?: SortExpression;
2081
+ page?: PageConfig;
2082
+ columns?: ColumnsProjection;
2083
+ };
2084
+ declare type QueryMigrationRequestsVariables = {
2085
+ body?: QueryMigrationRequestsRequestBody;
2086
+ pathParams: QueryMigrationRequestsPathParams;
2087
+ } & FetcherExtraProps;
2088
+ declare const queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal) => Promise<QueryMigrationRequestsResponse>;
2089
+ declare type CreateMigrationRequestPathParams = {
2090
+ /**
2091
+ * The Database Name
2092
+ */
2093
+ dbName: DBName;
2094
+ workspace: string;
2095
+ };
2096
+ declare type CreateMigrationRequestError = ErrorWrapper<{
2097
+ status: 400;
2098
+ payload: BadRequestError;
2099
+ } | {
2100
+ status: 401;
2101
+ payload: AuthError;
2102
+ } | {
2103
+ status: 404;
2104
+ payload: SimpleError;
2105
+ }>;
2106
+ declare type CreateMigrationRequestResponse = {
2107
+ number: number;
2108
+ };
2109
+ declare type CreateMigrationRequestRequestBody = {
2110
+ /**
2111
+ * The source branch.
2112
+ */
2113
+ source: string;
2114
+ /**
2115
+ * The target branch.
2116
+ */
2117
+ target: string;
2118
+ /**
2119
+ * The title.
2120
+ */
2121
+ title: string;
2122
+ /**
2123
+ * Optional migration request description.
2124
+ */
2125
+ body?: string;
2126
+ };
2127
+ declare type CreateMigrationRequestVariables = {
2128
+ body: CreateMigrationRequestRequestBody;
2129
+ pathParams: CreateMigrationRequestPathParams;
2130
+ } & FetcherExtraProps;
2131
+ declare const createMigrationRequest: (variables: CreateMigrationRequestVariables, signal?: AbortSignal) => Promise<CreateMigrationRequestResponse>;
2132
+ declare type GetMigrationRequestPathParams = {
2133
+ /**
2134
+ * The Database Name
2135
+ */
2136
+ dbName: DBName;
2137
+ /**
2138
+ * The migration request number.
2139
+ */
2140
+ mrNumber: number;
2141
+ workspace: string;
2142
+ };
2143
+ declare type GetMigrationRequestError = ErrorWrapper<{
2144
+ status: 400;
2145
+ payload: BadRequestError;
2146
+ } | {
2147
+ status: 401;
2148
+ payload: AuthError;
2149
+ } | {
2150
+ status: 404;
2151
+ payload: SimpleError;
2152
+ }>;
2153
+ declare type GetMigrationRequestVariables = {
2154
+ pathParams: GetMigrationRequestPathParams;
2155
+ } & FetcherExtraProps;
2156
+ declare const getMigrationRequest: (variables: GetMigrationRequestVariables, signal?: AbortSignal) => Promise<MigrationRequest>;
2157
+ declare type UpdateMigrationRequestPathParams = {
2158
+ /**
2159
+ * The Database Name
2160
+ */
2161
+ dbName: DBName;
2162
+ /**
2163
+ * The migration request number.
2164
+ */
2165
+ mrNumber: number;
2166
+ workspace: string;
2167
+ };
2168
+ declare type UpdateMigrationRequestError = ErrorWrapper<{
2169
+ status: 400;
2170
+ payload: BadRequestError;
2171
+ } | {
2172
+ status: 401;
2173
+ payload: AuthError;
2174
+ } | {
2175
+ status: 404;
2176
+ payload: SimpleError;
2177
+ }>;
2178
+ declare type UpdateMigrationRequestRequestBody = {
2179
+ /**
2180
+ * New migration request title.
2181
+ */
2182
+ title?: string;
2183
+ /**
2184
+ * New migration request description.
2185
+ */
2186
+ body?: string;
2187
+ /**
2188
+ * Change the migration request status.
2189
+ */
2190
+ status?: 'open' | 'closed';
2191
+ };
2192
+ declare type UpdateMigrationRequestVariables = {
2193
+ body?: UpdateMigrationRequestRequestBody;
2194
+ pathParams: UpdateMigrationRequestPathParams;
2195
+ } & FetcherExtraProps;
2196
+ declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables, signal?: AbortSignal) => Promise<undefined>;
2197
+ declare type ListMigrationRequestsCommitsPathParams = {
2198
+ /**
2199
+ * The Database Name
2200
+ */
2201
+ dbName: DBName;
2202
+ /**
2203
+ * The migration request number.
2204
+ */
2205
+ mrNumber: number;
2206
+ workspace: string;
2207
+ };
2208
+ declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
2209
+ status: 400;
2210
+ payload: BadRequestError;
2211
+ } | {
2212
+ status: 401;
2213
+ payload: AuthError;
2214
+ } | {
2215
+ status: 404;
2216
+ payload: SimpleError;
2217
+ }>;
2218
+ declare type ListMigrationRequestsCommitsResponse = {
2219
+ meta: {
2220
+ /**
2221
+ * last record id
2222
+ */
2223
+ cursor: string;
2224
+ /**
2225
+ * true if more records can be fetch
2226
+ */
2227
+ more: boolean;
2228
+ };
2229
+ logs: Commit[];
2230
+ };
2231
+ declare type ListMigrationRequestsCommitsRequestBody = {
2232
+ page?: {
2233
+ /**
2234
+ * Query the next page that follow the cursor.
2235
+ */
2236
+ after?: string;
2237
+ /**
2238
+ * Query the previous page before the cursor.
2239
+ */
2240
+ before?: string;
2241
+ /**
2242
+ * 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.
2243
+ *
2244
+ * @default 20
2245
+ */
2246
+ size?: number;
2247
+ };
2248
+ };
2249
+ declare type ListMigrationRequestsCommitsVariables = {
2250
+ body?: ListMigrationRequestsCommitsRequestBody;
2251
+ pathParams: ListMigrationRequestsCommitsPathParams;
2252
+ } & FetcherExtraProps;
2253
+ declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal) => Promise<ListMigrationRequestsCommitsResponse>;
2254
+ declare type CompareMigrationRequestPathParams = {
2255
+ /**
2256
+ * The Database Name
2257
+ */
2258
+ dbName: DBName;
2259
+ /**
2260
+ * The migration request number.
2261
+ */
2262
+ mrNumber: number;
2263
+ workspace: string;
2264
+ };
2265
+ declare type CompareMigrationRequestError = ErrorWrapper<{
2266
+ status: 400;
2267
+ payload: BadRequestError;
2268
+ } | {
2269
+ status: 401;
2270
+ payload: AuthError;
2271
+ } | {
2272
+ status: 404;
2273
+ payload: SimpleError;
2274
+ }>;
2275
+ declare type CompareMigrationRequestVariables = {
2276
+ pathParams: CompareMigrationRequestPathParams;
2277
+ } & FetcherExtraProps;
2278
+ declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
2279
+ declare type GetMigrationRequestIsMergedPathParams = {
2280
+ /**
2281
+ * The Database Name
2282
+ */
2283
+ dbName: DBName;
2284
+ /**
2285
+ * The migration request number.
2286
+ */
2287
+ mrNumber: number;
2288
+ workspace: string;
2289
+ };
2290
+ declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
2291
+ status: 400;
2292
+ payload: BadRequestError;
2293
+ } | {
2294
+ status: 401;
2295
+ payload: AuthError;
2296
+ } | {
2297
+ status: 404;
2298
+ payload: SimpleError;
2299
+ }>;
2300
+ declare type GetMigrationRequestIsMergedResponse = {
2301
+ merged?: boolean;
2302
+ };
2303
+ declare type GetMigrationRequestIsMergedVariables = {
2304
+ pathParams: GetMigrationRequestIsMergedPathParams;
2305
+ } & FetcherExtraProps;
2306
+ declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal) => Promise<GetMigrationRequestIsMergedResponse>;
2307
+ declare type MergeMigrationRequestPathParams = {
2308
+ /**
2309
+ * The Database Name
2310
+ */
2311
+ dbName: DBName;
2312
+ /**
2313
+ * The migration request number.
2314
+ */
2315
+ mrNumber: number;
2316
+ workspace: string;
2317
+ };
2318
+ declare type MergeMigrationRequestError = ErrorWrapper<{
2319
+ status: 400;
2320
+ payload: BadRequestError;
2321
+ } | {
2322
+ status: 401;
2323
+ payload: AuthError;
2324
+ } | {
2325
+ status: 404;
2326
+ payload: SimpleError;
2327
+ }>;
2328
+ declare type MergeMigrationRequestVariables = {
2329
+ pathParams: MergeMigrationRequestPathParams;
2330
+ } & FetcherExtraProps;
2331
+ declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<Commit>;
1335
2332
  declare type GetBranchDetailsPathParams = {
2333
+ /**
2334
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2335
+ */
1336
2336
  dbBranchName: DBBranchName;
1337
2337
  workspace: string;
1338
2338
  };
@@ -1349,12 +2349,18 @@ declare type GetBranchDetailsError = ErrorWrapper<{
1349
2349
  declare type GetBranchDetailsVariables = {
1350
2350
  pathParams: GetBranchDetailsPathParams;
1351
2351
  } & FetcherExtraProps;
1352
- declare const getBranchDetails: (variables: GetBranchDetailsVariables) => Promise<DBBranch>;
2352
+ declare const getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal) => Promise<DBBranch>;
1353
2353
  declare type CreateBranchPathParams = {
2354
+ /**
2355
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2356
+ */
1354
2357
  dbBranchName: DBBranchName;
1355
2358
  workspace: string;
1356
2359
  };
1357
2360
  declare type CreateBranchQueryParams = {
2361
+ /**
2362
+ * Name of source branch to branch the new schema from
2363
+ */
1358
2364
  from?: string;
1359
2365
  };
1360
2366
  declare type CreateBranchError = ErrorWrapper<{
@@ -1368,10 +2374,16 @@ declare type CreateBranchError = ErrorWrapper<{
1368
2374
  payload: SimpleError;
1369
2375
  }>;
1370
2376
  declare type CreateBranchResponse = {
2377
+ /**
2378
+ * @minLength 1
2379
+ */
1371
2380
  databaseName: string;
1372
2381
  branchName: string;
1373
2382
  };
1374
2383
  declare type CreateBranchRequestBody = {
2384
+ /**
2385
+ * Select the branch to fork from. Defaults to 'main'
2386
+ */
1375
2387
  from?: string;
1376
2388
  metadata?: BranchMetadata;
1377
2389
  };
@@ -1380,12 +2392,169 @@ declare type CreateBranchVariables = {
1380
2392
  pathParams: CreateBranchPathParams;
1381
2393
  queryParams?: CreateBranchQueryParams;
1382
2394
  } & FetcherExtraProps;
1383
- declare const createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
1384
- declare type DeleteBranchPathParams = {
2395
+ declare const createBranch: (variables: CreateBranchVariables, signal?: AbortSignal) => Promise<CreateBranchResponse>;
2396
+ declare type DeleteBranchPathParams = {
2397
+ /**
2398
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2399
+ */
2400
+ dbBranchName: DBBranchName;
2401
+ workspace: string;
2402
+ };
2403
+ declare type DeleteBranchError = ErrorWrapper<{
2404
+ status: 400;
2405
+ payload: BadRequestError;
2406
+ } | {
2407
+ status: 401;
2408
+ payload: AuthError;
2409
+ } | {
2410
+ status: 404;
2411
+ payload: SimpleError;
2412
+ }>;
2413
+ declare type DeleteBranchVariables = {
2414
+ pathParams: DeleteBranchPathParams;
2415
+ } & FetcherExtraProps;
2416
+ /**
2417
+ * Delete the branch in the database and all its resources
2418
+ */
2419
+ declare const deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<undefined>;
2420
+ declare type UpdateBranchMetadataPathParams = {
2421
+ /**
2422
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2423
+ */
2424
+ dbBranchName: DBBranchName;
2425
+ workspace: string;
2426
+ };
2427
+ declare type UpdateBranchMetadataError = ErrorWrapper<{
2428
+ status: 400;
2429
+ payload: BadRequestError;
2430
+ } | {
2431
+ status: 401;
2432
+ payload: AuthError;
2433
+ } | {
2434
+ status: 404;
2435
+ payload: SimpleError;
2436
+ }>;
2437
+ declare type UpdateBranchMetadataVariables = {
2438
+ body?: BranchMetadata;
2439
+ pathParams: UpdateBranchMetadataPathParams;
2440
+ } & FetcherExtraProps;
2441
+ /**
2442
+ * Update the branch metadata
2443
+ */
2444
+ declare const updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal) => Promise<undefined>;
2445
+ declare type GetBranchMetadataPathParams = {
2446
+ /**
2447
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2448
+ */
2449
+ dbBranchName: DBBranchName;
2450
+ workspace: string;
2451
+ };
2452
+ declare type GetBranchMetadataError = ErrorWrapper<{
2453
+ status: 400;
2454
+ payload: BadRequestError;
2455
+ } | {
2456
+ status: 401;
2457
+ payload: AuthError;
2458
+ } | {
2459
+ status: 404;
2460
+ payload: SimpleError;
2461
+ }>;
2462
+ declare type GetBranchMetadataVariables = {
2463
+ pathParams: GetBranchMetadataPathParams;
2464
+ } & FetcherExtraProps;
2465
+ declare const getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal) => Promise<BranchMetadata>;
2466
+ declare type GetBranchMigrationHistoryPathParams = {
2467
+ /**
2468
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2469
+ */
2470
+ dbBranchName: DBBranchName;
2471
+ workspace: string;
2472
+ };
2473
+ declare type GetBranchMigrationHistoryError = ErrorWrapper<{
2474
+ status: 400;
2475
+ payload: BadRequestError;
2476
+ } | {
2477
+ status: 401;
2478
+ payload: AuthError;
2479
+ } | {
2480
+ status: 404;
2481
+ payload: SimpleError;
2482
+ }>;
2483
+ declare type GetBranchMigrationHistoryResponse = {
2484
+ startedFrom?: StartedFromMetadata;
2485
+ migrations?: BranchMigration[];
2486
+ };
2487
+ declare type GetBranchMigrationHistoryRequestBody = {
2488
+ limit?: number;
2489
+ startFrom?: string;
2490
+ };
2491
+ declare type GetBranchMigrationHistoryVariables = {
2492
+ body?: GetBranchMigrationHistoryRequestBody;
2493
+ pathParams: GetBranchMigrationHistoryPathParams;
2494
+ } & FetcherExtraProps;
2495
+ declare const getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal) => Promise<GetBranchMigrationHistoryResponse>;
2496
+ declare type ExecuteBranchMigrationPlanPathParams = {
2497
+ /**
2498
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2499
+ */
2500
+ dbBranchName: DBBranchName;
2501
+ workspace: string;
2502
+ };
2503
+ declare type ExecuteBranchMigrationPlanError = ErrorWrapper<{
2504
+ status: 400;
2505
+ payload: BadRequestError;
2506
+ } | {
2507
+ status: 401;
2508
+ payload: AuthError;
2509
+ } | {
2510
+ status: 404;
2511
+ payload: SimpleError;
2512
+ }>;
2513
+ declare type ExecuteBranchMigrationPlanRequestBody = {
2514
+ version: number;
2515
+ migration: BranchMigration;
2516
+ };
2517
+ declare type ExecuteBranchMigrationPlanVariables = {
2518
+ body: ExecuteBranchMigrationPlanRequestBody;
2519
+ pathParams: ExecuteBranchMigrationPlanPathParams;
2520
+ } & FetcherExtraProps;
2521
+ /**
2522
+ * Apply a migration plan to the branch
2523
+ */
2524
+ declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<undefined>;
2525
+ declare type GetBranchMigrationPlanPathParams = {
2526
+ /**
2527
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2528
+ */
2529
+ dbBranchName: DBBranchName;
2530
+ workspace: string;
2531
+ };
2532
+ declare type GetBranchMigrationPlanError = ErrorWrapper<{
2533
+ status: 400;
2534
+ payload: BadRequestError;
2535
+ } | {
2536
+ status: 401;
2537
+ payload: AuthError;
2538
+ } | {
2539
+ status: 404;
2540
+ payload: SimpleError;
2541
+ }>;
2542
+ declare type GetBranchMigrationPlanVariables = {
2543
+ body: Schema;
2544
+ pathParams: GetBranchMigrationPlanPathParams;
2545
+ } & FetcherExtraProps;
2546
+ /**
2547
+ * Compute a migration plan from a target schema the branch should be migrated too.
2548
+ */
2549
+ declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<BranchMigrationPlan>;
2550
+ declare type CompareBranchWithUserSchemaPathParams = {
2551
+ /**
2552
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2553
+ */
1385
2554
  dbBranchName: DBBranchName;
1386
2555
  workspace: string;
1387
2556
  };
1388
- declare type DeleteBranchError = ErrorWrapper<{
2557
+ declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
1389
2558
  status: 400;
1390
2559
  payload: BadRequestError;
1391
2560
  } | {
@@ -1395,18 +2564,26 @@ declare type DeleteBranchError = ErrorWrapper<{
1395
2564
  status: 404;
1396
2565
  payload: SimpleError;
1397
2566
  }>;
1398
- declare type DeleteBranchVariables = {
1399
- pathParams: DeleteBranchPathParams;
2567
+ declare type CompareBranchWithUserSchemaRequestBody = {
2568
+ schema: Schema;
2569
+ };
2570
+ declare type CompareBranchWithUserSchemaVariables = {
2571
+ body: CompareBranchWithUserSchemaRequestBody;
2572
+ pathParams: CompareBranchWithUserSchemaPathParams;
1400
2573
  } & FetcherExtraProps;
1401
- /**
1402
- * Delete the branch in the database and all its resources
1403
- */
1404
- declare const deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
1405
- declare type UpdateBranchMetadataPathParams = {
2574
+ declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
2575
+ declare type CompareBranchSchemasPathParams = {
2576
+ /**
2577
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2578
+ */
1406
2579
  dbBranchName: DBBranchName;
2580
+ /**
2581
+ * The Database Name
2582
+ */
2583
+ branchName: BranchName;
1407
2584
  workspace: string;
1408
2585
  };
1409
- declare type UpdateBranchMetadataError = ErrorWrapper<{
2586
+ declare type CompareBranchSchemasError = ErrorWrapper<{
1410
2587
  status: 400;
1411
2588
  payload: BadRequestError;
1412
2589
  } | {
@@ -1416,19 +2593,19 @@ declare type UpdateBranchMetadataError = ErrorWrapper<{
1416
2593
  status: 404;
1417
2594
  payload: SimpleError;
1418
2595
  }>;
1419
- declare type UpdateBranchMetadataVariables = {
1420
- body?: BranchMetadata;
1421
- pathParams: UpdateBranchMetadataPathParams;
2596
+ declare type CompareBranchSchemasVariables = {
2597
+ body?: Record<string, any>;
2598
+ pathParams: CompareBranchSchemasPathParams;
1422
2599
  } & FetcherExtraProps;
1423
- /**
1424
- * Update the branch metadata
1425
- */
1426
- declare const updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
1427
- declare type GetBranchMetadataPathParams = {
2600
+ declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
2601
+ declare type UpdateBranchSchemaPathParams = {
2602
+ /**
2603
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2604
+ */
1428
2605
  dbBranchName: DBBranchName;
1429
2606
  workspace: string;
1430
2607
  };
1431
- declare type GetBranchMetadataError = ErrorWrapper<{
2608
+ declare type UpdateBranchSchemaError = ErrorWrapper<{
1432
2609
  status: 400;
1433
2610
  payload: BadRequestError;
1434
2611
  } | {
@@ -1438,15 +2615,23 @@ declare type GetBranchMetadataError = ErrorWrapper<{
1438
2615
  status: 404;
1439
2616
  payload: SimpleError;
1440
2617
  }>;
1441
- declare type GetBranchMetadataVariables = {
1442
- pathParams: GetBranchMetadataPathParams;
2618
+ declare type UpdateBranchSchemaResponse = {
2619
+ id: string;
2620
+ parentID: string;
2621
+ };
2622
+ declare type UpdateBranchSchemaVariables = {
2623
+ body: Migration;
2624
+ pathParams: UpdateBranchSchemaPathParams;
1443
2625
  } & FetcherExtraProps;
1444
- declare const getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
1445
- declare type GetBranchMigrationHistoryPathParams = {
2626
+ declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal) => Promise<UpdateBranchSchemaResponse>;
2627
+ declare type PreviewBranchSchemaEditPathParams = {
2628
+ /**
2629
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2630
+ */
1446
2631
  dbBranchName: DBBranchName;
1447
2632
  workspace: string;
1448
2633
  };
1449
- declare type GetBranchMigrationHistoryError = ErrorWrapper<{
2634
+ declare type PreviewBranchSchemaEditError = ErrorWrapper<{
1450
2635
  status: 400;
1451
2636
  payload: BadRequestError;
1452
2637
  } | {
@@ -1456,24 +2641,27 @@ declare type GetBranchMigrationHistoryError = ErrorWrapper<{
1456
2641
  status: 404;
1457
2642
  payload: SimpleError;
1458
2643
  }>;
1459
- declare type GetBranchMigrationHistoryResponse = {
1460
- startedFrom?: StartedFromMetadata;
1461
- migrations?: BranchMigration[];
2644
+ declare type PreviewBranchSchemaEditResponse = {
2645
+ original: Schema;
2646
+ updated: Schema;
1462
2647
  };
1463
- declare type GetBranchMigrationHistoryRequestBody = {
1464
- limit?: number;
1465
- startFrom?: string;
2648
+ declare type PreviewBranchSchemaEditRequestBody = {
2649
+ edits?: SchemaEditScript;
2650
+ operations?: MigrationOp[];
1466
2651
  };
1467
- declare type GetBranchMigrationHistoryVariables = {
1468
- body?: GetBranchMigrationHistoryRequestBody;
1469
- pathParams: GetBranchMigrationHistoryPathParams;
2652
+ declare type PreviewBranchSchemaEditVariables = {
2653
+ body?: PreviewBranchSchemaEditRequestBody;
2654
+ pathParams: PreviewBranchSchemaEditPathParams;
1470
2655
  } & FetcherExtraProps;
1471
- declare const getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
1472
- declare type ExecuteBranchMigrationPlanPathParams = {
2656
+ declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal) => Promise<PreviewBranchSchemaEditResponse>;
2657
+ declare type ApplyBranchSchemaEditPathParams = {
2658
+ /**
2659
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2660
+ */
1473
2661
  dbBranchName: DBBranchName;
1474
2662
  workspace: string;
1475
2663
  };
1476
- declare type ExecuteBranchMigrationPlanError = ErrorWrapper<{
2664
+ declare type ApplyBranchSchemaEditError = ErrorWrapper<{
1477
2665
  status: 400;
1478
2666
  payload: BadRequestError;
1479
2667
  } | {
@@ -1483,23 +2671,26 @@ declare type ExecuteBranchMigrationPlanError = ErrorWrapper<{
1483
2671
  status: 404;
1484
2672
  payload: SimpleError;
1485
2673
  }>;
1486
- declare type ExecuteBranchMigrationPlanRequestBody = {
1487
- version: number;
1488
- migration: BranchMigration;
2674
+ declare type ApplyBranchSchemaEditResponse = {
2675
+ id: string;
2676
+ parentID: string;
1489
2677
  };
1490
- declare type ExecuteBranchMigrationPlanVariables = {
1491
- body: ExecuteBranchMigrationPlanRequestBody;
1492
- pathParams: ExecuteBranchMigrationPlanPathParams;
2678
+ declare type ApplyBranchSchemaEditRequestBody = {
2679
+ edits: SchemaEditScript;
2680
+ };
2681
+ declare type ApplyBranchSchemaEditVariables = {
2682
+ body: ApplyBranchSchemaEditRequestBody;
2683
+ pathParams: ApplyBranchSchemaEditPathParams;
1493
2684
  } & FetcherExtraProps;
1494
- /**
1495
- * Apply a migration plan to the branch
1496
- */
1497
- declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
1498
- declare type GetBranchMigrationPlanPathParams = {
2685
+ declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<ApplyBranchSchemaEditResponse>;
2686
+ declare type GetBranchSchemaHistoryPathParams = {
2687
+ /**
2688
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2689
+ */
1499
2690
  dbBranchName: DBBranchName;
1500
2691
  workspace: string;
1501
2692
  };
1502
- declare type GetBranchMigrationPlanError = ErrorWrapper<{
2693
+ declare type GetBranchSchemaHistoryError = ErrorWrapper<{
1503
2694
  status: 400;
1504
2695
  payload: BadRequestError;
1505
2696
  } | {
@@ -1509,15 +2700,46 @@ declare type GetBranchMigrationPlanError = ErrorWrapper<{
1509
2700
  status: 404;
1510
2701
  payload: SimpleError;
1511
2702
  }>;
1512
- declare type GetBranchMigrationPlanVariables = {
1513
- body: Schema;
1514
- pathParams: GetBranchMigrationPlanPathParams;
2703
+ declare type GetBranchSchemaHistoryResponse = {
2704
+ meta: {
2705
+ /**
2706
+ * last record id
2707
+ */
2708
+ cursor: string;
2709
+ /**
2710
+ * true if more records can be fetch
2711
+ */
2712
+ more: boolean;
2713
+ };
2714
+ logs: Commit[];
2715
+ };
2716
+ declare type GetBranchSchemaHistoryRequestBody = {
2717
+ page?: {
2718
+ /**
2719
+ * Query the next page that follow the cursor.
2720
+ */
2721
+ after?: string;
2722
+ /**
2723
+ * Query the previous page before the cursor.
2724
+ */
2725
+ before?: string;
2726
+ /**
2727
+ * 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.
2728
+ *
2729
+ * @default 20
2730
+ */
2731
+ size?: number;
2732
+ };
2733
+ };
2734
+ declare type GetBranchSchemaHistoryVariables = {
2735
+ body?: GetBranchSchemaHistoryRequestBody;
2736
+ pathParams: GetBranchSchemaHistoryPathParams;
1515
2737
  } & FetcherExtraProps;
1516
- /**
1517
- * Compute a migration plan from a target schema the branch should be migrated too.
1518
- */
1519
- declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
2738
+ declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables, signal?: AbortSignal) => Promise<GetBranchSchemaHistoryResponse>;
1520
2739
  declare type GetBranchStatsPathParams = {
2740
+ /**
2741
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2742
+ */
1521
2743
  dbBranchName: DBBranchName;
1522
2744
  workspace: string;
1523
2745
  };
@@ -1548,9 +2770,15 @@ declare type GetBranchStatsVariables = {
1548
2770
  /**
1549
2771
  * Get branch usage metrics.
1550
2772
  */
1551
- declare const getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
2773
+ declare const getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal) => Promise<GetBranchStatsResponse>;
1552
2774
  declare type CreateTablePathParams = {
2775
+ /**
2776
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2777
+ */
1553
2778
  dbBranchName: DBBranchName;
2779
+ /**
2780
+ * The Table name
2781
+ */
1554
2782
  tableName: TableName;
1555
2783
  workspace: string;
1556
2784
  };
@@ -1569,6 +2797,9 @@ declare type CreateTableError = ErrorWrapper<{
1569
2797
  }>;
1570
2798
  declare type CreateTableResponse = {
1571
2799
  branchName: string;
2800
+ /**
2801
+ * @minLength 1
2802
+ */
1572
2803
  tableName: string;
1573
2804
  };
1574
2805
  declare type CreateTableVariables = {
@@ -1577,9 +2808,15 @@ declare type CreateTableVariables = {
1577
2808
  /**
1578
2809
  * Creates a new table with the given name. Returns 422 if a table with the same name already exists.
1579
2810
  */
1580
- declare const createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
2811
+ declare const createTable: (variables: CreateTableVariables, signal?: AbortSignal) => Promise<CreateTableResponse>;
1581
2812
  declare type DeleteTablePathParams = {
2813
+ /**
2814
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2815
+ */
1582
2816
  dbBranchName: DBBranchName;
2817
+ /**
2818
+ * The Table name
2819
+ */
1583
2820
  tableName: TableName;
1584
2821
  workspace: string;
1585
2822
  };
@@ -1596,9 +2833,15 @@ declare type DeleteTableVariables = {
1596
2833
  /**
1597
2834
  * Deletes the table with the given name.
1598
2835
  */
1599
- declare const deleteTable: (variables: DeleteTableVariables) => Promise<undefined>;
2836
+ declare const deleteTable: (variables: DeleteTableVariables, signal?: AbortSignal) => Promise<undefined>;
1600
2837
  declare type UpdateTablePathParams = {
2838
+ /**
2839
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2840
+ */
1601
2841
  dbBranchName: DBBranchName;
2842
+ /**
2843
+ * The Table name
2844
+ */
1602
2845
  tableName: TableName;
1603
2846
  workspace: string;
1604
2847
  };
@@ -1613,6 +2856,9 @@ declare type UpdateTableError = ErrorWrapper<{
1613
2856
  payload: SimpleError;
1614
2857
  }>;
1615
2858
  declare type UpdateTableRequestBody = {
2859
+ /**
2860
+ * @minLength 1
2861
+ */
1616
2862
  name: string;
1617
2863
  };
1618
2864
  declare type UpdateTableVariables = {
@@ -1632,9 +2878,15 @@ declare type UpdateTableVariables = {
1632
2878
  * }
1633
2879
  * ```
1634
2880
  */
1635
- declare const updateTable: (variables: UpdateTableVariables) => Promise<undefined>;
2881
+ declare const updateTable: (variables: UpdateTableVariables, signal?: AbortSignal) => Promise<undefined>;
1636
2882
  declare type GetTableSchemaPathParams = {
2883
+ /**
2884
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2885
+ */
1637
2886
  dbBranchName: DBBranchName;
2887
+ /**
2888
+ * The Table name
2889
+ */
1638
2890
  tableName: TableName;
1639
2891
  workspace: string;
1640
2892
  };
@@ -1654,9 +2906,15 @@ declare type GetTableSchemaResponse = {
1654
2906
  declare type GetTableSchemaVariables = {
1655
2907
  pathParams: GetTableSchemaPathParams;
1656
2908
  } & FetcherExtraProps;
1657
- declare const getTableSchema: (variables: GetTableSchemaVariables) => Promise<GetTableSchemaResponse>;
2909
+ declare const getTableSchema: (variables: GetTableSchemaVariables, signal?: AbortSignal) => Promise<GetTableSchemaResponse>;
1658
2910
  declare type SetTableSchemaPathParams = {
2911
+ /**
2912
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2913
+ */
1659
2914
  dbBranchName: DBBranchName;
2915
+ /**
2916
+ * The Table name
2917
+ */
1660
2918
  tableName: TableName;
1661
2919
  workspace: string;
1662
2920
  };
@@ -1680,9 +2938,15 @@ declare type SetTableSchemaVariables = {
1680
2938
  body: SetTableSchemaRequestBody;
1681
2939
  pathParams: SetTableSchemaPathParams;
1682
2940
  } & FetcherExtraProps;
1683
- declare const setTableSchema: (variables: SetTableSchemaVariables) => Promise<undefined>;
2941
+ declare const setTableSchema: (variables: SetTableSchemaVariables, signal?: AbortSignal) => Promise<undefined>;
1684
2942
  declare type GetTableColumnsPathParams = {
2943
+ /**
2944
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2945
+ */
1685
2946
  dbBranchName: DBBranchName;
2947
+ /**
2948
+ * The Table name
2949
+ */
1686
2950
  tableName: TableName;
1687
2951
  workspace: string;
1688
2952
  };
@@ -1706,9 +2970,15 @@ declare type GetTableColumnsVariables = {
1706
2970
  * Retrieves the list of table columns and their definition. This endpoint returns the column list with object columns being reported with their
1707
2971
  * full dot-separated path (flattened).
1708
2972
  */
1709
- declare const getTableColumns: (variables: GetTableColumnsVariables) => Promise<GetTableColumnsResponse>;
2973
+ declare const getTableColumns: (variables: GetTableColumnsVariables, signal?: AbortSignal) => Promise<GetTableColumnsResponse>;
1710
2974
  declare type AddTableColumnPathParams = {
2975
+ /**
2976
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2977
+ */
1711
2978
  dbBranchName: DBBranchName;
2979
+ /**
2980
+ * The Table name
2981
+ */
1712
2982
  tableName: TableName;
1713
2983
  workspace: string;
1714
2984
  };
@@ -1731,10 +3001,19 @@ declare type AddTableColumnVariables = {
1731
3001
  * contain the full path separated by dots. If the parent objects do not exists, they will be automatically created. For example,
1732
3002
  * passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
1733
3003
  */
1734
- declare const addTableColumn: (variables: AddTableColumnVariables) => Promise<MigrationIdResponse>;
3004
+ declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<MigrationIdResponse>;
1735
3005
  declare type GetColumnPathParams = {
3006
+ /**
3007
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3008
+ */
1736
3009
  dbBranchName: DBBranchName;
3010
+ /**
3011
+ * The Table name
3012
+ */
1737
3013
  tableName: TableName;
3014
+ /**
3015
+ * The Column name
3016
+ */
1738
3017
  columnName: ColumnName;
1739
3018
  workspace: string;
1740
3019
  };
@@ -1754,10 +3033,19 @@ declare type GetColumnVariables = {
1754
3033
  /**
1755
3034
  * Get the definition of a single column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
1756
3035
  */
1757
- declare const getColumn: (variables: GetColumnVariables) => Promise<Column>;
3036
+ declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
1758
3037
  declare type DeleteColumnPathParams = {
3038
+ /**
3039
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3040
+ */
1759
3041
  dbBranchName: DBBranchName;
3042
+ /**
3043
+ * The Table name
3044
+ */
1760
3045
  tableName: TableName;
3046
+ /**
3047
+ * The Column name
3048
+ */
1761
3049
  columnName: ColumnName;
1762
3050
  workspace: string;
1763
3051
  };
@@ -1777,10 +3065,19 @@ declare type DeleteColumnVariables = {
1777
3065
  /**
1778
3066
  * Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
1779
3067
  */
1780
- declare const deleteColumn: (variables: DeleteColumnVariables) => Promise<MigrationIdResponse>;
3068
+ declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<MigrationIdResponse>;
1781
3069
  declare type UpdateColumnPathParams = {
3070
+ /**
3071
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3072
+ */
1782
3073
  dbBranchName: DBBranchName;
3074
+ /**
3075
+ * The Table name
3076
+ */
1783
3077
  tableName: TableName;
3078
+ /**
3079
+ * The Column name
3080
+ */
1784
3081
  columnName: ColumnName;
1785
3082
  workspace: string;
1786
3083
  };
@@ -1795,6 +3092,9 @@ declare type UpdateColumnError = ErrorWrapper<{
1795
3092
  payload: SimpleError;
1796
3093
  }>;
1797
3094
  declare type UpdateColumnRequestBody = {
3095
+ /**
3096
+ * @minLength 1
3097
+ */
1798
3098
  name: string;
1799
3099
  };
1800
3100
  declare type UpdateColumnVariables = {
@@ -1804,13 +3104,22 @@ declare type UpdateColumnVariables = {
1804
3104
  /**
1805
3105
  * Update column with partial data. Can be used for renaming the column by providing a new "name" field. To refer to sub-objects, the column name can contain dots. For example `address.country`.
1806
3106
  */
1807
- declare const updateColumn: (variables: UpdateColumnVariables) => Promise<MigrationIdResponse>;
3107
+ declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<MigrationIdResponse>;
1808
3108
  declare type InsertRecordPathParams = {
3109
+ /**
3110
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3111
+ */
1809
3112
  dbBranchName: DBBranchName;
3113
+ /**
3114
+ * The Table name
3115
+ */
1810
3116
  tableName: TableName;
1811
3117
  workspace: string;
1812
3118
  };
1813
3119
  declare type InsertRecordQueryParams = {
3120
+ /**
3121
+ * Column filters
3122
+ */
1814
3123
  columns?: ColumnsProjection;
1815
3124
  };
1816
3125
  declare type InsertRecordError = ErrorWrapper<{
@@ -1831,14 +3140,26 @@ declare type InsertRecordVariables = {
1831
3140
  /**
1832
3141
  * Insert a new Record into the Table
1833
3142
  */
1834
- declare const insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
3143
+ declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
1835
3144
  declare type InsertRecordWithIDPathParams = {
3145
+ /**
3146
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3147
+ */
1836
3148
  dbBranchName: DBBranchName;
3149
+ /**
3150
+ * The Table name
3151
+ */
1837
3152
  tableName: TableName;
3153
+ /**
3154
+ * The Record name
3155
+ */
1838
3156
  recordId: RecordID;
1839
3157
  workspace: string;
1840
3158
  };
1841
3159
  declare type InsertRecordWithIDQueryParams = {
3160
+ /**
3161
+ * Column filters
3162
+ */
1842
3163
  columns?: ColumnsProjection;
1843
3164
  createOnly?: boolean;
1844
3165
  ifVersion?: number;
@@ -1864,14 +3185,26 @@ declare type InsertRecordWithIDVariables = {
1864
3185
  /**
1865
3186
  * By default, IDs are auto-generated when data is insterted into Xata. Sending a request to this endpoint allows us to insert a record with a pre-existing ID, bypassing the default automatic ID generation.
1866
3187
  */
1867
- declare const insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
3188
+ declare const insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
1868
3189
  declare type UpdateRecordWithIDPathParams = {
3190
+ /**
3191
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3192
+ */
1869
3193
  dbBranchName: DBBranchName;
3194
+ /**
3195
+ * The Table name
3196
+ */
1870
3197
  tableName: TableName;
3198
+ /**
3199
+ * The Record name
3200
+ */
1871
3201
  recordId: RecordID;
1872
3202
  workspace: string;
1873
3203
  };
1874
3204
  declare type UpdateRecordWithIDQueryParams = {
3205
+ /**
3206
+ * Column filters
3207
+ */
1875
3208
  columns?: ColumnsProjection;
1876
3209
  ifVersion?: number;
1877
3210
  };
@@ -1893,14 +3226,26 @@ declare type UpdateRecordWithIDVariables = {
1893
3226
  pathParams: UpdateRecordWithIDPathParams;
1894
3227
  queryParams?: UpdateRecordWithIDQueryParams;
1895
3228
  } & FetcherExtraProps;
1896
- declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<RecordUpdateResponse>;
3229
+ declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
1897
3230
  declare type UpsertRecordWithIDPathParams = {
3231
+ /**
3232
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3233
+ */
1898
3234
  dbBranchName: DBBranchName;
3235
+ /**
3236
+ * The Table name
3237
+ */
1899
3238
  tableName: TableName;
3239
+ /**
3240
+ * The Record name
3241
+ */
1900
3242
  recordId: RecordID;
1901
3243
  workspace: string;
1902
3244
  };
1903
3245
  declare type UpsertRecordWithIDQueryParams = {
3246
+ /**
3247
+ * Column filters
3248
+ */
1904
3249
  columns?: ColumnsProjection;
1905
3250
  ifVersion?: number;
1906
3251
  };
@@ -1922,14 +3267,26 @@ declare type UpsertRecordWithIDVariables = {
1922
3267
  pathParams: UpsertRecordWithIDPathParams;
1923
3268
  queryParams?: UpsertRecordWithIDQueryParams;
1924
3269
  } & FetcherExtraProps;
1925
- declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
3270
+ declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
1926
3271
  declare type DeleteRecordPathParams = {
3272
+ /**
3273
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3274
+ */
1927
3275
  dbBranchName: DBBranchName;
3276
+ /**
3277
+ * The Table name
3278
+ */
1928
3279
  tableName: TableName;
3280
+ /**
3281
+ * The Record name
3282
+ */
1929
3283
  recordId: RecordID;
1930
3284
  workspace: string;
1931
3285
  };
1932
3286
  declare type DeleteRecordQueryParams = {
3287
+ /**
3288
+ * Column filters
3289
+ */
1933
3290
  columns?: ColumnsProjection;
1934
3291
  };
1935
3292
  declare type DeleteRecordError = ErrorWrapper<{
@@ -1946,14 +3303,26 @@ declare type DeleteRecordVariables = {
1946
3303
  pathParams: DeleteRecordPathParams;
1947
3304
  queryParams?: DeleteRecordQueryParams;
1948
3305
  } & FetcherExtraProps;
1949
- declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
3306
+ declare const deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
1950
3307
  declare type GetRecordPathParams = {
3308
+ /**
3309
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3310
+ */
1951
3311
  dbBranchName: DBBranchName;
3312
+ /**
3313
+ * The Table name
3314
+ */
1952
3315
  tableName: TableName;
3316
+ /**
3317
+ * The Record name
3318
+ */
1953
3319
  recordId: RecordID;
1954
3320
  workspace: string;
1955
3321
  };
1956
3322
  declare type GetRecordQueryParams = {
3323
+ /**
3324
+ * Column filters
3325
+ */
1957
3326
  columns?: ColumnsProjection;
1958
3327
  };
1959
3328
  declare type GetRecordError = ErrorWrapper<{
@@ -1973,13 +3342,22 @@ declare type GetRecordVariables = {
1973
3342
  /**
1974
3343
  * Retrieve record by ID
1975
3344
  */
1976
- declare const getRecord: (variables: GetRecordVariables) => Promise<XataRecord$1>;
3345
+ declare const getRecord: (variables: GetRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
1977
3346
  declare type BulkInsertTableRecordsPathParams = {
3347
+ /**
3348
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3349
+ */
1978
3350
  dbBranchName: DBBranchName;
3351
+ /**
3352
+ * The Table name
3353
+ */
1979
3354
  tableName: TableName;
1980
3355
  workspace: string;
1981
3356
  };
1982
3357
  declare type BulkInsertTableRecordsQueryParams = {
3358
+ /**
3359
+ * Column filters
3360
+ */
1983
3361
  columns?: ColumnsProjection;
1984
3362
  };
1985
3363
  declare type BulkInsertTableRecordsError = ErrorWrapper<{
@@ -2006,9 +3384,15 @@ declare type BulkInsertTableRecordsVariables = {
2006
3384
  /**
2007
3385
  * Bulk insert records
2008
3386
  */
2009
- declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
3387
+ declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal) => Promise<BulkInsertResponse>;
2010
3388
  declare type QueryTablePathParams = {
3389
+ /**
3390
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3391
+ */
2011
3392
  dbBranchName: DBBranchName;
3393
+ /**
3394
+ * The Table name
3395
+ */
2012
3396
  tableName: TableName;
2013
3397
  workspace: string;
2014
3398
  };
@@ -2062,8 +3446,9 @@ declare type QueryTableVariables = {
2062
3446
  * If the `columns` array is not specified, all columns are included. For link
2063
3447
  * fields, only the ID column of the linked records is included in the response.
2064
3448
  *
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
3449
+ * If the `columns` array is specified, only the selected and internal
3450
+ * columns `id` and `xata` are included. The `*` wildcard can be used to
3451
+ * select all columns.
2067
3452
  *
2068
3453
  * For objects and link fields, if the column name of the object is specified, we
2069
3454
  * include all of its sub-keys. If only some sub-keys are specified (via dotted
@@ -2179,6 +3564,10 @@ declare type QueryTableVariables = {
2179
3564
  *
2180
3565
  * ```json
2181
3566
  * {
3567
+ * "id": "id1"
3568
+ * "xata": {
3569
+ * "version": 0
3570
+ * }
2182
3571
  * "name": "Kilian",
2183
3572
  * "address": {
2184
3573
  * "street": "New street"
@@ -2198,6 +3587,10 @@ declare type QueryTableVariables = {
2198
3587
  *
2199
3588
  * ```json
2200
3589
  * {
3590
+ * "id": "id1"
3591
+ * "xata": {
3592
+ * "version": 0
3593
+ * }
2201
3594
  * "name": "Kilian",
2202
3595
  * "email": "kilian@gmail.com",
2203
3596
  * "address": {
@@ -2227,6 +3620,10 @@ declare type QueryTableVariables = {
2227
3620
  *
2228
3621
  * ```json
2229
3622
  * {
3623
+ * "id": "id1"
3624
+ * "xata": {
3625
+ * "version": 0
3626
+ * }
2230
3627
  * "name": "Kilian",
2231
3628
  * "email": "kilian@gmail.com",
2232
3629
  * "address": {
@@ -2653,8 +4050,8 @@ declare type QueryTableVariables = {
2653
4050
  *
2654
4051
  * ### Pagination
2655
4052
  *
2656
- * We offer cursor pagination and offset pagination. The offset pagination is limited
2657
- * in the amount of data it can retrieve, so we recommend the cursor pagination if you have more than 1000 records.
4053
+ * We offer cursor pagination and offset pagination. For queries that are expected to return more than 1000 records,
4054
+ * cursor pagination is needed in order to retrieve all of their results. The offset pagination method is limited to 1000 records.
2658
4055
  *
2659
4056
  * Example of size + offset pagination:
2660
4057
  *
@@ -2753,9 +4150,15 @@ declare type QueryTableVariables = {
2753
4150
  * }
2754
4151
  * ```
2755
4152
  */
2756
- declare const queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
4153
+ declare const queryTable: (variables: QueryTableVariables, signal?: AbortSignal) => Promise<QueryResponse>;
2757
4154
  declare type SearchTablePathParams = {
4155
+ /**
4156
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4157
+ */
2758
4158
  dbBranchName: DBBranchName;
4159
+ /**
4160
+ * The Table name
4161
+ */
2759
4162
  tableName: TableName;
2760
4163
  workspace: string;
2761
4164
  };
@@ -2770,8 +4173,14 @@ declare type SearchTableError = ErrorWrapper<{
2770
4173
  payload: SimpleError;
2771
4174
  }>;
2772
4175
  declare type SearchTableRequestBody = {
4176
+ /**
4177
+ * The query string.
4178
+ *
4179
+ * @minLength 1
4180
+ */
2773
4181
  query: string;
2774
4182
  fuzziness?: FuzzinessExpression;
4183
+ target?: TargetExpression;
2775
4184
  prefix?: PrefixExpression;
2776
4185
  filter?: FilterExpression;
2777
4186
  highlight?: HighlightExpression;
@@ -2788,8 +4197,11 @@ declare type SearchTableVariables = {
2788
4197
  * * filters `$contains`, `$startsWith`, `$endsWith` don't work on columns of type `text`
2789
4198
  * * filtering on columns of type `multiple` is currently unsupported
2790
4199
  */
2791
- declare const searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
4200
+ declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
2792
4201
  declare type SearchBranchPathParams = {
4202
+ /**
4203
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4204
+ */
2793
4205
  dbBranchName: DBBranchName;
2794
4206
  workspace: string;
2795
4207
  };
@@ -2804,92 +4216,257 @@ declare type SearchBranchError = ErrorWrapper<{
2804
4216
  payload: SimpleError;
2805
4217
  }>;
2806
4218
  declare type SearchBranchRequestBody = {
4219
+ /**
4220
+ * 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.
4221
+ */
2807
4222
  tables?: (string | {
4223
+ /**
4224
+ * The name of the table.
4225
+ */
2808
4226
  table: string;
2809
4227
  filter?: FilterExpression;
4228
+ target?: TargetExpression;
2810
4229
  boosters?: BoosterExpression[];
2811
4230
  })[];
4231
+ /**
4232
+ * The query string.
4233
+ *
4234
+ * @minLength 1
4235
+ */
2812
4236
  query: string;
2813
4237
  fuzziness?: FuzzinessExpression;
4238
+ prefix?: PrefixExpression;
2814
4239
  highlight?: HighlightExpression;
2815
4240
  };
2816
- declare type SearchBranchVariables = {
2817
- body: SearchBranchRequestBody;
2818
- pathParams: SearchBranchPathParams;
4241
+ declare type SearchBranchVariables = {
4242
+ body: SearchBranchRequestBody;
4243
+ pathParams: SearchBranchPathParams;
4244
+ } & FetcherExtraProps;
4245
+ /**
4246
+ * Run a free text search operation across the database branch.
4247
+ */
4248
+ declare const searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal) => Promise<SearchResponse>;
4249
+ declare type SummarizeTablePathParams = {
4250
+ /**
4251
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4252
+ */
4253
+ dbBranchName: DBBranchName;
4254
+ /**
4255
+ * The Table name
4256
+ */
4257
+ tableName: TableName;
4258
+ workspace: string;
4259
+ };
4260
+ declare type SummarizeTableError = ErrorWrapper<{
4261
+ status: 400;
4262
+ payload: BadRequestError;
4263
+ } | {
4264
+ status: 401;
4265
+ payload: AuthError;
4266
+ } | {
4267
+ status: 404;
4268
+ payload: SimpleError;
4269
+ }>;
4270
+ declare type SummarizeTableRequestBody = {
4271
+ filters?: FilterExpression;
4272
+ columns?: ColumnsProjection;
4273
+ summaries?: SummaryExpressionList;
4274
+ sort?: SortExpression;
4275
+ summariesFilter?: FilterExpression;
4276
+ };
4277
+ declare type SummarizeTableVariables = {
4278
+ body?: SummarizeTableRequestBody;
4279
+ pathParams: SummarizeTablePathParams;
4280
+ } & FetcherExtraProps;
4281
+ /**
4282
+ * This endpoint allows you to (optionally) define groups, and then to run
4283
+ * calculations on the values in each group. This is most helpful when
4284
+ * you'd like to understand the data you have in your database.
4285
+ *
4286
+ * A group is a combination of unique values. If you create a group for
4287
+ * `sold_by`, `product_name`, we will return one row for every combination
4288
+ * of `sold_by` and `product_name` you have in your database. When you
4289
+ * want to calculate statistics, you define these groups and ask Xata to
4290
+ * calculate data on each group.
4291
+ *
4292
+ * **Some questions you can ask of your data:**
4293
+ *
4294
+ * How many records do I have in this table?
4295
+ * - Set `columns: []` as we we want data from the entire table, so we ask
4296
+ * for no groups.
4297
+ * - Set `summaries: {"total": {"count": "*"}}` in order to see the count
4298
+ * of all records. We use `count: *` here we'd like to know the total
4299
+ * amount of rows; ignoring whether they are `null` or not.
4300
+ *
4301
+ * What are the top total sales for each product in July 2022 and sold
4302
+ * more than 10 units?
4303
+ * - Set `filter: {soldAt: {
4304
+ * "$ge": "2022-07-01T00:00:00.000Z",
4305
+ * "$lt": "2022-08-01T00:00:00.000Z"}
4306
+ * }`
4307
+ * in order to limit the result set to sales recorded in July 2022.
4308
+ * - Set `columns: [product_name]` as we'd like to run calculations on
4309
+ * each unique product name in our table. Setting `columns` like this will
4310
+ * produce one row per unique product name.
4311
+ * - Set `summaries: {"total_sales": {"count": "product_name"}}` as we'd
4312
+ * like to create a field called "total_sales" for each group. This field
4313
+ * will count all rows in each group with non-null product names.
4314
+ * - Set `sort: [{"total_sales": "desc"}]` in order to bring the rows with
4315
+ * the highest total_sales field to the top.
4316
+ * - Set `having: {"total_sales": {"$ge": 10}}` to only send back data
4317
+ * with greater than or equal to 10 units.
4318
+ *
4319
+ * `columns`: tells Xata how to create each group. If you add `product_id`
4320
+ * we will create a new group for every unique `product_id`.
4321
+ *
4322
+ * `summaries`: tells Xata which calculations to run on each group.
4323
+ *
4324
+ * `sort`: tells Xata in which order you'd like to see results. You may
4325
+ * sort by fields specified in `columns` as well as the summary names
4326
+ * defined in `summaries`.
4327
+ *
4328
+ * note: Sorting on summarized values can be slower on very large tables;
4329
+ * this will impact your rate limit significantly more than other queries.
4330
+ * Try use `filter` [coming soon] to reduce the amount of data being
4331
+ * processed in order to reduce impact on your limits.
4332
+ *
4333
+ * `summariesFilter`: tells Xata how to filter the results of a summary.
4334
+ * It has the same syntax as `filter`, however, by using `summariesFilter`
4335
+ * you may also filter on the results of a query.
4336
+ *
4337
+ * note: This is a much slower to use than `filter`. We recommend using
4338
+ * `filter` wherever possible and `summariesFilter` when it's not
4339
+ * possible to use `filter`.
4340
+ */
4341
+ declare const summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal) => Promise<SummarizeResponse>;
4342
+ declare type AggregateTablePathParams = {
4343
+ /**
4344
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4345
+ */
4346
+ dbBranchName: DBBranchName;
4347
+ /**
4348
+ * The Table name
4349
+ */
4350
+ tableName: TableName;
4351
+ workspace: string;
4352
+ };
4353
+ declare type AggregateTableError = ErrorWrapper<{
4354
+ status: 400;
4355
+ payload: BadRequestError;
4356
+ } | {
4357
+ status: 401;
4358
+ payload: AuthError;
4359
+ } | {
4360
+ status: 404;
4361
+ payload: SimpleError;
4362
+ }>;
4363
+ declare type AggregateTableRequestBody = {
4364
+ filter?: FilterExpression;
4365
+ aggs?: AggExpressionMap;
4366
+ };
4367
+ declare type AggregateTableVariables = {
4368
+ body?: AggregateTableRequestBody;
4369
+ pathParams: AggregateTablePathParams;
2819
4370
  } & FetcherExtraProps;
2820
4371
  /**
2821
- * Run a free text search operation across the database branch.
4372
+ * This endpoint allows you to run aggragations (analytics) on the data from one table.
4373
+ * While the summary endpoint is served from PostgreSQL and the results are strongly
4374
+ * consistent, the aggregate endpoint is served from Elasticsearch and the results are
4375
+ * only eventaully consistent. On the other hand, the aggregate endpoint uses a columnar
4376
+ * store that is more appropiate for analytics, makes use of approximative algorithms
4377
+ * (e.g for cardinality), and is generally faster and can do more complex aggregations.
2822
4378
  */
2823
- declare const searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
4379
+ declare const aggregateTable: (variables: AggregateTableVariables) => Promise<AggResponse>;
2824
4380
  declare const operationsByTag: {
2825
4381
  users: {
2826
- getUser: (variables: GetUserVariables) => Promise<UserWithID>;
2827
- updateUser: (variables: UpdateUserVariables) => Promise<UserWithID>;
2828
- deleteUser: (variables: DeleteUserVariables) => Promise<undefined>;
2829
- getUserAPIKeys: (variables: GetUserAPIKeysVariables) => Promise<GetUserAPIKeysResponse>;
2830
- createUserAPIKey: (variables: CreateUserAPIKeyVariables) => Promise<CreateUserAPIKeyResponse>;
2831
- deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables) => Promise<undefined>;
4382
+ getUser: (variables: GetUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
4383
+ updateUser: (variables: UpdateUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
4384
+ deleteUser: (variables: DeleteUserVariables, signal?: AbortSignal) => Promise<undefined>;
4385
+ getUserAPIKeys: (variables: GetUserAPIKeysVariables, signal?: AbortSignal) => Promise<GetUserAPIKeysResponse>;
4386
+ createUserAPIKey: (variables: CreateUserAPIKeyVariables, signal?: AbortSignal) => Promise<CreateUserAPIKeyResponse>;
4387
+ deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
2832
4388
  };
2833
4389
  workspaces: {
2834
- createWorkspace: (variables: CreateWorkspaceVariables) => Promise<Workspace>;
2835
- getWorkspacesList: (variables: GetWorkspacesListVariables) => Promise<GetWorkspacesListResponse>;
2836
- getWorkspace: (variables: GetWorkspaceVariables) => Promise<Workspace>;
2837
- updateWorkspace: (variables: UpdateWorkspaceVariables) => Promise<Workspace>;
2838
- deleteWorkspace: (variables: DeleteWorkspaceVariables) => Promise<undefined>;
2839
- getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables) => Promise<WorkspaceMembers>;
2840
- updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables) => Promise<undefined>;
2841
- removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables) => Promise<undefined>;
2842
- inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<WorkspaceInvite>;
2843
- updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
2844
- cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>;
2845
- resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>;
2846
- acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables) => Promise<undefined>;
4390
+ createWorkspace: (variables: CreateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
4391
+ getWorkspacesList: (variables: GetWorkspacesListVariables, signal?: AbortSignal) => Promise<GetWorkspacesListResponse>;
4392
+ getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
4393
+ updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
4394
+ deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
4395
+ getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal) => Promise<WorkspaceMembers>;
4396
+ updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal) => Promise<undefined>;
4397
+ removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal) => Promise<undefined>;
4398
+ inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
4399
+ updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
4400
+ cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
4401
+ resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
4402
+ acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
2847
4403
  };
2848
4404
  database: {
2849
- getDatabaseList: (variables: GetDatabaseListVariables) => Promise<ListDatabasesResponse>;
2850
- createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
2851
- deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
2852
- getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
2853
- getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
2854
- addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
2855
- removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
2856
- resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
4405
+ getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal) => Promise<ListDatabasesResponse>;
4406
+ createDatabase: (variables: CreateDatabaseVariables, signal?: AbortSignal) => Promise<CreateDatabaseResponse>;
4407
+ deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal) => Promise<undefined>;
4408
+ getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
4409
+ updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
4410
+ getGitBranchesMapping: (variables: GetGitBranchesMappingVariables, signal?: AbortSignal) => Promise<ListGitBranchesResponse>;
4411
+ addGitBranchesEntry: (variables: AddGitBranchesEntryVariables, signal?: AbortSignal) => Promise<AddGitBranchesEntryResponse>;
4412
+ removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal) => Promise<undefined>;
4413
+ resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal) => Promise<ResolveBranchResponse>;
2857
4414
  };
2858
4415
  branch: {
2859
- getBranchList: (variables: GetBranchListVariables) => Promise<ListBranchesResponse>;
2860
- getBranchDetails: (variables: GetBranchDetailsVariables) => Promise<DBBranch>;
2861
- createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
2862
- deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
2863
- updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
2864
- getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
2865
- getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
2866
- executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
2867
- getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
2868
- getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
4416
+ getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
4417
+ getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal) => Promise<DBBranch>;
4418
+ createBranch: (variables: CreateBranchVariables, signal?: AbortSignal) => Promise<CreateBranchResponse>;
4419
+ deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<undefined>;
4420
+ updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal) => Promise<undefined>;
4421
+ getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal) => Promise<BranchMetadata>;
4422
+ getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal) => Promise<GetBranchStatsResponse>;
4423
+ };
4424
+ migrationRequests: {
4425
+ queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal) => Promise<QueryMigrationRequestsResponse>;
4426
+ createMigrationRequest: (variables: CreateMigrationRequestVariables, signal?: AbortSignal) => Promise<CreateMigrationRequestResponse>;
4427
+ getMigrationRequest: (variables: GetMigrationRequestVariables, signal?: AbortSignal) => Promise<MigrationRequest>;
4428
+ updateMigrationRequest: (variables: UpdateMigrationRequestVariables, signal?: AbortSignal) => Promise<undefined>;
4429
+ listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal) => Promise<ListMigrationRequestsCommitsResponse>;
4430
+ compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
4431
+ getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal) => Promise<GetMigrationRequestIsMergedResponse>;
4432
+ mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<Commit>;
4433
+ };
4434
+ branchSchema: {
4435
+ getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal) => Promise<GetBranchMigrationHistoryResponse>;
4436
+ executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<undefined>;
4437
+ getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<BranchMigrationPlan>;
4438
+ compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
4439
+ compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
4440
+ updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal) => Promise<UpdateBranchSchemaResponse>;
4441
+ previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal) => Promise<PreviewBranchSchemaEditResponse>;
4442
+ applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<ApplyBranchSchemaEditResponse>;
4443
+ getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables, signal?: AbortSignal) => Promise<GetBranchSchemaHistoryResponse>;
2869
4444
  };
2870
4445
  table: {
2871
- createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
2872
- deleteTable: (variables: DeleteTableVariables) => Promise<undefined>;
2873
- updateTable: (variables: UpdateTableVariables) => Promise<undefined>;
2874
- getTableSchema: (variables: GetTableSchemaVariables) => Promise<GetTableSchemaResponse>;
2875
- setTableSchema: (variables: SetTableSchemaVariables) => Promise<undefined>;
2876
- getTableColumns: (variables: GetTableColumnsVariables) => Promise<GetTableColumnsResponse>;
2877
- addTableColumn: (variables: AddTableColumnVariables) => Promise<MigrationIdResponse>;
2878
- getColumn: (variables: GetColumnVariables) => Promise<Column>;
2879
- deleteColumn: (variables: DeleteColumnVariables) => Promise<MigrationIdResponse>;
2880
- updateColumn: (variables: UpdateColumnVariables) => Promise<MigrationIdResponse>;
4446
+ createTable: (variables: CreateTableVariables, signal?: AbortSignal) => Promise<CreateTableResponse>;
4447
+ deleteTable: (variables: DeleteTableVariables, signal?: AbortSignal) => Promise<undefined>;
4448
+ updateTable: (variables: UpdateTableVariables, signal?: AbortSignal) => Promise<undefined>;
4449
+ getTableSchema: (variables: GetTableSchemaVariables, signal?: AbortSignal) => Promise<GetTableSchemaResponse>;
4450
+ setTableSchema: (variables: SetTableSchemaVariables, signal?: AbortSignal) => Promise<undefined>;
4451
+ getTableColumns: (variables: GetTableColumnsVariables, signal?: AbortSignal) => Promise<GetTableColumnsResponse>;
4452
+ addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<MigrationIdResponse>;
4453
+ getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
4454
+ deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<MigrationIdResponse>;
4455
+ updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<MigrationIdResponse>;
2881
4456
  };
2882
4457
  records: {
2883
- insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
2884
- insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
2885
- updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<RecordUpdateResponse>;
2886
- upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
2887
- deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
2888
- getRecord: (variables: GetRecordVariables) => Promise<XataRecord$1>;
2889
- bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
2890
- queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
2891
- searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
2892
- searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
4458
+ insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
4459
+ insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
4460
+ updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
4461
+ upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
4462
+ deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
4463
+ getRecord: (variables: GetRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
4464
+ bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal) => Promise<BulkInsertResponse>;
4465
+ queryTable: (variables: QueryTableVariables, signal?: AbortSignal) => Promise<QueryResponse>;
4466
+ searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
4467
+ searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal) => Promise<SearchResponse>;
4468
+ summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal) => Promise<SummarizeResponse>;
4469
+ aggregateTable: (variables: AggregateTableVariables) => Promise<AggResponse>;
2893
4470
  };
2894
4471
  };
2895
4472
 
@@ -2899,6 +4476,10 @@ declare type ProviderBuilder = {
2899
4476
  workspaces: string;
2900
4477
  };
2901
4478
  declare type HostProvider = HostAliases | ProviderBuilder;
4479
+ declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder): string;
4480
+ declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
4481
+ declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
4482
+ declare function parseProviderString(provider?: string): HostProvider | null;
2902
4483
 
2903
4484
  interface XataApiClientOptions {
2904
4485
  fetch?: FetchImpl;
@@ -2915,6 +4496,8 @@ declare class XataApiClient {
2915
4496
  get branches(): BranchApi;
2916
4497
  get tables(): TableApi;
2917
4498
  get records(): RecordsApi;
4499
+ get migrationRequests(): MigrationRequestsApi;
4500
+ get branchSchema(): BranchSchemaApi;
2918
4501
  }
2919
4502
  declare class UserApi {
2920
4503
  private extraProps;
@@ -2950,6 +4533,7 @@ declare class DatabaseApi {
2950
4533
  createDatabase(workspace: WorkspaceID, dbName: DBName, options?: CreateDatabaseRequestBody): Promise<CreateDatabaseResponse>;
2951
4534
  deleteDatabase(workspace: WorkspaceID, dbName: DBName): Promise<void>;
2952
4535
  getDatabaseMetadata(workspace: WorkspaceID, dbName: DBName): Promise<DatabaseMetadata>;
4536
+ updateDatabaseMetadata(workspace: WorkspaceID, dbName: DBName, options?: UpdateDatabaseMetadataRequestBody): Promise<DatabaseMetadata>;
2953
4537
  getGitBranchesMapping(workspace: WorkspaceID, dbName: DBName): Promise<ListGitBranchesResponse>;
2954
4538
  addGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, body: AddGitBranchesEntryRequestBody): Promise<AddGitBranchesEntryResponse>;
2955
4539
  removeGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, gitBranch: string): Promise<void>;
@@ -2964,9 +4548,6 @@ declare class BranchApi {
2964
4548
  deleteBranch(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<void>;
2965
4549
  updateBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName, metadata?: BranchMetadata): Promise<void>;
2966
4550
  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
4551
  getBranchStats(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<GetBranchStatsResponse>;
2971
4552
  }
2972
4553
  declare class TableApi {
@@ -2996,6 +4577,33 @@ declare class RecordsApi {
2996
4577
  queryTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: QueryTableRequestBody): Promise<QueryResponse>;
2997
4578
  searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
2998
4579
  searchBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, query: SearchBranchRequestBody): Promise<SearchResponse>;
4580
+ summarizeTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SummarizeTableRequestBody): Promise<SummarizeResponse>;
4581
+ aggregateTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: AggregateTableRequestBody): Promise<AggResponse>;
4582
+ }
4583
+ declare class MigrationRequestsApi {
4584
+ private extraProps;
4585
+ constructor(extraProps: FetcherExtraProps);
4586
+ queryMigrationRequests(workspace: WorkspaceID, database: DBName, options?: QueryMigrationRequestsRequestBody): Promise<QueryMigrationRequestsResponse>;
4587
+ createMigrationRequest(workspace: WorkspaceID, database: DBName, options: CreateMigrationRequestRequestBody): Promise<CreateMigrationRequestResponse>;
4588
+ getMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<MigrationRequest>;
4589
+ updateMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number, options: UpdateMigrationRequestRequestBody): Promise<void>;
4590
+ listMigrationRequestsCommits(workspace: WorkspaceID, database: DBName, migrationRequest: number, options?: ListMigrationRequestsCommitsRequestBody): Promise<ListMigrationRequestsCommitsResponse>;
4591
+ compareMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<SchemaCompareResponse>;
4592
+ getMigrationRequestIsMerged(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<GetMigrationRequestIsMergedResponse>;
4593
+ mergeMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<Commit>;
4594
+ }
4595
+ declare class BranchSchemaApi {
4596
+ private extraProps;
4597
+ constructor(extraProps: FetcherExtraProps);
4598
+ getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
4599
+ executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
4600
+ getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
4601
+ compareBranchWithUserSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
4602
+ compareBranchSchemas(workspace: WorkspaceID, database: DBName, branch: BranchName, branchName: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
4603
+ updateBranchSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<UpdateBranchSchemaResponse>;
4604
+ previewBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<PreviewBranchSchemaEditResponse>;
4605
+ applyBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, edits: SchemaEditScript): Promise<ApplyBranchSchemaEditResponse>;
4606
+ getBranchSchemaHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchSchemaHistoryRequestBody): Promise<GetBranchSchemaHistoryResponse>;
2999
4607
  }
3000
4608
 
3001
4609
  declare class XataApiPlugin implements XataPlugin {
@@ -3013,13 +4621,28 @@ declare type RequiredBy<T, K extends keyof T> = T & {
3013
4621
  };
3014
4622
  declare type GetArrayInnerType<T extends readonly any[]> = T[number];
3015
4623
  declare type SingleOrArray<T> = T | T[];
4624
+ declare type Dictionary<T> = Record<string, T>;
3016
4625
  declare type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
3017
4626
  declare type Without<T, U> = {
3018
4627
  [P in Exclude<keyof T, keyof U>]?: never;
3019
4628
  };
3020
4629
  declare type ExclusiveOr<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
4630
+ declare type Explode<T> = keyof T extends infer K ? K extends unknown ? {
4631
+ [I in keyof T]: I extends K ? T[I] : never;
4632
+ } : never : never;
4633
+ declare type AtMostOne<T> = Explode<Partial<T>>;
4634
+ declare type AtLeastOne<T, U = {
4635
+ [K in keyof T]: Pick<T, K>;
4636
+ }> = Partial<T> & U[keyof U];
4637
+ declare type ExactlyOne<T> = AtMostOne<T> & AtLeastOne<T>;
3021
4638
 
3022
4639
  declare type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
4640
+ declare type WildcardColumns<O> = Values<{
4641
+ [K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
4642
+ }>;
4643
+ declare type ColumnsByValue<O extends XataRecord, Value> = Values<{
4644
+ [K in SelectableColumn<O>]: ValueAtColumn<O, K> extends infer C ? C extends Value ? K extends WildcardColumns<O> ? never : K : never : never;
4645
+ }>;
3023
4646
  declare type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
3024
4647
  [K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
3025
4648
  }>>;
@@ -3101,25 +4724,7 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
3101
4724
  */
3102
4725
  delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3103
4726
  }
3104
- declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update'> & {
3105
- /**
3106
- * Retrieves a refreshed copy of the current record from the database.
3107
- */
3108
- read<K extends SelectableColumn<Record>>(columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>> | null>;
3109
- /**
3110
- * Performs a partial update of the current record. On success a new object is
3111
- * returned and the current object is not mutated.
3112
- * @param partialUpdate The columns and their values that have to be updated.
3113
- * @returns A new record containing the latest values for all the columns of the current record.
3114
- */
3115
- update<K extends SelectableColumn<Record>>(partialUpdate: Partial<EditableData<Record>>, columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>>>;
3116
- /**
3117
- * Performs a deletion of the current record in the database.
3118
- *
3119
- * @throws If the record was already deleted or if an error happened while performing the deletion.
3120
- */
3121
- delete(): Promise<void>;
3122
- };
4727
+ declare type Link<Record extends XataRecord> = XataRecord<Record>;
3123
4728
  declare type XataRecordMetadata = {
3124
4729
  /**
3125
4730
  * Number that is increased every time the record is updated.
@@ -3229,7 +4834,7 @@ declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFi
3229
4834
  declare type NestedApiFilter<T> = {
3230
4835
  [key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
3231
4836
  };
3232
- declare type Filter<T> = T extends Record<string, any> ? T extends Date ? PropertyFilter<T> : BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
4837
+ 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>;
3233
4838
 
3234
4839
  declare type DateBooster = {
3235
4840
  origin?: string;
@@ -3263,6 +4868,21 @@ declare type Boosters<O extends XataRecord> = Values<{
3263
4868
  } : never;
3264
4869
  }>;
3265
4870
 
4871
+ declare type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
4872
+ /**
4873
+ * The name of the column.
4874
+ */
4875
+ column: SelectableColumn<T>;
4876
+ /**
4877
+ * The weight of the column.
4878
+ *
4879
+ * @default 1
4880
+ * @maximum 10
4881
+ * @minimum 1
4882
+ */
4883
+ weight?: number;
4884
+ };
4885
+
3266
4886
  declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
3267
4887
  fuzziness?: FuzzinessExpression;
3268
4888
  prefix?: PrefixExpression;
@@ -3270,6 +4890,7 @@ declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables exte
3270
4890
  tables?: Array<Tables | Values<{
3271
4891
  [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
3272
4892
  table: Model;
4893
+ target?: TargetColumn<Schemas[Model] & XataRecord>[];
3273
4894
  filter?: Filter<SelectedPick<Schemas[Model] & XataRecord, ['*']>>;
3274
4895
  boosters?: Boosters<Schemas[Model] & XataRecord>[];
3275
4896
  };
@@ -3309,6 +4930,191 @@ declare type ExtractTables<Schemas extends Record<string, BaseData>, Tables exte
3309
4930
  table: infer Table;
3310
4931
  } ? ReturnTable<Table, Tables> : never;
3311
4932
 
4933
+ /**
4934
+ * The description of a single aggregation operation. The key represents the
4935
+ */
4936
+ declare type AggregationExpression<O extends XataRecord> = ExactlyOne<{
4937
+ count: CountAggregation<O>;
4938
+ sum: SumAggregation<O>;
4939
+ max: MaxAggregation<O>;
4940
+ min: MinAggregation<O>;
4941
+ average: AverageAggregation<O>;
4942
+ uniqueCount: UniqueCountAggregation<O>;
4943
+ dateHistogram: DateHistogramAggregation<O>;
4944
+ topValues: TopValuesAggregation<O>;
4945
+ numericHistogram: NumericHistogramAggregation<O>;
4946
+ }>;
4947
+ declare type AggregationResult<Record extends XataRecord, Expression extends Dictionary<AggregationExpression<Record>>> = {
4948
+ aggs: {
4949
+ [K in keyof Expression]: AggregationResultItem<Record, Expression[K]>;
4950
+ };
4951
+ };
4952
+ declare type AggregationExpressionType<T extends AggregationExpression<any>> = keyof T;
4953
+ declare type AggregationResultItem<Record extends XataRecord, Expression extends AggregationExpression<Record>> = AggregationExpressionType<Expression> extends infer Type ? Type extends keyof AggregationExpressionResultTypes ? AggregationExpressionResultTypes[Type] : never : never;
4954
+ /**
4955
+ * Count the number of records with an optional filter.
4956
+ */
4957
+ declare type CountAggregation<O extends XataRecord> = {
4958
+ filter?: Filter<O>;
4959
+ } | '*';
4960
+ /**
4961
+ * The sum of the numeric values in a particular column.
4962
+ */
4963
+ declare type SumAggregation<O extends XataRecord> = {
4964
+ /**
4965
+ * The column on which to compute the sum. Must be a numeric type.
4966
+ */
4967
+ column: ColumnsByValue<O, number>;
4968
+ };
4969
+ /**
4970
+ * The max of the numeric values in a particular column.
4971
+ */
4972
+ declare type MaxAggregation<O extends XataRecord> = {
4973
+ /**
4974
+ * The column on which to compute the max. Must be a numeric type.
4975
+ */
4976
+ column: ColumnsByValue<O, number>;
4977
+ };
4978
+ /**
4979
+ * The min of the numeric values in a particular column.
4980
+ */
4981
+ declare type MinAggregation<O extends XataRecord> = {
4982
+ /**
4983
+ * The column on which to compute the min. Must be a numeric type.
4984
+ */
4985
+ column: ColumnsByValue<O, number>;
4986
+ };
4987
+ /**
4988
+ * The average of the numeric values in a particular column.
4989
+ */
4990
+ declare type AverageAggregation<O extends XataRecord> = {
4991
+ /**
4992
+ * The column on which to compute the average. Must be a numeric type.
4993
+ */
4994
+ column: ColumnsByValue<O, number>;
4995
+ };
4996
+ /**
4997
+ * Count the number of distinct values in a particular column.
4998
+ */
4999
+ declare type UniqueCountAggregation<O extends XataRecord> = {
5000
+ /**
5001
+ * The column from where to count the unique values.
5002
+ */
5003
+ column: ColumnsByValue<O, any>;
5004
+ /**
5005
+ * The threshold under which the unique count is exact. If the number of unique
5006
+ * values in the column is higher than this threshold, the results are approximative.
5007
+ * Maximum value is 40,000, default value is 3000.
5008
+ */
5009
+ precisionThreshold?: number;
5010
+ };
5011
+ /**
5012
+ * Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
5013
+ */
5014
+ declare type DateHistogramAggregation<O extends XataRecord> = {
5015
+ /**
5016
+ * The column to use for bucketing. Must be of type datetime.
5017
+ */
5018
+ column: ColumnsByValue<O, Date>;
5019
+ /**
5020
+ * The fixed interval to use when bucketing.
5021
+ * It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
5022
+ *
5023
+ * @pattern ^(\d+)(d|h|m|s|ms)$
5024
+ */
5025
+ interval?: string;
5026
+ /**
5027
+ * The calendar-aware interval to use when bucketing. Possible values are: `minute`,
5028
+ * `hour`, `day`, `week`, `month`, `quarter`, `year`.
5029
+ */
5030
+ calendarInterval?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
5031
+ /**
5032
+ * The timezone to use for bucketing. By default, UTC is assumed.
5033
+ * The accepted format is as an ISO 8601 UTC offset. For example: `+01:00` or
5034
+ * `-08:00`.
5035
+ *
5036
+ * @pattern ^[+-][01]\d:[0-5]\d$
5037
+ */
5038
+ timezone?: string;
5039
+ aggs?: Dictionary<AggregationExpression<O>>;
5040
+ };
5041
+ /**
5042
+ * Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
5043
+ * The top values as ordered by the number of records (`$count``) are returned.
5044
+ */
5045
+ declare type TopValuesAggregation<O extends XataRecord> = {
5046
+ /**
5047
+ * The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
5048
+ */
5049
+ column: ColumnsByValue<O, string | number | boolean>;
5050
+ aggs?: Dictionary<AggregationExpression<O>>;
5051
+ /**
5052
+ * The maximum number of unique values to return.
5053
+ *
5054
+ * @default 10
5055
+ * @maximum 1000
5056
+ */
5057
+ size?: number;
5058
+ };
5059
+ /**
5060
+ * Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
5061
+ */
5062
+ declare type NumericHistogramAggregation<O extends XataRecord> = {
5063
+ /**
5064
+ * The column to use for bucketing. Must be of numeric type.
5065
+ */
5066
+ column: ColumnsByValue<O, number>;
5067
+ /**
5068
+ * The numeric interval to use for bucketing. The resulting buckets will be ranges
5069
+ * with this value as size.
5070
+ *
5071
+ * @minimum 0
5072
+ */
5073
+ interval: number;
5074
+ /**
5075
+ * By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
5076
+ * boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
5077
+ * but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
5078
+ * to 50.
5079
+ *
5080
+ * @default 0
5081
+ */
5082
+ offset?: number;
5083
+ aggs?: Dictionary<AggregationExpression<O>>;
5084
+ };
5085
+ declare type AggregationExpressionResultTypes = {
5086
+ count: number;
5087
+ sum: number;
5088
+ max: number;
5089
+ min: number;
5090
+ average: number;
5091
+ uniqueCount: number;
5092
+ dateHistogram: DateHistogramAggregationResult;
5093
+ topValues: TopValuesAggregationResult;
5094
+ numericHistogram: NumericHistogramAggregationResult;
5095
+ };
5096
+ declare type DateHistogramAggregationResult = {
5097
+ values?: {
5098
+ $key?: string | number;
5099
+ $count?: number;
5100
+ [key: string]: any;
5101
+ }[];
5102
+ };
5103
+ declare type TopValuesAggregationResult = {
5104
+ values?: {
5105
+ $key?: string | number;
5106
+ $count?: number;
5107
+ [key: string]: any;
5108
+ }[];
5109
+ };
5110
+ declare type NumericHistogramAggregationResult = {
5111
+ values?: {
5112
+ $key?: string | number;
5113
+ $count?: number;
5114
+ [key: string]: any;
5115
+ }[];
5116
+ };
5117
+
3312
5118
  declare type SortDirection = 'asc' | 'desc';
3313
5119
  declare type SortFilterExtended<T extends XataRecord> = {
3314
5120
  column: SelectableColumn<T>;
@@ -3344,7 +5150,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3344
5150
  #private;
3345
5151
  readonly meta: PaginationQueryMeta;
3346
5152
  readonly records: RecordArray<Result>;
3347
- constructor(repository: Repository<Record> | null, table: string, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
5153
+ constructor(repository: Repository<Record> | null, table: {
5154
+ name: string;
5155
+ schema?: Table;
5156
+ }, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
3348
5157
  getQueryOptions(): QueryOptions<Record>;
3349
5158
  key(): string;
3350
5159
  /**
@@ -3397,7 +5206,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3397
5206
  * @param filters A filter object
3398
5207
  * @returns A new Query object.
3399
5208
  */
3400
- filter(filters: Filter<Record>): Query<Record, Result>;
5209
+ filter(filters?: Filter<Record>): Query<Record, Result>;
3401
5210
  /**
3402
5211
  * Builds a new query with a new sort option.
3403
5212
  * @param column The column name.
@@ -3520,6 +5329,26 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3520
5329
  * @returns The first record that matches the query, or null if no record matched the query.
3521
5330
  */
3522
5331
  getFirst(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'>): Promise<Result | null>;
5332
+ /**
5333
+ * Performs the query in the database and returns the first result.
5334
+ * @returns The first record that matches the query, or null if no record matched the query.
5335
+ * @throws if there are no results.
5336
+ */
5337
+ getFirstOrThrow(): Promise<Result>;
5338
+ /**
5339
+ * Performs the query in the database and returns the first result.
5340
+ * @param options Additional options to be used when performing the query.
5341
+ * @returns The first record that matches the query, or null if no record matched the query.
5342
+ * @throws if there are no results.
5343
+ */
5344
+ getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>>;
5345
+ /**
5346
+ * Performs the query in the database and returns the first result.
5347
+ * @param options Additional options to be used when performing the query.
5348
+ * @returns The first record that matches the query, or null if no record matched the query.
5349
+ * @throws if there are no results.
5350
+ */
5351
+ getFirstOrThrow(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'>): Promise<Result>;
3523
5352
  /**
3524
5353
  * Builds a new query object adding a cache TTL in milliseconds.
3525
5354
  * @param ttl The cache TTL in milliseconds.
@@ -3759,6 +5588,66 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
3759
5588
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
3760
5589
  */
3761
5590
  abstract read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5591
+ /**
5592
+ * Queries a single record from the table given its unique id.
5593
+ * @param id The unique id.
5594
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5595
+ * @returns The persisted record for the given id.
5596
+ * @throws If the record could not be found.
5597
+ */
5598
+ abstract readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5599
+ /**
5600
+ * Queries a single record from the table given its unique id.
5601
+ * @param id The unique id.
5602
+ * @returns The persisted record for the given id.
5603
+ * @throws If the record could not be found.
5604
+ */
5605
+ abstract readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5606
+ /**
5607
+ * Queries multiple records from the table given their unique id.
5608
+ * @param ids The unique ids array.
5609
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5610
+ * @returns The persisted records for the given ids in order.
5611
+ * @throws If one or more records could not be found.
5612
+ */
5613
+ abstract readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5614
+ /**
5615
+ * Queries multiple records from the table given their unique id.
5616
+ * @param ids The unique ids array.
5617
+ * @returns The persisted records for the given ids in order.
5618
+ * @throws If one or more records could not be found.
5619
+ */
5620
+ abstract readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5621
+ /**
5622
+ * Queries a single record from the table by the id in the object.
5623
+ * @param object Object containing the id of the record.
5624
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5625
+ * @returns The persisted record for the given id.
5626
+ * @throws If the record could not be found.
5627
+ */
5628
+ abstract readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5629
+ /**
5630
+ * Queries a single record from the table by the id in the object.
5631
+ * @param object Object containing the id of the record.
5632
+ * @returns The persisted record for the given id.
5633
+ * @throws If the record could not be found.
5634
+ */
5635
+ abstract readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5636
+ /**
5637
+ * Queries multiple records from the table by the ids in the objects.
5638
+ * @param objects Array of objects containing the ids of the records.
5639
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5640
+ * @returns The persisted records for the given ids in order.
5641
+ * @throws If one or more records could not be found.
5642
+ */
5643
+ abstract readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5644
+ /**
5645
+ * Queries multiple records from the table by the ids in the objects.
5646
+ * @param objects Array of objects containing the ids of the records.
5647
+ * @returns The persisted records for the given ids in order.
5648
+ * @throws If one or more records could not be found.
5649
+ */
5650
+ abstract readOrThrow(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3762
5651
  /**
3763
5652
  * Partially update a single record.
3764
5653
  * @param object An object with its id and the columns to be updated.
@@ -3800,6 +5689,53 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
3800
5689
  * @returns Array of the persisted records in order (if a record could not be found null is returned).
3801
5690
  */
3802
5691
  abstract update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5692
+ /**
5693
+ * Partially update a single record.
5694
+ * @param object An object with its id and the columns to be updated.
5695
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5696
+ * @returns The full persisted record.
5697
+ * @throws If the record could not be found.
5698
+ */
5699
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5700
+ /**
5701
+ * Partially update a single record.
5702
+ * @param object An object with its id and the columns to be updated.
5703
+ * @returns The full persisted record.
5704
+ * @throws If the record could not be found.
5705
+ */
5706
+ abstract updateOrThrow(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5707
+ /**
5708
+ * Partially update a single record given its unique id.
5709
+ * @param id The unique id.
5710
+ * @param object The column names and their values that have to be updated.
5711
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5712
+ * @returns The full persisted record.
5713
+ * @throws If the record could not be found.
5714
+ */
5715
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5716
+ /**
5717
+ * Partially update a single record given its unique id.
5718
+ * @param id The unique id.
5719
+ * @param object The column names and their values that have to be updated.
5720
+ * @returns The full persisted record.
5721
+ * @throws If the record could not be found.
5722
+ */
5723
+ abstract updateOrThrow(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5724
+ /**
5725
+ * Partially updates multiple records.
5726
+ * @param objects An array of objects with their ids and columns to be updated.
5727
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5728
+ * @returns Array of the persisted records in order.
5729
+ * @throws If one or more records could not be found.
5730
+ */
5731
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5732
+ /**
5733
+ * Partially updates multiple records.
5734
+ * @param objects An array of objects with their ids and columns to be updated.
5735
+ * @returns Array of the persisted records in order.
5736
+ * @throws If one or more records could not be found.
5737
+ */
5738
+ abstract updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3803
5739
  /**
3804
5740
  * Creates or updates a single record. If a record exists with the given id,
3805
5741
  * it will be update, otherwise a new record will be created.
@@ -3899,6 +5835,66 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
3899
5835
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
3900
5836
  */
3901
5837
  abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5838
+ /**
5839
+ * Deletes a record given its unique id.
5840
+ * @param object An object with a unique id.
5841
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5842
+ * @returns The deleted record, null if the record could not be found.
5843
+ * @throws If the record could not be found.
5844
+ */
5845
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5846
+ /**
5847
+ * Deletes a record given its unique id.
5848
+ * @param object An object with a unique id.
5849
+ * @returns The deleted record, null if the record could not be found.
5850
+ * @throws If the record could not be found.
5851
+ */
5852
+ abstract deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5853
+ /**
5854
+ * Deletes a record given a unique id.
5855
+ * @param id The unique id.
5856
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5857
+ * @returns The deleted record, null if the record could not be found.
5858
+ * @throws If the record could not be found.
5859
+ */
5860
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5861
+ /**
5862
+ * Deletes a record given a unique id.
5863
+ * @param id The unique id.
5864
+ * @returns The deleted record, null if the record could not be found.
5865
+ * @throws If the record could not be found.
5866
+ */
5867
+ abstract deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5868
+ /**
5869
+ * Deletes multiple records given an array of objects with ids.
5870
+ * @param objects An array of objects with unique ids.
5871
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5872
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5873
+ * @throws If one or more records could not be found.
5874
+ */
5875
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5876
+ /**
5877
+ * Deletes multiple records given an array of objects with ids.
5878
+ * @param objects An array of objects with unique ids.
5879
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5880
+ * @throws If one or more records could not be found.
5881
+ */
5882
+ abstract deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5883
+ /**
5884
+ * Deletes multiple records given an array of unique ids.
5885
+ * @param objects An array of ids.
5886
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5887
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5888
+ * @throws If one or more records could not be found.
5889
+ */
5890
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5891
+ /**
5892
+ * Deletes multiple records given an array of unique ids.
5893
+ * @param objects An array of ids.
5894
+ * @returns Array of the deleted records in order.
5895
+ * @throws If one or more records could not be found.
5896
+ */
5897
+ abstract deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3902
5898
  /**
3903
5899
  * Search for records in the table.
3904
5900
  * @param query The query to search for.
@@ -3912,6 +5908,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
3912
5908
  filter?: Filter<Record>;
3913
5909
  boosters?: Boosters<Record>[];
3914
5910
  }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
5911
+ /**
5912
+ * Aggregates records in the table.
5913
+ * @param expression The aggregations to perform.
5914
+ * @param filter The filter to apply to the queried records.
5915
+ * @returns The requested aggregations.
5916
+ */
5917
+ abstract aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(expression?: Expression, filter?: Filter<Record>): Promise<AggregationResult<Record, Expression>>;
3915
5918
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
3916
5919
  }
3917
5920
  declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
@@ -3936,12 +5939,26 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
3936
5939
  read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
3937
5940
  read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
3938
5941
  read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5942
+ readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5943
+ readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5944
+ readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5945
+ readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5946
+ readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5947
+ readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5948
+ readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5949
+ readOrThrow(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3939
5950
  update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3940
5951
  update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3941
5952
  update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3942
5953
  update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3943
5954
  update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
3944
5955
  update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5956
+ updateOrThrow<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5957
+ updateOrThrow(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5958
+ updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5959
+ updateOrThrow(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5960
+ updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5961
+ updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3945
5962
  createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3946
5963
  createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3947
5964
  createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
@@ -3956,6 +5973,14 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
3956
5973
  delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
3957
5974
  delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
3958
5975
  delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5976
+ deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5977
+ deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5978
+ deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5979
+ deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5980
+ deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5981
+ deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5982
+ deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5983
+ deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3959
5984
  search(query: string, options?: {
3960
5985
  fuzziness?: FuzzinessExpression;
3961
5986
  prefix?: PrefixExpression;
@@ -3963,6 +5988,7 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
3963
5988
  filter?: Filter<Record>;
3964
5989
  boosters?: Boosters<Record>[];
3965
5990
  }): Promise<any>;
5991
+ aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
3966
5992
  query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
3967
5993
  }
3968
5994
 
@@ -3971,6 +5997,7 @@ declare type BaseSchema = {
3971
5997
  columns: readonly ({
3972
5998
  name: string;
3973
5999
  type: Column['type'];
6000
+ notNull?: boolean;
3974
6001
  } | {
3975
6002
  name: string;
3976
6003
  type: 'link';
@@ -4000,10 +6027,10 @@ declare type TableType<Tables, TableName> = Tables & {
4000
6027
  } ? Columns extends readonly unknown[] ? Columns[number] extends {
4001
6028
  name: string;
4002
6029
  type: string;
4003
- } ? Identifiable & {
4004
- [K in Columns[number]['name']]?: PropertyType<Tables, Columns[number], K>;
4005
- } : never : never : never : never;
4006
- declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
6030
+ } ? Identifiable & UnionToIntersection<Values<{
6031
+ [K in Columns[number]['name']]: PropertyType<Tables, Columns[number], K>;
6032
+ }>> : never : never : never : never;
6033
+ declare type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Properties & {
4007
6034
  name: PropertyName;
4008
6035
  } extends infer Property ? Property extends {
4009
6036
  name: string;
@@ -4012,12 +6039,18 @@ declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
4012
6039
  table: infer LinkedTable;
4013
6040
  };
4014
6041
  columns?: infer ObjectColumns;
4015
- } ? (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 {
6042
+ notNull?: infer NotNull;
6043
+ } ? NotNull extends true ? {
6044
+ [K in PropertyName]: InnerType<Type, ObjectColumns, Tables, LinkedTable>;
6045
+ } : {
6046
+ [K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
6047
+ } : never : never;
6048
+ 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 {
4016
6049
  name: string;
4017
6050
  type: string;
4018
- } ? {
4019
- [K in ObjectColumns[number]['name']]?: PropertyType<Tables, ObjectColumns[number], K>;
4020
- } : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never) | null : never : never;
6051
+ } ? UnionToIntersection<Values<{
6052
+ [K in ObjectColumns[number]['name']]: PropertyType<Tables, ObjectColumns[number], K>;
6053
+ }>> : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never;
4021
6054
 
4022
6055
  /**
4023
6056
  * Operator to restrict results to only values that are greater than the given value.
@@ -4125,8 +6158,6 @@ declare type SchemaDefinition = {
4125
6158
  };
4126
6159
  declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
4127
6160
  [Key in keyof Schemas]: Repository<Schemas[Key]>;
4128
- } & {
4129
- [key: string]: Repository<XataRecord>;
4130
6161
  };
4131
6162
  declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
4132
6163
  #private;
@@ -4270,4 +6301,4 @@ declare class XataError extends Error {
4270
6301
  constructor(message: string, status: number);
4271
6302
  }
4272
6303
 
4273
- 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, equals, 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, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
6304
+ export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditResponse, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, 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, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, 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, aggregateTable, applyBranchSchemaEdit, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, pattern, previewBranchSchemaEdit, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };