@beff/client 0.0.113 → 0.0.115
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 +16 -0
- package/dist/cjs/b.d.ts.map +1 -1
- package/dist/cjs/b.js +24 -204
- package/dist/cjs/codegen-v2.d.ts +221 -0
- package/dist/cjs/codegen-v2.d.ts.map +1 -0
- package/dist/cjs/codegen-v2.js +1254 -0
- package/dist/cjs/hash.d.ts +20 -0
- package/dist/cjs/hash.d.ts.map +1 -0
- package/dist/cjs/hash.js +47 -0
- package/dist/cjs/types.d.ts +3 -0
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/b.d.ts.map +1 -1
- package/dist/esm/b.js +24 -204
- package/dist/esm/codegen-v2.d.ts +221 -0
- package/dist/esm/codegen-v2.d.ts.map +1 -0
- package/dist/esm/codegen-v2.js +1230 -0
- package/dist/esm/hash.d.ts +20 -0
- package/dist/esm/hash.d.ts.map +1 -0
- package/dist/esm/hash.js +42 -0
- package/dist/esm/types.d.ts +3 -0
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/b.d.ts.map +1 -1
- package/dist/types/codegen-v2.d.ts +221 -0
- package/dist/types/codegen-v2.d.ts.map +1 -0
- package/dist/types/hash.d.ts +20 -0
- package/dist/types/hash.d.ts.map +1 -0
- package/dist/types/types.d.ts +3 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +8 -2
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare function generateHashFromNumbers(numbers: number[]): number;
|
|
2
|
+
export declare function generateHashFromString(str: string): number;
|
|
3
|
+
export declare const unknownHash: number;
|
|
4
|
+
export declare const stringHash: number;
|
|
5
|
+
export declare const numberHash: number;
|
|
6
|
+
export declare const booleanHash: number;
|
|
7
|
+
export declare const nullishHash: number;
|
|
8
|
+
export declare const undefinedHash: number;
|
|
9
|
+
export declare const arrayHash: number;
|
|
10
|
+
export declare const objectHash: number;
|
|
11
|
+
export declare const dateHash: number;
|
|
12
|
+
export declare const bigintHash: number;
|
|
13
|
+
export declare const stringWithFormatHash: number;
|
|
14
|
+
export declare const numberWithFormatHash: number;
|
|
15
|
+
export declare const anyOfConstsHash: number;
|
|
16
|
+
export declare const tupleHash: number;
|
|
17
|
+
export declare const allOfHash: number;
|
|
18
|
+
export declare const anyOfHash: number;
|
|
19
|
+
export declare const optionalFieldHash: number;
|
|
20
|
+
//# sourceMappingURL=hash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/hash.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAgBjE;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAU1D;AAED,eAAO,MAAM,WAAW,QAAoC,CAAC;AAC7D,eAAO,MAAM,UAAU,QAAmC,CAAC;AAC3D,eAAO,MAAM,UAAU,QAAmC,CAAC;AAC3D,eAAO,MAAM,WAAW,QAAoC,CAAC;AAC7D,eAAO,MAAM,WAAW,QAAiC,CAAC;AAC1D,eAAO,MAAM,aAAa,QAAsC,CAAC;AACjE,eAAO,MAAM,SAAS,QAAkC,CAAC;AACzD,eAAO,MAAM,UAAU,QAAmC,CAAC;AAC3D,eAAO,MAAM,QAAQ,QAAiC,CAAC;AACvD,eAAO,MAAM,UAAU,QAAmC,CAAC;AAC3D,eAAO,MAAM,oBAAoB,QAA6C,CAAC;AAC/E,eAAO,MAAM,oBAAoB,QAA6C,CAAC;AAC/E,eAAO,MAAM,eAAe,QAAwC,CAAC;AACrE,eAAO,MAAM,SAAS,QAAkC,CAAC;AACzD,eAAO,MAAM,SAAS,QAAkC,CAAC;AACzD,eAAO,MAAM,SAAS,QAAkC,CAAC;AACzD,eAAO,MAAM,iBAAiB,QAA0C,CAAC"}
|
package/dist/cjs/hash.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optionalFieldHash = exports.anyOfHash = exports.allOfHash = exports.tupleHash = exports.anyOfConstsHash = exports.numberWithFormatHash = exports.stringWithFormatHash = exports.bigintHash = exports.dateHash = exports.objectHash = exports.arrayHash = exports.undefinedHash = exports.nullishHash = exports.booleanHash = exports.numberHash = exports.stringHash = exports.unknownHash = void 0;
|
|
4
|
+
exports.generateHashFromNumbers = generateHashFromNumbers;
|
|
5
|
+
exports.generateHashFromString = generateHashFromString;
|
|
6
|
+
function generateHashFromNumbers(numbers) {
|
|
7
|
+
let hash = 0;
|
|
8
|
+
// A common prime multiplier used in hashing algorithms
|
|
9
|
+
const multiplier = 31;
|
|
10
|
+
for (let i = 0; i < numbers.length; i++) {
|
|
11
|
+
const value = numbers[i];
|
|
12
|
+
// Ensure the value is treated as an integer
|
|
13
|
+
// We incorporate the number directly into the hash calculation
|
|
14
|
+
hash = hash * multiplier + value;
|
|
15
|
+
// Constrain result to a 32-bit signed integer using bitwise OR 0
|
|
16
|
+
hash |= 0;
|
|
17
|
+
}
|
|
18
|
+
return hash;
|
|
19
|
+
}
|
|
20
|
+
function generateHashFromString(str) {
|
|
21
|
+
let hash = 0;
|
|
22
|
+
for (let i = 0; i < str.length; i++) {
|
|
23
|
+
const char = str.charCodeAt(i);
|
|
24
|
+
// Equivalent to 'hash * 31 + char' but uses bitwise shifts for speed
|
|
25
|
+
hash = (hash << 5) - hash + char;
|
|
26
|
+
// Constrain to a 32-bit integer
|
|
27
|
+
hash |= 0;
|
|
28
|
+
}
|
|
29
|
+
return hash;
|
|
30
|
+
}
|
|
31
|
+
exports.unknownHash = generateHashFromString("unknown");
|
|
32
|
+
exports.stringHash = generateHashFromString("string");
|
|
33
|
+
exports.numberHash = generateHashFromString("number");
|
|
34
|
+
exports.booleanHash = generateHashFromString("boolean");
|
|
35
|
+
exports.nullishHash = generateHashFromString("null");
|
|
36
|
+
exports.undefinedHash = generateHashFromString("undefined");
|
|
37
|
+
exports.arrayHash = generateHashFromString("array");
|
|
38
|
+
exports.objectHash = generateHashFromString("object");
|
|
39
|
+
exports.dateHash = generateHashFromString("date");
|
|
40
|
+
exports.bigintHash = generateHashFromString("bigint");
|
|
41
|
+
exports.stringWithFormatHash = generateHashFromString("StringWithFormat");
|
|
42
|
+
exports.numberWithFormatHash = generateHashFromString("NumberWithFormat");
|
|
43
|
+
exports.anyOfConstsHash = generateHashFromString("AnyOfConsts");
|
|
44
|
+
exports.tupleHash = generateHashFromString("Tuple");
|
|
45
|
+
exports.allOfHash = generateHashFromString("AllOf");
|
|
46
|
+
exports.anyOfHash = generateHashFromString("AnyOf");
|
|
47
|
+
exports.optionalFieldHash = generateHashFromString("OptionalField");
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ZodType } from "zod";
|
|
2
2
|
import { JSONSchema7 } from "./json-schema";
|
|
3
|
+
import { Runtype } from "./codegen-v2";
|
|
3
4
|
export type StringFormat<Tag1 extends string> = string & {
|
|
4
5
|
[k in Tag1]: Tag1;
|
|
5
6
|
};
|
|
@@ -41,6 +42,8 @@ export type BeffParser<T> = {
|
|
|
41
42
|
validate(input: any, options?: ParseOptions): input is T;
|
|
42
43
|
schema: () => JSONSchema7;
|
|
43
44
|
describe: () => string;
|
|
45
|
+
hash: () => number;
|
|
46
|
+
_runtype: Runtype;
|
|
44
47
|
};
|
|
45
48
|
type Parsers<T> = {
|
|
46
49
|
[K in keyof T]: BeffParser<T[K]>;
|
package/dist/cjs/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO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,IAAI,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC"}
|
package/dist/esm/b.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../../src/b.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../../src/b.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA2CrC,eAAO,MAAM,CAAC;aAzCG,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,UAChD,CAAC,KACR,UAAU,CAAC,GACX,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,GAC7D,CAAC;kBAQkB,UAAU,CAAC,MAAM,CAAC;kBAGlB,UAAU,CAAC,MAAM,CAAC;mBAGjB,UAAU,CAAC,OAAO,CAAC;YAiBxB,CAAC,UAAU,UAAU,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,CAAC,EAAE,CAAC;qBAdnC,UAAU,CAAC,SAAS,CAAC;gBAM1B,UAAU,CAAC,SAAS,CAAC;eAGtB,UAAU,CAAC,GAAG,CAAC;mBAGX,UAAU,CAAC,OAAO,CAAC;gBATtB,UAAU,CAAC,IAAI,CAAC;oBAcV,CAAC,UAAU,UAAU,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;CAe1E,CAAC"}
|
package/dist/esm/b.js
CHANGED
|
@@ -1,208 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return safe.data;
|
|
7
|
-
}
|
|
8
|
-
const error = new Error(`Failed to parse`);
|
|
9
|
-
//@ts-ignore
|
|
10
|
-
error.errors = safe.errors;
|
|
11
|
-
throw error;
|
|
12
|
-
};
|
|
13
|
-
const zod = () => {
|
|
14
|
-
//@ts-ignore
|
|
15
|
-
return z.custom((data) => safeParse(data).success,
|
|
16
|
-
//@ts-ignore
|
|
17
|
-
(val) => {
|
|
18
|
-
const errors = safeParse(val).errors;
|
|
19
|
-
//@ts-ignore
|
|
20
|
-
return printErrors(errors, []);
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
return {
|
|
24
|
-
safeParse,
|
|
25
|
-
parse,
|
|
26
|
-
//@ts-ignore
|
|
27
|
-
zod,
|
|
28
|
-
name,
|
|
29
|
-
validate,
|
|
30
|
-
schema: jsonSchema,
|
|
31
|
-
describe,
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
const Object_ = (fields) => buildParserFromSafeParser("b.Object", (input, options) => {
|
|
35
|
-
const disallowExtraProperties = options?.disallowExtraProperties ?? false;
|
|
36
|
-
if (typeof input !== "object" || input == null || Array.isArray(input)) {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
for (const key in fields) {
|
|
40
|
-
if (!fields[key].validate(input[key])) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (disallowExtraProperties) {
|
|
45
|
-
for (const key in input) {
|
|
46
|
-
if (!fields[key]) {
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return true;
|
|
52
|
-
}, (input, options) => {
|
|
53
|
-
if (typeof input !== "object" || input == null || Array.isArray(input)) {
|
|
54
|
-
return {
|
|
55
|
-
success: false,
|
|
56
|
-
errors: [{ message: "Expected object", path: [], received: input }],
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const disallowExtraProperties = options?.disallowExtraProperties ?? false;
|
|
60
|
-
const errors = [];
|
|
61
|
-
const result = {};
|
|
62
|
-
for (const key in fields) {
|
|
63
|
-
const field = fields[key];
|
|
64
|
-
const res = field.safeParse(input[key]);
|
|
65
|
-
if (res.success) {
|
|
66
|
-
result[key] = res.data;
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
errors.push(...res.errors.map((it) => ({ ...it, path: [key, ...it.path] })));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (disallowExtraProperties) {
|
|
73
|
-
for (const key in input) {
|
|
74
|
-
if (!fields[key]) {
|
|
75
|
-
errors.push({
|
|
76
|
-
message: "Extra property",
|
|
77
|
-
path: [key],
|
|
78
|
-
received: input[key],
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (errors.length > 0) {
|
|
84
|
-
return { success: false, errors };
|
|
85
|
-
}
|
|
86
|
-
return { success: true, data: result };
|
|
87
|
-
}, () => ({
|
|
88
|
-
type: "object",
|
|
89
|
-
properties:
|
|
90
|
-
//@ts-ignore
|
|
91
|
-
Object.fromEntries(
|
|
92
|
-
//@ts-ignore
|
|
93
|
-
Object.entries(fields).map(([key, parser]) => [key, parser.schema()])),
|
|
94
|
-
}), () => {
|
|
95
|
-
const sortedKeys = Object.keys(fields).sort();
|
|
96
|
-
const props = sortedKeys
|
|
97
|
-
.map((key) => {
|
|
98
|
-
const parser = fields[key];
|
|
99
|
-
return `"${key}": ${parser.describe()}`;
|
|
100
|
-
})
|
|
101
|
-
.join(", ");
|
|
102
|
-
return `{ ${props} }`;
|
|
103
|
-
});
|
|
104
|
-
const String_ = () => buildParserFromSafeParser("String",
|
|
105
|
-
//@ts-ignore
|
|
106
|
-
(input) => typeof input === "string", (input) => {
|
|
107
|
-
if (typeof input === "string") {
|
|
108
|
-
return { success: true, data: input };
|
|
109
|
-
}
|
|
110
|
-
return { success: false, errors: [{ message: "Expected string", path: [], received: input }] };
|
|
111
|
-
}, () => ({
|
|
112
|
-
type: "string",
|
|
113
|
-
}), () => `string`);
|
|
114
|
-
const Number_ = () => buildParserFromSafeParser("Number",
|
|
115
|
-
//@ts-ignore
|
|
116
|
-
(input) => typeof input === "number", (input) => {
|
|
117
|
-
if (typeof input === "number") {
|
|
118
|
-
return { success: true, data: input };
|
|
119
|
-
}
|
|
120
|
-
return { success: false, errors: [{ message: "Expected number", path: [], received: input }] };
|
|
121
|
-
}, () => ({
|
|
122
|
-
type: "number",
|
|
123
|
-
}), () => `number`);
|
|
124
|
-
const Boolean_ = () => buildParserFromSafeParser("Boolean",
|
|
125
|
-
//@ts-ignore
|
|
126
|
-
(input) => typeof input === "boolean", (input) => {
|
|
127
|
-
if (typeof input === "boolean") {
|
|
128
|
-
return { success: true, data: input };
|
|
1
|
+
import { AnyRuntype, ArrayRuntype, buildParserFromRuntype, NullishRuntype, ObjectRuntype, TypeofRuntype, } from "./codegen-v2";
|
|
2
|
+
const Object_ = (fields) => {
|
|
3
|
+
const props = {};
|
|
4
|
+
for (const key of Object.keys(fields)) {
|
|
5
|
+
props[key] = fields[key]._runtype;
|
|
129
6
|
}
|
|
130
|
-
return
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}, () => ({
|
|
150
|
-
type: "null",
|
|
151
|
-
}), () => `null`);
|
|
152
|
-
const Null_ = () => buildParserFromSafeParser("Null", (input) => input == null, (input) => {
|
|
153
|
-
if (input == null) {
|
|
154
|
-
return { success: true, data: input };
|
|
155
|
-
}
|
|
156
|
-
return { success: false, errors: [{ message: "Expected null", path: [], received: input }] };
|
|
157
|
-
}, () => ({
|
|
158
|
-
type: "null",
|
|
159
|
-
}), () => `null`);
|
|
160
|
-
const Any_ = () => buildParserFromSafeParser("Any",
|
|
161
|
-
//@ts-ignore
|
|
162
|
-
(_input) => true, (input) => {
|
|
163
|
-
return { success: true, data: input };
|
|
164
|
-
}, () => ({}), () => `any`);
|
|
165
|
-
const Unknown_ = () => buildParserFromSafeParser("Unknown", (_input) => true, (input) => {
|
|
166
|
-
return { success: true, data: input };
|
|
167
|
-
}, () => ({}), () => `unknown`);
|
|
168
|
-
const Array_ = (parser) => buildParserFromSafeParser("b.Array",
|
|
169
|
-
//@ts-ignore
|
|
170
|
-
(input) => {
|
|
171
|
-
if (!Array.isArray(input)) {
|
|
172
|
-
return false;
|
|
173
|
-
}
|
|
174
|
-
for (let i = 0; i < input.length; i++) {
|
|
175
|
-
if (!parser.validate(input[i])) {
|
|
176
|
-
return false;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return true;
|
|
180
|
-
}, (input) => {
|
|
181
|
-
if (!Array.isArray(input)) {
|
|
182
|
-
return {
|
|
183
|
-
success: false,
|
|
184
|
-
errors: [{ message: "Expected array", path: [], received: input }],
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
const errors = [];
|
|
188
|
-
const results = [];
|
|
189
|
-
for (let i = 0; i < input.length; i++) {
|
|
190
|
-
const res = parser.safeParse(input[i]);
|
|
191
|
-
if (res.success) {
|
|
192
|
-
results.push(res.data);
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
errors.push(...res.errors.map((it) => ({ ...it, path: [i.toString(), ...it.path] })));
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
if (errors.length > 0) {
|
|
199
|
-
return { success: false, errors };
|
|
200
|
-
}
|
|
201
|
-
return { success: true, data: results };
|
|
202
|
-
}, () => ({
|
|
203
|
-
type: "array",
|
|
204
|
-
items: parser.schema(),
|
|
205
|
-
}), () => `Array<${parser.describe()}>`);
|
|
7
|
+
return buildParserFromRuntype(new ObjectRuntype(props, []), "b.Object", true);
|
|
8
|
+
};
|
|
9
|
+
const stringParser = buildParserFromRuntype(new TypeofRuntype("string"), "String", true);
|
|
10
|
+
const String_ = () => stringParser;
|
|
11
|
+
const numberParser = buildParserFromRuntype(new TypeofRuntype("number"), "Number", true);
|
|
12
|
+
const Number_ = () => numberParser;
|
|
13
|
+
const booleanParser = buildParserFromRuntype(new TypeofRuntype("boolean"), "Boolean", true);
|
|
14
|
+
const Boolean_ = () => booleanParser;
|
|
15
|
+
const undefinedParser = buildParserFromRuntype(new NullishRuntype("undefined"), "Undefined", true);
|
|
16
|
+
const Undefined_ = () => undefinedParser;
|
|
17
|
+
const voidParser = buildParserFromRuntype(new NullishRuntype("void"), "Void", true);
|
|
18
|
+
const Void_ = () => voidParser;
|
|
19
|
+
const nullParser = buildParserFromRuntype(new NullishRuntype("null"), "Null", true);
|
|
20
|
+
const Null_ = () => nullParser;
|
|
21
|
+
const anyParser = buildParserFromRuntype(new AnyRuntype(), "Any", true);
|
|
22
|
+
const Any_ = () => anyParser;
|
|
23
|
+
const unknwonParser = buildParserFromRuntype(new AnyRuntype(), "Unknown", true);
|
|
24
|
+
const Unknown_ = () => unknwonParser;
|
|
25
|
+
const Array_ = (parser) => buildParserFromRuntype(new ArrayRuntype(parser._runtype), "b.Array", true);
|
|
206
26
|
const ReadOnlyArray_ = (parser) => Array_(parser);
|
|
207
27
|
export const b = {
|
|
208
28
|
Object: Object_,
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { type BeffParser, type DecodeError } from "./types";
|
|
2
|
+
import { JSONSchema7 } from "./json-schema";
|
|
3
|
+
type UserProvidedStringValidatorFn = (input: string) => boolean;
|
|
4
|
+
export declare function registerStringFormatter(name: string, validator: UserProvidedStringValidatorFn): void;
|
|
5
|
+
type UserProvidedNumberValidatorFn = (input: number) => boolean;
|
|
6
|
+
export declare function registerNumberFormatter(name: string, validator: UserProvidedNumberValidatorFn): void;
|
|
7
|
+
type DescribeContext = {
|
|
8
|
+
measure: boolean;
|
|
9
|
+
deps: Record<string, boolean | string>;
|
|
10
|
+
deps_counter: Record<string, number>;
|
|
11
|
+
};
|
|
12
|
+
type SchemaContext = {
|
|
13
|
+
path: string[];
|
|
14
|
+
seen: Record<string, boolean>;
|
|
15
|
+
};
|
|
16
|
+
type ValidateContext = {
|
|
17
|
+
disallowExtraProperties: boolean;
|
|
18
|
+
};
|
|
19
|
+
type ParseContext = {
|
|
20
|
+
disallowExtraProperties: boolean;
|
|
21
|
+
};
|
|
22
|
+
type ReportContext = {
|
|
23
|
+
disallowExtraProperties: boolean;
|
|
24
|
+
path: string[];
|
|
25
|
+
};
|
|
26
|
+
type HashContext = {
|
|
27
|
+
seen: Record<string, boolean>;
|
|
28
|
+
};
|
|
29
|
+
export interface Runtype {
|
|
30
|
+
describe(ctx: DescribeContext): string;
|
|
31
|
+
schema(ctx: SchemaContext): JSONSchema7;
|
|
32
|
+
hash(ctx: HashContext): number;
|
|
33
|
+
validate(ctx: ValidateContext, input: unknown): boolean;
|
|
34
|
+
parseAfterValidation(ctx: ParseContext, input: any): unknown;
|
|
35
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
36
|
+
}
|
|
37
|
+
type TypeOfSupported = "string" | "number" | "boolean";
|
|
38
|
+
export declare class TypeofRuntype implements Runtype {
|
|
39
|
+
private typeName;
|
|
40
|
+
constructor(typeName: TypeOfSupported);
|
|
41
|
+
describe(_ctx: DescribeContext): string;
|
|
42
|
+
schema(_ctx: SchemaContext): JSONSchema7;
|
|
43
|
+
validate(_ctx: ValidateContext, input: unknown): boolean;
|
|
44
|
+
parseAfterValidation(_ctx: ParseContext, input: unknown): unknown;
|
|
45
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
46
|
+
hash(_ctx: HashContext): number;
|
|
47
|
+
}
|
|
48
|
+
export declare class AnyRuntype implements Runtype {
|
|
49
|
+
describe(_ctx: DescribeContext): string;
|
|
50
|
+
schema(_ctx: SchemaContext): JSONSchema7;
|
|
51
|
+
validate(_ctx: ValidateContext, _input: unknown): boolean;
|
|
52
|
+
parseAfterValidation(_ctx: ParseContext, input: unknown): unknown;
|
|
53
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
54
|
+
hash(_ctx: HashContext): number;
|
|
55
|
+
}
|
|
56
|
+
export declare class NullishRuntype implements Runtype {
|
|
57
|
+
description: string;
|
|
58
|
+
constructor(description: "undefined" | "null" | "void");
|
|
59
|
+
describe(_ctx: DescribeContext): string;
|
|
60
|
+
schema(_ctx: SchemaContext): JSONSchema7;
|
|
61
|
+
validate(_ctx: ValidateContext, input: unknown): boolean;
|
|
62
|
+
parseAfterValidation(_ctx: ParseContext, input: unknown): unknown;
|
|
63
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
64
|
+
hash(_ctx: HashContext): number;
|
|
65
|
+
}
|
|
66
|
+
export declare class NeverRuntype implements Runtype {
|
|
67
|
+
describe(_ctx: DescribeContext): string;
|
|
68
|
+
schema(_ctx: SchemaContext): JSONSchema7;
|
|
69
|
+
validate(_ctx: ValidateContext, _input: unknown): boolean;
|
|
70
|
+
parseAfterValidation(_ctx: ParseContext, _input: unknown): unknown;
|
|
71
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
72
|
+
hash(_ctx: HashContext): number;
|
|
73
|
+
}
|
|
74
|
+
type Const = string | number | boolean | null;
|
|
75
|
+
export declare class ConstRuntype implements Runtype {
|
|
76
|
+
private value;
|
|
77
|
+
constructor(value: Const);
|
|
78
|
+
describe(_ctx: DescribeContext): string;
|
|
79
|
+
schema(_ctx: SchemaContext): JSONSchema7;
|
|
80
|
+
validate(_ctx: ValidateContext, input: unknown): boolean;
|
|
81
|
+
parseAfterValidation(_ctx: ParseContext, input: unknown): unknown;
|
|
82
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
83
|
+
hash(_ctx: HashContext): number;
|
|
84
|
+
}
|
|
85
|
+
export declare class RegexRuntype implements Runtype {
|
|
86
|
+
private regex;
|
|
87
|
+
private description;
|
|
88
|
+
constructor(regex: RegExp, description: string);
|
|
89
|
+
describe(_ctx: DescribeContext): string;
|
|
90
|
+
schema(_ctx: SchemaContext): JSONSchema7;
|
|
91
|
+
validate(_ctx: ValidateContext, input: unknown): boolean;
|
|
92
|
+
parseAfterValidation(_ctx: ParseContext, input: unknown): unknown;
|
|
93
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
94
|
+
hash(_ctx: HashContext): number;
|
|
95
|
+
}
|
|
96
|
+
export declare class DateRuntype implements Runtype {
|
|
97
|
+
describe(_ctx: DescribeContext): string;
|
|
98
|
+
schema(ctx: SchemaContext): JSONSchema7;
|
|
99
|
+
validate(_ctx: ValidateContext, input: unknown): boolean;
|
|
100
|
+
parseAfterValidation(_ctx: ParseContext, input: unknown): unknown;
|
|
101
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
102
|
+
hash(_ctx: HashContext): number;
|
|
103
|
+
}
|
|
104
|
+
export declare class BigIntRuntype implements Runtype {
|
|
105
|
+
describe(_ctx: DescribeContext): string;
|
|
106
|
+
schema(ctx: SchemaContext): JSONSchema7;
|
|
107
|
+
validate(_ctx: ValidateContext, input: unknown): boolean;
|
|
108
|
+
parseAfterValidation(_ctx: ParseContext, input: unknown): unknown;
|
|
109
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
110
|
+
hash(_ctx: HashContext): number;
|
|
111
|
+
}
|
|
112
|
+
export declare class StringWithFormatRuntype implements Runtype {
|
|
113
|
+
private formats;
|
|
114
|
+
constructor(formats: string[]);
|
|
115
|
+
describe(_ctx: DescribeContext): string;
|
|
116
|
+
schema(_ctx: SchemaContext): JSONSchema7;
|
|
117
|
+
validate(_ctx: ValidateContext, input: unknown): boolean;
|
|
118
|
+
parseAfterValidation(_ctx: ParseContext, input: unknown): unknown;
|
|
119
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
120
|
+
hash(_ctx: HashContext): number;
|
|
121
|
+
}
|
|
122
|
+
export declare class NumberWithFormatRuntype implements Runtype {
|
|
123
|
+
private formats;
|
|
124
|
+
constructor(formats: string[]);
|
|
125
|
+
describe(_ctx: DescribeContext): string;
|
|
126
|
+
schema(_ctx: SchemaContext): JSONSchema7;
|
|
127
|
+
validate(_ctx: ValidateContext, input: unknown): boolean;
|
|
128
|
+
parseAfterValidation(_ctx: ParseContext, input: unknown): unknown;
|
|
129
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
130
|
+
hash(_ctx: HashContext): number;
|
|
131
|
+
}
|
|
132
|
+
export declare class AnyOfConstsRuntype implements Runtype {
|
|
133
|
+
private values;
|
|
134
|
+
constructor(values: Const[]);
|
|
135
|
+
describe(_ctx: DescribeContext): string;
|
|
136
|
+
schema(_ctx: SchemaContext): JSONSchema7;
|
|
137
|
+
validate(_ctx: ValidateContext, input: unknown): boolean;
|
|
138
|
+
parseAfterValidation(_ctx: ParseContext, input: unknown): unknown;
|
|
139
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
140
|
+
hash(_ctx: HashContext): number;
|
|
141
|
+
}
|
|
142
|
+
export declare class TupleRuntype implements Runtype {
|
|
143
|
+
private prefix;
|
|
144
|
+
private rest;
|
|
145
|
+
constructor(prefix: Runtype[], rest: Runtype | null);
|
|
146
|
+
describe(ctx: DescribeContext): string;
|
|
147
|
+
schema(ctx: SchemaContext): JSONSchema7;
|
|
148
|
+
validate(ctx: ValidateContext, input: unknown): boolean;
|
|
149
|
+
parseAfterValidation(ctx: ParseContext, input: any): unknown;
|
|
150
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
151
|
+
hash(ctx: HashContext): number;
|
|
152
|
+
}
|
|
153
|
+
export declare class AllOfRuntype implements Runtype {
|
|
154
|
+
private schemas;
|
|
155
|
+
constructor(schemas: Runtype[]);
|
|
156
|
+
describe(ctx: DescribeContext): string;
|
|
157
|
+
schema(ctx: SchemaContext): JSONSchema7;
|
|
158
|
+
validate(ctx: ValidateContext, input: unknown): boolean;
|
|
159
|
+
parseAfterValidation(ctx: ParseContext, input: any): unknown;
|
|
160
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
161
|
+
hash(ctx: HashContext): number;
|
|
162
|
+
}
|
|
163
|
+
export declare class AnyOfRuntype implements Runtype {
|
|
164
|
+
private schemas;
|
|
165
|
+
constructor(schemas: Runtype[]);
|
|
166
|
+
schema(ctx: SchemaContext): JSONSchema7;
|
|
167
|
+
validate(ctx: ValidateContext, input: unknown): boolean;
|
|
168
|
+
parseAfterValidation(ctx: ParseContext, input: any): unknown;
|
|
169
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
170
|
+
describe(ctx: DescribeContext): string;
|
|
171
|
+
hash(ctx: HashContext): number;
|
|
172
|
+
}
|
|
173
|
+
export declare class ArrayRuntype implements Runtype {
|
|
174
|
+
private itemParser;
|
|
175
|
+
constructor(itemParser: Runtype);
|
|
176
|
+
schema(ctx: SchemaContext): JSONSchema7;
|
|
177
|
+
validate(ctx: ValidateContext, input: unknown): boolean;
|
|
178
|
+
parseAfterValidation(ctx: ParseContext, input: any): unknown;
|
|
179
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
180
|
+
describe(ctx: DescribeContext): string;
|
|
181
|
+
hash(ctx: HashContext): number;
|
|
182
|
+
}
|
|
183
|
+
export declare class AnyOfDiscriminatedRuntype implements Runtype {
|
|
184
|
+
private schemas;
|
|
185
|
+
private discriminator;
|
|
186
|
+
private mapping;
|
|
187
|
+
constructor(schemas: Runtype[], discriminator: string, mapping: Record<string, Runtype>);
|
|
188
|
+
schema(ctx: SchemaContext): JSONSchema7;
|
|
189
|
+
validate(ctx: ValidateContext, input: unknown): boolean;
|
|
190
|
+
parseAfterValidation(ctx: ParseContext, input: any): unknown;
|
|
191
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
192
|
+
describe(ctx: DescribeContext): string;
|
|
193
|
+
hash(ctx: HashContext): number;
|
|
194
|
+
}
|
|
195
|
+
export declare class OptionalFieldRuntype implements Runtype {
|
|
196
|
+
private t;
|
|
197
|
+
constructor(t: Runtype);
|
|
198
|
+
schema(ctx: SchemaContext): JSONSchema7;
|
|
199
|
+
validate(ctx: ValidateContext, input: unknown): boolean;
|
|
200
|
+
parseAfterValidation(ctx: ParseContext, input: any): unknown;
|
|
201
|
+
reportDecodeError(ctx: ReportContext, input: unknown): DecodeError[];
|
|
202
|
+
describe(ctx: DescribeContext): string;
|
|
203
|
+
hash(ctx: HashContext): number;
|
|
204
|
+
}
|
|
205
|
+
export declare class ObjectRuntype implements Runtype {
|
|
206
|
+
private properties;
|
|
207
|
+
private indexedPropertiesParser;
|
|
208
|
+
constructor(properties: Record<string, Runtype>, indexedPropertiesParser: Array<{
|
|
209
|
+
key: Runtype;
|
|
210
|
+
value: Runtype;
|
|
211
|
+
}>);
|
|
212
|
+
describe(ctx: DescribeContext): string;
|
|
213
|
+
schema(ctx: SchemaContext): JSONSchema7;
|
|
214
|
+
validate(ctx: ValidateContext, input: any): boolean;
|
|
215
|
+
parseAfterValidation(ctx: ParseContext, input: any): unknown;
|
|
216
|
+
reportDecodeError(ctx: ReportContext, input: any): DecodeError[];
|
|
217
|
+
hash(ctx: HashContext): number;
|
|
218
|
+
}
|
|
219
|
+
export declare const buildParserFromRuntype: (runtype: Runtype, name: string, isB: boolean) => BeffParser<any>;
|
|
220
|
+
export {};
|
|
221
|
+
//# sourceMappingURL=codegen-v2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen-v2.d.ts","sourceRoot":"","sources":["../../src/codegen-v2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAIjB,MAAM,SAAS,CAAC;AAuBjB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAkP5C,KAAK,6BAA6B,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;AAEhE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,M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