@xata.io/client 0.0.0-alpha.vf286f7d → 0.0.0-alpha.vf2894b5

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
@@ -37,7 +37,7 @@ type TraceFunction = <T>(name: string, fn: (options: {
37
37
  }) => T, options?: AttributeDictionary) => Promise<T>;
38
38
 
39
39
  type RequestInit = {
40
- body?: string;
40
+ body?: any;
41
41
  headers?: Record<string, string>;
42
42
  method?: string;
43
43
  signal?: any;
@@ -47,6 +47,8 @@ type Response = {
47
47
  status: number;
48
48
  url: string;
49
49
  json(): Promise<any>;
50
+ text(): Promise<string>;
51
+ blob(): Promise<Blob>;
50
52
  headers?: {
51
53
  get(name: string): string | null;
52
54
  };
@@ -81,6 +83,8 @@ type FetcherExtraProps = {
81
83
  clientName?: string;
82
84
  xataAgentExtra?: Record<string, string>;
83
85
  fetchOptions?: Record<string, unknown>;
86
+ rawResponse?: boolean;
87
+ headers?: Record<string, unknown>;
84
88
  };
85
89
 
86
90
  type ControlPlaneFetcherExtraProps = {
@@ -105,6 +109,26 @@ type ErrorWrapper$1<TError> = TError | {
105
109
  *
106
110
  * @version 1.0
107
111
  */
112
+ type OAuthResponseType = 'code';
113
+ type OAuthScope = 'admin:all';
114
+ type AuthorizationCodeResponse = {
115
+ state?: string;
116
+ redirectUri?: string;
117
+ scopes?: OAuthScope[];
118
+ clientId?: string;
119
+ /**
120
+ * @format date-time
121
+ */
122
+ expires?: string;
123
+ code?: string;
124
+ };
125
+ type AuthorizationCodeRequest = {
126
+ state?: string;
127
+ redirectUri?: string;
128
+ scopes?: OAuthScope[];
129
+ clientId: string;
130
+ responseType: OAuthResponseType;
131
+ };
108
132
  type User = {
109
133
  /**
110
134
  * @format email
@@ -129,6 +153,31 @@ type DateTime$1 = string;
129
153
  * @pattern [a-zA-Z0-9_\-~]*
130
154
  */
131
155
  type APIKeyName = string;
156
+ type OAuthClientPublicDetails = {
157
+ name?: string;
158
+ description?: string;
159
+ icon?: string;
160
+ clientId: string;
161
+ };
162
+ type OAuthClientID = string;
163
+ type OAuthAccessToken = {
164
+ token: string;
165
+ scopes: string[];
166
+ /**
167
+ * @format date-time
168
+ */
169
+ createdAt: string;
170
+ /**
171
+ * @format date-time
172
+ */
173
+ updatedAt: string;
174
+ /**
175
+ * @format date-time
176
+ */
177
+ expiresAt: string;
178
+ clientId: string;
179
+ };
180
+ type AccessToken = string;
132
181
  /**
133
182
  * @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
134
183
  * @x-go-type auth.WorkspaceID
@@ -180,6 +229,117 @@ type WorkspaceMembers = {
180
229
  * @pattern ^ik_[a-zA-Z0-9]+
181
230
  */
182
231
  type InviteKey = string;
232
+ /**
233
+ * @x-internal true
234
+ * @pattern [a-zA-Z0-9_-~:]+
235
+ */
236
+ type ClusterID = string;
237
+ /**
238
+ * @x-internal true
239
+ */
240
+ type ClusterShortMetadata = {
241
+ id: ClusterID;
242
+ state: string;
243
+ region: string;
244
+ name: string;
245
+ /**
246
+ * @format int64
247
+ */
248
+ branches: number;
249
+ };
250
+ /**
251
+ * @x-internal true
252
+ */
253
+ type ListClustersResponse = {
254
+ clusters: ClusterShortMetadata[];
255
+ };
256
+ /**
257
+ * @x-internal true
258
+ */
259
+ type AutoscalingConfig = {
260
+ enabled: boolean;
261
+ /**
262
+ * @format int64
263
+ */
264
+ minCapacity: number;
265
+ /**
266
+ * @format int64
267
+ */
268
+ maxCapacity: number;
269
+ };
270
+ /**
271
+ * @x-internal true
272
+ */
273
+ type MaintenanceConfig = {
274
+ autoMinorVersionUpgrade?: boolean;
275
+ maintenanceWindow?: string;
276
+ plannedChangesWindow?: string;
277
+ };
278
+ /**
279
+ * @x-internal true
280
+ */
281
+ type ClusterConfiguration = {
282
+ instanceType: string;
283
+ /**
284
+ * @format int64
285
+ */
286
+ replicas?: number;
287
+ deletionProtection?: boolean;
288
+ autoscaling?: AutoscalingConfig;
289
+ maintenance?: MaintenanceConfig;
290
+ };
291
+ /**
292
+ * @x-internal true
293
+ */
294
+ type ClusterCreateDetails = {
295
+ /**
296
+ * @minLength 1
297
+ */
298
+ region: string;
299
+ /**
300
+ * @maxLength 63
301
+ * @minLength 1
302
+ * @pattern [a-zA-Z0-9_-~:]+
303
+ */
304
+ name: string;
305
+ configuration: ClusterConfiguration;
306
+ };
307
+ /**
308
+ * @x-internal true
309
+ */
310
+ type ClusterResponse = {
311
+ state: string;
312
+ clusterID: string;
313
+ };
314
+ /**
315
+ * @x-internal true
316
+ */
317
+ type ClusterMetadata = {
318
+ id: ClusterID;
319
+ state: string;
320
+ region: string;
321
+ name: string;
322
+ /**
323
+ * @format int64
324
+ */
325
+ branches: number;
326
+ configuration?: ClusterConfiguration;
327
+ };
328
+ /**
329
+ * @x-internal true
330
+ */
331
+ type ClusterUpdateDetails = {
332
+ id: ClusterID;
333
+ /**
334
+ * @maxLength 63
335
+ * @minLength 1
336
+ * @pattern [a-zA-Z0-9_-~:]+
337
+ */
338
+ name?: string;
339
+ configuration?: ClusterConfiguration;
340
+ state?: string;
341
+ region?: string;
342
+ };
183
343
  /**
184
344
  * Metadata of databases
185
345
  */
@@ -260,6 +420,7 @@ type DatabaseGithubSettings = {
260
420
  };
261
421
  type Region = {
262
422
  id: string;
423
+ name: string;
263
424
  };
264
425
  type ListRegionsResponse = {
265
426
  /**
@@ -295,6 +456,53 @@ type SimpleError$1 = {
295
456
  * @version 1.0
296
457
  */
297
458
 
459
+ type GetAuthorizationCodeQueryParams = {
460
+ clientID: string;
461
+ responseType: OAuthResponseType;
462
+ redirectUri?: string;
463
+ scopes?: OAuthScope[];
464
+ state?: string;
465
+ };
466
+ type GetAuthorizationCodeError = ErrorWrapper$1<{
467
+ status: 400;
468
+ payload: BadRequestError$1;
469
+ } | {
470
+ status: 401;
471
+ payload: AuthError$1;
472
+ } | {
473
+ status: 404;
474
+ payload: SimpleError$1;
475
+ } | {
476
+ status: 409;
477
+ payload: SimpleError$1;
478
+ }>;
479
+ type GetAuthorizationCodeVariables = {
480
+ queryParams: GetAuthorizationCodeQueryParams;
481
+ } & ControlPlaneFetcherExtraProps;
482
+ /**
483
+ * Creates, stores and returns an authorization code to be used by a third party app. Supporting use of GET is required by OAuth2 spec
484
+ */
485
+ declare const getAuthorizationCode: (variables: GetAuthorizationCodeVariables, signal?: AbortSignal) => Promise<AuthorizationCodeResponse>;
486
+ type GrantAuthorizationCodeError = ErrorWrapper$1<{
487
+ status: 400;
488
+ payload: BadRequestError$1;
489
+ } | {
490
+ status: 401;
491
+ payload: AuthError$1;
492
+ } | {
493
+ status: 404;
494
+ payload: SimpleError$1;
495
+ } | {
496
+ status: 409;
497
+ payload: SimpleError$1;
498
+ }>;
499
+ type GrantAuthorizationCodeVariables = {
500
+ body: AuthorizationCodeRequest;
501
+ } & ControlPlaneFetcherExtraProps;
502
+ /**
503
+ * Creates, stores and returns an authorization code to be used by a third party app
504
+ */
505
+ declare const grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal) => Promise<AuthorizationCodeResponse>;
298
506
  type GetUserError = ErrorWrapper$1<{
299
507
  status: 400;
300
508
  payload: BadRequestError$1;
@@ -414,6 +622,115 @@ type DeleteUserAPIKeyVariables = {
414
622
  * Delete an existing API key
415
623
  */
416
624
  declare const deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
625
+ type GetUserOAuthClientsError = ErrorWrapper$1<{
626
+ status: 400;
627
+ payload: BadRequestError$1;
628
+ } | {
629
+ status: 401;
630
+ payload: AuthError$1;
631
+ } | {
632
+ status: 404;
633
+ payload: SimpleError$1;
634
+ }>;
635
+ type GetUserOAuthClientsResponse = {
636
+ clients?: OAuthClientPublicDetails[];
637
+ };
638
+ type GetUserOAuthClientsVariables = ControlPlaneFetcherExtraProps;
639
+ /**
640
+ * Retrieve the list of OAuth Clients that a user has authorized
641
+ */
642
+ declare const getUserOAuthClients: (variables: GetUserOAuthClientsVariables, signal?: AbortSignal) => Promise<GetUserOAuthClientsResponse>;
643
+ type DeleteUserOAuthClientPathParams = {
644
+ clientId: OAuthClientID;
645
+ };
646
+ type DeleteUserOAuthClientError = ErrorWrapper$1<{
647
+ status: 400;
648
+ payload: BadRequestError$1;
649
+ } | {
650
+ status: 401;
651
+ payload: AuthError$1;
652
+ } | {
653
+ status: 404;
654
+ payload: SimpleError$1;
655
+ }>;
656
+ type DeleteUserOAuthClientVariables = {
657
+ pathParams: DeleteUserOAuthClientPathParams;
658
+ } & ControlPlaneFetcherExtraProps;
659
+ /**
660
+ * Delete the oauth client for the user and revoke all access
661
+ */
662
+ declare const deleteUserOAuthClient: (variables: DeleteUserOAuthClientVariables, signal?: AbortSignal) => Promise<undefined>;
663
+ type GetUserOAuthAccessTokensError = ErrorWrapper$1<{
664
+ status: 400;
665
+ payload: BadRequestError$1;
666
+ } | {
667
+ status: 401;
668
+ payload: AuthError$1;
669
+ } | {
670
+ status: 404;
671
+ payload: SimpleError$1;
672
+ }>;
673
+ type GetUserOAuthAccessTokensResponse = {
674
+ accessTokens: OAuthAccessToken[];
675
+ };
676
+ type GetUserOAuthAccessTokensVariables = ControlPlaneFetcherExtraProps;
677
+ /**
678
+ * Retrieve the list of valid OAuth Access Tokens on the current user's account
679
+ */
680
+ declare const getUserOAuthAccessTokens: (variables: GetUserOAuthAccessTokensVariables, signal?: AbortSignal) => Promise<GetUserOAuthAccessTokensResponse>;
681
+ type DeleteOAuthAccessTokenPathParams = {
682
+ token: AccessToken;
683
+ };
684
+ type DeleteOAuthAccessTokenError = ErrorWrapper$1<{
685
+ status: 400;
686
+ payload: BadRequestError$1;
687
+ } | {
688
+ status: 401;
689
+ payload: AuthError$1;
690
+ } | {
691
+ status: 404;
692
+ payload: SimpleError$1;
693
+ } | {
694
+ status: 409;
695
+ payload: SimpleError$1;
696
+ }>;
697
+ type DeleteOAuthAccessTokenVariables = {
698
+ pathParams: DeleteOAuthAccessTokenPathParams;
699
+ } & ControlPlaneFetcherExtraProps;
700
+ /**
701
+ * Expires the access token for a third party app
702
+ */
703
+ declare const deleteOAuthAccessToken: (variables: DeleteOAuthAccessTokenVariables, signal?: AbortSignal) => Promise<undefined>;
704
+ type UpdateOAuthAccessTokenPathParams = {
705
+ token: AccessToken;
706
+ };
707
+ type UpdateOAuthAccessTokenError = ErrorWrapper$1<{
708
+ status: 400;
709
+ payload: BadRequestError$1;
710
+ } | {
711
+ status: 401;
712
+ payload: AuthError$1;
713
+ } | {
714
+ status: 404;
715
+ payload: SimpleError$1;
716
+ } | {
717
+ status: 409;
718
+ payload: SimpleError$1;
719
+ }>;
720
+ type UpdateOAuthAccessTokenRequestBody = {
721
+ /**
722
+ * expiration time of the token as a unix timestamp
723
+ */
724
+ expires: number;
725
+ };
726
+ type UpdateOAuthAccessTokenVariables = {
727
+ body: UpdateOAuthAccessTokenRequestBody;
728
+ pathParams: UpdateOAuthAccessTokenPathParams;
729
+ } & ControlPlaneFetcherExtraProps;
730
+ /**
731
+ * Updates partially the access token for a third party app
732
+ */
733
+ declare const updateOAuthAccessToken: (variables: UpdateOAuthAccessTokenVariables, signal?: AbortSignal) => Promise<OAuthAccessToken>;
417
734
  type GetWorkspacesListError = ErrorWrapper$1<{
418
735
  status: 400;
419
736
  payload: BadRequestError$1;
@@ -787,6 +1104,99 @@ type ResendWorkspaceMemberInviteVariables = {
787
1104
  * This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted.
788
1105
  */
789
1106
  declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
1107
+ type ListClustersPathParams = {
1108
+ /**
1109
+ * Workspace ID
1110
+ */
1111
+ workspaceId: WorkspaceID;
1112
+ };
1113
+ type ListClustersError = ErrorWrapper$1<{
1114
+ status: 400;
1115
+ payload: BadRequestError$1;
1116
+ } | {
1117
+ status: 401;
1118
+ payload: AuthError$1;
1119
+ }>;
1120
+ type ListClustersVariables = {
1121
+ pathParams: ListClustersPathParams;
1122
+ } & ControlPlaneFetcherExtraProps;
1123
+ /**
1124
+ * List all clusters available in your Workspace.
1125
+ */
1126
+ declare const listClusters: (variables: ListClustersVariables, signal?: AbortSignal) => Promise<ListClustersResponse>;
1127
+ type CreateClusterPathParams = {
1128
+ /**
1129
+ * Workspace ID
1130
+ */
1131
+ workspaceId: WorkspaceID;
1132
+ };
1133
+ type CreateClusterError = ErrorWrapper$1<{
1134
+ status: 400;
1135
+ payload: BadRequestError$1;
1136
+ } | {
1137
+ status: 401;
1138
+ payload: AuthError$1;
1139
+ } | {
1140
+ status: 422;
1141
+ payload: SimpleError$1;
1142
+ } | {
1143
+ status: 423;
1144
+ payload: SimpleError$1;
1145
+ }>;
1146
+ type CreateClusterVariables = {
1147
+ body: ClusterCreateDetails;
1148
+ pathParams: CreateClusterPathParams;
1149
+ } & ControlPlaneFetcherExtraProps;
1150
+ declare const createCluster: (variables: CreateClusterVariables, signal?: AbortSignal) => Promise<ClusterResponse>;
1151
+ type GetClusterPathParams = {
1152
+ /**
1153
+ * Workspace ID
1154
+ */
1155
+ workspaceId: WorkspaceID;
1156
+ /**
1157
+ * Cluster ID
1158
+ */
1159
+ clusterId: ClusterID;
1160
+ };
1161
+ type GetClusterError = ErrorWrapper$1<{
1162
+ status: 400;
1163
+ payload: BadRequestError$1;
1164
+ } | {
1165
+ status: 401;
1166
+ payload: AuthError$1;
1167
+ }>;
1168
+ type GetClusterVariables = {
1169
+ pathParams: GetClusterPathParams;
1170
+ } & ControlPlaneFetcherExtraProps;
1171
+ /**
1172
+ * Retrieve metadata for given cluster ID
1173
+ */
1174
+ declare const getCluster: (variables: GetClusterVariables, signal?: AbortSignal) => Promise<ClusterMetadata>;
1175
+ type UpdateClusterPathParams = {
1176
+ /**
1177
+ * Workspace ID
1178
+ */
1179
+ workspaceId: WorkspaceID;
1180
+ /**
1181
+ * Cluster ID
1182
+ */
1183
+ clusterId: ClusterID;
1184
+ };
1185
+ type UpdateClusterError = ErrorWrapper$1<{
1186
+ status: 400;
1187
+ payload: BadRequestError$1;
1188
+ } | {
1189
+ status: 401;
1190
+ payload: AuthError$1;
1191
+ }>;
1192
+ type UpdateClusterVariables = {
1193
+ body: ClusterUpdateDetails;
1194
+ pathParams: UpdateClusterPathParams;
1195
+ } & ControlPlaneFetcherExtraProps;
1196
+ /**
1197
+ * Update cluster for given cluster ID
1198
+ */
1199
+ declare const updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal) => Promise<ClusterMetadata>;
790
1200
  type GetDatabaseListPathParams = {
791
1201
  /**
792
1202
  * Workspace ID
@@ -1171,19 +1581,24 @@ type ColumnVector = {
1171
1581
  */
1172
1582
  dimension: number;
1173
1583
  };
1584
+ type ColumnFile = {
1585
+ defaultPublicAccess?: boolean;
1586
+ };
1174
1587
  type Column = {
1175
1588
  name: string;
1176
- type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file';
1589
+ type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file' | 'json';
1177
1590
  link?: ColumnLink;
1178
1591
  vector?: ColumnVector;
1592
+ file?: ColumnFile;
1593
+ ['file[]']?: ColumnFile;
1179
1594
  notNull?: boolean;
1180
1595
  defaultValue?: string;
1181
1596
  unique?: boolean;
1182
1597
  columns?: Column[];
1183
1598
  };
1184
1599
  type RevLink = {
1185
- linkID: string;
1186
1600
  table: string;
1601
+ column: string;
1187
1602
  };
1188
1603
  type Table = {
1189
1604
  id?: string;
@@ -1305,9 +1720,11 @@ type FilterPredicateOp = {
1305
1720
  $gt?: FilterRangeValue;
1306
1721
  $ge?: FilterRangeValue;
1307
1722
  $contains?: string;
1723
+ $iContains?: string;
1308
1724
  $startsWith?: string;
1309
1725
  $endsWith?: string;
1310
1726
  $pattern?: string;
1727
+ $iPattern?: string;
1311
1728
  };
1312
1729
  /**
1313
1730
  * @maxProperties 2
@@ -1823,6 +2240,14 @@ type RecordMeta = {
1823
2240
  * The record's version. Can be used for optimistic concurrency control.
1824
2241
  */
1825
2242
  version: number;
2243
+ /**
2244
+ * The time when the record was created.
2245
+ */
2246
+ createdAt?: string;
2247
+ /**
2248
+ * The time when the record was last updated.
2249
+ */
2250
+ updatedAt?: string;
1826
2251
  /**
1827
2252
  * The record's table name. APIs that return records from multiple tables will set this field accordingly.
1828
2253
  */
@@ -1862,6 +2287,30 @@ type FileResponse = {
1862
2287
  version: number;
1863
2288
  attributes?: Record<string, any>;
1864
2289
  };
2290
+ type QueryColumnsProjection = (string | ProjectionConfig)[];
2291
+ /**
2292
+ * A structured projection that allows for some configuration.
2293
+ */
2294
+ type ProjectionConfig = {
2295
+ /**
2296
+ * The name of the column to project or a reverse link specification, see [API Guide](https://xata.io/docs/concepts/data-model#links-and-relations).
2297
+ */
2298
+ name?: string;
2299
+ columns?: QueryColumnsProjection;
2300
+ /**
2301
+ * An alias for the projected field, this is how it will be returned in the response.
2302
+ */
2303
+ as?: string;
2304
+ sort?: SortExpression;
2305
+ /**
2306
+ * @default 20
2307
+ */
2308
+ limit?: number;
2309
+ /**
2310
+ * @default 0
2311
+ */
2312
+ offset?: number;
2313
+ };
1865
2314
  /**
1866
2315
  * The target expression is used to filter the search results by the target columns.
1867
2316
  */
@@ -2024,12 +2473,6 @@ type SearchPageConfig = {
2024
2473
  */
2025
2474
  offset?: number;
2026
2475
  };
2027
- /**
2028
- * Xata Table SQL Record
2029
- */
2030
- type SQLRecord = {
2031
- [key: string]: any;
2032
- };
2033
2476
  /**
2034
2477
  * A summary expression is the description of a single summary operation. It consists of a single
2035
2478
  * key representing the operation, and a value representing the column to be operated on.
@@ -2126,6 +2569,16 @@ type AverageAgg = {
2126
2569
  */
2127
2570
  column: string;
2128
2571
  };
2572
+ /**
2573
+ * Calculate given percentiles of the numeric values in a particular column.
2574
+ */
2575
+ type PercentilesAgg = {
2576
+ /**
2577
+ * The column on which to compute the average. Must be a numeric type.
2578
+ */
2579
+ column: string;
2580
+ percentiles: number[];
2581
+ };
2129
2582
  /**
2130
2583
  * Count the number of distinct values in a particular column.
2131
2584
  */
@@ -2240,6 +2693,8 @@ type AggExpression = {
2240
2693
  min?: MinAgg;
2241
2694
  } | {
2242
2695
  average?: AverageAgg;
2696
+ } | {
2697
+ percentiles?: PercentilesAgg;
2243
2698
  } | {
2244
2699
  uniqueCount?: UniqueCountAgg;
2245
2700
  } | {
@@ -2255,7 +2710,9 @@ type AggResponse$1 = (number | null) | {
2255
2710
  $count: number;
2256
2711
  } & {
2257
2712
  [key: string]: AggResponse$1;
2258
- })[];
2713
+ })[] | {
2714
+ [key: string]: number;
2715
+ };
2259
2716
  };
2260
2717
  /**
2261
2718
  * File identifier in access URLs
@@ -2269,6 +2726,12 @@ type FileAccessID = string;
2269
2726
  * File signature
2270
2727
  */
2271
2728
  type FileSignature = string;
2729
+ /**
2730
+ * Xata Table SQL Record
2731
+ */
2732
+ type SQLRecord = {
2733
+ [key: string]: any;
2734
+ };
2272
2735
  /**
2273
2736
  * Xata Table Record Metadata
2274
2737
  */
@@ -2314,10 +2777,16 @@ type SchemaCompareResponse = {
2314
2777
  target: Schema;
2315
2778
  edits: SchemaEditScript;
2316
2779
  };
2780
+ type RateLimitError = {
2781
+ id?: string;
2782
+ message: string;
2783
+ };
2317
2784
  type RecordUpdateResponse = XataRecord$1 | {
2318
2785
  id: string;
2319
2786
  xata: {
2320
2787
  version: number;
2788
+ createdAt: string;
2789
+ updatedAt: string;
2321
2790
  };
2322
2791
  };
2323
2792
  type PutFileResponse = FileResponse;
@@ -2344,14 +2813,10 @@ type ServiceUnavailableError = {
2344
2813
  type SearchResponse = {
2345
2814
  records: XataRecord$1[];
2346
2815
  warning?: string;
2347
- };
2348
- type SQLResponse = {
2349
- records: SQLRecord[];
2350
- warning?: string;
2351
- };
2352
- type RateLimitError = {
2353
- id?: string;
2354
- message: string;
2816
+ /**
2817
+ * The total count of records matched. It will be accurately returned up to 10000 records.
2818
+ */
2819
+ totalCount: number;
2355
2820
  };
2356
2821
  type SummarizeResponse = {
2357
2822
  summaries: Record<string, any>[];
@@ -2364,6 +2829,10 @@ type AggResponse = {
2364
2829
  [key: string]: AggResponse$1;
2365
2830
  };
2366
2831
  };
2832
+ type SQLResponse = {
2833
+ records?: SQLRecord[];
2834
+ warning?: string;
2835
+ };
2367
2836
 
2368
2837
  type DataPlaneFetcherExtraProps = {
2369
2838
  apiUrl: string;
@@ -2376,6 +2845,8 @@ type DataPlaneFetcherExtraProps = {
2376
2845
  sessionID?: string;
2377
2846
  clientName?: string;
2378
2847
  xataAgentExtra?: Record<string, string>;
2848
+ rawResponse?: boolean;
2849
+ headers?: Record<string, unknown>;
2379
2850
  };
2380
2851
  type ErrorWrapper<TError> = TError | {
2381
2852
  status: 'unknown';
@@ -3663,9 +4134,7 @@ type AddTableColumnVariables = {
3663
4134
  pathParams: AddTableColumnPathParams;
3664
4135
  } & DataPlaneFetcherExtraProps;
3665
4136
  /**
3666
- * Adds a new column to the table. The body of the request should contain the column definition. In the column definition, the 'name' field should
3667
- * contain the full path separated by dots. If the parent objects do not exists, they will be automatically created. For example,
3668
- * passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
4137
+ * Adds a new column to the table. The body of the request should contain the column definition.
3669
4138
  */
3670
4139
  declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3671
4140
  type GetColumnPathParams = {
@@ -3698,7 +4167,7 @@ type GetColumnVariables = {
3698
4167
  pathParams: GetColumnPathParams;
3699
4168
  } & DataPlaneFetcherExtraProps;
3700
4169
  /**
3701
- * Get the definition of a single column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
4170
+ * Get the definition of a single column.
3702
4171
  */
3703
4172
  declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
3704
4173
  type UpdateColumnPathParams = {
@@ -3738,7 +4207,7 @@ type UpdateColumnVariables = {
3738
4207
  pathParams: UpdateColumnPathParams;
3739
4208
  } & DataPlaneFetcherExtraProps;
3740
4209
  /**
3741
- * Update column with partial data. Can be used for renaming the column by providing a new "name" field. To refer to sub-objects, the column name can contain dots. For example `address.country`.
4210
+ * Update column with partial data. Can be used for renaming the column by providing a new "name" field.
3742
4211
  */
3743
4212
  declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3744
4213
  type DeleteColumnPathParams = {
@@ -3771,7 +4240,7 @@ type DeleteColumnVariables = {
3771
4240
  pathParams: DeleteColumnPathParams;
3772
4241
  } & DataPlaneFetcherExtraProps;
3773
4242
  /**
3774
- * Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
4243
+ * Deletes the specified column.
3775
4244
  */
3776
4245
  declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
3777
4246
  type BranchTransactionPathParams = {
@@ -3791,6 +4260,9 @@ type BranchTransactionError = ErrorWrapper<{
3791
4260
  } | {
3792
4261
  status: 404;
3793
4262
  payload: SimpleError;
4263
+ } | {
4264
+ status: 429;
4265
+ payload: RateLimitError;
3794
4266
  }>;
3795
4267
  type BranchTransactionRequestBody = {
3796
4268
  operations: TransactionOperation$1[];
@@ -4358,7 +4830,7 @@ type QueryTableRequestBody = {
4358
4830
  filter?: FilterExpression;
4359
4831
  sort?: SortExpression;
4360
4832
  page?: PageConfig;
4361
- columns?: ColumnsProjection;
4833
+ columns?: QueryColumnsProjection;
4362
4834
  /**
4363
4835
  * The consistency level for this request.
4364
4836
  *
@@ -5143,12 +5615,12 @@ type QueryTableVariables = {
5143
5615
  * returned is empty, but `page.meta.cursor` will include a cursor that can be
5144
5616
  * used to "tail" the table from the end waiting for new data to be inserted.
5145
5617
  * - `page.before=end`: This cursor returns the last page.
5146
- * - `page.start=<cursor>`: Start at the beginning of the result set of the <cursor> query. This is equivalent to querying the
5618
+ * - `page.start=$cursor`: Start at the beginning of the result set of the $cursor query. This is equivalent to querying the
5147
5619
  * first page without a cursor but applying `filter` and `sort` . Yet the `page.start`
5148
5620
  * cursor can be convenient at times as user code does not need to remember the
5149
5621
  * filter, sort, columns or page size configuration. All these information are
5150
5622
  * read from the cursor.
5151
- * - `page.end=<cursor>`: Move to the end of the result set of the <cursor> query. This is equivalent to querying the
5623
+ * - `page.end=$cursor`: Move to the end of the result set of the $cursor query. This is equivalent to querying the
5152
5624
  * last page with `page.before=end`, `filter`, and `sort` . Yet the
5153
5625
  * `page.end` cursor can be more convenient at times as user code does not
5154
5626
  * need to remember the filter, sort, columns or page size configuration. All
@@ -5272,49 +5744,6 @@ type SearchTableVariables = {
5272
5744
  * * filtering on columns of type `multiple` is currently unsupported
5273
5745
  */
5274
5746
  declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
5275
- type SqlQueryPathParams = {
5276
- /**
5277
- * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
5278
- */
5279
- dbBranchName: DBBranchName;
5280
- workspace: string;
5281
- region: string;
5282
- };
5283
- type SqlQueryError = ErrorWrapper<{
5284
- status: 400;
5285
- payload: BadRequestError;
5286
- } | {
5287
- status: 401;
5288
- payload: AuthError;
5289
- } | {
5290
- status: 404;
5291
- payload: SimpleError;
5292
- } | {
5293
- status: 503;
5294
- payload: ServiceUnavailableError;
5295
- }>;
5296
- type SqlQueryRequestBody = {
5297
- /**
5298
- * The query string.
5299
- *
5300
- * @minLength 1
5301
- */
5302
- query: string;
5303
- /**
5304
- * The consistency level for this request.
5305
- *
5306
- * @default strong
5307
- */
5308
- consistency?: 'strong' | 'eventual';
5309
- };
5310
- type SqlQueryVariables = {
5311
- body: SqlQueryRequestBody;
5312
- pathParams: SqlQueryPathParams;
5313
- } & DataPlaneFetcherExtraProps;
5314
- /**
5315
- * Run an SQL query across the database branch.
5316
- */
5317
- declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<SQLResponse>;
5318
5747
  type VectorSearchTablePathParams = {
5319
5748
  /**
5320
5749
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -5399,15 +5828,16 @@ type AskTableError = ErrorWrapper<{
5399
5828
  } | {
5400
5829
  status: 429;
5401
5830
  payload: RateLimitError;
5402
- } | {
5403
- status: 503;
5404
- payload: ServiceUnavailableError;
5405
5831
  }>;
5406
5832
  type AskTableResponse = {
5407
5833
  /**
5408
5834
  * The answer to the input question
5409
5835
  */
5410
- answer?: string;
5836
+ answer: string;
5837
+ /**
5838
+ * The session ID for the chat session.
5839
+ */
5840
+ sessionId: string;
5411
5841
  };
5412
5842
  type AskTableRequestBody = {
5413
5843
  /**
@@ -5462,6 +5892,61 @@ type AskTableVariables = {
5462
5892
  * Ask your table a question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
5463
5893
  */
5464
5894
  declare const askTable: (variables: AskTableVariables, signal?: AbortSignal) => Promise<AskTableResponse>;
5895
+ type AskTableSessionPathParams = {
5896
+ /**
5897
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
5898
+ */
5899
+ dbBranchName: DBBranchName;
5900
+ /**
5901
+ * The Table name
5902
+ */
5903
+ tableName: TableName;
5904
+ /**
5905
+ * @maxLength 36
5906
+ * @minLength 36
5907
+ */
5908
+ sessionId: string;
5909
+ workspace: string;
5910
+ region: string;
5911
+ };
5912
+ type AskTableSessionError = ErrorWrapper<{
5913
+ status: 400;
5914
+ payload: BadRequestError;
5915
+ } | {
5916
+ status: 401;
5917
+ payload: AuthError;
5918
+ } | {
5919
+ status: 404;
5920
+ payload: SimpleError;
5921
+ } | {
5922
+ status: 429;
5923
+ payload: RateLimitError;
5924
+ } | {
5925
+ status: 503;
5926
+ payload: ServiceUnavailableError;
5927
+ }>;
5928
+ type AskTableSessionResponse = {
5929
+ /**
5930
+ * The answer to the input question
5931
+ */
5932
+ answer: string;
5933
+ };
5934
+ type AskTableSessionRequestBody = {
5935
+ /**
5936
+ * The question you'd like to ask.
5937
+ *
5938
+ * @minLength 3
5939
+ */
5940
+ message?: string;
5941
+ };
5942
+ type AskTableSessionVariables = {
5943
+ body?: AskTableSessionRequestBody;
5944
+ pathParams: AskTableSessionPathParams;
5945
+ } & DataPlaneFetcherExtraProps;
5946
+ /**
5947
+ * Ask a follow-up question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
5948
+ */
5949
+ declare const askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal) => Promise<AskTableSessionResponse>;
5465
5950
  type SummarizeTablePathParams = {
5466
5951
  /**
5467
5952
  * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -5649,7 +6134,54 @@ type FileAccessVariables = {
5649
6134
  /**
5650
6135
  * Retrieve file content by access id
5651
6136
  */
5652
- declare const fileAccess: (variables: FileAccessVariables, signal?: AbortSignal) => Promise<undefined>;
6137
+ declare const fileAccess: (variables: FileAccessVariables, signal?: AbortSignal) => Promise<Blob>;
6138
+ type SqlQueryPathParams = {
6139
+ /**
6140
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
6141
+ */
6142
+ dbBranchName: DBBranchName;
6143
+ workspace: string;
6144
+ region: string;
6145
+ };
6146
+ type SqlQueryError = ErrorWrapper<{
6147
+ status: 400;
6148
+ payload: BadRequestError;
6149
+ } | {
6150
+ status: 401;
6151
+ payload: AuthError;
6152
+ } | {
6153
+ status: 404;
6154
+ payload: SimpleError;
6155
+ } | {
6156
+ status: 503;
6157
+ payload: ServiceUnavailableError;
6158
+ }>;
6159
+ type SqlQueryRequestBody = {
6160
+ /**
6161
+ * The SQL statement.
6162
+ *
6163
+ * @minLength 1
6164
+ */
6165
+ statement: string;
6166
+ /**
6167
+ * The query parameter list.
6168
+ */
6169
+ params?: any[] | null;
6170
+ /**
6171
+ * The consistency level for this request.
6172
+ *
6173
+ * @default strong
6174
+ */
6175
+ consistency?: 'strong' | 'eventual';
6176
+ };
6177
+ type SqlQueryVariables = {
6178
+ body: SqlQueryRequestBody;
6179
+ pathParams: SqlQueryPathParams;
6180
+ } & DataPlaneFetcherExtraProps;
6181
+ /**
6182
+ * Run an SQL query across the database branch.
6183
+ */
6184
+ declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<SQLResponse>;
5653
6185
 
5654
6186
  declare const operationsByTag: {
5655
6187
  branch: {
@@ -5717,18 +6249,30 @@ declare const operationsByTag: {
5717
6249
  getFile: (variables: GetFileVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
5718
6250
  putFile: (variables: PutFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
5719
6251
  deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
5720
- fileAccess: (variables: FileAccessVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6252
+ fileAccess: (variables: FileAccessVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
5721
6253
  };
5722
6254
  searchAndFilter: {
5723
6255
  queryTable: (variables: QueryTableVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
5724
6256
  searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
5725
6257
  searchTable: (variables: SearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
5726
- sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal | undefined) => Promise<SQLResponse>;
5727
6258
  vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
5728
6259
  askTable: (variables: AskTableVariables, signal?: AbortSignal | undefined) => Promise<AskTableResponse>;
6260
+ askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal | undefined) => Promise<AskTableSessionResponse>;
5729
6261
  summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal | undefined) => Promise<SummarizeResponse>;
5730
6262
  aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal | undefined) => Promise<AggResponse>;
5731
6263
  };
6264
+ sql: {
6265
+ sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal | undefined) => Promise<SQLResponse>;
6266
+ };
6267
+ oAuth: {
6268
+ getAuthorizationCode: (variables: GetAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<AuthorizationCodeResponse>;
6269
+ grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<AuthorizationCodeResponse>;
6270
+ getUserOAuthClients: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserOAuthClientsResponse>;
6271
+ deleteUserOAuthClient: (variables: DeleteUserOAuthClientVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6272
+ getUserOAuthAccessTokens: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserOAuthAccessTokensResponse>;
6273
+ deleteOAuthAccessToken: (variables: DeleteOAuthAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
6274
+ updateOAuthAccessToken: (variables: UpdateOAuthAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<OAuthAccessToken>;
6275
+ };
5732
6276
  users: {
5733
6277
  getUser: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<UserWithID>;
5734
6278
  updateUser: (variables: UpdateUserVariables, signal?: AbortSignal | undefined) => Promise<UserWithID>;
@@ -5756,6 +6300,12 @@ declare const operationsByTag: {
5756
6300
  acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
5757
6301
  resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
5758
6302
  };
6303
+ xbcontrolOther: {
6304
+ listClusters: (variables: ListClustersVariables, signal?: AbortSignal | undefined) => Promise<ListClustersResponse>;
6305
+ createCluster: (variables: CreateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterResponse>;
6306
+ getCluster: (variables: GetClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterMetadata>;
6307
+ updateCluster: (variables: UpdateClusterVariables, signal?: AbortSignal | undefined) => Promise<ClusterMetadata>;
6308
+ };
5759
6309
  databases: {
5760
6310
  getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal | undefined) => Promise<ListDatabasesResponse>;
5761
6311
  createDatabase: (variables: CreateDatabaseVariables, signal?: AbortSignal | undefined) => Promise<CreateDatabaseResponse>;
@@ -5805,31 +6355,16 @@ type responses_ServiceUnavailableError = ServiceUnavailableError;
5805
6355
  type responses_SimpleError = SimpleError;
5806
6356
  type responses_SummarizeResponse = SummarizeResponse;
5807
6357
  declare namespace responses {
5808
- export {
5809
- responses_AggResponse as AggResponse,
5810
- responses_AuthError as AuthError,
5811
- responses_BadRequestError as BadRequestError,
5812
- responses_BranchMigrationPlan as BranchMigrationPlan,
5813
- responses_BulkError as BulkError,
5814
- responses_BulkInsertResponse as BulkInsertResponse,
5815
- responses_PutFileResponse as PutFileResponse,
5816
- responses_QueryResponse as QueryResponse,
5817
- responses_RateLimitError as RateLimitError,
5818
- responses_RecordResponse as RecordResponse,
5819
- responses_RecordUpdateResponse as RecordUpdateResponse,
5820
- responses_SQLResponse as SQLResponse,
5821
- responses_SchemaCompareResponse as SchemaCompareResponse,
5822
- responses_SchemaUpdateResponse as SchemaUpdateResponse,
5823
- responses_SearchResponse as SearchResponse,
5824
- responses_ServiceUnavailableError as ServiceUnavailableError,
5825
- responses_SimpleError as SimpleError,
5826
- responses_SummarizeResponse as SummarizeResponse,
5827
- };
6358
+ export type { responses_AggResponse as AggResponse, responses_AuthError as AuthError, responses_BadRequestError as BadRequestError, responses_BranchMigrationPlan as BranchMigrationPlan, responses_BulkError as BulkError, responses_BulkInsertResponse as BulkInsertResponse, responses_PutFileResponse as PutFileResponse, responses_QueryResponse as QueryResponse, responses_RateLimitError as RateLimitError, responses_RecordResponse as RecordResponse, responses_RecordUpdateResponse as RecordUpdateResponse, responses_SQLResponse as SQLResponse, responses_SchemaCompareResponse as SchemaCompareResponse, responses_SchemaUpdateResponse as SchemaUpdateResponse, responses_SearchResponse as SearchResponse, responses_ServiceUnavailableError as ServiceUnavailableError, responses_SimpleError as SimpleError, responses_SummarizeResponse as SummarizeResponse };
5828
6359
  }
5829
6360
 
5830
6361
  type schemas_APIKeyName = APIKeyName;
6362
+ type schemas_AccessToken = AccessToken;
5831
6363
  type schemas_AggExpression = AggExpression;
5832
6364
  type schemas_AggExpressionMap = AggExpressionMap;
6365
+ type schemas_AuthorizationCodeRequest = AuthorizationCodeRequest;
6366
+ type schemas_AuthorizationCodeResponse = AuthorizationCodeResponse;
6367
+ type schemas_AutoscalingConfig = AutoscalingConfig;
5833
6368
  type schemas_AverageAgg = AverageAgg;
5834
6369
  type schemas_BoosterExpression = BoosterExpression;
5835
6370
  type schemas_Branch = Branch;
@@ -5838,7 +6373,15 @@ type schemas_BranchMigration = BranchMigration;
5838
6373
  type schemas_BranchName = BranchName;
5839
6374
  type schemas_BranchOp = BranchOp;
5840
6375
  type schemas_BranchWithCopyID = BranchWithCopyID;
6376
+ type schemas_ClusterConfiguration = ClusterConfiguration;
6377
+ type schemas_ClusterCreateDetails = ClusterCreateDetails;
6378
+ type schemas_ClusterID = ClusterID;
6379
+ type schemas_ClusterMetadata = ClusterMetadata;
6380
+ type schemas_ClusterResponse = ClusterResponse;
6381
+ type schemas_ClusterShortMetadata = ClusterShortMetadata;
6382
+ type schemas_ClusterUpdateDetails = ClusterUpdateDetails;
5841
6383
  type schemas_Column = Column;
6384
+ type schemas_ColumnFile = ColumnFile;
5842
6385
  type schemas_ColumnLink = ColumnLink;
5843
6386
  type schemas_ColumnMigration = ColumnMigration;
5844
6387
  type schemas_ColumnName = ColumnName;
@@ -5879,9 +6422,11 @@ type schemas_InputFileEntry = InputFileEntry;
5879
6422
  type schemas_InviteID = InviteID;
5880
6423
  type schemas_InviteKey = InviteKey;
5881
6424
  type schemas_ListBranchesResponse = ListBranchesResponse;
6425
+ type schemas_ListClustersResponse = ListClustersResponse;
5882
6426
  type schemas_ListDatabasesResponse = ListDatabasesResponse;
5883
6427
  type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
5884
6428
  type schemas_ListRegionsResponse = ListRegionsResponse;
6429
+ type schemas_MaintenanceConfig = MaintenanceConfig;
5885
6430
  type schemas_MaxAgg = MaxAgg;
5886
6431
  type schemas_MediaType = MediaType;
5887
6432
  type schemas_MetricsDatapoint = MetricsDatapoint;
@@ -5896,9 +6441,17 @@ type schemas_MigrationStatus = MigrationStatus;
5896
6441
  type schemas_MigrationTableOp = MigrationTableOp;
5897
6442
  type schemas_MinAgg = MinAgg;
5898
6443
  type schemas_NumericHistogramAgg = NumericHistogramAgg;
6444
+ type schemas_OAuthAccessToken = OAuthAccessToken;
6445
+ type schemas_OAuthClientID = OAuthClientID;
6446
+ type schemas_OAuthClientPublicDetails = OAuthClientPublicDetails;
6447
+ type schemas_OAuthResponseType = OAuthResponseType;
6448
+ type schemas_OAuthScope = OAuthScope;
5899
6449
  type schemas_ObjectValue = ObjectValue;
5900
6450
  type schemas_PageConfig = PageConfig;
6451
+ type schemas_PercentilesAgg = PercentilesAgg;
5901
6452
  type schemas_PrefixExpression = PrefixExpression;
6453
+ type schemas_ProjectionConfig = ProjectionConfig;
6454
+ type schemas_QueryColumnsProjection = QueryColumnsProjection;
5902
6455
  type schemas_RecordID = RecordID;
5903
6456
  type schemas_RecordMeta = RecordMeta;
5904
6457
  type schemas_RecordsMetadata = RecordsMetadata;
@@ -5947,133 +6500,7 @@ type schemas_WorkspaceMember = WorkspaceMember;
5947
6500
  type schemas_WorkspaceMembers = WorkspaceMembers;
5948
6501
  type schemas_WorkspaceMeta = WorkspaceMeta;
5949
6502
  declare namespace schemas {
5950
- export {
5951
- schemas_APIKeyName as APIKeyName,
5952
- schemas_AggExpression as AggExpression,
5953
- schemas_AggExpressionMap as AggExpressionMap,
5954
- AggResponse$1 as AggResponse,
5955
- schemas_AverageAgg as AverageAgg,
5956
- schemas_BoosterExpression as BoosterExpression,
5957
- schemas_Branch as Branch,
5958
- schemas_BranchMetadata as BranchMetadata,
5959
- schemas_BranchMigration as BranchMigration,
5960
- schemas_BranchName as BranchName,
5961
- schemas_BranchOp as BranchOp,
5962
- schemas_BranchWithCopyID as BranchWithCopyID,
5963
- schemas_Column as Column,
5964
- schemas_ColumnLink as ColumnLink,
5965
- schemas_ColumnMigration as ColumnMigration,
5966
- schemas_ColumnName as ColumnName,
5967
- schemas_ColumnOpAdd as ColumnOpAdd,
5968
- schemas_ColumnOpRemove as ColumnOpRemove,
5969
- schemas_ColumnOpRename as ColumnOpRename,
5970
- schemas_ColumnVector as ColumnVector,
5971
- schemas_ColumnsProjection as ColumnsProjection,
5972
- schemas_Commit as Commit,
5973
- schemas_CountAgg as CountAgg,
5974
- schemas_DBBranch as DBBranch,
5975
- schemas_DBBranchName as DBBranchName,
5976
- schemas_DBName as DBName,
5977
- schemas_DataInputRecord as DataInputRecord,
5978
- schemas_DatabaseGithubSettings as DatabaseGithubSettings,
5979
- schemas_DatabaseMetadata as DatabaseMetadata,
5980
- DateBooster$1 as DateBooster,
5981
- schemas_DateHistogramAgg as DateHistogramAgg,
5982
- schemas_DateTime as DateTime,
5983
- schemas_FileAccessID as FileAccessID,
5984
- schemas_FileItemID as FileItemID,
5985
- schemas_FileName as FileName,
5986
- schemas_FileResponse as FileResponse,
5987
- schemas_FileSignature as FileSignature,
5988
- schemas_FilterColumn as FilterColumn,
5989
- schemas_FilterColumnIncludes as FilterColumnIncludes,
5990
- schemas_FilterExpression as FilterExpression,
5991
- schemas_FilterList as FilterList,
5992
- schemas_FilterPredicate as FilterPredicate,
5993
- schemas_FilterPredicateOp as FilterPredicateOp,
5994
- schemas_FilterPredicateRangeOp as FilterPredicateRangeOp,
5995
- schemas_FilterRangeValue as FilterRangeValue,
5996
- schemas_FilterValue as FilterValue,
5997
- schemas_FuzzinessExpression as FuzzinessExpression,
5998
- schemas_HighlightExpression as HighlightExpression,
5999
- schemas_InputFile as InputFile,
6000
- schemas_InputFileArray as InputFileArray,
6001
- schemas_InputFileEntry as InputFileEntry,
6002
- schemas_InviteID as InviteID,
6003
- schemas_InviteKey as InviteKey,
6004
- schemas_ListBranchesResponse as ListBranchesResponse,
6005
- schemas_ListDatabasesResponse as ListDatabasesResponse,
6006
- schemas_ListGitBranchesResponse as ListGitBranchesResponse,
6007
- schemas_ListRegionsResponse as ListRegionsResponse,
6008
- schemas_MaxAgg as MaxAgg,
6009
- schemas_MediaType as MediaType,
6010
- schemas_MetricsDatapoint as MetricsDatapoint,
6011
- schemas_MetricsLatency as MetricsLatency,
6012
- schemas_Migration as Migration,
6013
- schemas_MigrationColumnOp as MigrationColumnOp,
6014
- schemas_MigrationObject as MigrationObject,
6015
- schemas_MigrationOp as MigrationOp,
6016
- schemas_MigrationRequest as MigrationRequest,
6017
- schemas_MigrationRequestNumber as MigrationRequestNumber,
6018
- schemas_MigrationStatus as MigrationStatus,
6019
- schemas_MigrationTableOp as MigrationTableOp,
6020
- schemas_MinAgg as MinAgg,
6021
- NumericBooster$1 as NumericBooster,
6022
- schemas_NumericHistogramAgg as NumericHistogramAgg,
6023
- schemas_ObjectValue as ObjectValue,
6024
- schemas_PageConfig as PageConfig,
6025
- schemas_PrefixExpression as PrefixExpression,
6026
- schemas_RecordID as RecordID,
6027
- schemas_RecordMeta as RecordMeta,
6028
- schemas_RecordsMetadata as RecordsMetadata,
6029
- schemas_Region as Region,
6030
- schemas_RevLink as RevLink,
6031
- schemas_Role as Role,
6032
- schemas_SQLRecord as SQLRecord,
6033
- schemas_Schema as Schema,
6034
- schemas_SchemaEditScript as SchemaEditScript,
6035
- schemas_SearchPageConfig as SearchPageConfig,
6036
- schemas_SortExpression as SortExpression,
6037
- schemas_SortOrder as SortOrder,
6038
- schemas_StartedFromMetadata as StartedFromMetadata,
6039
- schemas_SumAgg as SumAgg,
6040
- schemas_SummaryExpression as SummaryExpression,
6041
- schemas_SummaryExpressionList as SummaryExpressionList,
6042
- schemas_Table as Table,
6043
- schemas_TableMigration as TableMigration,
6044
- schemas_TableName as TableName,
6045
- schemas_TableOpAdd as TableOpAdd,
6046
- schemas_TableOpRemove as TableOpRemove,
6047
- schemas_TableOpRename as TableOpRename,
6048
- schemas_TableRename as TableRename,
6049
- schemas_TargetExpression as TargetExpression,
6050
- schemas_TopValuesAgg as TopValuesAgg,
6051
- schemas_TransactionDeleteOp as TransactionDeleteOp,
6052
- schemas_TransactionError as TransactionError,
6053
- schemas_TransactionFailure as TransactionFailure,
6054
- schemas_TransactionGetOp as TransactionGetOp,
6055
- schemas_TransactionInsertOp as TransactionInsertOp,
6056
- TransactionOperation$1 as TransactionOperation,
6057
- schemas_TransactionResultColumns as TransactionResultColumns,
6058
- schemas_TransactionResultDelete as TransactionResultDelete,
6059
- schemas_TransactionResultGet as TransactionResultGet,
6060
- schemas_TransactionResultInsert as TransactionResultInsert,
6061
- schemas_TransactionResultUpdate as TransactionResultUpdate,
6062
- schemas_TransactionSuccess as TransactionSuccess,
6063
- schemas_TransactionUpdateOp as TransactionUpdateOp,
6064
- schemas_UniqueCountAgg as UniqueCountAgg,
6065
- schemas_User as User,
6066
- schemas_UserID as UserID,
6067
- schemas_UserWithID as UserWithID,
6068
- ValueBooster$1 as ValueBooster,
6069
- schemas_Workspace as Workspace,
6070
- schemas_WorkspaceID as WorkspaceID,
6071
- schemas_WorkspaceInvite as WorkspaceInvite,
6072
- schemas_WorkspaceMember as WorkspaceMember,
6073
- schemas_WorkspaceMembers as WorkspaceMembers,
6074
- schemas_WorkspaceMeta as WorkspaceMeta,
6075
- XataRecord$1 as XataRecord,
6076
- };
6503
+ 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, schemas_BranchMetadata as BranchMetadata, schemas_BranchMigration as BranchMigration, schemas_BranchName 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, schemas_DBName as DBName, schemas_DataInputRecord as DataInputRecord, schemas_DatabaseGithubSettings as DatabaseGithubSettings, schemas_DatabaseMetadata as DatabaseMetadata, DateBooster$1 as DateBooster, schemas_DateHistogramAgg as DateHistogramAgg, schemas_DateTime 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, schemas_MigrationStatus 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_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_Workspace as Workspace, schemas_WorkspaceID as WorkspaceID, schemas_WorkspaceInvite as WorkspaceInvite, schemas_WorkspaceMember as WorkspaceMember, schemas_WorkspaceMembers as WorkspaceMembers, schemas_WorkspaceMeta as WorkspaceMeta, XataRecord$1 as XataRecord };
6077
6504
  }
6078
6505
 
6079
6506
  type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
@@ -6554,6 +6981,15 @@ declare class SearchAndFilterApi {
6554
6981
  table: TableName;
6555
6982
  options: AskTableRequestBody;
6556
6983
  }): Promise<AskTableResponse>;
6984
+ askTableSession({ workspace, region, database, branch, table, sessionId, message }: {
6985
+ workspace: WorkspaceID;
6986
+ region: string;
6987
+ database: DBName;
6988
+ branch: BranchName;
6989
+ table: TableName;
6990
+ sessionId: string;
6991
+ message: string;
6992
+ }): Promise<AskTableSessionResponse>;
6557
6993
  summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page, consistency }: {
6558
6994
  workspace: WorkspaceID;
6559
6995
  region: string;
@@ -6732,10 +7168,11 @@ declare class DatabaseApi {
6732
7168
  getDatabaseList({ workspace }: {
6733
7169
  workspace: WorkspaceID;
6734
7170
  }): Promise<ListDatabasesResponse>;
6735
- createDatabase({ workspace, database, data }: {
7171
+ createDatabase({ workspace, database, data, headers }: {
6736
7172
  workspace: WorkspaceID;
6737
7173
  database: DBName;
6738
7174
  data: CreateDatabaseRequestBody;
7175
+ headers?: Record<string, string>;
6739
7176
  }): Promise<CreateDatabaseResponse>;
6740
7177
  deleteDatabase({ workspace, database }: {
6741
7178
  workspace: WorkspaceID;
@@ -6810,35 +7247,296 @@ type Narrowable = string | number | bigint | boolean;
6810
7247
  type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
6811
7248
  type Narrow<A> = Try<A, [], NarrowRaw<A>>;
6812
7249
 
6813
- type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
7250
+ interface ImageTransformations {
7251
+ /**
7252
+ * Whether to preserve animation frames from input files. Default is true.
7253
+ * Setting it to false reduces animations to still images. This setting is
7254
+ * recommended when enlarging images or processing arbitrary user content,
7255
+ * because large GIF animations can weigh tens or even hundreds of megabytes.
7256
+ * It is also useful to set anim:false when using format:"json" to get the
7257
+ * response quicker without the number of frames.
7258
+ */
7259
+ anim?: boolean;
7260
+ /**
7261
+ * Background color to add underneath the image. Applies only to images with
7262
+ * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
7263
+ * hsl(…), etc.)
7264
+ */
7265
+ background?: string;
7266
+ /**
7267
+ * Radius of a blur filter (approximate gaussian). Maximum supported radius
7268
+ * is 250.
7269
+ */
7270
+ blur?: number;
7271
+ /**
7272
+ * Increase brightness by a factor. A value of 1.0 equals no change, a value
7273
+ * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
7274
+ * 0 is ignored.
7275
+ */
7276
+ brightness?: number;
7277
+ /**
7278
+ * Slightly reduces latency on a cache miss by selecting a
7279
+ * quickest-to-compress file format, at a cost of increased file size and
7280
+ * lower image quality. It will usually override the format option and choose
7281
+ * JPEG over WebP or AVIF. We do not recommend using this option, except in
7282
+ * unusual circumstances like resizing uncacheable dynamically-generated
7283
+ * images.
7284
+ */
7285
+ compression?: 'fast';
7286
+ /**
7287
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
7288
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
7289
+ * ignored.
7290
+ */
7291
+ contrast?: number;
7292
+ /**
7293
+ * Download file. Forces browser to download the image.
7294
+ * Value is used for the download file name. Extension is optional.
7295
+ */
7296
+ download?: string;
7297
+ /**
7298
+ * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
7299
+ * easier to specify higher-DPI sizes in <img srcset>.
7300
+ */
7301
+ dpr?: number;
7302
+ /**
7303
+ * Resizing mode as a string. It affects interpretation of width and height
7304
+ * options:
7305
+ * - scale-down: Similar to contain, but the image is never enlarged. If
7306
+ * the image is larger than given width or height, it will be resized.
7307
+ * Otherwise its original size will be kept.
7308
+ * - contain: Resizes to maximum size that fits within the given width and
7309
+ * height. If only a single dimension is given (e.g. only width), the
7310
+ * image will be shrunk or enlarged to exactly match that dimension.
7311
+ * Aspect ratio is always preserved.
7312
+ * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
7313
+ * and height. If the image has an aspect ratio different from the ratio
7314
+ * of width and height, it will be cropped to fit.
7315
+ * - crop: The image will be shrunk and cropped to fit within the area
7316
+ * specified by width and height. The image will not be enlarged. For images
7317
+ * smaller than the given dimensions it's the same as scale-down. For
7318
+ * images larger than the given dimensions, it's the same as cover.
7319
+ * See also trim.
7320
+ * - pad: Resizes to the maximum size that fits within the given width and
7321
+ * height, and then fills the remaining area with a background color
7322
+ * (white by default). Use of this mode is not recommended, as the same
7323
+ * effect can be more efficiently achieved with the contain mode and the
7324
+ * CSS object-fit: contain property.
7325
+ */
7326
+ fit?: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad';
7327
+ /**
7328
+ * Output format to generate. It can be:
7329
+ * - avif: generate images in AVIF format.
7330
+ * - webp: generate images in Google WebP format. Set quality to 100 to get
7331
+ * the WebP-lossless format.
7332
+ * - json: instead of generating an image, outputs information about the
7333
+ * image, in JSON format. The JSON object will contain image size
7334
+ * (before and after resizing), source image’s MIME type, file size, etc.
7335
+ * - jpeg: generate images in JPEG format.
7336
+ * - png: generate images in PNG format.
7337
+ */
7338
+ format?: 'auto' | 'avif' | 'webp' | 'json' | 'jpeg' | 'png';
7339
+ /**
7340
+ * Increase exposure by a factor. A value of 1.0 equals no change, a value of
7341
+ * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
7342
+ */
7343
+ gamma?: number;
7344
+ /**
7345
+ * When cropping with fit: "cover", this defines the side or point that should
7346
+ * be left uncropped. The value is either a string
7347
+ * "left", "right", "top", "bottom", "auto", or "center" (the default),
7348
+ * or an object {x, y} containing focal point coordinates in the original
7349
+ * image expressed as fractions ranging from 0.0 (top or left) to 1.0
7350
+ * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
7351
+ * crop bottom or left and right sides as necessary, but won’t crop anything
7352
+ * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
7353
+ * preserve as much as possible around a point at 20% of the height of the
7354
+ * source image.
7355
+ */
7356
+ gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | {
7357
+ x: number;
7358
+ y: number;
7359
+ };
7360
+ /**
7361
+ * Maximum height in image pixels. The value must be an integer.
7362
+ */
7363
+ height?: number;
7364
+ /**
7365
+ * What EXIF data should be preserved in the output image. Note that EXIF
7366
+ * rotation and embedded color profiles are always applied ("baked in" into
7367
+ * the image), and aren't affected by this option. Note that if the Polish
7368
+ * feature is enabled, all metadata may have been removed already and this
7369
+ * option may have no effect.
7370
+ * - keep: Preserve most of EXIF metadata, including GPS location if there's
7371
+ * any.
7372
+ * - copyright: Only keep the copyright tag, and discard everything else.
7373
+ * This is the default behavior for JPEG files.
7374
+ * - none: Discard all invisible EXIF metadata. Currently WebP and PNG
7375
+ * output formats always discard metadata.
7376
+ */
7377
+ metadata?: 'keep' | 'copyright' | 'none';
7378
+ /**
7379
+ * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
7380
+ * make images look worse, but load faster. The default is 85. It applies only
7381
+ * to JPEG and WebP images. It doesn’t have any effect on PNG.
7382
+ */
7383
+ quality?: number;
7384
+ /**
7385
+ * Number of degrees (90, 180, 270) to rotate the image by. width and height
7386
+ * options refer to axes after rotation.
7387
+ */
7388
+ rotate?: 0 | 90 | 180 | 270 | 360;
7389
+ /**
7390
+ * Strength of sharpening filter to apply to the image. Floating-point
7391
+ * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
7392
+ * recommended value for downscaled images.
7393
+ */
7394
+ sharpen?: number;
7395
+ /**
7396
+ * An object with four properties {left, top, right, bottom} that specify
7397
+ * a number of pixels to cut off on each side. Allows removal of borders
7398
+ * or cutting out a specific fragment of an image. Trimming is performed
7399
+ * before resizing or rotation. Takes dpr into account.
7400
+ */
7401
+ trim?: {
7402
+ left?: number;
7403
+ top?: number;
7404
+ right?: number;
7405
+ bottom?: number;
7406
+ };
7407
+ /**
7408
+ * Maximum width in image pixels. The value must be an integer.
7409
+ */
7410
+ width?: number;
7411
+ }
7412
+ declare function transformImage(url: string, ...transformations: ImageTransformations[]): string;
7413
+ declare function transformImage(url: string | undefined, ...transformations: ImageTransformations[]): string | undefined;
7414
+
7415
+ type XataFileEditableFields = Partial<Pick<XataArrayFile, keyof InputFileEntry>>;
7416
+ type XataFileFields = Partial<Pick<XataArrayFile, {
7417
+ [K in StringKeys<XataArrayFile>]: XataArrayFile[K] extends Function ? never : K;
7418
+ }[keyof XataArrayFile]>>;
7419
+ declare class XataFile {
7420
+ /**
7421
+ * Identifier of the file.
7422
+ */
7423
+ id?: string;
7424
+ /**
7425
+ * Name of the file.
7426
+ */
7427
+ name: string;
7428
+ /**
7429
+ * Media type of the file.
7430
+ */
7431
+ mediaType: string;
7432
+ /**
7433
+ * Base64 encoded content of the file.
7434
+ */
7435
+ base64Content?: string;
7436
+ /**
7437
+ * Whether to enable public url for the file.
7438
+ */
7439
+ enablePublicUrl: boolean;
7440
+ /**
7441
+ * Timeout for the signed url.
7442
+ */
7443
+ signedUrlTimeout: number;
7444
+ /**
7445
+ * Size of the file.
7446
+ */
7447
+ size?: number;
7448
+ /**
7449
+ * Version of the file.
7450
+ */
7451
+ version: number;
7452
+ /**
7453
+ * Url of the file.
7454
+ */
7455
+ url: string;
7456
+ /**
7457
+ * Signed url of the file.
7458
+ */
7459
+ signedUrl?: string;
7460
+ /**
7461
+ * Attributes of the file.
7462
+ */
7463
+ attributes: Record<string, any>;
7464
+ constructor(file: Partial<XataFile>);
7465
+ static fromBuffer(buffer: Buffer, options?: XataFileEditableFields): XataFile;
7466
+ toBuffer(): Buffer;
7467
+ static fromArrayBuffer(arrayBuffer: ArrayBuffer, options?: XataFileEditableFields): XataFile;
7468
+ toArrayBuffer(): ArrayBuffer;
7469
+ static fromUint8Array(uint8Array: Uint8Array, options?: XataFileEditableFields): XataFile;
7470
+ toUint8Array(): Uint8Array;
7471
+ static fromBlob(file: Blob, options?: XataFileEditableFields): Promise<XataFile>;
7472
+ toBlob(): Blob;
7473
+ static fromString(string: string, options?: XataFileEditableFields): XataFile;
7474
+ toString(): string;
7475
+ static fromBase64(base64Content: string, options?: XataFileEditableFields): XataFile;
7476
+ toBase64(): string;
7477
+ transform(...options: ImageTransformations[]): {
7478
+ url: string;
7479
+ signedUrl: string | undefined;
7480
+ metadataUrl: string;
7481
+ metadataSignedUrl: string | undefined;
7482
+ };
7483
+ }
7484
+ type XataArrayFile = Identifiable & XataFile;
7485
+
7486
+ type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | `xata.${'version' | 'createdAt' | 'updatedAt'}` | DataProps<O> | NestedColumns<O, RecursivePath>;
7487
+ type ExpandedColumnNotation = {
7488
+ name: string;
7489
+ columns?: SelectableColumn<any>[];
7490
+ as?: string;
7491
+ limit?: number;
7492
+ offset?: number;
7493
+ order?: {
7494
+ column: string;
7495
+ order: 'asc' | 'desc';
7496
+ }[];
7497
+ };
7498
+ type SelectableColumnWithObjectNotation<O, RecursivePath extends any[] = []> = SelectableColumn<O, RecursivePath> | ExpandedColumnNotation;
7499
+ declare function isValidExpandedColumn(column: any): column is ExpandedColumnNotation;
7500
+ declare function isValidSelectableColumns(columns: any): columns is SelectableColumn<any>[];
7501
+ type StringColumns<T> = T extends string ? T : never;
7502
+ type ProjectionColumns<T> = T extends string ? never : T extends {
7503
+ as: infer As;
7504
+ } ? NonNullable<As> extends string ? NonNullable<As> : never : never;
6814
7505
  type WildcardColumns<O> = Values<{
6815
7506
  [K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
6816
7507
  }>;
6817
7508
  type ColumnsByValue<O, Value> = Values<{
6818
7509
  [K in SelectableColumn<O>]: ValueAtColumn<O, K> extends infer C ? C extends Value ? K extends WildcardColumns<O> ? never : K : never : never;
6819
7510
  }>;
6820
- type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
6821
- [K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
7511
+ type SelectedPick<O extends XataRecord, Key extends SelectableColumnWithObjectNotation<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
7512
+ [K in StringColumns<Key[number]>]: NestedValueAtColumn<O, K> & XataRecord<O>;
7513
+ }>> & UnionToIntersection<Values<{
7514
+ [K in ProjectionColumns<Key[number]>]: {
7515
+ [Key in K]: {
7516
+ records: (Record<string, any> & XataRecord<O>)[];
7517
+ };
7518
+ };
6822
7519
  }>>;
6823
7520
  type ValueAtColumn<Object, Key> = Key extends '*' ? Values<Object> : Key extends 'id' ? string : Key extends 'xata.version' ? number : Key extends 'xata.createdAt' ? Date : Key extends 'xata.updatedAt' ? Date : Key extends keyof Object ? Object[Key] : Key extends `${infer K}.${infer V}` ? K extends keyof Object ? Values<NonNullable<Object[K]> extends infer Item ? Item extends Record<string, any> ? V extends SelectableColumn<Item> ? {
6824
7521
  V: ValueAtColumn<Item, V>;
6825
7522
  } : never : Object[K] : never> : never : never;
6826
7523
  type MAX_RECURSION = 2;
6827
7524
  type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
6828
- [K in DataProps<O>]: NonNullable<O[K]> extends infer Item ? If<IsArray<Item>, K, // If the property is an array, we stop recursion. We don't support object arrays yet
6829
- If<IsObject<Item>, Item extends XataRecord ? SelectableColumn<Item, [...RecursivePath, Item]> extends infer Column ? Column extends string ? K | `${K}.${Column}` : never : never : Item extends Date ? K : `${K}.${StringKeys<Item> | '*'}`, // This allows usage of objects that are not links
7525
+ [K in DataProps<O>]: NonNullable<O[K]> extends infer Item ? If<IsArray<Item>, Item extends (infer Type)[] ? Type extends XataArrayFile ? K | `${K}.${keyof XataFileFields | '*'}` : K | `${K}.${StringKeys<Type> | '*'}` : never, If<IsObject<Item>, Item extends XataRecord ? SelectableColumn<Item, [...RecursivePath, Item]> extends infer Column ? Column extends string ? K | `${K}.${Column}` : never : never : Item extends Date ? K : Item extends XataFile ? K | `${K}.${keyof XataFileFields | '*'}` : `${K}.${StringKeys<Item> | '*'}`, // This allows usage of objects that are not links
6830
7526
  K>> : never;
6831
7527
  }>, never>;
6832
7528
  type DataProps<O> = Exclude<StringKeys<O>, StringKeys<XataRecord>>;
6833
7529
  type NestedValueAtColumn<O, Key extends SelectableColumn<O>> = Key extends `${infer N}.${infer M}` ? N extends DataProps<O> ? {
6834
- [K in N]: M extends SelectableColumn<NonNullable<O[K]>> ? NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M> & XataRecord> : ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M>> : unknown;
7530
+ [K in N]: M extends SelectableColumn<NonNullable<O[K]>> ? NonNullable<O[K]> extends XataFile ? ForwardNullable<O[K], XataFile> : NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M> & XataRecord> : ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M>> : NonNullable<O[K]> extends (infer ArrayType)[] ? ArrayType extends XataArrayFile ? ForwardNullable<O[K], XataArrayFile[]> : M extends SelectableColumn<NonNullable<ArrayType>> ? ForwardNullable<O[K], NestedValueAtColumn<NonNullable<ArrayType>, M>[]> : unknown : unknown;
6835
7531
  } : unknown : Key extends DataProps<O> ? {
6836
- [K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], SelectedPick<NonNullable<O[K]>, ['*']>> : O[K];
7532
+ [K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Omit<SelectedPick<NonNullable<O[K]>, ['*']>, 'xata' | 'getMetadata'>> : O[K];
6837
7533
  } : Key extends '*' ? {
6838
7534
  [K in StringKeys<O>]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Link<NonNullable<O[K]>>> : O[K];
6839
7535
  } : unknown;
6840
7536
  type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
6841
7537
 
7538
+ declare const RecordColumnTypes: readonly ["bool", "int", "float", "string", "text", "email", "multiple", "link", "object", "datetime", "vector", "file[]", "file", "json"];
7539
+ type Identifier = string;
6842
7540
  /**
6843
7541
  * Represents an identifiable record from the database.
6844
7542
  */
@@ -6846,7 +7544,7 @@ interface Identifiable {
6846
7544
  /**
6847
7545
  * Unique id of this record.
6848
7546
  */
6849
- id: string;
7547
+ id: Identifier;
6850
7548
  }
6851
7549
  interface BaseData {
6852
7550
  [key: string]: any;
@@ -6960,15 +7658,19 @@ type NumericOperator = ExclusiveOr<{
6960
7658
  }, {
6961
7659
  $divide?: number;
6962
7660
  }>>>;
7661
+ type InputXataFile = Partial<XataArrayFile> | Promise<Partial<XataArrayFile>>;
6963
7662
  type EditableDataFields<T> = T extends XataRecord ? {
6964
- id: string;
6965
- } | string : NonNullable<T> extends XataRecord ? {
6966
- id: string;
6967
- } | string | null | undefined : T extends Date ? string | Date : NonNullable<T> extends Date ? string | Date | null | undefined : T extends number ? number | NumericOperator : T;
7663
+ id: Identifier;
7664
+ } | Identifier : NonNullable<T> extends XataRecord ? {
7665
+ id: Identifier;
7666
+ } | Identifier | null | undefined : T extends Date ? string | Date : NonNullable<T> extends Date ? string | Date | null | undefined : T extends XataFile ? InputXataFile : T extends XataFile[] ? InputXataFile[] : T extends number ? number | NumericOperator : T;
6968
7667
  type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
6969
7668
  [K in keyof O]: EditableDataFields<O[K]>;
6970
7669
  }, keyof XataRecord>>;
6971
- type JSONDataFields<T> = T extends XataRecord ? string : NonNullable<T> extends XataRecord ? string | null | undefined : T extends Date ? string : NonNullable<T> extends Date ? string | null | undefined : T;
7670
+ type JSONDataFile = {
7671
+ [K in keyof XataFile]: XataFile[K] extends Function ? never : XataFile[K];
7672
+ };
7673
+ type JSONDataFields<T> = T extends XataFile ? JSONDataFile : NonNullable<T> extends XataFile ? JSONDataFile | null | undefined : T extends XataRecord ? JSONData<T> : NonNullable<T> extends XataRecord ? JSONData<T> | null | undefined : T extends Date ? string : NonNullable<T> extends Date ? string | null | undefined : T;
6972
7674
  type JSONDataBase = Identifiable & {
6973
7675
  /**
6974
7676
  * Metadata about the record.
@@ -6992,7 +7694,15 @@ type JSONData<O> = JSONDataBase & Partial<Omit<{
6992
7694
  [K in keyof O]: JSONDataFields<O[K]>;
6993
7695
  }, keyof XataRecord>>;
6994
7696
 
7697
+ type JSONValue<Value> = Value & {
7698
+ __json: true;
7699
+ };
7700
+
7701
+ type JSONFilterColumns<Record> = Values<{
7702
+ [K in keyof Record]: NonNullable<Record[K]> extends JSONValue<any> ? K extends string ? `${K}->${string}` : never : never;
7703
+ }>;
6995
7704
  type FilterColumns<T> = ColumnsByValue<T, any> | `xata.${keyof XataRecordMetadata}`;
7705
+ type FilterValueAtColumn<Record, F> = NonNullable<ValueAtColumn<Record, F>> extends JSONValue<any> ? PropertyFilter<any> : Filter<NonNullable<ValueAtColumn<Record, F>>>;
6996
7706
  /**
6997
7707
  * PropertyMatchFilter
6998
7708
  * Example:
@@ -7013,6 +7723,8 @@ type FilterColumns<T> = ColumnsByValue<T, any> | `xata.${keyof XataRecordMetadat
7013
7723
  */
7014
7724
  type PropertyAccessFilter<Record> = {
7015
7725
  [key in FilterColumns<Record>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
7726
+ } & {
7727
+ [key in JSONFilterColumns<Record>]?: PropertyFilter<Record[keyof Record]>;
7016
7728
  };
7017
7729
  type PropertyFilter<T> = T | {
7018
7730
  $is: T;
@@ -7241,6 +7953,7 @@ type AggregationExpression<O extends XataRecord> = ExactlyOne<{
7241
7953
  max: MaxAggregation<O>;
7242
7954
  min: MinAggregation<O>;
7243
7955
  average: AverageAggregation<O>;
7956
+ percentiles: PercentilesAggregation<O>;
7244
7957
  uniqueCount: UniqueCountAggregation<O>;
7245
7958
  dateHistogram: DateHistogramAggregation<O>;
7246
7959
  topValues: TopValuesAggregation<O>;
@@ -7295,6 +8008,16 @@ type AverageAggregation<O extends XataRecord> = {
7295
8008
  */
7296
8009
  column: ColumnsByValue<O, number>;
7297
8010
  };
8011
+ /**
8012
+ * Calculate given percentiles of the numeric values in a particular column.
8013
+ */
8014
+ type PercentilesAggregation<O extends XataRecord> = {
8015
+ /**
8016
+ * The column on which to compute the average. Must be a numeric type.
8017
+ */
8018
+ column: ColumnsByValue<O, number>;
8019
+ percentiles: number[];
8020
+ };
7298
8021
  /**
7299
8022
  * Count the number of distinct values in a particular column.
7300
8023
  */
@@ -7390,6 +8113,11 @@ type AggregationExpressionResultTypes = {
7390
8113
  max: number | null;
7391
8114
  min: number | null;
7392
8115
  average: number | null;
8116
+ percentiles: {
8117
+ values: {
8118
+ [key: string]: number;
8119
+ };
8120
+ };
7393
8121
  uniqueCount: number;
7394
8122
  dateHistogram: ComplexAggregationResult;
7395
8123
  topValues: ComplexAggregationResult;
@@ -7404,7 +8132,7 @@ type ComplexAggregationResult = {
7404
8132
  };
7405
8133
 
7406
8134
  type KeywordAskOptions<Record extends XataRecord> = {
7407
- searchType: 'keyword';
8135
+ searchType?: 'keyword';
7408
8136
  search?: {
7409
8137
  fuzziness?: FuzzinessExpression;
7410
8138
  target?: TargetColumn<Record>[];
@@ -7414,7 +8142,7 @@ type KeywordAskOptions<Record extends XataRecord> = {
7414
8142
  };
7415
8143
  };
7416
8144
  type VectorAskOptions<Record extends XataRecord> = {
7417
- searchType: 'vector';
8145
+ searchType?: 'vector';
7418
8146
  vectorSearch?: {
7419
8147
  /**
7420
8148
  * The column to use for vector search. It must be of type `vector`.
@@ -7430,11 +8158,13 @@ type VectorAskOptions<Record extends XataRecord> = {
7430
8158
  type TypeAskOptions<Record extends XataRecord> = KeywordAskOptions<Record> | VectorAskOptions<Record>;
7431
8159
  type BaseAskOptions = {
7432
8160
  rules?: string[];
8161
+ sessionId?: string;
7433
8162
  };
7434
8163
  type AskOptions<Record extends XataRecord> = TypeAskOptions<Record> & BaseAskOptions;
7435
8164
  type AskResult = {
7436
8165
  answer?: string;
7437
8166
  records?: string[];
8167
+ sessionId?: string;
7438
8168
  };
7439
8169
 
7440
8170
  type SortDirection = 'asc' | 'desc';
@@ -7493,7 +8223,7 @@ type SummarizeFilter<Record extends XataRecord, Expression extends Dictionary<Su
7493
8223
  type SummarizeResultItem<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = SummarizeValuePick<Record, Expression> & SelectedPick<Record, Columns>;
7494
8224
 
7495
8225
  type BaseOptions<T extends XataRecord> = {
7496
- columns?: SelectableColumn<T>[];
8226
+ columns?: SelectableColumnWithObjectNotation<T>[];
7497
8227
  consistency?: 'strong' | 'eventual';
7498
8228
  cache?: number;
7499
8229
  fetchOptions?: Record<string, unknown>;
@@ -7561,7 +8291,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
7561
8291
  * @param value The value to filter.
7562
8292
  * @returns A new Query object.
7563
8293
  */
7564
- filter<F extends SelectableColumn<Record>>(column: F, value: Filter<NonNullable<ValueAtColumn<Record, F>>>): Query<Record, Result>;
8294
+ filter<F extends FilterColumns<Record> | JSONFilterColumns<Record>>(column: F, value: FilterValueAtColumn<Record, F>): Query<Record, Result>;
7565
8295
  /**
7566
8296
  * Builds a new query object adding one or more constraints. Examples:
7567
8297
  *
@@ -7582,15 +8312,15 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
7582
8312
  * @param direction The direction. Either ascending or descending.
7583
8313
  * @returns A new Query object.
7584
8314
  */
7585
- sort<F extends ColumnsByValue<Record, any>>(column: F, direction: SortDirection): Query<Record, Result>;
8315
+ sort<F extends SortColumns<Record>>(column: F, direction: SortDirection): Query<Record, Result>;
7586
8316
  sort(column: '*', direction: 'random'): Query<Record, Result>;
7587
- sort<F extends ColumnsByValue<Record, any>>(column: F): Query<Record, Result>;
8317
+ sort<F extends SortColumns<Record>>(column: F): Query<Record, Result>;
7588
8318
  /**
7589
8319
  * Builds a new query specifying the set of columns to be returned in the query response.
7590
8320
  * @param columns Array of column names to be returned by the query.
7591
8321
  * @returns A new Query object.
7592
8322
  */
7593
- select<K extends SelectableColumn<Record>>(columns: K[]): Query<Record, SelectedPick<Record, K[]>>;
8323
+ select<K extends SelectableColumnWithObjectNotation<Record>>(columns: K[]): Query<Record, SelectedPick<Record, K[]>>;
7594
8324
  /**
7595
8325
  * Get paginated results
7596
8326
  *
@@ -7834,9 +8564,9 @@ type OffsetNavigationOptions = {
7834
8564
  size?: number;
7835
8565
  offset?: number;
7836
8566
  };
7837
- declare const PAGINATION_MAX_SIZE = 200;
8567
+ declare const PAGINATION_MAX_SIZE = 1000;
7838
8568
  declare const PAGINATION_DEFAULT_SIZE = 20;
7839
- declare const PAGINATION_MAX_OFFSET = 800;
8569
+ declare const PAGINATION_MAX_OFFSET = 49000;
7840
8570
  declare const PAGINATION_DEFAULT_OFFSET = 0;
7841
8571
  declare function isCursorPaginationOptions(options: Record<string, unknown> | undefined | null): options is CursorNavigationOptions;
7842
8572
  declare class RecordArray<Result extends XataRecord> extends Array<Result> {
@@ -7894,7 +8624,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7894
8624
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7895
8625
  * @returns The full persisted record.
7896
8626
  */
7897
- abstract create<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8627
+ abstract create<K extends SelectableColumn<Record>>(id: Identifier, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
7898
8628
  ifVersion?: number;
7899
8629
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7900
8630
  /**
@@ -7903,7 +8633,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7903
8633
  * @param object Object containing the column names with their values to be stored in the table.
7904
8634
  * @returns The full persisted record.
7905
8635
  */
7906
- abstract create(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8636
+ abstract create(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
7907
8637
  ifVersion?: number;
7908
8638
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7909
8639
  /**
@@ -7925,26 +8655,26 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7925
8655
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7926
8656
  * @returns The persisted record for the given id or null if the record could not be found.
7927
8657
  */
7928
- abstract read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
8658
+ abstract read<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
7929
8659
  /**
7930
8660
  * Queries a single record from the table given its unique id.
7931
8661
  * @param id The unique id.
7932
8662
  * @returns The persisted record for the given id or null if the record could not be found.
7933
8663
  */
7934
- abstract read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
8664
+ abstract read(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
7935
8665
  /**
7936
8666
  * Queries multiple records from the table given their unique id.
7937
8667
  * @param ids The unique ids array.
7938
8668
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
7939
8669
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
7940
8670
  */
7941
- abstract read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8671
+ abstract read<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
7942
8672
  /**
7943
8673
  * Queries multiple records from the table given their unique id.
7944
8674
  * @param ids The unique ids array.
7945
8675
  * @returns The persisted records for the given ids in order (if a record could not be found null is returned).
7946
8676
  */
7947
- abstract read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8677
+ abstract read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
7948
8678
  /**
7949
8679
  * Queries a single record from the table by the id in the object.
7950
8680
  * @param object Object containing the id of the record.
@@ -7978,14 +8708,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7978
8708
  * @returns The persisted record for the given id.
7979
8709
  * @throws If the record could not be found.
7980
8710
  */
7981
- abstract readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8711
+ abstract readOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
7982
8712
  /**
7983
8713
  * Queries a single record from the table given its unique id.
7984
8714
  * @param id The unique id.
7985
8715
  * @returns The persisted record for the given id.
7986
8716
  * @throws If the record could not be found.
7987
8717
  */
7988
- abstract readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8718
+ abstract readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
7989
8719
  /**
7990
8720
  * Queries multiple records from the table given their unique id.
7991
8721
  * @param ids The unique ids array.
@@ -7993,14 +8723,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7993
8723
  * @returns The persisted records for the given ids in order.
7994
8724
  * @throws If one or more records could not be found.
7995
8725
  */
7996
- abstract readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
8726
+ abstract readOrThrow<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
7997
8727
  /**
7998
8728
  * Queries multiple records from the table given their unique id.
7999
8729
  * @param ids The unique ids array.
8000
8730
  * @returns The persisted records for the given ids in order.
8001
8731
  * @throws If one or more records could not be found.
8002
8732
  */
8003
- abstract readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8733
+ abstract readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8004
8734
  /**
8005
8735
  * Queries a single record from the table by the id in the object.
8006
8736
  * @param object Object containing the id of the record.
@@ -8055,7 +8785,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8055
8785
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
8056
8786
  * @returns The full persisted record, null if the record could not be found.
8057
8787
  */
8058
- abstract update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
8788
+ abstract update<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
8059
8789
  ifVersion?: number;
8060
8790
  }): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
8061
8791
  /**
@@ -8064,7 +8794,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8064
8794
  * @param object The column names and their values that have to be updated.
8065
8795
  * @returns The full persisted record, null if the record could not be found.
8066
8796
  */
8067
- abstract update(id: string, object: Partial<EditableData<Record>>, options?: {
8797
+ abstract update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
8068
8798
  ifVersion?: number;
8069
8799
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
8070
8800
  /**
@@ -8107,7 +8837,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8107
8837
  * @returns The full persisted record.
8108
8838
  * @throws If the record could not be found.
8109
8839
  */
8110
- abstract updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
8840
+ abstract updateOrThrow<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
8111
8841
  ifVersion?: number;
8112
8842
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8113
8843
  /**
@@ -8117,7 +8847,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8117
8847
  * @returns The full persisted record.
8118
8848
  * @throws If the record could not be found.
8119
8849
  */
8120
- abstract updateOrThrow(id: string, object: Partial<EditableData<Record>>, options?: {
8850
+ abstract updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
8121
8851
  ifVersion?: number;
8122
8852
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8123
8853
  /**
@@ -8142,7 +8872,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8142
8872
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
8143
8873
  * @returns The full persisted record.
8144
8874
  */
8145
- abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
8875
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[], options?: {
8146
8876
  ifVersion?: number;
8147
8877
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8148
8878
  /**
@@ -8151,7 +8881,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8151
8881
  * @param object Object containing the column names with their values to be persisted in the table.
8152
8882
  * @returns The full persisted record.
8153
8883
  */
8154
- abstract createOrUpdate(object: EditableData<Record> & Identifiable, options?: {
8884
+ abstract createOrUpdate(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
8155
8885
  ifVersion?: number;
8156
8886
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8157
8887
  /**
@@ -8162,7 +8892,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8162
8892
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
8163
8893
  * @returns The full persisted record.
8164
8894
  */
8165
- abstract createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8895
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8166
8896
  ifVersion?: number;
8167
8897
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8168
8898
  /**
@@ -8172,7 +8902,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8172
8902
  * @param object The column names and the values to be persisted.
8173
8903
  * @returns The full persisted record.
8174
8904
  */
8175
- abstract createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8905
+ abstract createOrUpdate(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
8176
8906
  ifVersion?: number;
8177
8907
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8178
8908
  /**
@@ -8182,14 +8912,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8182
8912
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
8183
8913
  * @returns Array of the persisted records.
8184
8914
  */
8185
- abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8915
+ abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8186
8916
  /**
8187
8917
  * Creates or updates a single record. If a record exists with the given id,
8188
8918
  * it will be partially updated, otherwise a new record will be created.
8189
8919
  * @param objects Array of objects with the column names and the values to be stored in the table.
8190
8920
  * @returns Array of the persisted records.
8191
8921
  */
8192
- abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8922
+ abstract createOrUpdate(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8193
8923
  /**
8194
8924
  * Creates or replaces a single record. If a record exists with the given id,
8195
8925
  * it will be replaced, otherwise a new record will be created.
@@ -8197,7 +8927,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8197
8927
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
8198
8928
  * @returns The full persisted record.
8199
8929
  */
8200
- abstract createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
8930
+ abstract createOrReplace<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[], options?: {
8201
8931
  ifVersion?: number;
8202
8932
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8203
8933
  /**
@@ -8206,7 +8936,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8206
8936
  * @param object Object containing the column names with their values to be persisted in the table.
8207
8937
  * @returns The full persisted record.
8208
8938
  */
8209
- abstract createOrReplace(object: EditableData<Record> & Identifiable, options?: {
8939
+ abstract createOrReplace(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
8210
8940
  ifVersion?: number;
8211
8941
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8212
8942
  /**
@@ -8217,7 +8947,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8217
8947
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
8218
8948
  * @returns The full persisted record.
8219
8949
  */
8220
- abstract createOrReplace<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8950
+ abstract createOrReplace<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8221
8951
  ifVersion?: number;
8222
8952
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8223
8953
  /**
@@ -8227,7 +8957,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8227
8957
  * @param object The column names and the values to be persisted.
8228
8958
  * @returns The full persisted record.
8229
8959
  */
8230
- abstract createOrReplace(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
8960
+ abstract createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
8231
8961
  ifVersion?: number;
8232
8962
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8233
8963
  /**
@@ -8237,14 +8967,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8237
8967
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
8238
8968
  * @returns Array of the persisted records.
8239
8969
  */
8240
- abstract createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8970
+ abstract createOrReplace<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8241
8971
  /**
8242
8972
  * Creates or replaces a single record. If a record exists with the given id,
8243
8973
  * it will be replaced, otherwise a new record will be created.
8244
8974
  * @param objects Array of objects with the column names and the values to be stored in the table.
8245
8975
  * @returns Array of the persisted records.
8246
8976
  */
8247
- abstract createOrReplace(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8977
+ abstract createOrReplace(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8248
8978
  /**
8249
8979
  * Deletes a record given its unique id.
8250
8980
  * @param object An object with a unique id.
@@ -8264,13 +8994,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8264
8994
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
8265
8995
  * @returns The deleted record, null if the record could not be found.
8266
8996
  */
8267
- abstract delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
8997
+ abstract delete<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
8268
8998
  /**
8269
8999
  * Deletes a record given a unique id.
8270
9000
  * @param id The unique id.
8271
9001
  * @returns The deleted record, null if the record could not be found.
8272
9002
  */
8273
- abstract delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
9003
+ abstract delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
8274
9004
  /**
8275
9005
  * Deletes multiple records given an array of objects with ids.
8276
9006
  * @param objects An array of objects with unique ids.
@@ -8290,13 +9020,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8290
9020
  * @param columns Array of columns to be returned. If not specified, first level columns will be returned.
8291
9021
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
8292
9022
  */
8293
- abstract delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
9023
+ abstract delete<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8294
9024
  /**
8295
9025
  * Deletes multiple records given an array of unique ids.
8296
9026
  * @param objects An array of ids.
8297
9027
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
8298
9028
  */
8299
- abstract delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
9029
+ abstract delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8300
9030
  /**
8301
9031
  * Deletes a record given its unique id.
8302
9032
  * @param object An object with a unique id.
@@ -8319,14 +9049,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8319
9049
  * @returns The deleted record, null if the record could not be found.
8320
9050
  * @throws If the record could not be found.
8321
9051
  */
8322
- abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
9052
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8323
9053
  /**
8324
9054
  * Deletes a record given a unique id.
8325
9055
  * @param id The unique id.
8326
9056
  * @returns The deleted record, null if the record could not be found.
8327
9057
  * @throws If the record could not be found.
8328
9058
  */
8329
- abstract deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
9059
+ abstract deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8330
9060
  /**
8331
9061
  * Deletes multiple records given an array of objects with ids.
8332
9062
  * @param objects An array of objects with unique ids.
@@ -8349,14 +9079,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8349
9079
  * @returns Array of the deleted records in order (if a record could not be found null is returned).
8350
9080
  * @throws If one or more records could not be found.
8351
9081
  */
8352
- abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
9082
+ abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
8353
9083
  /**
8354
9084
  * Deletes multiple records given an array of unique ids.
8355
9085
  * @param objects An array of ids.
8356
9086
  * @returns Array of the deleted records in order.
8357
9087
  * @throws If one or more records could not be found.
8358
9088
  */
8359
- abstract deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
9089
+ abstract deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8360
9090
  /**
8361
9091
  * Search for records in the table.
8362
9092
  * @param query The query to search for.
@@ -8407,6 +9137,10 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
8407
9137
  * Experimental: Ask the database to perform a natural language question.
8408
9138
  */
8409
9139
  abstract ask(question: string, options?: AskOptions<Record>): Promise<AskResult>;
9140
+ /**
9141
+ * Experimental: Ask the database to perform a natural language question.
9142
+ */
9143
+ abstract ask(question: string, options: AskOptions<Record>): Promise<AskResult>;
8410
9144
  /**
8411
9145
  * Experimental: Ask the database to perform a natural language question.
8412
9146
  */
@@ -8429,26 +9163,26 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
8429
9163
  create(object: EditableData<Record> & Partial<Identifiable>, options?: {
8430
9164
  ifVersion?: number;
8431
9165
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8432
- create<K extends SelectableColumn<Record>>(id: string, object: EditableData<Record>, columns: K[], options?: {
9166
+ create<K extends SelectableColumn<Record>>(id: Identifier, object: EditableData<Record>, columns: K[], options?: {
8433
9167
  ifVersion?: number;
8434
9168
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8435
- create(id: string, object: EditableData<Record>, options?: {
9169
+ create(id: Identifier, object: EditableData<Record>, options?: {
8436
9170
  ifVersion?: number;
8437
9171
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8438
9172
  create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8439
9173
  create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8440
- read<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
9174
+ read<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
8441
9175
  read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
8442
- read<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8443
- read(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
9176
+ read<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
9177
+ read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8444
9178
  read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
8445
9179
  read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
8446
9180
  read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8447
9181
  read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8448
- readOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8449
- readOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8450
- readOrThrow<K extends SelectableColumn<Record>>(ids: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
8451
- readOrThrow(ids: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
9182
+ readOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
9183
+ readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
9184
+ readOrThrow<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
9185
+ readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8452
9186
  readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8453
9187
  readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8454
9188
  readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
@@ -8459,10 +9193,10 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
8459
9193
  update(object: Partial<EditableData<Record>> & Identifiable, options?: {
8460
9194
  ifVersion?: number;
8461
9195
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
8462
- update<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
9196
+ update<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
8463
9197
  ifVersion?: number;
8464
9198
  }): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
8465
- update(id: string, object: Partial<EditableData<Record>>, options?: {
9199
+ update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
8466
9200
  ifVersion?: number;
8467
9201
  }): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
8468
9202
  update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
@@ -8473,58 +9207,58 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
8473
9207
  updateOrThrow(object: Partial<EditableData<Record>> & Identifiable, options?: {
8474
9208
  ifVersion?: number;
8475
9209
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8476
- updateOrThrow<K extends SelectableColumn<Record>>(id: string, object: Partial<EditableData<Record>>, columns: K[], options?: {
9210
+ updateOrThrow<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
8477
9211
  ifVersion?: number;
8478
9212
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8479
- updateOrThrow(id: string, object: Partial<EditableData<Record>>, options?: {
9213
+ updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
8480
9214
  ifVersion?: number;
8481
9215
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8482
9216
  updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8483
9217
  updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8484
- createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
9218
+ createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[], options?: {
8485
9219
  ifVersion?: number;
8486
9220
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8487
- createOrUpdate(object: EditableData<Record> & Identifiable, options?: {
9221
+ createOrUpdate(object: EditableData<Record> & Partial<Identifiable>, options?: {
8488
9222
  ifVersion?: number;
8489
9223
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8490
- createOrUpdate<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
9224
+ createOrUpdate<K extends SelectableColumn<Record>>(id: Identifier, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8491
9225
  ifVersion?: number;
8492
9226
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8493
- createOrUpdate(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
9227
+ createOrUpdate(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
8494
9228
  ifVersion?: number;
8495
9229
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8496
- createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8497
- createOrUpdate(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8498
- createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable, columns: K[], options?: {
9230
+ createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
9231
+ createOrUpdate(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
9232
+ createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[], options?: {
8499
9233
  ifVersion?: number;
8500
9234
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8501
- createOrReplace(object: EditableData<Record> & Identifiable, options?: {
9235
+ createOrReplace(object: EditableData<Record> & Partial<Identifiable>, options?: {
8502
9236
  ifVersion?: number;
8503
9237
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8504
- createOrReplace<K extends SelectableColumn<Record>>(id: string, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
9238
+ createOrReplace<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
8505
9239
  ifVersion?: number;
8506
9240
  }): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8507
- createOrReplace(id: string, object: Omit<EditableData<Record>, 'id'>, options?: {
9241
+ createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
8508
9242
  ifVersion?: number;
8509
9243
  }): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8510
- createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
8511
- createOrReplace(objects: Array<EditableData<Record> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
9244
+ createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
9245
+ createOrReplace(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
8512
9246
  delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
8513
9247
  delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
8514
- delete<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
8515
- delete(id: string): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
9248
+ delete<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
9249
+ delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
8516
9250
  delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8517
9251
  delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8518
- delete<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
8519
- delete(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
9252
+ delete<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
9253
+ delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
8520
9254
  deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8521
9255
  deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8522
- deleteOrThrow<K extends SelectableColumn<Record>>(id: string, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
8523
- deleteOrThrow(id: string): Promise<Readonly<SelectedPick<Record, ['*']>>>;
9256
+ deleteOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
9257
+ deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
8524
9258
  deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
8525
9259
  deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8526
- deleteOrThrow<K extends SelectableColumn<Record>>(objects: string[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
8527
- deleteOrThrow(objects: string[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
9260
+ deleteOrThrow<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
9261
+ deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
8528
9262
  search(query: string, options?: {
8529
9263
  fuzziness?: FuzzinessExpression;
8530
9264
  prefix?: PrefixExpression;
@@ -8600,7 +9334,7 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
8600
9334
  } : {
8601
9335
  [K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
8602
9336
  } : never : never;
8603
- 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 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
9337
+ 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 {
8604
9338
  name: string;
8605
9339
  type: string;
8606
9340
  } ? UnionToIntersection<Values<{
@@ -8720,6 +9454,54 @@ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends X
8720
9454
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
8721
9455
  }
8722
9456
 
9457
+ type BinaryFile = string | Blob | ArrayBuffer;
9458
+ type FilesPluginResult<Schemas extends Record<string, BaseData>> = {
9459
+ download: <Tables extends StringKeys<Schemas>>(location: DownloadDestination<Schemas, Tables>) => Promise<Blob>;
9460
+ upload: <Tables extends StringKeys<Schemas>>(location: UploadDestination<Schemas, Tables>, file: BinaryFile) => Promise<FileResponse>;
9461
+ delete: <Tables extends StringKeys<Schemas>>(location: DownloadDestination<Schemas, Tables>) => Promise<FileResponse>;
9462
+ };
9463
+ type UploadDestination<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = Values<{
9464
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
9465
+ table: Model;
9466
+ column: ColumnsByValue<Schemas[Model], XataFile>;
9467
+ record: string;
9468
+ } | {
9469
+ table: Model;
9470
+ column: ColumnsByValue<Schemas[Model], XataArrayFile[]>;
9471
+ record: string;
9472
+ fileId?: string;
9473
+ };
9474
+ }>;
9475
+ type DownloadDestination<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = Values<{
9476
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
9477
+ table: Model;
9478
+ column: ColumnsByValue<Schemas[Model], XataFile>;
9479
+ record: string;
9480
+ } | {
9481
+ table: Model;
9482
+ column: ColumnsByValue<Schemas[Model], XataArrayFile[]>;
9483
+ record: string;
9484
+ fileId: string;
9485
+ };
9486
+ }>;
9487
+ declare class FilesPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
9488
+ build(pluginOptions: XataPluginOptions): FilesPluginResult<Schemas>;
9489
+ }
9490
+
9491
+ type SQLQueryParams<T = any[]> = {
9492
+ statement: string;
9493
+ params?: T;
9494
+ consistency?: 'strong' | 'eventual';
9495
+ };
9496
+ type SQLQuery = TemplateStringsArray | SQLQueryParams | string;
9497
+ type SQLPluginResult = <T>(query: SQLQuery, ...parameters: any[]) => Promise<{
9498
+ records: T[];
9499
+ warning?: string;
9500
+ }>;
9501
+ declare class SQLPlugin extends XataPlugin {
9502
+ build(pluginOptions: XataPluginOptions): SQLPluginResult;
9503
+ }
9504
+
8723
9505
  type TransactionOperation<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
8724
9506
  insert: Values<{
8725
9507
  [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
@@ -8820,6 +9602,8 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
8820
9602
  db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
8821
9603
  search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
8822
9604
  transactions: Awaited<ReturnType<TransactionPlugin<Schemas>['build']>>;
9605
+ sql: Awaited<ReturnType<SQLPlugin['build']>>;
9606
+ files: Awaited<ReturnType<FilesPlugin<Schemas>['build']>>;
8823
9607
  }, keyof Plugins> & {
8824
9608
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
8825
9609
  } & {
@@ -8943,4 +9727,4 @@ declare class XataError extends Error {
8943
9727
  constructor(message: string, status: number);
8944
9728
  }
8945
9729
 
8946
- export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApiExtraProps, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditVariables, AskOptions, AskResult, AskTableError, AskTablePathParams, AskTableRequestBody, AskTableResponse, AskTableVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BranchTransactionError, BranchTransactionPathParams, BranchTransactionRequestBody, BranchTransactionVariables, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasRequestBody, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CopyBranchError, CopyBranchPathParams, CopyBranchRequestBody, CopyBranchVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabaseGithubSettingsError, DeleteDatabaseGithubSettingsPathParams, DeleteDatabaseGithubSettingsVariables, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteFileError, DeleteFileItemError, DeleteFileItemPathParams, DeleteFileItemVariables, DeleteFilePathParams, DeleteFileVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, DeserializedType, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherError, FetcherExtraProps, FileAccessError, FileAccessPathParams, FileAccessQueryParams, FileAccessVariables, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseGithubSettingsError, GetDatabaseGithubSettingsPathParams, GetDatabaseGithubSettingsVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetFileError, GetFileItemError, GetFileItemPathParams, GetFileItemVariables, GetFilePathParams, GetFileVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, JSONData, KeywordAskOptions, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, PushBranchMigrationsError, PushBranchMigrationsPathParams, PushBranchMigrationsRequestBody, PushBranchMigrationsVariables, PutFileError, PutFileItemError, PutFileItemPathParams, PutFileItemVariables, PutFilePathParams, PutFileVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, RenameDatabaseError, RenameDatabasePathParams, RenameDatabaseRequestBody, RenameDatabaseVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, SerializedString, Serializer, SerializerResult, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SqlQueryError, SqlQueryPathParams, SqlQueryRequestBody, SqlQueryVariables, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseGithubSettingsError, UpdateDatabaseGithubSettingsPathParams, UpdateDatabaseGithubSettingsVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, VectorAskOptions, VectorSearchTableError, VectorSearchTablePathParams, VectorSearchTableRequestBody, VectorSearchTableVariables, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, askTable, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, ge, getAPIKey, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, 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, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
9730
+ 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 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 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, 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 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 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 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 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 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, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, buildWorkerRunner, 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, 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, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, 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, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };