@xata.io/client 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +22 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +697 -10
- package/dist/index.mjs +22 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -68,6 +68,9 @@ declare type XataPluginOptions = {
|
|
68
68
|
* @version 1.0
|
69
69
|
*/
|
70
70
|
declare type User = {
|
71
|
+
/**
|
72
|
+
* @format email
|
73
|
+
*/
|
71
74
|
email: string;
|
72
75
|
fullname: string;
|
73
76
|
image: string;
|
@@ -109,6 +112,9 @@ declare type Workspace = WorkspaceMeta & {
|
|
109
112
|
declare type WorkspaceMember = {
|
110
113
|
userId: UserID;
|
111
114
|
fullname: string;
|
115
|
+
/**
|
116
|
+
* @format email
|
117
|
+
*/
|
112
118
|
email: string;
|
113
119
|
role: Role;
|
114
120
|
};
|
@@ -118,7 +124,13 @@ declare type WorkspaceMember = {
|
|
118
124
|
declare type InviteID = string;
|
119
125
|
declare type WorkspaceInvite = {
|
120
126
|
inviteId: InviteID;
|
127
|
+
/**
|
128
|
+
* @format email
|
129
|
+
*/
|
121
130
|
email: string;
|
131
|
+
/**
|
132
|
+
* @format date-time
|
133
|
+
*/
|
122
134
|
expires: string;
|
123
135
|
role: Role;
|
124
136
|
};
|
@@ -134,14 +146,32 @@ declare type InviteKey = string;
|
|
134
146
|
* Metadata of databases
|
135
147
|
*/
|
136
148
|
declare type DatabaseMetadata = {
|
149
|
+
/**
|
150
|
+
* The machine-readable name of a database
|
151
|
+
*/
|
137
152
|
name: string;
|
153
|
+
/**
|
154
|
+
* The time this database was created
|
155
|
+
*/
|
138
156
|
createdAt: DateTime;
|
157
|
+
/**
|
158
|
+
* The number of branches the database has
|
159
|
+
*/
|
139
160
|
numberOfBranches: number;
|
161
|
+
/**
|
162
|
+
* Metadata about the database for display in Xata user interfaces
|
163
|
+
*/
|
140
164
|
ui?: {
|
165
|
+
/**
|
166
|
+
* The user-selected color for this database across interfaces
|
167
|
+
*/
|
141
168
|
color?: string;
|
142
169
|
};
|
143
170
|
};
|
144
171
|
declare type ListDatabasesResponse = {
|
172
|
+
/**
|
173
|
+
* A list of databases in a Xata workspace
|
174
|
+
*/
|
145
175
|
databases?: DatabaseMetadata[];
|
146
176
|
};
|
147
177
|
declare type ListBranchesResponse = {
|
@@ -163,8 +193,14 @@ declare type Branch = {
|
|
163
193
|
* @x-go-type xata.BranchMetadata
|
164
194
|
*/
|
165
195
|
declare type BranchMetadata = {
|
196
|
+
/**
|
197
|
+
* @minLength 1
|
198
|
+
*/
|
166
199
|
repository?: string;
|
167
200
|
branch?: BranchName;
|
201
|
+
/**
|
202
|
+
* @minLength 1
|
203
|
+
*/
|
168
204
|
stage?: string;
|
169
205
|
labels?: string[];
|
170
206
|
};
|
@@ -383,15 +419,42 @@ declare type ColumnOpRename = {
|
|
383
419
|
newName: string;
|
384
420
|
};
|
385
421
|
declare type MigrationRequest = {
|
422
|
+
/**
|
423
|
+
* The migration request number.
|
424
|
+
*/
|
386
425
|
number: number;
|
426
|
+
/**
|
427
|
+
* Migration request creation timestamp.
|
428
|
+
*/
|
387
429
|
createdAt: DateTime;
|
430
|
+
/**
|
431
|
+
* Last modified timestamp.
|
432
|
+
*/
|
388
433
|
modifiedAt?: DateTime;
|
434
|
+
/**
|
435
|
+
* Timestamp when the migration request was closed.
|
436
|
+
*/
|
389
437
|
closedAt?: DateTime;
|
438
|
+
/**
|
439
|
+
* Timestamp when the migration request was merged.
|
440
|
+
*/
|
390
441
|
mergedAt?: DateTime;
|
391
442
|
status: 'open' | 'closed' | 'merging' | 'merged';
|
443
|
+
/**
|
444
|
+
* The migration request title.
|
445
|
+
*/
|
392
446
|
title: string;
|
447
|
+
/**
|
448
|
+
* The migration request body with detailed description.
|
449
|
+
*/
|
393
450
|
body: string;
|
451
|
+
/**
|
452
|
+
* Name of the source branch.
|
453
|
+
*/
|
394
454
|
source: string;
|
455
|
+
/**
|
456
|
+
* Name of the target branch.
|
457
|
+
*/
|
395
458
|
target: string;
|
396
459
|
};
|
397
460
|
declare type SortExpression = string[] | {
|
@@ -429,23 +492,51 @@ declare type FilterExpression = {
|
|
429
492
|
[key: string]: FilterColumn;
|
430
493
|
};
|
431
494
|
/**
|
432
|
-
* The
|
495
|
+
* The description of the summaries you wish to receive. Set each key to be the field name
|
496
|
+
* you'd like for the summary. These names must not collide with other columns you've
|
497
|
+
* requested from `columns`; including implicit requests like `settings.*`.
|
498
|
+
*
|
499
|
+
* The value for each key needs to be an object. This object should contain one key and one
|
500
|
+
* value only. In this object, the key should be set to the summary function you wish to use
|
501
|
+
* and the value set to the column name to be summarized.
|
502
|
+
*
|
503
|
+
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
504
|
+
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
505
|
+
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
433
506
|
*
|
507
|
+
* @example {"all_users":{"count":"*"}}
|
508
|
+
* @example {"total_created":{"count":"created_at"}}
|
434
509
|
* @x-go-type xbquery.SummaryList
|
435
510
|
*/
|
436
511
|
declare type SummaryExpressionList = {
|
437
512
|
[key: string]: SummaryExpression;
|
438
513
|
};
|
439
514
|
/**
|
440
|
-
* A
|
515
|
+
* A summary expression is the description of a single summary operation. It consists of a single
|
516
|
+
* key representing the operation, and a value representing the column to be operated on.
|
441
517
|
*
|
442
|
-
*
|
518
|
+
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
519
|
+
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
520
|
+
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
443
521
|
*
|
522
|
+
* We currently support the `count` operation. When using `count`, one can set a column name
|
523
|
+
* as the value. Xata will return the total number times this column is non-null in each group.
|
524
|
+
*
|
525
|
+
* Alternately, if you'd like to count the total rows in each group - irregardless of null/not null
|
526
|
+
* status - you can set `count` to `*` to count everything.
|
527
|
+
*
|
528
|
+
* @example {"count":"deleted_at"}
|
444
529
|
* @x-go-type xbquery.Summary
|
445
530
|
*/
|
446
531
|
declare type SummaryExpression = Record<string, any>;
|
447
532
|
declare type HighlightExpression = {
|
533
|
+
/**
|
534
|
+
* Set to `false` to disable highlighting. By default it is `true`.
|
535
|
+
*/
|
448
536
|
enabled?: boolean;
|
537
|
+
/**
|
538
|
+
* Set to `false` to disable HTML encoding in highlight snippets. By default it is `true`.
|
539
|
+
*/
|
449
540
|
encodeHTML?: boolean;
|
450
541
|
};
|
451
542
|
/**
|
@@ -464,15 +555,30 @@ declare type BoosterExpression = {
|
|
464
555
|
* Boost records with a particular value for a column.
|
465
556
|
*/
|
466
557
|
declare type ValueBooster$1 = {
|
558
|
+
/**
|
559
|
+
* The column in which to look for the value.
|
560
|
+
*/
|
467
561
|
column: string;
|
562
|
+
/**
|
563
|
+
* The exact value to boost.
|
564
|
+
*/
|
468
565
|
value: string | number | boolean;
|
566
|
+
/**
|
567
|
+
* The factor with which to multiply the score of the record.
|
568
|
+
*/
|
469
569
|
factor: number;
|
470
570
|
};
|
471
571
|
/**
|
472
572
|
* Boost records based on the value of a numeric column.
|
473
573
|
*/
|
474
574
|
declare type NumericBooster$1 = {
|
575
|
+
/**
|
576
|
+
* The column in which to look for the value.
|
577
|
+
*/
|
475
578
|
column: string;
|
579
|
+
/**
|
580
|
+
* The factor with which to multiply the value of the column before adding it to the item score.
|
581
|
+
*/
|
476
582
|
factor: number;
|
477
583
|
};
|
478
584
|
/**
|
@@ -481,9 +587,24 @@ declare type NumericBooster$1 = {
|
|
481
587
|
* 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.
|
482
588
|
*/
|
483
589
|
declare type DateBooster$1 = {
|
590
|
+
/**
|
591
|
+
* The column in which to look for the value.
|
592
|
+
*/
|
484
593
|
column: string;
|
594
|
+
/**
|
595
|
+
* The datetime (formatted as RFC3339) from where to apply the score decay function. The maximum boost will be applied for records with values at this time.
|
596
|
+
* If it is not specified, the current date and time is used.
|
597
|
+
*/
|
485
598
|
origin?: string;
|
599
|
+
/**
|
600
|
+
* The duration at which distance from origin the score is decayed with factor, using an exponential function. It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
|
601
|
+
*
|
602
|
+
* @pattern ^(\d+)(d|h|m|s|ms)$
|
603
|
+
*/
|
486
604
|
scale: string;
|
605
|
+
/**
|
606
|
+
* The decay factor to expect at "scale" distance from the "origin".
|
607
|
+
*/
|
487
608
|
decay: number;
|
488
609
|
};
|
489
610
|
declare type FilterList = FilterExpression | FilterExpression[];
|
@@ -535,13 +656,40 @@ declare type FilterValue = number | string | boolean;
|
|
535
656
|
* Pagination settings.
|
536
657
|
*/
|
537
658
|
declare type PageConfig = {
|
659
|
+
/**
|
660
|
+
* Query the next page that follow the cursor.
|
661
|
+
*/
|
538
662
|
after?: string;
|
663
|
+
/**
|
664
|
+
* Query the previous page before the cursor.
|
665
|
+
*/
|
539
666
|
before?: string;
|
667
|
+
/**
|
668
|
+
* Query the first page from the cursor.
|
669
|
+
*/
|
540
670
|
first?: string;
|
671
|
+
/**
|
672
|
+
* Query the last page from the cursor.
|
673
|
+
*/
|
541
674
|
last?: string;
|
675
|
+
/**
|
676
|
+
* Set page size. If the size is missing it is read from the cursor. If no cursor is given xata will choose the default page size.
|
677
|
+
*
|
678
|
+
* @default 20
|
679
|
+
*/
|
542
680
|
size?: number;
|
681
|
+
/**
|
682
|
+
* Use offset to skip entries. To skip pages set offset to a multiple of size.
|
683
|
+
*
|
684
|
+
* @default 0
|
685
|
+
*/
|
543
686
|
offset?: number;
|
544
687
|
};
|
688
|
+
/**
|
689
|
+
* @example name
|
690
|
+
* @example email
|
691
|
+
* @example created_at
|
692
|
+
*/
|
545
693
|
declare type ColumnsProjection = string[];
|
546
694
|
/**
|
547
695
|
* Xata Table Record Metadata
|
@@ -549,14 +697,29 @@ declare type ColumnsProjection = string[];
|
|
549
697
|
declare type RecordMeta = {
|
550
698
|
id: RecordID;
|
551
699
|
xata: {
|
700
|
+
/**
|
701
|
+
* The record's version. Can be used for optimistic concurrency control.
|
702
|
+
*/
|
552
703
|
version: number;
|
704
|
+
/**
|
705
|
+
* The record's table name. APIs that return records from multiple tables will set this field accordingly.
|
706
|
+
*/
|
553
707
|
table?: string;
|
708
|
+
/**
|
709
|
+
* Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
|
710
|
+
*/
|
554
711
|
highlight?: {
|
555
712
|
[key: string]: string[] | {
|
556
713
|
[key: string]: any;
|
557
714
|
};
|
558
715
|
};
|
716
|
+
/**
|
717
|
+
* The record's relevancy score. This is returned by the search APIs.
|
718
|
+
*/
|
559
719
|
score?: number;
|
720
|
+
/**
|
721
|
+
* Encoding/Decoding errors
|
722
|
+
*/
|
560
723
|
warnings?: string[];
|
561
724
|
};
|
562
725
|
};
|
@@ -568,7 +731,13 @@ declare type RecordID = string;
|
|
568
731
|
* @example {"newName":"newName","oldName":"oldName"}
|
569
732
|
*/
|
570
733
|
declare type TableRename = {
|
734
|
+
/**
|
735
|
+
* @minLength 1
|
736
|
+
*/
|
571
737
|
newName: string;
|
738
|
+
/**
|
739
|
+
* @minLength 1
|
740
|
+
*/
|
572
741
|
oldName: string;
|
573
742
|
};
|
574
743
|
/**
|
@@ -576,7 +745,13 @@ declare type TableRename = {
|
|
576
745
|
*/
|
577
746
|
declare type RecordsMetadata = {
|
578
747
|
page: {
|
748
|
+
/**
|
749
|
+
* last record id
|
750
|
+
*/
|
579
751
|
cursor: string;
|
752
|
+
/**
|
753
|
+
* true if more records can be fetch
|
754
|
+
*/
|
580
755
|
more: boolean;
|
581
756
|
};
|
582
757
|
};
|
@@ -804,6 +979,9 @@ declare type SearchResponse = {
|
|
804
979
|
* @example {"migrationID":"mig_c7m19ilcefoebpqj12p0"}
|
805
980
|
*/
|
806
981
|
declare type MigrationIdResponse = {
|
982
|
+
/**
|
983
|
+
* @minLength 1
|
984
|
+
*/
|
807
985
|
migrationID: string;
|
808
986
|
};
|
809
987
|
|
@@ -913,6 +1091,9 @@ declare type GetUserAPIKeysVariables = FetcherExtraProps;
|
|
913
1091
|
*/
|
914
1092
|
declare const getUserAPIKeys: (variables: GetUserAPIKeysVariables) => Promise<GetUserAPIKeysResponse>;
|
915
1093
|
declare type CreateUserAPIKeyPathParams = {
|
1094
|
+
/**
|
1095
|
+
* API Key name
|
1096
|
+
*/
|
916
1097
|
keyName: APIKeyName;
|
917
1098
|
};
|
918
1099
|
declare type CreateUserAPIKeyError = ErrorWrapper<{
|
@@ -938,6 +1119,9 @@ declare type CreateUserAPIKeyVariables = {
|
|
938
1119
|
*/
|
939
1120
|
declare const createUserAPIKey: (variables: CreateUserAPIKeyVariables) => Promise<CreateUserAPIKeyResponse>;
|
940
1121
|
declare type DeleteUserAPIKeyPathParams = {
|
1122
|
+
/**
|
1123
|
+
* API Key name
|
1124
|
+
*/
|
941
1125
|
keyName: APIKeyName;
|
942
1126
|
};
|
943
1127
|
declare type DeleteUserAPIKeyError = ErrorWrapper<{
|
@@ -998,6 +1182,9 @@ declare type GetWorkspacesListVariables = FetcherExtraProps;
|
|
998
1182
|
*/
|
999
1183
|
declare const getWorkspacesList: (variables: GetWorkspacesListVariables) => Promise<GetWorkspacesListResponse>;
|
1000
1184
|
declare type GetWorkspacePathParams = {
|
1185
|
+
/**
|
1186
|
+
* Workspace name
|
1187
|
+
*/
|
1001
1188
|
workspaceId: WorkspaceID;
|
1002
1189
|
};
|
1003
1190
|
declare type GetWorkspaceError = ErrorWrapper<{
|
@@ -1018,6 +1205,9 @@ declare type GetWorkspaceVariables = {
|
|
1018
1205
|
*/
|
1019
1206
|
declare const getWorkspace: (variables: GetWorkspaceVariables) => Promise<Workspace>;
|
1020
1207
|
declare type UpdateWorkspacePathParams = {
|
1208
|
+
/**
|
1209
|
+
* Workspace name
|
1210
|
+
*/
|
1021
1211
|
workspaceId: WorkspaceID;
|
1022
1212
|
};
|
1023
1213
|
declare type UpdateWorkspaceError = ErrorWrapper<{
|
@@ -1039,6 +1229,9 @@ declare type UpdateWorkspaceVariables = {
|
|
1039
1229
|
*/
|
1040
1230
|
declare const updateWorkspace: (variables: UpdateWorkspaceVariables) => Promise<Workspace>;
|
1041
1231
|
declare type DeleteWorkspacePathParams = {
|
1232
|
+
/**
|
1233
|
+
* Workspace name
|
1234
|
+
*/
|
1042
1235
|
workspaceId: WorkspaceID;
|
1043
1236
|
};
|
1044
1237
|
declare type DeleteWorkspaceError = ErrorWrapper<{
|
@@ -1059,6 +1252,9 @@ declare type DeleteWorkspaceVariables = {
|
|
1059
1252
|
*/
|
1060
1253
|
declare const deleteWorkspace: (variables: DeleteWorkspaceVariables) => Promise<undefined>;
|
1061
1254
|
declare type GetWorkspaceMembersListPathParams = {
|
1255
|
+
/**
|
1256
|
+
* Workspace name
|
1257
|
+
*/
|
1062
1258
|
workspaceId: WorkspaceID;
|
1063
1259
|
};
|
1064
1260
|
declare type GetWorkspaceMembersListError = ErrorWrapper<{
|
@@ -1079,7 +1275,13 @@ declare type GetWorkspaceMembersListVariables = {
|
|
1079
1275
|
*/
|
1080
1276
|
declare const getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables) => Promise<WorkspaceMembers>;
|
1081
1277
|
declare type UpdateWorkspaceMemberRolePathParams = {
|
1278
|
+
/**
|
1279
|
+
* Workspace name
|
1280
|
+
*/
|
1082
1281
|
workspaceId: WorkspaceID;
|
1282
|
+
/**
|
1283
|
+
* UserID
|
1284
|
+
*/
|
1083
1285
|
userId: UserID;
|
1084
1286
|
};
|
1085
1287
|
declare type UpdateWorkspaceMemberRoleError = ErrorWrapper<{
|
@@ -1104,7 +1306,13 @@ declare type UpdateWorkspaceMemberRoleVariables = {
|
|
1104
1306
|
*/
|
1105
1307
|
declare const updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables) => Promise<undefined>;
|
1106
1308
|
declare type RemoveWorkspaceMemberPathParams = {
|
1309
|
+
/**
|
1310
|
+
* Workspace name
|
1311
|
+
*/
|
1107
1312
|
workspaceId: WorkspaceID;
|
1313
|
+
/**
|
1314
|
+
* UserID
|
1315
|
+
*/
|
1108
1316
|
userId: UserID;
|
1109
1317
|
};
|
1110
1318
|
declare type RemoveWorkspaceMemberError = ErrorWrapper<{
|
@@ -1125,6 +1333,9 @@ declare type RemoveWorkspaceMemberVariables = {
|
|
1125
1333
|
*/
|
1126
1334
|
declare const removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables) => Promise<undefined>;
|
1127
1335
|
declare type InviteWorkspaceMemberPathParams = {
|
1336
|
+
/**
|
1337
|
+
* Workspace name
|
1338
|
+
*/
|
1128
1339
|
workspaceId: WorkspaceID;
|
1129
1340
|
};
|
1130
1341
|
declare type InviteWorkspaceMemberError = ErrorWrapper<{
|
@@ -1141,6 +1352,9 @@ declare type InviteWorkspaceMemberError = ErrorWrapper<{
|
|
1141
1352
|
payload: SimpleError;
|
1142
1353
|
}>;
|
1143
1354
|
declare type InviteWorkspaceMemberRequestBody = {
|
1355
|
+
/**
|
1356
|
+
* @format email
|
1357
|
+
*/
|
1144
1358
|
email: string;
|
1145
1359
|
role: Role;
|
1146
1360
|
};
|
@@ -1153,7 +1367,13 @@ declare type InviteWorkspaceMemberVariables = {
|
|
1153
1367
|
*/
|
1154
1368
|
declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<WorkspaceInvite>;
|
1155
1369
|
declare type UpdateWorkspaceMemberInvitePathParams = {
|
1370
|
+
/**
|
1371
|
+
* Workspace name
|
1372
|
+
*/
|
1156
1373
|
workspaceId: WorkspaceID;
|
1374
|
+
/**
|
1375
|
+
* Invite identifier
|
1376
|
+
*/
|
1157
1377
|
inviteId: InviteID;
|
1158
1378
|
};
|
1159
1379
|
declare type UpdateWorkspaceMemberInviteError = ErrorWrapper<{
|
@@ -1181,7 +1401,13 @@ declare type UpdateWorkspaceMemberInviteVariables = {
|
|
1181
1401
|
*/
|
1182
1402
|
declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
|
1183
1403
|
declare type CancelWorkspaceMemberInvitePathParams = {
|
1404
|
+
/**
|
1405
|
+
* Workspace name
|
1406
|
+
*/
|
1184
1407
|
workspaceId: WorkspaceID;
|
1408
|
+
/**
|
1409
|
+
* Invite identifier
|
1410
|
+
*/
|
1185
1411
|
inviteId: InviteID;
|
1186
1412
|
};
|
1187
1413
|
declare type CancelWorkspaceMemberInviteError = ErrorWrapper<{
|
@@ -1202,7 +1428,13 @@ declare type CancelWorkspaceMemberInviteVariables = {
|
|
1202
1428
|
*/
|
1203
1429
|
declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>;
|
1204
1430
|
declare type ResendWorkspaceMemberInvitePathParams = {
|
1431
|
+
/**
|
1432
|
+
* Workspace name
|
1433
|
+
*/
|
1205
1434
|
workspaceId: WorkspaceID;
|
1435
|
+
/**
|
1436
|
+
* Invite identifier
|
1437
|
+
*/
|
1206
1438
|
inviteId: InviteID;
|
1207
1439
|
};
|
1208
1440
|
declare type ResendWorkspaceMemberInviteError = ErrorWrapper<{
|
@@ -1223,7 +1455,13 @@ declare type ResendWorkspaceMemberInviteVariables = {
|
|
1223
1455
|
*/
|
1224
1456
|
declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>;
|
1225
1457
|
declare type AcceptWorkspaceMemberInvitePathParams = {
|
1458
|
+
/**
|
1459
|
+
* Workspace name
|
1460
|
+
*/
|
1226
1461
|
workspaceId: WorkspaceID;
|
1462
|
+
/**
|
1463
|
+
* Invite Key (secret) for the invited user
|
1464
|
+
*/
|
1227
1465
|
inviteKey: InviteKey;
|
1228
1466
|
};
|
1229
1467
|
declare type AcceptWorkspaceMemberInviteError = ErrorWrapper<{
|
@@ -1261,6 +1499,9 @@ declare type GetDatabaseListVariables = {
|
|
1261
1499
|
*/
|
1262
1500
|
declare const getDatabaseList: (variables: GetDatabaseListVariables) => Promise<ListDatabasesResponse>;
|
1263
1501
|
declare type GetBranchListPathParams = {
|
1502
|
+
/**
|
1503
|
+
* The Database Name
|
1504
|
+
*/
|
1264
1505
|
dbName: DBName;
|
1265
1506
|
workspace: string;
|
1266
1507
|
};
|
@@ -1282,6 +1523,9 @@ declare type GetBranchListVariables = {
|
|
1282
1523
|
*/
|
1283
1524
|
declare const getBranchList: (variables: GetBranchListVariables) => Promise<ListBranchesResponse>;
|
1284
1525
|
declare type CreateDatabasePathParams = {
|
1526
|
+
/**
|
1527
|
+
* The Database Name
|
1528
|
+
*/
|
1285
1529
|
dbName: DBName;
|
1286
1530
|
workspace: string;
|
1287
1531
|
};
|
@@ -1293,10 +1537,16 @@ declare type CreateDatabaseError = ErrorWrapper<{
|
|
1293
1537
|
payload: AuthError;
|
1294
1538
|
}>;
|
1295
1539
|
declare type CreateDatabaseResponse = {
|
1540
|
+
/**
|
1541
|
+
* @minLength 1
|
1542
|
+
*/
|
1296
1543
|
databaseName: string;
|
1297
1544
|
branchName?: string;
|
1298
1545
|
};
|
1299
1546
|
declare type CreateDatabaseRequestBody = {
|
1547
|
+
/**
|
1548
|
+
* @minLength 1
|
1549
|
+
*/
|
1300
1550
|
branchName?: string;
|
1301
1551
|
ui?: {
|
1302
1552
|
color?: string;
|
@@ -1312,6 +1562,9 @@ declare type CreateDatabaseVariables = {
|
|
1312
1562
|
*/
|
1313
1563
|
declare const createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
|
1314
1564
|
declare type DeleteDatabasePathParams = {
|
1565
|
+
/**
|
1566
|
+
* The Database Name
|
1567
|
+
*/
|
1315
1568
|
dbName: DBName;
|
1316
1569
|
workspace: string;
|
1317
1570
|
};
|
@@ -1333,6 +1586,9 @@ declare type DeleteDatabaseVariables = {
|
|
1333
1586
|
*/
|
1334
1587
|
declare const deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
|
1335
1588
|
declare type GetDatabaseMetadataPathParams = {
|
1589
|
+
/**
|
1590
|
+
* The Database Name
|
1591
|
+
*/
|
1336
1592
|
dbName: DBName;
|
1337
1593
|
workspace: string;
|
1338
1594
|
};
|
@@ -1354,6 +1610,9 @@ declare type GetDatabaseMetadataVariables = {
|
|
1354
1610
|
*/
|
1355
1611
|
declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
1356
1612
|
declare type UpdateDatabaseMetadataPathParams = {
|
1613
|
+
/**
|
1614
|
+
* The Database Name
|
1615
|
+
*/
|
1357
1616
|
dbName: DBName;
|
1358
1617
|
workspace: string;
|
1359
1618
|
};
|
@@ -1369,6 +1628,9 @@ declare type UpdateDatabaseMetadataError = ErrorWrapper<{
|
|
1369
1628
|
}>;
|
1370
1629
|
declare type UpdateDatabaseMetadataRequestBody = {
|
1371
1630
|
ui?: {
|
1631
|
+
/**
|
1632
|
+
* @minLength 1
|
1633
|
+
*/
|
1372
1634
|
color?: string;
|
1373
1635
|
};
|
1374
1636
|
};
|
@@ -1381,6 +1643,9 @@ declare type UpdateDatabaseMetadataVariables = {
|
|
1381
1643
|
*/
|
1382
1644
|
declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
1383
1645
|
declare type GetGitBranchesMappingPathParams = {
|
1646
|
+
/**
|
1647
|
+
* The Database Name
|
1648
|
+
*/
|
1384
1649
|
dbName: DBName;
|
1385
1650
|
workspace: string;
|
1386
1651
|
};
|
@@ -1420,6 +1685,9 @@ declare type GetGitBranchesMappingVariables = {
|
|
1420
1685
|
*/
|
1421
1686
|
declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
|
1422
1687
|
declare type AddGitBranchesEntryPathParams = {
|
1688
|
+
/**
|
1689
|
+
* The Database Name
|
1690
|
+
*/
|
1423
1691
|
dbName: DBName;
|
1424
1692
|
workspace: string;
|
1425
1693
|
};
|
@@ -1431,10 +1699,19 @@ declare type AddGitBranchesEntryError = ErrorWrapper<{
|
|
1431
1699
|
payload: AuthError;
|
1432
1700
|
}>;
|
1433
1701
|
declare type AddGitBranchesEntryResponse = {
|
1702
|
+
/**
|
1703
|
+
* Warning message
|
1704
|
+
*/
|
1434
1705
|
warning?: string;
|
1435
1706
|
};
|
1436
1707
|
declare type AddGitBranchesEntryRequestBody = {
|
1708
|
+
/**
|
1709
|
+
* The name of the Git branch.
|
1710
|
+
*/
|
1437
1711
|
gitBranch: string;
|
1712
|
+
/**
|
1713
|
+
* The name of the Xata branch.
|
1714
|
+
*/
|
1438
1715
|
xataBranch: BranchName;
|
1439
1716
|
};
|
1440
1717
|
declare type AddGitBranchesEntryVariables = {
|
@@ -1458,10 +1735,16 @@ declare type AddGitBranchesEntryVariables = {
|
|
1458
1735
|
*/
|
1459
1736
|
declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
|
1460
1737
|
declare type RemoveGitBranchesEntryPathParams = {
|
1738
|
+
/**
|
1739
|
+
* The Database Name
|
1740
|
+
*/
|
1461
1741
|
dbName: DBName;
|
1462
1742
|
workspace: string;
|
1463
1743
|
};
|
1464
1744
|
declare type RemoveGitBranchesEntryQueryParams = {
|
1745
|
+
/**
|
1746
|
+
* The Git Branch to remove from the mapping
|
1747
|
+
*/
|
1465
1748
|
gitBranch: string;
|
1466
1749
|
};
|
1467
1750
|
declare type RemoveGitBranchesEntryError = ErrorWrapper<{
|
@@ -1486,11 +1769,20 @@ declare type RemoveGitBranchesEntryVariables = {
|
|
1486
1769
|
*/
|
1487
1770
|
declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
|
1488
1771
|
declare type ResolveBranchPathParams = {
|
1772
|
+
/**
|
1773
|
+
* The Database Name
|
1774
|
+
*/
|
1489
1775
|
dbName: DBName;
|
1490
1776
|
workspace: string;
|
1491
1777
|
};
|
1492
1778
|
declare type ResolveBranchQueryParams = {
|
1779
|
+
/**
|
1780
|
+
* The Git Branch
|
1781
|
+
*/
|
1493
1782
|
gitBranch?: string;
|
1783
|
+
/**
|
1784
|
+
* Default branch to fallback to
|
1785
|
+
*/
|
1494
1786
|
fallbackBranch?: string;
|
1495
1787
|
};
|
1496
1788
|
declare type ResolveBranchError = ErrorWrapper<{
|
@@ -1538,6 +1830,9 @@ declare type ResolveBranchVariables = {
|
|
1538
1830
|
*/
|
1539
1831
|
declare const resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
|
1540
1832
|
declare type ListMigrationRequestsPathParams = {
|
1833
|
+
/**
|
1834
|
+
* The Database Name
|
1835
|
+
*/
|
1541
1836
|
dbName: DBName;
|
1542
1837
|
workspace: string;
|
1543
1838
|
};
|
@@ -1567,6 +1862,9 @@ declare type ListMigrationRequestsVariables = {
|
|
1567
1862
|
} & FetcherExtraProps;
|
1568
1863
|
declare const listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
|
1569
1864
|
declare type CreateMigrationRequestPathParams = {
|
1865
|
+
/**
|
1866
|
+
* The Database Name
|
1867
|
+
*/
|
1570
1868
|
dbName: DBName;
|
1571
1869
|
workspace: string;
|
1572
1870
|
};
|
@@ -1584,9 +1882,21 @@ declare type CreateMigrationRequestResponse = {
|
|
1584
1882
|
number: number;
|
1585
1883
|
};
|
1586
1884
|
declare type CreateMigrationRequestRequestBody = {
|
1885
|
+
/**
|
1886
|
+
* The source branch.
|
1887
|
+
*/
|
1587
1888
|
source: string;
|
1889
|
+
/**
|
1890
|
+
* The target branch.
|
1891
|
+
*/
|
1588
1892
|
target: string;
|
1893
|
+
/**
|
1894
|
+
* The title.
|
1895
|
+
*/
|
1589
1896
|
title: string;
|
1897
|
+
/**
|
1898
|
+
* Optional migration request description.
|
1899
|
+
*/
|
1590
1900
|
body?: string;
|
1591
1901
|
};
|
1592
1902
|
declare type CreateMigrationRequestVariables = {
|
@@ -1595,7 +1905,13 @@ declare type CreateMigrationRequestVariables = {
|
|
1595
1905
|
} & FetcherExtraProps;
|
1596
1906
|
declare const createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
|
1597
1907
|
declare type GetMigrationRequestPathParams = {
|
1908
|
+
/**
|
1909
|
+
* The Database Name
|
1910
|
+
*/
|
1598
1911
|
dbName: DBName;
|
1912
|
+
/**
|
1913
|
+
* The migration request number.
|
1914
|
+
*/
|
1599
1915
|
mrNumber: number;
|
1600
1916
|
workspace: string;
|
1601
1917
|
};
|
@@ -1614,7 +1930,13 @@ declare type GetMigrationRequestVariables = {
|
|
1614
1930
|
} & FetcherExtraProps;
|
1615
1931
|
declare const getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
|
1616
1932
|
declare type UpdateMigrationRequestPathParams = {
|
1933
|
+
/**
|
1934
|
+
* The Database Name
|
1935
|
+
*/
|
1617
1936
|
dbName: DBName;
|
1937
|
+
/**
|
1938
|
+
* The migration request number.
|
1939
|
+
*/
|
1618
1940
|
mrNumber: number;
|
1619
1941
|
workspace: string;
|
1620
1942
|
};
|
@@ -1629,8 +1951,17 @@ declare type UpdateMigrationRequestError = ErrorWrapper<{
|
|
1629
1951
|
payload: SimpleError;
|
1630
1952
|
}>;
|
1631
1953
|
declare type UpdateMigrationRequestRequestBody = {
|
1954
|
+
/**
|
1955
|
+
* New migration request title.
|
1956
|
+
*/
|
1632
1957
|
title?: string;
|
1958
|
+
/**
|
1959
|
+
* New migration request description.
|
1960
|
+
*/
|
1633
1961
|
body?: string;
|
1962
|
+
/**
|
1963
|
+
* Change the migration request status.
|
1964
|
+
*/
|
1634
1965
|
status?: 'open' | 'closed';
|
1635
1966
|
};
|
1636
1967
|
declare type UpdateMigrationRequestVariables = {
|
@@ -1639,7 +1970,13 @@ declare type UpdateMigrationRequestVariables = {
|
|
1639
1970
|
} & FetcherExtraProps;
|
1640
1971
|
declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
|
1641
1972
|
declare type ListMigrationRequestsCommitsPathParams = {
|
1973
|
+
/**
|
1974
|
+
* The Database Name
|
1975
|
+
*/
|
1642
1976
|
dbName: DBName;
|
1977
|
+
/**
|
1978
|
+
* The migration request number.
|
1979
|
+
*/
|
1643
1980
|
mrNumber: number;
|
1644
1981
|
workspace: string;
|
1645
1982
|
};
|
@@ -1655,15 +1992,32 @@ declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
|
|
1655
1992
|
}>;
|
1656
1993
|
declare type ListMigrationRequestsCommitsResponse = {
|
1657
1994
|
meta: {
|
1995
|
+
/**
|
1996
|
+
* last record id
|
1997
|
+
*/
|
1658
1998
|
cursor: string;
|
1999
|
+
/**
|
2000
|
+
* true if more records can be fetch
|
2001
|
+
*/
|
1659
2002
|
more: boolean;
|
1660
2003
|
};
|
1661
2004
|
logs: Commit[];
|
1662
2005
|
};
|
1663
2006
|
declare type ListMigrationRequestsCommitsRequestBody = {
|
1664
2007
|
page?: {
|
2008
|
+
/**
|
2009
|
+
* Query the next page that follow the cursor.
|
2010
|
+
*/
|
1665
2011
|
after?: string;
|
2012
|
+
/**
|
2013
|
+
* Query the previous page before the cursor.
|
2014
|
+
*/
|
1666
2015
|
before?: string;
|
2016
|
+
/**
|
2017
|
+
* Set page size. If the size is missing it is read from the cursor. If no cursor is given xata will choose the default page size.
|
2018
|
+
*
|
2019
|
+
* @default 20
|
2020
|
+
*/
|
1667
2021
|
size?: number;
|
1668
2022
|
};
|
1669
2023
|
};
|
@@ -1673,7 +2027,13 @@ declare type ListMigrationRequestsCommitsVariables = {
|
|
1673
2027
|
} & FetcherExtraProps;
|
1674
2028
|
declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
|
1675
2029
|
declare type CompareMigrationRequestPathParams = {
|
2030
|
+
/**
|
2031
|
+
* The Database Name
|
2032
|
+
*/
|
1676
2033
|
dbName: DBName;
|
2034
|
+
/**
|
2035
|
+
* The migration request number.
|
2036
|
+
*/
|
1677
2037
|
mrNumber: number;
|
1678
2038
|
workspace: string;
|
1679
2039
|
};
|
@@ -1692,7 +2052,13 @@ declare type CompareMigrationRequestVariables = {
|
|
1692
2052
|
} & FetcherExtraProps;
|
1693
2053
|
declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
|
1694
2054
|
declare type GetMigrationRequestIsMergedPathParams = {
|
2055
|
+
/**
|
2056
|
+
* The Database Name
|
2057
|
+
*/
|
1695
2058
|
dbName: DBName;
|
2059
|
+
/**
|
2060
|
+
* The migration request number.
|
2061
|
+
*/
|
1696
2062
|
mrNumber: number;
|
1697
2063
|
workspace: string;
|
1698
2064
|
};
|
@@ -1714,7 +2080,13 @@ declare type GetMigrationRequestIsMergedVariables = {
|
|
1714
2080
|
} & FetcherExtraProps;
|
1715
2081
|
declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
|
1716
2082
|
declare type MergeMigrationRequestPathParams = {
|
2083
|
+
/**
|
2084
|
+
* The Database Name
|
2085
|
+
*/
|
1717
2086
|
dbName: DBName;
|
2087
|
+
/**
|
2088
|
+
* The migration request number.
|
2089
|
+
*/
|
1718
2090
|
mrNumber: number;
|
1719
2091
|
workspace: string;
|
1720
2092
|
};
|
@@ -1733,6 +2105,9 @@ declare type MergeMigrationRequestVariables = {
|
|
1733
2105
|
} & FetcherExtraProps;
|
1734
2106
|
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
|
1735
2107
|
declare type GetBranchDetailsPathParams = {
|
2108
|
+
/**
|
2109
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2110
|
+
*/
|
1736
2111
|
dbBranchName: DBBranchName;
|
1737
2112
|
workspace: string;
|
1738
2113
|
};
|
@@ -1751,10 +2126,16 @@ declare type GetBranchDetailsVariables = {
|
|
1751
2126
|
} & FetcherExtraProps;
|
1752
2127
|
declare const getBranchDetails: (variables: GetBranchDetailsVariables) => Promise<DBBranch>;
|
1753
2128
|
declare type CreateBranchPathParams = {
|
2129
|
+
/**
|
2130
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2131
|
+
*/
|
1754
2132
|
dbBranchName: DBBranchName;
|
1755
2133
|
workspace: string;
|
1756
2134
|
};
|
1757
2135
|
declare type CreateBranchQueryParams = {
|
2136
|
+
/**
|
2137
|
+
* Name of source branch to branch the new schema from
|
2138
|
+
*/
|
1758
2139
|
from?: string;
|
1759
2140
|
};
|
1760
2141
|
declare type CreateBranchError = ErrorWrapper<{
|
@@ -1768,10 +2149,16 @@ declare type CreateBranchError = ErrorWrapper<{
|
|
1768
2149
|
payload: SimpleError;
|
1769
2150
|
}>;
|
1770
2151
|
declare type CreateBranchResponse = {
|
2152
|
+
/**
|
2153
|
+
* @minLength 1
|
2154
|
+
*/
|
1771
2155
|
databaseName: string;
|
1772
2156
|
branchName: string;
|
1773
2157
|
};
|
1774
2158
|
declare type CreateBranchRequestBody = {
|
2159
|
+
/**
|
2160
|
+
* Select the branch to fork from. Defaults to 'main'
|
2161
|
+
*/
|
1775
2162
|
from?: string;
|
1776
2163
|
metadata?: BranchMetadata;
|
1777
2164
|
};
|
@@ -1782,6 +2169,9 @@ declare type CreateBranchVariables = {
|
|
1782
2169
|
} & FetcherExtraProps;
|
1783
2170
|
declare const createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
|
1784
2171
|
declare type DeleteBranchPathParams = {
|
2172
|
+
/**
|
2173
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2174
|
+
*/
|
1785
2175
|
dbBranchName: DBBranchName;
|
1786
2176
|
workspace: string;
|
1787
2177
|
};
|
@@ -1803,6 +2193,9 @@ declare type DeleteBranchVariables = {
|
|
1803
2193
|
*/
|
1804
2194
|
declare const deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
|
1805
2195
|
declare type UpdateBranchMetadataPathParams = {
|
2196
|
+
/**
|
2197
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2198
|
+
*/
|
1806
2199
|
dbBranchName: DBBranchName;
|
1807
2200
|
workspace: string;
|
1808
2201
|
};
|
@@ -1825,6 +2218,9 @@ declare type UpdateBranchMetadataVariables = {
|
|
1825
2218
|
*/
|
1826
2219
|
declare const updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
|
1827
2220
|
declare type GetBranchMetadataPathParams = {
|
2221
|
+
/**
|
2222
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2223
|
+
*/
|
1828
2224
|
dbBranchName: DBBranchName;
|
1829
2225
|
workspace: string;
|
1830
2226
|
};
|
@@ -1843,6 +2239,9 @@ declare type GetBranchMetadataVariables = {
|
|
1843
2239
|
} & FetcherExtraProps;
|
1844
2240
|
declare const getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
|
1845
2241
|
declare type GetBranchMigrationHistoryPathParams = {
|
2242
|
+
/**
|
2243
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2244
|
+
*/
|
1846
2245
|
dbBranchName: DBBranchName;
|
1847
2246
|
workspace: string;
|
1848
2247
|
};
|
@@ -1870,6 +2269,9 @@ declare type GetBranchMigrationHistoryVariables = {
|
|
1870
2269
|
} & FetcherExtraProps;
|
1871
2270
|
declare const getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
|
1872
2271
|
declare type ExecuteBranchMigrationPlanPathParams = {
|
2272
|
+
/**
|
2273
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2274
|
+
*/
|
1873
2275
|
dbBranchName: DBBranchName;
|
1874
2276
|
workspace: string;
|
1875
2277
|
};
|
@@ -1896,6 +2298,9 @@ declare type ExecuteBranchMigrationPlanVariables = {
|
|
1896
2298
|
*/
|
1897
2299
|
declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
|
1898
2300
|
declare type GetBranchMigrationPlanPathParams = {
|
2301
|
+
/**
|
2302
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2303
|
+
*/
|
1899
2304
|
dbBranchName: DBBranchName;
|
1900
2305
|
workspace: string;
|
1901
2306
|
};
|
@@ -1918,6 +2323,9 @@ declare type GetBranchMigrationPlanVariables = {
|
|
1918
2323
|
*/
|
1919
2324
|
declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
|
1920
2325
|
declare type CompareBranchWithUserSchemaPathParams = {
|
2326
|
+
/**
|
2327
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2328
|
+
*/
|
1921
2329
|
dbBranchName: DBBranchName;
|
1922
2330
|
workspace: string;
|
1923
2331
|
};
|
@@ -1940,7 +2348,13 @@ declare type CompareBranchWithUserSchemaVariables = {
|
|
1940
2348
|
} & FetcherExtraProps;
|
1941
2349
|
declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
|
1942
2350
|
declare type CompareBranchSchemasPathParams = {
|
2351
|
+
/**
|
2352
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2353
|
+
*/
|
1943
2354
|
dbBranchName: DBBranchName;
|
2355
|
+
/**
|
2356
|
+
* The Database Name
|
2357
|
+
*/
|
1944
2358
|
branchName: BranchName;
|
1945
2359
|
workspace: string;
|
1946
2360
|
};
|
@@ -1960,6 +2374,9 @@ declare type CompareBranchSchemasVariables = {
|
|
1960
2374
|
} & FetcherExtraProps;
|
1961
2375
|
declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
|
1962
2376
|
declare type UpdateBranchSchemaPathParams = {
|
2377
|
+
/**
|
2378
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2379
|
+
*/
|
1963
2380
|
dbBranchName: DBBranchName;
|
1964
2381
|
workspace: string;
|
1965
2382
|
};
|
@@ -1983,6 +2400,9 @@ declare type UpdateBranchSchemaVariables = {
|
|
1983
2400
|
} & FetcherExtraProps;
|
1984
2401
|
declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
|
1985
2402
|
declare type PreviewBranchSchemaEditPathParams = {
|
2403
|
+
/**
|
2404
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2405
|
+
*/
|
1986
2406
|
dbBranchName: DBBranchName;
|
1987
2407
|
workspace: string;
|
1988
2408
|
};
|
@@ -2010,6 +2430,9 @@ declare type PreviewBranchSchemaEditVariables = {
|
|
2010
2430
|
} & FetcherExtraProps;
|
2011
2431
|
declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
|
2012
2432
|
declare type ApplyBranchSchemaEditPathParams = {
|
2433
|
+
/**
|
2434
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2435
|
+
*/
|
2013
2436
|
dbBranchName: DBBranchName;
|
2014
2437
|
workspace: string;
|
2015
2438
|
};
|
@@ -2036,6 +2459,9 @@ declare type ApplyBranchSchemaEditVariables = {
|
|
2036
2459
|
} & FetcherExtraProps;
|
2037
2460
|
declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
|
2038
2461
|
declare type GetBranchSchemaHistoryPathParams = {
|
2462
|
+
/**
|
2463
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2464
|
+
*/
|
2039
2465
|
dbBranchName: DBBranchName;
|
2040
2466
|
workspace: string;
|
2041
2467
|
};
|
@@ -2051,15 +2477,32 @@ declare type GetBranchSchemaHistoryError = ErrorWrapper<{
|
|
2051
2477
|
}>;
|
2052
2478
|
declare type GetBranchSchemaHistoryResponse = {
|
2053
2479
|
meta: {
|
2480
|
+
/**
|
2481
|
+
* last record id
|
2482
|
+
*/
|
2054
2483
|
cursor: string;
|
2484
|
+
/**
|
2485
|
+
* true if more records can be fetch
|
2486
|
+
*/
|
2055
2487
|
more: boolean;
|
2056
2488
|
};
|
2057
2489
|
logs: Commit[];
|
2058
2490
|
};
|
2059
2491
|
declare type GetBranchSchemaHistoryRequestBody = {
|
2060
2492
|
page?: {
|
2493
|
+
/**
|
2494
|
+
* Query the next page that follow the cursor.
|
2495
|
+
*/
|
2061
2496
|
after?: string;
|
2497
|
+
/**
|
2498
|
+
* Query the previous page before the cursor.
|
2499
|
+
*/
|
2062
2500
|
before?: string;
|
2501
|
+
/**
|
2502
|
+
* Set page size. If the size is missing it is read from the cursor. If no cursor is given xata will choose the default page size.
|
2503
|
+
*
|
2504
|
+
* @default 20
|
2505
|
+
*/
|
2063
2506
|
size?: number;
|
2064
2507
|
};
|
2065
2508
|
};
|
@@ -2069,6 +2512,9 @@ declare type GetBranchSchemaHistoryVariables = {
|
|
2069
2512
|
} & FetcherExtraProps;
|
2070
2513
|
declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
|
2071
2514
|
declare type GetBranchStatsPathParams = {
|
2515
|
+
/**
|
2516
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2517
|
+
*/
|
2072
2518
|
dbBranchName: DBBranchName;
|
2073
2519
|
workspace: string;
|
2074
2520
|
};
|
@@ -2101,7 +2547,13 @@ declare type GetBranchStatsVariables = {
|
|
2101
2547
|
*/
|
2102
2548
|
declare const getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
|
2103
2549
|
declare type CreateTablePathParams = {
|
2550
|
+
/**
|
2551
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2552
|
+
*/
|
2104
2553
|
dbBranchName: DBBranchName;
|
2554
|
+
/**
|
2555
|
+
* The Table name
|
2556
|
+
*/
|
2105
2557
|
tableName: TableName;
|
2106
2558
|
workspace: string;
|
2107
2559
|
};
|
@@ -2120,6 +2572,9 @@ declare type CreateTableError = ErrorWrapper<{
|
|
2120
2572
|
}>;
|
2121
2573
|
declare type CreateTableResponse = {
|
2122
2574
|
branchName: string;
|
2575
|
+
/**
|
2576
|
+
* @minLength 1
|
2577
|
+
*/
|
2123
2578
|
tableName: string;
|
2124
2579
|
};
|
2125
2580
|
declare type CreateTableVariables = {
|
@@ -2130,7 +2585,13 @@ declare type CreateTableVariables = {
|
|
2130
2585
|
*/
|
2131
2586
|
declare const createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
|
2132
2587
|
declare type DeleteTablePathParams = {
|
2588
|
+
/**
|
2589
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2590
|
+
*/
|
2133
2591
|
dbBranchName: DBBranchName;
|
2592
|
+
/**
|
2593
|
+
* The Table name
|
2594
|
+
*/
|
2134
2595
|
tableName: TableName;
|
2135
2596
|
workspace: string;
|
2136
2597
|
};
|
@@ -2149,7 +2610,13 @@ declare type DeleteTableVariables = {
|
|
2149
2610
|
*/
|
2150
2611
|
declare const deleteTable: (variables: DeleteTableVariables) => Promise<undefined>;
|
2151
2612
|
declare type UpdateTablePathParams = {
|
2613
|
+
/**
|
2614
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2615
|
+
*/
|
2152
2616
|
dbBranchName: DBBranchName;
|
2617
|
+
/**
|
2618
|
+
* The Table name
|
2619
|
+
*/
|
2153
2620
|
tableName: TableName;
|
2154
2621
|
workspace: string;
|
2155
2622
|
};
|
@@ -2164,6 +2631,9 @@ declare type UpdateTableError = ErrorWrapper<{
|
|
2164
2631
|
payload: SimpleError;
|
2165
2632
|
}>;
|
2166
2633
|
declare type UpdateTableRequestBody = {
|
2634
|
+
/**
|
2635
|
+
* @minLength 1
|
2636
|
+
*/
|
2167
2637
|
name: string;
|
2168
2638
|
};
|
2169
2639
|
declare type UpdateTableVariables = {
|
@@ -2185,7 +2655,13 @@ declare type UpdateTableVariables = {
|
|
2185
2655
|
*/
|
2186
2656
|
declare const updateTable: (variables: UpdateTableVariables) => Promise<undefined>;
|
2187
2657
|
declare type GetTableSchemaPathParams = {
|
2658
|
+
/**
|
2659
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2660
|
+
*/
|
2188
2661
|
dbBranchName: DBBranchName;
|
2662
|
+
/**
|
2663
|
+
* The Table name
|
2664
|
+
*/
|
2189
2665
|
tableName: TableName;
|
2190
2666
|
workspace: string;
|
2191
2667
|
};
|
@@ -2207,7 +2683,13 @@ declare type GetTableSchemaVariables = {
|
|
2207
2683
|
} & FetcherExtraProps;
|
2208
2684
|
declare const getTableSchema: (variables: GetTableSchemaVariables) => Promise<GetTableSchemaResponse>;
|
2209
2685
|
declare type SetTableSchemaPathParams = {
|
2686
|
+
/**
|
2687
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2688
|
+
*/
|
2210
2689
|
dbBranchName: DBBranchName;
|
2690
|
+
/**
|
2691
|
+
* The Table name
|
2692
|
+
*/
|
2211
2693
|
tableName: TableName;
|
2212
2694
|
workspace: string;
|
2213
2695
|
};
|
@@ -2233,7 +2715,13 @@ declare type SetTableSchemaVariables = {
|
|
2233
2715
|
} & FetcherExtraProps;
|
2234
2716
|
declare const setTableSchema: (variables: SetTableSchemaVariables) => Promise<undefined>;
|
2235
2717
|
declare type GetTableColumnsPathParams = {
|
2718
|
+
/**
|
2719
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2720
|
+
*/
|
2236
2721
|
dbBranchName: DBBranchName;
|
2722
|
+
/**
|
2723
|
+
* The Table name
|
2724
|
+
*/
|
2237
2725
|
tableName: TableName;
|
2238
2726
|
workspace: string;
|
2239
2727
|
};
|
@@ -2259,7 +2747,13 @@ declare type GetTableColumnsVariables = {
|
|
2259
2747
|
*/
|
2260
2748
|
declare const getTableColumns: (variables: GetTableColumnsVariables) => Promise<GetTableColumnsResponse>;
|
2261
2749
|
declare type AddTableColumnPathParams = {
|
2750
|
+
/**
|
2751
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2752
|
+
*/
|
2262
2753
|
dbBranchName: DBBranchName;
|
2754
|
+
/**
|
2755
|
+
* The Table name
|
2756
|
+
*/
|
2263
2757
|
tableName: TableName;
|
2264
2758
|
workspace: string;
|
2265
2759
|
};
|
@@ -2284,8 +2778,17 @@ declare type AddTableColumnVariables = {
|
|
2284
2778
|
*/
|
2285
2779
|
declare const addTableColumn: (variables: AddTableColumnVariables) => Promise<MigrationIdResponse>;
|
2286
2780
|
declare type GetColumnPathParams = {
|
2781
|
+
/**
|
2782
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2783
|
+
*/
|
2287
2784
|
dbBranchName: DBBranchName;
|
2785
|
+
/**
|
2786
|
+
* The Table name
|
2787
|
+
*/
|
2288
2788
|
tableName: TableName;
|
2789
|
+
/**
|
2790
|
+
* The Column name
|
2791
|
+
*/
|
2289
2792
|
columnName: ColumnName;
|
2290
2793
|
workspace: string;
|
2291
2794
|
};
|
@@ -2307,8 +2810,17 @@ declare type GetColumnVariables = {
|
|
2307
2810
|
*/
|
2308
2811
|
declare const getColumn: (variables: GetColumnVariables) => Promise<Column>;
|
2309
2812
|
declare type DeleteColumnPathParams = {
|
2813
|
+
/**
|
2814
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2815
|
+
*/
|
2310
2816
|
dbBranchName: DBBranchName;
|
2817
|
+
/**
|
2818
|
+
* The Table name
|
2819
|
+
*/
|
2311
2820
|
tableName: TableName;
|
2821
|
+
/**
|
2822
|
+
* The Column name
|
2823
|
+
*/
|
2312
2824
|
columnName: ColumnName;
|
2313
2825
|
workspace: string;
|
2314
2826
|
};
|
@@ -2330,8 +2842,17 @@ declare type DeleteColumnVariables = {
|
|
2330
2842
|
*/
|
2331
2843
|
declare const deleteColumn: (variables: DeleteColumnVariables) => Promise<MigrationIdResponse>;
|
2332
2844
|
declare type UpdateColumnPathParams = {
|
2845
|
+
/**
|
2846
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2847
|
+
*/
|
2333
2848
|
dbBranchName: DBBranchName;
|
2849
|
+
/**
|
2850
|
+
* The Table name
|
2851
|
+
*/
|
2334
2852
|
tableName: TableName;
|
2853
|
+
/**
|
2854
|
+
* The Column name
|
2855
|
+
*/
|
2335
2856
|
columnName: ColumnName;
|
2336
2857
|
workspace: string;
|
2337
2858
|
};
|
@@ -2346,6 +2867,9 @@ declare type UpdateColumnError = ErrorWrapper<{
|
|
2346
2867
|
payload: SimpleError;
|
2347
2868
|
}>;
|
2348
2869
|
declare type UpdateColumnRequestBody = {
|
2870
|
+
/**
|
2871
|
+
* @minLength 1
|
2872
|
+
*/
|
2349
2873
|
name: string;
|
2350
2874
|
};
|
2351
2875
|
declare type UpdateColumnVariables = {
|
@@ -2357,11 +2881,20 @@ declare type UpdateColumnVariables = {
|
|
2357
2881
|
*/
|
2358
2882
|
declare const updateColumn: (variables: UpdateColumnVariables) => Promise<MigrationIdResponse>;
|
2359
2883
|
declare type InsertRecordPathParams = {
|
2884
|
+
/**
|
2885
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2886
|
+
*/
|
2360
2887
|
dbBranchName: DBBranchName;
|
2888
|
+
/**
|
2889
|
+
* The Table name
|
2890
|
+
*/
|
2361
2891
|
tableName: TableName;
|
2362
2892
|
workspace: string;
|
2363
2893
|
};
|
2364
2894
|
declare type InsertRecordQueryParams = {
|
2895
|
+
/**
|
2896
|
+
* Column filters
|
2897
|
+
*/
|
2365
2898
|
columns?: ColumnsProjection;
|
2366
2899
|
};
|
2367
2900
|
declare type InsertRecordError = ErrorWrapper<{
|
@@ -2384,12 +2917,24 @@ declare type InsertRecordVariables = {
|
|
2384
2917
|
*/
|
2385
2918
|
declare const insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
|
2386
2919
|
declare type InsertRecordWithIDPathParams = {
|
2920
|
+
/**
|
2921
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2922
|
+
*/
|
2387
2923
|
dbBranchName: DBBranchName;
|
2924
|
+
/**
|
2925
|
+
* The Table name
|
2926
|
+
*/
|
2388
2927
|
tableName: TableName;
|
2928
|
+
/**
|
2929
|
+
* The Record name
|
2930
|
+
*/
|
2389
2931
|
recordId: RecordID;
|
2390
2932
|
workspace: string;
|
2391
2933
|
};
|
2392
2934
|
declare type InsertRecordWithIDQueryParams = {
|
2935
|
+
/**
|
2936
|
+
* Column filters
|
2937
|
+
*/
|
2393
2938
|
columns?: ColumnsProjection;
|
2394
2939
|
createOnly?: boolean;
|
2395
2940
|
ifVersion?: number;
|
@@ -2417,12 +2962,24 @@ declare type InsertRecordWithIDVariables = {
|
|
2417
2962
|
*/
|
2418
2963
|
declare const insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
|
2419
2964
|
declare type UpdateRecordWithIDPathParams = {
|
2965
|
+
/**
|
2966
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2967
|
+
*/
|
2420
2968
|
dbBranchName: DBBranchName;
|
2969
|
+
/**
|
2970
|
+
* The Table name
|
2971
|
+
*/
|
2421
2972
|
tableName: TableName;
|
2973
|
+
/**
|
2974
|
+
* The Record name
|
2975
|
+
*/
|
2422
2976
|
recordId: RecordID;
|
2423
2977
|
workspace: string;
|
2424
2978
|
};
|
2425
2979
|
declare type UpdateRecordWithIDQueryParams = {
|
2980
|
+
/**
|
2981
|
+
* Column filters
|
2982
|
+
*/
|
2426
2983
|
columns?: ColumnsProjection;
|
2427
2984
|
ifVersion?: number;
|
2428
2985
|
};
|
@@ -2446,12 +3003,24 @@ declare type UpdateRecordWithIDVariables = {
|
|
2446
3003
|
} & FetcherExtraProps;
|
2447
3004
|
declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<RecordUpdateResponse>;
|
2448
3005
|
declare type UpsertRecordWithIDPathParams = {
|
3006
|
+
/**
|
3007
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3008
|
+
*/
|
2449
3009
|
dbBranchName: DBBranchName;
|
3010
|
+
/**
|
3011
|
+
* The Table name
|
3012
|
+
*/
|
2450
3013
|
tableName: TableName;
|
3014
|
+
/**
|
3015
|
+
* The Record name
|
3016
|
+
*/
|
2451
3017
|
recordId: RecordID;
|
2452
3018
|
workspace: string;
|
2453
3019
|
};
|
2454
3020
|
declare type UpsertRecordWithIDQueryParams = {
|
3021
|
+
/**
|
3022
|
+
* Column filters
|
3023
|
+
*/
|
2455
3024
|
columns?: ColumnsProjection;
|
2456
3025
|
ifVersion?: number;
|
2457
3026
|
};
|
@@ -2475,12 +3044,24 @@ declare type UpsertRecordWithIDVariables = {
|
|
2475
3044
|
} & FetcherExtraProps;
|
2476
3045
|
declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
|
2477
3046
|
declare type DeleteRecordPathParams = {
|
3047
|
+
/**
|
3048
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3049
|
+
*/
|
2478
3050
|
dbBranchName: DBBranchName;
|
3051
|
+
/**
|
3052
|
+
* The Table name
|
3053
|
+
*/
|
2479
3054
|
tableName: TableName;
|
3055
|
+
/**
|
3056
|
+
* The Record name
|
3057
|
+
*/
|
2480
3058
|
recordId: RecordID;
|
2481
3059
|
workspace: string;
|
2482
3060
|
};
|
2483
3061
|
declare type DeleteRecordQueryParams = {
|
3062
|
+
/**
|
3063
|
+
* Column filters
|
3064
|
+
*/
|
2484
3065
|
columns?: ColumnsProjection;
|
2485
3066
|
};
|
2486
3067
|
declare type DeleteRecordError = ErrorWrapper<{
|
@@ -2499,12 +3080,24 @@ declare type DeleteRecordVariables = {
|
|
2499
3080
|
} & FetcherExtraProps;
|
2500
3081
|
declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
|
2501
3082
|
declare type GetRecordPathParams = {
|
3083
|
+
/**
|
3084
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3085
|
+
*/
|
2502
3086
|
dbBranchName: DBBranchName;
|
3087
|
+
/**
|
3088
|
+
* The Table name
|
3089
|
+
*/
|
2503
3090
|
tableName: TableName;
|
3091
|
+
/**
|
3092
|
+
* The Record name
|
3093
|
+
*/
|
2504
3094
|
recordId: RecordID;
|
2505
3095
|
workspace: string;
|
2506
3096
|
};
|
2507
3097
|
declare type GetRecordQueryParams = {
|
3098
|
+
/**
|
3099
|
+
* Column filters
|
3100
|
+
*/
|
2508
3101
|
columns?: ColumnsProjection;
|
2509
3102
|
};
|
2510
3103
|
declare type GetRecordError = ErrorWrapper<{
|
@@ -2526,11 +3119,20 @@ declare type GetRecordVariables = {
|
|
2526
3119
|
*/
|
2527
3120
|
declare const getRecord: (variables: GetRecordVariables) => Promise<XataRecord$1>;
|
2528
3121
|
declare type BulkInsertTableRecordsPathParams = {
|
3122
|
+
/**
|
3123
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3124
|
+
*/
|
2529
3125
|
dbBranchName: DBBranchName;
|
3126
|
+
/**
|
3127
|
+
* The Table name
|
3128
|
+
*/
|
2530
3129
|
tableName: TableName;
|
2531
3130
|
workspace: string;
|
2532
3131
|
};
|
2533
3132
|
declare type BulkInsertTableRecordsQueryParams = {
|
3133
|
+
/**
|
3134
|
+
* Column filters
|
3135
|
+
*/
|
2534
3136
|
columns?: ColumnsProjection;
|
2535
3137
|
};
|
2536
3138
|
declare type BulkInsertTableRecordsError = ErrorWrapper<{
|
@@ -2559,7 +3161,13 @@ declare type BulkInsertTableRecordsVariables = {
|
|
2559
3161
|
*/
|
2560
3162
|
declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
|
2561
3163
|
declare type QueryTablePathParams = {
|
3164
|
+
/**
|
3165
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3166
|
+
*/
|
2562
3167
|
dbBranchName: DBBranchName;
|
3168
|
+
/**
|
3169
|
+
* The Table name
|
3170
|
+
*/
|
2563
3171
|
tableName: TableName;
|
2564
3172
|
workspace: string;
|
2565
3173
|
};
|
@@ -2613,8 +3221,9 @@ declare type QueryTableVariables = {
|
|
2613
3221
|
* If the `columns` array is not specified, all columns are included. For link
|
2614
3222
|
* fields, only the ID column of the linked records is included in the response.
|
2615
3223
|
*
|
2616
|
-
* If the `columns` array is specified, only the selected
|
2617
|
-
* The `*` wildcard can be used to
|
3224
|
+
* If the `columns` array is specified, only the selected and internal
|
3225
|
+
* columns `id` and `xata` are included. The `*` wildcard can be used to
|
3226
|
+
* select all columns.
|
2618
3227
|
*
|
2619
3228
|
* For objects and link fields, if the column name of the object is specified, we
|
2620
3229
|
* include all of its sub-keys. If only some sub-keys are specified (via dotted
|
@@ -2730,6 +3339,10 @@ declare type QueryTableVariables = {
|
|
2730
3339
|
*
|
2731
3340
|
* ```json
|
2732
3341
|
* {
|
3342
|
+
* "id": "id1"
|
3343
|
+
* "xata": {
|
3344
|
+
* "version": 0
|
3345
|
+
* }
|
2733
3346
|
* "name": "Kilian",
|
2734
3347
|
* "address": {
|
2735
3348
|
* "street": "New street"
|
@@ -2749,6 +3362,10 @@ declare type QueryTableVariables = {
|
|
2749
3362
|
*
|
2750
3363
|
* ```json
|
2751
3364
|
* {
|
3365
|
+
* "id": "id1"
|
3366
|
+
* "xata": {
|
3367
|
+
* "version": 0
|
3368
|
+
* }
|
2752
3369
|
* "name": "Kilian",
|
2753
3370
|
* "email": "kilian@gmail.com",
|
2754
3371
|
* "address": {
|
@@ -2778,6 +3395,10 @@ declare type QueryTableVariables = {
|
|
2778
3395
|
*
|
2779
3396
|
* ```json
|
2780
3397
|
* {
|
3398
|
+
* "id": "id1"
|
3399
|
+
* "xata": {
|
3400
|
+
* "version": 0
|
3401
|
+
* }
|
2781
3402
|
* "name": "Kilian",
|
2782
3403
|
* "email": "kilian@gmail.com",
|
2783
3404
|
* "address": {
|
@@ -3306,7 +3927,13 @@ declare type QueryTableVariables = {
|
|
3306
3927
|
*/
|
3307
3928
|
declare const queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
|
3308
3929
|
declare type SearchTablePathParams = {
|
3930
|
+
/**
|
3931
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3932
|
+
*/
|
3309
3933
|
dbBranchName: DBBranchName;
|
3934
|
+
/**
|
3935
|
+
* The Table name
|
3936
|
+
*/
|
3310
3937
|
tableName: TableName;
|
3311
3938
|
workspace: string;
|
3312
3939
|
};
|
@@ -3321,6 +3948,11 @@ declare type SearchTableError = ErrorWrapper<{
|
|
3321
3948
|
payload: SimpleError;
|
3322
3949
|
}>;
|
3323
3950
|
declare type SearchTableRequestBody = {
|
3951
|
+
/**
|
3952
|
+
* The query string.
|
3953
|
+
*
|
3954
|
+
* @minLength 1
|
3955
|
+
*/
|
3324
3956
|
query: string;
|
3325
3957
|
fuzziness?: FuzzinessExpression;
|
3326
3958
|
prefix?: PrefixExpression;
|
@@ -3341,6 +3973,9 @@ declare type SearchTableVariables = {
|
|
3341
3973
|
*/
|
3342
3974
|
declare const searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
|
3343
3975
|
declare type SearchBranchPathParams = {
|
3976
|
+
/**
|
3977
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3978
|
+
*/
|
3344
3979
|
dbBranchName: DBBranchName;
|
3345
3980
|
workspace: string;
|
3346
3981
|
};
|
@@ -3355,11 +3990,22 @@ declare type SearchBranchError = ErrorWrapper<{
|
|
3355
3990
|
payload: SimpleError;
|
3356
3991
|
}>;
|
3357
3992
|
declare type SearchBranchRequestBody = {
|
3993
|
+
/**
|
3994
|
+
* 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.
|
3995
|
+
*/
|
3358
3996
|
tables?: (string | {
|
3997
|
+
/**
|
3998
|
+
* The name of the table.
|
3999
|
+
*/
|
3359
4000
|
table: string;
|
3360
4001
|
filter?: FilterExpression;
|
3361
4002
|
boosters?: BoosterExpression[];
|
3362
4003
|
})[];
|
4004
|
+
/**
|
4005
|
+
* The query string.
|
4006
|
+
*
|
4007
|
+
* @minLength 1
|
4008
|
+
*/
|
3363
4009
|
query: string;
|
3364
4010
|
fuzziness?: FuzzinessExpression;
|
3365
4011
|
prefix?: PrefixExpression;
|
@@ -3374,7 +4020,13 @@ declare type SearchBranchVariables = {
|
|
3374
4020
|
*/
|
3375
4021
|
declare const searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
|
3376
4022
|
declare type SummarizeTablePathParams = {
|
4023
|
+
/**
|
4024
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4025
|
+
*/
|
3377
4026
|
dbBranchName: DBBranchName;
|
4027
|
+
/**
|
4028
|
+
* The Table name
|
4029
|
+
*/
|
3378
4030
|
tableName: TableName;
|
3379
4031
|
workspace: string;
|
3380
4032
|
};
|
@@ -3389,15 +4041,53 @@ declare type SummarizeTableError = ErrorWrapper<{
|
|
3389
4041
|
payload: SimpleError;
|
3390
4042
|
}>;
|
3391
4043
|
declare type SummarizeTableRequestBody = {
|
3392
|
-
summaries?: SummaryExpressionList;
|
3393
4044
|
columns?: ColumnsProjection;
|
4045
|
+
summaries?: SummaryExpressionList;
|
4046
|
+
sort?: SortExpression;
|
3394
4047
|
};
|
3395
4048
|
declare type SummarizeTableVariables = {
|
3396
4049
|
body?: SummarizeTableRequestBody;
|
3397
4050
|
pathParams: SummarizeTablePathParams;
|
3398
4051
|
} & FetcherExtraProps;
|
3399
4052
|
/**
|
3400
|
-
*
|
4053
|
+
* This endpoint allows you to (optionally) define groups, and then to run
|
4054
|
+
* calculations on the values in each group. This is most helpful when you'd
|
4055
|
+
* like to understand the data you have in your database.
|
4056
|
+
*
|
4057
|
+
* A group is a combination of unique values. If you create a group for `sold_by`,
|
4058
|
+
* `product_name`, we will return one row for every combination of `sold_by` and
|
4059
|
+
* `product_name` you have in your database. When you want to calculate statistics,
|
4060
|
+
* you define these groups and ask Xata to calculate data on each group.
|
4061
|
+
*
|
4062
|
+
* **Some questions you can ask of your data:**
|
4063
|
+
*
|
4064
|
+
* How many records do I have in this table?
|
4065
|
+
* - Set `columns: []` as we we want data from the entire table, so we ask for no groups.
|
4066
|
+
* - Set `summaries: {"total": {"count": "*"}}` in order to see the count of all records.
|
4067
|
+
* We use `count: *` here we'd like to know the total amount of rows; ignoring whether
|
4068
|
+
* they are `null` or not.
|
4069
|
+
*
|
4070
|
+
* What are the top total sales for each product?
|
4071
|
+
* - Set `columns: [product_name]` as we'd like to run calculations on each unique product
|
4072
|
+
* name in our table. Setting `columns` like this will produce one row per unique product
|
4073
|
+
* name.
|
4074
|
+
* - Set `summaries: {"total_sales": {"count": "product_name"}}` as we'd like to create a
|
4075
|
+
* field called "total_sales" for each group. This field will count all rows in each group
|
4076
|
+
* with non-null product names.
|
4077
|
+
* - Set `sort: [{"total_sales": "desc"}]` in order to bring the rows with the highest
|
4078
|
+
* total_sales field to the top.
|
4079
|
+
*
|
4080
|
+
* `columns`: tells Xata how to create each group. If you add `product_id` we will create
|
4081
|
+
* a new group for every unique `product_id`.
|
4082
|
+
*
|
4083
|
+
* `summaries`: tells Xata which calculations to run on each group.
|
4084
|
+
*
|
4085
|
+
* `sort`: tells Xata in which order you'd like to see results. You may sort by fields
|
4086
|
+
* specified in `columns` as well as the summary names defined in `summaries`.
|
4087
|
+
*
|
4088
|
+
* note: Sorting on summarized values can be slower on very large tables; this will impact
|
4089
|
+
* your rate limit significantly more than other queries. Try use `filter` [coming soon] to
|
4090
|
+
* reduce the amount of data being processed in order to reduce impact on your limits.
|
3401
4091
|
*/
|
3402
4092
|
declare const summarizeTable: (variables: SummarizeTableVariables) => Promise<SummarizeResponse>;
|
3403
4093
|
declare const operationsByTag: {
|
@@ -4008,9 +4698,6 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
4008
4698
|
* @returns A new Query object.
|
4009
4699
|
*/
|
4010
4700
|
filter(filters?: Filter<Record>): Query<Record, Result>;
|
4011
|
-
defaultFilter<T>(column: string, value: T): T | {
|
4012
|
-
$includes: (T & string) | (T & string[]);
|
4013
|
-
};
|
4014
4701
|
/**
|
4015
4702
|
* Builds a new query with a new sort option.
|
4016
4703
|
* @param column The column name.
|