@xata.io/client 0.21.0 → 0.21.2
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 +14 -0
- package/dist/index.cjs +29 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +603 -564
- package/dist/index.mjs +29 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -22,8 +22,8 @@ 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
27
|
name?: string;
|
28
28
|
setAttributes: (attrs: AttributeDictionary) => void;
|
29
29
|
}) => T, options?: AttributeDictionary) => Promise<T>;
|
@@ -31,19 +31,19 @@ declare type TraceFunction = <T>(name: string, fn: (options: {
|
|
31
31
|
declare abstract class XataPlugin {
|
32
32
|
abstract build(options: XataPluginOptions): unknown | Promise<unknown>;
|
33
33
|
}
|
34
|
-
|
34
|
+
type XataPluginOptions = {
|
35
35
|
getFetchProps: () => Promise<ApiExtraProps>;
|
36
36
|
cache: CacheImpl;
|
37
37
|
trace?: TraceFunction;
|
38
38
|
};
|
39
39
|
|
40
|
-
|
40
|
+
type RequestInit = {
|
41
41
|
body?: string;
|
42
42
|
headers?: Record<string, string>;
|
43
43
|
method?: string;
|
44
44
|
signal?: any;
|
45
45
|
};
|
46
|
-
|
46
|
+
type Response = {
|
47
47
|
ok: boolean;
|
48
48
|
status: number;
|
49
49
|
url: string;
|
@@ -52,10 +52,10 @@ declare type Response = {
|
|
52
52
|
get(name: string): string | null;
|
53
53
|
};
|
54
54
|
};
|
55
|
-
|
55
|
+
type FetchImpl = (url: string, init?: RequestInit) => Promise<Response>;
|
56
56
|
|
57
|
-
|
58
|
-
|
57
|
+
type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
|
58
|
+
type FetcherExtraProps = {
|
59
59
|
endpoint: 'controlPlane' | 'dataPlane';
|
60
60
|
apiUrl: string;
|
61
61
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
@@ -69,7 +69,7 @@ declare type FetcherExtraProps = {
|
|
69
69
|
fetchOptions?: Record<string, unknown>;
|
70
70
|
};
|
71
71
|
|
72
|
-
|
72
|
+
type ControlPlaneFetcherExtraProps = {
|
73
73
|
apiUrl: string;
|
74
74
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
75
75
|
fetchImpl: FetchImpl;
|
@@ -80,7 +80,7 @@ declare type ControlPlaneFetcherExtraProps = {
|
|
80
80
|
sessionID?: string;
|
81
81
|
clientName?: string;
|
82
82
|
};
|
83
|
-
|
83
|
+
type ErrorWrapper$1<TError> = TError | {
|
84
84
|
status: 'unknown';
|
85
85
|
payload: string;
|
86
86
|
};
|
@@ -90,7 +90,7 @@ declare type ErrorWrapper$1<TError> = TError | {
|
|
90
90
|
*
|
91
91
|
* @version 1.0
|
92
92
|
*/
|
93
|
-
|
93
|
+
type User = {
|
94
94
|
/**
|
95
95
|
* @format email
|
96
96
|
*/
|
@@ -101,38 +101,38 @@ declare type User = {
|
|
101
101
|
/**
|
102
102
|
* @pattern [a-zA-Z0-9_-~:]+
|
103
103
|
*/
|
104
|
-
|
105
|
-
|
104
|
+
type UserID = string;
|
105
|
+
type UserWithID = User & {
|
106
106
|
id: UserID;
|
107
107
|
};
|
108
108
|
/**
|
109
109
|
* @format date-time
|
110
110
|
* @x-go-type string
|
111
111
|
*/
|
112
|
-
|
112
|
+
type DateTime$1 = string;
|
113
113
|
/**
|
114
114
|
* @pattern [a-zA-Z0-9_\-~]*
|
115
115
|
*/
|
116
|
-
|
116
|
+
type APIKeyName = string;
|
117
117
|
/**
|
118
118
|
* @pattern ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6}
|
119
119
|
* @x-go-type auth.WorkspaceID
|
120
120
|
*/
|
121
|
-
|
121
|
+
type WorkspaceID = string;
|
122
122
|
/**
|
123
123
|
* @x-go-type auth.Role
|
124
124
|
*/
|
125
|
-
|
126
|
-
|
125
|
+
type Role = 'owner' | 'maintainer';
|
126
|
+
type WorkspaceMeta = {
|
127
127
|
name: string;
|
128
128
|
slug?: string;
|
129
129
|
};
|
130
|
-
|
130
|
+
type Workspace = WorkspaceMeta & {
|
131
131
|
id: WorkspaceID;
|
132
132
|
memberCount: number;
|
133
133
|
plan: 'free' | 'pro';
|
134
134
|
};
|
135
|
-
|
135
|
+
type WorkspaceMember = {
|
136
136
|
userId: UserID;
|
137
137
|
fullname: string;
|
138
138
|
/**
|
@@ -144,8 +144,8 @@ declare type WorkspaceMember = {
|
|
144
144
|
/**
|
145
145
|
* @pattern [a-zA-Z0-9]+
|
146
146
|
*/
|
147
|
-
|
148
|
-
|
147
|
+
type InviteID = string;
|
148
|
+
type WorkspaceInvite = {
|
149
149
|
inviteId: InviteID;
|
150
150
|
/**
|
151
151
|
* @format email
|
@@ -157,18 +157,18 @@ declare type WorkspaceInvite = {
|
|
157
157
|
expires: string;
|
158
158
|
role: Role;
|
159
159
|
};
|
160
|
-
|
160
|
+
type WorkspaceMembers = {
|
161
161
|
members: WorkspaceMember[];
|
162
162
|
invites: WorkspaceInvite[];
|
163
163
|
};
|
164
164
|
/**
|
165
165
|
* @pattern ^ik_[a-zA-Z0-9]+
|
166
166
|
*/
|
167
|
-
|
167
|
+
type InviteKey = string;
|
168
168
|
/**
|
169
169
|
* Metadata of databases
|
170
170
|
*/
|
171
|
-
|
171
|
+
type DatabaseMetadata = {
|
172
172
|
/**
|
173
173
|
* The machine-readable name of a database
|
174
174
|
*/
|
@@ -191,7 +191,7 @@ declare type DatabaseMetadata = {
|
|
191
191
|
color?: string;
|
192
192
|
};
|
193
193
|
};
|
194
|
-
|
194
|
+
type ListDatabasesResponse = {
|
195
195
|
/**
|
196
196
|
* A list of databases in a Xata workspace
|
197
197
|
*/
|
@@ -201,7 +201,7 @@ declare type ListDatabasesResponse = {
|
|
201
201
|
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
|
202
202
|
* @x-go-type xata.BranchMetadata
|
203
203
|
*/
|
204
|
-
|
204
|
+
type BranchMetadata$1 = {
|
205
205
|
/**
|
206
206
|
* @minLength 1
|
207
207
|
*/
|
@@ -216,19 +216,19 @@ declare type BranchMetadata$1 = {
|
|
216
216
|
/**
|
217
217
|
* @pattern [a-zA-Z0-9_\-~]+
|
218
218
|
*/
|
219
|
-
|
219
|
+
type BranchName$1 = string;
|
220
220
|
/**
|
221
221
|
* @pattern [a-zA-Z0-9_\-~]+
|
222
222
|
*/
|
223
|
-
|
224
|
-
|
225
|
-
|
223
|
+
type DBName$1 = string;
|
224
|
+
type MigrationStatus$1 = 'completed' | 'pending' | 'failed';
|
225
|
+
type ListRegionsResponse = {
|
226
226
|
/**
|
227
227
|
* A list of regions where databases can be created
|
228
228
|
*/
|
229
229
|
regions: Region[];
|
230
230
|
};
|
231
|
-
|
231
|
+
type Region = {
|
232
232
|
id: string;
|
233
233
|
};
|
234
234
|
|
@@ -237,18 +237,18 @@ declare type Region = {
|
|
237
237
|
*
|
238
238
|
* @version 1.0
|
239
239
|
*/
|
240
|
-
|
240
|
+
type SimpleError$1 = {
|
241
241
|
id?: string;
|
242
242
|
message: string;
|
243
243
|
};
|
244
|
-
|
244
|
+
type BadRequestError$1 = {
|
245
245
|
id?: string;
|
246
246
|
message: string;
|
247
247
|
};
|
248
248
|
/**
|
249
249
|
* @example {"message":"invalid API key"}
|
250
250
|
*/
|
251
|
-
|
251
|
+
type AuthError$1 = {
|
252
252
|
id?: string;
|
253
253
|
message: string;
|
254
254
|
};
|
@@ -259,7 +259,7 @@ declare type AuthError$1 = {
|
|
259
259
|
* @version 1.0
|
260
260
|
*/
|
261
261
|
|
262
|
-
|
262
|
+
type GetUserError = ErrorWrapper$1<{
|
263
263
|
status: 400;
|
264
264
|
payload: BadRequestError$1;
|
265
265
|
} | {
|
@@ -269,12 +269,12 @@ declare type GetUserError = ErrorWrapper$1<{
|
|
269
269
|
status: 404;
|
270
270
|
payload: SimpleError$1;
|
271
271
|
}>;
|
272
|
-
|
272
|
+
type GetUserVariables = ControlPlaneFetcherExtraProps;
|
273
273
|
/**
|
274
274
|
* Return details of the user making the request
|
275
275
|
*/
|
276
276
|
declare const getUser: (variables: GetUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
|
277
|
-
|
277
|
+
type UpdateUserError = ErrorWrapper$1<{
|
278
278
|
status: 400;
|
279
279
|
payload: BadRequestError$1;
|
280
280
|
} | {
|
@@ -284,14 +284,14 @@ declare type UpdateUserError = ErrorWrapper$1<{
|
|
284
284
|
status: 404;
|
285
285
|
payload: SimpleError$1;
|
286
286
|
}>;
|
287
|
-
|
287
|
+
type UpdateUserVariables = {
|
288
288
|
body: User;
|
289
289
|
} & ControlPlaneFetcherExtraProps;
|
290
290
|
/**
|
291
291
|
* Update user info
|
292
292
|
*/
|
293
293
|
declare const updateUser: (variables: UpdateUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
|
294
|
-
|
294
|
+
type DeleteUserError = ErrorWrapper$1<{
|
295
295
|
status: 400;
|
296
296
|
payload: BadRequestError$1;
|
297
297
|
} | {
|
@@ -301,12 +301,12 @@ declare type DeleteUserError = ErrorWrapper$1<{
|
|
301
301
|
status: 404;
|
302
302
|
payload: SimpleError$1;
|
303
303
|
}>;
|
304
|
-
|
304
|
+
type DeleteUserVariables = ControlPlaneFetcherExtraProps;
|
305
305
|
/**
|
306
306
|
* Delete the user making the request
|
307
307
|
*/
|
308
308
|
declare const deleteUser: (variables: DeleteUserVariables, signal?: AbortSignal) => Promise<undefined>;
|
309
|
-
|
309
|
+
type GetUserAPIKeysError = ErrorWrapper$1<{
|
310
310
|
status: 400;
|
311
311
|
payload: BadRequestError$1;
|
312
312
|
} | {
|
@@ -316,24 +316,24 @@ declare type GetUserAPIKeysError = ErrorWrapper$1<{
|
|
316
316
|
status: 404;
|
317
317
|
payload: SimpleError$1;
|
318
318
|
}>;
|
319
|
-
|
319
|
+
type GetUserAPIKeysResponse = {
|
320
320
|
keys: {
|
321
321
|
name: string;
|
322
322
|
createdAt: DateTime$1;
|
323
323
|
}[];
|
324
324
|
};
|
325
|
-
|
325
|
+
type GetUserAPIKeysVariables = ControlPlaneFetcherExtraProps;
|
326
326
|
/**
|
327
327
|
* Retrieve a list of existing user API keys
|
328
328
|
*/
|
329
329
|
declare const getUserAPIKeys: (variables: GetUserAPIKeysVariables, signal?: AbortSignal) => Promise<GetUserAPIKeysResponse>;
|
330
|
-
|
330
|
+
type CreateUserAPIKeyPathParams = {
|
331
331
|
/**
|
332
332
|
* API Key name
|
333
333
|
*/
|
334
334
|
keyName: APIKeyName;
|
335
335
|
};
|
336
|
-
|
336
|
+
type CreateUserAPIKeyError = ErrorWrapper$1<{
|
337
337
|
status: 400;
|
338
338
|
payload: BadRequestError$1;
|
339
339
|
} | {
|
@@ -343,25 +343,25 @@ declare type CreateUserAPIKeyError = ErrorWrapper$1<{
|
|
343
343
|
status: 404;
|
344
344
|
payload: SimpleError$1;
|
345
345
|
}>;
|
346
|
-
|
346
|
+
type CreateUserAPIKeyResponse = {
|
347
347
|
name: string;
|
348
348
|
key: string;
|
349
349
|
createdAt: DateTime$1;
|
350
350
|
};
|
351
|
-
|
351
|
+
type CreateUserAPIKeyVariables = {
|
352
352
|
pathParams: CreateUserAPIKeyPathParams;
|
353
353
|
} & ControlPlaneFetcherExtraProps;
|
354
354
|
/**
|
355
355
|
* Create and return new API key
|
356
356
|
*/
|
357
357
|
declare const createUserAPIKey: (variables: CreateUserAPIKeyVariables, signal?: AbortSignal) => Promise<CreateUserAPIKeyResponse>;
|
358
|
-
|
358
|
+
type DeleteUserAPIKeyPathParams = {
|
359
359
|
/**
|
360
360
|
* API Key name
|
361
361
|
*/
|
362
362
|
keyName: APIKeyName;
|
363
363
|
};
|
364
|
-
|
364
|
+
type DeleteUserAPIKeyError = ErrorWrapper$1<{
|
365
365
|
status: 400;
|
366
366
|
payload: BadRequestError$1;
|
367
367
|
} | {
|
@@ -371,14 +371,14 @@ declare type DeleteUserAPIKeyError = ErrorWrapper$1<{
|
|
371
371
|
status: 404;
|
372
372
|
payload: SimpleError$1;
|
373
373
|
}>;
|
374
|
-
|
374
|
+
type DeleteUserAPIKeyVariables = {
|
375
375
|
pathParams: DeleteUserAPIKeyPathParams;
|
376
376
|
} & ControlPlaneFetcherExtraProps;
|
377
377
|
/**
|
378
378
|
* Delete an existing API key
|
379
379
|
*/
|
380
380
|
declare const deleteUserAPIKey: (variables: DeleteUserAPIKeyVariables, signal?: AbortSignal) => Promise<undefined>;
|
381
|
-
|
381
|
+
type GetWorkspacesListError = ErrorWrapper$1<{
|
382
382
|
status: 400;
|
383
383
|
payload: BadRequestError$1;
|
384
384
|
} | {
|
@@ -388,7 +388,7 @@ declare type GetWorkspacesListError = ErrorWrapper$1<{
|
|
388
388
|
status: 404;
|
389
389
|
payload: SimpleError$1;
|
390
390
|
}>;
|
391
|
-
|
391
|
+
type GetWorkspacesListResponse = {
|
392
392
|
workspaces: {
|
393
393
|
id: WorkspaceID;
|
394
394
|
name: string;
|
@@ -396,12 +396,12 @@ declare type GetWorkspacesListResponse = {
|
|
396
396
|
role: Role;
|
397
397
|
}[];
|
398
398
|
};
|
399
|
-
|
399
|
+
type GetWorkspacesListVariables = ControlPlaneFetcherExtraProps;
|
400
400
|
/**
|
401
401
|
* Retrieve the list of workspaces the user belongs to
|
402
402
|
*/
|
403
403
|
declare const getWorkspacesList: (variables: GetWorkspacesListVariables, signal?: AbortSignal) => Promise<GetWorkspacesListResponse>;
|
404
|
-
|
404
|
+
type CreateWorkspaceError = ErrorWrapper$1<{
|
405
405
|
status: 400;
|
406
406
|
payload: BadRequestError$1;
|
407
407
|
} | {
|
@@ -411,53 +411,59 @@ declare type CreateWorkspaceError = ErrorWrapper$1<{
|
|
411
411
|
status: 404;
|
412
412
|
payload: SimpleError$1;
|
413
413
|
}>;
|
414
|
-
|
414
|
+
type CreateWorkspaceVariables = {
|
415
415
|
body: WorkspaceMeta;
|
416
416
|
} & ControlPlaneFetcherExtraProps;
|
417
417
|
/**
|
418
418
|
* Creates a new workspace with the user requesting it as its single owner.
|
419
419
|
*/
|
420
420
|
declare const createWorkspace: (variables: CreateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
|
421
|
-
|
421
|
+
type GetWorkspacePathParams = {
|
422
422
|
/**
|
423
423
|
* Workspace ID
|
424
424
|
*/
|
425
425
|
workspaceId: WorkspaceID;
|
426
426
|
};
|
427
|
-
|
427
|
+
type GetWorkspaceError = ErrorWrapper$1<{
|
428
428
|
status: 400;
|
429
429
|
payload: BadRequestError$1;
|
430
430
|
} | {
|
431
431
|
status: 401;
|
432
432
|
payload: AuthError$1;
|
433
|
+
} | {
|
434
|
+
status: 403;
|
435
|
+
payload: AuthError$1;
|
433
436
|
} | {
|
434
437
|
status: 404;
|
435
438
|
payload: SimpleError$1;
|
436
439
|
}>;
|
437
|
-
|
440
|
+
type GetWorkspaceVariables = {
|
438
441
|
pathParams: GetWorkspacePathParams;
|
439
442
|
} & ControlPlaneFetcherExtraProps;
|
440
443
|
/**
|
441
444
|
* Retrieve workspace info from a workspace ID
|
442
445
|
*/
|
443
446
|
declare const getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
|
444
|
-
|
447
|
+
type UpdateWorkspacePathParams = {
|
445
448
|
/**
|
446
449
|
* Workspace ID
|
447
450
|
*/
|
448
451
|
workspaceId: WorkspaceID;
|
449
452
|
};
|
450
|
-
|
453
|
+
type UpdateWorkspaceError = ErrorWrapper$1<{
|
451
454
|
status: 400;
|
452
455
|
payload: BadRequestError$1;
|
453
456
|
} | {
|
454
457
|
status: 401;
|
455
458
|
payload: AuthError$1;
|
459
|
+
} | {
|
460
|
+
status: 403;
|
461
|
+
payload: AuthError$1;
|
456
462
|
} | {
|
457
463
|
status: 404;
|
458
464
|
payload: SimpleError$1;
|
459
465
|
}>;
|
460
|
-
|
466
|
+
type UpdateWorkspaceVariables = {
|
461
467
|
body: WorkspaceMeta;
|
462
468
|
pathParams: UpdateWorkspacePathParams;
|
463
469
|
} & ControlPlaneFetcherExtraProps;
|
@@ -465,53 +471,59 @@ declare type UpdateWorkspaceVariables = {
|
|
465
471
|
* Update workspace info
|
466
472
|
*/
|
467
473
|
declare const updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal) => Promise<Workspace>;
|
468
|
-
|
474
|
+
type DeleteWorkspacePathParams = {
|
469
475
|
/**
|
470
476
|
* Workspace ID
|
471
477
|
*/
|
472
478
|
workspaceId: WorkspaceID;
|
473
479
|
};
|
474
|
-
|
480
|
+
type DeleteWorkspaceError = ErrorWrapper$1<{
|
475
481
|
status: 400;
|
476
482
|
payload: BadRequestError$1;
|
477
483
|
} | {
|
478
484
|
status: 401;
|
479
485
|
payload: AuthError$1;
|
486
|
+
} | {
|
487
|
+
status: 403;
|
488
|
+
payload: AuthError$1;
|
480
489
|
} | {
|
481
490
|
status: 404;
|
482
491
|
payload: SimpleError$1;
|
483
492
|
}>;
|
484
|
-
|
493
|
+
type DeleteWorkspaceVariables = {
|
485
494
|
pathParams: DeleteWorkspacePathParams;
|
486
495
|
} & ControlPlaneFetcherExtraProps;
|
487
496
|
/**
|
488
497
|
* Delete the workspace with the provided ID
|
489
498
|
*/
|
490
499
|
declare const deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
|
491
|
-
|
500
|
+
type GetWorkspaceMembersListPathParams = {
|
492
501
|
/**
|
493
502
|
* Workspace ID
|
494
503
|
*/
|
495
504
|
workspaceId: WorkspaceID;
|
496
505
|
};
|
497
|
-
|
506
|
+
type GetWorkspaceMembersListError = ErrorWrapper$1<{
|
498
507
|
status: 400;
|
499
508
|
payload: BadRequestError$1;
|
500
509
|
} | {
|
501
510
|
status: 401;
|
502
511
|
payload: AuthError$1;
|
512
|
+
} | {
|
513
|
+
status: 403;
|
514
|
+
payload: AuthError$1;
|
503
515
|
} | {
|
504
516
|
status: 404;
|
505
517
|
payload: SimpleError$1;
|
506
518
|
}>;
|
507
|
-
|
519
|
+
type GetWorkspaceMembersListVariables = {
|
508
520
|
pathParams: GetWorkspaceMembersListPathParams;
|
509
521
|
} & ControlPlaneFetcherExtraProps;
|
510
522
|
/**
|
511
523
|
* Retrieve the list of members of the given workspace
|
512
524
|
*/
|
513
525
|
declare const getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal) => Promise<WorkspaceMembers>;
|
514
|
-
|
526
|
+
type UpdateWorkspaceMemberRolePathParams = {
|
515
527
|
/**
|
516
528
|
* Workspace ID
|
517
529
|
*/
|
@@ -521,20 +533,23 @@ declare type UpdateWorkspaceMemberRolePathParams = {
|
|
521
533
|
*/
|
522
534
|
userId: UserID;
|
523
535
|
};
|
524
|
-
|
536
|
+
type UpdateWorkspaceMemberRoleError = ErrorWrapper$1<{
|
525
537
|
status: 400;
|
526
538
|
payload: BadRequestError$1;
|
527
539
|
} | {
|
528
540
|
status: 401;
|
529
541
|
payload: AuthError$1;
|
542
|
+
} | {
|
543
|
+
status: 403;
|
544
|
+
payload: AuthError$1;
|
530
545
|
} | {
|
531
546
|
status: 404;
|
532
547
|
payload: SimpleError$1;
|
533
548
|
}>;
|
534
|
-
|
549
|
+
type UpdateWorkspaceMemberRoleRequestBody = {
|
535
550
|
role: Role;
|
536
551
|
};
|
537
|
-
|
552
|
+
type UpdateWorkspaceMemberRoleVariables = {
|
538
553
|
body: UpdateWorkspaceMemberRoleRequestBody;
|
539
554
|
pathParams: UpdateWorkspaceMemberRolePathParams;
|
540
555
|
} & ControlPlaneFetcherExtraProps;
|
@@ -542,7 +557,7 @@ declare type UpdateWorkspaceMemberRoleVariables = {
|
|
542
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.
|
543
558
|
*/
|
544
559
|
declare const updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal) => Promise<undefined>;
|
545
|
-
|
560
|
+
type RemoveWorkspaceMemberPathParams = {
|
546
561
|
/**
|
547
562
|
* Workspace ID
|
548
563
|
*/
|
@@ -552,35 +567,41 @@ declare type RemoveWorkspaceMemberPathParams = {
|
|
552
567
|
*/
|
553
568
|
userId: UserID;
|
554
569
|
};
|
555
|
-
|
570
|
+
type RemoveWorkspaceMemberError = ErrorWrapper$1<{
|
556
571
|
status: 400;
|
557
572
|
payload: BadRequestError$1;
|
558
573
|
} | {
|
559
574
|
status: 401;
|
560
575
|
payload: AuthError$1;
|
576
|
+
} | {
|
577
|
+
status: 403;
|
578
|
+
payload: AuthError$1;
|
561
579
|
} | {
|
562
580
|
status: 404;
|
563
581
|
payload: SimpleError$1;
|
564
582
|
}>;
|
565
|
-
|
583
|
+
type RemoveWorkspaceMemberVariables = {
|
566
584
|
pathParams: RemoveWorkspaceMemberPathParams;
|
567
585
|
} & ControlPlaneFetcherExtraProps;
|
568
586
|
/**
|
569
587
|
* Remove the member from the workspace
|
570
588
|
*/
|
571
589
|
declare const removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal) => Promise<undefined>;
|
572
|
-
|
590
|
+
type InviteWorkspaceMemberPathParams = {
|
573
591
|
/**
|
574
592
|
* Workspace ID
|
575
593
|
*/
|
576
594
|
workspaceId: WorkspaceID;
|
577
595
|
};
|
578
|
-
|
596
|
+
type InviteWorkspaceMemberError = ErrorWrapper$1<{
|
579
597
|
status: 400;
|
580
598
|
payload: BadRequestError$1;
|
581
599
|
} | {
|
582
600
|
status: 401;
|
583
601
|
payload: AuthError$1;
|
602
|
+
} | {
|
603
|
+
status: 403;
|
604
|
+
payload: AuthError$1;
|
584
605
|
} | {
|
585
606
|
status: 404;
|
586
607
|
payload: SimpleError$1;
|
@@ -588,14 +609,14 @@ declare type InviteWorkspaceMemberError = ErrorWrapper$1<{
|
|
588
609
|
status: 409;
|
589
610
|
payload: SimpleError$1;
|
590
611
|
}>;
|
591
|
-
|
612
|
+
type InviteWorkspaceMemberRequestBody = {
|
592
613
|
/**
|
593
614
|
* @format email
|
594
615
|
*/
|
595
616
|
email: string;
|
596
617
|
role: Role;
|
597
618
|
};
|
598
|
-
|
619
|
+
type InviteWorkspaceMemberVariables = {
|
599
620
|
body: InviteWorkspaceMemberRequestBody;
|
600
621
|
pathParams: InviteWorkspaceMemberPathParams;
|
601
622
|
} & ControlPlaneFetcherExtraProps;
|
@@ -603,7 +624,7 @@ declare type InviteWorkspaceMemberVariables = {
|
|
603
624
|
* Invite some user to join the workspace with the given role
|
604
625
|
*/
|
605
626
|
declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
|
606
|
-
|
627
|
+
type UpdateWorkspaceMemberInvitePathParams = {
|
607
628
|
/**
|
608
629
|
* Workspace ID
|
609
630
|
*/
|
@@ -613,12 +634,15 @@ declare type UpdateWorkspaceMemberInvitePathParams = {
|
|
613
634
|
*/
|
614
635
|
inviteId: InviteID;
|
615
636
|
};
|
616
|
-
|
637
|
+
type UpdateWorkspaceMemberInviteError = ErrorWrapper$1<{
|
617
638
|
status: 400;
|
618
639
|
payload: BadRequestError$1;
|
619
640
|
} | {
|
620
641
|
status: 401;
|
621
642
|
payload: AuthError$1;
|
643
|
+
} | {
|
644
|
+
status: 403;
|
645
|
+
payload: AuthError$1;
|
622
646
|
} | {
|
623
647
|
status: 404;
|
624
648
|
payload: SimpleError$1;
|
@@ -626,10 +650,10 @@ declare type UpdateWorkspaceMemberInviteError = ErrorWrapper$1<{
|
|
626
650
|
status: 422;
|
627
651
|
payload: SimpleError$1;
|
628
652
|
}>;
|
629
|
-
|
653
|
+
type UpdateWorkspaceMemberInviteRequestBody = {
|
630
654
|
role: Role;
|
631
655
|
};
|
632
|
-
|
656
|
+
type UpdateWorkspaceMemberInviteVariables = {
|
633
657
|
body: UpdateWorkspaceMemberInviteRequestBody;
|
634
658
|
pathParams: UpdateWorkspaceMemberInvitePathParams;
|
635
659
|
} & ControlPlaneFetcherExtraProps;
|
@@ -637,7 +661,7 @@ declare type UpdateWorkspaceMemberInviteVariables = {
|
|
637
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.
|
638
662
|
*/
|
639
663
|
declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<WorkspaceInvite>;
|
640
|
-
|
664
|
+
type CancelWorkspaceMemberInvitePathParams = {
|
641
665
|
/**
|
642
666
|
* Workspace ID
|
643
667
|
*/
|
@@ -647,24 +671,27 @@ declare type CancelWorkspaceMemberInvitePathParams = {
|
|
647
671
|
*/
|
648
672
|
inviteId: InviteID;
|
649
673
|
};
|
650
|
-
|
674
|
+
type CancelWorkspaceMemberInviteError = ErrorWrapper$1<{
|
651
675
|
status: 400;
|
652
676
|
payload: BadRequestError$1;
|
653
677
|
} | {
|
654
678
|
status: 401;
|
655
679
|
payload: AuthError$1;
|
680
|
+
} | {
|
681
|
+
status: 403;
|
682
|
+
payload: AuthError$1;
|
656
683
|
} | {
|
657
684
|
status: 404;
|
658
685
|
payload: SimpleError$1;
|
659
686
|
}>;
|
660
|
-
|
687
|
+
type CancelWorkspaceMemberInviteVariables = {
|
661
688
|
pathParams: CancelWorkspaceMemberInvitePathParams;
|
662
689
|
} & ControlPlaneFetcherExtraProps;
|
663
690
|
/**
|
664
691
|
* This operation provides a way to cancel invites by deleting them. Already accepted invites cannot be deleted.
|
665
692
|
*/
|
666
693
|
declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
|
667
|
-
|
694
|
+
type AcceptWorkspaceMemberInvitePathParams = {
|
668
695
|
/**
|
669
696
|
* Workspace ID
|
670
697
|
*/
|
@@ -674,24 +701,27 @@ declare type AcceptWorkspaceMemberInvitePathParams = {
|
|
674
701
|
*/
|
675
702
|
inviteKey: InviteKey;
|
676
703
|
};
|
677
|
-
|
704
|
+
type AcceptWorkspaceMemberInviteError = ErrorWrapper$1<{
|
678
705
|
status: 400;
|
679
706
|
payload: BadRequestError$1;
|
680
707
|
} | {
|
681
708
|
status: 401;
|
682
709
|
payload: AuthError$1;
|
710
|
+
} | {
|
711
|
+
status: 403;
|
712
|
+
payload: AuthError$1;
|
683
713
|
} | {
|
684
714
|
status: 404;
|
685
715
|
payload: SimpleError$1;
|
686
716
|
}>;
|
687
|
-
|
717
|
+
type AcceptWorkspaceMemberInviteVariables = {
|
688
718
|
pathParams: AcceptWorkspaceMemberInvitePathParams;
|
689
719
|
} & ControlPlaneFetcherExtraProps;
|
690
720
|
/**
|
691
721
|
* Accept the invitation to join a workspace. If the operation succeeds the user will be a member of the workspace
|
692
722
|
*/
|
693
723
|
declare const acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
|
694
|
-
|
724
|
+
type ResendWorkspaceMemberInvitePathParams = {
|
695
725
|
/**
|
696
726
|
* Workspace ID
|
697
727
|
*/
|
@@ -701,44 +731,47 @@ declare type ResendWorkspaceMemberInvitePathParams = {
|
|
701
731
|
*/
|
702
732
|
inviteId: InviteID;
|
703
733
|
};
|
704
|
-
|
734
|
+
type ResendWorkspaceMemberInviteError = ErrorWrapper$1<{
|
705
735
|
status: 400;
|
706
736
|
payload: BadRequestError$1;
|
707
737
|
} | {
|
708
738
|
status: 401;
|
709
739
|
payload: AuthError$1;
|
740
|
+
} | {
|
741
|
+
status: 403;
|
742
|
+
payload: AuthError$1;
|
710
743
|
} | {
|
711
744
|
status: 404;
|
712
745
|
payload: SimpleError$1;
|
713
746
|
}>;
|
714
|
-
|
747
|
+
type ResendWorkspaceMemberInviteVariables = {
|
715
748
|
pathParams: ResendWorkspaceMemberInvitePathParams;
|
716
749
|
} & ControlPlaneFetcherExtraProps;
|
717
750
|
/**
|
718
751
|
* This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted.
|
719
752
|
*/
|
720
753
|
declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables, signal?: AbortSignal) => Promise<undefined>;
|
721
|
-
|
754
|
+
type GetDatabaseListPathParams = {
|
722
755
|
/**
|
723
756
|
* Workspace ID
|
724
757
|
*/
|
725
758
|
workspaceId: WorkspaceID;
|
726
759
|
};
|
727
|
-
|
760
|
+
type GetDatabaseListError = ErrorWrapper$1<{
|
728
761
|
status: 400;
|
729
762
|
payload: BadRequestError$1;
|
730
763
|
} | {
|
731
764
|
status: 401;
|
732
765
|
payload: AuthError$1;
|
733
766
|
}>;
|
734
|
-
|
767
|
+
type GetDatabaseListVariables = {
|
735
768
|
pathParams: GetDatabaseListPathParams;
|
736
769
|
} & ControlPlaneFetcherExtraProps;
|
737
770
|
/**
|
738
771
|
* List all databases available in your Workspace.
|
739
772
|
*/
|
740
773
|
declare const getDatabaseList: (variables: GetDatabaseListVariables, signal?: AbortSignal) => Promise<ListDatabasesResponse>;
|
741
|
-
|
774
|
+
type CreateDatabasePathParams = {
|
742
775
|
/**
|
743
776
|
* Workspace ID
|
744
777
|
*/
|
@@ -748,14 +781,14 @@ declare type CreateDatabasePathParams = {
|
|
748
781
|
*/
|
749
782
|
dbName: DBName$1;
|
750
783
|
};
|
751
|
-
|
784
|
+
type CreateDatabaseError = ErrorWrapper$1<{
|
752
785
|
status: 400;
|
753
786
|
payload: BadRequestError$1;
|
754
787
|
} | {
|
755
788
|
status: 401;
|
756
789
|
payload: AuthError$1;
|
757
790
|
}>;
|
758
|
-
|
791
|
+
type CreateDatabaseResponse = {
|
759
792
|
/**
|
760
793
|
* @minLength 1
|
761
794
|
*/
|
@@ -763,7 +796,7 @@ declare type CreateDatabaseResponse = {
|
|
763
796
|
branchName?: string;
|
764
797
|
status: MigrationStatus$1;
|
765
798
|
};
|
766
|
-
|
799
|
+
type CreateDatabaseRequestBody = {
|
767
800
|
/**
|
768
801
|
* @minLength 1
|
769
802
|
*/
|
@@ -777,7 +810,7 @@ declare type CreateDatabaseRequestBody = {
|
|
777
810
|
};
|
778
811
|
metadata?: BranchMetadata$1;
|
779
812
|
};
|
780
|
-
|
813
|
+
type CreateDatabaseVariables = {
|
781
814
|
body: CreateDatabaseRequestBody;
|
782
815
|
pathParams: CreateDatabasePathParams;
|
783
816
|
} & ControlPlaneFetcherExtraProps;
|
@@ -785,7 +818,7 @@ declare type CreateDatabaseVariables = {
|
|
785
818
|
* Create Database with identifier name
|
786
819
|
*/
|
787
820
|
declare const createDatabase: (variables: CreateDatabaseVariables, signal?: AbortSignal) => Promise<CreateDatabaseResponse>;
|
788
|
-
|
821
|
+
type DeleteDatabasePathParams = {
|
789
822
|
/**
|
790
823
|
* Workspace ID
|
791
824
|
*/
|
@@ -795,7 +828,7 @@ declare type DeleteDatabasePathParams = {
|
|
795
828
|
*/
|
796
829
|
dbName: DBName$1;
|
797
830
|
};
|
798
|
-
|
831
|
+
type DeleteDatabaseError = ErrorWrapper$1<{
|
799
832
|
status: 400;
|
800
833
|
payload: BadRequestError$1;
|
801
834
|
} | {
|
@@ -805,17 +838,17 @@ declare type DeleteDatabaseError = ErrorWrapper$1<{
|
|
805
838
|
status: 404;
|
806
839
|
payload: SimpleError$1;
|
807
840
|
}>;
|
808
|
-
|
841
|
+
type DeleteDatabaseResponse = {
|
809
842
|
status: MigrationStatus$1;
|
810
843
|
};
|
811
|
-
|
844
|
+
type DeleteDatabaseVariables = {
|
812
845
|
pathParams: DeleteDatabasePathParams;
|
813
846
|
} & ControlPlaneFetcherExtraProps;
|
814
847
|
/**
|
815
848
|
* Delete a database and all of its branches and tables permanently.
|
816
849
|
*/
|
817
850
|
declare const deleteDatabase: (variables: DeleteDatabaseVariables, signal?: AbortSignal) => Promise<DeleteDatabaseResponse>;
|
818
|
-
|
851
|
+
type GetDatabaseMetadataPathParams = {
|
819
852
|
/**
|
820
853
|
* Workspace ID
|
821
854
|
*/
|
@@ -825,7 +858,7 @@ declare type GetDatabaseMetadataPathParams = {
|
|
825
858
|
*/
|
826
859
|
dbName: DBName$1;
|
827
860
|
};
|
828
|
-
|
861
|
+
type GetDatabaseMetadataError = ErrorWrapper$1<{
|
829
862
|
status: 400;
|
830
863
|
payload: BadRequestError$1;
|
831
864
|
} | {
|
@@ -835,14 +868,14 @@ declare type GetDatabaseMetadataError = ErrorWrapper$1<{
|
|
835
868
|
status: 404;
|
836
869
|
payload: SimpleError$1;
|
837
870
|
}>;
|
838
|
-
|
871
|
+
type GetDatabaseMetadataVariables = {
|
839
872
|
pathParams: GetDatabaseMetadataPathParams;
|
840
873
|
} & ControlPlaneFetcherExtraProps;
|
841
874
|
/**
|
842
875
|
* Retrieve metadata of the given database
|
843
876
|
*/
|
844
877
|
declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
|
845
|
-
|
878
|
+
type UpdateDatabaseMetadataPathParams = {
|
846
879
|
/**
|
847
880
|
* Workspace ID
|
848
881
|
*/
|
@@ -852,7 +885,7 @@ declare type UpdateDatabaseMetadataPathParams = {
|
|
852
885
|
*/
|
853
886
|
dbName: DBName$1;
|
854
887
|
};
|
855
|
-
|
888
|
+
type UpdateDatabaseMetadataError = ErrorWrapper$1<{
|
856
889
|
status: 400;
|
857
890
|
payload: BadRequestError$1;
|
858
891
|
} | {
|
@@ -862,7 +895,7 @@ declare type UpdateDatabaseMetadataError = ErrorWrapper$1<{
|
|
862
895
|
status: 404;
|
863
896
|
payload: SimpleError$1;
|
864
897
|
}>;
|
865
|
-
|
898
|
+
type UpdateDatabaseMetadataRequestBody = {
|
866
899
|
ui?: {
|
867
900
|
/**
|
868
901
|
* @minLength 1
|
@@ -870,7 +903,7 @@ declare type UpdateDatabaseMetadataRequestBody = {
|
|
870
903
|
color?: string;
|
871
904
|
};
|
872
905
|
};
|
873
|
-
|
906
|
+
type UpdateDatabaseMetadataVariables = {
|
874
907
|
body?: UpdateDatabaseMetadataRequestBody;
|
875
908
|
pathParams: UpdateDatabaseMetadataPathParams;
|
876
909
|
} & ControlPlaneFetcherExtraProps;
|
@@ -878,20 +911,20 @@ declare type UpdateDatabaseMetadataVariables = {
|
|
878
911
|
* Update the color of the selected database
|
879
912
|
*/
|
880
913
|
declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DatabaseMetadata>;
|
881
|
-
|
914
|
+
type ListRegionsPathParams = {
|
882
915
|
/**
|
883
916
|
* Workspace ID
|
884
917
|
*/
|
885
918
|
workspaceId: WorkspaceID;
|
886
919
|
};
|
887
|
-
|
920
|
+
type ListRegionsError = ErrorWrapper$1<{
|
888
921
|
status: 400;
|
889
922
|
payload: BadRequestError$1;
|
890
923
|
} | {
|
891
924
|
status: 401;
|
892
925
|
payload: AuthError$1;
|
893
926
|
}>;
|
894
|
-
|
927
|
+
type ListRegionsVariables = {
|
895
928
|
pathParams: ListRegionsPathParams;
|
896
929
|
} & ControlPlaneFetcherExtraProps;
|
897
930
|
/**
|
@@ -907,7 +940,7 @@ declare const listRegions: (variables: ListRegionsVariables, signal?: AbortSigna
|
|
907
940
|
/**
|
908
941
|
* Metadata of databases
|
909
942
|
*/
|
910
|
-
|
943
|
+
type DEPRECATEDDatabaseMetadata = {
|
911
944
|
/**
|
912
945
|
* The machine-readable name of a database
|
913
946
|
*/
|
@@ -929,24 +962,28 @@ declare type DEPRECATEDDatabaseMetadata = {
|
|
929
962
|
*/
|
930
963
|
color?: string;
|
931
964
|
};
|
965
|
+
/**
|
966
|
+
* @x-internal true
|
967
|
+
*/
|
968
|
+
newMigrations?: boolean;
|
932
969
|
};
|
933
|
-
|
970
|
+
type DEPRECATEDListDatabasesResponse = {
|
934
971
|
/**
|
935
972
|
* A list of databases in a Xata workspace
|
936
973
|
*/
|
937
974
|
databases?: DEPRECATEDDatabaseMetadata[];
|
938
975
|
};
|
939
|
-
|
976
|
+
type ListBranchesResponse = {
|
940
977
|
databaseName: string;
|
941
978
|
branches: Branch[];
|
942
979
|
};
|
943
|
-
|
980
|
+
type ListGitBranchesResponse = {
|
944
981
|
mapping: {
|
945
982
|
gitBranch: string;
|
946
983
|
xataBranch: string;
|
947
984
|
}[];
|
948
985
|
};
|
949
|
-
|
986
|
+
type Branch = {
|
950
987
|
name: string;
|
951
988
|
createdAt: DateTime;
|
952
989
|
};
|
@@ -954,7 +991,7 @@ declare type Branch = {
|
|
954
991
|
* @example {"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}
|
955
992
|
* @x-go-type xata.BranchMetadata
|
956
993
|
*/
|
957
|
-
|
994
|
+
type BranchMetadata = {
|
958
995
|
/**
|
959
996
|
* @minLength 1
|
960
997
|
*/
|
@@ -966,7 +1003,7 @@ declare type BranchMetadata = {
|
|
966
1003
|
stage?: string;
|
967
1004
|
labels?: string[];
|
968
1005
|
};
|
969
|
-
|
1006
|
+
type DBBranch = {
|
970
1007
|
databaseName: DBName;
|
971
1008
|
branchName: BranchName;
|
972
1009
|
createdAt: DateTime;
|
@@ -977,7 +1014,7 @@ declare type DBBranch = {
|
|
977
1014
|
startedFrom?: StartedFromMetadata;
|
978
1015
|
schema: Schema;
|
979
1016
|
};
|
980
|
-
|
1017
|
+
type StartedFromMetadata = {
|
981
1018
|
branchName: BranchName;
|
982
1019
|
dbBranchID: string;
|
983
1020
|
migrationID: string;
|
@@ -985,22 +1022,22 @@ declare type StartedFromMetadata = {
|
|
985
1022
|
/**
|
986
1023
|
* @x-go-type xata.Schema
|
987
1024
|
*/
|
988
|
-
|
1025
|
+
type Schema = {
|
989
1026
|
tables: Table[];
|
990
1027
|
tablesOrder?: string[];
|
991
1028
|
};
|
992
|
-
|
1029
|
+
type SchemaEditScript = {
|
993
1030
|
sourceMigrationID?: string;
|
994
1031
|
targetMigrationID?: string;
|
995
1032
|
operations: MigrationOp[];
|
996
1033
|
};
|
997
|
-
|
1034
|
+
type Table = {
|
998
1035
|
id?: string;
|
999
1036
|
name: TableName;
|
1000
1037
|
columns: Column[];
|
1001
1038
|
revLinks?: RevLink[];
|
1002
1039
|
};
|
1003
|
-
|
1040
|
+
type Column = {
|
1004
1041
|
name: string;
|
1005
1042
|
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime';
|
1006
1043
|
link?: ColumnLink;
|
@@ -1009,44 +1046,44 @@ declare type Column = {
|
|
1009
1046
|
unique?: boolean;
|
1010
1047
|
columns?: Column[];
|
1011
1048
|
};
|
1012
|
-
|
1049
|
+
type ColumnLink = {
|
1013
1050
|
table: string;
|
1014
1051
|
};
|
1015
|
-
|
1052
|
+
type RevLink = {
|
1016
1053
|
linkID: string;
|
1017
1054
|
table: string;
|
1018
1055
|
};
|
1019
1056
|
/**
|
1020
1057
|
* @pattern [a-zA-Z0-9_\-~]+
|
1021
1058
|
*/
|
1022
|
-
|
1059
|
+
type BranchName = string;
|
1023
1060
|
/**
|
1024
1061
|
* @pattern [a-zA-Z0-9_\-~]+
|
1025
1062
|
*/
|
1026
|
-
|
1063
|
+
type DBName = string;
|
1027
1064
|
/**
|
1028
1065
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
1029
1066
|
*
|
1030
1067
|
* @pattern [a-zA-Z0-9_\-~]+:[a-zA-Z0-9_\-~]+
|
1031
1068
|
*/
|
1032
|
-
|
1069
|
+
type DBBranchName = string;
|
1033
1070
|
/**
|
1034
1071
|
* @pattern [a-zA-Z0-9_\-~]+
|
1035
1072
|
*/
|
1036
|
-
|
1073
|
+
type TableName = string;
|
1037
1074
|
/**
|
1038
1075
|
* @pattern [a-zA-Z0-9_\-~\.]+
|
1039
1076
|
*/
|
1040
|
-
|
1041
|
-
|
1077
|
+
type ColumnName = string;
|
1078
|
+
type MetricsDatapoint = {
|
1042
1079
|
timestamp: string;
|
1043
1080
|
value: number;
|
1044
1081
|
};
|
1045
|
-
|
1082
|
+
type MetricsLatency = {
|
1046
1083
|
p50?: MetricsDatapoint[];
|
1047
1084
|
p90?: MetricsDatapoint[];
|
1048
1085
|
};
|
1049
|
-
|
1086
|
+
type BranchMigration = {
|
1050
1087
|
id?: string;
|
1051
1088
|
parentID?: string;
|
1052
1089
|
status: string;
|
@@ -1064,7 +1101,7 @@ declare type BranchMigration = {
|
|
1064
1101
|
newTableOrder: string[];
|
1065
1102
|
renamedTables?: TableRename[];
|
1066
1103
|
};
|
1067
|
-
|
1104
|
+
type TableMigration = {
|
1068
1105
|
newColumns?: {
|
1069
1106
|
[key: string]: Column;
|
1070
1107
|
};
|
@@ -1072,11 +1109,11 @@ declare type TableMigration = {
|
|
1072
1109
|
modifiedColumns?: ColumnMigration[];
|
1073
1110
|
newColumnOrder: string[];
|
1074
1111
|
};
|
1075
|
-
|
1112
|
+
type ColumnMigration = {
|
1076
1113
|
old: Column;
|
1077
1114
|
['new']: Column;
|
1078
1115
|
};
|
1079
|
-
|
1116
|
+
type Commit = {
|
1080
1117
|
title?: string;
|
1081
1118
|
message?: string;
|
1082
1119
|
id: string;
|
@@ -1087,51 +1124,51 @@ declare type Commit = {
|
|
1087
1124
|
modifiedAt?: DateTime;
|
1088
1125
|
operations: MigrationOp[];
|
1089
1126
|
};
|
1090
|
-
|
1127
|
+
type MigrationStatus = 'completed' | 'pending' | 'failed';
|
1091
1128
|
/**
|
1092
1129
|
* Branch schema migration.
|
1093
1130
|
*/
|
1094
|
-
|
1131
|
+
type Migration = {
|
1095
1132
|
parentID?: string;
|
1096
1133
|
operations: MigrationOp[];
|
1097
1134
|
};
|
1098
1135
|
/**
|
1099
1136
|
* Branch schema migration operations.
|
1100
1137
|
*/
|
1101
|
-
|
1102
|
-
|
1138
|
+
type MigrationOp = MigrationTableOp | MigrationColumnOp;
|
1139
|
+
type MigrationTableOp = {
|
1103
1140
|
addTable: TableOpAdd;
|
1104
1141
|
} | {
|
1105
1142
|
removeTable: TableOpRemove;
|
1106
1143
|
} | {
|
1107
1144
|
renameTable: TableOpRename;
|
1108
1145
|
};
|
1109
|
-
|
1146
|
+
type MigrationColumnOp = {
|
1110
1147
|
addColumn: ColumnOpAdd;
|
1111
1148
|
} | {
|
1112
1149
|
removeColumn: ColumnOpRemove;
|
1113
1150
|
} | {
|
1114
1151
|
renameColumn: ColumnOpRename;
|
1115
1152
|
};
|
1116
|
-
|
1153
|
+
type TableOpAdd = {
|
1117
1154
|
table: string;
|
1118
1155
|
};
|
1119
|
-
|
1156
|
+
type TableOpRemove = {
|
1120
1157
|
table: string;
|
1121
1158
|
};
|
1122
|
-
|
1159
|
+
type TableOpRename = {
|
1123
1160
|
oldName: string;
|
1124
1161
|
newName: string;
|
1125
1162
|
};
|
1126
|
-
|
1163
|
+
type ColumnOpAdd = {
|
1127
1164
|
table: string;
|
1128
1165
|
column: Column;
|
1129
1166
|
};
|
1130
|
-
|
1167
|
+
type ColumnOpRemove = {
|
1131
1168
|
table: string;
|
1132
1169
|
column: string;
|
1133
1170
|
};
|
1134
|
-
|
1171
|
+
type ColumnOpRename = {
|
1135
1172
|
table: string;
|
1136
1173
|
oldName: string;
|
1137
1174
|
newName: string;
|
@@ -1142,8 +1179,8 @@ declare type ColumnOpRename = {
|
|
1142
1179
|
* @minimum 0
|
1143
1180
|
* @x-go-type migration.RequestNumber
|
1144
1181
|
*/
|
1145
|
-
|
1146
|
-
|
1182
|
+
type MigrationRequestNumber = number;
|
1183
|
+
type MigrationRequest = {
|
1147
1184
|
number?: MigrationRequestNumber;
|
1148
1185
|
/**
|
1149
1186
|
* Migration request creation timestamp.
|
@@ -1179,12 +1216,12 @@ declare type MigrationRequest = {
|
|
1179
1216
|
*/
|
1180
1217
|
target?: string;
|
1181
1218
|
};
|
1182
|
-
|
1219
|
+
type SortExpression = string[] | {
|
1183
1220
|
[key: string]: SortOrder;
|
1184
1221
|
} | {
|
1185
1222
|
[key: string]: SortOrder;
|
1186
1223
|
}[];
|
1187
|
-
|
1224
|
+
type SortOrder = 'asc' | 'desc';
|
1188
1225
|
/**
|
1189
1226
|
* Maximum [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) for the search terms. The Levenshtein
|
1190
1227
|
* distance is the number of one character changes needed to make two strings equal. The default is 1, meaning that single
|
@@ -1195,15 +1232,15 @@ declare type SortOrder = 'asc' | 'desc';
|
|
1195
1232
|
* @maximum 2
|
1196
1233
|
* @minimum 0
|
1197
1234
|
*/
|
1198
|
-
|
1235
|
+
type FuzzinessExpression = number;
|
1199
1236
|
/**
|
1200
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.
|
1201
1238
|
*/
|
1202
|
-
|
1239
|
+
type PrefixExpression = 'phrase' | 'disabled';
|
1203
1240
|
/**
|
1204
1241
|
* The target expression is used to filter the search results by the target columns.
|
1205
1242
|
*/
|
1206
|
-
|
1243
|
+
type TargetExpression = (string | {
|
1207
1244
|
/**
|
1208
1245
|
* The name of the column.
|
1209
1246
|
*/
|
@@ -1220,7 +1257,7 @@ declare type TargetExpression = (string | {
|
|
1220
1257
|
/**
|
1221
1258
|
* @minProperties 1
|
1222
1259
|
*/
|
1223
|
-
|
1260
|
+
type FilterExpression = {
|
1224
1261
|
$exists?: string;
|
1225
1262
|
$existsNot?: string;
|
1226
1263
|
$any?: FilterList;
|
@@ -1251,7 +1288,7 @@ declare type FilterExpression = {
|
|
1251
1288
|
* @example {"average_speed":{"average":"speed"}}
|
1252
1289
|
* @x-go-type xbquery.SummaryList
|
1253
1290
|
*/
|
1254
|
-
|
1291
|
+
type SummaryExpressionList = {
|
1255
1292
|
[key: string]: SummaryExpression;
|
1256
1293
|
};
|
1257
1294
|
/**
|
@@ -1288,13 +1325,13 @@ declare type SummaryExpressionList = {
|
|
1288
1325
|
* @example {"count":"deleted_at"}
|
1289
1326
|
* @x-go-type xbquery.Summary
|
1290
1327
|
*/
|
1291
|
-
|
1328
|
+
type SummaryExpression = Record<string, any>;
|
1292
1329
|
/**
|
1293
1330
|
* The description of the aggregations you wish to receive.
|
1294
1331
|
*
|
1295
1332
|
* @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d"},"aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}
|
1296
1333
|
*/
|
1297
|
-
|
1334
|
+
type AggExpressionMap = {
|
1298
1335
|
[key: string]: AggExpression;
|
1299
1336
|
};
|
1300
1337
|
/**
|
@@ -1304,7 +1341,7 @@ declare type AggExpressionMap = {
|
|
1304
1341
|
*
|
1305
1342
|
* @x-go-type xata.AggExpression
|
1306
1343
|
*/
|
1307
|
-
|
1344
|
+
type AggExpression = {
|
1308
1345
|
count?: CountAgg;
|
1309
1346
|
} | {
|
1310
1347
|
sum?: SumAgg;
|
@@ -1326,13 +1363,13 @@ declare type AggExpression = {
|
|
1326
1363
|
/**
|
1327
1364
|
* Count the number of records with an optional filter.
|
1328
1365
|
*/
|
1329
|
-
|
1366
|
+
type CountAgg = {
|
1330
1367
|
filter?: FilterExpression;
|
1331
1368
|
} | '*';
|
1332
1369
|
/**
|
1333
1370
|
* The sum of the numeric values in a particular column.
|
1334
1371
|
*/
|
1335
|
-
|
1372
|
+
type SumAgg = {
|
1336
1373
|
/**
|
1337
1374
|
* The column on which to compute the sum. Must be a numeric type.
|
1338
1375
|
*/
|
@@ -1341,7 +1378,7 @@ declare type SumAgg = {
|
|
1341
1378
|
/**
|
1342
1379
|
* The max of the numeric values in a particular column.
|
1343
1380
|
*/
|
1344
|
-
|
1381
|
+
type MaxAgg = {
|
1345
1382
|
/**
|
1346
1383
|
* The column on which to compute the max. Must be a numeric type.
|
1347
1384
|
*/
|
@@ -1350,7 +1387,7 @@ declare type MaxAgg = {
|
|
1350
1387
|
/**
|
1351
1388
|
* The min of the numeric values in a particular column.
|
1352
1389
|
*/
|
1353
|
-
|
1390
|
+
type MinAgg = {
|
1354
1391
|
/**
|
1355
1392
|
* The column on which to compute the min. Must be a numeric type.
|
1356
1393
|
*/
|
@@ -1359,7 +1396,7 @@ declare type MinAgg = {
|
|
1359
1396
|
/**
|
1360
1397
|
* The average of the numeric values in a particular column.
|
1361
1398
|
*/
|
1362
|
-
|
1399
|
+
type AverageAgg = {
|
1363
1400
|
/**
|
1364
1401
|
* The column on which to compute the average. Must be a numeric type.
|
1365
1402
|
*/
|
@@ -1368,7 +1405,7 @@ declare type AverageAgg = {
|
|
1368
1405
|
/**
|
1369
1406
|
* Count the number of distinct values in a particular column.
|
1370
1407
|
*/
|
1371
|
-
|
1408
|
+
type UniqueCountAgg = {
|
1372
1409
|
/**
|
1373
1410
|
* The column from where to count the unique values.
|
1374
1411
|
*/
|
@@ -1383,7 +1420,7 @@ declare type UniqueCountAgg = {
|
|
1383
1420
|
/**
|
1384
1421
|
* Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
|
1385
1422
|
*/
|
1386
|
-
|
1423
|
+
type DateHistogramAgg = {
|
1387
1424
|
/**
|
1388
1425
|
* The column to use for bucketing. Must be of type datetime.
|
1389
1426
|
*/
|
@@ -1414,7 +1451,7 @@ declare type DateHistogramAgg = {
|
|
1414
1451
|
* Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
|
1415
1452
|
* The top values as ordered by the number of records (`$count`) are returned.
|
1416
1453
|
*/
|
1417
|
-
|
1454
|
+
type TopValuesAgg = {
|
1418
1455
|
/**
|
1419
1456
|
* The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
|
1420
1457
|
*/
|
@@ -1431,7 +1468,7 @@ declare type TopValuesAgg = {
|
|
1431
1468
|
/**
|
1432
1469
|
* Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
|
1433
1470
|
*/
|
1434
|
-
|
1471
|
+
type NumericHistogramAgg = {
|
1435
1472
|
/**
|
1436
1473
|
* The column to use for bucketing. Must be of numeric type.
|
1437
1474
|
*/
|
@@ -1454,7 +1491,7 @@ declare type NumericHistogramAgg = {
|
|
1454
1491
|
offset?: number;
|
1455
1492
|
aggs?: AggExpressionMap;
|
1456
1493
|
};
|
1457
|
-
|
1494
|
+
type HighlightExpression = {
|
1458
1495
|
/**
|
1459
1496
|
* Set to `false` to disable highlighting. By default it is `true`.
|
1460
1497
|
*/
|
@@ -1469,7 +1506,7 @@ declare type HighlightExpression = {
|
|
1469
1506
|
*
|
1470
1507
|
* @x-go-type xata.BoosterExpression
|
1471
1508
|
*/
|
1472
|
-
|
1509
|
+
type BoosterExpression = {
|
1473
1510
|
valueBooster?: ValueBooster$1;
|
1474
1511
|
} | {
|
1475
1512
|
numericBooster?: NumericBooster$1;
|
@@ -1479,7 +1516,7 @@ declare type BoosterExpression = {
|
|
1479
1516
|
/**
|
1480
1517
|
* Boost records with a particular value for a column.
|
1481
1518
|
*/
|
1482
|
-
|
1519
|
+
type ValueBooster$1 = {
|
1483
1520
|
/**
|
1484
1521
|
* The column in which to look for the value.
|
1485
1522
|
*/
|
@@ -1500,7 +1537,7 @@ declare type ValueBooster$1 = {
|
|
1500
1537
|
/**
|
1501
1538
|
* Boost records based on the value of a numeric column.
|
1502
1539
|
*/
|
1503
|
-
|
1540
|
+
type NumericBooster$1 = {
|
1504
1541
|
/**
|
1505
1542
|
* The column in which to look for the value.
|
1506
1543
|
*/
|
@@ -1533,7 +1570,7 @@ declare type NumericBooster$1 = {
|
|
1533
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
|
1534
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.
|
1535
1572
|
*/
|
1536
|
-
|
1573
|
+
type DateBooster$1 = {
|
1537
1574
|
/**
|
1538
1575
|
* The column in which to look for the value.
|
1539
1576
|
*/
|
@@ -1558,24 +1595,24 @@ declare type DateBooster$1 = {
|
|
1558
1595
|
*/
|
1559
1596
|
ifMatchesFilter?: FilterExpression;
|
1560
1597
|
};
|
1561
|
-
|
1562
|
-
|
1598
|
+
type FilterList = FilterExpression | FilterExpression[];
|
1599
|
+
type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
|
1563
1600
|
/**
|
1564
1601
|
* @maxProperties 1
|
1565
1602
|
* @minProperties 1
|
1566
1603
|
*/
|
1567
|
-
|
1604
|
+
type FilterColumnIncludes = {
|
1568
1605
|
$includes?: FilterPredicate;
|
1569
1606
|
$includesAny?: FilterPredicate;
|
1570
1607
|
$includesAll?: FilterPredicate;
|
1571
1608
|
$includesNone?: FilterPredicate;
|
1572
1609
|
};
|
1573
|
-
|
1610
|
+
type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp;
|
1574
1611
|
/**
|
1575
1612
|
* @maxProperties 1
|
1576
1613
|
* @minProperties 1
|
1577
1614
|
*/
|
1578
|
-
|
1615
|
+
type FilterPredicateOp = {
|
1579
1616
|
$any?: FilterPredicate[];
|
1580
1617
|
$all?: FilterPredicate[];
|
1581
1618
|
$none?: FilterPredicate | FilterPredicate[];
|
@@ -1595,18 +1632,18 @@ declare type FilterPredicateOp = {
|
|
1595
1632
|
* @maxProperties 2
|
1596
1633
|
* @minProperties 2
|
1597
1634
|
*/
|
1598
|
-
|
1635
|
+
type FilterPredicateRangeOp = {
|
1599
1636
|
$lt?: FilterRangeValue;
|
1600
1637
|
$le?: FilterRangeValue;
|
1601
1638
|
$gt?: FilterRangeValue;
|
1602
1639
|
$ge?: FilterRangeValue;
|
1603
1640
|
};
|
1604
|
-
|
1605
|
-
|
1641
|
+
type FilterRangeValue = number | string;
|
1642
|
+
type FilterValue = number | string | boolean;
|
1606
1643
|
/**
|
1607
1644
|
* Pagination settings.
|
1608
1645
|
*/
|
1609
|
-
|
1646
|
+
type PageConfig = {
|
1610
1647
|
/**
|
1611
1648
|
* Query the next page that follow the cursor.
|
1612
1649
|
*/
|
@@ -1639,7 +1676,7 @@ declare type PageConfig = {
|
|
1639
1676
|
/**
|
1640
1677
|
* Pagination settings for the search endpoints.
|
1641
1678
|
*/
|
1642
|
-
|
1679
|
+
type SearchPageConfig = {
|
1643
1680
|
/**
|
1644
1681
|
* Set page size.
|
1645
1682
|
*
|
@@ -1660,11 +1697,11 @@ declare type SearchPageConfig = {
|
|
1660
1697
|
* @example email
|
1661
1698
|
* @example created_at
|
1662
1699
|
*/
|
1663
|
-
|
1700
|
+
type ColumnsProjection = string[];
|
1664
1701
|
/**
|
1665
1702
|
* Xata Table Record Metadata
|
1666
1703
|
*/
|
1667
|
-
|
1704
|
+
type RecordMeta = {
|
1668
1705
|
id: RecordID;
|
1669
1706
|
xata: {
|
1670
1707
|
/**
|
@@ -1696,11 +1733,11 @@ declare type RecordMeta = {
|
|
1696
1733
|
/**
|
1697
1734
|
* @pattern [a-zA-Z0-9_-~:]+
|
1698
1735
|
*/
|
1699
|
-
|
1736
|
+
type RecordID = string;
|
1700
1737
|
/**
|
1701
1738
|
* @example {"newName":"newName","oldName":"oldName"}
|
1702
1739
|
*/
|
1703
|
-
|
1740
|
+
type TableRename = {
|
1704
1741
|
/**
|
1705
1742
|
* @minLength 1
|
1706
1743
|
*/
|
@@ -1713,7 +1750,7 @@ declare type TableRename = {
|
|
1713
1750
|
/**
|
1714
1751
|
* Records metadata
|
1715
1752
|
*/
|
1716
|
-
|
1753
|
+
type RecordsMetadata = {
|
1717
1754
|
page: {
|
1718
1755
|
/**
|
1719
1756
|
* last record id
|
@@ -1725,7 +1762,7 @@ declare type RecordsMetadata = {
|
|
1725
1762
|
more: boolean;
|
1726
1763
|
};
|
1727
1764
|
};
|
1728
|
-
|
1765
|
+
type AggResponse$1 = (number | null) | {
|
1729
1766
|
values: ({
|
1730
1767
|
$key: string | number;
|
1731
1768
|
$count: number;
|
@@ -1736,7 +1773,7 @@ declare type AggResponse$1 = (number | null) | {
|
|
1736
1773
|
/**
|
1737
1774
|
* A transaction operation
|
1738
1775
|
*/
|
1739
|
-
|
1776
|
+
type TransactionOperation$1 = {
|
1740
1777
|
insert: TransactionInsertOp;
|
1741
1778
|
} | {
|
1742
1779
|
update: TransactionUpdateOp;
|
@@ -1746,7 +1783,7 @@ declare type TransactionOperation$1 = {
|
|
1746
1783
|
/**
|
1747
1784
|
* Insert operation
|
1748
1785
|
*/
|
1749
|
-
|
1786
|
+
type TransactionInsertOp = {
|
1750
1787
|
/**
|
1751
1788
|
* The table name
|
1752
1789
|
*/
|
@@ -1776,7 +1813,7 @@ declare type TransactionInsertOp = {
|
|
1776
1813
|
/**
|
1777
1814
|
* Update operation
|
1778
1815
|
*/
|
1779
|
-
|
1816
|
+
type TransactionUpdateOp = {
|
1780
1817
|
/**
|
1781
1818
|
* The table name
|
1782
1819
|
*/
|
@@ -1800,7 +1837,7 @@ declare type TransactionUpdateOp = {
|
|
1800
1837
|
/**
|
1801
1838
|
* A delete operation. The transaction will continue if no record matches the ID.
|
1802
1839
|
*/
|
1803
|
-
|
1840
|
+
type TransactionDeleteOp = {
|
1804
1841
|
/**
|
1805
1842
|
* The table name
|
1806
1843
|
*/
|
@@ -1810,7 +1847,7 @@ declare type TransactionDeleteOp = {
|
|
1810
1847
|
/**
|
1811
1848
|
* A result from an insert operation.
|
1812
1849
|
*/
|
1813
|
-
|
1850
|
+
type TransactionResultInsert = {
|
1814
1851
|
/**
|
1815
1852
|
* The type of operation who's result is being returned.
|
1816
1853
|
*/
|
@@ -1824,7 +1861,7 @@ declare type TransactionResultInsert = {
|
|
1824
1861
|
/**
|
1825
1862
|
* A result from an update operation.
|
1826
1863
|
*/
|
1827
|
-
|
1864
|
+
type TransactionResultUpdate = {
|
1828
1865
|
/**
|
1829
1866
|
* The type of operation who's result is being returned.
|
1830
1867
|
*/
|
@@ -1838,7 +1875,7 @@ declare type TransactionResultUpdate = {
|
|
1838
1875
|
/**
|
1839
1876
|
* A result from a delete operation.
|
1840
1877
|
*/
|
1841
|
-
|
1878
|
+
type TransactionResultDelete = {
|
1842
1879
|
/**
|
1843
1880
|
* The type of operation who's result is being returned.
|
1844
1881
|
*/
|
@@ -1853,7 +1890,7 @@ declare type TransactionResultDelete = {
|
|
1853
1890
|
*
|
1854
1891
|
* @x-go-type xata.ErrTxOp
|
1855
1892
|
*/
|
1856
|
-
|
1893
|
+
type TransactionError = {
|
1857
1894
|
/**
|
1858
1895
|
* The index of the failing operation
|
1859
1896
|
*/
|
@@ -1867,11 +1904,11 @@ declare type TransactionError = {
|
|
1867
1904
|
* @format date-time
|
1868
1905
|
* @x-go-type string
|
1869
1906
|
*/
|
1870
|
-
|
1907
|
+
type DateTime = string;
|
1871
1908
|
/**
|
1872
1909
|
* Xata Table Record Metadata
|
1873
1910
|
*/
|
1874
|
-
|
1911
|
+
type XataRecord$1 = RecordMeta & {
|
1875
1912
|
[key: string]: any;
|
1876
1913
|
};
|
1877
1914
|
|
@@ -1881,42 +1918,42 @@ declare type XataRecord$1 = RecordMeta & {
|
|
1881
1918
|
* @version 1.0
|
1882
1919
|
*/
|
1883
1920
|
|
1884
|
-
|
1921
|
+
type SimpleError = {
|
1885
1922
|
id?: string;
|
1886
1923
|
message: string;
|
1887
1924
|
};
|
1888
|
-
|
1925
|
+
type BulkError = {
|
1889
1926
|
errors: {
|
1890
1927
|
message?: string;
|
1891
1928
|
status?: number;
|
1892
1929
|
}[];
|
1893
1930
|
};
|
1894
|
-
|
1931
|
+
type BulkInsertResponse = {
|
1895
1932
|
recordIDs: string[];
|
1896
1933
|
} | {
|
1897
1934
|
records: XataRecord$1[];
|
1898
1935
|
};
|
1899
|
-
|
1936
|
+
type BranchMigrationPlan = {
|
1900
1937
|
version: number;
|
1901
1938
|
migration: BranchMigration;
|
1902
1939
|
};
|
1903
|
-
|
1904
|
-
|
1940
|
+
type RecordResponse = XataRecord$1;
|
1941
|
+
type SchemaCompareResponse = {
|
1905
1942
|
source: Schema;
|
1906
1943
|
target: Schema;
|
1907
1944
|
edits: SchemaEditScript;
|
1908
1945
|
};
|
1909
|
-
|
1946
|
+
type RecordUpdateResponse = XataRecord$1 | {
|
1910
1947
|
id: string;
|
1911
1948
|
xata: {
|
1912
1949
|
version: number;
|
1913
1950
|
};
|
1914
1951
|
};
|
1915
|
-
|
1952
|
+
type QueryResponse = {
|
1916
1953
|
records: XataRecord$1[];
|
1917
1954
|
meta: RecordsMetadata;
|
1918
1955
|
};
|
1919
|
-
|
1956
|
+
type SchemaUpdateResponse = {
|
1920
1957
|
/**
|
1921
1958
|
* @minLength 1
|
1922
1959
|
*/
|
@@ -1924,25 +1961,25 @@ declare type SchemaUpdateResponse = {
|
|
1924
1961
|
parentMigrationID: string;
|
1925
1962
|
status: MigrationStatus;
|
1926
1963
|
};
|
1927
|
-
|
1964
|
+
type SummarizeResponse = {
|
1928
1965
|
summaries: Record<string, any>[];
|
1929
1966
|
};
|
1930
1967
|
/**
|
1931
1968
|
* @example {"aggs":{"dailyUniqueUsers":{"values":[{"key":"2022-02-22T22:22:22Z","uniqueUsers":134},{"key":"2022-02-23T22:22:22Z","uniqueUsers":90}]}}}
|
1932
1969
|
*/
|
1933
|
-
|
1970
|
+
type AggResponse = {
|
1934
1971
|
aggs?: {
|
1935
1972
|
[key: string]: AggResponse$1;
|
1936
1973
|
};
|
1937
1974
|
};
|
1938
|
-
|
1975
|
+
type SearchResponse = {
|
1939
1976
|
records: XataRecord$1[];
|
1940
1977
|
warning?: string;
|
1941
1978
|
};
|
1942
1979
|
/**
|
1943
1980
|
* @x-go-type TxSuccess
|
1944
1981
|
*/
|
1945
|
-
|
1982
|
+
type TransactionSuccess = {
|
1946
1983
|
/**
|
1947
1984
|
* An ordered array of results from the submitted operations that were executed
|
1948
1985
|
*/
|
@@ -1951,25 +1988,25 @@ declare type TransactionSuccess = {
|
|
1951
1988
|
/**
|
1952
1989
|
* @x-go-type TxFailure
|
1953
1990
|
*/
|
1954
|
-
|
1991
|
+
type TransactionFailure = {
|
1955
1992
|
/**
|
1956
1993
|
* An array of errors from the submitted operations.
|
1957
1994
|
*/
|
1958
1995
|
errors: TransactionError[];
|
1959
1996
|
};
|
1960
|
-
|
1997
|
+
type BadRequestError = {
|
1961
1998
|
id?: string;
|
1962
1999
|
message: string;
|
1963
2000
|
};
|
1964
2001
|
/**
|
1965
2002
|
* @example {"message":"invalid API key"}
|
1966
2003
|
*/
|
1967
|
-
|
2004
|
+
type AuthError = {
|
1968
2005
|
id?: string;
|
1969
2006
|
message: string;
|
1970
2007
|
};
|
1971
2008
|
|
1972
|
-
|
2009
|
+
type DataPlaneFetcherExtraProps = {
|
1973
2010
|
apiUrl: string;
|
1974
2011
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
1975
2012
|
fetchImpl: FetchImpl;
|
@@ -1980,7 +2017,7 @@ declare type DataPlaneFetcherExtraProps = {
|
|
1980
2017
|
sessionID?: string;
|
1981
2018
|
clientName?: string;
|
1982
2019
|
};
|
1983
|
-
|
2020
|
+
type ErrorWrapper<TError> = TError | {
|
1984
2021
|
status: 'unknown';
|
1985
2022
|
payload: string;
|
1986
2023
|
};
|
@@ -1991,25 +2028,25 @@ declare type ErrorWrapper<TError> = TError | {
|
|
1991
2028
|
* @version 1.0
|
1992
2029
|
*/
|
1993
2030
|
|
1994
|
-
|
2031
|
+
type DEPRECATEDgetDatabaseListPathParams = {
|
1995
2032
|
workspace: string;
|
1996
2033
|
region: string;
|
1997
2034
|
};
|
1998
|
-
|
2035
|
+
type DEPRECATEDgetDatabaseListError = ErrorWrapper<{
|
1999
2036
|
status: 400;
|
2000
2037
|
payload: BadRequestError;
|
2001
2038
|
} | {
|
2002
2039
|
status: 401;
|
2003
2040
|
payload: AuthError;
|
2004
2041
|
}>;
|
2005
|
-
|
2042
|
+
type DEPRECATEDgetDatabaseListVariables = {
|
2006
2043
|
pathParams: DEPRECATEDgetDatabaseListPathParams;
|
2007
2044
|
} & DataPlaneFetcherExtraProps;
|
2008
2045
|
/**
|
2009
2046
|
* List all databases available in your Workspace.
|
2010
2047
|
*/
|
2011
2048
|
declare const dEPRECATEDgetDatabaseList: (variables: DEPRECATEDgetDatabaseListVariables, signal?: AbortSignal) => Promise<DEPRECATEDListDatabasesResponse>;
|
2012
|
-
|
2049
|
+
type GetBranchListPathParams = {
|
2013
2050
|
/**
|
2014
2051
|
* The Database Name
|
2015
2052
|
*/
|
@@ -2017,7 +2054,7 @@ declare type GetBranchListPathParams = {
|
|
2017
2054
|
workspace: string;
|
2018
2055
|
region: string;
|
2019
2056
|
};
|
2020
|
-
|
2057
|
+
type GetBranchListError = ErrorWrapper<{
|
2021
2058
|
status: 400;
|
2022
2059
|
payload: BadRequestError;
|
2023
2060
|
} | {
|
@@ -2027,14 +2064,14 @@ declare type GetBranchListError = ErrorWrapper<{
|
|
2027
2064
|
status: 404;
|
2028
2065
|
payload: SimpleError;
|
2029
2066
|
}>;
|
2030
|
-
|
2067
|
+
type GetBranchListVariables = {
|
2031
2068
|
pathParams: GetBranchListPathParams;
|
2032
2069
|
} & DataPlaneFetcherExtraProps;
|
2033
2070
|
/**
|
2034
2071
|
* List all available Branches
|
2035
2072
|
*/
|
2036
2073
|
declare const getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal) => Promise<ListBranchesResponse>;
|
2037
|
-
|
2074
|
+
type DEPRECATEDcreateDatabasePathParams = {
|
2038
2075
|
/**
|
2039
2076
|
* The Database Name
|
2040
2077
|
*/
|
@@ -2042,14 +2079,14 @@ declare type DEPRECATEDcreateDatabasePathParams = {
|
|
2042
2079
|
workspace: string;
|
2043
2080
|
region: string;
|
2044
2081
|
};
|
2045
|
-
|
2082
|
+
type DEPRECATEDcreateDatabaseError = ErrorWrapper<{
|
2046
2083
|
status: 400;
|
2047
2084
|
payload: BadRequestError;
|
2048
2085
|
} | {
|
2049
2086
|
status: 401;
|
2050
2087
|
payload: AuthError;
|
2051
2088
|
}>;
|
2052
|
-
|
2089
|
+
type DEPRECATEDcreateDatabaseResponse = {
|
2053
2090
|
/**
|
2054
2091
|
* @minLength 1
|
2055
2092
|
*/
|
@@ -2057,7 +2094,7 @@ declare type DEPRECATEDcreateDatabaseResponse = {
|
|
2057
2094
|
branchName?: string;
|
2058
2095
|
status: MigrationStatus;
|
2059
2096
|
};
|
2060
|
-
|
2097
|
+
type DEPRECATEDcreateDatabaseRequestBody = {
|
2061
2098
|
/**
|
2062
2099
|
* @minLength 1
|
2063
2100
|
*/
|
@@ -2067,7 +2104,7 @@ declare type DEPRECATEDcreateDatabaseRequestBody = {
|
|
2067
2104
|
};
|
2068
2105
|
metadata?: BranchMetadata;
|
2069
2106
|
};
|
2070
|
-
|
2107
|
+
type DEPRECATEDcreateDatabaseVariables = {
|
2071
2108
|
body?: DEPRECATEDcreateDatabaseRequestBody;
|
2072
2109
|
pathParams: DEPRECATEDcreateDatabasePathParams;
|
2073
2110
|
} & DataPlaneFetcherExtraProps;
|
@@ -2075,7 +2112,7 @@ declare type DEPRECATEDcreateDatabaseVariables = {
|
|
2075
2112
|
* Create Database with identifier name
|
2076
2113
|
*/
|
2077
2114
|
declare const dEPRECATEDcreateDatabase: (variables: DEPRECATEDcreateDatabaseVariables, signal?: AbortSignal) => Promise<DEPRECATEDcreateDatabaseResponse>;
|
2078
|
-
|
2115
|
+
type DEPRECATEDdeleteDatabasePathParams = {
|
2079
2116
|
/**
|
2080
2117
|
* The Database Name
|
2081
2118
|
*/
|
@@ -2083,7 +2120,7 @@ declare type DEPRECATEDdeleteDatabasePathParams = {
|
|
2083
2120
|
workspace: string;
|
2084
2121
|
region: string;
|
2085
2122
|
};
|
2086
|
-
|
2123
|
+
type DEPRECATEDdeleteDatabaseError = ErrorWrapper<{
|
2087
2124
|
status: 400;
|
2088
2125
|
payload: BadRequestError;
|
2089
2126
|
} | {
|
@@ -2093,17 +2130,17 @@ declare type DEPRECATEDdeleteDatabaseError = ErrorWrapper<{
|
|
2093
2130
|
status: 404;
|
2094
2131
|
payload: SimpleError;
|
2095
2132
|
}>;
|
2096
|
-
|
2133
|
+
type DEPRECATEDdeleteDatabaseResponse = {
|
2097
2134
|
status: MigrationStatus;
|
2098
2135
|
};
|
2099
|
-
|
2136
|
+
type DEPRECATEDdeleteDatabaseVariables = {
|
2100
2137
|
pathParams: DEPRECATEDdeleteDatabasePathParams;
|
2101
2138
|
} & DataPlaneFetcherExtraProps;
|
2102
2139
|
/**
|
2103
2140
|
* Delete a database and all of its branches and tables permanently.
|
2104
2141
|
*/
|
2105
2142
|
declare const dEPRECATEDdeleteDatabase: (variables: DEPRECATEDdeleteDatabaseVariables, signal?: AbortSignal) => Promise<DEPRECATEDdeleteDatabaseResponse>;
|
2106
|
-
|
2143
|
+
type DEPRECATEDgetDatabaseMetadataPathParams = {
|
2107
2144
|
/**
|
2108
2145
|
* The Database Name
|
2109
2146
|
*/
|
@@ -2111,7 +2148,7 @@ declare type DEPRECATEDgetDatabaseMetadataPathParams = {
|
|
2111
2148
|
workspace: string;
|
2112
2149
|
region: string;
|
2113
2150
|
};
|
2114
|
-
|
2151
|
+
type DEPRECATEDgetDatabaseMetadataError = ErrorWrapper<{
|
2115
2152
|
status: 400;
|
2116
2153
|
payload: BadRequestError;
|
2117
2154
|
} | {
|
@@ -2121,14 +2158,14 @@ declare type DEPRECATEDgetDatabaseMetadataError = ErrorWrapper<{
|
|
2121
2158
|
status: 404;
|
2122
2159
|
payload: SimpleError;
|
2123
2160
|
}>;
|
2124
|
-
|
2161
|
+
type DEPRECATEDgetDatabaseMetadataVariables = {
|
2125
2162
|
pathParams: DEPRECATEDgetDatabaseMetadataPathParams;
|
2126
2163
|
} & DataPlaneFetcherExtraProps;
|
2127
2164
|
/**
|
2128
2165
|
* Retrieve metadata of the given database
|
2129
2166
|
*/
|
2130
2167
|
declare const dEPRECATEDgetDatabaseMetadata: (variables: DEPRECATEDgetDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DEPRECATEDDatabaseMetadata>;
|
2131
|
-
|
2168
|
+
type DEPRECATEDupdateDatabaseMetadataPathParams = {
|
2132
2169
|
/**
|
2133
2170
|
* The Database Name
|
2134
2171
|
*/
|
@@ -2136,7 +2173,7 @@ declare type DEPRECATEDupdateDatabaseMetadataPathParams = {
|
|
2136
2173
|
workspace: string;
|
2137
2174
|
region: string;
|
2138
2175
|
};
|
2139
|
-
|
2176
|
+
type DEPRECATEDupdateDatabaseMetadataError = ErrorWrapper<{
|
2140
2177
|
status: 400;
|
2141
2178
|
payload: BadRequestError;
|
2142
2179
|
} | {
|
@@ -2146,7 +2183,7 @@ declare type DEPRECATEDupdateDatabaseMetadataError = ErrorWrapper<{
|
|
2146
2183
|
status: 404;
|
2147
2184
|
payload: SimpleError;
|
2148
2185
|
}>;
|
2149
|
-
|
2186
|
+
type DEPRECATEDupdateDatabaseMetadataRequestBody = {
|
2150
2187
|
ui?: {
|
2151
2188
|
/**
|
2152
2189
|
* @minLength 1
|
@@ -2154,7 +2191,7 @@ declare type DEPRECATEDupdateDatabaseMetadataRequestBody = {
|
|
2154
2191
|
color?: string;
|
2155
2192
|
};
|
2156
2193
|
};
|
2157
|
-
|
2194
|
+
type DEPRECATEDupdateDatabaseMetadataVariables = {
|
2158
2195
|
body?: DEPRECATEDupdateDatabaseMetadataRequestBody;
|
2159
2196
|
pathParams: DEPRECATEDupdateDatabaseMetadataPathParams;
|
2160
2197
|
} & DataPlaneFetcherExtraProps;
|
@@ -2162,7 +2199,7 @@ declare type DEPRECATEDupdateDatabaseMetadataVariables = {
|
|
2162
2199
|
* Update the color of the selected database
|
2163
2200
|
*/
|
2164
2201
|
declare const dEPRECATEDupdateDatabaseMetadata: (variables: DEPRECATEDupdateDatabaseMetadataVariables, signal?: AbortSignal) => Promise<DEPRECATEDDatabaseMetadata>;
|
2165
|
-
|
2202
|
+
type GetBranchDetailsPathParams = {
|
2166
2203
|
/**
|
2167
2204
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2168
2205
|
*/
|
@@ -2170,7 +2207,7 @@ declare type GetBranchDetailsPathParams = {
|
|
2170
2207
|
workspace: string;
|
2171
2208
|
region: string;
|
2172
2209
|
};
|
2173
|
-
|
2210
|
+
type GetBranchDetailsError = ErrorWrapper<{
|
2174
2211
|
status: 400;
|
2175
2212
|
payload: BadRequestError;
|
2176
2213
|
} | {
|
@@ -2180,11 +2217,11 @@ declare type GetBranchDetailsError = ErrorWrapper<{
|
|
2180
2217
|
status: 404;
|
2181
2218
|
payload: SimpleError;
|
2182
2219
|
}>;
|
2183
|
-
|
2220
|
+
type GetBranchDetailsVariables = {
|
2184
2221
|
pathParams: GetBranchDetailsPathParams;
|
2185
2222
|
} & DataPlaneFetcherExtraProps;
|
2186
2223
|
declare const getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal) => Promise<DBBranch>;
|
2187
|
-
|
2224
|
+
type CreateBranchPathParams = {
|
2188
2225
|
/**
|
2189
2226
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2190
2227
|
*/
|
@@ -2192,13 +2229,13 @@ declare type CreateBranchPathParams = {
|
|
2192
2229
|
workspace: string;
|
2193
2230
|
region: string;
|
2194
2231
|
};
|
2195
|
-
|
2232
|
+
type CreateBranchQueryParams = {
|
2196
2233
|
/**
|
2197
2234
|
* Name of source branch to branch the new schema from
|
2198
2235
|
*/
|
2199
2236
|
from?: string;
|
2200
2237
|
};
|
2201
|
-
|
2238
|
+
type CreateBranchError = ErrorWrapper<{
|
2202
2239
|
status: 400;
|
2203
2240
|
payload: BadRequestError;
|
2204
2241
|
} | {
|
@@ -2208,7 +2245,7 @@ declare type CreateBranchError = ErrorWrapper<{
|
|
2208
2245
|
status: 404;
|
2209
2246
|
payload: SimpleError;
|
2210
2247
|
}>;
|
2211
|
-
|
2248
|
+
type CreateBranchResponse = {
|
2212
2249
|
/**
|
2213
2250
|
* @minLength 1
|
2214
2251
|
*/
|
@@ -2216,20 +2253,20 @@ declare type CreateBranchResponse = {
|
|
2216
2253
|
branchName: string;
|
2217
2254
|
status: MigrationStatus;
|
2218
2255
|
};
|
2219
|
-
|
2256
|
+
type CreateBranchRequestBody = {
|
2220
2257
|
/**
|
2221
2258
|
* Select the branch to fork from. Defaults to 'main'
|
2222
2259
|
*/
|
2223
2260
|
from?: string;
|
2224
2261
|
metadata?: BranchMetadata;
|
2225
2262
|
};
|
2226
|
-
|
2263
|
+
type CreateBranchVariables = {
|
2227
2264
|
body?: CreateBranchRequestBody;
|
2228
2265
|
pathParams: CreateBranchPathParams;
|
2229
2266
|
queryParams?: CreateBranchQueryParams;
|
2230
2267
|
} & DataPlaneFetcherExtraProps;
|
2231
2268
|
declare const createBranch: (variables: CreateBranchVariables, signal?: AbortSignal) => Promise<CreateBranchResponse>;
|
2232
|
-
|
2269
|
+
type DeleteBranchPathParams = {
|
2233
2270
|
/**
|
2234
2271
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2235
2272
|
*/
|
@@ -2237,7 +2274,7 @@ declare type DeleteBranchPathParams = {
|
|
2237
2274
|
workspace: string;
|
2238
2275
|
region: string;
|
2239
2276
|
};
|
2240
|
-
|
2277
|
+
type DeleteBranchError = ErrorWrapper<{
|
2241
2278
|
status: 400;
|
2242
2279
|
payload: BadRequestError;
|
2243
2280
|
} | {
|
@@ -2247,17 +2284,17 @@ declare type DeleteBranchError = ErrorWrapper<{
|
|
2247
2284
|
status: 404;
|
2248
2285
|
payload: SimpleError;
|
2249
2286
|
}>;
|
2250
|
-
|
2287
|
+
type DeleteBranchResponse = {
|
2251
2288
|
status: MigrationStatus;
|
2252
2289
|
};
|
2253
|
-
|
2290
|
+
type DeleteBranchVariables = {
|
2254
2291
|
pathParams: DeleteBranchPathParams;
|
2255
2292
|
} & DataPlaneFetcherExtraProps;
|
2256
2293
|
/**
|
2257
2294
|
* Delete the branch in the database and all its resources
|
2258
2295
|
*/
|
2259
2296
|
declare const deleteBranch: (variables: DeleteBranchVariables, signal?: AbortSignal) => Promise<DeleteBranchResponse>;
|
2260
|
-
|
2297
|
+
type UpdateBranchMetadataPathParams = {
|
2261
2298
|
/**
|
2262
2299
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2263
2300
|
*/
|
@@ -2265,7 +2302,7 @@ declare type UpdateBranchMetadataPathParams = {
|
|
2265
2302
|
workspace: string;
|
2266
2303
|
region: string;
|
2267
2304
|
};
|
2268
|
-
|
2305
|
+
type UpdateBranchMetadataError = ErrorWrapper<{
|
2269
2306
|
status: 400;
|
2270
2307
|
payload: BadRequestError;
|
2271
2308
|
} | {
|
@@ -2275,7 +2312,7 @@ declare type UpdateBranchMetadataError = ErrorWrapper<{
|
|
2275
2312
|
status: 404;
|
2276
2313
|
payload: SimpleError;
|
2277
2314
|
}>;
|
2278
|
-
|
2315
|
+
type UpdateBranchMetadataVariables = {
|
2279
2316
|
body?: BranchMetadata;
|
2280
2317
|
pathParams: UpdateBranchMetadataPathParams;
|
2281
2318
|
} & DataPlaneFetcherExtraProps;
|
@@ -2283,7 +2320,7 @@ declare type UpdateBranchMetadataVariables = {
|
|
2283
2320
|
* Update the branch metadata
|
2284
2321
|
*/
|
2285
2322
|
declare const updateBranchMetadata: (variables: UpdateBranchMetadataVariables, signal?: AbortSignal) => Promise<undefined>;
|
2286
|
-
|
2323
|
+
type GetBranchMetadataPathParams = {
|
2287
2324
|
/**
|
2288
2325
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2289
2326
|
*/
|
@@ -2291,7 +2328,7 @@ declare type GetBranchMetadataPathParams = {
|
|
2291
2328
|
workspace: string;
|
2292
2329
|
region: string;
|
2293
2330
|
};
|
2294
|
-
|
2331
|
+
type GetBranchMetadataError = ErrorWrapper<{
|
2295
2332
|
status: 400;
|
2296
2333
|
payload: BadRequestError;
|
2297
2334
|
} | {
|
@@ -2301,11 +2338,11 @@ declare type GetBranchMetadataError = ErrorWrapper<{
|
|
2301
2338
|
status: 404;
|
2302
2339
|
payload: SimpleError;
|
2303
2340
|
}>;
|
2304
|
-
|
2341
|
+
type GetBranchMetadataVariables = {
|
2305
2342
|
pathParams: GetBranchMetadataPathParams;
|
2306
2343
|
} & DataPlaneFetcherExtraProps;
|
2307
2344
|
declare const getBranchMetadata: (variables: GetBranchMetadataVariables, signal?: AbortSignal) => Promise<BranchMetadata>;
|
2308
|
-
|
2345
|
+
type GetBranchStatsPathParams = {
|
2309
2346
|
/**
|
2310
2347
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2311
2348
|
*/
|
@@ -2313,7 +2350,7 @@ declare type GetBranchStatsPathParams = {
|
|
2313
2350
|
workspace: string;
|
2314
2351
|
region: string;
|
2315
2352
|
};
|
2316
|
-
|
2353
|
+
type GetBranchStatsError = ErrorWrapper<{
|
2317
2354
|
status: 400;
|
2318
2355
|
payload: SimpleError;
|
2319
2356
|
} | {
|
@@ -2323,7 +2360,7 @@ declare type GetBranchStatsError = ErrorWrapper<{
|
|
2323
2360
|
status: 404;
|
2324
2361
|
payload: SimpleError;
|
2325
2362
|
}>;
|
2326
|
-
|
2363
|
+
type GetBranchStatsResponse = {
|
2327
2364
|
timestamp: string;
|
2328
2365
|
interval: string;
|
2329
2366
|
resolution: string;
|
@@ -2334,14 +2371,14 @@ declare type GetBranchStatsResponse = {
|
|
2334
2371
|
writeLatency?: MetricsLatency;
|
2335
2372
|
warning?: string;
|
2336
2373
|
};
|
2337
|
-
|
2374
|
+
type GetBranchStatsVariables = {
|
2338
2375
|
pathParams: GetBranchStatsPathParams;
|
2339
2376
|
} & DataPlaneFetcherExtraProps;
|
2340
2377
|
/**
|
2341
2378
|
* Get branch usage metrics.
|
2342
2379
|
*/
|
2343
2380
|
declare const getBranchStats: (variables: GetBranchStatsVariables, signal?: AbortSignal) => Promise<GetBranchStatsResponse>;
|
2344
|
-
|
2381
|
+
type GetGitBranchesMappingPathParams = {
|
2345
2382
|
/**
|
2346
2383
|
* The Database Name
|
2347
2384
|
*/
|
@@ -2349,14 +2386,14 @@ declare type GetGitBranchesMappingPathParams = {
|
|
2349
2386
|
workspace: string;
|
2350
2387
|
region: string;
|
2351
2388
|
};
|
2352
|
-
|
2389
|
+
type GetGitBranchesMappingError = ErrorWrapper<{
|
2353
2390
|
status: 400;
|
2354
2391
|
payload: BadRequestError;
|
2355
2392
|
} | {
|
2356
2393
|
status: 401;
|
2357
2394
|
payload: AuthError;
|
2358
2395
|
}>;
|
2359
|
-
|
2396
|
+
type GetGitBranchesMappingVariables = {
|
2360
2397
|
pathParams: GetGitBranchesMappingPathParams;
|
2361
2398
|
} & DataPlaneFetcherExtraProps;
|
2362
2399
|
/**
|
@@ -2384,7 +2421,7 @@ declare type GetGitBranchesMappingVariables = {
|
|
2384
2421
|
* ```
|
2385
2422
|
*/
|
2386
2423
|
declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables, signal?: AbortSignal) => Promise<ListGitBranchesResponse>;
|
2387
|
-
|
2424
|
+
type AddGitBranchesEntryPathParams = {
|
2388
2425
|
/**
|
2389
2426
|
* The Database Name
|
2390
2427
|
*/
|
@@ -2392,20 +2429,20 @@ declare type AddGitBranchesEntryPathParams = {
|
|
2392
2429
|
workspace: string;
|
2393
2430
|
region: string;
|
2394
2431
|
};
|
2395
|
-
|
2432
|
+
type AddGitBranchesEntryError = ErrorWrapper<{
|
2396
2433
|
status: 400;
|
2397
2434
|
payload: BadRequestError;
|
2398
2435
|
} | {
|
2399
2436
|
status: 401;
|
2400
2437
|
payload: AuthError;
|
2401
2438
|
}>;
|
2402
|
-
|
2439
|
+
type AddGitBranchesEntryResponse = {
|
2403
2440
|
/**
|
2404
2441
|
* Warning message
|
2405
2442
|
*/
|
2406
2443
|
warning?: string;
|
2407
2444
|
};
|
2408
|
-
|
2445
|
+
type AddGitBranchesEntryRequestBody = {
|
2409
2446
|
/**
|
2410
2447
|
* The name of the Git branch.
|
2411
2448
|
*/
|
@@ -2415,7 +2452,7 @@ declare type AddGitBranchesEntryRequestBody = {
|
|
2415
2452
|
*/
|
2416
2453
|
xataBranch: BranchName;
|
2417
2454
|
};
|
2418
|
-
|
2455
|
+
type AddGitBranchesEntryVariables = {
|
2419
2456
|
body: AddGitBranchesEntryRequestBody;
|
2420
2457
|
pathParams: AddGitBranchesEntryPathParams;
|
2421
2458
|
} & DataPlaneFetcherExtraProps;
|
@@ -2435,7 +2472,7 @@ declare type AddGitBranchesEntryVariables = {
|
|
2435
2472
|
* ```
|
2436
2473
|
*/
|
2437
2474
|
declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables, signal?: AbortSignal) => Promise<AddGitBranchesEntryResponse>;
|
2438
|
-
|
2475
|
+
type RemoveGitBranchesEntryPathParams = {
|
2439
2476
|
/**
|
2440
2477
|
* The Database Name
|
2441
2478
|
*/
|
@@ -2443,20 +2480,20 @@ declare type RemoveGitBranchesEntryPathParams = {
|
|
2443
2480
|
workspace: string;
|
2444
2481
|
region: string;
|
2445
2482
|
};
|
2446
|
-
|
2483
|
+
type RemoveGitBranchesEntryQueryParams = {
|
2447
2484
|
/**
|
2448
2485
|
* The Git Branch to remove from the mapping
|
2449
2486
|
*/
|
2450
2487
|
gitBranch: string;
|
2451
2488
|
};
|
2452
|
-
|
2489
|
+
type RemoveGitBranchesEntryError = ErrorWrapper<{
|
2453
2490
|
status: 400;
|
2454
2491
|
payload: BadRequestError;
|
2455
2492
|
} | {
|
2456
2493
|
status: 401;
|
2457
2494
|
payload: AuthError;
|
2458
2495
|
}>;
|
2459
|
-
|
2496
|
+
type RemoveGitBranchesEntryVariables = {
|
2460
2497
|
pathParams: RemoveGitBranchesEntryPathParams;
|
2461
2498
|
queryParams: RemoveGitBranchesEntryQueryParams;
|
2462
2499
|
} & DataPlaneFetcherExtraProps;
|
@@ -2470,7 +2507,7 @@ declare type RemoveGitBranchesEntryVariables = {
|
|
2470
2507
|
* ```
|
2471
2508
|
*/
|
2472
2509
|
declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables, signal?: AbortSignal) => Promise<undefined>;
|
2473
|
-
|
2510
|
+
type ResolveBranchPathParams = {
|
2474
2511
|
/**
|
2475
2512
|
* The Database Name
|
2476
2513
|
*/
|
@@ -2478,7 +2515,7 @@ declare type ResolveBranchPathParams = {
|
|
2478
2515
|
workspace: string;
|
2479
2516
|
region: string;
|
2480
2517
|
};
|
2481
|
-
|
2518
|
+
type ResolveBranchQueryParams = {
|
2482
2519
|
/**
|
2483
2520
|
* The Git Branch
|
2484
2521
|
*/
|
@@ -2488,21 +2525,21 @@ declare type ResolveBranchQueryParams = {
|
|
2488
2525
|
*/
|
2489
2526
|
fallbackBranch?: string;
|
2490
2527
|
};
|
2491
|
-
|
2528
|
+
type ResolveBranchError = ErrorWrapper<{
|
2492
2529
|
status: 400;
|
2493
2530
|
payload: BadRequestError;
|
2494
2531
|
} | {
|
2495
2532
|
status: 401;
|
2496
2533
|
payload: AuthError;
|
2497
2534
|
}>;
|
2498
|
-
|
2535
|
+
type ResolveBranchResponse = {
|
2499
2536
|
branch: string;
|
2500
2537
|
reason: {
|
2501
2538
|
code: 'FOUND_IN_MAPPING' | 'BRANCH_EXISTS' | 'FALLBACK_BRANCH' | 'DEFAULT_BRANCH';
|
2502
2539
|
message: string;
|
2503
2540
|
};
|
2504
2541
|
};
|
2505
|
-
|
2542
|
+
type ResolveBranchVariables = {
|
2506
2543
|
pathParams: ResolveBranchPathParams;
|
2507
2544
|
queryParams?: ResolveBranchQueryParams;
|
2508
2545
|
} & DataPlaneFetcherExtraProps;
|
@@ -2532,7 +2569,7 @@ declare type ResolveBranchVariables = {
|
|
2532
2569
|
* ```
|
2533
2570
|
*/
|
2534
2571
|
declare const resolveBranch: (variables: ResolveBranchVariables, signal?: AbortSignal) => Promise<ResolveBranchResponse>;
|
2535
|
-
|
2572
|
+
type GetBranchMigrationHistoryPathParams = {
|
2536
2573
|
/**
|
2537
2574
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2538
2575
|
*/
|
@@ -2540,7 +2577,7 @@ declare type GetBranchMigrationHistoryPathParams = {
|
|
2540
2577
|
workspace: string;
|
2541
2578
|
region: string;
|
2542
2579
|
};
|
2543
|
-
|
2580
|
+
type GetBranchMigrationHistoryError = ErrorWrapper<{
|
2544
2581
|
status: 400;
|
2545
2582
|
payload: BadRequestError;
|
2546
2583
|
} | {
|
@@ -2550,20 +2587,20 @@ declare type GetBranchMigrationHistoryError = ErrorWrapper<{
|
|
2550
2587
|
status: 404;
|
2551
2588
|
payload: SimpleError;
|
2552
2589
|
}>;
|
2553
|
-
|
2590
|
+
type GetBranchMigrationHistoryResponse = {
|
2554
2591
|
startedFrom?: StartedFromMetadata;
|
2555
2592
|
migrations?: BranchMigration[];
|
2556
2593
|
};
|
2557
|
-
|
2594
|
+
type GetBranchMigrationHistoryRequestBody = {
|
2558
2595
|
limit?: number;
|
2559
2596
|
startFrom?: string;
|
2560
2597
|
};
|
2561
|
-
|
2598
|
+
type GetBranchMigrationHistoryVariables = {
|
2562
2599
|
body?: GetBranchMigrationHistoryRequestBody;
|
2563
2600
|
pathParams: GetBranchMigrationHistoryPathParams;
|
2564
2601
|
} & DataPlaneFetcherExtraProps;
|
2565
2602
|
declare const getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables, signal?: AbortSignal) => Promise<GetBranchMigrationHistoryResponse>;
|
2566
|
-
|
2603
|
+
type GetBranchMigrationPlanPathParams = {
|
2567
2604
|
/**
|
2568
2605
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2569
2606
|
*/
|
@@ -2571,7 +2608,7 @@ declare type GetBranchMigrationPlanPathParams = {
|
|
2571
2608
|
workspace: string;
|
2572
2609
|
region: string;
|
2573
2610
|
};
|
2574
|
-
|
2611
|
+
type GetBranchMigrationPlanError = ErrorWrapper<{
|
2575
2612
|
status: 400;
|
2576
2613
|
payload: BadRequestError;
|
2577
2614
|
} | {
|
@@ -2581,7 +2618,7 @@ declare type GetBranchMigrationPlanError = ErrorWrapper<{
|
|
2581
2618
|
status: 404;
|
2582
2619
|
payload: SimpleError;
|
2583
2620
|
}>;
|
2584
|
-
|
2621
|
+
type GetBranchMigrationPlanVariables = {
|
2585
2622
|
body: Schema;
|
2586
2623
|
pathParams: GetBranchMigrationPlanPathParams;
|
2587
2624
|
} & DataPlaneFetcherExtraProps;
|
@@ -2589,7 +2626,7 @@ declare type GetBranchMigrationPlanVariables = {
|
|
2589
2626
|
* Compute a migration plan from a target schema the branch should be migrated too.
|
2590
2627
|
*/
|
2591
2628
|
declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<BranchMigrationPlan>;
|
2592
|
-
|
2629
|
+
type ExecuteBranchMigrationPlanPathParams = {
|
2593
2630
|
/**
|
2594
2631
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2595
2632
|
*/
|
@@ -2597,7 +2634,7 @@ declare type ExecuteBranchMigrationPlanPathParams = {
|
|
2597
2634
|
workspace: string;
|
2598
2635
|
region: string;
|
2599
2636
|
};
|
2600
|
-
|
2637
|
+
type ExecuteBranchMigrationPlanError = ErrorWrapper<{
|
2601
2638
|
status: 400;
|
2602
2639
|
payload: BadRequestError;
|
2603
2640
|
} | {
|
@@ -2607,11 +2644,11 @@ declare type ExecuteBranchMigrationPlanError = ErrorWrapper<{
|
|
2607
2644
|
status: 404;
|
2608
2645
|
payload: SimpleError;
|
2609
2646
|
}>;
|
2610
|
-
|
2647
|
+
type ExecuteBranchMigrationPlanRequestBody = {
|
2611
2648
|
version: number;
|
2612
2649
|
migration: BranchMigration;
|
2613
2650
|
};
|
2614
|
-
|
2651
|
+
type ExecuteBranchMigrationPlanVariables = {
|
2615
2652
|
body: ExecuteBranchMigrationPlanRequestBody;
|
2616
2653
|
pathParams: ExecuteBranchMigrationPlanPathParams;
|
2617
2654
|
} & DataPlaneFetcherExtraProps;
|
@@ -2619,7 +2656,7 @@ declare type ExecuteBranchMigrationPlanVariables = {
|
|
2619
2656
|
* Apply a migration plan to the branch
|
2620
2657
|
*/
|
2621
2658
|
declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
2622
|
-
|
2659
|
+
type BranchTransactionPathParams = {
|
2623
2660
|
/**
|
2624
2661
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2625
2662
|
*/
|
@@ -2627,7 +2664,7 @@ declare type BranchTransactionPathParams = {
|
|
2627
2664
|
workspace: string;
|
2628
2665
|
region: string;
|
2629
2666
|
};
|
2630
|
-
|
2667
|
+
type BranchTransactionError = ErrorWrapper<{
|
2631
2668
|
status: 400;
|
2632
2669
|
payload: TransactionFailure;
|
2633
2670
|
} | {
|
@@ -2637,15 +2674,15 @@ declare type BranchTransactionError = ErrorWrapper<{
|
|
2637
2674
|
status: 404;
|
2638
2675
|
payload: SimpleError;
|
2639
2676
|
}>;
|
2640
|
-
|
2677
|
+
type BranchTransactionRequestBody = {
|
2641
2678
|
operations: TransactionOperation$1[];
|
2642
2679
|
};
|
2643
|
-
|
2680
|
+
type BranchTransactionVariables = {
|
2644
2681
|
body: BranchTransactionRequestBody;
|
2645
2682
|
pathParams: BranchTransactionPathParams;
|
2646
2683
|
} & DataPlaneFetcherExtraProps;
|
2647
2684
|
declare const branchTransaction: (variables: BranchTransactionVariables, signal?: AbortSignal) => Promise<TransactionSuccess>;
|
2648
|
-
|
2685
|
+
type QueryMigrationRequestsPathParams = {
|
2649
2686
|
/**
|
2650
2687
|
* The Database Name
|
2651
2688
|
*/
|
@@ -2653,7 +2690,7 @@ declare type QueryMigrationRequestsPathParams = {
|
|
2653
2690
|
workspace: string;
|
2654
2691
|
region: string;
|
2655
2692
|
};
|
2656
|
-
|
2693
|
+
type QueryMigrationRequestsError = ErrorWrapper<{
|
2657
2694
|
status: 400;
|
2658
2695
|
payload: BadRequestError;
|
2659
2696
|
} | {
|
@@ -2663,22 +2700,22 @@ declare type QueryMigrationRequestsError = ErrorWrapper<{
|
|
2663
2700
|
status: 404;
|
2664
2701
|
payload: SimpleError;
|
2665
2702
|
}>;
|
2666
|
-
|
2703
|
+
type QueryMigrationRequestsResponse = {
|
2667
2704
|
migrationRequests: MigrationRequest[];
|
2668
2705
|
meta: RecordsMetadata;
|
2669
2706
|
};
|
2670
|
-
|
2707
|
+
type QueryMigrationRequestsRequestBody = {
|
2671
2708
|
filter?: FilterExpression;
|
2672
2709
|
sort?: SortExpression;
|
2673
2710
|
page?: PageConfig;
|
2674
2711
|
columns?: ColumnsProjection;
|
2675
2712
|
};
|
2676
|
-
|
2713
|
+
type QueryMigrationRequestsVariables = {
|
2677
2714
|
body?: QueryMigrationRequestsRequestBody;
|
2678
2715
|
pathParams: QueryMigrationRequestsPathParams;
|
2679
2716
|
} & DataPlaneFetcherExtraProps;
|
2680
2717
|
declare const queryMigrationRequests: (variables: QueryMigrationRequestsVariables, signal?: AbortSignal) => Promise<QueryMigrationRequestsResponse>;
|
2681
|
-
|
2718
|
+
type CreateMigrationRequestPathParams = {
|
2682
2719
|
/**
|
2683
2720
|
* The Database Name
|
2684
2721
|
*/
|
@@ -2686,7 +2723,7 @@ declare type CreateMigrationRequestPathParams = {
|
|
2686
2723
|
workspace: string;
|
2687
2724
|
region: string;
|
2688
2725
|
};
|
2689
|
-
|
2726
|
+
type CreateMigrationRequestError = ErrorWrapper<{
|
2690
2727
|
status: 400;
|
2691
2728
|
payload: BadRequestError;
|
2692
2729
|
} | {
|
@@ -2696,10 +2733,10 @@ declare type CreateMigrationRequestError = ErrorWrapper<{
|
|
2696
2733
|
status: 404;
|
2697
2734
|
payload: SimpleError;
|
2698
2735
|
}>;
|
2699
|
-
|
2736
|
+
type CreateMigrationRequestResponse = {
|
2700
2737
|
number: number;
|
2701
2738
|
};
|
2702
|
-
|
2739
|
+
type CreateMigrationRequestRequestBody = {
|
2703
2740
|
/**
|
2704
2741
|
* The source branch.
|
2705
2742
|
*/
|
@@ -2717,12 +2754,12 @@ declare type CreateMigrationRequestRequestBody = {
|
|
2717
2754
|
*/
|
2718
2755
|
body?: string;
|
2719
2756
|
};
|
2720
|
-
|
2757
|
+
type CreateMigrationRequestVariables = {
|
2721
2758
|
body: CreateMigrationRequestRequestBody;
|
2722
2759
|
pathParams: CreateMigrationRequestPathParams;
|
2723
2760
|
} & DataPlaneFetcherExtraProps;
|
2724
2761
|
declare const createMigrationRequest: (variables: CreateMigrationRequestVariables, signal?: AbortSignal) => Promise<CreateMigrationRequestResponse>;
|
2725
|
-
|
2762
|
+
type GetMigrationRequestPathParams = {
|
2726
2763
|
/**
|
2727
2764
|
* The Database Name
|
2728
2765
|
*/
|
@@ -2734,7 +2771,7 @@ declare type GetMigrationRequestPathParams = {
|
|
2734
2771
|
workspace: string;
|
2735
2772
|
region: string;
|
2736
2773
|
};
|
2737
|
-
|
2774
|
+
type GetMigrationRequestError = ErrorWrapper<{
|
2738
2775
|
status: 400;
|
2739
2776
|
payload: BadRequestError;
|
2740
2777
|
} | {
|
@@ -2744,11 +2781,11 @@ declare type GetMigrationRequestError = ErrorWrapper<{
|
|
2744
2781
|
status: 404;
|
2745
2782
|
payload: SimpleError;
|
2746
2783
|
}>;
|
2747
|
-
|
2784
|
+
type GetMigrationRequestVariables = {
|
2748
2785
|
pathParams: GetMigrationRequestPathParams;
|
2749
2786
|
} & DataPlaneFetcherExtraProps;
|
2750
2787
|
declare const getMigrationRequest: (variables: GetMigrationRequestVariables, signal?: AbortSignal) => Promise<MigrationRequest>;
|
2751
|
-
|
2788
|
+
type UpdateMigrationRequestPathParams = {
|
2752
2789
|
/**
|
2753
2790
|
* The Database Name
|
2754
2791
|
*/
|
@@ -2760,7 +2797,7 @@ declare type UpdateMigrationRequestPathParams = {
|
|
2760
2797
|
workspace: string;
|
2761
2798
|
region: string;
|
2762
2799
|
};
|
2763
|
-
|
2800
|
+
type UpdateMigrationRequestError = ErrorWrapper<{
|
2764
2801
|
status: 400;
|
2765
2802
|
payload: BadRequestError;
|
2766
2803
|
} | {
|
@@ -2770,7 +2807,7 @@ declare type UpdateMigrationRequestError = ErrorWrapper<{
|
|
2770
2807
|
status: 404;
|
2771
2808
|
payload: SimpleError;
|
2772
2809
|
}>;
|
2773
|
-
|
2810
|
+
type UpdateMigrationRequestRequestBody = {
|
2774
2811
|
/**
|
2775
2812
|
* New migration request title.
|
2776
2813
|
*/
|
@@ -2784,12 +2821,12 @@ declare type UpdateMigrationRequestRequestBody = {
|
|
2784
2821
|
*/
|
2785
2822
|
status?: 'open' | 'closed';
|
2786
2823
|
};
|
2787
|
-
|
2824
|
+
type UpdateMigrationRequestVariables = {
|
2788
2825
|
body?: UpdateMigrationRequestRequestBody;
|
2789
2826
|
pathParams: UpdateMigrationRequestPathParams;
|
2790
2827
|
} & DataPlaneFetcherExtraProps;
|
2791
2828
|
declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables, signal?: AbortSignal) => Promise<undefined>;
|
2792
|
-
|
2829
|
+
type ListMigrationRequestsCommitsPathParams = {
|
2793
2830
|
/**
|
2794
2831
|
* The Database Name
|
2795
2832
|
*/
|
@@ -2801,7 +2838,7 @@ declare type ListMigrationRequestsCommitsPathParams = {
|
|
2801
2838
|
workspace: string;
|
2802
2839
|
region: string;
|
2803
2840
|
};
|
2804
|
-
|
2841
|
+
type ListMigrationRequestsCommitsError = ErrorWrapper<{
|
2805
2842
|
status: 400;
|
2806
2843
|
payload: BadRequestError;
|
2807
2844
|
} | {
|
@@ -2811,7 +2848,7 @@ declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
|
|
2811
2848
|
status: 404;
|
2812
2849
|
payload: SimpleError;
|
2813
2850
|
}>;
|
2814
|
-
|
2851
|
+
type ListMigrationRequestsCommitsResponse = {
|
2815
2852
|
meta: {
|
2816
2853
|
/**
|
2817
2854
|
* last record id
|
@@ -2824,7 +2861,7 @@ declare type ListMigrationRequestsCommitsResponse = {
|
|
2824
2861
|
};
|
2825
2862
|
logs: Commit[];
|
2826
2863
|
};
|
2827
|
-
|
2864
|
+
type ListMigrationRequestsCommitsRequestBody = {
|
2828
2865
|
page?: {
|
2829
2866
|
/**
|
2830
2867
|
* Query the next page that follow the cursor.
|
@@ -2842,12 +2879,12 @@ declare type ListMigrationRequestsCommitsRequestBody = {
|
|
2842
2879
|
size?: number;
|
2843
2880
|
};
|
2844
2881
|
};
|
2845
|
-
|
2882
|
+
type ListMigrationRequestsCommitsVariables = {
|
2846
2883
|
body?: ListMigrationRequestsCommitsRequestBody;
|
2847
2884
|
pathParams: ListMigrationRequestsCommitsPathParams;
|
2848
2885
|
} & DataPlaneFetcherExtraProps;
|
2849
2886
|
declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables, signal?: AbortSignal) => Promise<ListMigrationRequestsCommitsResponse>;
|
2850
|
-
|
2887
|
+
type CompareMigrationRequestPathParams = {
|
2851
2888
|
/**
|
2852
2889
|
* The Database Name
|
2853
2890
|
*/
|
@@ -2859,7 +2896,7 @@ declare type CompareMigrationRequestPathParams = {
|
|
2859
2896
|
workspace: string;
|
2860
2897
|
region: string;
|
2861
2898
|
};
|
2862
|
-
|
2899
|
+
type CompareMigrationRequestError = ErrorWrapper<{
|
2863
2900
|
status: 400;
|
2864
2901
|
payload: BadRequestError;
|
2865
2902
|
} | {
|
@@ -2869,11 +2906,11 @@ declare type CompareMigrationRequestError = ErrorWrapper<{
|
|
2869
2906
|
status: 404;
|
2870
2907
|
payload: SimpleError;
|
2871
2908
|
}>;
|
2872
|
-
|
2909
|
+
type CompareMigrationRequestVariables = {
|
2873
2910
|
pathParams: CompareMigrationRequestPathParams;
|
2874
2911
|
} & DataPlaneFetcherExtraProps;
|
2875
2912
|
declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
|
2876
|
-
|
2913
|
+
type GetMigrationRequestIsMergedPathParams = {
|
2877
2914
|
/**
|
2878
2915
|
* The Database Name
|
2879
2916
|
*/
|
@@ -2885,7 +2922,7 @@ declare type GetMigrationRequestIsMergedPathParams = {
|
|
2885
2922
|
workspace: string;
|
2886
2923
|
region: string;
|
2887
2924
|
};
|
2888
|
-
|
2925
|
+
type GetMigrationRequestIsMergedError = ErrorWrapper<{
|
2889
2926
|
status: 400;
|
2890
2927
|
payload: BadRequestError;
|
2891
2928
|
} | {
|
@@ -2895,14 +2932,14 @@ declare type GetMigrationRequestIsMergedError = ErrorWrapper<{
|
|
2895
2932
|
status: 404;
|
2896
2933
|
payload: SimpleError;
|
2897
2934
|
}>;
|
2898
|
-
|
2935
|
+
type GetMigrationRequestIsMergedResponse = {
|
2899
2936
|
merged?: boolean;
|
2900
2937
|
};
|
2901
|
-
|
2938
|
+
type GetMigrationRequestIsMergedVariables = {
|
2902
2939
|
pathParams: GetMigrationRequestIsMergedPathParams;
|
2903
2940
|
} & DataPlaneFetcherExtraProps;
|
2904
2941
|
declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables, signal?: AbortSignal) => Promise<GetMigrationRequestIsMergedResponse>;
|
2905
|
-
|
2942
|
+
type MergeMigrationRequestPathParams = {
|
2906
2943
|
/**
|
2907
2944
|
* The Database Name
|
2908
2945
|
*/
|
@@ -2914,7 +2951,7 @@ declare type MergeMigrationRequestPathParams = {
|
|
2914
2951
|
workspace: string;
|
2915
2952
|
region: string;
|
2916
2953
|
};
|
2917
|
-
|
2954
|
+
type MergeMigrationRequestError = ErrorWrapper<{
|
2918
2955
|
status: 400;
|
2919
2956
|
payload: BadRequestError;
|
2920
2957
|
} | {
|
@@ -2924,11 +2961,11 @@ declare type MergeMigrationRequestError = ErrorWrapper<{
|
|
2924
2961
|
status: 404;
|
2925
2962
|
payload: SimpleError;
|
2926
2963
|
}>;
|
2927
|
-
|
2964
|
+
type MergeMigrationRequestVariables = {
|
2928
2965
|
pathParams: MergeMigrationRequestPathParams;
|
2929
2966
|
} & DataPlaneFetcherExtraProps;
|
2930
2967
|
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables, signal?: AbortSignal) => Promise<Commit>;
|
2931
|
-
|
2968
|
+
type GetBranchSchemaHistoryPathParams = {
|
2932
2969
|
/**
|
2933
2970
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2934
2971
|
*/
|
@@ -2936,7 +2973,7 @@ declare type GetBranchSchemaHistoryPathParams = {
|
|
2936
2973
|
workspace: string;
|
2937
2974
|
region: string;
|
2938
2975
|
};
|
2939
|
-
|
2976
|
+
type GetBranchSchemaHistoryError = ErrorWrapper<{
|
2940
2977
|
status: 400;
|
2941
2978
|
payload: BadRequestError;
|
2942
2979
|
} | {
|
@@ -2946,7 +2983,7 @@ declare type GetBranchSchemaHistoryError = ErrorWrapper<{
|
|
2946
2983
|
status: 404;
|
2947
2984
|
payload: SimpleError;
|
2948
2985
|
}>;
|
2949
|
-
|
2986
|
+
type GetBranchSchemaHistoryResponse = {
|
2950
2987
|
meta: {
|
2951
2988
|
/**
|
2952
2989
|
* last record id
|
@@ -2959,7 +2996,7 @@ declare type GetBranchSchemaHistoryResponse = {
|
|
2959
2996
|
};
|
2960
2997
|
logs: Commit[];
|
2961
2998
|
};
|
2962
|
-
|
2999
|
+
type GetBranchSchemaHistoryRequestBody = {
|
2963
3000
|
page?: {
|
2964
3001
|
/**
|
2965
3002
|
* Query the next page that follow the cursor.
|
@@ -2977,12 +3014,12 @@ declare type GetBranchSchemaHistoryRequestBody = {
|
|
2977
3014
|
size?: number;
|
2978
3015
|
};
|
2979
3016
|
};
|
2980
|
-
|
3017
|
+
type GetBranchSchemaHistoryVariables = {
|
2981
3018
|
body?: GetBranchSchemaHistoryRequestBody;
|
2982
3019
|
pathParams: GetBranchSchemaHistoryPathParams;
|
2983
3020
|
} & DataPlaneFetcherExtraProps;
|
2984
3021
|
declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables, signal?: AbortSignal) => Promise<GetBranchSchemaHistoryResponse>;
|
2985
|
-
|
3022
|
+
type CompareBranchWithUserSchemaPathParams = {
|
2986
3023
|
/**
|
2987
3024
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2988
3025
|
*/
|
@@ -2990,7 +3027,7 @@ declare type CompareBranchWithUserSchemaPathParams = {
|
|
2990
3027
|
workspace: string;
|
2991
3028
|
region: string;
|
2992
3029
|
};
|
2993
|
-
|
3030
|
+
type CompareBranchWithUserSchemaError = ErrorWrapper<{
|
2994
3031
|
status: 400;
|
2995
3032
|
payload: BadRequestError;
|
2996
3033
|
} | {
|
@@ -3000,15 +3037,15 @@ declare type CompareBranchWithUserSchemaError = ErrorWrapper<{
|
|
3000
3037
|
status: 404;
|
3001
3038
|
payload: SimpleError;
|
3002
3039
|
}>;
|
3003
|
-
|
3040
|
+
type CompareBranchWithUserSchemaRequestBody = {
|
3004
3041
|
schema: Schema;
|
3005
3042
|
};
|
3006
|
-
|
3043
|
+
type CompareBranchWithUserSchemaVariables = {
|
3007
3044
|
body: CompareBranchWithUserSchemaRequestBody;
|
3008
3045
|
pathParams: CompareBranchWithUserSchemaPathParams;
|
3009
3046
|
} & DataPlaneFetcherExtraProps;
|
3010
3047
|
declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
|
3011
|
-
|
3048
|
+
type CompareBranchSchemasPathParams = {
|
3012
3049
|
/**
|
3013
3050
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3014
3051
|
*/
|
@@ -3020,7 +3057,7 @@ declare type CompareBranchSchemasPathParams = {
|
|
3020
3057
|
workspace: string;
|
3021
3058
|
region: string;
|
3022
3059
|
};
|
3023
|
-
|
3060
|
+
type CompareBranchSchemasError = ErrorWrapper<{
|
3024
3061
|
status: 400;
|
3025
3062
|
payload: BadRequestError;
|
3026
3063
|
} | {
|
@@ -3030,12 +3067,12 @@ declare type CompareBranchSchemasError = ErrorWrapper<{
|
|
3030
3067
|
status: 404;
|
3031
3068
|
payload: SimpleError;
|
3032
3069
|
}>;
|
3033
|
-
|
3070
|
+
type CompareBranchSchemasVariables = {
|
3034
3071
|
body?: Record<string, any>;
|
3035
3072
|
pathParams: CompareBranchSchemasPathParams;
|
3036
3073
|
} & DataPlaneFetcherExtraProps;
|
3037
3074
|
declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables, signal?: AbortSignal) => Promise<SchemaCompareResponse>;
|
3038
|
-
|
3075
|
+
type UpdateBranchSchemaPathParams = {
|
3039
3076
|
/**
|
3040
3077
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3041
3078
|
*/
|
@@ -3043,7 +3080,7 @@ declare type UpdateBranchSchemaPathParams = {
|
|
3043
3080
|
workspace: string;
|
3044
3081
|
region: string;
|
3045
3082
|
};
|
3046
|
-
|
3083
|
+
type UpdateBranchSchemaError = ErrorWrapper<{
|
3047
3084
|
status: 400;
|
3048
3085
|
payload: BadRequestError;
|
3049
3086
|
} | {
|
@@ -3053,12 +3090,12 @@ declare type UpdateBranchSchemaError = ErrorWrapper<{
|
|
3053
3090
|
status: 404;
|
3054
3091
|
payload: SimpleError;
|
3055
3092
|
}>;
|
3056
|
-
|
3093
|
+
type UpdateBranchSchemaVariables = {
|
3057
3094
|
body: Migration;
|
3058
3095
|
pathParams: UpdateBranchSchemaPathParams;
|
3059
3096
|
} & DataPlaneFetcherExtraProps;
|
3060
3097
|
declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3061
|
-
|
3098
|
+
type PreviewBranchSchemaEditPathParams = {
|
3062
3099
|
/**
|
3063
3100
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3064
3101
|
*/
|
@@ -3066,7 +3103,7 @@ declare type PreviewBranchSchemaEditPathParams = {
|
|
3066
3103
|
workspace: string;
|
3067
3104
|
region: string;
|
3068
3105
|
};
|
3069
|
-
|
3106
|
+
type PreviewBranchSchemaEditError = ErrorWrapper<{
|
3070
3107
|
status: 400;
|
3071
3108
|
payload: BadRequestError;
|
3072
3109
|
} | {
|
@@ -3076,19 +3113,19 @@ declare type PreviewBranchSchemaEditError = ErrorWrapper<{
|
|
3076
3113
|
status: 404;
|
3077
3114
|
payload: SimpleError;
|
3078
3115
|
}>;
|
3079
|
-
|
3116
|
+
type PreviewBranchSchemaEditResponse = {
|
3080
3117
|
original: Schema;
|
3081
3118
|
updated: Schema;
|
3082
3119
|
};
|
3083
|
-
|
3120
|
+
type PreviewBranchSchemaEditRequestBody = {
|
3084
3121
|
edits?: SchemaEditScript;
|
3085
3122
|
};
|
3086
|
-
|
3123
|
+
type PreviewBranchSchemaEditVariables = {
|
3087
3124
|
body?: PreviewBranchSchemaEditRequestBody;
|
3088
3125
|
pathParams: PreviewBranchSchemaEditPathParams;
|
3089
3126
|
} & DataPlaneFetcherExtraProps;
|
3090
3127
|
declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables, signal?: AbortSignal) => Promise<PreviewBranchSchemaEditResponse>;
|
3091
|
-
|
3128
|
+
type ApplyBranchSchemaEditPathParams = {
|
3092
3129
|
/**
|
3093
3130
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3094
3131
|
*/
|
@@ -3096,7 +3133,7 @@ declare type ApplyBranchSchemaEditPathParams = {
|
|
3096
3133
|
workspace: string;
|
3097
3134
|
region: string;
|
3098
3135
|
};
|
3099
|
-
|
3136
|
+
type ApplyBranchSchemaEditError = ErrorWrapper<{
|
3100
3137
|
status: 400;
|
3101
3138
|
payload: BadRequestError;
|
3102
3139
|
} | {
|
@@ -3106,15 +3143,15 @@ declare type ApplyBranchSchemaEditError = ErrorWrapper<{
|
|
3106
3143
|
status: 404;
|
3107
3144
|
payload: SimpleError;
|
3108
3145
|
}>;
|
3109
|
-
|
3146
|
+
type ApplyBranchSchemaEditRequestBody = {
|
3110
3147
|
edits: SchemaEditScript;
|
3111
3148
|
};
|
3112
|
-
|
3149
|
+
type ApplyBranchSchemaEditVariables = {
|
3113
3150
|
body: ApplyBranchSchemaEditRequestBody;
|
3114
3151
|
pathParams: ApplyBranchSchemaEditPathParams;
|
3115
3152
|
} & DataPlaneFetcherExtraProps;
|
3116
3153
|
declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3117
|
-
|
3154
|
+
type CreateTablePathParams = {
|
3118
3155
|
/**
|
3119
3156
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3120
3157
|
*/
|
@@ -3126,7 +3163,7 @@ declare type CreateTablePathParams = {
|
|
3126
3163
|
workspace: string;
|
3127
3164
|
region: string;
|
3128
3165
|
};
|
3129
|
-
|
3166
|
+
type CreateTableError = ErrorWrapper<{
|
3130
3167
|
status: 400;
|
3131
3168
|
payload: BadRequestError;
|
3132
3169
|
} | {
|
@@ -3139,7 +3176,7 @@ declare type CreateTableError = ErrorWrapper<{
|
|
3139
3176
|
status: 422;
|
3140
3177
|
payload: SimpleError;
|
3141
3178
|
}>;
|
3142
|
-
|
3179
|
+
type CreateTableResponse = {
|
3143
3180
|
branchName: string;
|
3144
3181
|
/**
|
3145
3182
|
* @minLength 1
|
@@ -3147,14 +3184,14 @@ declare type CreateTableResponse = {
|
|
3147
3184
|
tableName: string;
|
3148
3185
|
status: MigrationStatus;
|
3149
3186
|
};
|
3150
|
-
|
3187
|
+
type CreateTableVariables = {
|
3151
3188
|
pathParams: CreateTablePathParams;
|
3152
3189
|
} & DataPlaneFetcherExtraProps;
|
3153
3190
|
/**
|
3154
3191
|
* Creates a new table with the given name. Returns 422 if a table with the same name already exists.
|
3155
3192
|
*/
|
3156
3193
|
declare const createTable: (variables: CreateTableVariables, signal?: AbortSignal) => Promise<CreateTableResponse>;
|
3157
|
-
|
3194
|
+
type DeleteTablePathParams = {
|
3158
3195
|
/**
|
3159
3196
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3160
3197
|
*/
|
@@ -3166,24 +3203,24 @@ declare type DeleteTablePathParams = {
|
|
3166
3203
|
workspace: string;
|
3167
3204
|
region: string;
|
3168
3205
|
};
|
3169
|
-
|
3206
|
+
type DeleteTableError = ErrorWrapper<{
|
3170
3207
|
status: 400;
|
3171
3208
|
payload: BadRequestError;
|
3172
3209
|
} | {
|
3173
3210
|
status: 401;
|
3174
3211
|
payload: AuthError;
|
3175
3212
|
}>;
|
3176
|
-
|
3213
|
+
type DeleteTableResponse = {
|
3177
3214
|
status: MigrationStatus;
|
3178
3215
|
};
|
3179
|
-
|
3216
|
+
type DeleteTableVariables = {
|
3180
3217
|
pathParams: DeleteTablePathParams;
|
3181
3218
|
} & DataPlaneFetcherExtraProps;
|
3182
3219
|
/**
|
3183
3220
|
* Deletes the table with the given name.
|
3184
3221
|
*/
|
3185
3222
|
declare const deleteTable: (variables: DeleteTableVariables, signal?: AbortSignal) => Promise<DeleteTableResponse>;
|
3186
|
-
|
3223
|
+
type UpdateTablePathParams = {
|
3187
3224
|
/**
|
3188
3225
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3189
3226
|
*/
|
@@ -3195,7 +3232,7 @@ declare type UpdateTablePathParams = {
|
|
3195
3232
|
workspace: string;
|
3196
3233
|
region: string;
|
3197
3234
|
};
|
3198
|
-
|
3235
|
+
type UpdateTableError = ErrorWrapper<{
|
3199
3236
|
status: 400;
|
3200
3237
|
payload: BadRequestError;
|
3201
3238
|
} | {
|
@@ -3205,13 +3242,13 @@ declare type UpdateTableError = ErrorWrapper<{
|
|
3205
3242
|
status: 404;
|
3206
3243
|
payload: SimpleError;
|
3207
3244
|
}>;
|
3208
|
-
|
3245
|
+
type UpdateTableRequestBody = {
|
3209
3246
|
/**
|
3210
3247
|
* @minLength 1
|
3211
3248
|
*/
|
3212
3249
|
name: string;
|
3213
3250
|
};
|
3214
|
-
|
3251
|
+
type UpdateTableVariables = {
|
3215
3252
|
body: UpdateTableRequestBody;
|
3216
3253
|
pathParams: UpdateTablePathParams;
|
3217
3254
|
} & DataPlaneFetcherExtraProps;
|
@@ -3229,7 +3266,7 @@ declare type UpdateTableVariables = {
|
|
3229
3266
|
* ```
|
3230
3267
|
*/
|
3231
3268
|
declare const updateTable: (variables: UpdateTableVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3232
|
-
|
3269
|
+
type GetTableSchemaPathParams = {
|
3233
3270
|
/**
|
3234
3271
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3235
3272
|
*/
|
@@ -3241,7 +3278,7 @@ declare type GetTableSchemaPathParams = {
|
|
3241
3278
|
workspace: string;
|
3242
3279
|
region: string;
|
3243
3280
|
};
|
3244
|
-
|
3281
|
+
type GetTableSchemaError = ErrorWrapper<{
|
3245
3282
|
status: 400;
|
3246
3283
|
payload: BadRequestError;
|
3247
3284
|
} | {
|
@@ -3251,14 +3288,14 @@ declare type GetTableSchemaError = ErrorWrapper<{
|
|
3251
3288
|
status: 404;
|
3252
3289
|
payload: SimpleError;
|
3253
3290
|
}>;
|
3254
|
-
|
3291
|
+
type GetTableSchemaResponse = {
|
3255
3292
|
columns: Column[];
|
3256
3293
|
};
|
3257
|
-
|
3294
|
+
type GetTableSchemaVariables = {
|
3258
3295
|
pathParams: GetTableSchemaPathParams;
|
3259
3296
|
} & DataPlaneFetcherExtraProps;
|
3260
3297
|
declare const getTableSchema: (variables: GetTableSchemaVariables, signal?: AbortSignal) => Promise<GetTableSchemaResponse>;
|
3261
|
-
|
3298
|
+
type SetTableSchemaPathParams = {
|
3262
3299
|
/**
|
3263
3300
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3264
3301
|
*/
|
@@ -3270,7 +3307,7 @@ declare type SetTableSchemaPathParams = {
|
|
3270
3307
|
workspace: string;
|
3271
3308
|
region: string;
|
3272
3309
|
};
|
3273
|
-
|
3310
|
+
type SetTableSchemaError = ErrorWrapper<{
|
3274
3311
|
status: 400;
|
3275
3312
|
payload: BadRequestError;
|
3276
3313
|
} | {
|
@@ -3283,15 +3320,15 @@ declare type SetTableSchemaError = ErrorWrapper<{
|
|
3283
3320
|
status: 409;
|
3284
3321
|
payload: SimpleError;
|
3285
3322
|
}>;
|
3286
|
-
|
3323
|
+
type SetTableSchemaRequestBody = {
|
3287
3324
|
columns: Column[];
|
3288
3325
|
};
|
3289
|
-
|
3326
|
+
type SetTableSchemaVariables = {
|
3290
3327
|
body: SetTableSchemaRequestBody;
|
3291
3328
|
pathParams: SetTableSchemaPathParams;
|
3292
3329
|
} & DataPlaneFetcherExtraProps;
|
3293
3330
|
declare const setTableSchema: (variables: SetTableSchemaVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3294
|
-
|
3331
|
+
type GetTableColumnsPathParams = {
|
3295
3332
|
/**
|
3296
3333
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3297
3334
|
*/
|
@@ -3303,7 +3340,7 @@ declare type GetTableColumnsPathParams = {
|
|
3303
3340
|
workspace: string;
|
3304
3341
|
region: string;
|
3305
3342
|
};
|
3306
|
-
|
3343
|
+
type GetTableColumnsError = ErrorWrapper<{
|
3307
3344
|
status: 400;
|
3308
3345
|
payload: BadRequestError;
|
3309
3346
|
} | {
|
@@ -3313,10 +3350,10 @@ declare type GetTableColumnsError = ErrorWrapper<{
|
|
3313
3350
|
status: 404;
|
3314
3351
|
payload: SimpleError;
|
3315
3352
|
}>;
|
3316
|
-
|
3353
|
+
type GetTableColumnsResponse = {
|
3317
3354
|
columns: Column[];
|
3318
3355
|
};
|
3319
|
-
|
3356
|
+
type GetTableColumnsVariables = {
|
3320
3357
|
pathParams: GetTableColumnsPathParams;
|
3321
3358
|
} & DataPlaneFetcherExtraProps;
|
3322
3359
|
/**
|
@@ -3324,7 +3361,7 @@ declare type GetTableColumnsVariables = {
|
|
3324
3361
|
* full dot-separated path (flattened).
|
3325
3362
|
*/
|
3326
3363
|
declare const getTableColumns: (variables: GetTableColumnsVariables, signal?: AbortSignal) => Promise<GetTableColumnsResponse>;
|
3327
|
-
|
3364
|
+
type AddTableColumnPathParams = {
|
3328
3365
|
/**
|
3329
3366
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3330
3367
|
*/
|
@@ -3336,7 +3373,7 @@ declare type AddTableColumnPathParams = {
|
|
3336
3373
|
workspace: string;
|
3337
3374
|
region: string;
|
3338
3375
|
};
|
3339
|
-
|
3376
|
+
type AddTableColumnError = ErrorWrapper<{
|
3340
3377
|
status: 400;
|
3341
3378
|
payload: BadRequestError;
|
3342
3379
|
} | {
|
@@ -3346,7 +3383,7 @@ declare type AddTableColumnError = ErrorWrapper<{
|
|
3346
3383
|
status: 404;
|
3347
3384
|
payload: SimpleError;
|
3348
3385
|
}>;
|
3349
|
-
|
3386
|
+
type AddTableColumnVariables = {
|
3350
3387
|
body: Column;
|
3351
3388
|
pathParams: AddTableColumnPathParams;
|
3352
3389
|
} & DataPlaneFetcherExtraProps;
|
@@ -3356,7 +3393,7 @@ declare type AddTableColumnVariables = {
|
|
3356
3393
|
* passing `"name": "address.city"` will auto-create the `address` object if it doesn't exist.
|
3357
3394
|
*/
|
3358
3395
|
declare const addTableColumn: (variables: AddTableColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3359
|
-
|
3396
|
+
type GetColumnPathParams = {
|
3360
3397
|
/**
|
3361
3398
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3362
3399
|
*/
|
@@ -3372,7 +3409,7 @@ declare type GetColumnPathParams = {
|
|
3372
3409
|
workspace: string;
|
3373
3410
|
region: string;
|
3374
3411
|
};
|
3375
|
-
|
3412
|
+
type GetColumnError = ErrorWrapper<{
|
3376
3413
|
status: 400;
|
3377
3414
|
payload: BadRequestError;
|
3378
3415
|
} | {
|
@@ -3382,14 +3419,14 @@ declare type GetColumnError = ErrorWrapper<{
|
|
3382
3419
|
status: 404;
|
3383
3420
|
payload: SimpleError;
|
3384
3421
|
}>;
|
3385
|
-
|
3422
|
+
type GetColumnVariables = {
|
3386
3423
|
pathParams: GetColumnPathParams;
|
3387
3424
|
} & DataPlaneFetcherExtraProps;
|
3388
3425
|
/**
|
3389
3426
|
* Get the definition of a single column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
|
3390
3427
|
*/
|
3391
3428
|
declare const getColumn: (variables: GetColumnVariables, signal?: AbortSignal) => Promise<Column>;
|
3392
|
-
|
3429
|
+
type UpdateColumnPathParams = {
|
3393
3430
|
/**
|
3394
3431
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3395
3432
|
*/
|
@@ -3405,7 +3442,7 @@ declare type UpdateColumnPathParams = {
|
|
3405
3442
|
workspace: string;
|
3406
3443
|
region: string;
|
3407
3444
|
};
|
3408
|
-
|
3445
|
+
type UpdateColumnError = ErrorWrapper<{
|
3409
3446
|
status: 400;
|
3410
3447
|
payload: BadRequestError;
|
3411
3448
|
} | {
|
@@ -3415,13 +3452,13 @@ declare type UpdateColumnError = ErrorWrapper<{
|
|
3415
3452
|
status: 404;
|
3416
3453
|
payload: SimpleError;
|
3417
3454
|
}>;
|
3418
|
-
|
3455
|
+
type UpdateColumnRequestBody = {
|
3419
3456
|
/**
|
3420
3457
|
* @minLength 1
|
3421
3458
|
*/
|
3422
3459
|
name: string;
|
3423
3460
|
};
|
3424
|
-
|
3461
|
+
type UpdateColumnVariables = {
|
3425
3462
|
body: UpdateColumnRequestBody;
|
3426
3463
|
pathParams: UpdateColumnPathParams;
|
3427
3464
|
} & DataPlaneFetcherExtraProps;
|
@@ -3429,7 +3466,7 @@ declare type UpdateColumnVariables = {
|
|
3429
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`.
|
3430
3467
|
*/
|
3431
3468
|
declare const updateColumn: (variables: UpdateColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3432
|
-
|
3469
|
+
type DeleteColumnPathParams = {
|
3433
3470
|
/**
|
3434
3471
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3435
3472
|
*/
|
@@ -3445,7 +3482,7 @@ declare type DeleteColumnPathParams = {
|
|
3445
3482
|
workspace: string;
|
3446
3483
|
region: string;
|
3447
3484
|
};
|
3448
|
-
|
3485
|
+
type DeleteColumnError = ErrorWrapper<{
|
3449
3486
|
status: 400;
|
3450
3487
|
payload: BadRequestError;
|
3451
3488
|
} | {
|
@@ -3455,14 +3492,14 @@ declare type DeleteColumnError = ErrorWrapper<{
|
|
3455
3492
|
status: 404;
|
3456
3493
|
payload: SimpleError;
|
3457
3494
|
}>;
|
3458
|
-
|
3495
|
+
type DeleteColumnVariables = {
|
3459
3496
|
pathParams: DeleteColumnPathParams;
|
3460
3497
|
} & DataPlaneFetcherExtraProps;
|
3461
3498
|
/**
|
3462
3499
|
* Deletes the specified column. To refer to sub-objects, the column name can contain dots. For example `address.country`.
|
3463
3500
|
*/
|
3464
3501
|
declare const deleteColumn: (variables: DeleteColumnVariables, signal?: AbortSignal) => Promise<SchemaUpdateResponse>;
|
3465
|
-
|
3502
|
+
type InsertRecordPathParams = {
|
3466
3503
|
/**
|
3467
3504
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3468
3505
|
*/
|
@@ -3474,13 +3511,13 @@ declare type InsertRecordPathParams = {
|
|
3474
3511
|
workspace: string;
|
3475
3512
|
region: string;
|
3476
3513
|
};
|
3477
|
-
|
3514
|
+
type InsertRecordQueryParams = {
|
3478
3515
|
/**
|
3479
3516
|
* Column filters
|
3480
3517
|
*/
|
3481
3518
|
columns?: ColumnsProjection;
|
3482
3519
|
};
|
3483
|
-
|
3520
|
+
type InsertRecordError = ErrorWrapper<{
|
3484
3521
|
status: 400;
|
3485
3522
|
payload: BadRequestError;
|
3486
3523
|
} | {
|
@@ -3490,7 +3527,7 @@ declare type InsertRecordError = ErrorWrapper<{
|
|
3490
3527
|
status: 404;
|
3491
3528
|
payload: SimpleError;
|
3492
3529
|
}>;
|
3493
|
-
|
3530
|
+
type InsertRecordVariables = {
|
3494
3531
|
body?: Record<string, any>;
|
3495
3532
|
pathParams: InsertRecordPathParams;
|
3496
3533
|
queryParams?: InsertRecordQueryParams;
|
@@ -3499,7 +3536,7 @@ declare type InsertRecordVariables = {
|
|
3499
3536
|
* Insert a new Record into the Table
|
3500
3537
|
*/
|
3501
3538
|
declare const insertRecord: (variables: InsertRecordVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
3502
|
-
|
3539
|
+
type GetRecordPathParams = {
|
3503
3540
|
/**
|
3504
3541
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3505
3542
|
*/
|
@@ -3515,13 +3552,13 @@ declare type GetRecordPathParams = {
|
|
3515
3552
|
workspace: string;
|
3516
3553
|
region: string;
|
3517
3554
|
};
|
3518
|
-
|
3555
|
+
type GetRecordQueryParams = {
|
3519
3556
|
/**
|
3520
3557
|
* Column filters
|
3521
3558
|
*/
|
3522
3559
|
columns?: ColumnsProjection;
|
3523
3560
|
};
|
3524
|
-
|
3561
|
+
type GetRecordError = ErrorWrapper<{
|
3525
3562
|
status: 400;
|
3526
3563
|
payload: BadRequestError;
|
3527
3564
|
} | {
|
@@ -3531,7 +3568,7 @@ declare type GetRecordError = ErrorWrapper<{
|
|
3531
3568
|
status: 404;
|
3532
3569
|
payload: SimpleError;
|
3533
3570
|
}>;
|
3534
|
-
|
3571
|
+
type GetRecordVariables = {
|
3535
3572
|
pathParams: GetRecordPathParams;
|
3536
3573
|
queryParams?: GetRecordQueryParams;
|
3537
3574
|
} & DataPlaneFetcherExtraProps;
|
@@ -3539,7 +3576,7 @@ declare type GetRecordVariables = {
|
|
3539
3576
|
* Retrieve record by ID
|
3540
3577
|
*/
|
3541
3578
|
declare const getRecord: (variables: GetRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
|
3542
|
-
|
3579
|
+
type InsertRecordWithIDPathParams = {
|
3543
3580
|
/**
|
3544
3581
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3545
3582
|
*/
|
@@ -3555,7 +3592,7 @@ declare type InsertRecordWithIDPathParams = {
|
|
3555
3592
|
workspace: string;
|
3556
3593
|
region: string;
|
3557
3594
|
};
|
3558
|
-
|
3595
|
+
type InsertRecordWithIDQueryParams = {
|
3559
3596
|
/**
|
3560
3597
|
* Column filters
|
3561
3598
|
*/
|
@@ -3563,7 +3600,7 @@ declare type InsertRecordWithIDQueryParams = {
|
|
3563
3600
|
createOnly?: boolean;
|
3564
3601
|
ifVersion?: number;
|
3565
3602
|
};
|
3566
|
-
|
3603
|
+
type InsertRecordWithIDError = ErrorWrapper<{
|
3567
3604
|
status: 400;
|
3568
3605
|
payload: BadRequestError;
|
3569
3606
|
} | {
|
@@ -3576,7 +3613,7 @@ declare type InsertRecordWithIDError = ErrorWrapper<{
|
|
3576
3613
|
status: 422;
|
3577
3614
|
payload: SimpleError;
|
3578
3615
|
}>;
|
3579
|
-
|
3616
|
+
type InsertRecordWithIDVariables = {
|
3580
3617
|
body?: Record<string, any>;
|
3581
3618
|
pathParams: InsertRecordWithIDPathParams;
|
3582
3619
|
queryParams?: InsertRecordWithIDQueryParams;
|
@@ -3585,7 +3622,7 @@ declare type InsertRecordWithIDVariables = {
|
|
3585
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.
|
3586
3623
|
*/
|
3587
3624
|
declare const insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
3588
|
-
|
3625
|
+
type UpdateRecordWithIDPathParams = {
|
3589
3626
|
/**
|
3590
3627
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3591
3628
|
*/
|
@@ -3601,14 +3638,14 @@ declare type UpdateRecordWithIDPathParams = {
|
|
3601
3638
|
workspace: string;
|
3602
3639
|
region: string;
|
3603
3640
|
};
|
3604
|
-
|
3641
|
+
type UpdateRecordWithIDQueryParams = {
|
3605
3642
|
/**
|
3606
3643
|
* Column filters
|
3607
3644
|
*/
|
3608
3645
|
columns?: ColumnsProjection;
|
3609
3646
|
ifVersion?: number;
|
3610
3647
|
};
|
3611
|
-
|
3648
|
+
type UpdateRecordWithIDError = ErrorWrapper<{
|
3612
3649
|
status: 400;
|
3613
3650
|
payload: BadRequestError;
|
3614
3651
|
} | {
|
@@ -3621,13 +3658,13 @@ declare type UpdateRecordWithIDError = ErrorWrapper<{
|
|
3621
3658
|
status: 422;
|
3622
3659
|
payload: SimpleError;
|
3623
3660
|
}>;
|
3624
|
-
|
3661
|
+
type UpdateRecordWithIDVariables = {
|
3625
3662
|
body?: Record<string, any>;
|
3626
3663
|
pathParams: UpdateRecordWithIDPathParams;
|
3627
3664
|
queryParams?: UpdateRecordWithIDQueryParams;
|
3628
3665
|
} & DataPlaneFetcherExtraProps;
|
3629
3666
|
declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
3630
|
-
|
3667
|
+
type UpsertRecordWithIDPathParams = {
|
3631
3668
|
/**
|
3632
3669
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3633
3670
|
*/
|
@@ -3643,14 +3680,14 @@ declare type UpsertRecordWithIDPathParams = {
|
|
3643
3680
|
workspace: string;
|
3644
3681
|
region: string;
|
3645
3682
|
};
|
3646
|
-
|
3683
|
+
type UpsertRecordWithIDQueryParams = {
|
3647
3684
|
/**
|
3648
3685
|
* Column filters
|
3649
3686
|
*/
|
3650
3687
|
columns?: ColumnsProjection;
|
3651
3688
|
ifVersion?: number;
|
3652
3689
|
};
|
3653
|
-
|
3690
|
+
type UpsertRecordWithIDError = ErrorWrapper<{
|
3654
3691
|
status: 400;
|
3655
3692
|
payload: BadRequestError;
|
3656
3693
|
} | {
|
@@ -3663,13 +3700,13 @@ declare type UpsertRecordWithIDError = ErrorWrapper<{
|
|
3663
3700
|
status: 422;
|
3664
3701
|
payload: SimpleError;
|
3665
3702
|
}>;
|
3666
|
-
|
3703
|
+
type UpsertRecordWithIDVariables = {
|
3667
3704
|
body?: Record<string, any>;
|
3668
3705
|
pathParams: UpsertRecordWithIDPathParams;
|
3669
3706
|
queryParams?: UpsertRecordWithIDQueryParams;
|
3670
3707
|
} & DataPlaneFetcherExtraProps;
|
3671
3708
|
declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
3672
|
-
|
3709
|
+
type DeleteRecordPathParams = {
|
3673
3710
|
/**
|
3674
3711
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3675
3712
|
*/
|
@@ -3685,13 +3722,13 @@ declare type DeleteRecordPathParams = {
|
|
3685
3722
|
workspace: string;
|
3686
3723
|
region: string;
|
3687
3724
|
};
|
3688
|
-
|
3725
|
+
type DeleteRecordQueryParams = {
|
3689
3726
|
/**
|
3690
3727
|
* Column filters
|
3691
3728
|
*/
|
3692
3729
|
columns?: ColumnsProjection;
|
3693
3730
|
};
|
3694
|
-
|
3731
|
+
type DeleteRecordError = ErrorWrapper<{
|
3695
3732
|
status: 400;
|
3696
3733
|
payload: BadRequestError;
|
3697
3734
|
} | {
|
@@ -3701,12 +3738,12 @@ declare type DeleteRecordError = ErrorWrapper<{
|
|
3701
3738
|
status: 404;
|
3702
3739
|
payload: SimpleError;
|
3703
3740
|
}>;
|
3704
|
-
|
3741
|
+
type DeleteRecordVariables = {
|
3705
3742
|
pathParams: DeleteRecordPathParams;
|
3706
3743
|
queryParams?: DeleteRecordQueryParams;
|
3707
3744
|
} & DataPlaneFetcherExtraProps;
|
3708
3745
|
declare const deleteRecord: (variables: DeleteRecordVariables, signal?: AbortSignal) => Promise<XataRecord$1>;
|
3709
|
-
|
3746
|
+
type BulkInsertTableRecordsPathParams = {
|
3710
3747
|
/**
|
3711
3748
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3712
3749
|
*/
|
@@ -3718,13 +3755,13 @@ declare type BulkInsertTableRecordsPathParams = {
|
|
3718
3755
|
workspace: string;
|
3719
3756
|
region: string;
|
3720
3757
|
};
|
3721
|
-
|
3758
|
+
type BulkInsertTableRecordsQueryParams = {
|
3722
3759
|
/**
|
3723
3760
|
* Column filters
|
3724
3761
|
*/
|
3725
3762
|
columns?: ColumnsProjection;
|
3726
3763
|
};
|
3727
|
-
|
3764
|
+
type BulkInsertTableRecordsError = ErrorWrapper<{
|
3728
3765
|
status: 400;
|
3729
3766
|
payload: BulkError;
|
3730
3767
|
} | {
|
@@ -3737,10 +3774,10 @@ declare type BulkInsertTableRecordsError = ErrorWrapper<{
|
|
3737
3774
|
status: 422;
|
3738
3775
|
payload: SimpleError;
|
3739
3776
|
}>;
|
3740
|
-
|
3777
|
+
type BulkInsertTableRecordsRequestBody = {
|
3741
3778
|
records: Record<string, any>[];
|
3742
3779
|
};
|
3743
|
-
|
3780
|
+
type BulkInsertTableRecordsVariables = {
|
3744
3781
|
body: BulkInsertTableRecordsRequestBody;
|
3745
3782
|
pathParams: BulkInsertTableRecordsPathParams;
|
3746
3783
|
queryParams?: BulkInsertTableRecordsQueryParams;
|
@@ -3749,7 +3786,7 @@ declare type BulkInsertTableRecordsVariables = {
|
|
3749
3786
|
* Bulk insert records
|
3750
3787
|
*/
|
3751
3788
|
declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables, signal?: AbortSignal) => Promise<BulkInsertResponse>;
|
3752
|
-
|
3789
|
+
type QueryTablePathParams = {
|
3753
3790
|
/**
|
3754
3791
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3755
3792
|
*/
|
@@ -3761,7 +3798,7 @@ declare type QueryTablePathParams = {
|
|
3761
3798
|
workspace: string;
|
3762
3799
|
region: string;
|
3763
3800
|
};
|
3764
|
-
|
3801
|
+
type QueryTableError = ErrorWrapper<{
|
3765
3802
|
status: 400;
|
3766
3803
|
payload: BadRequestError;
|
3767
3804
|
} | {
|
@@ -3771,7 +3808,7 @@ declare type QueryTableError = ErrorWrapper<{
|
|
3771
3808
|
status: 404;
|
3772
3809
|
payload: SimpleError;
|
3773
3810
|
}>;
|
3774
|
-
|
3811
|
+
type QueryTableRequestBody = {
|
3775
3812
|
filter?: FilterExpression;
|
3776
3813
|
sort?: SortExpression;
|
3777
3814
|
page?: PageConfig;
|
@@ -3783,7 +3820,7 @@ declare type QueryTableRequestBody = {
|
|
3783
3820
|
*/
|
3784
3821
|
consistency?: 'strong' | 'eventual';
|
3785
3822
|
};
|
3786
|
-
|
3823
|
+
type QueryTableVariables = {
|
3787
3824
|
body?: QueryTableRequestBody;
|
3788
3825
|
pathParams: QueryTablePathParams;
|
3789
3826
|
} & DataPlaneFetcherExtraProps;
|
@@ -4544,7 +4581,7 @@ declare type QueryTableVariables = {
|
|
4544
4581
|
* ```
|
4545
4582
|
*/
|
4546
4583
|
declare const queryTable: (variables: QueryTableVariables, signal?: AbortSignal) => Promise<QueryResponse>;
|
4547
|
-
|
4584
|
+
type SearchBranchPathParams = {
|
4548
4585
|
/**
|
4549
4586
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4550
4587
|
*/
|
@@ -4552,7 +4589,7 @@ declare type SearchBranchPathParams = {
|
|
4552
4589
|
workspace: string;
|
4553
4590
|
region: string;
|
4554
4591
|
};
|
4555
|
-
|
4592
|
+
type SearchBranchError = ErrorWrapper<{
|
4556
4593
|
status: 400;
|
4557
4594
|
payload: BadRequestError;
|
4558
4595
|
} | {
|
@@ -4562,7 +4599,7 @@ declare type SearchBranchError = ErrorWrapper<{
|
|
4562
4599
|
status: 404;
|
4563
4600
|
payload: SimpleError;
|
4564
4601
|
}>;
|
4565
|
-
|
4602
|
+
type SearchBranchRequestBody = {
|
4566
4603
|
/**
|
4567
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.
|
4568
4605
|
*/
|
@@ -4586,7 +4623,7 @@ declare type SearchBranchRequestBody = {
|
|
4586
4623
|
highlight?: HighlightExpression;
|
4587
4624
|
page?: SearchPageConfig;
|
4588
4625
|
};
|
4589
|
-
|
4626
|
+
type SearchBranchVariables = {
|
4590
4627
|
body: SearchBranchRequestBody;
|
4591
4628
|
pathParams: SearchBranchPathParams;
|
4592
4629
|
} & DataPlaneFetcherExtraProps;
|
@@ -4594,7 +4631,7 @@ declare type SearchBranchVariables = {
|
|
4594
4631
|
* Run a free text search operation across the database branch.
|
4595
4632
|
*/
|
4596
4633
|
declare const searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
4597
|
-
|
4634
|
+
type SearchTablePathParams = {
|
4598
4635
|
/**
|
4599
4636
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4600
4637
|
*/
|
@@ -4606,7 +4643,7 @@ declare type SearchTablePathParams = {
|
|
4606
4643
|
workspace: string;
|
4607
4644
|
region: string;
|
4608
4645
|
};
|
4609
|
-
|
4646
|
+
type SearchTableError = ErrorWrapper<{
|
4610
4647
|
status: 400;
|
4611
4648
|
payload: BadRequestError;
|
4612
4649
|
} | {
|
@@ -4616,7 +4653,7 @@ declare type SearchTableError = ErrorWrapper<{
|
|
4616
4653
|
status: 404;
|
4617
4654
|
payload: SimpleError;
|
4618
4655
|
}>;
|
4619
|
-
|
4656
|
+
type SearchTableRequestBody = {
|
4620
4657
|
/**
|
4621
4658
|
* The query string.
|
4622
4659
|
*
|
@@ -4631,7 +4668,7 @@ declare type SearchTableRequestBody = {
|
|
4631
4668
|
boosters?: BoosterExpression[];
|
4632
4669
|
page?: SearchPageConfig;
|
4633
4670
|
};
|
4634
|
-
|
4671
|
+
type SearchTableVariables = {
|
4635
4672
|
body: SearchTableRequestBody;
|
4636
4673
|
pathParams: SearchTablePathParams;
|
4637
4674
|
} & DataPlaneFetcherExtraProps;
|
@@ -4643,7 +4680,7 @@ declare type SearchTableVariables = {
|
|
4643
4680
|
* * filtering on columns of type `multiple` is currently unsupported
|
4644
4681
|
*/
|
4645
4682
|
declare const searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
|
4646
|
-
|
4683
|
+
type SummarizeTablePathParams = {
|
4647
4684
|
/**
|
4648
4685
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4649
4686
|
*/
|
@@ -4655,7 +4692,7 @@ declare type SummarizeTablePathParams = {
|
|
4655
4692
|
workspace: string;
|
4656
4693
|
region: string;
|
4657
4694
|
};
|
4658
|
-
|
4695
|
+
type SummarizeTableError = ErrorWrapper<{
|
4659
4696
|
status: 400;
|
4660
4697
|
payload: BadRequestError;
|
4661
4698
|
} | {
|
@@ -4665,7 +4702,7 @@ declare type SummarizeTableError = ErrorWrapper<{
|
|
4665
4702
|
status: 404;
|
4666
4703
|
payload: SimpleError;
|
4667
4704
|
}>;
|
4668
|
-
|
4705
|
+
type SummarizeTableRequestBody = {
|
4669
4706
|
filter?: FilterExpression;
|
4670
4707
|
columns?: ColumnsProjection;
|
4671
4708
|
summaries?: SummaryExpressionList;
|
@@ -4689,7 +4726,7 @@ declare type SummarizeTableRequestBody = {
|
|
4689
4726
|
size?: number;
|
4690
4727
|
};
|
4691
4728
|
};
|
4692
|
-
|
4729
|
+
type SummarizeTableVariables = {
|
4693
4730
|
body?: SummarizeTableRequestBody;
|
4694
4731
|
pathParams: SummarizeTablePathParams;
|
4695
4732
|
} & DataPlaneFetcherExtraProps;
|
@@ -4758,7 +4795,7 @@ declare type SummarizeTableVariables = {
|
|
4758
4795
|
* will return the default size.
|
4759
4796
|
*/
|
4760
4797
|
declare const summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal) => Promise<SummarizeResponse>;
|
4761
|
-
|
4798
|
+
type AggregateTablePathParams = {
|
4762
4799
|
/**
|
4763
4800
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4764
4801
|
*/
|
@@ -4770,7 +4807,7 @@ declare type AggregateTablePathParams = {
|
|
4770
4807
|
workspace: string;
|
4771
4808
|
region: string;
|
4772
4809
|
};
|
4773
|
-
|
4810
|
+
type AggregateTableError = ErrorWrapper<{
|
4774
4811
|
status: 400;
|
4775
4812
|
payload: BadRequestError;
|
4776
4813
|
} | {
|
@@ -4780,11 +4817,11 @@ declare type AggregateTableError = ErrorWrapper<{
|
|
4780
4817
|
status: 404;
|
4781
4818
|
payload: SimpleError;
|
4782
4819
|
}>;
|
4783
|
-
|
4820
|
+
type AggregateTableRequestBody = {
|
4784
4821
|
filter?: FilterExpression;
|
4785
4822
|
aggs?: AggExpressionMap;
|
4786
4823
|
};
|
4787
|
-
|
4824
|
+
type AggregateTableVariables = {
|
4788
4825
|
body?: AggregateTableRequestBody;
|
4789
4826
|
pathParams: AggregateTablePathParams;
|
4790
4827
|
} & DataPlaneFetcherExtraProps;
|
@@ -4908,12 +4945,12 @@ declare const operationsByTag: {
|
|
4908
4945
|
};
|
4909
4946
|
};
|
4910
4947
|
|
4911
|
-
|
4912
|
-
|
4948
|
+
type HostAliases = 'production' | 'staging';
|
4949
|
+
type ProviderBuilder = {
|
4913
4950
|
main: string;
|
4914
4951
|
workspaces: string;
|
4915
4952
|
};
|
4916
|
-
|
4953
|
+
type HostProvider = HostAliases | ProviderBuilder;
|
4917
4954
|
declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder): string;
|
4918
4955
|
declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
|
4919
4956
|
declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
|
@@ -5169,7 +5206,7 @@ declare namespace schemas {
|
|
5169
5206
|
};
|
5170
5207
|
}
|
5171
5208
|
|
5172
|
-
|
5209
|
+
type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
|
5173
5210
|
interface XataApiClientOptions {
|
5174
5211
|
fetch?: FetchImpl;
|
5175
5212
|
apiKey?: string;
|
@@ -5743,70 +5780,70 @@ declare class XataApiPlugin implements XataPlugin {
|
|
5743
5780
|
build(options: XataPluginOptions): Promise<XataApiClient>;
|
5744
5781
|
}
|
5745
5782
|
|
5746
|
-
|
5747
|
-
|
5748
|
-
|
5749
|
-
|
5750
|
-
|
5751
|
-
|
5752
|
-
|
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 & {
|
5753
5790
|
[P in K]-?: NonNullable<T[P]>;
|
5754
5791
|
};
|
5755
|
-
|
5756
|
-
|
5792
|
+
type GetArrayInnerType<T extends readonly any[]> = T[number];
|
5793
|
+
type FunctionKeys<T> = {
|
5757
5794
|
[K in keyof T]: T[K] extends (...args: any) => any ? K : never;
|
5758
5795
|
}[keyof T];
|
5759
|
-
|
5760
|
-
|
5761
|
-
|
5762
|
-
|
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> = {
|
5763
5800
|
[P in Exclude<keyof T, keyof U>]?: never;
|
5764
5801
|
};
|
5765
|
-
|
5766
|
-
|
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 ? {
|
5767
5804
|
[I in keyof T]: I extends K ? T[I] : never;
|
5768
5805
|
} : never : never;
|
5769
|
-
|
5770
|
-
|
5806
|
+
type AtMostOne<T> = Explode<Partial<T>>;
|
5807
|
+
type AtLeastOne<T, U = {
|
5771
5808
|
[K in keyof T]: Pick<T, K>;
|
5772
5809
|
}> = Partial<T> & U[keyof U];
|
5773
|
-
|
5774
|
-
|
5775
|
-
|
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) | {
|
5776
5813
|
[K in keyof A]: A[K] extends Fn ? A[K] : NarrowRaw<A[K]>;
|
5777
5814
|
};
|
5778
|
-
|
5779
|
-
|
5780
|
-
|
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>>;
|
5781
5818
|
|
5782
|
-
|
5783
|
-
|
5819
|
+
type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
|
5820
|
+
type WildcardColumns<O> = Values<{
|
5784
5821
|
[K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
|
5785
5822
|
}>;
|
5786
|
-
|
5823
|
+
type ColumnsByValue<O, Value> = Values<{
|
5787
5824
|
[K in SelectableColumn<O>]: ValueAtColumn<O, K> extends infer C ? C extends Value ? K extends WildcardColumns<O> ? never : K : never : never;
|
5788
5825
|
}>;
|
5789
|
-
|
5826
|
+
type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
|
5790
5827
|
[K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
|
5791
5828
|
}>>;
|
5792
|
-
|
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> ? {
|
5793
5830
|
V: ValueAtColumn<Item, V>;
|
5794
5831
|
} : never : O[K] : never> : never : never;
|
5795
|
-
|
5796
|
-
|
5832
|
+
type MAX_RECURSION = 5;
|
5833
|
+
type NestedColumns<O, RecursivePath extends any[]> = RecursivePath['length'] extends MAX_RECURSION ? never : If<IsObject<O>, Values<{
|
5797
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
|
5798
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
|
5799
5836
|
K>> : never;
|
5800
5837
|
}>, never>;
|
5801
|
-
|
5802
|
-
|
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> ? {
|
5803
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;
|
5804
5841
|
} : unknown : Key extends DataProps<O> ? {
|
5805
5842
|
[K in Key]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], SelectedPick<NonNullable<O[K]>, ['*']>> : O[K];
|
5806
5843
|
} : Key extends '*' ? {
|
5807
5844
|
[K in StringKeys<O>]: NonNullable<O[K]> extends XataRecord ? ForwardNullable<O[K], Link<NonNullable<O[K]>>> : O[K];
|
5808
5845
|
} : unknown;
|
5809
|
-
|
5846
|
+
type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
|
5810
5847
|
|
5811
5848
|
/**
|
5812
5849
|
* Represents an identifiable record from the database.
|
@@ -5890,8 +5927,8 @@ interface XataRecord<OriginalRecord extends XataRecord<any> = XataRecord<any>> e
|
|
5890
5927
|
*/
|
5891
5928
|
delete(): Promise<Readonly<SelectedPick<OriginalRecord, ['*']>> | null>;
|
5892
5929
|
}
|
5893
|
-
|
5894
|
-
|
5930
|
+
type Link<Record extends XataRecord> = XataRecord<Record>;
|
5931
|
+
type XataRecordMetadata = {
|
5895
5932
|
/**
|
5896
5933
|
* Number that is increased every time the record is updated.
|
5897
5934
|
*/
|
@@ -5900,7 +5937,7 @@ declare type XataRecordMetadata = {
|
|
5900
5937
|
};
|
5901
5938
|
declare function isIdentifiable(x: any): x is Identifiable & Record<string, unknown>;
|
5902
5939
|
declare function isXataRecord(x: any): x is XataRecord & Record<string, unknown>;
|
5903
|
-
|
5940
|
+
type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
|
5904
5941
|
[K in keyof O]: O[K] extends XataRecord ? {
|
5905
5942
|
id: string;
|
5906
5943
|
} | string : NonNullable<O[K]> extends XataRecord ? {
|
@@ -5926,10 +5963,10 @@ declare type EditableData<O extends XataRecord> = Identifiable & Partial<Omit<{
|
|
5926
5963
|
}
|
5927
5964
|
}
|
5928
5965
|
*/
|
5929
|
-
|
5966
|
+
type PropertyAccessFilter<Record> = {
|
5930
5967
|
[key in ColumnsByValue<Record, any>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
|
5931
5968
|
};
|
5932
|
-
|
5969
|
+
type PropertyFilter<T> = T | {
|
5933
5970
|
$is: T;
|
5934
5971
|
} | {
|
5935
5972
|
$isNot: T;
|
@@ -5938,26 +5975,26 @@ declare type PropertyFilter<T> = T | {
|
|
5938
5975
|
} | {
|
5939
5976
|
$none: T[];
|
5940
5977
|
} | ValueTypeFilters<T>;
|
5941
|
-
|
5978
|
+
type IncludesFilter<T> = PropertyFilter<T> | {
|
5942
5979
|
[key in '$all' | '$none' | '$any']?: IncludesFilter<T> | Array<IncludesFilter<T> | {
|
5943
5980
|
$not: IncludesFilter<T>;
|
5944
5981
|
}>;
|
5945
5982
|
};
|
5946
|
-
|
5983
|
+
type StringTypeFilter = {
|
5947
5984
|
[key in '$contains' | '$pattern' | '$startsWith' | '$endsWith']?: string;
|
5948
5985
|
};
|
5949
|
-
|
5950
|
-
|
5986
|
+
type ComparableType = number | Date;
|
5987
|
+
type ComparableTypeFilter<T extends ComparableType> = {
|
5951
5988
|
[key in '$gt' | '$lt' | '$ge' | '$le']?: T;
|
5952
5989
|
};
|
5953
|
-
|
5990
|
+
type ArrayFilter<T> = {
|
5954
5991
|
[key in '$includes']?: SingleOrArray<PropertyFilter<T> | ValueTypeFilters<T>> | IncludesFilter<T>;
|
5955
5992
|
} | {
|
5956
5993
|
[key in '$includesAll' | '$includesNone' | '$includesAny']?: T | Array<PropertyFilter<T> | {
|
5957
5994
|
$not: PropertyFilter<T>;
|
5958
5995
|
}>;
|
5959
5996
|
};
|
5960
|
-
|
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;
|
5961
5998
|
/**
|
5962
5999
|
* AggregatorFilter
|
5963
6000
|
* Example:
|
@@ -5981,33 +6018,33 @@ declare type ValueTypeFilters<T> = T | T extends string ? StringTypeFilter : T e
|
|
5981
6018
|
],
|
5982
6019
|
}
|
5983
6020
|
*/
|
5984
|
-
|
6021
|
+
type AggregatorFilter<T> = {
|
5985
6022
|
[key in '$all' | '$any' | '$not' | '$none']?: SingleOrArray<Filter<T>>;
|
5986
6023
|
};
|
5987
6024
|
/**
|
5988
6025
|
* Existance filter
|
5989
6026
|
* Example: { filter: { $exists: "settings" } }
|
5990
6027
|
*/
|
5991
|
-
|
6028
|
+
type ExistanceFilter<Record> = {
|
5992
6029
|
[key in '$exists' | '$notExists']?: ColumnsByValue<Record, any>;
|
5993
6030
|
};
|
5994
|
-
|
6031
|
+
type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
|
5995
6032
|
/**
|
5996
6033
|
* Nested filter
|
5997
6034
|
* Injects the Api filters on nested properties
|
5998
6035
|
* Example: { filter: { settings: { plan: { $any: ['free', 'trial'] } } } }
|
5999
6036
|
*/
|
6000
|
-
|
6037
|
+
type NestedApiFilter<T> = {
|
6001
6038
|
[key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
|
6002
6039
|
};
|
6003
|
-
|
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>;
|
6004
6041
|
|
6005
|
-
|
6042
|
+
type DateBooster = {
|
6006
6043
|
origin?: string;
|
6007
6044
|
scale: string;
|
6008
6045
|
decay: number;
|
6009
6046
|
};
|
6010
|
-
|
6047
|
+
type NumericBooster = {
|
6011
6048
|
factor: number;
|
6012
6049
|
/**
|
6013
6050
|
* Modifier to be applied to the column value, before being multiplied with the factor. The possible values are:
|
@@ -6024,7 +6061,7 @@ declare type NumericBooster = {
|
|
6024
6061
|
*/
|
6025
6062
|
modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
|
6026
6063
|
};
|
6027
|
-
|
6064
|
+
type ValueBooster<T extends string | number | boolean> = {
|
6028
6065
|
value: T;
|
6029
6066
|
factor: number;
|
6030
6067
|
/**
|
@@ -6042,7 +6079,7 @@ declare type ValueBooster<T extends string | number | boolean> = {
|
|
6042
6079
|
*/
|
6043
6080
|
modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
|
6044
6081
|
};
|
6045
|
-
|
6082
|
+
type Boosters<O extends XataRecord> = Values<{
|
6046
6083
|
[K in SelectableColumn<O>]: NonNullable<ValueAtColumn<O, K>> extends Date ? {
|
6047
6084
|
dateBooster: {
|
6048
6085
|
column: K;
|
@@ -6078,7 +6115,7 @@ declare type Boosters<O extends XataRecord> = Values<{
|
|
6078
6115
|
} : never;
|
6079
6116
|
}>;
|
6080
6117
|
|
6081
|
-
|
6118
|
+
type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
|
6082
6119
|
/**
|
6083
6120
|
* The name of the column.
|
6084
6121
|
*/
|
@@ -6093,7 +6130,7 @@ declare type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
|
|
6093
6130
|
weight?: number;
|
6094
6131
|
};
|
6095
6132
|
|
6096
|
-
|
6133
|
+
type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
|
6097
6134
|
fuzziness?: FuzzinessExpression;
|
6098
6135
|
prefix?: PrefixExpression;
|
6099
6136
|
highlight?: HighlightExpression;
|
@@ -6107,7 +6144,7 @@ declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables exte
|
|
6107
6144
|
}>>;
|
6108
6145
|
page?: SearchPageConfig;
|
6109
6146
|
};
|
6110
|
-
|
6147
|
+
type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
|
6111
6148
|
all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
|
6112
6149
|
[Model in ExtractTables<Schemas, Tables, GetArrayInnerType<NonNullable<NonNullable<typeof options>['tables']>>>]: {
|
6113
6150
|
table: Model;
|
@@ -6124,10 +6161,10 @@ declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends X
|
|
6124
6161
|
constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
|
6125
6162
|
build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
|
6126
6163
|
}
|
6127
|
-
|
6164
|
+
type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
|
6128
6165
|
getMetadata: () => XataRecordMetadata & SearchExtraProperties;
|
6129
6166
|
};
|
6130
|
-
|
6167
|
+
type SearchExtraProperties = {
|
6131
6168
|
table: string;
|
6132
6169
|
highlight?: {
|
6133
6170
|
[key: string]: string[] | {
|
@@ -6136,15 +6173,15 @@ declare type SearchExtraProperties = {
|
|
6136
6173
|
};
|
6137
6174
|
score?: number;
|
6138
6175
|
};
|
6139
|
-
|
6140
|
-
|
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 {
|
6141
6178
|
table: infer Table;
|
6142
6179
|
} ? ReturnTable<Table, Tables> : never;
|
6143
6180
|
|
6144
6181
|
/**
|
6145
6182
|
* The description of a single aggregation operation. The key represents the
|
6146
6183
|
*/
|
6147
|
-
|
6184
|
+
type AggregationExpression<O extends XataRecord> = ExactlyOne<{
|
6148
6185
|
count: CountAggregation<O>;
|
6149
6186
|
sum: SumAggregation<O>;
|
6150
6187
|
max: MaxAggregation<O>;
|
@@ -6155,23 +6192,23 @@ declare type AggregationExpression<O extends XataRecord> = ExactlyOne<{
|
|
6155
6192
|
topValues: TopValuesAggregation<O>;
|
6156
6193
|
numericHistogram: NumericHistogramAggregation<O>;
|
6157
6194
|
}>;
|
6158
|
-
|
6195
|
+
type AggregationResult<Record extends XataRecord, Expression extends Dictionary<AggregationExpression<Record>>> = {
|
6159
6196
|
aggs: {
|
6160
6197
|
[K in keyof Expression]: AggregationResultItem<Record, Expression[K]>;
|
6161
6198
|
};
|
6162
6199
|
};
|
6163
|
-
|
6164
|
-
|
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;
|
6165
6202
|
/**
|
6166
6203
|
* Count the number of records with an optional filter.
|
6167
6204
|
*/
|
6168
|
-
|
6205
|
+
type CountAggregation<O extends XataRecord> = {
|
6169
6206
|
filter?: Filter<O>;
|
6170
6207
|
} | '*';
|
6171
6208
|
/**
|
6172
6209
|
* The sum of the numeric values in a particular column.
|
6173
6210
|
*/
|
6174
|
-
|
6211
|
+
type SumAggregation<O extends XataRecord> = {
|
6175
6212
|
/**
|
6176
6213
|
* The column on which to compute the sum. Must be a numeric type.
|
6177
6214
|
*/
|
@@ -6180,7 +6217,7 @@ declare type SumAggregation<O extends XataRecord> = {
|
|
6180
6217
|
/**
|
6181
6218
|
* The max of the numeric values in a particular column.
|
6182
6219
|
*/
|
6183
|
-
|
6220
|
+
type MaxAggregation<O extends XataRecord> = {
|
6184
6221
|
/**
|
6185
6222
|
* The column on which to compute the max. Must be a numeric type.
|
6186
6223
|
*/
|
@@ -6189,7 +6226,7 @@ declare type MaxAggregation<O extends XataRecord> = {
|
|
6189
6226
|
/**
|
6190
6227
|
* The min of the numeric values in a particular column.
|
6191
6228
|
*/
|
6192
|
-
|
6229
|
+
type MinAggregation<O extends XataRecord> = {
|
6193
6230
|
/**
|
6194
6231
|
* The column on which to compute the min. Must be a numeric type.
|
6195
6232
|
*/
|
@@ -6198,7 +6235,7 @@ declare type MinAggregation<O extends XataRecord> = {
|
|
6198
6235
|
/**
|
6199
6236
|
* The average of the numeric values in a particular column.
|
6200
6237
|
*/
|
6201
|
-
|
6238
|
+
type AverageAggregation<O extends XataRecord> = {
|
6202
6239
|
/**
|
6203
6240
|
* The column on which to compute the average. Must be a numeric type.
|
6204
6241
|
*/
|
@@ -6207,7 +6244,7 @@ declare type AverageAggregation<O extends XataRecord> = {
|
|
6207
6244
|
/**
|
6208
6245
|
* Count the number of distinct values in a particular column.
|
6209
6246
|
*/
|
6210
|
-
|
6247
|
+
type UniqueCountAggregation<O extends XataRecord> = {
|
6211
6248
|
/**
|
6212
6249
|
* The column from where to count the unique values.
|
6213
6250
|
*/
|
@@ -6222,7 +6259,7 @@ declare type UniqueCountAggregation<O extends XataRecord> = {
|
|
6222
6259
|
/**
|
6223
6260
|
* Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
|
6224
6261
|
*/
|
6225
|
-
|
6262
|
+
type DateHistogramAggregation<O extends XataRecord> = {
|
6226
6263
|
/**
|
6227
6264
|
* The column to use for bucketing. Must be of type datetime.
|
6228
6265
|
*/
|
@@ -6253,7 +6290,7 @@ declare type DateHistogramAggregation<O extends XataRecord> = {
|
|
6253
6290
|
* Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
|
6254
6291
|
* The top values as ordered by the number of records (`$count``) are returned.
|
6255
6292
|
*/
|
6256
|
-
|
6293
|
+
type TopValuesAggregation<O extends XataRecord> = {
|
6257
6294
|
/**
|
6258
6295
|
* The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
|
6259
6296
|
*/
|
@@ -6270,7 +6307,7 @@ declare type TopValuesAggregation<O extends XataRecord> = {
|
|
6270
6307
|
/**
|
6271
6308
|
* Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
|
6272
6309
|
*/
|
6273
|
-
|
6310
|
+
type NumericHistogramAggregation<O extends XataRecord> = {
|
6274
6311
|
/**
|
6275
6312
|
* The column to use for bucketing. Must be of numeric type.
|
6276
6313
|
*/
|
@@ -6293,7 +6330,7 @@ declare type NumericHistogramAggregation<O extends XataRecord> = {
|
|
6293
6330
|
offset?: number;
|
6294
6331
|
aggs?: Dictionary<AggregationExpression<O>>;
|
6295
6332
|
};
|
6296
|
-
|
6333
|
+
type AggregationExpressionResultTypes = {
|
6297
6334
|
count: number;
|
6298
6335
|
sum: number | null;
|
6299
6336
|
max: number | null;
|
@@ -6304,7 +6341,7 @@ declare type AggregationExpressionResultTypes = {
|
|
6304
6341
|
topValues: ComplexAggregationResult;
|
6305
6342
|
numericHistogram: ComplexAggregationResult;
|
6306
6343
|
};
|
6307
|
-
|
6344
|
+
type ComplexAggregationResult = {
|
6308
6345
|
values: Array<{
|
6309
6346
|
$key: string | number;
|
6310
6347
|
$count: number;
|
@@ -6312,26 +6349,26 @@ declare type ComplexAggregationResult = {
|
|
6312
6349
|
}>;
|
6313
6350
|
};
|
6314
6351
|
|
6315
|
-
|
6316
|
-
|
6352
|
+
type SortDirection = 'asc' | 'desc';
|
6353
|
+
type SortFilterExtended<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = {
|
6317
6354
|
column: Columns;
|
6318
6355
|
direction?: SortDirection;
|
6319
6356
|
};
|
6320
|
-
|
6321
|
-
|
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<{
|
6322
6359
|
[Key in Columns]: {
|
6323
6360
|
[K in Key]: SortDirection;
|
6324
6361
|
};
|
6325
6362
|
}>;
|
6326
6363
|
|
6327
|
-
|
6364
|
+
type SummarizeExpression<O extends XataRecord> = ExactlyOne<{
|
6328
6365
|
count: ColumnsByValue<O, any> | '*';
|
6329
6366
|
min: ColumnsByValue<O, string | number | Date | any[]>;
|
6330
6367
|
max: ColumnsByValue<O, string | number | Date | any[]>;
|
6331
6368
|
sum: ColumnsByValue<O, number>;
|
6332
6369
|
average: ColumnsByValue<O, number>;
|
6333
6370
|
}>;
|
6334
|
-
|
6371
|
+
type SummarizeParams<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
|
6335
6372
|
summaries?: Expression;
|
6336
6373
|
summariesFilter?: SummarizeFilter<Record, Expression>;
|
6337
6374
|
filter?: Filter<Record>;
|
@@ -6341,39 +6378,40 @@ declare type SummarizeParams<Record extends XataRecord, Expression extends Dicti
|
|
6341
6378
|
size: number;
|
6342
6379
|
};
|
6343
6380
|
};
|
6344
|
-
|
6381
|
+
type SummarizeResult<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
|
6345
6382
|
summaries: SummarizeResultItem<Record, Expression, Columns>[];
|
6346
6383
|
};
|
6347
|
-
|
6384
|
+
type SummarizeExpressionResultTypes<Value> = {
|
6348
6385
|
count: number;
|
6349
6386
|
min: Value;
|
6350
6387
|
max: Value;
|
6351
6388
|
sum: number;
|
6352
6389
|
average: number;
|
6353
6390
|
};
|
6354
|
-
|
6355
|
-
|
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>>> = {
|
6356
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;
|
6357
6394
|
};
|
6358
|
-
|
6359
|
-
|
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>;
|
6360
6397
|
|
6361
|
-
|
6398
|
+
type BaseOptions<T extends XataRecord> = {
|
6362
6399
|
columns?: SelectableColumn<T>[];
|
6400
|
+
consistency?: 'strong' | 'eventual';
|
6363
6401
|
cache?: number;
|
6364
6402
|
fetchOptions?: Record<string, unknown>;
|
6365
6403
|
};
|
6366
|
-
|
6404
|
+
type CursorQueryOptions = {
|
6367
6405
|
pagination?: CursorNavigationOptions & OffsetNavigationOptions;
|
6368
6406
|
filter?: never;
|
6369
6407
|
sort?: never | unknown;
|
6370
6408
|
};
|
6371
|
-
|
6409
|
+
type OffsetQueryOptions<T extends XataRecord> = {
|
6372
6410
|
pagination?: OffsetNavigationOptions;
|
6373
6411
|
filter?: FilterExpression;
|
6374
6412
|
sort?: SingleOrArray<SortFilter<T>>;
|
6375
6413
|
};
|
6376
|
-
|
6414
|
+
type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions | OffsetQueryOptions<T>);
|
6377
6415
|
/**
|
6378
6416
|
* Query objects contain the information of all filters, sorting, etc. to be included in the database query.
|
6379
6417
|
*
|
@@ -6620,7 +6658,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
6620
6658
|
hasNextPage(): boolean;
|
6621
6659
|
}
|
6622
6660
|
|
6623
|
-
|
6661
|
+
type PaginationQueryMeta = {
|
6624
6662
|
page: {
|
6625
6663
|
cursor: string;
|
6626
6664
|
more: boolean;
|
@@ -6684,7 +6722,7 @@ declare class Page<Record extends XataRecord, Result extends XataRecord = Record
|
|
6684
6722
|
*/
|
6685
6723
|
hasNextPage(): boolean;
|
6686
6724
|
}
|
6687
|
-
|
6725
|
+
type CursorNavigationOptions = {
|
6688
6726
|
start?: string;
|
6689
6727
|
} | {
|
6690
6728
|
end?: string;
|
@@ -6692,7 +6730,7 @@ declare type CursorNavigationOptions = {
|
|
6692
6730
|
after?: string;
|
6693
6731
|
before?: string;
|
6694
6732
|
};
|
6695
|
-
|
6733
|
+
type OffsetNavigationOptions = {
|
6696
6734
|
size?: number;
|
6697
6735
|
offset?: number;
|
6698
6736
|
};
|
@@ -7365,7 +7403,7 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
|
|
7365
7403
|
summarizeTable<Result extends XataRecord>(query: Query<Record, Result>, summaries?: Dictionary<SummarizeExpression<Record>>, summariesFilter?: FilterExpression): Promise<SummarizeResponse>;
|
7366
7404
|
}
|
7367
7405
|
|
7368
|
-
|
7406
|
+
type BaseSchema = {
|
7369
7407
|
name: string;
|
7370
7408
|
columns: readonly ({
|
7371
7409
|
name: string;
|
@@ -7386,13 +7424,13 @@ declare type BaseSchema = {
|
|
7386
7424
|
}[];
|
7387
7425
|
})[];
|
7388
7426
|
};
|
7389
|
-
|
7427
|
+
type SchemaInference<T extends readonly BaseSchema[]> = T extends never[] ? Record<string, Record<string, any>> : T extends readonly unknown[] ? T[number] extends {
|
7390
7428
|
name: string;
|
7391
7429
|
columns: readonly unknown[];
|
7392
7430
|
} ? {
|
7393
7431
|
[K in T[number]['name']]: TableType<T[number], K>;
|
7394
7432
|
} : never : never;
|
7395
|
-
|
7433
|
+
type TableType<Tables, TableName> = Tables & {
|
7396
7434
|
name: TableName;
|
7397
7435
|
} extends infer Table ? Table extends {
|
7398
7436
|
name: string;
|
@@ -7403,7 +7441,7 @@ declare type TableType<Tables, TableName> = Tables & {
|
|
7403
7441
|
} ? Identifiable & UnionToIntersection<Values<{
|
7404
7442
|
[K in Columns[number]['name']]: PropertyType<Tables, Columns[number], K>;
|
7405
7443
|
}>> : never : never : never : never;
|
7406
|
-
|
7444
|
+
type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Properties & {
|
7407
7445
|
name: PropertyName;
|
7408
7446
|
} extends infer Property ? Property extends {
|
7409
7447
|
name: string;
|
@@ -7418,7 +7456,7 @@ declare type PropertyType<Tables, Properties, PropertyName extends PropertyKey>
|
|
7418
7456
|
} : {
|
7419
7457
|
[K in PropertyName]?: InnerType<Type, ObjectColumns, Tables, LinkedTable> | null;
|
7420
7458
|
} : never : never;
|
7421
|
-
|
7459
|
+
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 {
|
7422
7460
|
name: string;
|
7423
7461
|
type: string;
|
7424
7462
|
} ? UnionToIntersection<Values<{
|
@@ -7526,10 +7564,10 @@ declare const includesNone: <T>(value: T) => ArrayFilter<T>;
|
|
7526
7564
|
*/
|
7527
7565
|
declare const includesAny: <T>(value: T) => ArrayFilter<T>;
|
7528
7566
|
|
7529
|
-
|
7567
|
+
type SchemaDefinition = {
|
7530
7568
|
table: string;
|
7531
7569
|
};
|
7532
|
-
|
7570
|
+
type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
|
7533
7571
|
[Key in keyof Schemas]: Repository<Schemas[Key]>;
|
7534
7572
|
};
|
7535
7573
|
declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
@@ -7538,7 +7576,7 @@ declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends X
|
|
7538
7576
|
build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
|
7539
7577
|
}
|
7540
7578
|
|
7541
|
-
|
7579
|
+
type TransactionOperation<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
|
7542
7580
|
insert: Values<{
|
7543
7581
|
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
7544
7582
|
table: Model;
|
@@ -7557,21 +7595,21 @@ declare type TransactionOperation<Schemas extends Record<string, BaseData>, Tabl
|
|
7557
7595
|
} & DeleteTransactionOperation;
|
7558
7596
|
}>;
|
7559
7597
|
};
|
7560
|
-
|
7598
|
+
type InsertTransactionOperation<O extends XataRecord> = {
|
7561
7599
|
record: Partial<EditableData<O>>;
|
7562
7600
|
ifVersion?: number;
|
7563
7601
|
createOnly?: boolean;
|
7564
7602
|
};
|
7565
|
-
|
7603
|
+
type UpdateTransactionOperation<O extends XataRecord> = {
|
7566
7604
|
id: string;
|
7567
7605
|
fields: Partial<EditableData<O>>;
|
7568
7606
|
ifVersion?: number;
|
7569
7607
|
upsert?: boolean;
|
7570
7608
|
};
|
7571
|
-
|
7609
|
+
type DeleteTransactionOperation = {
|
7572
7610
|
id: string;
|
7573
7611
|
};
|
7574
|
-
|
7612
|
+
type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Table>> = Operation extends {
|
7575
7613
|
insert: {
|
7576
7614
|
table: Table;
|
7577
7615
|
record: {
|
@@ -7607,24 +7645,24 @@ declare type TransactionOperationSingleResult<Schema extends Record<string, Base
|
|
7607
7645
|
operation: 'delete';
|
7608
7646
|
rows: number;
|
7609
7647
|
} : never;
|
7610
|
-
|
7611
|
-
|
7648
|
+
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 : [];
|
7649
|
+
type TransactionResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = {
|
7612
7650
|
results: TransactionOperationResults<Schema, Table, Operations>;
|
7613
7651
|
};
|
7614
7652
|
|
7615
|
-
|
7653
|
+
type TransactionPluginResult<Schemas extends Record<string, XataRecord>> = {
|
7616
7654
|
run: <Tables extends StringKeys<Schemas>, Operations extends TransactionOperation<Schemas, Tables>[]>(operations: Narrow<Operations>) => Promise<TransactionResults<Schemas, Tables, Operations>>;
|
7617
7655
|
};
|
7618
7656
|
declare class TransactionPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
|
7619
7657
|
build({ getFetchProps }: XataPluginOptions): TransactionPluginResult<Schemas>;
|
7620
7658
|
}
|
7621
7659
|
|
7622
|
-
|
7623
|
-
|
7624
|
-
|
7625
|
-
|
7660
|
+
type BranchStrategyValue = string | undefined | null;
|
7661
|
+
type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
|
7662
|
+
type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
|
7663
|
+
type BranchStrategyOption = NonNullable<BranchStrategy | BranchStrategy[]>;
|
7626
7664
|
|
7627
|
-
|
7665
|
+
type BaseClientOptions = {
|
7628
7666
|
fetch?: FetchImpl;
|
7629
7667
|
apiKey?: string;
|
7630
7668
|
databaseURL?: string;
|
@@ -7661,14 +7699,15 @@ declare class Serializer {
|
|
7661
7699
|
}
|
7662
7700
|
declare const serialize: <T>(data: T) => string;
|
7663
7701
|
declare const deserialize: <T>(json: string) => T;
|
7664
|
-
|
7702
|
+
type SerializerResult<T> = T extends Record<string, any> ? Omit<{
|
7665
7703
|
[K in keyof T]: SerializerResult<T[K]>;
|
7666
7704
|
}, FunctionKeys<T>> : T;
|
7667
7705
|
|
7668
|
-
|
7706
|
+
type BranchResolutionOptions = {
|
7669
7707
|
databaseURL?: string;
|
7670
7708
|
apiKey?: string;
|
7671
7709
|
fetchImpl?: FetchImpl;
|
7710
|
+
clientName?: string;
|
7672
7711
|
};
|
7673
7712
|
declare function getCurrentBranchName(options?: BranchResolutionOptions): Promise<string>;
|
7674
7713
|
declare function getCurrentBranchDetails(options?: BranchResolutionOptions): Promise<DBBranch | null>;
|
@@ -7696,7 +7735,7 @@ interface File extends Blob {
|
|
7696
7735
|
readonly name: string;
|
7697
7736
|
readonly webkitRelativePath: string;
|
7698
7737
|
}
|
7699
|
-
|
7738
|
+
type FormDataEntryValue = File | string;
|
7700
7739
|
/** 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". */
|
7701
7740
|
interface FormData {
|
7702
7741
|
append(name: string, value: string | Blob, fileName?: string): void;
|
@@ -7744,13 +7783,13 @@ interface Request extends Body {
|
|
7744
7783
|
clone(): Request;
|
7745
7784
|
}
|
7746
7785
|
|
7747
|
-
|
7786
|
+
type XataWorkerContext<XataClient> = {
|
7748
7787
|
xata: XataClient;
|
7749
7788
|
request: Request;
|
7750
7789
|
env: Record<string, string | undefined>;
|
7751
7790
|
};
|
7752
|
-
|
7753
|
-
|
7791
|
+
type RemoveFirst<T> = T extends [any, ...infer U] ? U : never;
|
7792
|
+
type WorkerRunnerConfig = {
|
7754
7793
|
workspace: string;
|
7755
7794
|
worker: string;
|
7756
7795
|
};
|