@xata.io/client 0.21.6 → 0.22.1
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 +2 -1
- package/.turbo/turbo-add-version.log +4 -0
- package/.turbo/turbo-build.log +13 -0
- package/CHANGELOG.md +18 -0
- package/LICENSE +201 -0
- package/README.md +3 -269
- package/dist/index.cjs +98 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1042 -883
- package/dist/index.mjs +96 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/Usage.md +0 -451
package/dist/index.d.ts
CHANGED
@@ -80,6 +80,7 @@ type FetcherExtraProps = {
|
|
80
80
|
clientID?: string;
|
81
81
|
sessionID?: string;
|
82
82
|
clientName?: string;
|
83
|
+
xataAgentExtra?: Record<string, string>;
|
83
84
|
fetchOptions?: Record<string, unknown>;
|
84
85
|
};
|
85
86
|
|
@@ -93,6 +94,7 @@ type ControlPlaneFetcherExtraProps = {
|
|
93
94
|
clientID?: string;
|
94
95
|
sessionID?: string;
|
95
96
|
clientName?: string;
|
97
|
+
xataAgentExtra?: Record<string, string>;
|
96
98
|
};
|
97
99
|
type ErrorWrapper$1<TError> = TError | {
|
98
100
|
status: 'unknown';
|
@@ -215,6 +217,18 @@ type ListDatabasesResponse = {
|
|
215
217
|
*/
|
216
218
|
databases: DatabaseMetadata[];
|
217
219
|
};
|
220
|
+
/**
|
221
|
+
* @maxLength 255
|
222
|
+
* @minLength 1
|
223
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
224
|
+
*/
|
225
|
+
type DBName$1 = string;
|
226
|
+
/**
|
227
|
+
* @maxLength 255
|
228
|
+
* @minLength 1
|
229
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
230
|
+
*/
|
231
|
+
type BranchName$1 = string;
|
218
232
|
/**
|
219
233
|
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
|
220
234
|
* @x-go-type xata.BranchMetadata
|
@@ -231,38 +245,35 @@ type BranchMetadata$1 = {
|
|
231
245
|
stage?: string;
|
232
246
|
labels?: string[];
|
233
247
|
};
|
248
|
+
type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
|
234
249
|
/**
|
235
|
-
*
|
236
|
-
* @minLength 1
|
237
|
-
* @pattern [a-zA-Z0-9_\-~]+
|
238
|
-
*/
|
239
|
-
type BranchName$1 = string;
|
240
|
-
/**
|
241
|
-
* @maxLength 255
|
242
|
-
* @minLength 1
|
243
|
-
* @pattern [a-zA-Z0-9_\-~]+
|
250
|
+
* Github repository settings for this database (optional)
|
244
251
|
*/
|
245
|
-
type
|
246
|
-
type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
|
247
|
-
type ListRegionsResponse = {
|
252
|
+
type DatabaseGithubSettings = {
|
248
253
|
/**
|
249
|
-
*
|
254
|
+
* Repository owner (user or organization)
|
250
255
|
*/
|
251
|
-
|
256
|
+
owner: string;
|
257
|
+
/**
|
258
|
+
* Repository name
|
259
|
+
*/
|
260
|
+
repo: string;
|
252
261
|
};
|
253
262
|
type Region = {
|
254
263
|
id: string;
|
255
264
|
};
|
265
|
+
type ListRegionsResponse = {
|
266
|
+
/**
|
267
|
+
* A list of regions where databases can be created
|
268
|
+
*/
|
269
|
+
regions: Region[];
|
270
|
+
};
|
256
271
|
|
257
272
|
/**
|
258
273
|
* Generated by @openapi-codegen
|
259
274
|
*
|
260
275
|
* @version 1.0
|
261
276
|
*/
|
262
|
-
type SimpleError$1 = {
|
263
|
-
id?: string;
|
264
|
-
message: string;
|
265
|
-
};
|
266
277
|
type BadRequestError$1 = {
|
267
278
|
id?: string;
|
268
279
|
message: string;
|
@@ -274,6 +285,10 @@ type AuthError$1 = {
|
|
274
285
|
id?: string;
|
275
286
|
message: string;
|
276
287
|
};
|
288
|
+
type SimpleError$1 = {
|
289
|
+
id?: string;
|
290
|
+
message: string;
|
291
|
+
};
|
277
292
|
|
278
293
|
/**
|
279
294
|
* Generated by @openapi-codegen
|
@@ -809,6 +824,12 @@ type CreateDatabaseError = ErrorWrapper$1<{
|
|
809
824
|
} | {
|
810
825
|
status: 401;
|
811
826
|
payload: AuthError$1;
|
827
|
+
} | {
|
828
|
+
status: 422;
|
829
|
+
payload: SimpleError$1;
|
830
|
+
} | {
|
831
|
+
status: 423;
|
832
|
+
payload: SimpleError$1;
|
812
833
|
}>;
|
813
834
|
type CreateDatabaseResponse = {
|
814
835
|
/**
|
@@ -933,6 +954,91 @@ type UpdateDatabaseMetadataVariables = {
|
|
933
954
|
* Update the color of the selected database
|
934
955
|
*/
|
935
956
|
declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
|
957
|
+
type GetDatabaseGithubSettingsPathParams = {
|
958
|
+
/**
|
959
|
+
* Workspace ID
|
960
|
+
*/
|
961
|
+
workspaceId: WorkspaceID;
|
962
|
+
/**
|
963
|
+
* The Database Name
|
964
|
+
*/
|
965
|
+
dbName: DBName$1;
|
966
|
+
};
|
967
|
+
type GetDatabaseGithubSettingsError = ErrorWrapper$1<{
|
968
|
+
status: 400;
|
969
|
+
payload: BadRequestError$1;
|
970
|
+
} | {
|
971
|
+
status: 401;
|
972
|
+
payload: AuthError$1;
|
973
|
+
} | {
|
974
|
+
status: 404;
|
975
|
+
payload: SimpleError$1;
|
976
|
+
}>;
|
977
|
+
type GetDatabaseGithubSettingsVariables = {
|
978
|
+
pathParams: GetDatabaseGithubSettingsPathParams;
|
979
|
+
} & ControlPlaneFetcherExtraProps;
|
980
|
+
/**
|
981
|
+
* Retrieve current Github database settings
|
982
|
+
*/
|
983
|
+
declare const getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<DatabaseGithubSettings>;
|
984
|
+
type UpdateDatabaseGithubSettingsPathParams = {
|
985
|
+
/**
|
986
|
+
* Workspace ID
|
987
|
+
*/
|
988
|
+
workspaceId: WorkspaceID;
|
989
|
+
/**
|
990
|
+
* The Database Name
|
991
|
+
*/
|
992
|
+
dbName: DBName$1;
|
993
|
+
};
|
994
|
+
type UpdateDatabaseGithubSettingsError = ErrorWrapper$1<{
|
995
|
+
status: 400;
|
996
|
+
payload: BadRequestError$1;
|
997
|
+
} | {
|
998
|
+
status: 401;
|
999
|
+
payload: AuthError$1;
|
1000
|
+
} | {
|
1001
|
+
status: 422;
|
1002
|
+
payload: SimpleError$1;
|
1003
|
+
} | {
|
1004
|
+
status: 423;
|
1005
|
+
payload: SimpleError$1;
|
1006
|
+
}>;
|
1007
|
+
type UpdateDatabaseGithubSettingsVariables = {
|
1008
|
+
body: DatabaseGithubSettings;
|
1009
|
+
pathParams: UpdateDatabaseGithubSettingsPathParams;
|
1010
|
+
} & ControlPlaneFetcherExtraProps;
|
1011
|
+
/**
|
1012
|
+
* Map the database to a Github repository, Xata will create database branch previews for all new branches/PRs in the repo.
|
1013
|
+
*/
|
1014
|
+
declare const updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<DatabaseGithubSettings>;
|
1015
|
+
type DeleteDatabaseGithubSettingsPathParams = {
|
1016
|
+
/**
|
1017
|
+
* Workspace ID
|
1018
|
+
*/
|
1019
|
+
workspaceId: WorkspaceID;
|
1020
|
+
/**
|
1021
|
+
* The Database Name
|
1022
|
+
*/
|
1023
|
+
dbName: DBName$1;
|
1024
|
+
};
|
1025
|
+
type DeleteDatabaseGithubSettingsError = ErrorWrapper$1<{
|
1026
|
+
status: 400;
|
1027
|
+
payload: BadRequestError$1;
|
1028
|
+
} | {
|
1029
|
+
status: 401;
|
1030
|
+
payload: AuthError$1;
|
1031
|
+
} | {
|
1032
|
+
status: 404;
|
1033
|
+
payload: SimpleError$1;
|
1034
|
+
}>;
|
1035
|
+
type DeleteDatabaseGithubSettingsVariables = {
|
1036
|
+
pathParams: DeleteDatabaseGithubSettingsPathParams;
|
1037
|
+
} & ControlPlaneFetcherExtraProps;
|
1038
|
+
/**
|
1039
|
+
* Delete any existing database Github settings
|
1040
|
+
*/
|
1041
|
+
declare const deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<undefined>;
|
936
1042
|
type ListRegionsPathParams = {
|
937
1043
|
/**
|
938
1044
|
* Workspace ID
|
@@ -959,20 +1065,39 @@ declare const listRegions: (variables: ListRegionsVariables, signal?: AbortSigna
|
|
959
1065
|
*
|
960
1066
|
* @version 1.0
|
961
1067
|
*/
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
1068
|
+
/**
|
1069
|
+
* @maxLength 255
|
1070
|
+
* @minLength 1
|
1071
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
1072
|
+
*/
|
1073
|
+
type DBName = string;
|
1074
|
+
/**
|
1075
|
+
* @format date-time
|
1076
|
+
* @x-go-type string
|
1077
|
+
*/
|
1078
|
+
type DateTime = string;
|
972
1079
|
type Branch = {
|
973
1080
|
name: string;
|
974
1081
|
createdAt: DateTime;
|
975
1082
|
};
|
1083
|
+
type ListBranchesResponse = {
|
1084
|
+
databaseName: string;
|
1085
|
+
branches: Branch[];
|
1086
|
+
};
|
1087
|
+
/**
|
1088
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
1089
|
+
*
|
1090
|
+
* @maxLength 511
|
1091
|
+
* @minLength 1
|
1092
|
+
* @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
|
1093
|
+
*/
|
1094
|
+
type DBBranchName = string;
|
1095
|
+
/**
|
1096
|
+
* @maxLength 255
|
1097
|
+
* @minLength 1
|
1098
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
1099
|
+
*/
|
1100
|
+
type BranchName = string;
|
976
1101
|
/**
|
977
1102
|
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
|
978
1103
|
* @x-go-type xata.BranchMetadata
|
@@ -989,39 +1114,19 @@ type BranchMetadata = {
|
|
989
1114
|
stage?: string;
|
990
1115
|
labels?: string[];
|
991
1116
|
};
|
992
|
-
type DBBranch = {
|
993
|
-
databaseName: DBName;
|
994
|
-
branchName: BranchName;
|
995
|
-
createdAt: DateTime;
|
996
|
-
id: string;
|
997
|
-
version: number;
|
998
|
-
lastMigrationID: string;
|
999
|
-
metadata?: BranchMetadata;
|
1000
|
-
startedFrom?: StartedFromMetadata;
|
1001
|
-
schema: Schema;
|
1002
|
-
};
|
1003
1117
|
type StartedFromMetadata = {
|
1004
1118
|
branchName: BranchName;
|
1005
1119
|
dbBranchID: string;
|
1006
1120
|
migrationID: string;
|
1007
1121
|
};
|
1008
1122
|
/**
|
1009
|
-
* @
|
1123
|
+
* @maxLength 255
|
1124
|
+
* @minLength 1
|
1125
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
1010
1126
|
*/
|
1011
|
-
type
|
1012
|
-
|
1013
|
-
|
1014
|
-
};
|
1015
|
-
type SchemaEditScript = {
|
1016
|
-
sourceMigrationID?: string;
|
1017
|
-
targetMigrationID?: string;
|
1018
|
-
operations: MigrationOp[];
|
1019
|
-
};
|
1020
|
-
type Table = {
|
1021
|
-
id?: string;
|
1022
|
-
name: TableName;
|
1023
|
-
columns: Column[];
|
1024
|
-
revLinks?: RevLink[];
|
1127
|
+
type TableName = string;
|
1128
|
+
type ColumnLink = {
|
1129
|
+
table: string;
|
1025
1130
|
};
|
1026
1131
|
type Column = {
|
1027
1132
|
name: string;
|
@@ -1032,43 +1137,35 @@ type Column = {
|
|
1032
1137
|
unique?: boolean;
|
1033
1138
|
columns?: Column[];
|
1034
1139
|
};
|
1035
|
-
type ColumnLink = {
|
1036
|
-
table: string;
|
1037
|
-
};
|
1038
1140
|
type RevLink = {
|
1039
1141
|
linkID: string;
|
1040
1142
|
table: string;
|
1041
1143
|
};
|
1144
|
+
type Table = {
|
1145
|
+
id?: string;
|
1146
|
+
name: TableName;
|
1147
|
+
columns: Column[];
|
1148
|
+
revLinks?: RevLink[];
|
1149
|
+
};
|
1042
1150
|
/**
|
1043
|
-
* @
|
1044
|
-
* @minLength 1
|
1045
|
-
* @pattern [a-zA-Z0-9_\-~]+
|
1046
|
-
*/
|
1047
|
-
type BranchName = string;
|
1048
|
-
/**
|
1049
|
-
* @maxLength 255
|
1050
|
-
* @minLength 1
|
1051
|
-
* @pattern [a-zA-Z0-9_\-~]+
|
1052
|
-
*/
|
1053
|
-
type DBName = string;
|
1054
|
-
/**
|
1055
|
-
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
1056
|
-
*
|
1057
|
-
* @maxLength 511
|
1058
|
-
* @minLength 1
|
1059
|
-
* @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
|
1060
|
-
*/
|
1061
|
-
type DBBranchName = string;
|
1062
|
-
/**
|
1063
|
-
* @maxLength 255
|
1064
|
-
* @minLength 1
|
1065
|
-
* @pattern [a-zA-Z0-9_\-~]+
|
1066
|
-
*/
|
1067
|
-
type TableName = string;
|
1068
|
-
/**
|
1069
|
-
* @pattern [a-zA-Z0-9_\-~\.]+
|
1151
|
+
* @x-go-type xata.Schema
|
1070
1152
|
*/
|
1071
|
-
type
|
1153
|
+
type Schema = {
|
1154
|
+
tables: Table[];
|
1155
|
+
tablesOrder?: string[];
|
1156
|
+
};
|
1157
|
+
type DBBranch = {
|
1158
|
+
databaseName: DBName;
|
1159
|
+
branchName: BranchName;
|
1160
|
+
createdAt: DateTime;
|
1161
|
+
id: string;
|
1162
|
+
version: number;
|
1163
|
+
lastMigrationID: string;
|
1164
|
+
metadata?: BranchMetadata;
|
1165
|
+
startedFrom?: StartedFromMetadata;
|
1166
|
+
schema: Schema;
|
1167
|
+
};
|
1168
|
+
type MigrationStatus = 'completed' | 'pending' | 'failed';
|
1072
1169
|
type MetricsDatapoint = {
|
1073
1170
|
timestamp: string;
|
1074
1171
|
value: number;
|
@@ -1077,24 +1174,16 @@ type MetricsLatency = {
|
|
1077
1174
|
p50?: MetricsDatapoint[];
|
1078
1175
|
p90?: MetricsDatapoint[];
|
1079
1176
|
};
|
1080
|
-
type
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
};
|
1091
|
-
removedTables?: string[];
|
1092
|
-
tableMigrations?: {
|
1093
|
-
[key: string]: TableMigration;
|
1094
|
-
};
|
1095
|
-
newTableOrder: string[];
|
1096
|
-
renamedTables?: TableRename[];
|
1097
|
-
};
|
1177
|
+
type ListGitBranchesResponse = {
|
1178
|
+
mapping: {
|
1179
|
+
gitBranch: string;
|
1180
|
+
xataBranch: string;
|
1181
|
+
}[];
|
1182
|
+
};
|
1183
|
+
type ColumnMigration = {
|
1184
|
+
old: Column;
|
1185
|
+
['new']: Column;
|
1186
|
+
};
|
1098
1187
|
type TableMigration = {
|
1099
1188
|
newColumns?: {
|
1100
1189
|
[key: string]: Column;
|
@@ -1103,70 +1192,140 @@ type TableMigration = {
|
|
1103
1192
|
modifiedColumns?: ColumnMigration[];
|
1104
1193
|
newColumnOrder: string[];
|
1105
1194
|
};
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1195
|
+
/**
|
1196
|
+
* @example {"newName":"newName","oldName":"oldName"}
|
1197
|
+
*/
|
1198
|
+
type TableRename = {
|
1199
|
+
/**
|
1200
|
+
* @minLength 1
|
1201
|
+
*/
|
1202
|
+
newName: string;
|
1203
|
+
/**
|
1204
|
+
* @minLength 1
|
1205
|
+
*/
|
1206
|
+
oldName: string;
|
1109
1207
|
};
|
1110
|
-
type
|
1111
|
-
|
1112
|
-
message?: string;
|
1113
|
-
id: string;
|
1208
|
+
type BranchMigration = {
|
1209
|
+
id?: string;
|
1114
1210
|
parentID?: string;
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1211
|
+
status: string;
|
1212
|
+
title?: string;
|
1213
|
+
lastGitRevision?: string;
|
1214
|
+
localChanges: boolean;
|
1215
|
+
createdAt?: DateTime;
|
1216
|
+
newTables?: {
|
1217
|
+
[key: string]: Table;
|
1218
|
+
};
|
1219
|
+
removedTables?: string[];
|
1220
|
+
tableMigrations?: {
|
1221
|
+
[key: string]: TableMigration;
|
1222
|
+
};
|
1223
|
+
newTableOrder: string[];
|
1224
|
+
renamedTables?: TableRename[];
|
1120
1225
|
};
|
1121
|
-
type MigrationStatus = 'completed' | 'pending' | 'failed';
|
1122
1226
|
/**
|
1123
|
-
*
|
1227
|
+
* @minProperties 1
|
1124
1228
|
*/
|
1125
|
-
type
|
1126
|
-
|
1127
|
-
|
1229
|
+
type FilterExpression = {
|
1230
|
+
$exists?: string;
|
1231
|
+
$existsNot?: string;
|
1232
|
+
$any?: FilterList;
|
1233
|
+
$all?: FilterList;
|
1234
|
+
$none?: FilterList;
|
1235
|
+
$not?: FilterList;
|
1236
|
+
} & {
|
1237
|
+
[key: string]: FilterColumn;
|
1128
1238
|
};
|
1239
|
+
type FilterList = FilterExpression | FilterExpression[];
|
1240
|
+
type FilterValue = number | string | boolean;
|
1241
|
+
type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
|
1242
|
+
type FilterRangeValue = number | string;
|
1129
1243
|
/**
|
1130
|
-
*
|
1244
|
+
* @maxProperties 1
|
1245
|
+
* @minProperties 1
|
1131
1246
|
*/
|
1132
|
-
type
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
type TableOpAdd = {
|
1148
|
-
table: string;
|
1149
|
-
};
|
1150
|
-
type TableOpRemove = {
|
1151
|
-
table: string;
|
1152
|
-
};
|
1153
|
-
type TableOpRename = {
|
1154
|
-
oldName: string;
|
1155
|
-
newName: string;
|
1247
|
+
type FilterPredicateOp = {
|
1248
|
+
$any?: FilterPredicate[];
|
1249
|
+
$all?: FilterPredicate[];
|
1250
|
+
$none?: FilterPredicate | FilterPredicate[];
|
1251
|
+
$not?: FilterPredicate | FilterPredicate[];
|
1252
|
+
$is?: FilterValue | FilterValue[];
|
1253
|
+
$isNot?: FilterValue | FilterValue[];
|
1254
|
+
$lt?: FilterRangeValue;
|
1255
|
+
$le?: FilterRangeValue;
|
1256
|
+
$gt?: FilterRangeValue;
|
1257
|
+
$ge?: FilterRangeValue;
|
1258
|
+
$contains?: string;
|
1259
|
+
$startsWith?: string;
|
1260
|
+
$endsWith?: string;
|
1261
|
+
$pattern?: string;
|
1156
1262
|
};
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1263
|
+
/**
|
1264
|
+
* @maxProperties 2
|
1265
|
+
* @minProperties 2
|
1266
|
+
*/
|
1267
|
+
type FilterPredicateRangeOp = {
|
1268
|
+
$lt?: FilterRangeValue;
|
1269
|
+
$le?: FilterRangeValue;
|
1270
|
+
$gt?: FilterRangeValue;
|
1271
|
+
$ge?: FilterRangeValue;
|
1160
1272
|
};
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1273
|
+
/**
|
1274
|
+
* @maxProperties 1
|
1275
|
+
* @minProperties 1
|
1276
|
+
*/
|
1277
|
+
type FilterColumnIncludes = {
|
1278
|
+
$includes?: FilterPredicate;
|
1279
|
+
$includesAny?: FilterPredicate;
|
1280
|
+
$includesAll?: FilterPredicate;
|
1281
|
+
$includesNone?: FilterPredicate;
|
1164
1282
|
};
|
1165
|
-
type
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1283
|
+
type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
|
1284
|
+
type SortOrder = 'asc' | 'desc';
|
1285
|
+
type SortExpression = string[] | {
|
1286
|
+
[key: string]: SortOrder;
|
1287
|
+
} | {
|
1288
|
+
[key: string]: SortOrder;
|
1289
|
+
}[];
|
1290
|
+
/**
|
1291
|
+
* Pagination settings.
|
1292
|
+
*/
|
1293
|
+
type PageConfig = {
|
1294
|
+
/**
|
1295
|
+
* Query the next page that follow the cursor.
|
1296
|
+
*/
|
1297
|
+
after?: string;
|
1298
|
+
/**
|
1299
|
+
* Query the previous page before the cursor.
|
1300
|
+
*/
|
1301
|
+
before?: string;
|
1302
|
+
/**
|
1303
|
+
* Query the first page from the cursor.
|
1304
|
+
*/
|
1305
|
+
start?: string;
|
1306
|
+
/**
|
1307
|
+
* Query the last page from the cursor.
|
1308
|
+
*/
|
1309
|
+
end?: string;
|
1310
|
+
/**
|
1311
|
+
* 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.
|
1312
|
+
*
|
1313
|
+
* @default 20
|
1314
|
+
*/
|
1315
|
+
size?: number;
|
1316
|
+
/**
|
1317
|
+
* Use offset to skip entries. To skip pages set offset to a multiple of size.
|
1318
|
+
*
|
1319
|
+
* @default 0
|
1320
|
+
*/
|
1321
|
+
offset?: number;
|
1169
1322
|
};
|
1323
|
+
/**
|
1324
|
+
* @example name
|
1325
|
+
* @example email
|
1326
|
+
* @example created_at
|
1327
|
+
*/
|
1328
|
+
type ColumnsProjection = string[];
|
1170
1329
|
/**
|
1171
1330
|
* The migration request number.
|
1172
1331
|
*
|
@@ -1210,303 +1369,289 @@ type MigrationRequest = {
|
|
1210
1369
|
*/
|
1211
1370
|
target?: string;
|
1212
1371
|
};
|
1213
|
-
type SortExpression = string[] | {
|
1214
|
-
[key: string]: SortOrder;
|
1215
|
-
} | {
|
1216
|
-
[key: string]: SortOrder;
|
1217
|
-
}[];
|
1218
|
-
type SortOrder = 'asc' | 'desc';
|
1219
|
-
/**
|
1220
|
-
* Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
|
1221
|
-
* distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
|
1222
|
-
* character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
|
1223
|
-
* to allow two typos in a word.
|
1224
|
-
*
|
1225
|
-
* @default 1
|
1226
|
-
* @maximum 2
|
1227
|
-
* @minimum 0
|
1228
|
-
*/
|
1229
|
-
type FuzzinessExpression = number;
|
1230
1372
|
/**
|
1231
|
-
*
|
1373
|
+
* Records metadata
|
1232
1374
|
*/
|
1233
|
-
type
|
1375
|
+
type RecordsMetadata = {
|
1376
|
+
page: {
|
1377
|
+
/**
|
1378
|
+
* last record id
|
1379
|
+
*/
|
1380
|
+
cursor: string;
|
1381
|
+
/**
|
1382
|
+
* true if more records can be fetch
|
1383
|
+
*/
|
1384
|
+
more: boolean;
|
1385
|
+
};
|
1386
|
+
};
|
1387
|
+
type TableOpAdd = {
|
1388
|
+
table: string;
|
1389
|
+
};
|
1390
|
+
type TableOpRemove = {
|
1391
|
+
table: string;
|
1392
|
+
};
|
1393
|
+
type TableOpRename = {
|
1394
|
+
oldName: string;
|
1395
|
+
newName: string;
|
1396
|
+
};
|
1397
|
+
type MigrationTableOp = {
|
1398
|
+
addTable: TableOpAdd;
|
1399
|
+
} | {
|
1400
|
+
removeTable: TableOpRemove;
|
1401
|
+
} | {
|
1402
|
+
renameTable: TableOpRename;
|
1403
|
+
};
|
1404
|
+
type ColumnOpAdd = {
|
1405
|
+
table: string;
|
1406
|
+
column: Column;
|
1407
|
+
};
|
1408
|
+
type ColumnOpRemove = {
|
1409
|
+
table: string;
|
1410
|
+
column: string;
|
1411
|
+
};
|
1412
|
+
type ColumnOpRename = {
|
1413
|
+
table: string;
|
1414
|
+
oldName: string;
|
1415
|
+
newName: string;
|
1416
|
+
};
|
1417
|
+
type MigrationColumnOp = {
|
1418
|
+
addColumn: ColumnOpAdd;
|
1419
|
+
} | {
|
1420
|
+
removeColumn: ColumnOpRemove;
|
1421
|
+
} | {
|
1422
|
+
renameColumn: ColumnOpRename;
|
1423
|
+
};
|
1234
1424
|
/**
|
1235
|
-
*
|
1425
|
+
* Branch schema migration operations.
|
1236
1426
|
*/
|
1237
|
-
type
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
*/
|
1249
|
-
weight?: number;
|
1250
|
-
})[];
|
1251
|
-
/**
|
1252
|
-
* @minProperties 1
|
1253
|
-
*/
|
1254
|
-
type FilterExpression = {
|
1255
|
-
$exists?: string;
|
1256
|
-
$existsNot?: string;
|
1257
|
-
$any?: FilterList;
|
1258
|
-
$all?: FilterList;
|
1259
|
-
$none?: FilterList;
|
1260
|
-
$not?: FilterList;
|
1261
|
-
} & {
|
1262
|
-
[key: string]: FilterColumn;
|
1427
|
+
type MigrationOp = MigrationTableOp | MigrationColumnOp;
|
1428
|
+
type Commit = {
|
1429
|
+
title?: string;
|
1430
|
+
message?: string;
|
1431
|
+
id: string;
|
1432
|
+
parentID?: string;
|
1433
|
+
mergeParentID?: string;
|
1434
|
+
status: MigrationStatus;
|
1435
|
+
createdAt: DateTime;
|
1436
|
+
modifiedAt?: DateTime;
|
1437
|
+
operations: MigrationOp[];
|
1263
1438
|
};
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
*
|
1269
|
-
* The value for each key needs to be an object. This object should contain one key and one
|
1270
|
-
* value only. In this object, the key should be set to the summary function you wish to use
|
1271
|
-
* and the value set to the column name to be summarized.
|
1272
|
-
*
|
1273
|
-
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
1274
|
-
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
1275
|
-
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
1276
|
-
*
|
1277
|
-
* @example {"all_users":{"count":"*"}}
|
1278
|
-
* @example {"total_created":{"count":"created_at"}}
|
1279
|
-
* @example {"min_cost":{"min":"cost"}}
|
1280
|
-
* @example {"max_happiness":{"max":"happiness"}}
|
1281
|
-
* @example {"total_revenue":{"sum":"revenue"}}
|
1282
|
-
* @example {"average_speed":{"average":"speed"}}
|
1283
|
-
* @x-go-type xbquery.SummaryList
|
1284
|
-
*/
|
1285
|
-
type SummaryExpressionList = {
|
1286
|
-
[key: string]: SummaryExpression;
|
1439
|
+
type SchemaEditScript = {
|
1440
|
+
sourceMigrationID?: string;
|
1441
|
+
targetMigrationID?: string;
|
1442
|
+
operations: MigrationOp[];
|
1287
1443
|
};
|
1288
1444
|
/**
|
1289
|
-
*
|
1290
|
-
* key representing the operation, and a value representing the column to be operated on.
|
1291
|
-
*
|
1292
|
-
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
1293
|
-
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
1294
|
-
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
1295
|
-
*
|
1296
|
-
* We currently support several aggregation functions. Not all functions can be run on all column
|
1297
|
-
* types.
|
1298
|
-
*
|
1299
|
-
* - `count` is used to count the number of records in each group. Use `{"count": "*"}` to count
|
1300
|
-
* all columns present, otherwise `{"count": "<column_path>"}` to count the number of non-null
|
1301
|
-
* values are present at column path.
|
1302
|
-
*
|
1303
|
-
* Count can be used on any column type, and always returns an int.
|
1304
|
-
*
|
1305
|
-
* - `min` calculates the minimum value in each group. `min` is compatible with most types;
|
1306
|
-
* string, multiple, text, email, int, float, and datetime. It returns a value of the same
|
1307
|
-
* type as operated on. This means that `{"lowest_latency": {"min": "latency"}}` where
|
1308
|
-
* `latency` is an int, will always return an int.
|
1309
|
-
*
|
1310
|
-
* - `max` calculates the maximum value in each group. `max` shares the same compatibility as
|
1311
|
-
* `min`.
|
1312
|
-
*
|
1313
|
-
* - `sum` adds up all values in a group. `sum` can be run on `int` and `float` types, and will
|
1314
|
-
* return a value of the same type as requested.
|
1315
|
-
*
|
1316
|
-
* - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
|
1317
|
-
* always returns a float.
|
1318
|
-
*
|
1319
|
-
* @example {"count":"deleted_at"}
|
1320
|
-
* @x-go-type xbquery.Summary
|
1445
|
+
* Branch schema migration.
|
1321
1446
|
*/
|
1322
|
-
type
|
1447
|
+
type Migration = {
|
1448
|
+
parentID?: string;
|
1449
|
+
operations: MigrationOp[];
|
1450
|
+
};
|
1323
1451
|
/**
|
1324
|
-
*
|
1325
|
-
*
|
1326
|
-
* @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d"},"aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}
|
1452
|
+
* @pattern [a-zA-Z0-9_\-~\.]+
|
1327
1453
|
*/
|
1328
|
-
type
|
1329
|
-
[key: string]: AggExpression;
|
1330
|
-
};
|
1454
|
+
type ColumnName = string;
|
1331
1455
|
/**
|
1332
|
-
*
|
1333
|
-
* The key represents the aggreagtion type, while the value is an object with the configuration of
|
1334
|
-
* the aggreagtion.
|
1335
|
-
*
|
1336
|
-
* @x-go-type xata.AggExpression
|
1456
|
+
* Insert operation
|
1337
1457
|
*/
|
1338
|
-
type
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
}
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1458
|
+
type TransactionInsertOp = {
|
1459
|
+
/**
|
1460
|
+
* The table name
|
1461
|
+
*/
|
1462
|
+
table: string;
|
1463
|
+
/**
|
1464
|
+
* The record to insert. The `id` field is optional; when specified, it will be used as the ID for the record.
|
1465
|
+
*/
|
1466
|
+
record: {
|
1467
|
+
[key: string]: any;
|
1468
|
+
};
|
1469
|
+
/**
|
1470
|
+
* The version of the record you expect to be overwriting. Only valid with an
|
1471
|
+
* explicit ID is also set in the `record` key.
|
1472
|
+
*/
|
1473
|
+
ifVersion?: number;
|
1474
|
+
/**
|
1475
|
+
* createOnly is used to change how Xata acts when an explicit ID is set in the `record` key.
|
1476
|
+
*
|
1477
|
+
* If `createOnly` is set to `true`, Xata will only attempt to insert the record. If there's a conflict, Xata
|
1478
|
+
* will cancel the transaction.
|
1479
|
+
*
|
1480
|
+
* If `createOnly` is set to `false`, Xata will attempt to insert the record. If there's no
|
1481
|
+
* conflict, the record is inserted. If there is a conflict, Xata will replace the record.
|
1482
|
+
*/
|
1483
|
+
createOnly?: boolean;
|
1356
1484
|
};
|
1357
1485
|
/**
|
1358
|
-
*
|
1486
|
+
* @pattern [a-zA-Z0-9_-~:]+
|
1359
1487
|
*/
|
1360
|
-
type
|
1361
|
-
filter?: FilterExpression;
|
1362
|
-
} | '*';
|
1488
|
+
type RecordID = string;
|
1363
1489
|
/**
|
1364
|
-
*
|
1490
|
+
* Update operation
|
1365
1491
|
*/
|
1366
|
-
type
|
1492
|
+
type TransactionUpdateOp = {
|
1367
1493
|
/**
|
1368
|
-
* The
|
1494
|
+
* The table name
|
1369
1495
|
*/
|
1370
|
-
|
1371
|
-
|
1372
|
-
/**
|
1373
|
-
* The max of the numeric values in a particular column.
|
1374
|
-
*/
|
1375
|
-
type MaxAgg = {
|
1496
|
+
table: string;
|
1497
|
+
id: RecordID;
|
1376
1498
|
/**
|
1377
|
-
* The
|
1499
|
+
* The fields of the record you'd like to update
|
1378
1500
|
*/
|
1379
|
-
|
1501
|
+
fields: {
|
1502
|
+
[key: string]: any;
|
1503
|
+
};
|
1504
|
+
/**
|
1505
|
+
* The version of the record you expect to be updating
|
1506
|
+
*/
|
1507
|
+
ifVersion?: number;
|
1508
|
+
/**
|
1509
|
+
* Xata will insert this record if it cannot be found.
|
1510
|
+
*/
|
1511
|
+
upsert?: boolean;
|
1380
1512
|
};
|
1381
1513
|
/**
|
1382
|
-
* The
|
1514
|
+
* A delete operation. The transaction will continue if no record matches the ID.
|
1383
1515
|
*/
|
1384
|
-
type
|
1516
|
+
type TransactionDeleteOp = {
|
1385
1517
|
/**
|
1386
|
-
* The
|
1518
|
+
* The table name
|
1387
1519
|
*/
|
1388
|
-
|
1520
|
+
table: string;
|
1521
|
+
id: RecordID;
|
1389
1522
|
};
|
1390
1523
|
/**
|
1391
|
-
*
|
1524
|
+
* A transaction operation
|
1392
1525
|
*/
|
1393
|
-
type
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1526
|
+
type TransactionOperation$1 = {
|
1527
|
+
insert: TransactionInsertOp;
|
1528
|
+
} | {
|
1529
|
+
update: TransactionUpdateOp;
|
1530
|
+
} | {
|
1531
|
+
['delete']: TransactionDeleteOp;
|
1398
1532
|
};
|
1399
1533
|
/**
|
1400
|
-
*
|
1534
|
+
* A result from an insert operation.
|
1401
1535
|
*/
|
1402
|
-
type
|
1536
|
+
type TransactionResultInsert = {
|
1403
1537
|
/**
|
1404
|
-
* The
|
1538
|
+
* The type of operation who's result is being returned.
|
1405
1539
|
*/
|
1406
|
-
|
1540
|
+
operation: 'insert';
|
1407
1541
|
/**
|
1408
|
-
* The
|
1409
|
-
* values in the column is higher than this threshold, the results are approximative.
|
1410
|
-
* Maximum value is 40,000, default value is 3000.
|
1542
|
+
* The number of affected rows
|
1411
1543
|
*/
|
1412
|
-
|
1544
|
+
rows: number;
|
1545
|
+
id: RecordID;
|
1413
1546
|
};
|
1414
1547
|
/**
|
1415
|
-
*
|
1548
|
+
* A result from an update operation.
|
1416
1549
|
*/
|
1417
|
-
type
|
1418
|
-
/**
|
1419
|
-
* The column to use for bucketing. Must be of type datetime.
|
1420
|
-
*/
|
1421
|
-
column: string;
|
1422
|
-
/**
|
1423
|
-
* The fixed interval to use when bucketing.
|
1424
|
-
* It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
|
1425
|
-
*
|
1426
|
-
* @pattern ^(\d+)(d|h|m|s|ms)$
|
1427
|
-
*/
|
1428
|
-
interval?: string;
|
1550
|
+
type TransactionResultUpdate = {
|
1429
1551
|
/**
|
1430
|
-
* The
|
1431
|
-
* `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
1552
|
+
* The type of operation who's result is being returned.
|
1432
1553
|
*/
|
1433
|
-
|
1554
|
+
operation: 'update';
|
1434
1555
|
/**
|
1435
|
-
* The
|
1436
|
-
* The accepted format is as an ISO 8601 UTC offset. For example: `+01:00` or
|
1437
|
-
* `-08:00`.
|
1438
|
-
*
|
1439
|
-
* @pattern ^[+-][01]\d:[0-5]\d$
|
1556
|
+
* The number of updated rows
|
1440
1557
|
*/
|
1441
|
-
|
1442
|
-
|
1558
|
+
rows: number;
|
1559
|
+
id: RecordID;
|
1443
1560
|
};
|
1444
1561
|
/**
|
1445
|
-
*
|
1446
|
-
* The top values as ordered by the number of records (`$count`) are returned.
|
1562
|
+
* A result from a delete operation.
|
1447
1563
|
*/
|
1448
|
-
type
|
1564
|
+
type TransactionResultDelete = {
|
1449
1565
|
/**
|
1450
|
-
* The
|
1566
|
+
* The type of operation who's result is being returned.
|
1451
1567
|
*/
|
1452
|
-
|
1453
|
-
aggs?: AggExpressionMap;
|
1568
|
+
operation: 'delete';
|
1454
1569
|
/**
|
1455
|
-
* The
|
1456
|
-
*
|
1457
|
-
* @default 10
|
1458
|
-
* @maximum 1000
|
1570
|
+
* The number of deleted rows
|
1459
1571
|
*/
|
1460
|
-
|
1572
|
+
rows: number;
|
1461
1573
|
};
|
1462
1574
|
/**
|
1463
|
-
*
|
1575
|
+
* An ordered array of results from the submitted operations.
|
1464
1576
|
*/
|
1465
|
-
type
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1577
|
+
type TransactionSuccess = {
|
1578
|
+
results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
|
1579
|
+
};
|
1580
|
+
/**
|
1581
|
+
* An error message from a failing transaction operation
|
1582
|
+
*/
|
1583
|
+
type TransactionError = {
|
1470
1584
|
/**
|
1471
|
-
* The
|
1472
|
-
* with this value as size.
|
1473
|
-
*
|
1474
|
-
* @minimum 0
|
1585
|
+
* The index of the failing operation
|
1475
1586
|
*/
|
1476
|
-
|
1587
|
+
index: number;
|
1477
1588
|
/**
|
1478
|
-
*
|
1479
|
-
* boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
|
1480
|
-
* but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
|
1481
|
-
* to 50.
|
1482
|
-
*
|
1483
|
-
* @default 0
|
1589
|
+
* The error message
|
1484
1590
|
*/
|
1485
|
-
|
1486
|
-
aggs?: AggExpressionMap;
|
1591
|
+
message: string;
|
1487
1592
|
};
|
1488
|
-
|
1593
|
+
/**
|
1594
|
+
* An array of errors, with indicides, from the transaction.
|
1595
|
+
*/
|
1596
|
+
type TransactionFailure = {
|
1489
1597
|
/**
|
1490
|
-
*
|
1598
|
+
* The request ID.
|
1491
1599
|
*/
|
1492
|
-
|
1600
|
+
id: string;
|
1493
1601
|
/**
|
1494
|
-
*
|
1602
|
+
* An array of errors from the submitted operations.
|
1495
1603
|
*/
|
1496
|
-
|
1604
|
+
errors: TransactionError[];
|
1497
1605
|
};
|
1498
1606
|
/**
|
1499
|
-
*
|
1500
|
-
*
|
1501
|
-
* @x-go-type xata.BoosterExpression
|
1607
|
+
* Xata Table Record Metadata
|
1502
1608
|
*/
|
1503
|
-
type
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1609
|
+
type RecordMeta = {
|
1610
|
+
id: RecordID;
|
1611
|
+
xata: {
|
1612
|
+
/**
|
1613
|
+
* The record's version. Can be used for optimistic concurrency control.
|
1614
|
+
*/
|
1615
|
+
version: number;
|
1616
|
+
/**
|
1617
|
+
* The record's table name. APIs that return records from multiple tables will set this field accordingly.
|
1618
|
+
*/
|
1619
|
+
table?: string;
|
1620
|
+
/**
|
1621
|
+
* Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
|
1622
|
+
*/
|
1623
|
+
highlight?: {
|
1624
|
+
[key: string]: string[] | {
|
1625
|
+
[key: string]: any;
|
1626
|
+
};
|
1627
|
+
};
|
1628
|
+
/**
|
1629
|
+
* The record's relevancy score. This is returned by the search APIs.
|
1630
|
+
*/
|
1631
|
+
score?: number;
|
1632
|
+
/**
|
1633
|
+
* Encoding/Decoding errors
|
1634
|
+
*/
|
1635
|
+
warnings?: string[];
|
1636
|
+
};
|
1509
1637
|
};
|
1638
|
+
/**
|
1639
|
+
* The target expression is used to filter the search results by the target columns.
|
1640
|
+
*/
|
1641
|
+
type TargetExpression = (string | {
|
1642
|
+
/**
|
1643
|
+
* The name of the column.
|
1644
|
+
*/
|
1645
|
+
column: string;
|
1646
|
+
/**
|
1647
|
+
* The weight of the column.
|
1648
|
+
*
|
1649
|
+
* @default 1
|
1650
|
+
* @maximum 10
|
1651
|
+
* @minimum 1
|
1652
|
+
*/
|
1653
|
+
weight?: number;
|
1654
|
+
})[];
|
1510
1655
|
/**
|
1511
1656
|
* Boost records with a particular value for a column.
|
1512
1657
|
*/
|
@@ -1585,320 +1730,293 @@ type DateBooster$1 = {
|
|
1585
1730
|
*/
|
1586
1731
|
decay: number;
|
1587
1732
|
/**
|
1588
|
-
* Only apply this booster to the records for which the provided filter matches.
|
1589
|
-
*/
|
1590
|
-
ifMatchesFilter?: FilterExpression;
|
1591
|
-
};
|
1592
|
-
type FilterList = FilterExpression | FilterExpression[];
|
1593
|
-
type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
|
1594
|
-
/**
|
1595
|
-
* @maxProperties 1
|
1596
|
-
* @minProperties 1
|
1597
|
-
*/
|
1598
|
-
type FilterColumnIncludes = {
|
1599
|
-
$includes?: FilterPredicate;
|
1600
|
-
$includesAny?: FilterPredicate;
|
1601
|
-
$includesAll?: FilterPredicate;
|
1602
|
-
$includesNone?: FilterPredicate;
|
1603
|
-
};
|
1604
|
-
type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
|
1605
|
-
/**
|
1606
|
-
* @maxProperties 1
|
1607
|
-
* @minProperties 1
|
1608
|
-
*/
|
1609
|
-
type FilterPredicateOp = {
|
1610
|
-
$any?: FilterPredicate[];
|
1611
|
-
$all?: FilterPredicate[];
|
1612
|
-
$none?: FilterPredicate | FilterPredicate[];
|
1613
|
-
$not?: FilterPredicate | FilterPredicate[];
|
1614
|
-
$is?: FilterValue | FilterValue[];
|
1615
|
-
$isNot?: FilterValue | FilterValue[];
|
1616
|
-
$lt?: FilterRangeValue;
|
1617
|
-
$le?: FilterRangeValue;
|
1618
|
-
$gt?: FilterRangeValue;
|
1619
|
-
$ge?: FilterRangeValue;
|
1620
|
-
$contains?: string;
|
1621
|
-
$startsWith?: string;
|
1622
|
-
$endsWith?: string;
|
1623
|
-
$pattern?: string;
|
1624
|
-
};
|
1625
|
-
/**
|
1626
|
-
* @maxProperties 2
|
1627
|
-
* @minProperties 2
|
1628
|
-
*/
|
1629
|
-
type FilterPredicateRangeOp = {
|
1630
|
-
$lt?: FilterRangeValue;
|
1631
|
-
$le?: FilterRangeValue;
|
1632
|
-
$gt?: FilterRangeValue;
|
1633
|
-
$ge?: FilterRangeValue;
|
1634
|
-
};
|
1635
|
-
type FilterRangeValue = number | string;
|
1636
|
-
type FilterValue = number | string | boolean;
|
1637
|
-
/**
|
1638
|
-
* Pagination settings.
|
1639
|
-
*/
|
1640
|
-
type PageConfig = {
|
1641
|
-
/**
|
1642
|
-
* Query the next page that follow the cursor.
|
1643
|
-
*/
|
1644
|
-
after?: string;
|
1645
|
-
/**
|
1646
|
-
* Query the previous page before the cursor.
|
1647
|
-
*/
|
1648
|
-
before?: string;
|
1649
|
-
/**
|
1650
|
-
* Query the first page from the cursor.
|
1651
|
-
*/
|
1652
|
-
start?: string;
|
1653
|
-
/**
|
1654
|
-
* Query the last page from the cursor.
|
1655
|
-
*/
|
1656
|
-
end?: string;
|
1657
|
-
/**
|
1658
|
-
* 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.
|
1659
|
-
*
|
1660
|
-
* @default 20
|
1661
|
-
*/
|
1662
|
-
size?: number;
|
1663
|
-
/**
|
1664
|
-
* Use offset to skip entries. To skip pages set offset to a multiple of size.
|
1665
|
-
*
|
1666
|
-
* @default 0
|
1667
|
-
*/
|
1668
|
-
offset?: number;
|
1669
|
-
};
|
1670
|
-
/**
|
1671
|
-
* Pagination settings for the search endpoints.
|
1672
|
-
*/
|
1673
|
-
type SearchPageConfig = {
|
1674
|
-
/**
|
1675
|
-
* Set page size.
|
1676
|
-
*
|
1677
|
-
* @default 25
|
1678
|
-
* @maximum 200
|
1679
|
-
*/
|
1680
|
-
size?: number;
|
1681
|
-
/**
|
1682
|
-
* Use offset to skip entries. To skip pages set offset to a multiple of size.
|
1683
|
-
*
|
1684
|
-
* @default 0
|
1685
|
-
* @maximum 800
|
1686
|
-
*/
|
1687
|
-
offset?: number;
|
1688
|
-
};
|
1689
|
-
/**
|
1690
|
-
* @example name
|
1691
|
-
* @example email
|
1692
|
-
* @example created_at
|
1693
|
-
*/
|
1694
|
-
type ColumnsProjection = string[];
|
1695
|
-
/**
|
1696
|
-
* Xata Table Record Metadata
|
1697
|
-
*/
|
1698
|
-
type RecordMeta = {
|
1699
|
-
id: RecordID;
|
1700
|
-
xata: {
|
1701
|
-
/**
|
1702
|
-
* The record's version. Can be used for optimistic concurrency control.
|
1703
|
-
*/
|
1704
|
-
version: number;
|
1705
|
-
/**
|
1706
|
-
* The record's table name. APIs that return records from multiple tables will set this field accordingly.
|
1707
|
-
*/
|
1708
|
-
table?: string;
|
1709
|
-
/**
|
1710
|
-
* Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
|
1711
|
-
*/
|
1712
|
-
highlight?: {
|
1713
|
-
[key: string]: string[] | {
|
1714
|
-
[key: string]: any;
|
1715
|
-
};
|
1716
|
-
};
|
1717
|
-
/**
|
1718
|
-
* The record's relevancy score. This is returned by the search APIs.
|
1719
|
-
*/
|
1720
|
-
score?: number;
|
1721
|
-
/**
|
1722
|
-
* Encoding/Decoding errors
|
1723
|
-
*/
|
1724
|
-
warnings?: string[];
|
1725
|
-
};
|
1726
|
-
};
|
1727
|
-
/**
|
1728
|
-
* @pattern [a-zA-Z0-9_-~:]+
|
1729
|
-
*/
|
1730
|
-
type RecordID = string;
|
1731
|
-
/**
|
1732
|
-
* @example {"newName":"newName","oldName":"oldName"}
|
1733
|
-
*/
|
1734
|
-
type TableRename = {
|
1735
|
-
/**
|
1736
|
-
* @minLength 1
|
1737
|
-
*/
|
1738
|
-
newName: string;
|
1739
|
-
/**
|
1740
|
-
* @minLength 1
|
1741
|
-
*/
|
1742
|
-
oldName: string;
|
1743
|
-
};
|
1744
|
-
/**
|
1745
|
-
* Records metadata
|
1746
|
-
*/
|
1747
|
-
type RecordsMetadata = {
|
1748
|
-
page: {
|
1749
|
-
/**
|
1750
|
-
* last record id
|
1751
|
-
*/
|
1752
|
-
cursor: string;
|
1753
|
-
/**
|
1754
|
-
* true if more records can be fetch
|
1755
|
-
*/
|
1756
|
-
more: boolean;
|
1757
|
-
};
|
1758
|
-
};
|
1759
|
-
type AggResponse$1 = (number | null) | {
|
1760
|
-
values: ({
|
1761
|
-
$key: string | number;
|
1762
|
-
$count: number;
|
1763
|
-
} & {
|
1764
|
-
[key: string]: AggResponse$1;
|
1765
|
-
})[];
|
1733
|
+
* Only apply this booster to the records for which the provided filter matches.
|
1734
|
+
*/
|
1735
|
+
ifMatchesFilter?: FilterExpression;
|
1766
1736
|
};
|
1767
1737
|
/**
|
1768
|
-
*
|
1738
|
+
* Booster Expression
|
1739
|
+
*
|
1740
|
+
* @x-go-type xata.BoosterExpression
|
1769
1741
|
*/
|
1770
|
-
type
|
1771
|
-
|
1742
|
+
type BoosterExpression = {
|
1743
|
+
valueBooster?: ValueBooster$1;
|
1772
1744
|
} | {
|
1773
|
-
|
1745
|
+
numericBooster?: NumericBooster$1;
|
1774
1746
|
} | {
|
1775
|
-
|
1747
|
+
dateBooster?: DateBooster$1;
|
1776
1748
|
};
|
1777
1749
|
/**
|
1778
|
-
*
|
1750
|
+
* Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
|
1751
|
+
* distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
|
1752
|
+
* character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
|
1753
|
+
* to allow two typos in a word.
|
1754
|
+
*
|
1755
|
+
* @default 1
|
1756
|
+
* @maximum 2
|
1757
|
+
* @minimum 0
|
1779
1758
|
*/
|
1780
|
-
type
|
1759
|
+
type FuzzinessExpression = number;
|
1760
|
+
/**
|
1761
|
+
* 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.
|
1762
|
+
*/
|
1763
|
+
type PrefixExpression = 'phrase' | 'disabled';
|
1764
|
+
type HighlightExpression = {
|
1781
1765
|
/**
|
1782
|
-
*
|
1766
|
+
* Set to `false` to disable highlighting. By default it is `true`.
|
1783
1767
|
*/
|
1784
|
-
|
1768
|
+
enabled?: boolean;
|
1785
1769
|
/**
|
1786
|
-
*
|
1770
|
+
* Set to `false` to disable HTML encoding in highlight snippets. By default it is `true`.
|
1787
1771
|
*/
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1772
|
+
encodeHTML?: boolean;
|
1773
|
+
};
|
1774
|
+
/**
|
1775
|
+
* Pagination settings for the search endpoints.
|
1776
|
+
*/
|
1777
|
+
type SearchPageConfig = {
|
1791
1778
|
/**
|
1792
|
-
*
|
1793
|
-
*
|
1779
|
+
* Set page size.
|
1780
|
+
*
|
1781
|
+
* @default 25
|
1782
|
+
* @maximum 200
|
1794
1783
|
*/
|
1795
|
-
|
1784
|
+
size?: number;
|
1796
1785
|
/**
|
1797
|
-
*
|
1798
|
-
*
|
1799
|
-
* If `createOnly` is set to `true`, Xata will only attempt to insert the record. If there's a conflict, Xata
|
1800
|
-
* will cancel the transaction.
|
1786
|
+
* Use offset to skip entries. To skip pages set offset to a multiple of size.
|
1801
1787
|
*
|
1802
|
-
*
|
1803
|
-
*
|
1788
|
+
* @default 0
|
1789
|
+
* @maximum 800
|
1804
1790
|
*/
|
1805
|
-
|
1791
|
+
offset?: number;
|
1806
1792
|
};
|
1807
1793
|
/**
|
1808
|
-
*
|
1794
|
+
* A summary expression is the description of a single summary operation. It consists of a single
|
1795
|
+
* key representing the operation, and a value representing the column to be operated on.
|
1796
|
+
*
|
1797
|
+
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
1798
|
+
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
1799
|
+
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
1800
|
+
*
|
1801
|
+
* We currently support several aggregation functions. Not all functions can be run on all column
|
1802
|
+
* types.
|
1803
|
+
*
|
1804
|
+
* - `count` is used to count the number of records in each group. Use `{"count": "*"}` to count
|
1805
|
+
* all columns present, otherwise `{"count": "<column_path>"}` to count the number of non-null
|
1806
|
+
* values are present at column path.
|
1807
|
+
*
|
1808
|
+
* Count can be used on any column type, and always returns an int.
|
1809
|
+
*
|
1810
|
+
* - `min` calculates the minimum value in each group. `min` is compatible with most types;
|
1811
|
+
* string, multiple, text, email, int, float, and datetime. It returns a value of the same
|
1812
|
+
* type as operated on. This means that `{"lowest_latency": {"min": "latency"}}` where
|
1813
|
+
* `latency` is an int, will always return an int.
|
1814
|
+
*
|
1815
|
+
* - `max` calculates the maximum value in each group. `max` shares the same compatibility as
|
1816
|
+
* `min`.
|
1817
|
+
*
|
1818
|
+
* - `sum` adds up all values in a group. `sum` can be run on `int` and `float` types, and will
|
1819
|
+
* return a value of the same type as requested.
|
1820
|
+
*
|
1821
|
+
* - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
|
1822
|
+
* always returns a float.
|
1823
|
+
*
|
1824
|
+
* @example {"count":"deleted_at"}
|
1825
|
+
* @x-go-type xbquery.Summary
|
1809
1826
|
*/
|
1810
|
-
type
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1827
|
+
type SummaryExpression = Record<string, any>;
|
1828
|
+
/**
|
1829
|
+
* The description of the summaries you wish to receive. Set each key to be the field name
|
1830
|
+
* you'd like for the summary. These names must not collide with other columns you've
|
1831
|
+
* requested from `columns`; including implicit requests like `settings.*`.
|
1832
|
+
*
|
1833
|
+
* The value for each key needs to be an object. This object should contain one key and one
|
1834
|
+
* value only. In this object, the key should be set to the summary function you wish to use
|
1835
|
+
* and the value set to the column name to be summarized.
|
1836
|
+
*
|
1837
|
+
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
1838
|
+
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
1839
|
+
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
1840
|
+
*
|
1841
|
+
* @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"}}
|
1842
|
+
* @x-go-type xbquery.SummaryList
|
1843
|
+
*/
|
1844
|
+
type SummaryExpressionList = {
|
1845
|
+
[key: string]: SummaryExpression;
|
1846
|
+
};
|
1847
|
+
/**
|
1848
|
+
* Count the number of records with an optional filter.
|
1849
|
+
*/
|
1850
|
+
type CountAgg = {
|
1851
|
+
filter?: FilterExpression;
|
1852
|
+
} | '*';
|
1853
|
+
/**
|
1854
|
+
* The sum of the numeric values in a particular column.
|
1855
|
+
*/
|
1856
|
+
type SumAgg = {
|
1816
1857
|
/**
|
1817
|
-
* The
|
1858
|
+
* The column on which to compute the sum. Must be a numeric type.
|
1818
1859
|
*/
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1860
|
+
column: string;
|
1861
|
+
};
|
1862
|
+
/**
|
1863
|
+
* The max of the numeric values in a particular column.
|
1864
|
+
*/
|
1865
|
+
type MaxAgg = {
|
1822
1866
|
/**
|
1823
|
-
* The
|
1867
|
+
* The column on which to compute the max. Must be a numeric type.
|
1824
1868
|
*/
|
1825
|
-
|
1869
|
+
column: string;
|
1870
|
+
};
|
1871
|
+
/**
|
1872
|
+
* The min of the numeric values in a particular column.
|
1873
|
+
*/
|
1874
|
+
type MinAgg = {
|
1826
1875
|
/**
|
1827
|
-
*
|
1876
|
+
* The column on which to compute the min. Must be a numeric type.
|
1828
1877
|
*/
|
1829
|
-
|
1878
|
+
column: string;
|
1830
1879
|
};
|
1831
1880
|
/**
|
1832
|
-
*
|
1881
|
+
* The average of the numeric values in a particular column.
|
1833
1882
|
*/
|
1834
|
-
type
|
1883
|
+
type AverageAgg = {
|
1835
1884
|
/**
|
1836
|
-
* The
|
1885
|
+
* The column on which to compute the average. Must be a numeric type.
|
1837
1886
|
*/
|
1838
|
-
|
1839
|
-
id: RecordID;
|
1887
|
+
column: string;
|
1840
1888
|
};
|
1841
1889
|
/**
|
1842
|
-
*
|
1890
|
+
* Count the number of distinct values in a particular column.
|
1843
1891
|
*/
|
1844
|
-
type
|
1892
|
+
type UniqueCountAgg = {
|
1845
1893
|
/**
|
1846
|
-
* The
|
1894
|
+
* The column from where to count the unique values.
|
1847
1895
|
*/
|
1848
|
-
|
1896
|
+
column: string;
|
1849
1897
|
/**
|
1850
|
-
* The number of
|
1898
|
+
* The threshold under which the unique count is exact. If the number of unique
|
1899
|
+
* values in the column is higher than this threshold, the results are approximative.
|
1900
|
+
* Maximum value is 40,000, default value is 3000.
|
1851
1901
|
*/
|
1852
|
-
|
1853
|
-
id: RecordID;
|
1902
|
+
precisionThreshold?: number;
|
1854
1903
|
};
|
1855
1904
|
/**
|
1856
|
-
*
|
1905
|
+
* The description of the aggregations you wish to receive.
|
1906
|
+
*
|
1907
|
+
* @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d","aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}}
|
1857
1908
|
*/
|
1858
|
-
type
|
1909
|
+
type AggExpressionMap = {
|
1910
|
+
[key: string]: AggExpression;
|
1911
|
+
};
|
1912
|
+
/**
|
1913
|
+
* Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
|
1914
|
+
*/
|
1915
|
+
type DateHistogramAgg = {
|
1859
1916
|
/**
|
1860
|
-
* The
|
1917
|
+
* The column to use for bucketing. Must be of type datetime.
|
1861
1918
|
*/
|
1862
|
-
|
1919
|
+
column: string;
|
1863
1920
|
/**
|
1864
|
-
* The
|
1921
|
+
* The fixed interval to use when bucketing.
|
1922
|
+
* It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
|
1923
|
+
*
|
1924
|
+
* @pattern ^(\d+)(d|h|m|s|ms)$
|
1865
1925
|
*/
|
1866
|
-
|
1867
|
-
|
1926
|
+
interval?: string;
|
1927
|
+
/**
|
1928
|
+
* The calendar-aware interval to use when bucketing. Possible values are: `minute`,
|
1929
|
+
* `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
1930
|
+
*/
|
1931
|
+
calendarInterval?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
1932
|
+
/**
|
1933
|
+
* The timezone to use for bucketing. By default, UTC is assumed.
|
1934
|
+
* The accepted format is as an ISO 8601 UTC offset. For example: `+01:00` or
|
1935
|
+
* `-08:00`.
|
1936
|
+
*
|
1937
|
+
* @pattern ^[+-][01]\d:[0-5]\d$
|
1938
|
+
*/
|
1939
|
+
timezone?: string;
|
1940
|
+
aggs?: AggExpressionMap;
|
1868
1941
|
};
|
1869
1942
|
/**
|
1870
|
-
*
|
1943
|
+
* Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
|
1944
|
+
* The top values as ordered by the number of records (`$count`) are returned.
|
1871
1945
|
*/
|
1872
|
-
type
|
1946
|
+
type TopValuesAgg = {
|
1873
1947
|
/**
|
1874
|
-
* The
|
1948
|
+
* The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
|
1875
1949
|
*/
|
1876
|
-
|
1950
|
+
column: string;
|
1951
|
+
aggs?: AggExpressionMap;
|
1877
1952
|
/**
|
1878
|
-
* The number of
|
1953
|
+
* The maximum number of unique values to return.
|
1954
|
+
*
|
1955
|
+
* @default 10
|
1956
|
+
* @maximum 1000
|
1879
1957
|
*/
|
1880
|
-
|
1958
|
+
size?: number;
|
1881
1959
|
};
|
1882
1960
|
/**
|
1883
|
-
*
|
1884
|
-
*
|
1885
|
-
* @x-go-type xata.ErrTxOp
|
1961
|
+
* Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
|
1886
1962
|
*/
|
1887
|
-
type
|
1963
|
+
type NumericHistogramAgg = {
|
1888
1964
|
/**
|
1889
|
-
* The
|
1965
|
+
* The column to use for bucketing. Must be of numeric type.
|
1890
1966
|
*/
|
1891
|
-
|
1967
|
+
column: string;
|
1892
1968
|
/**
|
1893
|
-
* The
|
1969
|
+
* The numeric interval to use for bucketing. The resulting buckets will be ranges
|
1970
|
+
* with this value as size.
|
1971
|
+
*
|
1972
|
+
* @minimum 0
|
1973
|
+
*/
|
1974
|
+
interval: number;
|
1975
|
+
/**
|
1976
|
+
* By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
|
1977
|
+
* boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
|
1978
|
+
* but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
|
1979
|
+
* to 50.
|
1980
|
+
*
|
1981
|
+
* @default 0
|
1894
1982
|
*/
|
1895
|
-
|
1983
|
+
offset?: number;
|
1984
|
+
aggs?: AggExpressionMap;
|
1896
1985
|
};
|
1897
1986
|
/**
|
1898
|
-
*
|
1899
|
-
*
|
1987
|
+
* The description of a single aggregation operation. It is an object with only one key-value pair.
|
1988
|
+
* The key represents the aggregation type, while the value is an object with the configuration of
|
1989
|
+
* the aggregation.
|
1990
|
+
*
|
1991
|
+
* @x-go-type xata.AggExpression
|
1900
1992
|
*/
|
1901
|
-
type
|
1993
|
+
type AggExpression = {
|
1994
|
+
count?: CountAgg;
|
1995
|
+
} | {
|
1996
|
+
sum?: SumAgg;
|
1997
|
+
} | {
|
1998
|
+
max?: MaxAgg;
|
1999
|
+
} | {
|
2000
|
+
min?: MinAgg;
|
2001
|
+
} | {
|
2002
|
+
average?: AverageAgg;
|
2003
|
+
} | {
|
2004
|
+
uniqueCount?: UniqueCountAgg;
|
2005
|
+
} | {
|
2006
|
+
dateHistogram?: DateHistogramAgg;
|
2007
|
+
} | {
|
2008
|
+
topValues?: TopValuesAgg;
|
2009
|
+
} | {
|
2010
|
+
numericHistogram?: NumericHistogramAgg;
|
2011
|
+
};
|
2012
|
+
type AggResponse$1 = (number | null) | {
|
2013
|
+
values: ({
|
2014
|
+
$key: string | number;
|
2015
|
+
$count: number;
|
2016
|
+
} & {
|
2017
|
+
[key: string]: AggResponse$1;
|
2018
|
+
})[];
|
2019
|
+
};
|
1902
2020
|
/**
|
1903
2021
|
* Xata Table Record Metadata
|
1904
2022
|
*/
|
@@ -1912,26 +2030,33 @@ type XataRecord$1 = RecordMeta & {
|
|
1912
2030
|
* @version 1.0
|
1913
2031
|
*/
|
1914
2032
|
|
1915
|
-
type
|
2033
|
+
type BadRequestError = {
|
1916
2034
|
id?: string;
|
1917
2035
|
message: string;
|
1918
2036
|
};
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
2037
|
+
/**
|
2038
|
+
* @example {"message":"invalid API key"}
|
2039
|
+
*/
|
2040
|
+
type AuthError = {
|
2041
|
+
id?: string;
|
2042
|
+
message: string;
|
1924
2043
|
};
|
1925
|
-
type
|
1926
|
-
|
1927
|
-
|
1928
|
-
records: XataRecord$1[];
|
2044
|
+
type SimpleError = {
|
2045
|
+
id?: string;
|
2046
|
+
message: string;
|
1929
2047
|
};
|
1930
2048
|
type BranchMigrationPlan = {
|
1931
2049
|
version: number;
|
1932
2050
|
migration: BranchMigration;
|
1933
2051
|
};
|
1934
|
-
type
|
2052
|
+
type SchemaUpdateResponse = {
|
2053
|
+
/**
|
2054
|
+
* @minLength 1
|
2055
|
+
*/
|
2056
|
+
migrationID: string;
|
2057
|
+
parentMigrationID: string;
|
2058
|
+
status: MigrationStatus;
|
2059
|
+
};
|
1935
2060
|
type SchemaCompareResponse = {
|
1936
2061
|
source: Schema;
|
1937
2062
|
target: Schema;
|
@@ -1943,62 +2068,37 @@ type RecordUpdateResponse = XataRecord$1 | {
|
|
1943
2068
|
version: number;
|
1944
2069
|
};
|
1945
2070
|
};
|
2071
|
+
type RecordResponse = XataRecord$1;
|
2072
|
+
type BulkInsertResponse = {
|
2073
|
+
recordIDs: string[];
|
2074
|
+
} | {
|
2075
|
+
records: XataRecord$1[];
|
2076
|
+
};
|
2077
|
+
type BulkError = {
|
2078
|
+
errors: {
|
2079
|
+
message?: string;
|
2080
|
+
status?: number;
|
2081
|
+
}[];
|
2082
|
+
};
|
1946
2083
|
type QueryResponse = {
|
1947
2084
|
records: XataRecord$1[];
|
1948
2085
|
meta: RecordsMetadata;
|
1949
2086
|
};
|
1950
|
-
type
|
1951
|
-
|
1952
|
-
|
1953
|
-
*/
|
1954
|
-
migrationID: string;
|
1955
|
-
parentMigrationID: string;
|
1956
|
-
status: MigrationStatus;
|
2087
|
+
type SearchResponse = {
|
2088
|
+
records: XataRecord$1[];
|
2089
|
+
warning?: string;
|
1957
2090
|
};
|
1958
2091
|
type SummarizeResponse = {
|
1959
2092
|
summaries: Record<string, any>[];
|
1960
2093
|
};
|
1961
2094
|
/**
|
1962
|
-
* @example {"aggs":{"dailyUniqueUsers":{"values":[{"key":"2022-02-22T22:22:22Z","uniqueUsers":134},{"key":"2022-02-23T22:22:22Z","uniqueUsers":90}]}}}
|
2095
|
+
* @example {"aggs":{"dailyUniqueUsers":{"values":[{"$count":321,"$key":"2022-02-22T22:22:22Z","uniqueUsers":134},{"$count":202,"$key":"2022-02-23T22:22:22Z","uniqueUsers":90}]}}}
|
1963
2096
|
*/
|
1964
2097
|
type AggResponse = {
|
1965
2098
|
aggs?: {
|
1966
2099
|
[key: string]: AggResponse$1;
|
1967
2100
|
};
|
1968
2101
|
};
|
1969
|
-
type SearchResponse = {
|
1970
|
-
records: XataRecord$1[];
|
1971
|
-
warning?: string;
|
1972
|
-
};
|
1973
|
-
/**
|
1974
|
-
* @x-go-type TxSuccess
|
1975
|
-
*/
|
1976
|
-
type TransactionSuccess = {
|
1977
|
-
/**
|
1978
|
-
* An ordered array of results from the submitted operations that were executed
|
1979
|
-
*/
|
1980
|
-
results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
|
1981
|
-
};
|
1982
|
-
/**
|
1983
|
-
* @x-go-type TxFailure
|
1984
|
-
*/
|
1985
|
-
type TransactionFailure = {
|
1986
|
-
/**
|
1987
|
-
* An array of errors from the submitted operations.
|
1988
|
-
*/
|
1989
|
-
errors: TransactionError[];
|
1990
|
-
};
|
1991
|
-
type BadRequestError = {
|
1992
|
-
id?: string;
|
1993
|
-
message: string;
|
1994
|
-
};
|
1995
|
-
/**
|
1996
|
-
* @example {"message":"invalid API key"}
|
1997
|
-
*/
|
1998
|
-
type AuthError = {
|
1999
|
-
id?: string;
|
2000
|
-
message: string;
|
2001
|
-
};
|
2002
2102
|
|
2003
2103
|
type DataPlaneFetcherExtraProps = {
|
2004
2104
|
apiUrl: string;
|
@@ -2010,6 +2110,7 @@ type DataPlaneFetcherExtraProps = {
|
|
2010
2110
|
clientID?: string;
|
2011
2111
|
sessionID?: string;
|
2012
2112
|
clientName?: string;
|
2113
|
+
xataAgentExtra?: Record<string, string>;
|
2013
2114
|
};
|
2014
2115
|
type ErrorWrapper<TError> = TError | {
|
2015
2116
|
status: 'unknown';
|
@@ -2092,6 +2193,9 @@ type CreateBranchError = ErrorWrapper<{
|
|
2092
2193
|
} | {
|
2093
2194
|
status: 404;
|
2094
2195
|
payload: SimpleError;
|
2196
|
+
} | {
|
2197
|
+
status: 423;
|
2198
|
+
payload: SimpleError;
|
2095
2199
|
}>;
|
2096
2200
|
type CreateBranchResponse = {
|
2097
2201
|
/**
|
@@ -2131,6 +2235,9 @@ type DeleteBranchError = ErrorWrapper<{
|
|
2131
2235
|
} | {
|
2132
2236
|
status: 404;
|
2133
2237
|
payload: SimpleError;
|
2238
|
+
} | {
|
2239
|
+
status: 409;
|
2240
|
+
payload: SimpleError;
|
2134
2241
|
}>;
|
2135
2242
|
type DeleteBranchResponse = {
|
2136
2243
|
status: MigrationStatus;
|
@@ -2504,32 +2611,6 @@ type ExecuteBranchMigrationPlanVariables = {
|
|
2504
2611
|
* Apply a migration plan to the branch
|
2505
2612
|
*/
|
2506
2613
|
declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
2507
|
-
type BranchTransactionPathParams = {
|
2508
|
-
/**
|
2509
|
-
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2510
|
-
*/
|
2511
|
-
dbBranchName: DBBranchName;
|
2512
|
-
workspace: string;
|
2513
|
-
region: string;
|
2514
|
-
};
|
2515
|
-
type BranchTransactionError = ErrorWrapper<{
|
2516
|
-
status: 400;
|
2517
|
-
payload: TransactionFailure;
|
2518
|
-
} | {
|
2519
|
-
status: 401;
|
2520
|
-
payload: AuthError;
|
2521
|
-
} | {
|
2522
|
-
status: 404;
|
2523
|
-
payload: SimpleError;
|
2524
|
-
}>;
|
2525
|
-
type BranchTransactionRequestBody = {
|
2526
|
-
operations: TransactionOperation$1[];
|
2527
|
-
};
|
2528
|
-
type BranchTransactionVariables = {
|
2529
|
-
body: BranchTransactionRequestBody;
|
2530
|
-
pathParams: BranchTransactionPathParams;
|
2531
|
-
} & DataPlaneFetcherExtraProps;
|
2532
|
-
declare const branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
|
2533
2614
|
type QueryMigrationRequestsPathParams = {
|
2534
2615
|
/**
|
2535
2616
|
* The Database Name
|
@@ -2861,6 +2942,10 @@ type GetBranchSchemaHistoryRequestBody = {
|
|
2861
2942
|
*/
|
2862
2943
|
size?: number;
|
2863
2944
|
};
|
2945
|
+
/**
|
2946
|
+
* Report only migrations that have been added since the given Migration ID.
|
2947
|
+
*/
|
2948
|
+
since?: string;
|
2864
2949
|
};
|
2865
2950
|
type GetBranchSchemaHistoryVariables = {
|
2866
2951
|
body?: GetBranchSchemaHistoryRequestBody;
|
@@ -2887,6 +2972,8 @@ type CompareBranchWithUserSchemaError = ErrorWrapper<{
|
|
2887
2972
|
}>;
|
2888
2973
|
type CompareBranchWithUserSchemaRequestBody = {
|
2889
2974
|
schema: Schema;
|
2975
|
+
schemaOperations?: MigrationOp[];
|
2976
|
+
branchOperations?: MigrationOp[];
|
2890
2977
|
};
|
2891
2978
|
type CompareBranchWithUserSchemaVariables = {
|
2892
2979
|
body: CompareBranchWithUserSchemaRequestBody;
|
@@ -2915,8 +3002,12 @@ type CompareBranchSchemasError = ErrorWrapper<{
|
|
2915
3002
|
status: 404;
|
2916
3003
|
payload: SimpleError;
|
2917
3004
|
}>;
|
3005
|
+
type CompareBranchSchemasRequestBody = {
|
3006
|
+
sourceBranchOperations?: MigrationOp[];
|
3007
|
+
targetBranchOperations?: MigrationOp[];
|
3008
|
+
};
|
2918
3009
|
type CompareBranchSchemasVariables = {
|
2919
|
-
body
|
3010
|
+
body: CompareBranchSchemasRequestBody;
|
2920
3011
|
pathParams: CompareBranchSchemasPathParams;
|
2921
3012
|
} & DataPlaneFetcherExtraProps;
|
2922
3013
|
declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
|
@@ -3089,6 +3180,9 @@ type UpdateTableError = ErrorWrapper<{
|
|
3089
3180
|
} | {
|
3090
3181
|
status: 404;
|
3091
3182
|
payload: SimpleError;
|
3183
|
+
} | {
|
3184
|
+
status: 422;
|
3185
|
+
payload: SimpleError;
|
3092
3186
|
}>;
|
3093
3187
|
type UpdateTableRequestBody = {
|
3094
3188
|
/**
|
@@ -3347,6 +3441,32 @@ type DeleteColumnVariables = {
|
|
3347
3441
|
* Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
|
3348
3442
|
*/
|
3349
3443
|
declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3444
|
+
type BranchTransactionPathParams = {
|
3445
|
+
/**
|
3446
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3447
|
+
*/
|
3448
|
+
dbBranchName: DBBranchName;
|
3449
|
+
workspace: string;
|
3450
|
+
region: string;
|
3451
|
+
};
|
3452
|
+
type BranchTransactionError = ErrorWrapper<{
|
3453
|
+
status: 400;
|
3454
|
+
payload: TransactionFailure;
|
3455
|
+
} | {
|
3456
|
+
status: 401;
|
3457
|
+
payload: AuthError;
|
3458
|
+
} | {
|
3459
|
+
status: 404;
|
3460
|
+
payload: SimpleError;
|
3461
|
+
}>;
|
3462
|
+
type BranchTransactionRequestBody = {
|
3463
|
+
operations: TransactionOperation$1[];
|
3464
|
+
};
|
3465
|
+
type BranchTransactionVariables = {
|
3466
|
+
body: BranchTransactionRequestBody;
|
3467
|
+
pathParams: BranchTransactionPathParams;
|
3468
|
+
} & DataPlaneFetcherExtraProps;
|
3469
|
+
declare const branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
|
3350
3470
|
type InsertRecordPathParams = {
|
3351
3471
|
/**
|
3352
3472
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -4782,6 +4902,9 @@ declare const operationsByTag: {
|
|
4782
4902
|
deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DeleteDatabaseResponse>;
|
4783
4903
|
getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
|
4784
4904
|
updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
|
4905
|
+
getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
|
4906
|
+
updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
|
4907
|
+
deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
4785
4908
|
listRegions: (variables: ListRegionsVariables, signal?: AbortSignal | undefined) => Promise<ListRegionsResponse>;
|
4786
4909
|
};
|
4787
4910
|
};
|
@@ -4801,245 +4924,247 @@ declare function parseWorkspacesUrlParts(url: string): {
|
|
4801
4924
|
region: string;
|
4802
4925
|
} | null;
|
4803
4926
|
|
4927
|
+
type responses_AggResponse = AggResponse;
|
4804
4928
|
type responses_AuthError = AuthError;
|
4805
4929
|
type responses_BadRequestError = BadRequestError;
|
4806
|
-
type
|
4930
|
+
type responses_BranchMigrationPlan = BranchMigrationPlan;
|
4807
4931
|
type responses_BulkError = BulkError;
|
4808
4932
|
type responses_BulkInsertResponse = BulkInsertResponse;
|
4809
|
-
type
|
4933
|
+
type responses_QueryResponse = QueryResponse;
|
4810
4934
|
type responses_RecordResponse = RecordResponse;
|
4811
|
-
type responses_SchemaCompareResponse = SchemaCompareResponse;
|
4812
4935
|
type responses_RecordUpdateResponse = RecordUpdateResponse;
|
4813
|
-
type
|
4936
|
+
type responses_SchemaCompareResponse = SchemaCompareResponse;
|
4814
4937
|
type responses_SchemaUpdateResponse = SchemaUpdateResponse;
|
4815
|
-
type responses_SummarizeResponse = SummarizeResponse;
|
4816
|
-
type responses_AggResponse = AggResponse;
|
4817
4938
|
type responses_SearchResponse = SearchResponse;
|
4818
|
-
type
|
4819
|
-
type
|
4939
|
+
type responses_SimpleError = SimpleError;
|
4940
|
+
type responses_SummarizeResponse = SummarizeResponse;
|
4820
4941
|
declare namespace responses {
|
4821
4942
|
export {
|
4943
|
+
responses_AggResponse as AggResponse,
|
4822
4944
|
responses_AuthError as AuthError,
|
4823
4945
|
responses_BadRequestError as BadRequestError,
|
4824
|
-
|
4946
|
+
responses_BranchMigrationPlan as BranchMigrationPlan,
|
4825
4947
|
responses_BulkError as BulkError,
|
4826
4948
|
responses_BulkInsertResponse as BulkInsertResponse,
|
4827
|
-
|
4949
|
+
responses_QueryResponse as QueryResponse,
|
4828
4950
|
responses_RecordResponse as RecordResponse,
|
4829
|
-
responses_SchemaCompareResponse as SchemaCompareResponse,
|
4830
4951
|
responses_RecordUpdateResponse as RecordUpdateResponse,
|
4831
|
-
|
4952
|
+
responses_SchemaCompareResponse as SchemaCompareResponse,
|
4832
4953
|
responses_SchemaUpdateResponse as SchemaUpdateResponse,
|
4833
|
-
responses_SummarizeResponse as SummarizeResponse,
|
4834
|
-
responses_AggResponse as AggResponse,
|
4835
4954
|
responses_SearchResponse as SearchResponse,
|
4836
|
-
|
4837
|
-
|
4955
|
+
responses_SimpleError as SimpleError,
|
4956
|
+
responses_SummarizeResponse as SummarizeResponse,
|
4838
4957
|
};
|
4839
4958
|
}
|
4840
4959
|
|
4960
|
+
type schemas_APIKeyName = APIKeyName;
|
4961
|
+
type schemas_AggExpression = AggExpression;
|
4962
|
+
type schemas_AggExpressionMap = AggExpressionMap;
|
4963
|
+
type schemas_AverageAgg = AverageAgg;
|
4964
|
+
type schemas_BoosterExpression = BoosterExpression;
|
4965
|
+
type schemas_Branch = Branch;
|
4841
4966
|
type schemas_BranchMetadata = BranchMetadata;
|
4967
|
+
type schemas_BranchMigration = BranchMigration;
|
4842
4968
|
type schemas_BranchName = BranchName;
|
4843
|
-
type schemas_DBName = DBName;
|
4844
|
-
type schemas_DateTime = DateTime;
|
4845
|
-
type schemas_MigrationStatus = MigrationStatus;
|
4846
|
-
type schemas_ListBranchesResponse = ListBranchesResponse;
|
4847
|
-
type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
|
4848
|
-
type schemas_Branch = Branch;
|
4849
|
-
type schemas_DBBranch = DBBranch;
|
4850
|
-
type schemas_StartedFromMetadata = StartedFromMetadata;
|
4851
|
-
type schemas_Schema = Schema;
|
4852
|
-
type schemas_SchemaEditScript = SchemaEditScript;
|
4853
|
-
type schemas_Table = Table;
|
4854
4969
|
type schemas_Column = Column;
|
4855
4970
|
type schemas_ColumnLink = ColumnLink;
|
4856
|
-
type schemas_RevLink = RevLink;
|
4857
|
-
type schemas_DBBranchName = DBBranchName;
|
4858
|
-
type schemas_TableName = TableName;
|
4859
|
-
type schemas_ColumnName = ColumnName;
|
4860
|
-
type schemas_MetricsDatapoint = MetricsDatapoint;
|
4861
|
-
type schemas_MetricsLatency = MetricsLatency;
|
4862
|
-
type schemas_BranchMigration = BranchMigration;
|
4863
|
-
type schemas_TableMigration = TableMigration;
|
4864
4971
|
type schemas_ColumnMigration = ColumnMigration;
|
4865
|
-
type
|
4866
|
-
type
|
4867
|
-
type
|
4868
|
-
type
|
4869
|
-
type
|
4870
|
-
type
|
4871
|
-
type schemas_TableOpRemove = TableOpRemove;
|
4872
|
-
type schemas_TableOpRename = TableOpRename;
|
4873
|
-
type schemas_ColumnOpAdd = ColumnOpAdd;
|
4874
|
-
type schemas_ColumnOpRemove = ColumnOpRemove;
|
4875
|
-
type schemas_ColumnOpRename = ColumnOpRename;
|
4876
|
-
type schemas_MigrationRequestNumber = MigrationRequestNumber;
|
4877
|
-
type schemas_MigrationRequest = MigrationRequest;
|
4878
|
-
type schemas_SortExpression = SortExpression;
|
4879
|
-
type schemas_SortOrder = SortOrder;
|
4880
|
-
type schemas_FuzzinessExpression = FuzzinessExpression;
|
4881
|
-
type schemas_PrefixExpression = PrefixExpression;
|
4882
|
-
type schemas_TargetExpression = TargetExpression;
|
4883
|
-
type schemas_FilterExpression = FilterExpression;
|
4884
|
-
type schemas_SummaryExpressionList = SummaryExpressionList;
|
4885
|
-
type schemas_SummaryExpression = SummaryExpression;
|
4886
|
-
type schemas_AggExpressionMap = AggExpressionMap;
|
4887
|
-
type schemas_AggExpression = AggExpression;
|
4972
|
+
type schemas_ColumnName = ColumnName;
|
4973
|
+
type schemas_ColumnOpAdd = ColumnOpAdd;
|
4974
|
+
type schemas_ColumnOpRemove = ColumnOpRemove;
|
4975
|
+
type schemas_ColumnOpRename = ColumnOpRename;
|
4976
|
+
type schemas_ColumnsProjection = ColumnsProjection;
|
4977
|
+
type schemas_Commit = Commit;
|
4888
4978
|
type schemas_CountAgg = CountAgg;
|
4889
|
-
type
|
4890
|
-
type
|
4891
|
-
type
|
4892
|
-
type
|
4893
|
-
type
|
4979
|
+
type schemas_DBBranch = DBBranch;
|
4980
|
+
type schemas_DBBranchName = DBBranchName;
|
4981
|
+
type schemas_DBName = DBName;
|
4982
|
+
type schemas_DatabaseGithubSettings = DatabaseGithubSettings;
|
4983
|
+
type schemas_DatabaseMetadata = DatabaseMetadata;
|
4894
4984
|
type schemas_DateHistogramAgg = DateHistogramAgg;
|
4895
|
-
type
|
4896
|
-
type schemas_NumericHistogramAgg = NumericHistogramAgg;
|
4897
|
-
type schemas_HighlightExpression = HighlightExpression;
|
4898
|
-
type schemas_BoosterExpression = BoosterExpression;
|
4899
|
-
type schemas_FilterList = FilterList;
|
4985
|
+
type schemas_DateTime = DateTime;
|
4900
4986
|
type schemas_FilterColumn = FilterColumn;
|
4901
4987
|
type schemas_FilterColumnIncludes = FilterColumnIncludes;
|
4988
|
+
type schemas_FilterExpression = FilterExpression;
|
4989
|
+
type schemas_FilterList = FilterList;
|
4902
4990
|
type schemas_FilterPredicate = FilterPredicate;
|
4903
4991
|
type schemas_FilterPredicateOp = FilterPredicateOp;
|
4904
4992
|
type schemas_FilterPredicateRangeOp = FilterPredicateRangeOp;
|
4905
4993
|
type schemas_FilterRangeValue = FilterRangeValue;
|
4906
4994
|
type schemas_FilterValue = FilterValue;
|
4995
|
+
type schemas_FuzzinessExpression = FuzzinessExpression;
|
4996
|
+
type schemas_HighlightExpression = HighlightExpression;
|
4997
|
+
type schemas_InviteID = InviteID;
|
4998
|
+
type schemas_InviteKey = InviteKey;
|
4999
|
+
type schemas_ListBranchesResponse = ListBranchesResponse;
|
5000
|
+
type schemas_ListDatabasesResponse = ListDatabasesResponse;
|
5001
|
+
type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
|
5002
|
+
type schemas_ListRegionsResponse = ListRegionsResponse;
|
5003
|
+
type schemas_MaxAgg = MaxAgg;
|
5004
|
+
type schemas_MetricsDatapoint = MetricsDatapoint;
|
5005
|
+
type schemas_MetricsLatency = MetricsLatency;
|
5006
|
+
type schemas_Migration = Migration;
|
5007
|
+
type schemas_MigrationColumnOp = MigrationColumnOp;
|
5008
|
+
type schemas_MigrationOp = MigrationOp;
|
5009
|
+
type schemas_MigrationRequest = MigrationRequest;
|
5010
|
+
type schemas_MigrationRequestNumber = MigrationRequestNumber;
|
5011
|
+
type schemas_MigrationStatus = MigrationStatus;
|
5012
|
+
type schemas_MigrationTableOp = MigrationTableOp;
|
5013
|
+
type schemas_MinAgg = MinAgg;
|
5014
|
+
type schemas_NumericHistogramAgg = NumericHistogramAgg;
|
4907
5015
|
type schemas_PageConfig = PageConfig;
|
4908
|
-
type
|
4909
|
-
type schemas_ColumnsProjection = ColumnsProjection;
|
4910
|
-
type schemas_RecordMeta = RecordMeta;
|
5016
|
+
type schemas_PrefixExpression = PrefixExpression;
|
4911
5017
|
type schemas_RecordID = RecordID;
|
4912
|
-
type
|
5018
|
+
type schemas_RecordMeta = RecordMeta;
|
4913
5019
|
type schemas_RecordsMetadata = RecordsMetadata;
|
4914
|
-
type
|
4915
|
-
type
|
5020
|
+
type schemas_Region = Region;
|
5021
|
+
type schemas_RevLink = RevLink;
|
5022
|
+
type schemas_Role = Role;
|
5023
|
+
type schemas_Schema = Schema;
|
5024
|
+
type schemas_SchemaEditScript = SchemaEditScript;
|
5025
|
+
type schemas_SearchPageConfig = SearchPageConfig;
|
5026
|
+
type schemas_SortExpression = SortExpression;
|
5027
|
+
type schemas_SortOrder = SortOrder;
|
5028
|
+
type schemas_StartedFromMetadata = StartedFromMetadata;
|
5029
|
+
type schemas_SumAgg = SumAgg;
|
5030
|
+
type schemas_SummaryExpression = SummaryExpression;
|
5031
|
+
type schemas_SummaryExpressionList = SummaryExpressionList;
|
5032
|
+
type schemas_Table = Table;
|
5033
|
+
type schemas_TableMigration = TableMigration;
|
5034
|
+
type schemas_TableName = TableName;
|
5035
|
+
type schemas_TableOpAdd = TableOpAdd;
|
5036
|
+
type schemas_TableOpRemove = TableOpRemove;
|
5037
|
+
type schemas_TableOpRename = TableOpRename;
|
5038
|
+
type schemas_TableRename = TableRename;
|
5039
|
+
type schemas_TargetExpression = TargetExpression;
|
5040
|
+
type schemas_TopValuesAgg = TopValuesAgg;
|
4916
5041
|
type schemas_TransactionDeleteOp = TransactionDeleteOp;
|
5042
|
+
type schemas_TransactionError = TransactionError;
|
5043
|
+
type schemas_TransactionFailure = TransactionFailure;
|
5044
|
+
type schemas_TransactionInsertOp = TransactionInsertOp;
|
5045
|
+
type schemas_TransactionResultDelete = TransactionResultDelete;
|
4917
5046
|
type schemas_TransactionResultInsert = TransactionResultInsert;
|
4918
5047
|
type schemas_TransactionResultUpdate = TransactionResultUpdate;
|
4919
|
-
type
|
4920
|
-
type
|
5048
|
+
type schemas_TransactionSuccess = TransactionSuccess;
|
5049
|
+
type schemas_TransactionUpdateOp = TransactionUpdateOp;
|
5050
|
+
type schemas_UniqueCountAgg = UniqueCountAgg;
|
4921
5051
|
type schemas_User = User;
|
4922
5052
|
type schemas_UserID = UserID;
|
4923
5053
|
type schemas_UserWithID = UserWithID;
|
4924
|
-
type schemas_APIKeyName = APIKeyName;
|
4925
|
-
type schemas_WorkspaceID = WorkspaceID;
|
4926
|
-
type schemas_Role = Role;
|
4927
|
-
type schemas_WorkspaceMeta = WorkspaceMeta;
|
4928
5054
|
type schemas_Workspace = Workspace;
|
4929
|
-
type
|
4930
|
-
type schemas_InviteID = InviteID;
|
5055
|
+
type schemas_WorkspaceID = WorkspaceID;
|
4931
5056
|
type schemas_WorkspaceInvite = WorkspaceInvite;
|
5057
|
+
type schemas_WorkspaceMember = WorkspaceMember;
|
4932
5058
|
type schemas_WorkspaceMembers = WorkspaceMembers;
|
4933
|
-
type
|
4934
|
-
type schemas_DatabaseMetadata = DatabaseMetadata;
|
4935
|
-
type schemas_ListDatabasesResponse = ListDatabasesResponse;
|
4936
|
-
type schemas_ListRegionsResponse = ListRegionsResponse;
|
4937
|
-
type schemas_Region = Region;
|
5059
|
+
type schemas_WorkspaceMeta = WorkspaceMeta;
|
4938
5060
|
declare namespace schemas {
|
4939
5061
|
export {
|
5062
|
+
schemas_APIKeyName as APIKeyName,
|
5063
|
+
schemas_AggExpression as AggExpression,
|
5064
|
+
schemas_AggExpressionMap as AggExpressionMap,
|
5065
|
+
AggResponse$1 as AggResponse,
|
5066
|
+
schemas_AverageAgg as AverageAgg,
|
5067
|
+
schemas_BoosterExpression as BoosterExpression,
|
5068
|
+
schemas_Branch as Branch,
|
4940
5069
|
schemas_BranchMetadata as BranchMetadata,
|
5070
|
+
schemas_BranchMigration as BranchMigration,
|
4941
5071
|
schemas_BranchName as BranchName,
|
4942
|
-
schemas_DBName as DBName,
|
4943
|
-
schemas_DateTime as DateTime,
|
4944
|
-
schemas_MigrationStatus as MigrationStatus,
|
4945
|
-
schemas_ListBranchesResponse as ListBranchesResponse,
|
4946
|
-
schemas_ListGitBranchesResponse as ListGitBranchesResponse,
|
4947
|
-
schemas_Branch as Branch,
|
4948
|
-
schemas_DBBranch as DBBranch,
|
4949
|
-
schemas_StartedFromMetadata as StartedFromMetadata,
|
4950
|
-
schemas_Schema as Schema,
|
4951
|
-
schemas_SchemaEditScript as SchemaEditScript,
|
4952
|
-
schemas_Table as Table,
|
4953
5072
|
schemas_Column as Column,
|
4954
5073
|
schemas_ColumnLink as ColumnLink,
|
4955
|
-
schemas_RevLink as RevLink,
|
4956
|
-
schemas_DBBranchName as DBBranchName,
|
4957
|
-
schemas_TableName as TableName,
|
4958
|
-
schemas_ColumnName as ColumnName,
|
4959
|
-
schemas_MetricsDatapoint as MetricsDatapoint,
|
4960
|
-
schemas_MetricsLatency as MetricsLatency,
|
4961
|
-
schemas_BranchMigration as BranchMigration,
|
4962
|
-
schemas_TableMigration as TableMigration,
|
4963
5074
|
schemas_ColumnMigration as ColumnMigration,
|
4964
|
-
|
4965
|
-
schemas_Migration as Migration,
|
4966
|
-
schemas_MigrationOp as MigrationOp,
|
4967
|
-
schemas_MigrationTableOp as MigrationTableOp,
|
4968
|
-
schemas_MigrationColumnOp as MigrationColumnOp,
|
4969
|
-
schemas_TableOpAdd as TableOpAdd,
|
4970
|
-
schemas_TableOpRemove as TableOpRemove,
|
4971
|
-
schemas_TableOpRename as TableOpRename,
|
5075
|
+
schemas_ColumnName as ColumnName,
|
4972
5076
|
schemas_ColumnOpAdd as ColumnOpAdd,
|
4973
5077
|
schemas_ColumnOpRemove as ColumnOpRemove,
|
4974
5078
|
schemas_ColumnOpRename as ColumnOpRename,
|
4975
|
-
|
4976
|
-
|
4977
|
-
schemas_SortExpression as SortExpression,
|
4978
|
-
schemas_SortOrder as SortOrder,
|
4979
|
-
schemas_FuzzinessExpression as FuzzinessExpression,
|
4980
|
-
schemas_PrefixExpression as PrefixExpression,
|
4981
|
-
schemas_TargetExpression as TargetExpression,
|
4982
|
-
schemas_FilterExpression as FilterExpression,
|
4983
|
-
schemas_SummaryExpressionList as SummaryExpressionList,
|
4984
|
-
schemas_SummaryExpression as SummaryExpression,
|
4985
|
-
schemas_AggExpressionMap as AggExpressionMap,
|
4986
|
-
schemas_AggExpression as AggExpression,
|
5079
|
+
schemas_ColumnsProjection as ColumnsProjection,
|
5080
|
+
schemas_Commit as Commit,
|
4987
5081
|
schemas_CountAgg as CountAgg,
|
4988
|
-
|
4989
|
-
|
4990
|
-
|
4991
|
-
|
4992
|
-
|
4993
|
-
schemas_DateHistogramAgg as DateHistogramAgg,
|
4994
|
-
schemas_TopValuesAgg as TopValuesAgg,
|
4995
|
-
schemas_NumericHistogramAgg as NumericHistogramAgg,
|
4996
|
-
schemas_HighlightExpression as HighlightExpression,
|
4997
|
-
schemas_BoosterExpression as BoosterExpression,
|
4998
|
-
ValueBooster$1 as ValueBooster,
|
4999
|
-
NumericBooster$1 as NumericBooster,
|
5082
|
+
schemas_DBBranch as DBBranch,
|
5083
|
+
schemas_DBBranchName as DBBranchName,
|
5084
|
+
schemas_DBName as DBName,
|
5085
|
+
schemas_DatabaseGithubSettings as DatabaseGithubSettings,
|
5086
|
+
schemas_DatabaseMetadata as DatabaseMetadata,
|
5000
5087
|
DateBooster$1 as DateBooster,
|
5001
|
-
|
5088
|
+
schemas_DateHistogramAgg as DateHistogramAgg,
|
5089
|
+
schemas_DateTime as DateTime,
|
5002
5090
|
schemas_FilterColumn as FilterColumn,
|
5003
5091
|
schemas_FilterColumnIncludes as FilterColumnIncludes,
|
5092
|
+
schemas_FilterExpression as FilterExpression,
|
5093
|
+
schemas_FilterList as FilterList,
|
5004
5094
|
schemas_FilterPredicate as FilterPredicate,
|
5005
5095
|
schemas_FilterPredicateOp as FilterPredicateOp,
|
5006
5096
|
schemas_FilterPredicateRangeOp as FilterPredicateRangeOp,
|
5007
5097
|
schemas_FilterRangeValue as FilterRangeValue,
|
5008
5098
|
schemas_FilterValue as FilterValue,
|
5099
|
+
schemas_FuzzinessExpression as FuzzinessExpression,
|
5100
|
+
schemas_HighlightExpression as HighlightExpression,
|
5101
|
+
schemas_InviteID as InviteID,
|
5102
|
+
schemas_InviteKey as InviteKey,
|
5103
|
+
schemas_ListBranchesResponse as ListBranchesResponse,
|
5104
|
+
schemas_ListDatabasesResponse as ListDatabasesResponse,
|
5105
|
+
schemas_ListGitBranchesResponse as ListGitBranchesResponse,
|
5106
|
+
schemas_ListRegionsResponse as ListRegionsResponse,
|
5107
|
+
schemas_MaxAgg as MaxAgg,
|
5108
|
+
schemas_MetricsDatapoint as MetricsDatapoint,
|
5109
|
+
schemas_MetricsLatency as MetricsLatency,
|
5110
|
+
schemas_Migration as Migration,
|
5111
|
+
schemas_MigrationColumnOp as MigrationColumnOp,
|
5112
|
+
schemas_MigrationOp as MigrationOp,
|
5113
|
+
schemas_MigrationRequest as MigrationRequest,
|
5114
|
+
schemas_MigrationRequestNumber as MigrationRequestNumber,
|
5115
|
+
schemas_MigrationStatus as MigrationStatus,
|
5116
|
+
schemas_MigrationTableOp as MigrationTableOp,
|
5117
|
+
schemas_MinAgg as MinAgg,
|
5118
|
+
NumericBooster$1 as NumericBooster,
|
5119
|
+
schemas_NumericHistogramAgg as NumericHistogramAgg,
|
5009
5120
|
schemas_PageConfig as PageConfig,
|
5010
|
-
|
5011
|
-
schemas_ColumnsProjection as ColumnsProjection,
|
5012
|
-
schemas_RecordMeta as RecordMeta,
|
5121
|
+
schemas_PrefixExpression as PrefixExpression,
|
5013
5122
|
schemas_RecordID as RecordID,
|
5014
|
-
|
5123
|
+
schemas_RecordMeta as RecordMeta,
|
5015
5124
|
schemas_RecordsMetadata as RecordsMetadata,
|
5016
|
-
|
5017
|
-
|
5018
|
-
|
5019
|
-
|
5125
|
+
schemas_Region as Region,
|
5126
|
+
schemas_RevLink as RevLink,
|
5127
|
+
schemas_Role as Role,
|
5128
|
+
schemas_Schema as Schema,
|
5129
|
+
schemas_SchemaEditScript as SchemaEditScript,
|
5130
|
+
schemas_SearchPageConfig as SearchPageConfig,
|
5131
|
+
schemas_SortExpression as SortExpression,
|
5132
|
+
schemas_SortOrder as SortOrder,
|
5133
|
+
schemas_StartedFromMetadata as StartedFromMetadata,
|
5134
|
+
schemas_SumAgg as SumAgg,
|
5135
|
+
schemas_SummaryExpression as SummaryExpression,
|
5136
|
+
schemas_SummaryExpressionList as SummaryExpressionList,
|
5137
|
+
schemas_Table as Table,
|
5138
|
+
schemas_TableMigration as TableMigration,
|
5139
|
+
schemas_TableName as TableName,
|
5140
|
+
schemas_TableOpAdd as TableOpAdd,
|
5141
|
+
schemas_TableOpRemove as TableOpRemove,
|
5142
|
+
schemas_TableOpRename as TableOpRename,
|
5143
|
+
schemas_TableRename as TableRename,
|
5144
|
+
schemas_TargetExpression as TargetExpression,
|
5145
|
+
schemas_TopValuesAgg as TopValuesAgg,
|
5020
5146
|
schemas_TransactionDeleteOp as TransactionDeleteOp,
|
5147
|
+
schemas_TransactionError as TransactionError,
|
5148
|
+
schemas_TransactionFailure as TransactionFailure,
|
5149
|
+
schemas_TransactionInsertOp as TransactionInsertOp,
|
5150
|
+
TransactionOperation$1 as TransactionOperation,
|
5151
|
+
schemas_TransactionResultDelete as TransactionResultDelete,
|
5021
5152
|
schemas_TransactionResultInsert as TransactionResultInsert,
|
5022
5153
|
schemas_TransactionResultUpdate as TransactionResultUpdate,
|
5023
|
-
|
5024
|
-
|
5025
|
-
|
5154
|
+
schemas_TransactionSuccess as TransactionSuccess,
|
5155
|
+
schemas_TransactionUpdateOp as TransactionUpdateOp,
|
5156
|
+
schemas_UniqueCountAgg as UniqueCountAgg,
|
5026
5157
|
schemas_User as User,
|
5027
5158
|
schemas_UserID as UserID,
|
5028
5159
|
schemas_UserWithID as UserWithID,
|
5029
|
-
|
5030
|
-
schemas_WorkspaceID as WorkspaceID,
|
5031
|
-
schemas_Role as Role,
|
5032
|
-
schemas_WorkspaceMeta as WorkspaceMeta,
|
5160
|
+
ValueBooster$1 as ValueBooster,
|
5033
5161
|
schemas_Workspace as Workspace,
|
5034
|
-
|
5035
|
-
schemas_InviteID as InviteID,
|
5162
|
+
schemas_WorkspaceID as WorkspaceID,
|
5036
5163
|
schemas_WorkspaceInvite as WorkspaceInvite,
|
5164
|
+
schemas_WorkspaceMember as WorkspaceMember,
|
5037
5165
|
schemas_WorkspaceMembers as WorkspaceMembers,
|
5038
|
-
|
5039
|
-
|
5040
|
-
schemas_ListDatabasesResponse as ListDatabasesResponse,
|
5041
|
-
schemas_ListRegionsResponse as ListRegionsResponse,
|
5042
|
-
schemas_Region as Region,
|
5166
|
+
schemas_WorkspaceMeta as WorkspaceMeta,
|
5167
|
+
XataRecord$1 as XataRecord,
|
5043
5168
|
};
|
5044
5169
|
}
|
5045
5170
|
|
@@ -5050,6 +5175,7 @@ interface XataApiClientOptions {
|
|
5050
5175
|
host?: HostProvider;
|
5051
5176
|
trace?: TraceFunction;
|
5052
5177
|
clientName?: string;
|
5178
|
+
xataAgentExtra?: Record<string, string>;
|
5053
5179
|
}
|
5054
5180
|
declare class XataApiClient {
|
5055
5181
|
#private;
|
@@ -5545,20 +5671,23 @@ declare class MigrationsApi {
|
|
5545
5671
|
size?: number;
|
5546
5672
|
};
|
5547
5673
|
}): Promise<GetBranchSchemaHistoryResponse>;
|
5548
|
-
compareBranchWithUserSchema({ workspace, region, database, branch, schema }: {
|
5674
|
+
compareBranchWithUserSchema({ workspace, region, database, branch, schema, schemaOperations, branchOperations }: {
|
5549
5675
|
workspace: WorkspaceID;
|
5550
5676
|
region: string;
|
5551
5677
|
database: DBName;
|
5552
5678
|
branch: BranchName;
|
5553
5679
|
schema: Schema;
|
5680
|
+
schemaOperations?: MigrationOp[];
|
5681
|
+
branchOperations?: MigrationOp[];
|
5554
5682
|
}): Promise<SchemaCompareResponse>;
|
5555
|
-
compareBranchSchemas({ workspace, region, database, branch, compare,
|
5683
|
+
compareBranchSchemas({ workspace, region, database, branch, compare, sourceBranchOperations, targetBranchOperations }: {
|
5556
5684
|
workspace: WorkspaceID;
|
5557
5685
|
region: string;
|
5558
5686
|
database: DBName;
|
5559
5687
|
branch: BranchName;
|
5560
5688
|
compare: BranchName;
|
5561
|
-
|
5689
|
+
sourceBranchOperations?: MigrationOp[];
|
5690
|
+
targetBranchOperations?: MigrationOp[];
|
5562
5691
|
}): Promise<SchemaCompareResponse>;
|
5563
5692
|
updateBranchSchema({ workspace, region, database, branch, migration }: {
|
5564
5693
|
workspace: WorkspaceID;
|
@@ -5608,6 +5737,19 @@ declare class DatabaseApi {
|
|
5608
5737
|
database: DBName;
|
5609
5738
|
metadata: DatabaseMetadata;
|
5610
5739
|
}): Promise<DatabaseMetadata>;
|
5740
|
+
getDatabaseGithubSettings({ workspace, database }: {
|
5741
|
+
workspace: WorkspaceID;
|
5742
|
+
database: DBName;
|
5743
|
+
}): Promise<DatabaseGithubSettings>;
|
5744
|
+
updateDatabaseGithubSettings({ workspace, database, settings }: {
|
5745
|
+
workspace: WorkspaceID;
|
5746
|
+
database: DBName;
|
5747
|
+
settings: DatabaseGithubSettings;
|
5748
|
+
}): Promise<DatabaseGithubSettings>;
|
5749
|
+
deleteDatabaseGithubSettings({ workspace, database }: {
|
5750
|
+
workspace: WorkspaceID;
|
5751
|
+
database: DBName;
|
5752
|
+
}): Promise<void>;
|
5611
5753
|
listRegions({ workspace }: {
|
5612
5754
|
workspace: WorkspaceID;
|
5613
5755
|
}): Promise<ListRegionsResponse>;
|
@@ -5663,7 +5805,7 @@ type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = Xat
|
|
5663
5805
|
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> ? {
|
5664
5806
|
V: ValueAtColumn<Item, V>;
|
5665
5807
|
} : never : O[K] : never> : never : never;
|
5666
|
-
type MAX_RECURSION =
|
5808
|
+
type MAX_RECURSION = 2;
|
5667
5809
|
type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
|
5668
5810
|
[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
|
5669
5811
|
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
|
@@ -5699,6 +5841,14 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
|
|
5699
5841
|
* Get metadata of this record.
|
5700
5842
|
*/
|
5701
5843
|
getMetadata(): XataRecordMetadata;
|
5844
|
+
/**
|
5845
|
+
* Get an object representation of this record.
|
5846
|
+
*/
|
5847
|
+
toSerializable(): JSONData<OriginalRecord>;
|
5848
|
+
/**
|
5849
|
+
* Get a string representation of this record.
|
5850
|
+
*/
|
5851
|
+
toString(): string;
|
5702
5852
|
/**
|
5703
5853
|
* Retrieves a refreshed copy of the current record from the database.
|
5704
5854
|
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
@@ -5779,6 +5929,10 @@ type EditableDataFields<T> = T extends XataRecord ? {
|
|
5779
5929
|
type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
|
5780
5930
|
[K in keyof O]: EditableDataFields<O[K]>;
|
5781
5931
|
}, keyof XataRecord>>;
|
5932
|
+
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;
|
5933
|
+
type JSONData<O> = Identifiable & Partial<Omit<{
|
5934
|
+
[K in keyof O]: JSONDataFields<O[K]>;
|
5935
|
+
}, keyof XataRecord>>;
|
5782
5936
|
|
5783
5937
|
/**
|
5784
5938
|
* PropertyMatchFilter
|
@@ -6212,6 +6366,7 @@ type SummarizeParams<Record extends XataRecord, Expression extends Dictionary<Su
|
|
6212
6366
|
pagination?: {
|
6213
6367
|
size: number;
|
6214
6368
|
};
|
6369
|
+
consistency?: 'strong' | 'eventual';
|
6215
6370
|
};
|
6216
6371
|
type SummarizeResult<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
|
6217
6372
|
summaries: SummarizeResultItem<Record, Expression, Columns>[];
|
@@ -6579,6 +6734,8 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
|
|
6579
6734
|
constructor(page: Paginable<any, Result>, overrideRecords?: Result[]);
|
6580
6735
|
static parseConstructorParams(...args: any[]): any[];
|
6581
6736
|
toArray(): Result[];
|
6737
|
+
toSerializable(): JSONData<Result>[];
|
6738
|
+
toString(): string;
|
6582
6739
|
map<U>(callbackfn: (value: Result, index: number, array: Result[]) => U, thisArg?: any): U[];
|
6583
6740
|
/**
|
6584
6741
|
* Retrieve next page of records
|
@@ -7506,6 +7663,7 @@ type BaseClientOptions = {
|
|
7506
7663
|
trace?: TraceFunction;
|
7507
7664
|
enableBrowser?: boolean;
|
7508
7665
|
clientName?: string;
|
7666
|
+
xataAgentExtra?: Record<string, string>;
|
7509
7667
|
};
|
7510
7668
|
declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
|
7511
7669
|
interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
@@ -7547,6 +7705,7 @@ type BranchResolutionOptions = {
|
|
7547
7705
|
apiKey?: string;
|
7548
7706
|
fetchImpl?: FetchImpl;
|
7549
7707
|
clientName?: string;
|
7708
|
+
xataAgentExtra?: Record<string, string>;
|
7550
7709
|
};
|
7551
7710
|
declare function getCurrentBranchName(options?: BranchResolutionOptions): Promise<string>;
|
7552
7711
|
declare function getCurrentBranchDetails(options?: BranchResolutionOptions): Promise<DBBranch | null>;
|
@@ -7639,4 +7798,4 @@ declare class XataError extends Error {
|
|
7639
7798
|
constructor(message: string, status: number);
|
7640
7799
|
}
|
7641
7800
|
|
7642
|
-
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, 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, 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, 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, SerializedString, 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, 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 };
|
7801
|
+
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, CompareBranchSchemasRequestBody, 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, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabaseGithubSettingsError, DeleteDatabaseGithubSettingsPathParams, DeleteDatabaseGithubSettingsVariables, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, DeserializedType, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherError, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseGithubSettingsError, GetDatabaseGithubSettingsPathParams, GetDatabaseGithubSettingsVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, 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, SerializedString, Serializer, SerializerResult, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, 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, 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, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseGithubSettings, 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, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|