@xube/kit-aws-data-schema 0.0.73
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/constants.d.ts +2 -0
- package/dist/constants.js +5 -0
- package/dist/decode/aggregate.d.ts +107 -0
- package/dist/decode/aggregate.js +17 -0
- package/dist/decode/reading.d.ts +94 -0
- package/dist/decode/reading.js +23 -0
- package/dist/generated/index.d.ts +16 -0
- package/dist/generated/index.js +41 -0
- package/dist/generated/types/aggregateMetadata.d.ts +11 -0
- package/dist/generated/types/aggregateMetadata.js +23 -0
- package/dist/generated/types/aggregateMetadataTypes.d.ts +19 -0
- package/dist/generated/types/aggregateMetadataTypes.js +23 -0
- package/dist/generated/types/aggregateMetadataV1.d.ts +19 -0
- package/dist/generated/types/aggregateMetadataV1.js +23 -0
- package/dist/generated/types/dataMessage.d.ts +15 -0
- package/dist/generated/types/dataMessage.js +23 -0
- package/dist/generated/types/deviceReadingMetadataV1.d.ts +12 -0
- package/dist/generated/types/deviceReadingMetadataV1.js +23 -0
- package/dist/generated/types/deviceReadingV1.d.ts +15 -0
- package/dist/generated/types/deviceReadingV1.js +23 -0
- package/dist/generated/types/readingMetadataV1.d.ts +12 -0
- package/dist/generated/types/readingMetadataV1.js +23 -0
- package/dist/generated/types/readingV1.d.ts +16 -0
- package/dist/generated/types/readingV1.js +23 -0
- package/dist/generated/validators/aggregateMetadata.d.ts +13 -0
- package/dist/generated/validators/aggregateMetadata.js +54 -0
- package/dist/generated/validators/aggregateMetadataTypes.d.ts +13 -0
- package/dist/generated/validators/aggregateMetadataTypes.js +236 -0
- package/dist/generated/validators/aggregateMetadataV1.d.ts +13 -0
- package/dist/generated/validators/aggregateMetadataV1.js +236 -0
- package/dist/generated/validators/dataMessage.d.ts +13 -0
- package/dist/generated/validators/dataMessage.js +142 -0
- package/dist/generated/validators/deviceReadingMetadataV1.d.ts +13 -0
- package/dist/generated/validators/deviceReadingMetadataV1.js +77 -0
- package/dist/generated/validators/deviceReadingV1.d.ts +13 -0
- package/dist/generated/validators/deviceReadingV1.js +127 -0
- package/dist/generated/validators/readingMetadataV1.d.ts +13 -0
- package/dist/generated/validators/readingMetadataV1.js +77 -0
- package/dist/generated/validators/readingV1.d.ts +13 -0
- package/dist/generated/validators/readingV1.js +216 -0
- package/dist/generator.d.ts +1 -0
- package/dist/generator.js +17 -0
- package/dist/get/get-data-by-date-range.d.ts +204 -0
- package/dist/get/get-data-by-date-range.js +35 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +23 -0
- package/dist/key/get.d.ts +2 -0
- package/dist/key/get.js +11 -0
- package/dist/message/message.d.ts +20 -0
- package/dist/message/message.js +11 -0
- package/package.json +34 -0
- package/src/constants.ts +3 -0
- package/src/decode/aggregate.ts +18 -0
- package/src/decode/reading.ts +23 -0
- package/src/generated/index.ts +16 -0
- package/src/generated/types/aggregateMetadata.ts +26 -0
- package/src/generated/types/aggregateMetadataTypes.ts +34 -0
- package/src/generated/types/aggregateMetadataV1.ts +34 -0
- package/src/generated/types/dataMessage.ts +30 -0
- package/src/generated/types/deviceReadingMetadataV1.ts +27 -0
- package/src/generated/types/deviceReadingV1.ts +30 -0
- package/src/generated/types/readingMetadataV1.ts +27 -0
- package/src/generated/types/readingV1.ts +31 -0
- package/src/generated/validators/aggregateMetadata.js +1 -0
- package/src/generated/validators/aggregateMetadataTypes.js +1 -0
- package/src/generated/validators/aggregateMetadataV1.js +1 -0
- package/src/generated/validators/dataMessage.js +1 -0
- package/src/generated/validators/deviceReadingMetadataV1.js +1 -0
- package/src/generated/validators/deviceReadingV1.js +1 -0
- package/src/generated/validators/readingMetadataV1.js +1 -0
- package/src/generated/validators/readingV1.js +1 -0
- package/src/generator.ts +50 -0
- package/src/get/get-data-by-date-range.ts +52 -0
- package/src/index.ts +7 -0
- package/src/key/get.ts +11 -0
- package/src/message/message.ts +9 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validate = void 0;
|
|
4
|
+
exports.validate = validate10;
|
|
5
|
+
exports.default = validate10;
|
|
6
|
+
const schema27 = { "$ref": "#/definitions/aggregatemetadataJsonSchema", "definitions": { "aggregatemetadataJsonSchema": { "type": "object", "properties": { "v": { "type": "number" } }, "required": ["v"], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#" };
|
|
7
|
+
const schema28 = { "type": "object", "properties": { "v": { "type": "number" } }, "required": ["v"], "additionalProperties": false };
|
|
8
|
+
function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { let vErrors = null; let errors = 0; if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9
|
+
if (data.v === undefined) {
|
|
10
|
+
const err0 = { instancePath, schemaPath: "#/definitions/aggregatemetadataJsonSchema/required", keyword: "required", params: { missingProperty: "v" }, message: "must have required property '" + "v" + "'" };
|
|
11
|
+
if (vErrors === null) {
|
|
12
|
+
vErrors = [err0];
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
vErrors.push(err0);
|
|
16
|
+
}
|
|
17
|
+
errors++;
|
|
18
|
+
}
|
|
19
|
+
for (const key0 in data) {
|
|
20
|
+
if (!(key0 === "v")) {
|
|
21
|
+
const err1 = { instancePath, schemaPath: "#/definitions/aggregatemetadataJsonSchema/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
22
|
+
if (vErrors === null) {
|
|
23
|
+
vErrors = [err1];
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
vErrors.push(err1);
|
|
27
|
+
}
|
|
28
|
+
errors++;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (data.v !== undefined) {
|
|
32
|
+
let data0 = data.v;
|
|
33
|
+
if (!((typeof data0 == "number") && (isFinite(data0)))) {
|
|
34
|
+
const err2 = { instancePath: instancePath + "/v", schemaPath: "#/definitions/aggregatemetadataJsonSchema/properties/v/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
35
|
+
if (vErrors === null) {
|
|
36
|
+
vErrors = [err2];
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
vErrors.push(err2);
|
|
40
|
+
}
|
|
41
|
+
errors++;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const err3 = { instancePath, schemaPath: "#/definitions/aggregatemetadataJsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
47
|
+
if (vErrors === null) {
|
|
48
|
+
vErrors = [err3];
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
vErrors.push(err3);
|
|
52
|
+
}
|
|
53
|
+
errors++;
|
|
54
|
+
} validate10.errors = vErrors; return errors === 0; }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function validate(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
2
|
+
instancePath?: string | undefined;
|
|
3
|
+
parentData: any;
|
|
4
|
+
parentDataProperty: any;
|
|
5
|
+
rootData?: any;
|
|
6
|
+
}): boolean;
|
|
7
|
+
export default validate10;
|
|
8
|
+
declare function validate10(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
9
|
+
instancePath?: string | undefined;
|
|
10
|
+
parentData: any;
|
|
11
|
+
parentDataProperty: any;
|
|
12
|
+
rootData?: any;
|
|
13
|
+
}): boolean;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validate = void 0;
|
|
4
|
+
exports.validate = validate10;
|
|
5
|
+
exports.default = validate10;
|
|
6
|
+
const schema27 = { "$ref": "#/definitions/aggregatemetadatatypesJsonSchema", "definitions": { "aggregatemetadatatypesJsonSchema": { "type": "object", "properties": { "v": { "type": "number", "const": 1 }, "s": { "type": "number" }, "m": { "type": "array", "items": { "type": "object", "properties": { "m": { "type": "object", "properties": { "s": { "type": "number" }, "us": { "type": "number" } }, "required": ["s", "us"], "additionalProperties": false }, "s": { "type": "number" } }, "required": ["m"], "additionalProperties": false } } }, "required": ["v", "s", "m"], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#" };
|
|
7
|
+
const schema28 = { "type": "object", "properties": { "v": { "type": "number", "const": 1 }, "s": { "type": "number" }, "m": { "type": "array", "items": { "type": "object", "properties": { "m": { "type": "object", "properties": { "s": { "type": "number" }, "us": { "type": "number" } }, "required": ["s", "us"], "additionalProperties": false }, "s": { "type": "number" } }, "required": ["m"], "additionalProperties": false } } }, "required": ["v", "s", "m"], "additionalProperties": false };
|
|
8
|
+
function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { let vErrors = null; let errors = 0; if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9
|
+
if (data.v === undefined) {
|
|
10
|
+
const err0 = { instancePath, schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/required", keyword: "required", params: { missingProperty: "v" }, message: "must have required property '" + "v" + "'" };
|
|
11
|
+
if (vErrors === null) {
|
|
12
|
+
vErrors = [err0];
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
vErrors.push(err0);
|
|
16
|
+
}
|
|
17
|
+
errors++;
|
|
18
|
+
}
|
|
19
|
+
if (data.s === undefined) {
|
|
20
|
+
const err1 = { instancePath, schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/required", keyword: "required", params: { missingProperty: "s" }, message: "must have required property '" + "s" + "'" };
|
|
21
|
+
if (vErrors === null) {
|
|
22
|
+
vErrors = [err1];
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
vErrors.push(err1);
|
|
26
|
+
}
|
|
27
|
+
errors++;
|
|
28
|
+
}
|
|
29
|
+
if (data.m === undefined) {
|
|
30
|
+
const err2 = { instancePath, schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/required", keyword: "required", params: { missingProperty: "m" }, message: "must have required property '" + "m" + "'" };
|
|
31
|
+
if (vErrors === null) {
|
|
32
|
+
vErrors = [err2];
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
vErrors.push(err2);
|
|
36
|
+
}
|
|
37
|
+
errors++;
|
|
38
|
+
}
|
|
39
|
+
for (const key0 in data) {
|
|
40
|
+
if (!(((key0 === "v") || (key0 === "s")) || (key0 === "m"))) {
|
|
41
|
+
const err3 = { instancePath, schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
42
|
+
if (vErrors === null) {
|
|
43
|
+
vErrors = [err3];
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
vErrors.push(err3);
|
|
47
|
+
}
|
|
48
|
+
errors++;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (data.v !== undefined) {
|
|
52
|
+
let data0 = data.v;
|
|
53
|
+
if (!((typeof data0 == "number") && (isFinite(data0)))) {
|
|
54
|
+
const err4 = { instancePath: instancePath + "/v", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/v/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
55
|
+
if (vErrors === null) {
|
|
56
|
+
vErrors = [err4];
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
vErrors.push(err4);
|
|
60
|
+
}
|
|
61
|
+
errors++;
|
|
62
|
+
}
|
|
63
|
+
if (1 !== data0) {
|
|
64
|
+
const err5 = { instancePath: instancePath + "/v", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/v/const", keyword: "const", params: { allowedValue: 1 }, message: "must be equal to constant" };
|
|
65
|
+
if (vErrors === null) {
|
|
66
|
+
vErrors = [err5];
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
vErrors.push(err5);
|
|
70
|
+
}
|
|
71
|
+
errors++;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (data.s !== undefined) {
|
|
75
|
+
let data1 = data.s;
|
|
76
|
+
if (!((typeof data1 == "number") && (isFinite(data1)))) {
|
|
77
|
+
const err6 = { instancePath: instancePath + "/s", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
78
|
+
if (vErrors === null) {
|
|
79
|
+
vErrors = [err6];
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
vErrors.push(err6);
|
|
83
|
+
}
|
|
84
|
+
errors++;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (data.m !== undefined) {
|
|
88
|
+
let data2 = data.m;
|
|
89
|
+
if (Array.isArray(data2)) {
|
|
90
|
+
const len0 = data2.length;
|
|
91
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
92
|
+
let data3 = data2[i0];
|
|
93
|
+
if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
|
|
94
|
+
if (data3.m === undefined) {
|
|
95
|
+
const err7 = { instancePath: instancePath + "/m/" + i0, schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/items/required", keyword: "required", params: { missingProperty: "m" }, message: "must have required property '" + "m" + "'" };
|
|
96
|
+
if (vErrors === null) {
|
|
97
|
+
vErrors = [err7];
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
vErrors.push(err7);
|
|
101
|
+
}
|
|
102
|
+
errors++;
|
|
103
|
+
}
|
|
104
|
+
for (const key1 in data3) {
|
|
105
|
+
if (!((key1 === "m") || (key1 === "s"))) {
|
|
106
|
+
const err8 = { instancePath: instancePath + "/m/" + i0, schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
107
|
+
if (vErrors === null) {
|
|
108
|
+
vErrors = [err8];
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
vErrors.push(err8);
|
|
112
|
+
}
|
|
113
|
+
errors++;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (data3.m !== undefined) {
|
|
117
|
+
let data4 = data3.m;
|
|
118
|
+
if (data4 && typeof data4 == "object" && !Array.isArray(data4)) {
|
|
119
|
+
if (data4.s === undefined) {
|
|
120
|
+
const err9 = { instancePath: instancePath + "/m/" + i0 + "/m", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/items/properties/m/required", keyword: "required", params: { missingProperty: "s" }, message: "must have required property '" + "s" + "'" };
|
|
121
|
+
if (vErrors === null) {
|
|
122
|
+
vErrors = [err9];
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
vErrors.push(err9);
|
|
126
|
+
}
|
|
127
|
+
errors++;
|
|
128
|
+
}
|
|
129
|
+
if (data4.us === undefined) {
|
|
130
|
+
const err10 = { instancePath: instancePath + "/m/" + i0 + "/m", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/items/properties/m/required", keyword: "required", params: { missingProperty: "us" }, message: "must have required property '" + "us" + "'" };
|
|
131
|
+
if (vErrors === null) {
|
|
132
|
+
vErrors = [err10];
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
vErrors.push(err10);
|
|
136
|
+
}
|
|
137
|
+
errors++;
|
|
138
|
+
}
|
|
139
|
+
for (const key2 in data4) {
|
|
140
|
+
if (!((key2 === "s") || (key2 === "us"))) {
|
|
141
|
+
const err11 = { instancePath: instancePath + "/m/" + i0 + "/m", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/items/properties/m/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
|
|
142
|
+
if (vErrors === null) {
|
|
143
|
+
vErrors = [err11];
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
vErrors.push(err11);
|
|
147
|
+
}
|
|
148
|
+
errors++;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (data4.s !== undefined) {
|
|
152
|
+
let data5 = data4.s;
|
|
153
|
+
if (!((typeof data5 == "number") && (isFinite(data5)))) {
|
|
154
|
+
const err12 = { instancePath: instancePath + "/m/" + i0 + "/m/s", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/items/properties/m/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
155
|
+
if (vErrors === null) {
|
|
156
|
+
vErrors = [err12];
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
vErrors.push(err12);
|
|
160
|
+
}
|
|
161
|
+
errors++;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (data4.us !== undefined) {
|
|
165
|
+
let data6 = data4.us;
|
|
166
|
+
if (!((typeof data6 == "number") && (isFinite(data6)))) {
|
|
167
|
+
const err13 = { instancePath: instancePath + "/m/" + i0 + "/m/us", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/items/properties/m/properties/us/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
168
|
+
if (vErrors === null) {
|
|
169
|
+
vErrors = [err13];
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
vErrors.push(err13);
|
|
173
|
+
}
|
|
174
|
+
errors++;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
const err14 = { instancePath: instancePath + "/m/" + i0 + "/m", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/items/properties/m/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
180
|
+
if (vErrors === null) {
|
|
181
|
+
vErrors = [err14];
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
vErrors.push(err14);
|
|
185
|
+
}
|
|
186
|
+
errors++;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (data3.s !== undefined) {
|
|
190
|
+
let data7 = data3.s;
|
|
191
|
+
if (!((typeof data7 == "number") && (isFinite(data7)))) {
|
|
192
|
+
const err15 = { instancePath: instancePath + "/m/" + i0 + "/s", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/items/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
193
|
+
if (vErrors === null) {
|
|
194
|
+
vErrors = [err15];
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
vErrors.push(err15);
|
|
198
|
+
}
|
|
199
|
+
errors++;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
const err16 = { instancePath: instancePath + "/m/" + i0, schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
205
|
+
if (vErrors === null) {
|
|
206
|
+
vErrors = [err16];
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
vErrors.push(err16);
|
|
210
|
+
}
|
|
211
|
+
errors++;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
const err17 = { instancePath: instancePath + "/m", schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/properties/m/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
217
|
+
if (vErrors === null) {
|
|
218
|
+
vErrors = [err17];
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
vErrors.push(err17);
|
|
222
|
+
}
|
|
223
|
+
errors++;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
const err18 = { instancePath, schemaPath: "#/definitions/aggregatemetadatatypesJsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
229
|
+
if (vErrors === null) {
|
|
230
|
+
vErrors = [err18];
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
vErrors.push(err18);
|
|
234
|
+
}
|
|
235
|
+
errors++;
|
|
236
|
+
} validate10.errors = vErrors; return errors === 0; }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function validate(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
2
|
+
instancePath?: string | undefined;
|
|
3
|
+
parentData: any;
|
|
4
|
+
parentDataProperty: any;
|
|
5
|
+
rootData?: any;
|
|
6
|
+
}): boolean;
|
|
7
|
+
export default validate10;
|
|
8
|
+
declare function validate10(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
9
|
+
instancePath?: string | undefined;
|
|
10
|
+
parentData: any;
|
|
11
|
+
parentDataProperty: any;
|
|
12
|
+
rootData?: any;
|
|
13
|
+
}): boolean;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validate = void 0;
|
|
4
|
+
exports.validate = validate10;
|
|
5
|
+
exports.default = validate10;
|
|
6
|
+
const schema27 = { "$ref": "#/definitions/aggregatemetadatav1JsonSchema", "definitions": { "aggregatemetadatav1JsonSchema": { "type": "object", "properties": { "v": { "type": "number", "const": 1 }, "s": { "type": "number" }, "m": { "type": "array", "items": { "type": "object", "properties": { "m": { "type": "object", "properties": { "s": { "type": "number" }, "us": { "type": "number" } }, "required": ["s", "us"], "additionalProperties": false }, "s": { "type": "number" } }, "required": ["m"], "additionalProperties": false } } }, "required": ["v", "s", "m"], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#" };
|
|
7
|
+
const schema28 = { "type": "object", "properties": { "v": { "type": "number", "const": 1 }, "s": { "type": "number" }, "m": { "type": "array", "items": { "type": "object", "properties": { "m": { "type": "object", "properties": { "s": { "type": "number" }, "us": { "type": "number" } }, "required": ["s", "us"], "additionalProperties": false }, "s": { "type": "number" } }, "required": ["m"], "additionalProperties": false } } }, "required": ["v", "s", "m"], "additionalProperties": false };
|
|
8
|
+
function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { let vErrors = null; let errors = 0; if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
9
|
+
if (data.v === undefined) {
|
|
10
|
+
const err0 = { instancePath, schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/required", keyword: "required", params: { missingProperty: "v" }, message: "must have required property '" + "v" + "'" };
|
|
11
|
+
if (vErrors === null) {
|
|
12
|
+
vErrors = [err0];
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
vErrors.push(err0);
|
|
16
|
+
}
|
|
17
|
+
errors++;
|
|
18
|
+
}
|
|
19
|
+
if (data.s === undefined) {
|
|
20
|
+
const err1 = { instancePath, schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/required", keyword: "required", params: { missingProperty: "s" }, message: "must have required property '" + "s" + "'" };
|
|
21
|
+
if (vErrors === null) {
|
|
22
|
+
vErrors = [err1];
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
vErrors.push(err1);
|
|
26
|
+
}
|
|
27
|
+
errors++;
|
|
28
|
+
}
|
|
29
|
+
if (data.m === undefined) {
|
|
30
|
+
const err2 = { instancePath, schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/required", keyword: "required", params: { missingProperty: "m" }, message: "must have required property '" + "m" + "'" };
|
|
31
|
+
if (vErrors === null) {
|
|
32
|
+
vErrors = [err2];
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
vErrors.push(err2);
|
|
36
|
+
}
|
|
37
|
+
errors++;
|
|
38
|
+
}
|
|
39
|
+
for (const key0 in data) {
|
|
40
|
+
if (!(((key0 === "v") || (key0 === "s")) || (key0 === "m"))) {
|
|
41
|
+
const err3 = { instancePath, schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
42
|
+
if (vErrors === null) {
|
|
43
|
+
vErrors = [err3];
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
vErrors.push(err3);
|
|
47
|
+
}
|
|
48
|
+
errors++;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (data.v !== undefined) {
|
|
52
|
+
let data0 = data.v;
|
|
53
|
+
if (!((typeof data0 == "number") && (isFinite(data0)))) {
|
|
54
|
+
const err4 = { instancePath: instancePath + "/v", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/v/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
55
|
+
if (vErrors === null) {
|
|
56
|
+
vErrors = [err4];
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
vErrors.push(err4);
|
|
60
|
+
}
|
|
61
|
+
errors++;
|
|
62
|
+
}
|
|
63
|
+
if (1 !== data0) {
|
|
64
|
+
const err5 = { instancePath: instancePath + "/v", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/v/const", keyword: "const", params: { allowedValue: 1 }, message: "must be equal to constant" };
|
|
65
|
+
if (vErrors === null) {
|
|
66
|
+
vErrors = [err5];
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
vErrors.push(err5);
|
|
70
|
+
}
|
|
71
|
+
errors++;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (data.s !== undefined) {
|
|
75
|
+
let data1 = data.s;
|
|
76
|
+
if (!((typeof data1 == "number") && (isFinite(data1)))) {
|
|
77
|
+
const err6 = { instancePath: instancePath + "/s", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
78
|
+
if (vErrors === null) {
|
|
79
|
+
vErrors = [err6];
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
vErrors.push(err6);
|
|
83
|
+
}
|
|
84
|
+
errors++;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (data.m !== undefined) {
|
|
88
|
+
let data2 = data.m;
|
|
89
|
+
if (Array.isArray(data2)) {
|
|
90
|
+
const len0 = data2.length;
|
|
91
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
92
|
+
let data3 = data2[i0];
|
|
93
|
+
if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
|
|
94
|
+
if (data3.m === undefined) {
|
|
95
|
+
const err7 = { instancePath: instancePath + "/m/" + i0, schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/items/required", keyword: "required", params: { missingProperty: "m" }, message: "must have required property '" + "m" + "'" };
|
|
96
|
+
if (vErrors === null) {
|
|
97
|
+
vErrors = [err7];
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
vErrors.push(err7);
|
|
101
|
+
}
|
|
102
|
+
errors++;
|
|
103
|
+
}
|
|
104
|
+
for (const key1 in data3) {
|
|
105
|
+
if (!((key1 === "m") || (key1 === "s"))) {
|
|
106
|
+
const err8 = { instancePath: instancePath + "/m/" + i0, schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
107
|
+
if (vErrors === null) {
|
|
108
|
+
vErrors = [err8];
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
vErrors.push(err8);
|
|
112
|
+
}
|
|
113
|
+
errors++;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (data3.m !== undefined) {
|
|
117
|
+
let data4 = data3.m;
|
|
118
|
+
if (data4 && typeof data4 == "object" && !Array.isArray(data4)) {
|
|
119
|
+
if (data4.s === undefined) {
|
|
120
|
+
const err9 = { instancePath: instancePath + "/m/" + i0 + "/m", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/items/properties/m/required", keyword: "required", params: { missingProperty: "s" }, message: "must have required property '" + "s" + "'" };
|
|
121
|
+
if (vErrors === null) {
|
|
122
|
+
vErrors = [err9];
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
vErrors.push(err9);
|
|
126
|
+
}
|
|
127
|
+
errors++;
|
|
128
|
+
}
|
|
129
|
+
if (data4.us === undefined) {
|
|
130
|
+
const err10 = { instancePath: instancePath + "/m/" + i0 + "/m", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/items/properties/m/required", keyword: "required", params: { missingProperty: "us" }, message: "must have required property '" + "us" + "'" };
|
|
131
|
+
if (vErrors === null) {
|
|
132
|
+
vErrors = [err10];
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
vErrors.push(err10);
|
|
136
|
+
}
|
|
137
|
+
errors++;
|
|
138
|
+
}
|
|
139
|
+
for (const key2 in data4) {
|
|
140
|
+
if (!((key2 === "s") || (key2 === "us"))) {
|
|
141
|
+
const err11 = { instancePath: instancePath + "/m/" + i0 + "/m", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/items/properties/m/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
|
|
142
|
+
if (vErrors === null) {
|
|
143
|
+
vErrors = [err11];
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
vErrors.push(err11);
|
|
147
|
+
}
|
|
148
|
+
errors++;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (data4.s !== undefined) {
|
|
152
|
+
let data5 = data4.s;
|
|
153
|
+
if (!((typeof data5 == "number") && (isFinite(data5)))) {
|
|
154
|
+
const err12 = { instancePath: instancePath + "/m/" + i0 + "/m/s", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/items/properties/m/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
155
|
+
if (vErrors === null) {
|
|
156
|
+
vErrors = [err12];
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
vErrors.push(err12);
|
|
160
|
+
}
|
|
161
|
+
errors++;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (data4.us !== undefined) {
|
|
165
|
+
let data6 = data4.us;
|
|
166
|
+
if (!((typeof data6 == "number") && (isFinite(data6)))) {
|
|
167
|
+
const err13 = { instancePath: instancePath + "/m/" + i0 + "/m/us", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/items/properties/m/properties/us/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
168
|
+
if (vErrors === null) {
|
|
169
|
+
vErrors = [err13];
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
vErrors.push(err13);
|
|
173
|
+
}
|
|
174
|
+
errors++;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
const err14 = { instancePath: instancePath + "/m/" + i0 + "/m", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/items/properties/m/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
180
|
+
if (vErrors === null) {
|
|
181
|
+
vErrors = [err14];
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
vErrors.push(err14);
|
|
185
|
+
}
|
|
186
|
+
errors++;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (data3.s !== undefined) {
|
|
190
|
+
let data7 = data3.s;
|
|
191
|
+
if (!((typeof data7 == "number") && (isFinite(data7)))) {
|
|
192
|
+
const err15 = { instancePath: instancePath + "/m/" + i0 + "/s", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/items/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
193
|
+
if (vErrors === null) {
|
|
194
|
+
vErrors = [err15];
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
vErrors.push(err15);
|
|
198
|
+
}
|
|
199
|
+
errors++;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
const err16 = { instancePath: instancePath + "/m/" + i0, schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
205
|
+
if (vErrors === null) {
|
|
206
|
+
vErrors = [err16];
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
vErrors.push(err16);
|
|
210
|
+
}
|
|
211
|
+
errors++;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
const err17 = { instancePath: instancePath + "/m", schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/properties/m/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
217
|
+
if (vErrors === null) {
|
|
218
|
+
vErrors = [err17];
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
vErrors.push(err17);
|
|
222
|
+
}
|
|
223
|
+
errors++;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
const err18 = { instancePath, schemaPath: "#/definitions/aggregatemetadatav1JsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
229
|
+
if (vErrors === null) {
|
|
230
|
+
vErrors = [err18];
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
vErrors.push(err18);
|
|
234
|
+
}
|
|
235
|
+
errors++;
|
|
236
|
+
} validate10.errors = vErrors; return errors === 0; }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function validate(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
2
|
+
instancePath?: string | undefined;
|
|
3
|
+
parentData: any;
|
|
4
|
+
parentDataProperty: any;
|
|
5
|
+
rootData?: any;
|
|
6
|
+
}): boolean;
|
|
7
|
+
export default validate10;
|
|
8
|
+
declare function validate10(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
9
|
+
instancePath?: string | undefined;
|
|
10
|
+
parentData: any;
|
|
11
|
+
parentDataProperty: any;
|
|
12
|
+
rootData?: any;
|
|
13
|
+
}): boolean;
|