@xata.io/client 0.20.2 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/index.cjs +181 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +840 -582
- package/dist/index.mjs +181 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -22,26 +22,28 @@ declare class SimpleCache implements CacheImpl {
|
|
22
22
|
clear(): Promise<void>;
|
23
23
|
}
|
24
24
|
|
25
|
-
|
26
|
-
|
25
|
+
type AttributeDictionary = Record<string, string | number | boolean | undefined>;
|
26
|
+
type TraceFunction = <T>(name: string, fn: (options: {
|
27
|
+
name?: string;
|
27
28
|
setAttributes: (attrs: AttributeDictionary) => void;
|
28
29
|
}) => T, options?: AttributeDictionary) => Promise<T>;
|
29
30
|
|
30
31
|
declare abstract class XataPlugin {
|
31
32
|
abstract build(options: XataPluginOptions): unknown | Promise<unknown>;
|
32
33
|
}
|
33
|
-
|
34
|
+
type XataPluginOptions = {
|
34
35
|
getFetchProps: () => Promise<ApiExtraProps>;
|
35
36
|
cache: CacheImpl;
|
36
37
|
trace?: TraceFunction;
|
37
38
|
};
|
38
39
|
|
39
|
-
|
40
|
+
type RequestInit = {
|
40
41
|
body?: string;
|
41
42
|
headers?: Record<string, string>;
|
42
43
|
method?: string;
|
43
44
|
signal?: any;
|
44
|
-
}
|
45
|
+
};
|
46
|
+
type Response = {
|
45
47
|
ok: boolean;
|
46
48
|
status: number;
|
47
49
|
url: string;
|
@@ -49,9 +51,11 @@ declare type FetchImpl = (url: string, init?: {
|
|
49
51
|
headers?: {
|
50
52
|
get(name: string): string | null;
|
51
53
|
};
|
52
|
-
}
|
53
|
-
|
54
|
-
|
54
|
+
};
|
55
|
+
type FetchImpl = (url: string, init?: RequestInit) => Promise<Response>;
|
56
|
+
|
57
|
+
type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
|
58
|
+
type FetcherExtraProps = {
|
55
59
|
endpoint: 'controlPlane' | 'dataPlane';
|
56
60
|
apiUrl: string;
|
57
61
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
@@ -61,10 +65,11 @@ declare type FetcherExtraProps = {
|
|
61
65
|
signal?: AbortSignal;
|
62
66
|
clientID?: string;
|
63
67
|
sessionID?: string;
|
68
|
+
clientName?: string;
|
64
69
|
fetchOptions?: Record<string, unknown>;
|
65
70
|
};
|
66
71
|
|
67
|
-
|
72
|
+
type ControlPlaneFetcherExtraProps = {
|
68
73
|
apiUrl: string;
|
69
74
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
70
75
|
fetchImpl: FetchImpl;
|
@@ -73,8 +78,9 @@ declare type ControlPlaneFetcherExtraProps = {
|
|
73
78
|
signal?: AbortSignal;
|
74
79
|
clientID?: string;
|
75
80
|
sessionID?: string;
|
81
|
+
clientName?: string;
|
76
82
|
};
|
77
|
-
|
83
|
+
type ErrorWrapper$1<TError> = TError | {
|
78
84
|
status: 'unknown';
|
79
85
|
payload: string;
|
80
86
|
};
|
@@ -84,7 +90,7 @@ declare type ErrorWrapper$1<TError> = TError | {
|
|
84
90
|
*
|
85
91
|
* @version 1.0
|
86
92
|
*/
|
87
|
-
|
93
|
+
type User = {
|
88
94
|
/**
|
89
95
|
* @format email
|
90
96
|
*/
|
@@ -95,38 +101,38 @@ declare type User = {
|
|
95
101
|
/**
|
96
102
|
* @pattern [a-zA-Z0-9_-~:]+
|
97
103
|
*/
|
98
|
-
|
99
|
-
|
104
|
+
type UserID = string;
|
105
|
+
type UserWithID = User & {
|
100
106
|
id: UserID;
|
101
107
|
};
|
102
108
|
/**
|
103
109
|
* @format date-time
|
104
110
|
* @x-go-type string
|
105
111
|
*/
|
106
|
-
|
112
|
+
type DateTime$1 = string;
|
107
113
|
/**
|
108
114
|
* @pattern [a-zA-Z0-9_\-~]*
|
109
115
|
*/
|
110
|
-
|
116
|
+
type APIKeyName = string;
|
111
117
|
/**
|
112
118
|
* @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
|
113
119
|
* @x-go-type auth.WorkspaceID
|
114
120
|
*/
|
115
|
-
|
121
|
+
type WorkspaceID = string;
|
116
122
|
/**
|
117
123
|
* @x-go-type auth.Role
|
118
124
|
*/
|
119
|
-
|
120
|
-
|
125
|
+
type Role = 'owner' | 'maintainer';
|
126
|
+
type WorkspaceMeta = {
|
121
127
|
name: string;
|
122
128
|
slug?: string;
|
123
129
|
};
|
124
|
-
|
130
|
+
type Workspace = WorkspaceMeta & {
|
125
131
|
id: WorkspaceID;
|
126
132
|
memberCount: number;
|
127
133
|
plan: 'free' | 'pro';
|
128
134
|
};
|
129
|
-
|
135
|
+
type WorkspaceMember = {
|
130
136
|
userId: UserID;
|
131
137
|
fullname: string;
|
132
138
|
/**
|
@@ -138,8 +144,8 @@ declare type WorkspaceMember = {
|
|
138
144
|
/**
|
139
145
|
* @pattern [a-zA-Z0-9]+
|
140
146
|
*/
|
141
|
-
|
142
|
-
|
147
|
+
type InviteID = string;
|
148
|
+
type WorkspaceInvite = {
|
143
149
|
inviteId: InviteID;
|
144
150
|
/**
|
145
151
|
* @format email
|
@@ -151,18 +157,18 @@ declare type WorkspaceInvite = {
|
|
151
157
|
expires: string;
|
152
158
|
role: Role;
|
153
159
|
};
|
154
|
-
|
160
|
+
type WorkspaceMembers = {
|
155
161
|
members: WorkspaceMember[];
|
156
162
|
invites: WorkspaceInvite[];
|
157
163
|
};
|
158
164
|
/**
|
159
165
|
* @pattern ^ik_[a-zA-Z0-9]+
|
160
166
|
*/
|
161
|
-
|
167
|
+
type InviteKey = string;
|
162
168
|
/**
|
163
169
|
* Metadata of databases
|
164
170
|
*/
|
165
|
-
|
171
|
+
type DatabaseMetadata = {
|
166
172
|
/**
|
167
173
|
* The machine-readable name of a database
|
168
174
|
*/
|
@@ -185,7 +191,7 @@ declare type DatabaseMetadata = {
|
|
185
191
|
color?: string;
|
186
192
|
};
|
187
193
|
};
|
188
|
-
|
194
|
+
type ListDatabasesResponse = {
|
189
195
|
/**
|
190
196
|
* A list of databases in a Xata workspace
|
191
197
|
*/
|
@@ -195,7 +201,7 @@ declare type ListDatabasesResponse = {
|
|
195
201
|
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
|
196
202
|
* @x-go-type xata.BranchMetadata
|
197
203
|
*/
|
198
|
-
|
204
|
+
type BranchMetadata$1 = {
|
199
205
|
/**
|
200
206
|
* @minLength 1
|
201
207
|
*/
|
@@ -210,19 +216,19 @@ declare type BranchMetadata$1 = {
|
|
210
216
|
/**
|
211
217
|
* @pattern [a-zA-Z0-9_\-~]+
|
212
218
|
*/
|
213
|
-
|
219
|
+
type BranchName$1 = string;
|
214
220
|
/**
|
215
221
|
* @pattern [a-zA-Z0-9_\-~]+
|
216
222
|
*/
|
217
|
-
|
218
|
-
|
219
|
-
|
223
|
+
type DBName$1 = string;
|
224
|
+
type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
|
225
|
+
type ListRegionsResponse = {
|
220
226
|
/**
|
221
227
|
* A list of regions where databases can be created
|
222
228
|
*/
|
223
229
|
regions: Region[];
|
224
230
|
};
|
225
|
-
|
231
|
+
type Region = {
|
226
232
|
id: string;
|
227
233
|
};
|
228
234
|
|
@@ -231,18 +237,18 @@ declare type Region = {
|
|
231
237
|
*
|
232
238
|
* @version 1.0
|
233
239
|
*/
|
234
|
-
|
240
|
+
type SimpleError$1 = {
|
235
241
|
id?: string;
|
236
242
|
message: string;
|
237
243
|
};
|
238
|
-
|
244
|
+
type BadRequestError$1 = {
|
239
245
|
id?: string;
|
240
246
|
message: string;
|
241
247
|
};
|
242
248
|
/**
|
243
249
|
* @example {"message":"invalid API key"}
|
244
250
|
*/
|
245
|
-
|
251
|
+
type AuthError$1 = {
|
246
252
|
id?: string;
|
247
253
|
message: string;
|
248
254
|
};
|
@@ -253,7 +259,7 @@ declare type AuthError$1 = {
|
|
253
259
|
* @version 1.0
|
254
260
|
*/
|
255
261
|
|
256
|
-
|
262
|
+
type GetUserError = ErrorWrapper$1<{
|
257
263
|
status: 400;
|
258
264
|
payload: BadRequestError$1;
|
259
265
|
} | {
|
@@ -263,12 +269,12 @@ declare type GetUserError = ErrorWrapper$1<{
|
|
263
269
|
status: 404;
|
264
270
|
payload: SimpleError$1;
|
265
271
|
}>;
|
266
|
-
|
272
|
+
type GetUserVariables = ControlPlaneFetcherExtraProps;
|
267
273
|
/**
|
268
274
|
* Return details of the user making the request
|
269
275
|
*/
|
270
276
|
declare const getUser: (variables: GetUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
|
271
|
-
|
277
|
+
type UpdateUserError = ErrorWrapper$1<{
|
272
278
|
status: 400;
|
273
279
|
payload: BadRequestError$1;
|
274
280
|
} | {
|
@@ -278,14 +284,14 @@ declare type UpdateUserError = ErrorWrapper$1<{
|
|
278
284
|
status: 404;
|
279
285
|
payload: SimpleError$1;
|
280
286
|
}>;
|
281
|
-
|
287
|
+
type UpdateUserVariables = {
|
282
288
|
body: User;
|
283
289
|
} & ControlPlaneFetcherExtraProps;
|
284
290
|
/**
|
285
291
|
* Update user info
|
286
292
|
*/
|
287
293
|
declare const updateUser: (variables: UpdateUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
|
288
|
-
|
294
|
+
type DeleteUserError = ErrorWrapper$1<{
|
289
295
|
status: 400;
|
290
296
|
payload: BadRequestError$1;
|
291
297
|
} | {
|
@@ -295,12 +301,12 @@ declare type DeleteUserError = ErrorWrapper$1<{
|
|
295
301
|
status: 404;
|
296
302
|
payload: SimpleError$1;
|
297
303
|
}>;
|
298
|
-
|
304
|
+
type DeleteUserVariables = ControlPlaneFetcherExtraProps;
|
299
305
|
/**
|
300
306
|
* Delete the user making the request
|
301
307
|
*/
|
302
308
|
declare const deleteUser: (variables: DeleteUserVariables, signal?: AbortSignal) => Promise<undefined>;
|
303
|
-
|
309
|
+
type GetUserAPIKeysError = ErrorWrapper$1<{
|
304
310
|
status: 400;
|
305
311
|
payload: BadRequestError$1;
|
306
312
|
} | {
|
@@ -310,24 +316,24 @@ declare type GetUserAPIKeysError = ErrorWrapper$1<{
|
|
310
316
|
status: 404;
|
311
317
|
payload: SimpleError$1;
|
312
318
|
}>;
|
313
|
-
|
319
|
+
type GetUserAPIKeysResponse = {
|
314
320
|
keys: {
|
315
321
|
name: string;
|
316
322
|
createdAt: DateTime$1;
|
317
323
|
}[];
|
318
324
|
};
|
319
|
-
|
325
|
+
type GetUserAPIKeysVariables = ControlPlaneFetcherExtraProps;
|
320
326
|
/**
|
321
327
|
* Retrieve a list of existing user API keys
|
322
328
|
*/
|
323
329
|
declare const getUserAPIKeys: (variables: GetUserAPIKeysVariables, signal?: AbortSignal) => Promise<GetUserAPIKeysResponse>;
|
324
|
-
|
330
|
+
type CreateUserAPIKeyPathParams = {
|
325
331
|
/**
|
326
332
|
* API Key name
|
327
333
|
*/
|
328
334
|
keyName: APIKeyName;
|
329
335
|
};
|
330
|
-
|
336
|
+
type CreateUserAPIKeyError = ErrorWrapper$1<{
|
331
337
|
status: 400;
|
332
338
|
payload: BadRequestError$1;
|
333
339
|
} | {
|
@@ -337,25 +343,25 @@ declare type CreateUserAPIKeyError = ErrorWrapper$1<{
|
|
337
343
|
status: 404;
|
338
344
|
payload: SimpleError$1;
|
339
345
|
}>;
|
340
|
-
|
346
|
+
type CreateUserAPIKeyResponse = {
|
341
347
|
name: string;
|
342
348
|
key: string;
|
343
349
|
createdAt: DateTime$1;
|
344
350
|
};
|
345
|
-
|
351
|
+
type CreateUserAPIKeyVariables = {
|
346
352
|
pathParams: CreateUserAPIKeyPathParams;
|
347
353
|
} & ControlPlaneFetcherExtraProps;
|
348
354
|
/**
|
349
355
|
* Create and return new API key
|
350
356
|
*/
|
351
357
|
declare const createUserAPIKey: (variables: CreateUserAPIKeyVariables, signal?: AbortSignal) => Promise<CreateUserAPIKeyResponse>;
|
352
|
-
|
358
|
+
type DeleteUserAPIKeyPathParams = {
|
353
359
|
/**
|
354
360
|
* API Key name
|
355
361
|
*/
|
356
362
|
keyName: APIKeyName;
|
357
363
|
};
|
358
|
-
|
364
|
+
type DeleteUserAPIKeyError = ErrorWrapper$1<{
|
359
365
|
status: 400;
|
360
366
|
payload: BadRequestError$1;
|
361
367
|
} | {
|
@@ -365,14 +371,14 @@ declare type DeleteUserAPIKeyError = ErrorWrapper$1<{
|
|
365
371
|
status: 404;
|
366
372
|
payload: SimpleError$1;
|
367
373
|
}>;
|
368
|
-
|
374
|
+
type DeleteUserAPIKeyVariables = {
|
369
375
|
pathParams: DeleteUserAPIKeyPathParams;
|
370
376
|
} & ControlPlaneFetcherExtraProps;
|
371
377
|
/**
|
372
378
|
* Delete an existing API key
|
373
379
|
*/
|
374
380
|
declare const deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
|
375
|
-
|
381
|
+
type GetWorkspacesListError = ErrorWrapper$1<{
|
376
382
|
status: 400;
|
377
383
|
payload: BadRequestError$1;
|
378
384
|
} | {
|
@@ -382,7 +388,7 @@ declare type GetWorkspacesListError = ErrorWrapper$1<{
|
|
382
388
|
status: 404;
|
383
389
|
payload: SimpleError$1;
|
384
390
|
}>;
|
385
|
-
|
391
|
+
type GetWorkspacesListResponse = {
|
386
392
|
workspaces: {
|
387
393
|
id: WorkspaceID;
|
388
394
|
name: string;
|
@@ -390,12 +396,12 @@ declare type GetWorkspacesListResponse = {
|
|
390
396
|
role: Role;
|
391
397
|
}[];
|
392
398
|
};
|
393
|
-
|
399
|
+
type GetWorkspacesListVariables = ControlPlaneFetcherExtraProps;
|
394
400
|
/**
|
395
401
|
* Retrieve the list of workspaces the user belongs to
|
396
402
|
*/
|
397
403
|
declare const getWorkspacesList: (variables: GetWorkspacesListVariables, signal?: AbortSignal) => Promise<GetWorkspacesListResponse>;
|
398
|
-
|
404
|
+
type CreateWorkspaceError = ErrorWrapper$1<{
|
399
405
|
status: 400;
|
400
406
|
payload: BadRequestError$1;
|
401
407
|
} | {
|
@@ -405,53 +411,59 @@ declare type CreateWorkspaceError = ErrorWrapper$1<{
|
|
405
411
|
status: 404;
|
406
412
|
payload: SimpleError$1;
|
407
413
|
}>;
|
408
|
-
|
414
|
+
type CreateWorkspaceVariables = {
|
409
415
|
body: WorkspaceMeta;
|
410
416
|
} & ControlPlaneFetcherExtraProps;
|
411
417
|
/**
|
412
418
|
* Creates a new workspace with the user requesting it as its single owner.
|
413
419
|
*/
|
414
420
|
declare const createWorkspace: (variables: CreateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
|
415
|
-
|
421
|
+
type GetWorkspacePathParams = {
|
416
422
|
/**
|
417
423
|
* Workspace ID
|
418
424
|
*/
|
419
425
|
workspaceId: WorkspaceID;
|
420
426
|
};
|
421
|
-
|
427
|
+
type GetWorkspaceError = ErrorWrapper$1<{
|
422
428
|
status: 400;
|
423
429
|
payload: BadRequestError$1;
|
424
430
|
} | {
|
425
431
|
status: 401;
|
426
432
|
payload: AuthError$1;
|
433
|
+
} | {
|
434
|
+
status: 403;
|
435
|
+
payload: AuthError$1;
|
427
436
|
} | {
|
428
437
|
status: 404;
|
429
438
|
payload: SimpleError$1;
|
430
439
|
}>;
|
431
|
-
|
440
|
+
type GetWorkspaceVariables = {
|
432
441
|
pathParams: GetWorkspacePathParams;
|
433
442
|
} & ControlPlaneFetcherExtraProps;
|
434
443
|
/**
|
435
444
|
* Retrieve workspace info from a workspace ID
|
436
445
|
*/
|
437
446
|
declare const getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
|
438
|
-
|
447
|
+
type UpdateWorkspacePathParams = {
|
439
448
|
/**
|
440
449
|
* Workspace ID
|
441
450
|
*/
|
442
451
|
workspaceId: WorkspaceID;
|
443
452
|
};
|
444
|
-
|
453
|
+
type UpdateWorkspaceError = ErrorWrapper$1<{
|
445
454
|
status: 400;
|
446
455
|
payload: BadRequestError$1;
|
447
456
|
} | {
|
448
457
|
status: 401;
|
449
458
|
payload: AuthError$1;
|
459
|
+
} | {
|
460
|
+
status: 403;
|
461
|
+
payload: AuthError$1;
|
450
462
|
} | {
|
451
463
|
status: 404;
|
452
464
|
payload: SimpleError$1;
|
453
465
|
}>;
|
454
|
-
|
466
|
+
type UpdateWorkspaceVariables = {
|
455
467
|
body: WorkspaceMeta;
|
456
468
|
pathParams: UpdateWorkspacePathParams;
|
457
469
|
} & ControlPlaneFetcherExtraProps;
|
@@ -459,53 +471,59 @@ declare type UpdateWorkspaceVariables = {
|
|
459
471
|
* Update workspace info
|
460
472
|
*/
|
461
473
|
declare const updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
|
462
|
-
|
474
|
+
type DeleteWorkspacePathParams = {
|
463
475
|
/**
|
464
476
|
* Workspace ID
|
465
477
|
*/
|
466
478
|
workspaceId: WorkspaceID;
|
467
479
|
};
|
468
|
-
|
480
|
+
type DeleteWorkspaceError = ErrorWrapper$1<{
|
469
481
|
status: 400;
|
470
482
|
payload: BadRequestError$1;
|
471
483
|
} | {
|
472
484
|
status: 401;
|
473
485
|
payload: AuthError$1;
|
486
|
+
} | {
|
487
|
+
status: 403;
|
488
|
+
payload: AuthError$1;
|
474
489
|
} | {
|
475
490
|
status: 404;
|
476
491
|
payload: SimpleError$1;
|
477
492
|
}>;
|
478
|
-
|
493
|
+
type DeleteWorkspaceVariables = {
|
479
494
|
pathParams: DeleteWorkspacePathParams;
|
480
495
|
} & ControlPlaneFetcherExtraProps;
|
481
496
|
/**
|
482
497
|
* Delete the workspace with the provided ID
|
483
498
|
*/
|
484
499
|
declare const deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
|
485
|
-
|
500
|
+
type GetWorkspaceMembersListPathParams = {
|
486
501
|
/**
|
487
502
|
* Workspace ID
|
488
503
|
*/
|
489
504
|
workspaceId: WorkspaceID;
|
490
505
|
};
|
491
|
-
|
506
|
+
type GetWorkspaceMembersListError = ErrorWrapper$1<{
|
492
507
|
status: 400;
|
493
508
|
payload: BadRequestError$1;
|
494
509
|
} | {
|
495
510
|
status: 401;
|
496
511
|
payload: AuthError$1;
|
512
|
+
} | {
|
513
|
+
status: 403;
|
514
|
+
payload: AuthError$1;
|
497
515
|
} | {
|
498
516
|
status: 404;
|
499
517
|
payload: SimpleError$1;
|
500
518
|
}>;
|
501
|
-
|
519
|
+
type GetWorkspaceMembersListVariables = {
|
502
520
|
pathParams: GetWorkspaceMembersListPathParams;
|
503
521
|
} & ControlPlaneFetcherExtraProps;
|
504
522
|
/**
|
505
523
|
* Retrieve the list of members of the given workspace
|
506
524
|
*/
|
507
525
|
declare const getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal) => Promise<WorkspaceMembers>;
|
508
|
-
|
526
|
+
type UpdateWorkspaceMemberRolePathParams = {
|
509
527
|
/**
|
510
528
|
* Workspace ID
|
511
529
|
*/
|
@@ -515,20 +533,23 @@ declare type UpdateWorkspaceMemberRolePathParams = {
|
|
515
533
|
*/
|
516
534
|
userId: UserID;
|
517
535
|
};
|
518
|
-
|
536
|
+
type UpdateWorkspaceMemberRoleError = ErrorWrapper$1<{
|
519
537
|
status: 400;
|
520
538
|
payload: BadRequestError$1;
|
521
539
|
} | {
|
522
540
|
status: 401;
|
523
541
|
payload: AuthError$1;
|
542
|
+
} | {
|
543
|
+
status: 403;
|
544
|
+
payload: AuthError$1;
|
524
545
|
} | {
|
525
546
|
status: 404;
|
526
547
|
payload: SimpleError$1;
|
527
548
|
}>;
|
528
|
-
|
549
|
+
type UpdateWorkspaceMemberRoleRequestBody = {
|
529
550
|
role: Role;
|
530
551
|
};
|
531
|
-
|
552
|
+
type UpdateWorkspaceMemberRoleVariables = {
|
532
553
|
body: UpdateWorkspaceMemberRoleRequestBody;
|
533
554
|
pathParams: UpdateWorkspaceMemberRolePathParams;
|
534
555
|
} & ControlPlaneFetcherExtraProps;
|
@@ -536,7 +557,7 @@ declare type UpdateWorkspaceMemberRoleVariables = {
|
|
536
557
|
* Update a workspace member role. Workspaces must always have at least one owner, so this operation will fail if trying to remove owner role from the last owner in the workspace.
|
537
558
|
*/
|
538
559
|
declare const updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal) => Promise<undefined>;
|
539
|
-
|
560
|
+
type RemoveWorkspaceMemberPathParams = {
|
540
561
|
/**
|
541
562
|
* Workspace ID
|
542
563
|
*/
|
@@ -546,35 +567,41 @@ declare type RemoveWorkspaceMemberPathParams = {
|
|
546
567
|
*/
|
547
568
|
userId: UserID;
|
548
569
|
};
|
549
|
-
|
570
|
+
type RemoveWorkspaceMemberError = ErrorWrapper$1<{
|
550
571
|
status: 400;
|
551
572
|
payload: BadRequestError$1;
|
552
573
|
} | {
|
553
574
|
status: 401;
|
554
575
|
payload: AuthError$1;
|
576
|
+
} | {
|
577
|
+
status: 403;
|
578
|
+
payload: AuthError$1;
|
555
579
|
} | {
|
556
580
|
status: 404;
|
557
581
|
payload: SimpleError$1;
|
558
582
|
}>;
|
559
|
-
|
583
|
+
type RemoveWorkspaceMemberVariables = {
|
560
584
|
pathParams: RemoveWorkspaceMemberPathParams;
|
561
585
|
} & ControlPlaneFetcherExtraProps;
|
562
586
|
/**
|
563
587
|
* Remove the member from the workspace
|
564
588
|
*/
|
565
589
|
declare const removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal) => Promise<undefined>;
|
566
|
-
|
590
|
+
type InviteWorkspaceMemberPathParams = {
|
567
591
|
/**
|
568
592
|
* Workspace ID
|
569
593
|
*/
|
570
594
|
workspaceId: WorkspaceID;
|
571
595
|
};
|
572
|
-
|
596
|
+
type InviteWorkspaceMemberError = ErrorWrapper$1<{
|
573
597
|
status: 400;
|
574
598
|
payload: BadRequestError$1;
|
575
599
|
} | {
|
576
600
|
status: 401;
|
577
601
|
payload: AuthError$1;
|
602
|
+
} | {
|
603
|
+
status: 403;
|
604
|
+
payload: AuthError$1;
|
578
605
|
} | {
|
579
606
|
status: 404;
|
580
607
|
payload: SimpleError$1;
|
@@ -582,14 +609,14 @@ declare type InviteWorkspaceMemberError = ErrorWrapper$1<{
|
|
582
609
|
status: 409;
|
583
610
|
payload: SimpleError$1;
|
584
611
|
}>;
|
585
|
-
|
612
|
+
type InviteWorkspaceMemberRequestBody = {
|
586
613
|
/**
|
587
614
|
* @format email
|
588
615
|
*/
|
589
616
|
email: string;
|
590
617
|
role: Role;
|
591
618
|
};
|
592
|
-
|
619
|
+
type InviteWorkspaceMemberVariables = {
|
593
620
|
body: InviteWorkspaceMemberRequestBody;
|
594
621
|
pathParams: InviteWorkspaceMemberPathParams;
|
595
622
|
} & ControlPlaneFetcherExtraProps;
|
@@ -597,7 +624,7 @@ declare type InviteWorkspaceMemberVariables = {
|
|
597
624
|
* Invite some user to join the workspace with the given role
|
598
625
|
*/
|
599
626
|
declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
|
600
|
-
|
627
|
+
type UpdateWorkspaceMemberInvitePathParams = {
|
601
628
|
/**
|
602
629
|
* Workspace ID
|
603
630
|
*/
|
@@ -607,12 +634,15 @@ declare type UpdateWorkspaceMemberInvitePathParams = {
|
|
607
634
|
*/
|
608
635
|
inviteId: InviteID;
|
609
636
|
};
|
610
|
-
|
637
|
+
type UpdateWorkspaceMemberInviteError = ErrorWrapper$1<{
|
611
638
|
status: 400;
|
612
639
|
payload: BadRequestError$1;
|
613
640
|
} | {
|
614
641
|
status: 401;
|
615
642
|
payload: AuthError$1;
|
643
|
+
} | {
|
644
|
+
status: 403;
|
645
|
+
payload: AuthError$1;
|
616
646
|
} | {
|
617
647
|
status: 404;
|
618
648
|
payload: SimpleError$1;
|
@@ -620,10 +650,10 @@ declare type UpdateWorkspaceMemberInviteError = ErrorWrapper$1<{
|
|
620
650
|
status: 422;
|
621
651
|
payload: SimpleError$1;
|
622
652
|
}>;
|
623
|
-
|
653
|
+
type UpdateWorkspaceMemberInviteRequestBody = {
|
624
654
|
role: Role;
|
625
655
|
};
|
626
|
-
|
656
|
+
type UpdateWorkspaceMemberInviteVariables = {
|
627
657
|
body: UpdateWorkspaceMemberInviteRequestBody;
|
628
658
|
pathParams: UpdateWorkspaceMemberInvitePathParams;
|
629
659
|
} & ControlPlaneFetcherExtraProps;
|
@@ -631,7 +661,7 @@ declare type UpdateWorkspaceMemberInviteVariables = {
|
|
631
661
|
* This operation provides a way to update an existing invite. Updates are performed in-place; they do not change the invite link, the expiry time, nor do they re-notify the recipient of the invite.
|
632
662
|
*/
|
633
663
|
declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
|
634
|
-
|
664
|
+
type CancelWorkspaceMemberInvitePathParams = {
|
635
665
|
/**
|
636
666
|
* Workspace ID
|
637
667
|
*/
|
@@ -641,24 +671,27 @@ declare type CancelWorkspaceMemberInvitePathParams = {
|
|
641
671
|
*/
|
642
672
|
inviteId: InviteID;
|
643
673
|
};
|
644
|
-
|
674
|
+
type CancelWorkspaceMemberInviteError = ErrorWrapper$1<{
|
645
675
|
status: 400;
|
646
676
|
payload: BadRequestError$1;
|
647
677
|
} | {
|
648
678
|
status: 401;
|
649
679
|
payload: AuthError$1;
|
680
|
+
} | {
|
681
|
+
status: 403;
|
682
|
+
payload: AuthError$1;
|
650
683
|
} | {
|
651
684
|
status: 404;
|
652
685
|
payload: SimpleError$1;
|
653
686
|
}>;
|
654
|
-
|
687
|
+
type CancelWorkspaceMemberInviteVariables = {
|
655
688
|
pathParams: CancelWorkspaceMemberInvitePathParams;
|
656
689
|
} & ControlPlaneFetcherExtraProps;
|
657
690
|
/**
|
658
691
|
* This operation provides a way to cancel invites by deleting them. Already accepted invites cannot be deleted.
|
659
692
|
*/
|
660
693
|
declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
|
661
|
-
|
694
|
+
type AcceptWorkspaceMemberInvitePathParams = {
|
662
695
|
/**
|
663
696
|
* Workspace ID
|
664
697
|
*/
|
@@ -668,24 +701,27 @@ declare type AcceptWorkspaceMemberInvitePathParams = {
|
|
668
701
|
*/
|
669
702
|
inviteKey: InviteKey;
|
670
703
|
};
|
671
|
-
|
704
|
+
type AcceptWorkspaceMemberInviteError = ErrorWrapper$1<{
|
672
705
|
status: 400;
|
673
706
|
payload: BadRequestError$1;
|
674
707
|
} | {
|
675
708
|
status: 401;
|
676
709
|
payload: AuthError$1;
|
710
|
+
} | {
|
711
|
+
status: 403;
|
712
|
+
payload: AuthError$1;
|
677
713
|
} | {
|
678
714
|
status: 404;
|
679
715
|
payload: SimpleError$1;
|
680
716
|
}>;
|
681
|
-
|
717
|
+
type AcceptWorkspaceMemberInviteVariables = {
|
682
718
|
pathParams: AcceptWorkspaceMemberInvitePathParams;
|
683
719
|
} & ControlPlaneFetcherExtraProps;
|
684
720
|
/**
|
685
721
|
* Accept the invitation to join a workspace. If the operation succeeds the user will be a member of the workspace
|
686
722
|
*/
|
687
723
|
declare const acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
|
688
|
-
|
724
|
+
type ResendWorkspaceMemberInvitePathParams = {
|
689
725
|
/**
|
690
726
|
* Workspace ID
|
691
727
|
*/
|
@@ -695,44 +731,47 @@ declare type ResendWorkspaceMemberInvitePathParams = {
|
|
695
731
|
*/
|
696
732
|
inviteId: InviteID;
|
697
733
|
};
|
698
|
-
|
734
|
+
type ResendWorkspaceMemberInviteError = ErrorWrapper$1<{
|
699
735
|
status: 400;
|
700
736
|
payload: BadRequestError$1;
|
701
737
|
} | {
|
702
738
|
status: 401;
|
703
739
|
payload: AuthError$1;
|
740
|
+
} | {
|
741
|
+
status: 403;
|
742
|
+
payload: AuthError$1;
|
704
743
|
} | {
|
705
744
|
status: 404;
|
706
745
|
payload: SimpleError$1;
|
707
746
|
}>;
|
708
|
-
|
747
|
+
type ResendWorkspaceMemberInviteVariables = {
|
709
748
|
pathParams: ResendWorkspaceMemberInvitePathParams;
|
710
749
|
} & ControlPlaneFetcherExtraProps;
|
711
750
|
/**
|
712
751
|
* This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted.
|
713
752
|
*/
|
714
753
|
declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
|
715
|
-
|
754
|
+
type GetDatabaseListPathParams = {
|
716
755
|
/**
|
717
756
|
* Workspace ID
|
718
757
|
*/
|
719
758
|
workspaceId: WorkspaceID;
|
720
759
|
};
|
721
|
-
|
760
|
+
type GetDatabaseListError = ErrorWrapper$1<{
|
722
761
|
status: 400;
|
723
762
|
payload: BadRequestError$1;
|
724
763
|
} | {
|
725
764
|
status: 401;
|
726
765
|
payload: AuthError$1;
|
727
766
|
}>;
|
728
|
-
|
767
|
+
type GetDatabaseListVariables = {
|
729
768
|
pathParams: GetDatabaseListPathParams;
|
730
769
|
} & ControlPlaneFetcherExtraProps;
|
731
770
|
/**
|
732
771
|
* List all databases available in your Workspace.
|
733
772
|
*/
|
734
773
|
declare const getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal) => Promise<ListDatabasesResponse>;
|
735
|
-
|
774
|
+
type CreateDatabasePathParams = {
|
736
775
|
/**
|
737
776
|
* Workspace ID
|
738
777
|
*/
|
@@ -742,14 +781,14 @@ declare type CreateDatabasePathParams = {
|
|
742
781
|
*/
|
743
782
|
dbName: DBName$1;
|
744
783
|
};
|
745
|
-
|
784
|
+
type CreateDatabaseError = ErrorWrapper$1<{
|
746
785
|
status: 400;
|
747
786
|
payload: BadRequestError$1;
|
748
787
|
} | {
|
749
788
|
status: 401;
|
750
789
|
payload: AuthError$1;
|
751
790
|
}>;
|
752
|
-
|
791
|
+
type CreateDatabaseResponse = {
|
753
792
|
/**
|
754
793
|
* @minLength 1
|
755
794
|
*/
|
@@ -757,7 +796,7 @@ declare type CreateDatabaseResponse = {
|
|
757
796
|
branchName?: string;
|
758
797
|
status: MigrationStatus$1;
|
759
798
|
};
|
760
|
-
|
799
|
+
type CreateDatabaseRequestBody = {
|
761
800
|
/**
|
762
801
|
* @minLength 1
|
763
802
|
*/
|
@@ -771,7 +810,7 @@ declare type CreateDatabaseRequestBody = {
|
|
771
810
|
};
|
772
811
|
metadata?: BranchMetadata$1;
|
773
812
|
};
|
774
|
-
|
813
|
+
type CreateDatabaseVariables = {
|
775
814
|
body: CreateDatabaseRequestBody;
|
776
815
|
pathParams: CreateDatabasePathParams;
|
777
816
|
} & ControlPlaneFetcherExtraProps;
|
@@ -779,7 +818,7 @@ declare type CreateDatabaseVariables = {
|
|
779
818
|
* Create Database with identifier name
|
780
819
|
*/
|
781
820
|
declare const createDatabase: (variables: CreateDatabaseVariables, signal?: AbortSignal) => Promise<CreateDatabaseResponse>;
|
782
|
-
|
821
|
+
type DeleteDatabasePathParams = {
|
783
822
|
/**
|
784
823
|
* Workspace ID
|
785
824
|
*/
|
@@ -789,7 +828,7 @@ declare type DeleteDatabasePathParams = {
|
|
789
828
|
*/
|
790
829
|
dbName: DBName$1;
|
791
830
|
};
|
792
|
-
|
831
|
+
type DeleteDatabaseError = ErrorWrapper$1<{
|
793
832
|
status: 400;
|
794
833
|
payload: BadRequestError$1;
|
795
834
|
} | {
|
@@ -799,17 +838,17 @@ declare type DeleteDatabaseError = ErrorWrapper$1<{
|
|
799
838
|
status: 404;
|
800
839
|
payload: SimpleError$1;
|
801
840
|
}>;
|
802
|
-
|
841
|
+
type DeleteDatabaseResponse = {
|
803
842
|
status: MigrationStatus$1;
|
804
843
|
};
|
805
|
-
|
844
|
+
type DeleteDatabaseVariables = {
|
806
845
|
pathParams: DeleteDatabasePathParams;
|
807
846
|
} & ControlPlaneFetcherExtraProps;
|
808
847
|
/**
|
809
848
|
* Delete a database and all of its branches and tables permanently.
|
810
849
|
*/
|
811
850
|
declare const deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal) => Promise<DeleteDatabaseResponse>;
|
812
|
-
|
851
|
+
type GetDatabaseMetadataPathParams = {
|
813
852
|
/**
|
814
853
|
* Workspace ID
|
815
854
|
*/
|
@@ -819,7 +858,7 @@ declare type GetDatabaseMetadataPathParams = {
|
|
819
858
|
*/
|
820
859
|
dbName: DBName$1;
|
821
860
|
};
|
822
|
-
|
861
|
+
type GetDatabaseMetadataError = ErrorWrapper$1<{
|
823
862
|
status: 400;
|
824
863
|
payload: BadRequestError$1;
|
825
864
|
} | {
|
@@ -829,14 +868,14 @@ declare type GetDatabaseMetadataError = ErrorWrapper$1<{
|
|
829
868
|
status: 404;
|
830
869
|
payload: SimpleError$1;
|
831
870
|
}>;
|
832
|
-
|
871
|
+
type GetDatabaseMetadataVariables = {
|
833
872
|
pathParams: GetDatabaseMetadataPathParams;
|
834
873
|
} & ControlPlaneFetcherExtraProps;
|
835
874
|
/**
|
836
875
|
* Retrieve metadata of the given database
|
837
876
|
*/
|
838
877
|
declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
|
839
|
-
|
878
|
+
type UpdateDatabaseMetadataPathParams = {
|
840
879
|
/**
|
841
880
|
* Workspace ID
|
842
881
|
*/
|
@@ -846,7 +885,7 @@ declare type UpdateDatabaseMetadataPathParams = {
|
|
846
885
|
*/
|
847
886
|
dbName: DBName$1;
|
848
887
|
};
|
849
|
-
|
888
|
+
type UpdateDatabaseMetadataError = ErrorWrapper$1<{
|
850
889
|
status: 400;
|
851
890
|
payload: BadRequestError$1;
|
852
891
|
} | {
|
@@ -856,7 +895,7 @@ declare type UpdateDatabaseMetadataError = ErrorWrapper$1<{
|
|
856
895
|
status: 404;
|
857
896
|
payload: SimpleError$1;
|
858
897
|
}>;
|
859
|
-
|
898
|
+
type UpdateDatabaseMetadataRequestBody = {
|
860
899
|
ui?: {
|
861
900
|
/**
|
862
901
|
* @minLength 1
|
@@ -864,7 +903,7 @@ declare type UpdateDatabaseMetadataRequestBody = {
|
|
864
903
|
color?: string;
|
865
904
|
};
|
866
905
|
};
|
867
|
-
|
906
|
+
type UpdateDatabaseMetadataVariables = {
|
868
907
|
body?: UpdateDatabaseMetadataRequestBody;
|
869
908
|
pathParams: UpdateDatabaseMetadataPathParams;
|
870
909
|
} & ControlPlaneFetcherExtraProps;
|
@@ -872,20 +911,20 @@ declare type UpdateDatabaseMetadataVariables = {
|
|
872
911
|
* Update the color of the selected database
|
873
912
|
*/
|
874
913
|
declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
|
875
|
-
|
914
|
+
type ListRegionsPathParams = {
|
876
915
|
/**
|
877
916
|
* Workspace ID
|
878
917
|
*/
|
879
918
|
workspaceId: WorkspaceID;
|
880
919
|
};
|
881
|
-
|
920
|
+
type ListRegionsError = ErrorWrapper$1<{
|
882
921
|
status: 400;
|
883
922
|
payload: BadRequestError$1;
|
884
923
|
} | {
|
885
924
|
status: 401;
|
886
925
|
payload: AuthError$1;
|
887
926
|
}>;
|
888
|
-
|
927
|
+
type ListRegionsVariables = {
|
889
928
|
pathParams: ListRegionsPathParams;
|
890
929
|
} & ControlPlaneFetcherExtraProps;
|
891
930
|
/**
|
@@ -901,7 +940,7 @@ declare const listRegions: (variables: ListRegionsVariables, signal?: AbortSigna
|
|
901
940
|
/**
|
902
941
|
* Metadata of databases
|
903
942
|
*/
|
904
|
-
|
943
|
+
type DEPRECATEDDatabaseMetadata = {
|
905
944
|
/**
|
906
945
|
* The machine-readable name of a database
|
907
946
|
*/
|
@@ -923,24 +962,28 @@ declare type DEPRECATEDDatabaseMetadata = {
|
|
923
962
|
*/
|
924
963
|
color?: string;
|
925
964
|
};
|
965
|
+
/**
|
966
|
+
* @x-internal true
|
967
|
+
*/
|
968
|
+
newMigrations?: boolean;
|
926
969
|
};
|
927
|
-
|
970
|
+
type DEPRECATEDListDatabasesResponse = {
|
928
971
|
/**
|
929
972
|
* A list of databases in a Xata workspace
|
930
973
|
*/
|
931
974
|
databases?: DEPRECATEDDatabaseMetadata[];
|
932
975
|
};
|
933
|
-
|
976
|
+
type ListBranchesResponse = {
|
934
977
|
databaseName: string;
|
935
978
|
branches: Branch[];
|
936
979
|
};
|
937
|
-
|
980
|
+
type ListGitBranchesResponse = {
|
938
981
|
mapping: {
|
939
982
|
gitBranch: string;
|
940
983
|
xataBranch: string;
|
941
984
|
}[];
|
942
985
|
};
|
943
|
-
|
986
|
+
type Branch = {
|
944
987
|
name: string;
|
945
988
|
createdAt: DateTime;
|
946
989
|
};
|
@@ -948,7 +991,7 @@ declare type Branch = {
|
|
948
991
|
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
|
949
992
|
* @x-go-type xata.BranchMetadata
|
950
993
|
*/
|
951
|
-
|
994
|
+
type BranchMetadata = {
|
952
995
|
/**
|
953
996
|
* @minLength 1
|
954
997
|
*/
|
@@ -960,7 +1003,7 @@ declare type BranchMetadata = {
|
|
960
1003
|
stage?: string;
|
961
1004
|
labels?: string[];
|
962
1005
|
};
|
963
|
-
|
1006
|
+
type DBBranch = {
|
964
1007
|
databaseName: DBName;
|
965
1008
|
branchName: BranchName;
|
966
1009
|
createdAt: DateTime;
|
@@ -971,7 +1014,7 @@ declare type DBBranch = {
|
|
971
1014
|
startedFrom?: StartedFromMetadata;
|
972
1015
|
schema: Schema;
|
973
1016
|
};
|
974
|
-
|
1017
|
+
type StartedFromMetadata = {
|
975
1018
|
branchName: BranchName;
|
976
1019
|
dbBranchID: string;
|
977
1020
|
migrationID: string;
|
@@ -979,22 +1022,22 @@ declare type StartedFromMetadata = {
|
|
979
1022
|
/**
|
980
1023
|
* @x-go-type xata.Schema
|
981
1024
|
*/
|
982
|
-
|
1025
|
+
type Schema = {
|
983
1026
|
tables: Table[];
|
984
1027
|
tablesOrder?: string[];
|
985
1028
|
};
|
986
|
-
|
1029
|
+
type SchemaEditScript = {
|
987
1030
|
sourceMigrationID?: string;
|
988
1031
|
targetMigrationID?: string;
|
989
1032
|
operations: MigrationOp[];
|
990
1033
|
};
|
991
|
-
|
1034
|
+
type Table = {
|
992
1035
|
id?: string;
|
993
1036
|
name: TableName;
|
994
1037
|
columns: Column[];
|
995
1038
|
revLinks?: RevLink[];
|
996
1039
|
};
|
997
|
-
|
1040
|
+
type Column = {
|
998
1041
|
name: string;
|
999
1042
|
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime';
|
1000
1043
|
link?: ColumnLink;
|
@@ -1003,44 +1046,44 @@ declare type Column = {
|
|
1003
1046
|
unique?: boolean;
|
1004
1047
|
columns?: Column[];
|
1005
1048
|
};
|
1006
|
-
|
1049
|
+
type ColumnLink = {
|
1007
1050
|
table: string;
|
1008
1051
|
};
|
1009
|
-
|
1052
|
+
type RevLink = {
|
1010
1053
|
linkID: string;
|
1011
1054
|
table: string;
|
1012
1055
|
};
|
1013
1056
|
/**
|
1014
1057
|
* @pattern [a-zA-Z0-9_\-~]+
|
1015
1058
|
*/
|
1016
|
-
|
1059
|
+
type BranchName = string;
|
1017
1060
|
/**
|
1018
1061
|
* @pattern [a-zA-Z0-9_\-~]+
|
1019
1062
|
*/
|
1020
|
-
|
1063
|
+
type DBName = string;
|
1021
1064
|
/**
|
1022
1065
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
1023
1066
|
*
|
1024
1067
|
* @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
|
1025
1068
|
*/
|
1026
|
-
|
1069
|
+
type DBBranchName = string;
|
1027
1070
|
/**
|
1028
1071
|
* @pattern [a-zA-Z0-9_\-~]+
|
1029
1072
|
*/
|
1030
|
-
|
1073
|
+
type TableName = string;
|
1031
1074
|
/**
|
1032
1075
|
* @pattern [a-zA-Z0-9_\-~\.]+
|
1033
1076
|
*/
|
1034
|
-
|
1035
|
-
|
1077
|
+
type ColumnName = string;
|
1078
|
+
type MetricsDatapoint = {
|
1036
1079
|
timestamp: string;
|
1037
1080
|
value: number;
|
1038
1081
|
};
|
1039
|
-
|
1082
|
+
type MetricsLatency = {
|
1040
1083
|
p50?: MetricsDatapoint[];
|
1041
1084
|
p90?: MetricsDatapoint[];
|
1042
1085
|
};
|
1043
|
-
|
1086
|
+
type BranchMigration = {
|
1044
1087
|
id?: string;
|
1045
1088
|
parentID?: string;
|
1046
1089
|
status: string;
|
@@ -1058,7 +1101,7 @@ declare type BranchMigration = {
|
|
1058
1101
|
newTableOrder: string[];
|
1059
1102
|
renamedTables?: TableRename[];
|
1060
1103
|
};
|
1061
|
-
|
1104
|
+
type TableMigration = {
|
1062
1105
|
newColumns?: {
|
1063
1106
|
[key: string]: Column;
|
1064
1107
|
};
|
@@ -1066,11 +1109,11 @@ declare type TableMigration = {
|
|
1066
1109
|
modifiedColumns?: ColumnMigration[];
|
1067
1110
|
newColumnOrder: string[];
|
1068
1111
|
};
|
1069
|
-
|
1112
|
+
type ColumnMigration = {
|
1070
1113
|
old: Column;
|
1071
1114
|
['new']: Column;
|
1072
1115
|
};
|
1073
|
-
|
1116
|
+
type Commit = {
|
1074
1117
|
title?: string;
|
1075
1118
|
message?: string;
|
1076
1119
|
id: string;
|
@@ -1081,51 +1124,51 @@ declare type Commit = {
|
|
1081
1124
|
modifiedAt?: DateTime;
|
1082
1125
|
operations: MigrationOp[];
|
1083
1126
|
};
|
1084
|
-
|
1127
|
+
type MigrationStatus = 'completed' | 'pending' | 'failed';
|
1085
1128
|
/**
|
1086
1129
|
* Branch schema migration.
|
1087
1130
|
*/
|
1088
|
-
|
1131
|
+
type Migration = {
|
1089
1132
|
parentID?: string;
|
1090
1133
|
operations: MigrationOp[];
|
1091
1134
|
};
|
1092
1135
|
/**
|
1093
1136
|
* Branch schema migration operations.
|
1094
1137
|
*/
|
1095
|
-
|
1096
|
-
|
1138
|
+
type MigrationOp = MigrationTableOp | MigrationColumnOp;
|
1139
|
+
type MigrationTableOp = {
|
1097
1140
|
addTable: TableOpAdd;
|
1098
1141
|
} | {
|
1099
1142
|
removeTable: TableOpRemove;
|
1100
1143
|
} | {
|
1101
1144
|
renameTable: TableOpRename;
|
1102
1145
|
};
|
1103
|
-
|
1146
|
+
type MigrationColumnOp = {
|
1104
1147
|
addColumn: ColumnOpAdd;
|
1105
1148
|
} | {
|
1106
1149
|
removeColumn: ColumnOpRemove;
|
1107
1150
|
} | {
|
1108
1151
|
renameColumn: ColumnOpRename;
|
1109
1152
|
};
|
1110
|
-
|
1153
|
+
type TableOpAdd = {
|
1111
1154
|
table: string;
|
1112
1155
|
};
|
1113
|
-
|
1156
|
+
type TableOpRemove = {
|
1114
1157
|
table: string;
|
1115
1158
|
};
|
1116
|
-
|
1159
|
+
type TableOpRename = {
|
1117
1160
|
oldName: string;
|
1118
1161
|
newName: string;
|
1119
1162
|
};
|
1120
|
-
|
1163
|
+
type ColumnOpAdd = {
|
1121
1164
|
table: string;
|
1122
1165
|
column: Column;
|
1123
1166
|
};
|
1124
|
-
|
1167
|
+
type ColumnOpRemove = {
|
1125
1168
|
table: string;
|
1126
1169
|
column: string;
|
1127
1170
|
};
|
1128
|
-
|
1171
|
+
type ColumnOpRename = {
|
1129
1172
|
table: string;
|
1130
1173
|
oldName: string;
|
1131
1174
|
newName: string;
|
@@ -1136,8 +1179,8 @@ declare type ColumnOpRename = {
|
|
1136
1179
|
* @minimum 0
|
1137
1180
|
* @x-go-type migration.RequestNumber
|
1138
1181
|
*/
|
1139
|
-
|
1140
|
-
|
1182
|
+
type MigrationRequestNumber = number;
|
1183
|
+
type MigrationRequest = {
|
1141
1184
|
number?: MigrationRequestNumber;
|
1142
1185
|
/**
|
1143
1186
|
* Migration request creation timestamp.
|
@@ -1173,12 +1216,12 @@ declare type MigrationRequest = {
|
|
1173
1216
|
*/
|
1174
1217
|
target?: string;
|
1175
1218
|
};
|
1176
|
-
|
1219
|
+
type SortExpression = string[] | {
|
1177
1220
|
[key: string]: SortOrder;
|
1178
1221
|
} | {
|
1179
1222
|
[key: string]: SortOrder;
|
1180
1223
|
}[];
|
1181
|
-
|
1224
|
+
type SortOrder = 'asc' | 'desc';
|
1182
1225
|
/**
|
1183
1226
|
* Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
|
1184
1227
|
* distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
|
@@ -1189,15 +1232,15 @@ declare type SortOrder = 'asc' | 'desc';
|
|
1189
1232
|
* @maximum 2
|
1190
1233
|
* @minimum 0
|
1191
1234
|
*/
|
1192
|
-
|
1235
|
+
type FuzzinessExpression = number;
|
1193
1236
|
/**
|
1194
1237
|
* If the prefix type is set to "disabled" (the default), the search only matches full words. If the prefix type is set to "phrase", the search will return results that match prefixes of the search phrase.
|
1195
1238
|
*/
|
1196
|
-
|
1239
|
+
type PrefixExpression = 'phrase' | 'disabled';
|
1197
1240
|
/**
|
1198
1241
|
* The target expression is used to filter the search results by the target columns.
|
1199
1242
|
*/
|
1200
|
-
|
1243
|
+
type TargetExpression = (string | {
|
1201
1244
|
/**
|
1202
1245
|
* The name of the column.
|
1203
1246
|
*/
|
@@ -1214,7 +1257,7 @@ declare type TargetExpression = (string | {
|
|
1214
1257
|
/**
|
1215
1258
|
* @minProperties 1
|
1216
1259
|
*/
|
1217
|
-
|
1260
|
+
type FilterExpression = {
|
1218
1261
|
$exists?: string;
|
1219
1262
|
$existsNot?: string;
|
1220
1263
|
$any?: FilterList;
|
@@ -1245,7 +1288,7 @@ declare type FilterExpression = {
|
|
1245
1288
|
* @example {"average_speed":{"average":"speed"}}
|
1246
1289
|
* @x-go-type xbquery.SummaryList
|
1247
1290
|
*/
|
1248
|
-
|
1291
|
+
type SummaryExpressionList = {
|
1249
1292
|
[key: string]: SummaryExpression;
|
1250
1293
|
};
|
1251
1294
|
/**
|
@@ -1259,36 +1302,36 @@ declare type SummaryExpressionList = {
|
|
1259
1302
|
* We currently support several aggregation functions. Not all functions can be run on all column
|
1260
1303
|
* types.
|
1261
1304
|
*
|
1262
|
-
*
|
1263
|
-
*
|
1264
|
-
*
|
1305
|
+
* - `count` is used to count the number of records in each group. Use `{"count": "*"}` to count
|
1306
|
+
* all columns present, otherwise `{"count": "<column_path>"}` to count the number of non-null
|
1307
|
+
* values are present at column path.
|
1265
1308
|
*
|
1266
|
-
*
|
1309
|
+
* Count can be used on any column type, and always returns an int.
|
1267
1310
|
*
|
1268
|
-
*
|
1269
|
-
*
|
1270
|
-
*
|
1271
|
-
*
|
1311
|
+
* - `min` calculates the minimum value in each group. `min` is compatible with most types;
|
1312
|
+
* string, multiple, text, email, int, float, and datetime. It returns a value of the same
|
1313
|
+
* type as operated on. This means that `{"lowest_latency": {"min": "latency"}}` where
|
1314
|
+
* `latency` is an int, will always return an int.
|
1272
1315
|
*
|
1273
|
-
*
|
1274
|
-
*
|
1316
|
+
* - `max` calculates the maximum value in each group. `max` shares the same compatibility as
|
1317
|
+
* `min`.
|
1275
1318
|
*
|
1276
|
-
*
|
1277
|
-
*
|
1319
|
+
* - `sum` adds up all values in a group. `sum` can be run on `int` and `float` types, and will
|
1320
|
+
* return a value of the same type as requested.
|
1278
1321
|
*
|
1279
|
-
*
|
1280
|
-
*
|
1322
|
+
* - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
|
1323
|
+
* always returns a float.
|
1281
1324
|
*
|
1282
1325
|
* @example {"count":"deleted_at"}
|
1283
1326
|
* @x-go-type xbquery.Summary
|
1284
1327
|
*/
|
1285
|
-
|
1328
|
+
type SummaryExpression = Record<string, any>;
|
1286
1329
|
/**
|
1287
1330
|
* The description of the aggregations you wish to receive.
|
1288
1331
|
*
|
1289
1332
|
* @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d"},"aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}
|
1290
1333
|
*/
|
1291
|
-
|
1334
|
+
type AggExpressionMap = {
|
1292
1335
|
[key: string]: AggExpression;
|
1293
1336
|
};
|
1294
1337
|
/**
|
@@ -1298,7 +1341,7 @@ declare type AggExpressionMap = {
|
|
1298
1341
|
*
|
1299
1342
|
* @x-go-type xata.AggExpression
|
1300
1343
|
*/
|
1301
|
-
|
1344
|
+
type AggExpression = {
|
1302
1345
|
count?: CountAgg;
|
1303
1346
|
} | {
|
1304
1347
|
sum?: SumAgg;
|
@@ -1320,13 +1363,13 @@ declare type AggExpression = {
|
|
1320
1363
|
/**
|
1321
1364
|
* Count the number of records with an optional filter.
|
1322
1365
|
*/
|
1323
|
-
|
1366
|
+
type CountAgg = {
|
1324
1367
|
filter?: FilterExpression;
|
1325
1368
|
} | '*';
|
1326
1369
|
/**
|
1327
1370
|
* The sum of the numeric values in a particular column.
|
1328
1371
|
*/
|
1329
|
-
|
1372
|
+
type SumAgg = {
|
1330
1373
|
/**
|
1331
1374
|
* The column on which to compute the sum. Must be a numeric type.
|
1332
1375
|
*/
|
@@ -1335,7 +1378,7 @@ declare type SumAgg = {
|
|
1335
1378
|
/**
|
1336
1379
|
* The max of the numeric values in a particular column.
|
1337
1380
|
*/
|
1338
|
-
|
1381
|
+
type MaxAgg = {
|
1339
1382
|
/**
|
1340
1383
|
* The column on which to compute the max. Must be a numeric type.
|
1341
1384
|
*/
|
@@ -1344,7 +1387,7 @@ declare type MaxAgg = {
|
|
1344
1387
|
/**
|
1345
1388
|
* The min of the numeric values in a particular column.
|
1346
1389
|
*/
|
1347
|
-
|
1390
|
+
type MinAgg = {
|
1348
1391
|
/**
|
1349
1392
|
* The column on which to compute the min. Must be a numeric type.
|
1350
1393
|
*/
|
@@ -1353,7 +1396,7 @@ declare type MinAgg = {
|
|
1353
1396
|
/**
|
1354
1397
|
* The average of the numeric values in a particular column.
|
1355
1398
|
*/
|
1356
|
-
|
1399
|
+
type AverageAgg = {
|
1357
1400
|
/**
|
1358
1401
|
* The column on which to compute the average. Must be a numeric type.
|
1359
1402
|
*/
|
@@ -1362,7 +1405,7 @@ declare type AverageAgg = {
|
|
1362
1405
|
/**
|
1363
1406
|
* Count the number of distinct values in a particular column.
|
1364
1407
|
*/
|
1365
|
-
|
1408
|
+
type UniqueCountAgg = {
|
1366
1409
|
/**
|
1367
1410
|
* The column from where to count the unique values.
|
1368
1411
|
*/
|
@@ -1377,7 +1420,7 @@ declare type UniqueCountAgg = {
|
|
1377
1420
|
/**
|
1378
1421
|
* Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
|
1379
1422
|
*/
|
1380
|
-
|
1423
|
+
type DateHistogramAgg = {
|
1381
1424
|
/**
|
1382
1425
|
* The column to use for bucketing. Must be of type datetime.
|
1383
1426
|
*/
|
@@ -1408,7 +1451,7 @@ declare type DateHistogramAgg = {
|
|
1408
1451
|
* Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
|
1409
1452
|
* The top values as ordered by the number of records (`$count`) are returned.
|
1410
1453
|
*/
|
1411
|
-
|
1454
|
+
type TopValuesAgg = {
|
1412
1455
|
/**
|
1413
1456
|
* The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
|
1414
1457
|
*/
|
@@ -1425,7 +1468,7 @@ declare type TopValuesAgg = {
|
|
1425
1468
|
/**
|
1426
1469
|
* Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
|
1427
1470
|
*/
|
1428
|
-
|
1471
|
+
type NumericHistogramAgg = {
|
1429
1472
|
/**
|
1430
1473
|
* The column to use for bucketing. Must be of numeric type.
|
1431
1474
|
*/
|
@@ -1448,7 +1491,7 @@ declare type NumericHistogramAgg = {
|
|
1448
1491
|
offset?: number;
|
1449
1492
|
aggs?: AggExpressionMap;
|
1450
1493
|
};
|
1451
|
-
|
1494
|
+
type HighlightExpression = {
|
1452
1495
|
/**
|
1453
1496
|
* Set to `false` to disable highlighting. By default it is `true`.
|
1454
1497
|
*/
|
@@ -1463,7 +1506,7 @@ declare type HighlightExpression = {
|
|
1463
1506
|
*
|
1464
1507
|
* @x-go-type xata.BoosterExpression
|
1465
1508
|
*/
|
1466
|
-
|
1509
|
+
type BoosterExpression = {
|
1467
1510
|
valueBooster?: ValueBooster$1;
|
1468
1511
|
} | {
|
1469
1512
|
numericBooster?: NumericBooster$1;
|
@@ -1473,7 +1516,7 @@ declare type BoosterExpression = {
|
|
1473
1516
|
/**
|
1474
1517
|
* Boost records with a particular value for a column.
|
1475
1518
|
*/
|
1476
|
-
|
1519
|
+
type ValueBooster$1 = {
|
1477
1520
|
/**
|
1478
1521
|
* The column in which to look for the value.
|
1479
1522
|
*/
|
@@ -1486,11 +1529,15 @@ declare type ValueBooster$1 = {
|
|
1486
1529
|
* The factor with which to multiply the score of the record.
|
1487
1530
|
*/
|
1488
1531
|
factor: number;
|
1532
|
+
/**
|
1533
|
+
* Only apply this booster to the records for which the provided filter matches.
|
1534
|
+
*/
|
1535
|
+
ifMatchesFilter?: FilterExpression;
|
1489
1536
|
};
|
1490
1537
|
/**
|
1491
1538
|
* Boost records based on the value of a numeric column.
|
1492
1539
|
*/
|
1493
|
-
|
1540
|
+
type NumericBooster$1 = {
|
1494
1541
|
/**
|
1495
1542
|
* The column in which to look for the value.
|
1496
1543
|
*/
|
@@ -1499,13 +1546,31 @@ declare type NumericBooster$1 = {
|
|
1499
1546
|
* The factor with which to multiply the value of the column before adding it to the item score.
|
1500
1547
|
*/
|
1501
1548
|
factor: number;
|
1549
|
+
/**
|
1550
|
+
* Modifier to be applied to the column value, before being multiplied with the factor. The possible values are:
|
1551
|
+
* - none (default).
|
1552
|
+
* - log: common logarithm (base 10)
|
1553
|
+
* - log1p: add 1 then take the common logarithm. This ensures that the value is positive if the
|
1554
|
+
* value is between 0 and 1.
|
1555
|
+
* - ln: natural logarithm (base e)
|
1556
|
+
* - ln1p: add 1 then take the natural logarithm. This ensures that the value is positive if the
|
1557
|
+
* value is between 0 and 1.
|
1558
|
+
* - square: raise the value to the power of two.
|
1559
|
+
* - sqrt: take the square root of the value.
|
1560
|
+
* - reciprocal: reciprocate the value (if the value is `x`, the reciprocal is `1/x`).
|
1561
|
+
*/
|
1562
|
+
modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
|
1563
|
+
/**
|
1564
|
+
* Only apply this booster to the records for which the provided filter matches.
|
1565
|
+
*/
|
1566
|
+
ifMatchesFilter?: FilterExpression;
|
1502
1567
|
};
|
1503
1568
|
/**
|
1504
1569
|
* Boost records based on the value of a datetime column. It is configured via "origin", "scale", and "decay". The further away from the "origin",
|
1505
1570
|
* the more the score is decayed. The decay function uses an exponential function. For example if origin is "now", and scale is 10 days and decay is 0.5, it
|
1506
1571
|
* should be interpreted as: a record with a date 10 days before/after origin will score 2 times less than a record with the date at origin.
|
1507
1572
|
*/
|
1508
|
-
|
1573
|
+
type DateBooster$1 = {
|
1509
1574
|
/**
|
1510
1575
|
* The column in which to look for the value.
|
1511
1576
|
*/
|
@@ -1525,25 +1590,29 @@ declare type DateBooster$1 = {
|
|
1525
1590
|
* The decay factor to expect at "scale" distance from the "origin".
|
1526
1591
|
*/
|
1527
1592
|
decay: number;
|
1593
|
+
/**
|
1594
|
+
* Only apply this booster to the records for which the provided filter matches.
|
1595
|
+
*/
|
1596
|
+
ifMatchesFilter?: FilterExpression;
|
1528
1597
|
};
|
1529
|
-
|
1530
|
-
|
1598
|
+
type FilterList = FilterExpression | FilterExpression[];
|
1599
|
+
type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
|
1531
1600
|
/**
|
1532
1601
|
* @maxProperties 1
|
1533
1602
|
* @minProperties 1
|
1534
1603
|
*/
|
1535
|
-
|
1604
|
+
type FilterColumnIncludes = {
|
1536
1605
|
$includes?: FilterPredicate;
|
1537
1606
|
$includesAny?: FilterPredicate;
|
1538
1607
|
$includesAll?: FilterPredicate;
|
1539
1608
|
$includesNone?: FilterPredicate;
|
1540
1609
|
};
|
1541
|
-
|
1610
|
+
type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
|
1542
1611
|
/**
|
1543
1612
|
* @maxProperties 1
|
1544
1613
|
* @minProperties 1
|
1545
1614
|
*/
|
1546
|
-
|
1615
|
+
type FilterPredicateOp = {
|
1547
1616
|
$any?: FilterPredicate[];
|
1548
1617
|
$all?: FilterPredicate[];
|
1549
1618
|
$none?: FilterPredicate | FilterPredicate[];
|
@@ -1563,18 +1632,18 @@ declare type FilterPredicateOp = {
|
|
1563
1632
|
* @maxProperties 2
|
1564
1633
|
* @minProperties 2
|
1565
1634
|
*/
|
1566
|
-
|
1635
|
+
type FilterPredicateRangeOp = {
|
1567
1636
|
$lt?: FilterRangeValue;
|
1568
1637
|
$le?: FilterRangeValue;
|
1569
1638
|
$gt?: FilterRangeValue;
|
1570
1639
|
$ge?: FilterRangeValue;
|
1571
1640
|
};
|
1572
|
-
|
1573
|
-
|
1641
|
+
type FilterRangeValue = number | string;
|
1642
|
+
type FilterValue = number | string | boolean;
|
1574
1643
|
/**
|
1575
1644
|
* Pagination settings.
|
1576
1645
|
*/
|
1577
|
-
|
1646
|
+
type PageConfig = {
|
1578
1647
|
/**
|
1579
1648
|
* Query the next page that follow the cursor.
|
1580
1649
|
*/
|
@@ -1604,16 +1673,35 @@ declare type PageConfig = {
|
|
1604
1673
|
*/
|
1605
1674
|
offset?: number;
|
1606
1675
|
};
|
1676
|
+
/**
|
1677
|
+
* Pagination settings for the search endpoints.
|
1678
|
+
*/
|
1679
|
+
type SearchPageConfig = {
|
1680
|
+
/**
|
1681
|
+
* Set page size.
|
1682
|
+
*
|
1683
|
+
* @default 25
|
1684
|
+
* @maximum 200
|
1685
|
+
*/
|
1686
|
+
size?: number;
|
1687
|
+
/**
|
1688
|
+
* Use offset to skip entries. To skip pages set offset to a multiple of size.
|
1689
|
+
*
|
1690
|
+
* @default 0
|
1691
|
+
* @maximum 800
|
1692
|
+
*/
|
1693
|
+
offset?: number;
|
1694
|
+
};
|
1607
1695
|
/**
|
1608
1696
|
* @example name
|
1609
1697
|
* @example email
|
1610
1698
|
* @example created_at
|
1611
1699
|
*/
|
1612
|
-
|
1700
|
+
type ColumnsProjection = string[];
|
1613
1701
|
/**
|
1614
1702
|
* Xata Table Record Metadata
|
1615
1703
|
*/
|
1616
|
-
|
1704
|
+
type RecordMeta = {
|
1617
1705
|
id: RecordID;
|
1618
1706
|
xata: {
|
1619
1707
|
/**
|
@@ -1645,11 +1733,11 @@ declare type RecordMeta = {
|
|
1645
1733
|
/**
|
1646
1734
|
* @pattern [a-zA-Z0-9_-~:]+
|
1647
1735
|
*/
|
1648
|
-
|
1736
|
+
type RecordID = string;
|
1649
1737
|
/**
|
1650
1738
|
* @example {"newName":"newName","oldName":"oldName"}
|
1651
1739
|
*/
|
1652
|
-
|
1740
|
+
type TableRename = {
|
1653
1741
|
/**
|
1654
1742
|
* @minLength 1
|
1655
1743
|
*/
|
@@ -1662,7 +1750,7 @@ declare type TableRename = {
|
|
1662
1750
|
/**
|
1663
1751
|
* Records metadata
|
1664
1752
|
*/
|
1665
|
-
|
1753
|
+
type RecordsMetadata = {
|
1666
1754
|
page: {
|
1667
1755
|
/**
|
1668
1756
|
* last record id
|
@@ -1674,7 +1762,7 @@ declare type RecordsMetadata = {
|
|
1674
1762
|
more: boolean;
|
1675
1763
|
};
|
1676
1764
|
};
|
1677
|
-
|
1765
|
+
type AggResponse$1 = (number | null) | {
|
1678
1766
|
values: ({
|
1679
1767
|
$key: string | number;
|
1680
1768
|
$count: number;
|
@@ -1685,7 +1773,7 @@ declare type AggResponse$1 = (number | null) | {
|
|
1685
1773
|
/**
|
1686
1774
|
* A transaction operation
|
1687
1775
|
*/
|
1688
|
-
|
1776
|
+
type TransactionOperation$1 = {
|
1689
1777
|
insert: TransactionInsertOp;
|
1690
1778
|
} | {
|
1691
1779
|
update: TransactionUpdateOp;
|
@@ -1695,7 +1783,7 @@ declare type TransactionOperation = {
|
|
1695
1783
|
/**
|
1696
1784
|
* Insert operation
|
1697
1785
|
*/
|
1698
|
-
|
1786
|
+
type TransactionInsertOp = {
|
1699
1787
|
/**
|
1700
1788
|
* The table name
|
1701
1789
|
*/
|
@@ -1725,7 +1813,7 @@ declare type TransactionInsertOp = {
|
|
1725
1813
|
/**
|
1726
1814
|
* Update operation
|
1727
1815
|
*/
|
1728
|
-
|
1816
|
+
type TransactionUpdateOp = {
|
1729
1817
|
/**
|
1730
1818
|
* The table name
|
1731
1819
|
*/
|
@@ -1749,7 +1837,7 @@ declare type TransactionUpdateOp = {
|
|
1749
1837
|
/**
|
1750
1838
|
* A delete operation. The transaction will continue if no record matches the ID.
|
1751
1839
|
*/
|
1752
|
-
|
1840
|
+
type TransactionDeleteOp = {
|
1753
1841
|
/**
|
1754
1842
|
* The table name
|
1755
1843
|
*/
|
@@ -1759,7 +1847,7 @@ declare type TransactionDeleteOp = {
|
|
1759
1847
|
/**
|
1760
1848
|
* A result from an insert operation.
|
1761
1849
|
*/
|
1762
|
-
|
1850
|
+
type TransactionResultInsert = {
|
1763
1851
|
/**
|
1764
1852
|
* The type of operation who's result is being returned.
|
1765
1853
|
*/
|
@@ -1773,7 +1861,7 @@ declare type TransactionResultInsert = {
|
|
1773
1861
|
/**
|
1774
1862
|
* A result from an update operation.
|
1775
1863
|
*/
|
1776
|
-
|
1864
|
+
type TransactionResultUpdate = {
|
1777
1865
|
/**
|
1778
1866
|
* The type of operation who's result is being returned.
|
1779
1867
|
*/
|
@@ -1787,7 +1875,7 @@ declare type TransactionResultUpdate = {
|
|
1787
1875
|
/**
|
1788
1876
|
* A result from a delete operation.
|
1789
1877
|
*/
|
1790
|
-
|
1878
|
+
type TransactionResultDelete = {
|
1791
1879
|
/**
|
1792
1880
|
* The type of operation who's result is being returned.
|
1793
1881
|
*/
|
@@ -1802,7 +1890,7 @@ declare type TransactionResultDelete = {
|
|
1802
1890
|
*
|
1803
1891
|
* @x-go-type xata.ErrTxOp
|
1804
1892
|
*/
|
1805
|
-
|
1893
|
+
type TransactionError = {
|
1806
1894
|
/**
|
1807
1895
|
* The index of the failing operation
|
1808
1896
|
*/
|
@@ -1816,11 +1904,11 @@ declare type TransactionError = {
|
|
1816
1904
|
* @format date-time
|
1817
1905
|
* @x-go-type string
|
1818
1906
|
*/
|
1819
|
-
|
1907
|
+
type DateTime = string;
|
1820
1908
|
/**
|
1821
1909
|
* Xata Table Record Metadata
|
1822
1910
|
*/
|
1823
|
-
|
1911
|
+
type XataRecord$1 = RecordMeta & {
|
1824
1912
|
[key: string]: any;
|
1825
1913
|
};
|
1826
1914
|
|
@@ -1830,42 +1918,42 @@ declare type XataRecord$1 = RecordMeta & {
|
|
1830
1918
|
* @version 1.0
|
1831
1919
|
*/
|
1832
1920
|
|
1833
|
-
|
1921
|
+
type SimpleError = {
|
1834
1922
|
id?: string;
|
1835
1923
|
message: string;
|
1836
1924
|
};
|
1837
|
-
|
1925
|
+
type BulkError = {
|
1838
1926
|
errors: {
|
1839
1927
|
message?: string;
|
1840
1928
|
status?: number;
|
1841
1929
|
}[];
|
1842
1930
|
};
|
1843
|
-
|
1931
|
+
type BulkInsertResponse = {
|
1844
1932
|
recordIDs: string[];
|
1845
1933
|
} | {
|
1846
1934
|
records: XataRecord$1[];
|
1847
1935
|
};
|
1848
|
-
|
1936
|
+
type BranchMigrationPlan = {
|
1849
1937
|
version: number;
|
1850
1938
|
migration: BranchMigration;
|
1851
1939
|
};
|
1852
|
-
|
1853
|
-
|
1940
|
+
type RecordResponse = XataRecord$1;
|
1941
|
+
type SchemaCompareResponse = {
|
1854
1942
|
source: Schema;
|
1855
1943
|
target: Schema;
|
1856
1944
|
edits: SchemaEditScript;
|
1857
1945
|
};
|
1858
|
-
|
1946
|
+
type RecordUpdateResponse = XataRecord$1 | {
|
1859
1947
|
id: string;
|
1860
1948
|
xata: {
|
1861
1949
|
version: number;
|
1862
1950
|
};
|
1863
1951
|
};
|
1864
|
-
|
1952
|
+
type QueryResponse = {
|
1865
1953
|
records: XataRecord$1[];
|
1866
1954
|
meta: RecordsMetadata;
|
1867
1955
|
};
|
1868
|
-
|
1956
|
+
type SchemaUpdateResponse = {
|
1869
1957
|
/**
|
1870
1958
|
* @minLength 1
|
1871
1959
|
*/
|
@@ -1873,25 +1961,25 @@ declare type SchemaUpdateResponse = {
|
|
1873
1961
|
parentMigrationID: string;
|
1874
1962
|
status: MigrationStatus;
|
1875
1963
|
};
|
1876
|
-
|
1964
|
+
type SummarizeResponse = {
|
1877
1965
|
summaries: Record<string, any>[];
|
1878
1966
|
};
|
1879
1967
|
/**
|
1880
1968
|
* @example {"aggs":{"dailyUniqueUsers":{"values":[{"key":"2022-02-22T22:22:22Z","uniqueUsers":134},{"key":"2022-02-23T22:22:22Z","uniqueUsers":90}]}}}
|
1881
1969
|
*/
|
1882
|
-
|
1970
|
+
type AggResponse = {
|
1883
1971
|
aggs?: {
|
1884
1972
|
[key: string]: AggResponse$1;
|
1885
1973
|
};
|
1886
1974
|
};
|
1887
|
-
|
1975
|
+
type SearchResponse = {
|
1888
1976
|
records: XataRecord$1[];
|
1889
1977
|
warning?: string;
|
1890
1978
|
};
|
1891
1979
|
/**
|
1892
1980
|
* @x-go-type TxSuccess
|
1893
1981
|
*/
|
1894
|
-
|
1982
|
+
type TransactionSuccess = {
|
1895
1983
|
/**
|
1896
1984
|
* An ordered array of results from the submitted operations that were executed
|
1897
1985
|
*/
|
@@ -1900,25 +1988,25 @@ declare type TransactionSuccess = {
|
|
1900
1988
|
/**
|
1901
1989
|
* @x-go-type TxFailure
|
1902
1990
|
*/
|
1903
|
-
|
1991
|
+
type TransactionFailure = {
|
1904
1992
|
/**
|
1905
1993
|
* An array of errors from the submitted operations.
|
1906
1994
|
*/
|
1907
1995
|
errors: TransactionError[];
|
1908
1996
|
};
|
1909
|
-
|
1997
|
+
type BadRequestError = {
|
1910
1998
|
id?: string;
|
1911
1999
|
message: string;
|
1912
2000
|
};
|
1913
2001
|
/**
|
1914
2002
|
* @example {"message":"invalid API key"}
|
1915
2003
|
*/
|
1916
|
-
|
2004
|
+
type AuthError = {
|
1917
2005
|
id?: string;
|
1918
2006
|
message: string;
|
1919
2007
|
};
|
1920
2008
|
|
1921
|
-
|
2009
|
+
type DataPlaneFetcherExtraProps = {
|
1922
2010
|
apiUrl: string;
|
1923
2011
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
1924
2012
|
fetchImpl: FetchImpl;
|
@@ -1927,8 +2015,9 @@ declare type DataPlaneFetcherExtraProps = {
|
|
1927
2015
|
signal?: AbortSignal;
|
1928
2016
|
clientID?: string;
|
1929
2017
|
sessionID?: string;
|
2018
|
+
clientName?: string;
|
1930
2019
|
};
|
1931
|
-
|
2020
|
+
type ErrorWrapper<TError> = TError | {
|
1932
2021
|
status: 'unknown';
|
1933
2022
|
payload: string;
|
1934
2023
|
};
|
@@ -1939,25 +2028,25 @@ declare type ErrorWrapper<TError> = TError | {
|
|
1939
2028
|
* @version 1.0
|
1940
2029
|
*/
|
1941
2030
|
|
1942
|
-
|
2031
|
+
type DEPRECATEDgetDatabaseListPathParams = {
|
1943
2032
|
workspace: string;
|
1944
2033
|
region: string;
|
1945
2034
|
};
|
1946
|
-
|
2035
|
+
type DEPRECATEDgetDatabaseListError = ErrorWrapper<{
|
1947
2036
|
status: 400;
|
1948
2037
|
payload: BadRequestError;
|
1949
2038
|
} | {
|
1950
2039
|
status: 401;
|
1951
2040
|
payload: AuthError;
|
1952
2041
|
}>;
|
1953
|
-
|
2042
|
+
type DEPRECATEDgetDatabaseListVariables = {
|
1954
2043
|
pathParams: DEPRECATEDgetDatabaseListPathParams;
|
1955
2044
|
} & DataPlaneFetcherExtraProps;
|
1956
2045
|
/**
|
1957
2046
|
* List all databases available in your Workspace.
|
1958
2047
|
*/
|
1959
2048
|
declare const dEPRECATEDgetDatabaseList: (variables: DEPRECATEDgetDatabaseListVariables, signal?: AbortSignal) => Promise<DEPRECATEDListDatabasesResponse>;
|
1960
|
-
|
2049
|
+
type GetBranchListPathParams = {
|
1961
2050
|
/**
|
1962
2051
|
* The Database Name
|
1963
2052
|
*/
|
@@ -1965,7 +2054,7 @@ declare type GetBranchListPathParams = {
|
|
1965
2054
|
workspace: string;
|
1966
2055
|
region: string;
|
1967
2056
|
};
|
1968
|
-
|
2057
|
+
type GetBranchListError = ErrorWrapper<{
|
1969
2058
|
status: 400;
|
1970
2059
|
payload: BadRequestError;
|
1971
2060
|
} | {
|
@@ -1975,14 +2064,14 @@ declare type GetBranchListError = ErrorWrapper<{
|
|
1975
2064
|
status: 404;
|
1976
2065
|
payload: SimpleError;
|
1977
2066
|
}>;
|
1978
|
-
|
2067
|
+
type GetBranchListVariables = {
|
1979
2068
|
pathParams: GetBranchListPathParams;
|
1980
2069
|
} & DataPlaneFetcherExtraProps;
|
1981
2070
|
/**
|
1982
2071
|
* List all available Branches
|
1983
2072
|
*/
|
1984
2073
|
declare const getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
|
1985
|
-
|
2074
|
+
type DEPRECATEDcreateDatabasePathParams = {
|
1986
2075
|
/**
|
1987
2076
|
* The Database Name
|
1988
2077
|
*/
|
@@ -1990,14 +2079,14 @@ declare type DEPRECATEDcreateDatabasePathParams = {
|
|
1990
2079
|
workspace: string;
|
1991
2080
|
region: string;
|
1992
2081
|
};
|
1993
|
-
|
2082
|
+
type DEPRECATEDcreateDatabaseError = ErrorWrapper<{
|
1994
2083
|
status: 400;
|
1995
2084
|
payload: BadRequestError;
|
1996
2085
|
} | {
|
1997
2086
|
status: 401;
|
1998
2087
|
payload: AuthError;
|
1999
2088
|
}>;
|
2000
|
-
|
2089
|
+
type DEPRECATEDcreateDatabaseResponse = {
|
2001
2090
|
/**
|
2002
2091
|
* @minLength 1
|
2003
2092
|
*/
|
@@ -2005,7 +2094,7 @@ declare type DEPRECATEDcreateDatabaseResponse = {
|
|
2005
2094
|
branchName?: string;
|
2006
2095
|
status: MigrationStatus;
|
2007
2096
|
};
|
2008
|
-
|
2097
|
+
type DEPRECATEDcreateDatabaseRequestBody = {
|
2009
2098
|
/**
|
2010
2099
|
* @minLength 1
|
2011
2100
|
*/
|
@@ -2015,7 +2104,7 @@ declare type DEPRECATEDcreateDatabaseRequestBody = {
|
|
2015
2104
|
};
|
2016
2105
|
metadata?: BranchMetadata;
|
2017
2106
|
};
|
2018
|
-
|
2107
|
+
type DEPRECATEDcreateDatabaseVariables = {
|
2019
2108
|
body?: DEPRECATEDcreateDatabaseRequestBody;
|
2020
2109
|
pathParams: DEPRECATEDcreateDatabasePathParams;
|
2021
2110
|
} & DataPlaneFetcherExtraProps;
|
@@ -2023,7 +2112,7 @@ declare type DEPRECATEDcreateDatabaseVariables = {
|
|
2023
2112
|
* Create Database with identifier name
|
2024
2113
|
*/
|
2025
2114
|
declare const dEPRECATEDcreateDatabase: (variables: DEPRECATEDcreateDatabaseVariables, signal?: AbortSignal) => Promise<DEPRECATEDcreateDatabaseResponse>;
|
2026
|
-
|
2115
|
+
type DEPRECATEDdeleteDatabasePathParams = {
|
2027
2116
|
/**
|
2028
2117
|
* The Database Name
|
2029
2118
|
*/
|
@@ -2031,7 +2120,7 @@ declare type DEPRECATEDdeleteDatabasePathParams = {
|
|
2031
2120
|
workspace: string;
|
2032
2121
|
region: string;
|
2033
2122
|
};
|
2034
|
-
|
2123
|
+
type DEPRECATEDdeleteDatabaseError = ErrorWrapper<{
|
2035
2124
|
status: 400;
|
2036
2125
|
payload: BadRequestError;
|
2037
2126
|
} | {
|
@@ -2041,17 +2130,17 @@ declare type DEPRECATEDdeleteDatabaseError = ErrorWrapper<{
|
|
2041
2130
|
status: 404;
|
2042
2131
|
payload: SimpleError;
|
2043
2132
|
}>;
|
2044
|
-
|
2133
|
+
type DEPRECATEDdeleteDatabaseResponse = {
|
2045
2134
|
status: MigrationStatus;
|
2046
2135
|
};
|
2047
|
-
|
2136
|
+
type DEPRECATEDdeleteDatabaseVariables = {
|
2048
2137
|
pathParams: DEPRECATEDdeleteDatabasePathParams;
|
2049
2138
|
} & DataPlaneFetcherExtraProps;
|
2050
2139
|
/**
|
2051
2140
|
* Delete a database and all of its branches and tables permanently.
|
2052
2141
|
*/
|
2053
2142
|
declare const dEPRECATEDdeleteDatabase: (variables: DEPRECATEDdeleteDatabaseVariables, signal?: AbortSignal) => Promise<DEPRECATEDdeleteDatabaseResponse>;
|
2054
|
-
|
2143
|
+
type DEPRECATEDgetDatabaseMetadataPathParams = {
|
2055
2144
|
/**
|
2056
2145
|
* The Database Name
|
2057
2146
|
*/
|
@@ -2059,7 +2148,7 @@ declare type DEPRECATEDgetDatabaseMetadataPathParams = {
|
|
2059
2148
|
workspace: string;
|
2060
2149
|
region: string;
|
2061
2150
|
};
|
2062
|
-
|
2151
|
+
type DEPRECATEDgetDatabaseMetadataError = ErrorWrapper<{
|
2063
2152
|
status: 400;
|
2064
2153
|
payload: BadRequestError;
|
2065
2154
|
} | {
|
@@ -2069,14 +2158,14 @@ declare type DEPRECATEDgetDatabaseMetadataError = ErrorWrapper<{
|
|
2069
2158
|
status: 404;
|
2070
2159
|
payload: SimpleError;
|
2071
2160
|
}>;
|
2072
|
-
|
2161
|
+
type DEPRECATEDgetDatabaseMetadataVariables = {
|
2073
2162
|
pathParams: DEPRECATEDgetDatabaseMetadataPathParams;
|
2074
2163
|
} & DataPlaneFetcherExtraProps;
|
2075
2164
|
/**
|
2076
2165
|
* Retrieve metadata of the given database
|
2077
2166
|
*/
|
2078
2167
|
declare const dEPRECATEDgetDatabaseMetadata: (variables: DEPRECATEDgetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DEPRECATEDDatabaseMetadata>;
|
2079
|
-
|
2168
|
+
type DEPRECATEDupdateDatabaseMetadataPathParams = {
|
2080
2169
|
/**
|
2081
2170
|
* The Database Name
|
2082
2171
|
*/
|
@@ -2084,7 +2173,7 @@ declare type DEPRECATEDupdateDatabaseMetadataPathParams = {
|
|
2084
2173
|
workspace: string;
|
2085
2174
|
region: string;
|
2086
2175
|
};
|
2087
|
-
|
2176
|
+
type DEPRECATEDupdateDatabaseMetadataError = ErrorWrapper<{
|
2088
2177
|
status: 400;
|
2089
2178
|
payload: BadRequestError;
|
2090
2179
|
} | {
|
@@ -2094,7 +2183,7 @@ declare type DEPRECATEDupdateDatabaseMetadataError = ErrorWrapper<{
|
|
2094
2183
|
status: 404;
|
2095
2184
|
payload: SimpleError;
|
2096
2185
|
}>;
|
2097
|
-
|
2186
|
+
type DEPRECATEDupdateDatabaseMetadataRequestBody = {
|
2098
2187
|
ui?: {
|
2099
2188
|
/**
|
2100
2189
|
* @minLength 1
|
@@ -2102,7 +2191,7 @@ declare type DEPRECATEDupdateDatabaseMetadataRequestBody = {
|
|
2102
2191
|
color?: string;
|
2103
2192
|
};
|
2104
2193
|
};
|
2105
|
-
|
2194
|
+
type DEPRECATEDupdateDatabaseMetadataVariables = {
|
2106
2195
|
body?: DEPRECATEDupdateDatabaseMetadataRequestBody;
|
2107
2196
|
pathParams: DEPRECATEDupdateDatabaseMetadataPathParams;
|
2108
2197
|
} & DataPlaneFetcherExtraProps;
|
@@ -2110,7 +2199,7 @@ declare type DEPRECATEDupdateDatabaseMetadataVariables = {
|
|
2110
2199
|
* Update the color of the selected database
|
2111
2200
|
*/
|
2112
2201
|
declare const dEPRECATEDupdateDatabaseMetadata: (variables: DEPRECATEDupdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DEPRECATEDDatabaseMetadata>;
|
2113
|
-
|
2202
|
+
type GetBranchDetailsPathParams = {
|
2114
2203
|
/**
|
2115
2204
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2116
2205
|
*/
|
@@ -2118,7 +2207,7 @@ declare type GetBranchDetailsPathParams = {
|
|
2118
2207
|
workspace: string;
|
2119
2208
|
region: string;
|
2120
2209
|
};
|
2121
|
-
|
2210
|
+
type GetBranchDetailsError = ErrorWrapper<{
|
2122
2211
|
status: 400;
|
2123
2212
|
payload: BadRequestError;
|
2124
2213
|
} | {
|
@@ -2128,11 +2217,11 @@ declare type GetBranchDetailsError = ErrorWrapper<{
|
|
2128
2217
|
status: 404;
|
2129
2218
|
payload: SimpleError;
|
2130
2219
|
}>;
|
2131
|
-
|
2220
|
+
type GetBranchDetailsVariables = {
|
2132
2221
|
pathParams: GetBranchDetailsPathParams;
|
2133
2222
|
} & DataPlaneFetcherExtraProps;
|
2134
2223
|
declare const getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal) => Promise<DBBranch>;
|
2135
|
-
|
2224
|
+
type CreateBranchPathParams = {
|
2136
2225
|
/**
|
2137
2226
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2138
2227
|
*/
|
@@ -2140,13 +2229,13 @@ declare type CreateBranchPathParams = {
|
|
2140
2229
|
workspace: string;
|
2141
2230
|
region: string;
|
2142
2231
|
};
|
2143
|
-
|
2232
|
+
type CreateBranchQueryParams = {
|
2144
2233
|
/**
|
2145
2234
|
* Name of source branch to branch the new schema from
|
2146
2235
|
*/
|
2147
2236
|
from?: string;
|
2148
2237
|
};
|
2149
|
-
|
2238
|
+
type CreateBranchError = ErrorWrapper<{
|
2150
2239
|
status: 400;
|
2151
2240
|
payload: BadRequestError;
|
2152
2241
|
} | {
|
@@ -2156,7 +2245,7 @@ declare type CreateBranchError = ErrorWrapper<{
|
|
2156
2245
|
status: 404;
|
2157
2246
|
payload: SimpleError;
|
2158
2247
|
}>;
|
2159
|
-
|
2248
|
+
type CreateBranchResponse = {
|
2160
2249
|
/**
|
2161
2250
|
* @minLength 1
|
2162
2251
|
*/
|
@@ -2164,20 +2253,20 @@ declare type CreateBranchResponse = {
|
|
2164
2253
|
branchName: string;
|
2165
2254
|
status: MigrationStatus;
|
2166
2255
|
};
|
2167
|
-
|
2256
|
+
type CreateBranchRequestBody = {
|
2168
2257
|
/**
|
2169
2258
|
* Select the branch to fork from. Defaults to 'main'
|
2170
2259
|
*/
|
2171
2260
|
from?: string;
|
2172
2261
|
metadata?: BranchMetadata;
|
2173
2262
|
};
|
2174
|
-
|
2263
|
+
type CreateBranchVariables = {
|
2175
2264
|
body?: CreateBranchRequestBody;
|
2176
2265
|
pathParams: CreateBranchPathParams;
|
2177
2266
|
queryParams?: CreateBranchQueryParams;
|
2178
2267
|
} & DataPlaneFetcherExtraProps;
|
2179
2268
|
declare const createBranch: (variables: CreateBranchVariables, signal?: AbortSignal) => Promise<CreateBranchResponse>;
|
2180
|
-
|
2269
|
+
type DeleteBranchPathParams = {
|
2181
2270
|
/**
|
2182
2271
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2183
2272
|
*/
|
@@ -2185,7 +2274,7 @@ declare type DeleteBranchPathParams = {
|
|
2185
2274
|
workspace: string;
|
2186
2275
|
region: string;
|
2187
2276
|
};
|
2188
|
-
|
2277
|
+
type DeleteBranchError = ErrorWrapper<{
|
2189
2278
|
status: 400;
|
2190
2279
|
payload: BadRequestError;
|
2191
2280
|
} | {
|
@@ -2195,17 +2284,17 @@ declare type DeleteBranchError = ErrorWrapper<{
|
|
2195
2284
|
status: 404;
|
2196
2285
|
payload: SimpleError;
|
2197
2286
|
}>;
|
2198
|
-
|
2287
|
+
type DeleteBranchResponse = {
|
2199
2288
|
status: MigrationStatus;
|
2200
2289
|
};
|
2201
|
-
|
2290
|
+
type DeleteBranchVariables = {
|
2202
2291
|
pathParams: DeleteBranchPathParams;
|
2203
2292
|
} & DataPlaneFetcherExtraProps;
|
2204
2293
|
/**
|
2205
2294
|
* Delete the branch in the database and all its resources
|
2206
2295
|
*/
|
2207
2296
|
declare const deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<DeleteBranchResponse>;
|
2208
|
-
|
2297
|
+
type UpdateBranchMetadataPathParams = {
|
2209
2298
|
/**
|
2210
2299
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2211
2300
|
*/
|
@@ -2213,7 +2302,7 @@ declare type UpdateBranchMetadataPathParams = {
|
|
2213
2302
|
workspace: string;
|
2214
2303
|
region: string;
|
2215
2304
|
};
|
2216
|
-
|
2305
|
+
type UpdateBranchMetadataError = ErrorWrapper<{
|
2217
2306
|
status: 400;
|
2218
2307
|
payload: BadRequestError;
|
2219
2308
|
} | {
|
@@ -2223,7 +2312,7 @@ declare type UpdateBranchMetadataError = ErrorWrapper<{
|
|
2223
2312
|
status: 404;
|
2224
2313
|
payload: SimpleError;
|
2225
2314
|
}>;
|
2226
|
-
|
2315
|
+
type UpdateBranchMetadataVariables = {
|
2227
2316
|
body?: BranchMetadata;
|
2228
2317
|
pathParams: UpdateBranchMetadataPathParams;
|
2229
2318
|
} & DataPlaneFetcherExtraProps;
|
@@ -2231,7 +2320,7 @@ declare type UpdateBranchMetadataVariables = {
|
|
2231
2320
|
* Update the branch metadata
|
2232
2321
|
*/
|
2233
2322
|
declare const updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal) => Promise<undefined>;
|
2234
|
-
|
2323
|
+
type GetBranchMetadataPathParams = {
|
2235
2324
|
/**
|
2236
2325
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2237
2326
|
*/
|
@@ -2239,7 +2328,7 @@ declare type GetBranchMetadataPathParams = {
|
|
2239
2328
|
workspace: string;
|
2240
2329
|
region: string;
|
2241
2330
|
};
|
2242
|
-
|
2331
|
+
type GetBranchMetadataError = ErrorWrapper<{
|
2243
2332
|
status: 400;
|
2244
2333
|
payload: BadRequestError;
|
2245
2334
|
} | {
|
@@ -2249,11 +2338,11 @@ declare type GetBranchMetadataError = ErrorWrapper<{
|
|
2249
2338
|
status: 404;
|
2250
2339
|
payload: SimpleError;
|
2251
2340
|
}>;
|
2252
|
-
|
2341
|
+
type GetBranchMetadataVariables = {
|
2253
2342
|
pathParams: GetBranchMetadataPathParams;
|
2254
2343
|
} & DataPlaneFetcherExtraProps;
|
2255
2344
|
declare const getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal) => Promise<BranchMetadata>;
|
2256
|
-
|
2345
|
+
type GetBranchStatsPathParams = {
|
2257
2346
|
/**
|
2258
2347
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2259
2348
|
*/
|
@@ -2261,7 +2350,7 @@ declare type GetBranchStatsPathParams = {
|
|
2261
2350
|
workspace: string;
|
2262
2351
|
region: string;
|
2263
2352
|
};
|
2264
|
-
|
2353
|
+
type GetBranchStatsError = ErrorWrapper<{
|
2265
2354
|
status: 400;
|
2266
2355
|
payload: SimpleError;
|
2267
2356
|
} | {
|
@@ -2271,7 +2360,7 @@ declare type GetBranchStatsError = ErrorWrapper<{
|
|
2271
2360
|
status: 404;
|
2272
2361
|
payload: SimpleError;
|
2273
2362
|
}>;
|
2274
|
-
|
2363
|
+
type GetBranchStatsResponse = {
|
2275
2364
|
timestamp: string;
|
2276
2365
|
interval: string;
|
2277
2366
|
resolution: string;
|
@@ -2282,14 +2371,14 @@ declare type GetBranchStatsResponse = {
|
|
2282
2371
|
writeLatency?: MetricsLatency;
|
2283
2372
|
warning?: string;
|
2284
2373
|
};
|
2285
|
-
|
2374
|
+
type GetBranchStatsVariables = {
|
2286
2375
|
pathParams: GetBranchStatsPathParams;
|
2287
2376
|
} & DataPlaneFetcherExtraProps;
|
2288
2377
|
/**
|
2289
2378
|
* Get branch usage metrics.
|
2290
2379
|
*/
|
2291
2380
|
declare const getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal) => Promise<GetBranchStatsResponse>;
|
2292
|
-
|
2381
|
+
type GetGitBranchesMappingPathParams = {
|
2293
2382
|
/**
|
2294
2383
|
* The Database Name
|
2295
2384
|
*/
|
@@ -2297,14 +2386,14 @@ declare type GetGitBranchesMappingPathParams = {
|
|
2297
2386
|
workspace: string;
|
2298
2387
|
region: string;
|
2299
2388
|
};
|
2300
|
-
|
2389
|
+
type GetGitBranchesMappingError = ErrorWrapper<{
|
2301
2390
|
status: 400;
|
2302
2391
|
payload: BadRequestError;
|
2303
2392
|
} | {
|
2304
2393
|
status: 401;
|
2305
2394
|
payload: AuthError;
|
2306
2395
|
}>;
|
2307
|
-
|
2396
|
+
type GetGitBranchesMappingVariables = {
|
2308
2397
|
pathParams: GetGitBranchesMappingPathParams;
|
2309
2398
|
} & DataPlaneFetcherExtraProps;
|
2310
2399
|
/**
|
@@ -2332,7 +2421,7 @@ declare type GetGitBranchesMappingVariables = {
|
|
2332
2421
|
* ```
|
2333
2422
|
*/
|
2334
2423
|
declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables, signal?: AbortSignal) => Promise<ListGitBranchesResponse>;
|
2335
|
-
|
2424
|
+
type AddGitBranchesEntryPathParams = {
|
2336
2425
|
/**
|
2337
2426
|
* The Database Name
|
2338
2427
|
*/
|
@@ -2340,20 +2429,20 @@ declare type AddGitBranchesEntryPathParams = {
|
|
2340
2429
|
workspace: string;
|
2341
2430
|
region: string;
|
2342
2431
|
};
|
2343
|
-
|
2432
|
+
type AddGitBranchesEntryError = ErrorWrapper<{
|
2344
2433
|
status: 400;
|
2345
2434
|
payload: BadRequestError;
|
2346
2435
|
} | {
|
2347
2436
|
status: 401;
|
2348
2437
|
payload: AuthError;
|
2349
2438
|
}>;
|
2350
|
-
|
2439
|
+
type AddGitBranchesEntryResponse = {
|
2351
2440
|
/**
|
2352
2441
|
* Warning message
|
2353
2442
|
*/
|
2354
2443
|
warning?: string;
|
2355
2444
|
};
|
2356
|
-
|
2445
|
+
type AddGitBranchesEntryRequestBody = {
|
2357
2446
|
/**
|
2358
2447
|
* The name of the Git branch.
|
2359
2448
|
*/
|
@@ -2363,7 +2452,7 @@ declare type AddGitBranchesEntryRequestBody = {
|
|
2363
2452
|
*/
|
2364
2453
|
xataBranch: BranchName;
|
2365
2454
|
};
|
2366
|
-
|
2455
|
+
type AddGitBranchesEntryVariables = {
|
2367
2456
|
body: AddGitBranchesEntryRequestBody;
|
2368
2457
|
pathParams: AddGitBranchesEntryPathParams;
|
2369
2458
|
} & DataPlaneFetcherExtraProps;
|
@@ -2383,7 +2472,7 @@ declare type AddGitBranchesEntryVariables = {
|
|
2383
2472
|
* ```
|
2384
2473
|
*/
|
2385
2474
|
declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables, signal?: AbortSignal) => Promise<AddGitBranchesEntryResponse>;
|
2386
|
-
|
2475
|
+
type RemoveGitBranchesEntryPathParams = {
|
2387
2476
|
/**
|
2388
2477
|
* The Database Name
|
2389
2478
|
*/
|
@@ -2391,20 +2480,20 @@ declare type RemoveGitBranchesEntryPathParams = {
|
|
2391
2480
|
workspace: string;
|
2392
2481
|
region: string;
|
2393
2482
|
};
|
2394
|
-
|
2483
|
+
type RemoveGitBranchesEntryQueryParams = {
|
2395
2484
|
/**
|
2396
2485
|
* The Git Branch to remove from the mapping
|
2397
2486
|
*/
|
2398
2487
|
gitBranch: string;
|
2399
2488
|
};
|
2400
|
-
|
2489
|
+
type RemoveGitBranchesEntryError = ErrorWrapper<{
|
2401
2490
|
status: 400;
|
2402
2491
|
payload: BadRequestError;
|
2403
2492
|
} | {
|
2404
2493
|
status: 401;
|
2405
2494
|
payload: AuthError;
|
2406
2495
|
}>;
|
2407
|
-
|
2496
|
+
type RemoveGitBranchesEntryVariables = {
|
2408
2497
|
pathParams: RemoveGitBranchesEntryPathParams;
|
2409
2498
|
queryParams: RemoveGitBranchesEntryQueryParams;
|
2410
2499
|
} & DataPlaneFetcherExtraProps;
|
@@ -2418,7 +2507,7 @@ declare type RemoveGitBranchesEntryVariables = {
|
|
2418
2507
|
* ```
|
2419
2508
|
*/
|
2420
2509
|
declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal) => Promise<undefined>;
|
2421
|
-
|
2510
|
+
type ResolveBranchPathParams = {
|
2422
2511
|
/**
|
2423
2512
|
* The Database Name
|
2424
2513
|
*/
|
@@ -2426,7 +2515,7 @@ declare type ResolveBranchPathParams = {
|
|
2426
2515
|
workspace: string;
|
2427
2516
|
region: string;
|
2428
2517
|
};
|
2429
|
-
|
2518
|
+
type ResolveBranchQueryParams = {
|
2430
2519
|
/**
|
2431
2520
|
* The Git Branch
|
2432
2521
|
*/
|
@@ -2436,21 +2525,21 @@ declare type ResolveBranchQueryParams = {
|
|
2436
2525
|
*/
|
2437
2526
|
fallbackBranch?: string;
|
2438
2527
|
};
|
2439
|
-
|
2528
|
+
type ResolveBranchError = ErrorWrapper<{
|
2440
2529
|
status: 400;
|
2441
2530
|
payload: BadRequestError;
|
2442
2531
|
} | {
|
2443
2532
|
status: 401;
|
2444
2533
|
payload: AuthError;
|
2445
2534
|
}>;
|
2446
|
-
|
2535
|
+
type ResolveBranchResponse = {
|
2447
2536
|
branch: string;
|
2448
2537
|
reason: {
|
2449
2538
|
code: 'FOUND_IN_MAPPING' | 'BRANCH_EXISTS' | 'FALLBACK_BRANCH' | 'DEFAULT_BRANCH';
|
2450
2539
|
message: string;
|
2451
2540
|
};
|
2452
2541
|
};
|
2453
|
-
|
2542
|
+
type ResolveBranchVariables = {
|
2454
2543
|
pathParams: ResolveBranchPathParams;
|
2455
2544
|
queryParams?: ResolveBranchQueryParams;
|
2456
2545
|
} & DataPlaneFetcherExtraProps;
|
@@ -2480,7 +2569,7 @@ declare type ResolveBranchVariables = {
|
|
2480
2569
|
* ```
|
2481
2570
|
*/
|
2482
2571
|
declare const resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal) => Promise<ResolveBranchResponse>;
|
2483
|
-
|
2572
|
+
type GetBranchMigrationHistoryPathParams = {
|
2484
2573
|
/**
|
2485
2574
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2486
2575
|
*/
|
@@ -2488,7 +2577,7 @@ declare type GetBranchMigrationHistoryPathParams = {
|
|
2488
2577
|
workspace: string;
|
2489
2578
|
region: string;
|
2490
2579
|
};
|
2491
|
-
|
2580
|
+
type GetBranchMigrationHistoryError = ErrorWrapper<{
|
2492
2581
|
status: 400;
|
2493
2582
|
payload: BadRequestError;
|
2494
2583
|
} | {
|
@@ -2498,20 +2587,20 @@ declare type GetBranchMigrationHistoryError = ErrorWrapper<{
|
|
2498
2587
|
status: 404;
|
2499
2588
|
payload: SimpleError;
|
2500
2589
|
}>;
|
2501
|
-
|
2590
|
+
type GetBranchMigrationHistoryResponse = {
|
2502
2591
|
startedFrom?: StartedFromMetadata;
|
2503
2592
|
migrations?: BranchMigration[];
|
2504
2593
|
};
|
2505
|
-
|
2594
|
+
type GetBranchMigrationHistoryRequestBody = {
|
2506
2595
|
limit?: number;
|
2507
2596
|
startFrom?: string;
|
2508
2597
|
};
|
2509
|
-
|
2598
|
+
type GetBranchMigrationHistoryVariables = {
|
2510
2599
|
body?: GetBranchMigrationHistoryRequestBody;
|
2511
2600
|
pathParams: GetBranchMigrationHistoryPathParams;
|
2512
2601
|
} & DataPlaneFetcherExtraProps;
|
2513
2602
|
declare const getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal) => Promise<GetBranchMigrationHistoryResponse>;
|
2514
|
-
|
2603
|
+
type GetBranchMigrationPlanPathParams = {
|
2515
2604
|
/**
|
2516
2605
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2517
2606
|
*/
|
@@ -2519,7 +2608,7 @@ declare type GetBranchMigrationPlanPathParams = {
|
|
2519
2608
|
workspace: string;
|
2520
2609
|
region: string;
|
2521
2610
|
};
|
2522
|
-
|
2611
|
+
type GetBranchMigrationPlanError = ErrorWrapper<{
|
2523
2612
|
status: 400;
|
2524
2613
|
payload: BadRequestError;
|
2525
2614
|
} | {
|
@@ -2529,7 +2618,7 @@ declare type GetBranchMigrationPlanError = ErrorWrapper<{
|
|
2529
2618
|
status: 404;
|
2530
2619
|
payload: SimpleError;
|
2531
2620
|
}>;
|
2532
|
-
|
2621
|
+
type GetBranchMigrationPlanVariables = {
|
2533
2622
|
body: Schema;
|
2534
2623
|
pathParams: GetBranchMigrationPlanPathParams;
|
2535
2624
|
} & DataPlaneFetcherExtraProps;
|
@@ -2537,7 +2626,7 @@ declare type GetBranchMigrationPlanVariables = {
|
|
2537
2626
|
* Compute a migration plan from a target schema the branch should be migrated too.
|
2538
2627
|
*/
|
2539
2628
|
declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<BranchMigrationPlan>;
|
2540
|
-
|
2629
|
+
type ExecuteBranchMigrationPlanPathParams = {
|
2541
2630
|
/**
|
2542
2631
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2543
2632
|
*/
|
@@ -2545,7 +2634,7 @@ declare type ExecuteBranchMigrationPlanPathParams = {
|
|
2545
2634
|
workspace: string;
|
2546
2635
|
region: string;
|
2547
2636
|
};
|
2548
|
-
|
2637
|
+
type ExecuteBranchMigrationPlanError = ErrorWrapper<{
|
2549
2638
|
status: 400;
|
2550
2639
|
payload: BadRequestError;
|
2551
2640
|
} | {
|
@@ -2555,11 +2644,11 @@ declare type ExecuteBranchMigrationPlanError = ErrorWrapper<{
|
|
2555
2644
|
status: 404;
|
2556
2645
|
payload: SimpleError;
|
2557
2646
|
}>;
|
2558
|
-
|
2647
|
+
type ExecuteBranchMigrationPlanRequestBody = {
|
2559
2648
|
version: number;
|
2560
2649
|
migration: BranchMigration;
|
2561
2650
|
};
|
2562
|
-
|
2651
|
+
type ExecuteBranchMigrationPlanVariables = {
|
2563
2652
|
body: ExecuteBranchMigrationPlanRequestBody;
|
2564
2653
|
pathParams: ExecuteBranchMigrationPlanPathParams;
|
2565
2654
|
} & DataPlaneFetcherExtraProps;
|
@@ -2567,7 +2656,7 @@ declare type ExecuteBranchMigrationPlanVariables = {
|
|
2567
2656
|
* Apply a migration plan to the branch
|
2568
2657
|
*/
|
2569
2658
|
declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
2570
|
-
|
2659
|
+
type BranchTransactionPathParams = {
|
2571
2660
|
/**
|
2572
2661
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2573
2662
|
*/
|
@@ -2575,7 +2664,7 @@ declare type BranchTransactionPathParams = {
|
|
2575
2664
|
workspace: string;
|
2576
2665
|
region: string;
|
2577
2666
|
};
|
2578
|
-
|
2667
|
+
type BranchTransactionError = ErrorWrapper<{
|
2579
2668
|
status: 400;
|
2580
2669
|
payload: TransactionFailure;
|
2581
2670
|
} | {
|
@@ -2585,15 +2674,15 @@ declare type BranchTransactionError = ErrorWrapper<{
|
|
2585
2674
|
status: 404;
|
2586
2675
|
payload: SimpleError;
|
2587
2676
|
}>;
|
2588
|
-
|
2589
|
-
operations: TransactionOperation[];
|
2677
|
+
type BranchTransactionRequestBody = {
|
2678
|
+
operations: TransactionOperation$1[];
|
2590
2679
|
};
|
2591
|
-
|
2680
|
+
type BranchTransactionVariables = {
|
2592
2681
|
body: BranchTransactionRequestBody;
|
2593
2682
|
pathParams: BranchTransactionPathParams;
|
2594
2683
|
} & DataPlaneFetcherExtraProps;
|
2595
2684
|
declare const branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
|
2596
|
-
|
2685
|
+
type QueryMigrationRequestsPathParams = {
|
2597
2686
|
/**
|
2598
2687
|
* The Database Name
|
2599
2688
|
*/
|
@@ -2601,7 +2690,7 @@ declare type QueryMigrationRequestsPathParams = {
|
|
2601
2690
|
workspace: string;
|
2602
2691
|
region: string;
|
2603
2692
|
};
|
2604
|
-
|
2693
|
+
type QueryMigrationRequestsError = ErrorWrapper<{
|
2605
2694
|
status: 400;
|
2606
2695
|
payload: BadRequestError;
|
2607
2696
|
} | {
|
@@ -2611,22 +2700,22 @@ declare type QueryMigrationRequestsError = ErrorWrapper<{
|
|
2611
2700
|
status: 404;
|
2612
2701
|
payload: SimpleError;
|
2613
2702
|
}>;
|
2614
|
-
|
2703
|
+
type QueryMigrationRequestsResponse = {
|
2615
2704
|
migrationRequests: MigrationRequest[];
|
2616
2705
|
meta: RecordsMetadata;
|
2617
2706
|
};
|
2618
|
-
|
2707
|
+
type QueryMigrationRequestsRequestBody = {
|
2619
2708
|
filter?: FilterExpression;
|
2620
2709
|
sort?: SortExpression;
|
2621
2710
|
page?: PageConfig;
|
2622
2711
|
columns?: ColumnsProjection;
|
2623
2712
|
};
|
2624
|
-
|
2713
|
+
type QueryMigrationRequestsVariables = {
|
2625
2714
|
body?: QueryMigrationRequestsRequestBody;
|
2626
2715
|
pathParams: QueryMigrationRequestsPathParams;
|
2627
2716
|
} & DataPlaneFetcherExtraProps;
|
2628
2717
|
declare const queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal) => Promise<QueryMigrationRequestsResponse>;
|
2629
|
-
|
2718
|
+
type CreateMigrationRequestPathParams = {
|
2630
2719
|
/**
|
2631
2720
|
* The Database Name
|
2632
2721
|
*/
|
@@ -2634,7 +2723,7 @@ declare type CreateMigrationRequestPathParams = {
|
|
2634
2723
|
workspace: string;
|
2635
2724
|
region: string;
|
2636
2725
|
};
|
2637
|
-
|
2726
|
+
type CreateMigrationRequestError = ErrorWrapper<{
|
2638
2727
|
status: 400;
|
2639
2728
|
payload: BadRequestError;
|
2640
2729
|
} | {
|
@@ -2644,10 +2733,10 @@ declare type CreateMigrationRequestError = ErrorWrapper<{
|
|
2644
2733
|
status: 404;
|
2645
2734
|
payload: SimpleError;
|
2646
2735
|
}>;
|
2647
|
-
|
2736
|
+
type CreateMigrationRequestResponse = {
|
2648
2737
|
number: number;
|
2649
2738
|
};
|
2650
|
-
|
2739
|
+
type CreateMigrationRequestRequestBody = {
|
2651
2740
|
/**
|
2652
2741
|
* The source branch.
|
2653
2742
|
*/
|
@@ -2665,12 +2754,12 @@ declare type CreateMigrationRequestRequestBody = {
|
|
2665
2754
|
*/
|
2666
2755
|
body?: string;
|
2667
2756
|
};
|
2668
|
-
|
2757
|
+
type CreateMigrationRequestVariables = {
|
2669
2758
|
body: CreateMigrationRequestRequestBody;
|
2670
2759
|
pathParams: CreateMigrationRequestPathParams;
|
2671
2760
|
} & DataPlaneFetcherExtraProps;
|
2672
2761
|
declare const createMigrationRequest: (variables: CreateMigrationRequestVariables, signal?: AbortSignal) => Promise<CreateMigrationRequestResponse>;
|
2673
|
-
|
2762
|
+
type GetMigrationRequestPathParams = {
|
2674
2763
|
/**
|
2675
2764
|
* The Database Name
|
2676
2765
|
*/
|
@@ -2682,7 +2771,7 @@ declare type GetMigrationRequestPathParams = {
|
|
2682
2771
|
workspace: string;
|
2683
2772
|
region: string;
|
2684
2773
|
};
|
2685
|
-
|
2774
|
+
type GetMigrationRequestError = ErrorWrapper<{
|
2686
2775
|
status: 400;
|
2687
2776
|
payload: BadRequestError;
|
2688
2777
|
} | {
|
@@ -2692,11 +2781,11 @@ declare type GetMigrationRequestError = ErrorWrapper<{
|
|
2692
2781
|
status: 404;
|
2693
2782
|
payload: SimpleError;
|
2694
2783
|
}>;
|
2695
|
-
|
2784
|
+
type GetMigrationRequestVariables = {
|
2696
2785
|
pathParams: GetMigrationRequestPathParams;
|
2697
2786
|
} & DataPlaneFetcherExtraProps;
|
2698
2787
|
declare const getMigrationRequest: (variables: GetMigrationRequestVariables, signal?: AbortSignal) => Promise<MigrationRequest>;
|
2699
|
-
|
2788
|
+
type UpdateMigrationRequestPathParams = {
|
2700
2789
|
/**
|
2701
2790
|
* The Database Name
|
2702
2791
|
*/
|
@@ -2708,7 +2797,7 @@ declare type UpdateMigrationRequestPathParams = {
|
|
2708
2797
|
workspace: string;
|
2709
2798
|
region: string;
|
2710
2799
|
};
|
2711
|
-
|
2800
|
+
type UpdateMigrationRequestError = ErrorWrapper<{
|
2712
2801
|
status: 400;
|
2713
2802
|
payload: BadRequestError;
|
2714
2803
|
} | {
|
@@ -2718,7 +2807,7 @@ declare type UpdateMigrationRequestError = ErrorWrapper<{
|
|
2718
2807
|
status: 404;
|
2719
2808
|
payload: SimpleError;
|
2720
2809
|
}>;
|
2721
|
-
|
2810
|
+
type UpdateMigrationRequestRequestBody = {
|
2722
2811
|
/**
|
2723
2812
|
* New migration request title.
|
2724
2813
|
*/
|
@@ -2732,12 +2821,12 @@ declare type UpdateMigrationRequestRequestBody = {
|
|
2732
2821
|
*/
|
2733
2822
|
status?: 'open' | 'closed';
|
2734
2823
|
};
|
2735
|
-
|
2824
|
+
type UpdateMigrationRequestVariables = {
|
2736
2825
|
body?: UpdateMigrationRequestRequestBody;
|
2737
2826
|
pathParams: UpdateMigrationRequestPathParams;
|
2738
2827
|
} & DataPlaneFetcherExtraProps;
|
2739
2828
|
declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables, signal?: AbortSignal) => Promise<undefined>;
|
2740
|
-
|
2829
|
+
type ListMigrationRequestsCommitsPathParams = {
|
2741
2830
|
/**
|
2742
2831
|
* The Database Name
|
2743
2832
|
*/
|
@@ -2749,7 +2838,7 @@ declare type ListMigrationRequestsCommitsPathParams = {
|
|
2749
2838
|
workspace: string;
|
2750
2839
|
region: string;
|
2751
2840
|
};
|
2752
|
-
|
2841
|
+
type ListMigrationRequestsCommitsError = ErrorWrapper<{
|
2753
2842
|
status: 400;
|
2754
2843
|
payload: BadRequestError;
|
2755
2844
|
} | {
|
@@ -2759,7 +2848,7 @@ declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
|
|
2759
2848
|
status: 404;
|
2760
2849
|
payload: SimpleError;
|
2761
2850
|
}>;
|
2762
|
-
|
2851
|
+
type ListMigrationRequestsCommitsResponse = {
|
2763
2852
|
meta: {
|
2764
2853
|
/**
|
2765
2854
|
* last record id
|
@@ -2772,7 +2861,7 @@ declare type ListMigrationRequestsCommitsResponse = {
|
|
2772
2861
|
};
|
2773
2862
|
logs: Commit[];
|
2774
2863
|
};
|
2775
|
-
|
2864
|
+
type ListMigrationRequestsCommitsRequestBody = {
|
2776
2865
|
page?: {
|
2777
2866
|
/**
|
2778
2867
|
* Query the next page that follow the cursor.
|
@@ -2790,12 +2879,12 @@ declare type ListMigrationRequestsCommitsRequestBody = {
|
|
2790
2879
|
size?: number;
|
2791
2880
|
};
|
2792
2881
|
};
|
2793
|
-
|
2882
|
+
type ListMigrationRequestsCommitsVariables = {
|
2794
2883
|
body?: ListMigrationRequestsCommitsRequestBody;
|
2795
2884
|
pathParams: ListMigrationRequestsCommitsPathParams;
|
2796
2885
|
} & DataPlaneFetcherExtraProps;
|
2797
2886
|
declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal) => Promise<ListMigrationRequestsCommitsResponse>;
|
2798
|
-
|
2887
|
+
type CompareMigrationRequestPathParams = {
|
2799
2888
|
/**
|
2800
2889
|
* The Database Name
|
2801
2890
|
*/
|
@@ -2807,7 +2896,7 @@ declare type CompareMigrationRequestPathParams = {
|
|
2807
2896
|
workspace: string;
|
2808
2897
|
region: string;
|
2809
2898
|
};
|
2810
|
-
|
2899
|
+
type CompareMigrationRequestError = ErrorWrapper<{
|
2811
2900
|
status: 400;
|
2812
2901
|
payload: BadRequestError;
|
2813
2902
|
} | {
|
@@ -2817,11 +2906,11 @@ declare type CompareMigrationRequestError = ErrorWrapper<{
|
|
2817
2906
|
status: 404;
|
2818
2907
|
payload: SimpleError;
|
2819
2908
|
}>;
|
2820
|
-
|
2909
|
+
type CompareMigrationRequestVariables = {
|
2821
2910
|
pathParams: CompareMigrationRequestPathParams;
|
2822
2911
|
} & DataPlaneFetcherExtraProps;
|
2823
2912
|
declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
|
2824
|
-
|
2913
|
+
type GetMigrationRequestIsMergedPathParams = {
|
2825
2914
|
/**
|
2826
2915
|
* The Database Name
|
2827
2916
|
*/
|
@@ -2833,7 +2922,7 @@ declare type GetMigrationRequestIsMergedPathParams = {
|
|
2833
2922
|
workspace: string;
|
2834
2923
|
region: string;
|
2835
2924
|
};
|
2836
|
-
|
2925
|
+
type GetMigrationRequestIsMergedError = ErrorWrapper<{
|
2837
2926
|
status: 400;
|
2838
2927
|
payload: BadRequestError;
|
2839
2928
|
} | {
|
@@ -2843,14 +2932,14 @@ declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
|
|
2843
2932
|
status: 404;
|
2844
2933
|
payload: SimpleError;
|
2845
2934
|
}>;
|
2846
|
-
|
2935
|
+
type GetMigrationRequestIsMergedResponse = {
|
2847
2936
|
merged?: boolean;
|
2848
2937
|
};
|
2849
|
-
|
2938
|
+
type GetMigrationRequestIsMergedVariables = {
|
2850
2939
|
pathParams: GetMigrationRequestIsMergedPathParams;
|
2851
2940
|
} & DataPlaneFetcherExtraProps;
|
2852
2941
|
declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal) => Promise<GetMigrationRequestIsMergedResponse>;
|
2853
|
-
|
2942
|
+
type MergeMigrationRequestPathParams = {
|
2854
2943
|
/**
|
2855
2944
|
* The Database Name
|
2856
2945
|
*/
|
@@ -2862,7 +2951,7 @@ declare type MergeMigrationRequestPathParams = {
|
|
2862
2951
|
workspace: string;
|
2863
2952
|
region: string;
|
2864
2953
|
};
|
2865
|
-
|
2954
|
+
type MergeMigrationRequestError = ErrorWrapper<{
|
2866
2955
|
status: 400;
|
2867
2956
|
payload: BadRequestError;
|
2868
2957
|
} | {
|
@@ -2872,11 +2961,11 @@ declare type MergeMigrationRequestError = ErrorWrapper<{
|
|
2872
2961
|
status: 404;
|
2873
2962
|
payload: SimpleError;
|
2874
2963
|
}>;
|
2875
|
-
|
2964
|
+
type MergeMigrationRequestVariables = {
|
2876
2965
|
pathParams: MergeMigrationRequestPathParams;
|
2877
2966
|
} & DataPlaneFetcherExtraProps;
|
2878
2967
|
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<Commit>;
|
2879
|
-
|
2968
|
+
type GetBranchSchemaHistoryPathParams = {
|
2880
2969
|
/**
|
2881
2970
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2882
2971
|
*/
|
@@ -2884,7 +2973,7 @@ declare type GetBranchSchemaHistoryPathParams = {
|
|
2884
2973
|
workspace: string;
|
2885
2974
|
region: string;
|
2886
2975
|
};
|
2887
|
-
|
2976
|
+
type GetBranchSchemaHistoryError = ErrorWrapper<{
|
2888
2977
|
status: 400;
|
2889
2978
|
payload: BadRequestError;
|
2890
2979
|
} | {
|
@@ -2894,7 +2983,7 @@ declare type GetBranchSchemaHistoryError = ErrorWrapper<{
|
|
2894
2983
|
status: 404;
|
2895
2984
|
payload: SimpleError;
|
2896
2985
|
}>;
|
2897
|
-
|
2986
|
+
type GetBranchSchemaHistoryResponse = {
|
2898
2987
|
meta: {
|
2899
2988
|
/**
|
2900
2989
|
* last record id
|
@@ -2907,7 +2996,7 @@ declare type GetBranchSchemaHistoryResponse = {
|
|
2907
2996
|
};
|
2908
2997
|
logs: Commit[];
|
2909
2998
|
};
|
2910
|
-
|
2999
|
+
type GetBranchSchemaHistoryRequestBody = {
|
2911
3000
|
page?: {
|
2912
3001
|
/**
|
2913
3002
|
* Query the next page that follow the cursor.
|
@@ -2925,12 +3014,12 @@ declare type GetBranchSchemaHistoryRequestBody = {
|
|
2925
3014
|
size?: number;
|
2926
3015
|
};
|
2927
3016
|
};
|
2928
|
-
|
3017
|
+
type GetBranchSchemaHistoryVariables = {
|
2929
3018
|
body?: GetBranchSchemaHistoryRequestBody;
|
2930
3019
|
pathParams: GetBranchSchemaHistoryPathParams;
|
2931
3020
|
} & DataPlaneFetcherExtraProps;
|
2932
3021
|
declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables, signal?: AbortSignal) => Promise<GetBranchSchemaHistoryResponse>;
|
2933
|
-
|
3022
|
+
type CompareBranchWithUserSchemaPathParams = {
|
2934
3023
|
/**
|
2935
3024
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2936
3025
|
*/
|
@@ -2938,7 +3027,7 @@ declare type CompareBranchWithUserSchemaPathParams = {
|
|
2938
3027
|
workspace: string;
|
2939
3028
|
region: string;
|
2940
3029
|
};
|
2941
|
-
|
3030
|
+
type CompareBranchWithUserSchemaError = ErrorWrapper<{
|
2942
3031
|
status: 400;
|
2943
3032
|
payload: BadRequestError;
|
2944
3033
|
} | {
|
@@ -2948,15 +3037,15 @@ declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
|
|
2948
3037
|
status: 404;
|
2949
3038
|
payload: SimpleError;
|
2950
3039
|
}>;
|
2951
|
-
|
3040
|
+
type CompareBranchWithUserSchemaRequestBody = {
|
2952
3041
|
schema: Schema;
|
2953
3042
|
};
|
2954
|
-
|
3043
|
+
type CompareBranchWithUserSchemaVariables = {
|
2955
3044
|
body: CompareBranchWithUserSchemaRequestBody;
|
2956
3045
|
pathParams: CompareBranchWithUserSchemaPathParams;
|
2957
3046
|
} & DataPlaneFetcherExtraProps;
|
2958
3047
|
declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
|
2959
|
-
|
3048
|
+
type CompareBranchSchemasPathParams = {
|
2960
3049
|
/**
|
2961
3050
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2962
3051
|
*/
|
@@ -2968,7 +3057,7 @@ declare type CompareBranchSchemasPathParams = {
|
|
2968
3057
|
workspace: string;
|
2969
3058
|
region: string;
|
2970
3059
|
};
|
2971
|
-
|
3060
|
+
type CompareBranchSchemasError = ErrorWrapper<{
|
2972
3061
|
status: 400;
|
2973
3062
|
payload: BadRequestError;
|
2974
3063
|
} | {
|
@@ -2978,12 +3067,12 @@ declare type CompareBranchSchemasError = ErrorWrapper<{
|
|
2978
3067
|
status: 404;
|
2979
3068
|
payload: SimpleError;
|
2980
3069
|
}>;
|
2981
|
-
|
3070
|
+
type CompareBranchSchemasVariables = {
|
2982
3071
|
body?: Record<string, any>;
|
2983
3072
|
pathParams: CompareBranchSchemasPathParams;
|
2984
3073
|
} & DataPlaneFetcherExtraProps;
|
2985
3074
|
declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
|
2986
|
-
|
3075
|
+
type UpdateBranchSchemaPathParams = {
|
2987
3076
|
/**
|
2988
3077
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2989
3078
|
*/
|
@@ -2991,7 +3080,7 @@ declare type UpdateBranchSchemaPathParams = {
|
|
2991
3080
|
workspace: string;
|
2992
3081
|
region: string;
|
2993
3082
|
};
|
2994
|
-
|
3083
|
+
type UpdateBranchSchemaError = ErrorWrapper<{
|
2995
3084
|
status: 400;
|
2996
3085
|
payload: BadRequestError;
|
2997
3086
|
} | {
|
@@ -3001,12 +3090,12 @@ declare type UpdateBranchSchemaError = ErrorWrapper<{
|
|
3001
3090
|
status: 404;
|
3002
3091
|
payload: SimpleError;
|
3003
3092
|
}>;
|
3004
|
-
|
3093
|
+
type UpdateBranchSchemaVariables = {
|
3005
3094
|
body: Migration;
|
3006
3095
|
pathParams: UpdateBranchSchemaPathParams;
|
3007
3096
|
} & DataPlaneFetcherExtraProps;
|
3008
3097
|
declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3009
|
-
|
3098
|
+
type PreviewBranchSchemaEditPathParams = {
|
3010
3099
|
/**
|
3011
3100
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3012
3101
|
*/
|
@@ -3014,7 +3103,7 @@ declare type PreviewBranchSchemaEditPathParams = {
|
|
3014
3103
|
workspace: string;
|
3015
3104
|
region: string;
|
3016
3105
|
};
|
3017
|
-
|
3106
|
+
type PreviewBranchSchemaEditError = ErrorWrapper<{
|
3018
3107
|
status: 400;
|
3019
3108
|
payload: BadRequestError;
|
3020
3109
|
} | {
|
@@ -3024,19 +3113,19 @@ declare type PreviewBranchSchemaEditError = ErrorWrapper<{
|
|
3024
3113
|
status: 404;
|
3025
3114
|
payload: SimpleError;
|
3026
3115
|
}>;
|
3027
|
-
|
3116
|
+
type PreviewBranchSchemaEditResponse = {
|
3028
3117
|
original: Schema;
|
3029
3118
|
updated: Schema;
|
3030
3119
|
};
|
3031
|
-
|
3120
|
+
type PreviewBranchSchemaEditRequestBody = {
|
3032
3121
|
edits?: SchemaEditScript;
|
3033
3122
|
};
|
3034
|
-
|
3123
|
+
type PreviewBranchSchemaEditVariables = {
|
3035
3124
|
body?: PreviewBranchSchemaEditRequestBody;
|
3036
3125
|
pathParams: PreviewBranchSchemaEditPathParams;
|
3037
3126
|
} & DataPlaneFetcherExtraProps;
|
3038
3127
|
declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal) => Promise<PreviewBranchSchemaEditResponse>;
|
3039
|
-
|
3128
|
+
type ApplyBranchSchemaEditPathParams = {
|
3040
3129
|
/**
|
3041
3130
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3042
3131
|
*/
|
@@ -3044,7 +3133,7 @@ declare type ApplyBranchSchemaEditPathParams = {
|
|
3044
3133
|
workspace: string;
|
3045
3134
|
region: string;
|
3046
3135
|
};
|
3047
|
-
|
3136
|
+
type ApplyBranchSchemaEditError = ErrorWrapper<{
|
3048
3137
|
status: 400;
|
3049
3138
|
payload: BadRequestError;
|
3050
3139
|
} | {
|
@@ -3054,15 +3143,15 @@ declare type ApplyBranchSchemaEditError = ErrorWrapper<{
|
|
3054
3143
|
status: 404;
|
3055
3144
|
payload: SimpleError;
|
3056
3145
|
}>;
|
3057
|
-
|
3146
|
+
type ApplyBranchSchemaEditRequestBody = {
|
3058
3147
|
edits: SchemaEditScript;
|
3059
3148
|
};
|
3060
|
-
|
3149
|
+
type ApplyBranchSchemaEditVariables = {
|
3061
3150
|
body: ApplyBranchSchemaEditRequestBody;
|
3062
3151
|
pathParams: ApplyBranchSchemaEditPathParams;
|
3063
3152
|
} & DataPlaneFetcherExtraProps;
|
3064
3153
|
declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3065
|
-
|
3154
|
+
type CreateTablePathParams = {
|
3066
3155
|
/**
|
3067
3156
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3068
3157
|
*/
|
@@ -3074,7 +3163,7 @@ declare type CreateTablePathParams = {
|
|
3074
3163
|
workspace: string;
|
3075
3164
|
region: string;
|
3076
3165
|
};
|
3077
|
-
|
3166
|
+
type CreateTableError = ErrorWrapper<{
|
3078
3167
|
status: 400;
|
3079
3168
|
payload: BadRequestError;
|
3080
3169
|
} | {
|
@@ -3087,7 +3176,7 @@ declare type CreateTableError = ErrorWrapper<{
|
|
3087
3176
|
status: 422;
|
3088
3177
|
payload: SimpleError;
|
3089
3178
|
}>;
|
3090
|
-
|
3179
|
+
type CreateTableResponse = {
|
3091
3180
|
branchName: string;
|
3092
3181
|
/**
|
3093
3182
|
* @minLength 1
|
@@ -3095,14 +3184,14 @@ declare type CreateTableResponse = {
|
|
3095
3184
|
tableName: string;
|
3096
3185
|
status: MigrationStatus;
|
3097
3186
|
};
|
3098
|
-
|
3187
|
+
type CreateTableVariables = {
|
3099
3188
|
pathParams: CreateTablePathParams;
|
3100
3189
|
} & DataPlaneFetcherExtraProps;
|
3101
3190
|
/**
|
3102
3191
|
* Creates a new table with the given name. Returns 422 if a table with the same name already exists.
|
3103
3192
|
*/
|
3104
3193
|
declare const createTable: (variables: CreateTableVariables, signal?: AbortSignal) => Promise<CreateTableResponse>;
|
3105
|
-
|
3194
|
+
type DeleteTablePathParams = {
|
3106
3195
|
/**
|
3107
3196
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3108
3197
|
*/
|
@@ -3114,24 +3203,24 @@ declare type DeleteTablePathParams = {
|
|
3114
3203
|
workspace: string;
|
3115
3204
|
region: string;
|
3116
3205
|
};
|
3117
|
-
|
3206
|
+
type DeleteTableError = ErrorWrapper<{
|
3118
3207
|
status: 400;
|
3119
3208
|
payload: BadRequestError;
|
3120
3209
|
} | {
|
3121
3210
|
status: 401;
|
3122
3211
|
payload: AuthError;
|
3123
3212
|
}>;
|
3124
|
-
|
3213
|
+
type DeleteTableResponse = {
|
3125
3214
|
status: MigrationStatus;
|
3126
3215
|
};
|
3127
|
-
|
3216
|
+
type DeleteTableVariables = {
|
3128
3217
|
pathParams: DeleteTablePathParams;
|
3129
3218
|
} & DataPlaneFetcherExtraProps;
|
3130
3219
|
/**
|
3131
3220
|
* Deletes the table with the given name.
|
3132
3221
|
*/
|
3133
3222
|
declare const deleteTable: (variables: DeleteTableVariables, signal?: AbortSignal) => Promise<DeleteTableResponse>;
|
3134
|
-
|
3223
|
+
type UpdateTablePathParams = {
|
3135
3224
|
/**
|
3136
3225
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3137
3226
|
*/
|
@@ -3143,7 +3232,7 @@ declare type UpdateTablePathParams = {
|
|
3143
3232
|
workspace: string;
|
3144
3233
|
region: string;
|
3145
3234
|
};
|
3146
|
-
|
3235
|
+
type UpdateTableError = ErrorWrapper<{
|
3147
3236
|
status: 400;
|
3148
3237
|
payload: BadRequestError;
|
3149
3238
|
} | {
|
@@ -3153,13 +3242,13 @@ declare type UpdateTableError = ErrorWrapper<{
|
|
3153
3242
|
status: 404;
|
3154
3243
|
payload: SimpleError;
|
3155
3244
|
}>;
|
3156
|
-
|
3245
|
+
type UpdateTableRequestBody = {
|
3157
3246
|
/**
|
3158
3247
|
* @minLength 1
|
3159
3248
|
*/
|
3160
3249
|
name: string;
|
3161
3250
|
};
|
3162
|
-
|
3251
|
+
type UpdateTableVariables = {
|
3163
3252
|
body: UpdateTableRequestBody;
|
3164
3253
|
pathParams: UpdateTablePathParams;
|
3165
3254
|
} & DataPlaneFetcherExtraProps;
|
@@ -3177,7 +3266,7 @@ declare type UpdateTableVariables = {
|
|
3177
3266
|
* ```
|
3178
3267
|
*/
|
3179
3268
|
declare const updateTable: (variables: UpdateTableVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3180
|
-
|
3269
|
+
type GetTableSchemaPathParams = {
|
3181
3270
|
/**
|
3182
3271
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3183
3272
|
*/
|
@@ -3189,7 +3278,7 @@ declare type GetTableSchemaPathParams = {
|
|
3189
3278
|
workspace: string;
|
3190
3279
|
region: string;
|
3191
3280
|
};
|
3192
|
-
|
3281
|
+
type GetTableSchemaError = ErrorWrapper<{
|
3193
3282
|
status: 400;
|
3194
3283
|
payload: BadRequestError;
|
3195
3284
|
} | {
|
@@ -3199,14 +3288,14 @@ declare type GetTableSchemaError = ErrorWrapper<{
|
|
3199
3288
|
status: 404;
|
3200
3289
|
payload: SimpleError;
|
3201
3290
|
}>;
|
3202
|
-
|
3291
|
+
type GetTableSchemaResponse = {
|
3203
3292
|
columns: Column[];
|
3204
3293
|
};
|
3205
|
-
|
3294
|
+
type GetTableSchemaVariables = {
|
3206
3295
|
pathParams: GetTableSchemaPathParams;
|
3207
3296
|
} & DataPlaneFetcherExtraProps;
|
3208
3297
|
declare const getTableSchema: (variables: GetTableSchemaVariables, signal?: AbortSignal) => Promise<GetTableSchemaResponse>;
|
3209
|
-
|
3298
|
+
type SetTableSchemaPathParams = {
|
3210
3299
|
/**
|
3211
3300
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3212
3301
|
*/
|
@@ -3218,7 +3307,7 @@ declare type SetTableSchemaPathParams = {
|
|
3218
3307
|
workspace: string;
|
3219
3308
|
region: string;
|
3220
3309
|
};
|
3221
|
-
|
3310
|
+
type SetTableSchemaError = ErrorWrapper<{
|
3222
3311
|
status: 400;
|
3223
3312
|
payload: BadRequestError;
|
3224
3313
|
} | {
|
@@ -3231,15 +3320,15 @@ declare type SetTableSchemaError = ErrorWrapper<{
|
|
3231
3320
|
status: 409;
|
3232
3321
|
payload: SimpleError;
|
3233
3322
|
}>;
|
3234
|
-
|
3323
|
+
type SetTableSchemaRequestBody = {
|
3235
3324
|
columns: Column[];
|
3236
3325
|
};
|
3237
|
-
|
3326
|
+
type SetTableSchemaVariables = {
|
3238
3327
|
body: SetTableSchemaRequestBody;
|
3239
3328
|
pathParams: SetTableSchemaPathParams;
|
3240
3329
|
} & DataPlaneFetcherExtraProps;
|
3241
3330
|
declare const setTableSchema: (variables: SetTableSchemaVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3242
|
-
|
3331
|
+
type GetTableColumnsPathParams = {
|
3243
3332
|
/**
|
3244
3333
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3245
3334
|
*/
|
@@ -3251,7 +3340,7 @@ declare type GetTableColumnsPathParams = {
|
|
3251
3340
|
workspace: string;
|
3252
3341
|
region: string;
|
3253
3342
|
};
|
3254
|
-
|
3343
|
+
type GetTableColumnsError = ErrorWrapper<{
|
3255
3344
|
status: 400;
|
3256
3345
|
payload: BadRequestError;
|
3257
3346
|
} | {
|
@@ -3261,10 +3350,10 @@ declare type GetTableColumnsError = ErrorWrapper<{
|
|
3261
3350
|
status: 404;
|
3262
3351
|
payload: SimpleError;
|
3263
3352
|
}>;
|
3264
|
-
|
3353
|
+
type GetTableColumnsResponse = {
|
3265
3354
|
columns: Column[];
|
3266
3355
|
};
|
3267
|
-
|
3356
|
+
type GetTableColumnsVariables = {
|
3268
3357
|
pathParams: GetTableColumnsPathParams;
|
3269
3358
|
} & DataPlaneFetcherExtraProps;
|
3270
3359
|
/**
|
@@ -3272,7 +3361,7 @@ declare type GetTableColumnsVariables = {
|
|
3272
3361
|
* full dot-separated path (flattened).
|
3273
3362
|
*/
|
3274
3363
|
declare const getTableColumns: (variables: GetTableColumnsVariables, signal?: AbortSignal) => Promise<GetTableColumnsResponse>;
|
3275
|
-
|
3364
|
+
type AddTableColumnPathParams = {
|
3276
3365
|
/**
|
3277
3366
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3278
3367
|
*/
|
@@ -3284,7 +3373,7 @@ declare type AddTableColumnPathParams = {
|
|
3284
3373
|
workspace: string;
|
3285
3374
|
region: string;
|
3286
3375
|
};
|
3287
|
-
|
3376
|
+
type AddTableColumnError = ErrorWrapper<{
|
3288
3377
|
status: 400;
|
3289
3378
|
payload: BadRequestError;
|
3290
3379
|
} | {
|
@@ -3294,7 +3383,7 @@ declare type AddTableColumnError = ErrorWrapper<{
|
|
3294
3383
|
status: 404;
|
3295
3384
|
payload: SimpleError;
|
3296
3385
|
}>;
|
3297
|
-
|
3386
|
+
type AddTableColumnVariables = {
|
3298
3387
|
body: Column;
|
3299
3388
|
pathParams: AddTableColumnPathParams;
|
3300
3389
|
} & DataPlaneFetcherExtraProps;
|
@@ -3304,7 +3393,7 @@ declare type AddTableColumnVariables = {
|
|
3304
3393
|
* passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
|
3305
3394
|
*/
|
3306
3395
|
declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3307
|
-
|
3396
|
+
type GetColumnPathParams = {
|
3308
3397
|
/**
|
3309
3398
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3310
3399
|
*/
|
@@ -3320,7 +3409,7 @@ declare type GetColumnPathParams = {
|
|
3320
3409
|
workspace: string;
|
3321
3410
|
region: string;
|
3322
3411
|
};
|
3323
|
-
|
3412
|
+
type GetColumnError = ErrorWrapper<{
|
3324
3413
|
status: 400;
|
3325
3414
|
payload: BadRequestError;
|
3326
3415
|
} | {
|
@@ -3330,14 +3419,14 @@ declare type GetColumnError = ErrorWrapper<{
|
|
3330
3419
|
status: 404;
|
3331
3420
|
payload: SimpleError;
|
3332
3421
|
}>;
|
3333
|
-
|
3422
|
+
type GetColumnVariables = {
|
3334
3423
|
pathParams: GetColumnPathParams;
|
3335
3424
|
} & DataPlaneFetcherExtraProps;
|
3336
3425
|
/**
|
3337
3426
|
* Get the definition of a single column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
|
3338
3427
|
*/
|
3339
3428
|
declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
|
3340
|
-
|
3429
|
+
type UpdateColumnPathParams = {
|
3341
3430
|
/**
|
3342
3431
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3343
3432
|
*/
|
@@ -3353,7 +3442,7 @@ declare type UpdateColumnPathParams = {
|
|
3353
3442
|
workspace: string;
|
3354
3443
|
region: string;
|
3355
3444
|
};
|
3356
|
-
|
3445
|
+
type UpdateColumnError = ErrorWrapper<{
|
3357
3446
|
status: 400;
|
3358
3447
|
payload: BadRequestError;
|
3359
3448
|
} | {
|
@@ -3363,13 +3452,13 @@ declare type UpdateColumnError = ErrorWrapper<{
|
|
3363
3452
|
status: 404;
|
3364
3453
|
payload: SimpleError;
|
3365
3454
|
}>;
|
3366
|
-
|
3455
|
+
type UpdateColumnRequestBody = {
|
3367
3456
|
/**
|
3368
3457
|
* @minLength 1
|
3369
3458
|
*/
|
3370
3459
|
name: string;
|
3371
3460
|
};
|
3372
|
-
|
3461
|
+
type UpdateColumnVariables = {
|
3373
3462
|
body: UpdateColumnRequestBody;
|
3374
3463
|
pathParams: UpdateColumnPathParams;
|
3375
3464
|
} & DataPlaneFetcherExtraProps;
|
@@ -3377,7 +3466,7 @@ declare type UpdateColumnVariables = {
|
|
3377
3466
|
* Update column with partial data. Can be used for renaming the column by providing a new "name" field. To refer to sub-objects, the column name can contain dots. For example `address.country`.
|
3378
3467
|
*/
|
3379
3468
|
declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3380
|
-
|
3469
|
+
type DeleteColumnPathParams = {
|
3381
3470
|
/**
|
3382
3471
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3383
3472
|
*/
|
@@ -3393,7 +3482,7 @@ declare type DeleteColumnPathParams = {
|
|
3393
3482
|
workspace: string;
|
3394
3483
|
region: string;
|
3395
3484
|
};
|
3396
|
-
|
3485
|
+
type DeleteColumnError = ErrorWrapper<{
|
3397
3486
|
status: 400;
|
3398
3487
|
payload: BadRequestError;
|
3399
3488
|
} | {
|
@@ -3403,14 +3492,14 @@ declare type DeleteColumnError = ErrorWrapper<{
|
|
3403
3492
|
status: 404;
|
3404
3493
|
payload: SimpleError;
|
3405
3494
|
}>;
|
3406
|
-
|
3495
|
+
type DeleteColumnVariables = {
|
3407
3496
|
pathParams: DeleteColumnPathParams;
|
3408
3497
|
} & DataPlaneFetcherExtraProps;
|
3409
3498
|
/**
|
3410
3499
|
* Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
|
3411
3500
|
*/
|
3412
3501
|
declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3413
|
-
|
3502
|
+
type InsertRecordPathParams = {
|
3414
3503
|
/**
|
3415
3504
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3416
3505
|
*/
|
@@ -3422,13 +3511,13 @@ declare type InsertRecordPathParams = {
|
|
3422
3511
|
workspace: string;
|
3423
3512
|
region: string;
|
3424
3513
|
};
|
3425
|
-
|
3514
|
+
type InsertRecordQueryParams = {
|
3426
3515
|
/**
|
3427
3516
|
* Column filters
|
3428
3517
|
*/
|
3429
3518
|
columns?: ColumnsProjection;
|
3430
3519
|
};
|
3431
|
-
|
3520
|
+
type InsertRecordError = ErrorWrapper<{
|
3432
3521
|
status: 400;
|
3433
3522
|
payload: BadRequestError;
|
3434
3523
|
} | {
|
@@ -3438,7 +3527,7 @@ declare type InsertRecordError = ErrorWrapper<{
|
|
3438
3527
|
status: 404;
|
3439
3528
|
payload: SimpleError;
|
3440
3529
|
}>;
|
3441
|
-
|
3530
|
+
type InsertRecordVariables = {
|
3442
3531
|
body?: Record<string, any>;
|
3443
3532
|
pathParams: InsertRecordPathParams;
|
3444
3533
|
queryParams?: InsertRecordQueryParams;
|
@@ -3447,7 +3536,7 @@ declare type InsertRecordVariables = {
|
|
3447
3536
|
* Insert a new Record into the Table
|
3448
3537
|
*/
|
3449
3538
|
declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
3450
|
-
|
3539
|
+
type GetRecordPathParams = {
|
3451
3540
|
/**
|
3452
3541
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3453
3542
|
*/
|
@@ -3463,13 +3552,13 @@ declare type GetRecordPathParams = {
|
|
3463
3552
|
workspace: string;
|
3464
3553
|
region: string;
|
3465
3554
|
};
|
3466
|
-
|
3555
|
+
type GetRecordQueryParams = {
|
3467
3556
|
/**
|
3468
3557
|
* Column filters
|
3469
3558
|
*/
|
3470
3559
|
columns?: ColumnsProjection;
|
3471
3560
|
};
|
3472
|
-
|
3561
|
+
type GetRecordError = ErrorWrapper<{
|
3473
3562
|
status: 400;
|
3474
3563
|
payload: BadRequestError;
|
3475
3564
|
} | {
|
@@ -3479,7 +3568,7 @@ declare type GetRecordError = ErrorWrapper<{
|
|
3479
3568
|
status: 404;
|
3480
3569
|
payload: SimpleError;
|
3481
3570
|
}>;
|
3482
|
-
|
3571
|
+
type GetRecordVariables = {
|
3483
3572
|
pathParams: GetRecordPathParams;
|
3484
3573
|
queryParams?: GetRecordQueryParams;
|
3485
3574
|
} & DataPlaneFetcherExtraProps;
|
@@ -3487,7 +3576,7 @@ declare type GetRecordVariables = {
|
|
3487
3576
|
* Retrieve record by ID
|
3488
3577
|
*/
|
3489
3578
|
declare const getRecord: (variables: GetRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
|
3490
|
-
|
3579
|
+
type InsertRecordWithIDPathParams = {
|
3491
3580
|
/**
|
3492
3581
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3493
3582
|
*/
|
@@ -3503,7 +3592,7 @@ declare type InsertRecordWithIDPathParams = {
|
|
3503
3592
|
workspace: string;
|
3504
3593
|
region: string;
|
3505
3594
|
};
|
3506
|
-
|
3595
|
+
type InsertRecordWithIDQueryParams = {
|
3507
3596
|
/**
|
3508
3597
|
* Column filters
|
3509
3598
|
*/
|
@@ -3511,7 +3600,7 @@ declare type InsertRecordWithIDQueryParams = {
|
|
3511
3600
|
createOnly?: boolean;
|
3512
3601
|
ifVersion?: number;
|
3513
3602
|
};
|
3514
|
-
|
3603
|
+
type InsertRecordWithIDError = ErrorWrapper<{
|
3515
3604
|
status: 400;
|
3516
3605
|
payload: BadRequestError;
|
3517
3606
|
} | {
|
@@ -3524,7 +3613,7 @@ declare type InsertRecordWithIDError = ErrorWrapper<{
|
|
3524
3613
|
status: 422;
|
3525
3614
|
payload: SimpleError;
|
3526
3615
|
}>;
|
3527
|
-
|
3616
|
+
type InsertRecordWithIDVariables = {
|
3528
3617
|
body?: Record<string, any>;
|
3529
3618
|
pathParams: InsertRecordWithIDPathParams;
|
3530
3619
|
queryParams?: InsertRecordWithIDQueryParams;
|
@@ -3533,7 +3622,7 @@ declare type InsertRecordWithIDVariables = {
|
|
3533
3622
|
* By default, IDs are auto-generated when data is insterted into Xata. Sending a request to this endpoint allows us to insert a record with a pre-existing ID, bypassing the default automatic ID generation.
|
3534
3623
|
*/
|
3535
3624
|
declare const insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
3536
|
-
|
3625
|
+
type UpdateRecordWithIDPathParams = {
|
3537
3626
|
/**
|
3538
3627
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3539
3628
|
*/
|
@@ -3549,14 +3638,14 @@ declare type UpdateRecordWithIDPathParams = {
|
|
3549
3638
|
workspace: string;
|
3550
3639
|
region: string;
|
3551
3640
|
};
|
3552
|
-
|
3641
|
+
type UpdateRecordWithIDQueryParams = {
|
3553
3642
|
/**
|
3554
3643
|
* Column filters
|
3555
3644
|
*/
|
3556
3645
|
columns?: ColumnsProjection;
|
3557
3646
|
ifVersion?: number;
|
3558
3647
|
};
|
3559
|
-
|
3648
|
+
type UpdateRecordWithIDError = ErrorWrapper<{
|
3560
3649
|
status: 400;
|
3561
3650
|
payload: BadRequestError;
|
3562
3651
|
} | {
|
@@ -3569,13 +3658,13 @@ declare type UpdateRecordWithIDError = ErrorWrapper<{
|
|
3569
3658
|
status: 422;
|
3570
3659
|
payload: SimpleError;
|
3571
3660
|
}>;
|
3572
|
-
|
3661
|
+
type UpdateRecordWithIDVariables = {
|
3573
3662
|
body?: Record<string, any>;
|
3574
3663
|
pathParams: UpdateRecordWithIDPathParams;
|
3575
3664
|
queryParams?: UpdateRecordWithIDQueryParams;
|
3576
3665
|
} & DataPlaneFetcherExtraProps;
|
3577
3666
|
declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
3578
|
-
|
3667
|
+
type UpsertRecordWithIDPathParams = {
|
3579
3668
|
/**
|
3580
3669
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3581
3670
|
*/
|
@@ -3591,14 +3680,14 @@ declare type UpsertRecordWithIDPathParams = {
|
|
3591
3680
|
workspace: string;
|
3592
3681
|
region: string;
|
3593
3682
|
};
|
3594
|
-
|
3683
|
+
type UpsertRecordWithIDQueryParams = {
|
3595
3684
|
/**
|
3596
3685
|
* Column filters
|
3597
3686
|
*/
|
3598
3687
|
columns?: ColumnsProjection;
|
3599
3688
|
ifVersion?: number;
|
3600
3689
|
};
|
3601
|
-
|
3690
|
+
type UpsertRecordWithIDError = ErrorWrapper<{
|
3602
3691
|
status: 400;
|
3603
3692
|
payload: BadRequestError;
|
3604
3693
|
} | {
|
@@ -3611,13 +3700,13 @@ declare type UpsertRecordWithIDError = ErrorWrapper<{
|
|
3611
3700
|
status: 422;
|
3612
3701
|
payload: SimpleError;
|
3613
3702
|
}>;
|
3614
|
-
|
3703
|
+
type UpsertRecordWithIDVariables = {
|
3615
3704
|
body?: Record<string, any>;
|
3616
3705
|
pathParams: UpsertRecordWithIDPathParams;
|
3617
3706
|
queryParams?: UpsertRecordWithIDQueryParams;
|
3618
3707
|
} & DataPlaneFetcherExtraProps;
|
3619
3708
|
declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
3620
|
-
|
3709
|
+
type DeleteRecordPathParams = {
|
3621
3710
|
/**
|
3622
3711
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3623
3712
|
*/
|
@@ -3633,13 +3722,13 @@ declare type DeleteRecordPathParams = {
|
|
3633
3722
|
workspace: string;
|
3634
3723
|
region: string;
|
3635
3724
|
};
|
3636
|
-
|
3725
|
+
type DeleteRecordQueryParams = {
|
3637
3726
|
/**
|
3638
3727
|
* Column filters
|
3639
3728
|
*/
|
3640
3729
|
columns?: ColumnsProjection;
|
3641
3730
|
};
|
3642
|
-
|
3731
|
+
type DeleteRecordError = ErrorWrapper<{
|
3643
3732
|
status: 400;
|
3644
3733
|
payload: BadRequestError;
|
3645
3734
|
} | {
|
@@ -3649,12 +3738,12 @@ declare type DeleteRecordError = ErrorWrapper<{
|
|
3649
3738
|
status: 404;
|
3650
3739
|
payload: SimpleError;
|
3651
3740
|
}>;
|
3652
|
-
|
3741
|
+
type DeleteRecordVariables = {
|
3653
3742
|
pathParams: DeleteRecordPathParams;
|
3654
3743
|
queryParams?: DeleteRecordQueryParams;
|
3655
3744
|
} & DataPlaneFetcherExtraProps;
|
3656
3745
|
declare const deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
|
3657
|
-
|
3746
|
+
type BulkInsertTableRecordsPathParams = {
|
3658
3747
|
/**
|
3659
3748
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3660
3749
|
*/
|
@@ -3666,13 +3755,13 @@ declare type BulkInsertTableRecordsPathParams = {
|
|
3666
3755
|
workspace: string;
|
3667
3756
|
region: string;
|
3668
3757
|
};
|
3669
|
-
|
3758
|
+
type BulkInsertTableRecordsQueryParams = {
|
3670
3759
|
/**
|
3671
3760
|
* Column filters
|
3672
3761
|
*/
|
3673
3762
|
columns?: ColumnsProjection;
|
3674
3763
|
};
|
3675
|
-
|
3764
|
+
type BulkInsertTableRecordsError = ErrorWrapper<{
|
3676
3765
|
status: 400;
|
3677
3766
|
payload: BulkError;
|
3678
3767
|
} | {
|
@@ -3685,10 +3774,10 @@ declare type BulkInsertTableRecordsError = ErrorWrapper<{
|
|
3685
3774
|
status: 422;
|
3686
3775
|
payload: SimpleError;
|
3687
3776
|
}>;
|
3688
|
-
|
3777
|
+
type BulkInsertTableRecordsRequestBody = {
|
3689
3778
|
records: Record<string, any>[];
|
3690
3779
|
};
|
3691
|
-
|
3780
|
+
type BulkInsertTableRecordsVariables = {
|
3692
3781
|
body: BulkInsertTableRecordsRequestBody;
|
3693
3782
|
pathParams: BulkInsertTableRecordsPathParams;
|
3694
3783
|
queryParams?: BulkInsertTableRecordsQueryParams;
|
@@ -3697,7 +3786,7 @@ declare type BulkInsertTableRecordsVariables = {
|
|
3697
3786
|
* Bulk insert records
|
3698
3787
|
*/
|
3699
3788
|
declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal) => Promise<BulkInsertResponse>;
|
3700
|
-
|
3789
|
+
type QueryTablePathParams = {
|
3701
3790
|
/**
|
3702
3791
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3703
3792
|
*/
|
@@ -3709,7 +3798,7 @@ declare type QueryTablePathParams = {
|
|
3709
3798
|
workspace: string;
|
3710
3799
|
region: string;
|
3711
3800
|
};
|
3712
|
-
|
3801
|
+
type QueryTableError = ErrorWrapper<{
|
3713
3802
|
status: 400;
|
3714
3803
|
payload: BadRequestError;
|
3715
3804
|
} | {
|
@@ -3719,7 +3808,7 @@ declare type QueryTableError = ErrorWrapper<{
|
|
3719
3808
|
status: 404;
|
3720
3809
|
payload: SimpleError;
|
3721
3810
|
}>;
|
3722
|
-
|
3811
|
+
type QueryTableRequestBody = {
|
3723
3812
|
filter?: FilterExpression;
|
3724
3813
|
sort?: SortExpression;
|
3725
3814
|
page?: PageConfig;
|
@@ -3731,7 +3820,7 @@ declare type QueryTableRequestBody = {
|
|
3731
3820
|
*/
|
3732
3821
|
consistency?: 'strong' | 'eventual';
|
3733
3822
|
};
|
3734
|
-
|
3823
|
+
type QueryTableVariables = {
|
3735
3824
|
body?: QueryTableRequestBody;
|
3736
3825
|
pathParams: QueryTablePathParams;
|
3737
3826
|
} & DataPlaneFetcherExtraProps;
|
@@ -4276,20 +4365,25 @@ declare type QueryTableVariables = {
|
|
4276
4365
|
*
|
4277
4366
|
* #### Working with arrays
|
4278
4367
|
*
|
4279
|
-
* To test that an array contains a value, use `$
|
4368
|
+
* To test that an array contains a value, use `$includesAny`.
|
4280
4369
|
*
|
4281
4370
|
* ```json
|
4282
4371
|
* {
|
4283
4372
|
* "filter": {
|
4284
4373
|
* "<array_name>": {
|
4285
|
-
* "$
|
4374
|
+
* "$includesAny": "value"
|
4286
4375
|
* }
|
4287
4376
|
* }
|
4288
4377
|
* }
|
4289
4378
|
* ```
|
4290
4379
|
*
|
4291
|
-
*
|
4292
|
-
*
|
4380
|
+
* ##### `includesAny`
|
4381
|
+
*
|
4382
|
+
* The `$includesAny` operator accepts a custom predicate that will check if
|
4383
|
+
* any value in the array column matches the predicate. The `$includes` operator is a
|
4384
|
+
* synonym for the `$includesAny` operator.
|
4385
|
+
*
|
4386
|
+
* For example a complex predicate can include
|
4293
4387
|
* the `$all` , `$contains` and `$endsWith` operators:
|
4294
4388
|
*
|
4295
4389
|
* ```json
|
@@ -4307,11 +4401,26 @@ declare type QueryTableVariables = {
|
|
4307
4401
|
* }
|
4308
4402
|
* ```
|
4309
4403
|
*
|
4310
|
-
*
|
4311
|
-
*
|
4312
|
-
*
|
4313
|
-
* predicate.
|
4314
|
-
*
|
4404
|
+
* ##### `includesNone`
|
4405
|
+
*
|
4406
|
+
* The `$includesNone` operator succeeds if no array item matches the
|
4407
|
+
* predicate.
|
4408
|
+
*
|
4409
|
+
* ```json
|
4410
|
+
* {
|
4411
|
+
* "filter": {
|
4412
|
+
* "settings.labels": {
|
4413
|
+
* "$includesNone": [{ "$contains": "label" }]
|
4414
|
+
* }
|
4415
|
+
* }
|
4416
|
+
* }
|
4417
|
+
* ```
|
4418
|
+
* The above matches if none of the array values contain the string "label".
|
4419
|
+
*
|
4420
|
+
* ##### `includesAll`
|
4421
|
+
*
|
4422
|
+
* The `$includesAll` operator succeeds if all array items match the
|
4423
|
+
* predicate.
|
4315
4424
|
*
|
4316
4425
|
* Here is an example of using the `$includesAll` operator:
|
4317
4426
|
*
|
@@ -4325,7 +4434,7 @@ declare type QueryTableVariables = {
|
|
4325
4434
|
* }
|
4326
4435
|
* ```
|
4327
4436
|
*
|
4328
|
-
* The above matches if all
|
4437
|
+
* The above matches if all array values contain the string "label".
|
4329
4438
|
*
|
4330
4439
|
* ### Sorting
|
4331
4440
|
*
|
@@ -4472,7 +4581,7 @@ declare type QueryTableVariables = {
|
|
4472
4581
|
* ```
|
4473
4582
|
*/
|
4474
4583
|
declare const queryTable: (variables: QueryTableVariables, signal?: AbortSignal) => Promise<QueryResponse>;
|
4475
|
-
|
4584
|
+
type SearchBranchPathParams = {
|
4476
4585
|
/**
|
4477
4586
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4478
4587
|
*/
|
@@ -4480,7 +4589,7 @@ declare type SearchBranchPathParams = {
|
|
4480
4589
|
workspace: string;
|
4481
4590
|
region: string;
|
4482
4591
|
};
|
4483
|
-
|
4592
|
+
type SearchBranchError = ErrorWrapper<{
|
4484
4593
|
status: 400;
|
4485
4594
|
payload: BadRequestError;
|
4486
4595
|
} | {
|
@@ -4490,7 +4599,7 @@ declare type SearchBranchError = ErrorWrapper<{
|
|
4490
4599
|
status: 404;
|
4491
4600
|
payload: SimpleError;
|
4492
4601
|
}>;
|
4493
|
-
|
4602
|
+
type SearchBranchRequestBody = {
|
4494
4603
|
/**
|
4495
4604
|
* 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.
|
4496
4605
|
*/
|
@@ -4512,8 +4621,9 @@ declare type SearchBranchRequestBody = {
|
|
4512
4621
|
fuzziness?: FuzzinessExpression;
|
4513
4622
|
prefix?: PrefixExpression;
|
4514
4623
|
highlight?: HighlightExpression;
|
4624
|
+
page?: SearchPageConfig;
|
4515
4625
|
};
|
4516
|
-
|
4626
|
+
type SearchBranchVariables = {
|
4517
4627
|
body: SearchBranchRequestBody;
|
4518
4628
|
pathParams: SearchBranchPathParams;
|
4519
4629
|
} & DataPlaneFetcherExtraProps;
|
@@ -4521,7 +4631,7 @@ declare type SearchBranchVariables = {
|
|
4521
4631
|
* Run a free text search operation across the database branch.
|
4522
4632
|
*/
|
4523
4633
|
declare const searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
4524
|
-
|
4634
|
+
type SearchTablePathParams = {
|
4525
4635
|
/**
|
4526
4636
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4527
4637
|
*/
|
@@ -4533,7 +4643,7 @@ declare type SearchTablePathParams = {
|
|
4533
4643
|
workspace: string;
|
4534
4644
|
region: string;
|
4535
4645
|
};
|
4536
|
-
|
4646
|
+
type SearchTableError = ErrorWrapper<{
|
4537
4647
|
status: 400;
|
4538
4648
|
payload: BadRequestError;
|
4539
4649
|
} | {
|
@@ -4543,7 +4653,7 @@ declare type SearchTableError = ErrorWrapper<{
|
|
4543
4653
|
status: 404;
|
4544
4654
|
payload: SimpleError;
|
4545
4655
|
}>;
|
4546
|
-
|
4656
|
+
type SearchTableRequestBody = {
|
4547
4657
|
/**
|
4548
4658
|
* The query string.
|
4549
4659
|
*
|
@@ -4556,8 +4666,9 @@ declare type SearchTableRequestBody = {
|
|
4556
4666
|
filter?: FilterExpression;
|
4557
4667
|
highlight?: HighlightExpression;
|
4558
4668
|
boosters?: BoosterExpression[];
|
4669
|
+
page?: SearchPageConfig;
|
4559
4670
|
};
|
4560
|
-
|
4671
|
+
type SearchTableVariables = {
|
4561
4672
|
body: SearchTableRequestBody;
|
4562
4673
|
pathParams: SearchTablePathParams;
|
4563
4674
|
} & DataPlaneFetcherExtraProps;
|
@@ -4569,7 +4680,7 @@ declare type SearchTableVariables = {
|
|
4569
4680
|
* * filtering on columns of type `multiple` is currently unsupported
|
4570
4681
|
*/
|
4571
4682
|
declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
4572
|
-
|
4683
|
+
type SummarizeTablePathParams = {
|
4573
4684
|
/**
|
4574
4685
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4575
4686
|
*/
|
@@ -4581,7 +4692,7 @@ declare type SummarizeTablePathParams = {
|
|
4581
4692
|
workspace: string;
|
4582
4693
|
region: string;
|
4583
4694
|
};
|
4584
|
-
|
4695
|
+
type SummarizeTableError = ErrorWrapper<{
|
4585
4696
|
status: 400;
|
4586
4697
|
payload: BadRequestError;
|
4587
4698
|
} | {
|
@@ -4591,7 +4702,7 @@ declare type SummarizeTableError = ErrorWrapper<{
|
|
4591
4702
|
status: 404;
|
4592
4703
|
payload: SimpleError;
|
4593
4704
|
}>;
|
4594
|
-
|
4705
|
+
type SummarizeTableRequestBody = {
|
4595
4706
|
filter?: FilterExpression;
|
4596
4707
|
columns?: ColumnsProjection;
|
4597
4708
|
summaries?: SummaryExpressionList;
|
@@ -4615,7 +4726,7 @@ declare type SummarizeTableRequestBody = {
|
|
4615
4726
|
size?: number;
|
4616
4727
|
};
|
4617
4728
|
};
|
4618
|
-
|
4729
|
+
type SummarizeTableVariables = {
|
4619
4730
|
body?: SummarizeTableRequestBody;
|
4620
4731
|
pathParams: SummarizeTablePathParams;
|
4621
4732
|
} & DataPlaneFetcherExtraProps;
|
@@ -4684,7 +4795,7 @@ declare type SummarizeTableVariables = {
|
|
4684
4795
|
* will return the default size.
|
4685
4796
|
*/
|
4686
4797
|
declare const summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal) => Promise<SummarizeResponse>;
|
4687
|
-
|
4798
|
+
type AggregateTablePathParams = {
|
4688
4799
|
/**
|
4689
4800
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4690
4801
|
*/
|
@@ -4696,7 +4807,7 @@ declare type AggregateTablePathParams = {
|
|
4696
4807
|
workspace: string;
|
4697
4808
|
region: string;
|
4698
4809
|
};
|
4699
|
-
|
4810
|
+
type AggregateTableError = ErrorWrapper<{
|
4700
4811
|
status: 400;
|
4701
4812
|
payload: BadRequestError;
|
4702
4813
|
} | {
|
@@ -4706,11 +4817,11 @@ declare type AggregateTableError = ErrorWrapper<{
|
|
4706
4817
|
status: 404;
|
4707
4818
|
payload: SimpleError;
|
4708
4819
|
}>;
|
4709
|
-
|
4820
|
+
type AggregateTableRequestBody = {
|
4710
4821
|
filter?: FilterExpression;
|
4711
4822
|
aggs?: AggExpressionMap;
|
4712
4823
|
};
|
4713
|
-
|
4824
|
+
type AggregateTableVariables = {
|
4714
4825
|
body?: AggregateTableRequestBody;
|
4715
4826
|
pathParams: AggregateTablePathParams;
|
4716
4827
|
} & DataPlaneFetcherExtraProps;
|
@@ -4834,12 +4945,12 @@ declare const operationsByTag: {
|
|
4834
4945
|
};
|
4835
4946
|
};
|
4836
4947
|
|
4837
|
-
|
4838
|
-
|
4948
|
+
type HostAliases = 'production' | 'staging';
|
4949
|
+
type ProviderBuilder = {
|
4839
4950
|
main: string;
|
4840
4951
|
workspaces: string;
|
4841
4952
|
};
|
4842
|
-
|
4953
|
+
type HostProvider = HostAliases | ProviderBuilder;
|
4843
4954
|
declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder): string;
|
4844
4955
|
declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
|
4845
4956
|
declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
|
@@ -4955,12 +5066,12 @@ type schemas_FilterPredicateRangeOp = FilterPredicateRangeOp;
|
|
4955
5066
|
type schemas_FilterRangeValue = FilterRangeValue;
|
4956
5067
|
type schemas_FilterValue = FilterValue;
|
4957
5068
|
type schemas_PageConfig = PageConfig;
|
5069
|
+
type schemas_SearchPageConfig = SearchPageConfig;
|
4958
5070
|
type schemas_ColumnsProjection = ColumnsProjection;
|
4959
5071
|
type schemas_RecordMeta = RecordMeta;
|
4960
5072
|
type schemas_RecordID = RecordID;
|
4961
5073
|
type schemas_TableRename = TableRename;
|
4962
5074
|
type schemas_RecordsMetadata = RecordsMetadata;
|
4963
|
-
type schemas_TransactionOperation = TransactionOperation;
|
4964
5075
|
type schemas_TransactionInsertOp = TransactionInsertOp;
|
4965
5076
|
type schemas_TransactionUpdateOp = TransactionUpdateOp;
|
4966
5077
|
type schemas_TransactionDeleteOp = TransactionDeleteOp;
|
@@ -5059,13 +5170,14 @@ declare namespace schemas {
|
|
5059
5170
|
schemas_FilterRangeValue as FilterRangeValue,
|
5060
5171
|
schemas_FilterValue as FilterValue,
|
5061
5172
|
schemas_PageConfig as PageConfig,
|
5173
|
+
schemas_SearchPageConfig as SearchPageConfig,
|
5062
5174
|
schemas_ColumnsProjection as ColumnsProjection,
|
5063
5175
|
schemas_RecordMeta as RecordMeta,
|
5064
5176
|
schemas_RecordID as RecordID,
|
5065
5177
|
schemas_TableRename as TableRename,
|
5066
5178
|
schemas_RecordsMetadata as RecordsMetadata,
|
5067
5179
|
AggResponse$1 as AggResponse,
|
5068
|
-
|
5180
|
+
TransactionOperation$1 as TransactionOperation,
|
5069
5181
|
schemas_TransactionInsertOp as TransactionInsertOp,
|
5070
5182
|
schemas_TransactionUpdateOp as TransactionUpdateOp,
|
5071
5183
|
schemas_TransactionDeleteOp as TransactionDeleteOp,
|
@@ -5094,12 +5206,13 @@ declare namespace schemas {
|
|
5094
5206
|
};
|
5095
5207
|
}
|
5096
5208
|
|
5097
|
-
|
5209
|
+
type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
|
5098
5210
|
interface XataApiClientOptions {
|
5099
5211
|
fetch?: FetchImpl;
|
5100
5212
|
apiKey?: string;
|
5101
5213
|
host?: HostProvider;
|
5102
5214
|
trace?: TraceFunction;
|
5215
|
+
clientName?: string;
|
5103
5216
|
}
|
5104
5217
|
declare class XataApiClient {
|
5105
5218
|
#private;
|
@@ -5424,7 +5537,7 @@ declare class RecordsApi {
|
|
5424
5537
|
region: string;
|
5425
5538
|
database: DBName;
|
5426
5539
|
branch: BranchName;
|
5427
|
-
operations: TransactionOperation[];
|
5540
|
+
operations: TransactionOperation$1[];
|
5428
5541
|
}): Promise<TransactionSuccess>;
|
5429
5542
|
}
|
5430
5543
|
declare class SearchAndFilterApi {
|
@@ -5667,60 +5780,70 @@ declare class XataApiPlugin implements XataPlugin {
|
|
5667
5780
|
build(options: XataPluginOptions): Promise<XataApiClient>;
|
5668
5781
|
}
|
5669
5782
|
|
5670
|
-
|
5671
|
-
|
5672
|
-
|
5673
|
-
|
5674
|
-
|
5675
|
-
|
5676
|
-
|
5783
|
+
type StringKeys<O> = Extract<keyof O, string>;
|
5784
|
+
type Values<O> = O[StringKeys<O>];
|
5785
|
+
type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
|
5786
|
+
type If<Condition, Then, Else> = Condition extends true ? Then : Else;
|
5787
|
+
type IsObject<T> = T extends Record<string, any> ? true : false;
|
5788
|
+
type IsArray<T> = T extends Array<any> ? true : false;
|
5789
|
+
type RequiredBy<T, K extends keyof T> = T & {
|
5677
5790
|
[P in K]-?: NonNullable<T[P]>;
|
5678
5791
|
};
|
5679
|
-
|
5680
|
-
|
5681
|
-
|
5682
|
-
|
5683
|
-
|
5792
|
+
type GetArrayInnerType<T extends readonly any[]> = T[number];
|
5793
|
+
type FunctionKeys<T> = {
|
5794
|
+
[K in keyof T]: T[K] extends (...args: any) => any ? K : never;
|
5795
|
+
}[keyof T];
|
5796
|
+
type SingleOrArray<T> = T | T[];
|
5797
|
+
type Dictionary<T> = Record<string, T>;
|
5798
|
+
type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
|
5799
|
+
type Without<T, U> = {
|
5684
5800
|
[P in Exclude<keyof T, keyof U>]?: never;
|
5685
5801
|
};
|
5686
|
-
|
5687
|
-
|
5802
|
+
type ExclusiveOr<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
|
5803
|
+
type Explode<T> = keyof T extends infer K ? K extends unknown ? {
|
5688
5804
|
[I in keyof T]: I extends K ? T[I] : never;
|
5689
5805
|
} : never : never;
|
5690
|
-
|
5691
|
-
|
5806
|
+
type AtMostOne<T> = Explode<Partial<T>>;
|
5807
|
+
type AtLeastOne<T, U = {
|
5692
5808
|
[K in keyof T]: Pick<T, K>;
|
5693
5809
|
}> = Partial<T> & U[keyof U];
|
5694
|
-
|
5810
|
+
type ExactlyOne<T> = AtMostOne<T> & AtLeastOne<T>;
|
5811
|
+
type Fn = (...args: any[]) => any;
|
5812
|
+
type NarrowRaw<A> = (A extends [] ? [] : never) | (A extends Narrowable ? A : never) | {
|
5813
|
+
[K in keyof A]: A[K] extends Fn ? A[K] : NarrowRaw<A[K]>;
|
5814
|
+
};
|
5815
|
+
type Narrowable = string | number | bigint | boolean;
|
5816
|
+
type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
|
5817
|
+
type Narrow<A> = Try<A, [], NarrowRaw<A>>;
|
5695
5818
|
|
5696
|
-
|
5697
|
-
|
5819
|
+
type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
|
5820
|
+
type WildcardColumns<O> = Values<{
|
5698
5821
|
[K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
|
5699
5822
|
}>;
|
5700
|
-
|
5823
|
+
type ColumnsByValue<O, Value> = Values<{
|
5701
5824
|
[K in SelectableColumn<O>]: ValueAtColumn<O, K> extends infer C ? C extends Value ? K extends WildcardColumns<O> ? never : K : never : never;
|
5702
5825
|
}>;
|
5703
|
-
|
5826
|
+
type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
|
5704
5827
|
[K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
|
5705
5828
|
}>>;
|
5706
|
-
|
5829
|
+
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> ? {
|
5707
5830
|
V: ValueAtColumn<Item, V>;
|
5708
5831
|
} : never : O[K] : never> : never : never;
|
5709
|
-
|
5710
|
-
|
5832
|
+
type MAX_RECURSION = 5;
|
5833
|
+
type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
|
5711
5834
|
[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
|
5712
5835
|
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
|
5713
5836
|
K>> : never;
|
5714
5837
|
}>, never>;
|
5715
|
-
|
5716
|
-
|
5838
|
+
type DataProps<O> = Exclude<StringKeys<O>, StringKeys<XataRecord>>;
|
5839
|
+
type NestedValueAtColumn<O, Key extends SelectableColumn<O>> = Key extends `${infer N}.${infer M}` ? N extends DataProps<O> ? {
|
5717
5840
|
[K in N]: M extends SelectableColumn<NonNullable<O[K]>> ? NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M> & XataRecord> : ForwardNullable<O[K], NestedValueAtColumn<NonNullable<O[K]>, M>> : unknown;
|
5718
5841
|
} : unknown : Key extends DataProps<O> ? {
|
5719
5842
|
[K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], SelectedPick<NonNullable<O[K]>, ['*']>> : O[K];
|
5720
5843
|
} : Key extends '*' ? {
|
5721
5844
|
[K in StringKeys<O>]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Link<NonNullable<O[K]>>> : O[K];
|
5722
5845
|
} : unknown;
|
5723
|
-
|
5846
|
+
type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
|
5724
5847
|
|
5725
5848
|
/**
|
5726
5849
|
* Represents an identifiable record from the database.
|
@@ -5804,8 +5927,8 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
|
|
5804
5927
|
*/
|
5805
5928
|
delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
5806
5929
|
}
|
5807
|
-
|
5808
|
-
|
5930
|
+
type Link<Record extends XataRecord> = XataRecord<Record>;
|
5931
|
+
type XataRecordMetadata = {
|
5809
5932
|
/**
|
5810
5933
|
* Number that is increased every time the record is updated.
|
5811
5934
|
*/
|
@@ -5814,7 +5937,7 @@ declare type XataRecordMetadata = {
|
|
5814
5937
|
};
|
5815
5938
|
declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
|
5816
5939
|
declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
|
5817
|
-
|
5940
|
+
type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
|
5818
5941
|
[K in keyof O]: O[K] extends XataRecord ? {
|
5819
5942
|
id: string;
|
5820
5943
|
} | string : NonNullable<O[K]> extends XataRecord ? {
|
@@ -5840,10 +5963,10 @@ declare type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
|
|
5840
5963
|
}
|
5841
5964
|
}
|
5842
5965
|
*/
|
5843
|
-
|
5966
|
+
type PropertyAccessFilter<Record> = {
|
5844
5967
|
[key in ColumnsByValue<Record, any>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
|
5845
5968
|
};
|
5846
|
-
|
5969
|
+
type PropertyFilter<T> = T | {
|
5847
5970
|
$is: T;
|
5848
5971
|
} | {
|
5849
5972
|
$isNot: T;
|
@@ -5852,26 +5975,26 @@ declare type PropertyFilter<T> = T | {
|
|
5852
5975
|
} | {
|
5853
5976
|
$none: T[];
|
5854
5977
|
} | ValueTypeFilters<T>;
|
5855
|
-
|
5978
|
+
type IncludesFilter<T> = PropertyFilter<T> | {
|
5856
5979
|
[key in '$all' | '$none' | '$any']?: IncludesFilter<T> | Array<IncludesFilter<T> | {
|
5857
5980
|
$not: IncludesFilter<T>;
|
5858
5981
|
}>;
|
5859
5982
|
};
|
5860
|
-
|
5983
|
+
type StringTypeFilter = {
|
5861
5984
|
[key in '$contains' | '$pattern' | '$startsWith' | '$endsWith']?: string;
|
5862
5985
|
};
|
5863
|
-
|
5864
|
-
|
5986
|
+
type ComparableType = number | Date;
|
5987
|
+
type ComparableTypeFilter<T extends ComparableType> = {
|
5865
5988
|
[key in '$gt' | '$lt' | '$ge' | '$le']?: T;
|
5866
5989
|
};
|
5867
|
-
|
5990
|
+
type ArrayFilter<T> = {
|
5868
5991
|
[key in '$includes']?: SingleOrArray<PropertyFilter<T> | ValueTypeFilters<T>> | IncludesFilter<T>;
|
5869
5992
|
} | {
|
5870
5993
|
[key in '$includesAll' | '$includesNone' | '$includesAny']?: T | Array<PropertyFilter<T> | {
|
5871
5994
|
$not: PropertyFilter<T>;
|
5872
5995
|
}>;
|
5873
5996
|
};
|
5874
|
-
|
5997
|
+
type ValueTypeFilters<T> = T | T extends string ? StringTypeFilter : T extends number ? ComparableTypeFilter<number> : T extends Date ? ComparableTypeFilter<Date> : T extends Array<infer T> ? ArrayFilter<T> : never;
|
5875
5998
|
/**
|
5876
5999
|
* AggregatorFilter
|
5877
6000
|
* Example:
|
@@ -5895,60 +6018,104 @@ declare type ValueTypeFilters<T> = T | T extends string ? StringTypeFilter : T e
|
|
5895
6018
|
],
|
5896
6019
|
}
|
5897
6020
|
*/
|
5898
|
-
|
6021
|
+
type AggregatorFilter<T> = {
|
5899
6022
|
[key in '$all' | '$any' | '$not' | '$none']?: SingleOrArray<Filter<T>>;
|
5900
6023
|
};
|
5901
6024
|
/**
|
5902
6025
|
* Existance filter
|
5903
6026
|
* Example: { filter: { $exists: "settings" } }
|
5904
6027
|
*/
|
5905
|
-
|
6028
|
+
type ExistanceFilter<Record> = {
|
5906
6029
|
[key in '$exists' | '$notExists']?: ColumnsByValue<Record, any>;
|
5907
6030
|
};
|
5908
|
-
|
6031
|
+
type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
|
5909
6032
|
/**
|
5910
6033
|
* Nested filter
|
5911
6034
|
* Injects the Api filters on nested properties
|
5912
6035
|
* Example: { filter: { settings: { plan: { $any: ['free', 'trial'] } } } }
|
5913
6036
|
*/
|
5914
|
-
|
6037
|
+
type NestedApiFilter<T> = {
|
5915
6038
|
[key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
|
5916
6039
|
};
|
5917
|
-
|
6040
|
+
type Filter<T> = T extends Record<string, any> ? T extends (infer ArrayType)[] ? ArrayType | ArrayType[] | ArrayFilter<ArrayType> | ArrayFilter<ArrayType[]> : T extends Date ? PropertyFilter<T> : BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
|
5918
6041
|
|
5919
|
-
|
6042
|
+
type DateBooster = {
|
5920
6043
|
origin?: string;
|
5921
6044
|
scale: string;
|
5922
6045
|
decay: number;
|
5923
6046
|
};
|
5924
|
-
|
6047
|
+
type NumericBooster = {
|
5925
6048
|
factor: number;
|
5926
|
-
|
5927
|
-
|
6049
|
+
/**
|
6050
|
+
* Modifier to be applied to the column value, before being multiplied with the factor. The possible values are:
|
6051
|
+
* - none (default).
|
6052
|
+
* - log: common logarithm (base 10)
|
6053
|
+
* - log1p: add 1 then take the common logarithm. This ensures that the value is positive if the
|
6054
|
+
* value is between 0 and 1.
|
6055
|
+
* - ln: natural logarithm (base e)
|
6056
|
+
* - ln1p: add 1 then take the natural logarithm. This ensures that the value is positive if the
|
6057
|
+
* value is between 0 and 1.
|
6058
|
+
* - square: raise the value to the power of two.
|
6059
|
+
* - sqrt: take the square root of the value.
|
6060
|
+
* - reciprocal: reciprocate the value (if the value is `x`, the reciprocal is `1/x`).
|
6061
|
+
*/
|
6062
|
+
modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
|
6063
|
+
};
|
6064
|
+
type ValueBooster<T extends string | number | boolean> = {
|
5928
6065
|
value: T;
|
5929
6066
|
factor: number;
|
5930
|
-
|
5931
|
-
|
6067
|
+
/**
|
6068
|
+
* Modifier to be applied to the column value, before being multiplied with the factor. The possible values are:
|
6069
|
+
* - none (default).
|
6070
|
+
* - log: common logarithm (base 10)
|
6071
|
+
* - log1p: add 1 then take the common logarithm. This ensures that the value is positive if the
|
6072
|
+
* value is between 0 and 1.
|
6073
|
+
* - ln: natural logarithm (base e)
|
6074
|
+
* - ln1p: add 1 then take the natural logarithm. This ensures that the value is positive if the
|
6075
|
+
* value is between 0 and 1.
|
6076
|
+
* - square: raise the value to the power of two.
|
6077
|
+
* - sqrt: take the square root of the value.
|
6078
|
+
* - reciprocal: reciprocate the value (if the value is `x`, the reciprocal is `1/x`).
|
6079
|
+
*/
|
6080
|
+
modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
|
6081
|
+
};
|
6082
|
+
type Boosters<O extends XataRecord> = Values<{
|
5932
6083
|
[K in SelectableColumn<O>]: NonNullable<ValueAtColumn<O, K>> extends Date ? {
|
5933
6084
|
dateBooster: {
|
5934
6085
|
column: K;
|
6086
|
+
/**
|
6087
|
+
* Only apply this booster to the records for which the provided filter matches.
|
6088
|
+
*/
|
6089
|
+
ifMatchesFilter?: Filter<O>;
|
5935
6090
|
} & DateBooster;
|
5936
6091
|
} : NonNullable<ValueAtColumn<O, K>> extends number ? ExclusiveOr<{
|
5937
6092
|
numericBooster?: {
|
5938
6093
|
column: K;
|
6094
|
+
/**
|
6095
|
+
* Only apply this booster to the records for which the provided filter matches.
|
6096
|
+
*/
|
6097
|
+
ifMatchesFilter?: Filter<O>;
|
5939
6098
|
} & NumericBooster;
|
5940
6099
|
}, {
|
5941
6100
|
valueBooster?: {
|
5942
6101
|
column: K;
|
6102
|
+
/**
|
6103
|
+
* Only apply this booster to the records for which the provided filter matches.
|
6104
|
+
*/
|
6105
|
+
ifMatchesFilter?: Filter<O>;
|
5943
6106
|
} & ValueBooster<number>;
|
5944
6107
|
}> : NonNullable<ValueAtColumn<O, K>> extends string | boolean ? {
|
5945
6108
|
valueBooster: {
|
5946
6109
|
column: K;
|
6110
|
+
/**
|
6111
|
+
* Only apply this booster to the records for which the provided filter matches.
|
6112
|
+
*/
|
6113
|
+
ifMatchesFilter?: Filter<O>;
|
5947
6114
|
} & ValueBooster<NonNullable<ValueAtColumn<O, K>>>;
|
5948
6115
|
} : never;
|
5949
6116
|
}>;
|
5950
6117
|
|
5951
|
-
|
6118
|
+
type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
|
5952
6119
|
/**
|
5953
6120
|
* The name of the column.
|
5954
6121
|
*/
|
@@ -5963,7 +6130,7 @@ declare type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
|
|
5963
6130
|
weight?: number;
|
5964
6131
|
};
|
5965
6132
|
|
5966
|
-
|
6133
|
+
type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
|
5967
6134
|
fuzziness?: FuzzinessExpression;
|
5968
6135
|
prefix?: PrefixExpression;
|
5969
6136
|
highlight?: HighlightExpression;
|
@@ -5975,8 +6142,9 @@ declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables exte
|
|
5975
6142
|
boosters?: Boosters<Schemas[Model] & XataRecord>[];
|
5976
6143
|
};
|
5977
6144
|
}>>;
|
6145
|
+
page?: SearchPageConfig;
|
5978
6146
|
};
|
5979
|
-
|
6147
|
+
type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
|
5980
6148
|
all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
|
5981
6149
|
[Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
|
5982
6150
|
table: Model;
|
@@ -5990,13 +6158,13 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
|
|
5990
6158
|
declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
5991
6159
|
#private;
|
5992
6160
|
private db;
|
5993
|
-
constructor(db: SchemaPluginResult<Schemas>, schemaTables?:
|
6161
|
+
constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
|
5994
6162
|
build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
|
5995
6163
|
}
|
5996
|
-
|
6164
|
+
type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
|
5997
6165
|
getMetadata: () => XataRecordMetadata & SearchExtraProperties;
|
5998
6166
|
};
|
5999
|
-
|
6167
|
+
type SearchExtraProperties = {
|
6000
6168
|
table: string;
|
6001
6169
|
highlight?: {
|
6002
6170
|
[key: string]: string[] | {
|
@@ -6005,15 +6173,15 @@ declare type SearchExtraProperties = {
|
|
6005
6173
|
};
|
6006
6174
|
score?: number;
|
6007
6175
|
};
|
6008
|
-
|
6009
|
-
|
6176
|
+
type ReturnTable<Table, Tables> = Table extends Tables ? Table : never;
|
6177
|
+
type ExtractTables<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>, TableOptions extends GetArrayInnerType<NonNullable<NonNullable<SearchOptions<Schemas, Tables>>['tables']>>> = TableOptions extends `${infer Table}` ? ReturnTable<Table, Tables> : TableOptions extends {
|
6010
6178
|
table: infer Table;
|
6011
6179
|
} ? ReturnTable<Table, Tables> : never;
|
6012
6180
|
|
6013
6181
|
/**
|
6014
6182
|
* The description of a single aggregation operation. The key represents the
|
6015
6183
|
*/
|
6016
|
-
|
6184
|
+
type AggregationExpression<O extends XataRecord> = ExactlyOne<{
|
6017
6185
|
count: CountAggregation<O>;
|
6018
6186
|
sum: SumAggregation<O>;
|
6019
6187
|
max: MaxAggregation<O>;
|
@@ -6024,23 +6192,23 @@ declare type AggregationExpression<O extends XataRecord> = ExactlyOne<{
|
|
6024
6192
|
topValues: TopValuesAggregation<O>;
|
6025
6193
|
numericHistogram: NumericHistogramAggregation<O>;
|
6026
6194
|
}>;
|
6027
|
-
|
6195
|
+
type AggregationResult<Record extends XataRecord, Expression extends Dictionary<AggregationExpression<Record>>> = {
|
6028
6196
|
aggs: {
|
6029
6197
|
[K in keyof Expression]: AggregationResultItem<Record, Expression[K]>;
|
6030
6198
|
};
|
6031
6199
|
};
|
6032
|
-
|
6033
|
-
|
6200
|
+
type AggregationExpressionType<T extends AggregationExpression<any>> = keyof T;
|
6201
|
+
type AggregationResultItem<Record extends XataRecord, Expression extends AggregationExpression<Record>> = AggregationExpressionType<Expression> extends infer Type ? Type extends keyof AggregationExpressionResultTypes ? AggregationExpressionResultTypes[Type] : never : never;
|
6034
6202
|
/**
|
6035
6203
|
* Count the number of records with an optional filter.
|
6036
6204
|
*/
|
6037
|
-
|
6205
|
+
type CountAggregation<O extends XataRecord> = {
|
6038
6206
|
filter?: Filter<O>;
|
6039
6207
|
} | '*';
|
6040
6208
|
/**
|
6041
6209
|
* The sum of the numeric values in a particular column.
|
6042
6210
|
*/
|
6043
|
-
|
6211
|
+
type SumAggregation<O extends XataRecord> = {
|
6044
6212
|
/**
|
6045
6213
|
* The column on which to compute the sum. Must be a numeric type.
|
6046
6214
|
*/
|
@@ -6049,7 +6217,7 @@ declare type SumAggregation<O extends XataRecord> = {
|
|
6049
6217
|
/**
|
6050
6218
|
* The max of the numeric values in a particular column.
|
6051
6219
|
*/
|
6052
|
-
|
6220
|
+
type MaxAggregation<O extends XataRecord> = {
|
6053
6221
|
/**
|
6054
6222
|
* The column on which to compute the max. Must be a numeric type.
|
6055
6223
|
*/
|
@@ -6058,7 +6226,7 @@ declare type MaxAggregation<O extends XataRecord> = {
|
|
6058
6226
|
/**
|
6059
6227
|
* The min of the numeric values in a particular column.
|
6060
6228
|
*/
|
6061
|
-
|
6229
|
+
type MinAggregation<O extends XataRecord> = {
|
6062
6230
|
/**
|
6063
6231
|
* The column on which to compute the min. Must be a numeric type.
|
6064
6232
|
*/
|
@@ -6067,7 +6235,7 @@ declare type MinAggregation<O extends XataRecord> = {
|
|
6067
6235
|
/**
|
6068
6236
|
* The average of the numeric values in a particular column.
|
6069
6237
|
*/
|
6070
|
-
|
6238
|
+
type AverageAggregation<O extends XataRecord> = {
|
6071
6239
|
/**
|
6072
6240
|
* The column on which to compute the average. Must be a numeric type.
|
6073
6241
|
*/
|
@@ -6076,7 +6244,7 @@ declare type AverageAggregation<O extends XataRecord> = {
|
|
6076
6244
|
/**
|
6077
6245
|
* Count the number of distinct values in a particular column.
|
6078
6246
|
*/
|
6079
|
-
|
6247
|
+
type UniqueCountAggregation<O extends XataRecord> = {
|
6080
6248
|
/**
|
6081
6249
|
* The column from where to count the unique values.
|
6082
6250
|
*/
|
@@ -6091,7 +6259,7 @@ declare type UniqueCountAggregation<O extends XataRecord> = {
|
|
6091
6259
|
/**
|
6092
6260
|
* Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
|
6093
6261
|
*/
|
6094
|
-
|
6262
|
+
type DateHistogramAggregation<O extends XataRecord> = {
|
6095
6263
|
/**
|
6096
6264
|
* The column to use for bucketing. Must be of type datetime.
|
6097
6265
|
*/
|
@@ -6122,7 +6290,7 @@ declare type DateHistogramAggregation<O extends XataRecord> = {
|
|
6122
6290
|
* Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
|
6123
6291
|
* The top values as ordered by the number of records (`$count``) are returned.
|
6124
6292
|
*/
|
6125
|
-
|
6293
|
+
type TopValuesAggregation<O extends XataRecord> = {
|
6126
6294
|
/**
|
6127
6295
|
* The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
|
6128
6296
|
*/
|
@@ -6139,7 +6307,7 @@ declare type TopValuesAggregation<O extends XataRecord> = {
|
|
6139
6307
|
/**
|
6140
6308
|
* Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
|
6141
6309
|
*/
|
6142
|
-
|
6310
|
+
type NumericHistogramAggregation<O extends XataRecord> = {
|
6143
6311
|
/**
|
6144
6312
|
* The column to use for bucketing. Must be of numeric type.
|
6145
6313
|
*/
|
@@ -6162,7 +6330,7 @@ declare type NumericHistogramAggregation<O extends XataRecord> = {
|
|
6162
6330
|
offset?: number;
|
6163
6331
|
aggs?: Dictionary<AggregationExpression<O>>;
|
6164
6332
|
};
|
6165
|
-
|
6333
|
+
type AggregationExpressionResultTypes = {
|
6166
6334
|
count: number;
|
6167
6335
|
sum: number | null;
|
6168
6336
|
max: number | null;
|
@@ -6173,7 +6341,7 @@ declare type AggregationExpressionResultTypes = {
|
|
6173
6341
|
topValues: ComplexAggregationResult;
|
6174
6342
|
numericHistogram: ComplexAggregationResult;
|
6175
6343
|
};
|
6176
|
-
|
6344
|
+
type ComplexAggregationResult = {
|
6177
6345
|
values: Array<{
|
6178
6346
|
$key: string | number;
|
6179
6347
|
$count: number;
|
@@ -6181,26 +6349,26 @@ declare type ComplexAggregationResult = {
|
|
6181
6349
|
}>;
|
6182
6350
|
};
|
6183
6351
|
|
6184
|
-
|
6185
|
-
|
6352
|
+
type SortDirection = 'asc' | 'desc';
|
6353
|
+
type SortFilterExtended<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = {
|
6186
6354
|
column: Columns;
|
6187
6355
|
direction?: SortDirection;
|
6188
6356
|
};
|
6189
|
-
|
6190
|
-
|
6357
|
+
type SortFilter<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns>;
|
6358
|
+
type SortFilterBase<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Values<{
|
6191
6359
|
[Key in Columns]: {
|
6192
6360
|
[K in Key]: SortDirection;
|
6193
6361
|
};
|
6194
6362
|
}>;
|
6195
6363
|
|
6196
|
-
|
6364
|
+
type SummarizeExpression<O extends XataRecord> = ExactlyOne<{
|
6197
6365
|
count: ColumnsByValue<O, any> | '*';
|
6198
6366
|
min: ColumnsByValue<O, string | number | Date | any[]>;
|
6199
6367
|
max: ColumnsByValue<O, string | number | Date | any[]>;
|
6200
6368
|
sum: ColumnsByValue<O, number>;
|
6201
6369
|
average: ColumnsByValue<O, number>;
|
6202
6370
|
}>;
|
6203
|
-
|
6371
|
+
type SummarizeParams<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
|
6204
6372
|
summaries?: Expression;
|
6205
6373
|
summariesFilter?: SummarizeFilter<Record, Expression>;
|
6206
6374
|
filter?: Filter<Record>;
|
@@ -6210,39 +6378,39 @@ declare type SummarizeParams<Record extends XataRecord, Expression extends Dicti
|
|
6210
6378
|
size: number;
|
6211
6379
|
};
|
6212
6380
|
};
|
6213
|
-
|
6381
|
+
type SummarizeResult<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
|
6214
6382
|
summaries: SummarizeResultItem<Record, Expression, Columns>[];
|
6215
6383
|
};
|
6216
|
-
|
6384
|
+
type SummarizeExpressionResultTypes<Value> = {
|
6217
6385
|
count: number;
|
6218
6386
|
min: Value;
|
6219
6387
|
max: Value;
|
6220
6388
|
sum: number;
|
6221
6389
|
average: number;
|
6222
6390
|
};
|
6223
|
-
|
6224
|
-
|
6391
|
+
type SummarizeSort<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = SingleOrArray<SortFilter<Record, ColumnsByValue<Record, any> | StringKeys<Expression>>>;
|
6392
|
+
type SummarizeValuePick<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = {
|
6225
6393
|
[K in StringKeys<Expression>]: StringKeys<Expression[K]> extends infer SummarizeOperation ? SummarizeOperation extends keyof Expression[K] ? Expression[K][SummarizeOperation] extends infer Column ? Column extends SelectableColumn<Record> ? SummarizeOperation extends keyof SummarizeExpressionResultTypes<any> ? SummarizeExpressionResultTypes<ValueAtColumn<Record, Column>>[SummarizeOperation] : never : never : never : never : never;
|
6226
6394
|
};
|
6227
|
-
|
6228
|
-
|
6395
|
+
type SummarizeFilter<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = Filter<Record & SummarizeValuePick<Record, Expression>>;
|
6396
|
+
type SummarizeResultItem<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = SummarizeValuePick<Record, Expression> & SelectedPick<Record, Columns>;
|
6229
6397
|
|
6230
|
-
|
6398
|
+
type BaseOptions<T extends XataRecord> = {
|
6231
6399
|
columns?: SelectableColumn<T>[];
|
6232
6400
|
cache?: number;
|
6233
6401
|
fetchOptions?: Record<string, unknown>;
|
6234
6402
|
};
|
6235
|
-
|
6403
|
+
type CursorQueryOptions = {
|
6236
6404
|
pagination?: CursorNavigationOptions & OffsetNavigationOptions;
|
6237
6405
|
filter?: never;
|
6238
6406
|
sort?: never | unknown;
|
6239
6407
|
};
|
6240
|
-
|
6408
|
+
type OffsetQueryOptions<T extends XataRecord> = {
|
6241
6409
|
pagination?: OffsetNavigationOptions;
|
6242
6410
|
filter?: FilterExpression;
|
6243
6411
|
sort?: SingleOrArray<SortFilter<T>>;
|
6244
6412
|
};
|
6245
|
-
|
6413
|
+
type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions | OffsetQueryOptions<T>);
|
6246
6414
|
/**
|
6247
6415
|
* Query objects contain the information of all filters, sorting, etc. to be included in the database query.
|
6248
6416
|
*
|
@@ -6489,7 +6657,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6489
6657
|
hasNextPage(): boolean;
|
6490
6658
|
}
|
6491
6659
|
|
6492
|
-
|
6660
|
+
type PaginationQueryMeta = {
|
6493
6661
|
page: {
|
6494
6662
|
cursor: string;
|
6495
6663
|
more: boolean;
|
@@ -6553,7 +6721,7 @@ declare class Page<Record extends XataRecord, Result extends XataRecord = Record
|
|
6553
6721
|
*/
|
6554
6722
|
hasNextPage(): boolean;
|
6555
6723
|
}
|
6556
|
-
|
6724
|
+
type CursorNavigationOptions = {
|
6557
6725
|
start?: string;
|
6558
6726
|
} | {
|
6559
6727
|
end?: string;
|
@@ -6561,7 +6729,7 @@ declare type CursorNavigationOptions = {
|
|
6561
6729
|
after?: string;
|
6562
6730
|
before?: string;
|
6563
6731
|
};
|
6564
|
-
|
6732
|
+
type OffsetNavigationOptions = {
|
6565
6733
|
size?: number;
|
6566
6734
|
offset?: number;
|
6567
6735
|
};
|
@@ -7098,6 +7266,8 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
|
|
7098
7266
|
highlight?: HighlightExpression;
|
7099
7267
|
filter?: Filter<Record>;
|
7100
7268
|
boosters?: Boosters<Record>[];
|
7269
|
+
page?: SearchPageConfig;
|
7270
|
+
target?: TargetColumn<Record>[];
|
7101
7271
|
}): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
|
7102
7272
|
/**
|
7103
7273
|
* Aggregates records in the table.
|
@@ -7224,13 +7394,15 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
|
|
7224
7394
|
highlight?: HighlightExpression;
|
7225
7395
|
filter?: Filter<Record>;
|
7226
7396
|
boosters?: Boosters<Record>[];
|
7397
|
+
page?: SearchPageConfig;
|
7398
|
+
target?: TargetColumn<Record>[];
|
7227
7399
|
}): Promise<any>;
|
7228
7400
|
aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
|
7229
7401
|
query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
|
7230
7402
|
summarizeTable<Result extends XataRecord>(query: Query<Record, Result>, summaries?: Dictionary<SummarizeExpression<Record>>, summariesFilter?: FilterExpression): Promise<SummarizeResponse>;
|
7231
7403
|
}
|
7232
7404
|
|
7233
|
-
|
7405
|
+
type BaseSchema = {
|
7234
7406
|
name: string;
|
7235
7407
|
columns: readonly ({
|
7236
7408
|
name: string;
|
@@ -7251,13 +7423,13 @@ declare type BaseSchema = {
|
|
7251
7423
|
}[];
|
7252
7424
|
})[];
|
7253
7425
|
};
|
7254
|
-
|
7426
|
+
type SchemaInference<T extends readonly BaseSchema[]> = T extends never[] ? Record<string, Record<string, any>> : T extends readonly unknown[] ? T[number] extends {
|
7255
7427
|
name: string;
|
7256
7428
|
columns: readonly unknown[];
|
7257
7429
|
} ? {
|
7258
7430
|
[K in T[number]['name']]: TableType<T[number], K>;
|
7259
7431
|
} : never : never;
|
7260
|
-
|
7432
|
+
type TableType<Tables, TableName> = Tables & {
|
7261
7433
|
name: TableName;
|
7262
7434
|
} extends infer Table ? Table extends {
|
7263
7435
|
name: string;
|
@@ -7268,7 +7440,7 @@ declare type TableType<Tables, TableName> = Tables & {
|
|
7268
7440
|
} ? Identifiable & UnionToIntersection<Values<{
|
7269
7441
|
[K in Columns[number]['name']]: PropertyType<Tables, Columns[number], K>;
|
7270
7442
|
}>> : never : never : never : never;
|
7271
|
-
|
7443
|
+
type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Properties & {
|
7272
7444
|
name: PropertyName;
|
7273
7445
|
} extends infer Property ? Property extends {
|
7274
7446
|
name: string;
|
@@ -7283,7 +7455,7 @@ declare type PropertyType<Tables, Properties, PropertyName extends PropertyKey>
|
|
7283
7455
|
} : {
|
7284
7456
|
[K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
|
7285
7457
|
} : never : never;
|
7286
|
-
|
7458
|
+
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 {
|
7287
7459
|
name: string;
|
7288
7460
|
type: string;
|
7289
7461
|
} ? UnionToIntersection<Values<{
|
@@ -7391,24 +7563,105 @@ declare const includesNone: <T>(value: T) => ArrayFilter<T>;
|
|
7391
7563
|
*/
|
7392
7564
|
declare const includesAny: <T>(value: T) => ArrayFilter<T>;
|
7393
7565
|
|
7394
|
-
|
7566
|
+
type SchemaDefinition = {
|
7395
7567
|
table: string;
|
7396
7568
|
};
|
7397
|
-
|
7569
|
+
type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
|
7398
7570
|
[Key in keyof Schemas]: Repository<Schemas[Key]>;
|
7399
7571
|
};
|
7400
7572
|
declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
7401
7573
|
#private;
|
7402
|
-
constructor(schemaTables?:
|
7574
|
+
constructor(schemaTables?: Table[]);
|
7403
7575
|
build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
|
7404
7576
|
}
|
7405
7577
|
|
7406
|
-
|
7407
|
-
|
7408
|
-
|
7409
|
-
|
7578
|
+
type TransactionOperation<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
|
7579
|
+
insert: Values<{
|
7580
|
+
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
7581
|
+
table: Model;
|
7582
|
+
} & InsertTransactionOperation<Schemas[Model] & XataRecord>;
|
7583
|
+
}>;
|
7584
|
+
} | {
|
7585
|
+
update: Values<{
|
7586
|
+
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
7587
|
+
table: Model;
|
7588
|
+
} & UpdateTransactionOperation<Schemas[Model] & XataRecord>;
|
7589
|
+
}>;
|
7590
|
+
} | {
|
7591
|
+
delete: Values<{
|
7592
|
+
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
7593
|
+
table: Model;
|
7594
|
+
} & DeleteTransactionOperation;
|
7595
|
+
}>;
|
7596
|
+
};
|
7597
|
+
type InsertTransactionOperation<O extends XataRecord> = {
|
7598
|
+
record: Partial<EditableData<O>>;
|
7599
|
+
ifVersion?: number;
|
7600
|
+
createOnly?: boolean;
|
7601
|
+
};
|
7602
|
+
type UpdateTransactionOperation<O extends XataRecord> = {
|
7603
|
+
id: string;
|
7604
|
+
fields: Partial<EditableData<O>>;
|
7605
|
+
ifVersion?: number;
|
7606
|
+
upsert?: boolean;
|
7607
|
+
};
|
7608
|
+
type DeleteTransactionOperation = {
|
7609
|
+
id: string;
|
7610
|
+
};
|
7611
|
+
type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Table>> = Operation extends {
|
7612
|
+
insert: {
|
7613
|
+
table: Table;
|
7614
|
+
record: {
|
7615
|
+
id: infer Id;
|
7616
|
+
};
|
7617
|
+
};
|
7618
|
+
} ? {
|
7619
|
+
operation: 'insert';
|
7620
|
+
id: Id;
|
7621
|
+
rows: number;
|
7622
|
+
} : Operation extends {
|
7623
|
+
insert: {
|
7624
|
+
table: Table;
|
7625
|
+
};
|
7626
|
+
} ? {
|
7627
|
+
operation: 'insert';
|
7628
|
+
id: string;
|
7629
|
+
rows: number;
|
7630
|
+
} : Operation extends {
|
7631
|
+
update: {
|
7632
|
+
table: Table;
|
7633
|
+
id: infer Id;
|
7634
|
+
};
|
7635
|
+
} ? {
|
7636
|
+
operation: 'update';
|
7637
|
+
id: Id;
|
7638
|
+
rows: number;
|
7639
|
+
} : Operation extends {
|
7640
|
+
delete: {
|
7641
|
+
table: Table;
|
7642
|
+
};
|
7643
|
+
} ? {
|
7644
|
+
operation: 'delete';
|
7645
|
+
rows: number;
|
7646
|
+
} : never;
|
7647
|
+
type TransactionOperationResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = Operations extends [infer Head, ...infer Rest] ? Head extends TransactionOperation<Schema, Table> ? Rest extends TransactionOperation<Schema, Table>[] ? [TransactionOperationSingleResult<Schema, Table, Head>, ...TransactionOperationResults<Schema, Table, Rest>] : never : never : [];
|
7648
|
+
type TransactionResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = {
|
7649
|
+
results: TransactionOperationResults<Schema, Table, Operations>;
|
7650
|
+
};
|
7651
|
+
|
7652
|
+
type TransactionPluginResult<Schemas extends Record<string, XataRecord>> = {
|
7653
|
+
run: <Tables extends StringKeys<Schemas>, Operations extends TransactionOperation<Schemas, Tables>[]>(operations: Narrow<Operations>) => Promise<TransactionResults<Schemas, Tables, Operations>>;
|
7654
|
+
};
|
7655
|
+
declare class TransactionPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
7656
|
+
build({ getFetchProps }: XataPluginOptions): TransactionPluginResult<Schemas>;
|
7657
|
+
}
|
7658
|
+
|
7659
|
+
type BranchStrategyValue = string | undefined | null;
|
7660
|
+
type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
|
7661
|
+
type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
|
7662
|
+
type BranchStrategyOption = NonNullable<BranchStrategy | BranchStrategy[]>;
|
7410
7663
|
|
7411
|
-
|
7664
|
+
type BaseClientOptions = {
|
7412
7665
|
fetch?: FetchImpl;
|
7413
7666
|
apiKey?: string;
|
7414
7667
|
databaseURL?: string;
|
@@ -7416,12 +7669,14 @@ declare type BaseClientOptions = {
|
|
7416
7669
|
cache?: CacheImpl;
|
7417
7670
|
trace?: TraceFunction;
|
7418
7671
|
enableBrowser?: boolean;
|
7672
|
+
clientName?: string;
|
7419
7673
|
};
|
7420
7674
|
declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
|
7421
7675
|
interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
7422
7676
|
new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
|
7423
7677
|
db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
|
7424
7678
|
search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
|
7679
|
+
transactions: Awaited<ReturnType<TransactionPlugin<Schemas>['build']>>;
|
7425
7680
|
}, keyof Plugins> & {
|
7426
7681
|
[Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
|
7427
7682
|
} & {
|
@@ -7443,8 +7698,11 @@ declare class Serializer {
|
|
7443
7698
|
}
|
7444
7699
|
declare const serialize: <T>(data: T) => string;
|
7445
7700
|
declare const deserialize: <T>(json: string) => T;
|
7701
|
+
type SerializerResult<T> = T extends Record<string, any> ? Omit<{
|
7702
|
+
[K in keyof T]: SerializerResult<T[K]>;
|
7703
|
+
}, FunctionKeys<T>> : T;
|
7446
7704
|
|
7447
|
-
|
7705
|
+
type BranchResolutionOptions = {
|
7448
7706
|
databaseURL?: string;
|
7449
7707
|
apiKey?: string;
|
7450
7708
|
fetchImpl?: FetchImpl;
|
@@ -7475,7 +7733,7 @@ interface File extends Blob {
|
|
7475
7733
|
readonly name: string;
|
7476
7734
|
readonly webkitRelativePath: string;
|
7477
7735
|
}
|
7478
|
-
|
7736
|
+
type FormDataEntryValue = File | string;
|
7479
7737
|
/** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */
|
7480
7738
|
interface FormData {
|
7481
7739
|
append(name: string, value: string | Blob, fileName?: string): void;
|
@@ -7523,21 +7781,21 @@ interface Request extends Body {
|
|
7523
7781
|
clone(): Request;
|
7524
7782
|
}
|
7525
7783
|
|
7526
|
-
|
7784
|
+
type XataWorkerContext<XataClient> = {
|
7527
7785
|
xata: XataClient;
|
7528
7786
|
request: Request;
|
7529
7787
|
env: Record<string, string | undefined>;
|
7530
7788
|
};
|
7531
|
-
|
7532
|
-
|
7789
|
+
type RemoveFirst<T> = T extends [any, ...infer U] ? U : never;
|
7790
|
+
type WorkerRunnerConfig = {
|
7533
7791
|
workspace: string;
|
7534
7792
|
worker: string;
|
7535
7793
|
};
|
7536
|
-
declare function buildWorkerRunner<XataClient>(config: WorkerRunnerConfig): <WorkerFunction extends (ctx: XataWorkerContext<XataClient>, ...args: any[]) => any>(name: string, _worker: WorkerFunction) => (...args: RemoveFirst<Parameters<WorkerFunction>>) => Promise<Awaited<ReturnType<WorkerFunction
|
7794
|
+
declare function buildWorkerRunner<XataClient>(config: WorkerRunnerConfig): <WorkerFunction extends (ctx: XataWorkerContext<XataClient>, ...args: any[]) => any>(name: string, _worker: WorkerFunction) => (...args: RemoveFirst<Parameters<WorkerFunction>>) => Promise<SerializerResult<Awaited<ReturnType<WorkerFunction>>>>;
|
7537
7795
|
|
7538
7796
|
declare class XataError extends Error {
|
7539
7797
|
readonly status: number;
|
7540
7798
|
constructor(message: string, status: number);
|
7541
7799
|
}
|
7542
7800
|
|
7543
|
-
export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApiExtraProps, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BranchTransactionError, BranchTransactionPathParams, BranchTransactionRequestBody, BranchTransactionVariables, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DEPRECATEDcreateDatabaseError, DEPRECATEDcreateDatabasePathParams, DEPRECATEDcreateDatabaseRequestBody, DEPRECATEDcreateDatabaseResponse, DEPRECATEDcreateDatabaseVariables, DEPRECATEDdeleteDatabaseError, DEPRECATEDdeleteDatabasePathParams, DEPRECATEDdeleteDatabaseResponse, DEPRECATEDdeleteDatabaseVariables, DEPRECATEDgetDatabaseListError, DEPRECATEDgetDatabaseListPathParams, DEPRECATEDgetDatabaseListVariables, DEPRECATEDgetDatabaseMetadataError, DEPRECATEDgetDatabaseMetadataPathParams, DEPRECATEDgetDatabaseMetadataVariables, DEPRECATEDupdateDatabaseMetadataError, DEPRECATEDupdateDatabaseMetadataPathParams, DEPRECATEDupdateDatabaseMetadataRequestBody, DEPRECATEDupdateDatabaseMetadataVariables, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, branchTransaction, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, dEPRECATEDcreateDatabase, dEPRECATEDdeleteDatabase, dEPRECATEDgetDatabaseList, dEPRECATEDgetDatabaseMetadata, dEPRECATEDupdateDatabaseMetadata, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|
7801
|
+
export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApiExtraProps, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BranchTransactionError, BranchTransactionPathParams, BranchTransactionRequestBody, BranchTransactionVariables, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DEPRECATEDcreateDatabaseError, DEPRECATEDcreateDatabasePathParams, DEPRECATEDcreateDatabaseRequestBody, DEPRECATEDcreateDatabaseResponse, DEPRECATEDcreateDatabaseVariables, DEPRECATEDdeleteDatabaseError, DEPRECATEDdeleteDatabasePathParams, DEPRECATEDdeleteDatabaseResponse, DEPRECATEDdeleteDatabaseVariables, DEPRECATEDgetDatabaseListError, DEPRECATEDgetDatabaseListPathParams, DEPRECATEDgetDatabaseListVariables, DEPRECATEDgetDatabaseMetadataError, DEPRECATEDgetDatabaseMetadataPathParams, DEPRECATEDgetDatabaseMetadataVariables, DEPRECATEDupdateDatabaseMetadataError, DEPRECATEDupdateDatabaseMetadataPathParams, DEPRECATEDupdateDatabaseMetadataRequestBody, DEPRECATEDupdateDatabaseMetadataVariables, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SerializerResult, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, branchTransaction, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, dEPRECATEDcreateDatabase, dEPRECATEDdeleteDatabase, dEPRECATEDgetDatabaseList, dEPRECATEDgetDatabaseMetadata, dEPRECATEDupdateDatabaseMetadata, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|