@bedrockio/model 0.1.4 → 0.1.6
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/cjs/access.js +30 -16
- package/dist/cjs/errors.js +6 -1
- package/dist/cjs/search.js +2 -2
- package/dist/cjs/validation.js +36 -10
- package/package.json +3 -3
- package/src/access.js +35 -17
- package/src/errors.js +7 -1
- package/src/search.js +2 -2
- package/src/validation.js +36 -9
- package/types/access.d.ts.map +1 -1
- package/types/errors.d.ts +2 -0
- package/types/errors.d.ts.map +1 -1
- package/types/search.d.ts +37 -298
- package/types/search.d.ts.map +1 -1
- package/types/validation.d.ts.map +1 -1
- package/yarn-error.log +6270 -0
package/types/search.d.ts
CHANGED
|
@@ -1,303 +1,42 @@
|
|
|
1
1
|
export function applySearch(schema: any, definition: any): void;
|
|
2
2
|
export function searchValidation(definition: any, options?: {}): {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
keyword: {
|
|
42
|
-
min(length: number): any;
|
|
43
|
-
max(length: number): any;
|
|
44
|
-
trim(): any;
|
|
45
|
-
lowercase(assert?: boolean): any;
|
|
46
|
-
uppercase(assert?: boolean): any;
|
|
47
|
-
match(reg: RegExp): any;
|
|
48
|
-
email(): any;
|
|
49
|
-
phone(): any;
|
|
50
|
-
hex(): any;
|
|
51
|
-
md5(): any;
|
|
52
|
-
sha1(): any;
|
|
53
|
-
ascii(): any;
|
|
54
|
-
base64(options?: {
|
|
55
|
-
urlSafe?: boolean;
|
|
56
|
-
}): any;
|
|
57
|
-
creditCard(): any;
|
|
58
|
-
ip(): any;
|
|
59
|
-
country(): any;
|
|
60
|
-
locale(): any;
|
|
61
|
-
jwt(): any;
|
|
62
|
-
slug(): any;
|
|
63
|
-
latlng(): any;
|
|
64
|
-
postalCode(locale?: string): any;
|
|
65
|
-
password(options?: {
|
|
66
|
-
minLength?: number;
|
|
67
|
-
minNumbers?: number;
|
|
68
|
-
minSymbols?: number;
|
|
69
|
-
minLowercase?: number;
|
|
70
|
-
minUppercase?: number;
|
|
71
|
-
}): any;
|
|
72
|
-
url(options?: {
|
|
73
|
-
require_protocol?: boolean;
|
|
74
|
-
require_valid_protocol?: boolean;
|
|
75
|
-
require_host?: boolean;
|
|
76
|
-
require_port?: boolean;
|
|
77
|
-
allow_protocol_relative_urls?: boolean;
|
|
78
|
-
allow_fragments?: boolean;
|
|
79
|
-
allow_query_components?: boolean;
|
|
80
|
-
validate_length?: boolean;
|
|
81
|
-
protocols?: string[];
|
|
82
|
-
}): any;
|
|
83
|
-
domain(options?: {
|
|
84
|
-
require_tld?: boolean;
|
|
85
|
-
allow_underscores?: boolean;
|
|
86
|
-
allow_trailing_dot?: boolean;
|
|
87
|
-
allow_numeric_tld?: boolean;
|
|
88
|
-
allow_wildcard?: boolean;
|
|
89
|
-
ignore_max_length?: boolean;
|
|
90
|
-
}): any;
|
|
91
|
-
uuid(version?: 2 | 1 | 5 | 3 | 4): any;
|
|
92
|
-
btc(): any;
|
|
93
|
-
eth(): any;
|
|
94
|
-
swift(): any;
|
|
95
|
-
mongo(): any;
|
|
96
|
-
format(name: any, fn: any): import("@bedrockio/yada/types/TypeSchema").default;
|
|
97
|
-
toString(): any;
|
|
98
|
-
assertions: any[];
|
|
99
|
-
meta: {};
|
|
100
|
-
required(): any;
|
|
101
|
-
default(value: any): any;
|
|
102
|
-
custom(...args: import("@bedrockio/yada/types/Schema").CustomSignature): any;
|
|
103
|
-
strip(strip: any): any;
|
|
104
|
-
allow(...set: any[]): any;
|
|
105
|
-
reject(...set: any[]): any;
|
|
106
|
-
message(message: any): any;
|
|
107
|
-
tag(tags: any): any;
|
|
108
|
-
description(description: any): any;
|
|
109
|
-
options(options: any): any;
|
|
110
|
-
validate(value: any, options?: {}): Promise<any>;
|
|
111
|
-
clone(meta: any): any;
|
|
112
|
-
append(schema: any): any;
|
|
113
|
-
toOpenApi(extra: any): any;
|
|
114
|
-
assertEnum(set: any, allow: any): any;
|
|
115
|
-
assert(type: any, fn: any): any;
|
|
116
|
-
pushAssertion(assertion: any): void;
|
|
117
|
-
transform(fn: any): any;
|
|
118
|
-
getSortIndex(type: any): number;
|
|
119
|
-
runAssertion(assertion: any, value: any, options?: {}): Promise<any>;
|
|
120
|
-
enumToOpenApi(): {
|
|
121
|
-
type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
122
|
-
enum: any;
|
|
123
|
-
oneOf?: undefined;
|
|
124
|
-
} | {
|
|
125
|
-
oneOf: any[];
|
|
126
|
-
type?: undefined;
|
|
127
|
-
enum?: undefined;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
include: {
|
|
131
|
-
min(length: number): any;
|
|
132
|
-
max(length: number): any;
|
|
133
|
-
trim(): any;
|
|
134
|
-
lowercase(assert?: boolean): any;
|
|
135
|
-
uppercase(assert?: boolean): any;
|
|
136
|
-
match(reg: RegExp): any;
|
|
137
|
-
email(): any;
|
|
138
|
-
phone(): any;
|
|
139
|
-
hex(): any;
|
|
140
|
-
md5(): any;
|
|
141
|
-
sha1(): any;
|
|
142
|
-
ascii(): any;
|
|
143
|
-
base64(options?: {
|
|
144
|
-
urlSafe?: boolean;
|
|
145
|
-
}): any;
|
|
146
|
-
creditCard(): any;
|
|
147
|
-
ip(): any;
|
|
148
|
-
country(): any;
|
|
149
|
-
locale(): any;
|
|
150
|
-
jwt(): any;
|
|
151
|
-
slug(): any;
|
|
152
|
-
latlng(): any;
|
|
153
|
-
postalCode(locale?: string): any;
|
|
154
|
-
password(options?: {
|
|
155
|
-
minLength?: number;
|
|
156
|
-
minNumbers?: number;
|
|
157
|
-
minSymbols?: number;
|
|
158
|
-
minLowercase?: number;
|
|
159
|
-
minUppercase?: number;
|
|
160
|
-
}): any;
|
|
161
|
-
url(options?: {
|
|
162
|
-
require_protocol?: boolean;
|
|
163
|
-
require_valid_protocol?: boolean;
|
|
164
|
-
require_host?: boolean;
|
|
165
|
-
require_port?: boolean;
|
|
166
|
-
allow_protocol_relative_urls?: boolean;
|
|
167
|
-
allow_fragments?: boolean;
|
|
168
|
-
allow_query_components?: boolean;
|
|
169
|
-
validate_length?: boolean;
|
|
170
|
-
protocols?: string[];
|
|
171
|
-
}): any;
|
|
172
|
-
domain(options?: {
|
|
173
|
-
require_tld?: boolean;
|
|
174
|
-
allow_underscores?: boolean;
|
|
175
|
-
allow_trailing_dot?: boolean;
|
|
176
|
-
allow_numeric_tld?: boolean;
|
|
177
|
-
allow_wildcard?: boolean;
|
|
178
|
-
ignore_max_length?: boolean;
|
|
179
|
-
}): any;
|
|
180
|
-
uuid(version?: 2 | 1 | 5 | 3 | 4): any;
|
|
181
|
-
btc(): any;
|
|
182
|
-
eth(): any;
|
|
183
|
-
swift(): any;
|
|
184
|
-
mongo(): any;
|
|
185
|
-
format(name: any, fn: any): import("@bedrockio/yada/types/TypeSchema").default;
|
|
186
|
-
toString(): any;
|
|
187
|
-
assertions: any[];
|
|
188
|
-
meta: {};
|
|
189
|
-
required(): any;
|
|
190
|
-
default(value: any): any;
|
|
191
|
-
custom(...args: import("@bedrockio/yada/types/Schema").CustomSignature): any;
|
|
192
|
-
strip(strip: any): any;
|
|
193
|
-
allow(...set: any[]): any;
|
|
194
|
-
reject(...set: any[]): any;
|
|
195
|
-
message(message: any): any;
|
|
196
|
-
tag(tags: any): any;
|
|
197
|
-
description(description: any): any;
|
|
198
|
-
options(options: any): any;
|
|
199
|
-
validate(value: any, options?: {}): Promise<any>;
|
|
200
|
-
clone(meta: any): any;
|
|
201
|
-
append(schema: any): any;
|
|
202
|
-
toOpenApi(extra: any): any;
|
|
203
|
-
assertEnum(set: any, allow: any): any;
|
|
204
|
-
assert(type: any, fn: any): any;
|
|
205
|
-
pushAssertion(assertion: any): void;
|
|
206
|
-
transform(fn: any): any;
|
|
207
|
-
getSortIndex(type: any): number;
|
|
208
|
-
runAssertion(assertion: any, value: any, options?: {}): Promise<any>;
|
|
209
|
-
enumToOpenApi(): {
|
|
210
|
-
type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
211
|
-
enum: any;
|
|
212
|
-
oneOf?: undefined;
|
|
213
|
-
} | {
|
|
214
|
-
oneOf: any[];
|
|
215
|
-
type?: undefined;
|
|
216
|
-
enum?: undefined;
|
|
217
|
-
};
|
|
218
|
-
};
|
|
219
|
-
skip: {
|
|
220
|
-
min(min: number, message?: string): any;
|
|
221
|
-
max(max: number, message?: string): any;
|
|
222
|
-
negative(): any;
|
|
223
|
-
positive(): any;
|
|
224
|
-
integer(): any;
|
|
225
|
-
multiple(multiple: any): any;
|
|
226
|
-
format(name: any, fn: any): import("@bedrockio/yada/types/TypeSchema").default;
|
|
227
|
-
toString(): any;
|
|
228
|
-
assertions: any[];
|
|
229
|
-
meta: {};
|
|
230
|
-
required(): any;
|
|
231
|
-
default(value: any): any;
|
|
232
|
-
custom(...args: import("@bedrockio/yada/types/Schema").CustomSignature): any;
|
|
233
|
-
strip(strip: any): any;
|
|
234
|
-
allow(...set: any[]): any;
|
|
235
|
-
reject(...set: any[]): any;
|
|
236
|
-
message(message: any): any;
|
|
237
|
-
tag(tags: any): any;
|
|
238
|
-
description(description: any): any;
|
|
239
|
-
options(options: any): any;
|
|
240
|
-
validate(value: any, options?: {}): Promise<any>;
|
|
241
|
-
clone(meta: any): any;
|
|
242
|
-
append(schema: any): any;
|
|
243
|
-
toOpenApi(extra: any): any;
|
|
244
|
-
assertEnum(set: any, allow: any): any;
|
|
245
|
-
assert(type: any, fn: any): any;
|
|
246
|
-
pushAssertion(assertion: any): void;
|
|
247
|
-
transform(fn: any): any;
|
|
248
|
-
getSortIndex(type: any): number;
|
|
249
|
-
runAssertion(assertion: any, value: any, options?: {}): Promise<any>;
|
|
250
|
-
enumToOpenApi(): {
|
|
251
|
-
type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
252
|
-
enum: any;
|
|
253
|
-
oneOf?: undefined;
|
|
254
|
-
} | {
|
|
255
|
-
oneOf: any[];
|
|
256
|
-
type?: undefined;
|
|
257
|
-
enum?: undefined;
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
sort: import("@bedrockio/yada/types/Schema").default;
|
|
261
|
-
limit: {
|
|
262
|
-
min(min: number, message?: string): any;
|
|
263
|
-
max(max: number, message?: string): any;
|
|
264
|
-
negative(): any;
|
|
265
|
-
positive(): any;
|
|
266
|
-
integer(): any;
|
|
267
|
-
multiple(multiple: any): any;
|
|
268
|
-
format(name: any, fn: any): import("@bedrockio/yada/types/TypeSchema").default;
|
|
269
|
-
toString(): any;
|
|
270
|
-
assertions: any[];
|
|
271
|
-
meta: {};
|
|
272
|
-
required(): any;
|
|
273
|
-
default(value: any): any;
|
|
274
|
-
custom(...args: import("@bedrockio/yada/types/Schema").CustomSignature): any;
|
|
275
|
-
strip(strip: any): any;
|
|
276
|
-
allow(...set: any[]): any;
|
|
277
|
-
reject(...set: any[]): any;
|
|
278
|
-
message(message: any): any;
|
|
279
|
-
tag(tags: any): any;
|
|
280
|
-
description(description: any): any;
|
|
281
|
-
options(options: any): any;
|
|
282
|
-
validate(value: any, options?: {}): Promise<any>;
|
|
283
|
-
clone(meta: any): any;
|
|
284
|
-
append(schema: any): any;
|
|
285
|
-
toOpenApi(extra: any): any;
|
|
286
|
-
assertEnum(set: any, allow: any): any;
|
|
287
|
-
assert(type: any, fn: any): any;
|
|
288
|
-
pushAssertion(assertion: any): void;
|
|
289
|
-
transform(fn: any): any;
|
|
290
|
-
getSortIndex(type: any): number;
|
|
291
|
-
runAssertion(assertion: any, value: any, options?: {}): Promise<any>;
|
|
292
|
-
enumToOpenApi(): {
|
|
293
|
-
type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
294
|
-
enum: any;
|
|
295
|
-
oneOf?: undefined;
|
|
296
|
-
} | {
|
|
297
|
-
oneOf: any[];
|
|
298
|
-
type?: undefined;
|
|
299
|
-
enum?: undefined;
|
|
300
|
-
};
|
|
3
|
+
setup: any;
|
|
4
|
+
getFields: any;
|
|
5
|
+
append(arg: import("@bedrockio/yada/types/Schema").default | import("@bedrockio/yada/types/object").SchemaMap): any;
|
|
6
|
+
pick(...names?: string[]): any;
|
|
7
|
+
omit(...names?: string[]): any;
|
|
8
|
+
format(name: any, fn: any): import("@bedrockio/yada/types/TypeSchema").default;
|
|
9
|
+
toString(): any;
|
|
10
|
+
assertions: any[];
|
|
11
|
+
meta: {};
|
|
12
|
+
required(): any;
|
|
13
|
+
default(value: any): any;
|
|
14
|
+
custom(...args: import("@bedrockio/yada/types/Schema").CustomSignature): any;
|
|
15
|
+
strip(strip: any): any;
|
|
16
|
+
allow(...set: any[]): any;
|
|
17
|
+
reject(...set: any[]): any;
|
|
18
|
+
message(message: any): any;
|
|
19
|
+
tag(tags: any): any;
|
|
20
|
+
description(description: any): any;
|
|
21
|
+
options(options: any): any;
|
|
22
|
+
validate(value: any, options?: {}): Promise<any>;
|
|
23
|
+
clone(meta: any): any;
|
|
24
|
+
toOpenApi(extra: any): any;
|
|
25
|
+
expandExtra(extra?: {}): {};
|
|
26
|
+
assertEnum(set: any, allow: any): any;
|
|
27
|
+
assert(type: any, fn: any): any;
|
|
28
|
+
pushAssertion(assertion: any): void;
|
|
29
|
+
transform(fn: any): any;
|
|
30
|
+
getSortIndex(type: any): number;
|
|
31
|
+
runAssertion(assertion: any, value: any, options?: {}): Promise<any>;
|
|
32
|
+
enumToOpenApi(): {
|
|
33
|
+
type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
34
|
+
enum: any;
|
|
35
|
+
oneOf?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
oneOf: any[];
|
|
38
|
+
type?: undefined;
|
|
39
|
+
enum?: undefined;
|
|
301
40
|
};
|
|
302
41
|
};
|
|
303
42
|
//# sourceMappingURL=search.d.ts.map
|
package/types/search.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.js"],"names":[],"mappings":"AAmBA,gEAyDC;AAED
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.js"],"names":[],"mappings":"AAmBA,gEAyDC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.js"],"names":[],"mappings":"AAiEA,kDAEC;AAED,
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.js"],"names":[],"mappings":"AAiEA,kDAEC;AAED,oEA2DC;AAaD,wEAeC;AA0PD;;;EAEC;AAED;;;EAOC;AA1YD,8EAUK"}
|