@budibase/types 3.5.3 → 3.6.0
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/dist/api/web/ai.d.ts +2 -0
- package/dist/api/web/app/oauth2.d.ts +41 -4
- package/dist/api/web/app/rows/search.d.ts +24 -24
- package/dist/api/web/searchFilter.d.ts +6 -2
- package/dist/documents/app/datasource.d.ts +12 -4
- package/dist/documents/app/oauth2.d.ts +9 -4
- package/dist/documents/app/query.d.ts +2 -0
- package/dist/documents/app/table/schema.d.ts +5 -5
- package/dist/documents/global/user.d.ts +2 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +4 -4
- package/dist/sdk/featureFlag.d.ts +3 -2
- package/dist/sdk/locks.d.ts +2 -1
- package/dist/ui/fields/fields.d.ts +31 -0
- package/dist/ui/fields/index.d.ts +2 -0
- package/dist/ui/fields/validationRules.d.ts +8 -0
- package/dist/ui/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/api/web/ai.d.ts
CHANGED
|
@@ -1,9 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
import { OAuth2CredentialsMethod } from "@budibase/types";
|
|
2
|
+
export interface OAuth2ConfigResponse {
|
|
3
|
+
_id: string;
|
|
4
|
+
_rev: string;
|
|
2
5
|
name: string;
|
|
6
|
+
url: string;
|
|
7
|
+
clientId: string;
|
|
8
|
+
clientSecret: string;
|
|
9
|
+
method: OAuth2CredentialsMethod;
|
|
3
10
|
}
|
|
4
11
|
export interface FetchOAuth2ConfigsResponse {
|
|
5
|
-
configs:
|
|
12
|
+
configs: OAuth2ConfigResponse[];
|
|
6
13
|
}
|
|
7
|
-
export interface
|
|
14
|
+
export interface InsertOAuth2ConfigRequest {
|
|
15
|
+
name: string;
|
|
16
|
+
url: string;
|
|
17
|
+
clientId: string;
|
|
18
|
+
clientSecret: string;
|
|
19
|
+
method: OAuth2CredentialsMethod;
|
|
20
|
+
}
|
|
21
|
+
export interface InsertOAuth2ConfigResponse {
|
|
22
|
+
config: OAuth2ConfigResponse;
|
|
23
|
+
}
|
|
24
|
+
export interface UpdateOAuth2ConfigRequest {
|
|
25
|
+
_id: string;
|
|
26
|
+
_rev: string;
|
|
27
|
+
name: string;
|
|
28
|
+
url: string;
|
|
29
|
+
clientId: string;
|
|
30
|
+
clientSecret: string;
|
|
31
|
+
method: OAuth2CredentialsMethod;
|
|
32
|
+
}
|
|
33
|
+
export interface UpdateOAuth2ConfigResponse {
|
|
34
|
+
config: OAuth2ConfigResponse;
|
|
35
|
+
}
|
|
36
|
+
export interface ValidateConfigRequest {
|
|
37
|
+
_id?: string;
|
|
38
|
+
url: string;
|
|
39
|
+
clientId: string;
|
|
40
|
+
clientSecret: string;
|
|
41
|
+
method: OAuth2CredentialsMethod;
|
|
42
|
+
}
|
|
43
|
+
export interface ValidateConfigResponse {
|
|
44
|
+
valid: boolean;
|
|
45
|
+
message?: string;
|
|
8
46
|
}
|
|
9
|
-
export {};
|
|
@@ -20,8 +20,6 @@ declare const searchRowRequest: z.ZodObject<{
|
|
|
20
20
|
allOr: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
onEmptyFilter: z.ZodOptional<z.ZodNativeEnum<typeof EmptyFilterOption>>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
allOr?: boolean | undefined;
|
|
24
|
-
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
25
23
|
equal?: any;
|
|
26
24
|
notEqual?: any;
|
|
27
25
|
empty?: any;
|
|
@@ -33,11 +31,11 @@ declare const searchRowRequest: z.ZodObject<{
|
|
|
33
31
|
notContains?: any;
|
|
34
32
|
containsAny?: any;
|
|
35
33
|
oneOf?: any;
|
|
34
|
+
allOr?: boolean | undefined;
|
|
35
|
+
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
36
36
|
$and?: any;
|
|
37
37
|
$or?: any;
|
|
38
38
|
}, {
|
|
39
|
-
allOr?: boolean | undefined;
|
|
40
|
-
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
41
39
|
equal?: any;
|
|
42
40
|
notEqual?: any;
|
|
43
41
|
empty?: any;
|
|
@@ -49,6 +47,8 @@ declare const searchRowRequest: z.ZodObject<{
|
|
|
49
47
|
notContains?: any;
|
|
50
48
|
containsAny?: any;
|
|
51
49
|
oneOf?: any;
|
|
50
|
+
allOr?: boolean | undefined;
|
|
51
|
+
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
52
52
|
$and?: any;
|
|
53
53
|
$or?: any;
|
|
54
54
|
}>>;
|
|
@@ -63,11 +63,7 @@ declare const searchRowRequest: z.ZodObject<{
|
|
|
63
63
|
countRows: z.ZodOptional<z.ZodBoolean>;
|
|
64
64
|
}, "strip", z.ZodTypeAny, {
|
|
65
65
|
version?: string | undefined;
|
|
66
|
-
limit?: number | undefined;
|
|
67
|
-
sort?: string | null | undefined;
|
|
68
66
|
query?: {
|
|
69
|
-
allOr?: boolean | undefined;
|
|
70
|
-
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
71
67
|
equal?: any;
|
|
72
68
|
notEqual?: any;
|
|
73
69
|
empty?: any;
|
|
@@ -79,9 +75,13 @@ declare const searchRowRequest: z.ZodObject<{
|
|
|
79
75
|
notContains?: any;
|
|
80
76
|
containsAny?: any;
|
|
81
77
|
oneOf?: any;
|
|
78
|
+
allOr?: boolean | undefined;
|
|
79
|
+
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
82
80
|
$and?: any;
|
|
83
81
|
$or?: any;
|
|
84
82
|
} | undefined;
|
|
83
|
+
sort?: string | null | undefined;
|
|
84
|
+
limit?: number | undefined;
|
|
85
85
|
paginate?: boolean | undefined;
|
|
86
86
|
bookmark?: string | number | null | undefined;
|
|
87
87
|
sortOrder?: SortOrder | undefined;
|
|
@@ -90,11 +90,7 @@ declare const searchRowRequest: z.ZodObject<{
|
|
|
90
90
|
countRows?: boolean | undefined;
|
|
91
91
|
}, {
|
|
92
92
|
version?: string | undefined;
|
|
93
|
-
limit?: number | undefined;
|
|
94
|
-
sort?: string | null | undefined;
|
|
95
93
|
query?: {
|
|
96
|
-
allOr?: boolean | undefined;
|
|
97
|
-
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
98
94
|
equal?: any;
|
|
99
95
|
notEqual?: any;
|
|
100
96
|
empty?: any;
|
|
@@ -106,9 +102,13 @@ declare const searchRowRequest: z.ZodObject<{
|
|
|
106
102
|
notContains?: any;
|
|
107
103
|
containsAny?: any;
|
|
108
104
|
oneOf?: any;
|
|
105
|
+
allOr?: boolean | undefined;
|
|
106
|
+
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
109
107
|
$and?: any;
|
|
110
108
|
$or?: any;
|
|
111
109
|
} | undefined;
|
|
110
|
+
sort?: string | null | undefined;
|
|
111
|
+
limit?: number | undefined;
|
|
112
112
|
paginate?: boolean | undefined;
|
|
113
113
|
bookmark?: string | number | null | undefined;
|
|
114
114
|
sortOrder?: SortOrder | undefined;
|
|
@@ -134,8 +134,6 @@ export declare const searchRowRequestValidator: z.ZodObject<{
|
|
|
134
134
|
allOr: z.ZodOptional<z.ZodBoolean>;
|
|
135
135
|
onEmptyFilter: z.ZodOptional<z.ZodNativeEnum<typeof EmptyFilterOption>>;
|
|
136
136
|
}, "strip", z.ZodTypeAny, {
|
|
137
|
-
allOr?: boolean | undefined;
|
|
138
|
-
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
139
137
|
equal?: any;
|
|
140
138
|
notEqual?: any;
|
|
141
139
|
empty?: any;
|
|
@@ -147,11 +145,11 @@ export declare const searchRowRequestValidator: z.ZodObject<{
|
|
|
147
145
|
notContains?: any;
|
|
148
146
|
containsAny?: any;
|
|
149
147
|
oneOf?: any;
|
|
148
|
+
allOr?: boolean | undefined;
|
|
149
|
+
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
150
150
|
$and?: any;
|
|
151
151
|
$or?: any;
|
|
152
152
|
}, {
|
|
153
|
-
allOr?: boolean | undefined;
|
|
154
|
-
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
155
153
|
equal?: any;
|
|
156
154
|
notEqual?: any;
|
|
157
155
|
empty?: any;
|
|
@@ -163,6 +161,8 @@ export declare const searchRowRequestValidator: z.ZodObject<{
|
|
|
163
161
|
notContains?: any;
|
|
164
162
|
containsAny?: any;
|
|
165
163
|
oneOf?: any;
|
|
164
|
+
allOr?: boolean | undefined;
|
|
165
|
+
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
166
166
|
$and?: any;
|
|
167
167
|
$or?: any;
|
|
168
168
|
}>>;
|
|
@@ -177,11 +177,7 @@ export declare const searchRowRequestValidator: z.ZodObject<{
|
|
|
177
177
|
countRows: z.ZodOptional<z.ZodBoolean>;
|
|
178
178
|
}, "strip", z.ZodTypeAny, {
|
|
179
179
|
version?: string | undefined;
|
|
180
|
-
limit?: number | undefined;
|
|
181
|
-
sort?: string | null | undefined;
|
|
182
180
|
query?: {
|
|
183
|
-
allOr?: boolean | undefined;
|
|
184
|
-
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
185
181
|
equal?: any;
|
|
186
182
|
notEqual?: any;
|
|
187
183
|
empty?: any;
|
|
@@ -193,9 +189,13 @@ export declare const searchRowRequestValidator: z.ZodObject<{
|
|
|
193
189
|
notContains?: any;
|
|
194
190
|
containsAny?: any;
|
|
195
191
|
oneOf?: any;
|
|
192
|
+
allOr?: boolean | undefined;
|
|
193
|
+
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
196
194
|
$and?: any;
|
|
197
195
|
$or?: any;
|
|
198
196
|
} | undefined;
|
|
197
|
+
sort?: string | null | undefined;
|
|
198
|
+
limit?: number | undefined;
|
|
199
199
|
paginate?: boolean | undefined;
|
|
200
200
|
bookmark?: string | number | null | undefined;
|
|
201
201
|
sortOrder?: SortOrder | undefined;
|
|
@@ -204,11 +204,7 @@ export declare const searchRowRequestValidator: z.ZodObject<{
|
|
|
204
204
|
countRows?: boolean | undefined;
|
|
205
205
|
}, {
|
|
206
206
|
version?: string | undefined;
|
|
207
|
-
limit?: number | undefined;
|
|
208
|
-
sort?: string | null | undefined;
|
|
209
207
|
query?: {
|
|
210
|
-
allOr?: boolean | undefined;
|
|
211
|
-
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
212
208
|
equal?: any;
|
|
213
209
|
notEqual?: any;
|
|
214
210
|
empty?: any;
|
|
@@ -220,9 +216,13 @@ export declare const searchRowRequestValidator: z.ZodObject<{
|
|
|
220
216
|
notContains?: any;
|
|
221
217
|
containsAny?: any;
|
|
222
218
|
oneOf?: any;
|
|
219
|
+
allOr?: boolean | undefined;
|
|
220
|
+
onEmptyFilter?: EmptyFilterOption | undefined;
|
|
223
221
|
$and?: any;
|
|
224
222
|
$or?: any;
|
|
225
223
|
} | undefined;
|
|
224
|
+
sort?: string | null | undefined;
|
|
225
|
+
limit?: number | undefined;
|
|
226
226
|
paginate?: boolean | undefined;
|
|
227
227
|
bookmark?: string | number | null | undefined;
|
|
228
228
|
sortOrder?: SortOrder | undefined;
|
|
@@ -19,9 +19,13 @@ export type SearchFilter = {
|
|
|
19
19
|
export type LegacyFilter = AllOr | OnEmptyFilter | SearchFilter;
|
|
20
20
|
export type SearchFilterGroup = {
|
|
21
21
|
logicalOperator?: UILogicalOperator;
|
|
22
|
-
|
|
22
|
+
} & ({
|
|
23
|
+
groups?: (SearchFilterGroup | UISearchFilter)[];
|
|
24
|
+
filters?: never;
|
|
25
|
+
} | {
|
|
23
26
|
filters?: LegacyFilter[];
|
|
24
|
-
|
|
27
|
+
groups?: never;
|
|
28
|
+
});
|
|
25
29
|
export type UISearchFilter = {
|
|
26
30
|
logicalOperator?: UILogicalOperator;
|
|
27
31
|
onEmptyFilter?: EmptyFilterOption;
|
|
@@ -15,7 +15,8 @@ export interface Datasource extends Document {
|
|
|
15
15
|
}
|
|
16
16
|
export declare enum RestAuthType {
|
|
17
17
|
BASIC = "basic",
|
|
18
|
-
BEARER = "bearer"
|
|
18
|
+
BEARER = "bearer",
|
|
19
|
+
OAUTH2 = "oauth2"
|
|
19
20
|
}
|
|
20
21
|
export interface RestBasicAuthConfig {
|
|
21
22
|
username: string;
|
|
@@ -24,12 +25,19 @@ export interface RestBasicAuthConfig {
|
|
|
24
25
|
export interface RestBearerAuthConfig {
|
|
25
26
|
token: string;
|
|
26
27
|
}
|
|
27
|
-
export interface
|
|
28
|
+
export interface BasicRestAuthConfig {
|
|
28
29
|
_id: string;
|
|
29
30
|
name: string;
|
|
30
|
-
type: RestAuthType;
|
|
31
|
-
config: RestBasicAuthConfig
|
|
31
|
+
type: RestAuthType.BASIC;
|
|
32
|
+
config: RestBasicAuthConfig;
|
|
32
33
|
}
|
|
34
|
+
export interface BearerRestAuthConfig {
|
|
35
|
+
_id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
type: RestAuthType.BEARER;
|
|
38
|
+
config: RestBearerAuthConfig;
|
|
39
|
+
}
|
|
40
|
+
export type RestAuthConfig = BasicRestAuthConfig | BearerRestAuthConfig;
|
|
33
41
|
export interface DynamicVariable {
|
|
34
42
|
name: string;
|
|
35
43
|
queryId: string;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { Document } from "../document";
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export declare enum OAuth2CredentialsMethod {
|
|
3
|
+
HEADER = "HEADER",
|
|
4
|
+
BODY = "BODY"
|
|
4
5
|
}
|
|
5
|
-
export interface
|
|
6
|
-
|
|
6
|
+
export interface OAuth2Config extends Document {
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
9
|
+
clientId: string;
|
|
10
|
+
clientSecret: string;
|
|
11
|
+
method: OAuth2CredentialsMethod;
|
|
7
12
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Document } from "../document";
|
|
2
|
+
import { RestAuthType } from "./datasource";
|
|
2
3
|
import { Row } from "./row";
|
|
3
4
|
export interface QuerySchema {
|
|
4
5
|
name?: string;
|
|
@@ -52,6 +53,7 @@ export interface RestQueryFields {
|
|
|
52
53
|
bodyType?: BodyType;
|
|
53
54
|
method?: string;
|
|
54
55
|
authConfigId?: string;
|
|
56
|
+
authConfigType?: RestAuthType;
|
|
55
57
|
pagination?: PaginationConfig;
|
|
56
58
|
paginationValues?: PaginationValues;
|
|
57
59
|
}
|
|
@@ -115,15 +115,15 @@ export interface FieldConstraints {
|
|
|
115
115
|
message?: string;
|
|
116
116
|
};
|
|
117
117
|
numericality?: {
|
|
118
|
-
greaterThanOrEqualTo
|
|
119
|
-
lessThanOrEqualTo
|
|
118
|
+
greaterThanOrEqualTo?: string | null;
|
|
119
|
+
lessThanOrEqualTo?: string | null;
|
|
120
120
|
};
|
|
121
121
|
presence?: boolean | {
|
|
122
122
|
allowEmpty?: boolean;
|
|
123
123
|
};
|
|
124
124
|
datetime?: {
|
|
125
|
-
latest
|
|
126
|
-
earliest
|
|
125
|
+
latest?: string;
|
|
126
|
+
earliest?: string;
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
export interface OptionsFieldMetadata extends BaseFieldSchema {
|
|
@@ -149,7 +149,7 @@ export interface BigIntFieldMetadata extends BaseFieldSchema {
|
|
|
149
149
|
type: FieldType.BIGINT;
|
|
150
150
|
default?: string;
|
|
151
151
|
}
|
|
152
|
-
interface BaseFieldSchema extends UIFieldMetadata {
|
|
152
|
+
export interface BaseFieldSchema extends UIFieldMetadata {
|
|
153
153
|
type: FieldType;
|
|
154
154
|
name: string;
|
|
155
155
|
sortable?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Document } from "../document";
|
|
2
|
+
import { ContextUser } from "../../sdk";
|
|
2
3
|
export interface SSOProfileJson {
|
|
3
4
|
email?: string;
|
|
4
5
|
picture?: string;
|
|
@@ -24,7 +25,7 @@ export interface UserSSO {
|
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
27
|
export type SSOUser = User & UserSSO;
|
|
27
|
-
export declare function isSSOUser(user: User): user is SSOUser;
|
|
28
|
+
export declare function isSSOUser(user: User | ContextUser): user is SSOUser;
|
|
28
29
|
export interface UserIdentifier {
|
|
29
30
|
userId: string;
|
|
30
31
|
email: string;
|