@xata.io/client 0.18.0 → 0.18.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 +12 -0
- package/dist/index.cjs +22 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +737 -12
- package/dist/index.mjs +22 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
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[] | {
|
@@ -415,6 +478,23 @@ declare type FuzzinessExpression = number;
|
|
415
478
|
* 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.
|
416
479
|
*/
|
417
480
|
declare type PrefixExpression = 'phrase' | 'disabled';
|
481
|
+
/**
|
482
|
+
* The target expression is used to filter the search results by the target columns.
|
483
|
+
*/
|
484
|
+
declare type TargetExpression = (string | {
|
485
|
+
/**
|
486
|
+
* The name of the column.
|
487
|
+
*/
|
488
|
+
column: string;
|
489
|
+
/**
|
490
|
+
* The weight of the column.
|
491
|
+
*
|
492
|
+
* @default 1
|
493
|
+
* @maximum 10
|
494
|
+
* @minimum 1
|
495
|
+
*/
|
496
|
+
weight?: number;
|
497
|
+
})[];
|
418
498
|
/**
|
419
499
|
* @minProperties 1
|
420
500
|
*/
|
@@ -429,23 +509,51 @@ declare type FilterExpression = {
|
|
429
509
|
[key: string]: FilterColumn;
|
430
510
|
};
|
431
511
|
/**
|
432
|
-
* The
|
512
|
+
* The description of the summaries you wish to receive. Set each key to be the field name
|
513
|
+
* you'd like for the summary. These names must not collide with other columns you've
|
514
|
+
* requested from `columns`; including implicit requests like `settings.*`.
|
433
515
|
*
|
516
|
+
* The value for each key needs to be an object. This object should contain one key and one
|
517
|
+
* value only. In this object, the key should be set to the summary function you wish to use
|
518
|
+
* and the value set to the column name to be summarized.
|
519
|
+
*
|
520
|
+
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
521
|
+
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
522
|
+
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
523
|
+
*
|
524
|
+
* @example {"all_users":{"count":"*"}}
|
525
|
+
* @example {"total_created":{"count":"created_at"}}
|
434
526
|
* @x-go-type xbquery.SummaryList
|
435
527
|
*/
|
436
528
|
declare type SummaryExpressionList = {
|
437
529
|
[key: string]: SummaryExpression;
|
438
530
|
};
|
439
531
|
/**
|
440
|
-
* A
|
532
|
+
* A summary expression is the description of a single summary operation. It consists of a single
|
533
|
+
* key representing the operation, and a value representing the column to be operated on.
|
534
|
+
*
|
535
|
+
* The column being summarized cannot be an internal column (id, xata.*), nor the base of
|
536
|
+
* an object, i.e. if `settings` is an object with `dark_mode` as a field, you may summarize
|
537
|
+
* `settings.dark_mode` but not `settings` nor `settings.*`.
|
441
538
|
*
|
442
|
-
*
|
539
|
+
* We currently support the `count` operation. When using `count`, one can set a column name
|
540
|
+
* as the value. Xata will return the total number times this column is non-null in each group.
|
443
541
|
*
|
542
|
+
* Alternately, if you'd like to count the total rows in each group - irregardless of null/not null
|
543
|
+
* status - you can set `count` to `*` to count everything.
|
544
|
+
*
|
545
|
+
* @example {"count":"deleted_at"}
|
444
546
|
* @x-go-type xbquery.Summary
|
445
547
|
*/
|
446
548
|
declare type SummaryExpression = Record<string, any>;
|
447
549
|
declare type HighlightExpression = {
|
550
|
+
/**
|
551
|
+
* Set to `false` to disable highlighting. By default it is `true`.
|
552
|
+
*/
|
448
553
|
enabled?: boolean;
|
554
|
+
/**
|
555
|
+
* Set to `false` to disable HTML encoding in highlight snippets. By default it is `true`.
|
556
|
+
*/
|
449
557
|
encodeHTML?: boolean;
|
450
558
|
};
|
451
559
|
/**
|
@@ -464,15 +572,30 @@ declare type BoosterExpression = {
|
|
464
572
|
* Boost records with a particular value for a column.
|
465
573
|
*/
|
466
574
|
declare type ValueBooster$1 = {
|
575
|
+
/**
|
576
|
+
* The column in which to look for the value.
|
577
|
+
*/
|
467
578
|
column: string;
|
579
|
+
/**
|
580
|
+
* The exact value to boost.
|
581
|
+
*/
|
468
582
|
value: string | number | boolean;
|
583
|
+
/**
|
584
|
+
* The factor with which to multiply the score of the record.
|
585
|
+
*/
|
469
586
|
factor: number;
|
470
587
|
};
|
471
588
|
/**
|
472
589
|
* Boost records based on the value of a numeric column.
|
473
590
|
*/
|
474
591
|
declare type NumericBooster$1 = {
|
592
|
+
/**
|
593
|
+
* The column in which to look for the value.
|
594
|
+
*/
|
475
595
|
column: string;
|
596
|
+
/**
|
597
|
+
* The factor with which to multiply the value of the column before adding it to the item score.
|
598
|
+
*/
|
476
599
|
factor: number;
|
477
600
|
};
|
478
601
|
/**
|
@@ -481,9 +604,24 @@ declare type NumericBooster$1 = {
|
|
481
604
|
* 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
605
|
*/
|
483
606
|
declare type DateBooster$1 = {
|
607
|
+
/**
|
608
|
+
* The column in which to look for the value.
|
609
|
+
*/
|
484
610
|
column: string;
|
611
|
+
/**
|
612
|
+
* 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.
|
613
|
+
* If it is not specified, the current date and time is used.
|
614
|
+
*/
|
485
615
|
origin?: string;
|
616
|
+
/**
|
617
|
+
* 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`.
|
618
|
+
*
|
619
|
+
* @pattern ^(\d+)(d|h|m|s|ms)$
|
620
|
+
*/
|
486
621
|
scale: string;
|
622
|
+
/**
|
623
|
+
* The decay factor to expect at "scale" distance from the "origin".
|
624
|
+
*/
|
487
625
|
decay: number;
|
488
626
|
};
|
489
627
|
declare type FilterList = FilterExpression | FilterExpression[];
|
@@ -535,13 +673,40 @@ declare type FilterValue = number | string | boolean;
|
|
535
673
|
* Pagination settings.
|
536
674
|
*/
|
537
675
|
declare type PageConfig = {
|
676
|
+
/**
|
677
|
+
* Query the next page that follow the cursor.
|
678
|
+
*/
|
538
679
|
after?: string;
|
680
|
+
/**
|
681
|
+
* Query the previous page before the cursor.
|
682
|
+
*/
|
539
683
|
before?: string;
|
684
|
+
/**
|
685
|
+
* Query the first page from the cursor.
|
686
|
+
*/
|
540
687
|
first?: string;
|
688
|
+
/**
|
689
|
+
* Query the last page from the cursor.
|
690
|
+
*/
|
541
691
|
last?: string;
|
692
|
+
/**
|
693
|
+
* 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.
|
694
|
+
*
|
695
|
+
* @default 20
|
696
|
+
*/
|
542
697
|
size?: number;
|
698
|
+
/**
|
699
|
+
* Use offset to skip entries. To skip pages set offset to a multiple of size.
|
700
|
+
*
|
701
|
+
* @default 0
|
702
|
+
*/
|
543
703
|
offset?: number;
|
544
704
|
};
|
705
|
+
/**
|
706
|
+
* @example name
|
707
|
+
* @example email
|
708
|
+
* @example created_at
|
709
|
+
*/
|
545
710
|
declare type ColumnsProjection = string[];
|
546
711
|
/**
|
547
712
|
* Xata Table Record Metadata
|
@@ -549,14 +714,29 @@ declare type ColumnsProjection = string[];
|
|
549
714
|
declare type RecordMeta = {
|
550
715
|
id: RecordID;
|
551
716
|
xata: {
|
717
|
+
/**
|
718
|
+
* The record's version. Can be used for optimistic concurrency control.
|
719
|
+
*/
|
552
720
|
version: number;
|
721
|
+
/**
|
722
|
+
* The record's table name. APIs that return records from multiple tables will set this field accordingly.
|
723
|
+
*/
|
553
724
|
table?: string;
|
725
|
+
/**
|
726
|
+
* Highlights of the record. This is used by the search APIs to indicate which fields and parts of the fields have matched the search.
|
727
|
+
*/
|
554
728
|
highlight?: {
|
555
729
|
[key: string]: string[] | {
|
556
730
|
[key: string]: any;
|
557
731
|
};
|
558
732
|
};
|
733
|
+
/**
|
734
|
+
* The record's relevancy score. This is returned by the search APIs.
|
735
|
+
*/
|
559
736
|
score?: number;
|
737
|
+
/**
|
738
|
+
* Encoding/Decoding errors
|
739
|
+
*/
|
560
740
|
warnings?: string[];
|
561
741
|
};
|
562
742
|
};
|
@@ -568,7 +748,13 @@ declare type RecordID = string;
|
|
568
748
|
* @example {"newName":"newName","oldName":"oldName"}
|
569
749
|
*/
|
570
750
|
declare type TableRename = {
|
751
|
+
/**
|
752
|
+
* @minLength 1
|
753
|
+
*/
|
571
754
|
newName: string;
|
755
|
+
/**
|
756
|
+
* @minLength 1
|
757
|
+
*/
|
572
758
|
oldName: string;
|
573
759
|
};
|
574
760
|
/**
|
@@ -576,7 +762,13 @@ declare type TableRename = {
|
|
576
762
|
*/
|
577
763
|
declare type RecordsMetadata = {
|
578
764
|
page: {
|
765
|
+
/**
|
766
|
+
* last record id
|
767
|
+
*/
|
579
768
|
cursor: string;
|
769
|
+
/**
|
770
|
+
* true if more records can be fetch
|
771
|
+
*/
|
580
772
|
more: boolean;
|
581
773
|
};
|
582
774
|
};
|
@@ -641,6 +833,7 @@ type schemas_SortExpression = SortExpression;
|
|
641
833
|
type schemas_SortOrder = SortOrder;
|
642
834
|
type schemas_FuzzinessExpression = FuzzinessExpression;
|
643
835
|
type schemas_PrefixExpression = PrefixExpression;
|
836
|
+
type schemas_TargetExpression = TargetExpression;
|
644
837
|
type schemas_FilterExpression = FilterExpression;
|
645
838
|
type schemas_SummaryExpressionList = SummaryExpressionList;
|
646
839
|
type schemas_SummaryExpression = SummaryExpression;
|
@@ -716,6 +909,7 @@ declare namespace schemas {
|
|
716
909
|
schemas_SortOrder as SortOrder,
|
717
910
|
schemas_FuzzinessExpression as FuzzinessExpression,
|
718
911
|
schemas_PrefixExpression as PrefixExpression,
|
912
|
+
schemas_TargetExpression as TargetExpression,
|
719
913
|
schemas_FilterExpression as FilterExpression,
|
720
914
|
schemas_SummaryExpressionList as SummaryExpressionList,
|
721
915
|
schemas_SummaryExpression as SummaryExpression,
|
@@ -799,11 +993,15 @@ declare type SummarizeResponse = {
|
|
799
993
|
};
|
800
994
|
declare type SearchResponse = {
|
801
995
|
records: XataRecord$1[];
|
996
|
+
warning?: string;
|
802
997
|
};
|
803
998
|
/**
|
804
999
|
* @example {"migrationID":"mig_c7m19ilcefoebpqj12p0"}
|
805
1000
|
*/
|
806
1001
|
declare type MigrationIdResponse = {
|
1002
|
+
/**
|
1003
|
+
* @minLength 1
|
1004
|
+
*/
|
807
1005
|
migrationID: string;
|
808
1006
|
};
|
809
1007
|
|
@@ -913,6 +1111,9 @@ declare type GetUserAPIKeysVariables = FetcherExtraProps;
|
|
913
1111
|
*/
|
914
1112
|
declare const getUserAPIKeys: (variables: GetUserAPIKeysVariables) => Promise<GetUserAPIKeysResponse>;
|
915
1113
|
declare type CreateUserAPIKeyPathParams = {
|
1114
|
+
/**
|
1115
|
+
* API Key name
|
1116
|
+
*/
|
916
1117
|
keyName: APIKeyName;
|
917
1118
|
};
|
918
1119
|
declare type CreateUserAPIKeyError = ErrorWrapper<{
|
@@ -938,6 +1139,9 @@ declare type CreateUserAPIKeyVariables = {
|
|
938
1139
|
*/
|
939
1140
|
declare const createUserAPIKey: (variables: CreateUserAPIKeyVariables) => Promise<CreateUserAPIKeyResponse>;
|
940
1141
|
declare type DeleteUserAPIKeyPathParams = {
|
1142
|
+
/**
|
1143
|
+
* API Key name
|
1144
|
+
*/
|
941
1145
|
keyName: APIKeyName;
|
942
1146
|
};
|
943
1147
|
declare type DeleteUserAPIKeyError = ErrorWrapper<{
|
@@ -998,6 +1202,9 @@ declare type GetWorkspacesListVariables = FetcherExtraProps;
|
|
998
1202
|
*/
|
999
1203
|
declare const getWorkspacesList: (variables: GetWorkspacesListVariables) => Promise<GetWorkspacesListResponse>;
|
1000
1204
|
declare type GetWorkspacePathParams = {
|
1205
|
+
/**
|
1206
|
+
* Workspace name
|
1207
|
+
*/
|
1001
1208
|
workspaceId: WorkspaceID;
|
1002
1209
|
};
|
1003
1210
|
declare type GetWorkspaceError = ErrorWrapper<{
|
@@ -1018,6 +1225,9 @@ declare type GetWorkspaceVariables = {
|
|
1018
1225
|
*/
|
1019
1226
|
declare const getWorkspace: (variables: GetWorkspaceVariables) => Promise<Workspace>;
|
1020
1227
|
declare type UpdateWorkspacePathParams = {
|
1228
|
+
/**
|
1229
|
+
* Workspace name
|
1230
|
+
*/
|
1021
1231
|
workspaceId: WorkspaceID;
|
1022
1232
|
};
|
1023
1233
|
declare type UpdateWorkspaceError = ErrorWrapper<{
|
@@ -1039,6 +1249,9 @@ declare type UpdateWorkspaceVariables = {
|
|
1039
1249
|
*/
|
1040
1250
|
declare const updateWorkspace: (variables: UpdateWorkspaceVariables) => Promise<Workspace>;
|
1041
1251
|
declare type DeleteWorkspacePathParams = {
|
1252
|
+
/**
|
1253
|
+
* Workspace name
|
1254
|
+
*/
|
1042
1255
|
workspaceId: WorkspaceID;
|
1043
1256
|
};
|
1044
1257
|
declare type DeleteWorkspaceError = ErrorWrapper<{
|
@@ -1059,6 +1272,9 @@ declare type DeleteWorkspaceVariables = {
|
|
1059
1272
|
*/
|
1060
1273
|
declare const deleteWorkspace: (variables: DeleteWorkspaceVariables) => Promise<undefined>;
|
1061
1274
|
declare type GetWorkspaceMembersListPathParams = {
|
1275
|
+
/**
|
1276
|
+
* Workspace name
|
1277
|
+
*/
|
1062
1278
|
workspaceId: WorkspaceID;
|
1063
1279
|
};
|
1064
1280
|
declare type GetWorkspaceMembersListError = ErrorWrapper<{
|
@@ -1079,7 +1295,13 @@ declare type GetWorkspaceMembersListVariables = {
|
|
1079
1295
|
*/
|
1080
1296
|
declare const getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables) => Promise<WorkspaceMembers>;
|
1081
1297
|
declare type UpdateWorkspaceMemberRolePathParams = {
|
1298
|
+
/**
|
1299
|
+
* Workspace name
|
1300
|
+
*/
|
1082
1301
|
workspaceId: WorkspaceID;
|
1302
|
+
/**
|
1303
|
+
* UserID
|
1304
|
+
*/
|
1083
1305
|
userId: UserID;
|
1084
1306
|
};
|
1085
1307
|
declare type UpdateWorkspaceMemberRoleError = ErrorWrapper<{
|
@@ -1104,7 +1326,13 @@ declare type UpdateWorkspaceMemberRoleVariables = {
|
|
1104
1326
|
*/
|
1105
1327
|
declare const updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables) => Promise<undefined>;
|
1106
1328
|
declare type RemoveWorkspaceMemberPathParams = {
|
1329
|
+
/**
|
1330
|
+
* Workspace name
|
1331
|
+
*/
|
1107
1332
|
workspaceId: WorkspaceID;
|
1333
|
+
/**
|
1334
|
+
* UserID
|
1335
|
+
*/
|
1108
1336
|
userId: UserID;
|
1109
1337
|
};
|
1110
1338
|
declare type RemoveWorkspaceMemberError = ErrorWrapper<{
|
@@ -1125,6 +1353,9 @@ declare type RemoveWorkspaceMemberVariables = {
|
|
1125
1353
|
*/
|
1126
1354
|
declare const removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables) => Promise<undefined>;
|
1127
1355
|
declare type InviteWorkspaceMemberPathParams = {
|
1356
|
+
/**
|
1357
|
+
* Workspace name
|
1358
|
+
*/
|
1128
1359
|
workspaceId: WorkspaceID;
|
1129
1360
|
};
|
1130
1361
|
declare type InviteWorkspaceMemberError = ErrorWrapper<{
|
@@ -1141,6 +1372,9 @@ declare type InviteWorkspaceMemberError = ErrorWrapper<{
|
|
1141
1372
|
payload: SimpleError;
|
1142
1373
|
}>;
|
1143
1374
|
declare type InviteWorkspaceMemberRequestBody = {
|
1375
|
+
/**
|
1376
|
+
* @format email
|
1377
|
+
*/
|
1144
1378
|
email: string;
|
1145
1379
|
role: Role;
|
1146
1380
|
};
|
@@ -1153,7 +1387,13 @@ declare type InviteWorkspaceMemberVariables = {
|
|
1153
1387
|
*/
|
1154
1388
|
declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<WorkspaceInvite>;
|
1155
1389
|
declare type UpdateWorkspaceMemberInvitePathParams = {
|
1390
|
+
/**
|
1391
|
+
* Workspace name
|
1392
|
+
*/
|
1156
1393
|
workspaceId: WorkspaceID;
|
1394
|
+
/**
|
1395
|
+
* Invite identifier
|
1396
|
+
*/
|
1157
1397
|
inviteId: InviteID;
|
1158
1398
|
};
|
1159
1399
|
declare type UpdateWorkspaceMemberInviteError = ErrorWrapper<{
|
@@ -1181,7 +1421,13 @@ declare type UpdateWorkspaceMemberInviteVariables = {
|
|
1181
1421
|
*/
|
1182
1422
|
declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<WorkspaceInvite>;
|
1183
1423
|
declare type CancelWorkspaceMemberInvitePathParams = {
|
1424
|
+
/**
|
1425
|
+
* Workspace name
|
1426
|
+
*/
|
1184
1427
|
workspaceId: WorkspaceID;
|
1428
|
+
/**
|
1429
|
+
* Invite identifier
|
1430
|
+
*/
|
1185
1431
|
inviteId: InviteID;
|
1186
1432
|
};
|
1187
1433
|
declare type CancelWorkspaceMemberInviteError = ErrorWrapper<{
|
@@ -1202,7 +1448,13 @@ declare type CancelWorkspaceMemberInviteVariables = {
|
|
1202
1448
|
*/
|
1203
1449
|
declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>;
|
1204
1450
|
declare type ResendWorkspaceMemberInvitePathParams = {
|
1451
|
+
/**
|
1452
|
+
* Workspace name
|
1453
|
+
*/
|
1205
1454
|
workspaceId: WorkspaceID;
|
1455
|
+
/**
|
1456
|
+
* Invite identifier
|
1457
|
+
*/
|
1206
1458
|
inviteId: InviteID;
|
1207
1459
|
};
|
1208
1460
|
declare type ResendWorkspaceMemberInviteError = ErrorWrapper<{
|
@@ -1223,7 +1475,13 @@ declare type ResendWorkspaceMemberInviteVariables = {
|
|
1223
1475
|
*/
|
1224
1476
|
declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>;
|
1225
1477
|
declare type AcceptWorkspaceMemberInvitePathParams = {
|
1478
|
+
/**
|
1479
|
+
* Workspace name
|
1480
|
+
*/
|
1226
1481
|
workspaceId: WorkspaceID;
|
1482
|
+
/**
|
1483
|
+
* Invite Key (secret) for the invited user
|
1484
|
+
*/
|
1227
1485
|
inviteKey: InviteKey;
|
1228
1486
|
};
|
1229
1487
|
declare type AcceptWorkspaceMemberInviteError = ErrorWrapper<{
|
@@ -1261,6 +1519,9 @@ declare type GetDatabaseListVariables = {
|
|
1261
1519
|
*/
|
1262
1520
|
declare const getDatabaseList: (variables: GetDatabaseListVariables) => Promise<ListDatabasesResponse>;
|
1263
1521
|
declare type GetBranchListPathParams = {
|
1522
|
+
/**
|
1523
|
+
* The Database Name
|
1524
|
+
*/
|
1264
1525
|
dbName: DBName;
|
1265
1526
|
workspace: string;
|
1266
1527
|
};
|
@@ -1282,6 +1543,9 @@ declare type GetBranchListVariables = {
|
|
1282
1543
|
*/
|
1283
1544
|
declare const getBranchList: (variables: GetBranchListVariables) => Promise<ListBranchesResponse>;
|
1284
1545
|
declare type CreateDatabasePathParams = {
|
1546
|
+
/**
|
1547
|
+
* The Database Name
|
1548
|
+
*/
|
1285
1549
|
dbName: DBName;
|
1286
1550
|
workspace: string;
|
1287
1551
|
};
|
@@ -1293,10 +1557,16 @@ declare type CreateDatabaseError = ErrorWrapper<{
|
|
1293
1557
|
payload: AuthError;
|
1294
1558
|
}>;
|
1295
1559
|
declare type CreateDatabaseResponse = {
|
1560
|
+
/**
|
1561
|
+
* @minLength 1
|
1562
|
+
*/
|
1296
1563
|
databaseName: string;
|
1297
1564
|
branchName?: string;
|
1298
1565
|
};
|
1299
1566
|
declare type CreateDatabaseRequestBody = {
|
1567
|
+
/**
|
1568
|
+
* @minLength 1
|
1569
|
+
*/
|
1300
1570
|
branchName?: string;
|
1301
1571
|
ui?: {
|
1302
1572
|
color?: string;
|
@@ -1312,6 +1582,9 @@ declare type CreateDatabaseVariables = {
|
|
1312
1582
|
*/
|
1313
1583
|
declare const createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
|
1314
1584
|
declare type DeleteDatabasePathParams = {
|
1585
|
+
/**
|
1586
|
+
* The Database Name
|
1587
|
+
*/
|
1315
1588
|
dbName: DBName;
|
1316
1589
|
workspace: string;
|
1317
1590
|
};
|
@@ -1333,6 +1606,9 @@ declare type DeleteDatabaseVariables = {
|
|
1333
1606
|
*/
|
1334
1607
|
declare const deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
|
1335
1608
|
declare type GetDatabaseMetadataPathParams = {
|
1609
|
+
/**
|
1610
|
+
* The Database Name
|
1611
|
+
*/
|
1336
1612
|
dbName: DBName;
|
1337
1613
|
workspace: string;
|
1338
1614
|
};
|
@@ -1354,6 +1630,9 @@ declare type GetDatabaseMetadataVariables = {
|
|
1354
1630
|
*/
|
1355
1631
|
declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
1356
1632
|
declare type UpdateDatabaseMetadataPathParams = {
|
1633
|
+
/**
|
1634
|
+
* The Database Name
|
1635
|
+
*/
|
1357
1636
|
dbName: DBName;
|
1358
1637
|
workspace: string;
|
1359
1638
|
};
|
@@ -1369,6 +1648,9 @@ declare type UpdateDatabaseMetadataError = ErrorWrapper<{
|
|
1369
1648
|
}>;
|
1370
1649
|
declare type UpdateDatabaseMetadataRequestBody = {
|
1371
1650
|
ui?: {
|
1651
|
+
/**
|
1652
|
+
* @minLength 1
|
1653
|
+
*/
|
1372
1654
|
color?: string;
|
1373
1655
|
};
|
1374
1656
|
};
|
@@ -1381,6 +1663,9 @@ declare type UpdateDatabaseMetadataVariables = {
|
|
1381
1663
|
*/
|
1382
1664
|
declare const updateDatabaseMetadata: (variables: UpdateDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
1383
1665
|
declare type GetGitBranchesMappingPathParams = {
|
1666
|
+
/**
|
1667
|
+
* The Database Name
|
1668
|
+
*/
|
1384
1669
|
dbName: DBName;
|
1385
1670
|
workspace: string;
|
1386
1671
|
};
|
@@ -1420,6 +1705,9 @@ declare type GetGitBranchesMappingVariables = {
|
|
1420
1705
|
*/
|
1421
1706
|
declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
|
1422
1707
|
declare type AddGitBranchesEntryPathParams = {
|
1708
|
+
/**
|
1709
|
+
* The Database Name
|
1710
|
+
*/
|
1423
1711
|
dbName: DBName;
|
1424
1712
|
workspace: string;
|
1425
1713
|
};
|
@@ -1431,10 +1719,19 @@ declare type AddGitBranchesEntryError = ErrorWrapper<{
|
|
1431
1719
|
payload: AuthError;
|
1432
1720
|
}>;
|
1433
1721
|
declare type AddGitBranchesEntryResponse = {
|
1722
|
+
/**
|
1723
|
+
* Warning message
|
1724
|
+
*/
|
1434
1725
|
warning?: string;
|
1435
1726
|
};
|
1436
1727
|
declare type AddGitBranchesEntryRequestBody = {
|
1728
|
+
/**
|
1729
|
+
* The name of the Git branch.
|
1730
|
+
*/
|
1437
1731
|
gitBranch: string;
|
1732
|
+
/**
|
1733
|
+
* The name of the Xata branch.
|
1734
|
+
*/
|
1438
1735
|
xataBranch: BranchName;
|
1439
1736
|
};
|
1440
1737
|
declare type AddGitBranchesEntryVariables = {
|
@@ -1458,10 +1755,16 @@ declare type AddGitBranchesEntryVariables = {
|
|
1458
1755
|
*/
|
1459
1756
|
declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
|
1460
1757
|
declare type RemoveGitBranchesEntryPathParams = {
|
1758
|
+
/**
|
1759
|
+
* The Database Name
|
1760
|
+
*/
|
1461
1761
|
dbName: DBName;
|
1462
1762
|
workspace: string;
|
1463
1763
|
};
|
1464
1764
|
declare type RemoveGitBranchesEntryQueryParams = {
|
1765
|
+
/**
|
1766
|
+
* The Git Branch to remove from the mapping
|
1767
|
+
*/
|
1465
1768
|
gitBranch: string;
|
1466
1769
|
};
|
1467
1770
|
declare type RemoveGitBranchesEntryError = ErrorWrapper<{
|
@@ -1486,11 +1789,20 @@ declare type RemoveGitBranchesEntryVariables = {
|
|
1486
1789
|
*/
|
1487
1790
|
declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
|
1488
1791
|
declare type ResolveBranchPathParams = {
|
1792
|
+
/**
|
1793
|
+
* The Database Name
|
1794
|
+
*/
|
1489
1795
|
dbName: DBName;
|
1490
1796
|
workspace: string;
|
1491
1797
|
};
|
1492
1798
|
declare type ResolveBranchQueryParams = {
|
1799
|
+
/**
|
1800
|
+
* The Git Branch
|
1801
|
+
*/
|
1493
1802
|
gitBranch?: string;
|
1803
|
+
/**
|
1804
|
+
* Default branch to fallback to
|
1805
|
+
*/
|
1494
1806
|
fallbackBranch?: string;
|
1495
1807
|
};
|
1496
1808
|
declare type ResolveBranchError = ErrorWrapper<{
|
@@ -1538,6 +1850,9 @@ declare type ResolveBranchVariables = {
|
|
1538
1850
|
*/
|
1539
1851
|
declare const resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
|
1540
1852
|
declare type ListMigrationRequestsPathParams = {
|
1853
|
+
/**
|
1854
|
+
* The Database Name
|
1855
|
+
*/
|
1541
1856
|
dbName: DBName;
|
1542
1857
|
workspace: string;
|
1543
1858
|
};
|
@@ -1567,6 +1882,9 @@ declare type ListMigrationRequestsVariables = {
|
|
1567
1882
|
} & FetcherExtraProps;
|
1568
1883
|
declare const listMigrationRequests: (variables: ListMigrationRequestsVariables) => Promise<ListMigrationRequestsResponse>;
|
1569
1884
|
declare type CreateMigrationRequestPathParams = {
|
1885
|
+
/**
|
1886
|
+
* The Database Name
|
1887
|
+
*/
|
1570
1888
|
dbName: DBName;
|
1571
1889
|
workspace: string;
|
1572
1890
|
};
|
@@ -1584,9 +1902,21 @@ declare type CreateMigrationRequestResponse = {
|
|
1584
1902
|
number: number;
|
1585
1903
|
};
|
1586
1904
|
declare type CreateMigrationRequestRequestBody = {
|
1905
|
+
/**
|
1906
|
+
* The source branch.
|
1907
|
+
*/
|
1587
1908
|
source: string;
|
1909
|
+
/**
|
1910
|
+
* The target branch.
|
1911
|
+
*/
|
1588
1912
|
target: string;
|
1913
|
+
/**
|
1914
|
+
* The title.
|
1915
|
+
*/
|
1589
1916
|
title: string;
|
1917
|
+
/**
|
1918
|
+
* Optional migration request description.
|
1919
|
+
*/
|
1590
1920
|
body?: string;
|
1591
1921
|
};
|
1592
1922
|
declare type CreateMigrationRequestVariables = {
|
@@ -1595,7 +1925,13 @@ declare type CreateMigrationRequestVariables = {
|
|
1595
1925
|
} & FetcherExtraProps;
|
1596
1926
|
declare const createMigrationRequest: (variables: CreateMigrationRequestVariables) => Promise<CreateMigrationRequestResponse>;
|
1597
1927
|
declare type GetMigrationRequestPathParams = {
|
1928
|
+
/**
|
1929
|
+
* The Database Name
|
1930
|
+
*/
|
1598
1931
|
dbName: DBName;
|
1932
|
+
/**
|
1933
|
+
* The migration request number.
|
1934
|
+
*/
|
1599
1935
|
mrNumber: number;
|
1600
1936
|
workspace: string;
|
1601
1937
|
};
|
@@ -1614,7 +1950,13 @@ declare type GetMigrationRequestVariables = {
|
|
1614
1950
|
} & FetcherExtraProps;
|
1615
1951
|
declare const getMigrationRequest: (variables: GetMigrationRequestVariables) => Promise<MigrationRequest>;
|
1616
1952
|
declare type UpdateMigrationRequestPathParams = {
|
1953
|
+
/**
|
1954
|
+
* The Database Name
|
1955
|
+
*/
|
1617
1956
|
dbName: DBName;
|
1957
|
+
/**
|
1958
|
+
* The migration request number.
|
1959
|
+
*/
|
1618
1960
|
mrNumber: number;
|
1619
1961
|
workspace: string;
|
1620
1962
|
};
|
@@ -1629,8 +1971,17 @@ declare type UpdateMigrationRequestError = ErrorWrapper<{
|
|
1629
1971
|
payload: SimpleError;
|
1630
1972
|
}>;
|
1631
1973
|
declare type UpdateMigrationRequestRequestBody = {
|
1974
|
+
/**
|
1975
|
+
* New migration request title.
|
1976
|
+
*/
|
1632
1977
|
title?: string;
|
1978
|
+
/**
|
1979
|
+
* New migration request description.
|
1980
|
+
*/
|
1633
1981
|
body?: string;
|
1982
|
+
/**
|
1983
|
+
* Change the migration request status.
|
1984
|
+
*/
|
1634
1985
|
status?: 'open' | 'closed';
|
1635
1986
|
};
|
1636
1987
|
declare type UpdateMigrationRequestVariables = {
|
@@ -1639,7 +1990,13 @@ declare type UpdateMigrationRequestVariables = {
|
|
1639
1990
|
} & FetcherExtraProps;
|
1640
1991
|
declare const updateMigrationRequest: (variables: UpdateMigrationRequestVariables) => Promise<undefined>;
|
1641
1992
|
declare type ListMigrationRequestsCommitsPathParams = {
|
1993
|
+
/**
|
1994
|
+
* The Database Name
|
1995
|
+
*/
|
1642
1996
|
dbName: DBName;
|
1997
|
+
/**
|
1998
|
+
* The migration request number.
|
1999
|
+
*/
|
1643
2000
|
mrNumber: number;
|
1644
2001
|
workspace: string;
|
1645
2002
|
};
|
@@ -1655,15 +2012,32 @@ declare type ListMigrationRequestsCommitsError = ErrorWrapper<{
|
|
1655
2012
|
}>;
|
1656
2013
|
declare type ListMigrationRequestsCommitsResponse = {
|
1657
2014
|
meta: {
|
2015
|
+
/**
|
2016
|
+
* last record id
|
2017
|
+
*/
|
1658
2018
|
cursor: string;
|
2019
|
+
/**
|
2020
|
+
* true if more records can be fetch
|
2021
|
+
*/
|
1659
2022
|
more: boolean;
|
1660
2023
|
};
|
1661
2024
|
logs: Commit[];
|
1662
2025
|
};
|
1663
2026
|
declare type ListMigrationRequestsCommitsRequestBody = {
|
1664
2027
|
page?: {
|
2028
|
+
/**
|
2029
|
+
* Query the next page that follow the cursor.
|
2030
|
+
*/
|
1665
2031
|
after?: string;
|
2032
|
+
/**
|
2033
|
+
* Query the previous page before the cursor.
|
2034
|
+
*/
|
1666
2035
|
before?: string;
|
2036
|
+
/**
|
2037
|
+
* 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.
|
2038
|
+
*
|
2039
|
+
* @default 20
|
2040
|
+
*/
|
1667
2041
|
size?: number;
|
1668
2042
|
};
|
1669
2043
|
};
|
@@ -1673,7 +2047,13 @@ declare type ListMigrationRequestsCommitsVariables = {
|
|
1673
2047
|
} & FetcherExtraProps;
|
1674
2048
|
declare const listMigrationRequestsCommits: (variables: ListMigrationRequestsCommitsVariables) => Promise<ListMigrationRequestsCommitsResponse>;
|
1675
2049
|
declare type CompareMigrationRequestPathParams = {
|
2050
|
+
/**
|
2051
|
+
* The Database Name
|
2052
|
+
*/
|
1676
2053
|
dbName: DBName;
|
2054
|
+
/**
|
2055
|
+
* The migration request number.
|
2056
|
+
*/
|
1677
2057
|
mrNumber: number;
|
1678
2058
|
workspace: string;
|
1679
2059
|
};
|
@@ -1692,7 +2072,13 @@ declare type CompareMigrationRequestVariables = {
|
|
1692
2072
|
} & FetcherExtraProps;
|
1693
2073
|
declare const compareMigrationRequest: (variables: CompareMigrationRequestVariables) => Promise<SchemaCompareResponse>;
|
1694
2074
|
declare type GetMigrationRequestIsMergedPathParams = {
|
2075
|
+
/**
|
2076
|
+
* The Database Name
|
2077
|
+
*/
|
1695
2078
|
dbName: DBName;
|
2079
|
+
/**
|
2080
|
+
* The migration request number.
|
2081
|
+
*/
|
1696
2082
|
mrNumber: number;
|
1697
2083
|
workspace: string;
|
1698
2084
|
};
|
@@ -1714,7 +2100,13 @@ declare type GetMigrationRequestIsMergedVariables = {
|
|
1714
2100
|
} & FetcherExtraProps;
|
1715
2101
|
declare const getMigrationRequestIsMerged: (variables: GetMigrationRequestIsMergedVariables) => Promise<GetMigrationRequestIsMergedResponse>;
|
1716
2102
|
declare type MergeMigrationRequestPathParams = {
|
2103
|
+
/**
|
2104
|
+
* The Database Name
|
2105
|
+
*/
|
1717
2106
|
dbName: DBName;
|
2107
|
+
/**
|
2108
|
+
* The migration request number.
|
2109
|
+
*/
|
1718
2110
|
mrNumber: number;
|
1719
2111
|
workspace: string;
|
1720
2112
|
};
|
@@ -1733,6 +2125,9 @@ declare type MergeMigrationRequestVariables = {
|
|
1733
2125
|
} & FetcherExtraProps;
|
1734
2126
|
declare const mergeMigrationRequest: (variables: MergeMigrationRequestVariables) => Promise<Commit>;
|
1735
2127
|
declare type GetBranchDetailsPathParams = {
|
2128
|
+
/**
|
2129
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2130
|
+
*/
|
1736
2131
|
dbBranchName: DBBranchName;
|
1737
2132
|
workspace: string;
|
1738
2133
|
};
|
@@ -1751,10 +2146,16 @@ declare type GetBranchDetailsVariables = {
|
|
1751
2146
|
} & FetcherExtraProps;
|
1752
2147
|
declare const getBranchDetails: (variables: GetBranchDetailsVariables) => Promise<DBBranch>;
|
1753
2148
|
declare type CreateBranchPathParams = {
|
2149
|
+
/**
|
2150
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2151
|
+
*/
|
1754
2152
|
dbBranchName: DBBranchName;
|
1755
2153
|
workspace: string;
|
1756
2154
|
};
|
1757
2155
|
declare type CreateBranchQueryParams = {
|
2156
|
+
/**
|
2157
|
+
* Name of source branch to branch the new schema from
|
2158
|
+
*/
|
1758
2159
|
from?: string;
|
1759
2160
|
};
|
1760
2161
|
declare type CreateBranchError = ErrorWrapper<{
|
@@ -1768,10 +2169,16 @@ declare type CreateBranchError = ErrorWrapper<{
|
|
1768
2169
|
payload: SimpleError;
|
1769
2170
|
}>;
|
1770
2171
|
declare type CreateBranchResponse = {
|
2172
|
+
/**
|
2173
|
+
* @minLength 1
|
2174
|
+
*/
|
1771
2175
|
databaseName: string;
|
1772
2176
|
branchName: string;
|
1773
2177
|
};
|
1774
2178
|
declare type CreateBranchRequestBody = {
|
2179
|
+
/**
|
2180
|
+
* Select the branch to fork from. Defaults to 'main'
|
2181
|
+
*/
|
1775
2182
|
from?: string;
|
1776
2183
|
metadata?: BranchMetadata;
|
1777
2184
|
};
|
@@ -1782,6 +2189,9 @@ declare type CreateBranchVariables = {
|
|
1782
2189
|
} & FetcherExtraProps;
|
1783
2190
|
declare const createBranch: (variables: CreateBranchVariables) => Promise<CreateBranchResponse>;
|
1784
2191
|
declare type DeleteBranchPathParams = {
|
2192
|
+
/**
|
2193
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2194
|
+
*/
|
1785
2195
|
dbBranchName: DBBranchName;
|
1786
2196
|
workspace: string;
|
1787
2197
|
};
|
@@ -1803,6 +2213,9 @@ declare type DeleteBranchVariables = {
|
|
1803
2213
|
*/
|
1804
2214
|
declare const deleteBranch: (variables: DeleteBranchVariables) => Promise<undefined>;
|
1805
2215
|
declare type UpdateBranchMetadataPathParams = {
|
2216
|
+
/**
|
2217
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2218
|
+
*/
|
1806
2219
|
dbBranchName: DBBranchName;
|
1807
2220
|
workspace: string;
|
1808
2221
|
};
|
@@ -1825,6 +2238,9 @@ declare type UpdateBranchMetadataVariables = {
|
|
1825
2238
|
*/
|
1826
2239
|
declare const updateBranchMetadata: (variables: UpdateBranchMetadataVariables) => Promise<undefined>;
|
1827
2240
|
declare type GetBranchMetadataPathParams = {
|
2241
|
+
/**
|
2242
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2243
|
+
*/
|
1828
2244
|
dbBranchName: DBBranchName;
|
1829
2245
|
workspace: string;
|
1830
2246
|
};
|
@@ -1843,6 +2259,9 @@ declare type GetBranchMetadataVariables = {
|
|
1843
2259
|
} & FetcherExtraProps;
|
1844
2260
|
declare const getBranchMetadata: (variables: GetBranchMetadataVariables) => Promise<BranchMetadata>;
|
1845
2261
|
declare type GetBranchMigrationHistoryPathParams = {
|
2262
|
+
/**
|
2263
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2264
|
+
*/
|
1846
2265
|
dbBranchName: DBBranchName;
|
1847
2266
|
workspace: string;
|
1848
2267
|
};
|
@@ -1870,6 +2289,9 @@ declare type GetBranchMigrationHistoryVariables = {
|
|
1870
2289
|
} & FetcherExtraProps;
|
1871
2290
|
declare const getBranchMigrationHistory: (variables: GetBranchMigrationHistoryVariables) => Promise<GetBranchMigrationHistoryResponse>;
|
1872
2291
|
declare type ExecuteBranchMigrationPlanPathParams = {
|
2292
|
+
/**
|
2293
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2294
|
+
*/
|
1873
2295
|
dbBranchName: DBBranchName;
|
1874
2296
|
workspace: string;
|
1875
2297
|
};
|
@@ -1896,6 +2318,9 @@ declare type ExecuteBranchMigrationPlanVariables = {
|
|
1896
2318
|
*/
|
1897
2319
|
declare const executeBranchMigrationPlan: (variables: ExecuteBranchMigrationPlanVariables) => Promise<undefined>;
|
1898
2320
|
declare type GetBranchMigrationPlanPathParams = {
|
2321
|
+
/**
|
2322
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2323
|
+
*/
|
1899
2324
|
dbBranchName: DBBranchName;
|
1900
2325
|
workspace: string;
|
1901
2326
|
};
|
@@ -1918,6 +2343,9 @@ declare type GetBranchMigrationPlanVariables = {
|
|
1918
2343
|
*/
|
1919
2344
|
declare const getBranchMigrationPlan: (variables: GetBranchMigrationPlanVariables) => Promise<BranchMigrationPlan>;
|
1920
2345
|
declare type CompareBranchWithUserSchemaPathParams = {
|
2346
|
+
/**
|
2347
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2348
|
+
*/
|
1921
2349
|
dbBranchName: DBBranchName;
|
1922
2350
|
workspace: string;
|
1923
2351
|
};
|
@@ -1940,7 +2368,13 @@ declare type CompareBranchWithUserSchemaVariables = {
|
|
1940
2368
|
} & FetcherExtraProps;
|
1941
2369
|
declare const compareBranchWithUserSchema: (variables: CompareBranchWithUserSchemaVariables) => Promise<SchemaCompareResponse>;
|
1942
2370
|
declare type CompareBranchSchemasPathParams = {
|
2371
|
+
/**
|
2372
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2373
|
+
*/
|
1943
2374
|
dbBranchName: DBBranchName;
|
2375
|
+
/**
|
2376
|
+
* The Database Name
|
2377
|
+
*/
|
1944
2378
|
branchName: BranchName;
|
1945
2379
|
workspace: string;
|
1946
2380
|
};
|
@@ -1960,6 +2394,9 @@ declare type CompareBranchSchemasVariables = {
|
|
1960
2394
|
} & FetcherExtraProps;
|
1961
2395
|
declare const compareBranchSchemas: (variables: CompareBranchSchemasVariables) => Promise<SchemaCompareResponse>;
|
1962
2396
|
declare type UpdateBranchSchemaPathParams = {
|
2397
|
+
/**
|
2398
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2399
|
+
*/
|
1963
2400
|
dbBranchName: DBBranchName;
|
1964
2401
|
workspace: string;
|
1965
2402
|
};
|
@@ -1983,6 +2420,9 @@ declare type UpdateBranchSchemaVariables = {
|
|
1983
2420
|
} & FetcherExtraProps;
|
1984
2421
|
declare const updateBranchSchema: (variables: UpdateBranchSchemaVariables) => Promise<UpdateBranchSchemaResponse>;
|
1985
2422
|
declare type PreviewBranchSchemaEditPathParams = {
|
2423
|
+
/**
|
2424
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2425
|
+
*/
|
1986
2426
|
dbBranchName: DBBranchName;
|
1987
2427
|
workspace: string;
|
1988
2428
|
};
|
@@ -2010,6 +2450,9 @@ declare type PreviewBranchSchemaEditVariables = {
|
|
2010
2450
|
} & FetcherExtraProps;
|
2011
2451
|
declare const previewBranchSchemaEdit: (variables: PreviewBranchSchemaEditVariables) => Promise<PreviewBranchSchemaEditResponse>;
|
2012
2452
|
declare type ApplyBranchSchemaEditPathParams = {
|
2453
|
+
/**
|
2454
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2455
|
+
*/
|
2013
2456
|
dbBranchName: DBBranchName;
|
2014
2457
|
workspace: string;
|
2015
2458
|
};
|
@@ -2036,6 +2479,9 @@ declare type ApplyBranchSchemaEditVariables = {
|
|
2036
2479
|
} & FetcherExtraProps;
|
2037
2480
|
declare const applyBranchSchemaEdit: (variables: ApplyBranchSchemaEditVariables) => Promise<ApplyBranchSchemaEditResponse>;
|
2038
2481
|
declare type GetBranchSchemaHistoryPathParams = {
|
2482
|
+
/**
|
2483
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2484
|
+
*/
|
2039
2485
|
dbBranchName: DBBranchName;
|
2040
2486
|
workspace: string;
|
2041
2487
|
};
|
@@ -2051,15 +2497,32 @@ declare type GetBranchSchemaHistoryError = ErrorWrapper<{
|
|
2051
2497
|
}>;
|
2052
2498
|
declare type GetBranchSchemaHistoryResponse = {
|
2053
2499
|
meta: {
|
2500
|
+
/**
|
2501
|
+
* last record id
|
2502
|
+
*/
|
2054
2503
|
cursor: string;
|
2504
|
+
/**
|
2505
|
+
* true if more records can be fetch
|
2506
|
+
*/
|
2055
2507
|
more: boolean;
|
2056
2508
|
};
|
2057
2509
|
logs: Commit[];
|
2058
2510
|
};
|
2059
2511
|
declare type GetBranchSchemaHistoryRequestBody = {
|
2060
2512
|
page?: {
|
2513
|
+
/**
|
2514
|
+
* Query the next page that follow the cursor.
|
2515
|
+
*/
|
2061
2516
|
after?: string;
|
2517
|
+
/**
|
2518
|
+
* Query the previous page before the cursor.
|
2519
|
+
*/
|
2062
2520
|
before?: string;
|
2521
|
+
/**
|
2522
|
+
* 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.
|
2523
|
+
*
|
2524
|
+
* @default 20
|
2525
|
+
*/
|
2063
2526
|
size?: number;
|
2064
2527
|
};
|
2065
2528
|
};
|
@@ -2069,6 +2532,9 @@ declare type GetBranchSchemaHistoryVariables = {
|
|
2069
2532
|
} & FetcherExtraProps;
|
2070
2533
|
declare const getBranchSchemaHistory: (variables: GetBranchSchemaHistoryVariables) => Promise<GetBranchSchemaHistoryResponse>;
|
2071
2534
|
declare type GetBranchStatsPathParams = {
|
2535
|
+
/**
|
2536
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2537
|
+
*/
|
2072
2538
|
dbBranchName: DBBranchName;
|
2073
2539
|
workspace: string;
|
2074
2540
|
};
|
@@ -2101,7 +2567,13 @@ declare type GetBranchStatsVariables = {
|
|
2101
2567
|
*/
|
2102
2568
|
declare const getBranchStats: (variables: GetBranchStatsVariables) => Promise<GetBranchStatsResponse>;
|
2103
2569
|
declare type CreateTablePathParams = {
|
2570
|
+
/**
|
2571
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2572
|
+
*/
|
2104
2573
|
dbBranchName: DBBranchName;
|
2574
|
+
/**
|
2575
|
+
* The Table name
|
2576
|
+
*/
|
2105
2577
|
tableName: TableName;
|
2106
2578
|
workspace: string;
|
2107
2579
|
};
|
@@ -2120,6 +2592,9 @@ declare type CreateTableError = ErrorWrapper<{
|
|
2120
2592
|
}>;
|
2121
2593
|
declare type CreateTableResponse = {
|
2122
2594
|
branchName: string;
|
2595
|
+
/**
|
2596
|
+
* @minLength 1
|
2597
|
+
*/
|
2123
2598
|
tableName: string;
|
2124
2599
|
};
|
2125
2600
|
declare type CreateTableVariables = {
|
@@ -2130,7 +2605,13 @@ declare type CreateTableVariables = {
|
|
2130
2605
|
*/
|
2131
2606
|
declare const createTable: (variables: CreateTableVariables) => Promise<CreateTableResponse>;
|
2132
2607
|
declare type DeleteTablePathParams = {
|
2608
|
+
/**
|
2609
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2610
|
+
*/
|
2133
2611
|
dbBranchName: DBBranchName;
|
2612
|
+
/**
|
2613
|
+
* The Table name
|
2614
|
+
*/
|
2134
2615
|
tableName: TableName;
|
2135
2616
|
workspace: string;
|
2136
2617
|
};
|
@@ -2149,7 +2630,13 @@ declare type DeleteTableVariables = {
|
|
2149
2630
|
*/
|
2150
2631
|
declare const deleteTable: (variables: DeleteTableVariables) => Promise<undefined>;
|
2151
2632
|
declare type UpdateTablePathParams = {
|
2633
|
+
/**
|
2634
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2635
|
+
*/
|
2152
2636
|
dbBranchName: DBBranchName;
|
2637
|
+
/**
|
2638
|
+
* The Table name
|
2639
|
+
*/
|
2153
2640
|
tableName: TableName;
|
2154
2641
|
workspace: string;
|
2155
2642
|
};
|
@@ -2164,6 +2651,9 @@ declare type UpdateTableError = ErrorWrapper<{
|
|
2164
2651
|
payload: SimpleError;
|
2165
2652
|
}>;
|
2166
2653
|
declare type UpdateTableRequestBody = {
|
2654
|
+
/**
|
2655
|
+
* @minLength 1
|
2656
|
+
*/
|
2167
2657
|
name: string;
|
2168
2658
|
};
|
2169
2659
|
declare type UpdateTableVariables = {
|
@@ -2185,7 +2675,13 @@ declare type UpdateTableVariables = {
|
|
2185
2675
|
*/
|
2186
2676
|
declare const updateTable: (variables: UpdateTableVariables) => Promise<undefined>;
|
2187
2677
|
declare type GetTableSchemaPathParams = {
|
2678
|
+
/**
|
2679
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2680
|
+
*/
|
2188
2681
|
dbBranchName: DBBranchName;
|
2682
|
+
/**
|
2683
|
+
* The Table name
|
2684
|
+
*/
|
2189
2685
|
tableName: TableName;
|
2190
2686
|
workspace: string;
|
2191
2687
|
};
|
@@ -2207,7 +2703,13 @@ declare type GetTableSchemaVariables = {
|
|
2207
2703
|
} & FetcherExtraProps;
|
2208
2704
|
declare const getTableSchema: (variables: GetTableSchemaVariables) => Promise<GetTableSchemaResponse>;
|
2209
2705
|
declare type SetTableSchemaPathParams = {
|
2706
|
+
/**
|
2707
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2708
|
+
*/
|
2210
2709
|
dbBranchName: DBBranchName;
|
2710
|
+
/**
|
2711
|
+
* The Table name
|
2712
|
+
*/
|
2211
2713
|
tableName: TableName;
|
2212
2714
|
workspace: string;
|
2213
2715
|
};
|
@@ -2233,7 +2735,13 @@ declare type SetTableSchemaVariables = {
|
|
2233
2735
|
} & FetcherExtraProps;
|
2234
2736
|
declare const setTableSchema: (variables: SetTableSchemaVariables) => Promise<undefined>;
|
2235
2737
|
declare type GetTableColumnsPathParams = {
|
2738
|
+
/**
|
2739
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2740
|
+
*/
|
2236
2741
|
dbBranchName: DBBranchName;
|
2742
|
+
/**
|
2743
|
+
* The Table name
|
2744
|
+
*/
|
2237
2745
|
tableName: TableName;
|
2238
2746
|
workspace: string;
|
2239
2747
|
};
|
@@ -2259,7 +2767,13 @@ declare type GetTableColumnsVariables = {
|
|
2259
2767
|
*/
|
2260
2768
|
declare const getTableColumns: (variables: GetTableColumnsVariables) => Promise<GetTableColumnsResponse>;
|
2261
2769
|
declare type AddTableColumnPathParams = {
|
2770
|
+
/**
|
2771
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2772
|
+
*/
|
2262
2773
|
dbBranchName: DBBranchName;
|
2774
|
+
/**
|
2775
|
+
* The Table name
|
2776
|
+
*/
|
2263
2777
|
tableName: TableName;
|
2264
2778
|
workspace: string;
|
2265
2779
|
};
|
@@ -2284,8 +2798,17 @@ declare type AddTableColumnVariables = {
|
|
2284
2798
|
*/
|
2285
2799
|
declare const addTableColumn: (variables: AddTableColumnVariables) => Promise<MigrationIdResponse>;
|
2286
2800
|
declare type GetColumnPathParams = {
|
2801
|
+
/**
|
2802
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2803
|
+
*/
|
2287
2804
|
dbBranchName: DBBranchName;
|
2805
|
+
/**
|
2806
|
+
* The Table name
|
2807
|
+
*/
|
2288
2808
|
tableName: TableName;
|
2809
|
+
/**
|
2810
|
+
* The Column name
|
2811
|
+
*/
|
2289
2812
|
columnName: ColumnName;
|
2290
2813
|
workspace: string;
|
2291
2814
|
};
|
@@ -2307,8 +2830,17 @@ declare type GetColumnVariables = {
|
|
2307
2830
|
*/
|
2308
2831
|
declare const getColumn: (variables: GetColumnVariables) => Promise<Column>;
|
2309
2832
|
declare type DeleteColumnPathParams = {
|
2833
|
+
/**
|
2834
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2835
|
+
*/
|
2310
2836
|
dbBranchName: DBBranchName;
|
2837
|
+
/**
|
2838
|
+
* The Table name
|
2839
|
+
*/
|
2311
2840
|
tableName: TableName;
|
2841
|
+
/**
|
2842
|
+
* The Column name
|
2843
|
+
*/
|
2312
2844
|
columnName: ColumnName;
|
2313
2845
|
workspace: string;
|
2314
2846
|
};
|
@@ -2330,8 +2862,17 @@ declare type DeleteColumnVariables = {
|
|
2330
2862
|
*/
|
2331
2863
|
declare const deleteColumn: (variables: DeleteColumnVariables) => Promise<MigrationIdResponse>;
|
2332
2864
|
declare type UpdateColumnPathParams = {
|
2865
|
+
/**
|
2866
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2867
|
+
*/
|
2333
2868
|
dbBranchName: DBBranchName;
|
2869
|
+
/**
|
2870
|
+
* The Table name
|
2871
|
+
*/
|
2334
2872
|
tableName: TableName;
|
2873
|
+
/**
|
2874
|
+
* The Column name
|
2875
|
+
*/
|
2335
2876
|
columnName: ColumnName;
|
2336
2877
|
workspace: string;
|
2337
2878
|
};
|
@@ -2346,6 +2887,9 @@ declare type UpdateColumnError = ErrorWrapper<{
|
|
2346
2887
|
payload: SimpleError;
|
2347
2888
|
}>;
|
2348
2889
|
declare type UpdateColumnRequestBody = {
|
2890
|
+
/**
|
2891
|
+
* @minLength 1
|
2892
|
+
*/
|
2349
2893
|
name: string;
|
2350
2894
|
};
|
2351
2895
|
declare type UpdateColumnVariables = {
|
@@ -2357,11 +2901,20 @@ declare type UpdateColumnVariables = {
|
|
2357
2901
|
*/
|
2358
2902
|
declare const updateColumn: (variables: UpdateColumnVariables) => Promise<MigrationIdResponse>;
|
2359
2903
|
declare type InsertRecordPathParams = {
|
2904
|
+
/**
|
2905
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2906
|
+
*/
|
2360
2907
|
dbBranchName: DBBranchName;
|
2908
|
+
/**
|
2909
|
+
* The Table name
|
2910
|
+
*/
|
2361
2911
|
tableName: TableName;
|
2362
2912
|
workspace: string;
|
2363
2913
|
};
|
2364
2914
|
declare type InsertRecordQueryParams = {
|
2915
|
+
/**
|
2916
|
+
* Column filters
|
2917
|
+
*/
|
2365
2918
|
columns?: ColumnsProjection;
|
2366
2919
|
};
|
2367
2920
|
declare type InsertRecordError = ErrorWrapper<{
|
@@ -2384,12 +2937,24 @@ declare type InsertRecordVariables = {
|
|
2384
2937
|
*/
|
2385
2938
|
declare const insertRecord: (variables: InsertRecordVariables) => Promise<RecordUpdateResponse>;
|
2386
2939
|
declare type InsertRecordWithIDPathParams = {
|
2940
|
+
/**
|
2941
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2942
|
+
*/
|
2387
2943
|
dbBranchName: DBBranchName;
|
2944
|
+
/**
|
2945
|
+
* The Table name
|
2946
|
+
*/
|
2388
2947
|
tableName: TableName;
|
2948
|
+
/**
|
2949
|
+
* The Record name
|
2950
|
+
*/
|
2389
2951
|
recordId: RecordID;
|
2390
2952
|
workspace: string;
|
2391
2953
|
};
|
2392
2954
|
declare type InsertRecordWithIDQueryParams = {
|
2955
|
+
/**
|
2956
|
+
* Column filters
|
2957
|
+
*/
|
2393
2958
|
columns?: ColumnsProjection;
|
2394
2959
|
createOnly?: boolean;
|
2395
2960
|
ifVersion?: number;
|
@@ -2417,12 +2982,24 @@ declare type InsertRecordWithIDVariables = {
|
|
2417
2982
|
*/
|
2418
2983
|
declare const insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
|
2419
2984
|
declare type UpdateRecordWithIDPathParams = {
|
2985
|
+
/**
|
2986
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
2987
|
+
*/
|
2420
2988
|
dbBranchName: DBBranchName;
|
2989
|
+
/**
|
2990
|
+
* The Table name
|
2991
|
+
*/
|
2421
2992
|
tableName: TableName;
|
2993
|
+
/**
|
2994
|
+
* The Record name
|
2995
|
+
*/
|
2422
2996
|
recordId: RecordID;
|
2423
2997
|
workspace: string;
|
2424
2998
|
};
|
2425
2999
|
declare type UpdateRecordWithIDQueryParams = {
|
3000
|
+
/**
|
3001
|
+
* Column filters
|
3002
|
+
*/
|
2426
3003
|
columns?: ColumnsProjection;
|
2427
3004
|
ifVersion?: number;
|
2428
3005
|
};
|
@@ -2446,12 +3023,24 @@ declare type UpdateRecordWithIDVariables = {
|
|
2446
3023
|
} & FetcherExtraProps;
|
2447
3024
|
declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<RecordUpdateResponse>;
|
2448
3025
|
declare type UpsertRecordWithIDPathParams = {
|
3026
|
+
/**
|
3027
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3028
|
+
*/
|
2449
3029
|
dbBranchName: DBBranchName;
|
3030
|
+
/**
|
3031
|
+
* The Table name
|
3032
|
+
*/
|
2450
3033
|
tableName: TableName;
|
3034
|
+
/**
|
3035
|
+
* The Record name
|
3036
|
+
*/
|
2451
3037
|
recordId: RecordID;
|
2452
3038
|
workspace: string;
|
2453
3039
|
};
|
2454
3040
|
declare type UpsertRecordWithIDQueryParams = {
|
3041
|
+
/**
|
3042
|
+
* Column filters
|
3043
|
+
*/
|
2455
3044
|
columns?: ColumnsProjection;
|
2456
3045
|
ifVersion?: number;
|
2457
3046
|
};
|
@@ -2475,12 +3064,24 @@ declare type UpsertRecordWithIDVariables = {
|
|
2475
3064
|
} & FetcherExtraProps;
|
2476
3065
|
declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<RecordUpdateResponse>;
|
2477
3066
|
declare type DeleteRecordPathParams = {
|
3067
|
+
/**
|
3068
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3069
|
+
*/
|
2478
3070
|
dbBranchName: DBBranchName;
|
3071
|
+
/**
|
3072
|
+
* The Table name
|
3073
|
+
*/
|
2479
3074
|
tableName: TableName;
|
3075
|
+
/**
|
3076
|
+
* The Record name
|
3077
|
+
*/
|
2480
3078
|
recordId: RecordID;
|
2481
3079
|
workspace: string;
|
2482
3080
|
};
|
2483
3081
|
declare type DeleteRecordQueryParams = {
|
3082
|
+
/**
|
3083
|
+
* Column filters
|
3084
|
+
*/
|
2484
3085
|
columns?: ColumnsProjection;
|
2485
3086
|
};
|
2486
3087
|
declare type DeleteRecordError = ErrorWrapper<{
|
@@ -2499,12 +3100,24 @@ declare type DeleteRecordVariables = {
|
|
2499
3100
|
} & FetcherExtraProps;
|
2500
3101
|
declare const deleteRecord: (variables: DeleteRecordVariables) => Promise<XataRecord$1>;
|
2501
3102
|
declare type GetRecordPathParams = {
|
3103
|
+
/**
|
3104
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3105
|
+
*/
|
2502
3106
|
dbBranchName: DBBranchName;
|
3107
|
+
/**
|
3108
|
+
* The Table name
|
3109
|
+
*/
|
2503
3110
|
tableName: TableName;
|
3111
|
+
/**
|
3112
|
+
* The Record name
|
3113
|
+
*/
|
2504
3114
|
recordId: RecordID;
|
2505
3115
|
workspace: string;
|
2506
3116
|
};
|
2507
3117
|
declare type GetRecordQueryParams = {
|
3118
|
+
/**
|
3119
|
+
* Column filters
|
3120
|
+
*/
|
2508
3121
|
columns?: ColumnsProjection;
|
2509
3122
|
};
|
2510
3123
|
declare type GetRecordError = ErrorWrapper<{
|
@@ -2526,11 +3139,20 @@ declare type GetRecordVariables = {
|
|
2526
3139
|
*/
|
2527
3140
|
declare const getRecord: (variables: GetRecordVariables) => Promise<XataRecord$1>;
|
2528
3141
|
declare type BulkInsertTableRecordsPathParams = {
|
3142
|
+
/**
|
3143
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3144
|
+
*/
|
2529
3145
|
dbBranchName: DBBranchName;
|
3146
|
+
/**
|
3147
|
+
* The Table name
|
3148
|
+
*/
|
2530
3149
|
tableName: TableName;
|
2531
3150
|
workspace: string;
|
2532
3151
|
};
|
2533
3152
|
declare type BulkInsertTableRecordsQueryParams = {
|
3153
|
+
/**
|
3154
|
+
* Column filters
|
3155
|
+
*/
|
2534
3156
|
columns?: ColumnsProjection;
|
2535
3157
|
};
|
2536
3158
|
declare type BulkInsertTableRecordsError = ErrorWrapper<{
|
@@ -2559,7 +3181,13 @@ declare type BulkInsertTableRecordsVariables = {
|
|
2559
3181
|
*/
|
2560
3182
|
declare const bulkInsertTableRecords: (variables: BulkInsertTableRecordsVariables) => Promise<BulkInsertResponse>;
|
2561
3183
|
declare type QueryTablePathParams = {
|
3184
|
+
/**
|
3185
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3186
|
+
*/
|
2562
3187
|
dbBranchName: DBBranchName;
|
3188
|
+
/**
|
3189
|
+
* The Table name
|
3190
|
+
*/
|
2563
3191
|
tableName: TableName;
|
2564
3192
|
workspace: string;
|
2565
3193
|
};
|
@@ -2613,8 +3241,9 @@ declare type QueryTableVariables = {
|
|
2613
3241
|
* If the `columns` array is not specified, all columns are included. For link
|
2614
3242
|
* fields, only the ID column of the linked records is included in the response.
|
2615
3243
|
*
|
2616
|
-
* If the `columns` array is specified, only the selected
|
2617
|
-
* The `*` wildcard can be used to
|
3244
|
+
* If the `columns` array is specified, only the selected and internal
|
3245
|
+
* columns `id` and `xata` are included. The `*` wildcard can be used to
|
3246
|
+
* select all columns.
|
2618
3247
|
*
|
2619
3248
|
* For objects and link fields, if the column name of the object is specified, we
|
2620
3249
|
* include all of its sub-keys. If only some sub-keys are specified (via dotted
|
@@ -2730,6 +3359,10 @@ declare type QueryTableVariables = {
|
|
2730
3359
|
*
|
2731
3360
|
* ```json
|
2732
3361
|
* {
|
3362
|
+
* "id": "id1"
|
3363
|
+
* "xata": {
|
3364
|
+
* "version": 0
|
3365
|
+
* }
|
2733
3366
|
* "name": "Kilian",
|
2734
3367
|
* "address": {
|
2735
3368
|
* "street": "New street"
|
@@ -2749,6 +3382,10 @@ declare type QueryTableVariables = {
|
|
2749
3382
|
*
|
2750
3383
|
* ```json
|
2751
3384
|
* {
|
3385
|
+
* "id": "id1"
|
3386
|
+
* "xata": {
|
3387
|
+
* "version": 0
|
3388
|
+
* }
|
2752
3389
|
* "name": "Kilian",
|
2753
3390
|
* "email": "kilian@gmail.com",
|
2754
3391
|
* "address": {
|
@@ -2778,6 +3415,10 @@ declare type QueryTableVariables = {
|
|
2778
3415
|
*
|
2779
3416
|
* ```json
|
2780
3417
|
* {
|
3418
|
+
* "id": "id1"
|
3419
|
+
* "xata": {
|
3420
|
+
* "version": 0
|
3421
|
+
* }
|
2781
3422
|
* "name": "Kilian",
|
2782
3423
|
* "email": "kilian@gmail.com",
|
2783
3424
|
* "address": {
|
@@ -3204,8 +3845,8 @@ declare type QueryTableVariables = {
|
|
3204
3845
|
*
|
3205
3846
|
* ### Pagination
|
3206
3847
|
*
|
3207
|
-
* We offer cursor pagination and offset pagination.
|
3208
|
-
*
|
3848
|
+
* We offer cursor pagination and offset pagination. For queries that are expected to return more than 1000 records,
|
3849
|
+
* cursor pagination is needed in order to retrieve all of their results. The offset pagination method is limited to 1000 records.
|
3209
3850
|
*
|
3210
3851
|
* Example of size + offset pagination:
|
3211
3852
|
*
|
@@ -3306,7 +3947,13 @@ declare type QueryTableVariables = {
|
|
3306
3947
|
*/
|
3307
3948
|
declare const queryTable: (variables: QueryTableVariables) => Promise<QueryResponse>;
|
3308
3949
|
declare type SearchTablePathParams = {
|
3950
|
+
/**
|
3951
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3952
|
+
*/
|
3309
3953
|
dbBranchName: DBBranchName;
|
3954
|
+
/**
|
3955
|
+
* The Table name
|
3956
|
+
*/
|
3310
3957
|
tableName: TableName;
|
3311
3958
|
workspace: string;
|
3312
3959
|
};
|
@@ -3321,8 +3968,14 @@ declare type SearchTableError = ErrorWrapper<{
|
|
3321
3968
|
payload: SimpleError;
|
3322
3969
|
}>;
|
3323
3970
|
declare type SearchTableRequestBody = {
|
3971
|
+
/**
|
3972
|
+
* The query string.
|
3973
|
+
*
|
3974
|
+
* @minLength 1
|
3975
|
+
*/
|
3324
3976
|
query: string;
|
3325
3977
|
fuzziness?: FuzzinessExpression;
|
3978
|
+
target?: TargetExpression;
|
3326
3979
|
prefix?: PrefixExpression;
|
3327
3980
|
filter?: FilterExpression;
|
3328
3981
|
highlight?: HighlightExpression;
|
@@ -3341,6 +3994,9 @@ declare type SearchTableVariables = {
|
|
3341
3994
|
*/
|
3342
3995
|
declare const searchTable: (variables: SearchTableVariables) => Promise<SearchResponse>;
|
3343
3996
|
declare type SearchBranchPathParams = {
|
3997
|
+
/**
|
3998
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3999
|
+
*/
|
3344
4000
|
dbBranchName: DBBranchName;
|
3345
4001
|
workspace: string;
|
3346
4002
|
};
|
@@ -3355,11 +4011,23 @@ declare type SearchBranchError = ErrorWrapper<{
|
|
3355
4011
|
payload: SimpleError;
|
3356
4012
|
}>;
|
3357
4013
|
declare type SearchBranchRequestBody = {
|
4014
|
+
/**
|
4015
|
+
* 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.
|
4016
|
+
*/
|
3358
4017
|
tables?: (string | {
|
4018
|
+
/**
|
4019
|
+
* The name of the table.
|
4020
|
+
*/
|
3359
4021
|
table: string;
|
3360
4022
|
filter?: FilterExpression;
|
4023
|
+
target?: TargetExpression;
|
3361
4024
|
boosters?: BoosterExpression[];
|
3362
4025
|
})[];
|
4026
|
+
/**
|
4027
|
+
* The query string.
|
4028
|
+
*
|
4029
|
+
* @minLength 1
|
4030
|
+
*/
|
3363
4031
|
query: string;
|
3364
4032
|
fuzziness?: FuzzinessExpression;
|
3365
4033
|
prefix?: PrefixExpression;
|
@@ -3374,7 +4042,13 @@ declare type SearchBranchVariables = {
|
|
3374
4042
|
*/
|
3375
4043
|
declare const searchBranch: (variables: SearchBranchVariables) => Promise<SearchResponse>;
|
3376
4044
|
declare type SummarizeTablePathParams = {
|
4045
|
+
/**
|
4046
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
4047
|
+
*/
|
3377
4048
|
dbBranchName: DBBranchName;
|
4049
|
+
/**
|
4050
|
+
* The Table name
|
4051
|
+
*/
|
3378
4052
|
tableName: TableName;
|
3379
4053
|
workspace: string;
|
3380
4054
|
};
|
@@ -3389,15 +4063,53 @@ declare type SummarizeTableError = ErrorWrapper<{
|
|
3389
4063
|
payload: SimpleError;
|
3390
4064
|
}>;
|
3391
4065
|
declare type SummarizeTableRequestBody = {
|
3392
|
-
summaries?: SummaryExpressionList;
|
3393
4066
|
columns?: ColumnsProjection;
|
4067
|
+
summaries?: SummaryExpressionList;
|
4068
|
+
sort?: SortExpression;
|
3394
4069
|
};
|
3395
4070
|
declare type SummarizeTableVariables = {
|
3396
4071
|
body?: SummarizeTableRequestBody;
|
3397
4072
|
pathParams: SummarizeTablePathParams;
|
3398
4073
|
} & FetcherExtraProps;
|
3399
4074
|
/**
|
3400
|
-
*
|
4075
|
+
* This endpoint allows you to (optionally) define groups, and then to run
|
4076
|
+
* calculations on the values in each group. This is most helpful when you'd
|
4077
|
+
* like to understand the data you have in your database.
|
4078
|
+
*
|
4079
|
+
* A group is a combination of unique values. If you create a group for `sold_by`,
|
4080
|
+
* `product_name`, we will return one row for every combination of `sold_by` and
|
4081
|
+
* `product_name` you have in your database. When you want to calculate statistics,
|
4082
|
+
* you define these groups and ask Xata to calculate data on each group.
|
4083
|
+
*
|
4084
|
+
* **Some questions you can ask of your data:**
|
4085
|
+
*
|
4086
|
+
* How many records do I have in this table?
|
4087
|
+
* - Set `columns: []` as we we want data from the entire table, so we ask for no groups.
|
4088
|
+
* - Set `summaries: {"total": {"count": "*"}}` in order to see the count of all records.
|
4089
|
+
* We use `count: *` here we'd like to know the total amount of rows; ignoring whether
|
4090
|
+
* they are `null` or not.
|
4091
|
+
*
|
4092
|
+
* What are the top total sales for each product?
|
4093
|
+
* - Set `columns: [product_name]` as we'd like to run calculations on each unique product
|
4094
|
+
* name in our table. Setting `columns` like this will produce one row per unique product
|
4095
|
+
* name.
|
4096
|
+
* - Set `summaries: {"total_sales": {"count": "product_name"}}` as we'd like to create a
|
4097
|
+
* field called "total_sales" for each group. This field will count all rows in each group
|
4098
|
+
* with non-null product names.
|
4099
|
+
* - Set `sort: [{"total_sales": "desc"}]` in order to bring the rows with the highest
|
4100
|
+
* total_sales field to the top.
|
4101
|
+
*
|
4102
|
+
* `columns`: tells Xata how to create each group. If you add `product_id` we will create
|
4103
|
+
* a new group for every unique `product_id`.
|
4104
|
+
*
|
4105
|
+
* `summaries`: tells Xata which calculations to run on each group.
|
4106
|
+
*
|
4107
|
+
* `sort`: tells Xata in which order you'd like to see results. You may sort by fields
|
4108
|
+
* specified in `columns` as well as the summary names defined in `summaries`.
|
4109
|
+
*
|
4110
|
+
* note: Sorting on summarized values can be slower on very large tables; this will impact
|
4111
|
+
* your rate limit significantly more than other queries. Try use `filter` [coming soon] to
|
4112
|
+
* reduce the amount of data being processed in order to reduce impact on your limits.
|
3401
4113
|
*/
|
3402
4114
|
declare const summarizeTable: (variables: SummarizeTableVariables) => Promise<SummarizeResponse>;
|
3403
4115
|
declare const operationsByTag: {
|
@@ -3870,6 +4582,21 @@ declare type Boosters<O extends XataRecord> = Values<{
|
|
3870
4582
|
} : never;
|
3871
4583
|
}>;
|
3872
4584
|
|
4585
|
+
declare type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
|
4586
|
+
/**
|
4587
|
+
* The name of the column.
|
4588
|
+
*/
|
4589
|
+
column: SelectableColumn<T>;
|
4590
|
+
/**
|
4591
|
+
* The weight of the column.
|
4592
|
+
*
|
4593
|
+
* @default 1
|
4594
|
+
* @maximum 10
|
4595
|
+
* @minimum 1
|
4596
|
+
*/
|
4597
|
+
weight?: number;
|
4598
|
+
};
|
4599
|
+
|
3873
4600
|
declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
|
3874
4601
|
fuzziness?: FuzzinessExpression;
|
3875
4602
|
prefix?: PrefixExpression;
|
@@ -3877,6 +4604,7 @@ declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables exte
|
|
3877
4604
|
tables?: Array<Tables | Values<{
|
3878
4605
|
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
3879
4606
|
table: Model;
|
4607
|
+
target?: TargetColumn<Schemas[Model] & XataRecord>[];
|
3880
4608
|
filter?: Filter<SelectedPick<Schemas[Model] & XataRecord, ['*']>>;
|
3881
4609
|
boosters?: Boosters<Schemas[Model] & XataRecord>[];
|
3882
4610
|
};
|
@@ -4008,9 +4736,6 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
4008
4736
|
* @returns A new Query object.
|
4009
4737
|
*/
|
4010
4738
|
filter(filters?: Filter<Record>): Query<Record, Result>;
|
4011
|
-
defaultFilter<T>(column: string, value: T): T | {
|
4012
|
-
$includes: (T & string) | (T & string[]);
|
4013
|
-
};
|
4014
4739
|
/**
|
4015
4740
|
* Builds a new query with a new sort option.
|
4016
4741
|
* @param column The column name.
|