@budibase/types 2.29.26 → 2.29.27
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.
|
@@ -21,7 +21,7 @@ export interface SearchRowResponse {
|
|
|
21
21
|
export interface PaginatedSearchRowResponse extends SearchRowResponse, PaginationResponse {
|
|
22
22
|
}
|
|
23
23
|
export interface ExportRowsRequest {
|
|
24
|
-
rows
|
|
24
|
+
rows?: string[];
|
|
25
25
|
columns?: string[];
|
|
26
26
|
query?: SearchFilters;
|
|
27
27
|
sort?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Row, Table, TableRequest, View } from "../../../documents";
|
|
1
|
+
import { Row, Table, TableRequest, TableSchema, View } from "../../../documents";
|
|
2
2
|
import { ViewV2Enriched } from "../../../sdk";
|
|
3
3
|
export type TableViewsResponse = {
|
|
4
4
|
[key: string]: View | ViewV2Enriched;
|
|
@@ -25,3 +25,23 @@ export interface MigrateRequest {
|
|
|
25
25
|
export interface MigrateResponse {
|
|
26
26
|
message: string;
|
|
27
27
|
}
|
|
28
|
+
export interface ValidateNewTableImportRequest {
|
|
29
|
+
rows: Row[];
|
|
30
|
+
schema: TableSchema;
|
|
31
|
+
}
|
|
32
|
+
export interface ValidateTableImportRequest {
|
|
33
|
+
tableId?: string;
|
|
34
|
+
rows: Row[];
|
|
35
|
+
}
|
|
36
|
+
export interface ValidateTableImportResponse {
|
|
37
|
+
schemaValidation: {
|
|
38
|
+
[field: string]: boolean;
|
|
39
|
+
};
|
|
40
|
+
allValid: boolean;
|
|
41
|
+
invalidColumns: Array<string>;
|
|
42
|
+
errors: Record<string, string>;
|
|
43
|
+
}
|
|
44
|
+
export interface CsvToJsonRequest {
|
|
45
|
+
csvString: string;
|
|
46
|
+
}
|
|
47
|
+
export type CsvToJsonResponse = any[];
|
|
@@ -38,7 +38,7 @@ export type RelationshipFieldMetadata = ManyToManyRelationshipFieldMetadata | On
|
|
|
38
38
|
export interface AutoColumnFieldMetadata extends Omit<BaseFieldSchema, "subtype"> {
|
|
39
39
|
type: FieldType.AUTO;
|
|
40
40
|
autocolumn: true;
|
|
41
|
-
subtype
|
|
41
|
+
subtype: AutoFieldSubType;
|
|
42
42
|
lastID?: number;
|
|
43
43
|
autoReason?: AutoReason;
|
|
44
44
|
}
|
|
@@ -114,6 +114,19 @@ export interface FieldConstraints {
|
|
|
114
114
|
earliest: string;
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
+
export interface OptionsFieldMetadata extends BaseFieldSchema {
|
|
118
|
+
type: FieldType.OPTIONS;
|
|
119
|
+
constraints: FieldConstraints & {
|
|
120
|
+
inclusion: string[];
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
export interface ArrayFieldMetadata extends BaseFieldSchema {
|
|
124
|
+
type: FieldType.ARRAY;
|
|
125
|
+
constraints: FieldConstraints & {
|
|
126
|
+
type: JsonFieldSubType.ARRAY;
|
|
127
|
+
inclusion: string[];
|
|
128
|
+
};
|
|
129
|
+
}
|
|
117
130
|
interface BaseFieldSchema extends UIFieldMetadata {
|
|
118
131
|
type: FieldType;
|
|
119
132
|
name: string;
|
|
@@ -125,9 +138,9 @@ interface BaseFieldSchema extends UIFieldMetadata {
|
|
|
125
138
|
subtype?: never;
|
|
126
139
|
}
|
|
127
140
|
interface OtherFieldMetadata extends BaseFieldSchema {
|
|
128
|
-
type: Exclude<FieldType, FieldType.DATETIME | FieldType.LINK | FieldType.AUTO | FieldType.FORMULA | FieldType.NUMBER | FieldType.LONGFORM | FieldType.BB_REFERENCE | FieldType.BB_REFERENCE_SINGLE | FieldType.ATTACHMENTS | FieldType.STRING>;
|
|
141
|
+
type: Exclude<FieldType, FieldType.DATETIME | FieldType.LINK | FieldType.AUTO | FieldType.FORMULA | FieldType.NUMBER | FieldType.LONGFORM | FieldType.BB_REFERENCE | FieldType.BB_REFERENCE_SINGLE | FieldType.ATTACHMENTS | FieldType.STRING | FieldType.ARRAY | FieldType.OPTIONS>;
|
|
129
142
|
}
|
|
130
|
-
export type FieldSchema = OtherFieldMetadata | DateFieldMetadata | RelationshipFieldMetadata | AutoColumnFieldMetadata | FormulaFieldMetadata | NumberFieldMetadata | LongFormFieldMetadata | StringFieldMetadata | BBReferenceFieldMetadata | JsonFieldMetadata | AttachmentFieldMetadata | BBReferenceSingleFieldMetadata;
|
|
143
|
+
export type FieldSchema = OtherFieldMetadata | DateFieldMetadata | RelationshipFieldMetadata | AutoColumnFieldMetadata | FormulaFieldMetadata | NumberFieldMetadata | LongFormFieldMetadata | StringFieldMetadata | BBReferenceFieldMetadata | JsonFieldMetadata | AttachmentFieldMetadata | BBReferenceSingleFieldMetadata | ArrayFieldMetadata | OptionsFieldMetadata;
|
|
131
144
|
export interface TableSchema {
|
|
132
145
|
[key: string]: FieldSchema;
|
|
133
146
|
}
|