@xata.io/client 0.0.0-alpha.vf7a5219a6da9afdecee2e8995fcc249036ff88a1 → 0.0.0-alpha.vf7b3447057053443041e94106d7efe270aaea321

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
@@ -28,6 +28,8 @@ declare abstract class XataPlugin {
28
28
  type XataPluginOptions = ApiExtraProps & {
29
29
  cache: CacheImpl;
30
30
  host: HostProvider;
31
+ tables: Table[];
32
+ branch: string;
31
33
  };
32
34
 
33
35
  type AttributeDictionary = Record<string, string | number | boolean | undefined>;
@@ -68,15 +70,21 @@ type FetchImpl = (url: string, init?: RequestInit) => Promise<Response>;
68
70
  * @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
69
71
  */
70
72
  type DBBranchName = string;
71
- type PgRollApplyMigrationResponse = {
73
+ type ApplyMigrationResponse = {
72
74
  /**
73
75
  * The id of the migration job
74
76
  */
75
77
  jobID: string;
76
78
  };
77
- type PgRollJobType = 'apply' | 'start' | 'complete' | 'rollback';
78
- type PgRollJobStatus = 'pending' | 'in_progress' | 'completed' | 'failed';
79
- type PgRollJobStatusResponse = {
79
+ /**
80
+ * @maxLength 255
81
+ * @minLength 1
82
+ * @pattern [a-zA-Z0-9_\-~]+
83
+ */
84
+ type TableName = string;
85
+ type MigrationJobType = 'apply' | 'start' | 'complete' | 'rollback';
86
+ type MigrationJobStatus = 'pending' | 'in_progress' | 'completed' | 'failed';
87
+ type MigrationJobStatusResponse = {
80
88
  /**
81
89
  * The id of the migration job
82
90
  */
@@ -84,11 +92,11 @@ type PgRollJobStatusResponse = {
84
92
  /**
85
93
  * The type of the migration job
86
94
  */
87
- type: PgRollJobType;
95
+ type: MigrationJobType;
88
96
  /**
89
97
  * The status of the migration job
90
98
  */
91
- status: PgRollJobStatus;
99
+ status: MigrationJobStatus;
92
100
  /**
93
101
  * The error message associated with the migration job
94
102
  */
@@ -99,9 +107,9 @@ type PgRollJobStatusResponse = {
99
107
  * @minLength 1
100
108
  * @pattern [a-zA-Z0-9_\-~]+
101
109
  */
102
- type PgRollMigrationJobID = string;
103
- type PgRollMigrationType = 'pgroll' | 'inferred';
104
- type PgRollMigrationHistoryItem = {
110
+ type MigrationJobID = string;
111
+ type MigrationType = 'pgroll' | 'inferred';
112
+ type MigrationHistoryItem = {
105
113
  /**
106
114
  * The name of the migration
107
115
  */
@@ -127,13 +135,13 @@ type PgRollMigrationHistoryItem = {
127
135
  /**
128
136
  * The type of the migration
129
137
  */
130
- migrationType: PgRollMigrationType;
138
+ migrationType: MigrationType;
131
139
  };
132
- type PgRollMigrationHistoryResponse = {
140
+ type MigrationHistoryResponse = {
133
141
  /**
134
142
  * The migrations that have been applied to the branch
135
143
  */
136
- migrations: PgRollMigrationHistoryItem[];
144
+ migrations: MigrationHistoryItem[];
137
145
  };
138
146
  /**
139
147
  * @maxLength 255
@@ -152,7 +160,6 @@ type Branch = {
152
160
  * The cluster where this branch resides. Value of 'shared-cluster' for branches in shared clusters
153
161
  *
154
162
  * @minLength 1
155
- * @x-internal true
156
163
  */
157
164
  clusterID?: string;
158
165
  createdAt: DateTime$1;
@@ -161,6 +168,9 @@ type ListBranchesResponse = {
161
168
  databaseName: string;
162
169
  branches: Branch[];
163
170
  };
171
+ type DatabaseSettings = {
172
+ searchEnabled: boolean;
173
+ };
164
174
  /**
165
175
  * @maxLength 255
166
176
  * @minLength 1
@@ -188,12 +198,6 @@ type StartedFromMetadata = {
188
198
  dbBranchID: string;
189
199
  migrationID: string;
190
200
  };
191
- /**
192
- * @maxLength 255
193
- * @minLength 1
194
- * @pattern [a-zA-Z0-9_\-~]+
195
- */
196
- type TableName = string;
197
201
  type ColumnLink = {
198
202
  table: string;
199
203
  };
@@ -209,7 +213,7 @@ type ColumnFile = {
209
213
  };
210
214
  type Column = {
211
215
  name: string;
212
- type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'datetime' | 'vector' | 'file[]' | 'file' | 'json';
216
+ type: string;
213
217
  link?: ColumnLink;
214
218
  vector?: ColumnVector;
215
219
  file?: ColumnFile;
@@ -254,6 +258,56 @@ type DBBranch = {
254
258
  schema: Schema;
255
259
  };
256
260
  type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
261
+ type BranchSchema = {
262
+ name: string;
263
+ tables: {
264
+ [key: string]: {
265
+ oid: string;
266
+ name: string;
267
+ xataCompatible: boolean;
268
+ comment: string;
269
+ columns: {
270
+ [key: string]: {
271
+ name: string;
272
+ type: string;
273
+ ['default']: string | null;
274
+ nullable: boolean;
275
+ unique: boolean;
276
+ comment: string;
277
+ };
278
+ };
279
+ indexes: {
280
+ [key: string]: {
281
+ name: string;
282
+ unique: boolean;
283
+ columns: string[];
284
+ };
285
+ };
286
+ primaryKey: string[];
287
+ foreignKeys: {
288
+ [key: string]: {
289
+ name: string;
290
+ columns: string[];
291
+ referencedTable: string;
292
+ referencedColumns: string[];
293
+ };
294
+ };
295
+ checkConstraints: {
296
+ [key: string]: {
297
+ name: string;
298
+ columns: string[];
299
+ definition: string;
300
+ };
301
+ };
302
+ uniqueConstraints: {
303
+ [key: string]: {
304
+ name: string;
305
+ columns: string[];
306
+ };
307
+ };
308
+ };
309
+ };
310
+ };
257
311
  type BranchWithCopyID = {
258
312
  branchName: BranchName$1;
259
313
  dbBranchID: string;
@@ -906,6 +960,40 @@ type RecordMeta = {
906
960
  */
907
961
  warnings?: string[];
908
962
  };
963
+ } | {
964
+ xata_id: RecordID;
965
+ /**
966
+ * The record's version. Can be used for optimistic concurrency control.
967
+ */
968
+ xata_version: number;
969
+ /**
970
+ * The time when the record was created.
971
+ */
972
+ xata_createdat?: string;
973
+ /**
974
+ * The time when the record was last updated.
975
+ */
976
+ xata_updatedat?: string;
977
+ /**
978
+ * The record's table name. APIs that return records from multiple tables will set this field accordingly.
979
+ */
980
+ xata_table?: string;
981
+ /**
982
+ * Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
983
+ */
984
+ xata_highlight?: {
985
+ [key: string]: string[] | {
986
+ [key: string]: any;
987
+ };
988
+ };
989
+ /**
990
+ * The record's relevancy score. This is returned by the search APIs.
991
+ */
992
+ xata_score?: number;
993
+ /**
994
+ * Encoding/Decoding errors
995
+ */
996
+ xata_warnings?: string[];
909
997
  };
910
998
  /**
911
999
  * File metadata
@@ -914,6 +1002,18 @@ type FileResponse = {
914
1002
  id?: FileItemID;
915
1003
  name: FileName;
916
1004
  mediaType: MediaType;
1005
+ /**
1006
+ * Enable public access to the file
1007
+ */
1008
+ enablePublicUrl: boolean;
1009
+ /**
1010
+ * Time to live for signed URLs
1011
+ */
1012
+ signedUrlTimeout: number;
1013
+ /**
1014
+ * Time to live for signed URLs
1015
+ */
1016
+ uploadUrlTimeout: number;
917
1017
  /**
918
1018
  * @format int64
919
1019
  */
@@ -922,6 +1022,24 @@ type FileResponse = {
922
1022
  * @format int64
923
1023
  */
924
1024
  version: number;
1025
+ /**
1026
+ * File access URL
1027
+ *
1028
+ * @format uri
1029
+ */
1030
+ url: string;
1031
+ /**
1032
+ * Signed file access URL
1033
+ *
1034
+ * @format uri
1035
+ */
1036
+ signedUrl: string;
1037
+ /**
1038
+ * Upload file URL
1039
+ *
1040
+ * @format uri
1041
+ */
1042
+ uploadUrl: string;
925
1043
  attributes?: Record<string, any>;
926
1044
  };
927
1045
  type QueryColumnsProjection = (string | ProjectionConfig)[];
@@ -1425,6 +1543,11 @@ type RecordUpdateResponse = XataRecord$1 | {
1425
1543
  createdAt: string;
1426
1544
  updatedAt: string;
1427
1545
  };
1546
+ } | {
1547
+ xata_id: string;
1548
+ xata_version: number;
1549
+ xata_createdat: string;
1550
+ xata_updatedat: string;
1428
1551
  };
1429
1552
  type PutFileResponse = FileResponse;
1430
1553
  type RecordResponse = XataRecord$1;
@@ -1468,10 +1591,14 @@ type AggResponse = {
1468
1591
  };
1469
1592
  type SQLResponse = {
1470
1593
  records?: SQLRecord[];
1594
+ rows?: any[][];
1471
1595
  /**
1472
1596
  * Name of the column and its PostgreSQL type
1473
1597
  */
1474
- columns?: Record<string, any>;
1598
+ columns?: {
1599
+ name?: string;
1600
+ type?: string;
1601
+ }[];
1475
1602
  /**
1476
1603
  * Number of selected columns
1477
1604
  */
@@ -1572,6 +1699,10 @@ type Workspace = WorkspaceMeta & {
1572
1699
  memberCount: number;
1573
1700
  plan: WorkspacePlan;
1574
1701
  };
1702
+ type WorkspaceSettings = {
1703
+ postgresEnabled: boolean;
1704
+ dedicatedClusters: boolean;
1705
+ };
1575
1706
  type WorkspaceMember = {
1576
1707
  userId: UserID;
1577
1708
  fullname: string;
@@ -1735,6 +1866,13 @@ type ClusterConfiguration = {
1735
1866
  * @format int64
1736
1867
  */
1737
1868
  replicas?: number;
1869
+ /**
1870
+ * @format int64
1871
+ * @default 1
1872
+ * @maximum 3
1873
+ * @minimum 1
1874
+ */
1875
+ instanceCount?: number;
1738
1876
  /**
1739
1877
  * @default false
1740
1878
  */
@@ -1753,7 +1891,7 @@ type ClusterCreateDetails = {
1753
1891
  /**
1754
1892
  * @maxLength 63
1755
1893
  * @minLength 1
1756
- * @pattern [a-zA-Z0-9_-~:]+
1894
+ * @pattern [a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
1757
1895
  */
1758
1896
  name: string;
1759
1897
  configuration: ClusterConfiguration;
@@ -1765,6 +1903,57 @@ type ClusterResponse = {
1765
1903
  state: string;
1766
1904
  clusterID: string;
1767
1905
  };
1906
+ /**
1907
+ * @x-internal true
1908
+ */
1909
+ type AutoscalingConfigResponse = {
1910
+ /**
1911
+ * @format double
1912
+ * @default 0.5
1913
+ */
1914
+ minCapacity: number;
1915
+ /**
1916
+ * @format double
1917
+ * @default 4
1918
+ */
1919
+ maxCapacity: number;
1920
+ };
1921
+ /**
1922
+ * @x-internal true
1923
+ */
1924
+ type MaintenanceConfigResponse = {
1925
+ /**
1926
+ * @default false
1927
+ */
1928
+ autoMinorVersionUpgrade: boolean;
1929
+ /**
1930
+ * @default false
1931
+ */
1932
+ applyImmediately: boolean;
1933
+ maintenanceWindow: WeeklyTimeWindow;
1934
+ backupWindow: DailyTimeWindow;
1935
+ };
1936
+ /**
1937
+ * @x-internal true
1938
+ */
1939
+ type ClusterConfigurationResponse = {
1940
+ engineVersion: string;
1941
+ instanceType: string;
1942
+ /**
1943
+ * @format int64
1944
+ */
1945
+ replicas: number;
1946
+ /**
1947
+ * @format int64
1948
+ */
1949
+ instanceCount: number;
1950
+ /**
1951
+ * @default false
1952
+ */
1953
+ deletionProtection: boolean;
1954
+ autoscaling?: AutoscalingConfigResponse;
1955
+ maintenance: MaintenanceConfigResponse;
1956
+ };
1768
1957
  /**
1769
1958
  * @x-internal true
1770
1959
  */
@@ -1777,22 +1966,23 @@ type ClusterMetadata = {
1777
1966
  * @format int64
1778
1967
  */
1779
1968
  branches: number;
1780
- configuration?: ClusterConfiguration;
1969
+ configuration: ClusterConfigurationResponse;
1781
1970
  };
1782
1971
  /**
1783
1972
  * @x-internal true
1784
1973
  */
1785
1974
  type ClusterUpdateDetails = {
1786
- id: ClusterID;
1787
1975
  /**
1788
- * @maxLength 63
1789
- * @minLength 1
1790
- * @pattern [a-zA-Z0-9_-~:]+
1976
+ * @pattern ^[Ss][Tt][Oo][Pp]|[Ss][Tt][Aa][Rr][Tt]$
1791
1977
  */
1792
- name?: string;
1793
- configuration?: ClusterConfiguration;
1794
- state?: string;
1795
- region?: string;
1978
+ command: string;
1979
+ };
1980
+ /**
1981
+ * @x-internal true
1982
+ */
1983
+ type ClusterUpdateMetadata = {
1984
+ id: ClusterID;
1985
+ state: string;
1796
1986
  };
1797
1987
  /**
1798
1988
  * Metadata of databases
@@ -1815,9 +2005,13 @@ type DatabaseMetadata = {
1815
2005
  */
1816
2006
  newMigrations?: boolean;
1817
2007
  /**
1818
- * @x-internal true
2008
+ * The default cluster ID where branches from this database reside. Value of 'shared-cluster' for branches in shared clusters.
1819
2009
  */
1820
2010
  defaultClusterID?: string;
2011
+ /**
2012
+ * The database is accessible via the Postgres protocol
2013
+ */
2014
+ postgresEnabled?: boolean;
1821
2015
  /**
1822
2016
  * Metadata about the database for display in Xata user interfaces
1823
2017
  */
@@ -2358,6 +2552,62 @@ type DeleteWorkspaceVariables = {
2358
2552
  * Delete the workspace with the provided ID
2359
2553
  */
2360
2554
  declare const deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
2555
+ type GetWorkspaceSettingsPathParams = {
2556
+ /**
2557
+ * Workspace ID
2558
+ */
2559
+ workspaceId: WorkspaceID;
2560
+ };
2561
+ type GetWorkspaceSettingsError = ErrorWrapper$1<{
2562
+ status: 400;
2563
+ payload: BadRequestError;
2564
+ } | {
2565
+ status: 401;
2566
+ payload: AuthError;
2567
+ } | {
2568
+ status: 403;
2569
+ payload: AuthError;
2570
+ } | {
2571
+ status: 404;
2572
+ payload: SimpleError;
2573
+ }>;
2574
+ type GetWorkspaceSettingsVariables = {
2575
+ pathParams: GetWorkspaceSettingsPathParams;
2576
+ } & ControlPlaneFetcherExtraProps;
2577
+ /**
2578
+ * Retrieve workspace settings from a workspace ID
2579
+ */
2580
+ declare const getWorkspaceSettings: (variables: GetWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
2581
+ type UpdateWorkspaceSettingsPathParams = {
2582
+ /**
2583
+ * Workspace ID
2584
+ */
2585
+ workspaceId: WorkspaceID;
2586
+ };
2587
+ type UpdateWorkspaceSettingsError = ErrorWrapper$1<{
2588
+ status: 400;
2589
+ payload: BadRequestError;
2590
+ } | {
2591
+ status: 401;
2592
+ payload: AuthError;
2593
+ } | {
2594
+ status: 403;
2595
+ payload: AuthError;
2596
+ } | {
2597
+ status: 404;
2598
+ payload: SimpleError;
2599
+ }>;
2600
+ type UpdateWorkspaceSettingsRequestBody = {
2601
+ postgresEnabled: boolean;
2602
+ };
2603
+ type UpdateWorkspaceSettingsVariables = {
2604
+ body: UpdateWorkspaceSettingsRequestBody;
2605
+ pathParams: UpdateWorkspaceSettingsPathParams;
2606
+ } & ControlPlaneFetcherExtraProps;
2607
+ /**
2608
+ * Update workspace settings
2609
+ */
2610
+ declare const updateWorkspaceSettings: (variables: UpdateWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
2361
2611
  type GetWorkspaceMembersListPathParams = {
2362
2612
  /**
2363
2613
  * Workspace ID
@@ -2715,7 +2965,7 @@ type UpdateClusterVariables = {
2715
2965
  /**
2716
2966
  * Update cluster for given cluster ID
2717
2967
  */
2718
- declare const updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal) => Promise<ClusterMetadata>;
2968
+ declare const updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal) => Promise<ClusterUpdateMetadata>;
2719
2969
  type GetDatabaseListPathParams = {
2720
2970
  /**
2721
2971
  * Workspace ID
@@ -3090,6 +3340,7 @@ type ApplyMigrationRequestBody = {
3090
3340
  operations: {
3091
3341
  [key: string]: any;
3092
3342
  }[];
3343
+ adaptTables?: boolean;
3093
3344
  };
3094
3345
  type ApplyMigrationVariables = {
3095
3346
  body: ApplyMigrationRequestBody;
@@ -3098,16 +3349,20 @@ type ApplyMigrationVariables = {
3098
3349
  /**
3099
3350
  * Applies a pgroll migration to the specified database.
3100
3351
  */
3101
- declare const applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal) => Promise<PgRollApplyMigrationResponse>;
3102
- type PgRollStatusPathParams = {
3352
+ declare const applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
3353
+ type AdaptTablePathParams = {
3103
3354
  /**
3104
3355
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3105
3356
  */
3106
3357
  dbBranchName: DBBranchName;
3358
+ /**
3359
+ * The Table name
3360
+ */
3361
+ tableName: TableName;
3107
3362
  workspace: string;
3108
3363
  region: string;
3109
3364
  };
3110
- type PgRollStatusError = ErrorWrapper<{
3365
+ type AdaptTableError = ErrorWrapper<{
3111
3366
  status: 400;
3112
3367
  payload: BadRequestError$1;
3113
3368
  } | {
@@ -3117,11 +3372,61 @@ type PgRollStatusError = ErrorWrapper<{
3117
3372
  status: 404;
3118
3373
  payload: SimpleError$1;
3119
3374
  }>;
3120
- type PgRollStatusVariables = {
3121
- pathParams: PgRollStatusPathParams;
3375
+ type AdaptTableVariables = {
3376
+ pathParams: AdaptTablePathParams;
3122
3377
  } & DataPlaneFetcherExtraProps;
3123
- declare const pgRollStatus: (variables: PgRollStatusVariables, signal?: AbortSignal) => Promise<PgRollJobStatusResponse>;
3124
- type PgRollJobStatusPathParams = {
3378
+ /**
3379
+ * 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.
3380
+ */
3381
+ declare const adaptTable: (variables: AdaptTableVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
3382
+ type AdaptAllTablesPathParams = {
3383
+ /**
3384
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3385
+ */
3386
+ dbBranchName: DBBranchName;
3387
+ workspace: string;
3388
+ region: string;
3389
+ };
3390
+ type AdaptAllTablesError = ErrorWrapper<{
3391
+ status: 400;
3392
+ payload: BadRequestError$1;
3393
+ } | {
3394
+ status: 401;
3395
+ payload: AuthError$1;
3396
+ } | {
3397
+ status: 404;
3398
+ payload: SimpleError$1;
3399
+ }>;
3400
+ type AdaptAllTablesVariables = {
3401
+ pathParams: AdaptAllTablesPathParams;
3402
+ } & DataPlaneFetcherExtraProps;
3403
+ /**
3404
+ * 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.
3405
+ */
3406
+ declare const adaptAllTables: (variables: AdaptAllTablesVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
3407
+ type GetBranchMigrationJobStatusPathParams = {
3408
+ /**
3409
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3410
+ */
3411
+ dbBranchName: DBBranchName;
3412
+ workspace: string;
3413
+ region: string;
3414
+ };
3415
+ type GetBranchMigrationJobStatusError = ErrorWrapper<{
3416
+ status: 400;
3417
+ payload: BadRequestError$1;
3418
+ } | {
3419
+ status: 401;
3420
+ payload: AuthError$1;
3421
+ } | {
3422
+ status: 404;
3423
+ payload: SimpleError$1;
3424
+ }>;
3425
+ type GetBranchMigrationJobStatusVariables = {
3426
+ pathParams: GetBranchMigrationJobStatusPathParams;
3427
+ } & DataPlaneFetcherExtraProps;
3428
+ declare const getBranchMigrationJobStatus: (variables: GetBranchMigrationJobStatusVariables, signal?: AbortSignal) => Promise<MigrationJobStatusResponse>;
3429
+ type GetMigrationJobStatusPathParams = {
3125
3430
  /**
3126
3431
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3127
3432
  */
@@ -3129,11 +3434,11 @@ type PgRollJobStatusPathParams = {
3129
3434
  /**
3130
3435
  * The id of the migration job
3131
3436
  */
3132
- jobId: PgRollMigrationJobID;
3437
+ jobId: MigrationJobID;
3133
3438
  workspace: string;
3134
3439
  region: string;
3135
3440
  };
3136
- type PgRollJobStatusError = ErrorWrapper<{
3441
+ type GetMigrationJobStatusError = ErrorWrapper<{
3137
3442
  status: 400;
3138
3443
  payload: BadRequestError$1;
3139
3444
  } | {
@@ -3143,11 +3448,11 @@ type PgRollJobStatusError = ErrorWrapper<{
3143
3448
  status: 404;
3144
3449
  payload: SimpleError$1;
3145
3450
  }>;
3146
- type PgRollJobStatusVariables = {
3147
- pathParams: PgRollJobStatusPathParams;
3451
+ type GetMigrationJobStatusVariables = {
3452
+ pathParams: GetMigrationJobStatusPathParams;
3148
3453
  } & DataPlaneFetcherExtraProps;
3149
- declare const pgRollJobStatus: (variables: PgRollJobStatusVariables, signal?: AbortSignal) => Promise<PgRollJobStatusResponse>;
3150
- type PgRollMigrationHistoryPathParams = {
3454
+ declare const getMigrationJobStatus: (variables: GetMigrationJobStatusVariables, signal?: AbortSignal) => Promise<MigrationJobStatusResponse>;
3455
+ type GetMigrationHistoryPathParams = {
3151
3456
  /**
3152
3457
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3153
3458
  */
@@ -3155,7 +3460,7 @@ type PgRollMigrationHistoryPathParams = {
3155
3460
  workspace: string;
3156
3461
  region: string;
3157
3462
  };
3158
- type PgRollMigrationHistoryError = ErrorWrapper<{
3463
+ type GetMigrationHistoryError = ErrorWrapper<{
3159
3464
  status: 400;
3160
3465
  payload: BadRequestError$1;
3161
3466
  } | {
@@ -3165,10 +3470,10 @@ type PgRollMigrationHistoryError = ErrorWrapper<{
3165
3470
  status: 404;
3166
3471
  payload: SimpleError$1;
3167
3472
  }>;
3168
- type PgRollMigrationHistoryVariables = {
3169
- pathParams: PgRollMigrationHistoryPathParams;
3473
+ type GetMigrationHistoryVariables = {
3474
+ pathParams: GetMigrationHistoryPathParams;
3170
3475
  } & DataPlaneFetcherExtraProps;
3171
- declare const pgRollMigrationHistory: (variables: PgRollMigrationHistoryVariables, signal?: AbortSignal) => Promise<PgRollMigrationHistoryResponse>;
3476
+ declare const getMigrationHistory: (variables: GetMigrationHistoryVariables, signal?: AbortSignal) => Promise<MigrationHistoryResponse>;
3172
3477
  type GetBranchListPathParams = {
3173
3478
  /**
3174
3479
  * The Database Name
@@ -3194,6 +3499,60 @@ type GetBranchListVariables = {
3194
3499
  * List all available Branches
3195
3500
  */
3196
3501
  declare const getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
3502
+ type GetDatabaseSettingsPathParams = {
3503
+ /**
3504
+ * The Database Name
3505
+ */
3506
+ dbName: DBName$1;
3507
+ workspace: string;
3508
+ region: string;
3509
+ };
3510
+ type GetDatabaseSettingsError = ErrorWrapper<{
3511
+ status: 400;
3512
+ payload: SimpleError$1;
3513
+ } | {
3514
+ status: 401;
3515
+ payload: AuthError$1;
3516
+ } | {
3517
+ status: 404;
3518
+ payload: SimpleError$1;
3519
+ }>;
3520
+ type GetDatabaseSettingsVariables = {
3521
+ pathParams: GetDatabaseSettingsPathParams;
3522
+ } & DataPlaneFetcherExtraProps;
3523
+ /**
3524
+ * Get database settings
3525
+ */
3526
+ declare const getDatabaseSettings: (variables: GetDatabaseSettingsVariables, signal?: AbortSignal) => Promise<DatabaseSettings>;
3527
+ type UpdateDatabaseSettingsPathParams = {
3528
+ /**
3529
+ * The Database Name
3530
+ */
3531
+ dbName: DBName$1;
3532
+ workspace: string;
3533
+ region: string;
3534
+ };
3535
+ type UpdateDatabaseSettingsError = ErrorWrapper<{
3536
+ status: 400;
3537
+ payload: SimpleError$1;
3538
+ } | {
3539
+ status: 401;
3540
+ payload: AuthError$1;
3541
+ } | {
3542
+ status: 404;
3543
+ payload: SimpleError$1;
3544
+ }>;
3545
+ type UpdateDatabaseSettingsRequestBody = {
3546
+ searchEnabled?: boolean;
3547
+ };
3548
+ type UpdateDatabaseSettingsVariables = {
3549
+ body?: UpdateDatabaseSettingsRequestBody;
3550
+ pathParams: UpdateDatabaseSettingsPathParams;
3551
+ } & DataPlaneFetcherExtraProps;
3552
+ /**
3553
+ * Update database settings, this endpoint can be used to disable search
3554
+ */
3555
+ declare const updateDatabaseSettings: (variables: UpdateDatabaseSettingsVariables, signal?: AbortSignal) => Promise<DatabaseSettings>;
3197
3556
  type GetBranchDetailsPathParams = {
3198
3557
  /**
3199
3558
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3321,7 +3680,7 @@ type GetSchemaError = ErrorWrapper<{
3321
3680
  payload: SimpleError$1;
3322
3681
  }>;
3323
3682
  type GetSchemaResponse = {
3324
- schema: Record<string, any>;
3683
+ schema: BranchSchema;
3325
3684
  };
3326
3685
  type GetSchemaVariables = {
3327
3686
  pathParams: GetSchemaPathParams;
@@ -3545,7 +3904,7 @@ type RemoveGitBranchesEntryPathParams = {
3545
3904
  };
3546
3905
  type RemoveGitBranchesEntryQueryParams = {
3547
3906
  /**
3548
- * The Git Branch to remove from the mapping
3907
+ * The git branch to remove from the mapping
3549
3908
  */
3550
3909
  gitBranch: string;
3551
3910
  };
@@ -3608,7 +3967,7 @@ type ResolveBranchVariables = {
3608
3967
  } & DataPlaneFetcherExtraProps;
3609
3968
  /**
3610
3969
  * In order to resolve the database branch, the following algorithm is used:
3611
- * * if the `gitBranch` was provided and is found in the [git branches mapping](/api-reference/dbs/db_name/gitBranches), the associated Xata branch is returned
3970
+ * * if the `gitBranch` was provided and is found in the [git branches mapping](/docs/api-reference/dbs/db_name/gitBranches), the associated Xata branch is returned
3612
3971
  * * else, if a Xata branch with the exact same name as `gitBranch` exists, return it
3613
3972
  * * else, if `fallbackBranch` is provided and a branch with that name exists, return it
3614
3973
  * * else, return the default branch of the DB (`main` or the first branch)
@@ -5209,7 +5568,7 @@ type QueryTableVariables = {
5209
5568
  * }
5210
5569
  * ```
5211
5570
  *
5212
- * For usage, see also the [API Guide](https://xata.io/docs/api-guide/get).
5571
+ * For usage, see also the [Xata SDK documentation](https://xata.io/docs/sdk/get).
5213
5572
  *
5214
5573
  * ### Column selection
5215
5574
  *
@@ -6081,7 +6440,7 @@ type SearchTableVariables = {
6081
6440
  /**
6082
6441
  * Run a free text search operation in a particular table.
6083
6442
  *
6084
- * The endpoint accepts a `query` parameter that is used for the free text search and a set of structured filters (via the `filter` parameter) that are applied before the search. The `filter` parameter uses the same syntax as the [query endpoint](/api-reference/db/db_branch_name/tables/table_name/) with the following exceptions:
6443
+ * The endpoint accepts a `query` parameter that is used for the free text search and a set of structured filters (via the `filter` parameter) that are applied before the search. The `filter` parameter uses the same syntax as the [query endpoint](/docs/api-reference/db/db_branch_name/tables/table_name/query#filtering) with the following exceptions:
6085
6444
  * * filters `$contains`, `$startsWith`, `$endsWith` don't work on columns of type `text`
6086
6445
  * * filtering on columns of type `multiple` is currently unsupported
6087
6446
  */
@@ -6442,7 +6801,7 @@ type AggregateTableVariables = {
6442
6801
  * store that is more appropriate for analytics, makes use of approximation algorithms
6443
6802
  * (e.g for cardinality), and is generally faster and can do more complex aggregations.
6444
6803
  *
6445
- * For usage, see the [API Guide](https://xata.io/docs/api-guide/aggregate).
6804
+ * For usage, see the [Aggregation documentation](https://xata.io/docs/sdk/aggregate).
6446
6805
  */
6447
6806
  declare const aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
6448
6807
  type FileAccessPathParams = {
@@ -6548,6 +6907,12 @@ type SqlQueryRequestBody = {
6548
6907
  * @default strong
6549
6908
  */
6550
6909
  consistency?: 'strong' | 'eventual';
6910
+ /**
6911
+ * The response type.
6912
+ *
6913
+ * @default json
6914
+ */
6915
+ responseType?: 'json' | 'array';
6551
6916
  };
6552
6917
  type SqlQueryVariables = {
6553
6918
  body: SqlQueryRequestBody;
@@ -6560,10 +6925,6 @@ declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) =>
6560
6925
 
6561
6926
  declare const operationsByTag: {
6562
6927
  branch: {
6563
- applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal | undefined) => Promise<PgRollApplyMigrationResponse>;
6564
- pgRollStatus: (variables: PgRollStatusVariables, signal?: AbortSignal | undefined) => Promise<PgRollJobStatusResponse>;
6565
- pgRollJobStatus: (variables: PgRollJobStatusVariables, signal?: AbortSignal | undefined) => Promise<PgRollJobStatusResponse>;
6566
- pgRollMigrationHistory: (variables: PgRollMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<PgRollMigrationHistoryResponse>;
6567
6928
  getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal | undefined) => Promise<ListBranchesResponse>;
6568
6929
  getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal | undefined) => Promise<DBBranch>;
6569
6930
  createBranch: (variables: CreateBranchVariables, signal?: AbortSignal | undefined) => Promise<CreateBranchResponse>;
@@ -6583,11 +6944,19 @@ declare const operationsByTag: {
6583
6944
  getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
6584
6945
  updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
6585
6946
  deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6947
+ getWorkspaceSettings: (variables: GetWorkspaceSettingsVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceSettings>;
6948
+ updateWorkspaceSettings: (variables: UpdateWorkspaceSettingsVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceSettings>;
6586
6949
  getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceMembers>;
6587
6950
  updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6588
6951
  removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6589
6952
  };
6590
6953
  migrations: {
6954
+ applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal | undefined) => Promise<ApplyMigrationResponse>;
6955
+ adaptTable: (variables: AdaptTableVariables, signal?: AbortSignal | undefined) => Promise<ApplyMigrationResponse>;
6956
+ adaptAllTables: (variables: AdaptAllTablesVariables, signal?: AbortSignal | undefined) => Promise<ApplyMigrationResponse>;
6957
+ getBranchMigrationJobStatus: (variables: GetBranchMigrationJobStatusVariables, signal?: AbortSignal | undefined) => Promise<MigrationJobStatusResponse>;
6958
+ getMigrationJobStatus: (variables: GetMigrationJobStatusVariables, signal?: AbortSignal | undefined) => Promise<MigrationJobStatusResponse>;
6959
+ getMigrationHistory: (variables: GetMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<MigrationHistoryResponse>;
6591
6960
  getSchema: (variables: GetSchemaVariables, signal?: AbortSignal | undefined) => Promise<GetSchemaResponse>;
6592
6961
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchMigrationHistoryResponse>;
6593
6962
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<BranchMigrationPlan>;
@@ -6610,6 +6979,10 @@ declare const operationsByTag: {
6610
6979
  deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
6611
6980
  bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
6612
6981
  };
6982
+ database: {
6983
+ getDatabaseSettings: (variables: GetDatabaseSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseSettings>;
6984
+ updateDatabaseSettings: (variables: UpdateDatabaseSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseSettings>;
6985
+ };
6613
6986
  migrationRequests: {
6614
6987
  queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal | undefined) => Promise<QueryMigrationRequestsResponse>;
6615
6988
  createMigrationRequest: (variables: CreateMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<CreateMigrationRequestResponse>;
@@ -6685,7 +7058,7 @@ declare const operationsByTag: {
6685
7058
  listClusters: (variables: ListClustersVariables, signal?: AbortSignal | undefined) => Promise<ListClustersResponse>;
6686
7059
  createCluster: (variables: CreateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterResponse>;
6687
7060
  getCluster: (variables: GetClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterMetadata>;
6688
- updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterMetadata>;
7061
+ updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterUpdateMetadata>;
6689
7062
  };
6690
7063
  databases: {
6691
7064
  getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal | undefined) => Promise<ListDatabasesResponse>;
@@ -6715,6 +7088,8 @@ declare function buildProviderString(provider: HostProvider): string;
6715
7088
  declare function parseWorkspacesUrlParts(url: string): {
6716
7089
  workspace: string;
6717
7090
  region: string;
7091
+ database: string;
7092
+ branch?: string;
6718
7093
  host: HostAliases;
6719
7094
  } | null;
6720
7095
 
@@ -6741,22 +7116,27 @@ type schemas_APIKeyName = APIKeyName;
6741
7116
  type schemas_AccessToken = AccessToken;
6742
7117
  type schemas_AggExpression = AggExpression;
6743
7118
  type schemas_AggExpressionMap = AggExpressionMap;
7119
+ type schemas_ApplyMigrationResponse = ApplyMigrationResponse;
6744
7120
  type schemas_AuthorizationCodeRequest = AuthorizationCodeRequest;
6745
7121
  type schemas_AuthorizationCodeResponse = AuthorizationCodeResponse;
6746
7122
  type schemas_AutoscalingConfig = AutoscalingConfig;
7123
+ type schemas_AutoscalingConfigResponse = AutoscalingConfigResponse;
6747
7124
  type schemas_AverageAgg = AverageAgg;
6748
7125
  type schemas_BoosterExpression = BoosterExpression;
6749
7126
  type schemas_Branch = Branch;
6750
7127
  type schemas_BranchMigration = BranchMigration;
6751
7128
  type schemas_BranchOp = BranchOp;
7129
+ type schemas_BranchSchema = BranchSchema;
6752
7130
  type schemas_BranchWithCopyID = BranchWithCopyID;
6753
7131
  type schemas_ClusterConfiguration = ClusterConfiguration;
7132
+ type schemas_ClusterConfigurationResponse = ClusterConfigurationResponse;
6754
7133
  type schemas_ClusterCreateDetails = ClusterCreateDetails;
6755
7134
  type schemas_ClusterID = ClusterID;
6756
7135
  type schemas_ClusterMetadata = ClusterMetadata;
6757
7136
  type schemas_ClusterResponse = ClusterResponse;
6758
7137
  type schemas_ClusterShortMetadata = ClusterShortMetadata;
6759
7138
  type schemas_ClusterUpdateDetails = ClusterUpdateDetails;
7139
+ type schemas_ClusterUpdateMetadata = ClusterUpdateMetadata;
6760
7140
  type schemas_Column = Column;
6761
7141
  type schemas_ColumnFile = ColumnFile;
6762
7142
  type schemas_ColumnLink = ColumnLink;
@@ -6775,6 +7155,7 @@ type schemas_DailyTimeWindow = DailyTimeWindow;
6775
7155
  type schemas_DataInputRecord = DataInputRecord;
6776
7156
  type schemas_DatabaseGithubSettings = DatabaseGithubSettings;
6777
7157
  type schemas_DatabaseMetadata = DatabaseMetadata;
7158
+ type schemas_DatabaseSettings = DatabaseSettings;
6778
7159
  type schemas_DateHistogramAgg = DateHistogramAgg;
6779
7160
  type schemas_FileAccessID = FileAccessID;
6780
7161
  type schemas_FileItemID = FileItemID;
@@ -6803,17 +7184,25 @@ type schemas_ListDatabasesResponse = ListDatabasesResponse;
6803
7184
  type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
6804
7185
  type schemas_ListRegionsResponse = ListRegionsResponse;
6805
7186
  type schemas_MaintenanceConfig = MaintenanceConfig;
7187
+ type schemas_MaintenanceConfigResponse = MaintenanceConfigResponse;
6806
7188
  type schemas_MaxAgg = MaxAgg;
6807
7189
  type schemas_MediaType = MediaType;
6808
7190
  type schemas_MetricsDatapoint = MetricsDatapoint;
6809
7191
  type schemas_MetricsLatency = MetricsLatency;
6810
7192
  type schemas_Migration = Migration;
6811
7193
  type schemas_MigrationColumnOp = MigrationColumnOp;
7194
+ type schemas_MigrationHistoryItem = MigrationHistoryItem;
7195
+ type schemas_MigrationHistoryResponse = MigrationHistoryResponse;
7196
+ type schemas_MigrationJobID = MigrationJobID;
7197
+ type schemas_MigrationJobStatus = MigrationJobStatus;
7198
+ type schemas_MigrationJobStatusResponse = MigrationJobStatusResponse;
7199
+ type schemas_MigrationJobType = MigrationJobType;
6812
7200
  type schemas_MigrationObject = MigrationObject;
6813
7201
  type schemas_MigrationOp = MigrationOp;
6814
7202
  type schemas_MigrationRequest = MigrationRequest;
6815
7203
  type schemas_MigrationRequestNumber = MigrationRequestNumber;
6816
7204
  type schemas_MigrationTableOp = MigrationTableOp;
7205
+ type schemas_MigrationType = MigrationType;
6817
7206
  type schemas_MinAgg = MinAgg;
6818
7207
  type schemas_NumericHistogramAgg = NumericHistogramAgg;
6819
7208
  type schemas_OAuthAccessToken = OAuthAccessToken;
@@ -6827,14 +7216,6 @@ type schemas_PageResponse = PageResponse;
6827
7216
  type schemas_PageSize = PageSize;
6828
7217
  type schemas_PageToken = PageToken;
6829
7218
  type schemas_PercentilesAgg = PercentilesAgg;
6830
- type schemas_PgRollApplyMigrationResponse = PgRollApplyMigrationResponse;
6831
- type schemas_PgRollJobStatus = PgRollJobStatus;
6832
- type schemas_PgRollJobStatusResponse = PgRollJobStatusResponse;
6833
- type schemas_PgRollJobType = PgRollJobType;
6834
- type schemas_PgRollMigrationHistoryItem = PgRollMigrationHistoryItem;
6835
- type schemas_PgRollMigrationHistoryResponse = PgRollMigrationHistoryResponse;
6836
- type schemas_PgRollMigrationJobID = PgRollMigrationJobID;
6837
- type schemas_PgRollMigrationType = PgRollMigrationType;
6838
7219
  type schemas_PrefixExpression = PrefixExpression;
6839
7220
  type schemas_ProjectionConfig = ProjectionConfig;
6840
7221
  type schemas_QueryColumnsProjection = QueryColumnsProjection;
@@ -6887,8 +7268,9 @@ type schemas_WorkspaceMember = WorkspaceMember;
6887
7268
  type schemas_WorkspaceMembers = WorkspaceMembers;
6888
7269
  type schemas_WorkspaceMeta = WorkspaceMeta;
6889
7270
  type schemas_WorkspacePlan = WorkspacePlan;
7271
+ type schemas_WorkspaceSettings = WorkspaceSettings;
6890
7272
  declare namespace schemas {
6891
- 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 };
7273
+ 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, BranchMetadata$1 as BranchMetadata, schemas_BranchMigration as BranchMigration, BranchName$1 as BranchName, schemas_BranchOp as BranchOp, schemas_BranchSchema as BranchSchema, schemas_BranchWithCopyID as BranchWithCopyID, schemas_ClusterConfiguration as ClusterConfiguration, schemas_ClusterConfigurationResponse as ClusterConfigurationResponse, 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_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_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_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_MaintenanceConfigResponse as MaintenanceConfigResponse, 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_MigrationHistoryItem as MigrationHistoryItem, schemas_MigrationHistoryResponse as MigrationHistoryResponse, schemas_MigrationJobID as MigrationJobID, schemas_MigrationJobStatus as MigrationJobStatus, schemas_MigrationJobStatusResponse as MigrationJobStatusResponse, schemas_MigrationJobType as MigrationJobType, 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_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, schemas_PageResponse as PageResponse, schemas_PageSize as PageSize, schemas_PageToken as PageToken, schemas_PercentilesAgg as PercentilesAgg, 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, schemas_WorkspaceSettings as WorkspaceSettings, XataRecord$1 as XataRecord };
6892
7274
  }
6893
7275
 
6894
7276
  type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
@@ -7072,6 +7454,19 @@ declare class BranchApi {
7072
7454
  gitBranch?: string;
7073
7455
  fallbackBranch?: string;
7074
7456
  }): Promise<ResolveBranchResponse>;
7457
+ pgRollMigrationHistory({ workspace, region, database, branch }: {
7458
+ workspace: WorkspaceID;
7459
+ region: string;
7460
+ database: DBName$1;
7461
+ branch: BranchName$1;
7462
+ }): Promise<MigrationHistoryResponse>;
7463
+ applyMigration({ workspace, region, database, branch, migration }: {
7464
+ workspace: WorkspaceID;
7465
+ region: string;
7466
+ database: DBName$1;
7467
+ branch: BranchName$1;
7468
+ migration: Migration;
7469
+ }): Promise<ApplyMigrationResponse>;
7075
7470
  }
7076
7471
  declare class TableApi {
7077
7472
  private extraProps;
@@ -7549,6 +7944,12 @@ declare class MigrationsApi {
7549
7944
  branch: BranchName$1;
7550
7945
  migrations: MigrationObject[];
7551
7946
  }): Promise<SchemaUpdateResponse>;
7947
+ getSchema({ workspace, region, database, branch }: {
7948
+ workspace: WorkspaceID;
7949
+ region: string;
7950
+ database: DBName$1;
7951
+ branch: BranchName$1;
7952
+ }): Promise<GetSchemaResponse>;
7552
7953
  }
7553
7954
  declare class DatabaseApi {
7554
7955
  private extraProps;
@@ -7800,6 +8201,580 @@ interface ImageTransformations {
7800
8201
  declare function transformImage(url: string, ...transformations: ImageTransformations[]): string;
7801
8202
  declare function transformImage(url: string | undefined, ...transformations: ImageTransformations[]): string | undefined;
7802
8203
 
8204
+ declare class Buffer extends Uint8Array {
8205
+ /**
8206
+ * Allocates a new buffer containing the given `str`.
8207
+ *
8208
+ * @param str String to store in buffer.
8209
+ * @param encoding Encoding to use, optional. Default is `utf8`.
8210
+ */
8211
+ constructor(str: string, encoding?: Encoding);
8212
+ /**
8213
+ * Allocates a new buffer of `size` octets.
8214
+ *
8215
+ * @param size Count of octets to allocate.
8216
+ */
8217
+ constructor(size: number);
8218
+ /**
8219
+ * Allocates a new buffer containing the given `array` of octets.
8220
+ *
8221
+ * @param array The octets to store.
8222
+ */
8223
+ constructor(array: Uint8Array);
8224
+ /**
8225
+ * Allocates a new buffer containing the given `array` of octet values.
8226
+ *
8227
+ * @param array
8228
+ */
8229
+ constructor(array: number[]);
8230
+ /**
8231
+ * Allocates a new buffer containing the given `array` of octet values.
8232
+ *
8233
+ * @param array
8234
+ * @param encoding
8235
+ */
8236
+ constructor(array: number[], encoding: Encoding);
8237
+ /**
8238
+ * Copies the passed `buffer` data onto a new `Buffer` instance.
8239
+ *
8240
+ * @param buffer
8241
+ */
8242
+ constructor(buffer: Buffer);
8243
+ /**
8244
+ * When passed a reference to the .buffer property of a TypedArray instance, the newly created Buffer will share
8245
+ * the same allocated memory as the TypedArray. The optional `byteOffset` and `length` arguments specify a memory
8246
+ * range within the `arrayBuffer` that will be shared by the Buffer.
8247
+ *
8248
+ * @param buffer The .buffer property of a TypedArray or a new ArrayBuffer().
8249
+ * @param byteOffset
8250
+ * @param length
8251
+ */
8252
+ constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number);
8253
+ /**
8254
+ * Return JSON representation of the buffer.
8255
+ */
8256
+ toJSON(): {
8257
+ type: 'Buffer';
8258
+ data: number[];
8259
+ };
8260
+ /**
8261
+ * Writes `string` to the buffer at `offset` according to the character encoding in `encoding`. The `length`
8262
+ * parameter is the number of bytes to write. If the buffer does not contain enough space to fit the entire string,
8263
+ * only part of `string` will be written. However, partially encoded characters will not be written.
8264
+ *
8265
+ * @param string String to write to `buf`.
8266
+ * @param encoding The character encoding of `string`. Default: `utf8`.
8267
+ */
8268
+ write(string: string, encoding?: Encoding): number;
8269
+ /**
8270
+ * Writes `string` to the buffer at `offset` according to the character encoding in `encoding`. The `length`
8271
+ * parameter is the number of bytes to write. If the buffer does not contain enough space to fit the entire string,
8272
+ * only part of `string` will be written. However, partially encoded characters will not be written.
8273
+ *
8274
+ * @param string String to write to `buf`.
8275
+ * @param offset Number of bytes to skip before starting to write `string`. Default: `0`.
8276
+ * @param length Maximum number of bytes to write: Default: `buf.length - offset`.
8277
+ * @param encoding The character encoding of `string`. Default: `utf8`.
8278
+ */
8279
+ write(string: string, offset?: number, length?: number, encoding?: Encoding): number;
8280
+ /**
8281
+ * Decodes the buffer to a string according to the specified character encoding.
8282
+ * Passing `start` and `end` will decode only a subset of the buffer.
8283
+ *
8284
+ * Note that if the encoding is `utf8` and a byte sequence in the input is not valid UTF-8, then each invalid byte
8285
+ * will be replaced with `U+FFFD`.
8286
+ *
8287
+ * @param encoding
8288
+ * @param start
8289
+ * @param end
8290
+ */
8291
+ toString(encoding?: Encoding, start?: number, end?: number): string;
8292
+ /**
8293
+ * Returns true if this buffer's is equal to the provided buffer, meaning they share the same exact data.
8294
+ *
8295
+ * @param otherBuffer
8296
+ */
8297
+ equals(otherBuffer: Buffer): boolean;
8298
+ /**
8299
+ * Compares the buffer with `otherBuffer` and returns a number indicating whether the buffer comes before, after,
8300
+ * or is the same as `otherBuffer` in sort order. Comparison is based on the actual sequence of bytes in each
8301
+ * buffer.
8302
+ *
8303
+ * - `0` is returned if `otherBuffer` is the same as this buffer.
8304
+ * - `1` is returned if `otherBuffer` should come before this buffer when sorted.
8305
+ * - `-1` is returned if `otherBuffer` should come after this buffer when sorted.
8306
+ *
8307
+ * @param otherBuffer The buffer to compare to.
8308
+ * @param targetStart The offset within `otherBuffer` at which to begin comparison.
8309
+ * @param targetEnd The offset within `otherBuffer` at which to end comparison (exclusive).
8310
+ * @param sourceStart The offset within this buffer at which to begin comparison.
8311
+ * @param sourceEnd The offset within this buffer at which to end the comparison (exclusive).
8312
+ */
8313
+ compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
8314
+ /**
8315
+ * Copies data from a region of this buffer to a region in `targetBuffer`, even if the `targetBuffer` memory
8316
+ * region overlaps with this buffer.
8317
+ *
8318
+ * @param targetBuffer The target buffer to copy into.
8319
+ * @param targetStart The offset within `targetBuffer` at which to begin writing.
8320
+ * @param sourceStart The offset within this buffer at which to begin copying.
8321
+ * @param sourceEnd The offset within this buffer at which to end copying (exclusive).
8322
+ */
8323
+ copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
8324
+ /**
8325
+ * Returns a new `Buffer` that references the same memory as the original, but offset and cropped by the `start`
8326
+ * and `end` indices. This is the same behavior as `buf.subarray()`.
8327
+ *
8328
+ * This method is not compatible with the `Uint8Array.prototype.slice()`, which is a superclass of Buffer. To copy
8329
+ * the slice, use `Uint8Array.prototype.slice()`.
8330
+ *
8331
+ * @param start
8332
+ * @param end
8333
+ */
8334
+ slice(start?: number, end?: number): Buffer;
8335
+ /**
8336
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as little-endian. Supports up to 48 bits
8337
+ * of accuracy. Behavior is undefined when value is anything other than an unsigned integer.
8338
+ *
8339
+ * @param value Number to write.
8340
+ * @param offset Number of bytes to skip before starting to write.
8341
+ * @param byteLength Number of bytes to write, between 0 and 6.
8342
+ * @param noAssert
8343
+ * @returns `offset` plus the number of bytes written.
8344
+ */
8345
+ writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
8346
+ /**
8347
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as big-endian. Supports up to 48 bits of
8348
+ * accuracy. Behavior is undefined when `value` is anything other than an unsigned integer.
8349
+ *
8350
+ * @param value Number to write.
8351
+ * @param offset Number of bytes to skip before starting to write.
8352
+ * @param byteLength Number of bytes to write, between 0 and 6.
8353
+ * @param noAssert
8354
+ * @returns `offset` plus the number of bytes written.
8355
+ */
8356
+ writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
8357
+ /**
8358
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as little-endian. Supports up to 48 bits
8359
+ * of accuracy. Behavior is undefined when `value` is anything other than a signed integer.
8360
+ *
8361
+ * @param value Number to write.
8362
+ * @param offset Number of bytes to skip before starting to write.
8363
+ * @param byteLength Number of bytes to write, between 0 and 6.
8364
+ * @param noAssert
8365
+ * @returns `offset` plus the number of bytes written.
8366
+ */
8367
+ writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
8368
+ /**
8369
+ * Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as big-endian. Supports up to 48 bits
8370
+ * of accuracy. Behavior is undefined when `value` is anything other than a signed integer.
8371
+ *
8372
+ * @param value Number to write.
8373
+ * @param offset Number of bytes to skip before starting to write.
8374
+ * @param byteLength Number of bytes to write, between 0 and 6.
8375
+ * @param noAssert
8376
+ * @returns `offset` plus the number of bytes written.
8377
+ */
8378
+ writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
8379
+ /**
8380
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an
8381
+ * unsigned, little-endian integer supporting up to 48 bits of accuracy.
8382
+ *
8383
+ * @param offset Number of bytes to skip before starting to read.
8384
+ * @param byteLength Number of bytes to read, between 0 and 6.
8385
+ * @param noAssert
8386
+ */
8387
+ readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
8388
+ /**
8389
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an
8390
+ * unsigned, big-endian integer supporting up to 48 bits of accuracy.
8391
+ *
8392
+ * @param offset Number of bytes to skip before starting to read.
8393
+ * @param byteLength Number of bytes to read, between 0 and 6.
8394
+ * @param noAssert
8395
+ */
8396
+ readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
8397
+ /**
8398
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a
8399
+ * little-endian, two's complement signed value supporting up to 48 bits of accuracy.
8400
+ *
8401
+ * @param offset Number of bytes to skip before starting to read.
8402
+ * @param byteLength Number of bytes to read, between 0 and 6.
8403
+ * @param noAssert
8404
+ */
8405
+ readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
8406
+ /**
8407
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a
8408
+ * big-endian, two's complement signed value supporting up to 48 bits of accuracy.
8409
+ *
8410
+ * @param offset Number of bytes to skip before starting to read.
8411
+ * @param byteLength Number of bytes to read, between 0 and 6.
8412
+ * @param noAssert
8413
+ */
8414
+ readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
8415
+ /**
8416
+ * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
8417
+ *
8418
+ * @param offset Number of bytes to skip before starting to read.
8419
+ * @param noAssert
8420
+ */
8421
+ readUInt8(offset: number, noAssert?: boolean): number;
8422
+ /**
8423
+ * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`.
8424
+ *
8425
+ * @param offset Number of bytes to skip before starting to read.
8426
+ * @param noAssert
8427
+ */
8428
+ readUInt16LE(offset: number, noAssert?: boolean): number;
8429
+ /**
8430
+ * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified `offset`.
8431
+ *
8432
+ * @param offset Number of bytes to skip before starting to read.
8433
+ * @param noAssert
8434
+ */
8435
+ readUInt16BE(offset: number, noAssert?: boolean): number;
8436
+ /**
8437
+ * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified `offset`.
8438
+ *
8439
+ * @param offset Number of bytes to skip before starting to read.
8440
+ * @param noAssert
8441
+ */
8442
+ readUInt32LE(offset: number, noAssert?: boolean): number;
8443
+ /**
8444
+ * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified `offset`.
8445
+ *
8446
+ * @param offset Number of bytes to skip before starting to read.
8447
+ * @param noAssert
8448
+ */
8449
+ readUInt32BE(offset: number, noAssert?: boolean): number;
8450
+ /**
8451
+ * Reads a signed 8-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer` are interpreted
8452
+ * as two's complement signed values.
8453
+ *
8454
+ * @param offset Number of bytes to skip before starting to read.
8455
+ * @param noAssert
8456
+ */
8457
+ readInt8(offset: number, noAssert?: boolean): number;
8458
+ /**
8459
+ * Reads a signed, little-endian 16-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer`
8460
+ * are interpreted as two's complement signed values.
8461
+ *
8462
+ * @param offset Number of bytes to skip before starting to read.
8463
+ * @param noAssert
8464
+ */
8465
+ readInt16LE(offset: number, noAssert?: boolean): number;
8466
+ /**
8467
+ * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer`
8468
+ * are interpreted as two's complement signed values.
8469
+ *
8470
+ * @param offset Number of bytes to skip before starting to read.
8471
+ * @param noAssert
8472
+ */
8473
+ readInt16BE(offset: number, noAssert?: boolean): number;
8474
+ /**
8475
+ * Reads a signed, little-endian 32-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer`
8476
+ * are interpreted as two's complement signed values.
8477
+ *
8478
+ * @param offset Number of bytes to skip before starting to read.
8479
+ * @param noAssert
8480
+ */
8481
+ readInt32LE(offset: number, noAssert?: boolean): number;
8482
+ /**
8483
+ * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. Integers read from a `Buffer`
8484
+ * are interpreted as two's complement signed values.
8485
+ *
8486
+ * @param offset Number of bytes to skip before starting to read.
8487
+ * @param noAssert
8488
+ */
8489
+ readInt32BE(offset: number, noAssert?: boolean): number;
8490
+ /**
8491
+ * Interprets `buf` as an array of unsigned 16-bit integers and swaps the byte order in-place.
8492
+ * Throws a `RangeError` if `buf.length` is not a multiple of 2.
8493
+ */
8494
+ swap16(): Buffer;
8495
+ /**
8496
+ * Interprets `buf` as an array of unsigned 32-bit integers and swaps the byte order in-place.
8497
+ * Throws a `RangeError` if `buf.length` is not a multiple of 4.
8498
+ */
8499
+ swap32(): Buffer;
8500
+ /**
8501
+ * Interprets `buf` as an array of unsigned 64-bit integers and swaps the byte order in-place.
8502
+ * Throws a `RangeError` if `buf.length` is not a multiple of 8.
8503
+ */
8504
+ swap64(): Buffer;
8505
+ /**
8506
+ * Swaps two octets.
8507
+ *
8508
+ * @param b
8509
+ * @param n
8510
+ * @param m
8511
+ */
8512
+ private _swap;
8513
+ /**
8514
+ * Writes `value` to `buf` at the specified `offset`. The `value` must be a valid unsigned 8-bit integer.
8515
+ * Behavior is undefined when `value` is anything other than an unsigned 8-bit integer.
8516
+ *
8517
+ * @param value Number to write.
8518
+ * @param offset Number of bytes to skip before starting to write.
8519
+ * @param noAssert
8520
+ * @returns `offset` plus the number of bytes written.
8521
+ */
8522
+ writeUInt8(value: number, offset: number, noAssert?: boolean): number;
8523
+ /**
8524
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit
8525
+ * integer. Behavior is undefined when `value` is anything other than an unsigned 16-bit integer.
8526
+ *
8527
+ * @param value Number to write.
8528
+ * @param offset Number of bytes to skip before starting to write.
8529
+ * @param noAssert
8530
+ * @returns `offset` plus the number of bytes written.
8531
+ */
8532
+ writeUInt16LE(value: number | string, offset: number, noAssert?: boolean): number;
8533
+ /**
8534
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit
8535
+ * integer. Behavior is undefined when `value` is anything other than an unsigned 16-bit integer.
8536
+ *
8537
+ * @param value Number to write.
8538
+ * @param offset Number of bytes to skip before starting to write.
8539
+ * @param noAssert
8540
+ * @returns `offset` plus the number of bytes written.
8541
+ */
8542
+ writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
8543
+ /**
8544
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit
8545
+ * integer. Behavior is undefined when `value` is anything other than an unsigned 32-bit integer.
8546
+ *
8547
+ * @param value Number to write.
8548
+ * @param offset Number of bytes to skip before starting to write.
8549
+ * @param noAssert
8550
+ * @returns `offset` plus the number of bytes written.
8551
+ */
8552
+ writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
8553
+ /**
8554
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit
8555
+ * integer. Behavior is undefined when `value` is anything other than an unsigned 32-bit integer.
8556
+ *
8557
+ * @param value Number to write.
8558
+ * @param offset Number of bytes to skip before starting to write.
8559
+ * @param noAssert
8560
+ * @returns `offset` plus the number of bytes written.
8561
+ */
8562
+ writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
8563
+ /**
8564
+ * Writes `value` to `buf` at the specified `offset`. The `value` must be a valid signed 8-bit integer.
8565
+ * Behavior is undefined when `value` is anything other than a signed 8-bit integer.
8566
+ *
8567
+ * @param value Number to write.
8568
+ * @param offset Number of bytes to skip before starting to write.
8569
+ * @param noAssert
8570
+ * @returns `offset` plus the number of bytes written.
8571
+ */
8572
+ writeInt8(value: number, offset: number, noAssert?: boolean): number;
8573
+ /**
8574
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit
8575
+ * integer. Behavior is undefined when `value` is anything other than a signed 16-bit integer.
8576
+ *
8577
+ * @param value Number to write.
8578
+ * @param offset Number of bytes to skip before starting to write.
8579
+ * @param noAssert
8580
+ * @returns `offset` plus the number of bytes written.
8581
+ */
8582
+ writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
8583
+ /**
8584
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit
8585
+ * integer. Behavior is undefined when `value` is anything other than a signed 16-bit integer.
8586
+ *
8587
+ * @param value Number to write.
8588
+ * @param offset Number of bytes to skip before starting to write.
8589
+ * @param noAssert
8590
+ * @returns `offset` plus the number of bytes written.
8591
+ */
8592
+ writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
8593
+ /**
8594
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit
8595
+ * integer. Behavior is undefined when `value` is anything other than a signed 32-bit integer.
8596
+ *
8597
+ * @param value Number to write.
8598
+ * @param offset Number of bytes to skip before starting to write.
8599
+ * @param noAssert
8600
+ * @returns `offset` plus the number of bytes written.
8601
+ */
8602
+ writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
8603
+ /**
8604
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit
8605
+ * integer. Behavior is undefined when `value` is anything other than a signed 32-bit integer.
8606
+ *
8607
+ * @param value Number to write.
8608
+ * @param offset Number of bytes to skip before starting to write.
8609
+ * @param noAssert
8610
+ * @returns `offset` plus the number of bytes written.
8611
+ */
8612
+ writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
8613
+ /**
8614
+ * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, the entire `buf` will be
8615
+ * filled. The `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or integer. If the resulting
8616
+ * integer is greater than `255` (decimal), then `buf` will be filled with `value & 255`.
8617
+ *
8618
+ * If the final write of a `fill()` operation falls on a multi-byte character, then only the bytes of that
8619
+ * character that fit into `buf` are written.
8620
+ *
8621
+ * If `value` contains invalid characters, it is truncated; if no valid fill data remains, an exception is thrown.
8622
+ *
8623
+ * @param value
8624
+ * @param encoding
8625
+ */
8626
+ fill(value: any, offset?: number, end?: number, encoding?: Encoding): this;
8627
+ /**
8628
+ * Returns the index of the specified value.
8629
+ *
8630
+ * If `value` is:
8631
+ * - a string, `value` is interpreted according to the character encoding in `encoding`.
8632
+ * - a `Buffer` or `Uint8Array`, `value` will be used in its entirety. To compare a partial Buffer, use `slice()`.
8633
+ * - a number, `value` will be interpreted as an unsigned 8-bit integer value between `0` and `255`.
8634
+ *
8635
+ * Any other types will throw a `TypeError`.
8636
+ *
8637
+ * @param value What to search for.
8638
+ * @param byteOffset Where to begin searching in `buf`. If negative, then calculated from the end.
8639
+ * @param encoding If `value` is a string, this is the encoding used to search.
8640
+ * @returns The index of the first occurrence of `value` in `buf`, or `-1` if not found.
8641
+ */
8642
+ indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: Encoding): number;
8643
+ /**
8644
+ * Gets the last index of the specified value.
8645
+ *
8646
+ * @see indexOf()
8647
+ * @param value
8648
+ * @param byteOffset
8649
+ * @param encoding
8650
+ */
8651
+ lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: Encoding): number;
8652
+ private _bidirectionalIndexOf;
8653
+ /**
8654
+ * Equivalent to `buf.indexOf() !== -1`.
8655
+ *
8656
+ * @param value
8657
+ * @param byteOffset
8658
+ * @param encoding
8659
+ */
8660
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: Encoding): boolean;
8661
+ /**
8662
+ * Allocates a new Buffer using an `array` of octet values.
8663
+ *
8664
+ * @param array
8665
+ */
8666
+ static from(array: number[]): Buffer;
8667
+ /**
8668
+ * When passed a reference to the .buffer property of a TypedArray instance, the newly created Buffer will share
8669
+ * the same allocated memory as the TypedArray. The optional `byteOffset` and `length` arguments specify a memory
8670
+ * range within the `arrayBuffer` that will be shared by the Buffer.
8671
+ *
8672
+ * @param buffer The .buffer property of a TypedArray or a new ArrayBuffer().
8673
+ * @param byteOffset
8674
+ * @param length
8675
+ */
8676
+ static from(buffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
8677
+ /**
8678
+ * Copies the passed `buffer` data onto a new Buffer instance.
8679
+ *
8680
+ * @param buffer
8681
+ */
8682
+ static from(buffer: Buffer | Uint8Array): Buffer;
8683
+ /**
8684
+ * Creates a new Buffer containing the given string `str`. If provided, the `encoding` parameter identifies the
8685
+ * character encoding.
8686
+ *
8687
+ * @param str String to store in buffer.
8688
+ * @param encoding Encoding to use, optional. Default is `utf8`.
8689
+ */
8690
+ static from(str: string, encoding?: Encoding): Buffer;
8691
+ /**
8692
+ * Returns true if `obj` is a Buffer.
8693
+ *
8694
+ * @param obj
8695
+ */
8696
+ static isBuffer(obj: any): obj is Buffer;
8697
+ /**
8698
+ * Returns true if `encoding` is a supported encoding.
8699
+ *
8700
+ * @param encoding
8701
+ */
8702
+ static isEncoding(encoding: string): encoding is Encoding;
8703
+ /**
8704
+ * Gives the actual byte length of a string for an encoding. This is not the same as `string.length` since that
8705
+ * returns the number of characters in the string.
8706
+ *
8707
+ * @param string The string to test.
8708
+ * @param encoding The encoding to use for calculation. Defaults is `utf8`.
8709
+ */
8710
+ static byteLength(string: string | Buffer | ArrayBuffer, encoding?: Encoding): number;
8711
+ /**
8712
+ * Returns a Buffer which is the result of concatenating all the buffers in the list together.
8713
+ *
8714
+ * - If the list has no items, or if the `totalLength` is 0, then it returns a zero-length buffer.
8715
+ * - If the list has exactly one item, then the first item is returned.
8716
+ * - If the list has more than one item, then a new buffer is created.
8717
+ *
8718
+ * It is faster to provide the `totalLength` if it is known. However, it will be calculated if not provided at
8719
+ * a small computational expense.
8720
+ *
8721
+ * @param list An array of Buffer objects to concatenate.
8722
+ * @param totalLength Total length of the buffers when concatenated.
8723
+ */
8724
+ static concat(list: Uint8Array[], totalLength?: number): Buffer;
8725
+ /**
8726
+ * The same as `buf1.compare(buf2)`.
8727
+ */
8728
+ static compare(buf1: Uint8Array, buf2: Uint8Array): number;
8729
+ /**
8730
+ * Allocates a new buffer of `size` octets.
8731
+ *
8732
+ * @param size The number of octets to allocate.
8733
+ * @param fill If specified, the buffer will be initialized by calling `buf.fill(fill)`, or with zeroes otherwise.
8734
+ * @param encoding The encoding used for the call to `buf.fill()` while initializing.
8735
+ */
8736
+ static alloc(size: number, fill?: string | Buffer | number, encoding?: Encoding): Buffer;
8737
+ /**
8738
+ * Allocates a new buffer of `size` octets without initializing memory. The contents of the buffer are unknown.
8739
+ *
8740
+ * @param size
8741
+ */
8742
+ static allocUnsafe(size: number): Buffer;
8743
+ /**
8744
+ * Returns true if the given `obj` is an instance of `type`.
8745
+ *
8746
+ * @param obj
8747
+ * @param type
8748
+ */
8749
+ private static _isInstance;
8750
+ private static _checked;
8751
+ private static _blitBuffer;
8752
+ private static _utf8Write;
8753
+ private static _asciiWrite;
8754
+ private static _base64Write;
8755
+ private static _ucs2Write;
8756
+ private static _hexWrite;
8757
+ private static _utf8ToBytes;
8758
+ private static _base64ToBytes;
8759
+ private static _asciiToBytes;
8760
+ private static _utf16leToBytes;
8761
+ private static _hexSlice;
8762
+ private static _base64Slice;
8763
+ private static _utf8Slice;
8764
+ private static _decodeCodePointsArray;
8765
+ private static _asciiSlice;
8766
+ private static _latin1Slice;
8767
+ private static _utf16leSlice;
8768
+ private static _arrayIndexOf;
8769
+ private static _checkOffset;
8770
+ private static _checkInt;
8771
+ private static _getEncoding;
8772
+ }
8773
+ /**
8774
+ * The encodings that are supported in both native and polyfilled `Buffer` instances.
8775
+ */
8776
+ type Encoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'binary' | 'hex' | 'latin1' | 'base64';
8777
+
7803
8778
  type XataFileEditableFields = Partial<Pick<XataArrayFile, keyof InputFileEntry>>;
7804
8779
  type XataFileFields = Partial<Pick<XataArrayFile, {
7805
8780
  [K in StringKeys<XataArrayFile>]: XataArrayFile[K] extends Function ? never : K;
@@ -8320,10 +9295,11 @@ type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
8320
9295
  declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
8321
9296
  #private;
8322
9297
  private db;
8323
- constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
9298
+ constructor(db: SchemaPluginResult<Schemas>);
8324
9299
  build(pluginOptions: XataPluginOptions): SearchPluginResult<Schemas>;
8325
9300
  }
8326
- type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
9301
+ type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata' | 'xata'> & {
9302
+ xata: XataRecordMetadata & SearchExtraProperties;
8327
9303
  getMetadata: () => XataRecordMetadata & SearchExtraProperties;
8328
9304
  };
8329
9305
  type SearchExtraProperties = {
@@ -8644,7 +9620,7 @@ type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions |
8644
9620
  declare class Query<Record extends XataRecord, Result extends XataRecord = Record> implements Paginable<Record, Result> {
8645
9621
  #private;
8646
9622
  readonly meta: PaginationQueryMeta;
8647
- readonly records: RecordArray<Result>;
9623
+ readonly records: PageRecordArray<Result>;
8648
9624
  constructor(repository: RestRepository<Record> | null, table: {
8649
9625
  name: string;
8650
9626
  schema?: Table;
@@ -8772,25 +9748,25 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
8772
9748
  * Performs the query in the database and returns a set of results.
8773
9749
  * @returns An array of records from the database.
8774
9750
  */
8775
- getMany(): Promise<RecordArray<Result>>;
9751
+ getMany(): Promise<PageRecordArray<Result>>;
8776
9752
  /**
8777
9753
  * Performs the query in the database and returns a set of results.
8778
9754
  * @param options Additional options to be used when performing the query.
8779
9755
  * @returns An array of records from the database.
8780
9756
  */
8781
- getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
9757
+ getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<PageRecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
8782
9758
  /**
8783
9759
  * Performs the query in the database and returns a set of results.
8784
9760
  * @param options Additional options to be used when performing the query.
8785
9761
  * @returns An array of records from the database.
8786
9762
  */
8787
- getMany(options: OmitBy<QueryOptions<Record>, 'columns'>): Promise<RecordArray<Result>>;
9763
+ getMany(options: OmitBy<QueryOptions<Record>, 'columns'>): Promise<PageRecordArray<Result>>;
8788
9764
  /**
8789
9765
  * Performs the query in the database and returns all the results.
8790
9766
  * Warning: If there are a large number of results, this method can have performance implications.
8791
9767
  * @returns An array of records from the database.
8792
9768
  */
8793
- getAll(): Promise<Result[]>;
9769
+ getAll(): Promise<RecordArray<Result>>;
8794
9770
  /**
8795
9771
  * Performs the query in the database and returns all the results.
8796
9772
  * Warning: If there are a large number of results, this method can have performance implications.
@@ -8799,7 +9775,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
8799
9775
  */
8800
9776
  getAll<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
8801
9777
  batchSize?: number;
8802
- }>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>[]>;
9778
+ }>(options: Options): Promise<RecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
8803
9779
  /**
8804
9780
  * Performs the query in the database and returns all the results.
8805
9781
  * Warning: If there are a large number of results, this method can have performance implications.
@@ -8808,7 +9784,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
8808
9784
  */
8809
9785
  getAll(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'> & {
8810
9786
  batchSize?: number;
8811
- }): Promise<Result[]>;
9787
+ }): Promise<RecordArray<Result>>;
8812
9788
  /**
8813
9789
  * Performs the query in the database and returns the first result.
8814
9790
  * @returns The first record that matches the query, or null if no record matched the query.
@@ -8892,7 +9868,7 @@ type PaginationQueryMeta = {
8892
9868
  };
8893
9869
  interface Paginable<Record extends XataRecord, Result extends XataRecord = Record> {
8894
9870
  meta: PaginationQueryMeta;
8895
- records: RecordArray<Result>;
9871
+ records: PageRecordArray<Result>;
8896
9872
  nextPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
8897
9873
  previousPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
8898
9874
  startPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
@@ -8912,7 +9888,7 @@ declare class Page<Record extends XataRecord, Result extends XataRecord = Record
8912
9888
  /**
8913
9889
  * The set of results for this page.
8914
9890
  */
8915
- readonly records: RecordArray<Result>;
9891
+ readonly records: PageRecordArray<Result>;
8916
9892
  constructor(query: Query<Record, Result>, meta: PaginationQueryMeta, records?: Result[]);
8917
9893
  /**
8918
9894
  * Retrieves the next page of results.
@@ -8966,6 +9942,14 @@ declare const PAGINATION_MAX_OFFSET = 49000;
8966
9942
  declare const PAGINATION_DEFAULT_OFFSET = 0;
8967
9943
  declare function isCursorPaginationOptions(options: Record<string, unknown> | undefined | null): options is CursorNavigationOptions;
8968
9944
  declare class RecordArray<Result extends XataRecord> extends Array<Result> {
9945
+ constructor(overrideRecords?: Result[]);
9946
+ static parseConstructorParams(...args: any[]): any[];
9947
+ toArray(): Result[];
9948
+ toSerializable(): JSONData<Result>[];
9949
+ toString(): string;
9950
+ map<U>(callbackfn: (value: Result, index: number, array: Result[]) => U, thisArg?: any): U[];
9951
+ }
9952
+ declare class PageRecordArray<Result extends XataRecord> extends Array<Result> {
8969
9953
  #private;
8970
9954
  constructor(page: Paginable<any, Result>, overrideRecords?: Result[]);
8971
9955
  static parseConstructorParams(...args: any[]): any[];
@@ -8978,25 +9962,25 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
8978
9962
  *
8979
9963
  * @returns A new array of objects
8980
9964
  */
8981
- nextPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9965
+ nextPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
8982
9966
  /**
8983
9967
  * Retrieve previous page of records
8984
9968
  *
8985
9969
  * @returns A new array of objects
8986
9970
  */
8987
- previousPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9971
+ previousPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
8988
9972
  /**
8989
9973
  * Retrieve start page of records
8990
9974
  *
8991
9975
  * @returns A new array of objects
8992
9976
  */
8993
- startPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9977
+ startPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
8994
9978
  /**
8995
9979
  * Retrieve end page of records
8996
9980
  *
8997
9981
  * @returns A new array of objects
8998
9982
  */
8999
- endPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9983
+ endPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
9000
9984
  /**
9001
9985
  * @returns Boolean indicating if there is a next page
9002
9986
  */
@@ -9733,7 +10717,7 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
9733
10717
  } : {
9734
10718
  [K in PropertyName]?: InnerType<Type, Tables, LinkedTable> | null;
9735
10719
  } : never : never;
9736
- 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;
10720
+ 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;
9737
10721
 
9738
10722
  /**
9739
10723
  * Operator to restrict results to only values that are greater than the given value.
@@ -9786,11 +10770,11 @@ declare const le: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
9786
10770
  /**
9787
10771
  * Operator to restrict results to only values that are not null.
9788
10772
  */
9789
- declare const exists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
10773
+ declare const exists: <T>(column?: FilterColumns<T>) => ExistanceFilter<T>;
9790
10774
  /**
9791
10775
  * Operator to restrict results to only values that are null.
9792
10776
  */
9793
- declare const notExists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
10777
+ declare const notExists: <T>(column?: FilterColumns<T>) => ExistanceFilter<T>;
9794
10778
  /**
9795
10779
  * Operator to restrict results to only values that start with the given prefix.
9796
10780
  */
@@ -9852,7 +10836,7 @@ type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
9852
10836
  };
9853
10837
  declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
9854
10838
  #private;
9855
- constructor(schemaTables?: Table[]);
10839
+ constructor();
9856
10840
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
9857
10841
  }
9858
10842
 
@@ -9893,15 +10877,78 @@ declare class FilesPlugin<Schemas extends Record<string, XataRecord>> extends Xa
9893
10877
  }
9894
10878
 
9895
10879
  type SQLQueryParams<T = any[]> = {
10880
+ /**
10881
+ * The SQL statement to execute.
10882
+ * @example
10883
+ * ```ts
10884
+ * const { records } = await xata.sql<TeamsRecord>({
10885
+ * statement: `SELECT * FROM teams WHERE name = $1`,
10886
+ * params: ['A name']
10887
+ * });
10888
+ * ```
10889
+ *
10890
+ * Be careful when using this with user input and use parametrized statements to avoid SQL injection.
10891
+ */
9896
10892
  statement: string;
10893
+ /**
10894
+ * The parameters to pass to the SQL statement.
10895
+ */
9897
10896
  params?: T;
10897
+ /**
10898
+ * The consistency level to use when executing the query.
10899
+ */
9898
10900
  consistency?: 'strong' | 'eventual';
10901
+ /**
10902
+ * The response type to use when executing the query.
10903
+ */
10904
+ responseType?: 'json' | 'array';
9899
10905
  };
9900
- type SQLQuery = TemplateStringsArray | SQLQueryParams | string;
9901
- type SQLPluginResult = <T>(query: SQLQuery, ...parameters: any[]) => Promise<{
10906
+ type SQLQuery = TemplateStringsArray | SQLQueryParams;
10907
+ type SQLResponseType = 'json' | 'array';
10908
+ type SQLQueryResultJSON<T> = {
10909
+ /**
10910
+ * The records returned by the query.
10911
+ */
9902
10912
  records: T[];
10913
+ /**
10914
+ * The columns metadata returned by the query.
10915
+ */
10916
+ columns: Array<{
10917
+ name: string;
10918
+ type: string;
10919
+ }>;
10920
+ /**
10921
+ * Optional warning message returned by the query.
10922
+ */
9903
10923
  warning?: string;
9904
- }>;
10924
+ };
10925
+ type SQLQueryResultArray = {
10926
+ /**
10927
+ * The records returned by the query.
10928
+ */
10929
+ rows: any[][];
10930
+ /**
10931
+ * The columns metadata returned by the query.
10932
+ */
10933
+ columns: Array<{
10934
+ name: string;
10935
+ type: string;
10936
+ }>;
10937
+ /**
10938
+ * Optional warning message returned by the query.
10939
+ */
10940
+ warning?: string;
10941
+ };
10942
+ type SQLQueryResult<T, Mode extends SQLResponseType = 'json'> = Mode extends 'json' ? SQLQueryResultJSON<T> : Mode extends 'array' ? SQLQueryResultArray : never;
10943
+ 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'>>;
10944
+ type SQLPluginResult = SQLPluginFunction & {
10945
+ /**
10946
+ * Connection string to use when connecting to the database.
10947
+ * It includes the workspace, region, database and branch.
10948
+ * Connects with the same credentials as the Xata client.
10949
+ */
10950
+ connectionString: string;
10951
+ };
9905
10952
  declare class SQLPlugin extends XataPlugin {
9906
10953
  build(pluginOptions: XataPluginOptions): SQLPluginResult;
9907
10954
  }
@@ -9987,12 +11034,12 @@ type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, T
9987
11034
  rows: number;
9988
11035
  } : Operation extends {
9989
11036
  get: {
9990
- table: infer Table extends Tables;
11037
+ table: infer Table;
9991
11038
  };
9992
- } ? {
11039
+ } ? Table extends Tables ? {
9993
11040
  operation: 'get';
9994
11041
  columns: SelectedPick<Schema[Table] & XataRecord, ['*']>;
9995
- } : never;
11042
+ } : never : never;
9996
11043
  type TransactionOperationResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = Operations extends [infer Head, ...infer Rest] ? Head extends TransactionOperation<Schema, Table> ? Rest extends TransactionOperation<Schema, Table>[] ? [TransactionOperationSingleResult<Schema, Table, Head>, ...TransactionOperationResults<Schema, Table, Rest>] : never : never : [];
9997
11044
  type TransactionResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = {
9998
11045
  results: TransactionOperationResults<Schema, Table, Operations>;
@@ -10017,7 +11064,7 @@ type BaseClientOptions = {
10017
11064
  clientName?: string;
10018
11065
  xataAgentExtra?: Record<string, string>;
10019
11066
  };
10020
- declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
11067
+ declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins) => ClientConstructor<Plugins>;
10021
11068
  interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
10022
11069
  new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
10023
11070
  db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
@@ -10068,4 +11115,4 @@ declare class XataError extends Error {
10068
11115
  constructor(message: string, status: number);
10069
11116
  }
10070
11117
 
10071
- 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 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 };
11118
+ 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 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 GetBranchMigrationJobStatusError, type GetBranchMigrationJobStatusPathParams, type GetBranchMigrationJobStatusVariables, 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 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 GetMigrationHistoryVariables, type GetMigrationJobStatusError, type GetMigrationJobStatusPathParams, type GetMigrationJobStatusVariables, 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 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 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, 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, 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 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, 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, getBranchMigrationJobStatus, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseSettings, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationHistory, getMigrationJobStatus, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, 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, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, 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, updateDatabaseSettings, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, updateWorkspaceSettings, upsertRecordWithID, vectorSearchTable };