@xata.io/client 0.0.0-alpha.ve914594 → 0.0.0-alpha.ve91fd39
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 +78 -0
- package/README.md +3 -269
- package/dist/index.cjs +589 -237
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1566 -926
- package/dist/index.mjs +578 -235
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -8
- package/Usage.md +0 -451
package/dist/index.d.ts
CHANGED
|
@@ -22,21 +22,20 @@ declare class SimpleCache implements CacheImpl {
|
|
|
22
22
|
clear(): Promise<void>;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
declare abstract class XataPlugin {
|
|
26
|
+
abstract build(options: XataPluginOptions): unknown;
|
|
27
|
+
}
|
|
28
|
+
type XataPluginOptions = ApiExtraProps & {
|
|
29
|
+
cache: CacheImpl;
|
|
30
|
+
host: HostProvider;
|
|
31
|
+
};
|
|
32
|
+
|
|
25
33
|
type AttributeDictionary = Record<string, string | number | boolean | undefined>;
|
|
26
34
|
type TraceFunction = <T>(name: string, fn: (options: {
|
|
27
35
|
name?: string;
|
|
28
36
|
setAttributes: (attrs: AttributeDictionary) => void;
|
|
29
37
|
}) => T, options?: AttributeDictionary) => Promise<T>;
|
|
30
38
|
|
|
31
|
-
declare abstract class XataPlugin {
|
|
32
|
-
abstract build(options: XataPluginOptions): unknown | Promise<unknown>;
|
|
33
|
-
}
|
|
34
|
-
type XataPluginOptions = {
|
|
35
|
-
getFetchProps: () => Promise<ApiExtraProps>;
|
|
36
|
-
cache: CacheImpl;
|
|
37
|
-
trace?: TraceFunction;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
39
|
type RequestInit = {
|
|
41
40
|
body?: string;
|
|
42
41
|
headers?: Record<string, string>;
|
|
@@ -73,26 +72,28 @@ type FetcherExtraProps = {
|
|
|
73
72
|
endpoint: 'controlPlane' | 'dataPlane';
|
|
74
73
|
apiUrl: string;
|
|
75
74
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
|
76
|
-
|
|
75
|
+
fetch: FetchImpl;
|
|
77
76
|
apiKey: string;
|
|
78
77
|
trace: TraceFunction;
|
|
79
78
|
signal?: AbortSignal;
|
|
80
79
|
clientID?: string;
|
|
81
80
|
sessionID?: string;
|
|
82
81
|
clientName?: string;
|
|
82
|
+
xataAgentExtra?: Record<string, string>;
|
|
83
83
|
fetchOptions?: Record<string, unknown>;
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
type ControlPlaneFetcherExtraProps = {
|
|
87
87
|
apiUrl: string;
|
|
88
88
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
|
89
|
-
|
|
89
|
+
fetch: FetchImpl;
|
|
90
90
|
apiKey: string;
|
|
91
91
|
trace: TraceFunction;
|
|
92
92
|
signal?: AbortSignal;
|
|
93
93
|
clientID?: string;
|
|
94
94
|
sessionID?: string;
|
|
95
95
|
clientName?: string;
|
|
96
|
+
xataAgentExtra?: Record<string, string>;
|
|
96
97
|
};
|
|
97
98
|
type ErrorWrapper$1<TError> = TError | {
|
|
98
99
|
status: 'unknown';
|
|
@@ -215,6 +216,18 @@ type ListDatabasesResponse = {
|
|
|
215
216
|
*/
|
|
216
217
|
databases: DatabaseMetadata[];
|
|
217
218
|
};
|
|
219
|
+
/**
|
|
220
|
+
* @maxLength 255
|
|
221
|
+
* @minLength 1
|
|
222
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
|
223
|
+
*/
|
|
224
|
+
type DBName$1 = string;
|
|
225
|
+
/**
|
|
226
|
+
* @maxLength 255
|
|
227
|
+
* @minLength 1
|
|
228
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
|
229
|
+
*/
|
|
230
|
+
type BranchName$1 = string;
|
|
218
231
|
/**
|
|
219
232
|
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
|
|
220
233
|
* @x-go-type xata.BranchMetadata
|
|
@@ -231,38 +244,35 @@ type BranchMetadata$1 = {
|
|
|
231
244
|
stage?: string;
|
|
232
245
|
labels?: string[];
|
|
233
246
|
};
|
|
247
|
+
type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
|
|
234
248
|
/**
|
|
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_\-~]+
|
|
249
|
+
* Github repository settings for this database (optional)
|
|
244
250
|
*/
|
|
245
|
-
type
|
|
246
|
-
type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
|
|
247
|
-
type ListRegionsResponse = {
|
|
251
|
+
type DatabaseGithubSettings = {
|
|
248
252
|
/**
|
|
249
|
-
*
|
|
253
|
+
* Repository owner (user or organization)
|
|
250
254
|
*/
|
|
251
|
-
|
|
255
|
+
owner: string;
|
|
256
|
+
/**
|
|
257
|
+
* Repository name
|
|
258
|
+
*/
|
|
259
|
+
repo: string;
|
|
252
260
|
};
|
|
253
261
|
type Region = {
|
|
254
262
|
id: string;
|
|
255
263
|
};
|
|
264
|
+
type ListRegionsResponse = {
|
|
265
|
+
/**
|
|
266
|
+
* A list of regions where databases can be created
|
|
267
|
+
*/
|
|
268
|
+
regions: Region[];
|
|
269
|
+
};
|
|
256
270
|
|
|
257
271
|
/**
|
|
258
272
|
* Generated by @openapi-codegen
|
|
259
273
|
*
|
|
260
274
|
* @version 1.0
|
|
261
275
|
*/
|
|
262
|
-
type SimpleError$1 = {
|
|
263
|
-
id?: string;
|
|
264
|
-
message: string;
|
|
265
|
-
};
|
|
266
276
|
type BadRequestError$1 = {
|
|
267
277
|
id?: string;
|
|
268
278
|
message: string;
|
|
@@ -274,6 +284,10 @@ type AuthError$1 = {
|
|
|
274
284
|
id?: string;
|
|
275
285
|
message: string;
|
|
276
286
|
};
|
|
287
|
+
type SimpleError$1 = {
|
|
288
|
+
id?: string;
|
|
289
|
+
message: string;
|
|
290
|
+
};
|
|
277
291
|
|
|
278
292
|
/**
|
|
279
293
|
* Generated by @openapi-codegen
|
|
@@ -809,6 +823,12 @@ type CreateDatabaseError = ErrorWrapper$1<{
|
|
|
809
823
|
} | {
|
|
810
824
|
status: 401;
|
|
811
825
|
payload: AuthError$1;
|
|
826
|
+
} | {
|
|
827
|
+
status: 422;
|
|
828
|
+
payload: SimpleError$1;
|
|
829
|
+
} | {
|
|
830
|
+
status: 423;
|
|
831
|
+
payload: SimpleError$1;
|
|
812
832
|
}>;
|
|
813
833
|
type CreateDatabaseResponse = {
|
|
814
834
|
/**
|
|
@@ -933,6 +953,91 @@ type UpdateDatabaseMetadataVariables = {
|
|
|
933
953
|
* Update the color of the selected database
|
|
934
954
|
*/
|
|
935
955
|
declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
|
|
956
|
+
type GetDatabaseGithubSettingsPathParams = {
|
|
957
|
+
/**
|
|
958
|
+
* Workspace ID
|
|
959
|
+
*/
|
|
960
|
+
workspaceId: WorkspaceID;
|
|
961
|
+
/**
|
|
962
|
+
* The Database Name
|
|
963
|
+
*/
|
|
964
|
+
dbName: DBName$1;
|
|
965
|
+
};
|
|
966
|
+
type GetDatabaseGithubSettingsError = ErrorWrapper$1<{
|
|
967
|
+
status: 400;
|
|
968
|
+
payload: BadRequestError$1;
|
|
969
|
+
} | {
|
|
970
|
+
status: 401;
|
|
971
|
+
payload: AuthError$1;
|
|
972
|
+
} | {
|
|
973
|
+
status: 404;
|
|
974
|
+
payload: SimpleError$1;
|
|
975
|
+
}>;
|
|
976
|
+
type GetDatabaseGithubSettingsVariables = {
|
|
977
|
+
pathParams: GetDatabaseGithubSettingsPathParams;
|
|
978
|
+
} & ControlPlaneFetcherExtraProps;
|
|
979
|
+
/**
|
|
980
|
+
* Retrieve current Github database settings
|
|
981
|
+
*/
|
|
982
|
+
declare const getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<DatabaseGithubSettings>;
|
|
983
|
+
type UpdateDatabaseGithubSettingsPathParams = {
|
|
984
|
+
/**
|
|
985
|
+
* Workspace ID
|
|
986
|
+
*/
|
|
987
|
+
workspaceId: WorkspaceID;
|
|
988
|
+
/**
|
|
989
|
+
* The Database Name
|
|
990
|
+
*/
|
|
991
|
+
dbName: DBName$1;
|
|
992
|
+
};
|
|
993
|
+
type UpdateDatabaseGithubSettingsError = ErrorWrapper$1<{
|
|
994
|
+
status: 400;
|
|
995
|
+
payload: BadRequestError$1;
|
|
996
|
+
} | {
|
|
997
|
+
status: 401;
|
|
998
|
+
payload: AuthError$1;
|
|
999
|
+
} | {
|
|
1000
|
+
status: 422;
|
|
1001
|
+
payload: SimpleError$1;
|
|
1002
|
+
} | {
|
|
1003
|
+
status: 423;
|
|
1004
|
+
payload: SimpleError$1;
|
|
1005
|
+
}>;
|
|
1006
|
+
type UpdateDatabaseGithubSettingsVariables = {
|
|
1007
|
+
body: DatabaseGithubSettings;
|
|
1008
|
+
pathParams: UpdateDatabaseGithubSettingsPathParams;
|
|
1009
|
+
} & ControlPlaneFetcherExtraProps;
|
|
1010
|
+
/**
|
|
1011
|
+
* Map the database to a Github repository, Xata will create database branch previews for all new branches/PRs in the repo.
|
|
1012
|
+
*/
|
|
1013
|
+
declare const updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<DatabaseGithubSettings>;
|
|
1014
|
+
type DeleteDatabaseGithubSettingsPathParams = {
|
|
1015
|
+
/**
|
|
1016
|
+
* Workspace ID
|
|
1017
|
+
*/
|
|
1018
|
+
workspaceId: WorkspaceID;
|
|
1019
|
+
/**
|
|
1020
|
+
* The Database Name
|
|
1021
|
+
*/
|
|
1022
|
+
dbName: DBName$1;
|
|
1023
|
+
};
|
|
1024
|
+
type DeleteDatabaseGithubSettingsError = ErrorWrapper$1<{
|
|
1025
|
+
status: 400;
|
|
1026
|
+
payload: BadRequestError$1;
|
|
1027
|
+
} | {
|
|
1028
|
+
status: 401;
|
|
1029
|
+
payload: AuthError$1;
|
|
1030
|
+
} | {
|
|
1031
|
+
status: 404;
|
|
1032
|
+
payload: SimpleError$1;
|
|
1033
|
+
}>;
|
|
1034
|
+
type DeleteDatabaseGithubSettingsVariables = {
|
|
1035
|
+
pathParams: DeleteDatabaseGithubSettingsPathParams;
|
|
1036
|
+
} & ControlPlaneFetcherExtraProps;
|
|
1037
|
+
/**
|
|
1038
|
+
* Delete any existing database Github settings
|
|
1039
|
+
*/
|
|
1040
|
+
declare const deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal) => Promise<undefined>;
|
|
936
1041
|
type ListRegionsPathParams = {
|
|
937
1042
|
/**
|
|
938
1043
|
* Workspace ID
|
|
@@ -959,20 +1064,39 @@ declare const listRegions: (variables: ListRegionsVariables, signal?: AbortSigna
|
|
|
959
1064
|
*
|
|
960
1065
|
* @version 1.0
|
|
961
1066
|
*/
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1067
|
+
/**
|
|
1068
|
+
* @maxLength 255
|
|
1069
|
+
* @minLength 1
|
|
1070
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
|
1071
|
+
*/
|
|
1072
|
+
type DBName = string;
|
|
1073
|
+
/**
|
|
1074
|
+
* @format date-time
|
|
1075
|
+
* @x-go-type string
|
|
1076
|
+
*/
|
|
1077
|
+
type DateTime = string;
|
|
972
1078
|
type Branch = {
|
|
973
1079
|
name: string;
|
|
974
1080
|
createdAt: DateTime;
|
|
975
1081
|
};
|
|
1082
|
+
type ListBranchesResponse = {
|
|
1083
|
+
databaseName: string;
|
|
1084
|
+
branches: Branch[];
|
|
1085
|
+
};
|
|
1086
|
+
/**
|
|
1087
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
1088
|
+
*
|
|
1089
|
+
* @maxLength 511
|
|
1090
|
+
* @minLength 1
|
|
1091
|
+
* @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
|
|
1092
|
+
*/
|
|
1093
|
+
type DBBranchName = string;
|
|
1094
|
+
/**
|
|
1095
|
+
* @maxLength 255
|
|
1096
|
+
* @minLength 1
|
|
1097
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
|
1098
|
+
*/
|
|
1099
|
+
type BranchName = string;
|
|
976
1100
|
/**
|
|
977
1101
|
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
|
|
978
1102
|
* @x-go-type xata.BranchMetadata
|
|
@@ -989,86 +1113,71 @@ type BranchMetadata = {
|
|
|
989
1113
|
stage?: string;
|
|
990
1114
|
labels?: string[];
|
|
991
1115
|
};
|
|
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
1116
|
type StartedFromMetadata = {
|
|
1004
1117
|
branchName: BranchName;
|
|
1005
1118
|
dbBranchID: string;
|
|
1006
1119
|
migrationID: string;
|
|
1007
1120
|
};
|
|
1008
1121
|
/**
|
|
1009
|
-
* @
|
|
1122
|
+
* @maxLength 255
|
|
1123
|
+
* @minLength 1
|
|
1124
|
+
* @pattern [a-zA-Z0-9_\-~]+
|
|
1010
1125
|
*/
|
|
1011
|
-
type
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
};
|
|
1015
|
-
type SchemaEditScript = {
|
|
1016
|
-
sourceMigrationID?: string;
|
|
1017
|
-
targetMigrationID?: string;
|
|
1018
|
-
operations: MigrationOp[];
|
|
1126
|
+
type TableName = string;
|
|
1127
|
+
type ColumnLink = {
|
|
1128
|
+
table: string;
|
|
1019
1129
|
};
|
|
1020
|
-
type
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1130
|
+
type ColumnVector = {
|
|
1131
|
+
/**
|
|
1132
|
+
* @maximum 10000
|
|
1133
|
+
* @minimum 2
|
|
1134
|
+
*/
|
|
1135
|
+
dimension: number;
|
|
1025
1136
|
};
|
|
1026
1137
|
type Column = {
|
|
1027
1138
|
name: string;
|
|
1028
|
-
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime';
|
|
1139
|
+
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime' | 'vector' | 'file[]' | 'file' | 'image[]' | 'image';
|
|
1029
1140
|
link?: ColumnLink;
|
|
1141
|
+
vector?: ColumnVector;
|
|
1030
1142
|
notNull?: boolean;
|
|
1031
1143
|
defaultValue?: string;
|
|
1032
1144
|
unique?: boolean;
|
|
1033
1145
|
columns?: Column[];
|
|
1034
1146
|
};
|
|
1035
|
-
type ColumnLink = {
|
|
1036
|
-
table: string;
|
|
1037
|
-
};
|
|
1038
1147
|
type RevLink = {
|
|
1039
1148
|
linkID: string;
|
|
1040
1149
|
table: string;
|
|
1041
1150
|
};
|
|
1151
|
+
type Table = {
|
|
1152
|
+
id?: string;
|
|
1153
|
+
name: TableName;
|
|
1154
|
+
columns: Column[];
|
|
1155
|
+
revLinks?: RevLink[];
|
|
1156
|
+
};
|
|
1042
1157
|
/**
|
|
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_\-~\.]+
|
|
1158
|
+
* @x-go-type xata.Schema
|
|
1070
1159
|
*/
|
|
1071
|
-
type
|
|
1160
|
+
type Schema = {
|
|
1161
|
+
tables: Table[];
|
|
1162
|
+
tablesOrder?: string[];
|
|
1163
|
+
};
|
|
1164
|
+
type DBBranch = {
|
|
1165
|
+
databaseName: DBName;
|
|
1166
|
+
branchName: BranchName;
|
|
1167
|
+
createdAt: DateTime;
|
|
1168
|
+
id: string;
|
|
1169
|
+
version: number;
|
|
1170
|
+
lastMigrationID: string;
|
|
1171
|
+
metadata?: BranchMetadata;
|
|
1172
|
+
startedFrom?: StartedFromMetadata;
|
|
1173
|
+
schema: Schema;
|
|
1174
|
+
};
|
|
1175
|
+
type MigrationStatus = 'completed' | 'pending' | 'failed';
|
|
1176
|
+
type BranchWithCopyID = {
|
|
1177
|
+
branchName: BranchName;
|
|
1178
|
+
dbBranchID: string;
|
|
1179
|
+
copyID: string;
|
|
1180
|
+
};
|
|
1072
1181
|
type MetricsDatapoint = {
|
|
1073
1182
|
timestamp: string;
|
|
1074
1183
|
value: number;
|
|
@@ -1077,9 +1186,40 @@ type MetricsLatency = {
|
|
|
1077
1186
|
p50?: MetricsDatapoint[];
|
|
1078
1187
|
p90?: MetricsDatapoint[];
|
|
1079
1188
|
};
|
|
1080
|
-
type
|
|
1081
|
-
|
|
1082
|
-
|
|
1189
|
+
type ListGitBranchesResponse = {
|
|
1190
|
+
mapping: {
|
|
1191
|
+
gitBranch: string;
|
|
1192
|
+
xataBranch: string;
|
|
1193
|
+
}[];
|
|
1194
|
+
};
|
|
1195
|
+
type ColumnMigration = {
|
|
1196
|
+
old: Column;
|
|
1197
|
+
['new']: Column;
|
|
1198
|
+
};
|
|
1199
|
+
type TableMigration = {
|
|
1200
|
+
newColumns?: {
|
|
1201
|
+
[key: string]: Column;
|
|
1202
|
+
};
|
|
1203
|
+
removedColumns?: string[];
|
|
1204
|
+
modifiedColumns?: ColumnMigration[];
|
|
1205
|
+
newColumnOrder: string[];
|
|
1206
|
+
};
|
|
1207
|
+
/**
|
|
1208
|
+
* @example {"newName":"newName","oldName":"oldName"}
|
|
1209
|
+
*/
|
|
1210
|
+
type TableRename = {
|
|
1211
|
+
/**
|
|
1212
|
+
* @minLength 1
|
|
1213
|
+
*/
|
|
1214
|
+
newName: string;
|
|
1215
|
+
/**
|
|
1216
|
+
* @minLength 1
|
|
1217
|
+
*/
|
|
1218
|
+
oldName: string;
|
|
1219
|
+
};
|
|
1220
|
+
type BranchMigration = {
|
|
1221
|
+
id?: string;
|
|
1222
|
+
parentID?: string;
|
|
1083
1223
|
status: string;
|
|
1084
1224
|
title?: string;
|
|
1085
1225
|
lastGitRevision?: string;
|
|
@@ -1095,78 +1235,109 @@ type BranchMigration = {
|
|
|
1095
1235
|
newTableOrder: string[];
|
|
1096
1236
|
renamedTables?: TableRename[];
|
|
1097
1237
|
};
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1238
|
+
/**
|
|
1239
|
+
* @minProperties 1
|
|
1240
|
+
*/
|
|
1241
|
+
type FilterExpression = {
|
|
1242
|
+
$exists?: string;
|
|
1243
|
+
$existsNot?: string;
|
|
1244
|
+
$any?: FilterList;
|
|
1245
|
+
$all?: FilterList;
|
|
1246
|
+
$none?: FilterList;
|
|
1247
|
+
$not?: FilterList;
|
|
1248
|
+
} & {
|
|
1249
|
+
[key: string]: FilterColumn;
|
|
1109
1250
|
};
|
|
1110
|
-
type
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1251
|
+
type FilterList = FilterExpression | FilterExpression[];
|
|
1252
|
+
type FilterValue = number | string | boolean;
|
|
1253
|
+
type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
|
|
1254
|
+
type FilterRangeValue = number | string;
|
|
1255
|
+
/**
|
|
1256
|
+
* @maxProperties 1
|
|
1257
|
+
* @minProperties 1
|
|
1258
|
+
*/
|
|
1259
|
+
type FilterPredicateOp = {
|
|
1260
|
+
$any?: FilterPredicate[];
|
|
1261
|
+
$all?: FilterPredicate[];
|
|
1262
|
+
$none?: FilterPredicate | FilterPredicate[];
|
|
1263
|
+
$not?: FilterPredicate | FilterPredicate[];
|
|
1264
|
+
$is?: FilterValue | FilterValue[];
|
|
1265
|
+
$isNot?: FilterValue | FilterValue[];
|
|
1266
|
+
$lt?: FilterRangeValue;
|
|
1267
|
+
$le?: FilterRangeValue;
|
|
1268
|
+
$gt?: FilterRangeValue;
|
|
1269
|
+
$ge?: FilterRangeValue;
|
|
1270
|
+
$contains?: string;
|
|
1271
|
+
$startsWith?: string;
|
|
1272
|
+
$endsWith?: string;
|
|
1273
|
+
$pattern?: string;
|
|
1120
1274
|
};
|
|
1121
|
-
type MigrationStatus = 'completed' | 'pending' | 'failed';
|
|
1122
1275
|
/**
|
|
1123
|
-
*
|
|
1276
|
+
* @maxProperties 2
|
|
1277
|
+
* @minProperties 2
|
|
1124
1278
|
*/
|
|
1125
|
-
type
|
|
1126
|
-
|
|
1127
|
-
|
|
1279
|
+
type FilterPredicateRangeOp = {
|
|
1280
|
+
$lt?: FilterRangeValue;
|
|
1281
|
+
$le?: FilterRangeValue;
|
|
1282
|
+
$gt?: FilterRangeValue;
|
|
1283
|
+
$ge?: FilterRangeValue;
|
|
1128
1284
|
};
|
|
1129
1285
|
/**
|
|
1130
|
-
*
|
|
1286
|
+
* @maxProperties 1
|
|
1287
|
+
* @minProperties 1
|
|
1131
1288
|
*/
|
|
1132
|
-
type
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
} | {
|
|
1138
|
-
renameTable: TableOpRename;
|
|
1289
|
+
type FilterColumnIncludes = {
|
|
1290
|
+
$includes?: FilterPredicate;
|
|
1291
|
+
$includesAny?: FilterPredicate;
|
|
1292
|
+
$includesAll?: FilterPredicate;
|
|
1293
|
+
$includesNone?: FilterPredicate;
|
|
1139
1294
|
};
|
|
1140
|
-
type
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1295
|
+
type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
|
|
1296
|
+
type SortOrder = 'asc' | 'desc';
|
|
1297
|
+
type SortExpression = string[] | {
|
|
1298
|
+
[key: string]: SortOrder;
|
|
1144
1299
|
} | {
|
|
1145
|
-
|
|
1146
|
-
};
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
type
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1300
|
+
[key: string]: SortOrder;
|
|
1301
|
+
}[];
|
|
1302
|
+
/**
|
|
1303
|
+
* Pagination settings.
|
|
1304
|
+
*/
|
|
1305
|
+
type PageConfig = {
|
|
1306
|
+
/**
|
|
1307
|
+
* Query the next page that follow the cursor.
|
|
1308
|
+
*/
|
|
1309
|
+
after?: string;
|
|
1310
|
+
/**
|
|
1311
|
+
* Query the previous page before the cursor.
|
|
1312
|
+
*/
|
|
1313
|
+
before?: string;
|
|
1314
|
+
/**
|
|
1315
|
+
* Query the first page from the cursor.
|
|
1316
|
+
*/
|
|
1317
|
+
start?: string;
|
|
1318
|
+
/**
|
|
1319
|
+
* Query the last page from the cursor.
|
|
1320
|
+
*/
|
|
1321
|
+
end?: string;
|
|
1322
|
+
/**
|
|
1323
|
+
* 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.
|
|
1324
|
+
*
|
|
1325
|
+
* @default 20
|
|
1326
|
+
*/
|
|
1327
|
+
size?: number;
|
|
1328
|
+
/**
|
|
1329
|
+
* Use offset to skip entries. To skip pages set offset to a multiple of size.
|
|
1330
|
+
*
|
|
1331
|
+
* @default 0
|
|
1332
|
+
*/
|
|
1333
|
+
offset?: number;
|
|
1169
1334
|
};
|
|
1335
|
+
/**
|
|
1336
|
+
* @example name
|
|
1337
|
+
* @example email
|
|
1338
|
+
* @example created_at
|
|
1339
|
+
*/
|
|
1340
|
+
type ColumnsProjection = string[];
|
|
1170
1341
|
/**
|
|
1171
1342
|
* The migration request number.
|
|
1172
1343
|
*
|
|
@@ -1210,303 +1381,384 @@ type MigrationRequest = {
|
|
|
1210
1381
|
*/
|
|
1211
1382
|
target?: string;
|
|
1212
1383
|
};
|
|
1213
|
-
type SortExpression = string[] | {
|
|
1214
|
-
[key: string]: SortOrder;
|
|
1215
|
-
} | {
|
|
1216
|
-
[key: string]: SortOrder;
|
|
1217
|
-
}[];
|
|
1218
|
-
type SortOrder = 'asc' | 'desc';
|
|
1219
1384
|
/**
|
|
1220
|
-
*
|
|
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
|
|
1385
|
+
* Records metadata
|
|
1228
1386
|
*/
|
|
1229
|
-
type
|
|
1387
|
+
type RecordsMetadata = {
|
|
1388
|
+
page: {
|
|
1389
|
+
/**
|
|
1390
|
+
* last record id
|
|
1391
|
+
*/
|
|
1392
|
+
cursor: string;
|
|
1393
|
+
/**
|
|
1394
|
+
* true if more records can be fetch
|
|
1395
|
+
*/
|
|
1396
|
+
more: boolean;
|
|
1397
|
+
};
|
|
1398
|
+
};
|
|
1399
|
+
type TableOpAdd = {
|
|
1400
|
+
table: string;
|
|
1401
|
+
};
|
|
1402
|
+
type TableOpRemove = {
|
|
1403
|
+
table: string;
|
|
1404
|
+
};
|
|
1405
|
+
type TableOpRename = {
|
|
1406
|
+
oldName: string;
|
|
1407
|
+
newName: string;
|
|
1408
|
+
};
|
|
1409
|
+
type MigrationTableOp = {
|
|
1410
|
+
addTable: TableOpAdd;
|
|
1411
|
+
} | {
|
|
1412
|
+
removeTable: TableOpRemove;
|
|
1413
|
+
} | {
|
|
1414
|
+
renameTable: TableOpRename;
|
|
1415
|
+
};
|
|
1416
|
+
type ColumnOpAdd = {
|
|
1417
|
+
table: string;
|
|
1418
|
+
column: Column;
|
|
1419
|
+
};
|
|
1420
|
+
type ColumnOpRemove = {
|
|
1421
|
+
table: string;
|
|
1422
|
+
column: string;
|
|
1423
|
+
};
|
|
1424
|
+
type ColumnOpRename = {
|
|
1425
|
+
table: string;
|
|
1426
|
+
oldName: string;
|
|
1427
|
+
newName: string;
|
|
1428
|
+
};
|
|
1429
|
+
type MigrationColumnOp = {
|
|
1430
|
+
addColumn: ColumnOpAdd;
|
|
1431
|
+
} | {
|
|
1432
|
+
removeColumn: ColumnOpRemove;
|
|
1433
|
+
} | {
|
|
1434
|
+
renameColumn: ColumnOpRename;
|
|
1435
|
+
};
|
|
1230
1436
|
/**
|
|
1231
|
-
*
|
|
1437
|
+
* Branch schema migration operations.
|
|
1232
1438
|
*/
|
|
1233
|
-
type
|
|
1439
|
+
type MigrationOp = MigrationTableOp | MigrationColumnOp;
|
|
1440
|
+
type Commit = {
|
|
1441
|
+
title?: string;
|
|
1442
|
+
message?: string;
|
|
1443
|
+
id: string;
|
|
1444
|
+
parentID?: string;
|
|
1445
|
+
checksum?: string;
|
|
1446
|
+
mergeParentID?: string;
|
|
1447
|
+
createdAt: DateTime;
|
|
1448
|
+
operations: MigrationOp[];
|
|
1449
|
+
};
|
|
1450
|
+
type SchemaEditScript = {
|
|
1451
|
+
sourceMigrationID?: string;
|
|
1452
|
+
targetMigrationID?: string;
|
|
1453
|
+
operations: MigrationOp[];
|
|
1454
|
+
};
|
|
1455
|
+
type BranchOp = {
|
|
1456
|
+
id: string;
|
|
1457
|
+
parentID?: string;
|
|
1458
|
+
title?: string;
|
|
1459
|
+
message?: string;
|
|
1460
|
+
status: MigrationStatus;
|
|
1461
|
+
createdAt: DateTime;
|
|
1462
|
+
modifiedAt?: DateTime;
|
|
1463
|
+
migration?: Commit;
|
|
1464
|
+
};
|
|
1234
1465
|
/**
|
|
1235
|
-
*
|
|
1466
|
+
* Branch schema migration.
|
|
1236
1467
|
*/
|
|
1237
|
-
type
|
|
1468
|
+
type Migration = {
|
|
1469
|
+
parentID?: string;
|
|
1470
|
+
operations: MigrationOp[];
|
|
1471
|
+
};
|
|
1472
|
+
type MigrationObject = {
|
|
1473
|
+
title?: string;
|
|
1474
|
+
message?: string;
|
|
1475
|
+
id: string;
|
|
1476
|
+
parentID?: string;
|
|
1477
|
+
checksum?: string;
|
|
1478
|
+
operations: MigrationOp[];
|
|
1479
|
+
};
|
|
1480
|
+
/**
|
|
1481
|
+
* @pattern [a-zA-Z0-9_\-~\.]+
|
|
1482
|
+
*/
|
|
1483
|
+
type ColumnName = string;
|
|
1484
|
+
/**
|
|
1485
|
+
* Insert operation
|
|
1486
|
+
*/
|
|
1487
|
+
type TransactionInsertOp = {
|
|
1238
1488
|
/**
|
|
1239
|
-
* The name
|
|
1489
|
+
* The table name
|
|
1240
1490
|
*/
|
|
1241
|
-
|
|
1491
|
+
table: string;
|
|
1242
1492
|
/**
|
|
1243
|
-
* The
|
|
1493
|
+
* The record to insert. The `id` field is optional; when specified, it will be used as the ID for the record.
|
|
1494
|
+
*/
|
|
1495
|
+
record: {
|
|
1496
|
+
[key: string]: any;
|
|
1497
|
+
};
|
|
1498
|
+
/**
|
|
1499
|
+
* The version of the record you expect to be overwriting. Only valid with an
|
|
1500
|
+
* explicit ID is also set in the `record` key.
|
|
1501
|
+
*/
|
|
1502
|
+
ifVersion?: number;
|
|
1503
|
+
/**
|
|
1504
|
+
* createOnly is used to change how Xata acts when an explicit ID is set in the `record` key.
|
|
1244
1505
|
*
|
|
1245
|
-
*
|
|
1246
|
-
*
|
|
1247
|
-
*
|
|
1506
|
+
* If `createOnly` is set to `true`, Xata will only attempt to insert the record. If there's a conflict, Xata
|
|
1507
|
+
* will cancel the transaction.
|
|
1508
|
+
*
|
|
1509
|
+
* If `createOnly` is set to `false`, Xata will attempt to insert the record. If there's no
|
|
1510
|
+
* conflict, the record is inserted. If there is a conflict, Xata will replace the record.
|
|
1248
1511
|
*/
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
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;
|
|
1512
|
+
createOnly?: boolean;
|
|
1513
|
+
/**
|
|
1514
|
+
* If set, the call will return the requested fields as part of the response.
|
|
1515
|
+
*/
|
|
1516
|
+
columns?: string[];
|
|
1263
1517
|
};
|
|
1264
1518
|
/**
|
|
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
|
|
1519
|
+
* @maxLength 255
|
|
1520
|
+
* @minLength 1
|
|
1521
|
+
* @pattern [a-zA-Z0-9_-~:]+
|
|
1284
1522
|
*/
|
|
1285
|
-
type
|
|
1286
|
-
[key: string]: SummaryExpression;
|
|
1287
|
-
};
|
|
1523
|
+
type RecordID = string;
|
|
1288
1524
|
/**
|
|
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
|
|
1525
|
+
* Update operation
|
|
1321
1526
|
*/
|
|
1322
|
-
type
|
|
1527
|
+
type TransactionUpdateOp = {
|
|
1528
|
+
/**
|
|
1529
|
+
* The table name
|
|
1530
|
+
*/
|
|
1531
|
+
table: string;
|
|
1532
|
+
id: RecordID;
|
|
1533
|
+
/**
|
|
1534
|
+
* The fields of the record you'd like to update
|
|
1535
|
+
*/
|
|
1536
|
+
fields: {
|
|
1537
|
+
[key: string]: any;
|
|
1538
|
+
};
|
|
1539
|
+
/**
|
|
1540
|
+
* The version of the record you expect to be updating
|
|
1541
|
+
*/
|
|
1542
|
+
ifVersion?: number;
|
|
1543
|
+
/**
|
|
1544
|
+
* Xata will insert this record if it cannot be found.
|
|
1545
|
+
*/
|
|
1546
|
+
upsert?: boolean;
|
|
1547
|
+
/**
|
|
1548
|
+
* If set, the call will return the requested fields as part of the response.
|
|
1549
|
+
*/
|
|
1550
|
+
columns?: string[];
|
|
1551
|
+
};
|
|
1323
1552
|
/**
|
|
1324
|
-
* The
|
|
1325
|
-
*
|
|
1326
|
-
* @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d"},"aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}
|
|
1553
|
+
* A delete operation. The transaction will continue if no record matches the ID.
|
|
1327
1554
|
*/
|
|
1328
|
-
type
|
|
1329
|
-
|
|
1555
|
+
type TransactionDeleteOp = {
|
|
1556
|
+
/**
|
|
1557
|
+
* The table name
|
|
1558
|
+
*/
|
|
1559
|
+
table: string;
|
|
1560
|
+
id: RecordID;
|
|
1561
|
+
/**
|
|
1562
|
+
* If set, the call will return the requested fields as part of the response.
|
|
1563
|
+
*/
|
|
1564
|
+
columns?: string[];
|
|
1330
1565
|
};
|
|
1331
1566
|
/**
|
|
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
|
|
1567
|
+
* A transaction operation
|
|
1337
1568
|
*/
|
|
1338
|
-
type
|
|
1339
|
-
|
|
1340
|
-
} | {
|
|
1341
|
-
sum?: SumAgg;
|
|
1342
|
-
} | {
|
|
1343
|
-
max?: MaxAgg;
|
|
1344
|
-
} | {
|
|
1345
|
-
min?: MinAgg;
|
|
1346
|
-
} | {
|
|
1347
|
-
average?: AverageAgg;
|
|
1348
|
-
} | {
|
|
1349
|
-
uniqueCount?: UniqueCountAgg;
|
|
1350
|
-
} | {
|
|
1351
|
-
dateHistogram?: DateHistogramAgg;
|
|
1569
|
+
type TransactionOperation$1 = {
|
|
1570
|
+
insert: TransactionInsertOp;
|
|
1352
1571
|
} | {
|
|
1353
|
-
|
|
1572
|
+
update: TransactionUpdateOp;
|
|
1354
1573
|
} | {
|
|
1355
|
-
|
|
1574
|
+
['delete']: TransactionDeleteOp;
|
|
1356
1575
|
};
|
|
1357
1576
|
/**
|
|
1358
|
-
*
|
|
1577
|
+
* Fields to return in the transaction result.
|
|
1359
1578
|
*/
|
|
1360
|
-
type
|
|
1361
|
-
|
|
1362
|
-
}
|
|
1579
|
+
type TransactionResultColumns = {
|
|
1580
|
+
[key: string]: any;
|
|
1581
|
+
};
|
|
1363
1582
|
/**
|
|
1364
|
-
*
|
|
1583
|
+
* A result from an insert operation.
|
|
1365
1584
|
*/
|
|
1366
|
-
type
|
|
1585
|
+
type TransactionResultInsert = {
|
|
1367
1586
|
/**
|
|
1368
|
-
* The
|
|
1587
|
+
* The type of operation who's result is being returned.
|
|
1369
1588
|
*/
|
|
1370
|
-
|
|
1371
|
-
};
|
|
1372
|
-
/**
|
|
1373
|
-
* The max of the numeric values in a particular column.
|
|
1374
|
-
*/
|
|
1375
|
-
type MaxAgg = {
|
|
1589
|
+
operation: 'insert';
|
|
1376
1590
|
/**
|
|
1377
|
-
* The
|
|
1591
|
+
* The number of affected rows
|
|
1378
1592
|
*/
|
|
1379
|
-
|
|
1593
|
+
rows: number;
|
|
1594
|
+
id: RecordID;
|
|
1595
|
+
columns?: TransactionResultColumns;
|
|
1380
1596
|
};
|
|
1381
1597
|
/**
|
|
1382
|
-
*
|
|
1598
|
+
* A result from an update operation.
|
|
1383
1599
|
*/
|
|
1384
|
-
type
|
|
1600
|
+
type TransactionResultUpdate = {
|
|
1385
1601
|
/**
|
|
1386
|
-
* The
|
|
1602
|
+
* The type of operation who's result is being returned.
|
|
1387
1603
|
*/
|
|
1388
|
-
|
|
1389
|
-
};
|
|
1390
|
-
/**
|
|
1391
|
-
* The average of the numeric values in a particular column.
|
|
1392
|
-
*/
|
|
1393
|
-
type AverageAgg = {
|
|
1604
|
+
operation: 'update';
|
|
1394
1605
|
/**
|
|
1395
|
-
* The
|
|
1606
|
+
* The number of updated rows
|
|
1396
1607
|
*/
|
|
1397
|
-
|
|
1608
|
+
rows: number;
|
|
1609
|
+
id: RecordID;
|
|
1610
|
+
columns?: TransactionResultColumns;
|
|
1398
1611
|
};
|
|
1399
1612
|
/**
|
|
1400
|
-
*
|
|
1613
|
+
* A result from a delete operation.
|
|
1401
1614
|
*/
|
|
1402
|
-
type
|
|
1615
|
+
type TransactionResultDelete = {
|
|
1403
1616
|
/**
|
|
1404
|
-
* The
|
|
1617
|
+
* The type of operation who's result is being returned.
|
|
1405
1618
|
*/
|
|
1406
|
-
|
|
1619
|
+
operation: 'delete';
|
|
1407
1620
|
/**
|
|
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.
|
|
1621
|
+
* The number of deleted rows
|
|
1411
1622
|
*/
|
|
1412
|
-
|
|
1623
|
+
rows: number;
|
|
1624
|
+
columns?: TransactionResultColumns;
|
|
1413
1625
|
};
|
|
1414
1626
|
/**
|
|
1415
|
-
*
|
|
1627
|
+
* An ordered array of results from the submitted operations.
|
|
1416
1628
|
*/
|
|
1417
|
-
type
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
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;
|
|
1629
|
+
type TransactionSuccess = {
|
|
1630
|
+
results: (TransactionResultInsert | TransactionResultUpdate | TransactionResultDelete)[];
|
|
1631
|
+
};
|
|
1632
|
+
/**
|
|
1633
|
+
* An error message from a failing transaction operation
|
|
1634
|
+
*/
|
|
1635
|
+
type TransactionError = {
|
|
1429
1636
|
/**
|
|
1430
|
-
* The
|
|
1431
|
-
* `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
1637
|
+
* The index of the failing operation
|
|
1432
1638
|
*/
|
|
1433
|
-
|
|
1639
|
+
index: number;
|
|
1434
1640
|
/**
|
|
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$
|
|
1641
|
+
* The error message
|
|
1440
1642
|
*/
|
|
1441
|
-
|
|
1442
|
-
aggs?: AggExpressionMap;
|
|
1643
|
+
message: string;
|
|
1443
1644
|
};
|
|
1444
1645
|
/**
|
|
1445
|
-
*
|
|
1446
|
-
* The top values as ordered by the number of records (`$count`) are returned.
|
|
1646
|
+
* An array of errors, with indicides, from the transaction.
|
|
1447
1647
|
*/
|
|
1448
|
-
type
|
|
1648
|
+
type TransactionFailure = {
|
|
1449
1649
|
/**
|
|
1450
|
-
* The
|
|
1650
|
+
* The request ID.
|
|
1451
1651
|
*/
|
|
1452
|
-
|
|
1453
|
-
aggs?: AggExpressionMap;
|
|
1652
|
+
id: string;
|
|
1454
1653
|
/**
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1457
|
-
* @default 10
|
|
1458
|
-
* @maximum 1000
|
|
1654
|
+
* An array of errors from the submitted operations.
|
|
1459
1655
|
*/
|
|
1460
|
-
|
|
1656
|
+
errors: TransactionError[];
|
|
1461
1657
|
};
|
|
1462
1658
|
/**
|
|
1463
|
-
*
|
|
1659
|
+
* Object column value
|
|
1464
1660
|
*/
|
|
1465
|
-
type
|
|
1661
|
+
type ObjectValue = {
|
|
1662
|
+
[key: string]: string | boolean | number | string[] | number[] | DateTime | ObjectValue;
|
|
1663
|
+
};
|
|
1664
|
+
/**
|
|
1665
|
+
* Object representing a file
|
|
1666
|
+
*
|
|
1667
|
+
* @x-go-type file.InputFile
|
|
1668
|
+
*/
|
|
1669
|
+
type InputFileEntry = {
|
|
1466
1670
|
/**
|
|
1467
|
-
*
|
|
1671
|
+
* File name
|
|
1672
|
+
*
|
|
1673
|
+
* @maxLength 1024
|
|
1674
|
+
* @minLength 1
|
|
1675
|
+
* @pattern [0-9a-zA-Z!\-_\.\*'\(\)]+
|
|
1468
1676
|
*/
|
|
1469
|
-
|
|
1677
|
+
name: string;
|
|
1470
1678
|
/**
|
|
1471
|
-
*
|
|
1472
|
-
* with this value as size.
|
|
1679
|
+
* Media type
|
|
1473
1680
|
*
|
|
1474
|
-
* @
|
|
1681
|
+
* @maxLength 255
|
|
1682
|
+
* @minLength 3
|
|
1683
|
+
* @pattern ^\w+/[-+.\w]+$
|
|
1475
1684
|
*/
|
|
1476
|
-
|
|
1685
|
+
mediaType?: string;
|
|
1477
1686
|
/**
|
|
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.
|
|
1687
|
+
* Base64 encoded content
|
|
1482
1688
|
*
|
|
1483
|
-
* @
|
|
1689
|
+
* @maxLength 20971520
|
|
1484
1690
|
*/
|
|
1485
|
-
|
|
1486
|
-
aggs?: AggExpressionMap;
|
|
1487
|
-
};
|
|
1488
|
-
type HighlightExpression = {
|
|
1691
|
+
base64Content?: string;
|
|
1489
1692
|
/**
|
|
1490
|
-
*
|
|
1693
|
+
* Enable public access to the file
|
|
1491
1694
|
*/
|
|
1492
|
-
|
|
1695
|
+
enablePublicUrl?: boolean;
|
|
1493
1696
|
/**
|
|
1494
|
-
*
|
|
1697
|
+
* Time to live for signed URLs
|
|
1495
1698
|
*/
|
|
1496
|
-
|
|
1699
|
+
signedUrlTimeout?: number;
|
|
1497
1700
|
};
|
|
1498
1701
|
/**
|
|
1499
|
-
*
|
|
1702
|
+
* Array of file entries
|
|
1500
1703
|
*
|
|
1501
|
-
* @
|
|
1704
|
+
* @maxItems 50
|
|
1502
1705
|
*/
|
|
1503
|
-
type
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1706
|
+
type InputFileArray = InputFileEntry[];
|
|
1707
|
+
/**
|
|
1708
|
+
* Xata input record
|
|
1709
|
+
*/
|
|
1710
|
+
type DataInputRecord = {
|
|
1711
|
+
[key: string]: RecordID | string | boolean | number | string[] | number[] | DateTime | ObjectValue | InputFileArray | InputFileEntry | null;
|
|
1712
|
+
};
|
|
1713
|
+
/**
|
|
1714
|
+
* Xata Table Record Metadata
|
|
1715
|
+
*/
|
|
1716
|
+
type RecordMeta = {
|
|
1717
|
+
id: RecordID;
|
|
1718
|
+
xata: {
|
|
1719
|
+
/**
|
|
1720
|
+
* The record's version. Can be used for optimistic concurrency control.
|
|
1721
|
+
*/
|
|
1722
|
+
version: number;
|
|
1723
|
+
/**
|
|
1724
|
+
* The record's table name. APIs that return records from multiple tables will set this field accordingly.
|
|
1725
|
+
*/
|
|
1726
|
+
table?: string;
|
|
1727
|
+
/**
|
|
1728
|
+
* Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
|
|
1729
|
+
*/
|
|
1730
|
+
highlight?: {
|
|
1731
|
+
[key: string]: string[] | {
|
|
1732
|
+
[key: string]: any;
|
|
1733
|
+
};
|
|
1734
|
+
};
|
|
1735
|
+
/**
|
|
1736
|
+
* The record's relevancy score. This is returned by the search APIs.
|
|
1737
|
+
*/
|
|
1738
|
+
score?: number;
|
|
1739
|
+
/**
|
|
1740
|
+
* Encoding/Decoding errors
|
|
1741
|
+
*/
|
|
1742
|
+
warnings?: string[];
|
|
1743
|
+
};
|
|
1509
1744
|
};
|
|
1745
|
+
/**
|
|
1746
|
+
* The target expression is used to filter the search results by the target columns.
|
|
1747
|
+
*/
|
|
1748
|
+
type TargetExpression = (string | {
|
|
1749
|
+
/**
|
|
1750
|
+
* The name of the column.
|
|
1751
|
+
*/
|
|
1752
|
+
column: string;
|
|
1753
|
+
/**
|
|
1754
|
+
* The weight of the column.
|
|
1755
|
+
*
|
|
1756
|
+
* @default 1
|
|
1757
|
+
* @maximum 10
|
|
1758
|
+
* @minimum 1
|
|
1759
|
+
*/
|
|
1760
|
+
weight?: number;
|
|
1761
|
+
})[];
|
|
1510
1762
|
/**
|
|
1511
1763
|
* Boost records with a particular value for a column.
|
|
1512
1764
|
*/
|
|
@@ -1589,83 +1841,42 @@ type DateBooster$1 = {
|
|
|
1589
1841
|
*/
|
|
1590
1842
|
ifMatchesFilter?: FilterExpression;
|
|
1591
1843
|
};
|
|
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
1844
|
/**
|
|
1606
|
-
*
|
|
1607
|
-
*
|
|
1845
|
+
* Booster Expression
|
|
1846
|
+
*
|
|
1847
|
+
* @x-go-type xata.BoosterExpression
|
|
1608
1848
|
*/
|
|
1609
|
-
type
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
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;
|
|
1849
|
+
type BoosterExpression = {
|
|
1850
|
+
valueBooster?: ValueBooster$1;
|
|
1851
|
+
} | {
|
|
1852
|
+
numericBooster?: NumericBooster$1;
|
|
1853
|
+
} | {
|
|
1854
|
+
dateBooster?: DateBooster$1;
|
|
1624
1855
|
};
|
|
1625
1856
|
/**
|
|
1626
|
-
*
|
|
1627
|
-
*
|
|
1857
|
+
* Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
|
|
1858
|
+
* distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
|
|
1859
|
+
* character typos per word are tollerated by search. You can set it to 0 to remove the typo tollerance or set it to 2
|
|
1860
|
+
* to allow two typos in a word.
|
|
1861
|
+
*
|
|
1862
|
+
* @default 1
|
|
1863
|
+
* @maximum 2
|
|
1864
|
+
* @minimum 0
|
|
1628
1865
|
*/
|
|
1629
|
-
type
|
|
1630
|
-
$lt?: FilterRangeValue;
|
|
1631
|
-
$le?: FilterRangeValue;
|
|
1632
|
-
$gt?: FilterRangeValue;
|
|
1633
|
-
$ge?: FilterRangeValue;
|
|
1634
|
-
};
|
|
1635
|
-
type FilterRangeValue = number | string;
|
|
1636
|
-
type FilterValue = number | string | boolean;
|
|
1866
|
+
type FuzzinessExpression = number;
|
|
1637
1867
|
/**
|
|
1638
|
-
*
|
|
1868
|
+
* 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.
|
|
1639
1869
|
*/
|
|
1640
|
-
type
|
|
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;
|
|
1870
|
+
type PrefixExpression = 'phrase' | 'disabled';
|
|
1871
|
+
type HighlightExpression = {
|
|
1657
1872
|
/**
|
|
1658
|
-
* Set
|
|
1659
|
-
*
|
|
1660
|
-
* @default 20
|
|
1873
|
+
* Set to `false` to disable highlighting. By default it is `true`.
|
|
1661
1874
|
*/
|
|
1662
|
-
|
|
1875
|
+
enabled?: boolean;
|
|
1663
1876
|
/**
|
|
1664
|
-
*
|
|
1665
|
-
*
|
|
1666
|
-
* @default 0
|
|
1877
|
+
* Set to `false` to disable HTML encoding in highlight snippets. By default it is `true`.
|
|
1667
1878
|
*/
|
|
1668
|
-
|
|
1879
|
+
encodeHTML?: boolean;
|
|
1669
1880
|
};
|
|
1670
1881
|
/**
|
|
1671
1882
|
* Pagination settings for the search endpoints.
|
|
@@ -1687,218 +1898,232 @@ type SearchPageConfig = {
|
|
|
1687
1898
|
offset?: number;
|
|
1688
1899
|
};
|
|
1689
1900
|
/**
|
|
1690
|
-
*
|
|
1691
|
-
*
|
|
1692
|
-
*
|
|
1901
|
+
* A summary expression is the description of a single summary operation. It consists of a single
|
|
1902
|
+
* key representing the operation, and a value representing the column to be operated on.
|
|
1903
|
+
*
|
|
1904
|
+
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
|
1905
|
+
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
|
1906
|
+
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
|
1907
|
+
*
|
|
1908
|
+
* We currently support several aggregation functions. Not all functions can be run on all column
|
|
1909
|
+
* types.
|
|
1910
|
+
*
|
|
1911
|
+
* - `count` is used to count the number of records in each group. Use `{"count": "*"}` to count
|
|
1912
|
+
* all columns present, otherwise `{"count": "<column_path>"}` to count the number of non-null
|
|
1913
|
+
* values are present at column path.
|
|
1914
|
+
*
|
|
1915
|
+
* Count can be used on any column type, and always returns an int.
|
|
1916
|
+
*
|
|
1917
|
+
* - `min` calculates the minimum value in each group. `min` is compatible with most types;
|
|
1918
|
+
* string, multiple, text, email, int, float, and datetime. It returns a value of the same
|
|
1919
|
+
* type as operated on. This means that `{"lowest_latency": {"min": "latency"}}` where
|
|
1920
|
+
* `latency` is an int, will always return an int.
|
|
1921
|
+
*
|
|
1922
|
+
* - `max` calculates the maximum value in each group. `max` shares the same compatibility as
|
|
1923
|
+
* `min`.
|
|
1924
|
+
*
|
|
1925
|
+
* - `sum` adds up all values in a group. `sum` can be run on `int` and `float` types, and will
|
|
1926
|
+
* return a value of the same type as requested.
|
|
1927
|
+
*
|
|
1928
|
+
* - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
|
|
1929
|
+
* always returns a float.
|
|
1930
|
+
*
|
|
1931
|
+
* @example {"count":"deleted_at"}
|
|
1932
|
+
* @x-go-type xbquery.Summary
|
|
1693
1933
|
*/
|
|
1694
|
-
type
|
|
1934
|
+
type SummaryExpression = Record<string, any>;
|
|
1695
1935
|
/**
|
|
1696
|
-
*
|
|
1936
|
+
* The description of the summaries you wish to receive. Set each key to be the field name
|
|
1937
|
+
* you'd like for the summary. These names must not collide with other columns you've
|
|
1938
|
+
* requested from `columns`; including implicit requests like `settings.*`.
|
|
1939
|
+
*
|
|
1940
|
+
* The value for each key needs to be an object. This object should contain one key and one
|
|
1941
|
+
* value only. In this object, the key should be set to the summary function you wish to use
|
|
1942
|
+
* and the value set to the column name to be summarized.
|
|
1943
|
+
*
|
|
1944
|
+
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
|
1945
|
+
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
|
1946
|
+
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
|
1947
|
+
*
|
|
1948
|
+
* @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"}}
|
|
1949
|
+
* @x-go-type xbquery.SummaryList
|
|
1697
1950
|
*/
|
|
1698
|
-
type
|
|
1699
|
-
|
|
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
|
-
};
|
|
1951
|
+
type SummaryExpressionList = {
|
|
1952
|
+
[key: string]: SummaryExpression;
|
|
1726
1953
|
};
|
|
1727
1954
|
/**
|
|
1728
|
-
*
|
|
1955
|
+
* Count the number of records with an optional filter.
|
|
1729
1956
|
*/
|
|
1730
|
-
type
|
|
1957
|
+
type CountAgg = {
|
|
1958
|
+
filter?: FilterExpression;
|
|
1959
|
+
} | '*';
|
|
1731
1960
|
/**
|
|
1732
|
-
*
|
|
1961
|
+
* The sum of the numeric values in a particular column.
|
|
1733
1962
|
*/
|
|
1734
|
-
type
|
|
1735
|
-
/**
|
|
1736
|
-
* @minLength 1
|
|
1737
|
-
*/
|
|
1738
|
-
newName: string;
|
|
1963
|
+
type SumAgg = {
|
|
1739
1964
|
/**
|
|
1740
|
-
*
|
|
1965
|
+
* The column on which to compute the sum. Must be a numeric type.
|
|
1741
1966
|
*/
|
|
1742
|
-
|
|
1967
|
+
column: string;
|
|
1743
1968
|
};
|
|
1744
1969
|
/**
|
|
1745
|
-
*
|
|
1970
|
+
* The max of the numeric values in a particular column.
|
|
1746
1971
|
*/
|
|
1747
|
-
type
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
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
|
-
})[];
|
|
1972
|
+
type MaxAgg = {
|
|
1973
|
+
/**
|
|
1974
|
+
* The column on which to compute the max. Must be a numeric type.
|
|
1975
|
+
*/
|
|
1976
|
+
column: string;
|
|
1766
1977
|
};
|
|
1767
1978
|
/**
|
|
1768
|
-
*
|
|
1979
|
+
* The min of the numeric values in a particular column.
|
|
1769
1980
|
*/
|
|
1770
|
-
type
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
['delete']: TransactionDeleteOp;
|
|
1981
|
+
type MinAgg = {
|
|
1982
|
+
/**
|
|
1983
|
+
* The column on which to compute the min. Must be a numeric type.
|
|
1984
|
+
*/
|
|
1985
|
+
column: string;
|
|
1776
1986
|
};
|
|
1777
1987
|
/**
|
|
1778
|
-
*
|
|
1988
|
+
* The average of the numeric values in a particular column.
|
|
1779
1989
|
*/
|
|
1780
|
-
type
|
|
1781
|
-
/**
|
|
1782
|
-
* The table name
|
|
1783
|
-
*/
|
|
1784
|
-
table: string;
|
|
1785
|
-
/**
|
|
1786
|
-
* The record to insert. The `id` field is optional; when specified, it will be used as the ID for the record.
|
|
1787
|
-
*/
|
|
1788
|
-
record: {
|
|
1789
|
-
[key: string]: any;
|
|
1790
|
-
};
|
|
1791
|
-
/**
|
|
1792
|
-
* The version of the record you expect to be overwriting. Only valid with an
|
|
1793
|
-
* explicit ID is also set in the `record` key.
|
|
1794
|
-
*/
|
|
1795
|
-
ifVersion?: number;
|
|
1990
|
+
type AverageAgg = {
|
|
1796
1991
|
/**
|
|
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.
|
|
1801
|
-
*
|
|
1802
|
-
* If `createOnly` is set to `false`, Xata will attempt to insert the record. If there's no
|
|
1803
|
-
* conflict, the record is inserted. If there is a conflict, Xata will replace the record.
|
|
1992
|
+
* The column on which to compute the average. Must be a numeric type.
|
|
1804
1993
|
*/
|
|
1805
|
-
|
|
1994
|
+
column: string;
|
|
1806
1995
|
};
|
|
1807
1996
|
/**
|
|
1808
|
-
*
|
|
1997
|
+
* Count the number of distinct values in a particular column.
|
|
1809
1998
|
*/
|
|
1810
|
-
type
|
|
1811
|
-
/**
|
|
1812
|
-
* The table name
|
|
1813
|
-
*/
|
|
1814
|
-
table: string;
|
|
1815
|
-
id: RecordID;
|
|
1816
|
-
/**
|
|
1817
|
-
* The fields of the record you'd like to update
|
|
1818
|
-
*/
|
|
1819
|
-
fields: {
|
|
1820
|
-
[key: string]: any;
|
|
1821
|
-
};
|
|
1999
|
+
type UniqueCountAgg = {
|
|
1822
2000
|
/**
|
|
1823
|
-
* The
|
|
2001
|
+
* The column from where to count the unique values.
|
|
1824
2002
|
*/
|
|
1825
|
-
|
|
2003
|
+
column: string;
|
|
1826
2004
|
/**
|
|
1827
|
-
*
|
|
2005
|
+
* The threshold under which the unique count is exact. If the number of unique
|
|
2006
|
+
* values in the column is higher than this threshold, the results are approximative.
|
|
2007
|
+
* Maximum value is 40,000, default value is 3000.
|
|
1828
2008
|
*/
|
|
1829
|
-
|
|
2009
|
+
precisionThreshold?: number;
|
|
1830
2010
|
};
|
|
1831
2011
|
/**
|
|
1832
|
-
*
|
|
2012
|
+
* The description of the aggregations you wish to receive.
|
|
2013
|
+
*
|
|
2014
|
+
* @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d","aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}}
|
|
1833
2015
|
*/
|
|
1834
|
-
type
|
|
1835
|
-
|
|
1836
|
-
* The table name
|
|
1837
|
-
*/
|
|
1838
|
-
table: string;
|
|
1839
|
-
id: RecordID;
|
|
2016
|
+
type AggExpressionMap = {
|
|
2017
|
+
[key: string]: AggExpression;
|
|
1840
2018
|
};
|
|
1841
2019
|
/**
|
|
1842
|
-
*
|
|
2020
|
+
* Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
|
|
1843
2021
|
*/
|
|
1844
|
-
type
|
|
2022
|
+
type DateHistogramAgg = {
|
|
1845
2023
|
/**
|
|
1846
|
-
* The
|
|
2024
|
+
* The column to use for bucketing. Must be of type datetime.
|
|
1847
2025
|
*/
|
|
1848
|
-
|
|
2026
|
+
column: string;
|
|
1849
2027
|
/**
|
|
1850
|
-
* The
|
|
2028
|
+
* The fixed interval to use when bucketing.
|
|
2029
|
+
* It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
|
|
2030
|
+
*
|
|
2031
|
+
* @pattern ^(\d+)(d|h|m|s|ms)$
|
|
1851
2032
|
*/
|
|
1852
|
-
|
|
1853
|
-
id: RecordID;
|
|
1854
|
-
};
|
|
1855
|
-
/**
|
|
1856
|
-
* A result from an update operation.
|
|
1857
|
-
*/
|
|
1858
|
-
type TransactionResultUpdate = {
|
|
2033
|
+
interval?: string;
|
|
1859
2034
|
/**
|
|
1860
|
-
* The
|
|
2035
|
+
* The calendar-aware interval to use when bucketing. Possible values are: `minute`,
|
|
2036
|
+
* `hour`, `day`, `week`, `month`, `quarter`, `year`.
|
|
1861
2037
|
*/
|
|
1862
|
-
|
|
2038
|
+
calendarInterval?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
1863
2039
|
/**
|
|
1864
|
-
* The
|
|
2040
|
+
* The timezone to use for bucketing. By default, UTC is assumed.
|
|
2041
|
+
* The accepted format is as an ISO 8601 UTC offset. For example: `+01:00` or
|
|
2042
|
+
* `-08:00`.
|
|
2043
|
+
*
|
|
2044
|
+
* @pattern ^[+-][01]\d:[0-5]\d$
|
|
1865
2045
|
*/
|
|
1866
|
-
|
|
1867
|
-
|
|
2046
|
+
timezone?: string;
|
|
2047
|
+
aggs?: AggExpressionMap;
|
|
1868
2048
|
};
|
|
1869
2049
|
/**
|
|
1870
|
-
*
|
|
2050
|
+
* Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
|
|
2051
|
+
* The top values as ordered by the number of records (`$count`) are returned.
|
|
1871
2052
|
*/
|
|
1872
|
-
type
|
|
2053
|
+
type TopValuesAgg = {
|
|
1873
2054
|
/**
|
|
1874
|
-
* The
|
|
2055
|
+
* The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
|
|
1875
2056
|
*/
|
|
1876
|
-
|
|
2057
|
+
column: string;
|
|
2058
|
+
aggs?: AggExpressionMap;
|
|
1877
2059
|
/**
|
|
1878
|
-
* The number of
|
|
2060
|
+
* The maximum number of unique values to return.
|
|
2061
|
+
*
|
|
2062
|
+
* @default 10
|
|
2063
|
+
* @maximum 1000
|
|
1879
2064
|
*/
|
|
1880
|
-
|
|
2065
|
+
size?: number;
|
|
1881
2066
|
};
|
|
1882
2067
|
/**
|
|
1883
|
-
*
|
|
1884
|
-
*
|
|
1885
|
-
* @x-go-type xata.ErrTxOp
|
|
2068
|
+
* Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
|
|
1886
2069
|
*/
|
|
1887
|
-
type
|
|
2070
|
+
type NumericHistogramAgg = {
|
|
1888
2071
|
/**
|
|
1889
|
-
* The
|
|
2072
|
+
* The column to use for bucketing. Must be of numeric type.
|
|
1890
2073
|
*/
|
|
1891
|
-
|
|
2074
|
+
column: string;
|
|
1892
2075
|
/**
|
|
1893
|
-
* The
|
|
2076
|
+
* The numeric interval to use for bucketing. The resulting buckets will be ranges
|
|
2077
|
+
* with this value as size.
|
|
2078
|
+
*
|
|
2079
|
+
* @minimum 0
|
|
1894
2080
|
*/
|
|
1895
|
-
|
|
2081
|
+
interval: number;
|
|
2082
|
+
/**
|
|
2083
|
+
* By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
|
|
2084
|
+
* boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
|
|
2085
|
+
* but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
|
|
2086
|
+
* to 50.
|
|
2087
|
+
*
|
|
2088
|
+
* @default 0
|
|
2089
|
+
*/
|
|
2090
|
+
offset?: number;
|
|
2091
|
+
aggs?: AggExpressionMap;
|
|
1896
2092
|
};
|
|
1897
2093
|
/**
|
|
1898
|
-
*
|
|
1899
|
-
*
|
|
2094
|
+
* The description of a single aggregation operation. It is an object with only one key-value pair.
|
|
2095
|
+
* The key represents the aggregation type, while the value is an object with the configuration of
|
|
2096
|
+
* the aggregation.
|
|
2097
|
+
*
|
|
2098
|
+
* @x-go-type xata.AggExpression
|
|
1900
2099
|
*/
|
|
1901
|
-
type
|
|
2100
|
+
type AggExpression = {
|
|
2101
|
+
count?: CountAgg;
|
|
2102
|
+
} | {
|
|
2103
|
+
sum?: SumAgg;
|
|
2104
|
+
} | {
|
|
2105
|
+
max?: MaxAgg;
|
|
2106
|
+
} | {
|
|
2107
|
+
min?: MinAgg;
|
|
2108
|
+
} | {
|
|
2109
|
+
average?: AverageAgg;
|
|
2110
|
+
} | {
|
|
2111
|
+
uniqueCount?: UniqueCountAgg;
|
|
2112
|
+
} | {
|
|
2113
|
+
dateHistogram?: DateHistogramAgg;
|
|
2114
|
+
} | {
|
|
2115
|
+
topValues?: TopValuesAgg;
|
|
2116
|
+
} | {
|
|
2117
|
+
numericHistogram?: NumericHistogramAgg;
|
|
2118
|
+
};
|
|
2119
|
+
type AggResponse$1 = (number | null) | {
|
|
2120
|
+
values: ({
|
|
2121
|
+
$key: string | number;
|
|
2122
|
+
$count: number;
|
|
2123
|
+
} & {
|
|
2124
|
+
[key: string]: AggResponse$1;
|
|
2125
|
+
})[];
|
|
2126
|
+
};
|
|
1902
2127
|
/**
|
|
1903
2128
|
* Xata Table Record Metadata
|
|
1904
2129
|
*/
|
|
@@ -1912,26 +2137,33 @@ type XataRecord$1 = RecordMeta & {
|
|
|
1912
2137
|
* @version 1.0
|
|
1913
2138
|
*/
|
|
1914
2139
|
|
|
1915
|
-
type
|
|
2140
|
+
type BadRequestError = {
|
|
1916
2141
|
id?: string;
|
|
1917
2142
|
message: string;
|
|
1918
2143
|
};
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
2144
|
+
/**
|
|
2145
|
+
* @example {"message":"invalid API key"}
|
|
2146
|
+
*/
|
|
2147
|
+
type AuthError = {
|
|
2148
|
+
id?: string;
|
|
2149
|
+
message: string;
|
|
1924
2150
|
};
|
|
1925
|
-
type
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
records: XataRecord$1[];
|
|
2151
|
+
type SimpleError = {
|
|
2152
|
+
id?: string;
|
|
2153
|
+
message: string;
|
|
1929
2154
|
};
|
|
1930
2155
|
type BranchMigrationPlan = {
|
|
1931
2156
|
version: number;
|
|
1932
2157
|
migration: BranchMigration;
|
|
1933
2158
|
};
|
|
1934
|
-
type
|
|
2159
|
+
type SchemaUpdateResponse = {
|
|
2160
|
+
/**
|
|
2161
|
+
* @minLength 1
|
|
2162
|
+
*/
|
|
2163
|
+
migrationID: string;
|
|
2164
|
+
parentMigrationID: string;
|
|
2165
|
+
status: MigrationStatus;
|
|
2166
|
+
};
|
|
1935
2167
|
type SchemaCompareResponse = {
|
|
1936
2168
|
source: Schema;
|
|
1937
2169
|
target: Schema;
|
|
@@ -1943,73 +2175,53 @@ type RecordUpdateResponse = XataRecord$1 | {
|
|
|
1943
2175
|
version: number;
|
|
1944
2176
|
};
|
|
1945
2177
|
};
|
|
2178
|
+
type RecordResponse = XataRecord$1;
|
|
2179
|
+
type BulkInsertResponse = {
|
|
2180
|
+
recordIDs: string[];
|
|
2181
|
+
} | {
|
|
2182
|
+
records: XataRecord$1[];
|
|
2183
|
+
};
|
|
2184
|
+
type BulkError = {
|
|
2185
|
+
errors: {
|
|
2186
|
+
message?: string;
|
|
2187
|
+
status?: number;
|
|
2188
|
+
}[];
|
|
2189
|
+
};
|
|
1946
2190
|
type QueryResponse = {
|
|
1947
2191
|
records: XataRecord$1[];
|
|
1948
2192
|
meta: RecordsMetadata;
|
|
1949
2193
|
};
|
|
1950
|
-
type
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
2194
|
+
type SearchResponse = {
|
|
2195
|
+
records: XataRecord$1[];
|
|
2196
|
+
warning?: string;
|
|
2197
|
+
};
|
|
2198
|
+
type RateLimitError = {
|
|
2199
|
+
id?: string;
|
|
2200
|
+
message: string;
|
|
1957
2201
|
};
|
|
1958
2202
|
type SummarizeResponse = {
|
|
1959
2203
|
summaries: Record<string, any>[];
|
|
1960
2204
|
};
|
|
1961
2205
|
/**
|
|
1962
|
-
* @example {"aggs":{"dailyUniqueUsers":{"values":[{"key":"2022-02-22T22:22:22Z","uniqueUsers":134},{"key":"2022-02-23T22:22:22Z","uniqueUsers":90}]}}}
|
|
2206
|
+
* @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
2207
|
*/
|
|
1964
2208
|
type AggResponse = {
|
|
1965
2209
|
aggs?: {
|
|
1966
2210
|
[key: string]: AggResponse$1;
|
|
1967
2211
|
};
|
|
1968
2212
|
};
|
|
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
2213
|
|
|
2003
2214
|
type DataPlaneFetcherExtraProps = {
|
|
2004
2215
|
apiUrl: string;
|
|
2005
2216
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
|
2006
|
-
|
|
2217
|
+
fetch: FetchImpl;
|
|
2007
2218
|
apiKey: string;
|
|
2008
2219
|
trace: TraceFunction;
|
|
2009
2220
|
signal?: AbortSignal;
|
|
2010
2221
|
clientID?: string;
|
|
2011
2222
|
sessionID?: string;
|
|
2012
2223
|
clientName?: string;
|
|
2224
|
+
xataAgentExtra?: Record<string, string>;
|
|
2013
2225
|
};
|
|
2014
2226
|
type ErrorWrapper<TError> = TError | {
|
|
2015
2227
|
status: 'unknown';
|
|
@@ -2092,6 +2304,9 @@ type CreateBranchError = ErrorWrapper<{
|
|
|
2092
2304
|
} | {
|
|
2093
2305
|
status: 404;
|
|
2094
2306
|
payload: SimpleError;
|
|
2307
|
+
} | {
|
|
2308
|
+
status: 423;
|
|
2309
|
+
payload: SimpleError;
|
|
2095
2310
|
}>;
|
|
2096
2311
|
type CreateBranchResponse = {
|
|
2097
2312
|
/**
|
|
@@ -2131,6 +2346,9 @@ type DeleteBranchError = ErrorWrapper<{
|
|
|
2131
2346
|
} | {
|
|
2132
2347
|
status: 404;
|
|
2133
2348
|
payload: SimpleError;
|
|
2349
|
+
} | {
|
|
2350
|
+
status: 409;
|
|
2351
|
+
payload: SimpleError;
|
|
2134
2352
|
}>;
|
|
2135
2353
|
type DeleteBranchResponse = {
|
|
2136
2354
|
status: MigrationStatus;
|
|
@@ -2142,6 +2360,36 @@ type DeleteBranchVariables = {
|
|
|
2142
2360
|
* Delete the branch in the database and all its resources
|
|
2143
2361
|
*/
|
|
2144
2362
|
declare const deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<DeleteBranchResponse>;
|
|
2363
|
+
type CopyBranchPathParams = {
|
|
2364
|
+
/**
|
|
2365
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
2366
|
+
*/
|
|
2367
|
+
dbBranchName: DBBranchName;
|
|
2368
|
+
workspace: string;
|
|
2369
|
+
region: string;
|
|
2370
|
+
};
|
|
2371
|
+
type CopyBranchError = ErrorWrapper<{
|
|
2372
|
+
status: 400;
|
|
2373
|
+
payload: BadRequestError;
|
|
2374
|
+
} | {
|
|
2375
|
+
status: 401;
|
|
2376
|
+
payload: AuthError;
|
|
2377
|
+
} | {
|
|
2378
|
+
status: 404;
|
|
2379
|
+
payload: SimpleError;
|
|
2380
|
+
}>;
|
|
2381
|
+
type CopyBranchRequestBody = {
|
|
2382
|
+
destinationBranch: string;
|
|
2383
|
+
limit?: number;
|
|
2384
|
+
};
|
|
2385
|
+
type CopyBranchVariables = {
|
|
2386
|
+
body: CopyBranchRequestBody;
|
|
2387
|
+
pathParams: CopyBranchPathParams;
|
|
2388
|
+
} & DataPlaneFetcherExtraProps;
|
|
2389
|
+
/**
|
|
2390
|
+
* Create a copy of the branch
|
|
2391
|
+
*/
|
|
2392
|
+
declare const copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal) => Promise<BranchWithCopyID>;
|
|
2145
2393
|
type UpdateBranchMetadataPathParams = {
|
|
2146
2394
|
/**
|
|
2147
2395
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
@@ -2504,32 +2752,6 @@ type ExecuteBranchMigrationPlanVariables = {
|
|
|
2504
2752
|
* Apply a migration plan to the branch
|
|
2505
2753
|
*/
|
|
2506
2754
|
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
2755
|
type QueryMigrationRequestsPathParams = {
|
|
2534
2756
|
/**
|
|
2535
2757
|
* The Database Name
|
|
@@ -2812,7 +3034,7 @@ type MergeMigrationRequestError = ErrorWrapper<{
|
|
|
2812
3034
|
type MergeMigrationRequestVariables = {
|
|
2813
3035
|
pathParams: MergeMigrationRequestPathParams;
|
|
2814
3036
|
} & DataPlaneFetcherExtraProps;
|
|
2815
|
-
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<
|
|
3037
|
+
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<BranchOp>;
|
|
2816
3038
|
type GetBranchSchemaHistoryPathParams = {
|
|
2817
3039
|
/**
|
|
2818
3040
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
@@ -2861,6 +3083,10 @@ type GetBranchSchemaHistoryRequestBody = {
|
|
|
2861
3083
|
*/
|
|
2862
3084
|
size?: number;
|
|
2863
3085
|
};
|
|
3086
|
+
/**
|
|
3087
|
+
* Report only migrations that have been added since the given Migration ID.
|
|
3088
|
+
*/
|
|
3089
|
+
since?: string;
|
|
2864
3090
|
};
|
|
2865
3091
|
type GetBranchSchemaHistoryVariables = {
|
|
2866
3092
|
body?: GetBranchSchemaHistoryRequestBody;
|
|
@@ -2887,6 +3113,8 @@ type CompareBranchWithUserSchemaError = ErrorWrapper<{
|
|
|
2887
3113
|
}>;
|
|
2888
3114
|
type CompareBranchWithUserSchemaRequestBody = {
|
|
2889
3115
|
schema: Schema;
|
|
3116
|
+
schemaOperations?: MigrationOp[];
|
|
3117
|
+
branchOperations?: MigrationOp[];
|
|
2890
3118
|
};
|
|
2891
3119
|
type CompareBranchWithUserSchemaVariables = {
|
|
2892
3120
|
body: CompareBranchWithUserSchemaRequestBody;
|
|
@@ -2915,8 +3143,12 @@ type CompareBranchSchemasError = ErrorWrapper<{
|
|
|
2915
3143
|
status: 404;
|
|
2916
3144
|
payload: SimpleError;
|
|
2917
3145
|
}>;
|
|
3146
|
+
type CompareBranchSchemasRequestBody = {
|
|
3147
|
+
sourceBranchOperations?: MigrationOp[];
|
|
3148
|
+
targetBranchOperations?: MigrationOp[];
|
|
3149
|
+
};
|
|
2918
3150
|
type CompareBranchSchemasVariables = {
|
|
2919
|
-
body
|
|
3151
|
+
body: CompareBranchSchemasRequestBody;
|
|
2920
3152
|
pathParams: CompareBranchSchemasPathParams;
|
|
2921
3153
|
} & DataPlaneFetcherExtraProps;
|
|
2922
3154
|
declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
|
|
@@ -2999,6 +3231,32 @@ type ApplyBranchSchemaEditVariables = {
|
|
|
2999
3231
|
pathParams: ApplyBranchSchemaEditPathParams;
|
|
3000
3232
|
} & DataPlaneFetcherExtraProps;
|
|
3001
3233
|
declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
|
3234
|
+
type PushBranchMigrationsPathParams = {
|
|
3235
|
+
/**
|
|
3236
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
3237
|
+
*/
|
|
3238
|
+
dbBranchName: DBBranchName;
|
|
3239
|
+
workspace: string;
|
|
3240
|
+
region: string;
|
|
3241
|
+
};
|
|
3242
|
+
type PushBranchMigrationsError = ErrorWrapper<{
|
|
3243
|
+
status: 400;
|
|
3244
|
+
payload: BadRequestError;
|
|
3245
|
+
} | {
|
|
3246
|
+
status: 401;
|
|
3247
|
+
payload: AuthError;
|
|
3248
|
+
} | {
|
|
3249
|
+
status: 404;
|
|
3250
|
+
payload: SimpleError;
|
|
3251
|
+
}>;
|
|
3252
|
+
type PushBranchMigrationsRequestBody = {
|
|
3253
|
+
migrations: MigrationObject[];
|
|
3254
|
+
};
|
|
3255
|
+
type PushBranchMigrationsVariables = {
|
|
3256
|
+
body: PushBranchMigrationsRequestBody;
|
|
3257
|
+
pathParams: PushBranchMigrationsPathParams;
|
|
3258
|
+
} & DataPlaneFetcherExtraProps;
|
|
3259
|
+
declare const pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
|
3002
3260
|
type CreateTablePathParams = {
|
|
3003
3261
|
/**
|
|
3004
3262
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
@@ -3089,6 +3347,9 @@ type UpdateTableError = ErrorWrapper<{
|
|
|
3089
3347
|
} | {
|
|
3090
3348
|
status: 404;
|
|
3091
3349
|
payload: SimpleError;
|
|
3350
|
+
} | {
|
|
3351
|
+
status: 422;
|
|
3352
|
+
payload: SimpleError;
|
|
3092
3353
|
}>;
|
|
3093
3354
|
type UpdateTableRequestBody = {
|
|
3094
3355
|
/**
|
|
@@ -3347,6 +3608,32 @@ type DeleteColumnVariables = {
|
|
|
3347
3608
|
* Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
|
|
3348
3609
|
*/
|
|
3349
3610
|
declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
|
3611
|
+
type BranchTransactionPathParams = {
|
|
3612
|
+
/**
|
|
3613
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
3614
|
+
*/
|
|
3615
|
+
dbBranchName: DBBranchName;
|
|
3616
|
+
workspace: string;
|
|
3617
|
+
region: string;
|
|
3618
|
+
};
|
|
3619
|
+
type BranchTransactionError = ErrorWrapper<{
|
|
3620
|
+
status: 400;
|
|
3621
|
+
payload: TransactionFailure;
|
|
3622
|
+
} | {
|
|
3623
|
+
status: 401;
|
|
3624
|
+
payload: AuthError;
|
|
3625
|
+
} | {
|
|
3626
|
+
status: 404;
|
|
3627
|
+
payload: SimpleError;
|
|
3628
|
+
}>;
|
|
3629
|
+
type BranchTransactionRequestBody = {
|
|
3630
|
+
operations: TransactionOperation$1[];
|
|
3631
|
+
};
|
|
3632
|
+
type BranchTransactionVariables = {
|
|
3633
|
+
body: BranchTransactionRequestBody;
|
|
3634
|
+
pathParams: BranchTransactionPathParams;
|
|
3635
|
+
} & DataPlaneFetcherExtraProps;
|
|
3636
|
+
declare const branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
|
|
3350
3637
|
type InsertRecordPathParams = {
|
|
3351
3638
|
/**
|
|
3352
3639
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
@@ -3376,7 +3663,7 @@ type InsertRecordError = ErrorWrapper<{
|
|
|
3376
3663
|
payload: SimpleError;
|
|
3377
3664
|
}>;
|
|
3378
3665
|
type InsertRecordVariables = {
|
|
3379
|
-
body?:
|
|
3666
|
+
body?: DataInputRecord;
|
|
3380
3667
|
pathParams: InsertRecordPathParams;
|
|
3381
3668
|
queryParams?: InsertRecordQueryParams;
|
|
3382
3669
|
} & DataPlaneFetcherExtraProps;
|
|
@@ -3462,7 +3749,7 @@ type InsertRecordWithIDError = ErrorWrapper<{
|
|
|
3462
3749
|
payload: SimpleError;
|
|
3463
3750
|
}>;
|
|
3464
3751
|
type InsertRecordWithIDVariables = {
|
|
3465
|
-
body?:
|
|
3752
|
+
body?: DataInputRecord;
|
|
3466
3753
|
pathParams: InsertRecordWithIDPathParams;
|
|
3467
3754
|
queryParams?: InsertRecordWithIDQueryParams;
|
|
3468
3755
|
} & DataPlaneFetcherExtraProps;
|
|
@@ -3507,7 +3794,7 @@ type UpdateRecordWithIDError = ErrorWrapper<{
|
|
|
3507
3794
|
payload: SimpleError;
|
|
3508
3795
|
}>;
|
|
3509
3796
|
type UpdateRecordWithIDVariables = {
|
|
3510
|
-
body?:
|
|
3797
|
+
body?: DataInputRecord;
|
|
3511
3798
|
pathParams: UpdateRecordWithIDPathParams;
|
|
3512
3799
|
queryParams?: UpdateRecordWithIDQueryParams;
|
|
3513
3800
|
} & DataPlaneFetcherExtraProps;
|
|
@@ -3549,7 +3836,7 @@ type UpsertRecordWithIDError = ErrorWrapper<{
|
|
|
3549
3836
|
payload: SimpleError;
|
|
3550
3837
|
}>;
|
|
3551
3838
|
type UpsertRecordWithIDVariables = {
|
|
3552
|
-
body?:
|
|
3839
|
+
body?: DataInputRecord;
|
|
3553
3840
|
pathParams: UpsertRecordWithIDPathParams;
|
|
3554
3841
|
queryParams?: UpsertRecordWithIDQueryParams;
|
|
3555
3842
|
} & DataPlaneFetcherExtraProps;
|
|
@@ -3623,7 +3910,7 @@ type BulkInsertTableRecordsError = ErrorWrapper<{
|
|
|
3623
3910
|
payload: SimpleError;
|
|
3624
3911
|
}>;
|
|
3625
3912
|
type BulkInsertTableRecordsRequestBody = {
|
|
3626
|
-
records:
|
|
3913
|
+
records: DataInputRecord[];
|
|
3627
3914
|
};
|
|
3628
3915
|
type BulkInsertTableRecordsVariables = {
|
|
3629
3916
|
body: BulkInsertTableRecordsRequestBody;
|
|
@@ -4437,7 +4724,106 @@ type SearchBranchPathParams = {
|
|
|
4437
4724
|
workspace: string;
|
|
4438
4725
|
region: string;
|
|
4439
4726
|
};
|
|
4440
|
-
type SearchBranchError = ErrorWrapper<{
|
|
4727
|
+
type SearchBranchError = ErrorWrapper<{
|
|
4728
|
+
status: 400;
|
|
4729
|
+
payload: BadRequestError;
|
|
4730
|
+
} | {
|
|
4731
|
+
status: 401;
|
|
4732
|
+
payload: AuthError;
|
|
4733
|
+
} | {
|
|
4734
|
+
status: 404;
|
|
4735
|
+
payload: SimpleError;
|
|
4736
|
+
}>;
|
|
4737
|
+
type SearchBranchRequestBody = {
|
|
4738
|
+
/**
|
|
4739
|
+
* An array with the tables in which to search. By default, all tables are included. Optionally, filters can be included that apply to each table.
|
|
4740
|
+
*/
|
|
4741
|
+
tables?: (string | {
|
|
4742
|
+
/**
|
|
4743
|
+
* The name of the table.
|
|
4744
|
+
*/
|
|
4745
|
+
table: string;
|
|
4746
|
+
filter?: FilterExpression;
|
|
4747
|
+
target?: TargetExpression;
|
|
4748
|
+
boosters?: BoosterExpression[];
|
|
4749
|
+
})[];
|
|
4750
|
+
/**
|
|
4751
|
+
* The query string.
|
|
4752
|
+
*
|
|
4753
|
+
* @minLength 1
|
|
4754
|
+
*/
|
|
4755
|
+
query: string;
|
|
4756
|
+
fuzziness?: FuzzinessExpression;
|
|
4757
|
+
prefix?: PrefixExpression;
|
|
4758
|
+
highlight?: HighlightExpression;
|
|
4759
|
+
page?: SearchPageConfig;
|
|
4760
|
+
};
|
|
4761
|
+
type SearchBranchVariables = {
|
|
4762
|
+
body: SearchBranchRequestBody;
|
|
4763
|
+
pathParams: SearchBranchPathParams;
|
|
4764
|
+
} & DataPlaneFetcherExtraProps;
|
|
4765
|
+
/**
|
|
4766
|
+
* Run a free text search operation across the database branch.
|
|
4767
|
+
*/
|
|
4768
|
+
declare const searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
|
4769
|
+
type SearchTablePathParams = {
|
|
4770
|
+
/**
|
|
4771
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
4772
|
+
*/
|
|
4773
|
+
dbBranchName: DBBranchName;
|
|
4774
|
+
/**
|
|
4775
|
+
* The Table name
|
|
4776
|
+
*/
|
|
4777
|
+
tableName: TableName;
|
|
4778
|
+
workspace: string;
|
|
4779
|
+
region: string;
|
|
4780
|
+
};
|
|
4781
|
+
type SearchTableError = ErrorWrapper<{
|
|
4782
|
+
status: 400;
|
|
4783
|
+
payload: BadRequestError;
|
|
4784
|
+
} | {
|
|
4785
|
+
status: 401;
|
|
4786
|
+
payload: AuthError;
|
|
4787
|
+
} | {
|
|
4788
|
+
status: 404;
|
|
4789
|
+
payload: SimpleError;
|
|
4790
|
+
}>;
|
|
4791
|
+
type SearchTableRequestBody = {
|
|
4792
|
+
/**
|
|
4793
|
+
* The query string.
|
|
4794
|
+
*
|
|
4795
|
+
* @minLength 1
|
|
4796
|
+
*/
|
|
4797
|
+
query: string;
|
|
4798
|
+
fuzziness?: FuzzinessExpression;
|
|
4799
|
+
target?: TargetExpression;
|
|
4800
|
+
prefix?: PrefixExpression;
|
|
4801
|
+
filter?: FilterExpression;
|
|
4802
|
+
highlight?: HighlightExpression;
|
|
4803
|
+
boosters?: BoosterExpression[];
|
|
4804
|
+
page?: SearchPageConfig;
|
|
4805
|
+
};
|
|
4806
|
+
type SearchTableVariables = {
|
|
4807
|
+
body: SearchTableRequestBody;
|
|
4808
|
+
pathParams: SearchTablePathParams;
|
|
4809
|
+
} & DataPlaneFetcherExtraProps;
|
|
4810
|
+
/**
|
|
4811
|
+
* Run a free text search operation in a particular table.
|
|
4812
|
+
*
|
|
4813
|
+
* The endpoint accepts a `query` parameter that is used for the free text search and a set of structured filters (via the `filter` parameter) that are applied before the search. The `filter` parameter uses the same syntax as the [query endpoint](/api-reference/db/db_branch_name/tables/table_name/) with the following exceptions:
|
|
4814
|
+
* * filters `$contains`, `$startsWith`, `$endsWith` don't work on columns of type `text`
|
|
4815
|
+
* * filtering on columns of type `multiple` is currently unsupported
|
|
4816
|
+
*/
|
|
4817
|
+
declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
|
4818
|
+
type SqlQueryPathParams = {
|
|
4819
|
+
/**
|
|
4820
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
4821
|
+
*/
|
|
4822
|
+
dbBranchName: DBBranchName;
|
|
4823
|
+
workspace: string;
|
|
4824
|
+
region: string;
|
|
4825
|
+
};
|
|
4826
|
+
type SqlQueryError = ErrorWrapper<{
|
|
4441
4827
|
status: 400;
|
|
4442
4828
|
payload: BadRequestError;
|
|
4443
4829
|
} | {
|
|
@@ -4447,39 +4833,29 @@ type SearchBranchError = ErrorWrapper<{
|
|
|
4447
4833
|
status: 404;
|
|
4448
4834
|
payload: SimpleError;
|
|
4449
4835
|
}>;
|
|
4450
|
-
type
|
|
4451
|
-
/**
|
|
4452
|
-
* An array with the tables in which to search. By default, all tables are included. Optionally, filters can be included that apply to each table.
|
|
4453
|
-
*/
|
|
4454
|
-
tables?: (string | {
|
|
4455
|
-
/**
|
|
4456
|
-
* The name of the table.
|
|
4457
|
-
*/
|
|
4458
|
-
table: string;
|
|
4459
|
-
filter?: FilterExpression;
|
|
4460
|
-
target?: TargetExpression;
|
|
4461
|
-
boosters?: BoosterExpression[];
|
|
4462
|
-
})[];
|
|
4836
|
+
type SqlQueryRequestBody = {
|
|
4463
4837
|
/**
|
|
4464
4838
|
* The query string.
|
|
4465
4839
|
*
|
|
4466
4840
|
* @minLength 1
|
|
4467
4841
|
*/
|
|
4468
4842
|
query: string;
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4843
|
+
/**
|
|
4844
|
+
* The consistency level for this request.
|
|
4845
|
+
*
|
|
4846
|
+
* @default strong
|
|
4847
|
+
*/
|
|
4848
|
+
consistency?: 'strong' | 'eventual';
|
|
4473
4849
|
};
|
|
4474
|
-
type
|
|
4475
|
-
body:
|
|
4476
|
-
pathParams:
|
|
4850
|
+
type SqlQueryVariables = {
|
|
4851
|
+
body: SqlQueryRequestBody;
|
|
4852
|
+
pathParams: SqlQueryPathParams;
|
|
4477
4853
|
} & DataPlaneFetcherExtraProps;
|
|
4478
4854
|
/**
|
|
4479
|
-
* Run
|
|
4855
|
+
* Run an SQL query across the database branch.
|
|
4480
4856
|
*/
|
|
4481
|
-
declare const
|
|
4482
|
-
type
|
|
4857
|
+
declare const sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal) => Promise<QueryResponse>;
|
|
4858
|
+
type VectorSearchTablePathParams = {
|
|
4483
4859
|
/**
|
|
4484
4860
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
4485
4861
|
*/
|
|
@@ -4491,7 +4867,7 @@ type SearchTablePathParams = {
|
|
|
4491
4867
|
workspace: string;
|
|
4492
4868
|
region: string;
|
|
4493
4869
|
};
|
|
4494
|
-
type
|
|
4870
|
+
type VectorSearchTableError = ErrorWrapper<{
|
|
4495
4871
|
status: 400;
|
|
4496
4872
|
payload: BadRequestError;
|
|
4497
4873
|
} | {
|
|
@@ -4501,33 +4877,128 @@ type SearchTableError = ErrorWrapper<{
|
|
|
4501
4877
|
status: 404;
|
|
4502
4878
|
payload: SimpleError;
|
|
4503
4879
|
}>;
|
|
4504
|
-
type
|
|
4880
|
+
type VectorSearchTableRequestBody = {
|
|
4505
4881
|
/**
|
|
4506
|
-
* The
|
|
4882
|
+
* The vector to search for similarities. Must have the same dimension as
|
|
4883
|
+
* the vector column used.
|
|
4884
|
+
*/
|
|
4885
|
+
queryVector: number[];
|
|
4886
|
+
/**
|
|
4887
|
+
* The vector column in which to search. It must be of type `vector`.
|
|
4888
|
+
*/
|
|
4889
|
+
column: string;
|
|
4890
|
+
/**
|
|
4891
|
+
* The function used to measure the distance between two points. Can be one of:
|
|
4892
|
+
* `cosineSimilarity`, `l1`, `l2`. The default is `cosineSimilarity`.
|
|
4507
4893
|
*
|
|
4508
|
-
* @
|
|
4894
|
+
* @default cosineSimilarity
|
|
4509
4895
|
*/
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4896
|
+
similarityFunction?: string;
|
|
4897
|
+
/**
|
|
4898
|
+
* Number of results to return.
|
|
4899
|
+
*
|
|
4900
|
+
* @default 10
|
|
4901
|
+
* @maximum 100
|
|
4902
|
+
* @minimum 1
|
|
4903
|
+
*/
|
|
4904
|
+
size?: number;
|
|
4514
4905
|
filter?: FilterExpression;
|
|
4515
|
-
highlight?: HighlightExpression;
|
|
4516
|
-
boosters?: BoosterExpression[];
|
|
4517
|
-
page?: SearchPageConfig;
|
|
4518
4906
|
};
|
|
4519
|
-
type
|
|
4520
|
-
body:
|
|
4521
|
-
pathParams:
|
|
4907
|
+
type VectorSearchTableVariables = {
|
|
4908
|
+
body: VectorSearchTableRequestBody;
|
|
4909
|
+
pathParams: VectorSearchTablePathParams;
|
|
4522
4910
|
} & DataPlaneFetcherExtraProps;
|
|
4523
4911
|
/**
|
|
4524
|
-
*
|
|
4525
|
-
*
|
|
4526
|
-
*
|
|
4527
|
-
*
|
|
4528
|
-
* * filtering on columns of type `multiple` is currently unsupported
|
|
4912
|
+
* This endpoint can be used to perform vector-based similarity searches in a table.
|
|
4913
|
+
* It can be used for implementing semantic search and product recommendation. To use this
|
|
4914
|
+
* endpoint, you need a column of type vector. The input vector must have the same
|
|
4915
|
+
* dimension as the vector column.
|
|
4529
4916
|
*/
|
|
4530
|
-
declare const
|
|
4917
|
+
declare const vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
|
4918
|
+
type AskTablePathParams = {
|
|
4919
|
+
/**
|
|
4920
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
4921
|
+
*/
|
|
4922
|
+
dbBranchName: DBBranchName;
|
|
4923
|
+
/**
|
|
4924
|
+
* The Table name
|
|
4925
|
+
*/
|
|
4926
|
+
tableName: TableName;
|
|
4927
|
+
workspace: string;
|
|
4928
|
+
region: string;
|
|
4929
|
+
};
|
|
4930
|
+
type AskTableError = ErrorWrapper<{
|
|
4931
|
+
status: 400;
|
|
4932
|
+
payload: BadRequestError;
|
|
4933
|
+
} | {
|
|
4934
|
+
status: 401;
|
|
4935
|
+
payload: AuthError;
|
|
4936
|
+
} | {
|
|
4937
|
+
status: 404;
|
|
4938
|
+
payload: SimpleError;
|
|
4939
|
+
} | {
|
|
4940
|
+
status: 429;
|
|
4941
|
+
payload: RateLimitError;
|
|
4942
|
+
}>;
|
|
4943
|
+
type AskTableResponse = {
|
|
4944
|
+
/**
|
|
4945
|
+
* The answer to the input question
|
|
4946
|
+
*/
|
|
4947
|
+
answer?: string;
|
|
4948
|
+
};
|
|
4949
|
+
type AskTableRequestBody = {
|
|
4950
|
+
/**
|
|
4951
|
+
* The question you'd like to ask.
|
|
4952
|
+
*
|
|
4953
|
+
* @minLength 3
|
|
4954
|
+
*/
|
|
4955
|
+
question: string;
|
|
4956
|
+
/**
|
|
4957
|
+
* The type of search to use. If set to `keyword` (the default), the search can be configured by passing
|
|
4958
|
+
* a `search` object with the following fields. For more details about each, see the Search endpoint documentation.
|
|
4959
|
+
* All fields are optional.
|
|
4960
|
+
* * fuzziness - typo tolerance
|
|
4961
|
+
* * target - columns to search into, and weights.
|
|
4962
|
+
* * prefix - prefix search type.
|
|
4963
|
+
* * filter - pre-filter before searching.
|
|
4964
|
+
* * boosters - control relevancy.
|
|
4965
|
+
* If set to `vector`, a `vectorSearch` object must be passed, with the following parameters. For more details, see the Vector
|
|
4966
|
+
* Search endpoint documentation. The `column` and `contentColumn` parameters are required.
|
|
4967
|
+
* * column - the vector column containing the embeddings.
|
|
4968
|
+
* * contentColumn - the column that contains the text from which the embeddings where computed.
|
|
4969
|
+
* * filter - pre-filter before searching.
|
|
4970
|
+
*
|
|
4971
|
+
* @default keyword
|
|
4972
|
+
*/
|
|
4973
|
+
searchType?: 'keyword' | 'vector';
|
|
4974
|
+
search?: {
|
|
4975
|
+
fuzziness?: FuzzinessExpression;
|
|
4976
|
+
target?: TargetExpression;
|
|
4977
|
+
prefix?: PrefixExpression;
|
|
4978
|
+
filter?: FilterExpression;
|
|
4979
|
+
boosters?: BoosterExpression[];
|
|
4980
|
+
};
|
|
4981
|
+
vectorSearch?: {
|
|
4982
|
+
/**
|
|
4983
|
+
* The column to use for vector search. It must be of type `vector`.
|
|
4984
|
+
*/
|
|
4985
|
+
column: string;
|
|
4986
|
+
/**
|
|
4987
|
+
* The column containing the text for vector search. Must be of type `text`.
|
|
4988
|
+
*/
|
|
4989
|
+
contentColumn: string;
|
|
4990
|
+
filter?: FilterExpression;
|
|
4991
|
+
};
|
|
4992
|
+
rules?: string[];
|
|
4993
|
+
};
|
|
4994
|
+
type AskTableVariables = {
|
|
4995
|
+
body: AskTableRequestBody;
|
|
4996
|
+
pathParams: AskTablePathParams;
|
|
4997
|
+
} & DataPlaneFetcherExtraProps;
|
|
4998
|
+
/**
|
|
4999
|
+
* Ask your table a question. If the `Accept` header is set to `text/event-stream`, Xata will stream the results back as SSE's.
|
|
5000
|
+
*/
|
|
5001
|
+
declare const askTable: (variables: AskTableVariables, signal?: AbortSignal) => Promise<AskTableResponse>;
|
|
4531
5002
|
type SummarizeTablePathParams = {
|
|
4532
5003
|
/**
|
|
4533
5004
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
|
@@ -4674,7 +5145,7 @@ type AggregateTableVariables = {
|
|
|
4674
5145
|
pathParams: AggregateTablePathParams;
|
|
4675
5146
|
} & DataPlaneFetcherExtraProps;
|
|
4676
5147
|
/**
|
|
4677
|
-
* This endpoint allows you to run
|
|
5148
|
+
* This endpoint allows you to run aggregations (analytics) on the data from one table.
|
|
4678
5149
|
* While the summary endpoint is served from a transactional store and the results are strongly
|
|
4679
5150
|
* consistent, the aggregate endpoint is served from our columnar store and the results are
|
|
4680
5151
|
* only eventually consistent. On the other hand, the aggregate endpoint uses a
|
|
@@ -4691,6 +5162,7 @@ declare const operationsByTag: {
|
|
|
4691
5162
|
getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal | undefined) => Promise<DBBranch>;
|
|
4692
5163
|
createBranch: (variables: CreateBranchVariables, signal?: AbortSignal | undefined) => Promise<CreateBranchResponse>;
|
|
4693
5164
|
deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal | undefined) => Promise<DeleteBranchResponse>;
|
|
5165
|
+
copyBranch: (variables: CopyBranchVariables, signal?: AbortSignal | undefined) => Promise<BranchWithCopyID>;
|
|
4694
5166
|
updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
|
4695
5167
|
getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal | undefined) => Promise<BranchMetadata>;
|
|
4696
5168
|
getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal | undefined) => Promise<GetBranchStatsResponse>;
|
|
@@ -4699,16 +5171,6 @@ declare const operationsByTag: {
|
|
|
4699
5171
|
removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
|
4700
5172
|
resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal | undefined) => Promise<ResolveBranchResponse>;
|
|
4701
5173
|
};
|
|
4702
|
-
records: {
|
|
4703
|
-
branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
|
|
4704
|
-
insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
|
4705
|
-
getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
|
|
4706
|
-
insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
|
4707
|
-
updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
|
4708
|
-
upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
|
4709
|
-
deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
|
|
4710
|
-
bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
|
|
4711
|
-
};
|
|
4712
5174
|
migrations: {
|
|
4713
5175
|
getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<GetBranchMigrationHistoryResponse>;
|
|
4714
5176
|
getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal | undefined) => Promise<BranchMigrationPlan>;
|
|
@@ -4719,6 +5181,17 @@ declare const operationsByTag: {
|
|
|
4719
5181
|
updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
|
|
4720
5182
|
previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<PreviewBranchSchemaEditResponse>;
|
|
4721
5183
|
applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
|
|
5184
|
+
pushBranchMigrations: (variables: PushBranchMigrationsVariables, signal?: AbortSignal | undefined) => Promise<SchemaUpdateResponse>;
|
|
5185
|
+
};
|
|
5186
|
+
records: {
|
|
5187
|
+
branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal | undefined) => Promise<TransactionSuccess>;
|
|
5188
|
+
insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
|
5189
|
+
getRecord: (variables: GetRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
|
|
5190
|
+
insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
|
5191
|
+
updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
|
5192
|
+
upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal | undefined) => Promise<RecordUpdateResponse>;
|
|
5193
|
+
deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal | undefined) => Promise<XataRecord$1>;
|
|
5194
|
+
bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal | undefined) => Promise<BulkInsertResponse>;
|
|
4722
5195
|
};
|
|
4723
5196
|
migrationRequests: {
|
|
4724
5197
|
queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal | undefined) => Promise<QueryMigrationRequestsResponse>;
|
|
@@ -4728,7 +5201,7 @@ declare const operationsByTag: {
|
|
|
4728
5201
|
listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal | undefined) => Promise<ListMigrationRequestsCommitsResponse>;
|
|
4729
5202
|
compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<SchemaCompareResponse>;
|
|
4730
5203
|
getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal | undefined) => Promise<GetMigrationRequestIsMergedResponse>;
|
|
4731
|
-
mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<
|
|
5204
|
+
mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal | undefined) => Promise<BranchOp>;
|
|
4732
5205
|
};
|
|
4733
5206
|
table: {
|
|
4734
5207
|
createTable: (variables: CreateTableVariables, signal?: AbortSignal | undefined) => Promise<CreateTableResponse>;
|
|
@@ -4746,6 +5219,9 @@ declare const operationsByTag: {
|
|
|
4746
5219
|
queryTable: (variables: QueryTableVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
|
|
4747
5220
|
searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
|
|
4748
5221
|
searchTable: (variables: SearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
|
|
5222
|
+
sqlQuery: (variables: SqlQueryVariables, signal?: AbortSignal | undefined) => Promise<QueryResponse>;
|
|
5223
|
+
vectorSearchTable: (variables: VectorSearchTableVariables, signal?: AbortSignal | undefined) => Promise<SearchResponse>;
|
|
5224
|
+
askTable: (variables: AskTableVariables, signal?: AbortSignal | undefined) => Promise<AskTableResponse>;
|
|
4749
5225
|
summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal | undefined) => Promise<SummarizeResponse>;
|
|
4750
5226
|
aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal | undefined) => Promise<AggResponse>;
|
|
4751
5227
|
};
|
|
@@ -4782,11 +5258,14 @@ declare const operationsByTag: {
|
|
|
4782
5258
|
deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal | undefined) => Promise<DeleteDatabaseResponse>;
|
|
4783
5259
|
getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
|
|
4784
5260
|
updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal | undefined) => Promise<DatabaseMetadata>;
|
|
5261
|
+
getDatabaseGithubSettings: (variables: GetDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
|
|
5262
|
+
updateDatabaseGithubSettings: (variables: UpdateDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<DatabaseGithubSettings>;
|
|
5263
|
+
deleteDatabaseGithubSettings: (variables: DeleteDatabaseGithubSettingsVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
|
4785
5264
|
listRegions: (variables: ListRegionsVariables, signal?: AbortSignal | undefined) => Promise<ListRegionsResponse>;
|
|
4786
5265
|
};
|
|
4787
5266
|
};
|
|
4788
5267
|
|
|
4789
|
-
type HostAliases = 'production' | 'staging';
|
|
5268
|
+
type HostAliases = 'production' | 'staging' | 'dev';
|
|
4790
5269
|
type ProviderBuilder = {
|
|
4791
5270
|
main: string;
|
|
4792
5271
|
workspaces: string;
|
|
@@ -4796,250 +5275,273 @@ declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder)
|
|
|
4796
5275
|
declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
|
|
4797
5276
|
declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
|
|
4798
5277
|
declare function parseProviderString(provider?: string): HostProvider | null;
|
|
5278
|
+
declare function buildProviderString(provider: HostProvider): string;
|
|
4799
5279
|
declare function parseWorkspacesUrlParts(url: string): {
|
|
4800
5280
|
workspace: string;
|
|
4801
5281
|
region: string;
|
|
4802
5282
|
} | null;
|
|
4803
5283
|
|
|
5284
|
+
type responses_AggResponse = AggResponse;
|
|
4804
5285
|
type responses_AuthError = AuthError;
|
|
4805
5286
|
type responses_BadRequestError = BadRequestError;
|
|
4806
|
-
type
|
|
5287
|
+
type responses_BranchMigrationPlan = BranchMigrationPlan;
|
|
4807
5288
|
type responses_BulkError = BulkError;
|
|
4808
5289
|
type responses_BulkInsertResponse = BulkInsertResponse;
|
|
4809
|
-
type
|
|
5290
|
+
type responses_QueryResponse = QueryResponse;
|
|
5291
|
+
type responses_RateLimitError = RateLimitError;
|
|
4810
5292
|
type responses_RecordResponse = RecordResponse;
|
|
4811
|
-
type responses_SchemaCompareResponse = SchemaCompareResponse;
|
|
4812
5293
|
type responses_RecordUpdateResponse = RecordUpdateResponse;
|
|
4813
|
-
type
|
|
5294
|
+
type responses_SchemaCompareResponse = SchemaCompareResponse;
|
|
4814
5295
|
type responses_SchemaUpdateResponse = SchemaUpdateResponse;
|
|
4815
|
-
type responses_SummarizeResponse = SummarizeResponse;
|
|
4816
|
-
type responses_AggResponse = AggResponse;
|
|
4817
5296
|
type responses_SearchResponse = SearchResponse;
|
|
4818
|
-
type
|
|
4819
|
-
type
|
|
5297
|
+
type responses_SimpleError = SimpleError;
|
|
5298
|
+
type responses_SummarizeResponse = SummarizeResponse;
|
|
4820
5299
|
declare namespace responses {
|
|
4821
5300
|
export {
|
|
5301
|
+
responses_AggResponse as AggResponse,
|
|
4822
5302
|
responses_AuthError as AuthError,
|
|
4823
5303
|
responses_BadRequestError as BadRequestError,
|
|
4824
|
-
|
|
5304
|
+
responses_BranchMigrationPlan as BranchMigrationPlan,
|
|
4825
5305
|
responses_BulkError as BulkError,
|
|
4826
5306
|
responses_BulkInsertResponse as BulkInsertResponse,
|
|
4827
|
-
|
|
5307
|
+
responses_QueryResponse as QueryResponse,
|
|
5308
|
+
responses_RateLimitError as RateLimitError,
|
|
4828
5309
|
responses_RecordResponse as RecordResponse,
|
|
4829
|
-
responses_SchemaCompareResponse as SchemaCompareResponse,
|
|
4830
5310
|
responses_RecordUpdateResponse as RecordUpdateResponse,
|
|
4831
|
-
|
|
5311
|
+
responses_SchemaCompareResponse as SchemaCompareResponse,
|
|
4832
5312
|
responses_SchemaUpdateResponse as SchemaUpdateResponse,
|
|
4833
|
-
responses_SummarizeResponse as SummarizeResponse,
|
|
4834
|
-
responses_AggResponse as AggResponse,
|
|
4835
5313
|
responses_SearchResponse as SearchResponse,
|
|
4836
|
-
|
|
4837
|
-
|
|
5314
|
+
responses_SimpleError as SimpleError,
|
|
5315
|
+
responses_SummarizeResponse as SummarizeResponse,
|
|
4838
5316
|
};
|
|
4839
5317
|
}
|
|
4840
5318
|
|
|
5319
|
+
type schemas_APIKeyName = APIKeyName;
|
|
5320
|
+
type schemas_AggExpression = AggExpression;
|
|
5321
|
+
type schemas_AggExpressionMap = AggExpressionMap;
|
|
5322
|
+
type schemas_AverageAgg = AverageAgg;
|
|
5323
|
+
type schemas_BoosterExpression = BoosterExpression;
|
|
5324
|
+
type schemas_Branch = Branch;
|
|
4841
5325
|
type schemas_BranchMetadata = BranchMetadata;
|
|
5326
|
+
type schemas_BranchMigration = BranchMigration;
|
|
4842
5327
|
type schemas_BranchName = BranchName;
|
|
4843
|
-
type
|
|
4844
|
-
type
|
|
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;
|
|
5328
|
+
type schemas_BranchOp = BranchOp;
|
|
5329
|
+
type schemas_BranchWithCopyID = BranchWithCopyID;
|
|
4854
5330
|
type schemas_Column = Column;
|
|
4855
5331
|
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
5332
|
type schemas_ColumnMigration = ColumnMigration;
|
|
4865
|
-
type
|
|
4866
|
-
type schemas_Migration = Migration;
|
|
4867
|
-
type schemas_MigrationOp = MigrationOp;
|
|
4868
|
-
type schemas_MigrationTableOp = MigrationTableOp;
|
|
4869
|
-
type schemas_MigrationColumnOp = MigrationColumnOp;
|
|
4870
|
-
type schemas_TableOpAdd = TableOpAdd;
|
|
4871
|
-
type schemas_TableOpRemove = TableOpRemove;
|
|
4872
|
-
type schemas_TableOpRename = TableOpRename;
|
|
5333
|
+
type schemas_ColumnName = ColumnName;
|
|
4873
5334
|
type schemas_ColumnOpAdd = ColumnOpAdd;
|
|
4874
5335
|
type schemas_ColumnOpRemove = ColumnOpRemove;
|
|
4875
5336
|
type schemas_ColumnOpRename = ColumnOpRename;
|
|
4876
|
-
type
|
|
4877
|
-
type
|
|
4878
|
-
type
|
|
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;
|
|
5337
|
+
type schemas_ColumnVector = ColumnVector;
|
|
5338
|
+
type schemas_ColumnsProjection = ColumnsProjection;
|
|
5339
|
+
type schemas_Commit = Commit;
|
|
4888
5340
|
type schemas_CountAgg = CountAgg;
|
|
4889
|
-
type
|
|
4890
|
-
type
|
|
4891
|
-
type
|
|
4892
|
-
type
|
|
4893
|
-
type
|
|
5341
|
+
type schemas_DBBranch = DBBranch;
|
|
5342
|
+
type schemas_DBBranchName = DBBranchName;
|
|
5343
|
+
type schemas_DBName = DBName;
|
|
5344
|
+
type schemas_DataInputRecord = DataInputRecord;
|
|
5345
|
+
type schemas_DatabaseGithubSettings = DatabaseGithubSettings;
|
|
5346
|
+
type schemas_DatabaseMetadata = DatabaseMetadata;
|
|
4894
5347
|
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;
|
|
5348
|
+
type schemas_DateTime = DateTime;
|
|
4900
5349
|
type schemas_FilterColumn = FilterColumn;
|
|
4901
5350
|
type schemas_FilterColumnIncludes = FilterColumnIncludes;
|
|
5351
|
+
type schemas_FilterExpression = FilterExpression;
|
|
5352
|
+
type schemas_FilterList = FilterList;
|
|
4902
5353
|
type schemas_FilterPredicate = FilterPredicate;
|
|
4903
5354
|
type schemas_FilterPredicateOp = FilterPredicateOp;
|
|
4904
5355
|
type schemas_FilterPredicateRangeOp = FilterPredicateRangeOp;
|
|
4905
5356
|
type schemas_FilterRangeValue = FilterRangeValue;
|
|
4906
5357
|
type schemas_FilterValue = FilterValue;
|
|
5358
|
+
type schemas_FuzzinessExpression = FuzzinessExpression;
|
|
5359
|
+
type schemas_HighlightExpression = HighlightExpression;
|
|
5360
|
+
type schemas_InputFileArray = InputFileArray;
|
|
5361
|
+
type schemas_InputFileEntry = InputFileEntry;
|
|
5362
|
+
type schemas_InviteID = InviteID;
|
|
5363
|
+
type schemas_InviteKey = InviteKey;
|
|
5364
|
+
type schemas_ListBranchesResponse = ListBranchesResponse;
|
|
5365
|
+
type schemas_ListDatabasesResponse = ListDatabasesResponse;
|
|
5366
|
+
type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
|
|
5367
|
+
type schemas_ListRegionsResponse = ListRegionsResponse;
|
|
5368
|
+
type schemas_MaxAgg = MaxAgg;
|
|
5369
|
+
type schemas_MetricsDatapoint = MetricsDatapoint;
|
|
5370
|
+
type schemas_MetricsLatency = MetricsLatency;
|
|
5371
|
+
type schemas_Migration = Migration;
|
|
5372
|
+
type schemas_MigrationColumnOp = MigrationColumnOp;
|
|
5373
|
+
type schemas_MigrationObject = MigrationObject;
|
|
5374
|
+
type schemas_MigrationOp = MigrationOp;
|
|
5375
|
+
type schemas_MigrationRequest = MigrationRequest;
|
|
5376
|
+
type schemas_MigrationRequestNumber = MigrationRequestNumber;
|
|
5377
|
+
type schemas_MigrationStatus = MigrationStatus;
|
|
5378
|
+
type schemas_MigrationTableOp = MigrationTableOp;
|
|
5379
|
+
type schemas_MinAgg = MinAgg;
|
|
5380
|
+
type schemas_NumericHistogramAgg = NumericHistogramAgg;
|
|
5381
|
+
type schemas_ObjectValue = ObjectValue;
|
|
4907
5382
|
type schemas_PageConfig = PageConfig;
|
|
4908
|
-
type
|
|
4909
|
-
type schemas_ColumnsProjection = ColumnsProjection;
|
|
4910
|
-
type schemas_RecordMeta = RecordMeta;
|
|
5383
|
+
type schemas_PrefixExpression = PrefixExpression;
|
|
4911
5384
|
type schemas_RecordID = RecordID;
|
|
5385
|
+
type schemas_RecordMeta = RecordMeta;
|
|
5386
|
+
type schemas_RecordsMetadata = RecordsMetadata;
|
|
5387
|
+
type schemas_Region = Region;
|
|
5388
|
+
type schemas_RevLink = RevLink;
|
|
5389
|
+
type schemas_Role = Role;
|
|
5390
|
+
type schemas_Schema = Schema;
|
|
5391
|
+
type schemas_SchemaEditScript = SchemaEditScript;
|
|
5392
|
+
type schemas_SearchPageConfig = SearchPageConfig;
|
|
5393
|
+
type schemas_SortExpression = SortExpression;
|
|
5394
|
+
type schemas_SortOrder = SortOrder;
|
|
5395
|
+
type schemas_StartedFromMetadata = StartedFromMetadata;
|
|
5396
|
+
type schemas_SumAgg = SumAgg;
|
|
5397
|
+
type schemas_SummaryExpression = SummaryExpression;
|
|
5398
|
+
type schemas_SummaryExpressionList = SummaryExpressionList;
|
|
5399
|
+
type schemas_Table = Table;
|
|
5400
|
+
type schemas_TableMigration = TableMigration;
|
|
5401
|
+
type schemas_TableName = TableName;
|
|
5402
|
+
type schemas_TableOpAdd = TableOpAdd;
|
|
5403
|
+
type schemas_TableOpRemove = TableOpRemove;
|
|
5404
|
+
type schemas_TableOpRename = TableOpRename;
|
|
4912
5405
|
type schemas_TableRename = TableRename;
|
|
4913
|
-
type
|
|
4914
|
-
type
|
|
4915
|
-
type schemas_TransactionUpdateOp = TransactionUpdateOp;
|
|
5406
|
+
type schemas_TargetExpression = TargetExpression;
|
|
5407
|
+
type schemas_TopValuesAgg = TopValuesAgg;
|
|
4916
5408
|
type schemas_TransactionDeleteOp = TransactionDeleteOp;
|
|
5409
|
+
type schemas_TransactionError = TransactionError;
|
|
5410
|
+
type schemas_TransactionFailure = TransactionFailure;
|
|
5411
|
+
type schemas_TransactionInsertOp = TransactionInsertOp;
|
|
5412
|
+
type schemas_TransactionResultColumns = TransactionResultColumns;
|
|
5413
|
+
type schemas_TransactionResultDelete = TransactionResultDelete;
|
|
4917
5414
|
type schemas_TransactionResultInsert = TransactionResultInsert;
|
|
4918
5415
|
type schemas_TransactionResultUpdate = TransactionResultUpdate;
|
|
4919
|
-
type
|
|
4920
|
-
type
|
|
5416
|
+
type schemas_TransactionSuccess = TransactionSuccess;
|
|
5417
|
+
type schemas_TransactionUpdateOp = TransactionUpdateOp;
|
|
5418
|
+
type schemas_UniqueCountAgg = UniqueCountAgg;
|
|
4921
5419
|
type schemas_User = User;
|
|
4922
5420
|
type schemas_UserID = UserID;
|
|
4923
5421
|
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
5422
|
type schemas_Workspace = Workspace;
|
|
4929
|
-
type
|
|
4930
|
-
type schemas_InviteID = InviteID;
|
|
5423
|
+
type schemas_WorkspaceID = WorkspaceID;
|
|
4931
5424
|
type schemas_WorkspaceInvite = WorkspaceInvite;
|
|
5425
|
+
type schemas_WorkspaceMember = WorkspaceMember;
|
|
4932
5426
|
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;
|
|
5427
|
+
type schemas_WorkspaceMeta = WorkspaceMeta;
|
|
4938
5428
|
declare namespace schemas {
|
|
4939
5429
|
export {
|
|
5430
|
+
schemas_APIKeyName as APIKeyName,
|
|
5431
|
+
schemas_AggExpression as AggExpression,
|
|
5432
|
+
schemas_AggExpressionMap as AggExpressionMap,
|
|
5433
|
+
AggResponse$1 as AggResponse,
|
|
5434
|
+
schemas_AverageAgg as AverageAgg,
|
|
5435
|
+
schemas_BoosterExpression as BoosterExpression,
|
|
5436
|
+
schemas_Branch as Branch,
|
|
4940
5437
|
schemas_BranchMetadata as BranchMetadata,
|
|
5438
|
+
schemas_BranchMigration as BranchMigration,
|
|
4941
5439
|
schemas_BranchName as BranchName,
|
|
4942
|
-
|
|
4943
|
-
|
|
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,
|
|
5440
|
+
schemas_BranchOp as BranchOp,
|
|
5441
|
+
schemas_BranchWithCopyID as BranchWithCopyID,
|
|
4953
5442
|
schemas_Column as Column,
|
|
4954
5443
|
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
5444
|
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,
|
|
5445
|
+
schemas_ColumnName as ColumnName,
|
|
4972
5446
|
schemas_ColumnOpAdd as ColumnOpAdd,
|
|
4973
5447
|
schemas_ColumnOpRemove as ColumnOpRemove,
|
|
4974
5448
|
schemas_ColumnOpRename as ColumnOpRename,
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
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,
|
|
5449
|
+
schemas_ColumnVector as ColumnVector,
|
|
5450
|
+
schemas_ColumnsProjection as ColumnsProjection,
|
|
5451
|
+
schemas_Commit as Commit,
|
|
4987
5452
|
schemas_CountAgg as CountAgg,
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
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,
|
|
5453
|
+
schemas_DBBranch as DBBranch,
|
|
5454
|
+
schemas_DBBranchName as DBBranchName,
|
|
5455
|
+
schemas_DBName as DBName,
|
|
5456
|
+
schemas_DataInputRecord as DataInputRecord,
|
|
5457
|
+
schemas_DatabaseGithubSettings as DatabaseGithubSettings,
|
|
5458
|
+
schemas_DatabaseMetadata as DatabaseMetadata,
|
|
5000
5459
|
DateBooster$1 as DateBooster,
|
|
5001
|
-
|
|
5460
|
+
schemas_DateHistogramAgg as DateHistogramAgg,
|
|
5461
|
+
schemas_DateTime as DateTime,
|
|
5002
5462
|
schemas_FilterColumn as FilterColumn,
|
|
5003
5463
|
schemas_FilterColumnIncludes as FilterColumnIncludes,
|
|
5464
|
+
schemas_FilterExpression as FilterExpression,
|
|
5465
|
+
schemas_FilterList as FilterList,
|
|
5004
5466
|
schemas_FilterPredicate as FilterPredicate,
|
|
5005
5467
|
schemas_FilterPredicateOp as FilterPredicateOp,
|
|
5006
5468
|
schemas_FilterPredicateRangeOp as FilterPredicateRangeOp,
|
|
5007
5469
|
schemas_FilterRangeValue as FilterRangeValue,
|
|
5008
5470
|
schemas_FilterValue as FilterValue,
|
|
5471
|
+
schemas_FuzzinessExpression as FuzzinessExpression,
|
|
5472
|
+
schemas_HighlightExpression as HighlightExpression,
|
|
5473
|
+
schemas_InputFileArray as InputFileArray,
|
|
5474
|
+
schemas_InputFileEntry as InputFileEntry,
|
|
5475
|
+
schemas_InviteID as InviteID,
|
|
5476
|
+
schemas_InviteKey as InviteKey,
|
|
5477
|
+
schemas_ListBranchesResponse as ListBranchesResponse,
|
|
5478
|
+
schemas_ListDatabasesResponse as ListDatabasesResponse,
|
|
5479
|
+
schemas_ListGitBranchesResponse as ListGitBranchesResponse,
|
|
5480
|
+
schemas_ListRegionsResponse as ListRegionsResponse,
|
|
5481
|
+
schemas_MaxAgg as MaxAgg,
|
|
5482
|
+
schemas_MetricsDatapoint as MetricsDatapoint,
|
|
5483
|
+
schemas_MetricsLatency as MetricsLatency,
|
|
5484
|
+
schemas_Migration as Migration,
|
|
5485
|
+
schemas_MigrationColumnOp as MigrationColumnOp,
|
|
5486
|
+
schemas_MigrationObject as MigrationObject,
|
|
5487
|
+
schemas_MigrationOp as MigrationOp,
|
|
5488
|
+
schemas_MigrationRequest as MigrationRequest,
|
|
5489
|
+
schemas_MigrationRequestNumber as MigrationRequestNumber,
|
|
5490
|
+
schemas_MigrationStatus as MigrationStatus,
|
|
5491
|
+
schemas_MigrationTableOp as MigrationTableOp,
|
|
5492
|
+
schemas_MinAgg as MinAgg,
|
|
5493
|
+
NumericBooster$1 as NumericBooster,
|
|
5494
|
+
schemas_NumericHistogramAgg as NumericHistogramAgg,
|
|
5495
|
+
schemas_ObjectValue as ObjectValue,
|
|
5009
5496
|
schemas_PageConfig as PageConfig,
|
|
5010
|
-
|
|
5011
|
-
schemas_ColumnsProjection as ColumnsProjection,
|
|
5012
|
-
schemas_RecordMeta as RecordMeta,
|
|
5497
|
+
schemas_PrefixExpression as PrefixExpression,
|
|
5013
5498
|
schemas_RecordID as RecordID,
|
|
5014
|
-
|
|
5499
|
+
schemas_RecordMeta as RecordMeta,
|
|
5015
5500
|
schemas_RecordsMetadata as RecordsMetadata,
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5501
|
+
schemas_Region as Region,
|
|
5502
|
+
schemas_RevLink as RevLink,
|
|
5503
|
+
schemas_Role as Role,
|
|
5504
|
+
schemas_Schema as Schema,
|
|
5505
|
+
schemas_SchemaEditScript as SchemaEditScript,
|
|
5506
|
+
schemas_SearchPageConfig as SearchPageConfig,
|
|
5507
|
+
schemas_SortExpression as SortExpression,
|
|
5508
|
+
schemas_SortOrder as SortOrder,
|
|
5509
|
+
schemas_StartedFromMetadata as StartedFromMetadata,
|
|
5510
|
+
schemas_SumAgg as SumAgg,
|
|
5511
|
+
schemas_SummaryExpression as SummaryExpression,
|
|
5512
|
+
schemas_SummaryExpressionList as SummaryExpressionList,
|
|
5513
|
+
schemas_Table as Table,
|
|
5514
|
+
schemas_TableMigration as TableMigration,
|
|
5515
|
+
schemas_TableName as TableName,
|
|
5516
|
+
schemas_TableOpAdd as TableOpAdd,
|
|
5517
|
+
schemas_TableOpRemove as TableOpRemove,
|
|
5518
|
+
schemas_TableOpRename as TableOpRename,
|
|
5519
|
+
schemas_TableRename as TableRename,
|
|
5520
|
+
schemas_TargetExpression as TargetExpression,
|
|
5521
|
+
schemas_TopValuesAgg as TopValuesAgg,
|
|
5020
5522
|
schemas_TransactionDeleteOp as TransactionDeleteOp,
|
|
5523
|
+
schemas_TransactionError as TransactionError,
|
|
5524
|
+
schemas_TransactionFailure as TransactionFailure,
|
|
5525
|
+
schemas_TransactionInsertOp as TransactionInsertOp,
|
|
5526
|
+
TransactionOperation$1 as TransactionOperation,
|
|
5527
|
+
schemas_TransactionResultColumns as TransactionResultColumns,
|
|
5528
|
+
schemas_TransactionResultDelete as TransactionResultDelete,
|
|
5021
5529
|
schemas_TransactionResultInsert as TransactionResultInsert,
|
|
5022
5530
|
schemas_TransactionResultUpdate as TransactionResultUpdate,
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5531
|
+
schemas_TransactionSuccess as TransactionSuccess,
|
|
5532
|
+
schemas_TransactionUpdateOp as TransactionUpdateOp,
|
|
5533
|
+
schemas_UniqueCountAgg as UniqueCountAgg,
|
|
5026
5534
|
schemas_User as User,
|
|
5027
5535
|
schemas_UserID as UserID,
|
|
5028
5536
|
schemas_UserWithID as UserWithID,
|
|
5029
|
-
|
|
5030
|
-
schemas_WorkspaceID as WorkspaceID,
|
|
5031
|
-
schemas_Role as Role,
|
|
5032
|
-
schemas_WorkspaceMeta as WorkspaceMeta,
|
|
5537
|
+
ValueBooster$1 as ValueBooster,
|
|
5033
5538
|
schemas_Workspace as Workspace,
|
|
5034
|
-
|
|
5035
|
-
schemas_InviteID as InviteID,
|
|
5539
|
+
schemas_WorkspaceID as WorkspaceID,
|
|
5036
5540
|
schemas_WorkspaceInvite as WorkspaceInvite,
|
|
5541
|
+
schemas_WorkspaceMember as WorkspaceMember,
|
|
5037
5542
|
schemas_WorkspaceMembers as WorkspaceMembers,
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
schemas_ListDatabasesResponse as ListDatabasesResponse,
|
|
5041
|
-
schemas_ListRegionsResponse as ListRegionsResponse,
|
|
5042
|
-
schemas_Region as Region,
|
|
5543
|
+
schemas_WorkspaceMeta as WorkspaceMeta,
|
|
5544
|
+
XataRecord$1 as XataRecord,
|
|
5043
5545
|
};
|
|
5044
5546
|
}
|
|
5045
5547
|
|
|
@@ -5050,6 +5552,7 @@ interface XataApiClientOptions {
|
|
|
5050
5552
|
host?: HostProvider;
|
|
5051
5553
|
trace?: TraceFunction;
|
|
5052
5554
|
clientName?: string;
|
|
5555
|
+
xataAgentExtra?: Record<string, string>;
|
|
5053
5556
|
}
|
|
5054
5557
|
declare class XataApiClient {
|
|
5055
5558
|
#private;
|
|
@@ -5170,6 +5673,14 @@ declare class BranchApi {
|
|
|
5170
5673
|
database: DBName;
|
|
5171
5674
|
branch: BranchName;
|
|
5172
5675
|
}): Promise<DeleteBranchResponse>;
|
|
5676
|
+
copyBranch({ workspace, region, database, branch, destinationBranch, limit }: {
|
|
5677
|
+
workspace: WorkspaceID;
|
|
5678
|
+
region: string;
|
|
5679
|
+
database: DBName;
|
|
5680
|
+
branch: BranchName;
|
|
5681
|
+
destinationBranch: BranchName;
|
|
5682
|
+
limit?: number;
|
|
5683
|
+
}): Promise<BranchWithCopyID>;
|
|
5173
5684
|
updateBranchMetadata({ workspace, region, database, branch, metadata }: {
|
|
5174
5685
|
workspace: WorkspaceID;
|
|
5175
5686
|
region: string;
|
|
@@ -5422,6 +5933,26 @@ declare class SearchAndFilterApi {
|
|
|
5422
5933
|
prefix?: PrefixExpression;
|
|
5423
5934
|
highlight?: HighlightExpression;
|
|
5424
5935
|
}): Promise<SearchResponse>;
|
|
5936
|
+
vectorSearchTable({ workspace, region, database, branch, table, queryVector, column, similarityFunction, size, filter }: {
|
|
5937
|
+
workspace: WorkspaceID;
|
|
5938
|
+
region: string;
|
|
5939
|
+
database: DBName;
|
|
5940
|
+
branch: BranchName;
|
|
5941
|
+
table: TableName;
|
|
5942
|
+
queryVector: number[];
|
|
5943
|
+
column: string;
|
|
5944
|
+
similarityFunction?: string;
|
|
5945
|
+
size?: number;
|
|
5946
|
+
filter?: FilterExpression;
|
|
5947
|
+
}): Promise<SearchResponse>;
|
|
5948
|
+
askTable({ workspace, region, database, branch, table, options }: {
|
|
5949
|
+
workspace: WorkspaceID;
|
|
5950
|
+
region: string;
|
|
5951
|
+
database: DBName;
|
|
5952
|
+
branch: BranchName;
|
|
5953
|
+
table: TableName;
|
|
5954
|
+
options: AskTableRequestBody;
|
|
5955
|
+
}): Promise<AskTableResponse>;
|
|
5425
5956
|
summarizeTable({ workspace, region, database, branch, table, filter, columns, summaries, sort, summariesFilter, page, consistency }: {
|
|
5426
5957
|
workspace: WorkspaceID;
|
|
5427
5958
|
region: string;
|
|
@@ -5507,7 +6038,7 @@ declare class MigrationRequestsApi {
|
|
|
5507
6038
|
region: string;
|
|
5508
6039
|
database: DBName;
|
|
5509
6040
|
migrationRequest: MigrationRequestNumber;
|
|
5510
|
-
}): Promise<
|
|
6041
|
+
}): Promise<BranchOp>;
|
|
5511
6042
|
}
|
|
5512
6043
|
declare class MigrationsApi {
|
|
5513
6044
|
private extraProps;
|
|
@@ -5545,20 +6076,23 @@ declare class MigrationsApi {
|
|
|
5545
6076
|
size?: number;
|
|
5546
6077
|
};
|
|
5547
6078
|
}): Promise<GetBranchSchemaHistoryResponse>;
|
|
5548
|
-
compareBranchWithUserSchema({ workspace, region, database, branch, schema }: {
|
|
6079
|
+
compareBranchWithUserSchema({ workspace, region, database, branch, schema, schemaOperations, branchOperations }: {
|
|
5549
6080
|
workspace: WorkspaceID;
|
|
5550
6081
|
region: string;
|
|
5551
6082
|
database: DBName;
|
|
5552
6083
|
branch: BranchName;
|
|
5553
6084
|
schema: Schema;
|
|
6085
|
+
schemaOperations?: MigrationOp[];
|
|
6086
|
+
branchOperations?: MigrationOp[];
|
|
5554
6087
|
}): Promise<SchemaCompareResponse>;
|
|
5555
|
-
compareBranchSchemas({ workspace, region, database, branch, compare,
|
|
6088
|
+
compareBranchSchemas({ workspace, region, database, branch, compare, sourceBranchOperations, targetBranchOperations }: {
|
|
5556
6089
|
workspace: WorkspaceID;
|
|
5557
6090
|
region: string;
|
|
5558
6091
|
database: DBName;
|
|
5559
6092
|
branch: BranchName;
|
|
5560
6093
|
compare: BranchName;
|
|
5561
|
-
|
|
6094
|
+
sourceBranchOperations?: MigrationOp[];
|
|
6095
|
+
targetBranchOperations?: MigrationOp[];
|
|
5562
6096
|
}): Promise<SchemaCompareResponse>;
|
|
5563
6097
|
updateBranchSchema({ workspace, region, database, branch, migration }: {
|
|
5564
6098
|
workspace: WorkspaceID;
|
|
@@ -5583,6 +6117,13 @@ declare class MigrationsApi {
|
|
|
5583
6117
|
branch: BranchName;
|
|
5584
6118
|
edits: SchemaEditScript;
|
|
5585
6119
|
}): Promise<SchemaUpdateResponse>;
|
|
6120
|
+
pushBranchMigrations({ workspace, region, database, branch, migrations }: {
|
|
6121
|
+
workspace: WorkspaceID;
|
|
6122
|
+
region: string;
|
|
6123
|
+
database: DBName;
|
|
6124
|
+
branch: BranchName;
|
|
6125
|
+
migrations: MigrationObject[];
|
|
6126
|
+
}): Promise<SchemaUpdateResponse>;
|
|
5586
6127
|
}
|
|
5587
6128
|
declare class DatabaseApi {
|
|
5588
6129
|
private extraProps;
|
|
@@ -5608,13 +6149,26 @@ declare class DatabaseApi {
|
|
|
5608
6149
|
database: DBName;
|
|
5609
6150
|
metadata: DatabaseMetadata;
|
|
5610
6151
|
}): Promise<DatabaseMetadata>;
|
|
6152
|
+
getDatabaseGithubSettings({ workspace, database }: {
|
|
6153
|
+
workspace: WorkspaceID;
|
|
6154
|
+
database: DBName;
|
|
6155
|
+
}): Promise<DatabaseGithubSettings>;
|
|
6156
|
+
updateDatabaseGithubSettings({ workspace, database, settings }: {
|
|
6157
|
+
workspace: WorkspaceID;
|
|
6158
|
+
database: DBName;
|
|
6159
|
+
settings: DatabaseGithubSettings;
|
|
6160
|
+
}): Promise<DatabaseGithubSettings>;
|
|
6161
|
+
deleteDatabaseGithubSettings({ workspace, database }: {
|
|
6162
|
+
workspace: WorkspaceID;
|
|
6163
|
+
database: DBName;
|
|
6164
|
+
}): Promise<void>;
|
|
5611
6165
|
listRegions({ workspace }: {
|
|
5612
6166
|
workspace: WorkspaceID;
|
|
5613
6167
|
}): Promise<ListRegionsResponse>;
|
|
5614
6168
|
}
|
|
5615
6169
|
|
|
5616
6170
|
declare class XataApiPlugin implements XataPlugin {
|
|
5617
|
-
build(options: XataPluginOptions):
|
|
6171
|
+
build(options: XataPluginOptions): XataApiClient;
|
|
5618
6172
|
}
|
|
5619
6173
|
|
|
5620
6174
|
type StringKeys<O> = Extract<keyof O, string>;
|
|
@@ -5663,7 +6217,7 @@ type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = Xat
|
|
|
5663
6217
|
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
6218
|
V: ValueAtColumn<Item, V>;
|
|
5665
6219
|
} : never : O[K] : never> : never : never;
|
|
5666
|
-
type MAX_RECURSION =
|
|
6220
|
+
type MAX_RECURSION = 2;
|
|
5667
6221
|
type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
|
|
5668
6222
|
[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
6223
|
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
|
|
@@ -5700,9 +6254,13 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
|
|
|
5700
6254
|
*/
|
|
5701
6255
|
getMetadata(): XataRecordMetadata;
|
|
5702
6256
|
/**
|
|
5703
|
-
* Get
|
|
6257
|
+
* Get an object representation of this record.
|
|
6258
|
+
*/
|
|
6259
|
+
toSerializable(): JSONData<OriginalRecord>;
|
|
6260
|
+
/**
|
|
6261
|
+
* Get a string representation of this record.
|
|
5704
6262
|
*/
|
|
5705
|
-
|
|
6263
|
+
toString(): string;
|
|
5706
6264
|
/**
|
|
5707
6265
|
* Retrieves a refreshed copy of the current record from the database.
|
|
5708
6266
|
* @param columns The columns to retrieve. If not specified, all first level properties are retrieved.
|
|
@@ -5775,11 +6333,20 @@ type XataRecordMetadata = {
|
|
|
5775
6333
|
};
|
|
5776
6334
|
declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
|
|
5777
6335
|
declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
|
|
6336
|
+
type NumericOperator = ExclusiveOr<{
|
|
6337
|
+
$increment?: number;
|
|
6338
|
+
}, ExclusiveOr<{
|
|
6339
|
+
$decrement?: number;
|
|
6340
|
+
}, ExclusiveOr<{
|
|
6341
|
+
$multiply?: number;
|
|
6342
|
+
}, {
|
|
6343
|
+
$divide?: number;
|
|
6344
|
+
}>>>;
|
|
5778
6345
|
type EditableDataFields<T> = T extends XataRecord ? {
|
|
5779
6346
|
id: string;
|
|
5780
6347
|
} | string : NonNullable<T> extends XataRecord ? {
|
|
5781
6348
|
id: string;
|
|
5782
|
-
} | string | null | undefined : T extends Date ? string | Date : NonNullable<T> extends Date ? string | Date | null | undefined : T;
|
|
6349
|
+
} | string | null | undefined : T extends Date ? string | Date : NonNullable<T> extends Date ? string | Date | null | undefined : T extends number ? number | NumericOperator : T;
|
|
5783
6350
|
type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
|
|
5784
6351
|
[K in keyof O]: EditableDataFields<O[K]>;
|
|
5785
6352
|
}, keyof XataRecord>>;
|
|
@@ -6002,7 +6569,7 @@ declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends X
|
|
|
6002
6569
|
#private;
|
|
6003
6570
|
private db;
|
|
6004
6571
|
constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
|
|
6005
|
-
build(
|
|
6572
|
+
build(pluginOptions: XataPluginOptions): SearchPluginResult<Schemas>;
|
|
6006
6573
|
}
|
|
6007
6574
|
type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
|
|
6008
6575
|
getMetadata: () => XataRecordMetadata & SearchExtraProperties;
|
|
@@ -6192,6 +6759,40 @@ type ComplexAggregationResult = {
|
|
|
6192
6759
|
}>;
|
|
6193
6760
|
};
|
|
6194
6761
|
|
|
6762
|
+
type KeywordAskOptions<Record extends XataRecord> = {
|
|
6763
|
+
searchType: 'keyword';
|
|
6764
|
+
search?: {
|
|
6765
|
+
fuzziness?: FuzzinessExpression;
|
|
6766
|
+
target?: TargetColumn<Record>[];
|
|
6767
|
+
prefix?: PrefixExpression;
|
|
6768
|
+
filter?: Filter<Record>;
|
|
6769
|
+
boosters?: Boosters<Record>[];
|
|
6770
|
+
};
|
|
6771
|
+
};
|
|
6772
|
+
type VectorAskOptions<Record extends XataRecord> = {
|
|
6773
|
+
searchType: 'vector';
|
|
6774
|
+
vectorSearch?: {
|
|
6775
|
+
/**
|
|
6776
|
+
* The column to use for vector search. It must be of type `vector`.
|
|
6777
|
+
*/
|
|
6778
|
+
column: string;
|
|
6779
|
+
/**
|
|
6780
|
+
* The column containing the text for vector search. Must be of type `text`.
|
|
6781
|
+
*/
|
|
6782
|
+
contentColumn: string;
|
|
6783
|
+
filter?: Filter<Record>;
|
|
6784
|
+
};
|
|
6785
|
+
};
|
|
6786
|
+
type TypeAskOptions<Record extends XataRecord> = KeywordAskOptions<Record> | VectorAskOptions<Record>;
|
|
6787
|
+
type BaseAskOptions = {
|
|
6788
|
+
rules?: string[];
|
|
6789
|
+
};
|
|
6790
|
+
type AskOptions<Record extends XataRecord> = TypeAskOptions<Record> & BaseAskOptions;
|
|
6791
|
+
type AskResult = {
|
|
6792
|
+
answer?: string;
|
|
6793
|
+
records?: string[];
|
|
6794
|
+
};
|
|
6795
|
+
|
|
6195
6796
|
type SortDirection = 'asc' | 'desc';
|
|
6196
6797
|
type SortFilterExtended<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = {
|
|
6197
6798
|
column: Columns;
|
|
@@ -6220,6 +6821,7 @@ type SummarizeParams<Record extends XataRecord, Expression extends Dictionary<Su
|
|
|
6220
6821
|
pagination?: {
|
|
6221
6822
|
size: number;
|
|
6222
6823
|
};
|
|
6824
|
+
consistency?: 'strong' | 'eventual';
|
|
6223
6825
|
};
|
|
6224
6826
|
type SummarizeResult<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
|
|
6225
6827
|
summaries: SummarizeResultItem<Record, Expression, Columns>[];
|
|
@@ -6587,6 +7189,8 @@ declare class RecordArray<Result extends XataRecord> extends Array<Result> {
|
|
|
6587
7189
|
constructor(page: Paginable<any, Result>, overrideRecords?: Result[]);
|
|
6588
7190
|
static parseConstructorParams(...args: any[]): any[];
|
|
6589
7191
|
toArray(): Result[];
|
|
7192
|
+
toSerializable(): JSONData<Result>[];
|
|
7193
|
+
toString(): string;
|
|
6590
7194
|
map<U>(callbackfn: (value: Result, index: number, array: Result[]) => U, thisArg?: any): U[];
|
|
6591
7195
|
/**
|
|
6592
7196
|
* Retrieve next page of records
|
|
@@ -7113,6 +7717,30 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
|
7113
7717
|
page?: SearchPageConfig;
|
|
7114
7718
|
target?: TargetColumn<Record>[];
|
|
7115
7719
|
}): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
|
|
7720
|
+
/**
|
|
7721
|
+
* Search for vectors in the table.
|
|
7722
|
+
* @param column The column to search for.
|
|
7723
|
+
* @param query The vector to search for similarities. Must have the same dimension as the vector column used.
|
|
7724
|
+
* @param options The options to search with (like: spaceFunction)
|
|
7725
|
+
*/
|
|
7726
|
+
abstract vectorSearch<F extends ColumnsByValue<Record, number[]>>(column: F, query: number[], options?: {
|
|
7727
|
+
/**
|
|
7728
|
+
* The function used to measure the distance between two points. Can be one of:
|
|
7729
|
+
* `cosineSimilarity`, `l1`, `l2`. The default is `cosineSimilarity`.
|
|
7730
|
+
*
|
|
7731
|
+
* @default cosineSimilarity
|
|
7732
|
+
*/
|
|
7733
|
+
similarityFunction?: string;
|
|
7734
|
+
/**
|
|
7735
|
+
* Number of results to return.
|
|
7736
|
+
*
|
|
7737
|
+
* @default 10
|
|
7738
|
+
* @maximum 100
|
|
7739
|
+
* @minimum 1
|
|
7740
|
+
*/
|
|
7741
|
+
size?: number;
|
|
7742
|
+
filter?: Filter<Record>;
|
|
7743
|
+
}): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
|
|
7116
7744
|
/**
|
|
7117
7745
|
* Aggregates records in the table.
|
|
7118
7746
|
* @param expression The aggregations to perform.
|
|
@@ -7120,6 +7748,16 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
|
7120
7748
|
* @returns The requested aggregations.
|
|
7121
7749
|
*/
|
|
7122
7750
|
abstract aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(expression?: Expression, filter?: Filter<Record>): Promise<AggregationResult<Record, Expression>>;
|
|
7751
|
+
/**
|
|
7752
|
+
* Experimental: Ask the database to perform a natural language question.
|
|
7753
|
+
*/
|
|
7754
|
+
abstract ask(question: string, options?: AskOptions<Record>): Promise<AskResult>;
|
|
7755
|
+
/**
|
|
7756
|
+
* Experimental: Ask the database to perform a natural language question.
|
|
7757
|
+
*/
|
|
7758
|
+
abstract ask(question: string, options: AskOptions<Record> & {
|
|
7759
|
+
onMessage: (message: AskResult) => void;
|
|
7760
|
+
}): void;
|
|
7123
7761
|
abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
|
|
7124
7762
|
}
|
|
7125
7763
|
declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
|
|
@@ -7241,9 +7879,17 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
|
|
|
7241
7879
|
page?: SearchPageConfig;
|
|
7242
7880
|
target?: TargetColumn<Record>[];
|
|
7243
7881
|
}): Promise<any>;
|
|
7882
|
+
vectorSearch<F extends ColumnsByValue<Record, number[]>>(column: F, query: number[], options?: {
|
|
7883
|
+
similarityFunction?: string | undefined;
|
|
7884
|
+
size?: number | undefined;
|
|
7885
|
+
filter?: Filter<Record> | undefined;
|
|
7886
|
+
} | undefined): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
|
|
7244
7887
|
aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
|
|
7245
7888
|
query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
|
|
7246
7889
|
summarizeTable<Result extends XataRecord>(query: Query<Record, Result>, summaries?: Dictionary<SummarizeExpression<Record>>, summariesFilter?: FilterExpression): Promise<SummarizeResponse>;
|
|
7890
|
+
ask(question: string, options?: AskOptions<Record> & {
|
|
7891
|
+
onMessage?: (message: AskResult) => void;
|
|
7892
|
+
}): any;
|
|
7247
7893
|
}
|
|
7248
7894
|
|
|
7249
7895
|
type BaseSchema = {
|
|
@@ -7299,7 +7945,7 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
|
|
|
7299
7945
|
} : {
|
|
7300
7946
|
[K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
|
|
7301
7947
|
} : never : never;
|
|
7302
|
-
type InnerType<Type, ObjectColumns, Tables, LinkedTable> = Type extends 'string' | 'text' | 'email' ? string : Type extends 'int' | 'float' ? number : Type extends 'bool' ? boolean : Type extends 'datetime' ? Date : Type extends 'multiple' ? string[] : Type extends 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
|
|
7948
|
+
type InnerType<Type, ObjectColumns, Tables, LinkedTable> = Type extends 'string' | 'text' | 'email' ? string : Type extends 'int' | 'float' ? number : Type extends 'bool' ? boolean : Type extends 'datetime' ? Date : Type extends 'multiple' ? string[] : Type extends 'vector' ? number[] : Type extends 'object' ? ObjectColumns extends readonly unknown[] ? ObjectColumns[number] extends {
|
|
7303
7949
|
name: string;
|
|
7304
7950
|
type: string;
|
|
7305
7951
|
} ? UnionToIntersection<Values<{
|
|
@@ -7497,23 +8143,20 @@ type TransactionPluginResult<Schemas extends Record<string, XataRecord>> = {
|
|
|
7497
8143
|
run: <Tables extends StringKeys<Schemas>, Operations extends TransactionOperation<Schemas, Tables>[]>(operations: Narrow<Operations>) => Promise<TransactionResults<Schemas, Tables, Operations>>;
|
|
7498
8144
|
};
|
|
7499
8145
|
declare class TransactionPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
|
7500
|
-
build(
|
|
8146
|
+
build(pluginOptions: XataPluginOptions): TransactionPluginResult<Schemas>;
|
|
7501
8147
|
}
|
|
7502
8148
|
|
|
7503
|
-
type BranchStrategyValue = string | undefined | null;
|
|
7504
|
-
type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
|
|
7505
|
-
type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
|
|
7506
|
-
type BranchStrategyOption = NonNullable<BranchStrategy | BranchStrategy[]>;
|
|
7507
|
-
|
|
7508
8149
|
type BaseClientOptions = {
|
|
7509
8150
|
fetch?: FetchImpl;
|
|
8151
|
+
host?: HostProvider;
|
|
7510
8152
|
apiKey?: string;
|
|
7511
8153
|
databaseURL?: string;
|
|
7512
|
-
branch?:
|
|
8154
|
+
branch?: string;
|
|
7513
8155
|
cache?: CacheImpl;
|
|
7514
8156
|
trace?: TraceFunction;
|
|
7515
8157
|
enableBrowser?: boolean;
|
|
7516
8158
|
clientName?: string;
|
|
8159
|
+
xataAgentExtra?: Record<string, string>;
|
|
7517
8160
|
};
|
|
7518
8161
|
declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
|
|
7519
8162
|
interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
|
@@ -7550,17 +8193,14 @@ type SerializerResult<T> = T extends XataRecord ? Identifiable & Omit<{
|
|
|
7550
8193
|
[K in keyof T]: SerializerResult<T[K]>;
|
|
7551
8194
|
}, keyof XataRecord> : T extends any[] ? SerializerResult<T[number]>[] : T;
|
|
7552
8195
|
|
|
7553
|
-
type BranchResolutionOptions = {
|
|
7554
|
-
databaseURL?: string;
|
|
7555
|
-
apiKey?: string;
|
|
7556
|
-
fetchImpl?: FetchImpl;
|
|
7557
|
-
clientName?: string;
|
|
7558
|
-
};
|
|
7559
|
-
declare function getCurrentBranchName(options?: BranchResolutionOptions): Promise<string>;
|
|
7560
|
-
declare function getCurrentBranchDetails(options?: BranchResolutionOptions): Promise<DBBranch | null>;
|
|
7561
8196
|
declare function getDatabaseURL(): string | undefined;
|
|
7562
|
-
|
|
7563
8197
|
declare function getAPIKey(): string | undefined;
|
|
8198
|
+
declare function getBranch(): string | undefined;
|
|
8199
|
+
declare function buildPreviewBranchName({ org, branch }: {
|
|
8200
|
+
org: string;
|
|
8201
|
+
branch: string;
|
|
8202
|
+
}): string;
|
|
8203
|
+
declare function getPreviewBranch(): string | undefined;
|
|
7564
8204
|
|
|
7565
8205
|
interface Body {
|
|
7566
8206
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
@@ -7647,4 +8287,4 @@ declare class XataError extends Error {
|
|
|
7647
8287
|
constructor(message: string, status: number);
|
|
7648
8288
|
}
|
|
7649
8289
|
|
|
7650
|
-
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 };
|
|
8290
|
+
export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApiExtraProps, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditVariables, AskOptions, AskResult, AskTableError, AskTablePathParams, AskTableRequestBody, AskTableResponse, AskTableVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BranchTransactionError, BranchTransactionPathParams, BranchTransactionRequestBody, BranchTransactionVariables, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasRequestBody, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CopyBranchError, CopyBranchPathParams, CopyBranchRequestBody, CopyBranchVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabaseGithubSettingsError, DeleteDatabaseGithubSettingsPathParams, DeleteDatabaseGithubSettingsVariables, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, DeserializedType, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherError, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseGithubSettingsError, GetDatabaseGithubSettingsPathParams, GetDatabaseGithubSettingsVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, KeywordAskOptions, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, PushBranchMigrationsError, PushBranchMigrationsPathParams, PushBranchMigrationsRequestBody, PushBranchMigrationsVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, SerializedString, Serializer, SerializerResult, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SqlQueryError, SqlQueryPathParams, SqlQueryRequestBody, SqlQueryVariables, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseGithubSettingsError, UpdateDatabaseGithubSettingsPathParams, UpdateDatabaseGithubSettingsVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, VectorAskOptions, VectorSearchTableError, VectorSearchTablePathParams, VectorSearchTableRequestBody, VectorSearchTableVariables, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, askTable, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, pushBranchMigrations, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|