@xata.io/client 0.0.0-alpha.vfe4a947 → 0.0.0-alpha.vfe9bed6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  declare type AttributeDictionary = Record<string, string | number | boolean | undefined>;
2
2
  declare type TraceFunction = <T>(name: string, fn: (options: {
3
3
  setAttributes: (attrs: AttributeDictionary) => void;
4
- onError: (message: string) => void;
5
4
  }) => T, options?: AttributeDictionary) => Promise<T>;
6
5
 
7
6
  declare type FetchImpl = (url: string, init?: {
@@ -17,7 +16,7 @@ declare type FetchImpl = (url: string, init?: {
17
16
  get(name: string): string | null;
18
17
  };
19
18
  }>;
20
- declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Record<string, string>) => string;
19
+ declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
21
20
  declare type FetcherExtraProps = {
22
21
  apiUrl: string;
23
22
  workspacesApiUrl: string | WorkspaceApiUrlBuilder;
@@ -69,6 +68,9 @@ declare type XataPluginOptions = {
69
68
  * @version 1.0
70
69
  */
71
70
  declare type User = {
71
+ /**
72
+ * @format email
73
+ */
72
74
  email: string;
73
75
  fullname: string;
74
76
  image: string;
@@ -100,7 +102,7 @@ declare type WorkspaceID = string;
100
102
  declare type Role = 'owner' | 'maintainer';
101
103
  declare type WorkspaceMeta = {
102
104
  name: string;
103
- slug: string;
105
+ slug?: string;
104
106
  };
105
107
  declare type Workspace = WorkspaceMeta & {
106
108
  id: WorkspaceID;
@@ -110,6 +112,9 @@ declare type Workspace = WorkspaceMeta & {
110
112
  declare type WorkspaceMember = {
111
113
  userId: UserID;
112
114
  fullname: string;
115
+ /**
116
+ * @format email
117
+ */
113
118
  email: string;
114
119
  role: Role;
115
120
  };
@@ -119,7 +124,13 @@ declare type WorkspaceMember = {
119
124
  declare type InviteID = string;
120
125
  declare type WorkspaceInvite = {
121
126
  inviteId: InviteID;
127
+ /**
128
+ * @format email
129
+ */
122
130
  email: string;
131
+ /**
132
+ * @format date-time
133
+ */
123
134
  expires: string;
124
135
  role: Role;
125
136
  };
@@ -135,20 +146,36 @@ declare type InviteKey = string;
135
146
  * Metadata of databases
136
147
  */
137
148
  declare type DatabaseMetadata = {
149
+ /**
150
+ * The machine-readable name of a database
151
+ */
138
152
  name: string;
139
- displayName: string;
153
+ /**
154
+ * The time this database was created
155
+ */
140
156
  createdAt: DateTime;
157
+ /**
158
+ * The number of branches the database has
159
+ */
141
160
  numberOfBranches: number;
161
+ /**
162
+ * Metadata about the database for display in Xata user interfaces
163
+ */
142
164
  ui?: {
165
+ /**
166
+ * The user-selected color for this database across interfaces
167
+ */
143
168
  color?: string;
144
169
  };
145
170
  };
146
171
  declare type ListDatabasesResponse = {
172
+ /**
173
+ * A list of databases in a Xata workspace
174
+ */
147
175
  databases?: DatabaseMetadata[];
148
176
  };
149
177
  declare type ListBranchesResponse = {
150
178
  databaseName: string;
151
- displayName: string;
152
179
  branches: Branch[];
153
180
  };
154
181
  declare type ListGitBranchesResponse = {
@@ -166,8 +193,14 @@ declare type Branch = {
166
193
  * @x-go-type xata.BranchMetadata
167
194
  */
168
195
  declare type BranchMetadata = {
196
+ /**
197
+ * @minLength 1
198
+ */
169
199
  repository?: string;
170
200
  branch?: BranchName;
201
+ /**
202
+ * @minLength 1
203
+ */
171
204
  stage?: string;
172
205
  labels?: string[];
173
206
  };
@@ -194,12 +227,28 @@ declare type Schema = {
194
227
  tables: Table[];
195
228
  tablesOrder?: string[];
196
229
  };
230
+ /**
231
+ * @x-internal true
232
+ */
233
+ declare type SchemaEditScript = {
234
+ sourceMigrationID?: string;
235
+ targetMigrationID?: string;
236
+ tables: TableEdit[];
237
+ };
197
238
  declare type Table = {
198
239
  id?: string;
199
240
  name: TableName;
200
241
  columns: Column[];
201
242
  revLinks?: RevLink[];
202
243
  };
244
+ /**
245
+ * @x-internal true
246
+ */
247
+ declare type TableEdit = {
248
+ oldName?: string;
249
+ newName?: string;
250
+ columns?: MigrationColumnOp[];
251
+ };
203
252
  /**
204
253
  * @x-go-type xata.Column
205
254
  */
@@ -209,6 +258,8 @@ declare type Column = {
209
258
  link?: {
210
259
  table: string;
211
260
  };
261
+ notNull?: boolean;
262
+ unique?: boolean;
212
263
  columns?: Column[];
213
264
  };
214
265
  declare type RevLink = {
@@ -275,6 +326,137 @@ declare type ColumnMigration = {
275
326
  old: Column;
276
327
  ['new']: Column;
277
328
  };
329
+ /**
330
+ * @x-internal true
331
+ */
332
+ declare type Commit = {
333
+ meta?: {
334
+ title?: string;
335
+ message?: string;
336
+ id: string;
337
+ parentID?: string;
338
+ mergeParentID?: string;
339
+ status: string;
340
+ createdAt: DateTime;
341
+ modifiedAt?: DateTime;
342
+ };
343
+ operations: MigrationOp[];
344
+ };
345
+ /**
346
+ * Branch schema migration.
347
+ *
348
+ * @x-internal true
349
+ */
350
+ declare type Migration = {
351
+ parentID?: string;
352
+ operations: MigrationOp[];
353
+ };
354
+ /**
355
+ * Branch schema migration operations.
356
+ *
357
+ * @x-internal true
358
+ */
359
+ declare type MigrationOp = MigrationTableOp | MigrationColumnOp;
360
+ /**
361
+ * @x-internal true
362
+ */
363
+ declare type MigrationTableOp = {
364
+ addTable: TableOpAdd;
365
+ } | {
366
+ removeTable: TableOpRemove;
367
+ } | {
368
+ renameTable: TableOpRename;
369
+ };
370
+ /**
371
+ * @x-internal true
372
+ */
373
+ declare type MigrationColumnOp = {
374
+ addColumn: ColumnOpAdd;
375
+ } | {
376
+ removeColumn: ColumnOpRemove;
377
+ } | {
378
+ renameColumn: ColumnOpRename;
379
+ };
380
+ /**
381
+ * @x-internal true
382
+ */
383
+ declare type TableOpAdd = {
384
+ table: string;
385
+ };
386
+ /**
387
+ * @x-internal true
388
+ */
389
+ declare type TableOpRemove = {
390
+ table: string;
391
+ };
392
+ /**
393
+ * @x-internal true
394
+ */
395
+ declare type TableOpRename = {
396
+ oldName: string;
397
+ newName: string;
398
+ };
399
+ /**
400
+ * @x-internal true
401
+ */
402
+ declare type ColumnOpAdd = {
403
+ table?: string;
404
+ column: Column;
405
+ };
406
+ /**
407
+ * @x-internal true
408
+ */
409
+ declare type ColumnOpRemove = {
410
+ table?: string;
411
+ column: string;
412
+ };
413
+ /**
414
+ * @x-internal true
415
+ */
416
+ declare type ColumnOpRename = {
417
+ table?: string;
418
+ oldName: string;
419
+ newName: string;
420
+ };
421
+ declare type MigrationRequest = {
422
+ /**
423
+ * The migration request number.
424
+ */
425
+ number: number;
426
+ /**
427
+ * Migration request creation timestamp.
428
+ */
429
+ createdAt: DateTime;
430
+ /**
431
+ * Last modified timestamp.
432
+ */
433
+ modifiedAt?: DateTime;
434
+ /**
435
+ * Timestamp when the migration request was closed.
436
+ */
437
+ closedAt?: DateTime;
438
+ /**
439
+ * Timestamp when the migration request was merged.
440
+ */
441
+ mergedAt?: DateTime;
442
+ status: 'open' | 'closed' | 'merging' | 'merged';
443
+ /**
444
+ * The migration request title.
445
+ */
446
+ title: string;
447
+ /**
448
+ * The migration request body with detailed description.
449
+ */
450
+ body: string;
451
+ /**
452
+ * Name of the source branch.
453
+ */
454
+ source: string;
455
+ /**
456
+ * Name of the target branch.
457
+ */
458
+ target: string;
459
+ };
278
460
  declare type SortExpression = string[] | {
279
461
  [key: string]: SortOrder;
280
462
  } | {
@@ -283,7 +465,7 @@ declare type SortExpression = string[] | {
283
465
  declare type SortOrder = 'asc' | 'desc';
284
466
  /**
285
467
  * Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
286
- * distance is the number of one charcter changes needed to make two strings equal. The default is 1, meaning that single
468
+ * distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
287
469
  * character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
288
470
  * to allow two typos in a word.
289
471
  *
@@ -309,8 +491,52 @@ declare type FilterExpression = {
309
491
  } & {
310
492
  [key: string]: FilterColumn;
311
493
  };
494
+ /**
495
+ * The description of the summaries you wish to receive. Set each key to be the field name
496
+ * you'd like for the summary. These names must not collide with other columns you've
497
+ * requested from `columns`; including implicit requests like `settings.*`.
498
+ *
499
+ * The value for each key needs to be an object. This object should contain one key and one
500
+ * value only. In this object, the key should be set to the summary function you wish to use
501
+ * and the value set to the column name to be summarized.
502
+ *
503
+ * The column being summarized cannot be an internal column (id, xata.*), nor the base of
504
+ * an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
505
+ * `settings.dark_mode` but not `settings` nor `settings.*`.
506
+ *
507
+ * @example {"all_users":{"count":"*"}}
508
+ * @example {"total_created":{"count":"created_at"}}
509
+ * @x-go-type xbquery.SummaryList
510
+ */
511
+ declare type SummaryExpressionList = {
512
+ [key: string]: SummaryExpression;
513
+ };
514
+ /**
515
+ * A summary expression is the description of a single summary operation. It consists of a single
516
+ * key representing the operation, and a value representing the column to be operated on.
517
+ *
518
+ * The column being summarized cannot be an internal column (id, xata.*), nor the base of
519
+ * an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
520
+ * `settings.dark_mode` but not `settings` nor `settings.*`.
521
+ *
522
+ * We currently support the `count` operation. When using `count`, one can set a column name
523
+ * as the value. Xata will return the total number times this column is non-null in each group.
524
+ *
525
+ * Alternately, if you'd like to count the total rows in each group - irregardless of null/not null
526
+ * status - you can set `count` to `*` to count everything.
527
+ *
528
+ * @example {"count":"deleted_at"}
529
+ * @x-go-type xbquery.Summary
530
+ */
531
+ declare type SummaryExpression = Record<string, any>;
312
532
  declare type HighlightExpression = {
533
+ /**
534
+ * Set to `false` to disable highlighting. By default it is `true`.
535
+ */
313
536
  enabled?: boolean;
537
+ /**
538
+ * Set to `false` to disable HTML encoding in highlight snippets. By default it is `true`.
539
+ */
314
540
  encodeHTML?: boolean;
315
541
  };
316
542
  /**
@@ -329,15 +555,30 @@ declare type BoosterExpression = {
329
555
  * Boost records with a particular value for a column.
330
556
  */
331
557
  declare type ValueBooster$1 = {
558
+ /**
559
+ * The column in which to look for the value.
560
+ */
332
561
  column: string;
562
+ /**
563
+ * The exact value to boost.
564
+ */
333
565
  value: string | number | boolean;
566
+ /**
567
+ * The factor with which to multiply the score of the record.
568
+ */
334
569
  factor: number;
335
570
  };
336
571
  /**
337
572
  * Boost records based on the value of a numeric column.
338
573
  */
339
574
  declare type NumericBooster$1 = {
575
+ /**
576
+ * The column in which to look for the value.
577
+ */
340
578
  column: string;
579
+ /**
580
+ * The factor with which to multiply the value of the column before adding it to the item score.
581
+ */
341
582
  factor: number;
342
583
  };
343
584
  /**
@@ -346,9 +587,24 @@ declare type NumericBooster$1 = {
346
587
  * should be interpreted as: a record with a date 10 days before/after origin will score 2 times less than a record with the date at origin.
347
588
  */
348
589
  declare type DateBooster$1 = {
590
+ /**
591
+ * The column in which to look for the value.
592
+ */
349
593
  column: string;
594
+ /**
595
+ * The datetime (formatted as RFC3339) from where to apply the score decay function. The maximum boost will be applied for records with values at this time.
596
+ * If it is not specified, the current date and time is used.
597
+ */
350
598
  origin?: string;
599
+ /**
600
+ * The duration at which distance from origin the score is decayed with factor, using an exponential function. It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
601
+ *
602
+ * @pattern ^(\d+)(d|h|m|s|ms)$
603
+ */
351
604
  scale: string;
605
+ /**
606
+ * The decay factor to expect at "scale" distance from the "origin".
607
+ */
352
608
  decay: number;
353
609
  };
354
610
  declare type FilterList = FilterExpression | FilterExpression[];
@@ -400,13 +656,40 @@ declare type FilterValue = number | string | boolean;
400
656
  * Pagination settings.
401
657
  */
402
658
  declare type PageConfig = {
659
+ /**
660
+ * Query the next page that follow the cursor.
661
+ */
403
662
  after?: string;
663
+ /**
664
+ * Query the previous page before the cursor.
665
+ */
404
666
  before?: string;
667
+ /**
668
+ * Query the first page from the cursor.
669
+ */
405
670
  first?: string;
671
+ /**
672
+ * Query the last page from the cursor.
673
+ */
406
674
  last?: string;
675
+ /**
676
+ * Set page size. If the size is missing it is read from the cursor. If no cursor is given xata will choose the default page size.
677
+ *
678
+ * @default 20
679
+ */
407
680
  size?: number;
681
+ /**
682
+ * Use offset to skip entries. To skip pages set offset to a multiple of size.
683
+ *
684
+ * @default 0
685
+ */
408
686
  offset?: number;
409
687
  };
688
+ /**
689
+ * @example name
690
+ * @example email
691
+ * @example created_at
692
+ */
410
693
  declare type ColumnsProjection = string[];
411
694
  /**
412
695
  * Xata Table Record Metadata
@@ -414,14 +697,29 @@ declare type ColumnsProjection = string[];
414
697
  declare type RecordMeta = {
415
698
  id: RecordID;
416
699
  xata: {
700
+ /**
701
+ * The record's version. Can be used for optimistic concurrency control.
702
+ */
417
703
  version: number;
704
+ /**
705
+ * The record's table name. APIs that return records from multiple tables will set this field accordingly.
706
+ */
418
707
  table?: string;
708
+ /**
709
+ * Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
710
+ */
419
711
  highlight?: {
420
712
  [key: string]: string[] | {
421
713
  [key: string]: any;
422
714
  };
423
715
  };
716
+ /**
717
+ * The record's relevancy score. This is returned by the search APIs.
718
+ */
424
719
  score?: number;
720
+ /**
721
+ * Encoding/Decoding errors
722
+ */
425
723
  warnings?: string[];
426
724
  };
427
725
  };
@@ -433,7 +731,13 @@ declare type RecordID = string;
433
731
  * @example {"newName":"newName","oldName":"oldName"}
434
732
  */
435
733
  declare type TableRename = {
734
+ /**
735
+ * @minLength 1
736
+ */
436
737
  newName: string;
738
+ /**
739
+ * @minLength 1
740
+ */
437
741
  oldName: string;
438
742
  };
439
743
  /**
@@ -441,7 +745,13 @@ declare type TableRename = {
441
745
  */
442
746
  declare type RecordsMetadata = {
443
747
  page: {
748
+ /**
749
+ * last record id
750
+ */
444
751
  cursor: string;
752
+ /**
753
+ * true if more records can be fetch
754
+ */
445
755
  more: boolean;
446
756
  };
447
757
  };
@@ -475,7 +785,9 @@ type schemas_BranchMetadata = BranchMetadata;
475
785
  type schemas_DBBranch = DBBranch;
476
786
  type schemas_StartedFromMetadata = StartedFromMetadata;
477
787
  type schemas_Schema = Schema;
788
+ type schemas_SchemaEditScript = SchemaEditScript;
478
789
  type schemas_Table = Table;
790
+ type schemas_TableEdit = TableEdit;
479
791
  type schemas_Column = Column;
480
792
  type schemas_RevLink = RevLink;
481
793
  type schemas_BranchName = BranchName;
@@ -488,11 +800,25 @@ type schemas_MetricsLatency = MetricsLatency;
488
800
  type schemas_BranchMigration = BranchMigration;
489
801
  type schemas_TableMigration = TableMigration;
490
802
  type schemas_ColumnMigration = ColumnMigration;
803
+ type schemas_Commit = Commit;
804
+ type schemas_Migration = Migration;
805
+ type schemas_MigrationOp = MigrationOp;
806
+ type schemas_MigrationTableOp = MigrationTableOp;
807
+ type schemas_MigrationColumnOp = MigrationColumnOp;
808
+ type schemas_TableOpAdd = TableOpAdd;
809
+ type schemas_TableOpRemove = TableOpRemove;
810
+ type schemas_TableOpRename = TableOpRename;
811
+ type schemas_ColumnOpAdd = ColumnOpAdd;
812
+ type schemas_ColumnOpRemove = ColumnOpRemove;
813
+ type schemas_ColumnOpRename = ColumnOpRename;
814
+ type schemas_MigrationRequest = MigrationRequest;
491
815
  type schemas_SortExpression = SortExpression;
492
816
  type schemas_SortOrder = SortOrder;
493
817
  type schemas_FuzzinessExpression = FuzzinessExpression;
494
818
  type schemas_PrefixExpression = PrefixExpression;
495
819
  type schemas_FilterExpression = FilterExpression;
820
+ type schemas_SummaryExpressionList = SummaryExpressionList;
821
+ type schemas_SummaryExpression = SummaryExpression;
496
822
  type schemas_HighlightExpression = HighlightExpression;
497
823
  type schemas_BoosterExpression = BoosterExpression;
498
824
  type schemas_FilterList = FilterList;
@@ -534,7 +860,9 @@ declare namespace schemas {
534
860
  schemas_DBBranch as DBBranch,
535
861
  schemas_StartedFromMetadata as StartedFromMetadata,
536
862
  schemas_Schema as Schema,
863
+ schemas_SchemaEditScript as SchemaEditScript,
537
864
  schemas_Table as Table,
865
+ schemas_TableEdit as TableEdit,
538
866
  schemas_Column as Column,
539
867
  schemas_RevLink as RevLink,
540
868
  schemas_BranchName as BranchName,
@@ -547,11 +875,25 @@ declare namespace schemas {
547
875
  schemas_BranchMigration as BranchMigration,
548
876
  schemas_TableMigration as TableMigration,
549
877
  schemas_ColumnMigration as ColumnMigration,
878
+ schemas_Commit as Commit,
879
+ schemas_Migration as Migration,
880
+ schemas_MigrationOp as MigrationOp,
881
+ schemas_MigrationTableOp as MigrationTableOp,
882
+ schemas_MigrationColumnOp as MigrationColumnOp,
883
+ schemas_TableOpAdd as TableOpAdd,
884
+ schemas_TableOpRemove as TableOpRemove,
885
+ schemas_TableOpRename as TableOpRename,
886
+ schemas_ColumnOpAdd as ColumnOpAdd,
887
+ schemas_ColumnOpRemove as ColumnOpRemove,
888
+ schemas_ColumnOpRename as ColumnOpRename,
889
+ schemas_MigrationRequest as MigrationRequest,
550
890
  schemas_SortExpression as SortExpression,
551
891
  schemas_SortOrder as SortOrder,
552
892
  schemas_FuzzinessExpression as FuzzinessExpression,
553
893
  schemas_PrefixExpression as PrefixExpression,
554
894
  schemas_FilterExpression as FilterExpression,
895
+ schemas_SummaryExpressionList as SummaryExpressionList,
896
+ schemas_SummaryExpression as SummaryExpression,
555
897
  schemas_HighlightExpression as HighlightExpression,
556
898
  schemas_BoosterExpression as BoosterExpression,
557
899
  ValueBooster$1 as ValueBooster,
@@ -612,6 +954,11 @@ declare type BranchMigrationPlan = {
612
954
  migration: BranchMigration;
613
955
  };
614
956
  declare type RecordResponse = XataRecord$1;
957
+ declare type SchemaCompareResponse = {
958
+ source: Schema;
959
+ target: Schema;
960
+ edits: SchemaEditScript;
961
+ };
615
962
  declare type RecordUpdateResponse = XataRecord$1 | {
616
963
  id: string;
617
964
  xata: {
@@ -622,6 +969,9 @@ declare type QueryResponse = {
622
969
  records: XataRecord$1[];
623
970
  meta: RecordsMetadata;
624
971
  };
972
+ declare type SummarizeResponse = {
973
+ summary: Record<string, any>[];
974
+ };
625
975
  declare type SearchResponse = {
626
976
  records: XataRecord$1[];
627
977
  };
@@ -629,6 +979,9 @@ declare type SearchResponse = {
629
979
  * @example {"migrationID":"mig_c7m19ilcefoebpqj12p0"}
630
980
  */
631
981
  declare type MigrationIdResponse = {
982
+ /**
983
+ * @minLength 1
984
+ */
632
985
  migrationID: string;
633
986
  };
634
987
 
@@ -639,8 +992,10 @@ type responses_BulkError = BulkError;
639
992
  type responses_BulkInsertResponse = BulkInsertResponse;
640
993
  type responses_BranchMigrationPlan = BranchMigrationPlan;
641
994
  type responses_RecordResponse = RecordResponse;
995
+ type responses_SchemaCompareResponse = SchemaCompareResponse;
642
996
  type responses_RecordUpdateResponse = RecordUpdateResponse;
643
997
  type responses_QueryResponse = QueryResponse;
998
+ type responses_SummarizeResponse = SummarizeResponse;
644
999
  type responses_SearchResponse = SearchResponse;
645
1000
  type responses_MigrationIdResponse = MigrationIdResponse;
646
1001
  declare namespace responses {
@@ -652,8 +1007,10 @@ declare namespace responses {
652
1007
  responses_BulkInsertResponse as BulkInsertResponse,
653
1008
  responses_BranchMigrationPlan as BranchMigrationPlan,
654
1009
  responses_RecordResponse as RecordResponse,
1010
+ responses_SchemaCompareResponse as SchemaCompareResponse,
655
1011
  responses_RecordUpdateResponse as RecordUpdateResponse,
656
1012
  responses_QueryResponse as QueryResponse,
1013
+ responses_SummarizeResponse as SummarizeResponse,
657
1014
  responses_SearchResponse as SearchResponse,
658
1015
  responses_MigrationIdResponse as MigrationIdResponse,
659
1016
  };
@@ -734,6 +1091,9 @@ declare type GetUserAPIKeysVariables = FetcherExtraProps;
734
1091
  */
735
1092
  declare const getUserAPIKeys: (variables: GetUserAPIKeysVariables) => Promise<GetUserAPIKeysResponse>;
736
1093
  declare type CreateUserAPIKeyPathParams = {
1094
+ /**
1095
+ * API Key name
1096
+ */
737
1097
  keyName: APIKeyName;
738
1098
  };
739
1099
  declare type CreateUserAPIKeyError = ErrorWrapper<{
@@ -759,6 +1119,9 @@ declare type CreateUserAPIKeyVariables = {
759
1119
  */
760
1120
  declare const createUserAPIKey: (variables: CreateUserAPIKeyVariables) => Promise<CreateUserAPIKeyResponse>;
761
1121
  declare type DeleteUserAPIKeyPathParams = {
1122
+ /**
1123
+ * API Key name
1124
+ */
762
1125
  keyName: APIKeyName;
763
1126
  };
764
1127
  declare type DeleteUserAPIKeyError = ErrorWrapper<{
@@ -819,6 +1182,9 @@ declare type GetWorkspacesListVariables = FetcherExtraProps;
819
1182
  */
820
1183
  declare const getWorkspacesList: (variables: GetWorkspacesListVariables) => Promise<GetWorkspacesListResponse>;
821
1184
  declare type GetWorkspacePathParams = {
1185
+ /**
1186
+ * Workspace name
1187
+ */
822
1188
  workspaceId: WorkspaceID;
823
1189
  };
824
1190
  declare type GetWorkspaceError = ErrorWrapper<{
@@ -839,6 +1205,9 @@ declare type GetWorkspaceVariables = {
839
1205
  */
840
1206
  declare const getWorkspace: (variables: GetWorkspaceVariables) => Promise<Workspace>;
841
1207
  declare type UpdateWorkspacePathParams = {
1208
+ /**
1209
+ * Workspace name
1210
+ */
842
1211
  workspaceId: WorkspaceID;
843
1212
  };
844
1213
  declare type UpdateWorkspaceError = ErrorWrapper<{
@@ -860,6 +1229,9 @@ declare type UpdateWorkspaceVariables = {
860
1229
  */
861
1230
  declare const updateWorkspace: (variables: UpdateWorkspaceVariables) => Promise<Workspace>;
862
1231
  declare type DeleteWorkspacePathParams = {
1232
+ /**
1233
+ * Workspace name
1234
+ */
863
1235
  workspaceId: WorkspaceID;
864
1236
  };
865
1237
  declare type DeleteWorkspaceError = ErrorWrapper<{
@@ -880,6 +1252,9 @@ declare type DeleteWorkspaceVariables = {
880
1252
  */
881
1253
  declare const deleteWorkspace: (variables: DeleteWorkspaceVariables) => Promise<undefined>;
882
1254
  declare type GetWorkspaceMembersListPathParams = {
1255
+ /**
1256
+ * Workspace name
1257
+ */
883
1258
  workspaceId: WorkspaceID;
884
1259
  };
885
1260
  declare type GetWorkspaceMembersListError = ErrorWrapper<{
@@ -900,7 +1275,13 @@ declare type GetWorkspaceMembersListVariables = {
900
1275
  */
901
1276
  declare const getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables) => Promise<WorkspaceMembers>;
902
1277
  declare type UpdateWorkspaceMemberRolePathParams = {
1278
+ /**
1279
+ * Workspace name
1280
+ */
903
1281
  workspaceId: WorkspaceID;
1282
+ /**
1283
+ * UserID
1284
+ */
904
1285
  userId: UserID;
905
1286
  };
906
1287
  declare type UpdateWorkspaceMemberRoleError = ErrorWrapper<{
@@ -925,7 +1306,13 @@ declare type UpdateWorkspaceMemberRoleVariables = {
925
1306
  */
926
1307
  declare const updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables) => Promise<undefined>;
927
1308
  declare type RemoveWorkspaceMemberPathParams = {
1309
+ /**
1310
+ * Workspace name
1311
+ */
928
1312
  workspaceId: WorkspaceID;
1313
+ /**
1314
+ * UserID
1315
+ */
929
1316
  userId: UserID;
930
1317
  };
931
1318
  declare type RemoveWorkspaceMemberError = ErrorWrapper<{
@@ -946,6 +1333,9 @@ declare type RemoveWorkspaceMemberVariables = {
946
1333
  */
947
1334
  declare const removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables) => Promise<undefined>;
948
1335
  declare type InviteWorkspaceMemberPathParams = {
1336
+ /**
1337
+ * Workspace name
1338
+ */
949
1339
  workspaceId: WorkspaceID;
950
1340
  };
951
1341
  declare type InviteWorkspaceMemberError = ErrorWrapper<{
@@ -962,6 +1352,9 @@ declare type InviteWorkspaceMemberError = ErrorWrapper<{
962
1352
  payload: SimpleError;
963
1353
  }>;
964
1354
  declare type InviteWorkspaceMemberRequestBody = {
1355
+ /**
1356
+ * @format email
1357
+ */
965
1358
  email: string;
966
1359
  role: Role;
967
1360
  };
@@ -974,7 +1367,13 @@ declare type InviteWorkspaceMemberVariables = {
974
1367
  */
975
1368
  declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<WorkspaceInvite>;
976
1369
  declare type UpdateWorkspaceMemberInvitePathParams = {
1370
+ /**
1371
+ * Workspace name
1372
+ */
977
1373
  workspaceId: WorkspaceID;
1374
+ /**
1375
+ * Invite identifier
1376
+ */
978
1377
  inviteId: InviteID;
979
1378
  };
980
1379
  declare type UpdateWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1002,7 +1401,13 @@ declare type UpdateWorkspaceMemberInviteVariables = {
1002
1401
  */
1003
1402
  declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
1004
1403
  declare type CancelWorkspaceMemberInvitePathParams = {
1404
+ /**
1405
+ * Workspace name
1406
+ */
1005
1407
  workspaceId: WorkspaceID;
1408
+ /**
1409
+ * Invite identifier
1410
+ */
1006
1411
  inviteId: InviteID;
1007
1412
  };
1008
1413
  declare type CancelWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1023,7 +1428,13 @@ declare type CancelWorkspaceMemberInviteVariables = {
1023
1428
  */
1024
1429
  declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>;
1025
1430
  declare type ResendWorkspaceMemberInvitePathParams = {
1431
+ /**
1432
+ * Workspace name
1433
+ */
1026
1434
  workspaceId: WorkspaceID;
1435
+ /**
1436
+ * Invite identifier
1437
+ */
1027
1438
  inviteId: InviteID;
1028
1439
  };
1029
1440
  declare type ResendWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1044,7 +1455,13 @@ declare type ResendWorkspaceMemberInviteVariables = {
1044
1455
  */
1045
1456
  declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>;
1046
1457
  declare type AcceptWorkspaceMemberInvitePathParams = {
1458
+ /**
1459
+ * Workspace name
1460
+ */
1047
1461
  workspaceId: WorkspaceID;
1462
+ /**
1463
+ * Invite Key (secret) for the invited user
1464
+ */
1048
1465
  inviteKey: InviteKey;
1049
1466
  };
1050
1467
  declare type AcceptWorkspaceMemberInviteError = ErrorWrapper<{
@@ -1082,6 +1499,9 @@ declare type GetDatabaseListVariables = {
1082
1499
  */
1083
1500
  declare const getDatabaseList: (variables: GetDatabaseListVariables) => Promise<ListDatabasesResponse>;
1084
1501
  declare type GetBranchListPathParams = {
1502
+ /**
1503
+ * The Database Name
1504
+ */
1085
1505
  dbName: DBName;
1086
1506
  workspace: string;
1087
1507
  };
@@ -1103,6 +1523,9 @@ declare type GetBranchListVariables = {
1103
1523
  */
1104
1524
  declare const getBranchList: (variables: GetBranchListVariables) => Promise<ListBranchesResponse>;
1105
1525
  declare type CreateDatabasePathParams = {
1526
+ /**
1527
+ * The Database Name
1528
+ */
1106
1529
  dbName: DBName;
1107
1530
  workspace: string;
1108
1531
  };
@@ -1114,11 +1537,16 @@ declare type CreateDatabaseError = ErrorWrapper<{
1114
1537
  payload: AuthError;
1115
1538
  }>;
1116
1539
  declare type CreateDatabaseResponse = {
1540
+ /**
1541
+ * @minLength 1
1542
+ */
1117
1543
  databaseName: string;
1118
1544
  branchName?: string;
1119
1545
  };
1120
1546
  declare type CreateDatabaseRequestBody = {
1121
- displayName?: string;
1547
+ /**
1548
+ * @minLength 1
1549
+ */
1122
1550
  branchName?: string;
1123
1551
  ui?: {
1124
1552
  color?: string;
@@ -1134,6 +1562,9 @@ declare type CreateDatabaseVariables = {
1134
1562
  */
1135
1563
  declare const createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
1136
1564
  declare type DeleteDatabasePathParams = {
1565
+ /**
1566
+ * The Database Name
1567
+ */
1137
1568
  dbName: DBName;
1138
1569
  workspace: string;
1139
1570
  };
@@ -1155,6 +1586,9 @@ declare type DeleteDatabaseVariables = {
1155
1586
  */
1156
1587
  declare const deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
1157
1588
  declare type GetDatabaseMetadataPathParams = {
1589
+ /**
1590
+ * The Database Name
1591
+ */
1158
1592
  dbName: DBName;
1159
1593
  workspace: string;
1160
1594
  };
@@ -1175,7 +1609,43 @@ declare type GetDatabaseMetadataVariables = {
1175
1609
  * Retrieve metadata of the given database
1176
1610
  */
1177
1611
  declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
1612
+ declare type UpdateDatabaseMetadataPathParams = {
1613
+ /**
1614
+ * The Database Name
1615
+ */
1616
+ dbName: DBName;
1617
+ workspace: string;
1618
+ };
1619
+ declare type UpdateDatabaseMetadataError = ErrorWrapper<{
1620
+ status: 400;
1621
+ payload: BadRequestError;
1622
+ } | {
1623
+ status: 401;
1624
+ payload: AuthError;
1625
+ } | {
1626
+ status: 404;
1627
+ payload: SimpleError;
1628
+ }>;
1629
+ declare type UpdateDatabaseMetadataRequestBody = {
1630
+ ui?: {
1631
+ /**
1632
+ * @minLength 1
1633
+ */
1634
+ color?: string;
1635
+ };
1636
+ };
1637
+ declare type UpdateDatabaseMetadataVariables = {
1638
+ body?: UpdateDatabaseMetadataRequestBody;
1639
+ pathParams: UpdateDatabaseMetadataPathParams;
1640
+ } & FetcherExtraProps;
1641
+ /**
1642
+ * Update the color of the selected database
1643
+ */
1644
+ declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
1178
1645
  declare type GetGitBranchesMappingPathParams = {
1646
+ /**
1647
+ * The Database Name
1648
+ */
1179
1649
  dbName: DBName;
1180
1650
  workspace: string;
1181
1651
  };
@@ -1215,6 +1685,9 @@ declare type GetGitBranchesMappingVariables = {
1215
1685
  */
1216
1686
  declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
1217
1687
  declare type AddGitBranchesEntryPathParams = {
1688
+ /**
1689
+ * The Database Name
1690
+ */
1218
1691
  dbName: DBName;
1219
1692
  workspace: string;
1220
1693
  };
@@ -1226,10 +1699,19 @@ declare type AddGitBranchesEntryError = ErrorWrapper<{
1226
1699
  payload: AuthError;
1227
1700
  }>;
1228
1701
  declare type AddGitBranchesEntryResponse = {
1702
+ /**
1703
+ * Warning message
1704
+ */
1229
1705
  warning?: string;
1230
1706
  };
1231
1707
  declare type AddGitBranchesEntryRequestBody = {
1708
+ /**
1709
+ * The name of the Git branch.
1710
+ */
1232
1711
  gitBranch: string;
1712
+ /**
1713
+ * The name of the Xata branch.
1714
+ */
1233
1715
  xataBranch: BranchName;
1234
1716
  };
1235
1717
  declare type AddGitBranchesEntryVariables = {
@@ -1253,10 +1735,16 @@ declare type AddGitBranchesEntryVariables = {
1253
1735
  */
1254
1736
  declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
1255
1737
  declare type RemoveGitBranchesEntryPathParams = {
1738
+ /**
1739
+ * The Database Name
1740
+ */
1256
1741
  dbName: DBName;
1257
1742
  workspace: string;
1258
1743
  };
1259
1744
  declare type RemoveGitBranchesEntryQueryParams = {
1745
+ /**
1746
+ * The Git Branch to remove from the mapping
1747
+ */
1260
1748
  gitBranch: string;
1261
1749
  };
1262
1750
  declare type RemoveGitBranchesEntryError = ErrorWrapper<{
@@ -1281,11 +1769,20 @@ declare type RemoveGitBranchesEntryVariables = {
1281
1769
  */
1282
1770
  declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
1283
1771
  declare type ResolveBranchPathParams = {
1772
+ /**
1773
+ * The Database Name
1774
+ */
1284
1775
  dbName: DBName;
1285
1776
  workspace: string;
1286
1777
  };
1287
1778
  declare type ResolveBranchQueryParams = {
1779
+ /**
1780
+ * The Git Branch
1781
+ */
1288
1782
  gitBranch?: string;
1783
+ /**
1784
+ * Default branch to fallback to
1785
+ */
1289
1786
  fallbackBranch?: string;
1290
1787
  };
1291
1788
  declare type ResolveBranchError = ErrorWrapper<{
@@ -1332,11 +1829,289 @@ declare type ResolveBranchVariables = {
1332
1829
  * ```
1333
1830
  */
1334
1831
  declare const resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
1335
- declare type GetBranchDetailsPathParams = {
1336
- dbBranchName: DBBranchName;
1832
+ declare type ListMigrationRequestsPathParams = {
1833
+ /**
1834
+ * The Database Name
1835
+ */
1836
+ dbName: DBName;
1337
1837
  workspace: string;
1338
1838
  };
1339
- declare type GetBranchDetailsError = ErrorWrapper<{
1839
+ declare type ListMigrationRequestsError = ErrorWrapper<{
1840
+ status: 400;
1841
+ payload: BadRequestError;
1842
+ } | {
1843
+ status: 401;
1844
+ payload: AuthError;
1845
+ } | {
1846
+ status: 404;
1847
+ payload: SimpleError;
1848
+ }>;
1849
+ declare type ListMigrationRequestsResponse = {
1850
+ migrationRequests: MigrationRequest[];
1851
+ meta: RecordsMetadata;
1852
+ };
1853
+ declare type ListMigrationRequestsRequestBody = {
1854
+ filter?: FilterExpression;
1855
+ sort?: SortExpression;
1856
+ page?: PageConfig;
1857
+ columns?: ColumnsProjection;
1858
+ };
1859
+ declare type ListMigrationRequestsVariables = {
1860
+ body?: ListMigrationRequestsRequestBody;
1861
+ pathParams: ListMigrationRequestsPathParams;
1862
+ } & FetcherExtraProps;
1863
+ declare const listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
1864
+ declare type CreateMigrationRequestPathParams = {
1865
+ /**
1866
+ * The Database Name
1867
+ */
1868
+ dbName: DBName;
1869
+ workspace: string;
1870
+ };
1871
+ declare type CreateMigrationRequestError = ErrorWrapper<{
1872
+ status: 400;
1873
+ payload: BadRequestError;
1874
+ } | {
1875
+ status: 401;
1876
+ payload: AuthError;
1877
+ } | {
1878
+ status: 404;
1879
+ payload: SimpleError;
1880
+ }>;
1881
+ declare type CreateMigrationRequestResponse = {
1882
+ number: number;
1883
+ };
1884
+ declare type CreateMigrationRequestRequestBody = {
1885
+ /**
1886
+ * The source branch.
1887
+ */
1888
+ source: string;
1889
+ /**
1890
+ * The target branch.
1891
+ */
1892
+ target: string;
1893
+ /**
1894
+ * The title.
1895
+ */
1896
+ title: string;
1897
+ /**
1898
+ * Optional migration request description.
1899
+ */
1900
+ body?: string;
1901
+ };
1902
+ declare type CreateMigrationRequestVariables = {
1903
+ body: CreateMigrationRequestRequestBody;
1904
+ pathParams: CreateMigrationRequestPathParams;
1905
+ } & FetcherExtraProps;
1906
+ declare const createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
1907
+ declare type GetMigrationRequestPathParams = {
1908
+ /**
1909
+ * The Database Name
1910
+ */
1911
+ dbName: DBName;
1912
+ /**
1913
+ * The migration request number.
1914
+ */
1915
+ mrNumber: number;
1916
+ workspace: string;
1917
+ };
1918
+ declare type GetMigrationRequestError = ErrorWrapper<{
1919
+ status: 400;
1920
+ payload: BadRequestError;
1921
+ } | {
1922
+ status: 401;
1923
+ payload: AuthError;
1924
+ } | {
1925
+ status: 404;
1926
+ payload: SimpleError;
1927
+ }>;
1928
+ declare type GetMigrationRequestVariables = {
1929
+ pathParams: GetMigrationRequestPathParams;
1930
+ } & FetcherExtraProps;
1931
+ declare const getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
1932
+ declare type UpdateMigrationRequestPathParams = {
1933
+ /**
1934
+ * The Database Name
1935
+ */
1936
+ dbName: DBName;
1937
+ /**
1938
+ * The migration request number.
1939
+ */
1940
+ mrNumber: number;
1941
+ workspace: string;
1942
+ };
1943
+ declare type UpdateMigrationRequestError = ErrorWrapper<{
1944
+ status: 400;
1945
+ payload: BadRequestError;
1946
+ } | {
1947
+ status: 401;
1948
+ payload: AuthError;
1949
+ } | {
1950
+ status: 404;
1951
+ payload: SimpleError;
1952
+ }>;
1953
+ declare type UpdateMigrationRequestRequestBody = {
1954
+ /**
1955
+ * New migration request title.
1956
+ */
1957
+ title?: string;
1958
+ /**
1959
+ * New migration request description.
1960
+ */
1961
+ body?: string;
1962
+ /**
1963
+ * Change the migration request status.
1964
+ */
1965
+ status?: 'open' | 'closed';
1966
+ };
1967
+ declare type UpdateMigrationRequestVariables = {
1968
+ body?: UpdateMigrationRequestRequestBody;
1969
+ pathParams: UpdateMigrationRequestPathParams;
1970
+ } & FetcherExtraProps;
1971
+ declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
1972
+ declare type ListMigrationRequestsCommitsPathParams = {
1973
+ /**
1974
+ * The Database Name
1975
+ */
1976
+ dbName: DBName;
1977
+ /**
1978
+ * The migration request number.
1979
+ */
1980
+ mrNumber: number;
1981
+ workspace: string;
1982
+ };
1983
+ declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
1984
+ status: 400;
1985
+ payload: BadRequestError;
1986
+ } | {
1987
+ status: 401;
1988
+ payload: AuthError;
1989
+ } | {
1990
+ status: 404;
1991
+ payload: SimpleError;
1992
+ }>;
1993
+ declare type ListMigrationRequestsCommitsResponse = {
1994
+ meta: {
1995
+ /**
1996
+ * last record id
1997
+ */
1998
+ cursor: string;
1999
+ /**
2000
+ * true if more records can be fetch
2001
+ */
2002
+ more: boolean;
2003
+ };
2004
+ logs: Commit[];
2005
+ };
2006
+ declare type ListMigrationRequestsCommitsRequestBody = {
2007
+ page?: {
2008
+ /**
2009
+ * Query the next page that follow the cursor.
2010
+ */
2011
+ after?: string;
2012
+ /**
2013
+ * Query the previous page before the cursor.
2014
+ */
2015
+ before?: string;
2016
+ /**
2017
+ * 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.
2018
+ *
2019
+ * @default 20
2020
+ */
2021
+ size?: number;
2022
+ };
2023
+ };
2024
+ declare type ListMigrationRequestsCommitsVariables = {
2025
+ body?: ListMigrationRequestsCommitsRequestBody;
2026
+ pathParams: ListMigrationRequestsCommitsPathParams;
2027
+ } & FetcherExtraProps;
2028
+ declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
2029
+ declare type CompareMigrationRequestPathParams = {
2030
+ /**
2031
+ * The Database Name
2032
+ */
2033
+ dbName: DBName;
2034
+ /**
2035
+ * The migration request number.
2036
+ */
2037
+ mrNumber: number;
2038
+ workspace: string;
2039
+ };
2040
+ declare type CompareMigrationRequestError = ErrorWrapper<{
2041
+ status: 400;
2042
+ payload: BadRequestError;
2043
+ } | {
2044
+ status: 401;
2045
+ payload: AuthError;
2046
+ } | {
2047
+ status: 404;
2048
+ payload: SimpleError;
2049
+ }>;
2050
+ declare type CompareMigrationRequestVariables = {
2051
+ pathParams: CompareMigrationRequestPathParams;
2052
+ } & FetcherExtraProps;
2053
+ declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
2054
+ declare type GetMigrationRequestIsMergedPathParams = {
2055
+ /**
2056
+ * The Database Name
2057
+ */
2058
+ dbName: DBName;
2059
+ /**
2060
+ * The migration request number.
2061
+ */
2062
+ mrNumber: number;
2063
+ workspace: string;
2064
+ };
2065
+ declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
2066
+ status: 400;
2067
+ payload: BadRequestError;
2068
+ } | {
2069
+ status: 401;
2070
+ payload: AuthError;
2071
+ } | {
2072
+ status: 404;
2073
+ payload: SimpleError;
2074
+ }>;
2075
+ declare type GetMigrationRequestIsMergedResponse = {
2076
+ merged?: boolean;
2077
+ };
2078
+ declare type GetMigrationRequestIsMergedVariables = {
2079
+ pathParams: GetMigrationRequestIsMergedPathParams;
2080
+ } & FetcherExtraProps;
2081
+ declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
2082
+ declare type MergeMigrationRequestPathParams = {
2083
+ /**
2084
+ * The Database Name
2085
+ */
2086
+ dbName: DBName;
2087
+ /**
2088
+ * The migration request number.
2089
+ */
2090
+ mrNumber: number;
2091
+ workspace: string;
2092
+ };
2093
+ declare type MergeMigrationRequestError = ErrorWrapper<{
2094
+ status: 400;
2095
+ payload: BadRequestError;
2096
+ } | {
2097
+ status: 401;
2098
+ payload: AuthError;
2099
+ } | {
2100
+ status: 404;
2101
+ payload: SimpleError;
2102
+ }>;
2103
+ declare type MergeMigrationRequestVariables = {
2104
+ pathParams: MergeMigrationRequestPathParams;
2105
+ } & FetcherExtraProps;
2106
+ declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
2107
+ declare type GetBranchDetailsPathParams = {
2108
+ /**
2109
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2110
+ */
2111
+ dbBranchName: DBBranchName;
2112
+ workspace: string;
2113
+ };
2114
+ declare type GetBranchDetailsError = ErrorWrapper<{
1340
2115
  status: 400;
1341
2116
  payload: BadRequestError;
1342
2117
  } | {
@@ -1351,10 +2126,16 @@ declare type GetBranchDetailsVariables = {
1351
2126
  } & FetcherExtraProps;
1352
2127
  declare const getBranchDetails: (variables: GetBranchDetailsVariables) => Promise<DBBranch>;
1353
2128
  declare type CreateBranchPathParams = {
2129
+ /**
2130
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2131
+ */
1354
2132
  dbBranchName: DBBranchName;
1355
2133
  workspace: string;
1356
2134
  };
1357
2135
  declare type CreateBranchQueryParams = {
2136
+ /**
2137
+ * Name of source branch to branch the new schema from
2138
+ */
1358
2139
  from?: string;
1359
2140
  };
1360
2141
  declare type CreateBranchError = ErrorWrapper<{
@@ -1368,10 +2149,16 @@ declare type CreateBranchError = ErrorWrapper<{
1368
2149
  payload: SimpleError;
1369
2150
  }>;
1370
2151
  declare type CreateBranchResponse = {
2152
+ /**
2153
+ * @minLength 1
2154
+ */
1371
2155
  databaseName: string;
1372
2156
  branchName: string;
1373
2157
  };
1374
2158
  declare type CreateBranchRequestBody = {
2159
+ /**
2160
+ * Select the branch to fork from. Defaults to 'main'
2161
+ */
1375
2162
  from?: string;
1376
2163
  metadata?: BranchMetadata;
1377
2164
  };
@@ -1382,6 +2169,9 @@ declare type CreateBranchVariables = {
1382
2169
  } & FetcherExtraProps;
1383
2170
  declare const createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
1384
2171
  declare type DeleteBranchPathParams = {
2172
+ /**
2173
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2174
+ */
1385
2175
  dbBranchName: DBBranchName;
1386
2176
  workspace: string;
1387
2177
  };
@@ -1403,6 +2193,9 @@ declare type DeleteBranchVariables = {
1403
2193
  */
1404
2194
  declare const deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
1405
2195
  declare type UpdateBranchMetadataPathParams = {
2196
+ /**
2197
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2198
+ */
1406
2199
  dbBranchName: DBBranchName;
1407
2200
  workspace: string;
1408
2201
  };
@@ -1425,6 +2218,9 @@ declare type UpdateBranchMetadataVariables = {
1425
2218
  */
1426
2219
  declare const updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
1427
2220
  declare type GetBranchMetadataPathParams = {
2221
+ /**
2222
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2223
+ */
1428
2224
  dbBranchName: DBBranchName;
1429
2225
  workspace: string;
1430
2226
  };
@@ -1443,6 +2239,9 @@ declare type GetBranchMetadataVariables = {
1443
2239
  } & FetcherExtraProps;
1444
2240
  declare const getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
1445
2241
  declare type GetBranchMigrationHistoryPathParams = {
2242
+ /**
2243
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2244
+ */
1446
2245
  dbBranchName: DBBranchName;
1447
2246
  workspace: string;
1448
2247
  };
@@ -1470,6 +2269,9 @@ declare type GetBranchMigrationHistoryVariables = {
1470
2269
  } & FetcherExtraProps;
1471
2270
  declare const getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
1472
2271
  declare type ExecuteBranchMigrationPlanPathParams = {
2272
+ /**
2273
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2274
+ */
1473
2275
  dbBranchName: DBBranchName;
1474
2276
  workspace: string;
1475
2277
  };
@@ -1496,6 +2298,9 @@ declare type ExecuteBranchMigrationPlanVariables = {
1496
2298
  */
1497
2299
  declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
1498
2300
  declare type GetBranchMigrationPlanPathParams = {
2301
+ /**
2302
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2303
+ */
1499
2304
  dbBranchName: DBBranchName;
1500
2305
  workspace: string;
1501
2306
  };
@@ -1517,7 +2322,199 @@ declare type GetBranchMigrationPlanVariables = {
1517
2322
  * Compute a migration plan from a target schema the branch should be migrated too.
1518
2323
  */
1519
2324
  declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
2325
+ declare type CompareBranchWithUserSchemaPathParams = {
2326
+ /**
2327
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2328
+ */
2329
+ dbBranchName: DBBranchName;
2330
+ workspace: string;
2331
+ };
2332
+ declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
2333
+ status: 400;
2334
+ payload: BadRequestError;
2335
+ } | {
2336
+ status: 401;
2337
+ payload: AuthError;
2338
+ } | {
2339
+ status: 404;
2340
+ payload: SimpleError;
2341
+ }>;
2342
+ declare type CompareBranchWithUserSchemaRequestBody = {
2343
+ schema: Schema;
2344
+ };
2345
+ declare type CompareBranchWithUserSchemaVariables = {
2346
+ body: CompareBranchWithUserSchemaRequestBody;
2347
+ pathParams: CompareBranchWithUserSchemaPathParams;
2348
+ } & FetcherExtraProps;
2349
+ declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
2350
+ declare type CompareBranchSchemasPathParams = {
2351
+ /**
2352
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2353
+ */
2354
+ dbBranchName: DBBranchName;
2355
+ /**
2356
+ * The Database Name
2357
+ */
2358
+ branchName: BranchName;
2359
+ workspace: string;
2360
+ };
2361
+ declare type CompareBranchSchemasError = ErrorWrapper<{
2362
+ status: 400;
2363
+ payload: BadRequestError;
2364
+ } | {
2365
+ status: 401;
2366
+ payload: AuthError;
2367
+ } | {
2368
+ status: 404;
2369
+ payload: SimpleError;
2370
+ }>;
2371
+ declare type CompareBranchSchemasVariables = {
2372
+ body?: Record<string, any>;
2373
+ pathParams: CompareBranchSchemasPathParams;
2374
+ } & FetcherExtraProps;
2375
+ declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
2376
+ declare type UpdateBranchSchemaPathParams = {
2377
+ /**
2378
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2379
+ */
2380
+ dbBranchName: DBBranchName;
2381
+ workspace: string;
2382
+ };
2383
+ declare type UpdateBranchSchemaError = ErrorWrapper<{
2384
+ status: 400;
2385
+ payload: BadRequestError;
2386
+ } | {
2387
+ status: 401;
2388
+ payload: AuthError;
2389
+ } | {
2390
+ status: 404;
2391
+ payload: SimpleError;
2392
+ }>;
2393
+ declare type UpdateBranchSchemaResponse = {
2394
+ id: string;
2395
+ parentID: string;
2396
+ };
2397
+ declare type UpdateBranchSchemaVariables = {
2398
+ body: Migration;
2399
+ pathParams: UpdateBranchSchemaPathParams;
2400
+ } & FetcherExtraProps;
2401
+ declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
2402
+ declare type PreviewBranchSchemaEditPathParams = {
2403
+ /**
2404
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2405
+ */
2406
+ dbBranchName: DBBranchName;
2407
+ workspace: string;
2408
+ };
2409
+ declare type PreviewBranchSchemaEditError = ErrorWrapper<{
2410
+ status: 400;
2411
+ payload: BadRequestError;
2412
+ } | {
2413
+ status: 401;
2414
+ payload: AuthError;
2415
+ } | {
2416
+ status: 404;
2417
+ payload: SimpleError;
2418
+ }>;
2419
+ declare type PreviewBranchSchemaEditResponse = {
2420
+ original: Schema;
2421
+ updated: Schema;
2422
+ };
2423
+ declare type PreviewBranchSchemaEditRequestBody = {
2424
+ edits?: SchemaEditScript;
2425
+ operations?: MigrationOp[];
2426
+ };
2427
+ declare type PreviewBranchSchemaEditVariables = {
2428
+ body?: PreviewBranchSchemaEditRequestBody;
2429
+ pathParams: PreviewBranchSchemaEditPathParams;
2430
+ } & FetcherExtraProps;
2431
+ declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
2432
+ declare type ApplyBranchSchemaEditPathParams = {
2433
+ /**
2434
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2435
+ */
2436
+ dbBranchName: DBBranchName;
2437
+ workspace: string;
2438
+ };
2439
+ declare type ApplyBranchSchemaEditError = ErrorWrapper<{
2440
+ status: 400;
2441
+ payload: BadRequestError;
2442
+ } | {
2443
+ status: 401;
2444
+ payload: AuthError;
2445
+ } | {
2446
+ status: 404;
2447
+ payload: SimpleError;
2448
+ }>;
2449
+ declare type ApplyBranchSchemaEditResponse = {
2450
+ id: string;
2451
+ parentID: string;
2452
+ };
2453
+ declare type ApplyBranchSchemaEditRequestBody = {
2454
+ edits: SchemaEditScript;
2455
+ };
2456
+ declare type ApplyBranchSchemaEditVariables = {
2457
+ body: ApplyBranchSchemaEditRequestBody;
2458
+ pathParams: ApplyBranchSchemaEditPathParams;
2459
+ } & FetcherExtraProps;
2460
+ declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
2461
+ declare type GetBranchSchemaHistoryPathParams = {
2462
+ /**
2463
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2464
+ */
2465
+ dbBranchName: DBBranchName;
2466
+ workspace: string;
2467
+ };
2468
+ declare type GetBranchSchemaHistoryError = ErrorWrapper<{
2469
+ status: 400;
2470
+ payload: BadRequestError;
2471
+ } | {
2472
+ status: 401;
2473
+ payload: AuthError;
2474
+ } | {
2475
+ status: 404;
2476
+ payload: SimpleError;
2477
+ }>;
2478
+ declare type GetBranchSchemaHistoryResponse = {
2479
+ meta: {
2480
+ /**
2481
+ * last record id
2482
+ */
2483
+ cursor: string;
2484
+ /**
2485
+ * true if more records can be fetch
2486
+ */
2487
+ more: boolean;
2488
+ };
2489
+ logs: Commit[];
2490
+ };
2491
+ declare type GetBranchSchemaHistoryRequestBody = {
2492
+ page?: {
2493
+ /**
2494
+ * Query the next page that follow the cursor.
2495
+ */
2496
+ after?: string;
2497
+ /**
2498
+ * Query the previous page before the cursor.
2499
+ */
2500
+ before?: string;
2501
+ /**
2502
+ * 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.
2503
+ *
2504
+ * @default 20
2505
+ */
2506
+ size?: number;
2507
+ };
2508
+ };
2509
+ declare type GetBranchSchemaHistoryVariables = {
2510
+ body?: GetBranchSchemaHistoryRequestBody;
2511
+ pathParams: GetBranchSchemaHistoryPathParams;
2512
+ } & FetcherExtraProps;
2513
+ declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
1520
2514
  declare type GetBranchStatsPathParams = {
2515
+ /**
2516
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2517
+ */
1521
2518
  dbBranchName: DBBranchName;
1522
2519
  workspace: string;
1523
2520
  };
@@ -1550,7 +2547,13 @@ declare type GetBranchStatsVariables = {
1550
2547
  */
1551
2548
  declare const getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
1552
2549
  declare type CreateTablePathParams = {
2550
+ /**
2551
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2552
+ */
1553
2553
  dbBranchName: DBBranchName;
2554
+ /**
2555
+ * The Table name
2556
+ */
1554
2557
  tableName: TableName;
1555
2558
  workspace: string;
1556
2559
  };
@@ -1569,6 +2572,9 @@ declare type CreateTableError = ErrorWrapper<{
1569
2572
  }>;
1570
2573
  declare type CreateTableResponse = {
1571
2574
  branchName: string;
2575
+ /**
2576
+ * @minLength 1
2577
+ */
1572
2578
  tableName: string;
1573
2579
  };
1574
2580
  declare type CreateTableVariables = {
@@ -1579,7 +2585,13 @@ declare type CreateTableVariables = {
1579
2585
  */
1580
2586
  declare const createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
1581
2587
  declare type DeleteTablePathParams = {
2588
+ /**
2589
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2590
+ */
1582
2591
  dbBranchName: DBBranchName;
2592
+ /**
2593
+ * The Table name
2594
+ */
1583
2595
  tableName: TableName;
1584
2596
  workspace: string;
1585
2597
  };
@@ -1598,7 +2610,13 @@ declare type DeleteTableVariables = {
1598
2610
  */
1599
2611
  declare const deleteTable: (variables: DeleteTableVariables) => Promise<undefined>;
1600
2612
  declare type UpdateTablePathParams = {
2613
+ /**
2614
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2615
+ */
1601
2616
  dbBranchName: DBBranchName;
2617
+ /**
2618
+ * The Table name
2619
+ */
1602
2620
  tableName: TableName;
1603
2621
  workspace: string;
1604
2622
  };
@@ -1613,6 +2631,9 @@ declare type UpdateTableError = ErrorWrapper<{
1613
2631
  payload: SimpleError;
1614
2632
  }>;
1615
2633
  declare type UpdateTableRequestBody = {
2634
+ /**
2635
+ * @minLength 1
2636
+ */
1616
2637
  name: string;
1617
2638
  };
1618
2639
  declare type UpdateTableVariables = {
@@ -1634,7 +2655,13 @@ declare type UpdateTableVariables = {
1634
2655
  */
1635
2656
  declare const updateTable: (variables: UpdateTableVariables) => Promise<undefined>;
1636
2657
  declare type GetTableSchemaPathParams = {
2658
+ /**
2659
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2660
+ */
1637
2661
  dbBranchName: DBBranchName;
2662
+ /**
2663
+ * The Table name
2664
+ */
1638
2665
  tableName: TableName;
1639
2666
  workspace: string;
1640
2667
  };
@@ -1656,7 +2683,13 @@ declare type GetTableSchemaVariables = {
1656
2683
  } & FetcherExtraProps;
1657
2684
  declare const getTableSchema: (variables: GetTableSchemaVariables) => Promise<GetTableSchemaResponse>;
1658
2685
  declare type SetTableSchemaPathParams = {
2686
+ /**
2687
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2688
+ */
1659
2689
  dbBranchName: DBBranchName;
2690
+ /**
2691
+ * The Table name
2692
+ */
1660
2693
  tableName: TableName;
1661
2694
  workspace: string;
1662
2695
  };
@@ -1682,7 +2715,13 @@ declare type SetTableSchemaVariables = {
1682
2715
  } & FetcherExtraProps;
1683
2716
  declare const setTableSchema: (variables: SetTableSchemaVariables) => Promise<undefined>;
1684
2717
  declare type GetTableColumnsPathParams = {
2718
+ /**
2719
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2720
+ */
1685
2721
  dbBranchName: DBBranchName;
2722
+ /**
2723
+ * The Table name
2724
+ */
1686
2725
  tableName: TableName;
1687
2726
  workspace: string;
1688
2727
  };
@@ -1708,7 +2747,13 @@ declare type GetTableColumnsVariables = {
1708
2747
  */
1709
2748
  declare const getTableColumns: (variables: GetTableColumnsVariables) => Promise<GetTableColumnsResponse>;
1710
2749
  declare type AddTableColumnPathParams = {
2750
+ /**
2751
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2752
+ */
1711
2753
  dbBranchName: DBBranchName;
2754
+ /**
2755
+ * The Table name
2756
+ */
1712
2757
  tableName: TableName;
1713
2758
  workspace: string;
1714
2759
  };
@@ -1733,8 +2778,17 @@ declare type AddTableColumnVariables = {
1733
2778
  */
1734
2779
  declare const addTableColumn: (variables: AddTableColumnVariables) => Promise<MigrationIdResponse>;
1735
2780
  declare type GetColumnPathParams = {
2781
+ /**
2782
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2783
+ */
1736
2784
  dbBranchName: DBBranchName;
2785
+ /**
2786
+ * The Table name
2787
+ */
1737
2788
  tableName: TableName;
2789
+ /**
2790
+ * The Column name
2791
+ */
1738
2792
  columnName: ColumnName;
1739
2793
  workspace: string;
1740
2794
  };
@@ -1756,8 +2810,17 @@ declare type GetColumnVariables = {
1756
2810
  */
1757
2811
  declare const getColumn: (variables: GetColumnVariables) => Promise<Column>;
1758
2812
  declare type DeleteColumnPathParams = {
2813
+ /**
2814
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2815
+ */
1759
2816
  dbBranchName: DBBranchName;
2817
+ /**
2818
+ * The Table name
2819
+ */
1760
2820
  tableName: TableName;
2821
+ /**
2822
+ * The Column name
2823
+ */
1761
2824
  columnName: ColumnName;
1762
2825
  workspace: string;
1763
2826
  };
@@ -1779,8 +2842,17 @@ declare type DeleteColumnVariables = {
1779
2842
  */
1780
2843
  declare const deleteColumn: (variables: DeleteColumnVariables) => Promise<MigrationIdResponse>;
1781
2844
  declare type UpdateColumnPathParams = {
2845
+ /**
2846
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2847
+ */
1782
2848
  dbBranchName: DBBranchName;
2849
+ /**
2850
+ * The Table name
2851
+ */
1783
2852
  tableName: TableName;
2853
+ /**
2854
+ * The Column name
2855
+ */
1784
2856
  columnName: ColumnName;
1785
2857
  workspace: string;
1786
2858
  };
@@ -1795,6 +2867,9 @@ declare type UpdateColumnError = ErrorWrapper<{
1795
2867
  payload: SimpleError;
1796
2868
  }>;
1797
2869
  declare type UpdateColumnRequestBody = {
2870
+ /**
2871
+ * @minLength 1
2872
+ */
1798
2873
  name: string;
1799
2874
  };
1800
2875
  declare type UpdateColumnVariables = {
@@ -1806,11 +2881,20 @@ declare type UpdateColumnVariables = {
1806
2881
  */
1807
2882
  declare const updateColumn: (variables: UpdateColumnVariables) => Promise<MigrationIdResponse>;
1808
2883
  declare type InsertRecordPathParams = {
2884
+ /**
2885
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2886
+ */
1809
2887
  dbBranchName: DBBranchName;
2888
+ /**
2889
+ * The Table name
2890
+ */
1810
2891
  tableName: TableName;
1811
2892
  workspace: string;
1812
2893
  };
1813
2894
  declare type InsertRecordQueryParams = {
2895
+ /**
2896
+ * Column filters
2897
+ */
1814
2898
  columns?: ColumnsProjection;
1815
2899
  };
1816
2900
  declare type InsertRecordError = ErrorWrapper<{
@@ -1833,12 +2917,24 @@ declare type InsertRecordVariables = {
1833
2917
  */
1834
2918
  declare const insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
1835
2919
  declare type InsertRecordWithIDPathParams = {
2920
+ /**
2921
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2922
+ */
1836
2923
  dbBranchName: DBBranchName;
2924
+ /**
2925
+ * The Table name
2926
+ */
1837
2927
  tableName: TableName;
2928
+ /**
2929
+ * The Record name
2930
+ */
1838
2931
  recordId: RecordID;
1839
2932
  workspace: string;
1840
2933
  };
1841
2934
  declare type InsertRecordWithIDQueryParams = {
2935
+ /**
2936
+ * Column filters
2937
+ */
1842
2938
  columns?: ColumnsProjection;
1843
2939
  createOnly?: boolean;
1844
2940
  ifVersion?: number;
@@ -1866,12 +2962,24 @@ declare type InsertRecordWithIDVariables = {
1866
2962
  */
1867
2963
  declare const insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
1868
2964
  declare type UpdateRecordWithIDPathParams = {
2965
+ /**
2966
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
2967
+ */
1869
2968
  dbBranchName: DBBranchName;
2969
+ /**
2970
+ * The Table name
2971
+ */
1870
2972
  tableName: TableName;
2973
+ /**
2974
+ * The Record name
2975
+ */
1871
2976
  recordId: RecordID;
1872
2977
  workspace: string;
1873
2978
  };
1874
2979
  declare type UpdateRecordWithIDQueryParams = {
2980
+ /**
2981
+ * Column filters
2982
+ */
1875
2983
  columns?: ColumnsProjection;
1876
2984
  ifVersion?: number;
1877
2985
  };
@@ -1895,12 +3003,24 @@ declare type UpdateRecordWithIDVariables = {
1895
3003
  } & FetcherExtraProps;
1896
3004
  declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<RecordUpdateResponse>;
1897
3005
  declare type UpsertRecordWithIDPathParams = {
3006
+ /**
3007
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3008
+ */
1898
3009
  dbBranchName: DBBranchName;
3010
+ /**
3011
+ * The Table name
3012
+ */
1899
3013
  tableName: TableName;
3014
+ /**
3015
+ * The Record name
3016
+ */
1900
3017
  recordId: RecordID;
1901
3018
  workspace: string;
1902
3019
  };
1903
3020
  declare type UpsertRecordWithIDQueryParams = {
3021
+ /**
3022
+ * Column filters
3023
+ */
1904
3024
  columns?: ColumnsProjection;
1905
3025
  ifVersion?: number;
1906
3026
  };
@@ -1924,12 +3044,24 @@ declare type UpsertRecordWithIDVariables = {
1924
3044
  } & FetcherExtraProps;
1925
3045
  declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
1926
3046
  declare type DeleteRecordPathParams = {
3047
+ /**
3048
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3049
+ */
1927
3050
  dbBranchName: DBBranchName;
3051
+ /**
3052
+ * The Table name
3053
+ */
1928
3054
  tableName: TableName;
3055
+ /**
3056
+ * The Record name
3057
+ */
1929
3058
  recordId: RecordID;
1930
3059
  workspace: string;
1931
3060
  };
1932
3061
  declare type DeleteRecordQueryParams = {
3062
+ /**
3063
+ * Column filters
3064
+ */
1933
3065
  columns?: ColumnsProjection;
1934
3066
  };
1935
3067
  declare type DeleteRecordError = ErrorWrapper<{
@@ -1948,12 +3080,24 @@ declare type DeleteRecordVariables = {
1948
3080
  } & FetcherExtraProps;
1949
3081
  declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
1950
3082
  declare type GetRecordPathParams = {
3083
+ /**
3084
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3085
+ */
1951
3086
  dbBranchName: DBBranchName;
3087
+ /**
3088
+ * The Table name
3089
+ */
1952
3090
  tableName: TableName;
3091
+ /**
3092
+ * The Record name
3093
+ */
1953
3094
  recordId: RecordID;
1954
3095
  workspace: string;
1955
3096
  };
1956
3097
  declare type GetRecordQueryParams = {
3098
+ /**
3099
+ * Column filters
3100
+ */
1957
3101
  columns?: ColumnsProjection;
1958
3102
  };
1959
3103
  declare type GetRecordError = ErrorWrapper<{
@@ -1975,11 +3119,20 @@ declare type GetRecordVariables = {
1975
3119
  */
1976
3120
  declare const getRecord: (variables: GetRecordVariables) => Promise<XataRecord$1>;
1977
3121
  declare type BulkInsertTableRecordsPathParams = {
3122
+ /**
3123
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3124
+ */
1978
3125
  dbBranchName: DBBranchName;
3126
+ /**
3127
+ * The Table name
3128
+ */
1979
3129
  tableName: TableName;
1980
3130
  workspace: string;
1981
3131
  };
1982
3132
  declare type BulkInsertTableRecordsQueryParams = {
3133
+ /**
3134
+ * Column filters
3135
+ */
1983
3136
  columns?: ColumnsProjection;
1984
3137
  };
1985
3138
  declare type BulkInsertTableRecordsError = ErrorWrapper<{
@@ -2008,7 +3161,13 @@ declare type BulkInsertTableRecordsVariables = {
2008
3161
  */
2009
3162
  declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
2010
3163
  declare type QueryTablePathParams = {
3164
+ /**
3165
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3166
+ */
2011
3167
  dbBranchName: DBBranchName;
3168
+ /**
3169
+ * The Table name
3170
+ */
2012
3171
  tableName: TableName;
2013
3172
  workspace: string;
2014
3173
  };
@@ -2062,8 +3221,9 @@ declare type QueryTableVariables = {
2062
3221
  * If the `columns` array is not specified, all columns are included. For link
2063
3222
  * fields, only the ID column of the linked records is included in the response.
2064
3223
  *
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
3224
+ * If the `columns` array is specified, only the selected and internal
3225
+ * columns `id` and `xata` are included. The `*` wildcard can be used to
3226
+ * select all columns.
2067
3227
  *
2068
3228
  * For objects and link fields, if the column name of the object is specified, we
2069
3229
  * include all of its sub-keys. If only some sub-keys are specified (via dotted
@@ -2179,6 +3339,10 @@ declare type QueryTableVariables = {
2179
3339
  *
2180
3340
  * ```json
2181
3341
  * {
3342
+ * "id": "id1"
3343
+ * "xata": {
3344
+ * "version": 0
3345
+ * }
2182
3346
  * "name": "Kilian",
2183
3347
  * "address": {
2184
3348
  * "street": "New street"
@@ -2198,6 +3362,10 @@ declare type QueryTableVariables = {
2198
3362
  *
2199
3363
  * ```json
2200
3364
  * {
3365
+ * "id": "id1"
3366
+ * "xata": {
3367
+ * "version": 0
3368
+ * }
2201
3369
  * "name": "Kilian",
2202
3370
  * "email": "kilian@gmail.com",
2203
3371
  * "address": {
@@ -2227,6 +3395,10 @@ declare type QueryTableVariables = {
2227
3395
  *
2228
3396
  * ```json
2229
3397
  * {
3398
+ * "id": "id1"
3399
+ * "xata": {
3400
+ * "version": 0
3401
+ * }
2230
3402
  * "name": "Kilian",
2231
3403
  * "email": "kilian@gmail.com",
2232
3404
  * "address": {
@@ -2755,7 +3927,13 @@ declare type QueryTableVariables = {
2755
3927
  */
2756
3928
  declare const queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
2757
3929
  declare type SearchTablePathParams = {
3930
+ /**
3931
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3932
+ */
2758
3933
  dbBranchName: DBBranchName;
3934
+ /**
3935
+ * The Table name
3936
+ */
2759
3937
  tableName: TableName;
2760
3938
  workspace: string;
2761
3939
  };
@@ -2770,6 +3948,11 @@ declare type SearchTableError = ErrorWrapper<{
2770
3948
  payload: SimpleError;
2771
3949
  }>;
2772
3950
  declare type SearchTableRequestBody = {
3951
+ /**
3952
+ * The query string.
3953
+ *
3954
+ * @minLength 1
3955
+ */
2773
3956
  query: string;
2774
3957
  fuzziness?: FuzzinessExpression;
2775
3958
  prefix?: PrefixExpression;
@@ -2790,6 +3973,9 @@ declare type SearchTableVariables = {
2790
3973
  */
2791
3974
  declare const searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
2792
3975
  declare type SearchBranchPathParams = {
3976
+ /**
3977
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3978
+ */
2793
3979
  dbBranchName: DBBranchName;
2794
3980
  workspace: string;
2795
3981
  };
@@ -2804,13 +3990,25 @@ declare type SearchBranchError = ErrorWrapper<{
2804
3990
  payload: SimpleError;
2805
3991
  }>;
2806
3992
  declare type SearchBranchRequestBody = {
3993
+ /**
3994
+ * 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.
3995
+ */
2807
3996
  tables?: (string | {
3997
+ /**
3998
+ * The name of the table.
3999
+ */
2808
4000
  table: string;
2809
4001
  filter?: FilterExpression;
2810
4002
  boosters?: BoosterExpression[];
2811
4003
  })[];
4004
+ /**
4005
+ * The query string.
4006
+ *
4007
+ * @minLength 1
4008
+ */
2812
4009
  query: string;
2813
4010
  fuzziness?: FuzzinessExpression;
4011
+ prefix?: PrefixExpression;
2814
4012
  highlight?: HighlightExpression;
2815
4013
  };
2816
4014
  declare type SearchBranchVariables = {
@@ -2821,6 +4019,77 @@ declare type SearchBranchVariables = {
2821
4019
  * Run a free text search operation across the database branch.
2822
4020
  */
2823
4021
  declare const searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
4022
+ declare type SummarizeTablePathParams = {
4023
+ /**
4024
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4025
+ */
4026
+ dbBranchName: DBBranchName;
4027
+ /**
4028
+ * The Table name
4029
+ */
4030
+ tableName: TableName;
4031
+ workspace: string;
4032
+ };
4033
+ declare type SummarizeTableError = ErrorWrapper<{
4034
+ status: 400;
4035
+ payload: BadRequestError;
4036
+ } | {
4037
+ status: 401;
4038
+ payload: AuthError;
4039
+ } | {
4040
+ status: 404;
4041
+ payload: SimpleError;
4042
+ }>;
4043
+ declare type SummarizeTableRequestBody = {
4044
+ columns?: ColumnsProjection;
4045
+ summaries?: SummaryExpressionList;
4046
+ sort?: SortExpression;
4047
+ };
4048
+ declare type SummarizeTableVariables = {
4049
+ body?: SummarizeTableRequestBody;
4050
+ pathParams: SummarizeTablePathParams;
4051
+ } & FetcherExtraProps;
4052
+ /**
4053
+ * This endpoint allows you to (optionally) define groups, and then to run
4054
+ * calculations on the values in each group. This is most helpful when you'd
4055
+ * like to understand the data you have in your database.
4056
+ *
4057
+ * A group is a combination of unique values. If you create a group for `sold_by`,
4058
+ * `product_name`, we will return one row for every combination of `sold_by` and
4059
+ * `product_name` you have in your database. When you want to calculate statistics,
4060
+ * you define these groups and ask Xata to calculate data on each group.
4061
+ *
4062
+ * **Some questions you can ask of your data:**
4063
+ *
4064
+ * How many records do I have in this table?
4065
+ * - Set `columns: []` as we we want data from the entire table, so we ask for no groups.
4066
+ * - Set `summaries: {"total": {"count": "*"}}` in order to see the count of all records.
4067
+ * We use `count: *` here we'd like to know the total amount of rows; ignoring whether
4068
+ * they are `null` or not.
4069
+ *
4070
+ * What are the top total sales for each product?
4071
+ * - Set `columns: [product_name]` as we'd like to run calculations on each unique product
4072
+ * name in our table. Setting `columns` like this will produce one row per unique product
4073
+ * name.
4074
+ * - Set `summaries: {"total_sales": {"count": "product_name"}}` as we'd like to create a
4075
+ * field called "total_sales" for each group. This field will count all rows in each group
4076
+ * with non-null product names.
4077
+ * - Set `sort: [{"total_sales": "desc"}]` in order to bring the rows with the highest
4078
+ * total_sales field to the top.
4079
+ *
4080
+ * `columns`: tells Xata how to create each group. If you add `product_id` we will create
4081
+ * a new group for every unique `product_id`.
4082
+ *
4083
+ * `summaries`: tells Xata which calculations to run on each group.
4084
+ *
4085
+ * `sort`: tells Xata in which order you'd like to see results. You may sort by fields
4086
+ * specified in `columns` as well as the summary names defined in `summaries`.
4087
+ *
4088
+ * note: Sorting on summarized values can be slower on very large tables; this will impact
4089
+ * your rate limit significantly more than other queries. Try use `filter` [coming soon] to
4090
+ * reduce the amount of data being processed in order to reduce impact on your limits.
4091
+ */
4092
+ declare const summarizeTable: (variables: SummarizeTableVariables) => Promise<SummarizeResponse>;
2824
4093
  declare const operationsByTag: {
2825
4094
  users: {
2826
4095
  getUser: (variables: GetUserVariables) => Promise<UserWithID>;
@@ -2850,6 +4119,7 @@ declare const operationsByTag: {
2850
4119
  createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
2851
4120
  deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
2852
4121
  getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
4122
+ updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
2853
4123
  getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
2854
4124
  addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
2855
4125
  removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
@@ -2862,10 +4132,28 @@ declare const operationsByTag: {
2862
4132
  deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
2863
4133
  updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
2864
4134
  getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
4135
+ getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
4136
+ };
4137
+ migrationRequests: {
4138
+ listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
4139
+ createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
4140
+ getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
4141
+ updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
4142
+ listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
4143
+ compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
4144
+ getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
4145
+ mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
4146
+ };
4147
+ branchSchema: {
2865
4148
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
2866
4149
  executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
2867
4150
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
2868
- getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
4151
+ compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
4152
+ compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
4153
+ updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
4154
+ previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
4155
+ applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
4156
+ getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
2869
4157
  };
2870
4158
  table: {
2871
4159
  createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
@@ -2890,6 +4178,7 @@ declare const operationsByTag: {
2890
4178
  queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
2891
4179
  searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
2892
4180
  searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
4181
+ summarizeTable: (variables: SummarizeTableVariables) => Promise<SummarizeResponse>;
2893
4182
  };
2894
4183
  };
2895
4184
 
@@ -2915,6 +4204,8 @@ declare class XataApiClient {
2915
4204
  get branches(): BranchApi;
2916
4205
  get tables(): TableApi;
2917
4206
  get records(): RecordsApi;
4207
+ get migrationRequests(): MigrationRequestsApi;
4208
+ get branchSchema(): BranchSchemaApi;
2918
4209
  }
2919
4210
  declare class UserApi {
2920
4211
  private extraProps;
@@ -2950,6 +4241,7 @@ declare class DatabaseApi {
2950
4241
  createDatabase(workspace: WorkspaceID, dbName: DBName, options?: CreateDatabaseRequestBody): Promise<CreateDatabaseResponse>;
2951
4242
  deleteDatabase(workspace: WorkspaceID, dbName: DBName): Promise<void>;
2952
4243
  getDatabaseMetadata(workspace: WorkspaceID, dbName: DBName): Promise<DatabaseMetadata>;
4244
+ updateDatabaseMetadata(workspace: WorkspaceID, dbName: DBName, options?: UpdateDatabaseMetadataRequestBody): Promise<DatabaseMetadata>;
2953
4245
  getGitBranchesMapping(workspace: WorkspaceID, dbName: DBName): Promise<ListGitBranchesResponse>;
2954
4246
  addGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, body: AddGitBranchesEntryRequestBody): Promise<AddGitBranchesEntryResponse>;
2955
4247
  removeGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, gitBranch: string): Promise<void>;
@@ -2964,9 +4256,6 @@ declare class BranchApi {
2964
4256
  deleteBranch(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<void>;
2965
4257
  updateBranchMetadata(workspace: WorkspaceID, database: DBName, branch: BranchName, metadata?: BranchMetadata): Promise<void>;
2966
4258
  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
4259
  getBranchStats(workspace: WorkspaceID, database: DBName, branch: BranchName): Promise<GetBranchStatsResponse>;
2971
4260
  }
2972
4261
  declare class TableApi {
@@ -2996,6 +4285,32 @@ declare class RecordsApi {
2996
4285
  queryTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: QueryTableRequestBody): Promise<QueryResponse>;
2997
4286
  searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
2998
4287
  searchBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, query: SearchBranchRequestBody): Promise<SearchResponse>;
4288
+ summarizeTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SummarizeTableRequestBody): Promise<SummarizeResponse>;
4289
+ }
4290
+ declare class MigrationRequestsApi {
4291
+ private extraProps;
4292
+ constructor(extraProps: FetcherExtraProps);
4293
+ listMigrationRequests(workspace: WorkspaceID, database: DBName, options?: ListMigrationRequestsRequestBody): Promise<ListMigrationRequestsResponse>;
4294
+ createMigrationRequest(workspace: WorkspaceID, database: DBName, options: CreateMigrationRequestRequestBody): Promise<CreateMigrationRequestResponse>;
4295
+ getMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<MigrationRequest>;
4296
+ updateMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number, options: UpdateMigrationRequestRequestBody): Promise<void>;
4297
+ listMigrationRequestsCommits(workspace: WorkspaceID, database: DBName, migrationRequest: number, options?: ListMigrationRequestsCommitsRequestBody): Promise<ListMigrationRequestsCommitsResponse>;
4298
+ compareMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<SchemaCompareResponse>;
4299
+ getMigrationRequestIsMerged(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<GetMigrationRequestIsMergedResponse>;
4300
+ mergeMigrationRequest(workspace: WorkspaceID, database: DBName, migrationRequest: number): Promise<Commit>;
4301
+ }
4302
+ declare class BranchSchemaApi {
4303
+ private extraProps;
4304
+ constructor(extraProps: FetcherExtraProps);
4305
+ getBranchMigrationHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchMigrationHistoryRequestBody): Promise<GetBranchMigrationHistoryResponse>;
4306
+ executeBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, migrationPlan: ExecuteBranchMigrationPlanRequestBody): Promise<void>;
4307
+ getBranchMigrationPlan(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<BranchMigrationPlan>;
4308
+ compareBranchWithUserSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
4309
+ compareBranchSchemas(workspace: WorkspaceID, database: DBName, branch: BranchName, branchName: BranchName, schema: Schema): Promise<SchemaCompareResponse>;
4310
+ updateBranchSchema(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<UpdateBranchSchemaResponse>;
4311
+ previewBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, migration: Migration): Promise<PreviewBranchSchemaEditResponse>;
4312
+ applyBranchSchemaEdit(workspace: WorkspaceID, database: DBName, branch: BranchName, edits: SchemaEditScript): Promise<ApplyBranchSchemaEditResponse>;
4313
+ getBranchSchemaHistory(workspace: WorkspaceID, database: DBName, branch: BranchName, options?: GetBranchSchemaHistoryRequestBody): Promise<GetBranchSchemaHistoryResponse>;
2999
4314
  }
3000
4315
 
3001
4316
  declare class XataApiPlugin implements XataPlugin {
@@ -3065,12 +4380,12 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
3065
4380
  /**
3066
4381
  * Retrieves a refreshed copy of the current record from the database.
3067
4382
  * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3068
- * @returns The persisted record with the selected columns.
4383
+ * @returns The persisted record with the selected columns, null if not found.
3069
4384
  */
3070
4385
  read<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3071
4386
  /**
3072
4387
  * Retrieves a refreshed copy of the current record from the database.
3073
- * @returns The persisted record with all first level properties.
4388
+ * @returns The persisted record with all first level properties, null if not found.
3074
4389
  */
3075
4390
  read(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3076
4391
  /**
@@ -3078,42 +4393,30 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
3078
4393
  * returned and the current object is not mutated.
3079
4394
  * @param partialUpdate The columns and their values that have to be updated.
3080
4395
  * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
3081
- * @returns The persisted record with the selected columns.
4396
+ * @returns The persisted record with the selected columns, null if not found.
3082
4397
  */
3083
- update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>>>;
4398
+ update<K extends SelectableColumn<OriginalRecord>>(partialUpdate: Partial<EditableData<OriginalRecord>>, columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3084
4399
  /**
3085
4400
  * Performs a partial update of the current record. On success a new object is
3086
4401
  * returned and the current object is not mutated.
3087
4402
  * @param partialUpdate The columns and their values that have to be updated.
3088
- * @returns The persisted record with all first level properties.
4403
+ * @returns The persisted record with all first level properties, null if not found.
3089
4404
  */
3090
- update(partialUpdate: Partial<EditableData<Omit<OriginalRecord, keyof XataRecord>>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>>>;
4405
+ update(partialUpdate: Partial<EditableData<OriginalRecord>>): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
3091
4406
  /**
3092
4407
  * Performs a deletion of the current record in the database.
3093
- *
3094
- * @throws If the record was already deleted or if an error happened while performing the deletion.
3095
- */
3096
- delete(): Promise<void>;
3097
- }
3098
- declare type Link<Record extends XataRecord> = Omit<XataRecord, 'read' | 'update'> & {
3099
- /**
3100
- * Retrieves a refreshed copy of the current record from the database.
3101
- */
3102
- read<K extends SelectableColumn<Record>>(columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>> | null>;
3103
- /**
3104
- * Performs a partial update of the current record. On success a new object is
3105
- * returned and the current object is not mutated.
3106
- * @param partialUpdate The columns and their values that have to be updated.
3107
- * @returns A new record containing the latest values for all the columns of the current record.
4408
+ * @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
4409
+ * @returns The deleted record, null if not found.
3108
4410
  */
3109
- update<K extends SelectableColumn<Record>>(partialUpdate: Partial<EditableData<Omit<Record, keyof XataRecord>>>, columns?: K[]): Promise<Readonly<SelectedPick<Record, typeof columns extends SelectableColumn<Record>[] ? typeof columns : ['*']>>>;
4411
+ delete<K extends SelectableColumn<OriginalRecord>>(columns: K[]): Promise<Readonly<SelectedPick<OriginalRecord, typeof columns>> | null>;
3110
4412
  /**
3111
4413
  * Performs a deletion of the current record in the database.
3112
- *
3113
- * @throws If the record was already deleted or if an error happened while performing the deletion.
4414
+ * @returns The deleted record, null if not found.
4415
+
3114
4416
  */
3115
- delete(): Promise<void>;
3116
- };
4417
+ delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
4418
+ }
4419
+ declare type Link<Record extends XataRecord> = XataRecord<Record>;
3117
4420
  declare type XataRecordMetadata = {
3118
4421
  /**
3119
4422
  * Number that is increased every time the record is updated.
@@ -3123,13 +4426,13 @@ declare type XataRecordMetadata = {
3123
4426
  };
3124
4427
  declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
3125
4428
  declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
3126
- declare type EditableData<O extends BaseData> = {
4429
+ declare type EditableData<O extends XataRecord> = Identifiable & Omit<{
3127
4430
  [K in keyof O]: O[K] extends XataRecord ? {
3128
4431
  id: string;
3129
4432
  } | string : NonNullable<O[K]> extends XataRecord ? {
3130
4433
  id: string;
3131
4434
  } | string | null | undefined : O[K];
3132
- };
4435
+ }, keyof XataRecord>;
3133
4436
 
3134
4437
  /**
3135
4438
  * PropertyMatchFilter
@@ -3223,7 +4526,7 @@ declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFi
3223
4526
  declare type NestedApiFilter<T> = {
3224
4527
  [key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
3225
4528
  };
3226
- declare type Filter<T> = T extends Record<string, any> ? T extends Date ? PropertyFilter<T> : BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
4529
+ declare type Filter<T> = T extends Record<string, any> ? T extends (infer ArrayType)[] ? ArrayType | ArrayType[] | ArrayFilter<ArrayType> | ArrayFilter<ArrayType[]> : T extends Date ? PropertyFilter<T> : BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
3227
4530
 
3228
4531
  declare type DateBooster = {
3229
4532
  origin?: string;
@@ -3280,7 +4583,7 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
3280
4583
  [Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]?: Awaited<SearchXataRecord<SelectedPick<Schemas[Model] & XataRecord, ['*']>>[]>;
3281
4584
  }>;
3282
4585
  };
3283
- declare class SearchPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
4586
+ declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
3284
4587
  #private;
3285
4588
  private db;
3286
4589
  constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
@@ -3338,7 +4641,10 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3338
4641
  #private;
3339
4642
  readonly meta: PaginationQueryMeta;
3340
4643
  readonly records: RecordArray<Result>;
3341
- constructor(repository: Repository<Record> | null, table: string, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
4644
+ constructor(repository: Repository<Record> | null, table: {
4645
+ name: string;
4646
+ schema?: Table;
4647
+ }, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
3342
4648
  getQueryOptions(): QueryOptions<Record>;
3343
4649
  key(): string;
3344
4650
  /**
@@ -3391,7 +4697,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3391
4697
  * @param filters A filter object
3392
4698
  * @returns A new Query object.
3393
4699
  */
3394
- filter(filters: Filter<Record>): Query<Record, Result>;
4700
+ filter(filters?: Filter<Record>): Query<Record, Result>;
3395
4701
  /**
3396
4702
  * Builds a new query with a new sort option.
3397
4703
  * @param column The column name.
@@ -3514,6 +4820,26 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
3514
4820
  * @returns The first record that matches the query, or null if no record matched the query.
3515
4821
  */
3516
4822
  getFirst(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'>): Promise<Result | null>;
4823
+ /**
4824
+ * Performs the query in the database and returns the first result.
4825
+ * @returns The first record that matches the query, or null if no record matched the query.
4826
+ * @throws if there are no results.
4827
+ */
4828
+ getFirstOrThrow(): Promise<Result>;
4829
+ /**
4830
+ * Performs the query in the database and returns the first result.
4831
+ * @param options Additional options to be used when performing the query.
4832
+ * @returns The first record that matches the query, or null if no record matched the query.
4833
+ * @throws if there are no results.
4834
+ */
4835
+ getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>>;
4836
+ /**
4837
+ * Performs the query in the database and returns the first result.
4838
+ * @param options Additional options to be used when performing the query.
4839
+ * @returns The first record that matches the query, or null if no record matched the query.
4840
+ * @throws if there are no results.
4841
+ */
4842
+ getFirstOrThrow(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'>): Promise<Result>;
3517
4843
  /**
3518
4844
  * Builds a new query object adding a cache TTL in milliseconds.
3519
4845
  * @param ttl The cache TTL in milliseconds.
@@ -3670,9 +4996,9 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
3670
4996
  /**
3671
4997
  * Common interface for performing operations on a table.
3672
4998
  */
3673
- declare abstract class Repository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, Readonly<SelectedPick<Record, ['*']>>> {
3674
- abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<Data>, 'id'> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3675
- abstract create(object: Omit<EditableData<Data>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
4999
+ declare abstract class Repository<Record extends XataRecord> extends Query<Record, Readonly<SelectedPick<Record, ['*']>>> {
5000
+ abstract create<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5001
+ abstract create(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3676
5002
  /**
3677
5003
  * Creates a single record in the table with a unique id.
3678
5004
  * @param id The unique id.
@@ -3680,27 +5006,27 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3680
5006
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3681
5007
  * @returns The full persisted record.
3682
5008
  */
3683
- abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5009
+ abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3684
5010
  /**
3685
5011
  * Creates a single record in the table with a unique id.
3686
5012
  * @param id The unique id.
3687
5013
  * @param object Object containing the column names with their values to be stored in the table.
3688
5014
  * @returns The full persisted record.
3689
5015
  */
3690
- abstract create(id: string, object: Omit<EditableData<Data>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5016
+ abstract create(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3691
5017
  /**
3692
5018
  * Creates multiple records in the table.
3693
5019
  * @param objects Array of objects with the column names and the values to be stored in the table.
3694
5020
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3695
5021
  * @returns Array of the persisted records in order.
3696
5022
  */
3697
- abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Data>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5023
+ abstract create<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3698
5024
  /**
3699
5025
  * Creates multiple records in the table.
3700
5026
  * @param objects Array of objects with the column names and the values to be stored in the table.
3701
5027
  * @returns Array of the persisted records in order.
3702
5028
  */
3703
- abstract create(objects: Array<Omit<EditableData<Data>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5029
+ abstract create(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3704
5030
  /**
3705
5031
  * Queries a single record from the table given its unique id.
3706
5032
  * @param id The unique id.
@@ -3753,47 +5079,154 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3753
5079
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
3754
5080
  */
3755
5081
  abstract read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5082
+ /**
5083
+ * Queries a single record from the table given its unique id.
5084
+ * @param id The unique id.
5085
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5086
+ * @returns The persisted record for the given id.
5087
+ * @throws If the record could not be found.
5088
+ */
5089
+ abstract readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5090
+ /**
5091
+ * Queries a single record from the table given its unique id.
5092
+ * @param id The unique id.
5093
+ * @returns The persisted record for the given id.
5094
+ * @throws If the record could not be found.
5095
+ */
5096
+ abstract readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5097
+ /**
5098
+ * Queries multiple records from the table given their unique id.
5099
+ * @param ids The unique ids array.
5100
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5101
+ * @returns The persisted records for the given ids in order.
5102
+ * @throws If one or more records could not be found.
5103
+ */
5104
+ abstract readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5105
+ /**
5106
+ * Queries multiple records from the table given their unique id.
5107
+ * @param ids The unique ids array.
5108
+ * @returns The persisted records for the given ids in order.
5109
+ * @throws If one or more records could not be found.
5110
+ */
5111
+ abstract readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5112
+ /**
5113
+ * Queries a single record from the table by the id in the object.
5114
+ * @param object Object containing the id of the record.
5115
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5116
+ * @returns The persisted record for the given id.
5117
+ * @throws If the record could not be found.
5118
+ */
5119
+ abstract readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5120
+ /**
5121
+ * Queries a single record from the table by the id in the object.
5122
+ * @param object Object containing the id of the record.
5123
+ * @returns The persisted record for the given id.
5124
+ * @throws If the record could not be found.
5125
+ */
5126
+ abstract readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5127
+ /**
5128
+ * Queries multiple records from the table by the ids in the objects.
5129
+ * @param objects Array of objects containing the ids of the records.
5130
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5131
+ * @returns The persisted records for the given ids in order.
5132
+ * @throws If one or more records could not be found.
5133
+ */
5134
+ abstract readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5135
+ /**
5136
+ * Queries multiple records from the table by the ids in the objects.
5137
+ * @param objects Array of objects containing the ids of the records.
5138
+ * @returns The persisted records for the given ids in order.
5139
+ * @throws If one or more records could not be found.
5140
+ */
5141
+ abstract readOrThrow(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5142
+ /**
5143
+ * Partially update a single record.
5144
+ * @param object An object with its id and the columns to be updated.
5145
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5146
+ * @returns The full persisted record, null if the record could not be found.
5147
+ */
5148
+ abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5149
+ /**
5150
+ * Partially update a single record.
5151
+ * @param object An object with its id and the columns to be updated.
5152
+ * @returns The full persisted record, null if the record could not be found.
5153
+ */
5154
+ abstract update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5155
+ /**
5156
+ * Partially update a single record given its unique id.
5157
+ * @param id The unique id.
5158
+ * @param object The column names and their values that have to be updated.
5159
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5160
+ * @returns The full persisted record, null if the record could not be found.
5161
+ */
5162
+ abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5163
+ /**
5164
+ * Partially update a single record given its unique id.
5165
+ * @param id The unique id.
5166
+ * @param object The column names and their values that have to be updated.
5167
+ * @returns The full persisted record, null if the record could not be found.
5168
+ */
5169
+ abstract update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5170
+ /**
5171
+ * Partially updates multiple records.
5172
+ * @param objects An array of objects with their ids and columns to be updated.
5173
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5174
+ * @returns Array of the persisted records in order (if a record could not be found null is returned).
5175
+ */
5176
+ abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5177
+ /**
5178
+ * Partially updates multiple records.
5179
+ * @param objects An array of objects with their ids and columns to be updated.
5180
+ * @returns Array of the persisted records in order (if a record could not be found null is returned).
5181
+ */
5182
+ abstract update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
3756
5183
  /**
3757
5184
  * Partially update a single record.
3758
5185
  * @param object An object with its id and the columns to be updated.
3759
5186
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3760
5187
  * @returns The full persisted record.
5188
+ * @throws If the record could not be found.
3761
5189
  */
3762
- abstract update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Data>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5190
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3763
5191
  /**
3764
5192
  * Partially update a single record.
3765
5193
  * @param object An object with its id and the columns to be updated.
3766
5194
  * @returns The full persisted record.
5195
+ * @throws If the record could not be found.
3767
5196
  */
3768
- abstract update(object: Partial<EditableData<Data>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5197
+ abstract updateOrThrow(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3769
5198
  /**
3770
5199
  * Partially update a single record given its unique id.
3771
5200
  * @param id The unique id.
3772
5201
  * @param object The column names and their values that have to be updated.
3773
5202
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3774
5203
  * @returns The full persisted record.
5204
+ * @throws If the record could not be found.
3775
5205
  */
3776
- abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Data>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5206
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3777
5207
  /**
3778
5208
  * Partially update a single record given its unique id.
3779
5209
  * @param id The unique id.
3780
5210
  * @param object The column names and their values that have to be updated.
3781
5211
  * @returns The full persisted record.
5212
+ * @throws If the record could not be found.
3782
5213
  */
3783
- abstract update(id: string, object: Partial<EditableData<Data>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5214
+ abstract updateOrThrow(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3784
5215
  /**
3785
5216
  * Partially updates multiple records.
3786
5217
  * @param objects An array of objects with their ids and columns to be updated.
3787
5218
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3788
5219
  * @returns Array of the persisted records in order.
5220
+ * @throws If one or more records could not be found.
3789
5221
  */
3790
- abstract update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Data>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5222
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3791
5223
  /**
3792
5224
  * Partially updates multiple records.
3793
5225
  * @param objects An array of objects with their ids and columns to be updated.
3794
5226
  * @returns Array of the persisted records in order.
5227
+ * @throws If one or more records could not be found.
3795
5228
  */
3796
- abstract update(objects: Array<Partial<EditableData<Data>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5229
+ abstract updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3797
5230
  /**
3798
5231
  * Creates or updates a single record. If a record exists with the given id,
3799
5232
  * it will be update, otherwise a new record will be created.
@@ -3801,14 +5234,14 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3801
5234
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3802
5235
  * @returns The full persisted record.
3803
5236
  */
3804
- abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Data> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5237
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3805
5238
  /**
3806
5239
  * Creates or updates a single record. If a record exists with the given id,
3807
5240
  * it will be update, otherwise a new record will be created.
3808
5241
  * @param object Object containing the column names with their values to be persisted in the table.
3809
5242
  * @returns The full persisted record.
3810
5243
  */
3811
- abstract createOrUpdate(object: EditableData<Data> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5244
+ abstract createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3812
5245
  /**
3813
5246
  * Creates or updates a single record. If a record exists with the given id,
3814
5247
  * it will be update, otherwise a new record will be created.
@@ -3817,7 +5250,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3817
5250
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3818
5251
  * @returns The full persisted record.
3819
5252
  */
3820
- abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Data>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5253
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3821
5254
  /**
3822
5255
  * Creates or updates a single record. If a record exists with the given id,
3823
5256
  * it will be update, otherwise a new record will be created.
@@ -3825,7 +5258,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3825
5258
  * @param object The column names and the values to be persisted.
3826
5259
  * @returns The full persisted record.
3827
5260
  */
3828
- abstract createOrUpdate(id: string, object: Omit<EditableData<Data>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5261
+ abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3829
5262
  /**
3830
5263
  * Creates or updates a single record. If a record exists with the given id,
3831
5264
  * it will be update, otherwise a new record will be created.
@@ -3833,38 +5266,126 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3833
5266
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
3834
5267
  * @returns Array of the persisted records.
3835
5268
  */
3836
- abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Data> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5269
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3837
5270
  /**
3838
5271
  * Creates or updates a single record. If a record exists with the given id,
3839
5272
  * it will be update, otherwise a new record will be created.
3840
5273
  * @param objects Array of objects with the column names and the values to be stored in the table.
3841
5274
  * @returns Array of the persisted records.
3842
5275
  */
3843
- abstract createOrUpdate(objects: Array<EditableData<Data> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5276
+ abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3844
5277
  /**
3845
5278
  * Deletes a record given its unique id.
5279
+ * @param object An object with a unique id.
5280
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5281
+ * @returns The deleted record, null if the record could not be found.
5282
+ */
5283
+ abstract delete<K extends SelectableColumn<Record>>(object: Identifiable & Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5284
+ /**
5285
+ * Deletes a record given its unique id.
5286
+ * @param object An object with a unique id.
5287
+ * @returns The deleted record, null if the record could not be found.
5288
+ */
5289
+ abstract delete(object: Identifiable & Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5290
+ /**
5291
+ * Deletes a record given a unique id.
5292
+ * @param id The unique id.
5293
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5294
+ * @returns The deleted record, null if the record could not be found.
5295
+ */
5296
+ abstract delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5297
+ /**
5298
+ * Deletes a record given a unique id.
3846
5299
  * @param id The unique id.
3847
- * @throws If the record could not be found or there was an error while performing the deletion.
5300
+ * @returns The deleted record, null if the record could not be found.
5301
+ */
5302
+ abstract delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5303
+ /**
5304
+ * Deletes multiple records given an array of objects with ids.
5305
+ * @param objects An array of objects with unique ids.
5306
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5307
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5308
+ */
5309
+ abstract delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5310
+ /**
5311
+ * Deletes multiple records given an array of objects with ids.
5312
+ * @param objects An array of objects with unique ids.
5313
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5314
+ */
5315
+ abstract delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5316
+ /**
5317
+ * Deletes multiple records given an array of unique ids.
5318
+ * @param objects An array of ids.
5319
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5320
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5321
+ */
5322
+ abstract delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5323
+ /**
5324
+ * Deletes multiple records given an array of unique ids.
5325
+ * @param objects An array of ids.
5326
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5327
+ */
5328
+ abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5329
+ /**
5330
+ * Deletes a record given its unique id.
5331
+ * @param object An object with a unique id.
5332
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5333
+ * @returns The deleted record, null if the record could not be found.
5334
+ * @throws If the record could not be found.
3848
5335
  */
3849
- abstract delete(id: string): Promise<void>;
5336
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3850
5337
  /**
3851
5338
  * Deletes a record given its unique id.
3852
- * @param id An object with a unique id.
3853
- * @throws If the record could not be found or there was an error while performing the deletion.
5339
+ * @param object An object with a unique id.
5340
+ * @returns The deleted record, null if the record could not be found.
5341
+ * @throws If the record could not be found.
3854
5342
  */
3855
- abstract delete(id: Identifiable): Promise<void>;
5343
+ abstract deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3856
5344
  /**
3857
- * Deletes a record given a list of unique ids.
3858
- * @param ids The array of unique ids.
3859
- * @throws If the record could not be found or there was an error while performing the deletion.
5345
+ * Deletes a record given a unique id.
5346
+ * @param id The unique id.
5347
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5348
+ * @returns The deleted record, null if the record could not be found.
5349
+ * @throws If the record could not be found.
5350
+ */
5351
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5352
+ /**
5353
+ * Deletes a record given a unique id.
5354
+ * @param id The unique id.
5355
+ * @returns The deleted record, null if the record could not be found.
5356
+ * @throws If the record could not be found.
5357
+ */
5358
+ abstract deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5359
+ /**
5360
+ * Deletes multiple records given an array of objects with ids.
5361
+ * @param objects An array of objects with unique ids.
5362
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5363
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5364
+ * @throws If one or more records could not be found.
3860
5365
  */
3861
- abstract delete(ids: string[]): Promise<void>;
5366
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3862
5367
  /**
3863
- * Deletes a record given a list of unique ids.
3864
- * @param ids An array of objects with unique ids.
3865
- * @throws If the record could not be found or there was an error while performing the deletion.
5368
+ * Deletes multiple records given an array of objects with ids.
5369
+ * @param objects An array of objects with unique ids.
5370
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5371
+ * @throws If one or more records could not be found.
3866
5372
  */
3867
- abstract delete(ids: Identifiable[]): Promise<void>;
5373
+ abstract deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5374
+ /**
5375
+ * Deletes multiple records given an array of unique ids.
5376
+ * @param objects An array of ids.
5377
+ * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
5378
+ * @returns Array of the deleted records in order (if a record could not be found null is returned).
5379
+ * @throws If one or more records could not be found.
5380
+ */
5381
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5382
+ /**
5383
+ * Deletes multiple records given an array of unique ids.
5384
+ * @param objects An array of ids.
5385
+ * @returns Array of the deleted records in order.
5386
+ * @throws If one or more records could not be found.
5387
+ */
5388
+ abstract deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3868
5389
  /**
3869
5390
  * Search for records in the table.
3870
5391
  * @param query The query to search for.
@@ -3880,7 +5401,7 @@ declare abstract class Repository<Data extends BaseData, Record extends XataReco
3880
5401
  }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
3881
5402
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
3882
5403
  }
3883
- declare class RestRepository<Data extends BaseData, Record extends XataRecord = Data & XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Data, Record> {
5404
+ declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
3884
5405
  #private;
3885
5406
  constructor(options: {
3886
5407
  table: string;
@@ -3888,33 +5409,62 @@ declare class RestRepository<Data extends BaseData, Record extends XataRecord =
3888
5409
  pluginOptions: XataPluginOptions;
3889
5410
  schemaTables?: Table[];
3890
5411
  });
3891
- create(object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3892
- create(recordId: string, object: EditableData<Data>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
3893
- create(objects: EditableData<Data>[]): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
3894
- create<K extends SelectableColumn<Record>>(object: EditableData<Data>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3895
- create<K extends SelectableColumn<Record>>(recordId: string, object: EditableData<Data>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
3896
- create<K extends SelectableColumn<Record>>(objects: EditableData<Data>[], columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
3897
- read(recordId: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3898
- read(recordIds: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3899
- read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
3900
- read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3901
- read<K extends SelectableColumn<Record>>(recordId: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3902
- read<K extends SelectableColumn<Record>>(recordIds: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3903
- read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
3904
- read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
3905
- update(object: Partial<EditableData<Data>> & Identifiable): Promise<SelectedPick<Record, ['*']>>;
3906
- update(recordId: string, object: Partial<EditableData<Data>>): Promise<SelectedPick<Record, ['*']>>;
3907
- update(objects: Array<Partial<EditableData<Data>> & Identifiable>): Promise<SelectedPick<Record, ['*']>[]>;
3908
- update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Data>> & Identifiable, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3909
- update<K extends SelectableColumn<Record>>(recordId: string, object: Partial<EditableData<Data>>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3910
- update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Data>> & Identifiable>, columns: K[]): Promise<SelectedPick<Record, typeof columns>[]>;
3911
- createOrUpdate(object: EditableData<Data>): Promise<SelectedPick<Record, ['*']>>;
3912
- createOrUpdate(recordId: string, object: EditableData<Data>): Promise<SelectedPick<Record, ['*']>>;
3913
- createOrUpdate(objects: EditableData<Data>[]): Promise<SelectedPick<Record, ['*']>[]>;
3914
- createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Data>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3915
- createOrUpdate<K extends SelectableColumn<Record>>(recordId: string, object: EditableData<Data>, columns: K[]): Promise<SelectedPick<Record, typeof columns>>;
3916
- createOrUpdate<K extends SelectableColumn<Record>>(objects: EditableData<Data>[], columns: K[]): Promise<SelectedPick<Record, typeof columns>[]>;
3917
- delete(a: string | Identifiable | Array<string | Identifiable>): Promise<void>;
5412
+ create<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5413
+ create(object: EditableData<Record> & Partial<Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5414
+ create<K extends SelectableColumn<Record>>(id: string, object: EditableData<Record>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5415
+ create(id: string, object: EditableData<Record>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5416
+ create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5417
+ create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5418
+ read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
5419
+ read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
5420
+ read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5421
+ read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5422
+ read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
5423
+ read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
5424
+ read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5425
+ read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5426
+ readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5427
+ readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5428
+ readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5429
+ readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5430
+ readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5431
+ readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5432
+ readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5433
+ readOrThrow(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5434
+ update<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5435
+ update(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5436
+ update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5437
+ update(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5438
+ update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5439
+ update(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5440
+ updateOrThrow<K extends SelectableColumn<Record>>(object: Partial<EditableData<Record>> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5441
+ updateOrThrow(object: Partial<EditableData<Record>> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5442
+ updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5443
+ updateOrThrow(id: string, object: Partial<EditableData<Record>>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5444
+ updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5445
+ updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5446
+ createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5447
+ createOrUpdate(object: EditableData<Record> & Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5448
+ createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5449
+ createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5450
+ createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
5451
+ createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
5452
+ delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5453
+ delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5454
+ delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
5455
+ delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
5456
+ delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5457
+ delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5458
+ delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
5459
+ delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
5460
+ deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5461
+ deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5462
+ deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
5463
+ deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
5464
+ deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5465
+ deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
5466
+ deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
5467
+ deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
3918
5468
  search(query: string, options?: {
3919
5469
  fuzziness?: FuzzinessExpression;
3920
5470
  prefix?: PrefixExpression;
@@ -3930,6 +5480,7 @@ declare type BaseSchema = {
3930
5480
  columns: readonly ({
3931
5481
  name: string;
3932
5482
  type: Column['type'];
5483
+ notNull?: boolean;
3933
5484
  } | {
3934
5485
  name: string;
3935
5486
  type: 'link';
@@ -3959,10 +5510,10 @@ declare type TableType<Tables, TableName> = Tables & {
3959
5510
  } ? Columns extends readonly unknown[] ? Columns[number] extends {
3960
5511
  name: string;
3961
5512
  type: string;
3962
- } ? Identifiable & {
3963
- [K in Columns[number]['name']]?: PropertyType<Tables, Columns[number], K>;
3964
- } : never : never : never : never;
3965
- declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
5513
+ } ? Identifiable & UnionToIntersection<Values<{
5514
+ [K in Columns[number]['name']]: PropertyType<Tables, Columns[number], K>;
5515
+ }>> : never : never : never : never;
5516
+ declare type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Properties & {
3966
5517
  name: PropertyName;
3967
5518
  } extends infer Property ? Property extends {
3968
5519
  name: string;
@@ -3971,12 +5522,18 @@ declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
3971
5522
  table: infer LinkedTable;
3972
5523
  };
3973
5524
  columns?: infer ObjectColumns;
3974
- } ? (Type extends 'string' | 'text' | 'email' ? string : Type extends 'int' | 'float' ? number : Type extends 'bool' ? boolean : Type extends 'datetime' ? Date : Type extends 'multiple' ? string[] : Type extends 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
5525
+ notNull?: infer NotNull;
5526
+ } ? NotNull extends true ? {
5527
+ [K in PropertyName]: InnerType<Type, ObjectColumns, Tables, LinkedTable>;
5528
+ } : {
5529
+ [K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
5530
+ } : never : never;
5531
+ declare type InnerType<Type, ObjectColumns, Tables, LinkedTable> = Type extends 'string' | 'text' | 'email' ? string : Type extends 'int' | 'float' ? number : Type extends 'bool' ? boolean : Type extends 'datetime' ? Date : Type extends 'multiple' ? string[] : Type extends 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
3975
5532
  name: string;
3976
5533
  type: string;
3977
- } ? {
3978
- [K in ObjectColumns[number]['name']]?: PropertyType<Tables, ObjectColumns[number], K>;
3979
- } : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never) | null : never : never;
5534
+ } ? UnionToIntersection<Values<{
5535
+ [K in ObjectColumns[number]['name']]: PropertyType<Tables, ObjectColumns[number], K>;
5536
+ }>> : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never;
3980
5537
 
3981
5538
  /**
3982
5539
  * Operator to restrict results to only values that are greater than the given value.
@@ -4082,12 +5639,10 @@ declare const includesAny: <T>(value: T) => ArrayFilter<T>;
4082
5639
  declare type SchemaDefinition = {
4083
5640
  table: string;
4084
5641
  };
4085
- declare type SchemaPluginResult<Schemas extends Record<string, BaseData>> = {
5642
+ declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
4086
5643
  [Key in keyof Schemas]: Repository<Schemas[Key]>;
4087
- } & {
4088
- [key: string]: Repository<XataRecord$1>;
4089
5644
  };
4090
- declare class SchemaPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
5645
+ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
4091
5646
  #private;
4092
5647
  constructor(schemaTables?: Schemas.Table[]);
4093
5648
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
@@ -4108,9 +5663,9 @@ declare type BaseClientOptions = {
4108
5663
  };
4109
5664
  declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
4110
5665
  interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
4111
- new <T extends readonly BaseSchema[]>(options?: Partial<BaseClientOptions>, schemaTables?: T): Omit<{
4112
- db: Awaited<ReturnType<SchemaPlugin<SchemaInference<NonNullable<typeof schemaTables>>>['build']>>;
4113
- search: Awaited<ReturnType<SearchPlugin<SchemaInference<NonNullable<typeof schemaTables>>>['build']>>;
5666
+ new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
5667
+ db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
5668
+ search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
4114
5669
  }, keyof Plugins> & {
4115
5670
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
4116
5671
  } & {
@@ -4121,7 +5676,7 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
4121
5676
  };
4122
5677
  }
4123
5678
  declare const BaseClient_base: ClientConstructor<{}>;
4124
- declare class BaseClient extends BaseClient_base<[]> {
5679
+ declare class BaseClient extends BaseClient_base<Record<string, any>> {
4125
5680
  }
4126
5681
 
4127
5682
  declare class Serializer {
@@ -4229,4 +5784,4 @@ declare class XataError extends Error {
4229
5784
  constructor(message: string, status: number);
4230
5785
  }
4231
5786
 
4232
- 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 };
5787
+ export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditResponse, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListMigrationRequestsError, ListMigrationRequestsPathParams, ListMigrationRequestsRequestBody, ListMigrationRequestsResponse, ListMigrationRequestsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaResponse, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, applyBranchSchemaEdit, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequests, listMigrationRequestsCommits, lt, lte, mergeMigrationRequest, notExists, operationsByTag, pattern, previewBranchSchemaEdit, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };