@xata.io/client 0.0.0-alpha.vf97af058351908aaf02bdf027adc6cec9f90a73a → 0.0.0-alpha.vf987dba2f06d05234a7a3521610b53c0c3f84d72

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
@@ -29,6 +29,7 @@ type XataPluginOptions = ApiExtraProps & {
29
29
  cache: CacheImpl;
30
30
  host: HostProvider;
31
31
  tables: Table[];
32
+ branch: string;
32
33
  };
33
34
 
34
35
  type AttributeDictionary = Record<string, string | number | boolean | undefined>;
@@ -56,11 +57,131 @@ type Response = {
56
57
  };
57
58
  type FetchImpl = (url: string, init?: RequestInit) => Promise<Response>;
58
59
 
60
+ type StringKeys<O> = Extract<keyof O, string>;
61
+ type Values<O> = O[StringKeys<O>];
62
+ type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
63
+ type If<Condition, Then, Else> = Condition extends true ? Then : Else;
64
+ type IsObject<T> = T extends Record<string, any> ? true : false;
65
+ type IsArray<T> = T extends Array<any> ? true : false;
66
+ type RequiredBy<T, K extends keyof T> = T & {
67
+ [P in K]-?: NonNullable<T[P]>;
68
+ };
69
+ type GetArrayInnerType<T extends readonly any[]> = T[number];
70
+ type SingleOrArray<T> = T | T[];
71
+ type Dictionary<T> = Record<string, T>;
72
+ type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
73
+ type Without<T, U> = {
74
+ [P in Exclude<keyof T, keyof U>]?: never;
75
+ };
76
+ type ExclusiveOr<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
77
+ type Explode<T> = keyof T extends infer K ? K extends unknown ? {
78
+ [I in keyof T]: I extends K ? T[I] : never;
79
+ } : never : never;
80
+ type AtMostOne<T> = Explode<Partial<T>>;
81
+ type AtLeastOne<T, U = {
82
+ [K in keyof T]: Pick<T, K>;
83
+ }> = Partial<T> & U[keyof U];
84
+ type ExactlyOne<T> = AtMostOne<T> & AtLeastOne<T>;
85
+ type Fn = (...args: any[]) => any;
86
+ type NarrowRaw<A> = (A extends [] ? [] : never) | (A extends Narrowable ? A : never) | {
87
+ [K in keyof A]: A[K] extends Fn ? A[K] : NarrowRaw<A[K]>;
88
+ };
89
+ type Narrowable = string | number | bigint | boolean;
90
+ type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
91
+ type Narrow<A> = Try<A, [], NarrowRaw<A>>;
92
+ type RequiredKeys<T> = {
93
+ [K in keyof T]-?: {} extends Pick<T, K> ? never : K;
94
+ }[keyof T];
95
+
59
96
  /**
60
97
  * Generated by @openapi-codegen
61
98
  *
62
99
  * @version 1.0
63
100
  */
101
+ /**
102
+ * @x-internal true
103
+ * @pattern [a-zA-Z0-9_-~:]+
104
+ */
105
+ type ClusterID$1 = string;
106
+ /**
107
+ * Page size.
108
+ *
109
+ * @x-internal true
110
+ * @default 25
111
+ * @minimum 0
112
+ */
113
+ type PageSize$1 = number;
114
+ /**
115
+ * Page token
116
+ *
117
+ * @x-internal true
118
+ * @maxLength 255
119
+ * @minLength 24
120
+ */
121
+ type PageToken$1 = string;
122
+ /**
123
+ * @format date-time
124
+ * @x-go-type string
125
+ */
126
+ type DateTime$1 = string;
127
+ /**
128
+ * @x-internal true
129
+ */
130
+ type BranchDetails = {
131
+ name: string;
132
+ id: string;
133
+ /**
134
+ * The cluster where this branch resides.
135
+ *
136
+ * @minLength 1
137
+ */
138
+ clusterID: string;
139
+ state: string;
140
+ createdAt: DateTime$1;
141
+ databaseName: string;
142
+ databaseID: string;
143
+ };
144
+ /**
145
+ * @x-internal true
146
+ */
147
+ type PageResponse$1 = {
148
+ size: number;
149
+ hasMore: boolean;
150
+ token?: string;
151
+ };
152
+ /**
153
+ * @x-internal true
154
+ */
155
+ type ListClusterBranchesResponse = {
156
+ branches: BranchDetails[];
157
+ page?: PageResponse$1;
158
+ };
159
+ /**
160
+ * @x-internal true
161
+ */
162
+ type MetricMessage = {
163
+ code?: string;
164
+ value?: string;
165
+ };
166
+ /**
167
+ * @x-internal true
168
+ */
169
+ type MetricData = {
170
+ id?: string;
171
+ label?: string;
172
+ messages?: MetricMessage[] | null;
173
+ status: 'complete' | 'error' | 'partial' | 'forbidden';
174
+ timestamps: string[];
175
+ values: number[];
176
+ };
177
+ /**
178
+ * @x-internal true
179
+ */
180
+ type MetricsResponse = {
181
+ metrics: MetricData[];
182
+ messages: MetricMessage[];
183
+ page?: PageResponse$1;
184
+ };
64
185
  /**
65
186
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
66
187
  *
@@ -69,15 +190,156 @@ type FetchImpl = (url: string, init?: RequestInit) => Promise<Response>;
69
190
  * @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
70
191
  */
71
192
  type DBBranchName = string;
72
- type PgRollApplyMigrationResponse = {
193
+ type ApplyMigrationResponse = {
194
+ /**
195
+ * The id of the migration job
196
+ */
197
+ jobID: string;
198
+ };
199
+ type StartMigrationResponse = {
200
+ /**
201
+ * The id of the migration job
202
+ */
203
+ jobID: string;
204
+ };
205
+ type CompleteMigrationResponse = {
206
+ /**
207
+ * The id of the migration job
208
+ */
209
+ jobID: string;
210
+ };
211
+ type RollbackMigrationResponse = {
212
+ /**
213
+ * The id of the migration job
214
+ */
215
+ jobID: string;
216
+ };
217
+ /**
218
+ * @maxLength 255
219
+ * @minLength 1
220
+ * @pattern [a-zA-Z0-9_\-~]+
221
+ */
222
+ type TableName = string;
223
+ type MigrationJobType = 'apply' | 'start' | 'complete' | 'rollback';
224
+ type MigrationJobStatus = 'pending' | 'in_progress' | 'completed' | 'failed';
225
+ /**
226
+ * The effect of a migration operation in terms of CRUD operations on the underlying schema
227
+ */
228
+ type MigrationOperationDescription = {
229
+ /**
230
+ * A new database object created by the operation
231
+ */
232
+ create?: {
233
+ /**
234
+ * The type of object created
235
+ */
236
+ type: 'table' | 'column' | 'index';
237
+ /**
238
+ * The name of the object created
239
+ */
240
+ name: string;
241
+ /**
242
+ * The name of the table on which the object is created, if applicable
243
+ */
244
+ table?: string;
245
+ /**
246
+ * The mapping between the virtual and physical name of the new object, if applicable
247
+ */
248
+ mapping?: Record<string, any>;
249
+ };
250
+ /**
251
+ * A database object updated by the operation
252
+ */
253
+ update?: {
254
+ /**
255
+ * The type of updated object
256
+ */
257
+ type: 'table' | 'column';
258
+ /**
259
+ * The name of the updated object
260
+ */
261
+ name: string;
262
+ /**
263
+ * The name of the table on which the object is updated, if applicable
264
+ */
265
+ table?: string;
266
+ /**
267
+ * The mapping between the virtual and physical name of the updated object, if applicable
268
+ */
269
+ mapping?: Record<string, any>;
270
+ };
271
+ /**
272
+ * A database object renamed by the operation
273
+ */
274
+ rename?: {
275
+ /**
276
+ * The type of the renamed object
277
+ */
278
+ type: 'table' | 'column' | 'constraint';
279
+ /**
280
+ * The name of the table on which the object is renamed, if applicable
281
+ */
282
+ table?: string;
283
+ /**
284
+ * The old name of the renamed object
285
+ */
286
+ from: string;
287
+ /**
288
+ * The new name of the renamed object
289
+ */
290
+ to: string;
291
+ };
292
+ /**
293
+ * A database object deleted by the operation
294
+ */
295
+ ['delete']?: {
296
+ /**
297
+ * The type of the deleted object
298
+ */
299
+ type: 'table' | 'column' | 'constraint' | 'index';
300
+ /**
301
+ * The name of the deleted object
302
+ */
303
+ name: string;
304
+ /**
305
+ * The name of the table on which the object is deleted, if applicable
306
+ */
307
+ table: string;
308
+ };
309
+ };
310
+ /**
311
+ * @minItems 1
312
+ */
313
+ type MigrationDescription = MigrationOperationDescription[];
314
+ type MigrationJobStatusResponse = {
73
315
  /**
74
316
  * The id of the migration job
75
317
  */
76
318
  jobID: string;
319
+ /**
320
+ * The type of the migration job
321
+ */
322
+ type: MigrationJobType;
323
+ /**
324
+ * The status of the migration job
325
+ */
326
+ status: MigrationJobStatus;
327
+ /**
328
+ * The effect of any active migration on the schema
329
+ */
330
+ description?: MigrationDescription;
331
+ /**
332
+ * The timestamp at which the migration job completed or failed
333
+ *
334
+ * @format date-time
335
+ */
336
+ completedAt?: string;
337
+ /**
338
+ * The error message associated with the migration job
339
+ */
340
+ error?: string;
77
341
  };
78
- type PgRollJobType = 'apply' | 'start' | 'complete' | 'rollback';
79
- type PgRollJobStatus = 'pending' | 'in_progress' | 'completed' | 'failed';
80
- type PgRollJobStatusResponse = {
342
+ type MigrationJobItem = {
81
343
  /**
82
344
  * The id of the migration job
83
345
  */
@@ -85,24 +347,54 @@ type PgRollJobStatusResponse = {
85
347
  /**
86
348
  * The type of the migration job
87
349
  */
88
- type: PgRollJobType;
350
+ type: MigrationJobType;
89
351
  /**
90
352
  * The status of the migration job
91
353
  */
92
- status: PgRollJobStatus;
354
+ status: MigrationJobStatus;
355
+ /**
356
+ * The pgroll migration that was applied
357
+ */
358
+ migration?: string;
359
+ /**
360
+ * The effect of any active migration on the schema
361
+ */
362
+ description?: MigrationDescription;
363
+ /**
364
+ * The timestamp at which the migration job was enqueued
365
+ *
366
+ * @format date-time
367
+ */
368
+ enqueuedAt: string;
369
+ /**
370
+ * The timestamp at which the migration job completed or failed
371
+ *
372
+ * @format date-time
373
+ */
374
+ completedAt?: string;
93
375
  /**
94
376
  * The error message associated with the migration job
95
377
  */
96
378
  error?: string;
97
379
  };
380
+ type GetMigrationJobsResponse = {
381
+ /**
382
+ * The list of migration jobs
383
+ */
384
+ jobs: MigrationJobItem[];
385
+ /**
386
+ * The cursor (timestamp) for the next page of results
387
+ */
388
+ cursor?: string;
389
+ };
98
390
  /**
99
391
  * @maxLength 255
100
392
  * @minLength 1
101
393
  * @pattern [a-zA-Z0-9_\-~]+
102
394
  */
103
- type PgRollMigrationJobID = string;
104
- type PgRollMigrationType = 'pgroll' | 'inferred';
105
- type PgRollMigrationHistoryItem = {
395
+ type MigrationJobID = string;
396
+ type MigrationType = 'pgroll' | 'inferred';
397
+ type MigrationHistoryItem = {
106
398
  /**
107
399
  * The name of the migration
108
400
  */
@@ -128,13 +420,17 @@ type PgRollMigrationHistoryItem = {
128
420
  /**
129
421
  * The type of the migration
130
422
  */
131
- migrationType: PgRollMigrationType;
423
+ migrationType: MigrationType;
132
424
  };
133
- type PgRollMigrationHistoryResponse = {
425
+ type MigrationHistoryResponse = {
134
426
  /**
135
427
  * The migrations that have been applied to the branch
136
428
  */
137
- migrations: PgRollMigrationHistoryItem[];
429
+ migrations: MigrationHistoryItem[];
430
+ /**
431
+ * The cursor (timestamp) for the next page of results
432
+ */
433
+ cursor?: string;
138
434
  };
139
435
  /**
140
436
  * @maxLength 255
@@ -143,25 +439,29 @@ type PgRollMigrationHistoryResponse = {
143
439
  */
144
440
  type DBName$1 = string;
145
441
  /**
146
- * @format date-time
147
- * @x-go-type string
442
+ * Represent the state of the branch, used for branch lifecycle management
148
443
  */
149
- type DateTime$1 = string;
444
+ type BranchState = 'active' | 'move_scheduled' | 'moving';
150
445
  type Branch = {
151
446
  name: string;
152
447
  /**
153
448
  * The cluster where this branch resides. Value of 'shared-cluster' for branches in shared clusters
154
449
  *
155
450
  * @minLength 1
156
- * @x-internal true
157
451
  */
158
452
  clusterID?: string;
453
+ state: BranchState;
159
454
  createdAt: DateTime$1;
455
+ searchDisabled?: boolean;
456
+ inactiveSharedCluster?: boolean;
160
457
  };
161
458
  type ListBranchesResponse = {
162
459
  databaseName: string;
163
460
  branches: Branch[];
164
461
  };
462
+ type DatabaseSettings = {
463
+ searchEnabled: boolean;
464
+ };
165
465
  /**
166
466
  * @maxLength 255
167
467
  * @minLength 1
@@ -189,12 +489,6 @@ type StartedFromMetadata = {
189
489
  dbBranchID: string;
190
490
  migrationID: string;
191
491
  };
192
- /**
193
- * @maxLength 255
194
- * @minLength 1
195
- * @pattern [a-zA-Z0-9_\-~]+
196
- */
197
- type TableName = string;
198
492
  type ColumnLink = {
199
493
  table: string;
200
494
  };
@@ -210,7 +504,7 @@ type ColumnFile = {
210
504
  };
211
505
  type Column = {
212
506
  name: string;
213
- type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'datetime' | 'vector' | 'file[]' | 'file' | 'json';
507
+ type: string;
214
508
  link?: ColumnLink;
215
509
  vector?: ColumnVector;
216
510
  file?: ColumnFile;
@@ -249,12 +543,63 @@ type DBBranch = {
249
543
  */
250
544
  clusterID?: string;
251
545
  version: number;
546
+ state: BranchState;
252
547
  lastMigrationID: string;
253
548
  metadata?: BranchMetadata$1;
254
549
  startedFrom?: StartedFromMetadata;
255
550
  schema: Schema;
256
551
  };
257
552
  type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
553
+ type BranchSchema = {
554
+ name: string;
555
+ tables: {
556
+ [key: string]: {
557
+ oid: string;
558
+ name: string;
559
+ xataCompatible: boolean;
560
+ comment: string;
561
+ columns: {
562
+ [key: string]: {
563
+ name: string;
564
+ type: string;
565
+ ['default']: string | null;
566
+ nullable: boolean;
567
+ unique: boolean;
568
+ comment: string;
569
+ };
570
+ };
571
+ indexes: {
572
+ [key: string]: {
573
+ name: string;
574
+ unique: boolean;
575
+ columns: string[];
576
+ };
577
+ };
578
+ primaryKey: string[];
579
+ foreignKeys: {
580
+ [key: string]: {
581
+ name: string;
582
+ columns: string[];
583
+ referencedTable: string;
584
+ referencedColumns: string[];
585
+ };
586
+ };
587
+ checkConstraints: {
588
+ [key: string]: {
589
+ name: string;
590
+ columns: string[];
591
+ definition: string;
592
+ };
593
+ };
594
+ uniqueConstraints: {
595
+ [key: string]: {
596
+ name: string;
597
+ columns: string[];
598
+ };
599
+ };
600
+ };
601
+ };
602
+ };
258
603
  type BranchWithCopyID = {
259
604
  branchName: BranchName$1;
260
605
  dbBranchID: string;
@@ -907,6 +1252,40 @@ type RecordMeta = {
907
1252
  */
908
1253
  warnings?: string[];
909
1254
  };
1255
+ } | {
1256
+ xata_id: RecordID;
1257
+ /**
1258
+ * The record's version. Can be used for optimistic concurrency control.
1259
+ */
1260
+ xata_version: number;
1261
+ /**
1262
+ * The time when the record was created.
1263
+ */
1264
+ xata_createdat?: string;
1265
+ /**
1266
+ * The time when the record was last updated.
1267
+ */
1268
+ xata_updatedat?: string;
1269
+ /**
1270
+ * The record's table name. APIs that return records from multiple tables will set this field accordingly.
1271
+ */
1272
+ xata_table?: string;
1273
+ /**
1274
+ * Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
1275
+ */
1276
+ xata_highlight?: {
1277
+ [key: string]: string[] | {
1278
+ [key: string]: any;
1279
+ };
1280
+ };
1281
+ /**
1282
+ * The record's relevancy score. This is returned by the search APIs.
1283
+ */
1284
+ xata_score?: number;
1285
+ /**
1286
+ * Encoding/Decoding errors
1287
+ */
1288
+ xata_warnings?: string[];
910
1289
  };
911
1290
  /**
912
1291
  * File metadata
@@ -916,13 +1295,43 @@ type FileResponse = {
916
1295
  name: FileName;
917
1296
  mediaType: MediaType;
918
1297
  /**
919
- * @format int64
1298
+ * Enable public access to the file
920
1299
  */
921
- size: number;
1300
+ enablePublicUrl: boolean;
922
1301
  /**
923
- * @format int64
1302
+ * Time to live for signed URLs
1303
+ */
1304
+ signedUrlTimeout: number;
1305
+ /**
1306
+ * Time to live for signed URLs
1307
+ */
1308
+ uploadUrlTimeout: number;
1309
+ /**
1310
+ * @format int64
1311
+ */
1312
+ size: number;
1313
+ /**
1314
+ * @format int64
924
1315
  */
925
1316
  version: number;
1317
+ /**
1318
+ * File access URL
1319
+ *
1320
+ * @format uri
1321
+ */
1322
+ url: string;
1323
+ /**
1324
+ * Signed file access URL
1325
+ *
1326
+ * @format uri
1327
+ */
1328
+ signedUrl: string;
1329
+ /**
1330
+ * Upload file URL
1331
+ *
1332
+ * @format uri
1333
+ */
1334
+ uploadUrl: string;
926
1335
  attributes?: Record<string, any>;
927
1336
  };
928
1337
  type QueryColumnsProjection = (string | ProjectionConfig)[];
@@ -1370,6 +1779,57 @@ type FileSignature = string;
1370
1779
  type SQLRecord = {
1371
1780
  [key: string]: any;
1372
1781
  };
1782
+ /**
1783
+ * @default strong
1784
+ */
1785
+ type SQLConsistency = 'strong' | 'eventual';
1786
+ /**
1787
+ * @default json
1788
+ */
1789
+ type SQLResponseType$1 = 'json' | 'array';
1790
+ type PreparedStatement = {
1791
+ /**
1792
+ * The SQL statement.
1793
+ *
1794
+ * @minLength 1
1795
+ */
1796
+ statement: string;
1797
+ /**
1798
+ * The query parameter list.
1799
+ *
1800
+ * @x-go-type []any
1801
+ */
1802
+ params?: any[] | null;
1803
+ };
1804
+ type SQLResponseBase = {
1805
+ /**
1806
+ * Name of the column and its PostgreSQL type
1807
+ *
1808
+ * @x-go-type []sqlproxy.ColumnMeta
1809
+ */
1810
+ columns: {
1811
+ name: string;
1812
+ type: string;
1813
+ }[];
1814
+ /**
1815
+ * Number of selected columns
1816
+ */
1817
+ total: number;
1818
+ warning?: string;
1819
+ };
1820
+ type SQLResponseJSON = SQLResponseBase & {
1821
+ /**
1822
+ * @x-go-type []xata.Record
1823
+ */
1824
+ records: SQLRecord[];
1825
+ };
1826
+ type SQLResponseArray = SQLResponseBase & {
1827
+ /**
1828
+ * @x-go-type []xata.Row
1829
+ */
1830
+ rows: any[][];
1831
+ };
1832
+ type SQLResponse$1 = SQLResponseJSON | SQLResponseArray;
1373
1833
  /**
1374
1834
  * Xata Table Record Metadata
1375
1835
  */
@@ -1426,6 +1886,11 @@ type RecordUpdateResponse = XataRecord$1 | {
1426
1886
  createdAt: string;
1427
1887
  updatedAt: string;
1428
1888
  };
1889
+ } | {
1890
+ xata_id: string;
1891
+ xata_version: number;
1892
+ xata_createdat: string;
1893
+ xata_updatedat: string;
1429
1894
  };
1430
1895
  type PutFileResponse = FileResponse;
1431
1896
  type RecordResponse = XataRecord$1;
@@ -1467,17 +1932,9 @@ type AggResponse = {
1467
1932
  [key: string]: AggResponse$1;
1468
1933
  };
1469
1934
  };
1470
- type SQLResponse = {
1471
- records?: SQLRecord[];
1472
- /**
1473
- * Name of the column and its PostgreSQL type
1474
- */
1475
- columns?: Record<string, any>;
1476
- /**
1477
- * Number of selected columns
1478
- */
1479
- total?: number;
1480
- warning?: string;
1935
+ type SQLResponse = SQLResponse$1;
1936
+ type SQLBatchResponse = {
1937
+ results: SQLResponse$1[];
1481
1938
  };
1482
1939
 
1483
1940
  /**
@@ -1573,6 +2030,10 @@ type Workspace = WorkspaceMeta & {
1573
2030
  memberCount: number;
1574
2031
  plan: WorkspacePlan;
1575
2032
  };
2033
+ type WorkspaceSettings = {
2034
+ postgresEnabled: boolean;
2035
+ dedicatedClusters: boolean;
2036
+ };
1576
2037
  type WorkspaceMember = {
1577
2038
  userId: UserID;
1578
2039
  fullname: string;
@@ -1639,6 +2100,8 @@ type ClusterShortMetadata = {
1639
2100
  * @format int64
1640
2101
  */
1641
2102
  branches: number;
2103
+ createdAt: DateTime;
2104
+ terminatedAt?: DateTime;
1642
2105
  };
1643
2106
  /**
1644
2107
  * @x-internal true
@@ -1736,6 +2199,13 @@ type ClusterConfiguration = {
1736
2199
  * @format int64
1737
2200
  */
1738
2201
  replicas?: number;
2202
+ /**
2203
+ * @format int64
2204
+ * @default 1
2205
+ * @maximum 3
2206
+ * @minimum 1
2207
+ */
2208
+ instanceCount?: number;
1739
2209
  /**
1740
2210
  * @default false
1741
2211
  */
@@ -1754,7 +2224,7 @@ type ClusterCreateDetails = {
1754
2224
  /**
1755
2225
  * @maxLength 63
1756
2226
  * @minLength 1
1757
- * @pattern [a-zA-Z0-9_-~:]+
2227
+ * @pattern [a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
1758
2228
  */
1759
2229
  name: string;
1760
2230
  configuration: ClusterConfiguration;
@@ -1766,6 +2236,57 @@ type ClusterResponse = {
1766
2236
  state: string;
1767
2237
  clusterID: string;
1768
2238
  };
2239
+ /**
2240
+ * @x-internal true
2241
+ */
2242
+ type AutoscalingConfigResponse = {
2243
+ /**
2244
+ * @format double
2245
+ * @default 0.5
2246
+ */
2247
+ minCapacity: number;
2248
+ /**
2249
+ * @format double
2250
+ * @default 4
2251
+ */
2252
+ maxCapacity: number;
2253
+ };
2254
+ /**
2255
+ * @x-internal true
2256
+ */
2257
+ type MaintenanceConfigResponse = {
2258
+ /**
2259
+ * @default false
2260
+ */
2261
+ autoMinorVersionUpgrade: boolean;
2262
+ /**
2263
+ * @default false
2264
+ */
2265
+ applyImmediately: boolean;
2266
+ maintenanceWindow: WeeklyTimeWindow;
2267
+ backupWindow: DailyTimeWindow;
2268
+ };
2269
+ /**
2270
+ * @x-internal true
2271
+ */
2272
+ type ClusterConfigurationResponse = {
2273
+ engineVersion: string;
2274
+ instanceType: string;
2275
+ /**
2276
+ * @format int64
2277
+ */
2278
+ replicas: number;
2279
+ /**
2280
+ * @format int64
2281
+ */
2282
+ instanceCount: number;
2283
+ /**
2284
+ * @default false
2285
+ */
2286
+ deletionProtection: boolean;
2287
+ autoscaling?: AutoscalingConfigResponse;
2288
+ maintenance: MaintenanceConfigResponse;
2289
+ };
1769
2290
  /**
1770
2291
  * @x-internal true
1771
2292
  */
@@ -1778,22 +2299,36 @@ type ClusterMetadata = {
1778
2299
  * @format int64
1779
2300
  */
1780
2301
  branches: number;
1781
- configuration?: ClusterConfiguration;
2302
+ configuration: ClusterConfigurationResponse;
1782
2303
  };
1783
2304
  /**
1784
2305
  * @x-internal true
1785
2306
  */
1786
- type ClusterUpdateDetails = {
2307
+ type ClusterDeleteMetadata = {
1787
2308
  id: ClusterID;
2309
+ state: string;
2310
+ region: string;
2311
+ name: string;
1788
2312
  /**
1789
- * @maxLength 63
1790
- * @minLength 1
1791
- * @pattern [a-zA-Z0-9_-~:]+
2313
+ * @format int64
1792
2314
  */
1793
- name?: string;
1794
- configuration?: ClusterConfiguration;
1795
- state?: string;
1796
- region?: string;
2315
+ branches: number;
2316
+ };
2317
+ /**
2318
+ * @x-internal true
2319
+ */
2320
+ type ClusterUpdateDetails = {
2321
+ /**
2322
+ * @pattern ^[Ss][Tt][Oo][Pp]|[Ss][Tt][Aa][Rr][Tt]$
2323
+ */
2324
+ command: string;
2325
+ };
2326
+ /**
2327
+ * @x-internal true
2328
+ */
2329
+ type ClusterUpdateMetadata = {
2330
+ id: ClusterID;
2331
+ state: string;
1797
2332
  };
1798
2333
  /**
1799
2334
  * Metadata of databases
@@ -1816,9 +2351,13 @@ type DatabaseMetadata = {
1816
2351
  */
1817
2352
  newMigrations?: boolean;
1818
2353
  /**
1819
- * @x-internal true
2354
+ * The default cluster ID where branches from this database reside. Value of 'shared-cluster' for branches in shared clusters.
1820
2355
  */
1821
2356
  defaultClusterID?: string;
2357
+ /**
2358
+ * The database is accessible via the Postgres protocol
2359
+ */
2360
+ postgresEnabled?: boolean;
1822
2361
  /**
1823
2362
  * Metadata about the database for display in Xata user interfaces
1824
2363
  */
@@ -2252,6 +2791,7 @@ type GetWorkspacesListError = ErrorWrapper$1<{
2252
2791
  type GetWorkspacesListResponse = {
2253
2792
  workspaces: {
2254
2793
  id: WorkspaceID;
2794
+ unique_id: string;
2255
2795
  name: string;
2256
2796
  slug: string;
2257
2797
  role: Role;
@@ -2359,6 +2899,62 @@ type DeleteWorkspaceVariables = {
2359
2899
  * Delete the workspace with the provided ID
2360
2900
  */
2361
2901
  declare const deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
2902
+ type GetWorkspaceSettingsPathParams = {
2903
+ /**
2904
+ * Workspace ID
2905
+ */
2906
+ workspaceId: WorkspaceID;
2907
+ };
2908
+ type GetWorkspaceSettingsError = ErrorWrapper$1<{
2909
+ status: 400;
2910
+ payload: BadRequestError;
2911
+ } | {
2912
+ status: 401;
2913
+ payload: AuthError;
2914
+ } | {
2915
+ status: 403;
2916
+ payload: AuthError;
2917
+ } | {
2918
+ status: 404;
2919
+ payload: SimpleError;
2920
+ }>;
2921
+ type GetWorkspaceSettingsVariables = {
2922
+ pathParams: GetWorkspaceSettingsPathParams;
2923
+ } & ControlPlaneFetcherExtraProps;
2924
+ /**
2925
+ * Retrieve workspace settings from a workspace ID
2926
+ */
2927
+ declare const getWorkspaceSettings: (variables: GetWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
2928
+ type UpdateWorkspaceSettingsPathParams = {
2929
+ /**
2930
+ * Workspace ID
2931
+ */
2932
+ workspaceId: WorkspaceID;
2933
+ };
2934
+ type UpdateWorkspaceSettingsError = ErrorWrapper$1<{
2935
+ status: 400;
2936
+ payload: BadRequestError;
2937
+ } | {
2938
+ status: 401;
2939
+ payload: AuthError;
2940
+ } | {
2941
+ status: 403;
2942
+ payload: AuthError;
2943
+ } | {
2944
+ status: 404;
2945
+ payload: SimpleError;
2946
+ }>;
2947
+ type UpdateWorkspaceSettingsRequestBody = {
2948
+ postgresEnabled: boolean;
2949
+ };
2950
+ type UpdateWorkspaceSettingsVariables = {
2951
+ body: UpdateWorkspaceSettingsRequestBody;
2952
+ pathParams: UpdateWorkspaceSettingsPathParams;
2953
+ } & ControlPlaneFetcherExtraProps;
2954
+ /**
2955
+ * Update workspace settings
2956
+ */
2957
+ declare const updateWorkspaceSettings: (variables: UpdateWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
2362
2958
  type GetWorkspaceMembersListPathParams = {
2363
2959
  /**
2364
2960
  * Workspace ID
@@ -2716,7 +3312,31 @@ type UpdateClusterVariables = {
2716
3312
  /**
2717
3313
  * Update cluster for given cluster ID
2718
3314
  */
2719
- declare const updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal) => Promise<ClusterMetadata>;
3315
+ declare const updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal) => Promise<ClusterUpdateMetadata>;
3316
+ type DeleteClusterPathParams = {
3317
+ /**
3318
+ * Workspace ID
3319
+ */
3320
+ workspaceId: WorkspaceID;
3321
+ /**
3322
+ * Cluster ID
3323
+ */
3324
+ clusterId: ClusterID;
3325
+ };
3326
+ type DeleteClusterError = ErrorWrapper$1<{
3327
+ status: 400;
3328
+ payload: BadRequestError;
3329
+ } | {
3330
+ status: 401;
3331
+ payload: AuthError;
3332
+ }>;
3333
+ type DeleteClusterVariables = {
3334
+ pathParams: DeleteClusterPathParams;
3335
+ } & ControlPlaneFetcherExtraProps;
3336
+ /**
3337
+ * Delete cluster with given cluster ID
3338
+ */
3339
+ declare const deleteCluster: (variables: DeleteClusterVariables, signal?: AbortSignal) => Promise<ClusterDeleteMetadata>;
2720
3340
  type GetDatabaseListPathParams = {
2721
3341
  /**
2722
3342
  * Workspace ID
@@ -3065,6 +3685,78 @@ type ErrorWrapper<TError> = TError | {
3065
3685
  * @version 1.0
3066
3686
  */
3067
3687
 
3688
+ type ListClusterBranchesPathParams = {
3689
+ /**
3690
+ * Cluster ID
3691
+ */
3692
+ clusterId: ClusterID$1;
3693
+ workspace: string;
3694
+ region: string;
3695
+ };
3696
+ type ListClusterBranchesQueryParams = {
3697
+ /**
3698
+ * Page size
3699
+ */
3700
+ page?: PageSize$1;
3701
+ /**
3702
+ * Page token
3703
+ */
3704
+ token?: PageToken$1;
3705
+ };
3706
+ type ListClusterBranchesError = ErrorWrapper<{
3707
+ status: 400;
3708
+ payload: BadRequestError$1;
3709
+ } | {
3710
+ status: 401;
3711
+ payload: AuthError$1;
3712
+ }>;
3713
+ type ListClusterBranchesVariables = {
3714
+ pathParams: ListClusterBranchesPathParams;
3715
+ queryParams?: ListClusterBranchesQueryParams;
3716
+ } & DataPlaneFetcherExtraProps;
3717
+ /**
3718
+ * Retrieve branches for given cluster ID
3719
+ */
3720
+ declare const listClusterBranches: (variables: ListClusterBranchesVariables, signal?: AbortSignal) => Promise<ListClusterBranchesResponse>;
3721
+ type GetClusterMetricsPathParams = {
3722
+ /**
3723
+ * Cluster ID
3724
+ */
3725
+ clusterId: ClusterID$1;
3726
+ workspace: string;
3727
+ region: string;
3728
+ };
3729
+ type GetClusterMetricsQueryParams = {
3730
+ startTime: string;
3731
+ endTime: string;
3732
+ period: '5min' | '15min' | '1hour';
3733
+ /**
3734
+ * Page size
3735
+ */
3736
+ page?: PageSize$1;
3737
+ /**
3738
+ * Page token
3739
+ */
3740
+ token?: PageToken$1;
3741
+ };
3742
+ type GetClusterMetricsError = ErrorWrapper<{
3743
+ status: 400;
3744
+ payload: BadRequestError$1;
3745
+ } | {
3746
+ status: 401;
3747
+ payload: AuthError$1;
3748
+ } | {
3749
+ status: 404;
3750
+ payload: SimpleError$1;
3751
+ }>;
3752
+ type GetClusterMetricsVariables = {
3753
+ pathParams: GetClusterMetricsPathParams;
3754
+ queryParams: GetClusterMetricsQueryParams;
3755
+ } & DataPlaneFetcherExtraProps;
3756
+ /**
3757
+ * retrieve a standard set of RDS cluster metrics
3758
+ */
3759
+ declare const getClusterMetrics: (variables: GetClusterMetricsVariables, signal?: AbortSignal) => Promise<MetricsResponse>;
3068
3760
  type ApplyMigrationPathParams = {
3069
3761
  /**
3070
3762
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3091,6 +3783,7 @@ type ApplyMigrationRequestBody = {
3091
3783
  operations: {
3092
3784
  [key: string]: any;
3093
3785
  }[];
3786
+ adaptTables?: boolean;
3094
3787
  };
3095
3788
  type ApplyMigrationVariables = {
3096
3789
  body: ApplyMigrationRequestBody;
@@ -3099,8 +3792,170 @@ type ApplyMigrationVariables = {
3099
3792
  /**
3100
3793
  * Applies a pgroll migration to the specified database.
3101
3794
  */
3102
- declare const applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal) => Promise<PgRollApplyMigrationResponse>;
3103
- type PgRollStatusPathParams = {
3795
+ declare const applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
3796
+ type StartMigrationPathParams = {
3797
+ /**
3798
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3799
+ */
3800
+ dbBranchName: DBBranchName;
3801
+ workspace: string;
3802
+ region: string;
3803
+ };
3804
+ type StartMigrationError = ErrorWrapper<{
3805
+ status: 400;
3806
+ payload: BadRequestError$1;
3807
+ } | {
3808
+ status: 401;
3809
+ payload: AuthError$1;
3810
+ } | {
3811
+ status: 404;
3812
+ payload: SimpleError$1;
3813
+ }>;
3814
+ type StartMigrationRequestBody = {
3815
+ /**
3816
+ * Migration name
3817
+ */
3818
+ name?: string;
3819
+ operations: {
3820
+ [key: string]: any;
3821
+ }[];
3822
+ adaptTables?: boolean;
3823
+ };
3824
+ type StartMigrationVariables = {
3825
+ body: StartMigrationRequestBody;
3826
+ pathParams: StartMigrationPathParams;
3827
+ } & DataPlaneFetcherExtraProps;
3828
+ /**
3829
+ * Starts a pgroll migration on the specified database.
3830
+ */
3831
+ declare const startMigration: (variables: StartMigrationVariables, signal?: AbortSignal) => Promise<StartMigrationResponse>;
3832
+ type CompleteMigrationPathParams = {
3833
+ /**
3834
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3835
+ */
3836
+ dbBranchName: DBBranchName;
3837
+ workspace: string;
3838
+ region: string;
3839
+ };
3840
+ type CompleteMigrationError = ErrorWrapper<{
3841
+ status: 400;
3842
+ payload: BadRequestError$1;
3843
+ } | {
3844
+ status: 401;
3845
+ payload: AuthError$1;
3846
+ } | {
3847
+ status: 404;
3848
+ payload: SimpleError$1;
3849
+ }>;
3850
+ type CompleteMigrationVariables = {
3851
+ pathParams: CompleteMigrationPathParams;
3852
+ } & DataPlaneFetcherExtraProps;
3853
+ /**
3854
+ * Complete an active migration on the specified database
3855
+ */
3856
+ declare const completeMigration: (variables: CompleteMigrationVariables, signal?: AbortSignal) => Promise<CompleteMigrationResponse>;
3857
+ type RollbackMigrationPathParams = {
3858
+ /**
3859
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3860
+ */
3861
+ dbBranchName: DBBranchName;
3862
+ workspace: string;
3863
+ region: string;
3864
+ };
3865
+ type RollbackMigrationError = ErrorWrapper<{
3866
+ status: 400;
3867
+ payload: BadRequestError$1;
3868
+ } | {
3869
+ status: 401;
3870
+ payload: AuthError$1;
3871
+ } | {
3872
+ status: 404;
3873
+ payload: SimpleError$1;
3874
+ }>;
3875
+ type RollbackMigrationVariables = {
3876
+ pathParams: RollbackMigrationPathParams;
3877
+ } & DataPlaneFetcherExtraProps;
3878
+ /**
3879
+ * Roll back an active migration on the specified database
3880
+ */
3881
+ declare const rollbackMigration: (variables: RollbackMigrationVariables, signal?: AbortSignal) => Promise<RollbackMigrationResponse>;
3882
+ type AdaptTablePathParams = {
3883
+ /**
3884
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3885
+ */
3886
+ dbBranchName: DBBranchName;
3887
+ /**
3888
+ * The Table name
3889
+ */
3890
+ tableName: TableName;
3891
+ workspace: string;
3892
+ region: string;
3893
+ };
3894
+ type AdaptTableError = ErrorWrapper<{
3895
+ status: 400;
3896
+ payload: BadRequestError$1;
3897
+ } | {
3898
+ status: 401;
3899
+ payload: AuthError$1;
3900
+ } | {
3901
+ status: 404;
3902
+ payload: SimpleError$1;
3903
+ }>;
3904
+ type AdaptTableVariables = {
3905
+ pathParams: AdaptTablePathParams;
3906
+ } & DataPlaneFetcherExtraProps;
3907
+ /**
3908
+ * Adapt a table to be used from Xata, this will add the Xata metadata fields to the table, making it accessible through the data API.
3909
+ */
3910
+ declare const adaptTable: (variables: AdaptTableVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
3911
+ type AdaptAllTablesPathParams = {
3912
+ /**
3913
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3914
+ */
3915
+ dbBranchName: DBBranchName;
3916
+ workspace: string;
3917
+ region: string;
3918
+ };
3919
+ type AdaptAllTablesError = ErrorWrapper<{
3920
+ status: 400;
3921
+ payload: BadRequestError$1;
3922
+ } | {
3923
+ status: 401;
3924
+ payload: AuthError$1;
3925
+ } | {
3926
+ status: 404;
3927
+ payload: SimpleError$1;
3928
+ }>;
3929
+ type AdaptAllTablesVariables = {
3930
+ pathParams: AdaptAllTablesPathParams;
3931
+ } & DataPlaneFetcherExtraProps;
3932
+ /**
3933
+ * Adapt all xata incompatible tables present in the branch, this will add the Xata metadata fields to the table, making them accessible through the data API.
3934
+ */
3935
+ declare const adaptAllTables: (variables: AdaptAllTablesVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
3936
+ type GetBranchMigrationJobStatusPathParams = {
3937
+ /**
3938
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3939
+ */
3940
+ dbBranchName: DBBranchName;
3941
+ workspace: string;
3942
+ region: string;
3943
+ };
3944
+ type GetBranchMigrationJobStatusError = ErrorWrapper<{
3945
+ status: 400;
3946
+ payload: BadRequestError$1;
3947
+ } | {
3948
+ status: 401;
3949
+ payload: AuthError$1;
3950
+ } | {
3951
+ status: 404;
3952
+ payload: SimpleError$1;
3953
+ }>;
3954
+ type GetBranchMigrationJobStatusVariables = {
3955
+ pathParams: GetBranchMigrationJobStatusPathParams;
3956
+ } & DataPlaneFetcherExtraProps;
3957
+ declare const getBranchMigrationJobStatus: (variables: GetBranchMigrationJobStatusVariables, signal?: AbortSignal) => Promise<MigrationJobStatusResponse>;
3958
+ type GetMigrationJobsPathParams = {
3104
3959
  /**
3105
3960
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3106
3961
  */
@@ -3108,7 +3963,17 @@ type PgRollStatusPathParams = {
3108
3963
  workspace: string;
3109
3964
  region: string;
3110
3965
  };
3111
- type PgRollStatusError = ErrorWrapper<{
3966
+ type GetMigrationJobsQueryParams = {
3967
+ /**
3968
+ * @format date-time
3969
+ */
3970
+ cursor?: string;
3971
+ /**
3972
+ * Page size
3973
+ */
3974
+ limit?: PageSize$1;
3975
+ };
3976
+ type GetMigrationJobsError = ErrorWrapper<{
3112
3977
  status: 400;
3113
3978
  payload: BadRequestError$1;
3114
3979
  } | {
@@ -3118,11 +3983,12 @@ type PgRollStatusError = ErrorWrapper<{
3118
3983
  status: 404;
3119
3984
  payload: SimpleError$1;
3120
3985
  }>;
3121
- type PgRollStatusVariables = {
3122
- pathParams: PgRollStatusPathParams;
3986
+ type GetMigrationJobsVariables = {
3987
+ pathParams: GetMigrationJobsPathParams;
3988
+ queryParams?: GetMigrationJobsQueryParams;
3123
3989
  } & DataPlaneFetcherExtraProps;
3124
- declare const pgRollStatus: (variables: PgRollStatusVariables, signal?: AbortSignal) => Promise<PgRollJobStatusResponse>;
3125
- type PgRollJobStatusPathParams = {
3990
+ declare const getMigrationJobs: (variables: GetMigrationJobsVariables, signal?: AbortSignal) => Promise<GetMigrationJobsResponse>;
3991
+ type GetMigrationJobStatusPathParams = {
3126
3992
  /**
3127
3993
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3128
3994
  */
@@ -3130,11 +3996,66 @@ type PgRollJobStatusPathParams = {
3130
3996
  /**
3131
3997
  * The id of the migration job
3132
3998
  */
3133
- jobId: PgRollMigrationJobID;
3999
+ jobId: MigrationJobID;
4000
+ workspace: string;
4001
+ region: string;
4002
+ };
4003
+ type GetMigrationJobStatusError = ErrorWrapper<{
4004
+ status: 400;
4005
+ payload: BadRequestError$1;
4006
+ } | {
4007
+ status: 401;
4008
+ payload: AuthError$1;
4009
+ } | {
4010
+ status: 404;
4011
+ payload: SimpleError$1;
4012
+ }>;
4013
+ type GetMigrationJobStatusVariables = {
4014
+ pathParams: GetMigrationJobStatusPathParams;
4015
+ } & DataPlaneFetcherExtraProps;
4016
+ declare const getMigrationJobStatus: (variables: GetMigrationJobStatusVariables, signal?: AbortSignal) => Promise<MigrationJobStatusResponse>;
4017
+ type GetMigrationHistoryPathParams = {
4018
+ /**
4019
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4020
+ */
4021
+ dbBranchName: DBBranchName;
4022
+ workspace: string;
4023
+ region: string;
4024
+ };
4025
+ type GetMigrationHistoryQueryParams = {
4026
+ /**
4027
+ * @format date-time
4028
+ */
4029
+ cursor?: string;
4030
+ /**
4031
+ * Page size
4032
+ */
4033
+ limit?: PageSize$1;
4034
+ };
4035
+ type GetMigrationHistoryError = ErrorWrapper<{
4036
+ status: 400;
4037
+ payload: BadRequestError$1;
4038
+ } | {
4039
+ status: 401;
4040
+ payload: AuthError$1;
4041
+ } | {
4042
+ status: 404;
4043
+ payload: SimpleError$1;
4044
+ }>;
4045
+ type GetMigrationHistoryVariables = {
4046
+ pathParams: GetMigrationHistoryPathParams;
4047
+ queryParams?: GetMigrationHistoryQueryParams;
4048
+ } & DataPlaneFetcherExtraProps;
4049
+ declare const getMigrationHistory: (variables: GetMigrationHistoryVariables, signal?: AbortSignal) => Promise<MigrationHistoryResponse>;
4050
+ type GetBranchListPathParams = {
4051
+ /**
4052
+ * The Database Name
4053
+ */
4054
+ dbName: DBName$1;
3134
4055
  workspace: string;
3135
4056
  region: string;
3136
4057
  };
3137
- type PgRollJobStatusError = ErrorWrapper<{
4058
+ type GetBranchListError = ErrorWrapper<{
3138
4059
  status: 400;
3139
4060
  payload: BadRequestError$1;
3140
4061
  } | {
@@ -3144,21 +4065,24 @@ type PgRollJobStatusError = ErrorWrapper<{
3144
4065
  status: 404;
3145
4066
  payload: SimpleError$1;
3146
4067
  }>;
3147
- type PgRollJobStatusVariables = {
3148
- pathParams: PgRollJobStatusPathParams;
4068
+ type GetBranchListVariables = {
4069
+ pathParams: GetBranchListPathParams;
3149
4070
  } & DataPlaneFetcherExtraProps;
3150
- declare const pgRollJobStatus: (variables: PgRollJobStatusVariables, signal?: AbortSignal) => Promise<PgRollJobStatusResponse>;
3151
- type PgRollMigrationHistoryPathParams = {
4071
+ /**
4072
+ * List all available Branches
4073
+ */
4074
+ declare const getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
4075
+ type GetDatabaseSettingsPathParams = {
3152
4076
  /**
3153
- * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4077
+ * The Database Name
3154
4078
  */
3155
- dbBranchName: DBBranchName;
4079
+ dbName: DBName$1;
3156
4080
  workspace: string;
3157
4081
  region: string;
3158
4082
  };
3159
- type PgRollMigrationHistoryError = ErrorWrapper<{
4083
+ type GetDatabaseSettingsError = ErrorWrapper<{
3160
4084
  status: 400;
3161
- payload: BadRequestError$1;
4085
+ payload: SimpleError$1;
3162
4086
  } | {
3163
4087
  status: 401;
3164
4088
  payload: AuthError$1;
@@ -3166,11 +4090,14 @@ type PgRollMigrationHistoryError = ErrorWrapper<{
3166
4090
  status: 404;
3167
4091
  payload: SimpleError$1;
3168
4092
  }>;
3169
- type PgRollMigrationHistoryVariables = {
3170
- pathParams: PgRollMigrationHistoryPathParams;
4093
+ type GetDatabaseSettingsVariables = {
4094
+ pathParams: GetDatabaseSettingsPathParams;
3171
4095
  } & DataPlaneFetcherExtraProps;
3172
- declare const pgRollMigrationHistory: (variables: PgRollMigrationHistoryVariables, signal?: AbortSignal) => Promise<PgRollMigrationHistoryResponse>;
3173
- type GetBranchListPathParams = {
4096
+ /**
4097
+ * Get database settings
4098
+ */
4099
+ declare const getDatabaseSettings: (variables: GetDatabaseSettingsVariables, signal?: AbortSignal) => Promise<DatabaseSettings>;
4100
+ type UpdateDatabaseSettingsPathParams = {
3174
4101
  /**
3175
4102
  * The Database Name
3176
4103
  */
@@ -3178,9 +4105,9 @@ type GetBranchListPathParams = {
3178
4105
  workspace: string;
3179
4106
  region: string;
3180
4107
  };
3181
- type GetBranchListError = ErrorWrapper<{
4108
+ type UpdateDatabaseSettingsError = ErrorWrapper<{
3182
4109
  status: 400;
3183
- payload: BadRequestError$1;
4110
+ payload: SimpleError$1;
3184
4111
  } | {
3185
4112
  status: 401;
3186
4113
  payload: AuthError$1;
@@ -3188,13 +4115,17 @@ type GetBranchListError = ErrorWrapper<{
3188
4115
  status: 404;
3189
4116
  payload: SimpleError$1;
3190
4117
  }>;
3191
- type GetBranchListVariables = {
3192
- pathParams: GetBranchListPathParams;
4118
+ type UpdateDatabaseSettingsRequestBody = {
4119
+ searchEnabled?: boolean;
4120
+ };
4121
+ type UpdateDatabaseSettingsVariables = {
4122
+ body?: UpdateDatabaseSettingsRequestBody;
4123
+ pathParams: UpdateDatabaseSettingsPathParams;
3193
4124
  } & DataPlaneFetcherExtraProps;
3194
4125
  /**
3195
- * List all available Branches
4126
+ * Update database settings, this endpoint can be used to disable search
3196
4127
  */
3197
- declare const getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
4128
+ declare const updateDatabaseSettings: (variables: UpdateDatabaseSettingsVariables, signal?: AbortSignal) => Promise<DatabaseSettings>;
3198
4129
  type GetBranchDetailsPathParams = {
3199
4130
  /**
3200
4131
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3322,12 +4253,37 @@ type GetSchemaError = ErrorWrapper<{
3322
4253
  payload: SimpleError$1;
3323
4254
  }>;
3324
4255
  type GetSchemaResponse = {
3325
- schema: Record<string, any>;
4256
+ schema: BranchSchema;
3326
4257
  };
3327
4258
  type GetSchemaVariables = {
3328
4259
  pathParams: GetSchemaPathParams;
3329
4260
  } & DataPlaneFetcherExtraProps;
3330
4261
  declare const getSchema: (variables: GetSchemaVariables, signal?: AbortSignal) => Promise<GetSchemaResponse>;
4262
+ type GetSchemasPathParams = {
4263
+ /**
4264
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4265
+ */
4266
+ dbBranchName: DBBranchName;
4267
+ workspace: string;
4268
+ region: string;
4269
+ };
4270
+ type GetSchemasError = ErrorWrapper<{
4271
+ status: 400;
4272
+ payload: BadRequestError$1;
4273
+ } | {
4274
+ status: 401;
4275
+ payload: AuthError$1;
4276
+ } | {
4277
+ status: 404;
4278
+ payload: SimpleError$1;
4279
+ }>;
4280
+ type GetSchemasResponse = {
4281
+ schemas: BranchSchema[];
4282
+ };
4283
+ type GetSchemasVariables = {
4284
+ pathParams: GetSchemasPathParams;
4285
+ } & DataPlaneFetcherExtraProps;
4286
+ declare const getSchemas: (variables: GetSchemasVariables, signal?: AbortSignal) => Promise<GetSchemasResponse>;
3331
4287
  type CopyBranchPathParams = {
3332
4288
  /**
3333
4289
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3358,6 +4314,73 @@ type CopyBranchVariables = {
3358
4314
  * Create a copy of the branch
3359
4315
  */
3360
4316
  declare const copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal) => Promise<BranchWithCopyID>;
4317
+ type GetBranchMoveStatusPathParams = {
4318
+ /**
4319
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4320
+ */
4321
+ dbBranchName: DBBranchName;
4322
+ workspace: string;
4323
+ region: string;
4324
+ };
4325
+ type GetBranchMoveStatusError = ErrorWrapper<{
4326
+ status: 400;
4327
+ payload: BadRequestError$1;
4328
+ } | {
4329
+ status: 401;
4330
+ payload: AuthError$1;
4331
+ } | {
4332
+ status: 404;
4333
+ payload: SimpleError$1;
4334
+ }>;
4335
+ type GetBranchMoveStatusResponse = {
4336
+ state: string;
4337
+ pendingBytes: number;
4338
+ };
4339
+ type GetBranchMoveStatusVariables = {
4340
+ pathParams: GetBranchMoveStatusPathParams;
4341
+ } & DataPlaneFetcherExtraProps;
4342
+ /**
4343
+ * Get the branch move status (if a move is happening)
4344
+ */
4345
+ declare const getBranchMoveStatus: (variables: GetBranchMoveStatusVariables, signal?: AbortSignal) => Promise<GetBranchMoveStatusResponse>;
4346
+ type MoveBranchPathParams = {
4347
+ /**
4348
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4349
+ */
4350
+ dbBranchName: DBBranchName;
4351
+ workspace: string;
4352
+ region: string;
4353
+ };
4354
+ type MoveBranchError = ErrorWrapper<{
4355
+ status: 400;
4356
+ payload: BadRequestError$1;
4357
+ } | {
4358
+ status: 401;
4359
+ payload: AuthError$1;
4360
+ } | {
4361
+ status: 404;
4362
+ payload: SimpleError$1;
4363
+ } | {
4364
+ status: 423;
4365
+ payload: SimpleError$1;
4366
+ }>;
4367
+ type MoveBranchResponse = {
4368
+ state: string;
4369
+ };
4370
+ type MoveBranchRequestBody = {
4371
+ /**
4372
+ * Select the cluster to move the branch to. Must be different from the current cluster.
4373
+ *
4374
+ * @minLength 1
4375
+ * @x-internal true
4376
+ */
4377
+ to: string;
4378
+ };
4379
+ type MoveBranchVariables = {
4380
+ body: MoveBranchRequestBody;
4381
+ pathParams: MoveBranchPathParams;
4382
+ } & DataPlaneFetcherExtraProps;
4383
+ declare const moveBranch: (variables: MoveBranchVariables, signal?: AbortSignal) => Promise<MoveBranchResponse>;
3361
4384
  type UpdateBranchMetadataPathParams = {
3362
4385
  /**
3363
4386
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -6532,173 +7555,219 @@ type SqlQueryError = ErrorWrapper<{
6532
7555
  status: 503;
6533
7556
  payload: ServiceUnavailableError;
6534
7557
  }>;
6535
- type SqlQueryRequestBody = {
6536
- /**
6537
- * The SQL statement.
6538
- *
6539
- * @minLength 1
6540
- */
6541
- statement: string;
7558
+ type SqlQueryRequestBody = PreparedStatement & {
7559
+ consistency?: SQLConsistency;
7560
+ responseType?: SQLResponseType$1;
7561
+ };
7562
+ type SqlQueryVariables = {
7563
+ body: SqlQueryRequestBody;
7564
+ pathParams: SqlQueryPathParams;
7565
+ } & DataPlaneFetcherExtraProps;
7566
+ /**
7567
+ * Run an SQL query across the database branch.
7568
+ */
7569
+ declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<SQLResponse$1>;
7570
+ type SqlBatchQueryPathParams = {
6542
7571
  /**
6543
- * The query parameter list.
7572
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
6544
7573
  */
6545
- params?: any[] | null;
7574
+ dbBranchName: DBBranchName;
7575
+ workspace: string;
7576
+ region: string;
7577
+ };
7578
+ type SqlBatchQueryError = ErrorWrapper<{
7579
+ status: 400;
7580
+ payload: BadRequestError$1;
7581
+ } | {
7582
+ status: 401;
7583
+ payload: AuthError$1;
7584
+ } | {
7585
+ status: 404;
7586
+ payload: SimpleError$1;
7587
+ } | {
7588
+ status: 503;
7589
+ payload: ServiceUnavailableError;
7590
+ }>;
7591
+ type SqlBatchQueryRequestBody = {
6546
7592
  /**
6547
- * The consistency level for this request.
7593
+ * The SQL statements.
6548
7594
  *
6549
- * @default strong
7595
+ * @x-go-type []sqlproxy.PreparedStatement
6550
7596
  */
6551
- consistency?: 'strong' | 'eventual';
7597
+ statements: PreparedStatement[];
7598
+ consistency?: SQLConsistency;
7599
+ responseType?: SQLResponseType$1;
6552
7600
  };
6553
- type SqlQueryVariables = {
6554
- body: SqlQueryRequestBody;
6555
- pathParams: SqlQueryPathParams;
7601
+ type SqlBatchQueryVariables = {
7602
+ body: SqlBatchQueryRequestBody;
7603
+ pathParams: SqlBatchQueryPathParams;
6556
7604
  } & DataPlaneFetcherExtraProps;
6557
7605
  /**
6558
- * Run an SQL query across the database branch.
7606
+ * Run multiple SQL queries across the database branch.
6559
7607
  */
6560
- declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<SQLResponse>;
7608
+ declare const sqlBatchQuery: (variables: SqlBatchQueryVariables, signal?: AbortSignal) => Promise<SQLBatchResponse>;
6561
7609
 
6562
7610
  declare const operationsByTag: {
6563
7611
  branch: {
6564
- applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal | undefined) => Promise<PgRollApplyMigrationResponse>;
6565
- pgRollStatus: (variables: PgRollStatusVariables, signal?: AbortSignal | undefined) => Promise<PgRollJobStatusResponse>;
6566
- pgRollJobStatus: (variables: PgRollJobStatusVariables, signal?: AbortSignal | undefined) => Promise<PgRollJobStatusResponse>;
6567
- pgRollMigrationHistory: (variables: PgRollMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<PgRollMigrationHistoryResponse>;
6568
- getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal | undefined) => Promise<ListBranchesResponse>;
6569
- getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal | undefined) => Promise<DBBranch>;
6570
- createBranch: (variables: CreateBranchVariables, signal?: AbortSignal | undefined) => Promise<CreateBranchResponse>;
6571
- deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal | undefined) => Promise<DeleteBranchResponse>;
6572
- copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal | undefined) => Promise<BranchWithCopyID>;
6573
- updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6574
- getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<BranchMetadata$1>;
6575
- getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal | undefined) => Promise<GetBranchStatsResponse>;
6576
- getGitBranchesMapping: (variables: GetGitBranchesMappingVariables, signal?: AbortSignal | undefined) => Promise<ListGitBranchesResponse>;
6577
- addGitBranchesEntry: (variables: AddGitBranchesEntryVariables, signal?: AbortSignal | undefined) => Promise<AddGitBranchesEntryResponse>;
6578
- removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6579
- resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal | undefined) => Promise<ResolveBranchResponse>;
7612
+ getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
7613
+ getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal) => Promise<DBBranch>;
7614
+ createBranch: (variables: CreateBranchVariables, signal?: AbortSignal) => Promise<CreateBranchResponse>;
7615
+ deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<DeleteBranchResponse>;
7616
+ copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal) => Promise<BranchWithCopyID>;
7617
+ getBranchMoveStatus: (variables: GetBranchMoveStatusVariables, signal?: AbortSignal) => Promise<GetBranchMoveStatusResponse>;
7618
+ moveBranch: (variables: MoveBranchVariables, signal?: AbortSignal) => Promise<MoveBranchResponse>;
7619
+ updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal) => Promise<undefined>;
7620
+ getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal) => Promise<BranchMetadata$1>;
7621
+ getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal) => Promise<GetBranchStatsResponse>;
7622
+ getGitBranchesMapping: (variables: GetGitBranchesMappingVariables, signal?: AbortSignal) => Promise<ListGitBranchesResponse>;
7623
+ addGitBranchesEntry: (variables: AddGitBranchesEntryVariables, signal?: AbortSignal) => Promise<AddGitBranchesEntryResponse>;
7624
+ removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal) => Promise<undefined>;
7625
+ resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal) => Promise<ResolveBranchResponse>;
6580
7626
  };
6581
7627
  workspaces: {
6582
- getWorkspacesList: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetWorkspacesListResponse>;
6583
- createWorkspace: (variables: CreateWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
6584
- getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
6585
- updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
6586
- deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6587
- getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceMembers>;
6588
- updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6589
- removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
7628
+ getWorkspacesList: (variables: GetWorkspacesListVariables, signal?: AbortSignal) => Promise<GetWorkspacesListResponse>;
7629
+ createWorkspace: (variables: CreateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
7630
+ getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
7631
+ updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
7632
+ deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
7633
+ getWorkspaceSettings: (variables: GetWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
7634
+ updateWorkspaceSettings: (variables: UpdateWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
7635
+ getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal) => Promise<WorkspaceMembers>;
7636
+ updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal) => Promise<undefined>;
7637
+ removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal) => Promise<undefined>;
7638
+ };
7639
+ table: {
7640
+ createTable: (variables: CreateTableVariables, signal?: AbortSignal) => Promise<CreateTableResponse>;
7641
+ deleteTable: (variables: DeleteTableVariables, signal?: AbortSignal) => Promise<DeleteTableResponse>;
7642
+ updateTable: (variables: UpdateTableVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
7643
+ getTableSchema: (variables: GetTableSchemaVariables, signal?: AbortSignal) => Promise<GetTableSchemaResponse>;
7644
+ setTableSchema: (variables: SetTableSchemaVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
7645
+ getTableColumns: (variables: GetTableColumnsVariables, signal?: AbortSignal) => Promise<GetTableColumnsResponse>;
7646
+ addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
7647
+ getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
7648
+ updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
7649
+ deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
6590
7650
  };
6591
7651
  migrations: {
6592
- getSchema: (variables: GetSchemaVariables, signal?: AbortSignal | undefined) => Promise<GetSchemaResponse>;
6593
- getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchMigrationHistoryResponse>;
6594
- getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<BranchMigrationPlan>;
6595
- executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
6596
- getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchSchemaHistoryResponse>;
6597
- compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables, signal?: AbortSignal | undefined) => Promise<SchemaCompareResponse>;
6598
- compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal | undefined) => Promise<SchemaCompareResponse>;
6599
- updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
6600
- previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<PreviewBranchSchemaEditResponse>;
6601
- applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
6602
- pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
7652
+ applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
7653
+ startMigration: (variables: StartMigrationVariables, signal?: AbortSignal) => Promise<StartMigrationResponse>;
7654
+ completeMigration: (variables: CompleteMigrationVariables, signal?: AbortSignal) => Promise<CompleteMigrationResponse>;
7655
+ rollbackMigration: (variables: RollbackMigrationVariables, signal?: AbortSignal) => Promise<RollbackMigrationResponse>;
7656
+ adaptTable: (variables: AdaptTableVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
7657
+ adaptAllTables: (variables: AdaptAllTablesVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
7658
+ getBranchMigrationJobStatus: (variables: GetBranchMigrationJobStatusVariables, signal?: AbortSignal) => Promise<MigrationJobStatusResponse>;
7659
+ getMigrationJobs: (variables: GetMigrationJobsVariables, signal?: AbortSignal) => Promise<GetMigrationJobsResponse>;
7660
+ getMigrationJobStatus: (variables: GetMigrationJobStatusVariables, signal?: AbortSignal) => Promise<MigrationJobStatusResponse>;
7661
+ getMigrationHistory: (variables: GetMigrationHistoryVariables, signal?: AbortSignal) => Promise<MigrationHistoryResponse>;
7662
+ getSchema: (variables: GetSchemaVariables, signal?: AbortSignal) => Promise<GetSchemaResponse>;
7663
+ getSchemas: (variables: GetSchemasVariables, signal?: AbortSignal) => Promise<GetSchemasResponse>;
7664
+ getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal) => Promise<GetBranchMigrationHistoryResponse>;
7665
+ getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<BranchMigrationPlan>;
7666
+ executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
7667
+ getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables, signal?: AbortSignal) => Promise<GetBranchSchemaHistoryResponse>;
7668
+ compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
7669
+ compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
7670
+ updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
7671
+ previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal) => Promise<PreviewBranchSchemaEditResponse>;
7672
+ applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
7673
+ pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
6603
7674
  };
6604
7675
  records: {
6605
- branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
6606
- insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
6607
- getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
6608
- insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
6609
- updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
6610
- upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
6611
- deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
6612
- bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
7676
+ branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
7677
+ insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
7678
+ getRecord: (variables: GetRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
7679
+ insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
7680
+ updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
7681
+ upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
7682
+ deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
7683
+ bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal) => Promise<BulkInsertResponse>;
6613
7684
  };
6614
- migrationRequests: {
6615
- queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal | undefined) => Promise<QueryMigrationRequestsResponse>;
6616
- createMigrationRequest: (variables: CreateMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<CreateMigrationRequestResponse>;
6617
- getMigrationRequest: (variables: GetMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<MigrationRequest>;
6618
- updateMigrationRequest: (variables: UpdateMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6619
- listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal | undefined) => Promise<ListMigrationRequestsCommitsResponse>;
6620
- compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<SchemaCompareResponse>;
6621
- getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal | undefined) => Promise<GetMigrationRequestIsMergedResponse>;
6622
- mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<BranchOp>;
7685
+ cluster: {
7686
+ listClusterBranches: (variables: ListClusterBranchesVariables, signal?: AbortSignal) => Promise<ListClusterBranchesResponse>;
7687
+ getClusterMetrics: (variables: GetClusterMetricsVariables, signal?: AbortSignal) => Promise<MetricsResponse>;
6623
7688
  };
6624
- table: {
6625
- createTable: (variables: CreateTableVariables, signal?: AbortSignal | undefined) => Promise<CreateTableResponse>;
6626
- deleteTable: (variables: DeleteTableVariables, signal?: AbortSignal | undefined) => Promise<DeleteTableResponse>;
6627
- updateTable: (variables: UpdateTableVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
6628
- getTableSchema: (variables: GetTableSchemaVariables, signal?: AbortSignal | undefined) => Promise<GetTableSchemaResponse>;
6629
- setTableSchema: (variables: SetTableSchemaVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
6630
- getTableColumns: (variables: GetTableColumnsVariables, signal?: AbortSignal | undefined) => Promise<GetTableColumnsResponse>;
6631
- addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
6632
- getColumn: (variables: GetColumnVariables, signal?: AbortSignal | undefined) => Promise<Column>;
6633
- updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
6634
- deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
7689
+ database: {
7690
+ getDatabaseSettings: (variables: GetDatabaseSettingsVariables, signal?: AbortSignal) => Promise<DatabaseSettings>;
7691
+ updateDatabaseSettings: (variables: UpdateDatabaseSettingsVariables, signal?: AbortSignal) => Promise<DatabaseSettings>;
7692
+ };
7693
+ migrationRequests: {
7694
+ queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal) => Promise<QueryMigrationRequestsResponse>;
7695
+ createMigrationRequest: (variables: CreateMigrationRequestVariables, signal?: AbortSignal) => Promise<CreateMigrationRequestResponse>;
7696
+ getMigrationRequest: (variables: GetMigrationRequestVariables, signal?: AbortSignal) => Promise<MigrationRequest>;
7697
+ updateMigrationRequest: (variables: UpdateMigrationRequestVariables, signal?: AbortSignal) => Promise<undefined>;
7698
+ listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal) => Promise<ListMigrationRequestsCommitsResponse>;
7699
+ compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
7700
+ getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal) => Promise<GetMigrationRequestIsMergedResponse>;
7701
+ mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<BranchOp>;
6635
7702
  };
6636
7703
  files: {
6637
- getFileItem: (variables: GetFileItemVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
6638
- putFileItem: (variables: PutFileItemVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6639
- deleteFileItem: (variables: DeleteFileItemVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6640
- getFile: (variables: GetFileVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
6641
- putFile: (variables: PutFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6642
- deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
6643
- fileAccess: (variables: FileAccessVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
6644
- fileUpload: (variables: FileUploadVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
7704
+ getFileItem: (variables: GetFileItemVariables, signal?: AbortSignal) => Promise<Blob>;
7705
+ putFileItem: (variables: PutFileItemVariables, signal?: AbortSignal) => Promise<FileResponse>;
7706
+ deleteFileItem: (variables: DeleteFileItemVariables, signal?: AbortSignal) => Promise<FileResponse>;
7707
+ getFile: (variables: GetFileVariables, signal?: AbortSignal) => Promise<Blob>;
7708
+ putFile: (variables: PutFileVariables, signal?: AbortSignal) => Promise<FileResponse>;
7709
+ deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal) => Promise<FileResponse>;
7710
+ fileAccess: (variables: FileAccessVariables, signal?: AbortSignal) => Promise<Blob>;
7711
+ fileUpload: (variables: FileUploadVariables, signal?: AbortSignal) => Promise<FileResponse>;
6645
7712
  };
6646
7713
  searchAndFilter: {
6647
- queryTable: (variables: QueryTableVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
6648
- searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
6649
- searchTable: (variables: SearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
6650
- vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
6651
- askTable: (variables: AskTableVariables, signal?: AbortSignal | undefined) => Promise<AskTableResponse>;
6652
- askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal | undefined) => Promise<AskTableSessionResponse>;
6653
- summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal | undefined) => Promise<SummarizeResponse>;
6654
- aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal | undefined) => Promise<AggResponse>;
7714
+ queryTable: (variables: QueryTableVariables, signal?: AbortSignal) => Promise<QueryResponse>;
7715
+ searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal) => Promise<SearchResponse>;
7716
+ searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
7717
+ vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
7718
+ askTable: (variables: AskTableVariables, signal?: AbortSignal) => Promise<AskTableResponse>;
7719
+ askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal) => Promise<AskTableSessionResponse>;
7720
+ summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal) => Promise<SummarizeResponse>;
7721
+ aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
6655
7722
  };
6656
7723
  sql: {
6657
- sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal | undefined) => Promise<SQLResponse>;
7724
+ sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<SQLResponse$1>;
7725
+ sqlBatchQuery: (variables: SqlBatchQueryVariables, signal?: AbortSignal) => Promise<SQLBatchResponse>;
6658
7726
  };
6659
7727
  oAuth: {
6660
- getAuthorizationCode: (variables: GetAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<AuthorizationCodeResponse>;
6661
- grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<AuthorizationCodeResponse>;
6662
- getUserOAuthClients: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserOAuthClientsResponse>;
6663
- deleteUserOAuthClient: (variables: DeleteUserOAuthClientVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6664
- getUserOAuthAccessTokens: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserOAuthAccessTokensResponse>;
6665
- deleteOAuthAccessToken: (variables: DeleteOAuthAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6666
- updateOAuthAccessToken: (variables: UpdateOAuthAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<OAuthAccessToken>;
7728
+ getAuthorizationCode: (variables: GetAuthorizationCodeVariables, signal?: AbortSignal) => Promise<AuthorizationCodeResponse>;
7729
+ grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal) => Promise<AuthorizationCodeResponse>;
7730
+ getUserOAuthClients: (variables: GetUserOAuthClientsVariables, signal?: AbortSignal) => Promise<GetUserOAuthClientsResponse>;
7731
+ deleteUserOAuthClient: (variables: DeleteUserOAuthClientVariables, signal?: AbortSignal) => Promise<undefined>;
7732
+ getUserOAuthAccessTokens: (variables: GetUserOAuthAccessTokensVariables, signal?: AbortSignal) => Promise<GetUserOAuthAccessTokensResponse>;
7733
+ deleteOAuthAccessToken: (variables: DeleteOAuthAccessTokenVariables, signal?: AbortSignal) => Promise<undefined>;
7734
+ updateOAuthAccessToken: (variables: UpdateOAuthAccessTokenVariables, signal?: AbortSignal) => Promise<OAuthAccessToken>;
6667
7735
  };
6668
7736
  users: {
6669
- getUser: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<UserWithID>;
6670
- updateUser: (variables: UpdateUserVariables, signal?: AbortSignal | undefined) => Promise<UserWithID>;
6671
- deleteUser: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<undefined>;
7737
+ getUser: (variables: GetUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
7738
+ updateUser: (variables: UpdateUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
7739
+ deleteUser: (variables: DeleteUserVariables, signal?: AbortSignal) => Promise<undefined>;
6672
7740
  };
6673
7741
  authentication: {
6674
- getUserAPIKeys: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserAPIKeysResponse>;
6675
- createUserAPIKey: (variables: CreateUserAPIKeyVariables, signal?: AbortSignal | undefined) => Promise<CreateUserAPIKeyResponse>;
6676
- deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
7742
+ getUserAPIKeys: (variables: GetUserAPIKeysVariables, signal?: AbortSignal) => Promise<GetUserAPIKeysResponse>;
7743
+ createUserAPIKey: (variables: CreateUserAPIKeyVariables, signal?: AbortSignal) => Promise<CreateUserAPIKeyResponse>;
7744
+ deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
6677
7745
  };
6678
7746
  invites: {
6679
- inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceInvite>;
6680
- updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceInvite>;
6681
- cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6682
- acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6683
- resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
7747
+ inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
7748
+ updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
7749
+ cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
7750
+ acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
7751
+ resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
6684
7752
  };
6685
7753
  xbcontrolOther: {
6686
- listClusters: (variables: ListClustersVariables, signal?: AbortSignal | undefined) => Promise<ListClustersResponse>;
6687
- createCluster: (variables: CreateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterResponse>;
6688
- getCluster: (variables: GetClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterMetadata>;
6689
- updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterMetadata>;
7754
+ listClusters: (variables: ListClustersVariables, signal?: AbortSignal) => Promise<ListClustersResponse>;
7755
+ createCluster: (variables: CreateClusterVariables, signal?: AbortSignal) => Promise<ClusterResponse>;
7756
+ getCluster: (variables: GetClusterVariables, signal?: AbortSignal) => Promise<ClusterMetadata>;
7757
+ updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal) => Promise<ClusterUpdateMetadata>;
7758
+ deleteCluster: (variables: DeleteClusterVariables, signal?: AbortSignal) => Promise<ClusterDeleteMetadata>;
6690
7759
  };
6691
7760
  databases: {
6692
- getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal | undefined) => Promise<ListDatabasesResponse>;
6693
- createDatabase: (variables: CreateDatabaseVariables, signal?: AbortSignal | undefined) => Promise<CreateDatabaseResponse>;
6694
- deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DeleteDatabaseResponse>;
6695
- getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
6696
- updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
6697
- renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
6698
- getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
6699
- updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
6700
- deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6701
- listRegions: (variables: ListRegionsVariables, signal?: AbortSignal | undefined) => Promise<ListRegionsResponse>;
7761
+ getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal) => Promise<ListDatabasesResponse>;
7762
+ createDatabase: (variables: CreateDatabaseVariables, signal?: AbortSignal) => Promise<CreateDatabaseResponse>;
7763
+ deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal) => Promise<DeleteDatabaseResponse>;
7764
+ getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
7765
+ updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
7766
+ renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
7767
+ getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<DatabaseGithubSettings>;
7768
+ updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<DatabaseGithubSettings>;
7769
+ deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<undefined>;
7770
+ listRegions: (variables: ListRegionsVariables, signal?: AbortSignal) => Promise<ListRegionsResponse>;
6702
7771
  };
6703
7772
  };
6704
7773
 
@@ -6716,9 +7785,32 @@ declare function buildProviderString(provider: HostProvider): string;
6716
7785
  declare function parseWorkspacesUrlParts(url: string): {
6717
7786
  workspace: string;
6718
7787
  region: string;
7788
+ database: string;
7789
+ branch?: string;
6719
7790
  host: HostAliases;
6720
7791
  } | null;
6721
7792
 
7793
+ type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
7794
+ interface XataApiClientOptions {
7795
+ fetch?: FetchImpl;
7796
+ apiKey?: string;
7797
+ host?: HostProvider;
7798
+ trace?: TraceFunction;
7799
+ clientName?: string;
7800
+ xataAgentExtra?: Record<string, string>;
7801
+ }
7802
+ type UserProps = {
7803
+ headers?: Record<string, unknown>;
7804
+ };
7805
+ type XataApiProxy = {
7806
+ [Tag in keyof typeof operationsByTag]: {
7807
+ [Method in keyof (typeof operationsByTag)[Tag]]: (typeof operationsByTag)[Tag][Method] extends infer Operation extends (...args: any) => any ? Omit<Parameters<Operation>[0], keyof ApiExtraProps> extends infer Params ? RequiredKeys<Params> extends never ? (params?: Params & UserProps) => ReturnType<Operation> : (params: Params & UserProps) => ReturnType<Operation> : never : never;
7808
+ };
7809
+ };
7810
+ declare const XataApiClient_base: new (options?: XataApiClientOptions) => XataApiProxy;
7811
+ declare class XataApiClient extends XataApiClient_base {
7812
+ }
7813
+
6722
7814
  type responses_AggResponse = AggResponse;
6723
7815
  type responses_BranchMigrationPlan = BranchMigrationPlan;
6724
7816
  type responses_BulkError = BulkError;
@@ -6728,6 +7820,7 @@ type responses_QueryResponse = QueryResponse;
6728
7820
  type responses_RateLimitError = RateLimitError;
6729
7821
  type responses_RecordResponse = RecordResponse;
6730
7822
  type responses_RecordUpdateResponse = RecordUpdateResponse;
7823
+ type responses_SQLBatchResponse = SQLBatchResponse;
6731
7824
  type responses_SQLResponse = SQLResponse;
6732
7825
  type responses_SchemaCompareResponse = SchemaCompareResponse;
6733
7826
  type responses_SchemaUpdateResponse = SchemaUpdateResponse;
@@ -6735,29 +7828,36 @@ type responses_SearchResponse = SearchResponse;
6735
7828
  type responses_ServiceUnavailableError = ServiceUnavailableError;
6736
7829
  type responses_SummarizeResponse = SummarizeResponse;
6737
7830
  declare namespace responses {
6738
- export type { responses_AggResponse as AggResponse, AuthError$1 as AuthError, BadRequestError$1 as BadRequestError, responses_BranchMigrationPlan as BranchMigrationPlan, responses_BulkError as BulkError, responses_BulkInsertResponse as BulkInsertResponse, responses_PutFileResponse as PutFileResponse, responses_QueryResponse as QueryResponse, responses_RateLimitError as RateLimitError, responses_RecordResponse as RecordResponse, responses_RecordUpdateResponse as RecordUpdateResponse, responses_SQLResponse as SQLResponse, responses_SchemaCompareResponse as SchemaCompareResponse, responses_SchemaUpdateResponse as SchemaUpdateResponse, responses_SearchResponse as SearchResponse, responses_ServiceUnavailableError as ServiceUnavailableError, SimpleError$1 as SimpleError, responses_SummarizeResponse as SummarizeResponse };
7831
+ export type { responses_AggResponse as AggResponse, AuthError$1 as AuthError, BadRequestError$1 as BadRequestError, responses_BranchMigrationPlan as BranchMigrationPlan, responses_BulkError as BulkError, responses_BulkInsertResponse as BulkInsertResponse, responses_PutFileResponse as PutFileResponse, responses_QueryResponse as QueryResponse, responses_RateLimitError as RateLimitError, responses_RecordResponse as RecordResponse, responses_RecordUpdateResponse as RecordUpdateResponse, responses_SQLBatchResponse as SQLBatchResponse, responses_SQLResponse as SQLResponse, responses_SchemaCompareResponse as SchemaCompareResponse, responses_SchemaUpdateResponse as SchemaUpdateResponse, responses_SearchResponse as SearchResponse, responses_ServiceUnavailableError as ServiceUnavailableError, SimpleError$1 as SimpleError, responses_SummarizeResponse as SummarizeResponse };
6739
7832
  }
6740
7833
 
6741
7834
  type schemas_APIKeyName = APIKeyName;
6742
7835
  type schemas_AccessToken = AccessToken;
6743
7836
  type schemas_AggExpression = AggExpression;
6744
7837
  type schemas_AggExpressionMap = AggExpressionMap;
7838
+ type schemas_ApplyMigrationResponse = ApplyMigrationResponse;
6745
7839
  type schemas_AuthorizationCodeRequest = AuthorizationCodeRequest;
6746
7840
  type schemas_AuthorizationCodeResponse = AuthorizationCodeResponse;
6747
7841
  type schemas_AutoscalingConfig = AutoscalingConfig;
7842
+ type schemas_AutoscalingConfigResponse = AutoscalingConfigResponse;
6748
7843
  type schemas_AverageAgg = AverageAgg;
6749
7844
  type schemas_BoosterExpression = BoosterExpression;
6750
7845
  type schemas_Branch = Branch;
7846
+ type schemas_BranchDetails = BranchDetails;
6751
7847
  type schemas_BranchMigration = BranchMigration;
6752
7848
  type schemas_BranchOp = BranchOp;
7849
+ type schemas_BranchSchema = BranchSchema;
7850
+ type schemas_BranchState = BranchState;
6753
7851
  type schemas_BranchWithCopyID = BranchWithCopyID;
6754
7852
  type schemas_ClusterConfiguration = ClusterConfiguration;
7853
+ type schemas_ClusterConfigurationResponse = ClusterConfigurationResponse;
6755
7854
  type schemas_ClusterCreateDetails = ClusterCreateDetails;
6756
- type schemas_ClusterID = ClusterID;
7855
+ type schemas_ClusterDeleteMetadata = ClusterDeleteMetadata;
6757
7856
  type schemas_ClusterMetadata = ClusterMetadata;
6758
7857
  type schemas_ClusterResponse = ClusterResponse;
6759
7858
  type schemas_ClusterShortMetadata = ClusterShortMetadata;
6760
7859
  type schemas_ClusterUpdateDetails = ClusterUpdateDetails;
7860
+ type schemas_ClusterUpdateMetadata = ClusterUpdateMetadata;
6761
7861
  type schemas_Column = Column;
6762
7862
  type schemas_ColumnFile = ColumnFile;
6763
7863
  type schemas_ColumnLink = ColumnLink;
@@ -6769,6 +7869,7 @@ type schemas_ColumnOpRename = ColumnOpRename;
6769
7869
  type schemas_ColumnVector = ColumnVector;
6770
7870
  type schemas_ColumnsProjection = ColumnsProjection;
6771
7871
  type schemas_Commit = Commit;
7872
+ type schemas_CompleteMigrationResponse = CompleteMigrationResponse;
6772
7873
  type schemas_CountAgg = CountAgg;
6773
7874
  type schemas_DBBranch = DBBranch;
6774
7875
  type schemas_DBBranchName = DBBranchName;
@@ -6776,6 +7877,7 @@ type schemas_DailyTimeWindow = DailyTimeWindow;
6776
7877
  type schemas_DataInputRecord = DataInputRecord;
6777
7878
  type schemas_DatabaseGithubSettings = DatabaseGithubSettings;
6778
7879
  type schemas_DatabaseMetadata = DatabaseMetadata;
7880
+ type schemas_DatabaseSettings = DatabaseSettings;
6779
7881
  type schemas_DateHistogramAgg = DateHistogramAgg;
6780
7882
  type schemas_FileAccessID = FileAccessID;
6781
7883
  type schemas_FileItemID = FileItemID;
@@ -6792,6 +7894,7 @@ type schemas_FilterPredicateRangeOp = FilterPredicateRangeOp;
6792
7894
  type schemas_FilterRangeValue = FilterRangeValue;
6793
7895
  type schemas_FilterValue = FilterValue;
6794
7896
  type schemas_FuzzinessExpression = FuzzinessExpression;
7897
+ type schemas_GetMigrationJobsResponse = GetMigrationJobsResponse;
6795
7898
  type schemas_HighlightExpression = HighlightExpression;
6796
7899
  type schemas_InputFile = InputFile;
6797
7900
  type schemas_InputFileArray = InputFileArray;
@@ -6799,22 +7902,37 @@ type schemas_InputFileEntry = InputFileEntry;
6799
7902
  type schemas_InviteID = InviteID;
6800
7903
  type schemas_InviteKey = InviteKey;
6801
7904
  type schemas_ListBranchesResponse = ListBranchesResponse;
7905
+ type schemas_ListClusterBranchesResponse = ListClusterBranchesResponse;
6802
7906
  type schemas_ListClustersResponse = ListClustersResponse;
6803
7907
  type schemas_ListDatabasesResponse = ListDatabasesResponse;
6804
7908
  type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
6805
7909
  type schemas_ListRegionsResponse = ListRegionsResponse;
6806
7910
  type schemas_MaintenanceConfig = MaintenanceConfig;
7911
+ type schemas_MaintenanceConfigResponse = MaintenanceConfigResponse;
6807
7912
  type schemas_MaxAgg = MaxAgg;
6808
7913
  type schemas_MediaType = MediaType;
7914
+ type schemas_MetricData = MetricData;
7915
+ type schemas_MetricMessage = MetricMessage;
6809
7916
  type schemas_MetricsDatapoint = MetricsDatapoint;
6810
7917
  type schemas_MetricsLatency = MetricsLatency;
7918
+ type schemas_MetricsResponse = MetricsResponse;
6811
7919
  type schemas_Migration = Migration;
6812
7920
  type schemas_MigrationColumnOp = MigrationColumnOp;
7921
+ type schemas_MigrationDescription = MigrationDescription;
7922
+ type schemas_MigrationHistoryItem = MigrationHistoryItem;
7923
+ type schemas_MigrationHistoryResponse = MigrationHistoryResponse;
7924
+ type schemas_MigrationJobID = MigrationJobID;
7925
+ type schemas_MigrationJobItem = MigrationJobItem;
7926
+ type schemas_MigrationJobStatus = MigrationJobStatus;
7927
+ type schemas_MigrationJobStatusResponse = MigrationJobStatusResponse;
7928
+ type schemas_MigrationJobType = MigrationJobType;
6813
7929
  type schemas_MigrationObject = MigrationObject;
6814
7930
  type schemas_MigrationOp = MigrationOp;
7931
+ type schemas_MigrationOperationDescription = MigrationOperationDescription;
6815
7932
  type schemas_MigrationRequest = MigrationRequest;
6816
7933
  type schemas_MigrationRequestNumber = MigrationRequestNumber;
6817
7934
  type schemas_MigrationTableOp = MigrationTableOp;
7935
+ type schemas_MigrationType = MigrationType;
6818
7936
  type schemas_MinAgg = MinAgg;
6819
7937
  type schemas_NumericHistogramAgg = NumericHistogramAgg;
6820
7938
  type schemas_OAuthAccessToken = OAuthAccessToken;
@@ -6824,19 +7942,9 @@ type schemas_OAuthResponseType = OAuthResponseType;
6824
7942
  type schemas_OAuthScope = OAuthScope;
6825
7943
  type schemas_ObjectValue = ObjectValue;
6826
7944
  type schemas_PageConfig = PageConfig;
6827
- type schemas_PageResponse = PageResponse;
6828
- type schemas_PageSize = PageSize;
6829
- type schemas_PageToken = PageToken;
6830
7945
  type schemas_PercentilesAgg = PercentilesAgg;
6831
- type schemas_PgRollApplyMigrationResponse = PgRollApplyMigrationResponse;
6832
- type schemas_PgRollJobStatus = PgRollJobStatus;
6833
- type schemas_PgRollJobStatusResponse = PgRollJobStatusResponse;
6834
- type schemas_PgRollJobType = PgRollJobType;
6835
- type schemas_PgRollMigrationHistoryItem = PgRollMigrationHistoryItem;
6836
- type schemas_PgRollMigrationHistoryResponse = PgRollMigrationHistoryResponse;
6837
- type schemas_PgRollMigrationJobID = PgRollMigrationJobID;
6838
- type schemas_PgRollMigrationType = PgRollMigrationType;
6839
7946
  type schemas_PrefixExpression = PrefixExpression;
7947
+ type schemas_PreparedStatement = PreparedStatement;
6840
7948
  type schemas_ProjectionConfig = ProjectionConfig;
6841
7949
  type schemas_QueryColumnsProjection = QueryColumnsProjection;
6842
7950
  type schemas_RecordID = RecordID;
@@ -6845,12 +7953,18 @@ type schemas_RecordsMetadata = RecordsMetadata;
6845
7953
  type schemas_Region = Region;
6846
7954
  type schemas_RevLink = RevLink;
6847
7955
  type schemas_Role = Role;
7956
+ type schemas_RollbackMigrationResponse = RollbackMigrationResponse;
7957
+ type schemas_SQLConsistency = SQLConsistency;
6848
7958
  type schemas_SQLRecord = SQLRecord;
7959
+ type schemas_SQLResponseArray = SQLResponseArray;
7960
+ type schemas_SQLResponseBase = SQLResponseBase;
7961
+ type schemas_SQLResponseJSON = SQLResponseJSON;
6849
7962
  type schemas_Schema = Schema;
6850
7963
  type schemas_SchemaEditScript = SchemaEditScript;
6851
7964
  type schemas_SearchPageConfig = SearchPageConfig;
6852
7965
  type schemas_SortExpression = SortExpression;
6853
7966
  type schemas_SortOrder = SortOrder;
7967
+ type schemas_StartMigrationResponse = StartMigrationResponse;
6854
7968
  type schemas_StartedFromMetadata = StartedFromMetadata;
6855
7969
  type schemas_SumAgg = SumAgg;
6856
7970
  type schemas_SummaryExpression = SummaryExpression;
@@ -6876,784 +7990,26 @@ type schemas_TransactionResultInsert = TransactionResultInsert;
6876
7990
  type schemas_TransactionResultUpdate = TransactionResultUpdate;
6877
7991
  type schemas_TransactionSuccess = TransactionSuccess;
6878
7992
  type schemas_TransactionUpdateOp = TransactionUpdateOp;
6879
- type schemas_UniqueCountAgg = UniqueCountAgg;
6880
- type schemas_User = User;
6881
- type schemas_UserID = UserID;
6882
- type schemas_UserWithID = UserWithID;
6883
- type schemas_WeeklyTimeWindow = WeeklyTimeWindow;
6884
- type schemas_Workspace = Workspace;
6885
- type schemas_WorkspaceID = WorkspaceID;
6886
- type schemas_WorkspaceInvite = WorkspaceInvite;
6887
- type schemas_WorkspaceMember = WorkspaceMember;
6888
- type schemas_WorkspaceMembers = WorkspaceMembers;
6889
- type schemas_WorkspaceMeta = WorkspaceMeta;
6890
- type schemas_WorkspacePlan = WorkspacePlan;
6891
- declare namespace schemas {
6892
- export type { schemas_APIKeyName as APIKeyName, schemas_AccessToken as AccessToken, schemas_AggExpression as AggExpression, schemas_AggExpressionMap as AggExpressionMap, AggResponse$1 as AggResponse, schemas_AuthorizationCodeRequest as AuthorizationCodeRequest, schemas_AuthorizationCodeResponse as AuthorizationCodeResponse, schemas_AutoscalingConfig as AutoscalingConfig, schemas_AverageAgg as AverageAgg, schemas_BoosterExpression as BoosterExpression, schemas_Branch as Branch, BranchMetadata$1 as BranchMetadata, schemas_BranchMigration as BranchMigration, BranchName$1 as BranchName, schemas_BranchOp as BranchOp, schemas_BranchWithCopyID as BranchWithCopyID, schemas_ClusterConfiguration as ClusterConfiguration, schemas_ClusterCreateDetails as ClusterCreateDetails, schemas_ClusterID as ClusterID, schemas_ClusterMetadata as ClusterMetadata, schemas_ClusterResponse as ClusterResponse, schemas_ClusterShortMetadata as ClusterShortMetadata, schemas_ClusterUpdateDetails as ClusterUpdateDetails, schemas_Column as Column, schemas_ColumnFile as ColumnFile, schemas_ColumnLink as ColumnLink, schemas_ColumnMigration as ColumnMigration, schemas_ColumnName as ColumnName, schemas_ColumnOpAdd as ColumnOpAdd, schemas_ColumnOpRemove as ColumnOpRemove, schemas_ColumnOpRename as ColumnOpRename, schemas_ColumnVector as ColumnVector, schemas_ColumnsProjection as ColumnsProjection, schemas_Commit as Commit, schemas_CountAgg as CountAgg, schemas_DBBranch as DBBranch, schemas_DBBranchName as DBBranchName, DBName$1 as DBName, schemas_DailyTimeWindow as DailyTimeWindow, schemas_DataInputRecord as DataInputRecord, schemas_DatabaseGithubSettings as DatabaseGithubSettings, schemas_DatabaseMetadata as DatabaseMetadata, DateBooster$1 as DateBooster, schemas_DateHistogramAgg as DateHistogramAgg, DateTime$1 as DateTime, schemas_FileAccessID as FileAccessID, schemas_FileItemID as FileItemID, schemas_FileName as FileName, schemas_FileResponse as FileResponse, schemas_FileSignature as FileSignature, schemas_FilterColumn as FilterColumn, schemas_FilterColumnIncludes as FilterColumnIncludes, schemas_FilterExpression as FilterExpression, schemas_FilterList as FilterList, schemas_FilterPredicate as FilterPredicate, schemas_FilterPredicateOp as FilterPredicateOp, schemas_FilterPredicateRangeOp as FilterPredicateRangeOp, schemas_FilterRangeValue as FilterRangeValue, schemas_FilterValue as FilterValue, schemas_FuzzinessExpression as FuzzinessExpression, schemas_HighlightExpression as HighlightExpression, schemas_InputFile as InputFile, schemas_InputFileArray as InputFileArray, schemas_InputFileEntry as InputFileEntry, schemas_InviteID as InviteID, schemas_InviteKey as InviteKey, schemas_ListBranchesResponse as ListBranchesResponse, schemas_ListClustersResponse as ListClustersResponse, schemas_ListDatabasesResponse as ListDatabasesResponse, schemas_ListGitBranchesResponse as ListGitBranchesResponse, schemas_ListRegionsResponse as ListRegionsResponse, schemas_MaintenanceConfig as MaintenanceConfig, schemas_MaxAgg as MaxAgg, schemas_MediaType as MediaType, schemas_MetricsDatapoint as MetricsDatapoint, schemas_MetricsLatency as MetricsLatency, schemas_Migration as Migration, schemas_MigrationColumnOp as MigrationColumnOp, schemas_MigrationObject as MigrationObject, schemas_MigrationOp as MigrationOp, schemas_MigrationRequest as MigrationRequest, schemas_MigrationRequestNumber as MigrationRequestNumber, MigrationStatus$1 as MigrationStatus, schemas_MigrationTableOp as MigrationTableOp, schemas_MinAgg as MinAgg, NumericBooster$1 as NumericBooster, schemas_NumericHistogramAgg as NumericHistogramAgg, schemas_OAuthAccessToken as OAuthAccessToken, schemas_OAuthClientID as OAuthClientID, schemas_OAuthClientPublicDetails as OAuthClientPublicDetails, schemas_OAuthResponseType as OAuthResponseType, schemas_OAuthScope as OAuthScope, schemas_ObjectValue as ObjectValue, schemas_PageConfig as PageConfig, schemas_PageResponse as PageResponse, schemas_PageSize as PageSize, schemas_PageToken as PageToken, schemas_PercentilesAgg as PercentilesAgg, schemas_PgRollApplyMigrationResponse as PgRollApplyMigrationResponse, schemas_PgRollJobStatus as PgRollJobStatus, schemas_PgRollJobStatusResponse as PgRollJobStatusResponse, schemas_PgRollJobType as PgRollJobType, schemas_PgRollMigrationHistoryItem as PgRollMigrationHistoryItem, schemas_PgRollMigrationHistoryResponse as PgRollMigrationHistoryResponse, schemas_PgRollMigrationJobID as PgRollMigrationJobID, schemas_PgRollMigrationType as PgRollMigrationType, schemas_PrefixExpression as PrefixExpression, schemas_ProjectionConfig as ProjectionConfig, schemas_QueryColumnsProjection as QueryColumnsProjection, schemas_RecordID as RecordID, schemas_RecordMeta as RecordMeta, schemas_RecordsMetadata as RecordsMetadata, schemas_Region as Region, schemas_RevLink as RevLink, schemas_Role as Role, schemas_SQLRecord as SQLRecord, schemas_Schema as Schema, schemas_SchemaEditScript as SchemaEditScript, schemas_SearchPageConfig as SearchPageConfig, schemas_SortExpression as SortExpression, schemas_SortOrder as SortOrder, schemas_StartedFromMetadata as StartedFromMetadata, schemas_SumAgg as SumAgg, schemas_SummaryExpression as SummaryExpression, schemas_SummaryExpressionList as SummaryExpressionList, schemas_Table as Table, schemas_TableMigration as TableMigration, schemas_TableName as TableName, schemas_TableOpAdd as TableOpAdd, schemas_TableOpRemove as TableOpRemove, schemas_TableOpRename as TableOpRename, schemas_TableRename as TableRename, schemas_TargetExpression as TargetExpression, schemas_TopValuesAgg as TopValuesAgg, schemas_TransactionDeleteOp as TransactionDeleteOp, schemas_TransactionError as TransactionError, schemas_TransactionFailure as TransactionFailure, schemas_TransactionGetOp as TransactionGetOp, schemas_TransactionInsertOp as TransactionInsertOp, TransactionOperation$1 as TransactionOperation, schemas_TransactionResultColumns as TransactionResultColumns, schemas_TransactionResultDelete as TransactionResultDelete, schemas_TransactionResultGet as TransactionResultGet, schemas_TransactionResultInsert as TransactionResultInsert, schemas_TransactionResultUpdate as TransactionResultUpdate, schemas_TransactionSuccess as TransactionSuccess, schemas_TransactionUpdateOp as TransactionUpdateOp, schemas_UniqueCountAgg as UniqueCountAgg, schemas_User as User, schemas_UserID as UserID, schemas_UserWithID as UserWithID, ValueBooster$1 as ValueBooster, schemas_WeeklyTimeWindow as WeeklyTimeWindow, schemas_Workspace as Workspace, schemas_WorkspaceID as WorkspaceID, schemas_WorkspaceInvite as WorkspaceInvite, schemas_WorkspaceMember as WorkspaceMember, schemas_WorkspaceMembers as WorkspaceMembers, schemas_WorkspaceMeta as WorkspaceMeta, schemas_WorkspacePlan as WorkspacePlan, XataRecord$1 as XataRecord };
6893
- }
6894
-
6895
- type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
6896
- interface XataApiClientOptions {
6897
- fetch?: FetchImpl;
6898
- apiKey?: string;
6899
- host?: HostProvider;
6900
- trace?: TraceFunction;
6901
- clientName?: string;
6902
- xataAgentExtra?: Record<string, string>;
6903
- }
6904
- declare class XataApiClient {
6905
- #private;
6906
- constructor(options?: XataApiClientOptions);
6907
- get user(): UserApi;
6908
- get authentication(): AuthenticationApi;
6909
- get workspaces(): WorkspaceApi;
6910
- get invites(): InvitesApi;
6911
- get database(): DatabaseApi;
6912
- get branches(): BranchApi;
6913
- get migrations(): MigrationsApi;
6914
- get migrationRequests(): MigrationRequestsApi;
6915
- get tables(): TableApi;
6916
- get records(): RecordsApi;
6917
- get files(): FilesApi;
6918
- get searchAndFilter(): SearchAndFilterApi;
6919
- }
6920
- declare class UserApi {
6921
- private extraProps;
6922
- constructor(extraProps: ApiExtraProps);
6923
- getUser(): Promise<UserWithID>;
6924
- updateUser({ user }: {
6925
- user: User;
6926
- }): Promise<UserWithID>;
6927
- deleteUser(): Promise<void>;
6928
- }
6929
- declare class AuthenticationApi {
6930
- private extraProps;
6931
- constructor(extraProps: ApiExtraProps);
6932
- getUserAPIKeys(): Promise<GetUserAPIKeysResponse>;
6933
- createUserAPIKey({ name }: {
6934
- name: APIKeyName;
6935
- }): Promise<CreateUserAPIKeyResponse>;
6936
- deleteUserAPIKey({ name }: {
6937
- name: APIKeyName;
6938
- }): Promise<void>;
6939
- }
6940
- declare class WorkspaceApi {
6941
- private extraProps;
6942
- constructor(extraProps: ApiExtraProps);
6943
- getWorkspacesList(): Promise<GetWorkspacesListResponse>;
6944
- createWorkspace({ data }: {
6945
- data: WorkspaceMeta;
6946
- }): Promise<Workspace>;
6947
- getWorkspace({ workspace }: {
6948
- workspace: WorkspaceID;
6949
- }): Promise<Workspace>;
6950
- updateWorkspace({ workspace, update }: {
6951
- workspace: WorkspaceID;
6952
- update: WorkspaceMeta;
6953
- }): Promise<Workspace>;
6954
- deleteWorkspace({ workspace }: {
6955
- workspace: WorkspaceID;
6956
- }): Promise<void>;
6957
- getWorkspaceMembersList({ workspace }: {
6958
- workspace: WorkspaceID;
6959
- }): Promise<WorkspaceMembers>;
6960
- updateWorkspaceMemberRole({ workspace, user, role }: {
6961
- workspace: WorkspaceID;
6962
- user: UserID;
6963
- role: Role;
6964
- }): Promise<void>;
6965
- removeWorkspaceMember({ workspace, user }: {
6966
- workspace: WorkspaceID;
6967
- user: UserID;
6968
- }): Promise<void>;
6969
- }
6970
- declare class InvitesApi {
6971
- private extraProps;
6972
- constructor(extraProps: ApiExtraProps);
6973
- inviteWorkspaceMember({ workspace, email, role }: {
6974
- workspace: WorkspaceID;
6975
- email: string;
6976
- role: Role;
6977
- }): Promise<WorkspaceInvite>;
6978
- updateWorkspaceMemberInvite({ workspace, invite, role }: {
6979
- workspace: WorkspaceID;
6980
- invite: InviteID;
6981
- role: Role;
6982
- }): Promise<WorkspaceInvite>;
6983
- cancelWorkspaceMemberInvite({ workspace, invite }: {
6984
- workspace: WorkspaceID;
6985
- invite: InviteID;
6986
- }): Promise<void>;
6987
- acceptWorkspaceMemberInvite({ workspace, key }: {
6988
- workspace: WorkspaceID;
6989
- key: InviteKey;
6990
- }): Promise<void>;
6991
- resendWorkspaceMemberInvite({ workspace, invite }: {
6992
- workspace: WorkspaceID;
6993
- invite: InviteID;
6994
- }): Promise<void>;
6995
- }
6996
- declare class BranchApi {
6997
- private extraProps;
6998
- constructor(extraProps: ApiExtraProps);
6999
- getBranchList({ workspace, region, database }: {
7000
- workspace: WorkspaceID;
7001
- region: string;
7002
- database: DBName$1;
7003
- }): Promise<ListBranchesResponse>;
7004
- getBranchDetails({ workspace, region, database, branch }: {
7005
- workspace: WorkspaceID;
7006
- region: string;
7007
- database: DBName$1;
7008
- branch: BranchName$1;
7009
- }): Promise<DBBranch>;
7010
- createBranch({ workspace, region, database, branch, from, metadata }: {
7011
- workspace: WorkspaceID;
7012
- region: string;
7013
- database: DBName$1;
7014
- branch: BranchName$1;
7015
- from?: string;
7016
- metadata?: BranchMetadata$1;
7017
- }): Promise<CreateBranchResponse>;
7018
- deleteBranch({ workspace, region, database, branch }: {
7019
- workspace: WorkspaceID;
7020
- region: string;
7021
- database: DBName$1;
7022
- branch: BranchName$1;
7023
- }): Promise<DeleteBranchResponse>;
7024
- copyBranch({ workspace, region, database, branch, destinationBranch, limit }: {
7025
- workspace: WorkspaceID;
7026
- region: string;
7027
- database: DBName$1;
7028
- branch: BranchName$1;
7029
- destinationBranch: BranchName$1;
7030
- limit?: number;
7031
- }): Promise<BranchWithCopyID>;
7032
- updateBranchMetadata({ workspace, region, database, branch, metadata }: {
7033
- workspace: WorkspaceID;
7034
- region: string;
7035
- database: DBName$1;
7036
- branch: BranchName$1;
7037
- metadata: BranchMetadata$1;
7038
- }): Promise<void>;
7039
- getBranchMetadata({ workspace, region, database, branch }: {
7040
- workspace: WorkspaceID;
7041
- region: string;
7042
- database: DBName$1;
7043
- branch: BranchName$1;
7044
- }): Promise<BranchMetadata$1>;
7045
- getBranchStats({ workspace, region, database, branch }: {
7046
- workspace: WorkspaceID;
7047
- region: string;
7048
- database: DBName$1;
7049
- branch: BranchName$1;
7050
- }): Promise<GetBranchStatsResponse>;
7051
- getGitBranchesMapping({ workspace, region, database }: {
7052
- workspace: WorkspaceID;
7053
- region: string;
7054
- database: DBName$1;
7055
- }): Promise<ListGitBranchesResponse>;
7056
- addGitBranchesEntry({ workspace, region, database, gitBranch, xataBranch }: {
7057
- workspace: WorkspaceID;
7058
- region: string;
7059
- database: DBName$1;
7060
- gitBranch: string;
7061
- xataBranch: BranchName$1;
7062
- }): Promise<AddGitBranchesEntryResponse>;
7063
- removeGitBranchesEntry({ workspace, region, database, gitBranch }: {
7064
- workspace: WorkspaceID;
7065
- region: string;
7066
- database: DBName$1;
7067
- gitBranch: string;
7068
- }): Promise<void>;
7069
- resolveBranch({ workspace, region, database, gitBranch, fallbackBranch }: {
7070
- workspace: WorkspaceID;
7071
- region: string;
7072
- database: DBName$1;
7073
- gitBranch?: string;
7074
- fallbackBranch?: string;
7075
- }): Promise<ResolveBranchResponse>;
7076
- pgRollMigrationHistory({ workspace, region, database, branch }: {
7077
- workspace: WorkspaceID;
7078
- region: string;
7079
- database: DBName$1;
7080
- branch: BranchName$1;
7081
- }): Promise<PgRollMigrationHistoryResponse>;
7082
- applyMigration({ workspace, region, database, branch, migration }: {
7083
- workspace: WorkspaceID;
7084
- region: string;
7085
- database: DBName$1;
7086
- branch: BranchName$1;
7087
- migration: Migration;
7088
- }): Promise<PgRollApplyMigrationResponse>;
7089
- }
7090
- declare class TableApi {
7091
- private extraProps;
7092
- constructor(extraProps: ApiExtraProps);
7093
- createTable({ workspace, region, database, branch, table }: {
7094
- workspace: WorkspaceID;
7095
- region: string;
7096
- database: DBName$1;
7097
- branch: BranchName$1;
7098
- table: TableName;
7099
- }): Promise<CreateTableResponse>;
7100
- deleteTable({ workspace, region, database, branch, table }: {
7101
- workspace: WorkspaceID;
7102
- region: string;
7103
- database: DBName$1;
7104
- branch: BranchName$1;
7105
- table: TableName;
7106
- }): Promise<DeleteTableResponse>;
7107
- updateTable({ workspace, region, database, branch, table, update }: {
7108
- workspace: WorkspaceID;
7109
- region: string;
7110
- database: DBName$1;
7111
- branch: BranchName$1;
7112
- table: TableName;
7113
- update: UpdateTableRequestBody;
7114
- }): Promise<SchemaUpdateResponse>;
7115
- getTableSchema({ workspace, region, database, branch, table }: {
7116
- workspace: WorkspaceID;
7117
- region: string;
7118
- database: DBName$1;
7119
- branch: BranchName$1;
7120
- table: TableName;
7121
- }): Promise<GetTableSchemaResponse>;
7122
- setTableSchema({ workspace, region, database, branch, table, schema }: {
7123
- workspace: WorkspaceID;
7124
- region: string;
7125
- database: DBName$1;
7126
- branch: BranchName$1;
7127
- table: TableName;
7128
- schema: SetTableSchemaRequestBody;
7129
- }): Promise<SchemaUpdateResponse>;
7130
- getTableColumns({ workspace, region, database, branch, table }: {
7131
- workspace: WorkspaceID;
7132
- region: string;
7133
- database: DBName$1;
7134
- branch: BranchName$1;
7135
- table: TableName;
7136
- }): Promise<GetTableColumnsResponse>;
7137
- addTableColumn({ workspace, region, database, branch, table, column }: {
7138
- workspace: WorkspaceID;
7139
- region: string;
7140
- database: DBName$1;
7141
- branch: BranchName$1;
7142
- table: TableName;
7143
- column: Column;
7144
- }): Promise<SchemaUpdateResponse>;
7145
- getColumn({ workspace, region, database, branch, table, column }: {
7146
- workspace: WorkspaceID;
7147
- region: string;
7148
- database: DBName$1;
7149
- branch: BranchName$1;
7150
- table: TableName;
7151
- column: ColumnName;
7152
- }): Promise<Column>;
7153
- updateColumn({ workspace, region, database, branch, table, column, update }: {
7154
- workspace: WorkspaceID;
7155
- region: string;
7156
- database: DBName$1;
7157
- branch: BranchName$1;
7158
- table: TableName;
7159
- column: ColumnName;
7160
- update: UpdateColumnRequestBody;
7161
- }): Promise<SchemaUpdateResponse>;
7162
- deleteColumn({ workspace, region, database, branch, table, column }: {
7163
- workspace: WorkspaceID;
7164
- region: string;
7165
- database: DBName$1;
7166
- branch: BranchName$1;
7167
- table: TableName;
7168
- column: ColumnName;
7169
- }): Promise<SchemaUpdateResponse>;
7170
- }
7171
- declare class RecordsApi {
7172
- private extraProps;
7173
- constructor(extraProps: ApiExtraProps);
7174
- insertRecord({ workspace, region, database, branch, table, record, columns }: {
7175
- workspace: WorkspaceID;
7176
- region: string;
7177
- database: DBName$1;
7178
- branch: BranchName$1;
7179
- table: TableName;
7180
- record: Record<string, any>;
7181
- columns?: ColumnsProjection;
7182
- }): Promise<RecordUpdateResponse>;
7183
- getRecord({ workspace, region, database, branch, table, id, columns }: {
7184
- workspace: WorkspaceID;
7185
- region: string;
7186
- database: DBName$1;
7187
- branch: BranchName$1;
7188
- table: TableName;
7189
- id: RecordID;
7190
- columns?: ColumnsProjection;
7191
- }): Promise<XataRecord$1>;
7192
- insertRecordWithID({ workspace, region, database, branch, table, id, record, columns, createOnly, ifVersion }: {
7193
- workspace: WorkspaceID;
7194
- region: string;
7195
- database: DBName$1;
7196
- branch: BranchName$1;
7197
- table: TableName;
7198
- id: RecordID;
7199
- record: Record<string, any>;
7200
- columns?: ColumnsProjection;
7201
- createOnly?: boolean;
7202
- ifVersion?: number;
7203
- }): Promise<RecordUpdateResponse>;
7204
- updateRecordWithID({ workspace, region, database, branch, table, id, record, columns, ifVersion }: {
7205
- workspace: WorkspaceID;
7206
- region: string;
7207
- database: DBName$1;
7208
- branch: BranchName$1;
7209
- table: TableName;
7210
- id: RecordID;
7211
- record: Record<string, any>;
7212
- columns?: ColumnsProjection;
7213
- ifVersion?: number;
7214
- }): Promise<RecordUpdateResponse>;
7215
- upsertRecordWithID({ workspace, region, database, branch, table, id, record, columns, ifVersion }: {
7216
- workspace: WorkspaceID;
7217
- region: string;
7218
- database: DBName$1;
7219
- branch: BranchName$1;
7220
- table: TableName;
7221
- id: RecordID;
7222
- record: Record<string, any>;
7223
- columns?: ColumnsProjection;
7224
- ifVersion?: number;
7225
- }): Promise<RecordUpdateResponse>;
7226
- deleteRecord({ workspace, region, database, branch, table, id, columns }: {
7227
- workspace: WorkspaceID;
7228
- region: string;
7229
- database: DBName$1;
7230
- branch: BranchName$1;
7231
- table: TableName;
7232
- id: RecordID;
7233
- columns?: ColumnsProjection;
7234
- }): Promise<RecordUpdateResponse>;
7235
- bulkInsertTableRecords({ workspace, region, database, branch, table, records, columns }: {
7236
- workspace: WorkspaceID;
7237
- region: string;
7238
- database: DBName$1;
7239
- branch: BranchName$1;
7240
- table: TableName;
7241
- records: Record<string, any>[];
7242
- columns?: ColumnsProjection;
7243
- }): Promise<BulkInsertResponse>;
7244
- branchTransaction({ workspace, region, database, branch, operations }: {
7245
- workspace: WorkspaceID;
7246
- region: string;
7247
- database: DBName$1;
7248
- branch: BranchName$1;
7249
- operations: TransactionOperation$1[];
7250
- }): Promise<TransactionSuccess>;
7251
- }
7252
- declare class FilesApi {
7253
- private extraProps;
7254
- constructor(extraProps: ApiExtraProps);
7255
- getFileItem({ workspace, region, database, branch, table, record, column, fileId }: {
7256
- workspace: WorkspaceID;
7257
- region: string;
7258
- database: DBName$1;
7259
- branch: BranchName$1;
7260
- table: TableName;
7261
- record: RecordID;
7262
- column: ColumnName;
7263
- fileId: string;
7264
- }): Promise<any>;
7265
- putFileItem({ workspace, region, database, branch, table, record, column, fileId, file }: {
7266
- workspace: WorkspaceID;
7267
- region: string;
7268
- database: DBName$1;
7269
- branch: BranchName$1;
7270
- table: TableName;
7271
- record: RecordID;
7272
- column: ColumnName;
7273
- fileId: string;
7274
- file: any;
7275
- }): Promise<PutFileResponse>;
7276
- deleteFileItem({ workspace, region, database, branch, table, record, column, fileId }: {
7277
- workspace: WorkspaceID;
7278
- region: string;
7279
- database: DBName$1;
7280
- branch: BranchName$1;
7281
- table: TableName;
7282
- record: RecordID;
7283
- column: ColumnName;
7284
- fileId: string;
7285
- }): Promise<PutFileResponse>;
7286
- getFile({ workspace, region, database, branch, table, record, column }: {
7287
- workspace: WorkspaceID;
7288
- region: string;
7289
- database: DBName$1;
7290
- branch: BranchName$1;
7291
- table: TableName;
7292
- record: RecordID;
7293
- column: ColumnName;
7294
- }): Promise<any>;
7295
- putFile({ workspace, region, database, branch, table, record, column, file }: {
7296
- workspace: WorkspaceID;
7297
- region: string;
7298
- database: DBName$1;
7299
- branch: BranchName$1;
7300
- table: TableName;
7301
- record: RecordID;
7302
- column: ColumnName;
7303
- file: Blob;
7304
- }): Promise<PutFileResponse>;
7305
- deleteFile({ workspace, region, database, branch, table, record, column }: {
7306
- workspace: WorkspaceID;
7307
- region: string;
7308
- database: DBName$1;
7309
- branch: BranchName$1;
7310
- table: TableName;
7311
- record: RecordID;
7312
- column: ColumnName;
7313
- }): Promise<PutFileResponse>;
7314
- fileAccess({ workspace, region, fileId, verify }: {
7315
- workspace: WorkspaceID;
7316
- region: string;
7317
- fileId: string;
7318
- verify?: FileSignature;
7319
- }): Promise<any>;
7320
- }
7321
- declare class SearchAndFilterApi {
7322
- private extraProps;
7323
- constructor(extraProps: ApiExtraProps);
7324
- queryTable({ workspace, region, database, branch, table, filter, sort, page, columns, consistency }: {
7325
- workspace: WorkspaceID;
7326
- region: string;
7327
- database: DBName$1;
7328
- branch: BranchName$1;
7329
- table: TableName;
7330
- filter?: FilterExpression;
7331
- sort?: SortExpression;
7332
- page?: PageConfig;
7333
- columns?: ColumnsProjection;
7334
- consistency?: 'strong' | 'eventual';
7335
- }): Promise<QueryResponse>;
7336
- searchTable({ workspace, region, database, branch, table, query, fuzziness, target, prefix, filter, highlight, boosters }: {
7337
- workspace: WorkspaceID;
7338
- region: string;
7339
- database: DBName$1;
7340
- branch: BranchName$1;
7341
- table: TableName;
7342
- query: string;
7343
- fuzziness?: FuzzinessExpression;
7344
- target?: TargetExpression;
7345
- prefix?: PrefixExpression;
7346
- filter?: FilterExpression;
7347
- highlight?: HighlightExpression;
7348
- boosters?: BoosterExpression[];
7349
- }): Promise<SearchResponse>;
7350
- searchBranch({ workspace, region, database, branch, tables, query, fuzziness, prefix, highlight }: {
7351
- workspace: WorkspaceID;
7352
- region: string;
7353
- database: DBName$1;
7354
- branch: BranchName$1;
7355
- tables?: (string | {
7356
- table: string;
7357
- filter?: FilterExpression;
7358
- target?: TargetExpression;
7359
- boosters?: BoosterExpression[];
7360
- })[];
7361
- query: string;
7362
- fuzziness?: FuzzinessExpression;
7363
- prefix?: PrefixExpression;
7364
- highlight?: HighlightExpression;
7365
- }): Promise<SearchResponse>;
7366
- vectorSearchTable({ workspace, region, database, branch, table, queryVector, column, similarityFunction, size, filter }: {
7367
- workspace: WorkspaceID;
7368
- region: string;
7369
- database: DBName$1;
7370
- branch: BranchName$1;
7371
- table: TableName;
7372
- queryVector: number[];
7373
- column: string;
7374
- similarityFunction?: string;
7375
- size?: number;
7376
- filter?: FilterExpression;
7377
- }): Promise<SearchResponse>;
7378
- askTable({ workspace, region, database, branch, table, options }: {
7379
- workspace: WorkspaceID;
7380
- region: string;
7381
- database: DBName$1;
7382
- branch: BranchName$1;
7383
- table: TableName;
7384
- options: AskTableRequestBody;
7385
- }): Promise<AskTableResponse>;
7386
- askTableSession({ workspace, region, database, branch, table, sessionId, message }: {
7387
- workspace: WorkspaceID;
7388
- region: string;
7389
- database: DBName$1;
7390
- branch: BranchName$1;
7391
- table: TableName;
7392
- sessionId: string;
7393
- message: string;
7394
- }): Promise<AskTableSessionResponse>;
7395
- summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page, consistency }: {
7396
- workspace: WorkspaceID;
7397
- region: string;
7398
- database: DBName$1;
7399
- branch: BranchName$1;
7400
- table: TableName;
7401
- filter?: FilterExpression;
7402
- columns?: ColumnsProjection;
7403
- summaries?: SummaryExpressionList;
7404
- sort?: SortExpression;
7405
- summariesFilter?: FilterExpression;
7406
- page?: {
7407
- size?: number;
7408
- };
7409
- consistency?: 'strong' | 'eventual';
7410
- }): Promise<SummarizeResponse>;
7411
- aggregateTable({ workspace, region, database, branch, table, filter, aggs }: {
7412
- workspace: WorkspaceID;
7413
- region: string;
7414
- database: DBName$1;
7415
- branch: BranchName$1;
7416
- table: TableName;
7417
- filter?: FilterExpression;
7418
- aggs?: AggExpressionMap;
7419
- }): Promise<AggResponse>;
7420
- }
7421
- declare class MigrationRequestsApi {
7422
- private extraProps;
7423
- constructor(extraProps: ApiExtraProps);
7424
- queryMigrationRequests({ workspace, region, database, filter, sort, page, columns }: {
7425
- workspace: WorkspaceID;
7426
- region: string;
7427
- database: DBName$1;
7428
- filter?: FilterExpression;
7429
- sort?: SortExpression;
7430
- page?: PageConfig;
7431
- columns?: ColumnsProjection;
7432
- }): Promise<QueryMigrationRequestsResponse>;
7433
- createMigrationRequest({ workspace, region, database, migration }: {
7434
- workspace: WorkspaceID;
7435
- region: string;
7436
- database: DBName$1;
7437
- migration: CreateMigrationRequestRequestBody;
7438
- }): Promise<CreateMigrationRequestResponse>;
7439
- getMigrationRequest({ workspace, region, database, migrationRequest }: {
7440
- workspace: WorkspaceID;
7441
- region: string;
7442
- database: DBName$1;
7443
- migrationRequest: MigrationRequestNumber;
7444
- }): Promise<MigrationRequest>;
7445
- updateMigrationRequest({ workspace, region, database, migrationRequest, update }: {
7446
- workspace: WorkspaceID;
7447
- region: string;
7448
- database: DBName$1;
7449
- migrationRequest: MigrationRequestNumber;
7450
- update: UpdateMigrationRequestRequestBody;
7451
- }): Promise<void>;
7452
- listMigrationRequestsCommits({ workspace, region, database, migrationRequest, page }: {
7453
- workspace: WorkspaceID;
7454
- region: string;
7455
- database: DBName$1;
7456
- migrationRequest: MigrationRequestNumber;
7457
- page?: {
7458
- after?: string;
7459
- before?: string;
7460
- size?: number;
7461
- };
7462
- }): Promise<ListMigrationRequestsCommitsResponse>;
7463
- compareMigrationRequest({ workspace, region, database, migrationRequest }: {
7464
- workspace: WorkspaceID;
7465
- region: string;
7466
- database: DBName$1;
7467
- migrationRequest: MigrationRequestNumber;
7468
- }): Promise<SchemaCompareResponse>;
7469
- getMigrationRequestIsMerged({ workspace, region, database, migrationRequest }: {
7470
- workspace: WorkspaceID;
7471
- region: string;
7472
- database: DBName$1;
7473
- migrationRequest: MigrationRequestNumber;
7474
- }): Promise<GetMigrationRequestIsMergedResponse>;
7475
- mergeMigrationRequest({ workspace, region, database, migrationRequest }: {
7476
- workspace: WorkspaceID;
7477
- region: string;
7478
- database: DBName$1;
7479
- migrationRequest: MigrationRequestNumber;
7480
- }): Promise<BranchOp>;
7481
- }
7482
- declare class MigrationsApi {
7483
- private extraProps;
7484
- constructor(extraProps: ApiExtraProps);
7485
- getBranchMigrationHistory({ workspace, region, database, branch, limit, startFrom }: {
7486
- workspace: WorkspaceID;
7487
- region: string;
7488
- database: DBName$1;
7489
- branch: BranchName$1;
7490
- limit?: number;
7491
- startFrom?: string;
7492
- }): Promise<GetBranchMigrationHistoryResponse>;
7493
- getBranchMigrationPlan({ workspace, region, database, branch, schema }: {
7494
- workspace: WorkspaceID;
7495
- region: string;
7496
- database: DBName$1;
7497
- branch: BranchName$1;
7498
- schema: Schema;
7499
- }): Promise<BranchMigrationPlan>;
7500
- executeBranchMigrationPlan({ workspace, region, database, branch, plan }: {
7501
- workspace: WorkspaceID;
7502
- region: string;
7503
- database: DBName$1;
7504
- branch: BranchName$1;
7505
- plan: ExecuteBranchMigrationPlanRequestBody;
7506
- }): Promise<SchemaUpdateResponse>;
7507
- getBranchSchemaHistory({ workspace, region, database, branch, page }: {
7508
- workspace: WorkspaceID;
7509
- region: string;
7510
- database: DBName$1;
7511
- branch: BranchName$1;
7512
- page?: {
7513
- after?: string;
7514
- before?: string;
7515
- size?: number;
7516
- };
7517
- }): Promise<GetBranchSchemaHistoryResponse>;
7518
- compareBranchWithUserSchema({ workspace, region, database, branch, schema, schemaOperations, branchOperations }: {
7519
- workspace: WorkspaceID;
7520
- region: string;
7521
- database: DBName$1;
7522
- branch: BranchName$1;
7523
- schema: Schema;
7524
- schemaOperations?: MigrationOp[];
7525
- branchOperations?: MigrationOp[];
7526
- }): Promise<SchemaCompareResponse>;
7527
- compareBranchSchemas({ workspace, region, database, branch, compare, sourceBranchOperations, targetBranchOperations }: {
7528
- workspace: WorkspaceID;
7529
- region: string;
7530
- database: DBName$1;
7531
- branch: BranchName$1;
7532
- compare: BranchName$1;
7533
- sourceBranchOperations?: MigrationOp[];
7534
- targetBranchOperations?: MigrationOp[];
7535
- }): Promise<SchemaCompareResponse>;
7536
- updateBranchSchema({ workspace, region, database, branch, migration }: {
7537
- workspace: WorkspaceID;
7538
- region: string;
7539
- database: DBName$1;
7540
- branch: BranchName$1;
7541
- migration: Migration;
7542
- }): Promise<SchemaUpdateResponse>;
7543
- previewBranchSchemaEdit({ workspace, region, database, branch, data }: {
7544
- workspace: WorkspaceID;
7545
- region: string;
7546
- database: DBName$1;
7547
- branch: BranchName$1;
7548
- data: {
7549
- edits?: SchemaEditScript;
7550
- };
7551
- }): Promise<PreviewBranchSchemaEditResponse>;
7552
- applyBranchSchemaEdit({ workspace, region, database, branch, edits }: {
7553
- workspace: WorkspaceID;
7554
- region: string;
7555
- database: DBName$1;
7556
- branch: BranchName$1;
7557
- edits: SchemaEditScript;
7558
- }): Promise<SchemaUpdateResponse>;
7559
- pushBranchMigrations({ workspace, region, database, branch, migrations }: {
7560
- workspace: WorkspaceID;
7561
- region: string;
7562
- database: DBName$1;
7563
- branch: BranchName$1;
7564
- migrations: MigrationObject[];
7565
- }): Promise<SchemaUpdateResponse>;
7566
- getSchema({ workspace, region, database, branch }: {
7567
- workspace: WorkspaceID;
7568
- region: string;
7569
- database: DBName$1;
7570
- branch: BranchName$1;
7571
- }): Promise<GetSchemaResponse>;
7572
- }
7573
- declare class DatabaseApi {
7574
- private extraProps;
7575
- constructor(extraProps: ApiExtraProps);
7576
- getDatabaseList({ workspace }: {
7577
- workspace: WorkspaceID;
7578
- }): Promise<ListDatabasesResponse>;
7579
- createDatabase({ workspace, database, data, headers }: {
7580
- workspace: WorkspaceID;
7581
- database: DBName$1;
7582
- data: CreateDatabaseRequestBody;
7583
- headers?: Record<string, string>;
7584
- }): Promise<CreateDatabaseResponse>;
7585
- deleteDatabase({ workspace, database }: {
7586
- workspace: WorkspaceID;
7587
- database: DBName$1;
7588
- }): Promise<DeleteDatabaseResponse>;
7589
- getDatabaseMetadata({ workspace, database }: {
7590
- workspace: WorkspaceID;
7591
- database: DBName$1;
7592
- }): Promise<DatabaseMetadata>;
7593
- updateDatabaseMetadata({ workspace, database, metadata }: {
7594
- workspace: WorkspaceID;
7595
- database: DBName$1;
7596
- metadata: DatabaseMetadata;
7597
- }): Promise<DatabaseMetadata>;
7598
- renameDatabase({ workspace, database, newName }: {
7599
- workspace: WorkspaceID;
7600
- database: DBName$1;
7601
- newName: DBName$1;
7602
- }): Promise<DatabaseMetadata>;
7603
- getDatabaseGithubSettings({ workspace, database }: {
7604
- workspace: WorkspaceID;
7605
- database: DBName$1;
7606
- }): Promise<DatabaseGithubSettings>;
7607
- updateDatabaseGithubSettings({ workspace, database, settings }: {
7608
- workspace: WorkspaceID;
7609
- database: DBName$1;
7610
- settings: DatabaseGithubSettings;
7611
- }): Promise<DatabaseGithubSettings>;
7612
- deleteDatabaseGithubSettings({ workspace, database }: {
7613
- workspace: WorkspaceID;
7614
- database: DBName$1;
7615
- }): Promise<void>;
7616
- listRegions({ workspace }: {
7617
- workspace: WorkspaceID;
7618
- }): Promise<ListRegionsResponse>;
7619
- }
7620
-
7621
- declare class XataApiPlugin implements XataPlugin {
7622
- build(options: XataPluginOptions): XataApiClient;
7623
- }
7624
-
7625
- type StringKeys<O> = Extract<keyof O, string>;
7626
- type Values<O> = O[StringKeys<O>];
7627
- type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
7628
- type If<Condition, Then, Else> = Condition extends true ? Then : Else;
7629
- type IsObject<T> = T extends Record<string, any> ? true : false;
7630
- type IsArray<T> = T extends Array<any> ? true : false;
7631
- type RequiredBy<T, K extends keyof T> = T & {
7632
- [P in K]-?: NonNullable<T[P]>;
7633
- };
7634
- type GetArrayInnerType<T extends readonly any[]> = T[number];
7635
- type SingleOrArray<T> = T | T[];
7636
- type Dictionary<T> = Record<string, T>;
7637
- type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
7638
- type Without<T, U> = {
7639
- [P in Exclude<keyof T, keyof U>]?: never;
7640
- };
7641
- type ExclusiveOr<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
7642
- type Explode<T> = keyof T extends infer K ? K extends unknown ? {
7643
- [I in keyof T]: I extends K ? T[I] : never;
7644
- } : never : never;
7645
- type AtMostOne<T> = Explode<Partial<T>>;
7646
- type AtLeastOne<T, U = {
7647
- [K in keyof T]: Pick<T, K>;
7648
- }> = Partial<T> & U[keyof U];
7649
- type ExactlyOne<T> = AtMostOne<T> & AtLeastOne<T>;
7650
- type Fn = (...args: any[]) => any;
7651
- type NarrowRaw<A> = (A extends [] ? [] : never) | (A extends Narrowable ? A : never) | {
7652
- [K in keyof A]: A[K] extends Fn ? A[K] : NarrowRaw<A[K]>;
7653
- };
7654
- type Narrowable = string | number | bigint | boolean;
7655
- type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
7656
- type Narrow<A> = Try<A, [], NarrowRaw<A>>;
7993
+ type schemas_UniqueCountAgg = UniqueCountAgg;
7994
+ type schemas_User = User;
7995
+ type schemas_UserID = UserID;
7996
+ type schemas_UserWithID = UserWithID;
7997
+ type schemas_WeeklyTimeWindow = WeeklyTimeWindow;
7998
+ type schemas_Workspace = Workspace;
7999
+ type schemas_WorkspaceID = WorkspaceID;
8000
+ type schemas_WorkspaceInvite = WorkspaceInvite;
8001
+ type schemas_WorkspaceMember = WorkspaceMember;
8002
+ type schemas_WorkspaceMembers = WorkspaceMembers;
8003
+ type schemas_WorkspaceMeta = WorkspaceMeta;
8004
+ type schemas_WorkspacePlan = WorkspacePlan;
8005
+ type schemas_WorkspaceSettings = WorkspaceSettings;
8006
+ declare namespace schemas {
8007
+ export type { schemas_APIKeyName as APIKeyName, schemas_AccessToken as AccessToken, schemas_AggExpression as AggExpression, schemas_AggExpressionMap as AggExpressionMap, AggResponse$1 as AggResponse, schemas_ApplyMigrationResponse as ApplyMigrationResponse, schemas_AuthorizationCodeRequest as AuthorizationCodeRequest, schemas_AuthorizationCodeResponse as AuthorizationCodeResponse, schemas_AutoscalingConfig as AutoscalingConfig, schemas_AutoscalingConfigResponse as AutoscalingConfigResponse, schemas_AverageAgg as AverageAgg, schemas_BoosterExpression as BoosterExpression, schemas_Branch as Branch, schemas_BranchDetails as BranchDetails, BranchMetadata$1 as BranchMetadata, schemas_BranchMigration as BranchMigration, BranchName$1 as BranchName, schemas_BranchOp as BranchOp, schemas_BranchSchema as BranchSchema, schemas_BranchState as BranchState, schemas_BranchWithCopyID as BranchWithCopyID, schemas_ClusterConfiguration as ClusterConfiguration, schemas_ClusterConfigurationResponse as ClusterConfigurationResponse, schemas_ClusterCreateDetails as ClusterCreateDetails, schemas_ClusterDeleteMetadata as ClusterDeleteMetadata, ClusterID$1 as ClusterID, schemas_ClusterMetadata as ClusterMetadata, schemas_ClusterResponse as ClusterResponse, schemas_ClusterShortMetadata as ClusterShortMetadata, schemas_ClusterUpdateDetails as ClusterUpdateDetails, schemas_ClusterUpdateMetadata as ClusterUpdateMetadata, schemas_Column as Column, schemas_ColumnFile as ColumnFile, schemas_ColumnLink as ColumnLink, schemas_ColumnMigration as ColumnMigration, schemas_ColumnName as ColumnName, schemas_ColumnOpAdd as ColumnOpAdd, schemas_ColumnOpRemove as ColumnOpRemove, schemas_ColumnOpRename as ColumnOpRename, schemas_ColumnVector as ColumnVector, schemas_ColumnsProjection as ColumnsProjection, schemas_Commit as Commit, schemas_CompleteMigrationResponse as CompleteMigrationResponse, schemas_CountAgg as CountAgg, schemas_DBBranch as DBBranch, schemas_DBBranchName as DBBranchName, DBName$1 as DBName, schemas_DailyTimeWindow as DailyTimeWindow, schemas_DataInputRecord as DataInputRecord, schemas_DatabaseGithubSettings as DatabaseGithubSettings, schemas_DatabaseMetadata as DatabaseMetadata, schemas_DatabaseSettings as DatabaseSettings, DateBooster$1 as DateBooster, schemas_DateHistogramAgg as DateHistogramAgg, DateTime$1 as DateTime, schemas_FileAccessID as FileAccessID, schemas_FileItemID as FileItemID, schemas_FileName as FileName, schemas_FileResponse as FileResponse, schemas_FileSignature as FileSignature, schemas_FilterColumn as FilterColumn, schemas_FilterColumnIncludes as FilterColumnIncludes, schemas_FilterExpression as FilterExpression, schemas_FilterList as FilterList, schemas_FilterPredicate as FilterPredicate, schemas_FilterPredicateOp as FilterPredicateOp, schemas_FilterPredicateRangeOp as FilterPredicateRangeOp, schemas_FilterRangeValue as FilterRangeValue, schemas_FilterValue as FilterValue, schemas_FuzzinessExpression as FuzzinessExpression, schemas_GetMigrationJobsResponse as GetMigrationJobsResponse, schemas_HighlightExpression as HighlightExpression, schemas_InputFile as InputFile, schemas_InputFileArray as InputFileArray, schemas_InputFileEntry as InputFileEntry, schemas_InviteID as InviteID, schemas_InviteKey as InviteKey, schemas_ListBranchesResponse as ListBranchesResponse, schemas_ListClusterBranchesResponse as ListClusterBranchesResponse, schemas_ListClustersResponse as ListClustersResponse, schemas_ListDatabasesResponse as ListDatabasesResponse, schemas_ListGitBranchesResponse as ListGitBranchesResponse, schemas_ListRegionsResponse as ListRegionsResponse, schemas_MaintenanceConfig as MaintenanceConfig, schemas_MaintenanceConfigResponse as MaintenanceConfigResponse, schemas_MaxAgg as MaxAgg, schemas_MediaType as MediaType, schemas_MetricData as MetricData, schemas_MetricMessage as MetricMessage, schemas_MetricsDatapoint as MetricsDatapoint, schemas_MetricsLatency as MetricsLatency, schemas_MetricsResponse as MetricsResponse, schemas_Migration as Migration, schemas_MigrationColumnOp as MigrationColumnOp, schemas_MigrationDescription as MigrationDescription, schemas_MigrationHistoryItem as MigrationHistoryItem, schemas_MigrationHistoryResponse as MigrationHistoryResponse, schemas_MigrationJobID as MigrationJobID, schemas_MigrationJobItem as MigrationJobItem, schemas_MigrationJobStatus as MigrationJobStatus, schemas_MigrationJobStatusResponse as MigrationJobStatusResponse, schemas_MigrationJobType as MigrationJobType, schemas_MigrationObject as MigrationObject, schemas_MigrationOp as MigrationOp, schemas_MigrationOperationDescription as MigrationOperationDescription, schemas_MigrationRequest as MigrationRequest, schemas_MigrationRequestNumber as MigrationRequestNumber, MigrationStatus$1 as MigrationStatus, schemas_MigrationTableOp as MigrationTableOp, schemas_MigrationType as MigrationType, schemas_MinAgg as MinAgg, NumericBooster$1 as NumericBooster, schemas_NumericHistogramAgg as NumericHistogramAgg, schemas_OAuthAccessToken as OAuthAccessToken, schemas_OAuthClientID as OAuthClientID, schemas_OAuthClientPublicDetails as OAuthClientPublicDetails, schemas_OAuthResponseType as OAuthResponseType, schemas_OAuthScope as OAuthScope, schemas_ObjectValue as ObjectValue, schemas_PageConfig as PageConfig, PageResponse$1 as PageResponse, PageSize$1 as PageSize, PageToken$1 as PageToken, schemas_PercentilesAgg as PercentilesAgg, schemas_PrefixExpression as PrefixExpression, schemas_PreparedStatement as PreparedStatement, schemas_ProjectionConfig as ProjectionConfig, schemas_QueryColumnsProjection as QueryColumnsProjection, schemas_RecordID as RecordID, schemas_RecordMeta as RecordMeta, schemas_RecordsMetadata as RecordsMetadata, schemas_Region as Region, schemas_RevLink as RevLink, schemas_Role as Role, schemas_RollbackMigrationResponse as RollbackMigrationResponse, schemas_SQLConsistency as SQLConsistency, schemas_SQLRecord as SQLRecord, SQLResponse$1 as SQLResponse, schemas_SQLResponseArray as SQLResponseArray, schemas_SQLResponseBase as SQLResponseBase, schemas_SQLResponseJSON as SQLResponseJSON, SQLResponseType$1 as SQLResponseType, schemas_Schema as Schema, schemas_SchemaEditScript as SchemaEditScript, schemas_SearchPageConfig as SearchPageConfig, schemas_SortExpression as SortExpression, schemas_SortOrder as SortOrder, schemas_StartMigrationResponse as StartMigrationResponse, schemas_StartedFromMetadata as StartedFromMetadata, schemas_SumAgg as SumAgg, schemas_SummaryExpression as SummaryExpression, schemas_SummaryExpressionList as SummaryExpressionList, schemas_Table as Table, schemas_TableMigration as TableMigration, schemas_TableName as TableName, schemas_TableOpAdd as TableOpAdd, schemas_TableOpRemove as TableOpRemove, schemas_TableOpRename as TableOpRename, schemas_TableRename as TableRename, schemas_TargetExpression as TargetExpression, schemas_TopValuesAgg as TopValuesAgg, schemas_TransactionDeleteOp as TransactionDeleteOp, schemas_TransactionError as TransactionError, schemas_TransactionFailure as TransactionFailure, schemas_TransactionGetOp as TransactionGetOp, schemas_TransactionInsertOp as TransactionInsertOp, TransactionOperation$1 as TransactionOperation, schemas_TransactionResultColumns as TransactionResultColumns, schemas_TransactionResultDelete as TransactionResultDelete, schemas_TransactionResultGet as TransactionResultGet, schemas_TransactionResultInsert as TransactionResultInsert, schemas_TransactionResultUpdate as TransactionResultUpdate, schemas_TransactionSuccess as TransactionSuccess, schemas_TransactionUpdateOp as TransactionUpdateOp, schemas_UniqueCountAgg as UniqueCountAgg, schemas_User as User, schemas_UserID as UserID, schemas_UserWithID as UserWithID, ValueBooster$1 as ValueBooster, schemas_WeeklyTimeWindow as WeeklyTimeWindow, schemas_Workspace as Workspace, schemas_WorkspaceID as WorkspaceID, schemas_WorkspaceInvite as WorkspaceInvite, schemas_WorkspaceMember as WorkspaceMember, schemas_WorkspaceMembers as WorkspaceMembers, schemas_WorkspaceMeta as WorkspaceMeta, schemas_WorkspacePlan as WorkspacePlan, schemas_WorkspaceSettings as WorkspaceSettings, XataRecord$1 as XataRecord };
8008
+ }
8009
+
8010
+ declare class XataApiPlugin implements XataPlugin {
8011
+ build(options: XataPluginOptions): XataApiClient;
8012
+ }
7657
8013
 
7658
8014
  interface ImageTransformations {
7659
8015
  /**
@@ -7820,6 +8176,580 @@ interface ImageTransformations {
7820
8176
  declare function transformImage(url: string, ...transformations: ImageTransformations[]): string;
7821
8177
  declare function transformImage(url: string | undefined, ...transformations: ImageTransformations[]): string | undefined;
7822
8178
 
8179
+ declare class Buffer extends Uint8Array {
8180
+ /**
8181
+ * Allocates a new buffer containing the given `str`.
8182
+ *
8183
+ * @param str String to store in buffer.
8184
+ * @param encoding Encoding to use, optional. Default is `utf8`.
8185
+ */
8186
+ constructor(str: string, encoding?: Encoding);
8187
+ /**
8188
+ * Allocates a new buffer of `size` octets.
8189
+ *
8190
+ * @param size Count of octets to allocate.
8191
+ */
8192
+ constructor(size: number);
8193
+ /**
8194
+ * Allocates a new buffer containing the given `array` of octets.
8195
+ *
8196
+ * @param array The octets to store.
8197
+ */
8198
+ constructor(array: Uint8Array);
8199
+ /**
8200
+ * Allocates a new buffer containing the given `array` of octet values.
8201
+ *
8202
+ * @param array
8203
+ */
8204
+ constructor(array: number[]);
8205
+ /**
8206
+ * Allocates a new buffer containing the given `array` of octet values.
8207
+ *
8208
+ * @param array
8209
+ * @param encoding
8210
+ */
8211
+ constructor(array: number[], encoding: Encoding);
8212
+ /**
8213
+ * Copies the passed `buffer` data onto a new `Buffer` instance.
8214
+ *
8215
+ * @param buffer
8216
+ */
8217
+ constructor(buffer: Buffer);
8218
+ /**
8219
+ * When passed a reference to the .buffer property of a TypedArray instance, the newly created Buffer will share
8220
+ * the same allocated memory as the TypedArray. The optional `byteOffset` and `length` arguments specify a memory
8221
+ * range within the `arrayBuffer` that will be shared by the Buffer.
8222
+ *
8223
+ * @param buffer The .buffer property of a TypedArray or a new ArrayBuffer().
8224
+ * @param byteOffset
8225
+ * @param length
8226
+ */
8227
+ constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number);
8228
+ /**
8229
+ * Return JSON representation of the buffer.
8230
+ */
8231
+ toJSON(): {
8232
+ type: 'Buffer';
8233
+ data: number[];
8234
+ };
8235
+ /**
8236
+ * Writes `string` to the buffer at `offset` according to the character encoding in `encoding`. The `length`
8237
+ * parameter is the number of bytes to write. If the buffer does not contain enough space to fit the entire string,
8238
+ * only part of `string` will be written. However, partially encoded characters will not be written.
8239
+ *
8240
+ * @param string String to write to `buf`.
8241
+ * @param encoding The character encoding of `string`. Default: `utf8`.
8242
+ */
8243
+ write(string: string, encoding?: Encoding): number;
8244
+ /**
8245
+ * Writes `string` to the buffer at `offset` according to the character encoding in `encoding`. The `length`
8246
+ * parameter is the number of bytes to write. If the buffer does not contain enough space to fit the entire string,
8247
+ * only part of `string` will be written. However, partially encoded characters will not be written.
8248
+ *
8249
+ * @param string String to write to `buf`.
8250
+ * @param offset Number of bytes to skip before starting to write `string`. Default: `0`.
8251
+ * @param length Maximum number of bytes to write: Default: `buf.length - offset`.
8252
+ * @param encoding The character encoding of `string`. Default: `utf8`.
8253
+ */
8254
+ write(string: string, offset?: number, length?: number, encoding?: Encoding): number;
8255
+ /**
8256
+ * Decodes the buffer to a string according to the specified character encoding.
8257
+ * Passing `start` and `end` will decode only a subset of the buffer.
8258
+ *
8259
+ * Note that if the encoding is `utf8` and a byte sequence in the input is not valid UTF-8, then each invalid byte
8260
+ * will be replaced with `U+FFFD`.
8261
+ *
8262
+ * @param encoding
8263
+ * @param start
8264
+ * @param end
8265
+ */
8266
+ toString(encoding?: Encoding, start?: number, end?: number): string;
8267
+ /**
8268
+ * Returns true if this buffer's is equal to the provided buffer, meaning they share the same exact data.
8269
+ *
8270
+ * @param otherBuffer
8271
+ */
8272
+ equals(otherBuffer: Buffer): boolean;
8273
+ /**
8274
+ * Compares the buffer with `otherBuffer` and returns a number indicating whether the buffer comes before, after,
8275
+ * or is the same as `otherBuffer` in sort order. Comparison is based on the actual sequence of bytes in each
8276
+ * buffer.
8277
+ *
8278
+ * - `0` is returned if `otherBuffer` is the same as this buffer.
8279
+ * - `1` is returned if `otherBuffer` should come before this buffer when sorted.
8280
+ * - `-1` is returned if `otherBuffer` should come after this buffer when sorted.
8281
+ *
8282
+ * @param otherBuffer The buffer to compare to.
8283
+ * @param targetStart The offset within `otherBuffer` at which to begin comparison.
8284
+ * @param targetEnd The offset within `otherBuffer` at which to end comparison (exclusive).
8285
+ * @param sourceStart The offset within this buffer at which to begin comparison.
8286
+ * @param sourceEnd The offset within this buffer at which to end the comparison (exclusive).
8287
+ */
8288
+ compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
8289
+ /**
8290
+ * Copies data from a region of this buffer to a region in `targetBuffer`, even if the `targetBuffer` memory
8291
+ * region overlaps with this buffer.
8292
+ *
8293
+ * @param targetBuffer The target buffer to copy into.
8294
+ * @param targetStart The offset within `targetBuffer` at which to begin writing.
8295
+ * @param sourceStart The offset within this buffer at which to begin copying.
8296
+ * @param sourceEnd The offset within this buffer at which to end copying (exclusive).
8297
+ */
8298
+ copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
8299
+ /**
8300
+ * Returns a new `Buffer` that references the same memory as the original, but offset and cropped by the `start`
8301
+ * and `end` indices. This is the same behavior as `buf.subarray()`.
8302
+ *
8303
+ * This method is not compatible with the `Uint8Array.prototype.slice()`, which is a superclass of Buffer. To copy
8304
+ * the slice, use `Uint8Array.prototype.slice()`.
8305
+ *
8306
+ * @param start
8307
+ * @param end
8308
+ */
8309
+ slice(start?: number, end?: number): Buffer;
8310
+ /**
8311
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as little-endian. Supports up to 48 bits
8312
+ * of accuracy. Behavior is undefined when value is anything other than an unsigned integer.
8313
+ *
8314
+ * @param value Number to write.
8315
+ * @param offset Number of bytes to skip before starting to write.
8316
+ * @param byteLength Number of bytes to write, between 0 and 6.
8317
+ * @param noAssert
8318
+ * @returns `offset` plus the number of bytes written.
8319
+ */
8320
+ writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
8321
+ /**
8322
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as big-endian. Supports up to 48 bits of
8323
+ * accuracy. Behavior is undefined when `value` is anything other than an unsigned integer.
8324
+ *
8325
+ * @param value Number to write.
8326
+ * @param offset Number of bytes to skip before starting to write.
8327
+ * @param byteLength Number of bytes to write, between 0 and 6.
8328
+ * @param noAssert
8329
+ * @returns `offset` plus the number of bytes written.
8330
+ */
8331
+ writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
8332
+ /**
8333
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as little-endian. Supports up to 48 bits
8334
+ * of accuracy. Behavior is undefined when `value` is anything other than a signed integer.
8335
+ *
8336
+ * @param value Number to write.
8337
+ * @param offset Number of bytes to skip before starting to write.
8338
+ * @param byteLength Number of bytes to write, between 0 and 6.
8339
+ * @param noAssert
8340
+ * @returns `offset` plus the number of bytes written.
8341
+ */
8342
+ writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
8343
+ /**
8344
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as big-endian. Supports up to 48 bits
8345
+ * of accuracy. Behavior is undefined when `value` is anything other than a signed integer.
8346
+ *
8347
+ * @param value Number to write.
8348
+ * @param offset Number of bytes to skip before starting to write.
8349
+ * @param byteLength Number of bytes to write, between 0 and 6.
8350
+ * @param noAssert
8351
+ * @returns `offset` plus the number of bytes written.
8352
+ */
8353
+ writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
8354
+ /**
8355
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an
8356
+ * unsigned, little-endian integer supporting up to 48 bits of accuracy.
8357
+ *
8358
+ * @param offset Number of bytes to skip before starting to read.
8359
+ * @param byteLength Number of bytes to read, between 0 and 6.
8360
+ * @param noAssert
8361
+ */
8362
+ readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
8363
+ /**
8364
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an
8365
+ * unsigned, big-endian integer supporting up to 48 bits of accuracy.
8366
+ *
8367
+ * @param offset Number of bytes to skip before starting to read.
8368
+ * @param byteLength Number of bytes to read, between 0 and 6.
8369
+ * @param noAssert
8370
+ */
8371
+ readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
8372
+ /**
8373
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a
8374
+ * little-endian, two's complement signed value supporting up to 48 bits of accuracy.
8375
+ *
8376
+ * @param offset Number of bytes to skip before starting to read.
8377
+ * @param byteLength Number of bytes to read, between 0 and 6.
8378
+ * @param noAssert
8379
+ */
8380
+ readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
8381
+ /**
8382
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a
8383
+ * big-endian, two's complement signed value supporting up to 48 bits of accuracy.
8384
+ *
8385
+ * @param offset Number of bytes to skip before starting to read.
8386
+ * @param byteLength Number of bytes to read, between 0 and 6.
8387
+ * @param noAssert
8388
+ */
8389
+ readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
8390
+ /**
8391
+ * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
8392
+ *
8393
+ * @param offset Number of bytes to skip before starting to read.
8394
+ * @param noAssert
8395
+ */
8396
+ readUInt8(offset: number, noAssert?: boolean): number;
8397
+ /**
8398
+ * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`.
8399
+ *
8400
+ * @param offset Number of bytes to skip before starting to read.
8401
+ * @param noAssert
8402
+ */
8403
+ readUInt16LE(offset: number, noAssert?: boolean): number;
8404
+ /**
8405
+ * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified `offset`.
8406
+ *
8407
+ * @param offset Number of bytes to skip before starting to read.
8408
+ * @param noAssert
8409
+ */
8410
+ readUInt16BE(offset: number, noAssert?: boolean): number;
8411
+ /**
8412
+ * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified `offset`.
8413
+ *
8414
+ * @param offset Number of bytes to skip before starting to read.
8415
+ * @param noAssert
8416
+ */
8417
+ readUInt32LE(offset: number, noAssert?: boolean): number;
8418
+ /**
8419
+ * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified `offset`.
8420
+ *
8421
+ * @param offset Number of bytes to skip before starting to read.
8422
+ * @param noAssert
8423
+ */
8424
+ readUInt32BE(offset: number, noAssert?: boolean): number;
8425
+ /**
8426
+ * Reads a signed 8-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer` are interpreted
8427
+ * as two's complement signed values.
8428
+ *
8429
+ * @param offset Number of bytes to skip before starting to read.
8430
+ * @param noAssert
8431
+ */
8432
+ readInt8(offset: number, noAssert?: boolean): number;
8433
+ /**
8434
+ * Reads a signed, little-endian 16-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer`
8435
+ * are interpreted as two's complement signed values.
8436
+ *
8437
+ * @param offset Number of bytes to skip before starting to read.
8438
+ * @param noAssert
8439
+ */
8440
+ readInt16LE(offset: number, noAssert?: boolean): number;
8441
+ /**
8442
+ * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer`
8443
+ * are interpreted as two's complement signed values.
8444
+ *
8445
+ * @param offset Number of bytes to skip before starting to read.
8446
+ * @param noAssert
8447
+ */
8448
+ readInt16BE(offset: number, noAssert?: boolean): number;
8449
+ /**
8450
+ * Reads a signed, little-endian 32-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer`
8451
+ * are interpreted as two's complement signed values.
8452
+ *
8453
+ * @param offset Number of bytes to skip before starting to read.
8454
+ * @param noAssert
8455
+ */
8456
+ readInt32LE(offset: number, noAssert?: boolean): number;
8457
+ /**
8458
+ * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer`
8459
+ * are interpreted as two's complement signed values.
8460
+ *
8461
+ * @param offset Number of bytes to skip before starting to read.
8462
+ * @param noAssert
8463
+ */
8464
+ readInt32BE(offset: number, noAssert?: boolean): number;
8465
+ /**
8466
+ * Interprets `buf` as an array of unsigned 16-bit integers and swaps the byte order in-place.
8467
+ * Throws a `RangeError` if `buf.length` is not a multiple of 2.
8468
+ */
8469
+ swap16(): Buffer;
8470
+ /**
8471
+ * Interprets `buf` as an array of unsigned 32-bit integers and swaps the byte order in-place.
8472
+ * Throws a `RangeError` if `buf.length` is not a multiple of 4.
8473
+ */
8474
+ swap32(): Buffer;
8475
+ /**
8476
+ * Interprets `buf` as an array of unsigned 64-bit integers and swaps the byte order in-place.
8477
+ * Throws a `RangeError` if `buf.length` is not a multiple of 8.
8478
+ */
8479
+ swap64(): Buffer;
8480
+ /**
8481
+ * Swaps two octets.
8482
+ *
8483
+ * @param b
8484
+ * @param n
8485
+ * @param m
8486
+ */
8487
+ private _swap;
8488
+ /**
8489
+ * Writes `value` to `buf` at the specified `offset`. The `value` must be a valid unsigned 8-bit integer.
8490
+ * Behavior is undefined when `value` is anything other than an unsigned 8-bit integer.
8491
+ *
8492
+ * @param value Number to write.
8493
+ * @param offset Number of bytes to skip before starting to write.
8494
+ * @param noAssert
8495
+ * @returns `offset` plus the number of bytes written.
8496
+ */
8497
+ writeUInt8(value: number, offset: number, noAssert?: boolean): number;
8498
+ /**
8499
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit
8500
+ * integer. Behavior is undefined when `value` is anything other than an unsigned 16-bit integer.
8501
+ *
8502
+ * @param value Number to write.
8503
+ * @param offset Number of bytes to skip before starting to write.
8504
+ * @param noAssert
8505
+ * @returns `offset` plus the number of bytes written.
8506
+ */
8507
+ writeUInt16LE(value: number | string, offset: number, noAssert?: boolean): number;
8508
+ /**
8509
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit
8510
+ * integer. Behavior is undefined when `value` is anything other than an unsigned 16-bit integer.
8511
+ *
8512
+ * @param value Number to write.
8513
+ * @param offset Number of bytes to skip before starting to write.
8514
+ * @param noAssert
8515
+ * @returns `offset` plus the number of bytes written.
8516
+ */
8517
+ writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
8518
+ /**
8519
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit
8520
+ * integer. Behavior is undefined when `value` is anything other than an unsigned 32-bit integer.
8521
+ *
8522
+ * @param value Number to write.
8523
+ * @param offset Number of bytes to skip before starting to write.
8524
+ * @param noAssert
8525
+ * @returns `offset` plus the number of bytes written.
8526
+ */
8527
+ writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
8528
+ /**
8529
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit
8530
+ * integer. Behavior is undefined when `value` is anything other than an unsigned 32-bit integer.
8531
+ *
8532
+ * @param value Number to write.
8533
+ * @param offset Number of bytes to skip before starting to write.
8534
+ * @param noAssert
8535
+ * @returns `offset` plus the number of bytes written.
8536
+ */
8537
+ writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
8538
+ /**
8539
+ * Writes `value` to `buf` at the specified `offset`. The `value` must be a valid signed 8-bit integer.
8540
+ * Behavior is undefined when `value` is anything other than a signed 8-bit integer.
8541
+ *
8542
+ * @param value Number to write.
8543
+ * @param offset Number of bytes to skip before starting to write.
8544
+ * @param noAssert
8545
+ * @returns `offset` plus the number of bytes written.
8546
+ */
8547
+ writeInt8(value: number, offset: number, noAssert?: boolean): number;
8548
+ /**
8549
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit
8550
+ * integer. Behavior is undefined when `value` is anything other than a signed 16-bit integer.
8551
+ *
8552
+ * @param value Number to write.
8553
+ * @param offset Number of bytes to skip before starting to write.
8554
+ * @param noAssert
8555
+ * @returns `offset` plus the number of bytes written.
8556
+ */
8557
+ writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
8558
+ /**
8559
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit
8560
+ * integer. Behavior is undefined when `value` is anything other than a signed 16-bit integer.
8561
+ *
8562
+ * @param value Number to write.
8563
+ * @param offset Number of bytes to skip before starting to write.
8564
+ * @param noAssert
8565
+ * @returns `offset` plus the number of bytes written.
8566
+ */
8567
+ writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
8568
+ /**
8569
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit
8570
+ * integer. Behavior is undefined when `value` is anything other than a signed 32-bit integer.
8571
+ *
8572
+ * @param value Number to write.
8573
+ * @param offset Number of bytes to skip before starting to write.
8574
+ * @param noAssert
8575
+ * @returns `offset` plus the number of bytes written.
8576
+ */
8577
+ writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
8578
+ /**
8579
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit
8580
+ * integer. Behavior is undefined when `value` is anything other than a signed 32-bit integer.
8581
+ *
8582
+ * @param value Number to write.
8583
+ * @param offset Number of bytes to skip before starting to write.
8584
+ * @param noAssert
8585
+ * @returns `offset` plus the number of bytes written.
8586
+ */
8587
+ writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
8588
+ /**
8589
+ * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, the entire `buf` will be
8590
+ * filled. The `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or integer. If the resulting
8591
+ * integer is greater than `255` (decimal), then `buf` will be filled with `value & 255`.
8592
+ *
8593
+ * If the final write of a `fill()` operation falls on a multi-byte character, then only the bytes of that
8594
+ * character that fit into `buf` are written.
8595
+ *
8596
+ * If `value` contains invalid characters, it is truncated; if no valid fill data remains, an exception is thrown.
8597
+ *
8598
+ * @param value
8599
+ * @param encoding
8600
+ */
8601
+ fill(value: any, offset?: number, end?: number, encoding?: Encoding): this;
8602
+ /**
8603
+ * Returns the index of the specified value.
8604
+ *
8605
+ * If `value` is:
8606
+ * - a string, `value` is interpreted according to the character encoding in `encoding`.
8607
+ * - a `Buffer` or `Uint8Array`, `value` will be used in its entirety. To compare a partial Buffer, use `slice()`.
8608
+ * - a number, `value` will be interpreted as an unsigned 8-bit integer value between `0` and `255`.
8609
+ *
8610
+ * Any other types will throw a `TypeError`.
8611
+ *
8612
+ * @param value What to search for.
8613
+ * @param byteOffset Where to begin searching in `buf`. If negative, then calculated from the end.
8614
+ * @param encoding If `value` is a string, this is the encoding used to search.
8615
+ * @returns The index of the first occurrence of `value` in `buf`, or `-1` if not found.
8616
+ */
8617
+ indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: Encoding): number;
8618
+ /**
8619
+ * Gets the last index of the specified value.
8620
+ *
8621
+ * @see indexOf()
8622
+ * @param value
8623
+ * @param byteOffset
8624
+ * @param encoding
8625
+ */
8626
+ lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: Encoding): number;
8627
+ private _bidirectionalIndexOf;
8628
+ /**
8629
+ * Equivalent to `buf.indexOf() !== -1`.
8630
+ *
8631
+ * @param value
8632
+ * @param byteOffset
8633
+ * @param encoding
8634
+ */
8635
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: Encoding): boolean;
8636
+ /**
8637
+ * Allocates a new Buffer using an `array` of octet values.
8638
+ *
8639
+ * @param array
8640
+ */
8641
+ static from(array: number[]): Buffer;
8642
+ /**
8643
+ * When passed a reference to the .buffer property of a TypedArray instance, the newly created Buffer will share
8644
+ * the same allocated memory as the TypedArray. The optional `byteOffset` and `length` arguments specify a memory
8645
+ * range within the `arrayBuffer` that will be shared by the Buffer.
8646
+ *
8647
+ * @param buffer The .buffer property of a TypedArray or a new ArrayBuffer().
8648
+ * @param byteOffset
8649
+ * @param length
8650
+ */
8651
+ static from(buffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
8652
+ /**
8653
+ * Copies the passed `buffer` data onto a new Buffer instance.
8654
+ *
8655
+ * @param buffer
8656
+ */
8657
+ static from(buffer: Buffer | Uint8Array): Buffer;
8658
+ /**
8659
+ * Creates a new Buffer containing the given string `str`. If provided, the `encoding` parameter identifies the
8660
+ * character encoding.
8661
+ *
8662
+ * @param str String to store in buffer.
8663
+ * @param encoding Encoding to use, optional. Default is `utf8`.
8664
+ */
8665
+ static from(str: string, encoding?: Encoding): Buffer;
8666
+ /**
8667
+ * Returns true if `obj` is a Buffer.
8668
+ *
8669
+ * @param obj
8670
+ */
8671
+ static isBuffer(obj: any): obj is Buffer;
8672
+ /**
8673
+ * Returns true if `encoding` is a supported encoding.
8674
+ *
8675
+ * @param encoding
8676
+ */
8677
+ static isEncoding(encoding: string): encoding is Encoding;
8678
+ /**
8679
+ * Gives the actual byte length of a string for an encoding. This is not the same as `string.length` since that
8680
+ * returns the number of characters in the string.
8681
+ *
8682
+ * @param string The string to test.
8683
+ * @param encoding The encoding to use for calculation. Defaults is `utf8`.
8684
+ */
8685
+ static byteLength(string: string | Buffer | ArrayBuffer, encoding?: Encoding): number;
8686
+ /**
8687
+ * Returns a Buffer which is the result of concatenating all the buffers in the list together.
8688
+ *
8689
+ * - If the list has no items, or if the `totalLength` is 0, then it returns a zero-length buffer.
8690
+ * - If the list has exactly one item, then the first item is returned.
8691
+ * - If the list has more than one item, then a new buffer is created.
8692
+ *
8693
+ * It is faster to provide the `totalLength` if it is known. However, it will be calculated if not provided at
8694
+ * a small computational expense.
8695
+ *
8696
+ * @param list An array of Buffer objects to concatenate.
8697
+ * @param totalLength Total length of the buffers when concatenated.
8698
+ */
8699
+ static concat(list: Uint8Array[], totalLength?: number): Buffer;
8700
+ /**
8701
+ * The same as `buf1.compare(buf2)`.
8702
+ */
8703
+ static compare(buf1: Uint8Array, buf2: Uint8Array): number;
8704
+ /**
8705
+ * Allocates a new buffer of `size` octets.
8706
+ *
8707
+ * @param size The number of octets to allocate.
8708
+ * @param fill If specified, the buffer will be initialized by calling `buf.fill(fill)`, or with zeroes otherwise.
8709
+ * @param encoding The encoding used for the call to `buf.fill()` while initializing.
8710
+ */
8711
+ static alloc(size: number, fill?: string | Buffer | number, encoding?: Encoding): Buffer;
8712
+ /**
8713
+ * Allocates a new buffer of `size` octets without initializing memory. The contents of the buffer are unknown.
8714
+ *
8715
+ * @param size
8716
+ */
8717
+ static allocUnsafe(size: number): Buffer;
8718
+ /**
8719
+ * Returns true if the given `obj` is an instance of `type`.
8720
+ *
8721
+ * @param obj
8722
+ * @param type
8723
+ */
8724
+ private static _isInstance;
8725
+ private static _checked;
8726
+ private static _blitBuffer;
8727
+ private static _utf8Write;
8728
+ private static _asciiWrite;
8729
+ private static _base64Write;
8730
+ private static _ucs2Write;
8731
+ private static _hexWrite;
8732
+ private static _utf8ToBytes;
8733
+ private static _base64ToBytes;
8734
+ private static _asciiToBytes;
8735
+ private static _utf16leToBytes;
8736
+ private static _hexSlice;
8737
+ private static _base64Slice;
8738
+ private static _utf8Slice;
8739
+ private static _decodeCodePointsArray;
8740
+ private static _asciiSlice;
8741
+ private static _latin1Slice;
8742
+ private static _utf16leSlice;
8743
+ private static _arrayIndexOf;
8744
+ private static _checkOffset;
8745
+ private static _checkInt;
8746
+ private static _getEncoding;
8747
+ }
8748
+ /**
8749
+ * The encodings that are supported in both native and polyfilled `Buffer` instances.
8750
+ */
8751
+ type Encoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'binary' | 'hex' | 'latin1' | 'base64';
8752
+
7823
8753
  type XataFileEditableFields = Partial<Pick<XataArrayFile, keyof InputFileEntry>>;
7824
8754
  type XataFileFields = Partial<Pick<XataArrayFile, {
7825
8755
  [K in StringKeys<XataArrayFile>]: XataArrayFile[K] extends Function ? never : K;
@@ -8343,7 +9273,8 @@ declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends X
8343
9273
  constructor(db: SchemaPluginResult<Schemas>);
8344
9274
  build(pluginOptions: XataPluginOptions): SearchPluginResult<Schemas>;
8345
9275
  }
8346
- type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
9276
+ type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata' | 'xata'> & {
9277
+ xata: XataRecordMetadata & SearchExtraProperties;
8347
9278
  getMetadata: () => XataRecordMetadata & SearchExtraProperties;
8348
9279
  };
8349
9280
  type SearchExtraProperties = {
@@ -8664,7 +9595,7 @@ type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions |
8664
9595
  declare class Query<Record extends XataRecord, Result extends XataRecord = Record> implements Paginable<Record, Result> {
8665
9596
  #private;
8666
9597
  readonly meta: PaginationQueryMeta;
8667
- readonly records: RecordArray<Result>;
9598
+ readonly records: PageRecordArray<Result>;
8668
9599
  constructor(repository: RestRepository<Record> | null, table: {
8669
9600
  name: string;
8670
9601
  schema?: Table;
@@ -8792,25 +9723,25 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
8792
9723
  * Performs the query in the database and returns a set of results.
8793
9724
  * @returns An array of records from the database.
8794
9725
  */
8795
- getMany(): Promise<RecordArray<Result>>;
9726
+ getMany(): Promise<PageRecordArray<Result>>;
8796
9727
  /**
8797
9728
  * Performs the query in the database and returns a set of results.
8798
9729
  * @param options Additional options to be used when performing the query.
8799
9730
  * @returns An array of records from the database.
8800
9731
  */
8801
- getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
9732
+ getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<PageRecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
8802
9733
  /**
8803
9734
  * Performs the query in the database and returns a set of results.
8804
9735
  * @param options Additional options to be used when performing the query.
8805
9736
  * @returns An array of records from the database.
8806
9737
  */
8807
- getMany(options: OmitBy<QueryOptions<Record>, 'columns'>): Promise<RecordArray<Result>>;
9738
+ getMany(options: OmitBy<QueryOptions<Record>, 'columns'>): Promise<PageRecordArray<Result>>;
8808
9739
  /**
8809
9740
  * Performs the query in the database and returns all the results.
8810
9741
  * Warning: If there are a large number of results, this method can have performance implications.
8811
9742
  * @returns An array of records from the database.
8812
9743
  */
8813
- getAll(): Promise<Result[]>;
9744
+ getAll(): Promise<RecordArray<Result>>;
8814
9745
  /**
8815
9746
  * Performs the query in the database and returns all the results.
8816
9747
  * Warning: If there are a large number of results, this method can have performance implications.
@@ -8819,7 +9750,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
8819
9750
  */
8820
9751
  getAll<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
8821
9752
  batchSize?: number;
8822
- }>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>[]>;
9753
+ }>(options: Options): Promise<RecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
8823
9754
  /**
8824
9755
  * Performs the query in the database and returns all the results.
8825
9756
  * Warning: If there are a large number of results, this method can have performance implications.
@@ -8828,7 +9759,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
8828
9759
  */
8829
9760
  getAll(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'> & {
8830
9761
  batchSize?: number;
8831
- }): Promise<Result[]>;
9762
+ }): Promise<RecordArray<Result>>;
8832
9763
  /**
8833
9764
  * Performs the query in the database and returns the first result.
8834
9765
  * @returns The first record that matches the query, or null if no record matched the query.
@@ -8912,7 +9843,7 @@ type PaginationQueryMeta = {
8912
9843
  };
8913
9844
  interface Paginable<Record extends XataRecord, Result extends XataRecord = Record> {
8914
9845
  meta: PaginationQueryMeta;
8915
- records: RecordArray<Result>;
9846
+ records: PageRecordArray<Result>;
8916
9847
  nextPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
8917
9848
  previousPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
8918
9849
  startPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
@@ -8932,7 +9863,7 @@ declare class Page<Record extends XataRecord, Result extends XataRecord = Record
8932
9863
  /**
8933
9864
  * The set of results for this page.
8934
9865
  */
8935
- readonly records: RecordArray<Result>;
9866
+ readonly records: PageRecordArray<Result>;
8936
9867
  constructor(query: Query<Record, Result>, meta: PaginationQueryMeta, records?: Result[]);
8937
9868
  /**
8938
9869
  * Retrieves the next page of results.
@@ -8986,6 +9917,14 @@ declare const PAGINATION_MAX_OFFSET = 49000;
8986
9917
  declare const PAGINATION_DEFAULT_OFFSET = 0;
8987
9918
  declare function isCursorPaginationOptions(options: Record<string, unknown> | undefined | null): options is CursorNavigationOptions;
8988
9919
  declare class RecordArray<Result extends XataRecord> extends Array<Result> {
9920
+ constructor(overrideRecords?: Result[]);
9921
+ static parseConstructorParams(...args: any[]): any[];
9922
+ toArray(): Result[];
9923
+ toSerializable(): JSONData<Result>[];
9924
+ toString(): string;
9925
+ map<U>(callbackfn: (value: Result, index: number, array: Result[]) => U, thisArg?: any): U[];
9926
+ }
9927
+ declare class PageRecordArray<Result extends XataRecord> extends Array<Result> {
8989
9928
  #private;
8990
9929
  constructor(page: Paginable<any, Result>, overrideRecords?: Result[]);
8991
9930
  static parseConstructorParams(...args: any[]): any[];
@@ -8998,25 +9937,25 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
8998
9937
  *
8999
9938
  * @returns A new array of objects
9000
9939
  */
9001
- nextPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9940
+ nextPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
9002
9941
  /**
9003
9942
  * Retrieve previous page of records
9004
9943
  *
9005
9944
  * @returns A new array of objects
9006
9945
  */
9007
- previousPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9946
+ previousPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
9008
9947
  /**
9009
9948
  * Retrieve start page of records
9010
9949
  *
9011
9950
  * @returns A new array of objects
9012
9951
  */
9013
- startPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9952
+ startPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
9014
9953
  /**
9015
9954
  * Retrieve end page of records
9016
9955
  *
9017
9956
  * @returns A new array of objects
9018
9957
  */
9019
- endPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9958
+ endPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
9020
9959
  /**
9021
9960
  * @returns Boolean indicating if there is a next page
9022
9961
  */
@@ -9753,7 +10692,7 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
9753
10692
  } : {
9754
10693
  [K in PropertyName]?: InnerType<Type, Tables, LinkedTable> | null;
9755
10694
  } : never : never;
9756
- type InnerType<Type, 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 'vector' ? number[] : Type extends 'file' ? XataFile : Type extends 'file[]' ? XataArrayFile[] : Type extends 'json' ? JSONValue<any> : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never;
10695
+ type InnerType<Type, Tables, LinkedTable> = Type extends 'string' | 'text' | 'email' | 'character' | 'varchar' | 'character varying' | `varchar(${number})` | `character(${number})` ? string : Type extends 'int' | 'float' | 'bigint' | 'int8' | 'integer' | 'int4' | 'smallint' | 'double precision' | 'float8' | 'real' | 'numeric' ? number : Type extends 'bool' | 'boolean' ? boolean : Type extends 'datetime' | 'timestamptz' ? Date : Type extends 'multiple' | 'text[]' ? string[] : Type extends 'vector' | 'real[]' | 'float[]' | 'double precision[]' | 'float8[]' | 'numeric[]' ? number[] : Type extends 'int[]' | 'bigint[]' | 'int8[]' | 'integer[]' | 'int4[]' | 'smallint[]' ? number[] : Type extends 'bool[]' | 'boolean[]' ? boolean[] : Type extends 'file' | 'xata_file' ? XataFile : Type extends 'file[]' | 'xata_file_array' ? XataArrayFile[] : Type extends 'json' | 'jsonb' ? JSONValue<any> : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : string;
9757
10696
 
9758
10697
  /**
9759
10698
  * Operator to restrict results to only values that are greater than the given value.
@@ -9806,11 +10745,11 @@ declare const le: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
9806
10745
  /**
9807
10746
  * Operator to restrict results to only values that are not null.
9808
10747
  */
9809
- declare const exists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
10748
+ declare const exists: <T>(column?: FilterColumns<T>) => ExistanceFilter<T>;
9810
10749
  /**
9811
10750
  * Operator to restrict results to only values that are null.
9812
10751
  */
9813
- declare const notExists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
10752
+ declare const notExists: <T>(column?: FilterColumns<T>) => ExistanceFilter<T>;
9814
10753
  /**
9815
10754
  * Operator to restrict results to only values that start with the given prefix.
9816
10755
  */
@@ -9932,11 +10871,43 @@ type SQLQueryParams<T = any[]> = {
9932
10871
  params?: T;
9933
10872
  /**
9934
10873
  * The consistency level to use when executing the query.
10874
+ * @default 'strong'
10875
+ */
10876
+ consistency?: 'strong' | 'eventual';
10877
+ /**
10878
+ * The response type to use when executing the query.
10879
+ * @default 'json'
10880
+ */
10881
+ responseType?: 'json' | 'array';
10882
+ };
10883
+ type SQLBatchQuery = {
10884
+ /**
10885
+ * The SQL statements to execute.
10886
+ */
10887
+ statements: {
10888
+ /**
10889
+ * The SQL statement to execute.
10890
+ */
10891
+ statement: string;
10892
+ /**
10893
+ * The parameters to pass to the SQL statement.
10894
+ */
10895
+ params?: any[];
10896
+ }[];
10897
+ /**
10898
+ * The consistency level to use when executing the queries.
10899
+ * @default 'strong'
9935
10900
  */
9936
10901
  consistency?: 'strong' | 'eventual';
10902
+ /**
10903
+ * The response type to use when executing the queries.
10904
+ * @default 'json'
10905
+ */
10906
+ responseType?: 'json' | 'array';
9937
10907
  };
9938
10908
  type SQLQuery = TemplateStringsArray | SQLQueryParams;
9939
- type SQLQueryResult<T> = {
10909
+ type SQLResponseType = 'json' | 'array';
10910
+ type SQLQueryResultJSON<T> = {
9940
10911
  /**
9941
10912
  * The records returned by the query.
9942
10913
  */
@@ -9944,15 +10915,49 @@ type SQLQueryResult<T> = {
9944
10915
  /**
9945
10916
  * The columns metadata returned by the query.
9946
10917
  */
9947
- columns?: Record<string, {
9948
- type_name: string;
10918
+ columns: Array<{
10919
+ name: string;
10920
+ type: string;
10921
+ }>;
10922
+ /**
10923
+ * Optional warning message returned by the query.
10924
+ */
10925
+ warning?: string;
10926
+ };
10927
+ type SQLQueryResultArray = {
10928
+ /**
10929
+ * The records returned by the query.
10930
+ */
10931
+ rows: any[][];
10932
+ /**
10933
+ * The columns metadata returned by the query.
10934
+ */
10935
+ columns: Array<{
10936
+ name: string;
10937
+ type: string;
9949
10938
  }>;
9950
10939
  /**
9951
10940
  * Optional warning message returned by the query.
9952
10941
  */
9953
10942
  warning?: string;
9954
10943
  };
9955
- type SQLPluginResult = <T>(query: SQLQuery, ...parameters: any[]) => Promise<SQLQueryResult<T>>;
10944
+ type SQLQueryResult<T, Mode extends SQLResponseType = 'json'> = Mode extends 'json' ? SQLQueryResultJSON<T> : Mode extends 'array' ? SQLQueryResultArray : never;
10945
+ type SQLPluginFunction = <T, Query extends SQLQuery = SQLQuery>(query: Query, ...parameters: any[]) => Promise<SQLQueryResult<T, Query extends SQLQueryParams<any> ? Query['responseType'] extends SQLResponseType ? NonNullable<Query['responseType']> : 'json' : 'json'>>;
10946
+ type SQLPluginResult = SQLPluginFunction & {
10947
+ /**
10948
+ * Connection string to use when connecting to the database.
10949
+ * It includes the workspace, region, database and branch.
10950
+ * Connects with the same credentials as the Xata client.
10951
+ */
10952
+ connectionString: string;
10953
+ /**
10954
+ * Executes a batch of SQL statements.
10955
+ * @param query The batch of SQL statements to execute.
10956
+ */
10957
+ batch: <Query extends SQLBatchQuery = SQLBatchQuery>(query: Query) => Promise<{
10958
+ results: Array<SQLQueryResult<any, Query extends SQLBatchQuery ? Query['responseType'] extends SQLResponseType ? NonNullable<Query['responseType']> : 'json' : 'json'>>;
10959
+ }>;
10960
+ };
9956
10961
  declare class SQLPlugin extends XataPlugin {
9957
10962
  build(pluginOptions: XataPluginOptions): SQLPluginResult;
9958
10963
  }
@@ -10068,7 +11073,7 @@ type BaseClientOptions = {
10068
11073
  clientName?: string;
10069
11074
  xataAgentExtra?: Record<string, string>;
10070
11075
  };
10071
- declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
11076
+ declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins) => ClientConstructor<Plugins>;
10072
11077
  interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
10073
11078
  new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
10074
11079
  db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
@@ -10119,4 +11124,4 @@ declare class XataError extends Error {
10119
11124
  constructor(message: string, status: number);
10120
11125
  }
10121
11126
 
10122
- export { type AcceptWorkspaceMemberInviteError, type AcceptWorkspaceMemberInvitePathParams, type AcceptWorkspaceMemberInviteVariables, type AddGitBranchesEntryError, type AddGitBranchesEntryPathParams, type AddGitBranchesEntryRequestBody, type AddGitBranchesEntryResponse, type AddGitBranchesEntryVariables, type AddTableColumnError, type AddTableColumnPathParams, type AddTableColumnVariables, type AggregateTableError, type AggregateTablePathParams, type AggregateTableRequestBody, type AggregateTableVariables, type ApiExtraProps, type ApplyBranchSchemaEditError, type ApplyBranchSchemaEditPathParams, type ApplyBranchSchemaEditRequestBody, type ApplyBranchSchemaEditVariables, type ApplyMigrationError, type ApplyMigrationPathParams, type ApplyMigrationRequestBody, type ApplyMigrationVariables, type AskOptions, type AskResult, type AskTableError, type AskTablePathParams, type AskTableRequestBody, type AskTableResponse, type AskTableSessionError, type AskTableSessionPathParams, type AskTableSessionRequestBody, type AskTableSessionResponse, type AskTableSessionVariables, type AskTableVariables, BaseClient, type BaseClientOptions, type BaseData, type BaseSchema, type BinaryFile, type BranchTransactionError, type BranchTransactionPathParams, type BranchTransactionRequestBody, type BranchTransactionVariables, type BulkInsertTableRecordsError, type BulkInsertTableRecordsPathParams, type BulkInsertTableRecordsQueryParams, type BulkInsertTableRecordsRequestBody, type BulkInsertTableRecordsVariables, type CacheImpl, type CancelWorkspaceMemberInviteError, type CancelWorkspaceMemberInvitePathParams, type CancelWorkspaceMemberInviteVariables, type ClientConstructor, type ColumnsByValue, type CompareBranchSchemasError, type CompareBranchSchemasPathParams, type CompareBranchSchemasRequestBody, type CompareBranchSchemasVariables, type CompareBranchWithUserSchemaError, type CompareBranchWithUserSchemaPathParams, type CompareBranchWithUserSchemaRequestBody, type CompareBranchWithUserSchemaVariables, type CompareMigrationRequestError, type CompareMigrationRequestPathParams, type CompareMigrationRequestVariables, type CopyBranchError, type CopyBranchPathParams, type CopyBranchRequestBody, type CopyBranchVariables, type CreateBranchError, type CreateBranchPathParams, type CreateBranchQueryParams, type CreateBranchRequestBody, type CreateBranchResponse, type CreateBranchVariables, type CreateClusterError, type CreateClusterPathParams, type CreateClusterVariables, type CreateDatabaseError, type CreateDatabasePathParams, type CreateDatabaseRequestBody, type CreateDatabaseResponse, type CreateDatabaseVariables, type CreateMigrationRequestError, type CreateMigrationRequestPathParams, type CreateMigrationRequestRequestBody, type CreateMigrationRequestResponse, type CreateMigrationRequestVariables, type CreateTableError, type CreateTablePathParams, type CreateTableResponse, type CreateTableVariables, type CreateUserAPIKeyError, type CreateUserAPIKeyPathParams, type CreateUserAPIKeyResponse, type CreateUserAPIKeyVariables, type CreateWorkspaceError, type CreateWorkspaceVariables, type CursorNavigationOptions, type DeleteBranchError, type DeleteBranchPathParams, type DeleteBranchResponse, type DeleteBranchVariables, type DeleteColumnError, type DeleteColumnPathParams, type DeleteColumnVariables, type DeleteDatabaseError, type DeleteDatabaseGithubSettingsError, type DeleteDatabaseGithubSettingsPathParams, type DeleteDatabaseGithubSettingsVariables, type DeleteDatabasePathParams, type DeleteDatabaseResponse, type DeleteDatabaseVariables, type DeleteFileError, type DeleteFileItemError, type DeleteFileItemPathParams, type DeleteFileItemVariables, type DeleteFilePathParams, type DeleteFileVariables, type DeleteOAuthAccessTokenError, type DeleteOAuthAccessTokenPathParams, type DeleteOAuthAccessTokenVariables, type DeleteRecordError, type DeleteRecordPathParams, type DeleteRecordQueryParams, type DeleteRecordVariables, type DeleteTableError, type DeleteTablePathParams, type DeleteTableResponse, type DeleteTableVariables, type DeleteTransactionOperation, type DeleteUserAPIKeyError, type DeleteUserAPIKeyPathParams, type DeleteUserAPIKeyVariables, type DeleteUserError, type DeleteUserOAuthClientError, type DeleteUserOAuthClientPathParams, type DeleteUserOAuthClientVariables, type DeleteUserVariables, type DeleteWorkspaceError, type DeleteWorkspacePathParams, type DeleteWorkspaceVariables, type DeserializedType, type DownloadDestination, type EditableData, type ExecuteBranchMigrationPlanError, type ExecuteBranchMigrationPlanPathParams, type ExecuteBranchMigrationPlanRequestBody, type ExecuteBranchMigrationPlanVariables, type FetchImpl, FetcherError, type FetcherExtraProps, type FileAccessError, type FileAccessPathParams, type FileAccessQueryParams, type FileAccessVariables, type FileUploadError, type FileUploadPathParams, type FileUploadQueryParams, type FileUploadVariables, FilesPlugin, type FilesPluginResult, type GetAuthorizationCodeError, type GetAuthorizationCodeQueryParams, type GetAuthorizationCodeVariables, type GetBranchDetailsError, type GetBranchDetailsPathParams, type GetBranchDetailsVariables, type GetBranchListError, type GetBranchListPathParams, type GetBranchListVariables, type GetBranchMetadataError, type GetBranchMetadataPathParams, type GetBranchMetadataVariables, type GetBranchMigrationHistoryError, type GetBranchMigrationHistoryPathParams, type GetBranchMigrationHistoryRequestBody, type GetBranchMigrationHistoryResponse, type GetBranchMigrationHistoryVariables, type GetBranchMigrationPlanError, type GetBranchMigrationPlanPathParams, type GetBranchMigrationPlanVariables, type GetBranchSchemaHistoryError, type GetBranchSchemaHistoryPathParams, type GetBranchSchemaHistoryRequestBody, type GetBranchSchemaHistoryResponse, type GetBranchSchemaHistoryVariables, type GetBranchStatsError, type GetBranchStatsPathParams, type GetBranchStatsResponse, type GetBranchStatsVariables, type GetClusterError, type GetClusterPathParams, type GetClusterVariables, type GetColumnError, type GetColumnPathParams, type GetColumnVariables, type GetDatabaseGithubSettingsError, type GetDatabaseGithubSettingsPathParams, type GetDatabaseGithubSettingsVariables, type GetDatabaseListError, type GetDatabaseListPathParams, type GetDatabaseListVariables, type GetDatabaseMetadataError, type GetDatabaseMetadataPathParams, type GetDatabaseMetadataVariables, type GetFileError, type GetFileItemError, type GetFileItemPathParams, type GetFileItemVariables, type GetFilePathParams, type GetFileVariables, type GetGitBranchesMappingError, type GetGitBranchesMappingPathParams, type GetGitBranchesMappingVariables, type GetMigrationRequestError, type GetMigrationRequestIsMergedError, type GetMigrationRequestIsMergedPathParams, type GetMigrationRequestIsMergedResponse, type GetMigrationRequestIsMergedVariables, type GetMigrationRequestPathParams, type GetMigrationRequestVariables, type GetRecordError, type GetRecordPathParams, type GetRecordQueryParams, type GetRecordVariables, type GetSchemaError, type GetSchemaPathParams, type GetSchemaResponse, type GetSchemaVariables, type GetTableColumnsError, type GetTableColumnsPathParams, type GetTableColumnsResponse, type GetTableColumnsVariables, type GetTableSchemaError, type GetTableSchemaPathParams, type GetTableSchemaResponse, type GetTableSchemaVariables, type GetTransactionOperation, type GetUserAPIKeysError, type GetUserAPIKeysResponse, type GetUserAPIKeysVariables, type GetUserError, type GetUserOAuthAccessTokensError, type GetUserOAuthAccessTokensResponse, type GetUserOAuthAccessTokensVariables, type GetUserOAuthClientsError, type GetUserOAuthClientsResponse, type GetUserOAuthClientsVariables, type GetUserVariables, type GetWorkspaceError, type GetWorkspaceMembersListError, type GetWorkspaceMembersListPathParams, type GetWorkspaceMembersListVariables, type GetWorkspacePathParams, type GetWorkspaceVariables, type GetWorkspacesListError, type GetWorkspacesListResponse, type GetWorkspacesListVariables, type GrantAuthorizationCodeError, type GrantAuthorizationCodeVariables, type HostProvider, type Identifiable, type ImageTransformations, type InsertRecordError, type InsertRecordPathParams, type InsertRecordQueryParams, type InsertRecordVariables, type InsertRecordWithIDError, type InsertRecordWithIDPathParams, type InsertRecordWithIDQueryParams, type InsertRecordWithIDVariables, type InsertTransactionOperation, type InviteWorkspaceMemberError, type InviteWorkspaceMemberPathParams, type InviteWorkspaceMemberRequestBody, type InviteWorkspaceMemberVariables, type JSONData, type KeywordAskOptions, type Link, type ListClustersError, type ListClustersPathParams, type ListClustersQueryParams, type ListClustersVariables, type ListMigrationRequestsCommitsError, type ListMigrationRequestsCommitsPathParams, type ListMigrationRequestsCommitsRequestBody, type ListMigrationRequestsCommitsResponse, type ListMigrationRequestsCommitsVariables, type ListRegionsError, type ListRegionsPathParams, type ListRegionsVariables, type MergeMigrationRequestError, type MergeMigrationRequestPathParams, type MergeMigrationRequestVariables, type OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, type Paginable, type PaginationQueryMeta, type PgRollJobStatusError, type PgRollJobStatusPathParams, type PgRollJobStatusVariables, type PgRollMigrationHistoryError, type PgRollMigrationHistoryPathParams, type PgRollMigrationHistoryVariables, type PgRollStatusError, type PgRollStatusPathParams, type PgRollStatusVariables, type PreviewBranchSchemaEditError, type PreviewBranchSchemaEditPathParams, type PreviewBranchSchemaEditRequestBody, type PreviewBranchSchemaEditResponse, type PreviewBranchSchemaEditVariables, type PushBranchMigrationsError, type PushBranchMigrationsPathParams, type PushBranchMigrationsRequestBody, type PushBranchMigrationsVariables, type PutFileError, type PutFileItemError, type PutFileItemPathParams, type PutFileItemVariables, type PutFilePathParams, type PutFileVariables, Query, type QueryMigrationRequestsError, type QueryMigrationRequestsPathParams, type QueryMigrationRequestsRequestBody, type QueryMigrationRequestsResponse, type QueryMigrationRequestsVariables, type QueryTableError, type QueryTablePathParams, type QueryTableRequestBody, type QueryTableVariables, RecordArray, RecordColumnTypes, type RemoveGitBranchesEntryError, type RemoveGitBranchesEntryPathParams, type RemoveGitBranchesEntryQueryParams, type RemoveGitBranchesEntryVariables, type RemoveWorkspaceMemberError, type RemoveWorkspaceMemberPathParams, type RemoveWorkspaceMemberVariables, type RenameDatabaseError, type RenameDatabasePathParams, type RenameDatabaseRequestBody, type RenameDatabaseVariables, Repository, type ResendWorkspaceMemberInviteError, type ResendWorkspaceMemberInvitePathParams, type ResendWorkspaceMemberInviteVariables, type ResolveBranchError, type ResolveBranchPathParams, type ResolveBranchQueryParams, type ResolveBranchResponse, type ResolveBranchVariables, responses as Responses, RestRepository, SQLPlugin, type SQLPluginResult, type SQLQuery, type SQLQueryParams, type SQLQueryResult, type SchemaDefinition, type SchemaInference, SchemaPlugin, type SchemaPluginResult, schemas as Schemas, type SearchBranchError, type SearchBranchPathParams, type SearchBranchRequestBody, type SearchBranchVariables, type SearchOptions, SearchPlugin, type SearchPluginResult, type SearchTableError, type SearchTablePathParams, type SearchTableRequestBody, type SearchTableVariables, type SearchXataRecord, type SelectableColumn, type SelectableColumnWithObjectNotation, type SelectedPick, type SerializedString, Serializer, type SerializerResult, type SetTableSchemaError, type SetTableSchemaPathParams, type SetTableSchemaRequestBody, type SetTableSchemaVariables, SimpleCache, type SimpleCacheOptions, type SqlQueryError, type SqlQueryPathParams, type SqlQueryRequestBody, type SqlQueryVariables, type SummarizeTableError, type SummarizeTablePathParams, type SummarizeTableRequestBody, type SummarizeTableVariables, type TotalCount, type TransactionOperation, TransactionPlugin, type TransactionPluginResult, type TransactionResults, type UpdateBranchMetadataError, type UpdateBranchMetadataPathParams, type UpdateBranchMetadataVariables, type UpdateBranchSchemaError, type UpdateBranchSchemaPathParams, type UpdateBranchSchemaVariables, type UpdateClusterError, type UpdateClusterPathParams, type UpdateClusterVariables, type UpdateColumnError, type UpdateColumnPathParams, type UpdateColumnRequestBody, type UpdateColumnVariables, type UpdateDatabaseGithubSettingsError, type UpdateDatabaseGithubSettingsPathParams, type UpdateDatabaseGithubSettingsVariables, type UpdateDatabaseMetadataError, type UpdateDatabaseMetadataPathParams, type UpdateDatabaseMetadataRequestBody, type UpdateDatabaseMetadataVariables, type UpdateMigrationRequestError, type UpdateMigrationRequestPathParams, type UpdateMigrationRequestRequestBody, type UpdateMigrationRequestVariables, type UpdateOAuthAccessTokenError, type UpdateOAuthAccessTokenPathParams, type UpdateOAuthAccessTokenRequestBody, type UpdateOAuthAccessTokenVariables, type UpdateRecordWithIDError, type UpdateRecordWithIDPathParams, type UpdateRecordWithIDQueryParams, type UpdateRecordWithIDVariables, type UpdateTableError, type UpdateTablePathParams, type UpdateTableRequestBody, type UpdateTableVariables, type UpdateTransactionOperation, type UpdateUserError, type UpdateUserVariables, type UpdateWorkspaceError, type UpdateWorkspaceMemberInviteError, type UpdateWorkspaceMemberInvitePathParams, type UpdateWorkspaceMemberInviteRequestBody, type UpdateWorkspaceMemberInviteVariables, type UpdateWorkspaceMemberRoleError, type UpdateWorkspaceMemberRolePathParams, type UpdateWorkspaceMemberRoleRequestBody, type UpdateWorkspaceMemberRoleVariables, type UpdateWorkspacePathParams, type UpdateWorkspaceVariables, type UploadDestination, type UpsertRecordWithIDError, type UpsertRecordWithIDPathParams, type UpsertRecordWithIDQueryParams, type UpsertRecordWithIDVariables, type ValueAtColumn, type VectorAskOptions, type VectorSearchTableError, type VectorSearchTablePathParams, type VectorSearchTableRequestBody, type VectorSearchTableVariables, XataApiClient, type XataApiClientOptions, XataApiPlugin, type XataArrayFile, XataError, XataFile, XataPlugin, type XataPluginOptions, type XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, applyMigration, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createCluster, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteOAuthAccessToken, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteUserOAuthClient, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, fileUpload, ge, getAPIKey, getAuthorizationCode, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, iContains, iPattern, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, pgRollJobStatus, pgRollMigrationHistory, pgRollStatus, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, transformImage, updateBranchMetadata, updateBranchSchema, updateCluster, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
11127
+ export { type AcceptWorkspaceMemberInviteError, type AcceptWorkspaceMemberInvitePathParams, type AcceptWorkspaceMemberInviteVariables, type AdaptAllTablesError, type AdaptAllTablesPathParams, type AdaptAllTablesVariables, type AdaptTableError, type AdaptTablePathParams, type AdaptTableVariables, type AddGitBranchesEntryError, type AddGitBranchesEntryPathParams, type AddGitBranchesEntryRequestBody, type AddGitBranchesEntryResponse, type AddGitBranchesEntryVariables, type AddTableColumnError, type AddTableColumnPathParams, type AddTableColumnVariables, type AggregateTableError, type AggregateTablePathParams, type AggregateTableRequestBody, type AggregateTableVariables, type ApiExtraProps, type ApplyBranchSchemaEditError, type ApplyBranchSchemaEditPathParams, type ApplyBranchSchemaEditRequestBody, type ApplyBranchSchemaEditVariables, type ApplyMigrationError, type ApplyMigrationPathParams, type ApplyMigrationRequestBody, type ApplyMigrationVariables, type AskOptions, type AskResult, type AskTableError, type AskTablePathParams, type AskTableRequestBody, type AskTableResponse, type AskTableSessionError, type AskTableSessionPathParams, type AskTableSessionRequestBody, type AskTableSessionResponse, type AskTableSessionVariables, type AskTableVariables, BaseClient, type BaseClientOptions, type BaseData, type BaseSchema, type BinaryFile, type BranchTransactionError, type BranchTransactionPathParams, type BranchTransactionRequestBody, type BranchTransactionVariables, Buffer, type BulkInsertTableRecordsError, type BulkInsertTableRecordsPathParams, type BulkInsertTableRecordsQueryParams, type BulkInsertTableRecordsRequestBody, type BulkInsertTableRecordsVariables, type CacheImpl, type CancelWorkspaceMemberInviteError, type CancelWorkspaceMemberInvitePathParams, type CancelWorkspaceMemberInviteVariables, type ClientConstructor, type ColumnsByValue, type CompareBranchSchemasError, type CompareBranchSchemasPathParams, type CompareBranchSchemasRequestBody, type CompareBranchSchemasVariables, type CompareBranchWithUserSchemaError, type CompareBranchWithUserSchemaPathParams, type CompareBranchWithUserSchemaRequestBody, type CompareBranchWithUserSchemaVariables, type CompareMigrationRequestError, type CompareMigrationRequestPathParams, type CompareMigrationRequestVariables, type CompleteMigrationError, type CompleteMigrationPathParams, type CompleteMigrationVariables, type CopyBranchError, type CopyBranchPathParams, type CopyBranchRequestBody, type CopyBranchVariables, type CreateBranchError, type CreateBranchPathParams, type CreateBranchQueryParams, type CreateBranchRequestBody, type CreateBranchResponse, type CreateBranchVariables, type CreateClusterError, type CreateClusterPathParams, type CreateClusterVariables, type CreateDatabaseError, type CreateDatabasePathParams, type CreateDatabaseRequestBody, type CreateDatabaseResponse, type CreateDatabaseVariables, type CreateMigrationRequestError, type CreateMigrationRequestPathParams, type CreateMigrationRequestRequestBody, type CreateMigrationRequestResponse, type CreateMigrationRequestVariables, type CreateTableError, type CreateTablePathParams, type CreateTableResponse, type CreateTableVariables, type CreateUserAPIKeyError, type CreateUserAPIKeyPathParams, type CreateUserAPIKeyResponse, type CreateUserAPIKeyVariables, type CreateWorkspaceError, type CreateWorkspaceVariables, type CursorNavigationOptions, type DeleteBranchError, type DeleteBranchPathParams, type DeleteBranchResponse, type DeleteBranchVariables, type DeleteClusterError, type DeleteClusterPathParams, type DeleteClusterVariables, type DeleteColumnError, type DeleteColumnPathParams, type DeleteColumnVariables, type DeleteDatabaseError, type DeleteDatabaseGithubSettingsError, type DeleteDatabaseGithubSettingsPathParams, type DeleteDatabaseGithubSettingsVariables, type DeleteDatabasePathParams, type DeleteDatabaseResponse, type DeleteDatabaseVariables, type DeleteFileError, type DeleteFileItemError, type DeleteFileItemPathParams, type DeleteFileItemVariables, type DeleteFilePathParams, type DeleteFileVariables, type DeleteOAuthAccessTokenError, type DeleteOAuthAccessTokenPathParams, type DeleteOAuthAccessTokenVariables, type DeleteRecordError, type DeleteRecordPathParams, type DeleteRecordQueryParams, type DeleteRecordVariables, type DeleteTableError, type DeleteTablePathParams, type DeleteTableResponse, type DeleteTableVariables, type DeleteTransactionOperation, type DeleteUserAPIKeyError, type DeleteUserAPIKeyPathParams, type DeleteUserAPIKeyVariables, type DeleteUserError, type DeleteUserOAuthClientError, type DeleteUserOAuthClientPathParams, type DeleteUserOAuthClientVariables, type DeleteUserVariables, type DeleteWorkspaceError, type DeleteWorkspacePathParams, type DeleteWorkspaceVariables, type DeserializedType, type DownloadDestination, type EditableData, type ExecuteBranchMigrationPlanError, type ExecuteBranchMigrationPlanPathParams, type ExecuteBranchMigrationPlanRequestBody, type ExecuteBranchMigrationPlanVariables, type FetchImpl, FetcherError, type FetcherExtraProps, type FileAccessError, type FileAccessPathParams, type FileAccessQueryParams, type FileAccessVariables, type FileUploadError, type FileUploadPathParams, type FileUploadQueryParams, type FileUploadVariables, FilesPlugin, type FilesPluginResult, type GetAuthorizationCodeError, type GetAuthorizationCodeQueryParams, type GetAuthorizationCodeVariables, type GetBranchDetailsError, type GetBranchDetailsPathParams, type GetBranchDetailsVariables, type GetBranchListError, type GetBranchListPathParams, type GetBranchListVariables, type GetBranchMetadataError, type GetBranchMetadataPathParams, type GetBranchMetadataVariables, type GetBranchMigrationHistoryError, type GetBranchMigrationHistoryPathParams, type GetBranchMigrationHistoryRequestBody, type GetBranchMigrationHistoryResponse, type GetBranchMigrationHistoryVariables, type GetBranchMigrationJobStatusError, type GetBranchMigrationJobStatusPathParams, type GetBranchMigrationJobStatusVariables, type GetBranchMigrationPlanError, type GetBranchMigrationPlanPathParams, type GetBranchMigrationPlanVariables, type GetBranchMoveStatusError, type GetBranchMoveStatusPathParams, type GetBranchMoveStatusResponse, type GetBranchMoveStatusVariables, type GetBranchSchemaHistoryError, type GetBranchSchemaHistoryPathParams, type GetBranchSchemaHistoryRequestBody, type GetBranchSchemaHistoryResponse, type GetBranchSchemaHistoryVariables, type GetBranchStatsError, type GetBranchStatsPathParams, type GetBranchStatsResponse, type GetBranchStatsVariables, type GetClusterError, type GetClusterMetricsError, type GetClusterMetricsPathParams, type GetClusterMetricsQueryParams, type GetClusterMetricsVariables, type GetClusterPathParams, type GetClusterVariables, type GetColumnError, type GetColumnPathParams, type GetColumnVariables, type GetDatabaseGithubSettingsError, type GetDatabaseGithubSettingsPathParams, type GetDatabaseGithubSettingsVariables, type GetDatabaseListError, type GetDatabaseListPathParams, type GetDatabaseListVariables, type GetDatabaseMetadataError, type GetDatabaseMetadataPathParams, type GetDatabaseMetadataVariables, type GetDatabaseSettingsError, type GetDatabaseSettingsPathParams, type GetDatabaseSettingsVariables, type GetFileError, type GetFileItemError, type GetFileItemPathParams, type GetFileItemVariables, type GetFilePathParams, type GetFileVariables, type GetGitBranchesMappingError, type GetGitBranchesMappingPathParams, type GetGitBranchesMappingVariables, type GetMigrationHistoryError, type GetMigrationHistoryPathParams, type GetMigrationHistoryQueryParams, type GetMigrationHistoryVariables, type GetMigrationJobStatusError, type GetMigrationJobStatusPathParams, type GetMigrationJobStatusVariables, type GetMigrationJobsError, type GetMigrationJobsPathParams, type GetMigrationJobsQueryParams, type GetMigrationJobsVariables, type GetMigrationRequestError, type GetMigrationRequestIsMergedError, type GetMigrationRequestIsMergedPathParams, type GetMigrationRequestIsMergedResponse, type GetMigrationRequestIsMergedVariables, type GetMigrationRequestPathParams, type GetMigrationRequestVariables, type GetRecordError, type GetRecordPathParams, type GetRecordQueryParams, type GetRecordVariables, type GetSchemaError, type GetSchemaPathParams, type GetSchemaResponse, type GetSchemaVariables, type GetSchemasError, type GetSchemasPathParams, type GetSchemasResponse, type GetSchemasVariables, type GetTableColumnsError, type GetTableColumnsPathParams, type GetTableColumnsResponse, type GetTableColumnsVariables, type GetTableSchemaError, type GetTableSchemaPathParams, type GetTableSchemaResponse, type GetTableSchemaVariables, type GetTransactionOperation, type GetUserAPIKeysError, type GetUserAPIKeysResponse, type GetUserAPIKeysVariables, type GetUserError, type GetUserOAuthAccessTokensError, type GetUserOAuthAccessTokensResponse, type GetUserOAuthAccessTokensVariables, type GetUserOAuthClientsError, type GetUserOAuthClientsResponse, type GetUserOAuthClientsVariables, type GetUserVariables, type GetWorkspaceError, type GetWorkspaceMembersListError, type GetWorkspaceMembersListPathParams, type GetWorkspaceMembersListVariables, type GetWorkspacePathParams, type GetWorkspaceSettingsError, type GetWorkspaceSettingsPathParams, type GetWorkspaceSettingsVariables, type GetWorkspaceVariables, type GetWorkspacesListError, type GetWorkspacesListResponse, type GetWorkspacesListVariables, type GrantAuthorizationCodeError, type GrantAuthorizationCodeVariables, type HostProvider, type Identifiable, type ImageTransformations, type InsertRecordError, type InsertRecordPathParams, type InsertRecordQueryParams, type InsertRecordVariables, type InsertRecordWithIDError, type InsertRecordWithIDPathParams, type InsertRecordWithIDQueryParams, type InsertRecordWithIDVariables, type InsertTransactionOperation, type InviteWorkspaceMemberError, type InviteWorkspaceMemberPathParams, type InviteWorkspaceMemberRequestBody, type InviteWorkspaceMemberVariables, type JSONData, type KeywordAskOptions, type Link, type ListClusterBranchesError, type ListClusterBranchesPathParams, type ListClusterBranchesQueryParams, type ListClusterBranchesVariables, type ListClustersError, type ListClustersPathParams, type ListClustersQueryParams, type ListClustersVariables, type ListMigrationRequestsCommitsError, type ListMigrationRequestsCommitsPathParams, type ListMigrationRequestsCommitsRequestBody, type ListMigrationRequestsCommitsResponse, type ListMigrationRequestsCommitsVariables, type ListRegionsError, type ListRegionsPathParams, type ListRegionsVariables, type MergeMigrationRequestError, type MergeMigrationRequestPathParams, type MergeMigrationRequestVariables, type MoveBranchError, type MoveBranchPathParams, type MoveBranchRequestBody, type MoveBranchResponse, type MoveBranchVariables, type OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, PageRecordArray, type Paginable, type PaginationQueryMeta, type PreviewBranchSchemaEditError, type PreviewBranchSchemaEditPathParams, type PreviewBranchSchemaEditRequestBody, type PreviewBranchSchemaEditResponse, type PreviewBranchSchemaEditVariables, type PushBranchMigrationsError, type PushBranchMigrationsPathParams, type PushBranchMigrationsRequestBody, type PushBranchMigrationsVariables, type PutFileError, type PutFileItemError, type PutFileItemPathParams, type PutFileItemVariables, type PutFilePathParams, type PutFileVariables, Query, type QueryMigrationRequestsError, type QueryMigrationRequestsPathParams, type QueryMigrationRequestsRequestBody, type QueryMigrationRequestsResponse, type QueryMigrationRequestsVariables, type QueryTableError, type QueryTablePathParams, type QueryTableRequestBody, type QueryTableVariables, RecordArray, RecordColumnTypes, type RemoveGitBranchesEntryError, type RemoveGitBranchesEntryPathParams, type RemoveGitBranchesEntryQueryParams, type RemoveGitBranchesEntryVariables, type RemoveWorkspaceMemberError, type RemoveWorkspaceMemberPathParams, type RemoveWorkspaceMemberVariables, type RenameDatabaseError, type RenameDatabasePathParams, type RenameDatabaseRequestBody, type RenameDatabaseVariables, Repository, type ResendWorkspaceMemberInviteError, type ResendWorkspaceMemberInvitePathParams, type ResendWorkspaceMemberInviteVariables, type ResolveBranchError, type ResolveBranchPathParams, type ResolveBranchQueryParams, type ResolveBranchResponse, type ResolveBranchVariables, responses as Responses, RestRepository, type RollbackMigrationError, type RollbackMigrationPathParams, type RollbackMigrationVariables, type SQLBatchQuery, SQLPlugin, type SQLPluginResult, type SQLQuery, type SQLQueryParams, type SQLQueryResult, type SchemaDefinition, type SchemaInference, SchemaPlugin, type SchemaPluginResult, schemas as Schemas, type SearchBranchError, type SearchBranchPathParams, type SearchBranchRequestBody, type SearchBranchVariables, type SearchOptions, SearchPlugin, type SearchPluginResult, type SearchTableError, type SearchTablePathParams, type SearchTableRequestBody, type SearchTableVariables, type SearchXataRecord, type SelectableColumn, type SelectableColumnWithObjectNotation, type SelectedPick, type SerializedString, Serializer, type SerializerResult, type SetTableSchemaError, type SetTableSchemaPathParams, type SetTableSchemaRequestBody, type SetTableSchemaVariables, SimpleCache, type SimpleCacheOptions, type SqlBatchQueryError, type SqlBatchQueryPathParams, type SqlBatchQueryRequestBody, type SqlBatchQueryVariables, type SqlQueryError, type SqlQueryPathParams, type SqlQueryRequestBody, type SqlQueryVariables, type StartMigrationError, type StartMigrationPathParams, type StartMigrationRequestBody, type StartMigrationVariables, type SummarizeTableError, type SummarizeTablePathParams, type SummarizeTableRequestBody, type SummarizeTableVariables, type TotalCount, type TransactionOperation, TransactionPlugin, type TransactionPluginResult, type TransactionResults, type UpdateBranchMetadataError, type UpdateBranchMetadataPathParams, type UpdateBranchMetadataVariables, type UpdateBranchSchemaError, type UpdateBranchSchemaPathParams, type UpdateBranchSchemaVariables, type UpdateClusterError, type UpdateClusterPathParams, type UpdateClusterVariables, type UpdateColumnError, type UpdateColumnPathParams, type UpdateColumnRequestBody, type UpdateColumnVariables, type UpdateDatabaseGithubSettingsError, type UpdateDatabaseGithubSettingsPathParams, type UpdateDatabaseGithubSettingsVariables, type UpdateDatabaseMetadataError, type UpdateDatabaseMetadataPathParams, type UpdateDatabaseMetadataRequestBody, type UpdateDatabaseMetadataVariables, type UpdateDatabaseSettingsError, type UpdateDatabaseSettingsPathParams, type UpdateDatabaseSettingsRequestBody, type UpdateDatabaseSettingsVariables, type UpdateMigrationRequestError, type UpdateMigrationRequestPathParams, type UpdateMigrationRequestRequestBody, type UpdateMigrationRequestVariables, type UpdateOAuthAccessTokenError, type UpdateOAuthAccessTokenPathParams, type UpdateOAuthAccessTokenRequestBody, type UpdateOAuthAccessTokenVariables, type UpdateRecordWithIDError, type UpdateRecordWithIDPathParams, type UpdateRecordWithIDQueryParams, type UpdateRecordWithIDVariables, type UpdateTableError, type UpdateTablePathParams, type UpdateTableRequestBody, type UpdateTableVariables, type UpdateTransactionOperation, type UpdateUserError, type UpdateUserVariables, type UpdateWorkspaceError, type UpdateWorkspaceMemberInviteError, type UpdateWorkspaceMemberInvitePathParams, type UpdateWorkspaceMemberInviteRequestBody, type UpdateWorkspaceMemberInviteVariables, type UpdateWorkspaceMemberRoleError, type UpdateWorkspaceMemberRolePathParams, type UpdateWorkspaceMemberRoleRequestBody, type UpdateWorkspaceMemberRoleVariables, type UpdateWorkspacePathParams, type UpdateWorkspaceSettingsError, type UpdateWorkspaceSettingsPathParams, type UpdateWorkspaceSettingsRequestBody, type UpdateWorkspaceSettingsVariables, type UpdateWorkspaceVariables, type UploadDestination, type UpsertRecordWithIDError, type UpsertRecordWithIDPathParams, type UpsertRecordWithIDQueryParams, type UpsertRecordWithIDVariables, type ValueAtColumn, type VectorAskOptions, type VectorSearchTableError, type VectorSearchTablePathParams, type VectorSearchTableRequestBody, type VectorSearchTableVariables, XataApiClient, type XataApiClientOptions, XataApiPlugin, type XataArrayFile, XataError, XataFile, XataPlugin, type XataPluginOptions, type XataRecord, acceptWorkspaceMemberInvite, adaptAllTables, adaptTable, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, applyMigration, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, completeMigration, contains, copyBranch, createBranch, createCluster, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteCluster, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteOAuthAccessToken, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteUserOAuthClient, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, fileUpload, ge, getAPIKey, getAuthorizationCode, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationJobStatus, getBranchMigrationPlan, getBranchMoveStatus, getBranchSchemaHistory, getBranchStats, getCluster, getClusterMetrics, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseSettings, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationHistory, getMigrationJobStatus, getMigrationJobs, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, getSchemas, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspaceSettings, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, iContains, iPattern, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listClusterBranches, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, moveBranch, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, rollbackMigration, searchBranch, searchTable, serialize, setTableSchema, sqlBatchQuery, sqlQuery, startMigration, startsWith, summarizeTable, transformImage, updateBranchMetadata, updateBranchSchema, updateCluster, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateDatabaseSettings, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, updateWorkspaceSettings, upsertRecordWithID, vectorSearchTable };