@xata.io/client 0.0.0-alpha.vf6f217e → 0.0.0-alpha.vf70b95a
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/.eslintrc.cjs +3 -2
- package/.turbo/turbo-add-version.log +4 -0
- package/.turbo/turbo-build.log +13 -0
- package/CHANGELOG.md +106 -0
- package/README.md +3 -269
- package/dist/index.cjs +793 -276
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2167 -1191
- package/dist/index.mjs +775 -270
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -8
- package/rollup.config.mjs +28 -13
- package/Usage.md +0 -451
package/dist/index.d.ts
CHANGED
@@ -22,21 +22,20 @@ declare class SimpleCache implements CacheImpl {
|
|
22
22
|
clear(): Promise<void>;
|
23
23
|
}
|
24
24
|
|
25
|
+
declare abstract class XataPlugin {
|
26
|
+
abstract build(options: XataPluginOptions): unknown;
|
27
|
+
}
|
28
|
+
type XataPluginOptions = ApiExtraProps & {
|
29
|
+
cache: CacheImpl;
|
30
|
+
host: HostProvider;
|
31
|
+
};
|
32
|
+
|
25
33
|
type AttributeDictionary = Record<string, string | number | boolean | undefined>;
|
26
34
|
type TraceFunction = <T>(name: string, fn: (options: {
|
27
35
|
name?: string;
|
28
36
|
setAttributes: (attrs: AttributeDictionary) => void;
|
29
37
|
}) => T, options?: AttributeDictionary) => Promise<T>;
|
30
38
|
|
31
|
-
declare abstract class XataPlugin {
|
32
|
-
abstract build(options: XataPluginOptions): unknown | Promise<unknown>;
|
33
|
-
}
|
34
|
-
type XataPluginOptions = {
|
35
|
-
getFetchProps: () => Promise<ApiExtraProps>;
|
36
|
-
cache: CacheImpl;
|
37
|
-
trace?: TraceFunction;
|
38
|
-
};
|
39
|
-
|
40
39
|
type RequestInit = {
|
41
40
|
body?: string;
|
42
41
|
headers?: Record<string, string>;
|
@@ -54,31 +53,47 @@ type Response = {
|
|
54
53
|
};
|
55
54
|
type FetchImpl = (url: string, init?: RequestInit) => Promise<Response>;
|
56
55
|
|
56
|
+
declare class ErrorWithCause extends Error {
|
57
|
+
cause?: Error;
|
58
|
+
constructor(message?: string, options?: {
|
59
|
+
cause?: Error;
|
60
|
+
});
|
61
|
+
}
|
62
|
+
declare class FetcherError extends ErrorWithCause {
|
63
|
+
status: number | string;
|
64
|
+
requestId: string | undefined;
|
65
|
+
errors: BulkError['errors'] | undefined;
|
66
|
+
constructor(status: number, data?: unknown, requestId?: string);
|
67
|
+
toString(): string;
|
68
|
+
}
|
69
|
+
|
57
70
|
type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
|
58
71
|
type FetcherExtraProps = {
|
59
72
|
endpoint: 'controlPlane' | 'dataPlane';
|
60
73
|
apiUrl: string;
|
61
74
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
62
|
-
|
75
|
+
fetch: FetchImpl;
|
63
76
|
apiKey: string;
|
64
77
|
trace: TraceFunction;
|
65
78
|
signal?: AbortSignal;
|
66
79
|
clientID?: string;
|
67
80
|
sessionID?: string;
|
68
81
|
clientName?: string;
|
82
|
+
xataAgentExtra?: Record<string, string>;
|
69
83
|
fetchOptions?: Record<string, unknown>;
|
70
84
|
};
|
71
85
|
|
72
86
|
type ControlPlaneFetcherExtraProps = {
|
73
87
|
apiUrl: string;
|
74
88
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
75
|
-
|
89
|
+
fetch: FetchImpl;
|
76
90
|
apiKey: string;
|
77
91
|
trace: TraceFunction;
|
78
92
|
signal?: AbortSignal;
|
79
93
|
clientID?: string;
|
80
94
|
sessionID?: string;
|
81
95
|
clientName?: string;
|
96
|
+
xataAgentExtra?: Record<string, string>;
|
82
97
|
};
|
83
98
|
type ErrorWrapper$1<TError> = TError | {
|
84
99
|
status: 'unknown';
|
@@ -181,6 +196,10 @@ type DatabaseMetadata = {
|
|
181
196
|
* The time this database was created
|
182
197
|
*/
|
183
198
|
createdAt: DateTime$1;
|
199
|
+
/**
|
200
|
+
* @x-internal true
|
201
|
+
*/
|
202
|
+
newMigrations?: boolean;
|
184
203
|
/**
|
185
204
|
* Metadata about the database for display in Xata user interfaces
|
186
205
|
*/
|
@@ -197,6 +216,18 @@ type ListDatabasesResponse = {
|
|
197
216
|
*/
|
198
217
|
databases: DatabaseMetadata[];
|
199
218
|
};
|
219
|
+
/**
|
220
|
+
* @maxLength 255
|
221
|
+
* @minLength 1
|
222
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
223
|
+
*/
|
224
|
+
type DBName$1 = string;
|
225
|
+
/**
|
226
|
+
* @maxLength 255
|
227
|
+
* @minLength 1
|
228
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
229
|
+
*/
|
230
|
+
type BranchName$1 = string;
|
200
231
|
/**
|
201
232
|
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
|
202
233
|
* @x-go-type xata.BranchMetadata
|
@@ -213,34 +244,35 @@ type BranchMetadata$1 = {
|
|
213
244
|
stage?: string;
|
214
245
|
labels?: string[];
|
215
246
|
};
|
247
|
+
type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
|
216
248
|
/**
|
217
|
-
*
|
218
|
-
*/
|
219
|
-
type BranchName$1 = string;
|
220
|
-
/**
|
221
|
-
* @pattern [a-zA-Z0-9_\-~]+
|
249
|
+
* Github repository settings for this database (optional)
|
222
250
|
*/
|
223
|
-
type
|
224
|
-
type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
|
225
|
-
type ListRegionsResponse = {
|
251
|
+
type DatabaseGithubSettings = {
|
226
252
|
/**
|
227
|
-
*
|
253
|
+
* Repository owner (user or organization)
|
228
254
|
*/
|
229
|
-
|
255
|
+
owner: string;
|
256
|
+
/**
|
257
|
+
* Repository name
|
258
|
+
*/
|
259
|
+
repo: string;
|
230
260
|
};
|
231
261
|
type Region = {
|
232
262
|
id: string;
|
233
263
|
};
|
264
|
+
type ListRegionsResponse = {
|
265
|
+
/**
|
266
|
+
* A list of regions where databases can be created
|
267
|
+
*/
|
268
|
+
regions: Region[];
|
269
|
+
};
|
234
270
|
|
235
271
|
/**
|
236
272
|
* Generated by @openapi-codegen
|
237
273
|
*
|
238
274
|
* @version 1.0
|
239
275
|
*/
|
240
|
-
type SimpleError$1 = {
|
241
|
-
id?: string;
|
242
|
-
message: string;
|
243
|
-
};
|
244
276
|
type BadRequestError$1 = {
|
245
277
|
id?: string;
|
246
278
|
message: string;
|
@@ -252,6 +284,10 @@ type AuthError$1 = {
|
|
252
284
|
id?: string;
|
253
285
|
message: string;
|
254
286
|
};
|
287
|
+
type SimpleError$1 = {
|
288
|
+
id?: string;
|
289
|
+
message: string;
|
290
|
+
};
|
255
291
|
|
256
292
|
/**
|
257
293
|
* Generated by @openapi-codegen
|
@@ -787,6 +823,12 @@ type CreateDatabaseError = ErrorWrapper$1<{
|
|
787
823
|
} | {
|
788
824
|
status: 401;
|
789
825
|
payload: AuthError$1;
|
826
|
+
} | {
|
827
|
+
status: 422;
|
828
|
+
payload: SimpleError$1;
|
829
|
+
} | {
|
830
|
+
status: 423;
|
831
|
+
payload: SimpleError$1;
|
790
832
|
}>;
|
791
833
|
type CreateDatabaseResponse = {
|
792
834
|
/**
|
@@ -911,6 +953,128 @@ type UpdateDatabaseMetadataVariables = {
|
|
911
953
|
* Update the color of the selected database
|
912
954
|
*/
|
913
955
|
declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
|
956
|
+
type RenameDatabasePathParams = {
|
957
|
+
/**
|
958
|
+
* Workspace ID
|
959
|
+
*/
|
960
|
+
workspaceId: WorkspaceID;
|
961
|
+
/**
|
962
|
+
* The Database Name
|
963
|
+
*/
|
964
|
+
dbName: DBName$1;
|
965
|
+
};
|
966
|
+
type RenameDatabaseError = ErrorWrapper$1<{
|
967
|
+
status: 400;
|
968
|
+
payload: BadRequestError$1;
|
969
|
+
} | {
|
970
|
+
status: 401;
|
971
|
+
payload: AuthError$1;
|
972
|
+
} | {
|
973
|
+
status: 422;
|
974
|
+
payload: SimpleError$1;
|
975
|
+
} | {
|
976
|
+
status: 423;
|
977
|
+
payload: SimpleError$1;
|
978
|
+
}>;
|
979
|
+
type RenameDatabaseRequestBody = {
|
980
|
+
/**
|
981
|
+
* @minLength 1
|
982
|
+
*/
|
983
|
+
newName: string;
|
984
|
+
};
|
985
|
+
type RenameDatabaseVariables = {
|
986
|
+
body: RenameDatabaseRequestBody;
|
987
|
+
pathParams: RenameDatabasePathParams;
|
988
|
+
} & ControlPlaneFetcherExtraProps;
|
989
|
+
/**
|
990
|
+
* Change the name of an existing database
|
991
|
+
*/
|
992
|
+
declare const renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
|
993
|
+
type GetDatabaseGithubSettingsPathParams = {
|
994
|
+
/**
|
995
|
+
* Workspace ID
|
996
|
+
*/
|
997
|
+
workspaceId: WorkspaceID;
|
998
|
+
/**
|
999
|
+
* The Database Name
|
1000
|
+
*/
|
1001
|
+
dbName: DBName$1;
|
1002
|
+
};
|
1003
|
+
type GetDatabaseGithubSettingsError = ErrorWrapper$1<{
|
1004
|
+
status: 400;
|
1005
|
+
payload: BadRequestError$1;
|
1006
|
+
} | {
|
1007
|
+
status: 401;
|
1008
|
+
payload: AuthError$1;
|
1009
|
+
} | {
|
1010
|
+
status: 404;
|
1011
|
+
payload: SimpleError$1;
|
1012
|
+
}>;
|
1013
|
+
type GetDatabaseGithubSettingsVariables = {
|
1014
|
+
pathParams: GetDatabaseGithubSettingsPathParams;
|
1015
|
+
} & ControlPlaneFetcherExtraProps;
|
1016
|
+
/**
|
1017
|
+
* Retrieve current Github database settings
|
1018
|
+
*/
|
1019
|
+
declare const getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<DatabaseGithubSettings>;
|
1020
|
+
type UpdateDatabaseGithubSettingsPathParams = {
|
1021
|
+
/**
|
1022
|
+
* Workspace ID
|
1023
|
+
*/
|
1024
|
+
workspaceId: WorkspaceID;
|
1025
|
+
/**
|
1026
|
+
* The Database Name
|
1027
|
+
*/
|
1028
|
+
dbName: DBName$1;
|
1029
|
+
};
|
1030
|
+
type UpdateDatabaseGithubSettingsError = ErrorWrapper$1<{
|
1031
|
+
status: 400;
|
1032
|
+
payload: BadRequestError$1;
|
1033
|
+
} | {
|
1034
|
+
status: 401;
|
1035
|
+
payload: AuthError$1;
|
1036
|
+
} | {
|
1037
|
+
status: 422;
|
1038
|
+
payload: SimpleError$1;
|
1039
|
+
} | {
|
1040
|
+
status: 423;
|
1041
|
+
payload: SimpleError$1;
|
1042
|
+
}>;
|
1043
|
+
type UpdateDatabaseGithubSettingsVariables = {
|
1044
|
+
body: DatabaseGithubSettings;
|
1045
|
+
pathParams: UpdateDatabaseGithubSettingsPathParams;
|
1046
|
+
} & ControlPlaneFetcherExtraProps;
|
1047
|
+
/**
|
1048
|
+
* Map the database to a Github repository, Xata will create database branch previews for all new branches/PRs in the repo.
|
1049
|
+
*/
|
1050
|
+
declare const updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<DatabaseGithubSettings>;
|
1051
|
+
type DeleteDatabaseGithubSettingsPathParams = {
|
1052
|
+
/**
|
1053
|
+
* Workspace ID
|
1054
|
+
*/
|
1055
|
+
workspaceId: WorkspaceID;
|
1056
|
+
/**
|
1057
|
+
* The Database Name
|
1058
|
+
*/
|
1059
|
+
dbName: DBName$1;
|
1060
|
+
};
|
1061
|
+
type DeleteDatabaseGithubSettingsError = ErrorWrapper$1<{
|
1062
|
+
status: 400;
|
1063
|
+
payload: BadRequestError$1;
|
1064
|
+
} | {
|
1065
|
+
status: 401;
|
1066
|
+
payload: AuthError$1;
|
1067
|
+
} | {
|
1068
|
+
status: 404;
|
1069
|
+
payload: SimpleError$1;
|
1070
|
+
}>;
|
1071
|
+
type DeleteDatabaseGithubSettingsVariables = {
|
1072
|
+
pathParams: DeleteDatabaseGithubSettingsPathParams;
|
1073
|
+
} & ControlPlaneFetcherExtraProps;
|
1074
|
+
/**
|
1075
|
+
* Delete any existing database Github settings
|
1076
|
+
*/
|
1077
|
+
declare const deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<undefined>;
|
914
1078
|
type ListRegionsPathParams = {
|
915
1079
|
/**
|
916
1080
|
* Workspace ID
|
@@ -938,55 +1102,38 @@ declare const listRegions: (variables: ListRegionsVariables, signal?: AbortSigna
|
|
938
1102
|
* @version 1.0
|
939
1103
|
*/
|
940
1104
|
/**
|
941
|
-
*
|
1105
|
+
* @maxLength 255
|
1106
|
+
* @minLength 1
|
1107
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
942
1108
|
*/
|
943
|
-
type
|
944
|
-
|
945
|
-
|
946
|
-
|
1109
|
+
type DBName = string;
|
1110
|
+
/**
|
1111
|
+
* @format date-time
|
1112
|
+
* @x-go-type string
|
1113
|
+
*/
|
1114
|
+
type DateTime = string;
|
1115
|
+
type Branch = {
|
947
1116
|
name: string;
|
948
|
-
/**
|
949
|
-
* The time this database was created
|
950
|
-
*/
|
951
1117
|
createdAt: DateTime;
|
952
|
-
/**
|
953
|
-
* The number of branches the database has
|
954
|
-
*/
|
955
|
-
numberOfBranches: number;
|
956
|
-
/**
|
957
|
-
* Metadata about the database for display in Xata user interfaces
|
958
|
-
*/
|
959
|
-
ui?: {
|
960
|
-
/**
|
961
|
-
* The user-selected color for this database across interfaces
|
962
|
-
*/
|
963
|
-
color?: string;
|
964
|
-
};
|
965
|
-
/**
|
966
|
-
* @x-internal true
|
967
|
-
*/
|
968
|
-
newMigrations?: boolean;
|
969
|
-
};
|
970
|
-
type DEPRECATEDListDatabasesResponse = {
|
971
|
-
/**
|
972
|
-
* A list of databases in a Xata workspace
|
973
|
-
*/
|
974
|
-
databases?: DEPRECATEDDatabaseMetadata[];
|
975
1118
|
};
|
976
1119
|
type ListBranchesResponse = {
|
977
1120
|
databaseName: string;
|
978
1121
|
branches: Branch[];
|
979
1122
|
};
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
1123
|
+
/**
|
1124
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
1125
|
+
*
|
1126
|
+
* @maxLength 511
|
1127
|
+
* @minLength 1
|
1128
|
+
* @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
|
1129
|
+
*/
|
1130
|
+
type DBBranchName = string;
|
1131
|
+
/**
|
1132
|
+
* @maxLength 255
|
1133
|
+
* @minLength 1
|
1134
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
1135
|
+
*/
|
1136
|
+
type BranchName = string;
|
990
1137
|
/**
|
991
1138
|
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
|
992
1139
|
* @x-go-type xata.BranchMetadata
|
@@ -1003,78 +1150,71 @@ type BranchMetadata = {
|
|
1003
1150
|
stage?: string;
|
1004
1151
|
labels?: string[];
|
1005
1152
|
};
|
1006
|
-
type DBBranch = {
|
1007
|
-
databaseName: DBName;
|
1008
|
-
branchName: BranchName;
|
1009
|
-
createdAt: DateTime;
|
1010
|
-
id: string;
|
1011
|
-
version: number;
|
1012
|
-
lastMigrationID: string;
|
1013
|
-
metadata?: BranchMetadata;
|
1014
|
-
startedFrom?: StartedFromMetadata;
|
1015
|
-
schema: Schema;
|
1016
|
-
};
|
1017
1153
|
type StartedFromMetadata = {
|
1018
1154
|
branchName: BranchName;
|
1019
1155
|
dbBranchID: string;
|
1020
1156
|
migrationID: string;
|
1021
1157
|
};
|
1022
1158
|
/**
|
1023
|
-
* @
|
1159
|
+
* @maxLength 255
|
1160
|
+
* @minLength 1
|
1161
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
1024
1162
|
*/
|
1025
|
-
type
|
1026
|
-
|
1027
|
-
|
1028
|
-
};
|
1029
|
-
type SchemaEditScript = {
|
1030
|
-
sourceMigrationID?: string;
|
1031
|
-
targetMigrationID?: string;
|
1032
|
-
operations: MigrationOp[];
|
1163
|
+
type TableName = string;
|
1164
|
+
type ColumnLink = {
|
1165
|
+
table: string;
|
1033
1166
|
};
|
1034
|
-
type
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1167
|
+
type ColumnVector = {
|
1168
|
+
/**
|
1169
|
+
* @maximum 10000
|
1170
|
+
* @minimum 2
|
1171
|
+
*/
|
1172
|
+
dimension: number;
|
1039
1173
|
};
|
1040
1174
|
type Column = {
|
1041
1175
|
name: string;
|
1042
|
-
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime';
|
1176
|
+
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file';
|
1043
1177
|
link?: ColumnLink;
|
1178
|
+
vector?: ColumnVector;
|
1044
1179
|
notNull?: boolean;
|
1045
1180
|
defaultValue?: string;
|
1046
1181
|
unique?: boolean;
|
1047
1182
|
columns?: Column[];
|
1048
1183
|
};
|
1049
|
-
type ColumnLink = {
|
1050
|
-
table: string;
|
1051
|
-
};
|
1052
1184
|
type RevLink = {
|
1053
1185
|
linkID: string;
|
1054
1186
|
table: string;
|
1055
1187
|
};
|
1188
|
+
type Table = {
|
1189
|
+
id?: string;
|
1190
|
+
name: TableName;
|
1191
|
+
columns: Column[];
|
1192
|
+
revLinks?: RevLink[];
|
1193
|
+
};
|
1056
1194
|
/**
|
1057
|
-
* @
|
1058
|
-
*/
|
1059
|
-
type BranchName = string;
|
1060
|
-
/**
|
1061
|
-
* @pattern [a-zA-Z0-9_\-~]+
|
1195
|
+
* @x-go-type xata.Schema
|
1062
1196
|
*/
|
1063
|
-
type
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1197
|
+
type Schema = {
|
1198
|
+
tables: Table[];
|
1199
|
+
tablesOrder?: string[];
|
1200
|
+
};
|
1201
|
+
type DBBranch = {
|
1202
|
+
databaseName: DBName;
|
1203
|
+
branchName: BranchName;
|
1204
|
+
createdAt: DateTime;
|
1205
|
+
id: string;
|
1206
|
+
version: number;
|
1207
|
+
lastMigrationID: string;
|
1208
|
+
metadata?: BranchMetadata;
|
1209
|
+
startedFrom?: StartedFromMetadata;
|
1210
|
+
schema: Schema;
|
1211
|
+
};
|
1212
|
+
type MigrationStatus = 'completed' | 'pending' | 'failed';
|
1213
|
+
type BranchWithCopyID = {
|
1214
|
+
branchName: BranchName;
|
1215
|
+
dbBranchID: string;
|
1216
|
+
copyID: string;
|
1217
|
+
};
|
1078
1218
|
type MetricsDatapoint = {
|
1079
1219
|
timestamp: string;
|
1080
1220
|
value: number;
|
@@ -1083,6 +1223,37 @@ type MetricsLatency = {
|
|
1083
1223
|
p50?: MetricsDatapoint[];
|
1084
1224
|
p90?: MetricsDatapoint[];
|
1085
1225
|
};
|
1226
|
+
type ListGitBranchesResponse = {
|
1227
|
+
mapping: {
|
1228
|
+
gitBranch: string;
|
1229
|
+
xataBranch: string;
|
1230
|
+
}[];
|
1231
|
+
};
|
1232
|
+
type ColumnMigration = {
|
1233
|
+
old: Column;
|
1234
|
+
['new']: Column;
|
1235
|
+
};
|
1236
|
+
type TableMigration = {
|
1237
|
+
newColumns?: {
|
1238
|
+
[key: string]: Column;
|
1239
|
+
};
|
1240
|
+
removedColumns?: string[];
|
1241
|
+
modifiedColumns?: ColumnMigration[];
|
1242
|
+
newColumnOrder: string[];
|
1243
|
+
};
|
1244
|
+
/**
|
1245
|
+
* @example {"newName":"newName","oldName":"oldName"}
|
1246
|
+
*/
|
1247
|
+
type TableRename = {
|
1248
|
+
/**
|
1249
|
+
* @minLength 1
|
1250
|
+
*/
|
1251
|
+
newName: string;
|
1252
|
+
/**
|
1253
|
+
* @minLength 1
|
1254
|
+
*/
|
1255
|
+
oldName: string;
|
1256
|
+
};
|
1086
1257
|
type BranchMigration = {
|
1087
1258
|
id?: string;
|
1088
1259
|
parentID?: string;
|
@@ -1101,78 +1272,109 @@ type BranchMigration = {
|
|
1101
1272
|
newTableOrder: string[];
|
1102
1273
|
renamedTables?: TableRename[];
|
1103
1274
|
};
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1275
|
+
/**
|
1276
|
+
* @minProperties 1
|
1277
|
+
*/
|
1278
|
+
type FilterExpression = {
|
1279
|
+
$exists?: string;
|
1280
|
+
$existsNot?: string;
|
1281
|
+
$any?: FilterList;
|
1282
|
+
$all?: FilterList;
|
1283
|
+
$none?: FilterList;
|
1284
|
+
$not?: FilterList;
|
1285
|
+
} & {
|
1286
|
+
[key: string]: FilterColumn;
|
1115
1287
|
};
|
1116
|
-
type
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1288
|
+
type FilterList = FilterExpression | FilterExpression[];
|
1289
|
+
type FilterValue = number | string | boolean;
|
1290
|
+
type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
|
1291
|
+
type FilterRangeValue = number | string;
|
1292
|
+
/**
|
1293
|
+
* @maxProperties 1
|
1294
|
+
* @minProperties 1
|
1295
|
+
*/
|
1296
|
+
type FilterPredicateOp = {
|
1297
|
+
$any?: FilterPredicate[];
|
1298
|
+
$all?: FilterPredicate[];
|
1299
|
+
$none?: FilterPredicate | FilterPredicate[];
|
1300
|
+
$not?: FilterPredicate | FilterPredicate[];
|
1301
|
+
$is?: FilterValue | FilterValue[];
|
1302
|
+
$isNot?: FilterValue | FilterValue[];
|
1303
|
+
$lt?: FilterRangeValue;
|
1304
|
+
$le?: FilterRangeValue;
|
1305
|
+
$gt?: FilterRangeValue;
|
1306
|
+
$ge?: FilterRangeValue;
|
1307
|
+
$contains?: string;
|
1308
|
+
$startsWith?: string;
|
1309
|
+
$endsWith?: string;
|
1310
|
+
$pattern?: string;
|
1126
1311
|
};
|
1127
|
-
type MigrationStatus = 'completed' | 'pending' | 'failed';
|
1128
1312
|
/**
|
1129
|
-
*
|
1313
|
+
* @maxProperties 2
|
1314
|
+
* @minProperties 2
|
1130
1315
|
*/
|
1131
|
-
type
|
1132
|
-
|
1133
|
-
|
1316
|
+
type FilterPredicateRangeOp = {
|
1317
|
+
$lt?: FilterRangeValue;
|
1318
|
+
$le?: FilterRangeValue;
|
1319
|
+
$gt?: FilterRangeValue;
|
1320
|
+
$ge?: FilterRangeValue;
|
1134
1321
|
};
|
1135
1322
|
/**
|
1136
|
-
*
|
1323
|
+
* @maxProperties 1
|
1324
|
+
* @minProperties 1
|
1137
1325
|
*/
|
1138
|
-
type
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
} | {
|
1144
|
-
renameTable: TableOpRename;
|
1326
|
+
type FilterColumnIncludes = {
|
1327
|
+
$includes?: FilterPredicate;
|
1328
|
+
$includesAny?: FilterPredicate;
|
1329
|
+
$includesAll?: FilterPredicate;
|
1330
|
+
$includesNone?: FilterPredicate;
|
1145
1331
|
};
|
1146
|
-
type
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1332
|
+
type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
|
1333
|
+
type SortOrder = 'asc' | 'desc' | 'random';
|
1334
|
+
type SortExpression = string[] | {
|
1335
|
+
[key: string]: SortOrder;
|
1150
1336
|
} | {
|
1151
|
-
|
1152
|
-
};
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
type
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1337
|
+
[key: string]: SortOrder;
|
1338
|
+
}[];
|
1339
|
+
/**
|
1340
|
+
* Pagination settings.
|
1341
|
+
*/
|
1342
|
+
type PageConfig = {
|
1343
|
+
/**
|
1344
|
+
* Query the next page that follow the cursor.
|
1345
|
+
*/
|
1346
|
+
after?: string;
|
1347
|
+
/**
|
1348
|
+
* Query the previous page before the cursor.
|
1349
|
+
*/
|
1350
|
+
before?: string;
|
1351
|
+
/**
|
1352
|
+
* Query the first page from the cursor.
|
1353
|
+
*/
|
1354
|
+
start?: string;
|
1355
|
+
/**
|
1356
|
+
* Query the last page from the cursor.
|
1357
|
+
*/
|
1358
|
+
end?: string;
|
1359
|
+
/**
|
1360
|
+
* Set page size. If the size is missing it is read from the cursor. If no cursor is given Xata will choose the default page size.
|
1361
|
+
*
|
1362
|
+
* @default 20
|
1363
|
+
*/
|
1364
|
+
size?: number;
|
1365
|
+
/**
|
1366
|
+
* Use offset to skip entries. To skip pages set offset to a multiple of size.
|
1367
|
+
*
|
1368
|
+
* @default 0
|
1369
|
+
*/
|
1370
|
+
offset?: number;
|
1175
1371
|
};
|
1372
|
+
/**
|
1373
|
+
* @example name
|
1374
|
+
* @example email
|
1375
|
+
* @example created_at
|
1376
|
+
*/
|
1377
|
+
type ColumnsProjection = string[];
|
1176
1378
|
/**
|
1177
1379
|
* The migration request number.
|
1178
1380
|
*
|
@@ -1216,303 +1418,463 @@ type MigrationRequest = {
|
|
1216
1418
|
*/
|
1217
1419
|
target?: string;
|
1218
1420
|
};
|
1219
|
-
type SortExpression = string[] | {
|
1220
|
-
[key: string]: SortOrder;
|
1221
|
-
} | {
|
1222
|
-
[key: string]: SortOrder;
|
1223
|
-
}[];
|
1224
|
-
type SortOrder = 'asc' | 'desc';
|
1225
|
-
/**
|
1226
|
-
* Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
|
1227
|
-
* distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
|
1228
|
-
* character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
|
1229
|
-
* to allow two typos in a word.
|
1230
|
-
*
|
1231
|
-
* @default 1
|
1232
|
-
* @maximum 2
|
1233
|
-
* @minimum 0
|
1234
|
-
*/
|
1235
|
-
type FuzzinessExpression = number;
|
1236
|
-
/**
|
1237
|
-
* If the prefix type is set to "disabled" (the default), the search only matches full words. If the prefix type is set to "phrase", the search will return results that match prefixes of the search phrase.
|
1238
|
-
*/
|
1239
|
-
type PrefixExpression = 'phrase' | 'disabled';
|
1240
|
-
/**
|
1241
|
-
* The target expression is used to filter the search results by the target columns.
|
1242
|
-
*/
|
1243
|
-
type TargetExpression = (string | {
|
1244
|
-
/**
|
1245
|
-
* The name of the column.
|
1246
|
-
*/
|
1247
|
-
column: string;
|
1248
|
-
/**
|
1249
|
-
* The weight of the column.
|
1250
|
-
*
|
1251
|
-
* @default 1
|
1252
|
-
* @maximum 10
|
1253
|
-
* @minimum 1
|
1254
|
-
*/
|
1255
|
-
weight?: number;
|
1256
|
-
})[];
|
1257
1421
|
/**
|
1258
|
-
*
|
1422
|
+
* Records metadata
|
1259
1423
|
*/
|
1260
|
-
type
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1424
|
+
type RecordsMetadata = {
|
1425
|
+
page: {
|
1426
|
+
/**
|
1427
|
+
* last record id
|
1428
|
+
*/
|
1429
|
+
cursor: string;
|
1430
|
+
/**
|
1431
|
+
* true if more records can be fetched
|
1432
|
+
*/
|
1433
|
+
more: boolean;
|
1434
|
+
/**
|
1435
|
+
* the number of records returned per page
|
1436
|
+
*/
|
1437
|
+
size: number;
|
1438
|
+
};
|
1439
|
+
};
|
1440
|
+
type TableOpAdd = {
|
1441
|
+
table: string;
|
1442
|
+
};
|
1443
|
+
type TableOpRemove = {
|
1444
|
+
table: string;
|
1445
|
+
};
|
1446
|
+
type TableOpRename = {
|
1447
|
+
oldName: string;
|
1448
|
+
newName: string;
|
1449
|
+
};
|
1450
|
+
type MigrationTableOp = {
|
1451
|
+
addTable: TableOpAdd;
|
1452
|
+
} | {
|
1453
|
+
removeTable: TableOpRemove;
|
1454
|
+
} | {
|
1455
|
+
renameTable: TableOpRename;
|
1456
|
+
};
|
1457
|
+
type ColumnOpAdd = {
|
1458
|
+
table: string;
|
1459
|
+
column: Column;
|
1460
|
+
};
|
1461
|
+
type ColumnOpRemove = {
|
1462
|
+
table: string;
|
1463
|
+
column: string;
|
1464
|
+
};
|
1465
|
+
type ColumnOpRename = {
|
1466
|
+
table: string;
|
1467
|
+
oldName: string;
|
1468
|
+
newName: string;
|
1469
|
+
};
|
1470
|
+
type MigrationColumnOp = {
|
1471
|
+
addColumn: ColumnOpAdd;
|
1472
|
+
} | {
|
1473
|
+
removeColumn: ColumnOpRemove;
|
1474
|
+
} | {
|
1475
|
+
renameColumn: ColumnOpRename;
|
1269
1476
|
};
|
1270
1477
|
/**
|
1271
|
-
*
|
1272
|
-
* you'd like for the summary. These names must not collide with other columns you've
|
1273
|
-
* requested from `columns`; including implicit requests like `settings.*`.
|
1274
|
-
*
|
1275
|
-
* The value for each key needs to be an object. This object should contain one key and one
|
1276
|
-
* value only. In this object, the key should be set to the summary function you wish to use
|
1277
|
-
* and the value set to the column name to be summarized.
|
1278
|
-
*
|
1279
|
-
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
1280
|
-
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
1281
|
-
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
1282
|
-
*
|
1283
|
-
* @example {"all_users":{"count":"*"}}
|
1284
|
-
* @example {"total_created":{"count":"created_at"}}
|
1285
|
-
* @example {"min_cost":{"min":"cost"}}
|
1286
|
-
* @example {"max_happiness":{"max":"happiness"}}
|
1287
|
-
* @example {"total_revenue":{"sum":"revenue"}}
|
1288
|
-
* @example {"average_speed":{"average":"speed"}}
|
1289
|
-
* @x-go-type xbquery.SummaryList
|
1478
|
+
* Branch schema migration operations.
|
1290
1479
|
*/
|
1291
|
-
type
|
1292
|
-
|
1480
|
+
type MigrationOp = MigrationTableOp | MigrationColumnOp;
|
1481
|
+
type Commit = {
|
1482
|
+
title?: string;
|
1483
|
+
message?: string;
|
1484
|
+
id: string;
|
1485
|
+
parentID?: string;
|
1486
|
+
checksum: string;
|
1487
|
+
mergeParentID?: string;
|
1488
|
+
createdAt: DateTime;
|
1489
|
+
operations: MigrationOp[];
|
1490
|
+
};
|
1491
|
+
type SchemaEditScript = {
|
1492
|
+
sourceMigrationID?: string;
|
1493
|
+
targetMigrationID?: string;
|
1494
|
+
operations: MigrationOp[];
|
1495
|
+
};
|
1496
|
+
type BranchOp = {
|
1497
|
+
id: string;
|
1498
|
+
parentID?: string;
|
1499
|
+
title?: string;
|
1500
|
+
message?: string;
|
1501
|
+
status: MigrationStatus;
|
1502
|
+
createdAt: DateTime;
|
1503
|
+
modifiedAt?: DateTime;
|
1504
|
+
migration?: Commit;
|
1293
1505
|
};
|
1294
1506
|
/**
|
1295
|
-
*
|
1296
|
-
* key representing the operation, and a value representing the column to be operated on.
|
1297
|
-
*
|
1298
|
-
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
1299
|
-
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
1300
|
-
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
1301
|
-
*
|
1302
|
-
* We currently support several aggregation functions. Not all functions can be run on all column
|
1303
|
-
* types.
|
1304
|
-
*
|
1305
|
-
* - `count` is used to count the number of records in each group. Use `{"count": "*"}` to count
|
1306
|
-
* all columns present, otherwise `{"count": "<column_path>"}` to count the number of non-null
|
1307
|
-
* values are present at column path.
|
1308
|
-
*
|
1309
|
-
* Count can be used on any column type, and always returns an int.
|
1310
|
-
*
|
1311
|
-
* - `min` calculates the minimum value in each group. `min` is compatible with most types;
|
1312
|
-
* string, multiple, text, email, int, float, and datetime. It returns a value of the same
|
1313
|
-
* type as operated on. This means that `{"lowest_latency": {"min": "latency"}}` where
|
1314
|
-
* `latency` is an int, will always return an int.
|
1315
|
-
*
|
1316
|
-
* - `max` calculates the maximum value in each group. `max` shares the same compatibility as
|
1317
|
-
* `min`.
|
1318
|
-
*
|
1319
|
-
* - `sum` adds up all values in a group. `sum` can be run on `int` and `float` types, and will
|
1320
|
-
* return a value of the same type as requested.
|
1321
|
-
*
|
1322
|
-
* - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
|
1323
|
-
* always returns a float.
|
1324
|
-
*
|
1325
|
-
* @example {"count":"deleted_at"}
|
1326
|
-
* @x-go-type xbquery.Summary
|
1507
|
+
* Branch schema migration.
|
1327
1508
|
*/
|
1328
|
-
type
|
1509
|
+
type Migration = {
|
1510
|
+
parentID?: string;
|
1511
|
+
operations: MigrationOp[];
|
1512
|
+
};
|
1513
|
+
type MigrationObject = {
|
1514
|
+
title?: string;
|
1515
|
+
message?: string;
|
1516
|
+
id: string;
|
1517
|
+
parentID?: string;
|
1518
|
+
checksum: string;
|
1519
|
+
operations: MigrationOp[];
|
1520
|
+
};
|
1329
1521
|
/**
|
1330
|
-
*
|
1331
|
-
*
|
1332
|
-
* @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d"},"aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}
|
1522
|
+
* @pattern [a-zA-Z0-9_\-~\.]+
|
1333
1523
|
*/
|
1334
|
-
type
|
1335
|
-
[key: string]: AggExpression;
|
1336
|
-
};
|
1524
|
+
type ColumnName = string;
|
1337
1525
|
/**
|
1338
|
-
*
|
1339
|
-
* The key represents the aggreagtion type, while the value is an object with the configuration of
|
1340
|
-
* the aggreagtion.
|
1341
|
-
*
|
1342
|
-
* @x-go-type xata.AggExpression
|
1526
|
+
* Insert operation
|
1343
1527
|
*/
|
1344
|
-
type
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
}
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1528
|
+
type TransactionInsertOp = {
|
1529
|
+
/**
|
1530
|
+
* The table name
|
1531
|
+
*/
|
1532
|
+
table: string;
|
1533
|
+
/**
|
1534
|
+
* The record to insert. The `id` field is optional; when specified, it will be used as the ID for the record.
|
1535
|
+
*/
|
1536
|
+
record: {
|
1537
|
+
[key: string]: any;
|
1538
|
+
};
|
1539
|
+
/**
|
1540
|
+
* The version of the record you expect to be overwriting. Only valid with an
|
1541
|
+
* explicit ID is also set in the `record` key.
|
1542
|
+
*/
|
1543
|
+
ifVersion?: number;
|
1544
|
+
/**
|
1545
|
+
* createOnly is used to change how Xata acts when an explicit ID is set in the `record` key.
|
1546
|
+
*
|
1547
|
+
* If `createOnly` is set to `true`, Xata will only attempt to insert the record. If there's a conflict, Xata
|
1548
|
+
* will cancel the transaction.
|
1549
|
+
*
|
1550
|
+
* If `createOnly` is set to `false`, Xata will attempt to insert the record. If there's no
|
1551
|
+
* conflict, the record is inserted. If there is a conflict, Xata will replace the record.
|
1552
|
+
*/
|
1553
|
+
createOnly?: boolean;
|
1554
|
+
/**
|
1555
|
+
* If set, the call will return the requested fields as part of the response.
|
1556
|
+
*/
|
1557
|
+
columns?: string[];
|
1362
1558
|
};
|
1363
1559
|
/**
|
1364
|
-
*
|
1560
|
+
* @maxLength 255
|
1561
|
+
* @minLength 1
|
1562
|
+
* @pattern [a-zA-Z0-9_-~:]+
|
1365
1563
|
*/
|
1366
|
-
type
|
1367
|
-
filter?: FilterExpression;
|
1368
|
-
} | '*';
|
1564
|
+
type RecordID = string;
|
1369
1565
|
/**
|
1370
|
-
*
|
1566
|
+
* Update operation
|
1371
1567
|
*/
|
1372
|
-
type
|
1568
|
+
type TransactionUpdateOp = {
|
1373
1569
|
/**
|
1374
|
-
* The
|
1570
|
+
* The table name
|
1375
1571
|
*/
|
1376
|
-
|
1572
|
+
table: string;
|
1573
|
+
id: RecordID;
|
1574
|
+
/**
|
1575
|
+
* The fields of the record you'd like to update
|
1576
|
+
*/
|
1577
|
+
fields: {
|
1578
|
+
[key: string]: any;
|
1579
|
+
};
|
1580
|
+
/**
|
1581
|
+
* The version of the record you expect to be updating
|
1582
|
+
*/
|
1583
|
+
ifVersion?: number;
|
1584
|
+
/**
|
1585
|
+
* Xata will insert this record if it cannot be found.
|
1586
|
+
*/
|
1587
|
+
upsert?: boolean;
|
1588
|
+
/**
|
1589
|
+
* If set, the call will return the requested fields as part of the response.
|
1590
|
+
*/
|
1591
|
+
columns?: string[];
|
1377
1592
|
};
|
1378
1593
|
/**
|
1379
|
-
* The
|
1594
|
+
* A delete operation. The transaction will continue if no record matches the ID.
|
1380
1595
|
*/
|
1381
|
-
type
|
1596
|
+
type TransactionDeleteOp = {
|
1382
1597
|
/**
|
1383
|
-
* The
|
1598
|
+
* The table name
|
1384
1599
|
*/
|
1385
|
-
|
1600
|
+
table: string;
|
1601
|
+
id: RecordID;
|
1602
|
+
/**
|
1603
|
+
* If set, the call will return the requested fields as part of the response.
|
1604
|
+
*/
|
1605
|
+
columns?: string[];
|
1386
1606
|
};
|
1387
1607
|
/**
|
1388
|
-
*
|
1608
|
+
* Get by id operation.
|
1389
1609
|
*/
|
1390
|
-
type
|
1610
|
+
type TransactionGetOp = {
|
1391
1611
|
/**
|
1392
|
-
* The
|
1612
|
+
* The table name
|
1393
1613
|
*/
|
1394
|
-
|
1614
|
+
table: string;
|
1615
|
+
id: RecordID;
|
1616
|
+
/**
|
1617
|
+
* If set, the call will return the requested fields as part of the response.
|
1618
|
+
*/
|
1619
|
+
columns?: string[];
|
1395
1620
|
};
|
1396
1621
|
/**
|
1397
|
-
*
|
1622
|
+
* A transaction operation
|
1398
1623
|
*/
|
1399
|
-
type
|
1624
|
+
type TransactionOperation$1 = {
|
1625
|
+
insert: TransactionInsertOp;
|
1626
|
+
} | {
|
1627
|
+
update: TransactionUpdateOp;
|
1628
|
+
} | {
|
1629
|
+
['delete']: TransactionDeleteOp;
|
1630
|
+
} | {
|
1631
|
+
get: TransactionGetOp;
|
1632
|
+
};
|
1633
|
+
/**
|
1634
|
+
* Fields to return in the transaction result.
|
1635
|
+
*/
|
1636
|
+
type TransactionResultColumns = {
|
1637
|
+
[key: string]: any;
|
1638
|
+
};
|
1639
|
+
/**
|
1640
|
+
* A result from an insert operation.
|
1641
|
+
*/
|
1642
|
+
type TransactionResultInsert = {
|
1400
1643
|
/**
|
1401
|
-
* The
|
1644
|
+
* The type of operation who's result is being returned.
|
1402
1645
|
*/
|
1403
|
-
|
1646
|
+
operation: 'insert';
|
1647
|
+
/**
|
1648
|
+
* The number of affected rows
|
1649
|
+
*/
|
1650
|
+
rows: number;
|
1651
|
+
id: RecordID;
|
1652
|
+
columns?: TransactionResultColumns;
|
1404
1653
|
};
|
1405
1654
|
/**
|
1406
|
-
*
|
1655
|
+
* A result from an update operation.
|
1407
1656
|
*/
|
1408
|
-
type
|
1657
|
+
type TransactionResultUpdate = {
|
1409
1658
|
/**
|
1410
|
-
* The
|
1659
|
+
* The type of operation who's result is being returned.
|
1411
1660
|
*/
|
1412
|
-
|
1661
|
+
operation: 'update';
|
1413
1662
|
/**
|
1414
|
-
* The
|
1415
|
-
* values in the column is higher than this threshold, the results are approximative.
|
1416
|
-
* Maximum value is 40,000, default value is 3000.
|
1663
|
+
* The number of updated rows
|
1417
1664
|
*/
|
1418
|
-
|
1665
|
+
rows: number;
|
1666
|
+
id: RecordID;
|
1667
|
+
columns?: TransactionResultColumns;
|
1419
1668
|
};
|
1420
1669
|
/**
|
1421
|
-
*
|
1670
|
+
* A result from a delete operation.
|
1422
1671
|
*/
|
1423
|
-
type
|
1672
|
+
type TransactionResultDelete = {
|
1424
1673
|
/**
|
1425
|
-
* The
|
1674
|
+
* The type of operation who's result is being returned.
|
1426
1675
|
*/
|
1427
|
-
|
1676
|
+
operation: 'delete';
|
1428
1677
|
/**
|
1429
|
-
* The
|
1430
|
-
* It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
|
1431
|
-
*
|
1432
|
-
* @pattern ^(\d+)(d|h|m|s|ms)$
|
1678
|
+
* The number of deleted rows
|
1433
1679
|
*/
|
1434
|
-
|
1680
|
+
rows: number;
|
1681
|
+
columns?: TransactionResultColumns;
|
1682
|
+
};
|
1683
|
+
/**
|
1684
|
+
* A result from a get operation.
|
1685
|
+
*/
|
1686
|
+
type TransactionResultGet = {
|
1435
1687
|
/**
|
1436
|
-
* The
|
1437
|
-
* `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
1688
|
+
* The type of operation who's result is being returned.
|
1438
1689
|
*/
|
1439
|
-
|
1690
|
+
operation: 'get';
|
1691
|
+
columns?: TransactionResultColumns;
|
1692
|
+
};
|
1693
|
+
/**
|
1694
|
+
* An ordered array of results from the submitted operations.
|
1695
|
+
*/
|
1696
|
+
type TransactionSuccess = {
|
1697
|
+
results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete | TransactionResultGet)[];
|
1698
|
+
};
|
1699
|
+
/**
|
1700
|
+
* An error message from a failing transaction operation
|
1701
|
+
*/
|
1702
|
+
type TransactionError = {
|
1440
1703
|
/**
|
1441
|
-
* The
|
1442
|
-
* The accepted format is as an ISO 8601 UTC offset. For example: `+01:00` or
|
1443
|
-
* `-08:00`.
|
1444
|
-
*
|
1445
|
-
* @pattern ^[+-][01]\d:[0-5]\d$
|
1704
|
+
* The index of the failing operation
|
1446
1705
|
*/
|
1447
|
-
|
1448
|
-
|
1706
|
+
index: number;
|
1707
|
+
/**
|
1708
|
+
* The error message
|
1709
|
+
*/
|
1710
|
+
message: string;
|
1449
1711
|
};
|
1450
1712
|
/**
|
1451
|
-
*
|
1452
|
-
* The top values as ordered by the number of records (`$count`) are returned.
|
1713
|
+
* An array of errors, with indicides, from the transaction.
|
1453
1714
|
*/
|
1454
|
-
type
|
1715
|
+
type TransactionFailure = {
|
1716
|
+
/**
|
1717
|
+
* The request ID.
|
1718
|
+
*/
|
1719
|
+
id: string;
|
1720
|
+
/**
|
1721
|
+
* An array of errors from the submitted operations.
|
1722
|
+
*/
|
1723
|
+
errors: TransactionError[];
|
1724
|
+
};
|
1725
|
+
/**
|
1726
|
+
* Object column value
|
1727
|
+
*/
|
1728
|
+
type ObjectValue = {
|
1729
|
+
[key: string]: string | boolean | number | string[] | number[] | DateTime | ObjectValue;
|
1730
|
+
};
|
1731
|
+
/**
|
1732
|
+
* Unique file identifier
|
1733
|
+
*
|
1734
|
+
* @maxLength 255
|
1735
|
+
* @minLength 1
|
1736
|
+
* @pattern [a-zA-Z0-9_-~:]+
|
1737
|
+
*/
|
1738
|
+
type FileID = string;
|
1739
|
+
/**
|
1740
|
+
* File name
|
1741
|
+
*
|
1742
|
+
* @maxLength 1024
|
1743
|
+
* @minLength 0
|
1744
|
+
* @pattern [0-9a-zA-Z!\-_\.\*'\(\)]*
|
1745
|
+
*/
|
1746
|
+
type FileName = string;
|
1747
|
+
/**
|
1748
|
+
* Media type
|
1749
|
+
*
|
1750
|
+
* @maxLength 255
|
1751
|
+
* @minLength 3
|
1752
|
+
* @pattern ^\w+/[-+.\w]+$
|
1753
|
+
*/
|
1754
|
+
type MediaType = string;
|
1755
|
+
/**
|
1756
|
+
* Object representing a file in an array
|
1757
|
+
*/
|
1758
|
+
type InputFileEntry = {
|
1759
|
+
id?: FileID;
|
1760
|
+
name?: FileName;
|
1761
|
+
mediaType?: MediaType;
|
1762
|
+
/**
|
1763
|
+
* Base64 encoded content
|
1764
|
+
*
|
1765
|
+
* @maxLength 20971520
|
1766
|
+
*/
|
1767
|
+
base64Content?: string;
|
1455
1768
|
/**
|
1456
|
-
*
|
1769
|
+
* Enable public access to the file
|
1457
1770
|
*/
|
1458
|
-
|
1459
|
-
aggs?: AggExpressionMap;
|
1771
|
+
enablePublicUrl?: boolean;
|
1460
1772
|
/**
|
1461
|
-
*
|
1462
|
-
*
|
1463
|
-
* @default 10
|
1464
|
-
* @maximum 1000
|
1773
|
+
* Time to live for signed URLs
|
1465
1774
|
*/
|
1466
|
-
|
1775
|
+
signedUrlTimeout?: number;
|
1467
1776
|
};
|
1468
1777
|
/**
|
1469
|
-
*
|
1778
|
+
* Array of file entries
|
1779
|
+
*
|
1780
|
+
* @maxItems 50
|
1470
1781
|
*/
|
1471
|
-
type
|
1782
|
+
type InputFileArray = InputFileEntry[];
|
1783
|
+
/**
|
1784
|
+
* Object representing a file
|
1785
|
+
*
|
1786
|
+
* @x-go-type file.InputFile
|
1787
|
+
*/
|
1788
|
+
type InputFile = {
|
1789
|
+
name: FileName;
|
1790
|
+
mediaType?: MediaType;
|
1472
1791
|
/**
|
1473
|
-
*
|
1792
|
+
* Base64 encoded content
|
1793
|
+
*
|
1794
|
+
* @maxLength 20971520
|
1474
1795
|
*/
|
1475
|
-
|
1796
|
+
base64Content?: string;
|
1476
1797
|
/**
|
1477
|
-
*
|
1478
|
-
* with this value as size.
|
1479
|
-
*
|
1480
|
-
* @minimum 0
|
1798
|
+
* Enable public access to the file
|
1481
1799
|
*/
|
1482
|
-
|
1800
|
+
enablePublicUrl?: boolean;
|
1483
1801
|
/**
|
1484
|
-
*
|
1485
|
-
* boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
|
1486
|
-
* but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
|
1487
|
-
* to 50.
|
1488
|
-
*
|
1489
|
-
* @default 0
|
1802
|
+
* Time to live for signed URLs
|
1490
1803
|
*/
|
1491
|
-
|
1492
|
-
aggs?: AggExpressionMap;
|
1804
|
+
signedUrlTimeout?: number;
|
1493
1805
|
};
|
1494
|
-
|
1806
|
+
/**
|
1807
|
+
* Xata input record
|
1808
|
+
*/
|
1809
|
+
type DataInputRecord = {
|
1810
|
+
[key: string]: RecordID | string | boolean | number | string[] | number[] | DateTime | ObjectValue | InputFileArray | InputFile | null;
|
1811
|
+
};
|
1812
|
+
/**
|
1813
|
+
* Xata Table Record Metadata
|
1814
|
+
*/
|
1815
|
+
type RecordMeta = {
|
1816
|
+
id: RecordID;
|
1817
|
+
xata: {
|
1818
|
+
/**
|
1819
|
+
* The record's version. Can be used for optimistic concurrency control.
|
1820
|
+
*/
|
1821
|
+
version: number;
|
1822
|
+
/**
|
1823
|
+
* The record's table name. APIs that return records from multiple tables will set this field accordingly.
|
1824
|
+
*/
|
1825
|
+
table?: string;
|
1826
|
+
/**
|
1827
|
+
* Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
|
1828
|
+
*/
|
1829
|
+
highlight?: {
|
1830
|
+
[key: string]: string[] | {
|
1831
|
+
[key: string]: any;
|
1832
|
+
};
|
1833
|
+
};
|
1834
|
+
/**
|
1835
|
+
* The record's relevancy score. This is returned by the search APIs.
|
1836
|
+
*/
|
1837
|
+
score?: number;
|
1838
|
+
/**
|
1839
|
+
* Encoding/Decoding errors
|
1840
|
+
*/
|
1841
|
+
warnings?: string[];
|
1842
|
+
};
|
1843
|
+
};
|
1844
|
+
/**
|
1845
|
+
* File metadata
|
1846
|
+
*/
|
1847
|
+
type FileResponse = {
|
1848
|
+
id?: FileID;
|
1849
|
+
name: FileName;
|
1850
|
+
mediaType: MediaType;
|
1495
1851
|
/**
|
1496
|
-
*
|
1852
|
+
* @format int64
|
1497
1853
|
*/
|
1498
|
-
|
1854
|
+
size: number;
|
1499
1855
|
/**
|
1500
|
-
*
|
1856
|
+
* @format int64
|
1501
1857
|
*/
|
1502
|
-
|
1858
|
+
version: number;
|
1859
|
+
attributes?: Record<string, any>;
|
1503
1860
|
};
|
1504
1861
|
/**
|
1505
|
-
*
|
1506
|
-
*
|
1507
|
-
* @x-go-type xata.BoosterExpression
|
1862
|
+
* The target expression is used to filter the search results by the target columns.
|
1508
1863
|
*/
|
1509
|
-
type
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1864
|
+
type TargetExpression = (string | {
|
1865
|
+
/**
|
1866
|
+
* The name of the column.
|
1867
|
+
*/
|
1868
|
+
column: string;
|
1869
|
+
/**
|
1870
|
+
* The weight of the column.
|
1871
|
+
*
|
1872
|
+
* @default 1
|
1873
|
+
* @maximum 10
|
1874
|
+
* @minimum 1
|
1875
|
+
*/
|
1876
|
+
weight?: number;
|
1877
|
+
})[];
|
1516
1878
|
/**
|
1517
1879
|
* Boost records with a particular value for a column.
|
1518
1880
|
*/
|
@@ -1595,83 +1957,42 @@ type DateBooster$1 = {
|
|
1595
1957
|
*/
|
1596
1958
|
ifMatchesFilter?: FilterExpression;
|
1597
1959
|
};
|
1598
|
-
type FilterList = FilterExpression | FilterExpression[];
|
1599
|
-
type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
|
1600
|
-
/**
|
1601
|
-
* @maxProperties 1
|
1602
|
-
* @minProperties 1
|
1603
|
-
*/
|
1604
|
-
type FilterColumnIncludes = {
|
1605
|
-
$includes?: FilterPredicate;
|
1606
|
-
$includesAny?: FilterPredicate;
|
1607
|
-
$includesAll?: FilterPredicate;
|
1608
|
-
$includesNone?: FilterPredicate;
|
1609
|
-
};
|
1610
|
-
type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
|
1611
1960
|
/**
|
1612
|
-
*
|
1613
|
-
*
|
1961
|
+
* Booster Expression
|
1962
|
+
*
|
1963
|
+
* @x-go-type xata.BoosterExpression
|
1614
1964
|
*/
|
1615
|
-
type
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
$isNot?: FilterValue | FilterValue[];
|
1622
|
-
$lt?: FilterRangeValue;
|
1623
|
-
$le?: FilterRangeValue;
|
1624
|
-
$gt?: FilterRangeValue;
|
1625
|
-
$ge?: FilterRangeValue;
|
1626
|
-
$contains?: string;
|
1627
|
-
$startsWith?: string;
|
1628
|
-
$endsWith?: string;
|
1629
|
-
$pattern?: string;
|
1965
|
+
type BoosterExpression = {
|
1966
|
+
valueBooster?: ValueBooster$1;
|
1967
|
+
} | {
|
1968
|
+
numericBooster?: NumericBooster$1;
|
1969
|
+
} | {
|
1970
|
+
dateBooster?: DateBooster$1;
|
1630
1971
|
};
|
1631
1972
|
/**
|
1632
|
-
*
|
1633
|
-
*
|
1973
|
+
* Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
|
1974
|
+
* distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
|
1975
|
+
* character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
|
1976
|
+
* to allow two typos in a word.
|
1977
|
+
*
|
1978
|
+
* @default 1
|
1979
|
+
* @maximum 2
|
1980
|
+
* @minimum 0
|
1634
1981
|
*/
|
1635
|
-
type
|
1636
|
-
$lt?: FilterRangeValue;
|
1637
|
-
$le?: FilterRangeValue;
|
1638
|
-
$gt?: FilterRangeValue;
|
1639
|
-
$ge?: FilterRangeValue;
|
1640
|
-
};
|
1641
|
-
type FilterRangeValue = number | string;
|
1642
|
-
type FilterValue = number | string | boolean;
|
1982
|
+
type FuzzinessExpression = number;
|
1643
1983
|
/**
|
1644
|
-
*
|
1984
|
+
* If the prefix type is set to "disabled" (the default), the search only matches full words. If the prefix type is set to "phrase", the search will return results that match prefixes of the search phrase.
|
1645
1985
|
*/
|
1646
|
-
type
|
1647
|
-
|
1648
|
-
* Query the next page that follow the cursor.
|
1649
|
-
*/
|
1650
|
-
after?: string;
|
1651
|
-
/**
|
1652
|
-
* Query the previous page before the cursor.
|
1653
|
-
*/
|
1654
|
-
before?: string;
|
1655
|
-
/**
|
1656
|
-
* Query the first page from the cursor.
|
1657
|
-
*/
|
1658
|
-
start?: string;
|
1659
|
-
/**
|
1660
|
-
* Query the last page from the cursor.
|
1661
|
-
*/
|
1662
|
-
end?: string;
|
1986
|
+
type PrefixExpression = 'phrase' | 'disabled';
|
1987
|
+
type HighlightExpression = {
|
1663
1988
|
/**
|
1664
|
-
* Set
|
1665
|
-
*
|
1666
|
-
* @default 20
|
1989
|
+
* Set to `false` to disable highlighting. By default it is `true`.
|
1667
1990
|
*/
|
1668
|
-
|
1991
|
+
enabled?: boolean;
|
1669
1992
|
/**
|
1670
|
-
*
|
1671
|
-
*
|
1672
|
-
* @default 0
|
1993
|
+
* Set to `false` to disable HTML encoding in highlight snippets. By default it is `true`.
|
1673
1994
|
*/
|
1674
|
-
|
1995
|
+
encodeHTML?: boolean;
|
1675
1996
|
};
|
1676
1997
|
/**
|
1677
1998
|
* Pagination settings for the search endpoints.
|
@@ -1693,218 +2014,238 @@ type SearchPageConfig = {
|
|
1693
2014
|
offset?: number;
|
1694
2015
|
};
|
1695
2016
|
/**
|
1696
|
-
*
|
1697
|
-
* @example email
|
1698
|
-
* @example created_at
|
2017
|
+
* Xata Table SQL Record
|
1699
2018
|
*/
|
1700
|
-
type
|
2019
|
+
type SQLRecord = {
|
2020
|
+
[key: string]: any;
|
2021
|
+
};
|
1701
2022
|
/**
|
1702
|
-
*
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
2023
|
+
* A summary expression is the description of a single summary operation. It consists of a single
|
2024
|
+
* key representing the operation, and a value representing the column to be operated on.
|
2025
|
+
*
|
2026
|
+
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
2027
|
+
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
2028
|
+
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
2029
|
+
*
|
2030
|
+
* We currently support several aggregation functions. Not all functions can be run on all column
|
2031
|
+
* types.
|
2032
|
+
*
|
2033
|
+
* - `count` is used to count the number of records in each group. Use `{"count": "*"}` to count
|
2034
|
+
* all columns present, otherwise `{"count": "<column_path>"}` to count the number of non-null
|
2035
|
+
* values are present at column path.
|
2036
|
+
*
|
2037
|
+
* Count can be used on any column type, and always returns an int.
|
2038
|
+
*
|
2039
|
+
* - `min` calculates the minimum value in each group. `min` is compatible with most types;
|
2040
|
+
* string, multiple, text, email, int, float, and datetime. It returns a value of the same
|
2041
|
+
* type as operated on. This means that `{"lowest_latency": {"min": "latency"}}` where
|
2042
|
+
* `latency` is an int, will always return an int.
|
2043
|
+
*
|
2044
|
+
* - `max` calculates the maximum value in each group. `max` shares the same compatibility as
|
2045
|
+
* `min`.
|
2046
|
+
*
|
2047
|
+
* - `sum` adds up all values in a group. `sum` can be run on `int` and `float` types, and will
|
2048
|
+
* return a value of the same type as requested.
|
2049
|
+
*
|
2050
|
+
* - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
|
2051
|
+
* always returns a float.
|
2052
|
+
*
|
2053
|
+
* @example {"count":"deleted_at"}
|
2054
|
+
* @x-go-type xbquery.Summary
|
2055
|
+
*/
|
2056
|
+
type SummaryExpression = Record<string, any>;
|
2057
|
+
/**
|
2058
|
+
* The description of the summaries you wish to receive. Set each key to be the field name
|
2059
|
+
* you'd like for the summary. These names must not collide with other columns you've
|
2060
|
+
* requested from `columns`; including implicit requests like `settings.*`.
|
2061
|
+
*
|
2062
|
+
* The value for each key needs to be an object. This object should contain one key and one
|
2063
|
+
* value only. In this object, the key should be set to the summary function you wish to use
|
2064
|
+
* and the value set to the column name to be summarized.
|
2065
|
+
*
|
2066
|
+
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
2067
|
+
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
2068
|
+
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
2069
|
+
*
|
2070
|
+
* @example {"all_users":{"count":"*"},"total_created":{"count":"created_at"},"min_cost":{"min":"cost"},"max_happiness":{"max":"happiness"},"total_revenue":{"sum":"revenue"},"average_speed":{"average":"speed"}}
|
2071
|
+
* @x-go-type xbquery.SummaryList
|
2072
|
+
*/
|
2073
|
+
type SummaryExpressionList = {
|
2074
|
+
[key: string]: SummaryExpression;
|
1732
2075
|
};
|
1733
2076
|
/**
|
1734
|
-
*
|
2077
|
+
* Count the number of records with an optional filter.
|
1735
2078
|
*/
|
1736
|
-
type
|
2079
|
+
type CountAgg = {
|
2080
|
+
filter?: FilterExpression;
|
2081
|
+
} | '*';
|
1737
2082
|
/**
|
1738
|
-
*
|
2083
|
+
* The sum of the numeric values in a particular column.
|
1739
2084
|
*/
|
1740
|
-
type
|
1741
|
-
/**
|
1742
|
-
* @minLength 1
|
1743
|
-
*/
|
1744
|
-
newName: string;
|
2085
|
+
type SumAgg = {
|
1745
2086
|
/**
|
1746
|
-
*
|
2087
|
+
* The column on which to compute the sum. Must be a numeric type.
|
1747
2088
|
*/
|
1748
|
-
|
2089
|
+
column: string;
|
1749
2090
|
};
|
1750
2091
|
/**
|
1751
|
-
*
|
2092
|
+
* The max of the numeric values in a particular column.
|
1752
2093
|
*/
|
1753
|
-
type
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1758
|
-
cursor: string;
|
1759
|
-
/**
|
1760
|
-
* true if more records can be fetch
|
1761
|
-
*/
|
1762
|
-
more: boolean;
|
1763
|
-
};
|
1764
|
-
};
|
1765
|
-
type AggResponse$1 = (number | null) | {
|
1766
|
-
values: ({
|
1767
|
-
$key: string | number;
|
1768
|
-
$count: number;
|
1769
|
-
} & {
|
1770
|
-
[key: string]: AggResponse$1;
|
1771
|
-
})[];
|
2094
|
+
type MaxAgg = {
|
2095
|
+
/**
|
2096
|
+
* The column on which to compute the max. Must be a numeric type.
|
2097
|
+
*/
|
2098
|
+
column: string;
|
1772
2099
|
};
|
1773
2100
|
/**
|
1774
|
-
*
|
2101
|
+
* The min of the numeric values in a particular column.
|
1775
2102
|
*/
|
1776
|
-
type
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
['delete']: TransactionDeleteOp;
|
2103
|
+
type MinAgg = {
|
2104
|
+
/**
|
2105
|
+
* The column on which to compute the min. Must be a numeric type.
|
2106
|
+
*/
|
2107
|
+
column: string;
|
1782
2108
|
};
|
1783
2109
|
/**
|
1784
|
-
*
|
2110
|
+
* The average of the numeric values in a particular column.
|
1785
2111
|
*/
|
1786
|
-
type
|
1787
|
-
/**
|
1788
|
-
* The table name
|
1789
|
-
*/
|
1790
|
-
table: string;
|
1791
|
-
/**
|
1792
|
-
* The record to insert. The `id` field is optional; when specified, it will be used as the ID for the record.
|
1793
|
-
*/
|
1794
|
-
record: {
|
1795
|
-
[key: string]: any;
|
1796
|
-
};
|
1797
|
-
/**
|
1798
|
-
* The version of the record you expect to be overwriting. Only valid with an
|
1799
|
-
* explicit ID is also set in the `record` key.
|
1800
|
-
*/
|
1801
|
-
ifVersion?: number;
|
2112
|
+
type AverageAgg = {
|
1802
2113
|
/**
|
1803
|
-
*
|
1804
|
-
*
|
1805
|
-
* If `createOnly` is set to `true`, Xata will only attempt to insert the record. If there's a conflict, Xata
|
1806
|
-
* will cancel the transaction.
|
1807
|
-
*
|
1808
|
-
* If `createOnly` is set to `false`, Xata will attempt to insert the record. If there's no
|
1809
|
-
* conflict, the record is inserted. If there is a conflict, Xata will replace the record.
|
2114
|
+
* The column on which to compute the average. Must be a numeric type.
|
1810
2115
|
*/
|
1811
|
-
|
2116
|
+
column: string;
|
1812
2117
|
};
|
1813
2118
|
/**
|
1814
|
-
*
|
2119
|
+
* Count the number of distinct values in a particular column.
|
1815
2120
|
*/
|
1816
|
-
type
|
1817
|
-
/**
|
1818
|
-
* The table name
|
1819
|
-
*/
|
1820
|
-
table: string;
|
1821
|
-
id: RecordID;
|
1822
|
-
/**
|
1823
|
-
* The fields of the record you'd like to update
|
1824
|
-
*/
|
1825
|
-
fields: {
|
1826
|
-
[key: string]: any;
|
1827
|
-
};
|
2121
|
+
type UniqueCountAgg = {
|
1828
2122
|
/**
|
1829
|
-
* The
|
2123
|
+
* The column from where to count the unique values.
|
1830
2124
|
*/
|
1831
|
-
|
2125
|
+
column: string;
|
1832
2126
|
/**
|
1833
|
-
*
|
2127
|
+
* The threshold under which the unique count is exact. If the number of unique
|
2128
|
+
* values in the column is higher than this threshold, the results are approximative.
|
2129
|
+
* Maximum value is 40,000, default value is 3000.
|
1834
2130
|
*/
|
1835
|
-
|
2131
|
+
precisionThreshold?: number;
|
1836
2132
|
};
|
1837
2133
|
/**
|
1838
|
-
*
|
2134
|
+
* The description of the aggregations you wish to receive.
|
2135
|
+
*
|
2136
|
+
* @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d","aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}}
|
1839
2137
|
*/
|
1840
|
-
type
|
1841
|
-
|
1842
|
-
* The table name
|
1843
|
-
*/
|
1844
|
-
table: string;
|
1845
|
-
id: RecordID;
|
2138
|
+
type AggExpressionMap = {
|
2139
|
+
[key: string]: AggExpression;
|
1846
2140
|
};
|
1847
2141
|
/**
|
1848
|
-
*
|
2142
|
+
* Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
|
1849
2143
|
*/
|
1850
|
-
type
|
2144
|
+
type DateHistogramAgg = {
|
1851
2145
|
/**
|
1852
|
-
* The
|
2146
|
+
* The column to use for bucketing. Must be of type datetime.
|
1853
2147
|
*/
|
1854
|
-
|
2148
|
+
column: string;
|
1855
2149
|
/**
|
1856
|
-
* The
|
2150
|
+
* The fixed interval to use when bucketing.
|
2151
|
+
* It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
|
2152
|
+
*
|
2153
|
+
* @pattern ^(\d+)(d|h|m|s|ms)$
|
1857
2154
|
*/
|
1858
|
-
|
1859
|
-
id: RecordID;
|
1860
|
-
};
|
1861
|
-
/**
|
1862
|
-
* A result from an update operation.
|
1863
|
-
*/
|
1864
|
-
type TransactionResultUpdate = {
|
2155
|
+
interval?: string;
|
1865
2156
|
/**
|
1866
|
-
* The
|
2157
|
+
* The calendar-aware interval to use when bucketing. Possible values are: `minute`,
|
2158
|
+
* `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
1867
2159
|
*/
|
1868
|
-
|
2160
|
+
calendarInterval?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
1869
2161
|
/**
|
1870
|
-
* The
|
2162
|
+
* The timezone to use for bucketing. By default, UTC is assumed.
|
2163
|
+
* The accepted format is as an ISO 8601 UTC offset. For example: `+01:00` or
|
2164
|
+
* `-08:00`.
|
2165
|
+
*
|
2166
|
+
* @pattern ^[+-][01]\d:[0-5]\d$
|
1871
2167
|
*/
|
1872
|
-
|
1873
|
-
|
2168
|
+
timezone?: string;
|
2169
|
+
aggs?: AggExpressionMap;
|
1874
2170
|
};
|
1875
2171
|
/**
|
1876
|
-
*
|
2172
|
+
* Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
|
2173
|
+
* The top values as ordered by the number of records (`$count`) are returned.
|
1877
2174
|
*/
|
1878
|
-
type
|
2175
|
+
type TopValuesAgg = {
|
1879
2176
|
/**
|
1880
|
-
* The
|
2177
|
+
* The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
|
1881
2178
|
*/
|
1882
|
-
|
2179
|
+
column: string;
|
2180
|
+
aggs?: AggExpressionMap;
|
1883
2181
|
/**
|
1884
|
-
* The number of
|
2182
|
+
* The maximum number of unique values to return.
|
2183
|
+
*
|
2184
|
+
* @default 10
|
2185
|
+
* @maximum 1000
|
1885
2186
|
*/
|
1886
|
-
|
2187
|
+
size?: number;
|
1887
2188
|
};
|
1888
2189
|
/**
|
1889
|
-
*
|
1890
|
-
*
|
1891
|
-
* @x-go-type xata.ErrTxOp
|
2190
|
+
* Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
|
1892
2191
|
*/
|
1893
|
-
type
|
2192
|
+
type NumericHistogramAgg = {
|
1894
2193
|
/**
|
1895
|
-
* The
|
2194
|
+
* The column to use for bucketing. Must be of numeric type.
|
1896
2195
|
*/
|
1897
|
-
|
2196
|
+
column: string;
|
1898
2197
|
/**
|
1899
|
-
* The
|
2198
|
+
* The numeric interval to use for bucketing. The resulting buckets will be ranges
|
2199
|
+
* with this value as size.
|
2200
|
+
*
|
2201
|
+
* @minimum 0
|
1900
2202
|
*/
|
1901
|
-
|
2203
|
+
interval: number;
|
2204
|
+
/**
|
2205
|
+
* By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
|
2206
|
+
* boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
|
2207
|
+
* but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
|
2208
|
+
* to 50.
|
2209
|
+
*
|
2210
|
+
* @default 0
|
2211
|
+
*/
|
2212
|
+
offset?: number;
|
2213
|
+
aggs?: AggExpressionMap;
|
1902
2214
|
};
|
1903
2215
|
/**
|
1904
|
-
*
|
1905
|
-
*
|
2216
|
+
* The description of a single aggregation operation. It is an object with only one key-value pair.
|
2217
|
+
* The key represents the aggregation type, while the value is an object with the configuration of
|
2218
|
+
* the aggregation.
|
2219
|
+
*
|
2220
|
+
* @x-go-type xata.AggExpression
|
1906
2221
|
*/
|
1907
|
-
type
|
2222
|
+
type AggExpression = {
|
2223
|
+
count?: CountAgg;
|
2224
|
+
} | {
|
2225
|
+
sum?: SumAgg;
|
2226
|
+
} | {
|
2227
|
+
max?: MaxAgg;
|
2228
|
+
} | {
|
2229
|
+
min?: MinAgg;
|
2230
|
+
} | {
|
2231
|
+
average?: AverageAgg;
|
2232
|
+
} | {
|
2233
|
+
uniqueCount?: UniqueCountAgg;
|
2234
|
+
} | {
|
2235
|
+
dateHistogram?: DateHistogramAgg;
|
2236
|
+
} | {
|
2237
|
+
topValues?: TopValuesAgg;
|
2238
|
+
} | {
|
2239
|
+
numericHistogram?: NumericHistogramAgg;
|
2240
|
+
};
|
2241
|
+
type AggResponse$1 = (number | null) | {
|
2242
|
+
values: ({
|
2243
|
+
$key: string | number;
|
2244
|
+
$count: number;
|
2245
|
+
} & {
|
2246
|
+
[key: string]: AggResponse$1;
|
2247
|
+
})[];
|
2248
|
+
};
|
1908
2249
|
/**
|
1909
2250
|
* Xata Table Record Metadata
|
1910
2251
|
*/
|
@@ -1918,26 +2259,33 @@ type XataRecord$1 = RecordMeta & {
|
|
1918
2259
|
* @version 1.0
|
1919
2260
|
*/
|
1920
2261
|
|
1921
|
-
type
|
2262
|
+
type BadRequestError = {
|
1922
2263
|
id?: string;
|
1923
2264
|
message: string;
|
1924
2265
|
};
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
2266
|
+
/**
|
2267
|
+
* @example {"message":"invalid API key"}
|
2268
|
+
*/
|
2269
|
+
type AuthError = {
|
2270
|
+
id?: string;
|
2271
|
+
message: string;
|
1930
2272
|
};
|
1931
|
-
type
|
1932
|
-
|
1933
|
-
|
1934
|
-
records: XataRecord$1[];
|
2273
|
+
type SimpleError = {
|
2274
|
+
id?: string;
|
2275
|
+
message: string;
|
1935
2276
|
};
|
1936
2277
|
type BranchMigrationPlan = {
|
1937
2278
|
version: number;
|
1938
2279
|
migration: BranchMigration;
|
1939
2280
|
};
|
1940
|
-
type
|
2281
|
+
type SchemaUpdateResponse = {
|
2282
|
+
/**
|
2283
|
+
* @minLength 1
|
2284
|
+
*/
|
2285
|
+
migrationID: string;
|
2286
|
+
parentMigrationID: string;
|
2287
|
+
status: MigrationStatus;
|
2288
|
+
};
|
1941
2289
|
type SchemaCompareResponse = {
|
1942
2290
|
source: Schema;
|
1943
2291
|
target: Schema;
|
@@ -1949,73 +2297,58 @@ type RecordUpdateResponse = XataRecord$1 | {
|
|
1949
2297
|
version: number;
|
1950
2298
|
};
|
1951
2299
|
};
|
1952
|
-
type
|
2300
|
+
type PutFileResponse = FileResponse;
|
2301
|
+
type RecordResponse = XataRecord$1;
|
2302
|
+
type BulkInsertResponse = {
|
2303
|
+
recordIDs: string[];
|
2304
|
+
} | {
|
1953
2305
|
records: XataRecord$1[];
|
1954
|
-
meta: RecordsMetadata;
|
1955
|
-
};
|
1956
|
-
type SchemaUpdateResponse = {
|
1957
|
-
/**
|
1958
|
-
* @minLength 1
|
1959
|
-
*/
|
1960
|
-
migrationID: string;
|
1961
|
-
parentMigrationID: string;
|
1962
|
-
status: MigrationStatus;
|
1963
2306
|
};
|
1964
|
-
type
|
1965
|
-
|
2307
|
+
type BulkError = {
|
2308
|
+
errors: {
|
2309
|
+
message?: string;
|
2310
|
+
status?: number;
|
2311
|
+
}[];
|
1966
2312
|
};
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
type AggResponse = {
|
1971
|
-
aggs?: {
|
1972
|
-
[key: string]: AggResponse$1;
|
1973
|
-
};
|
2313
|
+
type QueryResponse = {
|
2314
|
+
records: XataRecord$1[];
|
2315
|
+
meta: RecordsMetadata;
|
1974
2316
|
};
|
1975
2317
|
type SearchResponse = {
|
1976
2318
|
records: XataRecord$1[];
|
1977
2319
|
warning?: string;
|
1978
2320
|
};
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
type TransactionSuccess = {
|
1983
|
-
/**
|
1984
|
-
* An ordered array of results from the submitted operations that were executed
|
1985
|
-
*/
|
1986
|
-
results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
|
1987
|
-
};
|
1988
|
-
/**
|
1989
|
-
* @x-go-type TxFailure
|
1990
|
-
*/
|
1991
|
-
type TransactionFailure = {
|
1992
|
-
/**
|
1993
|
-
* An array of errors from the submitted operations.
|
1994
|
-
*/
|
1995
|
-
errors: TransactionError[];
|
2321
|
+
type SQLResponse = {
|
2322
|
+
records: SQLRecord[];
|
2323
|
+
warning?: string;
|
1996
2324
|
};
|
1997
|
-
type
|
2325
|
+
type RateLimitError = {
|
1998
2326
|
id?: string;
|
1999
2327
|
message: string;
|
2000
2328
|
};
|
2329
|
+
type SummarizeResponse = {
|
2330
|
+
summaries: Record<string, any>[];
|
2331
|
+
};
|
2001
2332
|
/**
|
2002
|
-
* @example {"
|
2333
|
+
* @example {"aggs":{"dailyUniqueUsers":{"values":[{"$count":321,"$key":"2022-02-22T22:22:22Z","uniqueUsers":134},{"$count":202,"$key":"2022-02-23T22:22:22Z","uniqueUsers":90}]}}}
|
2003
2334
|
*/
|
2004
|
-
type
|
2005
|
-
|
2006
|
-
|
2335
|
+
type AggResponse = {
|
2336
|
+
aggs?: {
|
2337
|
+
[key: string]: AggResponse$1;
|
2338
|
+
};
|
2007
2339
|
};
|
2008
2340
|
|
2009
2341
|
type DataPlaneFetcherExtraProps = {
|
2010
2342
|
apiUrl: string;
|
2011
2343
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
2012
|
-
|
2344
|
+
fetch: FetchImpl;
|
2013
2345
|
apiKey: string;
|
2014
2346
|
trace: TraceFunction;
|
2015
2347
|
signal?: AbortSignal;
|
2016
2348
|
clientID?: string;
|
2017
2349
|
sessionID?: string;
|
2018
2350
|
clientName?: string;
|
2351
|
+
xataAgentExtra?: Record<string, string>;
|
2019
2352
|
};
|
2020
2353
|
type ErrorWrapper<TError> = TError | {
|
2021
2354
|
status: 'unknown';
|
@@ -2028,24 +2361,6 @@ type ErrorWrapper<TError> = TError | {
|
|
2028
2361
|
* @version 1.0
|
2029
2362
|
*/
|
2030
2363
|
|
2031
|
-
type DEPRECATEDgetDatabaseListPathParams = {
|
2032
|
-
workspace: string;
|
2033
|
-
region: string;
|
2034
|
-
};
|
2035
|
-
type DEPRECATEDgetDatabaseListError = ErrorWrapper<{
|
2036
|
-
status: 400;
|
2037
|
-
payload: BadRequestError;
|
2038
|
-
} | {
|
2039
|
-
status: 401;
|
2040
|
-
payload: AuthError;
|
2041
|
-
}>;
|
2042
|
-
type DEPRECATEDgetDatabaseListVariables = {
|
2043
|
-
pathParams: DEPRECATEDgetDatabaseListPathParams;
|
2044
|
-
} & DataPlaneFetcherExtraProps;
|
2045
|
-
/**
|
2046
|
-
* List all databases available in your Workspace.
|
2047
|
-
*/
|
2048
|
-
declare const dEPRECATEDgetDatabaseList: (variables: DEPRECATEDgetDatabaseListVariables, signal?: AbortSignal) => Promise<DEPRECATEDListDatabasesResponse>;
|
2049
2364
|
type GetBranchListPathParams = {
|
2050
2365
|
/**
|
2051
2366
|
* The Database Name
|
@@ -2071,134 +2386,6 @@ type GetBranchListVariables = {
|
|
2071
2386
|
* List all available Branches
|
2072
2387
|
*/
|
2073
2388
|
declare const getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
|
2074
|
-
type DEPRECATEDcreateDatabasePathParams = {
|
2075
|
-
/**
|
2076
|
-
* The Database Name
|
2077
|
-
*/
|
2078
|
-
dbName: DBName;
|
2079
|
-
workspace: string;
|
2080
|
-
region: string;
|
2081
|
-
};
|
2082
|
-
type DEPRECATEDcreateDatabaseError = ErrorWrapper<{
|
2083
|
-
status: 400;
|
2084
|
-
payload: BadRequestError;
|
2085
|
-
} | {
|
2086
|
-
status: 401;
|
2087
|
-
payload: AuthError;
|
2088
|
-
}>;
|
2089
|
-
type DEPRECATEDcreateDatabaseResponse = {
|
2090
|
-
/**
|
2091
|
-
* @minLength 1
|
2092
|
-
*/
|
2093
|
-
databaseName: string;
|
2094
|
-
branchName?: string;
|
2095
|
-
status: MigrationStatus;
|
2096
|
-
};
|
2097
|
-
type DEPRECATEDcreateDatabaseRequestBody = {
|
2098
|
-
/**
|
2099
|
-
* @minLength 1
|
2100
|
-
*/
|
2101
|
-
branchName?: string;
|
2102
|
-
ui?: {
|
2103
|
-
color?: string;
|
2104
|
-
};
|
2105
|
-
metadata?: BranchMetadata;
|
2106
|
-
};
|
2107
|
-
type DEPRECATEDcreateDatabaseVariables = {
|
2108
|
-
body?: DEPRECATEDcreateDatabaseRequestBody;
|
2109
|
-
pathParams: DEPRECATEDcreateDatabasePathParams;
|
2110
|
-
} & DataPlaneFetcherExtraProps;
|
2111
|
-
/**
|
2112
|
-
* Create Database with identifier name
|
2113
|
-
*/
|
2114
|
-
declare const dEPRECATEDcreateDatabase: (variables: DEPRECATEDcreateDatabaseVariables, signal?: AbortSignal) => Promise<DEPRECATEDcreateDatabaseResponse>;
|
2115
|
-
type DEPRECATEDdeleteDatabasePathParams = {
|
2116
|
-
/**
|
2117
|
-
* The Database Name
|
2118
|
-
*/
|
2119
|
-
dbName: DBName;
|
2120
|
-
workspace: string;
|
2121
|
-
region: string;
|
2122
|
-
};
|
2123
|
-
type DEPRECATEDdeleteDatabaseError = ErrorWrapper<{
|
2124
|
-
status: 400;
|
2125
|
-
payload: BadRequestError;
|
2126
|
-
} | {
|
2127
|
-
status: 401;
|
2128
|
-
payload: AuthError;
|
2129
|
-
} | {
|
2130
|
-
status: 404;
|
2131
|
-
payload: SimpleError;
|
2132
|
-
}>;
|
2133
|
-
type DEPRECATEDdeleteDatabaseResponse = {
|
2134
|
-
status: MigrationStatus;
|
2135
|
-
};
|
2136
|
-
type DEPRECATEDdeleteDatabaseVariables = {
|
2137
|
-
pathParams: DEPRECATEDdeleteDatabasePathParams;
|
2138
|
-
} & DataPlaneFetcherExtraProps;
|
2139
|
-
/**
|
2140
|
-
* Delete a database and all of its branches and tables permanently.
|
2141
|
-
*/
|
2142
|
-
declare const dEPRECATEDdeleteDatabase: (variables: DEPRECATEDdeleteDatabaseVariables, signal?: AbortSignal) => Promise<DEPRECATEDdeleteDatabaseResponse>;
|
2143
|
-
type DEPRECATEDgetDatabaseMetadataPathParams = {
|
2144
|
-
/**
|
2145
|
-
* The Database Name
|
2146
|
-
*/
|
2147
|
-
dbName: DBName;
|
2148
|
-
workspace: string;
|
2149
|
-
region: string;
|
2150
|
-
};
|
2151
|
-
type DEPRECATEDgetDatabaseMetadataError = ErrorWrapper<{
|
2152
|
-
status: 400;
|
2153
|
-
payload: BadRequestError;
|
2154
|
-
} | {
|
2155
|
-
status: 401;
|
2156
|
-
payload: AuthError;
|
2157
|
-
} | {
|
2158
|
-
status: 404;
|
2159
|
-
payload: SimpleError;
|
2160
|
-
}>;
|
2161
|
-
type DEPRECATEDgetDatabaseMetadataVariables = {
|
2162
|
-
pathParams: DEPRECATEDgetDatabaseMetadataPathParams;
|
2163
|
-
} & DataPlaneFetcherExtraProps;
|
2164
|
-
/**
|
2165
|
-
* Retrieve metadata of the given database
|
2166
|
-
*/
|
2167
|
-
declare const dEPRECATEDgetDatabaseMetadata: (variables: DEPRECATEDgetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DEPRECATEDDatabaseMetadata>;
|
2168
|
-
type DEPRECATEDupdateDatabaseMetadataPathParams = {
|
2169
|
-
/**
|
2170
|
-
* The Database Name
|
2171
|
-
*/
|
2172
|
-
dbName: DBName;
|
2173
|
-
workspace: string;
|
2174
|
-
region: string;
|
2175
|
-
};
|
2176
|
-
type DEPRECATEDupdateDatabaseMetadataError = ErrorWrapper<{
|
2177
|
-
status: 400;
|
2178
|
-
payload: BadRequestError;
|
2179
|
-
} | {
|
2180
|
-
status: 401;
|
2181
|
-
payload: AuthError;
|
2182
|
-
} | {
|
2183
|
-
status: 404;
|
2184
|
-
payload: SimpleError;
|
2185
|
-
}>;
|
2186
|
-
type DEPRECATEDupdateDatabaseMetadataRequestBody = {
|
2187
|
-
ui?: {
|
2188
|
-
/**
|
2189
|
-
* @minLength 1
|
2190
|
-
*/
|
2191
|
-
color?: string;
|
2192
|
-
};
|
2193
|
-
};
|
2194
|
-
type DEPRECATEDupdateDatabaseMetadataVariables = {
|
2195
|
-
body?: DEPRECATEDupdateDatabaseMetadataRequestBody;
|
2196
|
-
pathParams: DEPRECATEDupdateDatabaseMetadataPathParams;
|
2197
|
-
} & DataPlaneFetcherExtraProps;
|
2198
|
-
/**
|
2199
|
-
* Update the color of the selected database
|
2200
|
-
*/
|
2201
|
-
declare const dEPRECATEDupdateDatabaseMetadata: (variables: DEPRECATEDupdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DEPRECATEDDatabaseMetadata>;
|
2202
2389
|
type GetBranchDetailsPathParams = {
|
2203
2390
|
/**
|
2204
2391
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -2244,6 +2431,9 @@ type CreateBranchError = ErrorWrapper<{
|
|
2244
2431
|
} | {
|
2245
2432
|
status: 404;
|
2246
2433
|
payload: SimpleError;
|
2434
|
+
} | {
|
2435
|
+
status: 423;
|
2436
|
+
payload: SimpleError;
|
2247
2437
|
}>;
|
2248
2438
|
type CreateBranchResponse = {
|
2249
2439
|
/**
|
@@ -2283,6 +2473,9 @@ type DeleteBranchError = ErrorWrapper<{
|
|
2283
2473
|
} | {
|
2284
2474
|
status: 404;
|
2285
2475
|
payload: SimpleError;
|
2476
|
+
} | {
|
2477
|
+
status: 409;
|
2478
|
+
payload: SimpleError;
|
2286
2479
|
}>;
|
2287
2480
|
type DeleteBranchResponse = {
|
2288
2481
|
status: MigrationStatus;
|
@@ -2294,6 +2487,36 @@ type DeleteBranchVariables = {
|
|
2294
2487
|
* Delete the branch in the database and all its resources
|
2295
2488
|
*/
|
2296
2489
|
declare const deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<DeleteBranchResponse>;
|
2490
|
+
type CopyBranchPathParams = {
|
2491
|
+
/**
|
2492
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2493
|
+
*/
|
2494
|
+
dbBranchName: DBBranchName;
|
2495
|
+
workspace: string;
|
2496
|
+
region: string;
|
2497
|
+
};
|
2498
|
+
type CopyBranchError = ErrorWrapper<{
|
2499
|
+
status: 400;
|
2500
|
+
payload: BadRequestError;
|
2501
|
+
} | {
|
2502
|
+
status: 401;
|
2503
|
+
payload: AuthError;
|
2504
|
+
} | {
|
2505
|
+
status: 404;
|
2506
|
+
payload: SimpleError;
|
2507
|
+
}>;
|
2508
|
+
type CopyBranchRequestBody = {
|
2509
|
+
destinationBranch: string;
|
2510
|
+
limit?: number;
|
2511
|
+
};
|
2512
|
+
type CopyBranchVariables = {
|
2513
|
+
body: CopyBranchRequestBody;
|
2514
|
+
pathParams: CopyBranchPathParams;
|
2515
|
+
} & DataPlaneFetcherExtraProps;
|
2516
|
+
/**
|
2517
|
+
* Create a copy of the branch
|
2518
|
+
*/
|
2519
|
+
declare const copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal) => Promise<BranchWithCopyID>;
|
2297
2520
|
type UpdateBranchMetadataPathParams = {
|
2298
2521
|
/**
|
2299
2522
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -2634,39 +2857,9 @@ type ExecuteBranchMigrationPlanPathParams = {
|
|
2634
2857
|
workspace: string;
|
2635
2858
|
region: string;
|
2636
2859
|
};
|
2637
|
-
type ExecuteBranchMigrationPlanError = ErrorWrapper<{
|
2638
|
-
status: 400;
|
2639
|
-
payload: BadRequestError;
|
2640
|
-
} | {
|
2641
|
-
status: 401;
|
2642
|
-
payload: AuthError;
|
2643
|
-
} | {
|
2644
|
-
status: 404;
|
2645
|
-
payload: SimpleError;
|
2646
|
-
}>;
|
2647
|
-
type ExecuteBranchMigrationPlanRequestBody = {
|
2648
|
-
version: number;
|
2649
|
-
migration: BranchMigration;
|
2650
|
-
};
|
2651
|
-
type ExecuteBranchMigrationPlanVariables = {
|
2652
|
-
body: ExecuteBranchMigrationPlanRequestBody;
|
2653
|
-
pathParams: ExecuteBranchMigrationPlanPathParams;
|
2654
|
-
} & DataPlaneFetcherExtraProps;
|
2655
|
-
/**
|
2656
|
-
* Apply a migration plan to the branch
|
2657
|
-
*/
|
2658
|
-
declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
2659
|
-
type BranchTransactionPathParams = {
|
2660
|
-
/**
|
2661
|
-
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2662
|
-
*/
|
2663
|
-
dbBranchName: DBBranchName;
|
2664
|
-
workspace: string;
|
2665
|
-
region: string;
|
2666
|
-
};
|
2667
|
-
type BranchTransactionError = ErrorWrapper<{
|
2860
|
+
type ExecuteBranchMigrationPlanError = ErrorWrapper<{
|
2668
2861
|
status: 400;
|
2669
|
-
payload:
|
2862
|
+
payload: BadRequestError;
|
2670
2863
|
} | {
|
2671
2864
|
status: 401;
|
2672
2865
|
payload: AuthError;
|
@@ -2674,14 +2867,18 @@ type BranchTransactionError = ErrorWrapper<{
|
|
2674
2867
|
status: 404;
|
2675
2868
|
payload: SimpleError;
|
2676
2869
|
}>;
|
2677
|
-
type
|
2678
|
-
|
2870
|
+
type ExecuteBranchMigrationPlanRequestBody = {
|
2871
|
+
version: number;
|
2872
|
+
migration: BranchMigration;
|
2679
2873
|
};
|
2680
|
-
type
|
2681
|
-
body:
|
2682
|
-
pathParams:
|
2874
|
+
type ExecuteBranchMigrationPlanVariables = {
|
2875
|
+
body: ExecuteBranchMigrationPlanRequestBody;
|
2876
|
+
pathParams: ExecuteBranchMigrationPlanPathParams;
|
2683
2877
|
} & DataPlaneFetcherExtraProps;
|
2684
|
-
|
2878
|
+
/**
|
2879
|
+
* Apply a migration plan to the branch
|
2880
|
+
*/
|
2881
|
+
declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
2685
2882
|
type QueryMigrationRequestsPathParams = {
|
2686
2883
|
/**
|
2687
2884
|
* The Database Name
|
@@ -2964,7 +3161,7 @@ type MergeMigrationRequestError = ErrorWrapper<{
|
|
2964
3161
|
type MergeMigrationRequestVariables = {
|
2965
3162
|
pathParams: MergeMigrationRequestPathParams;
|
2966
3163
|
} & DataPlaneFetcherExtraProps;
|
2967
|
-
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<
|
3164
|
+
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<BranchOp>;
|
2968
3165
|
type GetBranchSchemaHistoryPathParams = {
|
2969
3166
|
/**
|
2970
3167
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -3013,6 +3210,10 @@ type GetBranchSchemaHistoryRequestBody = {
|
|
3013
3210
|
*/
|
3014
3211
|
size?: number;
|
3015
3212
|
};
|
3213
|
+
/**
|
3214
|
+
* Report only migrations that have been added since the given Migration ID.
|
3215
|
+
*/
|
3216
|
+
since?: string;
|
3016
3217
|
};
|
3017
3218
|
type GetBranchSchemaHistoryVariables = {
|
3018
3219
|
body?: GetBranchSchemaHistoryRequestBody;
|
@@ -3039,6 +3240,8 @@ type CompareBranchWithUserSchemaError = ErrorWrapper<{
|
|
3039
3240
|
}>;
|
3040
3241
|
type CompareBranchWithUserSchemaRequestBody = {
|
3041
3242
|
schema: Schema;
|
3243
|
+
schemaOperations?: MigrationOp[];
|
3244
|
+
branchOperations?: MigrationOp[];
|
3042
3245
|
};
|
3043
3246
|
type CompareBranchWithUserSchemaVariables = {
|
3044
3247
|
body: CompareBranchWithUserSchemaRequestBody;
|
@@ -3067,8 +3270,12 @@ type CompareBranchSchemasError = ErrorWrapper<{
|
|
3067
3270
|
status: 404;
|
3068
3271
|
payload: SimpleError;
|
3069
3272
|
}>;
|
3273
|
+
type CompareBranchSchemasRequestBody = {
|
3274
|
+
sourceBranchOperations?: MigrationOp[];
|
3275
|
+
targetBranchOperations?: MigrationOp[];
|
3276
|
+
};
|
3070
3277
|
type CompareBranchSchemasVariables = {
|
3071
|
-
body
|
3278
|
+
body: CompareBranchSchemasRequestBody;
|
3072
3279
|
pathParams: CompareBranchSchemasPathParams;
|
3073
3280
|
} & DataPlaneFetcherExtraProps;
|
3074
3281
|
declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
|
@@ -3151,6 +3358,44 @@ type ApplyBranchSchemaEditVariables = {
|
|
3151
3358
|
pathParams: ApplyBranchSchemaEditPathParams;
|
3152
3359
|
} & DataPlaneFetcherExtraProps;
|
3153
3360
|
declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3361
|
+
type PushBranchMigrationsPathParams = {
|
3362
|
+
/**
|
3363
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3364
|
+
*/
|
3365
|
+
dbBranchName: DBBranchName;
|
3366
|
+
workspace: string;
|
3367
|
+
region: string;
|
3368
|
+
};
|
3369
|
+
type PushBranchMigrationsError = ErrorWrapper<{
|
3370
|
+
status: 400;
|
3371
|
+
payload: BadRequestError;
|
3372
|
+
} | {
|
3373
|
+
status: 401;
|
3374
|
+
payload: AuthError;
|
3375
|
+
} | {
|
3376
|
+
status: 404;
|
3377
|
+
payload: SimpleError;
|
3378
|
+
}>;
|
3379
|
+
type PushBranchMigrationsRequestBody = {
|
3380
|
+
migrations: MigrationObject[];
|
3381
|
+
};
|
3382
|
+
type PushBranchMigrationsVariables = {
|
3383
|
+
body: PushBranchMigrationsRequestBody;
|
3384
|
+
pathParams: PushBranchMigrationsPathParams;
|
3385
|
+
} & DataPlaneFetcherExtraProps;
|
3386
|
+
/**
|
3387
|
+
* The `schema/push` API accepts a list of migrations to be applied to the
|
3388
|
+
* current branch. A list of applicable migrations can be fetched using
|
3389
|
+
* the `schema/history` API from another branch or database.
|
3390
|
+
*
|
3391
|
+
* The most recent migration must be part of the list or referenced (via
|
3392
|
+
* `parentID`) by the first migration in the list of migrations to be pushed.
|
3393
|
+
*
|
3394
|
+
* Each migration in the list has an `id`, `parentID`, and `checksum`. The
|
3395
|
+
* checksum for migrations are generated and verified by xata. The
|
3396
|
+
* operation fails if any migration in the list has an invalid checksum.
|
3397
|
+
*/
|
3398
|
+
declare const pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3154
3399
|
type CreateTablePathParams = {
|
3155
3400
|
/**
|
3156
3401
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -3241,6 +3486,9 @@ type UpdateTableError = ErrorWrapper<{
|
|
3241
3486
|
} | {
|
3242
3487
|
status: 404;
|
3243
3488
|
payload: SimpleError;
|
3489
|
+
} | {
|
3490
|
+
status: 422;
|
3491
|
+
payload: SimpleError;
|
3244
3492
|
}>;
|
3245
3493
|
type UpdateTableRequestBody = {
|
3246
3494
|
/**
|
@@ -3363,17 +3611,230 @@ type GetTableColumnsVariables = {
|
|
3363
3611
|
declare const getTableColumns: (variables: GetTableColumnsVariables, signal?: AbortSignal) => Promise<GetTableColumnsResponse>;
|
3364
3612
|
type AddTableColumnPathParams = {
|
3365
3613
|
/**
|
3366
|
-
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3614
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3615
|
+
*/
|
3616
|
+
dbBranchName: DBBranchName;
|
3617
|
+
/**
|
3618
|
+
* The Table name
|
3619
|
+
*/
|
3620
|
+
tableName: TableName;
|
3621
|
+
workspace: string;
|
3622
|
+
region: string;
|
3623
|
+
};
|
3624
|
+
type AddTableColumnError = ErrorWrapper<{
|
3625
|
+
status: 400;
|
3626
|
+
payload: BadRequestError;
|
3627
|
+
} | {
|
3628
|
+
status: 401;
|
3629
|
+
payload: AuthError;
|
3630
|
+
} | {
|
3631
|
+
status: 404;
|
3632
|
+
payload: SimpleError;
|
3633
|
+
}>;
|
3634
|
+
type AddTableColumnVariables = {
|
3635
|
+
body: Column;
|
3636
|
+
pathParams: AddTableColumnPathParams;
|
3637
|
+
} & DataPlaneFetcherExtraProps;
|
3638
|
+
/**
|
3639
|
+
* Adds a new column to the table. The body of the request should contain the column definition. In the column definition, the 'name' field should
|
3640
|
+
* contain the full path separated by dots. If the parent objects do not exists, they will be automatically created. For example,
|
3641
|
+
* passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
|
3642
|
+
*/
|
3643
|
+
declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3644
|
+
type GetColumnPathParams = {
|
3645
|
+
/**
|
3646
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3647
|
+
*/
|
3648
|
+
dbBranchName: DBBranchName;
|
3649
|
+
/**
|
3650
|
+
* The Table name
|
3651
|
+
*/
|
3652
|
+
tableName: TableName;
|
3653
|
+
/**
|
3654
|
+
* The Column name
|
3655
|
+
*/
|
3656
|
+
columnName: ColumnName;
|
3657
|
+
workspace: string;
|
3658
|
+
region: string;
|
3659
|
+
};
|
3660
|
+
type GetColumnError = ErrorWrapper<{
|
3661
|
+
status: 400;
|
3662
|
+
payload: BadRequestError;
|
3663
|
+
} | {
|
3664
|
+
status: 401;
|
3665
|
+
payload: AuthError;
|
3666
|
+
} | {
|
3667
|
+
status: 404;
|
3668
|
+
payload: SimpleError;
|
3669
|
+
}>;
|
3670
|
+
type GetColumnVariables = {
|
3671
|
+
pathParams: GetColumnPathParams;
|
3672
|
+
} & DataPlaneFetcherExtraProps;
|
3673
|
+
/**
|
3674
|
+
* Get the definition of a single column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
|
3675
|
+
*/
|
3676
|
+
declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
|
3677
|
+
type UpdateColumnPathParams = {
|
3678
|
+
/**
|
3679
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3680
|
+
*/
|
3681
|
+
dbBranchName: DBBranchName;
|
3682
|
+
/**
|
3683
|
+
* The Table name
|
3684
|
+
*/
|
3685
|
+
tableName: TableName;
|
3686
|
+
/**
|
3687
|
+
* The Column name
|
3688
|
+
*/
|
3689
|
+
columnName: ColumnName;
|
3690
|
+
workspace: string;
|
3691
|
+
region: string;
|
3692
|
+
};
|
3693
|
+
type UpdateColumnError = ErrorWrapper<{
|
3694
|
+
status: 400;
|
3695
|
+
payload: BadRequestError;
|
3696
|
+
} | {
|
3697
|
+
status: 401;
|
3698
|
+
payload: AuthError;
|
3699
|
+
} | {
|
3700
|
+
status: 404;
|
3701
|
+
payload: SimpleError;
|
3702
|
+
}>;
|
3703
|
+
type UpdateColumnRequestBody = {
|
3704
|
+
/**
|
3705
|
+
* @minLength 1
|
3706
|
+
*/
|
3707
|
+
name: string;
|
3708
|
+
};
|
3709
|
+
type UpdateColumnVariables = {
|
3710
|
+
body: UpdateColumnRequestBody;
|
3711
|
+
pathParams: UpdateColumnPathParams;
|
3712
|
+
} & DataPlaneFetcherExtraProps;
|
3713
|
+
/**
|
3714
|
+
* Update column with partial data. Can be used for renaming the column by providing a new "name" field. To refer to sub-objects, the column name can contain dots. For example `address.country`.
|
3715
|
+
*/
|
3716
|
+
declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3717
|
+
type DeleteColumnPathParams = {
|
3718
|
+
/**
|
3719
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3720
|
+
*/
|
3721
|
+
dbBranchName: DBBranchName;
|
3722
|
+
/**
|
3723
|
+
* The Table name
|
3724
|
+
*/
|
3725
|
+
tableName: TableName;
|
3726
|
+
/**
|
3727
|
+
* The Column name
|
3728
|
+
*/
|
3729
|
+
columnName: ColumnName;
|
3730
|
+
workspace: string;
|
3731
|
+
region: string;
|
3732
|
+
};
|
3733
|
+
type DeleteColumnError = ErrorWrapper<{
|
3734
|
+
status: 400;
|
3735
|
+
payload: BadRequestError;
|
3736
|
+
} | {
|
3737
|
+
status: 401;
|
3738
|
+
payload: AuthError;
|
3739
|
+
} | {
|
3740
|
+
status: 404;
|
3741
|
+
payload: SimpleError;
|
3742
|
+
}>;
|
3743
|
+
type DeleteColumnVariables = {
|
3744
|
+
pathParams: DeleteColumnPathParams;
|
3745
|
+
} & DataPlaneFetcherExtraProps;
|
3746
|
+
/**
|
3747
|
+
* Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
|
3748
|
+
*/
|
3749
|
+
declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3750
|
+
type BranchTransactionPathParams = {
|
3751
|
+
/**
|
3752
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3753
|
+
*/
|
3754
|
+
dbBranchName: DBBranchName;
|
3755
|
+
workspace: string;
|
3756
|
+
region: string;
|
3757
|
+
};
|
3758
|
+
type BranchTransactionError = ErrorWrapper<{
|
3759
|
+
status: 400;
|
3760
|
+
payload: TransactionFailure;
|
3761
|
+
} | {
|
3762
|
+
status: 401;
|
3763
|
+
payload: AuthError;
|
3764
|
+
} | {
|
3765
|
+
status: 404;
|
3766
|
+
payload: SimpleError;
|
3767
|
+
}>;
|
3768
|
+
type BranchTransactionRequestBody = {
|
3769
|
+
operations: TransactionOperation$1[];
|
3770
|
+
};
|
3771
|
+
type BranchTransactionVariables = {
|
3772
|
+
body: BranchTransactionRequestBody;
|
3773
|
+
pathParams: BranchTransactionPathParams;
|
3774
|
+
} & DataPlaneFetcherExtraProps;
|
3775
|
+
declare const branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
|
3776
|
+
type InsertRecordPathParams = {
|
3777
|
+
/**
|
3778
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3779
|
+
*/
|
3780
|
+
dbBranchName: DBBranchName;
|
3781
|
+
/**
|
3782
|
+
* The Table name
|
3783
|
+
*/
|
3784
|
+
tableName: TableName;
|
3785
|
+
workspace: string;
|
3786
|
+
region: string;
|
3787
|
+
};
|
3788
|
+
type InsertRecordQueryParams = {
|
3789
|
+
/**
|
3790
|
+
* Column filters
|
3791
|
+
*/
|
3792
|
+
columns?: ColumnsProjection;
|
3793
|
+
};
|
3794
|
+
type InsertRecordError = ErrorWrapper<{
|
3795
|
+
status: 400;
|
3796
|
+
payload: BadRequestError;
|
3797
|
+
} | {
|
3798
|
+
status: 401;
|
3799
|
+
payload: AuthError;
|
3800
|
+
} | {
|
3801
|
+
status: 404;
|
3802
|
+
payload: SimpleError;
|
3803
|
+
}>;
|
3804
|
+
type InsertRecordVariables = {
|
3805
|
+
body?: DataInputRecord;
|
3806
|
+
pathParams: InsertRecordPathParams;
|
3807
|
+
queryParams?: InsertRecordQueryParams;
|
3808
|
+
} & DataPlaneFetcherExtraProps;
|
3809
|
+
/**
|
3810
|
+
* Insert a new Record into the Table
|
3811
|
+
*/
|
3812
|
+
declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
3813
|
+
type GetFileItemPathParams = {
|
3814
|
+
/**
|
3815
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3816
|
+
*/
|
3817
|
+
dbBranchName: DBBranchName;
|
3818
|
+
/**
|
3819
|
+
* The Table name
|
3820
|
+
*/
|
3821
|
+
tableName: TableName;
|
3822
|
+
/**
|
3823
|
+
* The Record name
|
3824
|
+
*/
|
3825
|
+
recordId: RecordID;
|
3826
|
+
/**
|
3827
|
+
* The Column name
|
3367
3828
|
*/
|
3368
|
-
|
3829
|
+
columnName: ColumnName;
|
3369
3830
|
/**
|
3370
|
-
* The
|
3831
|
+
* The File Identifier
|
3371
3832
|
*/
|
3372
|
-
|
3833
|
+
fileId: FileID;
|
3373
3834
|
workspace: string;
|
3374
3835
|
region: string;
|
3375
3836
|
};
|
3376
|
-
type
|
3837
|
+
type GetFileItemError = ErrorWrapper<{
|
3377
3838
|
status: 400;
|
3378
3839
|
payload: BadRequestError;
|
3379
3840
|
} | {
|
@@ -3383,17 +3844,14 @@ type AddTableColumnError = ErrorWrapper<{
|
|
3383
3844
|
status: 404;
|
3384
3845
|
payload: SimpleError;
|
3385
3846
|
}>;
|
3386
|
-
type
|
3387
|
-
|
3388
|
-
pathParams: AddTableColumnPathParams;
|
3847
|
+
type GetFileItemVariables = {
|
3848
|
+
pathParams: GetFileItemPathParams;
|
3389
3849
|
} & DataPlaneFetcherExtraProps;
|
3390
3850
|
/**
|
3391
|
-
*
|
3392
|
-
* contain the full path separated by dots. If the parent objects do not exists, they will be automatically created. For example,
|
3393
|
-
* passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
|
3851
|
+
* Retrieves file content from an array by file ID
|
3394
3852
|
*/
|
3395
|
-
declare const
|
3396
|
-
type
|
3853
|
+
declare const getFileItem: (variables: GetFileItemVariables, signal?: AbortSignal) => Promise<Blob>;
|
3854
|
+
type PutFileItemPathParams = {
|
3397
3855
|
/**
|
3398
3856
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3399
3857
|
*/
|
@@ -3402,14 +3860,22 @@ type GetColumnPathParams = {
|
|
3402
3860
|
* The Table name
|
3403
3861
|
*/
|
3404
3862
|
tableName: TableName;
|
3863
|
+
/**
|
3864
|
+
* The Record name
|
3865
|
+
*/
|
3866
|
+
recordId: RecordID;
|
3405
3867
|
/**
|
3406
3868
|
* The Column name
|
3407
3869
|
*/
|
3408
3870
|
columnName: ColumnName;
|
3871
|
+
/**
|
3872
|
+
* The File Identifier
|
3873
|
+
*/
|
3874
|
+
fileId: FileID;
|
3409
3875
|
workspace: string;
|
3410
3876
|
region: string;
|
3411
3877
|
};
|
3412
|
-
type
|
3878
|
+
type PutFileItemError = ErrorWrapper<{
|
3413
3879
|
status: 400;
|
3414
3880
|
payload: BadRequestError;
|
3415
3881
|
} | {
|
@@ -3418,15 +3884,19 @@ type GetColumnError = ErrorWrapper<{
|
|
3418
3884
|
} | {
|
3419
3885
|
status: 404;
|
3420
3886
|
payload: SimpleError;
|
3887
|
+
} | {
|
3888
|
+
status: 422;
|
3889
|
+
payload: SimpleError;
|
3421
3890
|
}>;
|
3422
|
-
type
|
3423
|
-
|
3891
|
+
type PutFileItemVariables = {
|
3892
|
+
body?: Blob;
|
3893
|
+
pathParams: PutFileItemPathParams;
|
3424
3894
|
} & DataPlaneFetcherExtraProps;
|
3425
3895
|
/**
|
3426
|
-
*
|
3896
|
+
* Uploads the file content to an array given the file ID
|
3427
3897
|
*/
|
3428
|
-
declare const
|
3429
|
-
type
|
3898
|
+
declare const putFileItem: (variables: PutFileItemVariables, signal?: AbortSignal) => Promise<FileResponse>;
|
3899
|
+
type DeleteFileItemPathParams = {
|
3430
3900
|
/**
|
3431
3901
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3432
3902
|
*/
|
@@ -3435,14 +3905,22 @@ type UpdateColumnPathParams = {
|
|
3435
3905
|
* The Table name
|
3436
3906
|
*/
|
3437
3907
|
tableName: TableName;
|
3908
|
+
/**
|
3909
|
+
* The Record name
|
3910
|
+
*/
|
3911
|
+
recordId: RecordID;
|
3438
3912
|
/**
|
3439
3913
|
* The Column name
|
3440
3914
|
*/
|
3441
3915
|
columnName: ColumnName;
|
3916
|
+
/**
|
3917
|
+
* The File Identifier
|
3918
|
+
*/
|
3919
|
+
fileId: FileID;
|
3442
3920
|
workspace: string;
|
3443
3921
|
region: string;
|
3444
3922
|
};
|
3445
|
-
type
|
3923
|
+
type DeleteFileItemError = ErrorWrapper<{
|
3446
3924
|
status: 400;
|
3447
3925
|
payload: BadRequestError;
|
3448
3926
|
} | {
|
@@ -3452,21 +3930,14 @@ type UpdateColumnError = ErrorWrapper<{
|
|
3452
3930
|
status: 404;
|
3453
3931
|
payload: SimpleError;
|
3454
3932
|
}>;
|
3455
|
-
type
|
3456
|
-
|
3457
|
-
* @minLength 1
|
3458
|
-
*/
|
3459
|
-
name: string;
|
3460
|
-
};
|
3461
|
-
type UpdateColumnVariables = {
|
3462
|
-
body: UpdateColumnRequestBody;
|
3463
|
-
pathParams: UpdateColumnPathParams;
|
3933
|
+
type DeleteFileItemVariables = {
|
3934
|
+
pathParams: DeleteFileItemPathParams;
|
3464
3935
|
} & DataPlaneFetcherExtraProps;
|
3465
3936
|
/**
|
3466
|
-
*
|
3937
|
+
* Deletes an item from an file array column given the file ID
|
3467
3938
|
*/
|
3468
|
-
declare const
|
3469
|
-
type
|
3939
|
+
declare const deleteFileItem: (variables: DeleteFileItemVariables, signal?: AbortSignal) => Promise<FileResponse>;
|
3940
|
+
type GetFilePathParams = {
|
3470
3941
|
/**
|
3471
3942
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3472
3943
|
*/
|
@@ -3475,6 +3946,10 @@ type DeleteColumnPathParams = {
|
|
3475
3946
|
* The Table name
|
3476
3947
|
*/
|
3477
3948
|
tableName: TableName;
|
3949
|
+
/**
|
3950
|
+
* The Record name
|
3951
|
+
*/
|
3952
|
+
recordId: RecordID;
|
3478
3953
|
/**
|
3479
3954
|
* The Column name
|
3480
3955
|
*/
|
@@ -3482,7 +3957,7 @@ type DeleteColumnPathParams = {
|
|
3482
3957
|
workspace: string;
|
3483
3958
|
region: string;
|
3484
3959
|
};
|
3485
|
-
type
|
3960
|
+
type GetFileError = ErrorWrapper<{
|
3486
3961
|
status: 400;
|
3487
3962
|
payload: BadRequestError;
|
3488
3963
|
} | {
|
@@ -3492,14 +3967,14 @@ type DeleteColumnError = ErrorWrapper<{
|
|
3492
3967
|
status: 404;
|
3493
3968
|
payload: SimpleError;
|
3494
3969
|
}>;
|
3495
|
-
type
|
3496
|
-
pathParams:
|
3970
|
+
type GetFileVariables = {
|
3971
|
+
pathParams: GetFilePathParams;
|
3497
3972
|
} & DataPlaneFetcherExtraProps;
|
3498
3973
|
/**
|
3499
|
-
*
|
3974
|
+
* Retrieves the file content from a file column
|
3500
3975
|
*/
|
3501
|
-
declare const
|
3502
|
-
type
|
3976
|
+
declare const getFile: (variables: GetFileVariables, signal?: AbortSignal) => Promise<Blob>;
|
3977
|
+
type PutFilePathParams = {
|
3503
3978
|
/**
|
3504
3979
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3505
3980
|
*/
|
@@ -3508,16 +3983,18 @@ type InsertRecordPathParams = {
|
|
3508
3983
|
* The Table name
|
3509
3984
|
*/
|
3510
3985
|
tableName: TableName;
|
3511
|
-
workspace: string;
|
3512
|
-
region: string;
|
3513
|
-
};
|
3514
|
-
type InsertRecordQueryParams = {
|
3515
3986
|
/**
|
3516
|
-
*
|
3987
|
+
* The Record name
|
3517
3988
|
*/
|
3518
|
-
|
3989
|
+
recordId: RecordID;
|
3990
|
+
/**
|
3991
|
+
* The Column name
|
3992
|
+
*/
|
3993
|
+
columnName: ColumnName;
|
3994
|
+
workspace: string;
|
3995
|
+
region: string;
|
3519
3996
|
};
|
3520
|
-
type
|
3997
|
+
type PutFileError = ErrorWrapper<{
|
3521
3998
|
status: 400;
|
3522
3999
|
payload: BadRequestError;
|
3523
4000
|
} | {
|
@@ -3526,16 +4003,18 @@ type InsertRecordError = ErrorWrapper<{
|
|
3526
4003
|
} | {
|
3527
4004
|
status: 404;
|
3528
4005
|
payload: SimpleError;
|
4006
|
+
} | {
|
4007
|
+
status: 422;
|
4008
|
+
payload: SimpleError;
|
3529
4009
|
}>;
|
3530
|
-
type
|
3531
|
-
body?:
|
3532
|
-
pathParams:
|
3533
|
-
queryParams?: InsertRecordQueryParams;
|
4010
|
+
type PutFileVariables = {
|
4011
|
+
body?: Blob;
|
4012
|
+
pathParams: PutFilePathParams;
|
3534
4013
|
} & DataPlaneFetcherExtraProps;
|
3535
4014
|
/**
|
3536
|
-
*
|
4015
|
+
* Uploads the file content to the given file column
|
3537
4016
|
*/
|
3538
|
-
declare const
|
4017
|
+
declare const putFile: (variables: PutFileVariables, signal?: AbortSignal) => Promise<FileResponse>;
|
3539
4018
|
type GetRecordPathParams = {
|
3540
4019
|
/**
|
3541
4020
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -3614,7 +4093,7 @@ type InsertRecordWithIDError = ErrorWrapper<{
|
|
3614
4093
|
payload: SimpleError;
|
3615
4094
|
}>;
|
3616
4095
|
type InsertRecordWithIDVariables = {
|
3617
|
-
body?:
|
4096
|
+
body?: DataInputRecord;
|
3618
4097
|
pathParams: InsertRecordWithIDPathParams;
|
3619
4098
|
queryParams?: InsertRecordWithIDQueryParams;
|
3620
4099
|
} & DataPlaneFetcherExtraProps;
|
@@ -3659,7 +4138,7 @@ type UpdateRecordWithIDError = ErrorWrapper<{
|
|
3659
4138
|
payload: SimpleError;
|
3660
4139
|
}>;
|
3661
4140
|
type UpdateRecordWithIDVariables = {
|
3662
|
-
body?:
|
4141
|
+
body?: DataInputRecord;
|
3663
4142
|
pathParams: UpdateRecordWithIDPathParams;
|
3664
4143
|
queryParams?: UpdateRecordWithIDQueryParams;
|
3665
4144
|
} & DataPlaneFetcherExtraProps;
|
@@ -3701,7 +4180,7 @@ type UpsertRecordWithIDError = ErrorWrapper<{
|
|
3701
4180
|
payload: SimpleError;
|
3702
4181
|
}>;
|
3703
4182
|
type UpsertRecordWithIDVariables = {
|
3704
|
-
body?:
|
4183
|
+
body?: DataInputRecord;
|
3705
4184
|
pathParams: UpsertRecordWithIDPathParams;
|
3706
4185
|
queryParams?: UpsertRecordWithIDQueryParams;
|
3707
4186
|
} & DataPlaneFetcherExtraProps;
|
@@ -3775,7 +4254,7 @@ type BulkInsertTableRecordsError = ErrorWrapper<{
|
|
3775
4254
|
payload: SimpleError;
|
3776
4255
|
}>;
|
3777
4256
|
type BulkInsertTableRecordsRequestBody = {
|
3778
|
-
records:
|
4257
|
+
records: DataInputRecord[];
|
3779
4258
|
};
|
3780
4259
|
type BulkInsertTableRecordsVariables = {
|
3781
4260
|
body: BulkInsertTableRecordsRequestBody;
|
@@ -4476,25 +4955,40 @@ type QueryTableVariables = {
|
|
4476
4955
|
* }
|
4477
4956
|
* ```
|
4478
4957
|
*
|
4479
|
-
*
|
4958
|
+
* It is also possible to sort results randomly:
|
4959
|
+
*
|
4960
|
+
* ```json
|
4961
|
+
* POST /db/demo:main/tables/table/query
|
4962
|
+
* {
|
4963
|
+
* "sort": {
|
4964
|
+
* "*": "random"
|
4965
|
+
* }
|
4966
|
+
* }
|
4967
|
+
* ```
|
4480
4968
|
*
|
4481
|
-
*
|
4482
|
-
* cursor pagination is needed in order to retrieve all of their results. The offset pagination method is limited to 1000 records.
|
4969
|
+
* Note that a random sort does not apply to a specific column, hence the special column name `"*"`.
|
4483
4970
|
*
|
4484
|
-
*
|
4971
|
+
* A random sort can be combined with an ascending or descending sort on a specific column:
|
4485
4972
|
*
|
4486
4973
|
* ```json
|
4487
4974
|
* POST /db/demo:main/tables/table/query
|
4488
4975
|
* {
|
4489
|
-
* "
|
4490
|
-
*
|
4491
|
-
*
|
4492
|
-
*
|
4976
|
+
* "sort": [
|
4977
|
+
* {
|
4978
|
+
* "name": "desc"
|
4979
|
+
* },
|
4980
|
+
* {
|
4981
|
+
* "*": "random"
|
4982
|
+
* }
|
4983
|
+
* ]
|
4493
4984
|
* }
|
4494
4985
|
* ```
|
4495
4986
|
*
|
4496
|
-
*
|
4497
|
-
*
|
4987
|
+
* This will sort on the `name` column, breaking ties randomly.
|
4988
|
+
*
|
4989
|
+
* ### Pagination
|
4990
|
+
*
|
4991
|
+
* 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.
|
4498
4992
|
*
|
4499
4993
|
* Example of cursor pagination:
|
4500
4994
|
*
|
@@ -4548,6 +5042,34 @@ type QueryTableVariables = {
|
|
4548
5042
|
* `filter` or `sort` is set. The columns returned and page size can be changed
|
4549
5043
|
* anytime by passing the `columns` or `page.size` settings to the next query.
|
4550
5044
|
*
|
5045
|
+
* In the following example of size + offset pagination we retrieve the third page of up to 100 results:
|
5046
|
+
*
|
5047
|
+
* ```json
|
5048
|
+
* POST /db/demo:main/tables/table/query
|
5049
|
+
* {
|
5050
|
+
* "page": {
|
5051
|
+
* "size": 100,
|
5052
|
+
* "offset": 200
|
5053
|
+
* }
|
5054
|
+
* }
|
5055
|
+
* ```
|
5056
|
+
*
|
5057
|
+
* 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.
|
5058
|
+
* 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.
|
5059
|
+
*
|
5060
|
+
* 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:
|
5061
|
+
*
|
5062
|
+
* ```json
|
5063
|
+
* POST /db/demo:main/tables/table/query
|
5064
|
+
* {
|
5065
|
+
* "page": {
|
5066
|
+
* "size": 200,
|
5067
|
+
* "offset": 800,
|
5068
|
+
* "after": "fMoxCsIwFIDh3WP8c4amDai5hO5SJCRNfaVSeC9b6d1FD"
|
5069
|
+
* }
|
5070
|
+
* }
|
5071
|
+
* ```
|
5072
|
+
*
|
4551
5073
|
* **Special cursors:**
|
4552
5074
|
*
|
4553
5075
|
* - `page.after=end`: Result points past the last entry. The list of records
|
@@ -4613,25 +5135,174 @@ type SearchBranchRequestBody = {
|
|
4613
5135
|
boosters?: BoosterExpression[];
|
4614
5136
|
})[];
|
4615
5137
|
/**
|
4616
|
-
* The query string.
|
5138
|
+
* The query string.
|
5139
|
+
*
|
5140
|
+
* @minLength 1
|
5141
|
+
*/
|
5142
|
+
query: string;
|
5143
|
+
fuzziness?: FuzzinessExpression;
|
5144
|
+
prefix?: PrefixExpression;
|
5145
|
+
highlight?: HighlightExpression;
|
5146
|
+
page?: SearchPageConfig;
|
5147
|
+
};
|
5148
|
+
type SearchBranchVariables = {
|
5149
|
+
body: SearchBranchRequestBody;
|
5150
|
+
pathParams: SearchBranchPathParams;
|
5151
|
+
} & DataPlaneFetcherExtraProps;
|
5152
|
+
/**
|
5153
|
+
* Run a free text search operation across the database branch.
|
5154
|
+
*/
|
5155
|
+
declare const searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
5156
|
+
type SearchTablePathParams = {
|
5157
|
+
/**
|
5158
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
5159
|
+
*/
|
5160
|
+
dbBranchName: DBBranchName;
|
5161
|
+
/**
|
5162
|
+
* The Table name
|
5163
|
+
*/
|
5164
|
+
tableName: TableName;
|
5165
|
+
workspace: string;
|
5166
|
+
region: string;
|
5167
|
+
};
|
5168
|
+
type SearchTableError = ErrorWrapper<{
|
5169
|
+
status: 400;
|
5170
|
+
payload: BadRequestError;
|
5171
|
+
} | {
|
5172
|
+
status: 401;
|
5173
|
+
payload: AuthError;
|
5174
|
+
} | {
|
5175
|
+
status: 404;
|
5176
|
+
payload: SimpleError;
|
5177
|
+
}>;
|
5178
|
+
type SearchTableRequestBody = {
|
5179
|
+
/**
|
5180
|
+
* The query string.
|
5181
|
+
*
|
5182
|
+
* @minLength 1
|
5183
|
+
*/
|
5184
|
+
query: string;
|
5185
|
+
fuzziness?: FuzzinessExpression;
|
5186
|
+
target?: TargetExpression;
|
5187
|
+
prefix?: PrefixExpression;
|
5188
|
+
filter?: FilterExpression;
|
5189
|
+
highlight?: HighlightExpression;
|
5190
|
+
boosters?: BoosterExpression[];
|
5191
|
+
page?: SearchPageConfig;
|
5192
|
+
};
|
5193
|
+
type SearchTableVariables = {
|
5194
|
+
body: SearchTableRequestBody;
|
5195
|
+
pathParams: SearchTablePathParams;
|
5196
|
+
} & DataPlaneFetcherExtraProps;
|
5197
|
+
/**
|
5198
|
+
* Run a free text search operation in a particular table.
|
5199
|
+
*
|
5200
|
+
* 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:
|
5201
|
+
* * filters `$contains`, `$startsWith`, `$endsWith` don't work on columns of type `text`
|
5202
|
+
* * filtering on columns of type `multiple` is currently unsupported
|
5203
|
+
*/
|
5204
|
+
declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
5205
|
+
type SqlQueryPathParams = {
|
5206
|
+
/**
|
5207
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
5208
|
+
*/
|
5209
|
+
dbBranchName: DBBranchName;
|
5210
|
+
workspace: string;
|
5211
|
+
region: string;
|
5212
|
+
};
|
5213
|
+
type SqlQueryError = ErrorWrapper<{
|
5214
|
+
status: 400;
|
5215
|
+
payload: BadRequestError;
|
5216
|
+
} | {
|
5217
|
+
status: 401;
|
5218
|
+
payload: AuthError;
|
5219
|
+
} | {
|
5220
|
+
status: 404;
|
5221
|
+
payload: SimpleError;
|
5222
|
+
}>;
|
5223
|
+
type SqlQueryRequestBody = {
|
5224
|
+
/**
|
5225
|
+
* The query string.
|
5226
|
+
*
|
5227
|
+
* @minLength 1
|
5228
|
+
*/
|
5229
|
+
query: string;
|
5230
|
+
/**
|
5231
|
+
* The consistency level for this request.
|
5232
|
+
*
|
5233
|
+
* @default strong
|
5234
|
+
*/
|
5235
|
+
consistency?: 'strong' | 'eventual';
|
5236
|
+
};
|
5237
|
+
type SqlQueryVariables = {
|
5238
|
+
body: SqlQueryRequestBody;
|
5239
|
+
pathParams: SqlQueryPathParams;
|
5240
|
+
} & DataPlaneFetcherExtraProps;
|
5241
|
+
/**
|
5242
|
+
* Run an SQL query across the database branch.
|
5243
|
+
*/
|
5244
|
+
declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<SQLResponse>;
|
5245
|
+
type VectorSearchTablePathParams = {
|
5246
|
+
/**
|
5247
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
5248
|
+
*/
|
5249
|
+
dbBranchName: DBBranchName;
|
5250
|
+
/**
|
5251
|
+
* The Table name
|
5252
|
+
*/
|
5253
|
+
tableName: TableName;
|
5254
|
+
workspace: string;
|
5255
|
+
region: string;
|
5256
|
+
};
|
5257
|
+
type VectorSearchTableError = ErrorWrapper<{
|
5258
|
+
status: 400;
|
5259
|
+
payload: BadRequestError;
|
5260
|
+
} | {
|
5261
|
+
status: 401;
|
5262
|
+
payload: AuthError;
|
5263
|
+
} | {
|
5264
|
+
status: 404;
|
5265
|
+
payload: SimpleError;
|
5266
|
+
}>;
|
5267
|
+
type VectorSearchTableRequestBody = {
|
5268
|
+
/**
|
5269
|
+
* The vector to search for similarities. Must have the same dimension as
|
5270
|
+
* the vector column used.
|
5271
|
+
*/
|
5272
|
+
queryVector: number[];
|
5273
|
+
/**
|
5274
|
+
* The vector column in which to search. It must be of type `vector`.
|
5275
|
+
*/
|
5276
|
+
column: string;
|
5277
|
+
/**
|
5278
|
+
* The function used to measure the distance between two points. Can be one of:
|
5279
|
+
* `cosineSimilarity`, `l1`, `l2`. The default is `cosineSimilarity`.
|
4617
5280
|
*
|
4618
|
-
* @
|
5281
|
+
* @default cosineSimilarity
|
4619
5282
|
*/
|
4620
|
-
|
4621
|
-
|
4622
|
-
|
4623
|
-
|
4624
|
-
|
5283
|
+
similarityFunction?: string;
|
5284
|
+
/**
|
5285
|
+
* Number of results to return.
|
5286
|
+
*
|
5287
|
+
* @default 10
|
5288
|
+
* @maximum 100
|
5289
|
+
* @minimum 1
|
5290
|
+
*/
|
5291
|
+
size?: number;
|
5292
|
+
filter?: FilterExpression;
|
4625
5293
|
};
|
4626
|
-
type
|
4627
|
-
body:
|
4628
|
-
pathParams:
|
5294
|
+
type VectorSearchTableVariables = {
|
5295
|
+
body: VectorSearchTableRequestBody;
|
5296
|
+
pathParams: VectorSearchTablePathParams;
|
4629
5297
|
} & DataPlaneFetcherExtraProps;
|
4630
5298
|
/**
|
4631
|
-
*
|
5299
|
+
* This endpoint can be used to perform vector-based similarity searches in a table.
|
5300
|
+
* It can be used for implementing semantic search and product recommendation. To use this
|
5301
|
+
* endpoint, you need a column of type vector. The input vector must have the same
|
5302
|
+
* dimension as the vector column.
|
4632
5303
|
*/
|
4633
|
-
declare const
|
4634
|
-
type
|
5304
|
+
declare const vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
5305
|
+
type AskTablePathParams = {
|
4635
5306
|
/**
|
4636
5307
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4637
5308
|
*/
|
@@ -4643,7 +5314,7 @@ type SearchTablePathParams = {
|
|
4643
5314
|
workspace: string;
|
4644
5315
|
region: string;
|
4645
5316
|
};
|
4646
|
-
type
|
5317
|
+
type AskTableError = ErrorWrapper<{
|
4647
5318
|
status: 400;
|
4648
5319
|
payload: BadRequestError;
|
4649
5320
|
} | {
|
@@ -4652,34 +5323,69 @@ type SearchTableError = ErrorWrapper<{
|
|
4652
5323
|
} | {
|
4653
5324
|
status: 404;
|
4654
5325
|
payload: SimpleError;
|
5326
|
+
} | {
|
5327
|
+
status: 429;
|
5328
|
+
payload: RateLimitError;
|
4655
5329
|
}>;
|
4656
|
-
type
|
5330
|
+
type AskTableResponse = {
|
4657
5331
|
/**
|
4658
|
-
* The
|
5332
|
+
* The answer to the input question
|
5333
|
+
*/
|
5334
|
+
answer?: string;
|
5335
|
+
};
|
5336
|
+
type AskTableRequestBody = {
|
5337
|
+
/**
|
5338
|
+
* The question you'd like to ask.
|
4659
5339
|
*
|
4660
|
-
* @minLength
|
5340
|
+
* @minLength 3
|
5341
|
+
*/
|
5342
|
+
question: string;
|
5343
|
+
/**
|
5344
|
+
* The type of search to use. If set to `keyword` (the default), the search can be configured by passing
|
5345
|
+
* a `search` object with the following fields. For more details about each, see the Search endpoint documentation.
|
5346
|
+
* All fields are optional.
|
5347
|
+
* * fuzziness - typo tolerance
|
5348
|
+
* * target - columns to search into, and weights.
|
5349
|
+
* * prefix - prefix search type.
|
5350
|
+
* * filter - pre-filter before searching.
|
5351
|
+
* * boosters - control relevancy.
|
5352
|
+
* If set to `vector`, a `vectorSearch` object must be passed, with the following parameters. For more details, see the Vector
|
5353
|
+
* Search endpoint documentation. The `column` and `contentColumn` parameters are required.
|
5354
|
+
* * column - the vector column containing the embeddings.
|
5355
|
+
* * contentColumn - the column that contains the text from which the embeddings where computed.
|
5356
|
+
* * filter - pre-filter before searching.
|
5357
|
+
*
|
5358
|
+
* @default keyword
|
4661
5359
|
*/
|
4662
|
-
|
4663
|
-
|
4664
|
-
|
4665
|
-
|
4666
|
-
|
4667
|
-
|
4668
|
-
|
4669
|
-
|
5360
|
+
searchType?: 'keyword' | 'vector';
|
5361
|
+
search?: {
|
5362
|
+
fuzziness?: FuzzinessExpression;
|
5363
|
+
target?: TargetExpression;
|
5364
|
+
prefix?: PrefixExpression;
|
5365
|
+
filter?: FilterExpression;
|
5366
|
+
boosters?: BoosterExpression[];
|
5367
|
+
};
|
5368
|
+
vectorSearch?: {
|
5369
|
+
/**
|
5370
|
+
* The column to use for vector search. It must be of type `vector`.
|
5371
|
+
*/
|
5372
|
+
column: string;
|
5373
|
+
/**
|
5374
|
+
* The column containing the text for vector search. Must be of type `text`.
|
5375
|
+
*/
|
5376
|
+
contentColumn: string;
|
5377
|
+
filter?: FilterExpression;
|
5378
|
+
};
|
5379
|
+
rules?: string[];
|
4670
5380
|
};
|
4671
|
-
type
|
4672
|
-
body:
|
4673
|
-
pathParams:
|
5381
|
+
type AskTableVariables = {
|
5382
|
+
body: AskTableRequestBody;
|
5383
|
+
pathParams: AskTablePathParams;
|
4674
5384
|
} & DataPlaneFetcherExtraProps;
|
4675
5385
|
/**
|
4676
|
-
*
|
4677
|
-
*
|
4678
|
-
* 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:
|
4679
|
-
* * filters `$contains`, `$startsWith`, `$endsWith` don't work on columns of type `text`
|
4680
|
-
* * filtering on columns of type `multiple` is currently unsupported
|
5386
|
+
* Ask your table a question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
|
4681
5387
|
*/
|
4682
|
-
declare const
|
5388
|
+
declare const askTable: (variables: AskTableVariables, signal?: AbortSignal) => Promise<AskTableResponse>;
|
4683
5389
|
type SummarizeTablePathParams = {
|
4684
5390
|
/**
|
4685
5391
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -4826,7 +5532,7 @@ type AggregateTableVariables = {
|
|
4826
5532
|
pathParams: AggregateTablePathParams;
|
4827
5533
|
} & DataPlaneFetcherExtraProps;
|
4828
5534
|
/**
|
4829
|
-
* This endpoint allows you to run
|
5535
|
+
* This endpoint allows you to run aggregations (analytics) on the data from one table.
|
4830
5536
|
* While the summary endpoint is served from a transactional store and the results are strongly
|
4831
5537
|
* consistent, the aggregate endpoint is served from our columnar store and the results are
|
4832
5538
|
* only eventually consistent. On the other hand, the aggregate endpoint uses a
|
@@ -4843,6 +5549,7 @@ declare const operationsByTag: {
|
|
4843
5549
|
getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal | undefined) => Promise<DBBranch>;
|
4844
5550
|
createBranch: (variables: CreateBranchVariables, signal?: AbortSignal | undefined) => Promise<CreateBranchResponse>;
|
4845
5551
|
deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal | undefined) => Promise<DeleteBranchResponse>;
|
5552
|
+
copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal | undefined) => Promise<BranchWithCopyID>;
|
4846
5553
|
updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
4847
5554
|
getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<BranchMetadata>;
|
4848
5555
|
getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal | undefined) => Promise<GetBranchStatsResponse>;
|
@@ -4851,23 +5558,6 @@ declare const operationsByTag: {
|
|
4851
5558
|
removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
4852
5559
|
resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal | undefined) => Promise<ResolveBranchResponse>;
|
4853
5560
|
};
|
4854
|
-
records: {
|
4855
|
-
branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
|
4856
|
-
insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
4857
|
-
getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
|
4858
|
-
insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
4859
|
-
updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
4860
|
-
upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
4861
|
-
deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
|
4862
|
-
bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
|
4863
|
-
};
|
4864
|
-
database: {
|
4865
|
-
dEPRECATEDgetDatabaseList: (variables: DEPRECATEDgetDatabaseListVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDListDatabasesResponse>;
|
4866
|
-
dEPRECATEDcreateDatabase: (variables: DEPRECATEDcreateDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDcreateDatabaseResponse>;
|
4867
|
-
dEPRECATEDdeleteDatabase: (variables: DEPRECATEDdeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDdeleteDatabaseResponse>;
|
4868
|
-
dEPRECATEDgetDatabaseMetadata: (variables: DEPRECATEDgetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDDatabaseMetadata>;
|
4869
|
-
dEPRECATEDupdateDatabaseMetadata: (variables: DEPRECATEDupdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DEPRECATEDDatabaseMetadata>;
|
4870
|
-
};
|
4871
5561
|
migrations: {
|
4872
5562
|
getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchMigrationHistoryResponse>;
|
4873
5563
|
getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<BranchMigrationPlan>;
|
@@ -4878,6 +5568,17 @@ declare const operationsByTag: {
|
|
4878
5568
|
updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
|
4879
5569
|
previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<PreviewBranchSchemaEditResponse>;
|
4880
5570
|
applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
|
5571
|
+
pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
|
5572
|
+
};
|
5573
|
+
records: {
|
5574
|
+
branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
|
5575
|
+
insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
5576
|
+
getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
|
5577
|
+
insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
5578
|
+
updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
5579
|
+
upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
5580
|
+
deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
|
5581
|
+
bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
|
4881
5582
|
};
|
4882
5583
|
migrationRequests: {
|
4883
5584
|
queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal | undefined) => Promise<QueryMigrationRequestsResponse>;
|
@@ -4887,7 +5588,7 @@ declare const operationsByTag: {
|
|
4887
5588
|
listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal | undefined) => Promise<ListMigrationRequestsCommitsResponse>;
|
4888
5589
|
compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<SchemaCompareResponse>;
|
4889
5590
|
getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal | undefined) => Promise<GetMigrationRequestIsMergedResponse>;
|
4890
|
-
mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<
|
5591
|
+
mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<BranchOp>;
|
4891
5592
|
};
|
4892
5593
|
table: {
|
4893
5594
|
createTable: (variables: CreateTableVariables, signal?: AbortSignal | undefined) => Promise<CreateTableResponse>;
|
@@ -4901,10 +5602,20 @@ declare const operationsByTag: {
|
|
4901
5602
|
updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
|
4902
5603
|
deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
|
4903
5604
|
};
|
5605
|
+
files: {
|
5606
|
+
getFileItem: (variables: GetFileItemVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
|
5607
|
+
putFileItem: (variables: PutFileItemVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
|
5608
|
+
deleteFileItem: (variables: DeleteFileItemVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
|
5609
|
+
getFile: (variables: GetFileVariables, signal?: AbortSignal | undefined) => Promise<Blob>;
|
5610
|
+
putFile: (variables: PutFileVariables, signal?: AbortSignal | undefined) => Promise<FileResponse>;
|
5611
|
+
};
|
4904
5612
|
searchAndFilter: {
|
4905
5613
|
queryTable: (variables: QueryTableVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
|
4906
5614
|
searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
|
4907
5615
|
searchTable: (variables: SearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
|
5616
|
+
sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal | undefined) => Promise<SQLResponse>;
|
5617
|
+
vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
|
5618
|
+
askTable: (variables: AskTableVariables, signal?: AbortSignal | undefined) => Promise<AskTableResponse>;
|
4908
5619
|
summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal | undefined) => Promise<SummarizeResponse>;
|
4909
5620
|
aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal | undefined) => Promise<AggResponse>;
|
4910
5621
|
};
|
@@ -4941,11 +5652,15 @@ declare const operationsByTag: {
|
|
4941
5652
|
deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DeleteDatabaseResponse>;
|
4942
5653
|
getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
|
4943
5654
|
updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
|
5655
|
+
renameDatabase: (variables: RenameDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
|
5656
|
+
getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
|
5657
|
+
updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
|
5658
|
+
deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
4944
5659
|
listRegions: (variables: ListRegionsVariables, signal?: AbortSignal | undefined) => Promise<ListRegionsResponse>;
|
4945
5660
|
};
|
4946
5661
|
};
|
4947
5662
|
|
4948
|
-
type HostAliases = 'production' | 'staging';
|
5663
|
+
type HostAliases = 'production' | 'staging' | 'dev';
|
4949
5664
|
type ProviderBuilder = {
|
4950
5665
|
main: string;
|
4951
5666
|
workspaces: string;
|
@@ -4955,254 +5670,293 @@ declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder)
|
|
4955
5670
|
declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
|
4956
5671
|
declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
|
4957
5672
|
declare function parseProviderString(provider?: string): HostProvider | null;
|
5673
|
+
declare function buildProviderString(provider: HostProvider): string;
|
4958
5674
|
declare function parseWorkspacesUrlParts(url: string): {
|
4959
5675
|
workspace: string;
|
4960
5676
|
region: string;
|
4961
5677
|
} | null;
|
4962
5678
|
|
5679
|
+
type responses_AggResponse = AggResponse;
|
4963
5680
|
type responses_AuthError = AuthError;
|
4964
5681
|
type responses_BadRequestError = BadRequestError;
|
4965
|
-
type
|
5682
|
+
type responses_BranchMigrationPlan = BranchMigrationPlan;
|
4966
5683
|
type responses_BulkError = BulkError;
|
4967
5684
|
type responses_BulkInsertResponse = BulkInsertResponse;
|
4968
|
-
type
|
5685
|
+
type responses_PutFileResponse = PutFileResponse;
|
5686
|
+
type responses_QueryResponse = QueryResponse;
|
5687
|
+
type responses_RateLimitError = RateLimitError;
|
4969
5688
|
type responses_RecordResponse = RecordResponse;
|
4970
|
-
type responses_SchemaCompareResponse = SchemaCompareResponse;
|
4971
5689
|
type responses_RecordUpdateResponse = RecordUpdateResponse;
|
4972
|
-
type
|
5690
|
+
type responses_SQLResponse = SQLResponse;
|
5691
|
+
type responses_SchemaCompareResponse = SchemaCompareResponse;
|
4973
5692
|
type responses_SchemaUpdateResponse = SchemaUpdateResponse;
|
4974
|
-
type responses_SummarizeResponse = SummarizeResponse;
|
4975
|
-
type responses_AggResponse = AggResponse;
|
4976
5693
|
type responses_SearchResponse = SearchResponse;
|
4977
|
-
type
|
4978
|
-
type
|
5694
|
+
type responses_SimpleError = SimpleError;
|
5695
|
+
type responses_SummarizeResponse = SummarizeResponse;
|
4979
5696
|
declare namespace responses {
|
4980
5697
|
export {
|
5698
|
+
responses_AggResponse as AggResponse,
|
4981
5699
|
responses_AuthError as AuthError,
|
4982
5700
|
responses_BadRequestError as BadRequestError,
|
4983
|
-
|
5701
|
+
responses_BranchMigrationPlan as BranchMigrationPlan,
|
4984
5702
|
responses_BulkError as BulkError,
|
4985
5703
|
responses_BulkInsertResponse as BulkInsertResponse,
|
4986
|
-
|
5704
|
+
responses_PutFileResponse as PutFileResponse,
|
5705
|
+
responses_QueryResponse as QueryResponse,
|
5706
|
+
responses_RateLimitError as RateLimitError,
|
4987
5707
|
responses_RecordResponse as RecordResponse,
|
4988
|
-
responses_SchemaCompareResponse as SchemaCompareResponse,
|
4989
5708
|
responses_RecordUpdateResponse as RecordUpdateResponse,
|
4990
|
-
|
5709
|
+
responses_SQLResponse as SQLResponse,
|
5710
|
+
responses_SchemaCompareResponse as SchemaCompareResponse,
|
4991
5711
|
responses_SchemaUpdateResponse as SchemaUpdateResponse,
|
4992
|
-
responses_SummarizeResponse as SummarizeResponse,
|
4993
|
-
responses_AggResponse as AggResponse,
|
4994
5712
|
responses_SearchResponse as SearchResponse,
|
4995
|
-
|
4996
|
-
|
5713
|
+
responses_SimpleError as SimpleError,
|
5714
|
+
responses_SummarizeResponse as SummarizeResponse,
|
4997
5715
|
};
|
4998
5716
|
}
|
4999
5717
|
|
5718
|
+
type schemas_APIKeyName = APIKeyName;
|
5719
|
+
type schemas_AggExpression = AggExpression;
|
5720
|
+
type schemas_AggExpressionMap = AggExpressionMap;
|
5721
|
+
type schemas_AverageAgg = AverageAgg;
|
5722
|
+
type schemas_BoosterExpression = BoosterExpression;
|
5723
|
+
type schemas_Branch = Branch;
|
5000
5724
|
type schemas_BranchMetadata = BranchMetadata;
|
5725
|
+
type schemas_BranchMigration = BranchMigration;
|
5001
5726
|
type schemas_BranchName = BranchName;
|
5002
|
-
type
|
5003
|
-
type
|
5004
|
-
type schemas_MigrationStatus = MigrationStatus;
|
5005
|
-
type schemas_DEPRECATEDDatabaseMetadata = DEPRECATEDDatabaseMetadata;
|
5006
|
-
type schemas_DEPRECATEDListDatabasesResponse = DEPRECATEDListDatabasesResponse;
|
5007
|
-
type schemas_ListBranchesResponse = ListBranchesResponse;
|
5008
|
-
type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
|
5009
|
-
type schemas_Branch = Branch;
|
5010
|
-
type schemas_DBBranch = DBBranch;
|
5011
|
-
type schemas_StartedFromMetadata = StartedFromMetadata;
|
5012
|
-
type schemas_Schema = Schema;
|
5013
|
-
type schemas_SchemaEditScript = SchemaEditScript;
|
5014
|
-
type schemas_Table = Table;
|
5727
|
+
type schemas_BranchOp = BranchOp;
|
5728
|
+
type schemas_BranchWithCopyID = BranchWithCopyID;
|
5015
5729
|
type schemas_Column = Column;
|
5016
5730
|
type schemas_ColumnLink = ColumnLink;
|
5017
|
-
type schemas_RevLink = RevLink;
|
5018
|
-
type schemas_DBBranchName = DBBranchName;
|
5019
|
-
type schemas_TableName = TableName;
|
5020
|
-
type schemas_ColumnName = ColumnName;
|
5021
|
-
type schemas_MetricsDatapoint = MetricsDatapoint;
|
5022
|
-
type schemas_MetricsLatency = MetricsLatency;
|
5023
|
-
type schemas_BranchMigration = BranchMigration;
|
5024
|
-
type schemas_TableMigration = TableMigration;
|
5025
5731
|
type schemas_ColumnMigration = ColumnMigration;
|
5026
|
-
type
|
5027
|
-
type schemas_Migration = Migration;
|
5028
|
-
type schemas_MigrationOp = MigrationOp;
|
5029
|
-
type schemas_MigrationTableOp = MigrationTableOp;
|
5030
|
-
type schemas_MigrationColumnOp = MigrationColumnOp;
|
5031
|
-
type schemas_TableOpAdd = TableOpAdd;
|
5032
|
-
type schemas_TableOpRemove = TableOpRemove;
|
5033
|
-
type schemas_TableOpRename = TableOpRename;
|
5732
|
+
type schemas_ColumnName = ColumnName;
|
5034
5733
|
type schemas_ColumnOpAdd = ColumnOpAdd;
|
5035
5734
|
type schemas_ColumnOpRemove = ColumnOpRemove;
|
5036
5735
|
type schemas_ColumnOpRename = ColumnOpRename;
|
5037
|
-
type
|
5038
|
-
type
|
5039
|
-
type
|
5040
|
-
type schemas_SortOrder = SortOrder;
|
5041
|
-
type schemas_FuzzinessExpression = FuzzinessExpression;
|
5042
|
-
type schemas_PrefixExpression = PrefixExpression;
|
5043
|
-
type schemas_TargetExpression = TargetExpression;
|
5044
|
-
type schemas_FilterExpression = FilterExpression;
|
5045
|
-
type schemas_SummaryExpressionList = SummaryExpressionList;
|
5046
|
-
type schemas_SummaryExpression = SummaryExpression;
|
5047
|
-
type schemas_AggExpressionMap = AggExpressionMap;
|
5048
|
-
type schemas_AggExpression = AggExpression;
|
5736
|
+
type schemas_ColumnVector = ColumnVector;
|
5737
|
+
type schemas_ColumnsProjection = ColumnsProjection;
|
5738
|
+
type schemas_Commit = Commit;
|
5049
5739
|
type schemas_CountAgg = CountAgg;
|
5050
|
-
type
|
5051
|
-
type
|
5052
|
-
type
|
5053
|
-
type
|
5054
|
-
type
|
5740
|
+
type schemas_DBBranch = DBBranch;
|
5741
|
+
type schemas_DBBranchName = DBBranchName;
|
5742
|
+
type schemas_DBName = DBName;
|
5743
|
+
type schemas_DataInputRecord = DataInputRecord;
|
5744
|
+
type schemas_DatabaseGithubSettings = DatabaseGithubSettings;
|
5745
|
+
type schemas_DatabaseMetadata = DatabaseMetadata;
|
5055
5746
|
type schemas_DateHistogramAgg = DateHistogramAgg;
|
5056
|
-
type
|
5057
|
-
type
|
5058
|
-
type
|
5059
|
-
type
|
5060
|
-
type schemas_FilterList = FilterList;
|
5747
|
+
type schemas_DateTime = DateTime;
|
5748
|
+
type schemas_FileID = FileID;
|
5749
|
+
type schemas_FileName = FileName;
|
5750
|
+
type schemas_FileResponse = FileResponse;
|
5061
5751
|
type schemas_FilterColumn = FilterColumn;
|
5062
5752
|
type schemas_FilterColumnIncludes = FilterColumnIncludes;
|
5753
|
+
type schemas_FilterExpression = FilterExpression;
|
5754
|
+
type schemas_FilterList = FilterList;
|
5063
5755
|
type schemas_FilterPredicate = FilterPredicate;
|
5064
5756
|
type schemas_FilterPredicateOp = FilterPredicateOp;
|
5065
5757
|
type schemas_FilterPredicateRangeOp = FilterPredicateRangeOp;
|
5066
5758
|
type schemas_FilterRangeValue = FilterRangeValue;
|
5067
5759
|
type schemas_FilterValue = FilterValue;
|
5760
|
+
type schemas_FuzzinessExpression = FuzzinessExpression;
|
5761
|
+
type schemas_HighlightExpression = HighlightExpression;
|
5762
|
+
type schemas_InputFile = InputFile;
|
5763
|
+
type schemas_InputFileArray = InputFileArray;
|
5764
|
+
type schemas_InputFileEntry = InputFileEntry;
|
5765
|
+
type schemas_InviteID = InviteID;
|
5766
|
+
type schemas_InviteKey = InviteKey;
|
5767
|
+
type schemas_ListBranchesResponse = ListBranchesResponse;
|
5768
|
+
type schemas_ListDatabasesResponse = ListDatabasesResponse;
|
5769
|
+
type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
|
5770
|
+
type schemas_ListRegionsResponse = ListRegionsResponse;
|
5771
|
+
type schemas_MaxAgg = MaxAgg;
|
5772
|
+
type schemas_MediaType = MediaType;
|
5773
|
+
type schemas_MetricsDatapoint = MetricsDatapoint;
|
5774
|
+
type schemas_MetricsLatency = MetricsLatency;
|
5775
|
+
type schemas_Migration = Migration;
|
5776
|
+
type schemas_MigrationColumnOp = MigrationColumnOp;
|
5777
|
+
type schemas_MigrationObject = MigrationObject;
|
5778
|
+
type schemas_MigrationOp = MigrationOp;
|
5779
|
+
type schemas_MigrationRequest = MigrationRequest;
|
5780
|
+
type schemas_MigrationRequestNumber = MigrationRequestNumber;
|
5781
|
+
type schemas_MigrationStatus = MigrationStatus;
|
5782
|
+
type schemas_MigrationTableOp = MigrationTableOp;
|
5783
|
+
type schemas_MinAgg = MinAgg;
|
5784
|
+
type schemas_NumericHistogramAgg = NumericHistogramAgg;
|
5785
|
+
type schemas_ObjectValue = ObjectValue;
|
5068
5786
|
type schemas_PageConfig = PageConfig;
|
5069
|
-
type
|
5070
|
-
type schemas_ColumnsProjection = ColumnsProjection;
|
5071
|
-
type schemas_RecordMeta = RecordMeta;
|
5787
|
+
type schemas_PrefixExpression = PrefixExpression;
|
5072
5788
|
type schemas_RecordID = RecordID;
|
5073
|
-
type
|
5789
|
+
type schemas_RecordMeta = RecordMeta;
|
5074
5790
|
type schemas_RecordsMetadata = RecordsMetadata;
|
5075
|
-
type
|
5076
|
-
type
|
5791
|
+
type schemas_Region = Region;
|
5792
|
+
type schemas_RevLink = RevLink;
|
5793
|
+
type schemas_Role = Role;
|
5794
|
+
type schemas_SQLRecord = SQLRecord;
|
5795
|
+
type schemas_Schema = Schema;
|
5796
|
+
type schemas_SchemaEditScript = SchemaEditScript;
|
5797
|
+
type schemas_SearchPageConfig = SearchPageConfig;
|
5798
|
+
type schemas_SortExpression = SortExpression;
|
5799
|
+
type schemas_SortOrder = SortOrder;
|
5800
|
+
type schemas_StartedFromMetadata = StartedFromMetadata;
|
5801
|
+
type schemas_SumAgg = SumAgg;
|
5802
|
+
type schemas_SummaryExpression = SummaryExpression;
|
5803
|
+
type schemas_SummaryExpressionList = SummaryExpressionList;
|
5804
|
+
type schemas_Table = Table;
|
5805
|
+
type schemas_TableMigration = TableMigration;
|
5806
|
+
type schemas_TableName = TableName;
|
5807
|
+
type schemas_TableOpAdd = TableOpAdd;
|
5808
|
+
type schemas_TableOpRemove = TableOpRemove;
|
5809
|
+
type schemas_TableOpRename = TableOpRename;
|
5810
|
+
type schemas_TableRename = TableRename;
|
5811
|
+
type schemas_TargetExpression = TargetExpression;
|
5812
|
+
type schemas_TopValuesAgg = TopValuesAgg;
|
5077
5813
|
type schemas_TransactionDeleteOp = TransactionDeleteOp;
|
5814
|
+
type schemas_TransactionError = TransactionError;
|
5815
|
+
type schemas_TransactionFailure = TransactionFailure;
|
5816
|
+
type schemas_TransactionGetOp = TransactionGetOp;
|
5817
|
+
type schemas_TransactionInsertOp = TransactionInsertOp;
|
5818
|
+
type schemas_TransactionResultColumns = TransactionResultColumns;
|
5819
|
+
type schemas_TransactionResultDelete = TransactionResultDelete;
|
5820
|
+
type schemas_TransactionResultGet = TransactionResultGet;
|
5078
5821
|
type schemas_TransactionResultInsert = TransactionResultInsert;
|
5079
5822
|
type schemas_TransactionResultUpdate = TransactionResultUpdate;
|
5080
|
-
type
|
5081
|
-
type
|
5823
|
+
type schemas_TransactionSuccess = TransactionSuccess;
|
5824
|
+
type schemas_TransactionUpdateOp = TransactionUpdateOp;
|
5825
|
+
type schemas_UniqueCountAgg = UniqueCountAgg;
|
5082
5826
|
type schemas_User = User;
|
5083
5827
|
type schemas_UserID = UserID;
|
5084
5828
|
type schemas_UserWithID = UserWithID;
|
5085
|
-
type schemas_APIKeyName = APIKeyName;
|
5086
|
-
type schemas_WorkspaceID = WorkspaceID;
|
5087
|
-
type schemas_Role = Role;
|
5088
|
-
type schemas_WorkspaceMeta = WorkspaceMeta;
|
5089
5829
|
type schemas_Workspace = Workspace;
|
5090
|
-
type
|
5091
|
-
type schemas_InviteID = InviteID;
|
5830
|
+
type schemas_WorkspaceID = WorkspaceID;
|
5092
5831
|
type schemas_WorkspaceInvite = WorkspaceInvite;
|
5832
|
+
type schemas_WorkspaceMember = WorkspaceMember;
|
5093
5833
|
type schemas_WorkspaceMembers = WorkspaceMembers;
|
5094
|
-
type
|
5095
|
-
type schemas_DatabaseMetadata = DatabaseMetadata;
|
5096
|
-
type schemas_ListDatabasesResponse = ListDatabasesResponse;
|
5097
|
-
type schemas_ListRegionsResponse = ListRegionsResponse;
|
5098
|
-
type schemas_Region = Region;
|
5834
|
+
type schemas_WorkspaceMeta = WorkspaceMeta;
|
5099
5835
|
declare namespace schemas {
|
5100
5836
|
export {
|
5101
|
-
|
5102
|
-
|
5103
|
-
|
5104
|
-
|
5105
|
-
|
5106
|
-
|
5107
|
-
|
5108
|
-
|
5109
|
-
|
5110
|
-
|
5111
|
-
|
5112
|
-
|
5113
|
-
schemas_Schema as Schema,
|
5114
|
-
schemas_SchemaEditScript as SchemaEditScript,
|
5115
|
-
schemas_Table as Table,
|
5837
|
+
schemas_APIKeyName as APIKeyName,
|
5838
|
+
schemas_AggExpression as AggExpression,
|
5839
|
+
schemas_AggExpressionMap as AggExpressionMap,
|
5840
|
+
AggResponse$1 as AggResponse,
|
5841
|
+
schemas_AverageAgg as AverageAgg,
|
5842
|
+
schemas_BoosterExpression as BoosterExpression,
|
5843
|
+
schemas_Branch as Branch,
|
5844
|
+
schemas_BranchMetadata as BranchMetadata,
|
5845
|
+
schemas_BranchMigration as BranchMigration,
|
5846
|
+
schemas_BranchName as BranchName,
|
5847
|
+
schemas_BranchOp as BranchOp,
|
5848
|
+
schemas_BranchWithCopyID as BranchWithCopyID,
|
5116
5849
|
schemas_Column as Column,
|
5117
5850
|
schemas_ColumnLink as ColumnLink,
|
5118
|
-
schemas_RevLink as RevLink,
|
5119
|
-
schemas_DBBranchName as DBBranchName,
|
5120
|
-
schemas_TableName as TableName,
|
5121
|
-
schemas_ColumnName as ColumnName,
|
5122
|
-
schemas_MetricsDatapoint as MetricsDatapoint,
|
5123
|
-
schemas_MetricsLatency as MetricsLatency,
|
5124
|
-
schemas_BranchMigration as BranchMigration,
|
5125
|
-
schemas_TableMigration as TableMigration,
|
5126
5851
|
schemas_ColumnMigration as ColumnMigration,
|
5127
|
-
|
5128
|
-
schemas_Migration as Migration,
|
5129
|
-
schemas_MigrationOp as MigrationOp,
|
5130
|
-
schemas_MigrationTableOp as MigrationTableOp,
|
5131
|
-
schemas_MigrationColumnOp as MigrationColumnOp,
|
5132
|
-
schemas_TableOpAdd as TableOpAdd,
|
5133
|
-
schemas_TableOpRemove as TableOpRemove,
|
5134
|
-
schemas_TableOpRename as TableOpRename,
|
5852
|
+
schemas_ColumnName as ColumnName,
|
5135
5853
|
schemas_ColumnOpAdd as ColumnOpAdd,
|
5136
5854
|
schemas_ColumnOpRemove as ColumnOpRemove,
|
5137
5855
|
schemas_ColumnOpRename as ColumnOpRename,
|
5138
|
-
|
5139
|
-
|
5140
|
-
|
5141
|
-
schemas_SortOrder as SortOrder,
|
5142
|
-
schemas_FuzzinessExpression as FuzzinessExpression,
|
5143
|
-
schemas_PrefixExpression as PrefixExpression,
|
5144
|
-
schemas_TargetExpression as TargetExpression,
|
5145
|
-
schemas_FilterExpression as FilterExpression,
|
5146
|
-
schemas_SummaryExpressionList as SummaryExpressionList,
|
5147
|
-
schemas_SummaryExpression as SummaryExpression,
|
5148
|
-
schemas_AggExpressionMap as AggExpressionMap,
|
5149
|
-
schemas_AggExpression as AggExpression,
|
5856
|
+
schemas_ColumnVector as ColumnVector,
|
5857
|
+
schemas_ColumnsProjection as ColumnsProjection,
|
5858
|
+
schemas_Commit as Commit,
|
5150
5859
|
schemas_CountAgg as CountAgg,
|
5151
|
-
|
5152
|
-
|
5153
|
-
|
5154
|
-
|
5155
|
-
|
5156
|
-
|
5157
|
-
schemas_TopValuesAgg as TopValuesAgg,
|
5158
|
-
schemas_NumericHistogramAgg as NumericHistogramAgg,
|
5159
|
-
schemas_HighlightExpression as HighlightExpression,
|
5160
|
-
schemas_BoosterExpression as BoosterExpression,
|
5161
|
-
ValueBooster$1 as ValueBooster,
|
5162
|
-
NumericBooster$1 as NumericBooster,
|
5860
|
+
schemas_DBBranch as DBBranch,
|
5861
|
+
schemas_DBBranchName as DBBranchName,
|
5862
|
+
schemas_DBName as DBName,
|
5863
|
+
schemas_DataInputRecord as DataInputRecord,
|
5864
|
+
schemas_DatabaseGithubSettings as DatabaseGithubSettings,
|
5865
|
+
schemas_DatabaseMetadata as DatabaseMetadata,
|
5163
5866
|
DateBooster$1 as DateBooster,
|
5164
|
-
|
5867
|
+
schemas_DateHistogramAgg as DateHistogramAgg,
|
5868
|
+
schemas_DateTime as DateTime,
|
5869
|
+
schemas_FileID as FileID,
|
5870
|
+
schemas_FileName as FileName,
|
5871
|
+
schemas_FileResponse as FileResponse,
|
5165
5872
|
schemas_FilterColumn as FilterColumn,
|
5166
5873
|
schemas_FilterColumnIncludes as FilterColumnIncludes,
|
5874
|
+
schemas_FilterExpression as FilterExpression,
|
5875
|
+
schemas_FilterList as FilterList,
|
5167
5876
|
schemas_FilterPredicate as FilterPredicate,
|
5168
5877
|
schemas_FilterPredicateOp as FilterPredicateOp,
|
5169
5878
|
schemas_FilterPredicateRangeOp as FilterPredicateRangeOp,
|
5170
5879
|
schemas_FilterRangeValue as FilterRangeValue,
|
5171
5880
|
schemas_FilterValue as FilterValue,
|
5881
|
+
schemas_FuzzinessExpression as FuzzinessExpression,
|
5882
|
+
schemas_HighlightExpression as HighlightExpression,
|
5883
|
+
schemas_InputFile as InputFile,
|
5884
|
+
schemas_InputFileArray as InputFileArray,
|
5885
|
+
schemas_InputFileEntry as InputFileEntry,
|
5886
|
+
schemas_InviteID as InviteID,
|
5887
|
+
schemas_InviteKey as InviteKey,
|
5888
|
+
schemas_ListBranchesResponse as ListBranchesResponse,
|
5889
|
+
schemas_ListDatabasesResponse as ListDatabasesResponse,
|
5890
|
+
schemas_ListGitBranchesResponse as ListGitBranchesResponse,
|
5891
|
+
schemas_ListRegionsResponse as ListRegionsResponse,
|
5892
|
+
schemas_MaxAgg as MaxAgg,
|
5893
|
+
schemas_MediaType as MediaType,
|
5894
|
+
schemas_MetricsDatapoint as MetricsDatapoint,
|
5895
|
+
schemas_MetricsLatency as MetricsLatency,
|
5896
|
+
schemas_Migration as Migration,
|
5897
|
+
schemas_MigrationColumnOp as MigrationColumnOp,
|
5898
|
+
schemas_MigrationObject as MigrationObject,
|
5899
|
+
schemas_MigrationOp as MigrationOp,
|
5900
|
+
schemas_MigrationRequest as MigrationRequest,
|
5901
|
+
schemas_MigrationRequestNumber as MigrationRequestNumber,
|
5902
|
+
schemas_MigrationStatus as MigrationStatus,
|
5903
|
+
schemas_MigrationTableOp as MigrationTableOp,
|
5904
|
+
schemas_MinAgg as MinAgg,
|
5905
|
+
NumericBooster$1 as NumericBooster,
|
5906
|
+
schemas_NumericHistogramAgg as NumericHistogramAgg,
|
5907
|
+
schemas_ObjectValue as ObjectValue,
|
5172
5908
|
schemas_PageConfig as PageConfig,
|
5173
|
-
|
5174
|
-
schemas_ColumnsProjection as ColumnsProjection,
|
5175
|
-
schemas_RecordMeta as RecordMeta,
|
5909
|
+
schemas_PrefixExpression as PrefixExpression,
|
5176
5910
|
schemas_RecordID as RecordID,
|
5177
|
-
|
5911
|
+
schemas_RecordMeta as RecordMeta,
|
5178
5912
|
schemas_RecordsMetadata as RecordsMetadata,
|
5179
|
-
|
5180
|
-
|
5181
|
-
|
5182
|
-
|
5913
|
+
schemas_Region as Region,
|
5914
|
+
schemas_RevLink as RevLink,
|
5915
|
+
schemas_Role as Role,
|
5916
|
+
schemas_SQLRecord as SQLRecord,
|
5917
|
+
schemas_Schema as Schema,
|
5918
|
+
schemas_SchemaEditScript as SchemaEditScript,
|
5919
|
+
schemas_SearchPageConfig as SearchPageConfig,
|
5920
|
+
schemas_SortExpression as SortExpression,
|
5921
|
+
schemas_SortOrder as SortOrder,
|
5922
|
+
schemas_StartedFromMetadata as StartedFromMetadata,
|
5923
|
+
schemas_SumAgg as SumAgg,
|
5924
|
+
schemas_SummaryExpression as SummaryExpression,
|
5925
|
+
schemas_SummaryExpressionList as SummaryExpressionList,
|
5926
|
+
schemas_Table as Table,
|
5927
|
+
schemas_TableMigration as TableMigration,
|
5928
|
+
schemas_TableName as TableName,
|
5929
|
+
schemas_TableOpAdd as TableOpAdd,
|
5930
|
+
schemas_TableOpRemove as TableOpRemove,
|
5931
|
+
schemas_TableOpRename as TableOpRename,
|
5932
|
+
schemas_TableRename as TableRename,
|
5933
|
+
schemas_TargetExpression as TargetExpression,
|
5934
|
+
schemas_TopValuesAgg as TopValuesAgg,
|
5183
5935
|
schemas_TransactionDeleteOp as TransactionDeleteOp,
|
5936
|
+
schemas_TransactionError as TransactionError,
|
5937
|
+
schemas_TransactionFailure as TransactionFailure,
|
5938
|
+
schemas_TransactionGetOp as TransactionGetOp,
|
5939
|
+
schemas_TransactionInsertOp as TransactionInsertOp,
|
5940
|
+
TransactionOperation$1 as TransactionOperation,
|
5941
|
+
schemas_TransactionResultColumns as TransactionResultColumns,
|
5942
|
+
schemas_TransactionResultDelete as TransactionResultDelete,
|
5943
|
+
schemas_TransactionResultGet as TransactionResultGet,
|
5184
5944
|
schemas_TransactionResultInsert as TransactionResultInsert,
|
5185
5945
|
schemas_TransactionResultUpdate as TransactionResultUpdate,
|
5186
|
-
|
5187
|
-
|
5188
|
-
|
5946
|
+
schemas_TransactionSuccess as TransactionSuccess,
|
5947
|
+
schemas_TransactionUpdateOp as TransactionUpdateOp,
|
5948
|
+
schemas_UniqueCountAgg as UniqueCountAgg,
|
5189
5949
|
schemas_User as User,
|
5190
5950
|
schemas_UserID as UserID,
|
5191
5951
|
schemas_UserWithID as UserWithID,
|
5192
|
-
|
5193
|
-
schemas_WorkspaceID as WorkspaceID,
|
5194
|
-
schemas_Role as Role,
|
5195
|
-
schemas_WorkspaceMeta as WorkspaceMeta,
|
5952
|
+
ValueBooster$1 as ValueBooster,
|
5196
5953
|
schemas_Workspace as Workspace,
|
5197
|
-
|
5198
|
-
schemas_InviteID as InviteID,
|
5954
|
+
schemas_WorkspaceID as WorkspaceID,
|
5199
5955
|
schemas_WorkspaceInvite as WorkspaceInvite,
|
5956
|
+
schemas_WorkspaceMember as WorkspaceMember,
|
5200
5957
|
schemas_WorkspaceMembers as WorkspaceMembers,
|
5201
|
-
|
5202
|
-
|
5203
|
-
schemas_ListDatabasesResponse as ListDatabasesResponse,
|
5204
|
-
schemas_ListRegionsResponse as ListRegionsResponse,
|
5205
|
-
schemas_Region as Region,
|
5958
|
+
schemas_WorkspaceMeta as WorkspaceMeta,
|
5959
|
+
XataRecord$1 as XataRecord,
|
5206
5960
|
};
|
5207
5961
|
}
|
5208
5962
|
|
@@ -5213,6 +5967,7 @@ interface XataApiClientOptions {
|
|
5213
5967
|
host?: HostProvider;
|
5214
5968
|
trace?: TraceFunction;
|
5215
5969
|
clientName?: string;
|
5970
|
+
xataAgentExtra?: Record<string, string>;
|
5216
5971
|
}
|
5217
5972
|
declare class XataApiClient {
|
5218
5973
|
#private;
|
@@ -5227,6 +5982,7 @@ declare class XataApiClient {
|
|
5227
5982
|
get migrationRequests(): MigrationRequestsApi;
|
5228
5983
|
get tables(): TableApi;
|
5229
5984
|
get records(): RecordsApi;
|
5985
|
+
get files(): FilesApi;
|
5230
5986
|
get searchAndFilter(): SearchAndFilterApi;
|
5231
5987
|
}
|
5232
5988
|
declare class UserApi {
|
@@ -5333,6 +6089,14 @@ declare class BranchApi {
|
|
5333
6089
|
database: DBName;
|
5334
6090
|
branch: BranchName;
|
5335
6091
|
}): Promise<DeleteBranchResponse>;
|
6092
|
+
copyBranch({ workspace, region, database, branch, destinationBranch, limit }: {
|
6093
|
+
workspace: WorkspaceID;
|
6094
|
+
region: string;
|
6095
|
+
database: DBName;
|
6096
|
+
branch: BranchName;
|
6097
|
+
destinationBranch: BranchName;
|
6098
|
+
limit?: number;
|
6099
|
+
}): Promise<BranchWithCopyID>;
|
5336
6100
|
updateBranchMetadata({ workspace, region, database, branch, metadata }: {
|
5337
6101
|
workspace: WorkspaceID;
|
5338
6102
|
region: string;
|
@@ -5540,6 +6304,60 @@ declare class RecordsApi {
|
|
5540
6304
|
operations: TransactionOperation$1[];
|
5541
6305
|
}): Promise<TransactionSuccess>;
|
5542
6306
|
}
|
6307
|
+
declare class FilesApi {
|
6308
|
+
private extraProps;
|
6309
|
+
constructor(extraProps: ApiExtraProps);
|
6310
|
+
getFileItem({ workspace, region, database, branch, table, record, column, fileId }: {
|
6311
|
+
workspace: WorkspaceID;
|
6312
|
+
region: string;
|
6313
|
+
database: DBName;
|
6314
|
+
branch: BranchName;
|
6315
|
+
table: TableName;
|
6316
|
+
record: RecordID;
|
6317
|
+
column: ColumnName;
|
6318
|
+
fileId: string;
|
6319
|
+
}): Promise<any>;
|
6320
|
+
putFileItem({ workspace, region, database, branch, table, record, column, fileId, file }: {
|
6321
|
+
workspace: WorkspaceID;
|
6322
|
+
region: string;
|
6323
|
+
database: DBName;
|
6324
|
+
branch: BranchName;
|
6325
|
+
table: TableName;
|
6326
|
+
record: RecordID;
|
6327
|
+
column: ColumnName;
|
6328
|
+
fileId: string;
|
6329
|
+
file: any;
|
6330
|
+
}): Promise<PutFileResponse>;
|
6331
|
+
deleteFileItem({ workspace, region, database, branch, table, record, column, fileId }: {
|
6332
|
+
workspace: WorkspaceID;
|
6333
|
+
region: string;
|
6334
|
+
database: DBName;
|
6335
|
+
branch: BranchName;
|
6336
|
+
table: TableName;
|
6337
|
+
record: RecordID;
|
6338
|
+
column: ColumnName;
|
6339
|
+
fileId: string;
|
6340
|
+
}): Promise<PutFileResponse>;
|
6341
|
+
getFile({ workspace, region, database, branch, table, record, column }: {
|
6342
|
+
workspace: WorkspaceID;
|
6343
|
+
region: string;
|
6344
|
+
database: DBName;
|
6345
|
+
branch: BranchName;
|
6346
|
+
table: TableName;
|
6347
|
+
record: RecordID;
|
6348
|
+
column: ColumnName;
|
6349
|
+
}): Promise<any>;
|
6350
|
+
putFile({ workspace, region, database, branch, table, record, column, file }: {
|
6351
|
+
workspace: WorkspaceID;
|
6352
|
+
region: string;
|
6353
|
+
database: DBName;
|
6354
|
+
branch: BranchName;
|
6355
|
+
table: TableName;
|
6356
|
+
record: RecordID;
|
6357
|
+
column: ColumnName;
|
6358
|
+
file: Blob;
|
6359
|
+
}): Promise<PutFileResponse>;
|
6360
|
+
}
|
5543
6361
|
declare class SearchAndFilterApi {
|
5544
6362
|
private extraProps;
|
5545
6363
|
constructor(extraProps: ApiExtraProps);
|
@@ -5585,6 +6403,26 @@ declare class SearchAndFilterApi {
|
|
5585
6403
|
prefix?: PrefixExpression;
|
5586
6404
|
highlight?: HighlightExpression;
|
5587
6405
|
}): Promise<SearchResponse>;
|
6406
|
+
vectorSearchTable({ workspace, region, database, branch, table, queryVector, column, similarityFunction, size, filter }: {
|
6407
|
+
workspace: WorkspaceID;
|
6408
|
+
region: string;
|
6409
|
+
database: DBName;
|
6410
|
+
branch: BranchName;
|
6411
|
+
table: TableName;
|
6412
|
+
queryVector: number[];
|
6413
|
+
column: string;
|
6414
|
+
similarityFunction?: string;
|
6415
|
+
size?: number;
|
6416
|
+
filter?: FilterExpression;
|
6417
|
+
}): Promise<SearchResponse>;
|
6418
|
+
askTable({ workspace, region, database, branch, table, options }: {
|
6419
|
+
workspace: WorkspaceID;
|
6420
|
+
region: string;
|
6421
|
+
database: DBName;
|
6422
|
+
branch: BranchName;
|
6423
|
+
table: TableName;
|
6424
|
+
options: AskTableRequestBody;
|
6425
|
+
}): Promise<AskTableResponse>;
|
5588
6426
|
summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page, consistency }: {
|
5589
6427
|
workspace: WorkspaceID;
|
5590
6428
|
region: string;
|
@@ -5670,7 +6508,7 @@ declare class MigrationRequestsApi {
|
|
5670
6508
|
region: string;
|
5671
6509
|
database: DBName;
|
5672
6510
|
migrationRequest: MigrationRequestNumber;
|
5673
|
-
}): Promise<
|
6511
|
+
}): Promise<BranchOp>;
|
5674
6512
|
}
|
5675
6513
|
declare class MigrationsApi {
|
5676
6514
|
private extraProps;
|
@@ -5708,20 +6546,23 @@ declare class MigrationsApi {
|
|
5708
6546
|
size?: number;
|
5709
6547
|
};
|
5710
6548
|
}): Promise<GetBranchSchemaHistoryResponse>;
|
5711
|
-
compareBranchWithUserSchema({ workspace, region, database, branch, schema }: {
|
6549
|
+
compareBranchWithUserSchema({ workspace, region, database, branch, schema, schemaOperations, branchOperations }: {
|
5712
6550
|
workspace: WorkspaceID;
|
5713
6551
|
region: string;
|
5714
6552
|
database: DBName;
|
5715
6553
|
branch: BranchName;
|
5716
6554
|
schema: Schema;
|
6555
|
+
schemaOperations?: MigrationOp[];
|
6556
|
+
branchOperations?: MigrationOp[];
|
5717
6557
|
}): Promise<SchemaCompareResponse>;
|
5718
|
-
compareBranchSchemas({ workspace, region, database, branch, compare,
|
6558
|
+
compareBranchSchemas({ workspace, region, database, branch, compare, sourceBranchOperations, targetBranchOperations }: {
|
5719
6559
|
workspace: WorkspaceID;
|
5720
6560
|
region: string;
|
5721
6561
|
database: DBName;
|
5722
6562
|
branch: BranchName;
|
5723
6563
|
compare: BranchName;
|
5724
|
-
|
6564
|
+
sourceBranchOperations?: MigrationOp[];
|
6565
|
+
targetBranchOperations?: MigrationOp[];
|
5725
6566
|
}): Promise<SchemaCompareResponse>;
|
5726
6567
|
updateBranchSchema({ workspace, region, database, branch, migration }: {
|
5727
6568
|
workspace: WorkspaceID;
|
@@ -5746,6 +6587,13 @@ declare class MigrationsApi {
|
|
5746
6587
|
branch: BranchName;
|
5747
6588
|
edits: SchemaEditScript;
|
5748
6589
|
}): Promise<SchemaUpdateResponse>;
|
6590
|
+
pushBranchMigrations({ workspace, region, database, branch, migrations }: {
|
6591
|
+
workspace: WorkspaceID;
|
6592
|
+
region: string;
|
6593
|
+
database: DBName;
|
6594
|
+
branch: BranchName;
|
6595
|
+
migrations: MigrationObject[];
|
6596
|
+
}): Promise<SchemaUpdateResponse>;
|
5749
6597
|
}
|
5750
6598
|
declare class DatabaseApi {
|
5751
6599
|
private extraProps;
|
@@ -5771,13 +6619,31 @@ declare class DatabaseApi {
|
|
5771
6619
|
database: DBName;
|
5772
6620
|
metadata: DatabaseMetadata;
|
5773
6621
|
}): Promise<DatabaseMetadata>;
|
6622
|
+
renameDatabase({ workspace, database, newName }: {
|
6623
|
+
workspace: WorkspaceID;
|
6624
|
+
database: DBName;
|
6625
|
+
newName: DBName;
|
6626
|
+
}): Promise<DatabaseMetadata>;
|
6627
|
+
getDatabaseGithubSettings({ workspace, database }: {
|
6628
|
+
workspace: WorkspaceID;
|
6629
|
+
database: DBName;
|
6630
|
+
}): Promise<DatabaseGithubSettings>;
|
6631
|
+
updateDatabaseGithubSettings({ workspace, database, settings }: {
|
6632
|
+
workspace: WorkspaceID;
|
6633
|
+
database: DBName;
|
6634
|
+
settings: DatabaseGithubSettings;
|
6635
|
+
}): Promise<DatabaseGithubSettings>;
|
6636
|
+
deleteDatabaseGithubSettings({ workspace, database }: {
|
6637
|
+
workspace: WorkspaceID;
|
6638
|
+
database: DBName;
|
6639
|
+
}): Promise<void>;
|
5774
6640
|
listRegions({ workspace }: {
|
5775
6641
|
workspace: WorkspaceID;
|
5776
6642
|
}): Promise<ListRegionsResponse>;
|
5777
6643
|
}
|
5778
6644
|
|
5779
6645
|
declare class XataApiPlugin implements XataPlugin {
|
5780
|
-
build(options: XataPluginOptions):
|
6646
|
+
build(options: XataPluginOptions): XataApiClient;
|
5781
6647
|
}
|
5782
6648
|
|
5783
6649
|
type StringKeys<O> = Extract<keyof O, string>;
|
@@ -5826,7 +6692,7 @@ type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = Xat
|
|
5826
6692
|
type ValueAtColumn<O, P extends SelectableColumn<O>> = P extends '*' ? Values<O> : P extends 'id' ? string : P extends keyof O ? O[P] : P extends `${infer K}.${infer V}` ? K extends keyof O ? Values<NonNullable<O[K]> extends infer Item ? Item extends Record<string, any> ? V extends SelectableColumn<Item> ? {
|
5827
6693
|
V: ValueAtColumn<Item, V>;
|
5828
6694
|
} : never : O[K] : never> : never : never;
|
5829
|
-
type MAX_RECURSION =
|
6695
|
+
type MAX_RECURSION = 2;
|
5830
6696
|
type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
|
5831
6697
|
[K in DataProps<O>]: NonNullable<O[K]> extends infer Item ? If<IsArray<Item>, K, // If the property is an array, we stop recursion. We don't support object arrays yet
|
5832
6698
|
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
|
@@ -5862,6 +6728,14 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
|
|
5862
6728
|
* Get metadata of this record.
|
5863
6729
|
*/
|
5864
6730
|
getMetadata(): XataRecordMetadata;
|
6731
|
+
/**
|
6732
|
+
* Get an object representation of this record.
|
6733
|
+
*/
|
6734
|
+
toSerializable(): JSONData<OriginalRecord>;
|
6735
|
+
/**
|
6736
|
+
* Get a string representation of this record.
|
6737
|
+
*/
|
6738
|
+
toString(): string;
|
5865
6739
|
/**
|
5866
6740
|
* Retrieves a refreshed copy of the current record from the database.
|
5867
6741
|
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
@@ -5934,12 +6808,26 @@ type XataRecordMetadata = {
|
|
5934
6808
|
};
|
5935
6809
|
declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
|
5936
6810
|
declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
|
6811
|
+
type NumericOperator = ExclusiveOr<{
|
6812
|
+
$increment?: number;
|
6813
|
+
}, ExclusiveOr<{
|
6814
|
+
$decrement?: number;
|
6815
|
+
}, ExclusiveOr<{
|
6816
|
+
$multiply?: number;
|
6817
|
+
}, {
|
6818
|
+
$divide?: number;
|
6819
|
+
}>>>;
|
6820
|
+
type EditableDataFields<T> = T extends XataRecord ? {
|
6821
|
+
id: string;
|
6822
|
+
} | string : NonNullable<T> extends XataRecord ? {
|
6823
|
+
id: string;
|
6824
|
+
} | string | null | undefined : T extends Date ? string | Date : NonNullable<T> extends Date ? string | Date | null | undefined : T extends number ? number | NumericOperator : T;
|
5937
6825
|
type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
|
5938
|
-
[K in keyof O]: O[K]
|
5939
|
-
|
5940
|
-
|
5941
|
-
|
5942
|
-
|
6826
|
+
[K in keyof O]: EditableDataFields<O[K]>;
|
6827
|
+
}, keyof XataRecord>>;
|
6828
|
+
type JSONDataFields<T> = T extends XataRecord ? string : NonNullable<T> extends XataRecord ? string | null | undefined : T extends Date ? string : NonNullable<T> extends Date ? string | null | undefined : T;
|
6829
|
+
type JSONData<O> = Identifiable & Partial<Omit<{
|
6830
|
+
[K in keyof O]: JSONDataFields<O[K]>;
|
5943
6831
|
}, keyof XataRecord>>;
|
5944
6832
|
|
5945
6833
|
/**
|
@@ -6156,7 +7044,7 @@ declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends X
|
|
6156
7044
|
#private;
|
6157
7045
|
private db;
|
6158
7046
|
constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
|
6159
|
-
build(
|
7047
|
+
build(pluginOptions: XataPluginOptions): SearchPluginResult<Schemas>;
|
6160
7048
|
}
|
6161
7049
|
type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
|
6162
7050
|
getMetadata: () => XataRecordMetadata & SearchExtraProperties;
|
@@ -6346,12 +7234,53 @@ type ComplexAggregationResult = {
|
|
6346
7234
|
}>;
|
6347
7235
|
};
|
6348
7236
|
|
7237
|
+
type KeywordAskOptions<Record extends XataRecord> = {
|
7238
|
+
searchType: 'keyword';
|
7239
|
+
search?: {
|
7240
|
+
fuzziness?: FuzzinessExpression;
|
7241
|
+
target?: TargetColumn<Record>[];
|
7242
|
+
prefix?: PrefixExpression;
|
7243
|
+
filter?: Filter<Record>;
|
7244
|
+
boosters?: Boosters<Record>[];
|
7245
|
+
};
|
7246
|
+
};
|
7247
|
+
type VectorAskOptions<Record extends XataRecord> = {
|
7248
|
+
searchType: 'vector';
|
7249
|
+
vectorSearch?: {
|
7250
|
+
/**
|
7251
|
+
* The column to use for vector search. It must be of type `vector`.
|
7252
|
+
*/
|
7253
|
+
column: string;
|
7254
|
+
/**
|
7255
|
+
* The column containing the text for vector search. Must be of type `text`.
|
7256
|
+
*/
|
7257
|
+
contentColumn: string;
|
7258
|
+
filter?: Filter<Record>;
|
7259
|
+
};
|
7260
|
+
};
|
7261
|
+
type TypeAskOptions<Record extends XataRecord> = KeywordAskOptions<Record> | VectorAskOptions<Record>;
|
7262
|
+
type BaseAskOptions = {
|
7263
|
+
rules?: string[];
|
7264
|
+
};
|
7265
|
+
type AskOptions<Record extends XataRecord> = TypeAskOptions<Record> & BaseAskOptions;
|
7266
|
+
type AskResult = {
|
7267
|
+
answer?: string;
|
7268
|
+
records?: string[];
|
7269
|
+
};
|
7270
|
+
|
6349
7271
|
type SortDirection = 'asc' | 'desc';
|
6350
|
-
type
|
7272
|
+
type RandomFilter = {
|
7273
|
+
'*': 'random';
|
7274
|
+
};
|
7275
|
+
type RandomFilterExtended = {
|
7276
|
+
column: '*';
|
7277
|
+
direction: 'random';
|
7278
|
+
};
|
7279
|
+
type SortFilterExtended<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = RandomFilterExtended | {
|
6351
7280
|
column: Columns;
|
6352
7281
|
direction?: SortDirection;
|
6353
7282
|
};
|
6354
|
-
type SortFilter<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns
|
7283
|
+
type SortFilter<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns> | RandomFilter;
|
6355
7284
|
type SortFilterBase<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Values<{
|
6356
7285
|
[Key in Columns]: {
|
6357
7286
|
[K in Key]: SortDirection;
|
@@ -6374,6 +7303,7 @@ type SummarizeParams<Record extends XataRecord, Expression extends Dictionary<Su
|
|
6374
7303
|
pagination?: {
|
6375
7304
|
size: number;
|
6376
7305
|
};
|
7306
|
+
consistency?: 'strong' | 'eventual';
|
6377
7307
|
};
|
6378
7308
|
type SummarizeResult<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
|
6379
7309
|
summaries: SummarizeResultItem<Record, Expression, Columns>[];
|
@@ -6401,7 +7331,7 @@ type BaseOptions<T extends XataRecord> = {
|
|
6401
7331
|
type CursorQueryOptions = {
|
6402
7332
|
pagination?: CursorNavigationOptions & OffsetNavigationOptions;
|
6403
7333
|
filter?: never;
|
6404
|
-
sort?: never
|
7334
|
+
sort?: never;
|
6405
7335
|
};
|
6406
7336
|
type OffsetQueryOptions<T extends XataRecord> = {
|
6407
7337
|
pagination?: OffsetNavigationOptions;
|
@@ -6472,17 +7402,19 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6472
7402
|
* })
|
6473
7403
|
* ```
|
6474
7404
|
*
|
6475
|
-
* @param
|
7405
|
+
* @param filter A filter object
|
6476
7406
|
* @returns A new Query object.
|
6477
7407
|
*/
|
6478
|
-
filter(
|
7408
|
+
filter(filter?: Filter<Record>): Query<Record, Result>;
|
6479
7409
|
/**
|
6480
7410
|
* Builds a new query with a new sort option.
|
6481
7411
|
* @param column The column name.
|
6482
7412
|
* @param direction The direction. Either ascending or descending.
|
6483
7413
|
* @returns A new Query object.
|
6484
7414
|
*/
|
6485
|
-
sort<F extends ColumnsByValue<Record, any>>(column: F, direction
|
7415
|
+
sort<F extends ColumnsByValue<Record, any>>(column: F, direction: SortDirection): Query<Record, Result>;
|
7416
|
+
sort(column: '*', direction: 'random'): Query<Record, Result>;
|
7417
|
+
sort<F extends ColumnsByValue<Record, any>>(column: F): Query<Record, Result>;
|
6486
7418
|
/**
|
6487
7419
|
* Builds a new query specifying the set of columns to be returned in the query response.
|
6488
7420
|
* @param columns Array of column names to be returned by the query.
|
@@ -6508,7 +7440,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6508
7440
|
* @param options Pagination options
|
6509
7441
|
* @returns A page of results
|
6510
7442
|
*/
|
6511
|
-
getPaginated<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<Page<Record, SelectedPick<Record, typeof options['columns']>>>;
|
7443
|
+
getPaginated<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<Page<Record, SelectedPick<Record, (typeof options)['columns']>>>;
|
6512
7444
|
/**
|
6513
7445
|
* Get results in an iterator
|
6514
7446
|
*
|
@@ -6539,7 +7471,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6539
7471
|
*/
|
6540
7472
|
getIterator<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
|
6541
7473
|
batchSize?: number;
|
6542
|
-
}>(options: Options): AsyncGenerator<SelectedPick<Record, typeof options['columns']>[]>;
|
7474
|
+
}>(options: Options): AsyncGenerator<SelectedPick<Record, (typeof options)['columns']>[]>;
|
6543
7475
|
/**
|
6544
7476
|
* Performs the query in the database and returns a set of results.
|
6545
7477
|
* @returns An array of records from the database.
|
@@ -6550,7 +7482,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6550
7482
|
* @param options Additional options to be used when performing the query.
|
6551
7483
|
* @returns An array of records from the database.
|
6552
7484
|
*/
|
6553
|
-
getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, typeof options['columns']>>>;
|
7485
|
+
getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<RecordArray<SelectedPick<Record, (typeof options)['columns']>>>;
|
6554
7486
|
/**
|
6555
7487
|
* Performs the query in the database and returns a set of results.
|
6556
7488
|
* @param options Additional options to be used when performing the query.
|
@@ -6571,7 +7503,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6571
7503
|
*/
|
6572
7504
|
getAll<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
|
6573
7505
|
batchSize?: number;
|
6574
|
-
}>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>[]>;
|
7506
|
+
}>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>[]>;
|
6575
7507
|
/**
|
6576
7508
|
* Performs the query in the database and returns all the results.
|
6577
7509
|
* Warning: If there are a large number of results, this method can have performance implications.
|
@@ -6591,7 +7523,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6591
7523
|
* @param options Additional options to be used when performing the query.
|
6592
7524
|
* @returns The first record that matches the query, or null if no record matched the query.
|
6593
7525
|
*/
|
6594
|
-
getFirst<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']> | null>;
|
7526
|
+
getFirst<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']> | null>;
|
6595
7527
|
/**
|
6596
7528
|
* Performs the query in the database and returns the first result.
|
6597
7529
|
* @param options Additional options to be used when performing the query.
|
@@ -6610,7 +7542,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6610
7542
|
* @returns The first record that matches the query, or null if no record matched the query.
|
6611
7543
|
* @throws if there are no results.
|
6612
7544
|
*/
|
6613
|
-
getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>>;
|
7545
|
+
getFirstOrThrow<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, (typeof options)['columns']>>;
|
6614
7546
|
/**
|
6615
7547
|
* Performs the query in the database and returns the first result.
|
6616
7548
|
* @param options Additional options to be used when performing the query.
|
@@ -6741,6 +7673,8 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
|
|
6741
7673
|
constructor(page: Paginable<any, Result>, overrideRecords?: Result[]);
|
6742
7674
|
static parseConstructorParams(...args: any[]): any[];
|
6743
7675
|
toArray(): Result[];
|
7676
|
+
toSerializable(): JSONData<Result>[];
|
7677
|
+
toString(): string;
|
6744
7678
|
map<U>(callbackfn: (value: Result, index: number, array: Result[]) => U, thisArg?: any): U[];
|
6745
7679
|
/**
|
6746
7680
|
* Retrieve next page of records
|
@@ -7267,6 +8201,30 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7267
8201
|
page?: SearchPageConfig;
|
7268
8202
|
target?: TargetColumn<Record>[];
|
7269
8203
|
}): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
|
8204
|
+
/**
|
8205
|
+
* Search for vectors in the table.
|
8206
|
+
* @param column The column to search for.
|
8207
|
+
* @param query The vector to search for similarities. Must have the same dimension as the vector column used.
|
8208
|
+
* @param options The options to search with (like: spaceFunction)
|
8209
|
+
*/
|
8210
|
+
abstract vectorSearch<F extends ColumnsByValue<Record, number[]>>(column: F, query: number[], options?: {
|
8211
|
+
/**
|
8212
|
+
* The function used to measure the distance between two points. Can be one of:
|
8213
|
+
* `cosineSimilarity`, `l1`, `l2`. The default is `cosineSimilarity`.
|
8214
|
+
*
|
8215
|
+
* @default cosineSimilarity
|
8216
|
+
*/
|
8217
|
+
similarityFunction?: string;
|
8218
|
+
/**
|
8219
|
+
* Number of results to return.
|
8220
|
+
*
|
8221
|
+
* @default 10
|
8222
|
+
* @maximum 100
|
8223
|
+
* @minimum 1
|
8224
|
+
*/
|
8225
|
+
size?: number;
|
8226
|
+
filter?: Filter<Record>;
|
8227
|
+
}): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
|
7270
8228
|
/**
|
7271
8229
|
* Aggregates records in the table.
|
7272
8230
|
* @param expression The aggregations to perform.
|
@@ -7274,6 +8232,16 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7274
8232
|
* @returns The requested aggregations.
|
7275
8233
|
*/
|
7276
8234
|
abstract aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(expression?: Expression, filter?: Filter<Record>): Promise<AggregationResult<Record, Expression>>;
|
8235
|
+
/**
|
8236
|
+
* Experimental: Ask the database to perform a natural language question.
|
8237
|
+
*/
|
8238
|
+
abstract ask(question: string, options?: AskOptions<Record>): Promise<AskResult>;
|
8239
|
+
/**
|
8240
|
+
* Experimental: Ask the database to perform a natural language question.
|
8241
|
+
*/
|
8242
|
+
abstract ask(question: string, options: AskOptions<Record> & {
|
8243
|
+
onMessage: (message: AskResult) => void;
|
8244
|
+
}): void;
|
7277
8245
|
abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
|
7278
8246
|
}
|
7279
8247
|
declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
|
@@ -7395,9 +8363,17 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
|
|
7395
8363
|
page?: SearchPageConfig;
|
7396
8364
|
target?: TargetColumn<Record>[];
|
7397
8365
|
}): Promise<any>;
|
8366
|
+
vectorSearch<F extends ColumnsByValue<Record, number[]>>(column: F, query: number[], options?: {
|
8367
|
+
similarityFunction?: string | undefined;
|
8368
|
+
size?: number | undefined;
|
8369
|
+
filter?: Filter<Record> | undefined;
|
8370
|
+
} | undefined): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
|
7398
8371
|
aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
|
7399
8372
|
query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
|
7400
8373
|
summarizeTable<Result extends XataRecord>(query: Query<Record, Result>, summaries?: Dictionary<SummarizeExpression<Record>>, summariesFilter?: FilterExpression): Promise<SummarizeResponse>;
|
8374
|
+
ask(question: string, options?: AskOptions<Record> & {
|
8375
|
+
onMessage?: (message: AskResult) => void;
|
8376
|
+
}): any;
|
7401
8377
|
}
|
7402
8378
|
|
7403
8379
|
type BaseSchema = {
|
@@ -7453,7 +8429,7 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
|
|
7453
8429
|
} : {
|
7454
8430
|
[K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
|
7455
8431
|
} : never : never;
|
7456
|
-
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 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
|
8432
|
+
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 {
|
7457
8433
|
name: string;
|
7458
8434
|
type: string;
|
7459
8435
|
} ? UnionToIntersection<Values<{
|
@@ -7651,23 +8627,20 @@ type TransactionPluginResult<Schemas extends Record<string, XataRecord>> = {
|
|
7651
8627
|
run: <Tables extends StringKeys<Schemas>, Operations extends TransactionOperation<Schemas, Tables>[]>(operations: Narrow<Operations>) => Promise<TransactionResults<Schemas, Tables, Operations>>;
|
7652
8628
|
};
|
7653
8629
|
declare class TransactionPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
7654
|
-
build(
|
8630
|
+
build(pluginOptions: XataPluginOptions): TransactionPluginResult<Schemas>;
|
7655
8631
|
}
|
7656
8632
|
|
7657
|
-
type BranchStrategyValue = string | undefined | null;
|
7658
|
-
type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
|
7659
|
-
type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
|
7660
|
-
type BranchStrategyOption = NonNullable<BranchStrategy | BranchStrategy[]>;
|
7661
|
-
|
7662
8633
|
type BaseClientOptions = {
|
7663
8634
|
fetch?: FetchImpl;
|
8635
|
+
host?: HostProvider;
|
7664
8636
|
apiKey?: string;
|
7665
8637
|
databaseURL?: string;
|
7666
|
-
branch?:
|
8638
|
+
branch?: string;
|
7667
8639
|
cache?: CacheImpl;
|
7668
8640
|
trace?: TraceFunction;
|
7669
8641
|
enableBrowser?: boolean;
|
7670
8642
|
clientName?: string;
|
8643
|
+
xataAgentExtra?: Record<string, string>;
|
7671
8644
|
};
|
7672
8645
|
declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
|
7673
8646
|
interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
@@ -7694,38 +8667,41 @@ declare class Serializer {
|
|
7694
8667
|
toJSON<T>(data: T): string;
|
7695
8668
|
fromJSON<T>(json: string): T;
|
7696
8669
|
}
|
7697
|
-
|
7698
|
-
|
7699
|
-
|
8670
|
+
type SerializedString<T> = string | (string & {
|
8671
|
+
__type: T;
|
8672
|
+
});
|
8673
|
+
type DeserializedType<T> = T extends SerializedString<infer U> ? U : T;
|
8674
|
+
declare const serialize: <T>(data: T) => SerializedString<T>;
|
8675
|
+
declare const deserialize: <T extends SerializedString<any>>(json: T) => SerializerResult<DeserializedType<T>>;
|
8676
|
+
type SerializerResult<T> = T extends XataRecord ? Identifiable & Omit<{
|
8677
|
+
[K in keyof T]: SerializerResult<T[K]>;
|
8678
|
+
}, keyof XataRecord> : T extends any[] ? SerializerResult<T[number]>[] : T;
|
7700
8679
|
|
7701
|
-
type BranchResolutionOptions = {
|
7702
|
-
databaseURL?: string;
|
7703
|
-
apiKey?: string;
|
7704
|
-
fetchImpl?: FetchImpl;
|
7705
|
-
clientName?: string;
|
7706
|
-
};
|
7707
|
-
declare function getCurrentBranchName(options?: BranchResolutionOptions): Promise<string>;
|
7708
|
-
declare function getCurrentBranchDetails(options?: BranchResolutionOptions): Promise<DBBranch | null>;
|
7709
8680
|
declare function getDatabaseURL(): string | undefined;
|
7710
|
-
|
7711
8681
|
declare function getAPIKey(): string | undefined;
|
8682
|
+
declare function getBranch(): string | undefined;
|
8683
|
+
declare function buildPreviewBranchName({ org, branch }: {
|
8684
|
+
org: string;
|
8685
|
+
branch: string;
|
8686
|
+
}): string;
|
8687
|
+
declare function getPreviewBranch(): string | undefined;
|
7712
8688
|
|
7713
8689
|
interface Body {
|
7714
8690
|
arrayBuffer(): Promise<ArrayBuffer>;
|
7715
|
-
blob(): Promise<Blob>;
|
8691
|
+
blob(): Promise<Blob$1>;
|
7716
8692
|
formData(): Promise<FormData>;
|
7717
8693
|
json(): Promise<any>;
|
7718
8694
|
text(): Promise<string>;
|
7719
8695
|
}
|
7720
|
-
interface Blob {
|
8696
|
+
interface Blob$1 {
|
7721
8697
|
readonly size: number;
|
7722
8698
|
readonly type: string;
|
7723
8699
|
arrayBuffer(): Promise<ArrayBuffer>;
|
7724
|
-
slice(start?: number, end?: number, contentType?: string): Blob;
|
8700
|
+
slice(start?: number, end?: number, contentType?: string): Blob$1;
|
7725
8701
|
text(): Promise<string>;
|
7726
8702
|
}
|
7727
8703
|
/** Provides information about files and allows JavaScript in a web page to access their content. */
|
7728
|
-
interface File extends Blob {
|
8704
|
+
interface File extends Blob$1 {
|
7729
8705
|
readonly lastModified: number;
|
7730
8706
|
readonly name: string;
|
7731
8707
|
readonly webkitRelativePath: string;
|
@@ -7733,12 +8709,12 @@ interface File extends Blob {
|
|
7733
8709
|
type FormDataEntryValue = File | string;
|
7734
8710
|
/** 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". */
|
7735
8711
|
interface FormData {
|
7736
|
-
append(name: string, value: string | Blob, fileName?: string): void;
|
8712
|
+
append(name: string, value: string | Blob$1, fileName?: string): void;
|
7737
8713
|
delete(name: string): void;
|
7738
8714
|
get(name: string): FormDataEntryValue | null;
|
7739
8715
|
getAll(name: string): FormDataEntryValue[];
|
7740
8716
|
has(name: string): boolean;
|
7741
|
-
set(name: string, value: string | Blob, fileName?: string): void;
|
8717
|
+
set(name: string, value: string | Blob$1, fileName?: string): void;
|
7742
8718
|
forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
|
7743
8719
|
}
|
7744
8720
|
/** 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. */
|
@@ -7795,4 +8771,4 @@ declare class XataError extends Error {
|
|
7795
8771
|
constructor(message: string, status: number);
|
7796
8772
|
}
|
7797
8773
|
|
7798
|
-
export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApiExtraProps, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BranchTransactionError, BranchTransactionPathParams, BranchTransactionRequestBody, BranchTransactionVariables, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, 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, DEPRECATEDcreateDatabaseError, DEPRECATEDcreateDatabasePathParams, DEPRECATEDcreateDatabaseRequestBody, DEPRECATEDcreateDatabaseResponse, DEPRECATEDcreateDatabaseVariables, DEPRECATEDdeleteDatabaseError, DEPRECATEDdeleteDatabasePathParams, DEPRECATEDdeleteDatabaseResponse, DEPRECATEDdeleteDatabaseVariables, DEPRECATEDgetDatabaseListError, DEPRECATEDgetDatabaseListPathParams, DEPRECATEDgetDatabaseListVariables, DEPRECATEDgetDatabaseMetadataError, DEPRECATEDgetDatabaseMetadataPathParams, DEPRECATEDgetDatabaseMetadataVariables, DEPRECATEDupdateDatabaseMetadataError, DEPRECATEDupdateDatabaseMetadataPathParams, DEPRECATEDupdateDatabaseMetadataRequestBody, DEPRECATEDupdateDatabaseMetadataVariables, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, 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, 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, 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, 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, Serializer, SerializerResult, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, 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, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, branchTransaction, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, dEPRECATEDcreateDatabase, dEPRECATEDdeleteDatabase, dEPRECATEDgetDatabaseList, dEPRECATEDgetDatabaseMetadata, dEPRECATEDupdateDatabaseMetadata, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, 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, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|
8774
|
+
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, DeleteFileItemError, DeleteFileItemPathParams, DeleteFileItemVariables, 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, GetFileError, GetFileItemError, GetFileItemPathParams, GetFileItemVariables, GetFilePathParams, GetFileVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, JSONData, KeywordAskOptions, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, PushBranchMigrationsError, PushBranchMigrationsPathParams, PushBranchMigrationsRequestBody, PushBranchMigrationsVariables, PutFileError, PutFileItemError, PutFileItemPathParams, PutFileItemVariables, PutFilePathParams, PutFileVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, RenameDatabaseError, RenameDatabasePathParams, RenameDatabaseRequestBody, RenameDatabaseVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, SerializedString, Serializer, SerializerResult, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SqlQueryError, SqlQueryPathParams, SqlQueryRequestBody, SqlQueryVariables, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseGithubSettingsError, UpdateDatabaseGithubSettingsPathParams, UpdateDatabaseGithubSettingsVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, VectorAskOptions, VectorSearchTableError, VectorSearchTablePathParams, VectorSearchTableRequestBody, VectorSearchTableVariables, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, askTable, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFileItem, 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, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|