@xata.io/client 0.24.2 → 0.25.0
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/.turbo/turbo-add-version.log +1 -1
- package/.turbo/turbo-build.log +9 -4
- package/CHANGELOG.md +24 -0
- package/dist/index.cjs +513 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +581 -100
- package/dist/index.mjs +509 -59
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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?:
|
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,34 @@ type ErrorWrapper$1<TError> = TError | {
|
|
105
109
|
*
|
106
110
|
* @version 1.0
|
107
111
|
*/
|
112
|
+
type AuthorizationCode = {
|
113
|
+
state?: string;
|
114
|
+
redirectUri?: string;
|
115
|
+
scopes?: string[];
|
116
|
+
/**
|
117
|
+
* @format date-time
|
118
|
+
*/
|
119
|
+
expires?: string;
|
120
|
+
};
|
121
|
+
type AccessTokenInput = {
|
122
|
+
grantType: string;
|
123
|
+
clientId: string;
|
124
|
+
clientSecret: string;
|
125
|
+
refreshToken: string;
|
126
|
+
} | {
|
127
|
+
grantType: string;
|
128
|
+
clientId: string;
|
129
|
+
clientSecret: string;
|
130
|
+
code: string;
|
131
|
+
redirectUri: string;
|
132
|
+
codeVerifier?: string;
|
133
|
+
};
|
134
|
+
type AccessTokenOutput = {
|
135
|
+
accessToken: string;
|
136
|
+
refreshToken: string;
|
137
|
+
tokenType: string;
|
138
|
+
expires?: number;
|
139
|
+
};
|
108
140
|
type User = {
|
109
141
|
/**
|
110
142
|
* @format email
|
@@ -180,6 +212,7 @@ type WorkspaceMembers = {
|
|
180
212
|
* @pattern ^ik_[a-zA-Z0-9]+
|
181
213
|
*/
|
182
214
|
type InviteKey = string;
|
215
|
+
type AccessToken = string;
|
183
216
|
/**
|
184
217
|
* Metadata of databases
|
185
218
|
*/
|
@@ -260,6 +293,7 @@ type DatabaseGithubSettings = {
|
|
260
293
|
};
|
261
294
|
type Region = {
|
262
295
|
id: string;
|
296
|
+
name: string;
|
263
297
|
};
|
264
298
|
type ListRegionsResponse = {
|
265
299
|
/**
|
@@ -295,6 +329,55 @@ type SimpleError$1 = {
|
|
295
329
|
* @version 1.0
|
296
330
|
*/
|
297
331
|
|
332
|
+
type GrantAuthorizationCodeError = ErrorWrapper$1<{
|
333
|
+
status: 400;
|
334
|
+
payload: BadRequestError$1;
|
335
|
+
} | {
|
336
|
+
status: 401;
|
337
|
+
payload: AuthError$1;
|
338
|
+
} | {
|
339
|
+
status: 404;
|
340
|
+
payload: SimpleError$1;
|
341
|
+
} | {
|
342
|
+
status: 409;
|
343
|
+
payload: SimpleError$1;
|
344
|
+
}>;
|
345
|
+
type GrantAuthorizationCodeResponse = AuthorizationCode & {
|
346
|
+
code: string;
|
347
|
+
};
|
348
|
+
type GrantAuthorizationCodeRequestBody = AuthorizationCode & {
|
349
|
+
responseType: string;
|
350
|
+
clientId: string;
|
351
|
+
codeChallenge?: string;
|
352
|
+
codeChallengeMethod?: string;
|
353
|
+
};
|
354
|
+
type GrantAuthorizationCodeVariables = {
|
355
|
+
body?: GrantAuthorizationCodeRequestBody;
|
356
|
+
} & ControlPlaneFetcherExtraProps;
|
357
|
+
/**
|
358
|
+
* Creates, stores and returns an authorization code to be used by a third party app
|
359
|
+
*/
|
360
|
+
declare const grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal) => Promise<GrantAuthorizationCodeResponse>;
|
361
|
+
type GenerateAccessTokenError = ErrorWrapper$1<{
|
362
|
+
status: 400;
|
363
|
+
payload: BadRequestError$1;
|
364
|
+
} | {
|
365
|
+
status: 401;
|
366
|
+
payload: AuthError$1;
|
367
|
+
} | {
|
368
|
+
status: 404;
|
369
|
+
payload: SimpleError$1;
|
370
|
+
} | {
|
371
|
+
status: 409;
|
372
|
+
payload: SimpleError$1;
|
373
|
+
}>;
|
374
|
+
type GenerateAccessTokenVariables = {
|
375
|
+
body?: AccessTokenInput;
|
376
|
+
} & ControlPlaneFetcherExtraProps;
|
377
|
+
/**
|
378
|
+
* Creates/refreshes, stores and returns an access token to be used by a third party app
|
379
|
+
*/
|
380
|
+
declare const generateAccessToken: (variables: GenerateAccessTokenVariables, signal?: AbortSignal) => Promise<AccessTokenOutput>;
|
298
381
|
type GetUserError = ErrorWrapper$1<{
|
299
382
|
status: 400;
|
300
383
|
payload: BadRequestError$1;
|
@@ -1171,19 +1254,24 @@ type ColumnVector = {
|
|
1171
1254
|
*/
|
1172
1255
|
dimension: number;
|
1173
1256
|
};
|
1257
|
+
type ColumnFile = {
|
1258
|
+
defaultPublicAccess?: boolean;
|
1259
|
+
};
|
1174
1260
|
type Column = {
|
1175
1261
|
name: string;
|
1176
1262
|
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file';
|
1177
1263
|
link?: ColumnLink;
|
1178
1264
|
vector?: ColumnVector;
|
1265
|
+
file?: ColumnFile;
|
1266
|
+
['file[]']?: ColumnFile;
|
1179
1267
|
notNull?: boolean;
|
1180
1268
|
defaultValue?: string;
|
1181
1269
|
unique?: boolean;
|
1182
1270
|
columns?: Column[];
|
1183
1271
|
};
|
1184
1272
|
type RevLink = {
|
1185
|
-
linkID: string;
|
1186
1273
|
table: string;
|
1274
|
+
column: string;
|
1187
1275
|
};
|
1188
1276
|
type Table = {
|
1189
1277
|
id?: string;
|
@@ -1823,6 +1911,14 @@ type RecordMeta = {
|
|
1823
1911
|
* The record's version. Can be used for optimistic concurrency control.
|
1824
1912
|
*/
|
1825
1913
|
version: number;
|
1914
|
+
/**
|
1915
|
+
* The time when the record was created.
|
1916
|
+
*/
|
1917
|
+
createdAt?: string;
|
1918
|
+
/**
|
1919
|
+
* The time when the record was last updated.
|
1920
|
+
*/
|
1921
|
+
updatedAt?: string;
|
1826
1922
|
/**
|
1827
1923
|
* The record's table name. APIs that return records from multiple tables will set this field accordingly.
|
1828
1924
|
*/
|
@@ -1862,6 +1958,30 @@ type FileResponse = {
|
|
1862
1958
|
version: number;
|
1863
1959
|
attributes?: Record<string, any>;
|
1864
1960
|
};
|
1961
|
+
type QueryColumnsProjection = (string | ProjectionConfig)[];
|
1962
|
+
/**
|
1963
|
+
* A structured projection that allows for some configuration.
|
1964
|
+
*/
|
1965
|
+
type ProjectionConfig = {
|
1966
|
+
/**
|
1967
|
+
* 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).
|
1968
|
+
*/
|
1969
|
+
name?: string;
|
1970
|
+
columns?: QueryColumnsProjection;
|
1971
|
+
/**
|
1972
|
+
* An alias for the projected field, this is how it will be returned in the response.
|
1973
|
+
*/
|
1974
|
+
as?: string;
|
1975
|
+
sort?: SortExpression;
|
1976
|
+
/**
|
1977
|
+
* @default 20
|
1978
|
+
*/
|
1979
|
+
limit?: number;
|
1980
|
+
/**
|
1981
|
+
* @default 0
|
1982
|
+
*/
|
1983
|
+
offset?: number;
|
1984
|
+
};
|
1865
1985
|
/**
|
1866
1986
|
* The target expression is used to filter the search results by the target columns.
|
1867
1987
|
*/
|
@@ -2314,10 +2434,16 @@ type SchemaCompareResponse = {
|
|
2314
2434
|
target: Schema;
|
2315
2435
|
edits: SchemaEditScript;
|
2316
2436
|
};
|
2437
|
+
type RateLimitError = {
|
2438
|
+
id?: string;
|
2439
|
+
message: string;
|
2440
|
+
};
|
2317
2441
|
type RecordUpdateResponse = XataRecord$1 | {
|
2318
2442
|
id: string;
|
2319
2443
|
xata: {
|
2320
2444
|
version: number;
|
2445
|
+
createdAt: string;
|
2446
|
+
updatedAt: string;
|
2321
2447
|
};
|
2322
2448
|
};
|
2323
2449
|
type PutFileResponse = FileResponse;
|
@@ -2344,15 +2470,15 @@ type ServiceUnavailableError = {
|
|
2344
2470
|
type SearchResponse = {
|
2345
2471
|
records: XataRecord$1[];
|
2346
2472
|
warning?: string;
|
2473
|
+
/**
|
2474
|
+
* The total count of records matched. It will be accurately returned up to 10000 records.
|
2475
|
+
*/
|
2476
|
+
totalCount: number;
|
2347
2477
|
};
|
2348
2478
|
type SQLResponse = {
|
2349
2479
|
records: SQLRecord[];
|
2350
2480
|
warning?: string;
|
2351
2481
|
};
|
2352
|
-
type RateLimitError = {
|
2353
|
-
id?: string;
|
2354
|
-
message: string;
|
2355
|
-
};
|
2356
2482
|
type SummarizeResponse = {
|
2357
2483
|
summaries: Record<string, any>[];
|
2358
2484
|
};
|
@@ -2376,6 +2502,8 @@ type DataPlaneFetcherExtraProps = {
|
|
2376
2502
|
sessionID?: string;
|
2377
2503
|
clientName?: string;
|
2378
2504
|
xataAgentExtra?: Record<string, string>;
|
2505
|
+
rawResponse?: boolean;
|
2506
|
+
headers?: Record<string, unknown>;
|
2379
2507
|
};
|
2380
2508
|
type ErrorWrapper<TError> = TError | {
|
2381
2509
|
status: 'unknown';
|
@@ -3663,9 +3791,7 @@ type AddTableColumnVariables = {
|
|
3663
3791
|
pathParams: AddTableColumnPathParams;
|
3664
3792
|
} & DataPlaneFetcherExtraProps;
|
3665
3793
|
/**
|
3666
|
-
* Adds a new column to the table. The body of the request should contain the column definition.
|
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.
|
3794
|
+
* Adds a new column to the table. The body of the request should contain the column definition.
|
3669
3795
|
*/
|
3670
3796
|
declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3671
3797
|
type GetColumnPathParams = {
|
@@ -3698,7 +3824,7 @@ type GetColumnVariables = {
|
|
3698
3824
|
pathParams: GetColumnPathParams;
|
3699
3825
|
} & DataPlaneFetcherExtraProps;
|
3700
3826
|
/**
|
3701
|
-
* Get the definition of a single column.
|
3827
|
+
* Get the definition of a single column.
|
3702
3828
|
*/
|
3703
3829
|
declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
|
3704
3830
|
type UpdateColumnPathParams = {
|
@@ -3738,7 +3864,7 @@ type UpdateColumnVariables = {
|
|
3738
3864
|
pathParams: UpdateColumnPathParams;
|
3739
3865
|
} & DataPlaneFetcherExtraProps;
|
3740
3866
|
/**
|
3741
|
-
* Update column with partial data. Can be used for renaming the column by providing a new "name" field.
|
3867
|
+
* Update column with partial data. Can be used for renaming the column by providing a new "name" field.
|
3742
3868
|
*/
|
3743
3869
|
declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3744
3870
|
type DeleteColumnPathParams = {
|
@@ -3771,7 +3897,7 @@ type DeleteColumnVariables = {
|
|
3771
3897
|
pathParams: DeleteColumnPathParams;
|
3772
3898
|
} & DataPlaneFetcherExtraProps;
|
3773
3899
|
/**
|
3774
|
-
* Deletes the specified column.
|
3900
|
+
* Deletes the specified column.
|
3775
3901
|
*/
|
3776
3902
|
declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3777
3903
|
type BranchTransactionPathParams = {
|
@@ -3791,6 +3917,9 @@ type BranchTransactionError = ErrorWrapper<{
|
|
3791
3917
|
} | {
|
3792
3918
|
status: 404;
|
3793
3919
|
payload: SimpleError;
|
3920
|
+
} | {
|
3921
|
+
status: 429;
|
3922
|
+
payload: RateLimitError;
|
3794
3923
|
}>;
|
3795
3924
|
type BranchTransactionRequestBody = {
|
3796
3925
|
operations: TransactionOperation$1[];
|
@@ -4358,7 +4487,7 @@ type QueryTableRequestBody = {
|
|
4358
4487
|
filter?: FilterExpression;
|
4359
4488
|
sort?: SortExpression;
|
4360
4489
|
page?: PageConfig;
|
4361
|
-
columns?:
|
4490
|
+
columns?: QueryColumnsProjection;
|
4362
4491
|
/**
|
4363
4492
|
* The consistency level for this request.
|
4364
4493
|
*
|
@@ -5300,6 +5429,10 @@ type SqlQueryRequestBody = {
|
|
5300
5429
|
* @minLength 1
|
5301
5430
|
*/
|
5302
5431
|
query: string;
|
5432
|
+
/**
|
5433
|
+
* The query parameter list.
|
5434
|
+
*/
|
5435
|
+
params?: any[] | null;
|
5303
5436
|
/**
|
5304
5437
|
* The consistency level for this request.
|
5305
5438
|
*
|
@@ -5399,15 +5532,16 @@ type AskTableError = ErrorWrapper<{
|
|
5399
5532
|
} | {
|
5400
5533
|
status: 429;
|
5401
5534
|
payload: RateLimitError;
|
5402
|
-
} | {
|
5403
|
-
status: 503;
|
5404
|
-
payload: ServiceUnavailableError;
|
5405
5535
|
}>;
|
5406
5536
|
type AskTableResponse = {
|
5407
5537
|
/**
|
5408
5538
|
* The answer to the input question
|
5409
5539
|
*/
|
5410
|
-
answer
|
5540
|
+
answer: string;
|
5541
|
+
/**
|
5542
|
+
* The session ID for the chat session.
|
5543
|
+
*/
|
5544
|
+
sessionId: string;
|
5411
5545
|
};
|
5412
5546
|
type AskTableRequestBody = {
|
5413
5547
|
/**
|
@@ -5462,6 +5596,61 @@ type AskTableVariables = {
|
|
5462
5596
|
* 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
5597
|
*/
|
5464
5598
|
declare const askTable: (variables: AskTableVariables, signal?: AbortSignal) => Promise<AskTableResponse>;
|
5599
|
+
type AskTableSessionPathParams = {
|
5600
|
+
/**
|
5601
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
5602
|
+
*/
|
5603
|
+
dbBranchName: DBBranchName;
|
5604
|
+
/**
|
5605
|
+
* The Table name
|
5606
|
+
*/
|
5607
|
+
tableName: TableName;
|
5608
|
+
/**
|
5609
|
+
* @maxLength 36
|
5610
|
+
* @minLength 36
|
5611
|
+
*/
|
5612
|
+
sessionId: string;
|
5613
|
+
workspace: string;
|
5614
|
+
region: string;
|
5615
|
+
};
|
5616
|
+
type AskTableSessionError = ErrorWrapper<{
|
5617
|
+
status: 400;
|
5618
|
+
payload: BadRequestError;
|
5619
|
+
} | {
|
5620
|
+
status: 401;
|
5621
|
+
payload: AuthError;
|
5622
|
+
} | {
|
5623
|
+
status: 404;
|
5624
|
+
payload: SimpleError;
|
5625
|
+
} | {
|
5626
|
+
status: 429;
|
5627
|
+
payload: RateLimitError;
|
5628
|
+
} | {
|
5629
|
+
status: 503;
|
5630
|
+
payload: ServiceUnavailableError;
|
5631
|
+
}>;
|
5632
|
+
type AskTableSessionResponse = {
|
5633
|
+
/**
|
5634
|
+
* The answer to the input question
|
5635
|
+
*/
|
5636
|
+
answer: string;
|
5637
|
+
};
|
5638
|
+
type AskTableSessionRequestBody = {
|
5639
|
+
/**
|
5640
|
+
* The question you'd like to ask.
|
5641
|
+
*
|
5642
|
+
* @minLength 3
|
5643
|
+
*/
|
5644
|
+
message?: string;
|
5645
|
+
};
|
5646
|
+
type AskTableSessionVariables = {
|
5647
|
+
body?: AskTableSessionRequestBody;
|
5648
|
+
pathParams: AskTableSessionPathParams;
|
5649
|
+
} & DataPlaneFetcherExtraProps;
|
5650
|
+
/**
|
5651
|
+
* Ask a follow-up question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
|
5652
|
+
*/
|
5653
|
+
declare const askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal) => Promise<AskTableSessionResponse>;
|
5465
5654
|
type SummarizeTablePathParams = {
|
5466
5655
|
/**
|
5467
5656
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -5649,7 +5838,7 @@ type FileAccessVariables = {
|
|
5649
5838
|
/**
|
5650
5839
|
* Retrieve file content by access id
|
5651
5840
|
*/
|
5652
|
-
declare const fileAccess: (variables: FileAccessVariables, signal?: AbortSignal) => Promise<
|
5841
|
+
declare const fileAccess: (variables: FileAccessVariables, signal?: AbortSignal) => Promise<Blob>;
|
5653
5842
|
|
5654
5843
|
declare const operationsByTag: {
|
5655
5844
|
branch: {
|
@@ -5717,7 +5906,7 @@ declare const operationsByTag: {
|
|
5717
5906
|
getFile: (variables: GetFileVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
|
5718
5907
|
putFile: (variables: PutFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
|
5719
5908
|
deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
|
5720
|
-
fileAccess: (variables: FileAccessVariables, signal?: AbortSignal | undefined) => Promise<
|
5909
|
+
fileAccess: (variables: FileAccessVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
|
5721
5910
|
};
|
5722
5911
|
searchAndFilter: {
|
5723
5912
|
queryTable: (variables: QueryTableVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
|
@@ -5726,9 +5915,14 @@ declare const operationsByTag: {
|
|
5726
5915
|
sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal | undefined) => Promise<SQLResponse>;
|
5727
5916
|
vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
|
5728
5917
|
askTable: (variables: AskTableVariables, signal?: AbortSignal | undefined) => Promise<AskTableResponse>;
|
5918
|
+
askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal | undefined) => Promise<AskTableSessionResponse>;
|
5729
5919
|
summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal | undefined) => Promise<SummarizeResponse>;
|
5730
5920
|
aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal | undefined) => Promise<AggResponse>;
|
5731
5921
|
};
|
5922
|
+
authOther: {
|
5923
|
+
grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<GrantAuthorizationCodeResponse>;
|
5924
|
+
generateAccessToken: (variables: GenerateAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<AccessTokenOutput>;
|
5925
|
+
};
|
5732
5926
|
users: {
|
5733
5927
|
getUser: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<UserWithID>;
|
5734
5928
|
updateUser: (variables: UpdateUserVariables, signal?: AbortSignal | undefined) => Promise<UserWithID>;
|
@@ -5828,8 +6022,12 @@ declare namespace responses {
|
|
5828
6022
|
}
|
5829
6023
|
|
5830
6024
|
type schemas_APIKeyName = APIKeyName;
|
6025
|
+
type schemas_AccessToken = AccessToken;
|
6026
|
+
type schemas_AccessTokenInput = AccessTokenInput;
|
6027
|
+
type schemas_AccessTokenOutput = AccessTokenOutput;
|
5831
6028
|
type schemas_AggExpression = AggExpression;
|
5832
6029
|
type schemas_AggExpressionMap = AggExpressionMap;
|
6030
|
+
type schemas_AuthorizationCode = AuthorizationCode;
|
5833
6031
|
type schemas_AverageAgg = AverageAgg;
|
5834
6032
|
type schemas_BoosterExpression = BoosterExpression;
|
5835
6033
|
type schemas_Branch = Branch;
|
@@ -5839,6 +6037,7 @@ type schemas_BranchName = BranchName;
|
|
5839
6037
|
type schemas_BranchOp = BranchOp;
|
5840
6038
|
type schemas_BranchWithCopyID = BranchWithCopyID;
|
5841
6039
|
type schemas_Column = Column;
|
6040
|
+
type schemas_ColumnFile = ColumnFile;
|
5842
6041
|
type schemas_ColumnLink = ColumnLink;
|
5843
6042
|
type schemas_ColumnMigration = ColumnMigration;
|
5844
6043
|
type schemas_ColumnName = ColumnName;
|
@@ -5899,6 +6098,8 @@ type schemas_NumericHistogramAgg = NumericHistogramAgg;
|
|
5899
6098
|
type schemas_ObjectValue = ObjectValue;
|
5900
6099
|
type schemas_PageConfig = PageConfig;
|
5901
6100
|
type schemas_PrefixExpression = PrefixExpression;
|
6101
|
+
type schemas_ProjectionConfig = ProjectionConfig;
|
6102
|
+
type schemas_QueryColumnsProjection = QueryColumnsProjection;
|
5902
6103
|
type schemas_RecordID = RecordID;
|
5903
6104
|
type schemas_RecordMeta = RecordMeta;
|
5904
6105
|
type schemas_RecordsMetadata = RecordsMetadata;
|
@@ -5949,9 +6150,13 @@ type schemas_WorkspaceMeta = WorkspaceMeta;
|
|
5949
6150
|
declare namespace schemas {
|
5950
6151
|
export {
|
5951
6152
|
schemas_APIKeyName as APIKeyName,
|
6153
|
+
schemas_AccessToken as AccessToken,
|
6154
|
+
schemas_AccessTokenInput as AccessTokenInput,
|
6155
|
+
schemas_AccessTokenOutput as AccessTokenOutput,
|
5952
6156
|
schemas_AggExpression as AggExpression,
|
5953
6157
|
schemas_AggExpressionMap as AggExpressionMap,
|
5954
6158
|
AggResponse$1 as AggResponse,
|
6159
|
+
schemas_AuthorizationCode as AuthorizationCode,
|
5955
6160
|
schemas_AverageAgg as AverageAgg,
|
5956
6161
|
schemas_BoosterExpression as BoosterExpression,
|
5957
6162
|
schemas_Branch as Branch,
|
@@ -5961,6 +6166,7 @@ declare namespace schemas {
|
|
5961
6166
|
schemas_BranchOp as BranchOp,
|
5962
6167
|
schemas_BranchWithCopyID as BranchWithCopyID,
|
5963
6168
|
schemas_Column as Column,
|
6169
|
+
schemas_ColumnFile as ColumnFile,
|
5964
6170
|
schemas_ColumnLink as ColumnLink,
|
5965
6171
|
schemas_ColumnMigration as ColumnMigration,
|
5966
6172
|
schemas_ColumnName as ColumnName,
|
@@ -6023,6 +6229,8 @@ declare namespace schemas {
|
|
6023
6229
|
schemas_ObjectValue as ObjectValue,
|
6024
6230
|
schemas_PageConfig as PageConfig,
|
6025
6231
|
schemas_PrefixExpression as PrefixExpression,
|
6232
|
+
schemas_ProjectionConfig as ProjectionConfig,
|
6233
|
+
schemas_QueryColumnsProjection as QueryColumnsProjection,
|
6026
6234
|
schemas_RecordID as RecordID,
|
6027
6235
|
schemas_RecordMeta as RecordMeta,
|
6028
6236
|
schemas_RecordsMetadata as RecordsMetadata,
|
@@ -6554,6 +6762,15 @@ declare class SearchAndFilterApi {
|
|
6554
6762
|
table: TableName;
|
6555
6763
|
options: AskTableRequestBody;
|
6556
6764
|
}): Promise<AskTableResponse>;
|
6765
|
+
askTableSession({ workspace, region, database, branch, table, sessionId, message }: {
|
6766
|
+
workspace: WorkspaceID;
|
6767
|
+
region: string;
|
6768
|
+
database: DBName;
|
6769
|
+
branch: BranchName;
|
6770
|
+
table: TableName;
|
6771
|
+
sessionId: string;
|
6772
|
+
message: string;
|
6773
|
+
}): Promise<AskTableSessionResponse>;
|
6557
6774
|
summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page, consistency }: {
|
6558
6775
|
workspace: WorkspaceID;
|
6559
6776
|
region: string;
|
@@ -6732,10 +6949,11 @@ declare class DatabaseApi {
|
|
6732
6949
|
getDatabaseList({ workspace }: {
|
6733
6950
|
workspace: WorkspaceID;
|
6734
6951
|
}): Promise<ListDatabasesResponse>;
|
6735
|
-
createDatabase({ workspace, database, data }: {
|
6952
|
+
createDatabase({ workspace, database, data, headers }: {
|
6736
6953
|
workspace: WorkspaceID;
|
6737
6954
|
database: DBName;
|
6738
6955
|
data: CreateDatabaseRequestBody;
|
6956
|
+
headers?: Record<string, string>;
|
6739
6957
|
}): Promise<CreateDatabaseResponse>;
|
6740
6958
|
deleteDatabase({ workspace, database }: {
|
6741
6959
|
workspace: WorkspaceID;
|
@@ -6810,6 +7028,226 @@ type Narrowable = string | number | bigint | boolean;
|
|
6810
7028
|
type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
|
6811
7029
|
type Narrow<A> = Try<A, [], NarrowRaw<A>>;
|
6812
7030
|
|
7031
|
+
interface ImageTransformations {
|
7032
|
+
/**
|
7033
|
+
* Whether to preserve animation frames from input files. Default is true.
|
7034
|
+
* Setting it to false reduces animations to still images. This setting is
|
7035
|
+
* recommended when enlarging images or processing arbitrary user content,
|
7036
|
+
* because large GIF animations can weigh tens or even hundreds of megabytes.
|
7037
|
+
* It is also useful to set anim:false when using format:"json" to get the
|
7038
|
+
* response quicker without the number of frames.
|
7039
|
+
*/
|
7040
|
+
anim?: boolean;
|
7041
|
+
/**
|
7042
|
+
* Background color to add underneath the image. Applies only to images with
|
7043
|
+
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
7044
|
+
* hsl(…), etc.)
|
7045
|
+
*/
|
7046
|
+
background?: string;
|
7047
|
+
/**
|
7048
|
+
* Radius of a blur filter (approximate gaussian). Maximum supported radius
|
7049
|
+
* is 250.
|
7050
|
+
*/
|
7051
|
+
blur?: number;
|
7052
|
+
/**
|
7053
|
+
* Increase brightness by a factor. A value of 1.0 equals no change, a value
|
7054
|
+
* of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
|
7055
|
+
* 0 is ignored.
|
7056
|
+
*/
|
7057
|
+
brightness?: number;
|
7058
|
+
/**
|
7059
|
+
* Slightly reduces latency on a cache miss by selecting a
|
7060
|
+
* quickest-to-compress file format, at a cost of increased file size and
|
7061
|
+
* lower image quality. It will usually override the format option and choose
|
7062
|
+
* JPEG over WebP or AVIF. We do not recommend using this option, except in
|
7063
|
+
* unusual circumstances like resizing uncacheable dynamically-generated
|
7064
|
+
* images.
|
7065
|
+
*/
|
7066
|
+
compression?: 'fast';
|
7067
|
+
/**
|
7068
|
+
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
7069
|
+
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
7070
|
+
* ignored.
|
7071
|
+
*/
|
7072
|
+
contrast?: number;
|
7073
|
+
/**
|
7074
|
+
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
7075
|
+
* easier to specify higher-DPI sizes in <img srcset>.
|
7076
|
+
*/
|
7077
|
+
dpr?: number;
|
7078
|
+
/**
|
7079
|
+
* Resizing mode as a string. It affects interpretation of width and height
|
7080
|
+
* options:
|
7081
|
+
* - scale-down: Similar to contain, but the image is never enlarged. If
|
7082
|
+
* the image is larger than given width or height, it will be resized.
|
7083
|
+
* Otherwise its original size will be kept.
|
7084
|
+
* - contain: Resizes to maximum size that fits within the given width and
|
7085
|
+
* height. If only a single dimension is given (e.g. only width), the
|
7086
|
+
* image will be shrunk or enlarged to exactly match that dimension.
|
7087
|
+
* Aspect ratio is always preserved.
|
7088
|
+
* - cover: Resizes (shrinks or enlarges) to fill the entire area of width
|
7089
|
+
* and height. If the image has an aspect ratio different from the ratio
|
7090
|
+
* of width and height, it will be cropped to fit.
|
7091
|
+
* - crop: The image will be shrunk and cropped to fit within the area
|
7092
|
+
* specified by width and height. The image will not be enlarged. For images
|
7093
|
+
* smaller than the given dimensions it's the same as scale-down. For
|
7094
|
+
* images larger than the given dimensions, it's the same as cover.
|
7095
|
+
* See also trim.
|
7096
|
+
* - pad: Resizes to the maximum size that fits within the given width and
|
7097
|
+
* height, and then fills the remaining area with a background color
|
7098
|
+
* (white by default). Use of this mode is not recommended, as the same
|
7099
|
+
* effect can be more efficiently achieved with the contain mode and the
|
7100
|
+
* CSS object-fit: contain property.
|
7101
|
+
*/
|
7102
|
+
fit?: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad';
|
7103
|
+
/**
|
7104
|
+
* Output format to generate. It can be:
|
7105
|
+
* - avif: generate images in AVIF format.
|
7106
|
+
* - webp: generate images in Google WebP format. Set quality to 100 to get
|
7107
|
+
* the WebP-lossless format.
|
7108
|
+
* - json: instead of generating an image, outputs information about the
|
7109
|
+
* image, in JSON format. The JSON object will contain image size
|
7110
|
+
* (before and after resizing), source image’s MIME type, file size, etc.
|
7111
|
+
* - jpeg: generate images in JPEG format.
|
7112
|
+
* - png: generate images in PNG format.
|
7113
|
+
*/
|
7114
|
+
format?: 'auto' | 'avif' | 'webp' | 'json' | 'jpeg' | 'png';
|
7115
|
+
/**
|
7116
|
+
* Increase exposure by a factor. A value of 1.0 equals no change, a value of
|
7117
|
+
* 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
|
7118
|
+
*/
|
7119
|
+
gamma?: number;
|
7120
|
+
/**
|
7121
|
+
* When cropping with fit: "cover", this defines the side or point that should
|
7122
|
+
* be left uncropped. The value is either a string
|
7123
|
+
* "left", "right", "top", "bottom", "auto", or "center" (the default),
|
7124
|
+
* or an object {x, y} containing focal point coordinates in the original
|
7125
|
+
* image expressed as fractions ranging from 0.0 (top or left) to 1.0
|
7126
|
+
* (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
|
7127
|
+
* crop bottom or left and right sides as necessary, but won’t crop anything
|
7128
|
+
* from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
|
7129
|
+
* preserve as much as possible around a point at 20% of the height of the
|
7130
|
+
* source image.
|
7131
|
+
*/
|
7132
|
+
gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | {
|
7133
|
+
x: number;
|
7134
|
+
y: number;
|
7135
|
+
};
|
7136
|
+
/**
|
7137
|
+
* Maximum height in image pixels. The value must be an integer.
|
7138
|
+
*/
|
7139
|
+
height?: number;
|
7140
|
+
/**
|
7141
|
+
* What EXIF data should be preserved in the output image. Note that EXIF
|
7142
|
+
* rotation and embedded color profiles are always applied ("baked in" into
|
7143
|
+
* the image), and aren't affected by this option. Note that if the Polish
|
7144
|
+
* feature is enabled, all metadata may have been removed already and this
|
7145
|
+
* option may have no effect.
|
7146
|
+
* - keep: Preserve most of EXIF metadata, including GPS location if there's
|
7147
|
+
* any.
|
7148
|
+
* - copyright: Only keep the copyright tag, and discard everything else.
|
7149
|
+
* This is the default behavior for JPEG files.
|
7150
|
+
* - none: Discard all invisible EXIF metadata. Currently WebP and PNG
|
7151
|
+
* output formats always discard metadata.
|
7152
|
+
*/
|
7153
|
+
metadata?: 'keep' | 'copyright' | 'none';
|
7154
|
+
/**
|
7155
|
+
* Quality setting from 1-100 (useful values are in 60-90 range). Lower values
|
7156
|
+
* make images look worse, but load faster. The default is 85. It applies only
|
7157
|
+
* to JPEG and WebP images. It doesn’t have any effect on PNG.
|
7158
|
+
*/
|
7159
|
+
quality?: number;
|
7160
|
+
/**
|
7161
|
+
* Number of degrees (90, 180, 270) to rotate the image by. width and height
|
7162
|
+
* options refer to axes after rotation.
|
7163
|
+
*/
|
7164
|
+
rotate?: 0 | 90 | 180 | 270 | 360;
|
7165
|
+
/**
|
7166
|
+
* Strength of sharpening filter to apply to the image. Floating-point
|
7167
|
+
* number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
|
7168
|
+
* recommended value for downscaled images.
|
7169
|
+
*/
|
7170
|
+
sharpen?: number;
|
7171
|
+
/**
|
7172
|
+
* An object with four properties {left, top, right, bottom} that specify
|
7173
|
+
* a number of pixels to cut off on each side. Allows removal of borders
|
7174
|
+
* or cutting out a specific fragment of an image. Trimming is performed
|
7175
|
+
* before resizing or rotation. Takes dpr into account.
|
7176
|
+
*/
|
7177
|
+
trim?: {
|
7178
|
+
left?: number;
|
7179
|
+
top?: number;
|
7180
|
+
right?: number;
|
7181
|
+
bottom?: number;
|
7182
|
+
};
|
7183
|
+
/**
|
7184
|
+
* Maximum width in image pixels. The value must be an integer.
|
7185
|
+
*/
|
7186
|
+
width?: number;
|
7187
|
+
}
|
7188
|
+
|
7189
|
+
type XataFileEditableFields = Partial<Pick<XataArrayFile, keyof InputFileEntry>>;
|
7190
|
+
declare class XataFile {
|
7191
|
+
/**
|
7192
|
+
* Name of this file.
|
7193
|
+
*/
|
7194
|
+
name?: string;
|
7195
|
+
/**
|
7196
|
+
* Media type of this file.
|
7197
|
+
*/
|
7198
|
+
mediaType: string;
|
7199
|
+
/**
|
7200
|
+
* Base64 encoded content of this file.
|
7201
|
+
*/
|
7202
|
+
base64Content?: string;
|
7203
|
+
/**
|
7204
|
+
* Whether to enable public url for this file.
|
7205
|
+
*/
|
7206
|
+
enablePublicUrl?: boolean;
|
7207
|
+
/**
|
7208
|
+
* Timeout for the signed url.
|
7209
|
+
*/
|
7210
|
+
signedUrlTimeout?: number;
|
7211
|
+
/**
|
7212
|
+
* Size of this file.
|
7213
|
+
*/
|
7214
|
+
size?: number;
|
7215
|
+
/**
|
7216
|
+
* Version of this file.
|
7217
|
+
*/
|
7218
|
+
version?: number;
|
7219
|
+
/**
|
7220
|
+
* Url of this file.
|
7221
|
+
*/
|
7222
|
+
url?: string;
|
7223
|
+
/**
|
7224
|
+
* Signed url of this file.
|
7225
|
+
*/
|
7226
|
+
signedUrl?: string;
|
7227
|
+
/**
|
7228
|
+
* Attributes of this file.
|
7229
|
+
*/
|
7230
|
+
attributes?: Record<string, unknown>;
|
7231
|
+
constructor(file: Partial<XataFile>);
|
7232
|
+
static fromBuffer(buffer: Buffer, options?: XataFileEditableFields): XataFile;
|
7233
|
+
toBuffer(): Buffer;
|
7234
|
+
static fromArrayBuffer(arrayBuffer: ArrayBuffer, options?: XataFileEditableFields): XataFile;
|
7235
|
+
toArrayBuffer(): ArrayBuffer;
|
7236
|
+
static fromUint8Array(uint8Array: Uint8Array, options?: XataFileEditableFields): XataFile;
|
7237
|
+
toUint8Array(): Uint8Array;
|
7238
|
+
static fromBlob(file: Blob, options?: XataFileEditableFields): Promise<XataFile>;
|
7239
|
+
toBlob(): Blob;
|
7240
|
+
static fromString(string: string, options?: XataFileEditableFields): XataFile;
|
7241
|
+
toString(): string;
|
7242
|
+
static fromBase64(base64Content: string, options?: XataFileEditableFields): XataFile;
|
7243
|
+
toBase64(): string;
|
7244
|
+
transform(...options: ImageTransformations[]): {
|
7245
|
+
url: string | undefined;
|
7246
|
+
signedUrl: string | undefined;
|
7247
|
+
};
|
7248
|
+
}
|
7249
|
+
type XataArrayFile = Identifiable & XataFile;
|
7250
|
+
|
6813
7251
|
type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | `xata.${'version' | 'createdAt' | 'updatedAt'}` | DataProps<O> | NestedColumns<O, RecursivePath>;
|
6814
7252
|
type WildcardColumns<O> = Values<{
|
6815
7253
|
[K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
|
@@ -6825,20 +7263,21 @@ type ValueAtColumn<Object, Key> = Key extends '*' ? Values<Object> : Key extends
|
|
6825
7263
|
} : never : Object[K] : never> : never : never;
|
6826
7264
|
type MAX_RECURSION = 2;
|
6827
7265
|
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,
|
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
|
7266
|
+
[K in DataProps<O>]: NonNullable<O[K]> extends infer Item ? If<IsArray<Item>, Item extends (infer Type)[] ? Type extends XataArrayFile ? K | `${K}.${keyof XataFileEditableFields | '*'}` : 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 XataFileEditableFields | '*'}` : `${K}.${StringKeys<Item> | '*'}`, // This allows usage of objects that are not links
|
6830
7267
|
K>> : never;
|
6831
7268
|
}>, never>;
|
6832
7269
|
type DataProps<O> = Exclude<StringKeys<O>, StringKeys<XataRecord>>;
|
6833
7270
|
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;
|
7271
|
+
[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
7272
|
} : unknown : Key extends DataProps<O> ? {
|
6836
|
-
[K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], SelectedPick<NonNullable<O[K]>, ['*']>> : O[K];
|
7273
|
+
[K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Omit<SelectedPick<NonNullable<O[K]>, ['*']>, 'xata' | 'getMetadata'>> : O[K];
|
6837
7274
|
} : Key extends '*' ? {
|
6838
7275
|
[K in StringKeys<O>]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Link<NonNullable<O[K]>>> : O[K];
|
6839
7276
|
} : unknown;
|
6840
7277
|
type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
|
6841
7278
|
|
7279
|
+
declare const RecordColumnTypes: readonly ["bool", "int", "float", "string", "text", "email", "multiple", "link", "object", "datetime", "vector", "file[]", "file"];
|
7280
|
+
type Identifier = string;
|
6842
7281
|
/**
|
6843
7282
|
* Represents an identifiable record from the database.
|
6844
7283
|
*/
|
@@ -6846,7 +7285,7 @@ interface Identifiable {
|
|
6846
7285
|
/**
|
6847
7286
|
* Unique id of this record.
|
6848
7287
|
*/
|
6849
|
-
id:
|
7288
|
+
id: Identifier;
|
6850
7289
|
}
|
6851
7290
|
interface BaseData {
|
6852
7291
|
[key: string]: any;
|
@@ -6960,11 +7399,12 @@ type NumericOperator = ExclusiveOr<{
|
|
6960
7399
|
}, {
|
6961
7400
|
$divide?: number;
|
6962
7401
|
}>>>;
|
7402
|
+
type InputXataFile = Partial<XataArrayFile> | Promise<Partial<XataArrayFile>>;
|
6963
7403
|
type EditableDataFields<T> = T extends XataRecord ? {
|
6964
|
-
id:
|
6965
|
-
} |
|
6966
|
-
id:
|
6967
|
-
} |
|
7404
|
+
id: Identifier;
|
7405
|
+
} | Identifier : NonNullable<T> extends XataRecord ? {
|
7406
|
+
id: Identifier;
|
7407
|
+
} | 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
7408
|
type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
|
6969
7409
|
[K in keyof O]: EditableDataFields<O[K]>;
|
6970
7410
|
}, keyof XataRecord>>;
|
@@ -7404,7 +7844,7 @@ type ComplexAggregationResult = {
|
|
7404
7844
|
};
|
7405
7845
|
|
7406
7846
|
type KeywordAskOptions<Record extends XataRecord> = {
|
7407
|
-
searchType
|
7847
|
+
searchType?: 'keyword';
|
7408
7848
|
search?: {
|
7409
7849
|
fuzziness?: FuzzinessExpression;
|
7410
7850
|
target?: TargetColumn<Record>[];
|
@@ -7414,7 +7854,7 @@ type KeywordAskOptions<Record extends XataRecord> = {
|
|
7414
7854
|
};
|
7415
7855
|
};
|
7416
7856
|
type VectorAskOptions<Record extends XataRecord> = {
|
7417
|
-
searchType
|
7857
|
+
searchType?: 'vector';
|
7418
7858
|
vectorSearch?: {
|
7419
7859
|
/**
|
7420
7860
|
* The column to use for vector search. It must be of type `vector`.
|
@@ -7430,11 +7870,13 @@ type VectorAskOptions<Record extends XataRecord> = {
|
|
7430
7870
|
type TypeAskOptions<Record extends XataRecord> = KeywordAskOptions<Record> | VectorAskOptions<Record>;
|
7431
7871
|
type BaseAskOptions = {
|
7432
7872
|
rules?: string[];
|
7873
|
+
sessionId?: string;
|
7433
7874
|
};
|
7434
7875
|
type AskOptions<Record extends XataRecord> = TypeAskOptions<Record> & BaseAskOptions;
|
7435
7876
|
type AskResult = {
|
7436
7877
|
answer?: string;
|
7437
7878
|
records?: string[];
|
7879
|
+
sessionId?: string;
|
7438
7880
|
};
|
7439
7881
|
|
7440
7882
|
type SortDirection = 'asc' | 'desc';
|
@@ -7894,7 +8336,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7894
8336
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7895
8337
|
* @returns The full persisted record.
|
7896
8338
|
*/
|
7897
|
-
abstract create<K extends SelectableColumn<Record>>(id:
|
8339
|
+
abstract create<K extends SelectableColumn<Record>>(id: Identifier, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
|
7898
8340
|
ifVersion?: number;
|
7899
8341
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7900
8342
|
/**
|
@@ -7903,7 +8345,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7903
8345
|
* @param object Object containing the column names with their values to be stored in the table.
|
7904
8346
|
* @returns The full persisted record.
|
7905
8347
|
*/
|
7906
|
-
abstract create(id:
|
8348
|
+
abstract create(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
|
7907
8349
|
ifVersion?: number;
|
7908
8350
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7909
8351
|
/**
|
@@ -7925,26 +8367,26 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7925
8367
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7926
8368
|
* @returns The persisted record for the given id or null if the record could not be found.
|
7927
8369
|
*/
|
7928
|
-
abstract read<K extends SelectableColumn<Record>>(id:
|
8370
|
+
abstract read<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
7929
8371
|
/**
|
7930
8372
|
* Queries a single record from the table given its unique id.
|
7931
8373
|
* @param id The unique id.
|
7932
8374
|
* @returns The persisted record for the given id or null if the record could not be found.
|
7933
8375
|
*/
|
7934
|
-
abstract read(id:
|
8376
|
+
abstract read(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
7935
8377
|
/**
|
7936
8378
|
* Queries multiple records from the table given their unique id.
|
7937
8379
|
* @param ids The unique ids array.
|
7938
8380
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7939
8381
|
* @returns The persisted records for the given ids in order (if a record could not be found null is returned).
|
7940
8382
|
*/
|
7941
|
-
abstract read<K extends SelectableColumn<Record>>(ids:
|
8383
|
+
abstract read<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
7942
8384
|
/**
|
7943
8385
|
* Queries multiple records from the table given their unique id.
|
7944
8386
|
* @param ids The unique ids array.
|
7945
8387
|
* @returns The persisted records for the given ids in order (if a record could not be found null is returned).
|
7946
8388
|
*/
|
7947
|
-
abstract read(ids:
|
8389
|
+
abstract read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
7948
8390
|
/**
|
7949
8391
|
* Queries a single record from the table by the id in the object.
|
7950
8392
|
* @param object Object containing the id of the record.
|
@@ -7978,14 +8420,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7978
8420
|
* @returns The persisted record for the given id.
|
7979
8421
|
* @throws If the record could not be found.
|
7980
8422
|
*/
|
7981
|
-
abstract readOrThrow<K extends SelectableColumn<Record>>(id:
|
8423
|
+
abstract readOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7982
8424
|
/**
|
7983
8425
|
* Queries a single record from the table given its unique id.
|
7984
8426
|
* @param id The unique id.
|
7985
8427
|
* @returns The persisted record for the given id.
|
7986
8428
|
* @throws If the record could not be found.
|
7987
8429
|
*/
|
7988
|
-
abstract readOrThrow(id:
|
8430
|
+
abstract readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7989
8431
|
/**
|
7990
8432
|
* Queries multiple records from the table given their unique id.
|
7991
8433
|
* @param ids The unique ids array.
|
@@ -7993,14 +8435,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7993
8435
|
* @returns The persisted records for the given ids in order.
|
7994
8436
|
* @throws If one or more records could not be found.
|
7995
8437
|
*/
|
7996
|
-
abstract readOrThrow<K extends SelectableColumn<Record>>(ids:
|
8438
|
+
abstract readOrThrow<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
7997
8439
|
/**
|
7998
8440
|
* Queries multiple records from the table given their unique id.
|
7999
8441
|
* @param ids The unique ids array.
|
8000
8442
|
* @returns The persisted records for the given ids in order.
|
8001
8443
|
* @throws If one or more records could not be found.
|
8002
8444
|
*/
|
8003
|
-
abstract readOrThrow(ids:
|
8445
|
+
abstract readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
8004
8446
|
/**
|
8005
8447
|
* Queries a single record from the table by the id in the object.
|
8006
8448
|
* @param object Object containing the id of the record.
|
@@ -8055,7 +8497,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8055
8497
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
8056
8498
|
* @returns The full persisted record, null if the record could not be found.
|
8057
8499
|
*/
|
8058
|
-
abstract update<K extends SelectableColumn<Record>>(id:
|
8500
|
+
abstract update<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
|
8059
8501
|
ifVersion?: number;
|
8060
8502
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
8061
8503
|
/**
|
@@ -8064,7 +8506,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8064
8506
|
* @param object The column names and their values that have to be updated.
|
8065
8507
|
* @returns The full persisted record, null if the record could not be found.
|
8066
8508
|
*/
|
8067
|
-
abstract update(id:
|
8509
|
+
abstract update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
|
8068
8510
|
ifVersion?: number;
|
8069
8511
|
}): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
8070
8512
|
/**
|
@@ -8107,7 +8549,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8107
8549
|
* @returns The full persisted record.
|
8108
8550
|
* @throws If the record could not be found.
|
8109
8551
|
*/
|
8110
|
-
abstract updateOrThrow<K extends SelectableColumn<Record>>(id:
|
8552
|
+
abstract updateOrThrow<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
|
8111
8553
|
ifVersion?: number;
|
8112
8554
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8113
8555
|
/**
|
@@ -8117,7 +8559,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8117
8559
|
* @returns The full persisted record.
|
8118
8560
|
* @throws If the record could not be found.
|
8119
8561
|
*/
|
8120
|
-
abstract updateOrThrow(id:
|
8562
|
+
abstract updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
|
8121
8563
|
ifVersion?: number;
|
8122
8564
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8123
8565
|
/**
|
@@ -8142,7 +8584,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8142
8584
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
8143
8585
|
* @returns The full persisted record.
|
8144
8586
|
*/
|
8145
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable
|
8587
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[], options?: {
|
8146
8588
|
ifVersion?: number;
|
8147
8589
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8148
8590
|
/**
|
@@ -8151,7 +8593,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8151
8593
|
* @param object Object containing the column names with their values to be persisted in the table.
|
8152
8594
|
* @returns The full persisted record.
|
8153
8595
|
*/
|
8154
|
-
abstract createOrUpdate(object: EditableData<Record> & Identifiable
|
8596
|
+
abstract createOrUpdate(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
|
8155
8597
|
ifVersion?: number;
|
8156
8598
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8157
8599
|
/**
|
@@ -8162,7 +8604,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8162
8604
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
8163
8605
|
* @returns The full persisted record.
|
8164
8606
|
*/
|
8165
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(id:
|
8607
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
|
8166
8608
|
ifVersion?: number;
|
8167
8609
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8168
8610
|
/**
|
@@ -8172,7 +8614,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8172
8614
|
* @param object The column names and the values to be persisted.
|
8173
8615
|
* @returns The full persisted record.
|
8174
8616
|
*/
|
8175
|
-
abstract createOrUpdate(id:
|
8617
|
+
abstract createOrUpdate(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
|
8176
8618
|
ifVersion?: number;
|
8177
8619
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8178
8620
|
/**
|
@@ -8182,14 +8624,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8182
8624
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
8183
8625
|
* @returns Array of the persisted records.
|
8184
8626
|
*/
|
8185
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable
|
8627
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
8186
8628
|
/**
|
8187
8629
|
* Creates or updates a single record. If a record exists with the given id,
|
8188
8630
|
* it will be partially updated, otherwise a new record will be created.
|
8189
8631
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
8190
8632
|
* @returns Array of the persisted records.
|
8191
8633
|
*/
|
8192
|
-
abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable
|
8634
|
+
abstract createOrUpdate(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
8193
8635
|
/**
|
8194
8636
|
* Creates or replaces a single record. If a record exists with the given id,
|
8195
8637
|
* it will be replaced, otherwise a new record will be created.
|
@@ -8197,7 +8639,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8197
8639
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
8198
8640
|
* @returns The full persisted record.
|
8199
8641
|
*/
|
8200
|
-
abstract createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable
|
8642
|
+
abstract createOrReplace<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[], options?: {
|
8201
8643
|
ifVersion?: number;
|
8202
8644
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8203
8645
|
/**
|
@@ -8206,7 +8648,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8206
8648
|
* @param object Object containing the column names with their values to be persisted in the table.
|
8207
8649
|
* @returns The full persisted record.
|
8208
8650
|
*/
|
8209
|
-
abstract createOrReplace(object: EditableData<Record> & Identifiable
|
8651
|
+
abstract createOrReplace(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
|
8210
8652
|
ifVersion?: number;
|
8211
8653
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8212
8654
|
/**
|
@@ -8217,7 +8659,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8217
8659
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
8218
8660
|
* @returns The full persisted record.
|
8219
8661
|
*/
|
8220
|
-
abstract createOrReplace<K extends SelectableColumn<Record>>(id:
|
8662
|
+
abstract createOrReplace<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
|
8221
8663
|
ifVersion?: number;
|
8222
8664
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8223
8665
|
/**
|
@@ -8227,7 +8669,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8227
8669
|
* @param object The column names and the values to be persisted.
|
8228
8670
|
* @returns The full persisted record.
|
8229
8671
|
*/
|
8230
|
-
abstract createOrReplace(id:
|
8672
|
+
abstract createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
|
8231
8673
|
ifVersion?: number;
|
8232
8674
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8233
8675
|
/**
|
@@ -8237,14 +8679,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8237
8679
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
8238
8680
|
* @returns Array of the persisted records.
|
8239
8681
|
*/
|
8240
|
-
abstract createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable
|
8682
|
+
abstract createOrReplace<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
8241
8683
|
/**
|
8242
8684
|
* Creates or replaces a single record. If a record exists with the given id,
|
8243
8685
|
* it will be replaced, otherwise a new record will be created.
|
8244
8686
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
8245
8687
|
* @returns Array of the persisted records.
|
8246
8688
|
*/
|
8247
|
-
abstract createOrReplace(objects: Array<EditableData<Record> & Identifiable
|
8689
|
+
abstract createOrReplace(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
8248
8690
|
/**
|
8249
8691
|
* Deletes a record given its unique id.
|
8250
8692
|
* @param object An object with a unique id.
|
@@ -8264,13 +8706,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8264
8706
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
8265
8707
|
* @returns The deleted record, null if the record could not be found.
|
8266
8708
|
*/
|
8267
|
-
abstract delete<K extends SelectableColumn<Record>>(id:
|
8709
|
+
abstract delete<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
8268
8710
|
/**
|
8269
8711
|
* Deletes a record given a unique id.
|
8270
8712
|
* @param id The unique id.
|
8271
8713
|
* @returns The deleted record, null if the record could not be found.
|
8272
8714
|
*/
|
8273
|
-
abstract delete(id:
|
8715
|
+
abstract delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
8274
8716
|
/**
|
8275
8717
|
* Deletes multiple records given an array of objects with ids.
|
8276
8718
|
* @param objects An array of objects with unique ids.
|
@@ -8290,13 +8732,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8290
8732
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
8291
8733
|
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
8292
8734
|
*/
|
8293
|
-
abstract delete<K extends SelectableColumn<Record>>(objects:
|
8735
|
+
abstract delete<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
8294
8736
|
/**
|
8295
8737
|
* Deletes multiple records given an array of unique ids.
|
8296
8738
|
* @param objects An array of ids.
|
8297
8739
|
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
8298
8740
|
*/
|
8299
|
-
abstract delete(objects:
|
8741
|
+
abstract delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
8300
8742
|
/**
|
8301
8743
|
* Deletes a record given its unique id.
|
8302
8744
|
* @param object An object with a unique id.
|
@@ -8319,14 +8761,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8319
8761
|
* @returns The deleted record, null if the record could not be found.
|
8320
8762
|
* @throws If the record could not be found.
|
8321
8763
|
*/
|
8322
|
-
abstract deleteOrThrow<K extends SelectableColumn<Record>>(id:
|
8764
|
+
abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8323
8765
|
/**
|
8324
8766
|
* Deletes a record given a unique id.
|
8325
8767
|
* @param id The unique id.
|
8326
8768
|
* @returns The deleted record, null if the record could not be found.
|
8327
8769
|
* @throws If the record could not be found.
|
8328
8770
|
*/
|
8329
|
-
abstract deleteOrThrow(id:
|
8771
|
+
abstract deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8330
8772
|
/**
|
8331
8773
|
* Deletes multiple records given an array of objects with ids.
|
8332
8774
|
* @param objects An array of objects with unique ids.
|
@@ -8349,14 +8791,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8349
8791
|
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
8350
8792
|
* @throws If one or more records could not be found.
|
8351
8793
|
*/
|
8352
|
-
abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects:
|
8794
|
+
abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
8353
8795
|
/**
|
8354
8796
|
* Deletes multiple records given an array of unique ids.
|
8355
8797
|
* @param objects An array of ids.
|
8356
8798
|
* @returns Array of the deleted records in order.
|
8357
8799
|
* @throws If one or more records could not be found.
|
8358
8800
|
*/
|
8359
|
-
abstract deleteOrThrow(objects:
|
8801
|
+
abstract deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
8360
8802
|
/**
|
8361
8803
|
* Search for records in the table.
|
8362
8804
|
* @param query The query to search for.
|
@@ -8407,6 +8849,10 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
8407
8849
|
* Experimental: Ask the database to perform a natural language question.
|
8408
8850
|
*/
|
8409
8851
|
abstract ask(question: string, options?: AskOptions<Record>): Promise<AskResult>;
|
8852
|
+
/**
|
8853
|
+
* Experimental: Ask the database to perform a natural language question.
|
8854
|
+
*/
|
8855
|
+
abstract ask(question: string, options: AskOptions<Record>): Promise<AskResult>;
|
8410
8856
|
/**
|
8411
8857
|
* Experimental: Ask the database to perform a natural language question.
|
8412
8858
|
*/
|
@@ -8429,26 +8875,26 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
|
|
8429
8875
|
create(object: EditableData<Record> & Partial<Identifiable>, options?: {
|
8430
8876
|
ifVersion?: number;
|
8431
8877
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8432
|
-
create<K extends SelectableColumn<Record>>(id:
|
8878
|
+
create<K extends SelectableColumn<Record>>(id: Identifier, object: EditableData<Record>, columns: K[], options?: {
|
8433
8879
|
ifVersion?: number;
|
8434
8880
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8435
|
-
create(id:
|
8881
|
+
create(id: Identifier, object: EditableData<Record>, options?: {
|
8436
8882
|
ifVersion?: number;
|
8437
8883
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8438
8884
|
create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
8439
8885
|
create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
8440
|
-
read<K extends SelectableColumn<Record>>(id:
|
8886
|
+
read<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
8441
8887
|
read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
8442
|
-
read<K extends SelectableColumn<Record>>(ids:
|
8443
|
-
read(ids:
|
8888
|
+
read<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
8889
|
+
read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
8444
8890
|
read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
8445
8891
|
read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
8446
8892
|
read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
8447
8893
|
read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
8448
|
-
readOrThrow<K extends SelectableColumn<Record>>(id:
|
8449
|
-
readOrThrow(id:
|
8450
|
-
readOrThrow<K extends SelectableColumn<Record>>(ids:
|
8451
|
-
readOrThrow(ids:
|
8894
|
+
readOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8895
|
+
readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8896
|
+
readOrThrow<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
8897
|
+
readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
8452
8898
|
readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8453
8899
|
readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8454
8900
|
readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
@@ -8459,10 +8905,10 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
|
|
8459
8905
|
update(object: Partial<EditableData<Record>> & Identifiable, options?: {
|
8460
8906
|
ifVersion?: number;
|
8461
8907
|
}): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
8462
|
-
update<K extends SelectableColumn<Record>>(id:
|
8908
|
+
update<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
|
8463
8909
|
ifVersion?: number;
|
8464
8910
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
8465
|
-
update(id:
|
8911
|
+
update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
|
8466
8912
|
ifVersion?: number;
|
8467
8913
|
}): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
8468
8914
|
update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
@@ -8473,58 +8919,58 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
|
|
8473
8919
|
updateOrThrow(object: Partial<EditableData<Record>> & Identifiable, options?: {
|
8474
8920
|
ifVersion?: number;
|
8475
8921
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8476
|
-
updateOrThrow<K extends SelectableColumn<Record>>(id:
|
8922
|
+
updateOrThrow<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
|
8477
8923
|
ifVersion?: number;
|
8478
8924
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8479
|
-
updateOrThrow(id:
|
8925
|
+
updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
|
8480
8926
|
ifVersion?: number;
|
8481
8927
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8482
8928
|
updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
8483
8929
|
updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
8484
|
-
createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable
|
8930
|
+
createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[], options?: {
|
8485
8931
|
ifVersion?: number;
|
8486
8932
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8487
|
-
createOrUpdate(object: EditableData<Record> & Identifiable
|
8933
|
+
createOrUpdate(object: EditableData<Record> & Partial<Identifiable>, options?: {
|
8488
8934
|
ifVersion?: number;
|
8489
8935
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8490
|
-
createOrUpdate<K extends SelectableColumn<Record>>(id:
|
8936
|
+
createOrUpdate<K extends SelectableColumn<Record>>(id: Identifier, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
|
8491
8937
|
ifVersion?: number;
|
8492
8938
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8493
|
-
createOrUpdate(id:
|
8939
|
+
createOrUpdate(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
|
8494
8940
|
ifVersion?: number;
|
8495
8941
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8496
|
-
createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable
|
8497
|
-
createOrUpdate(objects: Array<EditableData<Record> & Identifiable
|
8498
|
-
createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable
|
8942
|
+
createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
8943
|
+
createOrUpdate(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
8944
|
+
createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[], options?: {
|
8499
8945
|
ifVersion?: number;
|
8500
8946
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8501
|
-
createOrReplace(object: EditableData<Record> & Identifiable
|
8947
|
+
createOrReplace(object: EditableData<Record> & Partial<Identifiable>, options?: {
|
8502
8948
|
ifVersion?: number;
|
8503
8949
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8504
|
-
createOrReplace<K extends SelectableColumn<Record>>(id:
|
8950
|
+
createOrReplace<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
|
8505
8951
|
ifVersion?: number;
|
8506
8952
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8507
|
-
createOrReplace(id:
|
8953
|
+
createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
|
8508
8954
|
ifVersion?: number;
|
8509
8955
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8510
|
-
createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable
|
8511
|
-
createOrReplace(objects: Array<EditableData<Record> & Identifiable
|
8956
|
+
createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
8957
|
+
createOrReplace(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
8512
8958
|
delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
8513
8959
|
delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
8514
|
-
delete<K extends SelectableColumn<Record>>(id:
|
8515
|
-
delete(id:
|
8960
|
+
delete<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
8961
|
+
delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
8516
8962
|
delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
8517
8963
|
delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
8518
|
-
delete<K extends SelectableColumn<Record>>(objects:
|
8519
|
-
delete(objects:
|
8964
|
+
delete<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
8965
|
+
delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
8520
8966
|
deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8521
8967
|
deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8522
|
-
deleteOrThrow<K extends SelectableColumn<Record>>(id:
|
8523
|
-
deleteOrThrow(id:
|
8968
|
+
deleteOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8969
|
+
deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8524
8970
|
deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
8525
8971
|
deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
8526
|
-
deleteOrThrow<K extends SelectableColumn<Record>>(objects:
|
8527
|
-
deleteOrThrow(objects:
|
8972
|
+
deleteOrThrow<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
8973
|
+
deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
8528
8974
|
search(query: string, options?: {
|
8529
8975
|
fuzziness?: FuzzinessExpression;
|
8530
8976
|
prefix?: PrefixExpression;
|
@@ -8600,7 +9046,7 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
|
|
8600
9046
|
} : {
|
8601
9047
|
[K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
|
8602
9048
|
} : 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 {
|
9049
|
+
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 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
|
8604
9050
|
name: string;
|
8605
9051
|
type: string;
|
8606
9052
|
} ? UnionToIntersection<Values<{
|
@@ -8720,6 +9166,40 @@ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends X
|
|
8720
9166
|
build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
|
8721
9167
|
}
|
8722
9168
|
|
9169
|
+
type BinaryFile = string | Blob | ArrayBuffer;
|
9170
|
+
type FilesPluginResult<Schemas extends Record<string, BaseData>> = {
|
9171
|
+
download: <Tables extends StringKeys<Schemas>>(location: DownloadDestination<Schemas, Tables>) => Promise<Blob>;
|
9172
|
+
upload: <Tables extends StringKeys<Schemas>>(location: UploadDestination<Schemas, Tables>, file: BinaryFile) => Promise<FileResponse>;
|
9173
|
+
delete: <Tables extends StringKeys<Schemas>>(location: DownloadDestination<Schemas, Tables>) => Promise<FileResponse>;
|
9174
|
+
};
|
9175
|
+
type UploadDestination<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = Values<{
|
9176
|
+
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
9177
|
+
table: Model;
|
9178
|
+
column: ColumnsByValue<Schemas[Model], XataFile>;
|
9179
|
+
record: string;
|
9180
|
+
} | {
|
9181
|
+
table: Model;
|
9182
|
+
column: ColumnsByValue<Schemas[Model], XataArrayFile[]>;
|
9183
|
+
record: string;
|
9184
|
+
fileId?: string;
|
9185
|
+
};
|
9186
|
+
}>;
|
9187
|
+
type DownloadDestination<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = Values<{
|
9188
|
+
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
9189
|
+
table: Model;
|
9190
|
+
column: ColumnsByValue<Schemas[Model], XataFile>;
|
9191
|
+
record: string;
|
9192
|
+
} | {
|
9193
|
+
table: Model;
|
9194
|
+
column: ColumnsByValue<Schemas[Model], XataArrayFile[]>;
|
9195
|
+
record: string;
|
9196
|
+
fileId: string;
|
9197
|
+
};
|
9198
|
+
}>;
|
9199
|
+
declare class FilesPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
9200
|
+
build(pluginOptions: XataPluginOptions): FilesPluginResult<Schemas>;
|
9201
|
+
}
|
9202
|
+
|
8723
9203
|
type TransactionOperation<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
|
8724
9204
|
insert: Values<{
|
8725
9205
|
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
@@ -8820,6 +9300,7 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
|
8820
9300
|
db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
|
8821
9301
|
search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
|
8822
9302
|
transactions: Awaited<ReturnType<TransactionPlugin<Schemas>['build']>>;
|
9303
|
+
files: Awaited<ReturnType<FilesPlugin<Schemas>['build']>>;
|
8823
9304
|
}, keyof Plugins> & {
|
8824
9305
|
[Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
|
8825
9306
|
} & {
|
@@ -8943,4 +9424,4 @@ declare class XataError extends Error {
|
|
8943
9424
|
constructor(message: string, status: number);
|
8944
9425
|
}
|
8945
9426
|
|
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 };
|
9427
|
+
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, AskTableSessionError, AskTableSessionPathParams, AskTableSessionRequestBody, AskTableSessionResponse, AskTableSessionVariables, 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, GenerateAccessTokenError, GenerateAccessTokenVariables, 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, GrantAuthorizationCodeError, GrantAuthorizationCodeRequestBody, GrantAuthorizationCodeResponse, GrantAuthorizationCodeVariables, 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, RecordColumnTypes, 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, XataArrayFile, XataError, XataFile, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, askTable, askTableSession, 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, generateAccessToken, 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, grantAuthorizationCode, 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 };
|