@xata.io/client 0.0.0-alpha.vfe896b3 → 0.0.0-alpha.vfe9f27c
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 +4 -4
- package/CHANGELOG.md +101 -1
- package/dist/index.cjs +1000 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1457 -349
- package/dist/index.mjs +980 -74
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -3
- package/.eslintrc.cjs +0 -13
- package/rollup.config.mjs +0 -44
- package/tsconfig.json +0 -23
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,26 @@ type ErrorWrapper$1<TError> = TError | {
|
|
105
109
|
*
|
106
110
|
* @version 1.0
|
107
111
|
*/
|
112
|
+
type OAuthResponseType = 'code';
|
113
|
+
type OAuthScope = 'admin:all';
|
114
|
+
type AuthorizationCodeResponse = {
|
115
|
+
state?: string;
|
116
|
+
redirectUri?: string;
|
117
|
+
scopes?: OAuthScope[];
|
118
|
+
clientId?: string;
|
119
|
+
/**
|
120
|
+
* @format date-time
|
121
|
+
*/
|
122
|
+
expires?: string;
|
123
|
+
code?: string;
|
124
|
+
};
|
125
|
+
type AuthorizationCodeRequest = {
|
126
|
+
state?: string;
|
127
|
+
redirectUri?: string;
|
128
|
+
scopes?: OAuthScope[];
|
129
|
+
clientId: string;
|
130
|
+
responseType: OAuthResponseType;
|
131
|
+
};
|
108
132
|
type User = {
|
109
133
|
/**
|
110
134
|
* @format email
|
@@ -129,6 +153,31 @@ type DateTime$1 = string;
|
|
129
153
|
* @pattern [a-zA-Z0-9_\-~]*
|
130
154
|
*/
|
131
155
|
type APIKeyName = string;
|
156
|
+
type OAuthClientPublicDetails = {
|
157
|
+
name?: string;
|
158
|
+
description?: string;
|
159
|
+
icon?: string;
|
160
|
+
clientId: string;
|
161
|
+
};
|
162
|
+
type OAuthClientID = string;
|
163
|
+
type OAuthAccessToken = {
|
164
|
+
token: string;
|
165
|
+
scopes: string[];
|
166
|
+
/**
|
167
|
+
* @format date-time
|
168
|
+
*/
|
169
|
+
createdAt: string;
|
170
|
+
/**
|
171
|
+
* @format date-time
|
172
|
+
*/
|
173
|
+
updatedAt: string;
|
174
|
+
/**
|
175
|
+
* @format date-time
|
176
|
+
*/
|
177
|
+
expiresAt: string;
|
178
|
+
clientId: string;
|
179
|
+
};
|
180
|
+
type AccessToken = string;
|
132
181
|
/**
|
133
182
|
* @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
|
134
183
|
* @x-go-type auth.WorkspaceID
|
@@ -260,6 +309,7 @@ type DatabaseGithubSettings = {
|
|
260
309
|
};
|
261
310
|
type Region = {
|
262
311
|
id: string;
|
312
|
+
name: string;
|
263
313
|
};
|
264
314
|
type ListRegionsResponse = {
|
265
315
|
/**
|
@@ -295,6 +345,53 @@ type SimpleError$1 = {
|
|
295
345
|
* @version 1.0
|
296
346
|
*/
|
297
347
|
|
348
|
+
type GetAuthorizationCodeQueryParams = {
|
349
|
+
clientID: string;
|
350
|
+
responseType: OAuthResponseType;
|
351
|
+
redirectUri?: string;
|
352
|
+
scopes?: OAuthScope[];
|
353
|
+
state?: string;
|
354
|
+
};
|
355
|
+
type GetAuthorizationCodeError = ErrorWrapper$1<{
|
356
|
+
status: 400;
|
357
|
+
payload: BadRequestError$1;
|
358
|
+
} | {
|
359
|
+
status: 401;
|
360
|
+
payload: AuthError$1;
|
361
|
+
} | {
|
362
|
+
status: 404;
|
363
|
+
payload: SimpleError$1;
|
364
|
+
} | {
|
365
|
+
status: 409;
|
366
|
+
payload: SimpleError$1;
|
367
|
+
}>;
|
368
|
+
type GetAuthorizationCodeVariables = {
|
369
|
+
queryParams: GetAuthorizationCodeQueryParams;
|
370
|
+
} & ControlPlaneFetcherExtraProps;
|
371
|
+
/**
|
372
|
+
* Creates, stores and returns an authorization code to be used by a third party app. Supporting use of GET is required by OAuth2 spec
|
373
|
+
*/
|
374
|
+
declare const getAuthorizationCode: (variables: GetAuthorizationCodeVariables, signal?: AbortSignal) => Promise<AuthorizationCodeResponse>;
|
375
|
+
type GrantAuthorizationCodeError = ErrorWrapper$1<{
|
376
|
+
status: 400;
|
377
|
+
payload: BadRequestError$1;
|
378
|
+
} | {
|
379
|
+
status: 401;
|
380
|
+
payload: AuthError$1;
|
381
|
+
} | {
|
382
|
+
status: 404;
|
383
|
+
payload: SimpleError$1;
|
384
|
+
} | {
|
385
|
+
status: 409;
|
386
|
+
payload: SimpleError$1;
|
387
|
+
}>;
|
388
|
+
type GrantAuthorizationCodeVariables = {
|
389
|
+
body: AuthorizationCodeRequest;
|
390
|
+
} & ControlPlaneFetcherExtraProps;
|
391
|
+
/**
|
392
|
+
* Creates, stores and returns an authorization code to be used by a third party app
|
393
|
+
*/
|
394
|
+
declare const grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal) => Promise<AuthorizationCodeResponse>;
|
298
395
|
type GetUserError = ErrorWrapper$1<{
|
299
396
|
status: 400;
|
300
397
|
payload: BadRequestError$1;
|
@@ -414,6 +511,115 @@ type DeleteUserAPIKeyVariables = {
|
|
414
511
|
* Delete an existing API key
|
415
512
|
*/
|
416
513
|
declare const deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
|
514
|
+
type GetUserOAuthClientsError = ErrorWrapper$1<{
|
515
|
+
status: 400;
|
516
|
+
payload: BadRequestError$1;
|
517
|
+
} | {
|
518
|
+
status: 401;
|
519
|
+
payload: AuthError$1;
|
520
|
+
} | {
|
521
|
+
status: 404;
|
522
|
+
payload: SimpleError$1;
|
523
|
+
}>;
|
524
|
+
type GetUserOAuthClientsResponse = {
|
525
|
+
clients?: OAuthClientPublicDetails[];
|
526
|
+
};
|
527
|
+
type GetUserOAuthClientsVariables = ControlPlaneFetcherExtraProps;
|
528
|
+
/**
|
529
|
+
* Retrieve the list of OAuth Clients that a user has authorized
|
530
|
+
*/
|
531
|
+
declare const getUserOAuthClients: (variables: GetUserOAuthClientsVariables, signal?: AbortSignal) => Promise<GetUserOAuthClientsResponse>;
|
532
|
+
type DeleteUserOAuthClientPathParams = {
|
533
|
+
clientId: OAuthClientID;
|
534
|
+
};
|
535
|
+
type DeleteUserOAuthClientError = ErrorWrapper$1<{
|
536
|
+
status: 400;
|
537
|
+
payload: BadRequestError$1;
|
538
|
+
} | {
|
539
|
+
status: 401;
|
540
|
+
payload: AuthError$1;
|
541
|
+
} | {
|
542
|
+
status: 404;
|
543
|
+
payload: SimpleError$1;
|
544
|
+
}>;
|
545
|
+
type DeleteUserOAuthClientVariables = {
|
546
|
+
pathParams: DeleteUserOAuthClientPathParams;
|
547
|
+
} & ControlPlaneFetcherExtraProps;
|
548
|
+
/**
|
549
|
+
* Delete the oauth client for the user and revoke all access
|
550
|
+
*/
|
551
|
+
declare const deleteUserOAuthClient: (variables: DeleteUserOAuthClientVariables, signal?: AbortSignal) => Promise<undefined>;
|
552
|
+
type GetUserOAuthAccessTokensError = ErrorWrapper$1<{
|
553
|
+
status: 400;
|
554
|
+
payload: BadRequestError$1;
|
555
|
+
} | {
|
556
|
+
status: 401;
|
557
|
+
payload: AuthError$1;
|
558
|
+
} | {
|
559
|
+
status: 404;
|
560
|
+
payload: SimpleError$1;
|
561
|
+
}>;
|
562
|
+
type GetUserOAuthAccessTokensResponse = {
|
563
|
+
accessTokens: OAuthAccessToken[];
|
564
|
+
};
|
565
|
+
type GetUserOAuthAccessTokensVariables = ControlPlaneFetcherExtraProps;
|
566
|
+
/**
|
567
|
+
* Retrieve the list of valid OAuth Access Tokens on the current user's account
|
568
|
+
*/
|
569
|
+
declare const getUserOAuthAccessTokens: (variables: GetUserOAuthAccessTokensVariables, signal?: AbortSignal) => Promise<GetUserOAuthAccessTokensResponse>;
|
570
|
+
type DeleteOAuthAccessTokenPathParams = {
|
571
|
+
token: AccessToken;
|
572
|
+
};
|
573
|
+
type DeleteOAuthAccessTokenError = ErrorWrapper$1<{
|
574
|
+
status: 400;
|
575
|
+
payload: BadRequestError$1;
|
576
|
+
} | {
|
577
|
+
status: 401;
|
578
|
+
payload: AuthError$1;
|
579
|
+
} | {
|
580
|
+
status: 404;
|
581
|
+
payload: SimpleError$1;
|
582
|
+
} | {
|
583
|
+
status: 409;
|
584
|
+
payload: SimpleError$1;
|
585
|
+
}>;
|
586
|
+
type DeleteOAuthAccessTokenVariables = {
|
587
|
+
pathParams: DeleteOAuthAccessTokenPathParams;
|
588
|
+
} & ControlPlaneFetcherExtraProps;
|
589
|
+
/**
|
590
|
+
* Expires the access token for a third party app
|
591
|
+
*/
|
592
|
+
declare const deleteOAuthAccessToken: (variables: DeleteOAuthAccessTokenVariables, signal?: AbortSignal) => Promise<undefined>;
|
593
|
+
type UpdateOAuthAccessTokenPathParams = {
|
594
|
+
token: AccessToken;
|
595
|
+
};
|
596
|
+
type UpdateOAuthAccessTokenError = ErrorWrapper$1<{
|
597
|
+
status: 400;
|
598
|
+
payload: BadRequestError$1;
|
599
|
+
} | {
|
600
|
+
status: 401;
|
601
|
+
payload: AuthError$1;
|
602
|
+
} | {
|
603
|
+
status: 404;
|
604
|
+
payload: SimpleError$1;
|
605
|
+
} | {
|
606
|
+
status: 409;
|
607
|
+
payload: SimpleError$1;
|
608
|
+
}>;
|
609
|
+
type UpdateOAuthAccessTokenRequestBody = {
|
610
|
+
/**
|
611
|
+
* expiration time of the token as a unix timestamp
|
612
|
+
*/
|
613
|
+
expires: number;
|
614
|
+
};
|
615
|
+
type UpdateOAuthAccessTokenVariables = {
|
616
|
+
body: UpdateOAuthAccessTokenRequestBody;
|
617
|
+
pathParams: UpdateOAuthAccessTokenPathParams;
|
618
|
+
} & ControlPlaneFetcherExtraProps;
|
619
|
+
/**
|
620
|
+
* Updates partially the access token for a third party app
|
621
|
+
*/
|
622
|
+
declare const updateOAuthAccessToken: (variables: UpdateOAuthAccessTokenVariables, signal?: AbortSignal) => Promise<OAuthAccessToken>;
|
417
623
|
type GetWorkspacesListError = ErrorWrapper$1<{
|
418
624
|
status: 400;
|
419
625
|
payload: BadRequestError$1;
|
@@ -953,6 +1159,43 @@ type UpdateDatabaseMetadataVariables = {
|
|
953
1159
|
* Update the color of the selected database
|
954
1160
|
*/
|
955
1161
|
declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
|
1162
|
+
type RenameDatabasePathParams = {
|
1163
|
+
/**
|
1164
|
+
* Workspace ID
|
1165
|
+
*/
|
1166
|
+
workspaceId: WorkspaceID;
|
1167
|
+
/**
|
1168
|
+
* The Database Name
|
1169
|
+
*/
|
1170
|
+
dbName: DBName$1;
|
1171
|
+
};
|
1172
|
+
type RenameDatabaseError = ErrorWrapper$1<{
|
1173
|
+
status: 400;
|
1174
|
+
payload: BadRequestError$1;
|
1175
|
+
} | {
|
1176
|
+
status: 401;
|
1177
|
+
payload: AuthError$1;
|
1178
|
+
} | {
|
1179
|
+
status: 422;
|
1180
|
+
payload: SimpleError$1;
|
1181
|
+
} | {
|
1182
|
+
status: 423;
|
1183
|
+
payload: SimpleError$1;
|
1184
|
+
}>;
|
1185
|
+
type RenameDatabaseRequestBody = {
|
1186
|
+
/**
|
1187
|
+
* @minLength 1
|
1188
|
+
*/
|
1189
|
+
newName: string;
|
1190
|
+
};
|
1191
|
+
type RenameDatabaseVariables = {
|
1192
|
+
body: RenameDatabaseRequestBody;
|
1193
|
+
pathParams: RenameDatabasePathParams;
|
1194
|
+
} & ControlPlaneFetcherExtraProps;
|
1195
|
+
/**
|
1196
|
+
* Change the name of an existing database
|
1197
|
+
*/
|
1198
|
+
declare const renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
|
956
1199
|
type GetDatabaseGithubSettingsPathParams = {
|
957
1200
|
/**
|
958
1201
|
* Workspace ID
|
@@ -1134,19 +1377,24 @@ type ColumnVector = {
|
|
1134
1377
|
*/
|
1135
1378
|
dimension: number;
|
1136
1379
|
};
|
1380
|
+
type ColumnFile = {
|
1381
|
+
defaultPublicAccess?: boolean;
|
1382
|
+
};
|
1137
1383
|
type Column = {
|
1138
1384
|
name: string;
|
1139
|
-
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file' | '
|
1385
|
+
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file' | 'json';
|
1140
1386
|
link?: ColumnLink;
|
1141
1387
|
vector?: ColumnVector;
|
1388
|
+
file?: ColumnFile;
|
1389
|
+
['file[]']?: ColumnFile;
|
1142
1390
|
notNull?: boolean;
|
1143
1391
|
defaultValue?: string;
|
1144
1392
|
unique?: boolean;
|
1145
1393
|
columns?: Column[];
|
1146
1394
|
};
|
1147
1395
|
type RevLink = {
|
1148
|
-
linkID: string;
|
1149
1396
|
table: string;
|
1397
|
+
column: string;
|
1150
1398
|
};
|
1151
1399
|
type Table = {
|
1152
1400
|
id?: string;
|
@@ -1391,9 +1639,13 @@ type RecordsMetadata = {
|
|
1391
1639
|
*/
|
1392
1640
|
cursor: string;
|
1393
1641
|
/**
|
1394
|
-
* true if more records can be
|
1642
|
+
* true if more records can be fetched
|
1395
1643
|
*/
|
1396
1644
|
more: boolean;
|
1645
|
+
/**
|
1646
|
+
* the number of records returned per page
|
1647
|
+
*/
|
1648
|
+
size: number;
|
1397
1649
|
};
|
1398
1650
|
};
|
1399
1651
|
type TableOpAdd = {
|
@@ -1442,7 +1694,7 @@ type Commit = {
|
|
1442
1694
|
message?: string;
|
1443
1695
|
id: string;
|
1444
1696
|
parentID?: string;
|
1445
|
-
checksum
|
1697
|
+
checksum: string;
|
1446
1698
|
mergeParentID?: string;
|
1447
1699
|
createdAt: DateTime;
|
1448
1700
|
operations: MigrationOp[];
|
@@ -1474,7 +1726,7 @@ type MigrationObject = {
|
|
1474
1726
|
message?: string;
|
1475
1727
|
id: string;
|
1476
1728
|
parentID?: string;
|
1477
|
-
checksum
|
1729
|
+
checksum: string;
|
1478
1730
|
operations: MigrationOp[];
|
1479
1731
|
};
|
1480
1732
|
/**
|
@@ -1550,9 +1802,27 @@ type TransactionUpdateOp = {
|
|
1550
1802
|
columns?: string[];
|
1551
1803
|
};
|
1552
1804
|
/**
|
1553
|
-
* A delete operation. The transaction will continue if no record matches the ID.
|
1805
|
+
* A delete operation. The transaction will continue if no record matches the ID by default. To override this behaviour, set failIfMissing to true.
|
1554
1806
|
*/
|
1555
1807
|
type TransactionDeleteOp = {
|
1808
|
+
/**
|
1809
|
+
* The table name
|
1810
|
+
*/
|
1811
|
+
table: string;
|
1812
|
+
id: RecordID;
|
1813
|
+
/**
|
1814
|
+
* If true, the transaction will fail when the record doesn't exist.
|
1815
|
+
*/
|
1816
|
+
failIfMissing?: boolean;
|
1817
|
+
/**
|
1818
|
+
* If set, the call will return the requested fields as part of the response.
|
1819
|
+
*/
|
1820
|
+
columns?: string[];
|
1821
|
+
};
|
1822
|
+
/**
|
1823
|
+
* Get by id operation.
|
1824
|
+
*/
|
1825
|
+
type TransactionGetOp = {
|
1556
1826
|
/**
|
1557
1827
|
* The table name
|
1558
1828
|
*/
|
@@ -1572,6 +1842,8 @@ type TransactionOperation$1 = {
|
|
1572
1842
|
update: TransactionUpdateOp;
|
1573
1843
|
} | {
|
1574
1844
|
['delete']: TransactionDeleteOp;
|
1845
|
+
} | {
|
1846
|
+
get: TransactionGetOp;
|
1575
1847
|
};
|
1576
1848
|
/**
|
1577
1849
|
* Fields to return in the transaction result.
|
@@ -1623,11 +1895,21 @@ type TransactionResultDelete = {
|
|
1623
1895
|
rows: number;
|
1624
1896
|
columns?: TransactionResultColumns;
|
1625
1897
|
};
|
1898
|
+
/**
|
1899
|
+
* A result from a get operation.
|
1900
|
+
*/
|
1901
|
+
type TransactionResultGet = {
|
1902
|
+
/**
|
1903
|
+
* The type of operation who's result is being returned.
|
1904
|
+
*/
|
1905
|
+
operation: 'get';
|
1906
|
+
columns?: TransactionResultColumns;
|
1907
|
+
};
|
1626
1908
|
/**
|
1627
1909
|
* An ordered array of results from the submitted operations.
|
1628
1910
|
*/
|
1629
1911
|
type TransactionSuccess = {
|
1630
|
-
results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
|
1912
|
+
results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete | TransactionResultGet)[];
|
1631
1913
|
};
|
1632
1914
|
/**
|
1633
1915
|
* An error message from a failing transaction operation
|
@@ -1643,7 +1925,7 @@ type TransactionError = {
|
|
1643
1925
|
message: string;
|
1644
1926
|
};
|
1645
1927
|
/**
|
1646
|
-
* An array of errors, with
|
1928
|
+
* An array of errors, with indices, from the transaction.
|
1647
1929
|
*/
|
1648
1930
|
type TransactionFailure = {
|
1649
1931
|
/**
|
@@ -1662,27 +1944,36 @@ type ObjectValue = {
|
|
1662
1944
|
[key: string]: string | boolean | number | string[] | number[] | DateTime | ObjectValue;
|
1663
1945
|
};
|
1664
1946
|
/**
|
1665
|
-
*
|
1947
|
+
* Unique file identifier
|
1666
1948
|
*
|
1667
|
-
* @
|
1949
|
+
* @maxLength 255
|
1950
|
+
* @minLength 1
|
1951
|
+
* @pattern [a-zA-Z0-9_-~:]+
|
1952
|
+
*/
|
1953
|
+
type FileItemID = string;
|
1954
|
+
/**
|
1955
|
+
* File name
|
1956
|
+
*
|
1957
|
+
* @maxLength 1024
|
1958
|
+
* @minLength 0
|
1959
|
+
* @pattern [0-9a-zA-Z!\-_\.\*'\(\)]*
|
1960
|
+
*/
|
1961
|
+
type FileName = string;
|
1962
|
+
/**
|
1963
|
+
* Media type
|
1964
|
+
*
|
1965
|
+
* @maxLength 255
|
1966
|
+
* @minLength 3
|
1967
|
+
* @pattern ^\w+/[-+.\w]+$
|
1968
|
+
*/
|
1969
|
+
type MediaType = string;
|
1970
|
+
/**
|
1971
|
+
* Object representing a file in an array
|
1668
1972
|
*/
|
1669
1973
|
type InputFileEntry = {
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
* @maxLength 1024
|
1674
|
-
* @minLength 1
|
1675
|
-
* @pattern [0-9a-zA-Z!\-_\.\*'\(\)]+
|
1676
|
-
*/
|
1677
|
-
name: string;
|
1678
|
-
/**
|
1679
|
-
* Media type
|
1680
|
-
*
|
1681
|
-
* @maxLength 255
|
1682
|
-
* @minLength 3
|
1683
|
-
* @pattern ^\w+/[-+.\w]+$
|
1684
|
-
*/
|
1685
|
-
mediaType?: string;
|
1974
|
+
id?: FileItemID;
|
1975
|
+
name?: FileName;
|
1976
|
+
mediaType?: MediaType;
|
1686
1977
|
/**
|
1687
1978
|
* Base64 encoded content
|
1688
1979
|
*
|
@@ -1704,11 +1995,34 @@ type InputFileEntry = {
|
|
1704
1995
|
* @maxItems 50
|
1705
1996
|
*/
|
1706
1997
|
type InputFileArray = InputFileEntry[];
|
1998
|
+
/**
|
1999
|
+
* Object representing a file
|
2000
|
+
*
|
2001
|
+
* @x-go-type file.InputFile
|
2002
|
+
*/
|
2003
|
+
type InputFile = {
|
2004
|
+
name: FileName;
|
2005
|
+
mediaType?: MediaType;
|
2006
|
+
/**
|
2007
|
+
* Base64 encoded content
|
2008
|
+
*
|
2009
|
+
* @maxLength 20971520
|
2010
|
+
*/
|
2011
|
+
base64Content?: string;
|
2012
|
+
/**
|
2013
|
+
* Enable public access to the file
|
2014
|
+
*/
|
2015
|
+
enablePublicUrl?: boolean;
|
2016
|
+
/**
|
2017
|
+
* Time to live for signed URLs
|
2018
|
+
*/
|
2019
|
+
signedUrlTimeout?: number;
|
2020
|
+
};
|
1707
2021
|
/**
|
1708
2022
|
* Xata input record
|
1709
2023
|
*/
|
1710
2024
|
type DataInputRecord = {
|
1711
|
-
[key: string]: RecordID | string | boolean | number | string[] | number[] | DateTime | ObjectValue | InputFileArray |
|
2025
|
+
[key: string]: RecordID | string | boolean | number | string[] | number[] | DateTime | ObjectValue | InputFileArray | InputFile | null;
|
1712
2026
|
};
|
1713
2027
|
/**
|
1714
2028
|
* Xata Table Record Metadata
|
@@ -1720,6 +2034,14 @@ type RecordMeta = {
|
|
1720
2034
|
* The record's version. Can be used for optimistic concurrency control.
|
1721
2035
|
*/
|
1722
2036
|
version: number;
|
2037
|
+
/**
|
2038
|
+
* The time when the record was created.
|
2039
|
+
*/
|
2040
|
+
createdAt?: string;
|
2041
|
+
/**
|
2042
|
+
* The time when the record was last updated.
|
2043
|
+
*/
|
2044
|
+
updatedAt?: string;
|
1723
2045
|
/**
|
1724
2046
|
* The record's table name. APIs that return records from multiple tables will set this field accordingly.
|
1725
2047
|
*/
|
@@ -1742,6 +2064,47 @@ type RecordMeta = {
|
|
1742
2064
|
warnings?: string[];
|
1743
2065
|
};
|
1744
2066
|
};
|
2067
|
+
/**
|
2068
|
+
* File metadata
|
2069
|
+
*/
|
2070
|
+
type FileResponse = {
|
2071
|
+
id?: FileItemID;
|
2072
|
+
name: FileName;
|
2073
|
+
mediaType: MediaType;
|
2074
|
+
/**
|
2075
|
+
* @format int64
|
2076
|
+
*/
|
2077
|
+
size: number;
|
2078
|
+
/**
|
2079
|
+
* @format int64
|
2080
|
+
*/
|
2081
|
+
version: number;
|
2082
|
+
attributes?: Record<string, any>;
|
2083
|
+
};
|
2084
|
+
type QueryColumnsProjection = (string | ProjectionConfig)[];
|
2085
|
+
/**
|
2086
|
+
* A structured projection that allows for some configuration.
|
2087
|
+
*/
|
2088
|
+
type ProjectionConfig = {
|
2089
|
+
/**
|
2090
|
+
* 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).
|
2091
|
+
*/
|
2092
|
+
name?: string;
|
2093
|
+
columns?: QueryColumnsProjection;
|
2094
|
+
/**
|
2095
|
+
* An alias for the projected field, this is how it will be returned in the response.
|
2096
|
+
*/
|
2097
|
+
as?: string;
|
2098
|
+
sort?: SortExpression;
|
2099
|
+
/**
|
2100
|
+
* @default 20
|
2101
|
+
*/
|
2102
|
+
limit?: number;
|
2103
|
+
/**
|
2104
|
+
* @default 0
|
2105
|
+
*/
|
2106
|
+
offset?: number;
|
2107
|
+
};
|
1745
2108
|
/**
|
1746
2109
|
* The target expression is used to filter the search results by the target columns.
|
1747
2110
|
*/
|
@@ -1772,7 +2135,7 @@ type ValueBooster$1 = {
|
|
1772
2135
|
*/
|
1773
2136
|
value: string | number | boolean;
|
1774
2137
|
/**
|
1775
|
-
* The factor with which to multiply the
|
2138
|
+
* The factor with which to multiply the added boost.
|
1776
2139
|
*/
|
1777
2140
|
factor: number;
|
1778
2141
|
/**
|
@@ -1814,7 +2177,8 @@ type NumericBooster$1 = {
|
|
1814
2177
|
/**
|
1815
2178
|
* Boost records based on the value of a datetime column. It is configured via "origin", "scale", and "decay". The further away from the "origin",
|
1816
2179
|
* the more the score is decayed. The decay function uses an exponential function. For example if origin is "now", and scale is 10 days and decay is 0.5, it
|
1817
|
-
* should be interpreted as: a record with a date 10 days before/after origin will
|
2180
|
+
* should be interpreted as: a record with a date 10 days before/after origin will be boosted 2 times less than a record with the date at origin.
|
2181
|
+
* The result of the exponential function is a boost between 0 and 1. The "factor" allows you to control how impactful this boost is, by multiplying it with a given value.
|
1818
2182
|
*/
|
1819
2183
|
type DateBooster$1 = {
|
1820
2184
|
/**
|
@@ -1827,7 +2191,7 @@ type DateBooster$1 = {
|
|
1827
2191
|
*/
|
1828
2192
|
origin?: string;
|
1829
2193
|
/**
|
1830
|
-
* The duration at which distance from origin the score is decayed with factor, using an exponential function. It is
|
2194
|
+
* The duration at which distance from origin the score is decayed with factor, using an exponential function. It is formatted as number + units, for example: `5d`, `20m`, `10s`.
|
1831
2195
|
*
|
1832
2196
|
* @pattern ^(\d+)(d|h|m|s|ms)$
|
1833
2197
|
*/
|
@@ -1836,6 +2200,12 @@ type DateBooster$1 = {
|
|
1836
2200
|
* The decay factor to expect at "scale" distance from the "origin".
|
1837
2201
|
*/
|
1838
2202
|
decay: number;
|
2203
|
+
/**
|
2204
|
+
* The factor with which to multiply the added boost.
|
2205
|
+
*
|
2206
|
+
* @minimum 0
|
2207
|
+
*/
|
2208
|
+
factor?: number;
|
1839
2209
|
/**
|
1840
2210
|
* Only apply this booster to the records for which the provided filter matches.
|
1841
2211
|
*/
|
@@ -1856,7 +2226,7 @@ type BoosterExpression = {
|
|
1856
2226
|
/**
|
1857
2227
|
* Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
|
1858
2228
|
* distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
|
1859
|
-
* character typos per word are
|
2229
|
+
* character typos per word are tolerated by search. You can set it to 0 to remove the typo tolerance or set it to 2
|
1860
2230
|
* to allow two typos in a word.
|
1861
2231
|
*
|
1862
2232
|
* @default 1
|
@@ -2003,7 +2373,7 @@ type UniqueCountAgg = {
|
|
2003
2373
|
column: string;
|
2004
2374
|
/**
|
2005
2375
|
* The threshold under which the unique count is exact. If the number of unique
|
2006
|
-
* values in the column is higher than this threshold, the results are
|
2376
|
+
* values in the column is higher than this threshold, the results are approximate.
|
2007
2377
|
* Maximum value is 40,000, default value is 3000.
|
2008
2378
|
*/
|
2009
2379
|
precisionThreshold?: number;
|
@@ -2026,7 +2396,7 @@ type DateHistogramAgg = {
|
|
2026
2396
|
column: string;
|
2027
2397
|
/**
|
2028
2398
|
* The fixed interval to use when bucketing.
|
2029
|
-
* It is
|
2399
|
+
* It is formatted as number + units, for example: `5d`, `20m`, `10s`.
|
2030
2400
|
*
|
2031
2401
|
* @pattern ^(\d+)(d|h|m|s|ms)$
|
2032
2402
|
*/
|
@@ -2081,7 +2451,7 @@ type NumericHistogramAgg = {
|
|
2081
2451
|
interval: number;
|
2082
2452
|
/**
|
2083
2453
|
* By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
|
2084
|
-
* boundaries can be
|
2454
|
+
* boundaries can be shifted by using the offset option. For example, if the `interval` is 100,
|
2085
2455
|
* but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
|
2086
2456
|
* to 50.
|
2087
2457
|
*
|
@@ -2124,6 +2494,24 @@ type AggResponse$1 = (number | null) | {
|
|
2124
2494
|
[key: string]: AggResponse$1;
|
2125
2495
|
})[];
|
2126
2496
|
};
|
2497
|
+
/**
|
2498
|
+
* File identifier in access URLs
|
2499
|
+
*
|
2500
|
+
* @maxLength 296
|
2501
|
+
* @minLength 88
|
2502
|
+
* @pattern [a-v0-9=]+
|
2503
|
+
*/
|
2504
|
+
type FileAccessID = string;
|
2505
|
+
/**
|
2506
|
+
* File signature
|
2507
|
+
*/
|
2508
|
+
type FileSignature = string;
|
2509
|
+
/**
|
2510
|
+
* Xata Table SQL Record
|
2511
|
+
*/
|
2512
|
+
type SQLRecord = {
|
2513
|
+
[key: string]: any;
|
2514
|
+
};
|
2127
2515
|
/**
|
2128
2516
|
* Xata Table Record Metadata
|
2129
2517
|
*/
|
@@ -2169,12 +2557,19 @@ type SchemaCompareResponse = {
|
|
2169
2557
|
target: Schema;
|
2170
2558
|
edits: SchemaEditScript;
|
2171
2559
|
};
|
2560
|
+
type RateLimitError = {
|
2561
|
+
id?: string;
|
2562
|
+
message: string;
|
2563
|
+
};
|
2172
2564
|
type RecordUpdateResponse = XataRecord$1 | {
|
2173
2565
|
id: string;
|
2174
2566
|
xata: {
|
2175
2567
|
version: number;
|
2568
|
+
createdAt: string;
|
2569
|
+
updatedAt: string;
|
2176
2570
|
};
|
2177
2571
|
};
|
2572
|
+
type PutFileResponse = FileResponse;
|
2178
2573
|
type RecordResponse = XataRecord$1;
|
2179
2574
|
type BulkInsertResponse = {
|
2180
2575
|
recordIDs: string[];
|
@@ -2191,13 +2586,17 @@ type QueryResponse = {
|
|
2191
2586
|
records: XataRecord$1[];
|
2192
2587
|
meta: RecordsMetadata;
|
2193
2588
|
};
|
2589
|
+
type ServiceUnavailableError = {
|
2590
|
+
id?: string;
|
2591
|
+
message: string;
|
2592
|
+
};
|
2194
2593
|
type SearchResponse = {
|
2195
2594
|
records: XataRecord$1[];
|
2196
2595
|
warning?: string;
|
2197
|
-
|
2198
|
-
|
2199
|
-
|
2200
|
-
|
2596
|
+
/**
|
2597
|
+
* The total count of records matched. It will be accurately returned up to 10000 records.
|
2598
|
+
*/
|
2599
|
+
totalCount: number;
|
2201
2600
|
};
|
2202
2601
|
type SummarizeResponse = {
|
2203
2602
|
summaries: Record<string, any>[];
|
@@ -2210,6 +2609,10 @@ type AggResponse = {
|
|
2210
2609
|
[key: string]: AggResponse$1;
|
2211
2610
|
};
|
2212
2611
|
};
|
2612
|
+
type SQLResponse = {
|
2613
|
+
records?: SQLRecord[];
|
2614
|
+
warning?: string;
|
2615
|
+
};
|
2213
2616
|
|
2214
2617
|
type DataPlaneFetcherExtraProps = {
|
2215
2618
|
apiUrl: string;
|
@@ -2222,6 +2625,8 @@ type DataPlaneFetcherExtraProps = {
|
|
2222
2625
|
sessionID?: string;
|
2223
2626
|
clientName?: string;
|
2224
2627
|
xataAgentExtra?: Record<string, string>;
|
2628
|
+
rawResponse?: boolean;
|
2629
|
+
headers?: Record<string, unknown>;
|
2225
2630
|
};
|
2226
2631
|
type ErrorWrapper<TError> = TError | {
|
2227
2632
|
status: 'unknown';
|
@@ -3256,6 +3661,18 @@ type PushBranchMigrationsVariables = {
|
|
3256
3661
|
body: PushBranchMigrationsRequestBody;
|
3257
3662
|
pathParams: PushBranchMigrationsPathParams;
|
3258
3663
|
} & DataPlaneFetcherExtraProps;
|
3664
|
+
/**
|
3665
|
+
* The `schema/push` API accepts a list of migrations to be applied to the
|
3666
|
+
* current branch. A list of applicable migrations can be fetched using
|
3667
|
+
* the `schema/history` API from another branch or database.
|
3668
|
+
*
|
3669
|
+
* The most recent migration must be part of the list or referenced (via
|
3670
|
+
* `parentID`) by the first migration in the list of migrations to be pushed.
|
3671
|
+
*
|
3672
|
+
* Each migration in the list has an `id`, `parentID`, and `checksum`. The
|
3673
|
+
* checksum for migrations are generated and verified by xata. The
|
3674
|
+
* operation fails if any migration in the list has an invalid checksum.
|
3675
|
+
*/
|
3259
3676
|
declare const pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3260
3677
|
type CreateTablePathParams = {
|
3261
3678
|
/**
|
@@ -3497,9 +3914,7 @@ type AddTableColumnVariables = {
|
|
3497
3914
|
pathParams: AddTableColumnPathParams;
|
3498
3915
|
} & DataPlaneFetcherExtraProps;
|
3499
3916
|
/**
|
3500
|
-
* Adds a new column to the table. The body of the request should contain the column definition.
|
3501
|
-
* contain the full path separated by dots. If the parent objects do not exists, they will be automatically created. For example,
|
3502
|
-
* passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
|
3917
|
+
* Adds a new column to the table. The body of the request should contain the column definition.
|
3503
3918
|
*/
|
3504
3919
|
declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3505
3920
|
type GetColumnPathParams = {
|
@@ -3532,7 +3947,7 @@ type GetColumnVariables = {
|
|
3532
3947
|
pathParams: GetColumnPathParams;
|
3533
3948
|
} & DataPlaneFetcherExtraProps;
|
3534
3949
|
/**
|
3535
|
-
* Get the definition of a single column.
|
3950
|
+
* Get the definition of a single column.
|
3536
3951
|
*/
|
3537
3952
|
declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
|
3538
3953
|
type UpdateColumnPathParams = {
|
@@ -3572,7 +3987,7 @@ type UpdateColumnVariables = {
|
|
3572
3987
|
pathParams: UpdateColumnPathParams;
|
3573
3988
|
} & DataPlaneFetcherExtraProps;
|
3574
3989
|
/**
|
3575
|
-
* Update column with partial data. Can be used for renaming the column by providing a new "name" field.
|
3990
|
+
* Update column with partial data. Can be used for renaming the column by providing a new "name" field.
|
3576
3991
|
*/
|
3577
3992
|
declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3578
3993
|
type DeleteColumnPathParams = {
|
@@ -3605,7 +4020,7 @@ type DeleteColumnVariables = {
|
|
3605
4020
|
pathParams: DeleteColumnPathParams;
|
3606
4021
|
} & DataPlaneFetcherExtraProps;
|
3607
4022
|
/**
|
3608
|
-
* Deletes the specified column.
|
4023
|
+
* Deletes the specified column.
|
3609
4024
|
*/
|
3610
4025
|
declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3611
4026
|
type BranchTransactionPathParams = {
|
@@ -3625,6 +4040,9 @@ type BranchTransactionError = ErrorWrapper<{
|
|
3625
4040
|
} | {
|
3626
4041
|
status: 404;
|
3627
4042
|
payload: SimpleError;
|
4043
|
+
} | {
|
4044
|
+
status: 429;
|
4045
|
+
payload: RateLimitError;
|
3628
4046
|
}>;
|
3629
4047
|
type BranchTransactionRequestBody = {
|
3630
4048
|
operations: TransactionOperation$1[];
|
@@ -3671,6 +4089,248 @@ type InsertRecordVariables = {
|
|
3671
4089
|
* Insert a new Record into the Table
|
3672
4090
|
*/
|
3673
4091
|
declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
4092
|
+
type GetFileItemPathParams = {
|
4093
|
+
/**
|
4094
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4095
|
+
*/
|
4096
|
+
dbBranchName: DBBranchName;
|
4097
|
+
/**
|
4098
|
+
* The Table name
|
4099
|
+
*/
|
4100
|
+
tableName: TableName;
|
4101
|
+
/**
|
4102
|
+
* The Record name
|
4103
|
+
*/
|
4104
|
+
recordId: RecordID;
|
4105
|
+
/**
|
4106
|
+
* The Column name
|
4107
|
+
*/
|
4108
|
+
columnName: ColumnName;
|
4109
|
+
/**
|
4110
|
+
* The File Identifier
|
4111
|
+
*/
|
4112
|
+
fileId: FileItemID;
|
4113
|
+
workspace: string;
|
4114
|
+
region: string;
|
4115
|
+
};
|
4116
|
+
type GetFileItemError = ErrorWrapper<{
|
4117
|
+
status: 400;
|
4118
|
+
payload: BadRequestError;
|
4119
|
+
} | {
|
4120
|
+
status: 401;
|
4121
|
+
payload: AuthError;
|
4122
|
+
} | {
|
4123
|
+
status: 404;
|
4124
|
+
payload: SimpleError;
|
4125
|
+
}>;
|
4126
|
+
type GetFileItemVariables = {
|
4127
|
+
pathParams: GetFileItemPathParams;
|
4128
|
+
} & DataPlaneFetcherExtraProps;
|
4129
|
+
/**
|
4130
|
+
* Retrieves file content from an array by file ID
|
4131
|
+
*/
|
4132
|
+
declare const getFileItem: (variables: GetFileItemVariables, signal?: AbortSignal) => Promise<Blob>;
|
4133
|
+
type PutFileItemPathParams = {
|
4134
|
+
/**
|
4135
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4136
|
+
*/
|
4137
|
+
dbBranchName: DBBranchName;
|
4138
|
+
/**
|
4139
|
+
* The Table name
|
4140
|
+
*/
|
4141
|
+
tableName: TableName;
|
4142
|
+
/**
|
4143
|
+
* The Record name
|
4144
|
+
*/
|
4145
|
+
recordId: RecordID;
|
4146
|
+
/**
|
4147
|
+
* The Column name
|
4148
|
+
*/
|
4149
|
+
columnName: ColumnName;
|
4150
|
+
/**
|
4151
|
+
* The File Identifier
|
4152
|
+
*/
|
4153
|
+
fileId: FileItemID;
|
4154
|
+
workspace: string;
|
4155
|
+
region: string;
|
4156
|
+
};
|
4157
|
+
type PutFileItemError = ErrorWrapper<{
|
4158
|
+
status: 400;
|
4159
|
+
payload: BadRequestError;
|
4160
|
+
} | {
|
4161
|
+
status: 401;
|
4162
|
+
payload: AuthError;
|
4163
|
+
} | {
|
4164
|
+
status: 404;
|
4165
|
+
payload: SimpleError;
|
4166
|
+
} | {
|
4167
|
+
status: 422;
|
4168
|
+
payload: SimpleError;
|
4169
|
+
}>;
|
4170
|
+
type PutFileItemVariables = {
|
4171
|
+
body?: Blob;
|
4172
|
+
pathParams: PutFileItemPathParams;
|
4173
|
+
} & DataPlaneFetcherExtraProps;
|
4174
|
+
/**
|
4175
|
+
* Uploads the file content to an array given the file ID
|
4176
|
+
*/
|
4177
|
+
declare const putFileItem: (variables: PutFileItemVariables, signal?: AbortSignal) => Promise<FileResponse>;
|
4178
|
+
type DeleteFileItemPathParams = {
|
4179
|
+
/**
|
4180
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4181
|
+
*/
|
4182
|
+
dbBranchName: DBBranchName;
|
4183
|
+
/**
|
4184
|
+
* The Table name
|
4185
|
+
*/
|
4186
|
+
tableName: TableName;
|
4187
|
+
/**
|
4188
|
+
* The Record name
|
4189
|
+
*/
|
4190
|
+
recordId: RecordID;
|
4191
|
+
/**
|
4192
|
+
* The Column name
|
4193
|
+
*/
|
4194
|
+
columnName: ColumnName;
|
4195
|
+
/**
|
4196
|
+
* The File Identifier
|
4197
|
+
*/
|
4198
|
+
fileId: FileItemID;
|
4199
|
+
workspace: string;
|
4200
|
+
region: string;
|
4201
|
+
};
|
4202
|
+
type DeleteFileItemError = ErrorWrapper<{
|
4203
|
+
status: 400;
|
4204
|
+
payload: BadRequestError;
|
4205
|
+
} | {
|
4206
|
+
status: 401;
|
4207
|
+
payload: AuthError;
|
4208
|
+
} | {
|
4209
|
+
status: 404;
|
4210
|
+
payload: SimpleError;
|
4211
|
+
}>;
|
4212
|
+
type DeleteFileItemVariables = {
|
4213
|
+
pathParams: DeleteFileItemPathParams;
|
4214
|
+
} & DataPlaneFetcherExtraProps;
|
4215
|
+
/**
|
4216
|
+
* Deletes an item from an file array column given the file ID
|
4217
|
+
*/
|
4218
|
+
declare const deleteFileItem: (variables: DeleteFileItemVariables, signal?: AbortSignal) => Promise<FileResponse>;
|
4219
|
+
type GetFilePathParams = {
|
4220
|
+
/**
|
4221
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4222
|
+
*/
|
4223
|
+
dbBranchName: DBBranchName;
|
4224
|
+
/**
|
4225
|
+
* The Table name
|
4226
|
+
*/
|
4227
|
+
tableName: TableName;
|
4228
|
+
/**
|
4229
|
+
* The Record name
|
4230
|
+
*/
|
4231
|
+
recordId: RecordID;
|
4232
|
+
/**
|
4233
|
+
* The Column name
|
4234
|
+
*/
|
4235
|
+
columnName: ColumnName;
|
4236
|
+
workspace: string;
|
4237
|
+
region: string;
|
4238
|
+
};
|
4239
|
+
type GetFileError = ErrorWrapper<{
|
4240
|
+
status: 400;
|
4241
|
+
payload: BadRequestError;
|
4242
|
+
} | {
|
4243
|
+
status: 401;
|
4244
|
+
payload: AuthError;
|
4245
|
+
} | {
|
4246
|
+
status: 404;
|
4247
|
+
payload: SimpleError;
|
4248
|
+
}>;
|
4249
|
+
type GetFileVariables = {
|
4250
|
+
pathParams: GetFilePathParams;
|
4251
|
+
} & DataPlaneFetcherExtraProps;
|
4252
|
+
/**
|
4253
|
+
* Retrieves the file content from a file column
|
4254
|
+
*/
|
4255
|
+
declare const getFile: (variables: GetFileVariables, signal?: AbortSignal) => Promise<Blob>;
|
4256
|
+
type PutFilePathParams = {
|
4257
|
+
/**
|
4258
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4259
|
+
*/
|
4260
|
+
dbBranchName: DBBranchName;
|
4261
|
+
/**
|
4262
|
+
* The Table name
|
4263
|
+
*/
|
4264
|
+
tableName: TableName;
|
4265
|
+
/**
|
4266
|
+
* The Record name
|
4267
|
+
*/
|
4268
|
+
recordId: RecordID;
|
4269
|
+
/**
|
4270
|
+
* The Column name
|
4271
|
+
*/
|
4272
|
+
columnName: ColumnName;
|
4273
|
+
workspace: string;
|
4274
|
+
region: string;
|
4275
|
+
};
|
4276
|
+
type PutFileError = ErrorWrapper<{
|
4277
|
+
status: 400;
|
4278
|
+
payload: BadRequestError;
|
4279
|
+
} | {
|
4280
|
+
status: 401;
|
4281
|
+
payload: AuthError;
|
4282
|
+
} | {
|
4283
|
+
status: 404;
|
4284
|
+
payload: SimpleError;
|
4285
|
+
} | {
|
4286
|
+
status: 422;
|
4287
|
+
payload: SimpleError;
|
4288
|
+
}>;
|
4289
|
+
type PutFileVariables = {
|
4290
|
+
body?: Blob;
|
4291
|
+
pathParams: PutFilePathParams;
|
4292
|
+
} & DataPlaneFetcherExtraProps;
|
4293
|
+
/**
|
4294
|
+
* Uploads the file content to the given file column
|
4295
|
+
*/
|
4296
|
+
declare const putFile: (variables: PutFileVariables, signal?: AbortSignal) => Promise<FileResponse>;
|
4297
|
+
type DeleteFilePathParams = {
|
4298
|
+
/**
|
4299
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4300
|
+
*/
|
4301
|
+
dbBranchName: DBBranchName;
|
4302
|
+
/**
|
4303
|
+
* The Table name
|
4304
|
+
*/
|
4305
|
+
tableName: TableName;
|
4306
|
+
/**
|
4307
|
+
* The Record name
|
4308
|
+
*/
|
4309
|
+
recordId: RecordID;
|
4310
|
+
/**
|
4311
|
+
* The Column name
|
4312
|
+
*/
|
4313
|
+
columnName: ColumnName;
|
4314
|
+
workspace: string;
|
4315
|
+
region: string;
|
4316
|
+
};
|
4317
|
+
type DeleteFileError = ErrorWrapper<{
|
4318
|
+
status: 400;
|
4319
|
+
payload: BadRequestError;
|
4320
|
+
} | {
|
4321
|
+
status: 401;
|
4322
|
+
payload: AuthError;
|
4323
|
+
} | {
|
4324
|
+
status: 404;
|
4325
|
+
payload: SimpleError;
|
4326
|
+
}>;
|
4327
|
+
type DeleteFileVariables = {
|
4328
|
+
pathParams: DeleteFilePathParams;
|
4329
|
+
} & DataPlaneFetcherExtraProps;
|
4330
|
+
/**
|
4331
|
+
* Deletes a file referred in a file column
|
4332
|
+
*/
|
4333
|
+
declare const deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal) => Promise<FileResponse>;
|
3674
4334
|
type GetRecordPathParams = {
|
3675
4335
|
/**
|
3676
4336
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -3942,12 +4602,15 @@ type QueryTableError = ErrorWrapper<{
|
|
3942
4602
|
} | {
|
3943
4603
|
status: 404;
|
3944
4604
|
payload: SimpleError;
|
4605
|
+
} | {
|
4606
|
+
status: 503;
|
4607
|
+
payload: ServiceUnavailableError;
|
3945
4608
|
}>;
|
3946
4609
|
type QueryTableRequestBody = {
|
3947
4610
|
filter?: FilterExpression;
|
3948
4611
|
sort?: SortExpression;
|
3949
4612
|
page?: PageConfig;
|
3950
|
-
columns?:
|
4613
|
+
columns?: QueryColumnsProjection;
|
3951
4614
|
/**
|
3952
4615
|
* The consistency level for this request.
|
3953
4616
|
*
|
@@ -4644,23 +5307,7 @@ type QueryTableVariables = {
|
|
4644
5307
|
*
|
4645
5308
|
* ### Pagination
|
4646
5309
|
*
|
4647
|
-
* We offer cursor pagination and offset pagination.
|
4648
|
-
* cursor pagination is needed in order to retrieve all of their results. The offset pagination method is limited to 1000 records.
|
4649
|
-
*
|
4650
|
-
* Example of size + offset pagination:
|
4651
|
-
*
|
4652
|
-
* ```json
|
4653
|
-
* POST /db/demo:main/tables/table/query
|
4654
|
-
* {
|
4655
|
-
* "page": {
|
4656
|
-
* "size": 100,
|
4657
|
-
* "offset": 200
|
4658
|
-
* }
|
4659
|
-
* }
|
4660
|
-
* ```
|
4661
|
-
*
|
4662
|
-
* The `page.size` parameter represents the maximum number of records returned by this query. It has a default value of 20 and a maximum value of 200.
|
4663
|
-
* The `page.offset` parameter represents the number of matching records to skip. It has a default value of 0 and a maximum value of 800.
|
5310
|
+
* We offer cursor pagination and offset pagination. The cursor pagination method can be used for sequential scrolling with unrestricted depth. The offset pagination can be used to skip pages and is limited to 1000 records.
|
4664
5311
|
*
|
4665
5312
|
* Example of cursor pagination:
|
4666
5313
|
*
|
@@ -4714,6 +5361,34 @@ type QueryTableVariables = {
|
|
4714
5361
|
* `filter` or `sort` is set. The columns returned and page size can be changed
|
4715
5362
|
* anytime by passing the `columns` or `page.size` settings to the next query.
|
4716
5363
|
*
|
5364
|
+
* In the following example of size + offset pagination we retrieve the third page of up to 100 results:
|
5365
|
+
*
|
5366
|
+
* ```json
|
5367
|
+
* POST /db/demo:main/tables/table/query
|
5368
|
+
* {
|
5369
|
+
* "page": {
|
5370
|
+
* "size": 100,
|
5371
|
+
* "offset": 200
|
5372
|
+
* }
|
5373
|
+
* }
|
5374
|
+
* ```
|
5375
|
+
*
|
5376
|
+
* The `page.size` parameter represents the maximum number of records returned by this query. It has a default value of 20 and a maximum value of 200.
|
5377
|
+
* The `page.offset` parameter represents the number of matching records to skip. It has a default value of 0 and a maximum value of 800.
|
5378
|
+
*
|
5379
|
+
* Cursor pagination also works in combination with offset pagination. For example, starting from a specific cursor position, using a page size of 200 and an offset of 800, you can skip up to 5 pages of 200 records forwards or backwards from the cursor's position:
|
5380
|
+
*
|
5381
|
+
* ```json
|
5382
|
+
* POST /db/demo:main/tables/table/query
|
5383
|
+
* {
|
5384
|
+
* "page": {
|
5385
|
+
* "size": 200,
|
5386
|
+
* "offset": 800,
|
5387
|
+
* "after": "fMoxCsIwFIDh3WP8c4amDai5hO5SJCRNfaVSeC9b6d1FD"
|
5388
|
+
* }
|
5389
|
+
* }
|
5390
|
+
* ```
|
5391
|
+
*
|
4717
5392
|
* **Special cursors:**
|
4718
5393
|
*
|
4719
5394
|
* - `page.after=end`: Result points past the last entry. The list of records
|
@@ -4764,6 +5439,9 @@ type SearchBranchError = ErrorWrapper<{
|
|
4764
5439
|
} | {
|
4765
5440
|
status: 404;
|
4766
5441
|
payload: SimpleError;
|
5442
|
+
} | {
|
5443
|
+
status: 503;
|
5444
|
+
payload: ServiceUnavailableError;
|
4767
5445
|
}>;
|
4768
5446
|
type SearchBranchRequestBody = {
|
4769
5447
|
/**
|
@@ -4842,50 +5520,10 @@ type SearchTableVariables = {
|
|
4842
5520
|
* Run a free text search operation in a particular table.
|
4843
5521
|
*
|
4844
5522
|
* The endpoint accepts a `query` parameter that is used for the free text search and a set of structured filters (via the `filter` parameter) that are applied before the search. The `filter` parameter uses the same syntax as the [query endpoint](/api-reference/db/db_branch_name/tables/table_name/) with the following exceptions:
|
4845
|
-
* * filters `$contains`, `$startsWith`, `$endsWith` don't work on columns of type `text`
|
4846
|
-
* * filtering on columns of type `multiple` is currently unsupported
|
4847
|
-
*/
|
4848
|
-
declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
4849
|
-
type SqlQueryPathParams = {
|
4850
|
-
/**
|
4851
|
-
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4852
|
-
*/
|
4853
|
-
dbBranchName: DBBranchName;
|
4854
|
-
workspace: string;
|
4855
|
-
region: string;
|
4856
|
-
};
|
4857
|
-
type SqlQueryError = ErrorWrapper<{
|
4858
|
-
status: 400;
|
4859
|
-
payload: BadRequestError;
|
4860
|
-
} | {
|
4861
|
-
status: 401;
|
4862
|
-
payload: AuthError;
|
4863
|
-
} | {
|
4864
|
-
status: 404;
|
4865
|
-
payload: SimpleError;
|
4866
|
-
}>;
|
4867
|
-
type SqlQueryRequestBody = {
|
4868
|
-
/**
|
4869
|
-
* The query string.
|
4870
|
-
*
|
4871
|
-
* @minLength 1
|
4872
|
-
*/
|
4873
|
-
query: string;
|
4874
|
-
/**
|
4875
|
-
* The consistency level for this request.
|
4876
|
-
*
|
4877
|
-
* @default strong
|
4878
|
-
*/
|
4879
|
-
consistency?: 'strong' | 'eventual';
|
4880
|
-
};
|
4881
|
-
type SqlQueryVariables = {
|
4882
|
-
body: SqlQueryRequestBody;
|
4883
|
-
pathParams: SqlQueryPathParams;
|
4884
|
-
} & DataPlaneFetcherExtraProps;
|
4885
|
-
/**
|
4886
|
-
* Run an SQL query across the database branch.
|
5523
|
+
* * filters `$contains`, `$startsWith`, `$endsWith` don't work on columns of type `text`
|
5524
|
+
* * filtering on columns of type `multiple` is currently unsupported
|
4887
5525
|
*/
|
4888
|
-
declare const
|
5526
|
+
declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
4889
5527
|
type VectorSearchTablePathParams = {
|
4890
5528
|
/**
|
4891
5529
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -4975,7 +5613,11 @@ type AskTableResponse = {
|
|
4975
5613
|
/**
|
4976
5614
|
* The answer to the input question
|
4977
5615
|
*/
|
4978
|
-
answer
|
5616
|
+
answer: string;
|
5617
|
+
/**
|
5618
|
+
* The session ID for the chat session.
|
5619
|
+
*/
|
5620
|
+
sessionId: string;
|
4979
5621
|
};
|
4980
5622
|
type AskTableRequestBody = {
|
4981
5623
|
/**
|
@@ -5030,6 +5672,61 @@ type AskTableVariables = {
|
|
5030
5672
|
* Ask your table a question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
|
5031
5673
|
*/
|
5032
5674
|
declare const askTable: (variables: AskTableVariables, signal?: AbortSignal) => Promise<AskTableResponse>;
|
5675
|
+
type AskTableSessionPathParams = {
|
5676
|
+
/**
|
5677
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
5678
|
+
*/
|
5679
|
+
dbBranchName: DBBranchName;
|
5680
|
+
/**
|
5681
|
+
* The Table name
|
5682
|
+
*/
|
5683
|
+
tableName: TableName;
|
5684
|
+
/**
|
5685
|
+
* @maxLength 36
|
5686
|
+
* @minLength 36
|
5687
|
+
*/
|
5688
|
+
sessionId: string;
|
5689
|
+
workspace: string;
|
5690
|
+
region: string;
|
5691
|
+
};
|
5692
|
+
type AskTableSessionError = ErrorWrapper<{
|
5693
|
+
status: 400;
|
5694
|
+
payload: BadRequestError;
|
5695
|
+
} | {
|
5696
|
+
status: 401;
|
5697
|
+
payload: AuthError;
|
5698
|
+
} | {
|
5699
|
+
status: 404;
|
5700
|
+
payload: SimpleError;
|
5701
|
+
} | {
|
5702
|
+
status: 429;
|
5703
|
+
payload: RateLimitError;
|
5704
|
+
} | {
|
5705
|
+
status: 503;
|
5706
|
+
payload: ServiceUnavailableError;
|
5707
|
+
}>;
|
5708
|
+
type AskTableSessionResponse = {
|
5709
|
+
/**
|
5710
|
+
* The answer to the input question
|
5711
|
+
*/
|
5712
|
+
answer: string;
|
5713
|
+
};
|
5714
|
+
type AskTableSessionRequestBody = {
|
5715
|
+
/**
|
5716
|
+
* The question you'd like to ask.
|
5717
|
+
*
|
5718
|
+
* @minLength 3
|
5719
|
+
*/
|
5720
|
+
message?: string;
|
5721
|
+
};
|
5722
|
+
type AskTableSessionVariables = {
|
5723
|
+
body?: AskTableSessionRequestBody;
|
5724
|
+
pathParams: AskTableSessionPathParams;
|
5725
|
+
} & DataPlaneFetcherExtraProps;
|
5726
|
+
/**
|
5727
|
+
* Ask a follow-up question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
|
5728
|
+
*/
|
5729
|
+
declare const askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal) => Promise<AskTableSessionResponse>;
|
5033
5730
|
type SummarizeTablePathParams = {
|
5034
5731
|
/**
|
5035
5732
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -5186,6 +5883,85 @@ type AggregateTableVariables = {
|
|
5186
5883
|
* For usage, see the [API Guide](https://xata.io/docs/api-guide/aggregate).
|
5187
5884
|
*/
|
5188
5885
|
declare const aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
|
5886
|
+
type FileAccessPathParams = {
|
5887
|
+
/**
|
5888
|
+
* The File Access Identifier
|
5889
|
+
*/
|
5890
|
+
fileId: FileAccessID;
|
5891
|
+
workspace: string;
|
5892
|
+
region: string;
|
5893
|
+
};
|
5894
|
+
type FileAccessQueryParams = {
|
5895
|
+
/**
|
5896
|
+
* File access signature
|
5897
|
+
*/
|
5898
|
+
verify?: FileSignature;
|
5899
|
+
};
|
5900
|
+
type FileAccessError = ErrorWrapper<{
|
5901
|
+
status: 400;
|
5902
|
+
payload: BadRequestError;
|
5903
|
+
} | {
|
5904
|
+
status: 401;
|
5905
|
+
payload: AuthError;
|
5906
|
+
} | {
|
5907
|
+
status: 404;
|
5908
|
+
payload: SimpleError;
|
5909
|
+
}>;
|
5910
|
+
type FileAccessVariables = {
|
5911
|
+
pathParams: FileAccessPathParams;
|
5912
|
+
queryParams?: FileAccessQueryParams;
|
5913
|
+
} & DataPlaneFetcherExtraProps;
|
5914
|
+
/**
|
5915
|
+
* Retrieve file content by access id
|
5916
|
+
*/
|
5917
|
+
declare const fileAccess: (variables: FileAccessVariables, signal?: AbortSignal) => Promise<Blob>;
|
5918
|
+
type SqlQueryPathParams = {
|
5919
|
+
/**
|
5920
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
5921
|
+
*/
|
5922
|
+
dbBranchName: DBBranchName;
|
5923
|
+
workspace: string;
|
5924
|
+
region: string;
|
5925
|
+
};
|
5926
|
+
type SqlQueryError = ErrorWrapper<{
|
5927
|
+
status: 400;
|
5928
|
+
payload: BadRequestError;
|
5929
|
+
} | {
|
5930
|
+
status: 401;
|
5931
|
+
payload: AuthError;
|
5932
|
+
} | {
|
5933
|
+
status: 404;
|
5934
|
+
payload: SimpleError;
|
5935
|
+
} | {
|
5936
|
+
status: 503;
|
5937
|
+
payload: ServiceUnavailableError;
|
5938
|
+
}>;
|
5939
|
+
type SqlQueryRequestBody = {
|
5940
|
+
/**
|
5941
|
+
* The SQL statement.
|
5942
|
+
*
|
5943
|
+
* @minLength 1
|
5944
|
+
*/
|
5945
|
+
statement: string;
|
5946
|
+
/**
|
5947
|
+
* The query parameter list.
|
5948
|
+
*/
|
5949
|
+
params?: any[] | null;
|
5950
|
+
/**
|
5951
|
+
* The consistency level for this request.
|
5952
|
+
*
|
5953
|
+
* @default strong
|
5954
|
+
*/
|
5955
|
+
consistency?: 'strong' | 'eventual';
|
5956
|
+
};
|
5957
|
+
type SqlQueryVariables = {
|
5958
|
+
body: SqlQueryRequestBody;
|
5959
|
+
pathParams: SqlQueryPathParams;
|
5960
|
+
} & DataPlaneFetcherExtraProps;
|
5961
|
+
/**
|
5962
|
+
* Run an SQL query across the database branch.
|
5963
|
+
*/
|
5964
|
+
declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<SQLResponse>;
|
5189
5965
|
|
5190
5966
|
declare const operationsByTag: {
|
5191
5967
|
branch: {
|
@@ -5246,16 +6022,37 @@ declare const operationsByTag: {
|
|
5246
6022
|
updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
|
5247
6023
|
deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
|
5248
6024
|
};
|
6025
|
+
files: {
|
6026
|
+
getFileItem: (variables: GetFileItemVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
|
6027
|
+
putFileItem: (variables: PutFileItemVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
|
6028
|
+
deleteFileItem: (variables: DeleteFileItemVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
|
6029
|
+
getFile: (variables: GetFileVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
|
6030
|
+
putFile: (variables: PutFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
|
6031
|
+
deleteFile: (variables: DeleteFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
|
6032
|
+
fileAccess: (variables: FileAccessVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
|
6033
|
+
};
|
5249
6034
|
searchAndFilter: {
|
5250
6035
|
queryTable: (variables: QueryTableVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
|
5251
6036
|
searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
|
5252
6037
|
searchTable: (variables: SearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
|
5253
|
-
sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
|
5254
6038
|
vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
|
5255
6039
|
askTable: (variables: AskTableVariables, signal?: AbortSignal | undefined) => Promise<AskTableResponse>;
|
6040
|
+
askTableSession: (variables: AskTableSessionVariables, signal?: AbortSignal | undefined) => Promise<AskTableSessionResponse>;
|
5256
6041
|
summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal | undefined) => Promise<SummarizeResponse>;
|
5257
6042
|
aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal | undefined) => Promise<AggResponse>;
|
5258
6043
|
};
|
6044
|
+
sql: {
|
6045
|
+
sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal | undefined) => Promise<SQLResponse>;
|
6046
|
+
};
|
6047
|
+
oAuth: {
|
6048
|
+
getAuthorizationCode: (variables: GetAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<AuthorizationCodeResponse>;
|
6049
|
+
grantAuthorizationCode: (variables: GrantAuthorizationCodeVariables, signal?: AbortSignal | undefined) => Promise<AuthorizationCodeResponse>;
|
6050
|
+
getUserOAuthClients: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserOAuthClientsResponse>;
|
6051
|
+
deleteUserOAuthClient: (variables: DeleteUserOAuthClientVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
6052
|
+
getUserOAuthAccessTokens: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<GetUserOAuthAccessTokensResponse>;
|
6053
|
+
deleteOAuthAccessToken: (variables: DeleteOAuthAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
6054
|
+
updateOAuthAccessToken: (variables: UpdateOAuthAccessTokenVariables, signal?: AbortSignal | undefined) => Promise<OAuthAccessToken>;
|
6055
|
+
};
|
5259
6056
|
users: {
|
5260
6057
|
getUser: (variables: ControlPlaneFetcherExtraProps, signal?: AbortSignal | undefined) => Promise<UserWithID>;
|
5261
6058
|
updateUser: (variables: UpdateUserVariables, signal?: AbortSignal | undefined) => Promise<UserWithID>;
|
@@ -5289,6 +6086,7 @@ declare const operationsByTag: {
|
|
5289
6086
|
deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DeleteDatabaseResponse>;
|
5290
6087
|
getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
|
5291
6088
|
updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
|
6089
|
+
renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
|
5292
6090
|
getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
|
5293
6091
|
updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
|
5294
6092
|
deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
@@ -5318,38 +6116,28 @@ type responses_BadRequestError = BadRequestError;
|
|
5318
6116
|
type responses_BranchMigrationPlan = BranchMigrationPlan;
|
5319
6117
|
type responses_BulkError = BulkError;
|
5320
6118
|
type responses_BulkInsertResponse = BulkInsertResponse;
|
6119
|
+
type responses_PutFileResponse = PutFileResponse;
|
5321
6120
|
type responses_QueryResponse = QueryResponse;
|
5322
6121
|
type responses_RateLimitError = RateLimitError;
|
5323
6122
|
type responses_RecordResponse = RecordResponse;
|
5324
6123
|
type responses_RecordUpdateResponse = RecordUpdateResponse;
|
6124
|
+
type responses_SQLResponse = SQLResponse;
|
5325
6125
|
type responses_SchemaCompareResponse = SchemaCompareResponse;
|
5326
6126
|
type responses_SchemaUpdateResponse = SchemaUpdateResponse;
|
5327
6127
|
type responses_SearchResponse = SearchResponse;
|
6128
|
+
type responses_ServiceUnavailableError = ServiceUnavailableError;
|
5328
6129
|
type responses_SimpleError = SimpleError;
|
5329
6130
|
type responses_SummarizeResponse = SummarizeResponse;
|
5330
6131
|
declare namespace responses {
|
5331
|
-
export {
|
5332
|
-
responses_AggResponse as AggResponse,
|
5333
|
-
responses_AuthError as AuthError,
|
5334
|
-
responses_BadRequestError as BadRequestError,
|
5335
|
-
responses_BranchMigrationPlan as BranchMigrationPlan,
|
5336
|
-
responses_BulkError as BulkError,
|
5337
|
-
responses_BulkInsertResponse as BulkInsertResponse,
|
5338
|
-
responses_QueryResponse as QueryResponse,
|
5339
|
-
responses_RateLimitError as RateLimitError,
|
5340
|
-
responses_RecordResponse as RecordResponse,
|
5341
|
-
responses_RecordUpdateResponse as RecordUpdateResponse,
|
5342
|
-
responses_SchemaCompareResponse as SchemaCompareResponse,
|
5343
|
-
responses_SchemaUpdateResponse as SchemaUpdateResponse,
|
5344
|
-
responses_SearchResponse as SearchResponse,
|
5345
|
-
responses_SimpleError as SimpleError,
|
5346
|
-
responses_SummarizeResponse as SummarizeResponse,
|
5347
|
-
};
|
6132
|
+
export type { responses_AggResponse as AggResponse, responses_AuthError as AuthError, responses_BadRequestError as BadRequestError, responses_BranchMigrationPlan as BranchMigrationPlan, responses_BulkError as BulkError, responses_BulkInsertResponse as BulkInsertResponse, responses_PutFileResponse as PutFileResponse, responses_QueryResponse as QueryResponse, responses_RateLimitError as RateLimitError, responses_RecordResponse as RecordResponse, responses_RecordUpdateResponse as RecordUpdateResponse, responses_SQLResponse as SQLResponse, responses_SchemaCompareResponse as SchemaCompareResponse, responses_SchemaUpdateResponse as SchemaUpdateResponse, responses_SearchResponse as SearchResponse, responses_ServiceUnavailableError as ServiceUnavailableError, responses_SimpleError as SimpleError, responses_SummarizeResponse as SummarizeResponse };
|
5348
6133
|
}
|
5349
6134
|
|
5350
6135
|
type schemas_APIKeyName = APIKeyName;
|
6136
|
+
type schemas_AccessToken = AccessToken;
|
5351
6137
|
type schemas_AggExpression = AggExpression;
|
5352
6138
|
type schemas_AggExpressionMap = AggExpressionMap;
|
6139
|
+
type schemas_AuthorizationCodeRequest = AuthorizationCodeRequest;
|
6140
|
+
type schemas_AuthorizationCodeResponse = AuthorizationCodeResponse;
|
5353
6141
|
type schemas_AverageAgg = AverageAgg;
|
5354
6142
|
type schemas_BoosterExpression = BoosterExpression;
|
5355
6143
|
type schemas_Branch = Branch;
|
@@ -5359,6 +6147,7 @@ type schemas_BranchName = BranchName;
|
|
5359
6147
|
type schemas_BranchOp = BranchOp;
|
5360
6148
|
type schemas_BranchWithCopyID = BranchWithCopyID;
|
5361
6149
|
type schemas_Column = Column;
|
6150
|
+
type schemas_ColumnFile = ColumnFile;
|
5362
6151
|
type schemas_ColumnLink = ColumnLink;
|
5363
6152
|
type schemas_ColumnMigration = ColumnMigration;
|
5364
6153
|
type schemas_ColumnName = ColumnName;
|
@@ -5377,6 +6166,11 @@ type schemas_DatabaseGithubSettings = DatabaseGithubSettings;
|
|
5377
6166
|
type schemas_DatabaseMetadata = DatabaseMetadata;
|
5378
6167
|
type schemas_DateHistogramAgg = DateHistogramAgg;
|
5379
6168
|
type schemas_DateTime = DateTime;
|
6169
|
+
type schemas_FileAccessID = FileAccessID;
|
6170
|
+
type schemas_FileItemID = FileItemID;
|
6171
|
+
type schemas_FileName = FileName;
|
6172
|
+
type schemas_FileResponse = FileResponse;
|
6173
|
+
type schemas_FileSignature = FileSignature;
|
5380
6174
|
type schemas_FilterColumn = FilterColumn;
|
5381
6175
|
type schemas_FilterColumnIncludes = FilterColumnIncludes;
|
5382
6176
|
type schemas_FilterExpression = FilterExpression;
|
@@ -5388,6 +6182,7 @@ type schemas_FilterRangeValue = FilterRangeValue;
|
|
5388
6182
|
type schemas_FilterValue = FilterValue;
|
5389
6183
|
type schemas_FuzzinessExpression = FuzzinessExpression;
|
5390
6184
|
type schemas_HighlightExpression = HighlightExpression;
|
6185
|
+
type schemas_InputFile = InputFile;
|
5391
6186
|
type schemas_InputFileArray = InputFileArray;
|
5392
6187
|
type schemas_InputFileEntry = InputFileEntry;
|
5393
6188
|
type schemas_InviteID = InviteID;
|
@@ -5397,6 +6192,7 @@ type schemas_ListDatabasesResponse = ListDatabasesResponse;
|
|
5397
6192
|
type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
|
5398
6193
|
type schemas_ListRegionsResponse = ListRegionsResponse;
|
5399
6194
|
type schemas_MaxAgg = MaxAgg;
|
6195
|
+
type schemas_MediaType = MediaType;
|
5400
6196
|
type schemas_MetricsDatapoint = MetricsDatapoint;
|
5401
6197
|
type schemas_MetricsLatency = MetricsLatency;
|
5402
6198
|
type schemas_Migration = Migration;
|
@@ -5409,15 +6205,23 @@ type schemas_MigrationStatus = MigrationStatus;
|
|
5409
6205
|
type schemas_MigrationTableOp = MigrationTableOp;
|
5410
6206
|
type schemas_MinAgg = MinAgg;
|
5411
6207
|
type schemas_NumericHistogramAgg = NumericHistogramAgg;
|
6208
|
+
type schemas_OAuthAccessToken = OAuthAccessToken;
|
6209
|
+
type schemas_OAuthClientID = OAuthClientID;
|
6210
|
+
type schemas_OAuthClientPublicDetails = OAuthClientPublicDetails;
|
6211
|
+
type schemas_OAuthResponseType = OAuthResponseType;
|
6212
|
+
type schemas_OAuthScope = OAuthScope;
|
5412
6213
|
type schemas_ObjectValue = ObjectValue;
|
5413
6214
|
type schemas_PageConfig = PageConfig;
|
5414
6215
|
type schemas_PrefixExpression = PrefixExpression;
|
6216
|
+
type schemas_ProjectionConfig = ProjectionConfig;
|
6217
|
+
type schemas_QueryColumnsProjection = QueryColumnsProjection;
|
5415
6218
|
type schemas_RecordID = RecordID;
|
5416
6219
|
type schemas_RecordMeta = RecordMeta;
|
5417
6220
|
type schemas_RecordsMetadata = RecordsMetadata;
|
5418
6221
|
type schemas_Region = Region;
|
5419
6222
|
type schemas_RevLink = RevLink;
|
5420
6223
|
type schemas_Role = Role;
|
6224
|
+
type schemas_SQLRecord = SQLRecord;
|
5421
6225
|
type schemas_Schema = Schema;
|
5422
6226
|
type schemas_SchemaEditScript = SchemaEditScript;
|
5423
6227
|
type schemas_SearchPageConfig = SearchPageConfig;
|
@@ -5439,9 +6243,11 @@ type schemas_TopValuesAgg = TopValuesAgg;
|
|
5439
6243
|
type schemas_TransactionDeleteOp = TransactionDeleteOp;
|
5440
6244
|
type schemas_TransactionError = TransactionError;
|
5441
6245
|
type schemas_TransactionFailure = TransactionFailure;
|
6246
|
+
type schemas_TransactionGetOp = TransactionGetOp;
|
5442
6247
|
type schemas_TransactionInsertOp = TransactionInsertOp;
|
5443
6248
|
type schemas_TransactionResultColumns = TransactionResultColumns;
|
5444
6249
|
type schemas_TransactionResultDelete = TransactionResultDelete;
|
6250
|
+
type schemas_TransactionResultGet = TransactionResultGet;
|
5445
6251
|
type schemas_TransactionResultInsert = TransactionResultInsert;
|
5446
6252
|
type schemas_TransactionResultUpdate = TransactionResultUpdate;
|
5447
6253
|
type schemas_TransactionSuccess = TransactionSuccess;
|
@@ -5457,123 +6263,7 @@ type schemas_WorkspaceMember = WorkspaceMember;
|
|
5457
6263
|
type schemas_WorkspaceMembers = WorkspaceMembers;
|
5458
6264
|
type schemas_WorkspaceMeta = WorkspaceMeta;
|
5459
6265
|
declare namespace schemas {
|
5460
|
-
export {
|
5461
|
-
schemas_APIKeyName as APIKeyName,
|
5462
|
-
schemas_AggExpression as AggExpression,
|
5463
|
-
schemas_AggExpressionMap as AggExpressionMap,
|
5464
|
-
AggResponse$1 as AggResponse,
|
5465
|
-
schemas_AverageAgg as AverageAgg,
|
5466
|
-
schemas_BoosterExpression as BoosterExpression,
|
5467
|
-
schemas_Branch as Branch,
|
5468
|
-
schemas_BranchMetadata as BranchMetadata,
|
5469
|
-
schemas_BranchMigration as BranchMigration,
|
5470
|
-
schemas_BranchName as BranchName,
|
5471
|
-
schemas_BranchOp as BranchOp,
|
5472
|
-
schemas_BranchWithCopyID as BranchWithCopyID,
|
5473
|
-
schemas_Column as Column,
|
5474
|
-
schemas_ColumnLink as ColumnLink,
|
5475
|
-
schemas_ColumnMigration as ColumnMigration,
|
5476
|
-
schemas_ColumnName as ColumnName,
|
5477
|
-
schemas_ColumnOpAdd as ColumnOpAdd,
|
5478
|
-
schemas_ColumnOpRemove as ColumnOpRemove,
|
5479
|
-
schemas_ColumnOpRename as ColumnOpRename,
|
5480
|
-
schemas_ColumnVector as ColumnVector,
|
5481
|
-
schemas_ColumnsProjection as ColumnsProjection,
|
5482
|
-
schemas_Commit as Commit,
|
5483
|
-
schemas_CountAgg as CountAgg,
|
5484
|
-
schemas_DBBranch as DBBranch,
|
5485
|
-
schemas_DBBranchName as DBBranchName,
|
5486
|
-
schemas_DBName as DBName,
|
5487
|
-
schemas_DataInputRecord as DataInputRecord,
|
5488
|
-
schemas_DatabaseGithubSettings as DatabaseGithubSettings,
|
5489
|
-
schemas_DatabaseMetadata as DatabaseMetadata,
|
5490
|
-
DateBooster$1 as DateBooster,
|
5491
|
-
schemas_DateHistogramAgg as DateHistogramAgg,
|
5492
|
-
schemas_DateTime as DateTime,
|
5493
|
-
schemas_FilterColumn as FilterColumn,
|
5494
|
-
schemas_FilterColumnIncludes as FilterColumnIncludes,
|
5495
|
-
schemas_FilterExpression as FilterExpression,
|
5496
|
-
schemas_FilterList as FilterList,
|
5497
|
-
schemas_FilterPredicate as FilterPredicate,
|
5498
|
-
schemas_FilterPredicateOp as FilterPredicateOp,
|
5499
|
-
schemas_FilterPredicateRangeOp as FilterPredicateRangeOp,
|
5500
|
-
schemas_FilterRangeValue as FilterRangeValue,
|
5501
|
-
schemas_FilterValue as FilterValue,
|
5502
|
-
schemas_FuzzinessExpression as FuzzinessExpression,
|
5503
|
-
schemas_HighlightExpression as HighlightExpression,
|
5504
|
-
schemas_InputFileArray as InputFileArray,
|
5505
|
-
schemas_InputFileEntry as InputFileEntry,
|
5506
|
-
schemas_InviteID as InviteID,
|
5507
|
-
schemas_InviteKey as InviteKey,
|
5508
|
-
schemas_ListBranchesResponse as ListBranchesResponse,
|
5509
|
-
schemas_ListDatabasesResponse as ListDatabasesResponse,
|
5510
|
-
schemas_ListGitBranchesResponse as ListGitBranchesResponse,
|
5511
|
-
schemas_ListRegionsResponse as ListRegionsResponse,
|
5512
|
-
schemas_MaxAgg as MaxAgg,
|
5513
|
-
schemas_MetricsDatapoint as MetricsDatapoint,
|
5514
|
-
schemas_MetricsLatency as MetricsLatency,
|
5515
|
-
schemas_Migration as Migration,
|
5516
|
-
schemas_MigrationColumnOp as MigrationColumnOp,
|
5517
|
-
schemas_MigrationObject as MigrationObject,
|
5518
|
-
schemas_MigrationOp as MigrationOp,
|
5519
|
-
schemas_MigrationRequest as MigrationRequest,
|
5520
|
-
schemas_MigrationRequestNumber as MigrationRequestNumber,
|
5521
|
-
schemas_MigrationStatus as MigrationStatus,
|
5522
|
-
schemas_MigrationTableOp as MigrationTableOp,
|
5523
|
-
schemas_MinAgg as MinAgg,
|
5524
|
-
NumericBooster$1 as NumericBooster,
|
5525
|
-
schemas_NumericHistogramAgg as NumericHistogramAgg,
|
5526
|
-
schemas_ObjectValue as ObjectValue,
|
5527
|
-
schemas_PageConfig as PageConfig,
|
5528
|
-
schemas_PrefixExpression as PrefixExpression,
|
5529
|
-
schemas_RecordID as RecordID,
|
5530
|
-
schemas_RecordMeta as RecordMeta,
|
5531
|
-
schemas_RecordsMetadata as RecordsMetadata,
|
5532
|
-
schemas_Region as Region,
|
5533
|
-
schemas_RevLink as RevLink,
|
5534
|
-
schemas_Role as Role,
|
5535
|
-
schemas_Schema as Schema,
|
5536
|
-
schemas_SchemaEditScript as SchemaEditScript,
|
5537
|
-
schemas_SearchPageConfig as SearchPageConfig,
|
5538
|
-
schemas_SortExpression as SortExpression,
|
5539
|
-
schemas_SortOrder as SortOrder,
|
5540
|
-
schemas_StartedFromMetadata as StartedFromMetadata,
|
5541
|
-
schemas_SumAgg as SumAgg,
|
5542
|
-
schemas_SummaryExpression as SummaryExpression,
|
5543
|
-
schemas_SummaryExpressionList as SummaryExpressionList,
|
5544
|
-
schemas_Table as Table,
|
5545
|
-
schemas_TableMigration as TableMigration,
|
5546
|
-
schemas_TableName as TableName,
|
5547
|
-
schemas_TableOpAdd as TableOpAdd,
|
5548
|
-
schemas_TableOpRemove as TableOpRemove,
|
5549
|
-
schemas_TableOpRename as TableOpRename,
|
5550
|
-
schemas_TableRename as TableRename,
|
5551
|
-
schemas_TargetExpression as TargetExpression,
|
5552
|
-
schemas_TopValuesAgg as TopValuesAgg,
|
5553
|
-
schemas_TransactionDeleteOp as TransactionDeleteOp,
|
5554
|
-
schemas_TransactionError as TransactionError,
|
5555
|
-
schemas_TransactionFailure as TransactionFailure,
|
5556
|
-
schemas_TransactionInsertOp as TransactionInsertOp,
|
5557
|
-
TransactionOperation$1 as TransactionOperation,
|
5558
|
-
schemas_TransactionResultColumns as TransactionResultColumns,
|
5559
|
-
schemas_TransactionResultDelete as TransactionResultDelete,
|
5560
|
-
schemas_TransactionResultInsert as TransactionResultInsert,
|
5561
|
-
schemas_TransactionResultUpdate as TransactionResultUpdate,
|
5562
|
-
schemas_TransactionSuccess as TransactionSuccess,
|
5563
|
-
schemas_TransactionUpdateOp as TransactionUpdateOp,
|
5564
|
-
schemas_UniqueCountAgg as UniqueCountAgg,
|
5565
|
-
schemas_User as User,
|
5566
|
-
schemas_UserID as UserID,
|
5567
|
-
schemas_UserWithID as UserWithID,
|
5568
|
-
ValueBooster$1 as ValueBooster,
|
5569
|
-
schemas_Workspace as Workspace,
|
5570
|
-
schemas_WorkspaceID as WorkspaceID,
|
5571
|
-
schemas_WorkspaceInvite as WorkspaceInvite,
|
5572
|
-
schemas_WorkspaceMember as WorkspaceMember,
|
5573
|
-
schemas_WorkspaceMembers as WorkspaceMembers,
|
5574
|
-
schemas_WorkspaceMeta as WorkspaceMeta,
|
5575
|
-
XataRecord$1 as XataRecord,
|
5576
|
-
};
|
6266
|
+
export type { schemas_APIKeyName as APIKeyName, schemas_AccessToken as AccessToken, schemas_AggExpression as AggExpression, schemas_AggExpressionMap as AggExpressionMap, AggResponse$1 as AggResponse, schemas_AuthorizationCodeRequest as AuthorizationCodeRequest, schemas_AuthorizationCodeResponse as AuthorizationCodeResponse, schemas_AverageAgg as AverageAgg, schemas_BoosterExpression as BoosterExpression, schemas_Branch as Branch, schemas_BranchMetadata as BranchMetadata, schemas_BranchMigration as BranchMigration, schemas_BranchName as BranchName, schemas_BranchOp as BranchOp, schemas_BranchWithCopyID as BranchWithCopyID, schemas_Column as Column, schemas_ColumnFile as ColumnFile, schemas_ColumnLink as ColumnLink, schemas_ColumnMigration as ColumnMigration, schemas_ColumnName as ColumnName, schemas_ColumnOpAdd as ColumnOpAdd, schemas_ColumnOpRemove as ColumnOpRemove, schemas_ColumnOpRename as ColumnOpRename, schemas_ColumnVector as ColumnVector, schemas_ColumnsProjection as ColumnsProjection, schemas_Commit as Commit, schemas_CountAgg as CountAgg, schemas_DBBranch as DBBranch, schemas_DBBranchName as DBBranchName, schemas_DBName as DBName, schemas_DataInputRecord as DataInputRecord, schemas_DatabaseGithubSettings as DatabaseGithubSettings, schemas_DatabaseMetadata as DatabaseMetadata, DateBooster$1 as DateBooster, schemas_DateHistogramAgg as DateHistogramAgg, schemas_DateTime as DateTime, schemas_FileAccessID as FileAccessID, schemas_FileItemID as FileItemID, schemas_FileName as FileName, schemas_FileResponse as FileResponse, schemas_FileSignature as FileSignature, schemas_FilterColumn as FilterColumn, schemas_FilterColumnIncludes as FilterColumnIncludes, schemas_FilterExpression as FilterExpression, schemas_FilterList as FilterList, schemas_FilterPredicate as FilterPredicate, schemas_FilterPredicateOp as FilterPredicateOp, schemas_FilterPredicateRangeOp as FilterPredicateRangeOp, schemas_FilterRangeValue as FilterRangeValue, schemas_FilterValue as FilterValue, schemas_FuzzinessExpression as FuzzinessExpression, schemas_HighlightExpression as HighlightExpression, schemas_InputFile as InputFile, schemas_InputFileArray as InputFileArray, schemas_InputFileEntry as InputFileEntry, schemas_InviteID as InviteID, schemas_InviteKey as InviteKey, schemas_ListBranchesResponse as ListBranchesResponse, schemas_ListDatabasesResponse as ListDatabasesResponse, schemas_ListGitBranchesResponse as ListGitBranchesResponse, schemas_ListRegionsResponse as ListRegionsResponse, schemas_MaxAgg as MaxAgg, schemas_MediaType as MediaType, schemas_MetricsDatapoint as MetricsDatapoint, schemas_MetricsLatency as MetricsLatency, schemas_Migration as Migration, schemas_MigrationColumnOp as MigrationColumnOp, schemas_MigrationObject as MigrationObject, schemas_MigrationOp as MigrationOp, schemas_MigrationRequest as MigrationRequest, schemas_MigrationRequestNumber as MigrationRequestNumber, schemas_MigrationStatus as MigrationStatus, schemas_MigrationTableOp as MigrationTableOp, schemas_MinAgg as MinAgg, NumericBooster$1 as NumericBooster, schemas_NumericHistogramAgg as NumericHistogramAgg, schemas_OAuthAccessToken as OAuthAccessToken, schemas_OAuthClientID as OAuthClientID, schemas_OAuthClientPublicDetails as OAuthClientPublicDetails, schemas_OAuthResponseType as OAuthResponseType, schemas_OAuthScope as OAuthScope, schemas_ObjectValue as ObjectValue, schemas_PageConfig as PageConfig, schemas_PrefixExpression as PrefixExpression, schemas_ProjectionConfig as ProjectionConfig, schemas_QueryColumnsProjection as QueryColumnsProjection, schemas_RecordID as RecordID, schemas_RecordMeta as RecordMeta, schemas_RecordsMetadata as RecordsMetadata, schemas_Region as Region, schemas_RevLink as RevLink, schemas_Role as Role, schemas_SQLRecord as SQLRecord, schemas_Schema as Schema, schemas_SchemaEditScript as SchemaEditScript, schemas_SearchPageConfig as SearchPageConfig, schemas_SortExpression as SortExpression, schemas_SortOrder as SortOrder, schemas_StartedFromMetadata as StartedFromMetadata, schemas_SumAgg as SumAgg, schemas_SummaryExpression as SummaryExpression, schemas_SummaryExpressionList as SummaryExpressionList, schemas_Table as Table, schemas_TableMigration as TableMigration, schemas_TableName as TableName, schemas_TableOpAdd as TableOpAdd, schemas_TableOpRemove as TableOpRemove, schemas_TableOpRename as TableOpRename, schemas_TableRename as TableRename, schemas_TargetExpression as TargetExpression, schemas_TopValuesAgg as TopValuesAgg, schemas_TransactionDeleteOp as TransactionDeleteOp, schemas_TransactionError as TransactionError, schemas_TransactionFailure as TransactionFailure, schemas_TransactionGetOp as TransactionGetOp, schemas_TransactionInsertOp as TransactionInsertOp, TransactionOperation$1 as TransactionOperation, schemas_TransactionResultColumns as TransactionResultColumns, schemas_TransactionResultDelete as TransactionResultDelete, schemas_TransactionResultGet as TransactionResultGet, schemas_TransactionResultInsert as TransactionResultInsert, schemas_TransactionResultUpdate as TransactionResultUpdate, schemas_TransactionSuccess as TransactionSuccess, schemas_TransactionUpdateOp as TransactionUpdateOp, schemas_UniqueCountAgg as UniqueCountAgg, schemas_User as User, schemas_UserID as UserID, schemas_UserWithID as UserWithID, ValueBooster$1 as ValueBooster, schemas_Workspace as Workspace, schemas_WorkspaceID as WorkspaceID, schemas_WorkspaceInvite as WorkspaceInvite, schemas_WorkspaceMember as WorkspaceMember, schemas_WorkspaceMembers as WorkspaceMembers, schemas_WorkspaceMeta as WorkspaceMeta, XataRecord$1 as XataRecord };
|
5577
6267
|
}
|
5578
6268
|
|
5579
6269
|
type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
|
@@ -5598,6 +6288,7 @@ declare class XataApiClient {
|
|
5598
6288
|
get migrationRequests(): MigrationRequestsApi;
|
5599
6289
|
get tables(): TableApi;
|
5600
6290
|
get records(): RecordsApi;
|
6291
|
+
get files(): FilesApi;
|
5601
6292
|
get searchAndFilter(): SearchAndFilterApi;
|
5602
6293
|
}
|
5603
6294
|
declare class UserApi {
|
@@ -5919,6 +6610,75 @@ declare class RecordsApi {
|
|
5919
6610
|
operations: TransactionOperation$1[];
|
5920
6611
|
}): Promise<TransactionSuccess>;
|
5921
6612
|
}
|
6613
|
+
declare class FilesApi {
|
6614
|
+
private extraProps;
|
6615
|
+
constructor(extraProps: ApiExtraProps);
|
6616
|
+
getFileItem({ workspace, region, database, branch, table, record, column, fileId }: {
|
6617
|
+
workspace: WorkspaceID;
|
6618
|
+
region: string;
|
6619
|
+
database: DBName;
|
6620
|
+
branch: BranchName;
|
6621
|
+
table: TableName;
|
6622
|
+
record: RecordID;
|
6623
|
+
column: ColumnName;
|
6624
|
+
fileId: string;
|
6625
|
+
}): Promise<any>;
|
6626
|
+
putFileItem({ workspace, region, database, branch, table, record, column, fileId, file }: {
|
6627
|
+
workspace: WorkspaceID;
|
6628
|
+
region: string;
|
6629
|
+
database: DBName;
|
6630
|
+
branch: BranchName;
|
6631
|
+
table: TableName;
|
6632
|
+
record: RecordID;
|
6633
|
+
column: ColumnName;
|
6634
|
+
fileId: string;
|
6635
|
+
file: any;
|
6636
|
+
}): Promise<PutFileResponse>;
|
6637
|
+
deleteFileItem({ workspace, region, database, branch, table, record, column, fileId }: {
|
6638
|
+
workspace: WorkspaceID;
|
6639
|
+
region: string;
|
6640
|
+
database: DBName;
|
6641
|
+
branch: BranchName;
|
6642
|
+
table: TableName;
|
6643
|
+
record: RecordID;
|
6644
|
+
column: ColumnName;
|
6645
|
+
fileId: string;
|
6646
|
+
}): Promise<PutFileResponse>;
|
6647
|
+
getFile({ workspace, region, database, branch, table, record, column }: {
|
6648
|
+
workspace: WorkspaceID;
|
6649
|
+
region: string;
|
6650
|
+
database: DBName;
|
6651
|
+
branch: BranchName;
|
6652
|
+
table: TableName;
|
6653
|
+
record: RecordID;
|
6654
|
+
column: ColumnName;
|
6655
|
+
}): Promise<any>;
|
6656
|
+
putFile({ workspace, region, database, branch, table, record, column, file }: {
|
6657
|
+
workspace: WorkspaceID;
|
6658
|
+
region: string;
|
6659
|
+
database: DBName;
|
6660
|
+
branch: BranchName;
|
6661
|
+
table: TableName;
|
6662
|
+
record: RecordID;
|
6663
|
+
column: ColumnName;
|
6664
|
+
file: Blob;
|
6665
|
+
}): Promise<PutFileResponse>;
|
6666
|
+
deleteFile({ workspace, region, database, branch, table, record, column }: {
|
6667
|
+
workspace: WorkspaceID;
|
6668
|
+
region: string;
|
6669
|
+
database: DBName;
|
6670
|
+
branch: BranchName;
|
6671
|
+
table: TableName;
|
6672
|
+
record: RecordID;
|
6673
|
+
column: ColumnName;
|
6674
|
+
}): Promise<PutFileResponse>;
|
6675
|
+
fileAccess({ workspace, region, fileId, verify }: {
|
6676
|
+
workspace: WorkspaceID;
|
6677
|
+
region: string;
|
6678
|
+
fileId: string;
|
6679
|
+
verify?: FileSignature;
|
6680
|
+
}): Promise<any>;
|
6681
|
+
}
|
5922
6682
|
declare class SearchAndFilterApi {
|
5923
6683
|
private extraProps;
|
5924
6684
|
constructor(extraProps: ApiExtraProps);
|
@@ -5984,6 +6744,15 @@ declare class SearchAndFilterApi {
|
|
5984
6744
|
table: TableName;
|
5985
6745
|
options: AskTableRequestBody;
|
5986
6746
|
}): Promise<AskTableResponse>;
|
6747
|
+
askTableSession({ workspace, region, database, branch, table, sessionId, message }: {
|
6748
|
+
workspace: WorkspaceID;
|
6749
|
+
region: string;
|
6750
|
+
database: DBName;
|
6751
|
+
branch: BranchName;
|
6752
|
+
table: TableName;
|
6753
|
+
sessionId: string;
|
6754
|
+
message: string;
|
6755
|
+
}): Promise<AskTableSessionResponse>;
|
5987
6756
|
summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page, consistency }: {
|
5988
6757
|
workspace: WorkspaceID;
|
5989
6758
|
region: string;
|
@@ -6162,10 +6931,11 @@ declare class DatabaseApi {
|
|
6162
6931
|
getDatabaseList({ workspace }: {
|
6163
6932
|
workspace: WorkspaceID;
|
6164
6933
|
}): Promise<ListDatabasesResponse>;
|
6165
|
-
createDatabase({ workspace, database, data }: {
|
6934
|
+
createDatabase({ workspace, database, data, headers }: {
|
6166
6935
|
workspace: WorkspaceID;
|
6167
6936
|
database: DBName;
|
6168
6937
|
data: CreateDatabaseRequestBody;
|
6938
|
+
headers?: Record<string, string>;
|
6169
6939
|
}): Promise<CreateDatabaseResponse>;
|
6170
6940
|
deleteDatabase({ workspace, database }: {
|
6171
6941
|
workspace: WorkspaceID;
|
@@ -6180,6 +6950,11 @@ declare class DatabaseApi {
|
|
6180
6950
|
database: DBName;
|
6181
6951
|
metadata: DatabaseMetadata;
|
6182
6952
|
}): Promise<DatabaseMetadata>;
|
6953
|
+
renameDatabase({ workspace, database, newName }: {
|
6954
|
+
workspace: WorkspaceID;
|
6955
|
+
database: DBName;
|
6956
|
+
newName: DBName;
|
6957
|
+
}): Promise<DatabaseMetadata>;
|
6183
6958
|
getDatabaseGithubSettings({ workspace, database }: {
|
6184
6959
|
workspace: WorkspaceID;
|
6185
6960
|
database: DBName;
|
@@ -6235,7 +7010,229 @@ type Narrowable = string | number | bigint | boolean;
|
|
6235
7010
|
type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
|
6236
7011
|
type Narrow<A> = Try<A, [], NarrowRaw<A>>;
|
6237
7012
|
|
6238
|
-
|
7013
|
+
interface ImageTransformations {
|
7014
|
+
/**
|
7015
|
+
* Whether to preserve animation frames from input files. Default is true.
|
7016
|
+
* Setting it to false reduces animations to still images. This setting is
|
7017
|
+
* recommended when enlarging images or processing arbitrary user content,
|
7018
|
+
* because large GIF animations can weigh tens or even hundreds of megabytes.
|
7019
|
+
* It is also useful to set anim:false when using format:"json" to get the
|
7020
|
+
* response quicker without the number of frames.
|
7021
|
+
*/
|
7022
|
+
anim?: boolean;
|
7023
|
+
/**
|
7024
|
+
* Background color to add underneath the image. Applies only to images with
|
7025
|
+
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
7026
|
+
* hsl(…), etc.)
|
7027
|
+
*/
|
7028
|
+
background?: string;
|
7029
|
+
/**
|
7030
|
+
* Radius of a blur filter (approximate gaussian). Maximum supported radius
|
7031
|
+
* is 250.
|
7032
|
+
*/
|
7033
|
+
blur?: number;
|
7034
|
+
/**
|
7035
|
+
* Increase brightness by a factor. A value of 1.0 equals no change, a value
|
7036
|
+
* of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
|
7037
|
+
* 0 is ignored.
|
7038
|
+
*/
|
7039
|
+
brightness?: number;
|
7040
|
+
/**
|
7041
|
+
* Slightly reduces latency on a cache miss by selecting a
|
7042
|
+
* quickest-to-compress file format, at a cost of increased file size and
|
7043
|
+
* lower image quality. It will usually override the format option and choose
|
7044
|
+
* JPEG over WebP or AVIF. We do not recommend using this option, except in
|
7045
|
+
* unusual circumstances like resizing uncacheable dynamically-generated
|
7046
|
+
* images.
|
7047
|
+
*/
|
7048
|
+
compression?: 'fast';
|
7049
|
+
/**
|
7050
|
+
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
7051
|
+
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
7052
|
+
* ignored.
|
7053
|
+
*/
|
7054
|
+
contrast?: number;
|
7055
|
+
/**
|
7056
|
+
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
7057
|
+
* easier to specify higher-DPI sizes in <img srcset>.
|
7058
|
+
*/
|
7059
|
+
dpr?: number;
|
7060
|
+
/**
|
7061
|
+
* Resizing mode as a string. It affects interpretation of width and height
|
7062
|
+
* options:
|
7063
|
+
* - scale-down: Similar to contain, but the image is never enlarged. If
|
7064
|
+
* the image is larger than given width or height, it will be resized.
|
7065
|
+
* Otherwise its original size will be kept.
|
7066
|
+
* - contain: Resizes to maximum size that fits within the given width and
|
7067
|
+
* height. If only a single dimension is given (e.g. only width), the
|
7068
|
+
* image will be shrunk or enlarged to exactly match that dimension.
|
7069
|
+
* Aspect ratio is always preserved.
|
7070
|
+
* - cover: Resizes (shrinks or enlarges) to fill the entire area of width
|
7071
|
+
* and height. If the image has an aspect ratio different from the ratio
|
7072
|
+
* of width and height, it will be cropped to fit.
|
7073
|
+
* - crop: The image will be shrunk and cropped to fit within the area
|
7074
|
+
* specified by width and height. The image will not be enlarged. For images
|
7075
|
+
* smaller than the given dimensions it's the same as scale-down. For
|
7076
|
+
* images larger than the given dimensions, it's the same as cover.
|
7077
|
+
* See also trim.
|
7078
|
+
* - pad: Resizes to the maximum size that fits within the given width and
|
7079
|
+
* height, and then fills the remaining area with a background color
|
7080
|
+
* (white by default). Use of this mode is not recommended, as the same
|
7081
|
+
* effect can be more efficiently achieved with the contain mode and the
|
7082
|
+
* CSS object-fit: contain property.
|
7083
|
+
*/
|
7084
|
+
fit?: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad';
|
7085
|
+
/**
|
7086
|
+
* Output format to generate. It can be:
|
7087
|
+
* - avif: generate images in AVIF format.
|
7088
|
+
* - webp: generate images in Google WebP format. Set quality to 100 to get
|
7089
|
+
* the WebP-lossless format.
|
7090
|
+
* - json: instead of generating an image, outputs information about the
|
7091
|
+
* image, in JSON format. The JSON object will contain image size
|
7092
|
+
* (before and after resizing), source image’s MIME type, file size, etc.
|
7093
|
+
* - jpeg: generate images in JPEG format.
|
7094
|
+
* - png: generate images in PNG format.
|
7095
|
+
*/
|
7096
|
+
format?: 'auto' | 'avif' | 'webp' | 'json' | 'jpeg' | 'png';
|
7097
|
+
/**
|
7098
|
+
* Increase exposure by a factor. A value of 1.0 equals no change, a value of
|
7099
|
+
* 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
|
7100
|
+
*/
|
7101
|
+
gamma?: number;
|
7102
|
+
/**
|
7103
|
+
* When cropping with fit: "cover", this defines the side or point that should
|
7104
|
+
* be left uncropped. The value is either a string
|
7105
|
+
* "left", "right", "top", "bottom", "auto", or "center" (the default),
|
7106
|
+
* or an object {x, y} containing focal point coordinates in the original
|
7107
|
+
* image expressed as fractions ranging from 0.0 (top or left) to 1.0
|
7108
|
+
* (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
|
7109
|
+
* crop bottom or left and right sides as necessary, but won’t crop anything
|
7110
|
+
* from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
|
7111
|
+
* preserve as much as possible around a point at 20% of the height of the
|
7112
|
+
* source image.
|
7113
|
+
*/
|
7114
|
+
gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | {
|
7115
|
+
x: number;
|
7116
|
+
y: number;
|
7117
|
+
};
|
7118
|
+
/**
|
7119
|
+
* Maximum height in image pixels. The value must be an integer.
|
7120
|
+
*/
|
7121
|
+
height?: number;
|
7122
|
+
/**
|
7123
|
+
* What EXIF data should be preserved in the output image. Note that EXIF
|
7124
|
+
* rotation and embedded color profiles are always applied ("baked in" into
|
7125
|
+
* the image), and aren't affected by this option. Note that if the Polish
|
7126
|
+
* feature is enabled, all metadata may have been removed already and this
|
7127
|
+
* option may have no effect.
|
7128
|
+
* - keep: Preserve most of EXIF metadata, including GPS location if there's
|
7129
|
+
* any.
|
7130
|
+
* - copyright: Only keep the copyright tag, and discard everything else.
|
7131
|
+
* This is the default behavior for JPEG files.
|
7132
|
+
* - none: Discard all invisible EXIF metadata. Currently WebP and PNG
|
7133
|
+
* output formats always discard metadata.
|
7134
|
+
*/
|
7135
|
+
metadata?: 'keep' | 'copyright' | 'none';
|
7136
|
+
/**
|
7137
|
+
* Quality setting from 1-100 (useful values are in 60-90 range). Lower values
|
7138
|
+
* make images look worse, but load faster. The default is 85. It applies only
|
7139
|
+
* to JPEG and WebP images. It doesn’t have any effect on PNG.
|
7140
|
+
*/
|
7141
|
+
quality?: number;
|
7142
|
+
/**
|
7143
|
+
* Number of degrees (90, 180, 270) to rotate the image by. width and height
|
7144
|
+
* options refer to axes after rotation.
|
7145
|
+
*/
|
7146
|
+
rotate?: 0 | 90 | 180 | 270 | 360;
|
7147
|
+
/**
|
7148
|
+
* Strength of sharpening filter to apply to the image. Floating-point
|
7149
|
+
* number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
|
7150
|
+
* recommended value for downscaled images.
|
7151
|
+
*/
|
7152
|
+
sharpen?: number;
|
7153
|
+
/**
|
7154
|
+
* An object with four properties {left, top, right, bottom} that specify
|
7155
|
+
* a number of pixels to cut off on each side. Allows removal of borders
|
7156
|
+
* or cutting out a specific fragment of an image. Trimming is performed
|
7157
|
+
* before resizing or rotation. Takes dpr into account.
|
7158
|
+
*/
|
7159
|
+
trim?: {
|
7160
|
+
left?: number;
|
7161
|
+
top?: number;
|
7162
|
+
right?: number;
|
7163
|
+
bottom?: number;
|
7164
|
+
};
|
7165
|
+
/**
|
7166
|
+
* Maximum width in image pixels. The value must be an integer.
|
7167
|
+
*/
|
7168
|
+
width?: number;
|
7169
|
+
}
|
7170
|
+
declare function transformImage(url: string, ...transformations: ImageTransformations[]): string;
|
7171
|
+
declare function transformImage(url: string | undefined, ...transformations: ImageTransformations[]): string | undefined;
|
7172
|
+
|
7173
|
+
type XataFileEditableFields = Partial<Pick<XataArrayFile, keyof InputFileEntry>>;
|
7174
|
+
declare class XataFile {
|
7175
|
+
/**
|
7176
|
+
* Name of this file.
|
7177
|
+
*/
|
7178
|
+
name?: string;
|
7179
|
+
/**
|
7180
|
+
* Media type of this file.
|
7181
|
+
*/
|
7182
|
+
mediaType: string;
|
7183
|
+
/**
|
7184
|
+
* Base64 encoded content of this file.
|
7185
|
+
*/
|
7186
|
+
base64Content?: string;
|
7187
|
+
/**
|
7188
|
+
* Whether to enable public url for this file.
|
7189
|
+
*/
|
7190
|
+
enablePublicUrl?: boolean;
|
7191
|
+
/**
|
7192
|
+
* Timeout for the signed url.
|
7193
|
+
*/
|
7194
|
+
signedUrlTimeout?: number;
|
7195
|
+
/**
|
7196
|
+
* Size of this file.
|
7197
|
+
*/
|
7198
|
+
size?: number;
|
7199
|
+
/**
|
7200
|
+
* Version of this file.
|
7201
|
+
*/
|
7202
|
+
version?: number;
|
7203
|
+
/**
|
7204
|
+
* Url of this file.
|
7205
|
+
*/
|
7206
|
+
url?: string;
|
7207
|
+
/**
|
7208
|
+
* Signed url of this file.
|
7209
|
+
*/
|
7210
|
+
signedUrl?: string;
|
7211
|
+
/**
|
7212
|
+
* Attributes of this file.
|
7213
|
+
*/
|
7214
|
+
attributes?: Record<string, any>;
|
7215
|
+
constructor(file: Partial<XataFile>);
|
7216
|
+
static fromBuffer(buffer: Buffer, options?: XataFileEditableFields): XataFile;
|
7217
|
+
toBuffer(): Buffer;
|
7218
|
+
static fromArrayBuffer(arrayBuffer: ArrayBuffer, options?: XataFileEditableFields): XataFile;
|
7219
|
+
toArrayBuffer(): ArrayBuffer;
|
7220
|
+
static fromUint8Array(uint8Array: Uint8Array, options?: XataFileEditableFields): XataFile;
|
7221
|
+
toUint8Array(): Uint8Array;
|
7222
|
+
static fromBlob(file: Blob, options?: XataFileEditableFields): Promise<XataFile>;
|
7223
|
+
toBlob(): Blob;
|
7224
|
+
static fromString(string: string, options?: XataFileEditableFields): XataFile;
|
7225
|
+
toString(): string;
|
7226
|
+
static fromBase64(base64Content: string, options?: XataFileEditableFields): XataFile;
|
7227
|
+
toBase64(): string;
|
7228
|
+
transform(...options: ImageTransformations[]): {
|
7229
|
+
url: string | undefined;
|
7230
|
+
signedUrl: string | undefined;
|
7231
|
+
};
|
7232
|
+
}
|
7233
|
+
type XataArrayFile = Identifiable & XataFile;
|
7234
|
+
|
7235
|
+
type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | `xata.${'version' | 'createdAt' | 'updatedAt'}` | DataProps<O> | NestedColumns<O, RecursivePath>;
|
6239
7236
|
type WildcardColumns<O> = Values<{
|
6240
7237
|
[K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
|
6241
7238
|
}>;
|
@@ -6245,25 +7242,26 @@ type ColumnsByValue<O, Value> = Values<{
|
|
6245
7242
|
type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
|
6246
7243
|
[K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
|
6247
7244
|
}>>;
|
6248
|
-
type ValueAtColumn<
|
7245
|
+
type ValueAtColumn<Object, Key> = Key extends '*' ? Values<Object> : Key extends 'id' ? string : Key extends 'xata.version' ? number : Key extends 'xata.createdAt' ? Date : Key extends 'xata.updatedAt' ? Date : Key extends keyof Object ? Object[Key] : Key extends `${infer K}.${infer V}` ? K extends keyof Object ? Values<NonNullable<Object[K]> extends infer Item ? Item extends Record<string, any> ? V extends SelectableColumn<Item> ? {
|
6249
7246
|
V: ValueAtColumn<Item, V>;
|
6250
|
-
} : never :
|
7247
|
+
} : never : Object[K] : never> : never : never;
|
6251
7248
|
type MAX_RECURSION = 2;
|
6252
7249
|
type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
|
6253
|
-
[K in DataProps<O>]: NonNullable<O[K]> extends infer Item ? If<IsArray<Item>, K,
|
6254
|
-
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
|
7250
|
+
[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
|
6255
7251
|
K>> : never;
|
6256
7252
|
}>, never>;
|
6257
7253
|
type DataProps<O> = Exclude<StringKeys<O>, StringKeys<XataRecord>>;
|
6258
7254
|
type NestedValueAtColumn<O, Key extends SelectableColumn<O>> = Key extends `${infer N}.${infer M}` ? N extends DataProps<O> ? {
|
6259
|
-
[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;
|
7255
|
+
[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;
|
6260
7256
|
} : unknown : Key extends DataProps<O> ? {
|
6261
|
-
[K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], SelectedPick<NonNullable<O[K]>, ['*']>> : O[K];
|
7257
|
+
[K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Omit<SelectedPick<NonNullable<O[K]>, ['*']>, 'xata' | 'getMetadata'>> : O[K];
|
6262
7258
|
} : Key extends '*' ? {
|
6263
7259
|
[K in StringKeys<O>]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Link<NonNullable<O[K]>>> : O[K];
|
6264
7260
|
} : unknown;
|
6265
7261
|
type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
|
6266
7262
|
|
7263
|
+
declare const RecordColumnTypes: readonly ["bool", "int", "float", "string", "text", "email", "multiple", "link", "object", "datetime", "vector", "file[]", "file", "json"];
|
7264
|
+
type Identifier = string;
|
6267
7265
|
/**
|
6268
7266
|
* Represents an identifiable record from the database.
|
6269
7267
|
*/
|
@@ -6271,7 +7269,7 @@ interface Identifiable {
|
|
6271
7269
|
/**
|
6272
7270
|
* Unique id of this record.
|
6273
7271
|
*/
|
6274
|
-
id:
|
7272
|
+
id: Identifier;
|
6275
7273
|
}
|
6276
7274
|
interface BaseData {
|
6277
7275
|
[key: string]: any;
|
@@ -6280,8 +7278,13 @@ interface BaseData {
|
|
6280
7278
|
* Represents a persisted record from the database.
|
6281
7279
|
*/
|
6282
7280
|
interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> extends Identifiable {
|
7281
|
+
/**
|
7282
|
+
* Metadata of this record.
|
7283
|
+
*/
|
7284
|
+
xata: XataRecordMetadata;
|
6283
7285
|
/**
|
6284
7286
|
* Get metadata of this record.
|
7287
|
+
* @deprecated Use `xata` property instead.
|
6285
7288
|
*/
|
6286
7289
|
getMetadata(): XataRecordMetadata;
|
6287
7290
|
/**
|
@@ -6360,7 +7363,14 @@ type XataRecordMetadata = {
|
|
6360
7363
|
* Number that is increased every time the record is updated.
|
6361
7364
|
*/
|
6362
7365
|
version: number;
|
6363
|
-
|
7366
|
+
/**
|
7367
|
+
* Timestamp when the record was created.
|
7368
|
+
*/
|
7369
|
+
createdAt: Date;
|
7370
|
+
/**
|
7371
|
+
* Timestamp when the record was last updated.
|
7372
|
+
*/
|
7373
|
+
updatedAt: Date;
|
6364
7374
|
};
|
6365
7375
|
declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
|
6366
7376
|
declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
|
@@ -6373,19 +7383,43 @@ type NumericOperator = ExclusiveOr<{
|
|
6373
7383
|
}, {
|
6374
7384
|
$divide?: number;
|
6375
7385
|
}>>>;
|
7386
|
+
type InputXataFile = Partial<XataArrayFile> | Promise<Partial<XataArrayFile>>;
|
6376
7387
|
type EditableDataFields<T> = T extends XataRecord ? {
|
6377
|
-
id:
|
6378
|
-
} |
|
6379
|
-
id:
|
6380
|
-
} |
|
7388
|
+
id: Identifier;
|
7389
|
+
} | Identifier : NonNullable<T> extends XataRecord ? {
|
7390
|
+
id: Identifier;
|
7391
|
+
} | 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;
|
6381
7392
|
type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
|
6382
7393
|
[K in keyof O]: EditableDataFields<O[K]>;
|
6383
7394
|
}, keyof XataRecord>>;
|
6384
|
-
type
|
6385
|
-
|
7395
|
+
type JSONDataFile = {
|
7396
|
+
[K in keyof XataFile]: XataFile[K] extends Function ? never : XataFile[K];
|
7397
|
+
};
|
7398
|
+
type JSONDataFields<T> = T extends XataFile ? JSONDataFile : NonNullable<T> extends XataFile ? JSONDataFile | null | undefined : T extends XataRecord ? string : NonNullable<T> extends XataRecord ? string | null | undefined : T extends Date ? string : NonNullable<T> extends Date ? string | null | undefined : T;
|
7399
|
+
type JSONDataBase = Identifiable & {
|
7400
|
+
/**
|
7401
|
+
* Metadata about the record.
|
7402
|
+
*/
|
7403
|
+
xata: {
|
7404
|
+
/**
|
7405
|
+
* Timestamp when the record was created.
|
7406
|
+
*/
|
7407
|
+
createdAt: string;
|
7408
|
+
/**
|
7409
|
+
* Timestamp when the record was last updated.
|
7410
|
+
*/
|
7411
|
+
updatedAt: string;
|
7412
|
+
/**
|
7413
|
+
* Number that is increased every time the record is updated.
|
7414
|
+
*/
|
7415
|
+
version: number;
|
7416
|
+
};
|
7417
|
+
};
|
7418
|
+
type JSONData<O> = JSONDataBase & Partial<Omit<{
|
6386
7419
|
[K in keyof O]: JSONDataFields<O[K]>;
|
6387
7420
|
}, keyof XataRecord>>;
|
6388
7421
|
|
7422
|
+
type FilterColumns<T> = ColumnsByValue<T, any> | `xata.${keyof XataRecordMetadata}`;
|
6389
7423
|
/**
|
6390
7424
|
* PropertyMatchFilter
|
6391
7425
|
* Example:
|
@@ -6405,7 +7439,7 @@ type JSONData<O> = Identifiable & Partial<Omit<{
|
|
6405
7439
|
}
|
6406
7440
|
*/
|
6407
7441
|
type PropertyAccessFilter<Record> = {
|
6408
|
-
[key in
|
7442
|
+
[key in FilterColumns<Record>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
|
6409
7443
|
};
|
6410
7444
|
type PropertyFilter<T> = T | {
|
6411
7445
|
$is: T;
|
@@ -6467,7 +7501,7 @@ type AggregatorFilter<T> = {
|
|
6467
7501
|
* Example: { filter: { $exists: "settings" } }
|
6468
7502
|
*/
|
6469
7503
|
type ExistanceFilter<Record> = {
|
6470
|
-
[key in '$exists' | '$notExists']?:
|
7504
|
+
[key in '$exists' | '$notExists']?: FilterColumns<Record>;
|
6471
7505
|
};
|
6472
7506
|
type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
|
6473
7507
|
/**
|
@@ -6484,6 +7518,12 @@ type DateBooster = {
|
|
6484
7518
|
origin?: string;
|
6485
7519
|
scale: string;
|
6486
7520
|
decay: number;
|
7521
|
+
/**
|
7522
|
+
* The factor with which to multiply the added boost.
|
7523
|
+
*
|
7524
|
+
* @minimum 0
|
7525
|
+
*/
|
7526
|
+
factor?: number;
|
6487
7527
|
};
|
6488
7528
|
type NumericBooster = {
|
6489
7529
|
factor: number;
|
@@ -6791,7 +7831,7 @@ type ComplexAggregationResult = {
|
|
6791
7831
|
};
|
6792
7832
|
|
6793
7833
|
type KeywordAskOptions<Record extends XataRecord> = {
|
6794
|
-
searchType
|
7834
|
+
searchType?: 'keyword';
|
6795
7835
|
search?: {
|
6796
7836
|
fuzziness?: FuzzinessExpression;
|
6797
7837
|
target?: TargetColumn<Record>[];
|
@@ -6801,7 +7841,7 @@ type KeywordAskOptions<Record extends XataRecord> = {
|
|
6801
7841
|
};
|
6802
7842
|
};
|
6803
7843
|
type VectorAskOptions<Record extends XataRecord> = {
|
6804
|
-
searchType
|
7844
|
+
searchType?: 'vector';
|
6805
7845
|
vectorSearch?: {
|
6806
7846
|
/**
|
6807
7847
|
* The column to use for vector search. It must be of type `vector`.
|
@@ -6817,20 +7857,30 @@ type VectorAskOptions<Record extends XataRecord> = {
|
|
6817
7857
|
type TypeAskOptions<Record extends XataRecord> = KeywordAskOptions<Record> | VectorAskOptions<Record>;
|
6818
7858
|
type BaseAskOptions = {
|
6819
7859
|
rules?: string[];
|
7860
|
+
sessionId?: string;
|
6820
7861
|
};
|
6821
7862
|
type AskOptions<Record extends XataRecord> = TypeAskOptions<Record> & BaseAskOptions;
|
6822
7863
|
type AskResult = {
|
6823
7864
|
answer?: string;
|
6824
7865
|
records?: string[];
|
7866
|
+
sessionId?: string;
|
6825
7867
|
};
|
6826
7868
|
|
6827
7869
|
type SortDirection = 'asc' | 'desc';
|
6828
|
-
type
|
7870
|
+
type RandomFilter = {
|
7871
|
+
'*': 'random';
|
7872
|
+
};
|
7873
|
+
type RandomFilterExtended = {
|
7874
|
+
column: '*';
|
7875
|
+
direction: 'random';
|
7876
|
+
};
|
7877
|
+
type SortColumns<T extends XataRecord> = ColumnsByValue<T, any> | `xata.${keyof XataRecordMetadata}`;
|
7878
|
+
type SortFilterExtended<T extends XataRecord, Columns extends string = SortColumns<T>> = RandomFilterExtended | {
|
6829
7879
|
column: Columns;
|
6830
7880
|
direction?: SortDirection;
|
6831
7881
|
};
|
6832
|
-
type SortFilter<T extends XataRecord, Columns extends string =
|
6833
|
-
type SortFilterBase<T extends XataRecord, Columns extends string =
|
7882
|
+
type SortFilter<T extends XataRecord, Columns extends string = SortColumns<T>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns> | RandomFilter;
|
7883
|
+
type SortFilterBase<T extends XataRecord, Columns extends string = SortColumns<T>> = Values<{
|
6834
7884
|
[Key in Columns]: {
|
6835
7885
|
[K in Key]: SortDirection;
|
6836
7886
|
};
|
@@ -6961,7 +8011,9 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6961
8011
|
* @param direction The direction. Either ascending or descending.
|
6962
8012
|
* @returns A new Query object.
|
6963
8013
|
*/
|
6964
|
-
sort<F extends ColumnsByValue<Record, any>>(column: F, direction
|
8014
|
+
sort<F extends ColumnsByValue<Record, any>>(column: F, direction: SortDirection): Query<Record, Result>;
|
8015
|
+
sort(column: '*', direction: 'random'): Query<Record, Result>;
|
8016
|
+
sort<F extends ColumnsByValue<Record, any>>(column: F): Query<Record, Result>;
|
6965
8017
|
/**
|
6966
8018
|
* Builds a new query specifying the set of columns to be returned in the query response.
|
6967
8019
|
* @param columns Array of column names to be returned by the query.
|
@@ -6987,7 +8039,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6987
8039
|
* @param options Pagination options
|
6988
8040
|
* @returns A page of results
|
6989
8041
|
*/
|
6990
|
-
getPaginated<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<Page<Record, SelectedPick<Record, typeof options['columns']>>>;
|
8042
|
+
getPaginated<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<Page<Record, SelectedPick<Record, (typeof options)['columns']>>>;
|
6991
8043
|
/**
|
6992
8044
|
* Get results in an iterator
|
6993
8045
|
*
|
@@ -7018,7 +8070,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
7018
8070
|
*/
|
7019
8071
|
getIterator<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
|
7020
8072
|
batchSize?: number;
|
7021
|
-
}>(options: Options): AsyncGenerator<SelectedPick<Record, typeof options['columns']>[]>;
|
8073
|
+
}>(options: Options): AsyncGenerator<SelectedPick<Record, (typeof options)['columns']>[]>;
|
7022
8074
|
/**
|
7023
8075
|
* Performs the query in the database and returns a set of results.
|
7024
8076
|
* @returns An array of records from the database.
|
@@ -7029,7 +8081,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
7029
8081
|
* @param options Additional options to be used when performing the query.
|
7030
8082
|
* @returns An array of records from the database.
|
7031
8083
|
*/
|
7032
|
-
getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, typeof options['columns']>>>;
|
8084
|
+
getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
|
7033
8085
|
/**
|
7034
8086
|
* Performs the query in the database and returns a set of results.
|
7035
8087
|
* @param options Additional options to be used when performing the query.
|
@@ -7050,7 +8102,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
7050
8102
|
*/
|
7051
8103
|
getAll<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
|
7052
8104
|
batchSize?: number;
|
7053
|
-
}>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>[]>;
|
8105
|
+
}>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>[]>;
|
7054
8106
|
/**
|
7055
8107
|
* Performs the query in the database and returns all the results.
|
7056
8108
|
* Warning: If there are a large number of results, this method can have performance implications.
|
@@ -7070,7 +8122,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
7070
8122
|
* @param options Additional options to be used when performing the query.
|
7071
8123
|
* @returns The first record that matches the query, or null if no record matched the query.
|
7072
8124
|
*/
|
7073
|
-
getFirst<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']> | null>;
|
8125
|
+
getFirst<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']> | null>;
|
7074
8126
|
/**
|
7075
8127
|
* Performs the query in the database and returns the first result.
|
7076
8128
|
* @param options Additional options to be used when performing the query.
|
@@ -7089,7 +8141,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
7089
8141
|
* @returns The first record that matches the query, or null if no record matched the query.
|
7090
8142
|
* @throws if there are no results.
|
7091
8143
|
*/
|
7092
|
-
getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>>;
|
8144
|
+
getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>>;
|
7093
8145
|
/**
|
7094
8146
|
* Performs the query in the database and returns the first result.
|
7095
8147
|
* @param options Additional options to be used when performing the query.
|
@@ -7138,6 +8190,7 @@ type PaginationQueryMeta = {
|
|
7138
8190
|
page: {
|
7139
8191
|
cursor: string;
|
7140
8192
|
more: boolean;
|
8193
|
+
size: number;
|
7141
8194
|
};
|
7142
8195
|
};
|
7143
8196
|
interface Paginable<Record extends XataRecord, Result extends XataRecord = Record> {
|
@@ -7270,7 +8323,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7270
8323
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7271
8324
|
* @returns The full persisted record.
|
7272
8325
|
*/
|
7273
|
-
abstract create<K extends SelectableColumn<Record>>(id:
|
8326
|
+
abstract create<K extends SelectableColumn<Record>>(id: Identifier, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
|
7274
8327
|
ifVersion?: number;
|
7275
8328
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7276
8329
|
/**
|
@@ -7279,7 +8332,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7279
8332
|
* @param object Object containing the column names with their values to be stored in the table.
|
7280
8333
|
* @returns The full persisted record.
|
7281
8334
|
*/
|
7282
|
-
abstract create(id:
|
8335
|
+
abstract create(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
|
7283
8336
|
ifVersion?: number;
|
7284
8337
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7285
8338
|
/**
|
@@ -7301,26 +8354,26 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7301
8354
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7302
8355
|
* @returns The persisted record for the given id or null if the record could not be found.
|
7303
8356
|
*/
|
7304
|
-
abstract read<K extends SelectableColumn<Record>>(id:
|
8357
|
+
abstract read<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
7305
8358
|
/**
|
7306
8359
|
* Queries a single record from the table given its unique id.
|
7307
8360
|
* @param id The unique id.
|
7308
8361
|
* @returns The persisted record for the given id or null if the record could not be found.
|
7309
8362
|
*/
|
7310
|
-
abstract read(id:
|
8363
|
+
abstract read(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
7311
8364
|
/**
|
7312
8365
|
* Queries multiple records from the table given their unique id.
|
7313
8366
|
* @param ids The unique ids array.
|
7314
8367
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7315
8368
|
* @returns The persisted records for the given ids in order (if a record could not be found null is returned).
|
7316
8369
|
*/
|
7317
|
-
abstract read<K extends SelectableColumn<Record>>(ids:
|
8370
|
+
abstract read<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
7318
8371
|
/**
|
7319
8372
|
* Queries multiple records from the table given their unique id.
|
7320
8373
|
* @param ids The unique ids array.
|
7321
8374
|
* @returns The persisted records for the given ids in order (if a record could not be found null is returned).
|
7322
8375
|
*/
|
7323
|
-
abstract read(ids:
|
8376
|
+
abstract read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
7324
8377
|
/**
|
7325
8378
|
* Queries a single record from the table by the id in the object.
|
7326
8379
|
* @param object Object containing the id of the record.
|
@@ -7354,14 +8407,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7354
8407
|
* @returns The persisted record for the given id.
|
7355
8408
|
* @throws If the record could not be found.
|
7356
8409
|
*/
|
7357
|
-
abstract readOrThrow<K extends SelectableColumn<Record>>(id:
|
8410
|
+
abstract readOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7358
8411
|
/**
|
7359
8412
|
* Queries a single record from the table given its unique id.
|
7360
8413
|
* @param id The unique id.
|
7361
8414
|
* @returns The persisted record for the given id.
|
7362
8415
|
* @throws If the record could not be found.
|
7363
8416
|
*/
|
7364
|
-
abstract readOrThrow(id:
|
8417
|
+
abstract readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7365
8418
|
/**
|
7366
8419
|
* Queries multiple records from the table given their unique id.
|
7367
8420
|
* @param ids The unique ids array.
|
@@ -7369,14 +8422,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7369
8422
|
* @returns The persisted records for the given ids in order.
|
7370
8423
|
* @throws If one or more records could not be found.
|
7371
8424
|
*/
|
7372
|
-
abstract readOrThrow<K extends SelectableColumn<Record>>(ids:
|
8425
|
+
abstract readOrThrow<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
7373
8426
|
/**
|
7374
8427
|
* Queries multiple records from the table given their unique id.
|
7375
8428
|
* @param ids The unique ids array.
|
7376
8429
|
* @returns The persisted records for the given ids in order.
|
7377
8430
|
* @throws If one or more records could not be found.
|
7378
8431
|
*/
|
7379
|
-
abstract readOrThrow(ids:
|
8432
|
+
abstract readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
7380
8433
|
/**
|
7381
8434
|
* Queries a single record from the table by the id in the object.
|
7382
8435
|
* @param object Object containing the id of the record.
|
@@ -7431,7 +8484,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7431
8484
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7432
8485
|
* @returns The full persisted record, null if the record could not be found.
|
7433
8486
|
*/
|
7434
|
-
abstract update<K extends SelectableColumn<Record>>(id:
|
8487
|
+
abstract update<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
|
7435
8488
|
ifVersion?: number;
|
7436
8489
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
7437
8490
|
/**
|
@@ -7440,7 +8493,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7440
8493
|
* @param object The column names and their values that have to be updated.
|
7441
8494
|
* @returns The full persisted record, null if the record could not be found.
|
7442
8495
|
*/
|
7443
|
-
abstract update(id:
|
8496
|
+
abstract update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
|
7444
8497
|
ifVersion?: number;
|
7445
8498
|
}): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
7446
8499
|
/**
|
@@ -7483,7 +8536,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7483
8536
|
* @returns The full persisted record.
|
7484
8537
|
* @throws If the record could not be found.
|
7485
8538
|
*/
|
7486
|
-
abstract updateOrThrow<K extends SelectableColumn<Record>>(id:
|
8539
|
+
abstract updateOrThrow<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
|
7487
8540
|
ifVersion?: number;
|
7488
8541
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7489
8542
|
/**
|
@@ -7493,7 +8546,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7493
8546
|
* @returns The full persisted record.
|
7494
8547
|
* @throws If the record could not be found.
|
7495
8548
|
*/
|
7496
|
-
abstract updateOrThrow(id:
|
8549
|
+
abstract updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
|
7497
8550
|
ifVersion?: number;
|
7498
8551
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7499
8552
|
/**
|
@@ -7518,7 +8571,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7518
8571
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7519
8572
|
* @returns The full persisted record.
|
7520
8573
|
*/
|
7521
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable
|
8574
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[], options?: {
|
7522
8575
|
ifVersion?: number;
|
7523
8576
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7524
8577
|
/**
|
@@ -7527,7 +8580,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7527
8580
|
* @param object Object containing the column names with their values to be persisted in the table.
|
7528
8581
|
* @returns The full persisted record.
|
7529
8582
|
*/
|
7530
|
-
abstract createOrUpdate(object: EditableData<Record> & Identifiable
|
8583
|
+
abstract createOrUpdate(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
|
7531
8584
|
ifVersion?: number;
|
7532
8585
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7533
8586
|
/**
|
@@ -7538,7 +8591,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7538
8591
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7539
8592
|
* @returns The full persisted record.
|
7540
8593
|
*/
|
7541
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(id:
|
8594
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
|
7542
8595
|
ifVersion?: number;
|
7543
8596
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7544
8597
|
/**
|
@@ -7548,7 +8601,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7548
8601
|
* @param object The column names and the values to be persisted.
|
7549
8602
|
* @returns The full persisted record.
|
7550
8603
|
*/
|
7551
|
-
abstract createOrUpdate(id:
|
8604
|
+
abstract createOrUpdate(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
|
7552
8605
|
ifVersion?: number;
|
7553
8606
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7554
8607
|
/**
|
@@ -7558,14 +8611,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7558
8611
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7559
8612
|
* @returns Array of the persisted records.
|
7560
8613
|
*/
|
7561
|
-
abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable
|
8614
|
+
abstract createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
7562
8615
|
/**
|
7563
8616
|
* Creates or updates a single record. If a record exists with the given id,
|
7564
8617
|
* it will be partially updated, otherwise a new record will be created.
|
7565
8618
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
7566
8619
|
* @returns Array of the persisted records.
|
7567
8620
|
*/
|
7568
|
-
abstract createOrUpdate(objects: Array<EditableData<Record> & Identifiable
|
8621
|
+
abstract createOrUpdate(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
7569
8622
|
/**
|
7570
8623
|
* Creates or replaces a single record. If a record exists with the given id,
|
7571
8624
|
* it will be replaced, otherwise a new record will be created.
|
@@ -7573,7 +8626,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7573
8626
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7574
8627
|
* @returns The full persisted record.
|
7575
8628
|
*/
|
7576
|
-
abstract createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable
|
8629
|
+
abstract createOrReplace<K extends SelectableColumn<Record>>(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, columns: K[], options?: {
|
7577
8630
|
ifVersion?: number;
|
7578
8631
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7579
8632
|
/**
|
@@ -7582,7 +8635,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7582
8635
|
* @param object Object containing the column names with their values to be persisted in the table.
|
7583
8636
|
* @returns The full persisted record.
|
7584
8637
|
*/
|
7585
|
-
abstract createOrReplace(object: EditableData<Record> & Identifiable
|
8638
|
+
abstract createOrReplace(object: Omit<EditableData<Record>, 'id'> & Partial<Identifiable>, options?: {
|
7586
8639
|
ifVersion?: number;
|
7587
8640
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7588
8641
|
/**
|
@@ -7593,7 +8646,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7593
8646
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7594
8647
|
* @returns The full persisted record.
|
7595
8648
|
*/
|
7596
|
-
abstract createOrReplace<K extends SelectableColumn<Record>>(id:
|
8649
|
+
abstract createOrReplace<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
|
7597
8650
|
ifVersion?: number;
|
7598
8651
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7599
8652
|
/**
|
@@ -7603,7 +8656,7 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7603
8656
|
* @param object The column names and the values to be persisted.
|
7604
8657
|
* @returns The full persisted record.
|
7605
8658
|
*/
|
7606
|
-
abstract createOrReplace(id:
|
8659
|
+
abstract createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
|
7607
8660
|
ifVersion?: number;
|
7608
8661
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7609
8662
|
/**
|
@@ -7613,14 +8666,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7613
8666
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7614
8667
|
* @returns Array of the persisted records.
|
7615
8668
|
*/
|
7616
|
-
abstract createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable
|
8669
|
+
abstract createOrReplace<K extends SelectableColumn<Record>>(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
7617
8670
|
/**
|
7618
8671
|
* Creates or replaces a single record. If a record exists with the given id,
|
7619
8672
|
* it will be replaced, otherwise a new record will be created.
|
7620
8673
|
* @param objects Array of objects with the column names and the values to be stored in the table.
|
7621
8674
|
* @returns Array of the persisted records.
|
7622
8675
|
*/
|
7623
|
-
abstract createOrReplace(objects: Array<EditableData<Record> & Identifiable
|
8676
|
+
abstract createOrReplace(objects: Array<Omit<EditableData<Record>, 'id'> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
7624
8677
|
/**
|
7625
8678
|
* Deletes a record given its unique id.
|
7626
8679
|
* @param object An object with a unique id.
|
@@ -7640,13 +8693,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7640
8693
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7641
8694
|
* @returns The deleted record, null if the record could not be found.
|
7642
8695
|
*/
|
7643
|
-
abstract delete<K extends SelectableColumn<Record>>(id:
|
8696
|
+
abstract delete<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
7644
8697
|
/**
|
7645
8698
|
* Deletes a record given a unique id.
|
7646
8699
|
* @param id The unique id.
|
7647
8700
|
* @returns The deleted record, null if the record could not be found.
|
7648
8701
|
*/
|
7649
|
-
abstract delete(id:
|
8702
|
+
abstract delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
7650
8703
|
/**
|
7651
8704
|
* Deletes multiple records given an array of objects with ids.
|
7652
8705
|
* @param objects An array of objects with unique ids.
|
@@ -7666,13 +8719,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7666
8719
|
* @param columns Array of columns to be returned. If not specified, first level columns will be returned.
|
7667
8720
|
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
7668
8721
|
*/
|
7669
|
-
abstract delete<K extends SelectableColumn<Record>>(objects:
|
8722
|
+
abstract delete<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
7670
8723
|
/**
|
7671
8724
|
* Deletes multiple records given an array of unique ids.
|
7672
8725
|
* @param objects An array of ids.
|
7673
8726
|
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
7674
8727
|
*/
|
7675
|
-
abstract delete(objects:
|
8728
|
+
abstract delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
7676
8729
|
/**
|
7677
8730
|
* Deletes a record given its unique id.
|
7678
8731
|
* @param object An object with a unique id.
|
@@ -7695,14 +8748,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7695
8748
|
* @returns The deleted record, null if the record could not be found.
|
7696
8749
|
* @throws If the record could not be found.
|
7697
8750
|
*/
|
7698
|
-
abstract deleteOrThrow<K extends SelectableColumn<Record>>(id:
|
8751
|
+
abstract deleteOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7699
8752
|
/**
|
7700
8753
|
* Deletes a record given a unique id.
|
7701
8754
|
* @param id The unique id.
|
7702
8755
|
* @returns The deleted record, null if the record could not be found.
|
7703
8756
|
* @throws If the record could not be found.
|
7704
8757
|
*/
|
7705
|
-
abstract deleteOrThrow(id:
|
8758
|
+
abstract deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7706
8759
|
/**
|
7707
8760
|
* Deletes multiple records given an array of objects with ids.
|
7708
8761
|
* @param objects An array of objects with unique ids.
|
@@ -7725,14 +8778,14 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7725
8778
|
* @returns Array of the deleted records in order (if a record could not be found null is returned).
|
7726
8779
|
* @throws If one or more records could not be found.
|
7727
8780
|
*/
|
7728
|
-
abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects:
|
8781
|
+
abstract deleteOrThrow<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
7729
8782
|
/**
|
7730
8783
|
* Deletes multiple records given an array of unique ids.
|
7731
8784
|
* @param objects An array of ids.
|
7732
8785
|
* @returns Array of the deleted records in order.
|
7733
8786
|
* @throws If one or more records could not be found.
|
7734
8787
|
*/
|
7735
|
-
abstract deleteOrThrow(objects:
|
8788
|
+
abstract deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
7736
8789
|
/**
|
7737
8790
|
* Search for records in the table.
|
7738
8791
|
* @param query The query to search for.
|
@@ -7783,6 +8836,10 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7783
8836
|
* Experimental: Ask the database to perform a natural language question.
|
7784
8837
|
*/
|
7785
8838
|
abstract ask(question: string, options?: AskOptions<Record>): Promise<AskResult>;
|
8839
|
+
/**
|
8840
|
+
* Experimental: Ask the database to perform a natural language question.
|
8841
|
+
*/
|
8842
|
+
abstract ask(question: string, options: AskOptions<Record>): Promise<AskResult>;
|
7786
8843
|
/**
|
7787
8844
|
* Experimental: Ask the database to perform a natural language question.
|
7788
8845
|
*/
|
@@ -7805,26 +8862,26 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
|
|
7805
8862
|
create(object: EditableData<Record> & Partial<Identifiable>, options?: {
|
7806
8863
|
ifVersion?: number;
|
7807
8864
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7808
|
-
create<K extends SelectableColumn<Record>>(id:
|
8865
|
+
create<K extends SelectableColumn<Record>>(id: Identifier, object: EditableData<Record>, columns: K[], options?: {
|
7809
8866
|
ifVersion?: number;
|
7810
8867
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7811
|
-
create(id:
|
8868
|
+
create(id: Identifier, object: EditableData<Record>, options?: {
|
7812
8869
|
ifVersion?: number;
|
7813
8870
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7814
8871
|
create<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
7815
8872
|
create(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
7816
|
-
read<K extends SelectableColumn<Record>>(id:
|
8873
|
+
read<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
7817
8874
|
read(id: string): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
7818
|
-
read<K extends SelectableColumn<Record>>(ids:
|
7819
|
-
read(ids:
|
8875
|
+
read<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
8876
|
+
read(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
7820
8877
|
read<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns> | null>>;
|
7821
8878
|
read(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']> | null>>;
|
7822
8879
|
read<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
7823
8880
|
read(objects: Identifiable[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
7824
|
-
readOrThrow<K extends SelectableColumn<Record>>(id:
|
7825
|
-
readOrThrow(id:
|
7826
|
-
readOrThrow<K extends SelectableColumn<Record>>(ids:
|
7827
|
-
readOrThrow(ids:
|
8881
|
+
readOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8882
|
+
readOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
8883
|
+
readOrThrow<K extends SelectableColumn<Record>>(ids: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
8884
|
+
readOrThrow(ids: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
7828
8885
|
readOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7829
8886
|
readOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7830
8887
|
readOrThrow<K extends SelectableColumn<Record>>(objects: Identifiable[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
@@ -7835,10 +8892,10 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
|
|
7835
8892
|
update(object: Partial<EditableData<Record>> & Identifiable, options?: {
|
7836
8893
|
ifVersion?: number;
|
7837
8894
|
}): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
7838
|
-
update<K extends SelectableColumn<Record>>(id:
|
8895
|
+
update<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
|
7839
8896
|
ifVersion?: number;
|
7840
8897
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
7841
|
-
update(id:
|
8898
|
+
update(id: Identifier, object: Partial<EditableData<Record>>, options?: {
|
7842
8899
|
ifVersion?: number;
|
7843
8900
|
}): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
7844
8901
|
update<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
@@ -7849,58 +8906,58 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
|
|
7849
8906
|
updateOrThrow(object: Partial<EditableData<Record>> & Identifiable, options?: {
|
7850
8907
|
ifVersion?: number;
|
7851
8908
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7852
|
-
updateOrThrow<K extends SelectableColumn<Record>>(id:
|
8909
|
+
updateOrThrow<K extends SelectableColumn<Record>>(id: Identifier, object: Partial<EditableData<Record>>, columns: K[], options?: {
|
7853
8910
|
ifVersion?: number;
|
7854
8911
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7855
|
-
updateOrThrow(id:
|
8912
|
+
updateOrThrow(id: Identifier, object: Partial<EditableData<Record>>, options?: {
|
7856
8913
|
ifVersion?: number;
|
7857
8914
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7858
8915
|
updateOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
7859
8916
|
updateOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
7860
|
-
createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable
|
8917
|
+
createOrUpdate<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[], options?: {
|
7861
8918
|
ifVersion?: number;
|
7862
8919
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7863
|
-
createOrUpdate(object: EditableData<Record> & Identifiable
|
8920
|
+
createOrUpdate(object: EditableData<Record> & Partial<Identifiable>, options?: {
|
7864
8921
|
ifVersion?: number;
|
7865
8922
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7866
|
-
createOrUpdate<K extends SelectableColumn<Record>>(id:
|
8923
|
+
createOrUpdate<K extends SelectableColumn<Record>>(id: Identifier, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
|
7867
8924
|
ifVersion?: number;
|
7868
8925
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7869
|
-
createOrUpdate(id:
|
8926
|
+
createOrUpdate(id: Identifier, object: Omit<EditableData<Record>, 'id'>, options?: {
|
7870
8927
|
ifVersion?: number;
|
7871
8928
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7872
|
-
createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable
|
7873
|
-
createOrUpdate(objects: Array<EditableData<Record> & Identifiable
|
7874
|
-
createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Identifiable
|
8929
|
+
createOrUpdate<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
8930
|
+
createOrUpdate(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
8931
|
+
createOrReplace<K extends SelectableColumn<Record>>(object: EditableData<Record> & Partial<Identifiable>, columns: K[], options?: {
|
7875
8932
|
ifVersion?: number;
|
7876
8933
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7877
|
-
createOrReplace(object: EditableData<Record> & Identifiable
|
8934
|
+
createOrReplace(object: EditableData<Record> & Partial<Identifiable>, options?: {
|
7878
8935
|
ifVersion?: number;
|
7879
8936
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7880
|
-
createOrReplace<K extends SelectableColumn<Record>>(id:
|
8937
|
+
createOrReplace<K extends SelectableColumn<Record>>(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, columns: K[], options?: {
|
7881
8938
|
ifVersion?: number;
|
7882
8939
|
}): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7883
|
-
createOrReplace(id:
|
8940
|
+
createOrReplace(id: Identifier | undefined, object: Omit<EditableData<Record>, 'id'>, options?: {
|
7884
8941
|
ifVersion?: number;
|
7885
8942
|
}): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7886
|
-
createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Identifiable
|
7887
|
-
createOrReplace(objects: Array<EditableData<Record> & Identifiable
|
8943
|
+
createOrReplace<K extends SelectableColumn<Record>>(objects: Array<EditableData<Record> & Partial<Identifiable>>, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>[]>;
|
8944
|
+
createOrReplace(objects: Array<EditableData<Record> & Partial<Identifiable>>): Promise<Readonly<SelectedPick<Record, ['*']>>[]>;
|
7888
8945
|
delete<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
7889
8946
|
delete(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
7890
|
-
delete<K extends SelectableColumn<Record>>(id:
|
7891
|
-
delete(id:
|
8947
|
+
delete<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>> | null>;
|
8948
|
+
delete(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>> | null>;
|
7892
8949
|
delete<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
7893
8950
|
delete(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
7894
|
-
delete<K extends SelectableColumn<Record>>(objects:
|
7895
|
-
delete(objects:
|
8951
|
+
delete<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>> | null>>;
|
8952
|
+
delete(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>> | null>>;
|
7896
8953
|
deleteOrThrow<K extends SelectableColumn<Record>>(object: Identifiable, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
7897
8954
|
deleteOrThrow(object: Identifiable): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7898
|
-
deleteOrThrow<K extends SelectableColumn<Record>>(id:
|
7899
|
-
deleteOrThrow(id:
|
8955
|
+
deleteOrThrow<K extends SelectableColumn<Record>>(id: Identifier, columns: K[]): Promise<Readonly<SelectedPick<Record, typeof columns>>>;
|
8956
|
+
deleteOrThrow(id: Identifier): Promise<Readonly<SelectedPick<Record, ['*']>>>;
|
7900
8957
|
deleteOrThrow<K extends SelectableColumn<Record>>(objects: Array<Partial<EditableData<Record>> & Identifiable>, columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
7901
8958
|
deleteOrThrow(objects: Array<Partial<EditableData<Record>> & Identifiable>): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
7902
|
-
deleteOrThrow<K extends SelectableColumn<Record>>(objects:
|
7903
|
-
deleteOrThrow(objects:
|
8959
|
+
deleteOrThrow<K extends SelectableColumn<Record>>(objects: Identifier[], columns: K[]): Promise<Array<Readonly<SelectedPick<Record, typeof columns>>>>;
|
8960
|
+
deleteOrThrow(objects: Identifier[]): Promise<Array<Readonly<SelectedPick<Record, ['*']>>>>;
|
7904
8961
|
search(query: string, options?: {
|
7905
8962
|
fuzziness?: FuzzinessExpression;
|
7906
8963
|
prefix?: PrefixExpression;
|
@@ -7976,7 +9033,7 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
|
|
7976
9033
|
} : {
|
7977
9034
|
[K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
|
7978
9035
|
} : never : never;
|
7979
|
-
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 {
|
9036
|
+
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 {
|
7980
9037
|
name: string;
|
7981
9038
|
type: string;
|
7982
9039
|
} ? UnionToIntersection<Values<{
|
@@ -8034,11 +9091,11 @@ declare const le: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
|
|
8034
9091
|
/**
|
8035
9092
|
* Operator to restrict results to only values that are not null.
|
8036
9093
|
*/
|
8037
|
-
declare const exists: <T>(column?:
|
9094
|
+
declare const exists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
|
8038
9095
|
/**
|
8039
9096
|
* Operator to restrict results to only values that are null.
|
8040
9097
|
*/
|
8041
|
-
declare const notExists: <T>(column?:
|
9098
|
+
declare const notExists: <T>(column?: FilterColumns<T> | undefined) => ExistanceFilter<T>;
|
8042
9099
|
/**
|
8043
9100
|
* Operator to restrict results to only values that start with the given prefix.
|
8044
9101
|
*/
|
@@ -8096,6 +9153,54 @@ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends X
|
|
8096
9153
|
build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
|
8097
9154
|
}
|
8098
9155
|
|
9156
|
+
type BinaryFile = string | Blob | ArrayBuffer;
|
9157
|
+
type FilesPluginResult<Schemas extends Record<string, BaseData>> = {
|
9158
|
+
download: <Tables extends StringKeys<Schemas>>(location: DownloadDestination<Schemas, Tables>) => Promise<Blob>;
|
9159
|
+
upload: <Tables extends StringKeys<Schemas>>(location: UploadDestination<Schemas, Tables>, file: BinaryFile) => Promise<FileResponse>;
|
9160
|
+
delete: <Tables extends StringKeys<Schemas>>(location: DownloadDestination<Schemas, Tables>) => Promise<FileResponse>;
|
9161
|
+
};
|
9162
|
+
type UploadDestination<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = Values<{
|
9163
|
+
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
9164
|
+
table: Model;
|
9165
|
+
column: ColumnsByValue<Schemas[Model], XataFile>;
|
9166
|
+
record: string;
|
9167
|
+
} | {
|
9168
|
+
table: Model;
|
9169
|
+
column: ColumnsByValue<Schemas[Model], XataArrayFile[]>;
|
9170
|
+
record: string;
|
9171
|
+
fileId?: string;
|
9172
|
+
};
|
9173
|
+
}>;
|
9174
|
+
type DownloadDestination<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = Values<{
|
9175
|
+
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
9176
|
+
table: Model;
|
9177
|
+
column: ColumnsByValue<Schemas[Model], XataFile>;
|
9178
|
+
record: string;
|
9179
|
+
} | {
|
9180
|
+
table: Model;
|
9181
|
+
column: ColumnsByValue<Schemas[Model], XataArrayFile[]>;
|
9182
|
+
record: string;
|
9183
|
+
fileId: string;
|
9184
|
+
};
|
9185
|
+
}>;
|
9186
|
+
declare class FilesPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
9187
|
+
build(pluginOptions: XataPluginOptions): FilesPluginResult<Schemas>;
|
9188
|
+
}
|
9189
|
+
|
9190
|
+
type SQLQueryParams<T = any[]> = {
|
9191
|
+
statement: string;
|
9192
|
+
params?: T;
|
9193
|
+
consistency?: 'strong' | 'eventual';
|
9194
|
+
};
|
9195
|
+
type SQLQuery = TemplateStringsArray | SQLQueryParams | string;
|
9196
|
+
type SQLPluginResult = <T>(query: SQLQuery, ...parameters: any[]) => Promise<{
|
9197
|
+
records: T[];
|
9198
|
+
warning?: string;
|
9199
|
+
}>;
|
9200
|
+
declare class SQLPlugin extends XataPlugin {
|
9201
|
+
build(pluginOptions: XataPluginOptions): SQLPluginResult;
|
9202
|
+
}
|
9203
|
+
|
8099
9204
|
type TransactionOperation<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
|
8100
9205
|
insert: Values<{
|
8101
9206
|
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
@@ -8128,6 +9233,7 @@ type UpdateTransactionOperation<O extends XataRecord> = {
|
|
8128
9233
|
};
|
8129
9234
|
type DeleteTransactionOperation = {
|
8130
9235
|
id: string;
|
9236
|
+
failIfMissing?: boolean;
|
8131
9237
|
};
|
8132
9238
|
type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Table>> = Operation extends {
|
8133
9239
|
insert: {
|
@@ -8195,6 +9301,8 @@ interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
|
8195
9301
|
db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
|
8196
9302
|
search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
|
8197
9303
|
transactions: Awaited<ReturnType<TransactionPlugin<Schemas>['build']>>;
|
9304
|
+
sql: Awaited<ReturnType<SQLPlugin['build']>>;
|
9305
|
+
files: Awaited<ReturnType<FilesPlugin<Schemas>['build']>>;
|
8198
9306
|
}, keyof Plugins> & {
|
8199
9307
|
[Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
|
8200
9308
|
} & {
|
@@ -8235,20 +9343,20 @@ declare function getPreviewBranch(): string | undefined;
|
|
8235
9343
|
|
8236
9344
|
interface Body {
|
8237
9345
|
arrayBuffer(): Promise<ArrayBuffer>;
|
8238
|
-
blob(): Promise<Blob>;
|
9346
|
+
blob(): Promise<Blob$1>;
|
8239
9347
|
formData(): Promise<FormData>;
|
8240
9348
|
json(): Promise<any>;
|
8241
9349
|
text(): Promise<string>;
|
8242
9350
|
}
|
8243
|
-
interface Blob {
|
9351
|
+
interface Blob$1 {
|
8244
9352
|
readonly size: number;
|
8245
9353
|
readonly type: string;
|
8246
9354
|
arrayBuffer(): Promise<ArrayBuffer>;
|
8247
|
-
slice(start?: number, end?: number, contentType?: string): Blob;
|
9355
|
+
slice(start?: number, end?: number, contentType?: string): Blob$1;
|
8248
9356
|
text(): Promise<string>;
|
8249
9357
|
}
|
8250
9358
|
/** Provides information about files and allows JavaScript in a web page to access their content. */
|
8251
|
-
interface File extends Blob {
|
9359
|
+
interface File extends Blob$1 {
|
8252
9360
|
readonly lastModified: number;
|
8253
9361
|
readonly name: string;
|
8254
9362
|
readonly webkitRelativePath: string;
|
@@ -8256,12 +9364,12 @@ interface File extends Blob {
|
|
8256
9364
|
type FormDataEntryValue = File | string;
|
8257
9365
|
/** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */
|
8258
9366
|
interface FormData {
|
8259
|
-
append(name: string, value: string | Blob, fileName?: string): void;
|
9367
|
+
append(name: string, value: string | Blob$1, fileName?: string): void;
|
8260
9368
|
delete(name: string): void;
|
8261
9369
|
get(name: string): FormDataEntryValue | null;
|
8262
9370
|
getAll(name: string): FormDataEntryValue[];
|
8263
9371
|
has(name: string): boolean;
|
8264
|
-
set(name: string, value: string | Blob, fileName?: string): void;
|
9372
|
+
set(name: string, value: string | Blob$1, fileName?: string): void;
|
8265
9373
|
forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
|
8266
9374
|
}
|
8267
9375
|
/** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
|
@@ -8318,4 +9426,4 @@ declare class XataError extends Error {
|
|
8318
9426
|
constructor(message: string, status: number);
|
8319
9427
|
}
|
8320
9428
|
|
8321
|
-
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, 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, 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, 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, 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, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, 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, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, 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, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|
9429
|
+
export { type AcceptWorkspaceMemberInviteError, type AcceptWorkspaceMemberInvitePathParams, type AcceptWorkspaceMemberInviteVariables, type AddGitBranchesEntryError, type AddGitBranchesEntryPathParams, type AddGitBranchesEntryRequestBody, type AddGitBranchesEntryResponse, type AddGitBranchesEntryVariables, type AddTableColumnError, type AddTableColumnPathParams, type AddTableColumnVariables, type AggregateTableError, type AggregateTablePathParams, type AggregateTableRequestBody, type AggregateTableVariables, type ApiExtraProps, type ApplyBranchSchemaEditError, type ApplyBranchSchemaEditPathParams, type ApplyBranchSchemaEditRequestBody, type ApplyBranchSchemaEditVariables, type AskOptions, type AskResult, type AskTableError, type AskTablePathParams, type AskTableRequestBody, type AskTableResponse, type AskTableSessionError, type AskTableSessionPathParams, type AskTableSessionRequestBody, type AskTableSessionResponse, type AskTableSessionVariables, type AskTableVariables, BaseClient, type BaseClientOptions, type BaseData, type BaseSchema, type BinaryFile, type BranchTransactionError, type BranchTransactionPathParams, type BranchTransactionRequestBody, type BranchTransactionVariables, type BulkInsertTableRecordsError, type BulkInsertTableRecordsPathParams, type BulkInsertTableRecordsQueryParams, type BulkInsertTableRecordsRequestBody, type BulkInsertTableRecordsVariables, type CacheImpl, type CancelWorkspaceMemberInviteError, type CancelWorkspaceMemberInvitePathParams, type CancelWorkspaceMemberInviteVariables, type ClientConstructor, type ColumnsByValue, type CompareBranchSchemasError, type CompareBranchSchemasPathParams, type CompareBranchSchemasRequestBody, type CompareBranchSchemasVariables, type CompareBranchWithUserSchemaError, type CompareBranchWithUserSchemaPathParams, type CompareBranchWithUserSchemaRequestBody, type CompareBranchWithUserSchemaVariables, type CompareMigrationRequestError, type CompareMigrationRequestPathParams, type CompareMigrationRequestVariables, type CopyBranchError, type CopyBranchPathParams, type CopyBranchRequestBody, type CopyBranchVariables, type CreateBranchError, type CreateBranchPathParams, type CreateBranchQueryParams, type CreateBranchRequestBody, type CreateBranchResponse, type CreateBranchVariables, type CreateDatabaseError, type CreateDatabasePathParams, type CreateDatabaseRequestBody, type CreateDatabaseResponse, type CreateDatabaseVariables, type CreateMigrationRequestError, type CreateMigrationRequestPathParams, type CreateMigrationRequestRequestBody, type CreateMigrationRequestResponse, type CreateMigrationRequestVariables, type CreateTableError, type CreateTablePathParams, type CreateTableResponse, type CreateTableVariables, type CreateUserAPIKeyError, type CreateUserAPIKeyPathParams, type CreateUserAPIKeyResponse, type CreateUserAPIKeyVariables, type CreateWorkspaceError, type CreateWorkspaceVariables, type CursorNavigationOptions, type DeleteBranchError, type DeleteBranchPathParams, type DeleteBranchResponse, type DeleteBranchVariables, type DeleteColumnError, type DeleteColumnPathParams, type DeleteColumnVariables, type DeleteDatabaseError, type DeleteDatabaseGithubSettingsError, type DeleteDatabaseGithubSettingsPathParams, type DeleteDatabaseGithubSettingsVariables, type DeleteDatabasePathParams, type DeleteDatabaseResponse, type DeleteDatabaseVariables, type DeleteFileError, type DeleteFileItemError, type DeleteFileItemPathParams, type DeleteFileItemVariables, type DeleteFilePathParams, type DeleteFileVariables, type DeleteOAuthAccessTokenError, type DeleteOAuthAccessTokenPathParams, type DeleteOAuthAccessTokenVariables, type DeleteRecordError, type DeleteRecordPathParams, type DeleteRecordQueryParams, type DeleteRecordVariables, type DeleteTableError, type DeleteTablePathParams, type DeleteTableResponse, type DeleteTableVariables, type DeleteUserAPIKeyError, type DeleteUserAPIKeyPathParams, type DeleteUserAPIKeyVariables, type DeleteUserError, type DeleteUserOAuthClientError, type DeleteUserOAuthClientPathParams, type DeleteUserOAuthClientVariables, type DeleteUserVariables, type DeleteWorkspaceError, type DeleteWorkspacePathParams, type DeleteWorkspaceVariables, type DeserializedType, type DownloadDestination, type EditableData, type ExecuteBranchMigrationPlanError, type ExecuteBranchMigrationPlanPathParams, type ExecuteBranchMigrationPlanRequestBody, type ExecuteBranchMigrationPlanVariables, type FetchImpl, FetcherError, type FetcherExtraProps, type FileAccessError, type FileAccessPathParams, type FileAccessQueryParams, type FileAccessVariables, FilesPlugin, type FilesPluginResult, type GetAuthorizationCodeError, type GetAuthorizationCodeQueryParams, type GetAuthorizationCodeVariables, type GetBranchDetailsError, type GetBranchDetailsPathParams, type GetBranchDetailsVariables, type GetBranchListError, type GetBranchListPathParams, type GetBranchListVariables, type GetBranchMetadataError, type GetBranchMetadataPathParams, type GetBranchMetadataVariables, type GetBranchMigrationHistoryError, type GetBranchMigrationHistoryPathParams, type GetBranchMigrationHistoryRequestBody, type GetBranchMigrationHistoryResponse, type GetBranchMigrationHistoryVariables, type GetBranchMigrationPlanError, type GetBranchMigrationPlanPathParams, type GetBranchMigrationPlanVariables, type GetBranchSchemaHistoryError, type GetBranchSchemaHistoryPathParams, type GetBranchSchemaHistoryRequestBody, type GetBranchSchemaHistoryResponse, type GetBranchSchemaHistoryVariables, type GetBranchStatsError, type GetBranchStatsPathParams, type GetBranchStatsResponse, type GetBranchStatsVariables, type GetColumnError, type GetColumnPathParams, type GetColumnVariables, type GetDatabaseGithubSettingsError, type GetDatabaseGithubSettingsPathParams, type GetDatabaseGithubSettingsVariables, type GetDatabaseListError, type GetDatabaseListPathParams, type GetDatabaseListVariables, type GetDatabaseMetadataError, type GetDatabaseMetadataPathParams, type GetDatabaseMetadataVariables, type GetFileError, type GetFileItemError, type GetFileItemPathParams, type GetFileItemVariables, type GetFilePathParams, type GetFileVariables, type GetGitBranchesMappingError, type GetGitBranchesMappingPathParams, type GetGitBranchesMappingVariables, type GetMigrationRequestError, type GetMigrationRequestIsMergedError, type GetMigrationRequestIsMergedPathParams, type GetMigrationRequestIsMergedResponse, type GetMigrationRequestIsMergedVariables, type GetMigrationRequestPathParams, type GetMigrationRequestVariables, type GetRecordError, type GetRecordPathParams, type GetRecordQueryParams, type GetRecordVariables, type GetTableColumnsError, type GetTableColumnsPathParams, type GetTableColumnsResponse, type GetTableColumnsVariables, type GetTableSchemaError, type GetTableSchemaPathParams, type GetTableSchemaResponse, type GetTableSchemaVariables, type GetUserAPIKeysError, type GetUserAPIKeysResponse, type GetUserAPIKeysVariables, type GetUserError, type GetUserOAuthAccessTokensError, type GetUserOAuthAccessTokensResponse, type GetUserOAuthAccessTokensVariables, type GetUserOAuthClientsError, type GetUserOAuthClientsResponse, type GetUserOAuthClientsVariables, type GetUserVariables, type GetWorkspaceError, type GetWorkspaceMembersListError, type GetWorkspaceMembersListPathParams, type GetWorkspaceMembersListVariables, type GetWorkspacePathParams, type GetWorkspaceVariables, type GetWorkspacesListError, type GetWorkspacesListResponse, type GetWorkspacesListVariables, type GrantAuthorizationCodeError, type GrantAuthorizationCodeVariables, type HostProvider, type Identifiable, type InsertRecordError, type InsertRecordPathParams, type InsertRecordQueryParams, type InsertRecordVariables, type InsertRecordWithIDError, type InsertRecordWithIDPathParams, type InsertRecordWithIDQueryParams, type InsertRecordWithIDVariables, type InviteWorkspaceMemberError, type InviteWorkspaceMemberPathParams, type InviteWorkspaceMemberRequestBody, type InviteWorkspaceMemberVariables, type JSONData, type KeywordAskOptions, type Link, type ListMigrationRequestsCommitsError, type ListMigrationRequestsCommitsPathParams, type ListMigrationRequestsCommitsRequestBody, type ListMigrationRequestsCommitsResponse, type ListMigrationRequestsCommitsVariables, type ListRegionsError, type ListRegionsPathParams, type ListRegionsVariables, type MergeMigrationRequestError, type MergeMigrationRequestPathParams, type MergeMigrationRequestVariables, type OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, type Paginable, type PaginationQueryMeta, type PreviewBranchSchemaEditError, type PreviewBranchSchemaEditPathParams, type PreviewBranchSchemaEditRequestBody, type PreviewBranchSchemaEditResponse, type PreviewBranchSchemaEditVariables, type PushBranchMigrationsError, type PushBranchMigrationsPathParams, type PushBranchMigrationsRequestBody, type PushBranchMigrationsVariables, type PutFileError, type PutFileItemError, type PutFileItemPathParams, type PutFileItemVariables, type PutFilePathParams, type PutFileVariables, Query, type QueryMigrationRequestsError, type QueryMigrationRequestsPathParams, type QueryMigrationRequestsRequestBody, type QueryMigrationRequestsResponse, type QueryMigrationRequestsVariables, type QueryTableError, type QueryTablePathParams, type QueryTableRequestBody, type QueryTableVariables, RecordArray, RecordColumnTypes, type RemoveGitBranchesEntryError, type RemoveGitBranchesEntryPathParams, type RemoveGitBranchesEntryQueryParams, type RemoveGitBranchesEntryVariables, type RemoveWorkspaceMemberError, type RemoveWorkspaceMemberPathParams, type RemoveWorkspaceMemberVariables, type RenameDatabaseError, type RenameDatabasePathParams, type RenameDatabaseRequestBody, type RenameDatabaseVariables, Repository, type ResendWorkspaceMemberInviteError, type ResendWorkspaceMemberInvitePathParams, type ResendWorkspaceMemberInviteVariables, type ResolveBranchError, type ResolveBranchPathParams, type ResolveBranchQueryParams, type ResolveBranchResponse, type ResolveBranchVariables, responses as Responses, RestRepository, SQLPlugin, type SQLPluginResult, type SQLQuery, type SQLQueryParams, type SchemaDefinition, type SchemaInference, SchemaPlugin, type SchemaPluginResult, schemas as Schemas, type SearchBranchError, type SearchBranchPathParams, type SearchBranchRequestBody, type SearchBranchVariables, type SearchOptions, SearchPlugin, type SearchPluginResult, type SearchTableError, type SearchTablePathParams, type SearchTableRequestBody, type SearchTableVariables, type SearchXataRecord, type SelectableColumn, type SelectedPick, type SerializedString, Serializer, type SerializerResult, type SetTableSchemaError, type SetTableSchemaPathParams, type SetTableSchemaRequestBody, type SetTableSchemaVariables, SimpleCache, type SimpleCacheOptions, type SqlQueryError, type SqlQueryPathParams, type SqlQueryRequestBody, type SqlQueryVariables, type SummarizeTableError, type SummarizeTablePathParams, type SummarizeTableRequestBody, type SummarizeTableVariables, type UpdateBranchMetadataError, type UpdateBranchMetadataPathParams, type UpdateBranchMetadataVariables, type UpdateBranchSchemaError, type UpdateBranchSchemaPathParams, type UpdateBranchSchemaVariables, type UpdateColumnError, type UpdateColumnPathParams, type UpdateColumnRequestBody, type UpdateColumnVariables, type UpdateDatabaseGithubSettingsError, type UpdateDatabaseGithubSettingsPathParams, type UpdateDatabaseGithubSettingsVariables, type UpdateDatabaseMetadataError, type UpdateDatabaseMetadataPathParams, type UpdateDatabaseMetadataRequestBody, type UpdateDatabaseMetadataVariables, type UpdateMigrationRequestError, type UpdateMigrationRequestPathParams, type UpdateMigrationRequestRequestBody, type UpdateMigrationRequestVariables, type UpdateOAuthAccessTokenError, type UpdateOAuthAccessTokenPathParams, type UpdateOAuthAccessTokenRequestBody, type UpdateOAuthAccessTokenVariables, type UpdateRecordWithIDError, type UpdateRecordWithIDPathParams, type UpdateRecordWithIDQueryParams, type UpdateRecordWithIDVariables, type UpdateTableError, type UpdateTablePathParams, type UpdateTableRequestBody, type UpdateTableVariables, type UpdateUserError, type UpdateUserVariables, type UpdateWorkspaceError, type UpdateWorkspaceMemberInviteError, type UpdateWorkspaceMemberInvitePathParams, type UpdateWorkspaceMemberInviteRequestBody, type UpdateWorkspaceMemberInviteVariables, type UpdateWorkspaceMemberRoleError, type UpdateWorkspaceMemberRolePathParams, type UpdateWorkspaceMemberRoleRequestBody, type UpdateWorkspaceMemberRoleVariables, type UpdateWorkspacePathParams, type UpdateWorkspaceVariables, type UploadDestination, type UpsertRecordWithIDError, type UpsertRecordWithIDPathParams, type UpsertRecordWithIDQueryParams, type UpsertRecordWithIDVariables, type ValueAtColumn, type VectorAskOptions, type VectorSearchTableError, type VectorSearchTablePathParams, type VectorSearchTableRequestBody, type VectorSearchTableVariables, XataApiClient, type XataApiClientOptions, XataApiPlugin, type XataArrayFile, XataError, XataFile, XataPlugin, type XataPluginOptions, type XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteOAuthAccessToken, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteUserOAuthClient, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, ge, getAPIKey, getAuthorizationCode, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, 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, transformImage, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|