@xata.io/client 0.0.0-alpha.vf2950db06c33bba882032c181cc784c0501526f1 → 0.0.0-alpha.vf2d4ede35f0fb2771332d1b20637a8546868103b

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,7 @@ declare abstract class XataPlugin {
28
28
  type XataPluginOptions = ApiExtraProps & {
29
29
  cache: CacheImpl;
30
30
  host: HostProvider;
31
+ tables: Table[];
31
32
  };
32
33
 
33
34
  type AttributeDictionary = Record<string, string | number | boolean | undefined>;
@@ -68,15 +69,21 @@ type FetchImpl = (url: string, init?: RequestInit) => Promise<Response>;
68
69
  * @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
69
70
  */
70
71
  type DBBranchName = string;
71
- type PgRollApplyMigrationResponse = {
72
+ type ApplyMigrationResponse = {
72
73
  /**
73
74
  * The id of the migration job
74
75
  */
75
76
  jobID: string;
76
77
  };
77
- type PgRollJobType = 'apply' | 'start' | 'complete' | 'rollback';
78
- type PgRollJobStatus = 'pending' | 'in_progress' | 'completed' | 'failed';
79
- type PgRollJobStatusResponse = {
78
+ /**
79
+ * @maxLength 255
80
+ * @minLength 1
81
+ * @pattern [a-zA-Z0-9_\-~]+
82
+ */
83
+ type TableName = string;
84
+ type MigrationJobType = 'apply' | 'start' | 'complete' | 'rollback';
85
+ type MigrationJobStatus = 'pending' | 'in_progress' | 'completed' | 'failed';
86
+ type MigrationJobStatusResponse = {
80
87
  /**
81
88
  * The id of the migration job
82
89
  */
@@ -84,11 +91,11 @@ type PgRollJobStatusResponse = {
84
91
  /**
85
92
  * The type of the migration job
86
93
  */
87
- type: PgRollJobType;
94
+ type: MigrationJobType;
88
95
  /**
89
96
  * The status of the migration job
90
97
  */
91
- status: PgRollJobStatus;
98
+ status: MigrationJobStatus;
92
99
  /**
93
100
  * The error message associated with the migration job
94
101
  */
@@ -99,9 +106,9 @@ type PgRollJobStatusResponse = {
99
106
  * @minLength 1
100
107
  * @pattern [a-zA-Z0-9_\-~]+
101
108
  */
102
- type PgRollMigrationJobID = string;
103
- type PgRollMigrationType = 'pgroll' | 'inferred';
104
- type PgRollMigrationHistoryItem = {
109
+ type MigrationJobID = string;
110
+ type MigrationType = 'pgroll' | 'inferred';
111
+ type MigrationHistoryItem = {
105
112
  /**
106
113
  * The name of the migration
107
114
  */
@@ -127,13 +134,13 @@ type PgRollMigrationHistoryItem = {
127
134
  /**
128
135
  * The type of the migration
129
136
  */
130
- migrationType: PgRollMigrationType;
137
+ migrationType: MigrationType;
131
138
  };
132
- type PgRollMigrationHistoryResponse = {
139
+ type MigrationHistoryResponse = {
133
140
  /**
134
141
  * The migrations that have been applied to the branch
135
142
  */
136
- migrations: PgRollMigrationHistoryItem[];
143
+ migrations: MigrationHistoryItem[];
137
144
  };
138
145
  /**
139
146
  * @maxLength 255
@@ -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' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file' | 'json';
216
+ type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'datetime' | 'vector' | 'file[]' | 'file' | 'json';
213
217
  link?: ColumnLink;
214
218
  vector?: ColumnVector;
215
219
  file?: ColumnFile;
@@ -217,7 +221,6 @@ type Column = {
217
221
  notNull?: boolean;
218
222
  defaultValue?: string;
219
223
  unique?: boolean;
220
- columns?: Column[];
221
224
  };
222
225
  type RevLink = {
223
226
  table: string;
@@ -255,6 +258,56 @@ type DBBranch = {
255
258
  schema: Schema;
256
259
  };
257
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
+ };
258
311
  type BranchWithCopyID = {
259
312
  branchName: BranchName$1;
260
313
  dbBranchID: string;
@@ -907,6 +960,40 @@ type RecordMeta = {
907
960
  */
908
961
  warnings?: string[];
909
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[];
910
997
  };
911
998
  /**
912
999
  * File metadata
@@ -915,6 +1002,18 @@ type FileResponse = {
915
1002
  id?: FileItemID;
916
1003
  name: FileName;
917
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;
918
1017
  /**
919
1018
  * @format int64
920
1019
  */
@@ -923,6 +1022,24 @@ type FileResponse = {
923
1022
  * @format int64
924
1023
  */
925
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;
926
1043
  attributes?: Record<string, any>;
927
1044
  };
928
1045
  type QueryColumnsProjection = (string | ProjectionConfig)[];
@@ -1426,6 +1543,11 @@ type RecordUpdateResponse = XataRecord$1 | {
1426
1543
  createdAt: string;
1427
1544
  updatedAt: string;
1428
1545
  };
1546
+ } | {
1547
+ xata_id: string;
1548
+ xata_version: number;
1549
+ xata_createdat: string;
1550
+ xata_updatedat: string;
1429
1551
  };
1430
1552
  type PutFileResponse = FileResponse;
1431
1553
  type RecordResponse = XataRecord$1;
@@ -1469,10 +1591,14 @@ type AggResponse = {
1469
1591
  };
1470
1592
  type SQLResponse = {
1471
1593
  records?: SQLRecord[];
1594
+ rows?: any[][];
1472
1595
  /**
1473
1596
  * Name of the column and its PostgreSQL type
1474
1597
  */
1475
- columns?: Record<string, any>;
1598
+ columns?: {
1599
+ name?: string;
1600
+ type?: string;
1601
+ }[];
1476
1602
  /**
1477
1603
  * Number of selected columns
1478
1604
  */
@@ -1573,6 +1699,9 @@ type Workspace = WorkspaceMeta & {
1573
1699
  memberCount: number;
1574
1700
  plan: WorkspacePlan;
1575
1701
  };
1702
+ type WorkspaceSettings = {
1703
+ postgresEnabled: boolean;
1704
+ };
1576
1705
  type WorkspaceMember = {
1577
1706
  userId: UserID;
1578
1707
  fullname: string;
@@ -1606,6 +1735,22 @@ type WorkspaceMembers = {
1606
1735
  * @pattern ^ik_[a-zA-Z0-9]+
1607
1736
  */
1608
1737
  type InviteKey = string;
1738
+ /**
1739
+ * Page size.
1740
+ *
1741
+ * @x-internal true
1742
+ * @default 25
1743
+ * @minimum 0
1744
+ */
1745
+ type PageSize = number;
1746
+ /**
1747
+ * Page token
1748
+ *
1749
+ * @x-internal true
1750
+ * @maxLength 255
1751
+ * @minLength 24
1752
+ */
1753
+ type PageToken = string;
1609
1754
  /**
1610
1755
  * @x-internal true
1611
1756
  * @pattern [a-zA-Z0-9_-~:]+
@@ -1624,11 +1769,20 @@ type ClusterShortMetadata = {
1624
1769
  */
1625
1770
  branches: number;
1626
1771
  };
1772
+ /**
1773
+ * @x-internal true
1774
+ */
1775
+ type PageResponse = {
1776
+ size: number;
1777
+ hasMore: boolean;
1778
+ token?: string;
1779
+ };
1627
1780
  /**
1628
1781
  * @x-internal true
1629
1782
  */
1630
1783
  type ListClustersResponse = {
1631
1784
  clusters: ClusterShortMetadata[];
1785
+ page: PageResponse;
1632
1786
  };
1633
1787
  /**
1634
1788
  * @x-internal true
@@ -1741,6 +1895,53 @@ type ClusterResponse = {
1741
1895
  state: string;
1742
1896
  clusterID: string;
1743
1897
  };
1898
+ /**
1899
+ * @x-internal true
1900
+ */
1901
+ type AutoscalingConfigResponse = {
1902
+ /**
1903
+ * @format double
1904
+ * @default 0.5
1905
+ */
1906
+ minCapacity: number;
1907
+ /**
1908
+ * @format double
1909
+ * @default 4
1910
+ */
1911
+ maxCapacity: number;
1912
+ };
1913
+ /**
1914
+ * @x-internal true
1915
+ */
1916
+ type MaintenanceConfigResponse = {
1917
+ /**
1918
+ * @default false
1919
+ */
1920
+ autoMinorVersionUpgrade: boolean;
1921
+ /**
1922
+ * @default false
1923
+ */
1924
+ applyImmediately: boolean;
1925
+ maintenanceWindow: WeeklyTimeWindow;
1926
+ backupWindow: DailyTimeWindow;
1927
+ };
1928
+ /**
1929
+ * @x-internal true
1930
+ */
1931
+ type ClusterConfigurationResponse = {
1932
+ engineVersion: string;
1933
+ instanceType: string;
1934
+ /**
1935
+ * @format int64
1936
+ */
1937
+ replicas: number;
1938
+ /**
1939
+ * @default false
1940
+ */
1941
+ deletionProtection: boolean;
1942
+ autoscaling?: AutoscalingConfigResponse;
1943
+ maintenance: MaintenanceConfigResponse;
1944
+ };
1744
1945
  /**
1745
1946
  * @x-internal true
1746
1947
  */
@@ -1753,22 +1954,23 @@ type ClusterMetadata = {
1753
1954
  * @format int64
1754
1955
  */
1755
1956
  branches: number;
1756
- configuration?: ClusterConfiguration;
1957
+ configuration: ClusterConfigurationResponse;
1757
1958
  };
1758
1959
  /**
1759
1960
  * @x-internal true
1760
1961
  */
1761
1962
  type ClusterUpdateDetails = {
1762
- id: ClusterID;
1763
1963
  /**
1764
- * @maxLength 63
1765
- * @minLength 1
1766
- * @pattern [a-zA-Z0-9_-~:]+
1964
+ * @pattern ^[Ss][Tt][Oo][Pp]|[Ss][Tt][Aa][Rr][Tt]$
1767
1965
  */
1768
- name?: string;
1769
- configuration?: ClusterConfiguration;
1770
- state?: string;
1771
- region?: string;
1966
+ command: string;
1967
+ };
1968
+ /**
1969
+ * @x-internal true
1970
+ */
1971
+ type ClusterUpdateMetadata = {
1972
+ id: ClusterID;
1973
+ state: string;
1772
1974
  };
1773
1975
  /**
1774
1976
  * Metadata of databases
@@ -1794,6 +1996,10 @@ type DatabaseMetadata = {
1794
1996
  * @x-internal true
1795
1997
  */
1796
1998
  defaultClusterID?: string;
1999
+ /**
2000
+ * The database is accessible via the Postgres protocol
2001
+ */
2002
+ postgresEnabled?: boolean;
1797
2003
  /**
1798
2004
  * Metadata about the database for display in Xata user interfaces
1799
2005
  */
@@ -2334,6 +2540,62 @@ type DeleteWorkspaceVariables = {
2334
2540
  * Delete the workspace with the provided ID
2335
2541
  */
2336
2542
  declare const deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
2543
+ type GetWorkspaceSettingsPathParams = {
2544
+ /**
2545
+ * Workspace ID
2546
+ */
2547
+ workspaceId: WorkspaceID;
2548
+ };
2549
+ type GetWorkspaceSettingsError = ErrorWrapper$1<{
2550
+ status: 400;
2551
+ payload: BadRequestError;
2552
+ } | {
2553
+ status: 401;
2554
+ payload: AuthError;
2555
+ } | {
2556
+ status: 403;
2557
+ payload: AuthError;
2558
+ } | {
2559
+ status: 404;
2560
+ payload: SimpleError;
2561
+ }>;
2562
+ type GetWorkspaceSettingsVariables = {
2563
+ pathParams: GetWorkspaceSettingsPathParams;
2564
+ } & ControlPlaneFetcherExtraProps;
2565
+ /**
2566
+ * Retrieve workspace settings from a workspace ID
2567
+ */
2568
+ declare const getWorkspaceSettings: (variables: GetWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
2569
+ type UpdateWorkspaceSettingsPathParams = {
2570
+ /**
2571
+ * Workspace ID
2572
+ */
2573
+ workspaceId: WorkspaceID;
2574
+ };
2575
+ type UpdateWorkspaceSettingsError = ErrorWrapper$1<{
2576
+ status: 400;
2577
+ payload: BadRequestError;
2578
+ } | {
2579
+ status: 401;
2580
+ payload: AuthError;
2581
+ } | {
2582
+ status: 403;
2583
+ payload: AuthError;
2584
+ } | {
2585
+ status: 404;
2586
+ payload: SimpleError;
2587
+ }>;
2588
+ type UpdateWorkspaceSettingsRequestBody = {
2589
+ postgresEnabled: boolean;
2590
+ };
2591
+ type UpdateWorkspaceSettingsVariables = {
2592
+ body: UpdateWorkspaceSettingsRequestBody;
2593
+ pathParams: UpdateWorkspaceSettingsPathParams;
2594
+ } & ControlPlaneFetcherExtraProps;
2595
+ /**
2596
+ * Update workspace settings
2597
+ */
2598
+ declare const updateWorkspaceSettings: (variables: UpdateWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
2337
2599
  type GetWorkspaceMembersListPathParams = {
2338
2600
  /**
2339
2601
  * Workspace ID
@@ -2594,6 +2856,16 @@ type ListClustersPathParams = {
2594
2856
  */
2595
2857
  workspaceId: WorkspaceID;
2596
2858
  };
2859
+ type ListClustersQueryParams = {
2860
+ /**
2861
+ * Page size
2862
+ */
2863
+ page?: PageSize;
2864
+ /**
2865
+ * Page token
2866
+ */
2867
+ token?: PageToken;
2868
+ };
2597
2869
  type ListClustersError = ErrorWrapper$1<{
2598
2870
  status: 400;
2599
2871
  payload: BadRequestError;
@@ -2603,6 +2875,7 @@ type ListClustersError = ErrorWrapper$1<{
2603
2875
  }>;
2604
2876
  type ListClustersVariables = {
2605
2877
  pathParams: ListClustersPathParams;
2878
+ queryParams?: ListClustersQueryParams;
2606
2879
  } & ControlPlaneFetcherExtraProps;
2607
2880
  /**
2608
2881
  * List all clusters available in your Workspace.
@@ -2680,7 +2953,7 @@ type UpdateClusterVariables = {
2680
2953
  /**
2681
2954
  * Update cluster for given cluster ID
2682
2955
  */
2683
- declare const updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal) => Promise<ClusterMetadata>;
2956
+ declare const updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal) => Promise<ClusterUpdateMetadata>;
2684
2957
  type GetDatabaseListPathParams = {
2685
2958
  /**
2686
2959
  * Workspace ID
@@ -3048,17 +3321,53 @@ type ApplyMigrationError = ErrorWrapper<{
3048
3321
  payload: SimpleError$1;
3049
3322
  }>;
3050
3323
  type ApplyMigrationRequestBody = {
3051
- [key: string]: any;
3052
- }[];
3324
+ /**
3325
+ * Migration name
3326
+ */
3327
+ name?: string;
3328
+ operations: {
3329
+ [key: string]: any;
3330
+ }[];
3331
+ adaptTables?: boolean;
3332
+ };
3053
3333
  type ApplyMigrationVariables = {
3054
- body?: ApplyMigrationRequestBody;
3334
+ body: ApplyMigrationRequestBody;
3055
3335
  pathParams: ApplyMigrationPathParams;
3056
3336
  } & DataPlaneFetcherExtraProps;
3057
3337
  /**
3058
3338
  * Applies a pgroll migration to the specified database.
3059
3339
  */
3060
- declare const applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal) => Promise<PgRollApplyMigrationResponse>;
3061
- type PgRollStatusPathParams = {
3340
+ declare const applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
3341
+ type AdaptTablePathParams = {
3342
+ /**
3343
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3344
+ */
3345
+ dbBranchName: DBBranchName;
3346
+ /**
3347
+ * The Table name
3348
+ */
3349
+ tableName: TableName;
3350
+ workspace: string;
3351
+ region: string;
3352
+ };
3353
+ type AdaptTableError = ErrorWrapper<{
3354
+ status: 400;
3355
+ payload: BadRequestError$1;
3356
+ } | {
3357
+ status: 401;
3358
+ payload: AuthError$1;
3359
+ } | {
3360
+ status: 404;
3361
+ payload: SimpleError$1;
3362
+ }>;
3363
+ type AdaptTableVariables = {
3364
+ pathParams: AdaptTablePathParams;
3365
+ } & DataPlaneFetcherExtraProps;
3366
+ /**
3367
+ * 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.
3368
+ */
3369
+ declare const adaptTable: (variables: AdaptTableVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
3370
+ type GetBranchMigrationJobStatusPathParams = {
3062
3371
  /**
3063
3372
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3064
3373
  */
@@ -3066,7 +3375,7 @@ type PgRollStatusPathParams = {
3066
3375
  workspace: string;
3067
3376
  region: string;
3068
3377
  };
3069
- type PgRollStatusError = ErrorWrapper<{
3378
+ type GetBranchMigrationJobStatusError = ErrorWrapper<{
3070
3379
  status: 400;
3071
3380
  payload: BadRequestError$1;
3072
3381
  } | {
@@ -3076,11 +3385,11 @@ type PgRollStatusError = ErrorWrapper<{
3076
3385
  status: 404;
3077
3386
  payload: SimpleError$1;
3078
3387
  }>;
3079
- type PgRollStatusVariables = {
3080
- pathParams: PgRollStatusPathParams;
3388
+ type GetBranchMigrationJobStatusVariables = {
3389
+ pathParams: GetBranchMigrationJobStatusPathParams;
3081
3390
  } & DataPlaneFetcherExtraProps;
3082
- declare const pgRollStatus: (variables: PgRollStatusVariables, signal?: AbortSignal) => Promise<PgRollJobStatusResponse>;
3083
- type PgRollJobStatusPathParams = {
3391
+ declare const getBranchMigrationJobStatus: (variables: GetBranchMigrationJobStatusVariables, signal?: AbortSignal) => Promise<MigrationJobStatusResponse>;
3392
+ type GetMigrationJobStatusPathParams = {
3084
3393
  /**
3085
3394
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3086
3395
  */
@@ -3088,11 +3397,11 @@ type PgRollJobStatusPathParams = {
3088
3397
  /**
3089
3398
  * The id of the migration job
3090
3399
  */
3091
- jobId: PgRollMigrationJobID;
3400
+ jobId: MigrationJobID;
3092
3401
  workspace: string;
3093
3402
  region: string;
3094
3403
  };
3095
- type PgRollJobStatusError = ErrorWrapper<{
3404
+ type GetMigrationJobStatusError = ErrorWrapper<{
3096
3405
  status: 400;
3097
3406
  payload: BadRequestError$1;
3098
3407
  } | {
@@ -3102,11 +3411,11 @@ type PgRollJobStatusError = ErrorWrapper<{
3102
3411
  status: 404;
3103
3412
  payload: SimpleError$1;
3104
3413
  }>;
3105
- type PgRollJobStatusVariables = {
3106
- pathParams: PgRollJobStatusPathParams;
3414
+ type GetMigrationJobStatusVariables = {
3415
+ pathParams: GetMigrationJobStatusPathParams;
3107
3416
  } & DataPlaneFetcherExtraProps;
3108
- declare const pgRollJobStatus: (variables: PgRollJobStatusVariables, signal?: AbortSignal) => Promise<PgRollJobStatusResponse>;
3109
- type PgRollMigrationHistoryPathParams = {
3417
+ declare const getMigrationJobStatus: (variables: GetMigrationJobStatusVariables, signal?: AbortSignal) => Promise<MigrationJobStatusResponse>;
3418
+ type GetMigrationHistoryPathParams = {
3110
3419
  /**
3111
3420
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
3112
3421
  */
@@ -3114,7 +3423,7 @@ type PgRollMigrationHistoryPathParams = {
3114
3423
  workspace: string;
3115
3424
  region: string;
3116
3425
  };
3117
- type PgRollMigrationHistoryError = ErrorWrapper<{
3426
+ type GetMigrationHistoryError = ErrorWrapper<{
3118
3427
  status: 400;
3119
3428
  payload: BadRequestError$1;
3120
3429
  } | {
@@ -3124,10 +3433,10 @@ type PgRollMigrationHistoryError = ErrorWrapper<{
3124
3433
  status: 404;
3125
3434
  payload: SimpleError$1;
3126
3435
  }>;
3127
- type PgRollMigrationHistoryVariables = {
3128
- pathParams: PgRollMigrationHistoryPathParams;
3436
+ type GetMigrationHistoryVariables = {
3437
+ pathParams: GetMigrationHistoryPathParams;
3129
3438
  } & DataPlaneFetcherExtraProps;
3130
- declare const pgRollMigrationHistory: (variables: PgRollMigrationHistoryVariables, signal?: AbortSignal) => Promise<PgRollMigrationHistoryResponse>;
3439
+ declare const getMigrationHistory: (variables: GetMigrationHistoryVariables, signal?: AbortSignal) => Promise<MigrationHistoryResponse>;
3131
3440
  type GetBranchListPathParams = {
3132
3441
  /**
3133
3442
  * The Database Name
@@ -3153,6 +3462,60 @@ type GetBranchListVariables = {
3153
3462
  * List all available Branches
3154
3463
  */
3155
3464
  declare const getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
3465
+ type GetDatabaseSettingsPathParams = {
3466
+ /**
3467
+ * The Database Name
3468
+ */
3469
+ dbName: DBName$1;
3470
+ workspace: string;
3471
+ region: string;
3472
+ };
3473
+ type GetDatabaseSettingsError = ErrorWrapper<{
3474
+ status: 400;
3475
+ payload: SimpleError$1;
3476
+ } | {
3477
+ status: 401;
3478
+ payload: AuthError$1;
3479
+ } | {
3480
+ status: 404;
3481
+ payload: SimpleError$1;
3482
+ }>;
3483
+ type GetDatabaseSettingsVariables = {
3484
+ pathParams: GetDatabaseSettingsPathParams;
3485
+ } & DataPlaneFetcherExtraProps;
3486
+ /**
3487
+ * Get database settings
3488
+ */
3489
+ declare const getDatabaseSettings: (variables: GetDatabaseSettingsVariables, signal?: AbortSignal) => Promise<DatabaseSettings>;
3490
+ type UpdateDatabaseSettingsPathParams = {
3491
+ /**
3492
+ * The Database Name
3493
+ */
3494
+ dbName: DBName$1;
3495
+ workspace: string;
3496
+ region: string;
3497
+ };
3498
+ type UpdateDatabaseSettingsError = ErrorWrapper<{
3499
+ status: 400;
3500
+ payload: SimpleError$1;
3501
+ } | {
3502
+ status: 401;
3503
+ payload: AuthError$1;
3504
+ } | {
3505
+ status: 404;
3506
+ payload: SimpleError$1;
3507
+ }>;
3508
+ type UpdateDatabaseSettingsRequestBody = {
3509
+ searchEnabled?: boolean;
3510
+ };
3511
+ type UpdateDatabaseSettingsVariables = {
3512
+ body?: UpdateDatabaseSettingsRequestBody;
3513
+ pathParams: UpdateDatabaseSettingsPathParams;
3514
+ } & DataPlaneFetcherExtraProps;
3515
+ /**
3516
+ * Update database settings, this endpoint can be used to disable search
3517
+ */
3518
+ declare const updateDatabaseSettings: (variables: UpdateDatabaseSettingsVariables, signal?: AbortSignal) => Promise<DatabaseSettings>;
3156
3519
  type GetBranchDetailsPathParams = {
3157
3520
  /**
3158
3521
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -3280,7 +3643,7 @@ type GetSchemaError = ErrorWrapper<{
3280
3643
  payload: SimpleError$1;
3281
3644
  }>;
3282
3645
  type GetSchemaResponse = {
3283
- schema: Record<string, any>;
3646
+ schema: BranchSchema;
3284
3647
  };
3285
3648
  type GetSchemaVariables = {
3286
3649
  pathParams: GetSchemaPathParams;
@@ -3504,7 +3867,7 @@ type RemoveGitBranchesEntryPathParams = {
3504
3867
  };
3505
3868
  type RemoveGitBranchesEntryQueryParams = {
3506
3869
  /**
3507
- * The Git Branch to remove from the mapping
3870
+ * The git branch to remove from the mapping
3508
3871
  */
3509
3872
  gitBranch: string;
3510
3873
  };
@@ -3567,7 +3930,7 @@ type ResolveBranchVariables = {
3567
3930
  } & DataPlaneFetcherExtraProps;
3568
3931
  /**
3569
3932
  * In order to resolve the database branch, the following algorithm is used:
3570
- * * 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
3933
+ * * 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
3571
3934
  * * else, if a Xata branch with the exact same name as `gitBranch` exists, return it
3572
3935
  * * else, if `fallbackBranch` is provided and a branch with that name exists, return it
3573
3936
  * * else, return the default branch of the DB (`main` or the first branch)
@@ -4935,7 +5298,7 @@ type InsertRecordWithIDVariables = {
4935
5298
  queryParams?: InsertRecordWithIDQueryParams;
4936
5299
  } & DataPlaneFetcherExtraProps;
4937
5300
  /**
4938
- * By default, IDs are auto-generated when data is insterted into Xata. Sending a request to this endpoint allows us to insert a record with a pre-existing ID, bypassing the default automatic ID generation.
5301
+ * By default, IDs are auto-generated when data is inserted into Xata. Sending a request to this endpoint allows us to insert a record with a pre-existing ID, bypassing the default automatic ID generation.
4939
5302
  */
4940
5303
  declare const insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
4941
5304
  type UpdateRecordWithIDPathParams = {
@@ -5168,7 +5531,7 @@ type QueryTableVariables = {
5168
5531
  * }
5169
5532
  * ```
5170
5533
  *
5171
- * For usage, see also the [API Guide](https://xata.io/docs/api-guide/get).
5534
+ * For usage, see also the [Xata SDK documentation](https://xata.io/docs/sdk/get).
5172
5535
  *
5173
5536
  * ### Column selection
5174
5537
  *
@@ -6040,7 +6403,7 @@ type SearchTableVariables = {
6040
6403
  /**
6041
6404
  * Run a free text search operation in a particular table.
6042
6405
  *
6043
- * 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:
6406
+ * 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:
6044
6407
  * * filters `$contains`, `$startsWith`, `$endsWith` don't work on columns of type `text`
6045
6408
  * * filtering on columns of type `multiple` is currently unsupported
6046
6409
  */
@@ -6398,10 +6761,10 @@ type AggregateTableVariables = {
6398
6761
  * While the summary endpoint is served from a transactional store and the results are strongly
6399
6762
  * consistent, the aggregate endpoint is served from our columnar store and the results are
6400
6763
  * only eventually consistent. On the other hand, the aggregate endpoint uses a
6401
- * store that is more appropiate for analytics, makes use of approximative algorithms
6764
+ * store that is more appropriate for analytics, makes use of approximation algorithms
6402
6765
  * (e.g for cardinality), and is generally faster and can do more complex aggregations.
6403
6766
  *
6404
- * For usage, see the [API Guide](https://xata.io/docs/api-guide/aggregate).
6767
+ * For usage, see the [Aggregation documentation](https://xata.io/docs/sdk/aggregate).
6405
6768
  */
6406
6769
  declare const aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
6407
6770
  type FileAccessPathParams = {
@@ -6507,6 +6870,12 @@ type SqlQueryRequestBody = {
6507
6870
  * @default strong
6508
6871
  */
6509
6872
  consistency?: 'strong' | 'eventual';
6873
+ /**
6874
+ * The response type.
6875
+ *
6876
+ * @default json
6877
+ */
6878
+ responseType?: 'json' | 'array';
6510
6879
  };
6511
6880
  type SqlQueryVariables = {
6512
6881
  body: SqlQueryRequestBody;
@@ -6519,10 +6888,6 @@ declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) =>
6519
6888
 
6520
6889
  declare const operationsByTag: {
6521
6890
  branch: {
6522
- applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal | undefined) => Promise<PgRollApplyMigrationResponse>;
6523
- pgRollStatus: (variables: PgRollStatusVariables, signal?: AbortSignal | undefined) => Promise<PgRollJobStatusResponse>;
6524
- pgRollJobStatus: (variables: PgRollJobStatusVariables, signal?: AbortSignal | undefined) => Promise<PgRollJobStatusResponse>;
6525
- pgRollMigrationHistory: (variables: PgRollMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<PgRollMigrationHistoryResponse>;
6526
6891
  getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal | undefined) => Promise<ListBranchesResponse>;
6527
6892
  getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal | undefined) => Promise<DBBranch>;
6528
6893
  createBranch: (variables: CreateBranchVariables, signal?: AbortSignal | undefined) => Promise<CreateBranchResponse>;
@@ -6542,11 +6907,18 @@ declare const operationsByTag: {
6542
6907
  getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
6543
6908
  updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
6544
6909
  deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6910
+ getWorkspaceSettings: (variables: GetWorkspaceSettingsVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceSettings>;
6911
+ updateWorkspaceSettings: (variables: UpdateWorkspaceSettingsVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceSettings>;
6545
6912
  getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceMembers>;
6546
6913
  updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6547
6914
  removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6548
6915
  };
6549
6916
  migrations: {
6917
+ applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal | undefined) => Promise<ApplyMigrationResponse>;
6918
+ adaptTable: (variables: AdaptTableVariables, signal?: AbortSignal | undefined) => Promise<ApplyMigrationResponse>;
6919
+ getBranchMigrationJobStatus: (variables: GetBranchMigrationJobStatusVariables, signal?: AbortSignal | undefined) => Promise<MigrationJobStatusResponse>;
6920
+ getMigrationJobStatus: (variables: GetMigrationJobStatusVariables, signal?: AbortSignal | undefined) => Promise<MigrationJobStatusResponse>;
6921
+ getMigrationHistory: (variables: GetMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<MigrationHistoryResponse>;
6550
6922
  getSchema: (variables: GetSchemaVariables, signal?: AbortSignal | undefined) => Promise<GetSchemaResponse>;
6551
6923
  getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchMigrationHistoryResponse>;
6552
6924
  getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<BranchMigrationPlan>;
@@ -6569,6 +6941,10 @@ declare const operationsByTag: {
6569
6941
  deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
6570
6942
  bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
6571
6943
  };
6944
+ database: {
6945
+ getDatabaseSettings: (variables: GetDatabaseSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseSettings>;
6946
+ updateDatabaseSettings: (variables: UpdateDatabaseSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseSettings>;
6947
+ };
6572
6948
  migrationRequests: {
6573
6949
  queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal | undefined) => Promise<QueryMigrationRequestsResponse>;
6574
6950
  createMigrationRequest: (variables: CreateMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<CreateMigrationRequestResponse>;
@@ -6644,7 +7020,7 @@ declare const operationsByTag: {
6644
7020
  listClusters: (variables: ListClustersVariables, signal?: AbortSignal | undefined) => Promise<ListClustersResponse>;
6645
7021
  createCluster: (variables: CreateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterResponse>;
6646
7022
  getCluster: (variables: GetClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterMetadata>;
6647
- updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterMetadata>;
7023
+ updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterUpdateMetadata>;
6648
7024
  };
6649
7025
  databases: {
6650
7026
  getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal | undefined) => Promise<ListDatabasesResponse>;
@@ -6700,22 +7076,27 @@ type schemas_APIKeyName = APIKeyName;
6700
7076
  type schemas_AccessToken = AccessToken;
6701
7077
  type schemas_AggExpression = AggExpression;
6702
7078
  type schemas_AggExpressionMap = AggExpressionMap;
7079
+ type schemas_ApplyMigrationResponse = ApplyMigrationResponse;
6703
7080
  type schemas_AuthorizationCodeRequest = AuthorizationCodeRequest;
6704
7081
  type schemas_AuthorizationCodeResponse = AuthorizationCodeResponse;
6705
7082
  type schemas_AutoscalingConfig = AutoscalingConfig;
7083
+ type schemas_AutoscalingConfigResponse = AutoscalingConfigResponse;
6706
7084
  type schemas_AverageAgg = AverageAgg;
6707
7085
  type schemas_BoosterExpression = BoosterExpression;
6708
7086
  type schemas_Branch = Branch;
6709
7087
  type schemas_BranchMigration = BranchMigration;
6710
7088
  type schemas_BranchOp = BranchOp;
7089
+ type schemas_BranchSchema = BranchSchema;
6711
7090
  type schemas_BranchWithCopyID = BranchWithCopyID;
6712
7091
  type schemas_ClusterConfiguration = ClusterConfiguration;
7092
+ type schemas_ClusterConfigurationResponse = ClusterConfigurationResponse;
6713
7093
  type schemas_ClusterCreateDetails = ClusterCreateDetails;
6714
7094
  type schemas_ClusterID = ClusterID;
6715
7095
  type schemas_ClusterMetadata = ClusterMetadata;
6716
7096
  type schemas_ClusterResponse = ClusterResponse;
6717
7097
  type schemas_ClusterShortMetadata = ClusterShortMetadata;
6718
7098
  type schemas_ClusterUpdateDetails = ClusterUpdateDetails;
7099
+ type schemas_ClusterUpdateMetadata = ClusterUpdateMetadata;
6719
7100
  type schemas_Column = Column;
6720
7101
  type schemas_ColumnFile = ColumnFile;
6721
7102
  type schemas_ColumnLink = ColumnLink;
@@ -6734,6 +7115,7 @@ type schemas_DailyTimeWindow = DailyTimeWindow;
6734
7115
  type schemas_DataInputRecord = DataInputRecord;
6735
7116
  type schemas_DatabaseGithubSettings = DatabaseGithubSettings;
6736
7117
  type schemas_DatabaseMetadata = DatabaseMetadata;
7118
+ type schemas_DatabaseSettings = DatabaseSettings;
6737
7119
  type schemas_DateHistogramAgg = DateHistogramAgg;
6738
7120
  type schemas_FileAccessID = FileAccessID;
6739
7121
  type schemas_FileItemID = FileItemID;
@@ -6762,17 +7144,25 @@ type schemas_ListDatabasesResponse = ListDatabasesResponse;
6762
7144
  type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
6763
7145
  type schemas_ListRegionsResponse = ListRegionsResponse;
6764
7146
  type schemas_MaintenanceConfig = MaintenanceConfig;
7147
+ type schemas_MaintenanceConfigResponse = MaintenanceConfigResponse;
6765
7148
  type schemas_MaxAgg = MaxAgg;
6766
7149
  type schemas_MediaType = MediaType;
6767
7150
  type schemas_MetricsDatapoint = MetricsDatapoint;
6768
7151
  type schemas_MetricsLatency = MetricsLatency;
6769
7152
  type schemas_Migration = Migration;
6770
7153
  type schemas_MigrationColumnOp = MigrationColumnOp;
7154
+ type schemas_MigrationHistoryItem = MigrationHistoryItem;
7155
+ type schemas_MigrationHistoryResponse = MigrationHistoryResponse;
7156
+ type schemas_MigrationJobID = MigrationJobID;
7157
+ type schemas_MigrationJobStatus = MigrationJobStatus;
7158
+ type schemas_MigrationJobStatusResponse = MigrationJobStatusResponse;
7159
+ type schemas_MigrationJobType = MigrationJobType;
6771
7160
  type schemas_MigrationObject = MigrationObject;
6772
7161
  type schemas_MigrationOp = MigrationOp;
6773
7162
  type schemas_MigrationRequest = MigrationRequest;
6774
7163
  type schemas_MigrationRequestNumber = MigrationRequestNumber;
6775
7164
  type schemas_MigrationTableOp = MigrationTableOp;
7165
+ type schemas_MigrationType = MigrationType;
6776
7166
  type schemas_MinAgg = MinAgg;
6777
7167
  type schemas_NumericHistogramAgg = NumericHistogramAgg;
6778
7168
  type schemas_OAuthAccessToken = OAuthAccessToken;
@@ -6782,15 +7172,10 @@ type schemas_OAuthResponseType = OAuthResponseType;
6782
7172
  type schemas_OAuthScope = OAuthScope;
6783
7173
  type schemas_ObjectValue = ObjectValue;
6784
7174
  type schemas_PageConfig = PageConfig;
7175
+ type schemas_PageResponse = PageResponse;
7176
+ type schemas_PageSize = PageSize;
7177
+ type schemas_PageToken = PageToken;
6785
7178
  type schemas_PercentilesAgg = PercentilesAgg;
6786
- type schemas_PgRollApplyMigrationResponse = PgRollApplyMigrationResponse;
6787
- type schemas_PgRollJobStatus = PgRollJobStatus;
6788
- type schemas_PgRollJobStatusResponse = PgRollJobStatusResponse;
6789
- type schemas_PgRollJobType = PgRollJobType;
6790
- type schemas_PgRollMigrationHistoryItem = PgRollMigrationHistoryItem;
6791
- type schemas_PgRollMigrationHistoryResponse = PgRollMigrationHistoryResponse;
6792
- type schemas_PgRollMigrationJobID = PgRollMigrationJobID;
6793
- type schemas_PgRollMigrationType = PgRollMigrationType;
6794
7179
  type schemas_PrefixExpression = PrefixExpression;
6795
7180
  type schemas_ProjectionConfig = ProjectionConfig;
6796
7181
  type schemas_QueryColumnsProjection = QueryColumnsProjection;
@@ -6843,8 +7228,9 @@ type schemas_WorkspaceMember = WorkspaceMember;
6843
7228
  type schemas_WorkspaceMembers = WorkspaceMembers;
6844
7229
  type schemas_WorkspaceMeta = WorkspaceMeta;
6845
7230
  type schemas_WorkspacePlan = WorkspacePlan;
7231
+ type schemas_WorkspaceSettings = WorkspaceSettings;
6846
7232
  declare namespace schemas {
6847
- 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_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 };
7233
+ 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 };
6848
7234
  }
6849
7235
 
6850
7236
  type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
@@ -7028,6 +7414,19 @@ declare class BranchApi {
7028
7414
  gitBranch?: string;
7029
7415
  fallbackBranch?: string;
7030
7416
  }): Promise<ResolveBranchResponse>;
7417
+ pgRollMigrationHistory({ workspace, region, database, branch }: {
7418
+ workspace: WorkspaceID;
7419
+ region: string;
7420
+ database: DBName$1;
7421
+ branch: BranchName$1;
7422
+ }): Promise<MigrationHistoryResponse>;
7423
+ applyMigration({ workspace, region, database, branch, migration }: {
7424
+ workspace: WorkspaceID;
7425
+ region: string;
7426
+ database: DBName$1;
7427
+ branch: BranchName$1;
7428
+ migration: Migration;
7429
+ }): Promise<ApplyMigrationResponse>;
7031
7430
  }
7032
7431
  declare class TableApi {
7033
7432
  private extraProps;
@@ -7505,6 +7904,12 @@ declare class MigrationsApi {
7505
7904
  branch: BranchName$1;
7506
7905
  migrations: MigrationObject[];
7507
7906
  }): Promise<SchemaUpdateResponse>;
7907
+ getSchema({ workspace, region, database, branch }: {
7908
+ workspace: WorkspaceID;
7909
+ region: string;
7910
+ database: DBName$1;
7911
+ branch: BranchName$1;
7912
+ }): Promise<GetSchemaResponse>;
7508
7913
  }
7509
7914
  declare class DatabaseApi {
7510
7915
  private extraProps;
@@ -7887,7 +8292,7 @@ type NestedValueAtColumn<O, Key extends SelectableColumn<O>> = Key extends `${in
7887
8292
  } : unknown;
7888
8293
  type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
7889
8294
 
7890
- declare const RecordColumnTypes: readonly ["bool", "int", "float", "string", "text", "email", "multiple", "link", "object", "datetime", "vector", "file[]", "file", "json"];
8295
+ declare const RecordColumnTypes: readonly ["bool", "int", "float", "string", "text", "email", "multiple", "link", "datetime", "vector", "file[]", "file", "json"];
7891
8296
  type Identifier = string;
7892
8297
  /**
7893
8298
  * Represents an identifiable record from the database.
@@ -8065,11 +8470,6 @@ type FilterValueAtColumn<Record, F> = NonNullable<ValueAtColumn<Record, F>> exte
8065
8470
  "$is": "value",
8066
8471
  "$any": [ "value1", "value2" ],
8067
8472
  },
8068
- "settings.plan": {"$any": ["free", "paid"]},
8069
- "settings.plan": "free",
8070
- "settings": {
8071
- "plan": "free"
8072
- },
8073
8473
  }
8074
8474
  }
8075
8475
  */
@@ -8113,8 +8513,8 @@ type ValueTypeFilters<T> = T | T extends string ? StringTypeFilter : T extends n
8113
8513
  {
8114
8514
  "filter": {
8115
8515
  "$any": {
8116
- "settings.dark": true,
8117
- "settings.plan": "free"
8516
+ "dark": true,
8517
+ "plan": "free"
8118
8518
  }
8119
8519
  },
8120
8520
  }
@@ -8135,7 +8535,7 @@ type AggregatorFilter<T> = {
8135
8535
  };
8136
8536
  /**
8137
8537
  * Existance filter
8138
- * Example: { filter: { $exists: "settings" } }
8538
+ * Example: { filter: { $exists: "dark" } }
8139
8539
  */
8140
8540
  type ExistanceFilter<Record> = {
8141
8541
  [key in '$exists' | '$notExists']?: FilterColumns<Record>;
@@ -8281,10 +8681,11 @@ type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
8281
8681
  declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
8282
8682
  #private;
8283
8683
  private db;
8284
- constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
8684
+ constructor(db: SchemaPluginResult<Schemas>);
8285
8685
  build(pluginOptions: XataPluginOptions): SearchPluginResult<Schemas>;
8286
8686
  }
8287
- type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
8687
+ type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata' | 'xata'> & {
8688
+ xata: XataRecordMetadata & SearchExtraProperties;
8288
8689
  getMetadata: () => XataRecordMetadata & SearchExtraProperties;
8289
8690
  };
8290
8691
  type SearchExtraProperties = {
@@ -8605,7 +9006,7 @@ type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions |
8605
9006
  declare class Query<Record extends XataRecord, Result extends XataRecord = Record> implements Paginable<Record, Result> {
8606
9007
  #private;
8607
9008
  readonly meta: PaginationQueryMeta;
8608
- readonly records: RecordArray<Result>;
9009
+ readonly records: PageRecordArray<Result>;
8609
9010
  constructor(repository: RestRepository<Record> | null, table: {
8610
9011
  name: string;
8611
9012
  schema?: Table;
@@ -8733,25 +9134,25 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
8733
9134
  * Performs the query in the database and returns a set of results.
8734
9135
  * @returns An array of records from the database.
8735
9136
  */
8736
- getMany(): Promise<RecordArray<Result>>;
9137
+ getMany(): Promise<PageRecordArray<Result>>;
8737
9138
  /**
8738
9139
  * Performs the query in the database and returns a set of results.
8739
9140
  * @param options Additional options to be used when performing the query.
8740
9141
  * @returns An array of records from the database.
8741
9142
  */
8742
- getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
9143
+ getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<PageRecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
8743
9144
  /**
8744
9145
  * Performs the query in the database and returns a set of results.
8745
9146
  * @param options Additional options to be used when performing the query.
8746
9147
  * @returns An array of records from the database.
8747
9148
  */
8748
- getMany(options: OmitBy<QueryOptions<Record>, 'columns'>): Promise<RecordArray<Result>>;
9149
+ getMany(options: OmitBy<QueryOptions<Record>, 'columns'>): Promise<PageRecordArray<Result>>;
8749
9150
  /**
8750
9151
  * Performs the query in the database and returns all the results.
8751
9152
  * Warning: If there are a large number of results, this method can have performance implications.
8752
9153
  * @returns An array of records from the database.
8753
9154
  */
8754
- getAll(): Promise<Result[]>;
9155
+ getAll(): Promise<RecordArray<Result>>;
8755
9156
  /**
8756
9157
  * Performs the query in the database and returns all the results.
8757
9158
  * Warning: If there are a large number of results, this method can have performance implications.
@@ -8760,7 +9161,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
8760
9161
  */
8761
9162
  getAll<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
8762
9163
  batchSize?: number;
8763
- }>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>[]>;
9164
+ }>(options: Options): Promise<RecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
8764
9165
  /**
8765
9166
  * Performs the query in the database and returns all the results.
8766
9167
  * Warning: If there are a large number of results, this method can have performance implications.
@@ -8769,7 +9170,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
8769
9170
  */
8770
9171
  getAll(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'> & {
8771
9172
  batchSize?: number;
8772
- }): Promise<Result[]>;
9173
+ }): Promise<RecordArray<Result>>;
8773
9174
  /**
8774
9175
  * Performs the query in the database and returns the first result.
8775
9176
  * @returns The first record that matches the query, or null if no record matched the query.
@@ -8853,7 +9254,7 @@ type PaginationQueryMeta = {
8853
9254
  };
8854
9255
  interface Paginable<Record extends XataRecord, Result extends XataRecord = Record> {
8855
9256
  meta: PaginationQueryMeta;
8856
- records: RecordArray<Result>;
9257
+ records: PageRecordArray<Result>;
8857
9258
  nextPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
8858
9259
  previousPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
8859
9260
  startPage(size?: number, offset?: number): Promise<Page<Record, Result>>;
@@ -8873,7 +9274,7 @@ declare class Page<Record extends XataRecord, Result extends XataRecord = Record
8873
9274
  /**
8874
9275
  * The set of results for this page.
8875
9276
  */
8876
- readonly records: RecordArray<Result>;
9277
+ readonly records: PageRecordArray<Result>;
8877
9278
  constructor(query: Query<Record, Result>, meta: PaginationQueryMeta, records?: Result[]);
8878
9279
  /**
8879
9280
  * Retrieves the next page of results.
@@ -8927,6 +9328,14 @@ declare const PAGINATION_MAX_OFFSET = 49000;
8927
9328
  declare const PAGINATION_DEFAULT_OFFSET = 0;
8928
9329
  declare function isCursorPaginationOptions(options: Record<string, unknown> | undefined | null): options is CursorNavigationOptions;
8929
9330
  declare class RecordArray<Result extends XataRecord> extends Array<Result> {
9331
+ constructor(overrideRecords?: Result[]);
9332
+ static parseConstructorParams(...args: any[]): any[];
9333
+ toArray(): Result[];
9334
+ toSerializable(): JSONData<Result>[];
9335
+ toString(): string;
9336
+ map<U>(callbackfn: (value: Result, index: number, array: Result[]) => U, thisArg?: any): U[];
9337
+ }
9338
+ declare class PageRecordArray<Result extends XataRecord> extends Array<Result> {
8930
9339
  #private;
8931
9340
  constructor(page: Paginable<any, Result>, overrideRecords?: Result[]);
8932
9341
  static parseConstructorParams(...args: any[]): any[];
@@ -8939,25 +9348,25 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
8939
9348
  *
8940
9349
  * @returns A new array of objects
8941
9350
  */
8942
- nextPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9351
+ nextPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
8943
9352
  /**
8944
9353
  * Retrieve previous page of records
8945
9354
  *
8946
9355
  * @returns A new array of objects
8947
9356
  */
8948
- previousPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9357
+ previousPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
8949
9358
  /**
8950
9359
  * Retrieve start page of records
8951
9360
  *
8952
9361
  * @returns A new array of objects
8953
9362
  */
8954
- startPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9363
+ startPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
8955
9364
  /**
8956
9365
  * Retrieve end page of records
8957
9366
  *
8958
9367
  * @returns A new array of objects
8959
9368
  */
8960
- endPage(size?: number, offset?: number): Promise<RecordArray<Result>>;
9369
+ endPage(size?: number, offset?: number): Promise<PageRecordArray<Result>>;
8961
9370
  /**
8962
9371
  * @returns Boolean indicating if there is a next page
8963
9372
  */
@@ -9661,13 +10070,6 @@ type BaseSchema = {
9661
10070
  link: {
9662
10071
  table: string;
9663
10072
  };
9664
- } | {
9665
- name: string;
9666
- type: 'object';
9667
- columns: {
9668
- name: string;
9669
- type: string;
9670
- }[];
9671
10073
  })[];
9672
10074
  };
9673
10075
  type SchemaInference<T extends readonly BaseSchema[]> = T extends never[] ? Record<string, Record<string, any>> : T extends readonly unknown[] ? T[number] extends {
@@ -9695,19 +10097,13 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
9695
10097
  link?: {
9696
10098
  table: infer LinkedTable;
9697
10099
  };
9698
- columns?: infer ObjectColumns;
9699
10100
  notNull?: infer NotNull;
9700
10101
  } ? NotNull extends true ? {
9701
- [K in PropertyName]: InnerType<Type, ObjectColumns, Tables, LinkedTable>;
10102
+ [K in PropertyName]: InnerType<Type, Tables, LinkedTable>;
9702
10103
  } : {
9703
- [K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
10104
+ [K in PropertyName]?: InnerType<Type, Tables, LinkedTable> | null;
9704
10105
  } : never : never;
9705
- type InnerType<Type, ObjectColumns, Tables, LinkedTable> = Type extends 'string' | 'text' | 'email' ? string : Type extends 'int' | 'float' ? number : Type extends 'bool' ? boolean : Type extends 'datetime' ? Date : Type extends 'multiple' ? string[] : Type extends 'vector' ? number[] : Type extends 'file' ? XataFile : Type extends 'file[]' ? XataArrayFile[] : Type extends 'json' ? JSONValue<any> : Type extends 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
9706
- name: string;
9707
- type: string;
9708
- } ? UnionToIntersection<Values<{
9709
- [K in ObjectColumns[number]['name']]: PropertyType<Tables, ObjectColumns[number], K>;
9710
- }>> : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never;
10106
+ 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;
9711
10107
 
9712
10108
  /**
9713
10109
  * Operator to restrict results to only values that are greater than the given value.
@@ -9826,7 +10222,7 @@ type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
9826
10222
  };
9827
10223
  declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
9828
10224
  #private;
9829
- constructor(schemaTables?: Table[]);
10225
+ constructor();
9830
10226
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
9831
10227
  }
9832
10228
 
@@ -9867,15 +10263,70 @@ declare class FilesPlugin<Schemas extends Record<string, XataRecord>> extends Xa
9867
10263
  }
9868
10264
 
9869
10265
  type SQLQueryParams<T = any[]> = {
10266
+ /**
10267
+ * The SQL statement to execute.
10268
+ * @example
10269
+ * ```ts
10270
+ * const { records } = await xata.sql<TeamsRecord>({
10271
+ * statement: `SELECT * FROM teams WHERE name = $1`,
10272
+ * params: ['A name']
10273
+ * });
10274
+ * ```
10275
+ *
10276
+ * Be careful when using this with user input and use parametrized statements to avoid SQL injection.
10277
+ */
9870
10278
  statement: string;
10279
+ /**
10280
+ * The parameters to pass to the SQL statement.
10281
+ */
9871
10282
  params?: T;
10283
+ /**
10284
+ * The consistency level to use when executing the query.
10285
+ */
9872
10286
  consistency?: 'strong' | 'eventual';
10287
+ /**
10288
+ * The response type to use when executing the query.
10289
+ */
10290
+ responseType?: 'json' | 'array';
9873
10291
  };
9874
- type SQLQuery = TemplateStringsArray | SQLQueryParams | string;
9875
- type SQLPluginResult = <T>(query: SQLQuery, ...parameters: any[]) => Promise<{
10292
+ type SQLQuery = TemplateStringsArray | SQLQueryParams;
10293
+ type SQLResponseType = 'json' | 'array';
10294
+ type SQLQueryResultJSON<T> = {
10295
+ /**
10296
+ * The records returned by the query.
10297
+ */
9876
10298
  records: T[];
10299
+ /**
10300
+ * The columns metadata returned by the query.
10301
+ */
10302
+ columns: Array<{
10303
+ name: string;
10304
+ type: string;
10305
+ }>;
10306
+ /**
10307
+ * Optional warning message returned by the query.
10308
+ */
9877
10309
  warning?: string;
9878
- }>;
10310
+ };
10311
+ type SQLQueryResultArray = {
10312
+ /**
10313
+ * The records returned by the query.
10314
+ */
10315
+ rows: any[][];
10316
+ /**
10317
+ * The columns metadata returned by the query.
10318
+ */
10319
+ columns: Array<{
10320
+ name: string;
10321
+ type: string;
10322
+ }>;
10323
+ /**
10324
+ * Optional warning message returned by the query.
10325
+ */
10326
+ warning?: string;
10327
+ };
10328
+ type SQLQueryResult<T, Mode extends SQLResponseType = 'json'> = Mode extends 'json' ? SQLQueryResultJSON<T> : Mode extends 'array' ? SQLQueryResultArray : never;
10329
+ type SQLPluginResult = <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'>>;
9879
10330
  declare class SQLPlugin extends XataPlugin {
9880
10331
  build(pluginOptions: XataPluginOptions): SQLPluginResult;
9881
10332
  }
@@ -9898,6 +10349,12 @@ type TransactionOperation<Schemas extends Record<string, BaseData>, Tables exten
9898
10349
  table: Model;
9899
10350
  } & DeleteTransactionOperation;
9900
10351
  }>;
10352
+ } | {
10353
+ get: Values<{
10354
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
10355
+ table: Model;
10356
+ } & GetTransactionOperation<Schemas[Model] & XataRecord>;
10357
+ }>;
9901
10358
  };
9902
10359
  type InsertTransactionOperation<O extends XataRecord> = {
9903
10360
  record: Partial<EditableData<O>>;
@@ -9914,9 +10371,13 @@ type DeleteTransactionOperation = {
9914
10371
  id: string;
9915
10372
  failIfMissing?: boolean;
9916
10373
  };
9917
- type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Table>> = Operation extends {
10374
+ type GetTransactionOperation<O extends XataRecord> = {
10375
+ id: string;
10376
+ columns?: SelectableColumn<O>[];
10377
+ };
10378
+ type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Tables extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Tables>> = Operation extends {
9918
10379
  insert: {
9919
- table: Table;
10380
+ table: Tables;
9920
10381
  record: {
9921
10382
  id: infer Id;
9922
10383
  };
@@ -9927,7 +10388,7 @@ type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, T
9927
10388
  rows: number;
9928
10389
  } : Operation extends {
9929
10390
  insert: {
9930
- table: Table;
10391
+ table: Tables;
9931
10392
  };
9932
10393
  } ? {
9933
10394
  operation: 'insert';
@@ -9935,7 +10396,7 @@ type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, T
9935
10396
  rows: number;
9936
10397
  } : Operation extends {
9937
10398
  update: {
9938
- table: Table;
10399
+ table: Tables;
9939
10400
  id: infer Id;
9940
10401
  };
9941
10402
  } ? {
@@ -9944,12 +10405,19 @@ type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, T
9944
10405
  rows: number;
9945
10406
  } : Operation extends {
9946
10407
  delete: {
9947
- table: Table;
10408
+ table: Tables;
9948
10409
  };
9949
10410
  } ? {
9950
10411
  operation: 'delete';
9951
10412
  rows: number;
9952
- } : never;
10413
+ } : Operation extends {
10414
+ get: {
10415
+ table: infer Table;
10416
+ };
10417
+ } ? Table extends Tables ? {
10418
+ operation: 'get';
10419
+ columns: SelectedPick<Schema[Table] & XataRecord, ['*']>;
10420
+ } : never : never;
9953
10421
  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 : [];
9954
10422
  type TransactionResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = {
9955
10423
  results: TransactionOperationResults<Schema, Table, Operations>;
@@ -10025,4 +10493,4 @@ declare class XataError extends Error {
10025
10493
  constructor(message: string, status: number);
10026
10494
  }
10027
10495
 
10028
- 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 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 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 };
10496
+ export { type AcceptWorkspaceMemberInviteError, type AcceptWorkspaceMemberInvitePathParams, type AcceptWorkspaceMemberInviteVariables, 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, 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, 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 };