@xube/kit-aws-data-schema 0.0.92 → 0.0.94
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/decode/aggregate.d.ts +10 -4
- package/dist/decode/aggregate.js +7 -2
- package/dist/decode/reading.d.ts +10 -0
- package/dist/decode/reading.js +11 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/message/message.d.ts +2 -0
- package/dist/message/message.js +3 -1
- package/package.json +7 -7
- package/src/decode/aggregate.ts +9 -0
- package/src/decode/reading.ts +18 -0
- package/src/index.ts +0 -1
- package/src/message/message.ts +3 -0
- package/dist/generated/index.d.ts +0 -16
- package/dist/generated/index.js +0 -41
- package/dist/generated/types/aggregateMetadata.d.ts +0 -11
- package/dist/generated/types/aggregateMetadata.js +0 -23
- package/dist/generated/types/aggregateMetadataTypes.d.ts +0 -19
- package/dist/generated/types/aggregateMetadataTypes.js +0 -23
- package/dist/generated/types/aggregateMetadataV1.d.ts +0 -19
- package/dist/generated/types/aggregateMetadataV1.js +0 -23
- package/dist/generated/types/dataMessage.d.ts +0 -15
- package/dist/generated/types/dataMessage.js +0 -23
- package/dist/generated/types/deviceReadingMetadataV1.d.ts +0 -12
- package/dist/generated/types/deviceReadingMetadataV1.js +0 -23
- package/dist/generated/types/deviceReadingV1.d.ts +0 -15
- package/dist/generated/types/deviceReadingV1.js +0 -23
- package/dist/generated/types/readingMetadataV1.d.ts +0 -12
- package/dist/generated/types/readingMetadataV1.js +0 -23
- package/dist/generated/types/readingV1.d.ts +0 -16
- package/dist/generated/types/readingV1.js +0 -23
- package/dist/generated/validators/aggregateMetadata.d.ts +0 -9
- package/dist/generated/validators/aggregateMetadata.js +0 -47
- package/dist/generated/validators/aggregateMetadataTypes.d.ts +0 -9
- package/dist/generated/validators/aggregateMetadataTypes.js +0 -215
- package/dist/generated/validators/aggregateMetadataV1.d.ts +0 -9
- package/dist/generated/validators/aggregateMetadataV1.js +0 -215
- package/dist/generated/validators/dataMessage.d.ts +0 -9
- package/dist/generated/validators/dataMessage.js +0 -135
- package/dist/generated/validators/deviceReadingMetadataV1.d.ts +0 -9
- package/dist/generated/validators/deviceReadingMetadataV1.js +0 -70
- package/dist/generated/validators/deviceReadingV1.d.ts +0 -9
- package/dist/generated/validators/deviceReadingV1.js +0 -113
- package/dist/generated/validators/readingMetadataV1.d.ts +0 -9
- package/dist/generated/validators/readingMetadataV1.js +0 -70
- package/dist/generated/validators/readingV1.d.ts +0 -9
- package/dist/generated/validators/readingV1.js +0 -215
- package/dist/generator.d.ts +0 -1
- package/dist/generator.js +0 -17
- package/src/generated/index.ts +0 -16
- package/src/generated/types/aggregateMetadata.ts +0 -26
- package/src/generated/types/aggregateMetadataTypes.ts +0 -34
- package/src/generated/types/aggregateMetadataV1.ts +0 -34
- package/src/generated/types/dataMessage.ts +0 -30
- package/src/generated/types/deviceReadingMetadataV1.ts +0 -27
- package/src/generated/types/deviceReadingV1.ts +0 -30
- package/src/generated/types/readingMetadataV1.ts +0 -27
- package/src/generated/types/readingV1.ts +0 -31
- package/src/generated/validators/aggregateMetadata.js +0 -1
- package/src/generated/validators/aggregateMetadataTypes.js +0 -1
- package/src/generated/validators/aggregateMetadataV1.js +0 -1
- package/src/generated/validators/dataMessage.js +0 -1
- package/src/generated/validators/deviceReadingMetadataV1.js +0 -1
- package/src/generated/validators/deviceReadingV1.js +0 -1
- package/src/generated/validators/readingMetadataV1.js +0 -1
- package/src/generated/validators/readingV1.js +0 -1
- package/src/generator.ts +0 -50
|
@@ -1,135 +0,0 @@
|
|
|
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/datamessageJsonSchema", "definitions": { "datamessageJsonSchema": { "type": "object", "properties": { "payload": { "type": "string" }, "account": { "type": "string" }, "device": { "type": "string" }, "component": { "type": "string" }, "timestamp": { "type": "number" } }, "required": ["payload", "account", "device", "component", "timestamp"], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#" };
|
|
7
|
-
const schema28 = { "type": "object", "properties": { "payload": { "type": "string" }, "account": { "type": "string" }, "device": { "type": "string" }, "component": { "type": "string" }, "timestamp": { "type": "number" } }, "required": ["payload", "account", "device", "component", "timestamp"], "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.payload === undefined) {
|
|
10
|
-
const err0 = { instancePath, schemaPath: "#/definitions/datamessageJsonSchema/required", keyword: "required", params: { missingProperty: "payload" }, message: "must have required property '" + "payload" + "'" };
|
|
11
|
-
if (vErrors === null) {
|
|
12
|
-
vErrors = [err0];
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
vErrors.push(err0);
|
|
16
|
-
}
|
|
17
|
-
errors++;
|
|
18
|
-
}
|
|
19
|
-
if (data.account === undefined) {
|
|
20
|
-
const err1 = { instancePath, schemaPath: "#/definitions/datamessageJsonSchema/required", keyword: "required", params: { missingProperty: "account" }, message: "must have required property '" + "account" + "'" };
|
|
21
|
-
if (vErrors === null) {
|
|
22
|
-
vErrors = [err1];
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
vErrors.push(err1);
|
|
26
|
-
}
|
|
27
|
-
errors++;
|
|
28
|
-
}
|
|
29
|
-
if (data.device === undefined) {
|
|
30
|
-
const err2 = { instancePath, schemaPath: "#/definitions/datamessageJsonSchema/required", keyword: "required", params: { missingProperty: "device" }, message: "must have required property '" + "device" + "'" };
|
|
31
|
-
if (vErrors === null) {
|
|
32
|
-
vErrors = [err2];
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
vErrors.push(err2);
|
|
36
|
-
}
|
|
37
|
-
errors++;
|
|
38
|
-
}
|
|
39
|
-
if (data.component === undefined) {
|
|
40
|
-
const err3 = { instancePath, schemaPath: "#/definitions/datamessageJsonSchema/required", keyword: "required", params: { missingProperty: "component" }, message: "must have required property '" + "component" + "'" };
|
|
41
|
-
if (vErrors === null) {
|
|
42
|
-
vErrors = [err3];
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
vErrors.push(err3);
|
|
46
|
-
}
|
|
47
|
-
errors++;
|
|
48
|
-
}
|
|
49
|
-
if (data.timestamp === undefined) {
|
|
50
|
-
const err4 = { instancePath, schemaPath: "#/definitions/datamessageJsonSchema/required", keyword: "required", params: { missingProperty: "timestamp" }, message: "must have required property '" + "timestamp" + "'" };
|
|
51
|
-
if (vErrors === null) {
|
|
52
|
-
vErrors = [err4];
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
vErrors.push(err4);
|
|
56
|
-
}
|
|
57
|
-
errors++;
|
|
58
|
-
}
|
|
59
|
-
for (const key0 in data) {
|
|
60
|
-
if (!(((((key0 === "payload") || (key0 === "account")) || (key0 === "device")) || (key0 === "component")) || (key0 === "timestamp"))) {
|
|
61
|
-
delete data[key0];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (data.payload !== undefined) {
|
|
65
|
-
if (typeof data.payload !== "string") {
|
|
66
|
-
const err5 = { instancePath: instancePath + "/payload", schemaPath: "#/definitions/datamessageJsonSchema/properties/payload/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
67
|
-
if (vErrors === null) {
|
|
68
|
-
vErrors = [err5];
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
vErrors.push(err5);
|
|
72
|
-
}
|
|
73
|
-
errors++;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (data.account !== undefined) {
|
|
77
|
-
if (typeof data.account !== "string") {
|
|
78
|
-
const err6 = { instancePath: instancePath + "/account", schemaPath: "#/definitions/datamessageJsonSchema/properties/account/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
79
|
-
if (vErrors === null) {
|
|
80
|
-
vErrors = [err6];
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
vErrors.push(err6);
|
|
84
|
-
}
|
|
85
|
-
errors++;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
if (data.device !== undefined) {
|
|
89
|
-
if (typeof data.device !== "string") {
|
|
90
|
-
const err7 = { instancePath: instancePath + "/device", schemaPath: "#/definitions/datamessageJsonSchema/properties/device/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
91
|
-
if (vErrors === null) {
|
|
92
|
-
vErrors = [err7];
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
vErrors.push(err7);
|
|
96
|
-
}
|
|
97
|
-
errors++;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
if (data.component !== undefined) {
|
|
101
|
-
if (typeof data.component !== "string") {
|
|
102
|
-
const err8 = { instancePath: instancePath + "/component", schemaPath: "#/definitions/datamessageJsonSchema/properties/component/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
103
|
-
if (vErrors === null) {
|
|
104
|
-
vErrors = [err8];
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
vErrors.push(err8);
|
|
108
|
-
}
|
|
109
|
-
errors++;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (data.timestamp !== undefined) {
|
|
113
|
-
let data4 = data.timestamp;
|
|
114
|
-
if (!((typeof data4 == "number") && (isFinite(data4)))) {
|
|
115
|
-
const err9 = { instancePath: instancePath + "/timestamp", schemaPath: "#/definitions/datamessageJsonSchema/properties/timestamp/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
116
|
-
if (vErrors === null) {
|
|
117
|
-
vErrors = [err9];
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
vErrors.push(err9);
|
|
121
|
-
}
|
|
122
|
-
errors++;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
const err10 = { instancePath, schemaPath: "#/definitions/datamessageJsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
128
|
-
if (vErrors === null) {
|
|
129
|
-
vErrors = [err10];
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
vErrors.push(err10);
|
|
133
|
-
}
|
|
134
|
-
errors++;
|
|
135
|
-
} validate10.errors = vErrors; return errors === 0; }
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function validate(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
2
|
-
instancePath?: string | undefined;
|
|
3
|
-
rootData?: any;
|
|
4
|
-
}): boolean;
|
|
5
|
-
export default validate10;
|
|
6
|
-
declare function validate10(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
7
|
-
instancePath?: string | undefined;
|
|
8
|
-
rootData?: any;
|
|
9
|
-
}): boolean;
|
|
@@ -1,70 +0,0 @@
|
|
|
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/devicereadingmetadatav1JsonSchema", "definitions": { "devicereadingmetadatav1JsonSchema": { "type": "object", "properties": { "s": { "type": "number" }, "us": { "type": "number" } }, "required": ["s", "us"], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#" };
|
|
7
|
-
const schema28 = { "type": "object", "properties": { "s": { "type": "number" }, "us": { "type": "number" } }, "required": ["s", "us"], "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.s === undefined) {
|
|
10
|
-
const err0 = { instancePath, schemaPath: "#/definitions/devicereadingmetadatav1JsonSchema/required", keyword: "required", params: { missingProperty: "s" }, message: "must have required property '" + "s" + "'" };
|
|
11
|
-
if (vErrors === null) {
|
|
12
|
-
vErrors = [err0];
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
vErrors.push(err0);
|
|
16
|
-
}
|
|
17
|
-
errors++;
|
|
18
|
-
}
|
|
19
|
-
if (data.us === undefined) {
|
|
20
|
-
const err1 = { instancePath, schemaPath: "#/definitions/devicereadingmetadatav1JsonSchema/required", keyword: "required", params: { missingProperty: "us" }, message: "must have required property '" + "us" + "'" };
|
|
21
|
-
if (vErrors === null) {
|
|
22
|
-
vErrors = [err1];
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
vErrors.push(err1);
|
|
26
|
-
}
|
|
27
|
-
errors++;
|
|
28
|
-
}
|
|
29
|
-
for (const key0 in data) {
|
|
30
|
-
if (!((key0 === "s") || (key0 === "us"))) {
|
|
31
|
-
delete data[key0];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (data.s !== undefined) {
|
|
35
|
-
let data0 = data.s;
|
|
36
|
-
if (!((typeof data0 == "number") && (isFinite(data0)))) {
|
|
37
|
-
const err2 = { instancePath: instancePath + "/s", schemaPath: "#/definitions/devicereadingmetadatav1JsonSchema/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
38
|
-
if (vErrors === null) {
|
|
39
|
-
vErrors = [err2];
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
vErrors.push(err2);
|
|
43
|
-
}
|
|
44
|
-
errors++;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (data.us !== undefined) {
|
|
48
|
-
let data1 = data.us;
|
|
49
|
-
if (!((typeof data1 == "number") && (isFinite(data1)))) {
|
|
50
|
-
const err3 = { instancePath: instancePath + "/us", schemaPath: "#/definitions/devicereadingmetadatav1JsonSchema/properties/us/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
51
|
-
if (vErrors === null) {
|
|
52
|
-
vErrors = [err3];
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
vErrors.push(err3);
|
|
56
|
-
}
|
|
57
|
-
errors++;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
const err4 = { instancePath, schemaPath: "#/definitions/devicereadingmetadatav1JsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
63
|
-
if (vErrors === null) {
|
|
64
|
-
vErrors = [err4];
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
vErrors.push(err4);
|
|
68
|
-
}
|
|
69
|
-
errors++;
|
|
70
|
-
} validate10.errors = vErrors; return errors === 0; }
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function validate(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
2
|
-
instancePath?: string | undefined;
|
|
3
|
-
rootData?: any;
|
|
4
|
-
}): boolean;
|
|
5
|
-
export default validate10;
|
|
6
|
-
declare function validate10(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
7
|
-
instancePath?: string | undefined;
|
|
8
|
-
rootData?: any;
|
|
9
|
-
}): boolean;
|
|
@@ -1,113 +0,0 @@
|
|
|
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/devicereadingv1JsonSchema", "definitions": { "devicereadingv1JsonSchema": { "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 } }, "$schema": "http://json-schema.org/draft-07/schema#" };
|
|
7
|
-
const schema28 = { "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 };
|
|
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.m === undefined) {
|
|
10
|
-
const err0 = { instancePath, schemaPath: "#/definitions/devicereadingv1JsonSchema/required", keyword: "required", params: { missingProperty: "m" }, message: "must have required property '" + "m" + "'" };
|
|
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 === "m") || (key0 === "s"))) {
|
|
21
|
-
delete data[key0];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
if (data.m !== undefined) {
|
|
25
|
-
let data0 = data.m;
|
|
26
|
-
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
27
|
-
if (data0.s === undefined) {
|
|
28
|
-
const err1 = { instancePath: instancePath + "/m", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/required", keyword: "required", params: { missingProperty: "s" }, message: "must have required property '" + "s" + "'" };
|
|
29
|
-
if (vErrors === null) {
|
|
30
|
-
vErrors = [err1];
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
vErrors.push(err1);
|
|
34
|
-
}
|
|
35
|
-
errors++;
|
|
36
|
-
}
|
|
37
|
-
if (data0.us === undefined) {
|
|
38
|
-
const err2 = { instancePath: instancePath + "/m", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/required", keyword: "required", params: { missingProperty: "us" }, message: "must have required property '" + "us" + "'" };
|
|
39
|
-
if (vErrors === null) {
|
|
40
|
-
vErrors = [err2];
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
vErrors.push(err2);
|
|
44
|
-
}
|
|
45
|
-
errors++;
|
|
46
|
-
}
|
|
47
|
-
for (const key1 in data0) {
|
|
48
|
-
if (!((key1 === "s") || (key1 === "us"))) {
|
|
49
|
-
delete data0[key1];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (data0.s !== undefined) {
|
|
53
|
-
let data1 = data0.s;
|
|
54
|
-
if (!((typeof data1 == "number") && (isFinite(data1)))) {
|
|
55
|
-
const err3 = { instancePath: instancePath + "/m/s", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
56
|
-
if (vErrors === null) {
|
|
57
|
-
vErrors = [err3];
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
vErrors.push(err3);
|
|
61
|
-
}
|
|
62
|
-
errors++;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (data0.us !== undefined) {
|
|
66
|
-
let data2 = data0.us;
|
|
67
|
-
if (!((typeof data2 == "number") && (isFinite(data2)))) {
|
|
68
|
-
const err4 = { instancePath: instancePath + "/m/us", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/properties/us/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
69
|
-
if (vErrors === null) {
|
|
70
|
-
vErrors = [err4];
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
vErrors.push(err4);
|
|
74
|
-
}
|
|
75
|
-
errors++;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
const err5 = { instancePath: instancePath + "/m", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
81
|
-
if (vErrors === null) {
|
|
82
|
-
vErrors = [err5];
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
vErrors.push(err5);
|
|
86
|
-
}
|
|
87
|
-
errors++;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if (data.s !== undefined) {
|
|
91
|
-
let data3 = data.s;
|
|
92
|
-
if (!((typeof data3 == "number") && (isFinite(data3)))) {
|
|
93
|
-
const err6 = { instancePath: instancePath + "/s", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
94
|
-
if (vErrors === null) {
|
|
95
|
-
vErrors = [err6];
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
vErrors.push(err6);
|
|
99
|
-
}
|
|
100
|
-
errors++;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
const err7 = { instancePath, schemaPath: "#/definitions/devicereadingv1JsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
106
|
-
if (vErrors === null) {
|
|
107
|
-
vErrors = [err7];
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
vErrors.push(err7);
|
|
111
|
-
}
|
|
112
|
-
errors++;
|
|
113
|
-
} validate10.errors = vErrors; return errors === 0; }
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function validate(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
2
|
-
instancePath?: string | undefined;
|
|
3
|
-
rootData?: any;
|
|
4
|
-
}): boolean;
|
|
5
|
-
export default validate10;
|
|
6
|
-
declare function validate10(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
7
|
-
instancePath?: string | undefined;
|
|
8
|
-
rootData?: any;
|
|
9
|
-
}): boolean;
|
|
@@ -1,70 +0,0 @@
|
|
|
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/readingmetadatav1JsonSchema", "definitions": { "readingmetadatav1JsonSchema": { "type": "object", "properties": { "s": { "type": "number" }, "us": { "type": "number" } }, "required": ["s", "us"], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#" };
|
|
7
|
-
const schema28 = { "type": "object", "properties": { "s": { "type": "number" }, "us": { "type": "number" } }, "required": ["s", "us"], "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.s === undefined) {
|
|
10
|
-
const err0 = { instancePath, schemaPath: "#/definitions/readingmetadatav1JsonSchema/required", keyword: "required", params: { missingProperty: "s" }, message: "must have required property '" + "s" + "'" };
|
|
11
|
-
if (vErrors === null) {
|
|
12
|
-
vErrors = [err0];
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
vErrors.push(err0);
|
|
16
|
-
}
|
|
17
|
-
errors++;
|
|
18
|
-
}
|
|
19
|
-
if (data.us === undefined) {
|
|
20
|
-
const err1 = { instancePath, schemaPath: "#/definitions/readingmetadatav1JsonSchema/required", keyword: "required", params: { missingProperty: "us" }, message: "must have required property '" + "us" + "'" };
|
|
21
|
-
if (vErrors === null) {
|
|
22
|
-
vErrors = [err1];
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
vErrors.push(err1);
|
|
26
|
-
}
|
|
27
|
-
errors++;
|
|
28
|
-
}
|
|
29
|
-
for (const key0 in data) {
|
|
30
|
-
if (!((key0 === "s") || (key0 === "us"))) {
|
|
31
|
-
delete data[key0];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (data.s !== undefined) {
|
|
35
|
-
let data0 = data.s;
|
|
36
|
-
if (!((typeof data0 == "number") && (isFinite(data0)))) {
|
|
37
|
-
const err2 = { instancePath: instancePath + "/s", schemaPath: "#/definitions/readingmetadatav1JsonSchema/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
38
|
-
if (vErrors === null) {
|
|
39
|
-
vErrors = [err2];
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
vErrors.push(err2);
|
|
43
|
-
}
|
|
44
|
-
errors++;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (data.us !== undefined) {
|
|
48
|
-
let data1 = data.us;
|
|
49
|
-
if (!((typeof data1 == "number") && (isFinite(data1)))) {
|
|
50
|
-
const err3 = { instancePath: instancePath + "/us", schemaPath: "#/definitions/readingmetadatav1JsonSchema/properties/us/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
51
|
-
if (vErrors === null) {
|
|
52
|
-
vErrors = [err3];
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
vErrors.push(err3);
|
|
56
|
-
}
|
|
57
|
-
errors++;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
const err4 = { instancePath, schemaPath: "#/definitions/readingmetadatav1JsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
63
|
-
if (vErrors === null) {
|
|
64
|
-
vErrors = [err4];
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
vErrors.push(err4);
|
|
68
|
-
}
|
|
69
|
-
errors++;
|
|
70
|
-
} validate10.errors = vErrors; return errors === 0; }
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function validate(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
2
|
-
instancePath?: string | undefined;
|
|
3
|
-
rootData?: any;
|
|
4
|
-
}): boolean;
|
|
5
|
-
export default validate10;
|
|
6
|
-
declare function validate10(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
|
|
7
|
-
instancePath?: string | undefined;
|
|
8
|
-
rootData?: any;
|
|
9
|
-
}): boolean;
|
|
@@ -1,215 +0,0 @@
|
|
|
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/readingv1JsonSchema", "definitions": { "readingv1JsonSchema": { "type": "object", "properties": { "data": { "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "object", "properties": {}, "additionalProperties": true }] }, "component": { "type": "string" }, "s": { "type": "number" }, "us": { "type": "number" }, "type": { "type": "string" }, "id": { "type": "string" } }, "required": ["data", "s", "type", "id"], "additionalProperties": true } }, "$schema": "http://json-schema.org/draft-07/schema#" };
|
|
7
|
-
const schema28 = { "type": "object", "properties": { "data": { "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "object", "properties": {}, "additionalProperties": true }] }, "component": { "type": "string" }, "s": { "type": "number" }, "us": { "type": "number" }, "type": { "type": "string" }, "id": { "type": "string" } }, "required": ["data", "s", "type", "id"], "additionalProperties": true };
|
|
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.data === undefined) {
|
|
10
|
-
const err0 = { instancePath, schemaPath: "#/definitions/readingv1JsonSchema/required", keyword: "required", params: { missingProperty: "data" }, message: "must have required property '" + "data" + "'" };
|
|
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/readingv1JsonSchema/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.type === undefined) {
|
|
30
|
-
const err2 = { instancePath, schemaPath: "#/definitions/readingv1JsonSchema/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property '" + "type" + "'" };
|
|
31
|
-
if (vErrors === null) {
|
|
32
|
-
vErrors = [err2];
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
vErrors.push(err2);
|
|
36
|
-
}
|
|
37
|
-
errors++;
|
|
38
|
-
}
|
|
39
|
-
if (data.id === undefined) {
|
|
40
|
-
const err3 = { instancePath, schemaPath: "#/definitions/readingv1JsonSchema/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property '" + "id" + "'" };
|
|
41
|
-
if (vErrors === null) {
|
|
42
|
-
vErrors = [err3];
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
vErrors.push(err3);
|
|
46
|
-
}
|
|
47
|
-
errors++;
|
|
48
|
-
}
|
|
49
|
-
for (const key0 in data) {
|
|
50
|
-
if (!((((((key0 === "data") || (key0 === "component")) || (key0 === "s")) || (key0 === "us")) || (key0 === "type")) || (key0 === "id"))) {
|
|
51
|
-
delete data[key0];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (data.data !== undefined) {
|
|
55
|
-
let data0 = data.data;
|
|
56
|
-
const _errs4 = errors;
|
|
57
|
-
let valid2 = false;
|
|
58
|
-
const _errs5 = errors;
|
|
59
|
-
if (typeof data0 !== "string") {
|
|
60
|
-
const err4 = { instancePath: instancePath + "/data", schemaPath: "#/definitions/readingv1JsonSchema/properties/data/anyOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
61
|
-
if (vErrors === null) {
|
|
62
|
-
vErrors = [err4];
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
vErrors.push(err4);
|
|
66
|
-
}
|
|
67
|
-
errors++;
|
|
68
|
-
}
|
|
69
|
-
var _valid0 = _errs5 === errors;
|
|
70
|
-
valid2 = valid2 || _valid0;
|
|
71
|
-
if (!valid2) {
|
|
72
|
-
const _errs7 = errors;
|
|
73
|
-
if (!((typeof data0 == "number") && (isFinite(data0)))) {
|
|
74
|
-
const err5 = { instancePath: instancePath + "/data", schemaPath: "#/definitions/readingv1JsonSchema/properties/data/anyOf/1/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
75
|
-
if (vErrors === null) {
|
|
76
|
-
vErrors = [err5];
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
vErrors.push(err5);
|
|
80
|
-
}
|
|
81
|
-
errors++;
|
|
82
|
-
}
|
|
83
|
-
var _valid0 = _errs7 === errors;
|
|
84
|
-
valid2 = valid2 || _valid0;
|
|
85
|
-
if (!valid2) {
|
|
86
|
-
const _errs9 = errors;
|
|
87
|
-
if (typeof data0 !== "boolean") {
|
|
88
|
-
const err6 = { instancePath: instancePath + "/data", schemaPath: "#/definitions/readingv1JsonSchema/properties/data/anyOf/2/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
89
|
-
if (vErrors === null) {
|
|
90
|
-
vErrors = [err6];
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
vErrors.push(err6);
|
|
94
|
-
}
|
|
95
|
-
errors++;
|
|
96
|
-
}
|
|
97
|
-
var _valid0 = _errs9 === errors;
|
|
98
|
-
valid2 = valid2 || _valid0;
|
|
99
|
-
if (!valid2) {
|
|
100
|
-
const _errs11 = errors;
|
|
101
|
-
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
102
|
-
for (const key1 in data0) {
|
|
103
|
-
delete data0[key1];
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
const err7 = { instancePath: instancePath + "/data", schemaPath: "#/definitions/readingv1JsonSchema/properties/data/anyOf/3/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
108
|
-
if (vErrors === null) {
|
|
109
|
-
vErrors = [err7];
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
vErrors.push(err7);
|
|
113
|
-
}
|
|
114
|
-
errors++;
|
|
115
|
-
}
|
|
116
|
-
var _valid0 = _errs11 === errors;
|
|
117
|
-
valid2 = valid2 || _valid0;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
if (!valid2) {
|
|
122
|
-
const err8 = { instancePath: instancePath + "/data", schemaPath: "#/definitions/readingv1JsonSchema/properties/data/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
123
|
-
if (vErrors === null) {
|
|
124
|
-
vErrors = [err8];
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
vErrors.push(err8);
|
|
128
|
-
}
|
|
129
|
-
errors++;
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
errors = _errs4;
|
|
133
|
-
if (vErrors !== null) {
|
|
134
|
-
if (_errs4) {
|
|
135
|
-
vErrors.length = _errs4;
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
vErrors = null;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
if (data.component !== undefined) {
|
|
144
|
-
if (typeof data.component !== "string") {
|
|
145
|
-
const err9 = { instancePath: instancePath + "/component", schemaPath: "#/definitions/readingv1JsonSchema/properties/component/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
146
|
-
if (vErrors === null) {
|
|
147
|
-
vErrors = [err9];
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
vErrors.push(err9);
|
|
151
|
-
}
|
|
152
|
-
errors++;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (data.s !== undefined) {
|
|
156
|
-
let data2 = data.s;
|
|
157
|
-
if (!((typeof data2 == "number") && (isFinite(data2)))) {
|
|
158
|
-
const err10 = { instancePath: instancePath + "/s", schemaPath: "#/definitions/readingv1JsonSchema/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
159
|
-
if (vErrors === null) {
|
|
160
|
-
vErrors = [err10];
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
vErrors.push(err10);
|
|
164
|
-
}
|
|
165
|
-
errors++;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
if (data.us !== undefined) {
|
|
169
|
-
let data3 = data.us;
|
|
170
|
-
if (!((typeof data3 == "number") && (isFinite(data3)))) {
|
|
171
|
-
const err11 = { instancePath: instancePath + "/us", schemaPath: "#/definitions/readingv1JsonSchema/properties/us/type", keyword: "type", params: { type: "number" }, message: "must be number" };
|
|
172
|
-
if (vErrors === null) {
|
|
173
|
-
vErrors = [err11];
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
vErrors.push(err11);
|
|
177
|
-
}
|
|
178
|
-
errors++;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
if (data.type !== undefined) {
|
|
182
|
-
if (typeof data.type !== "string") {
|
|
183
|
-
const err12 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/readingv1JsonSchema/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
184
|
-
if (vErrors === null) {
|
|
185
|
-
vErrors = [err12];
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
vErrors.push(err12);
|
|
189
|
-
}
|
|
190
|
-
errors++;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
if (data.id !== undefined) {
|
|
194
|
-
if (typeof data.id !== "string") {
|
|
195
|
-
const err13 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/readingv1JsonSchema/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
196
|
-
if (vErrors === null) {
|
|
197
|
-
vErrors = [err13];
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
vErrors.push(err13);
|
|
201
|
-
}
|
|
202
|
-
errors++;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
const err14 = { instancePath, schemaPath: "#/definitions/readingv1JsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
208
|
-
if (vErrors === null) {
|
|
209
|
-
vErrors = [err14];
|
|
210
|
-
}
|
|
211
|
-
else {
|
|
212
|
-
vErrors.push(err14);
|
|
213
|
-
}
|
|
214
|
-
errors++;
|
|
215
|
-
} validate10.errors = vErrors; return errors === 0; }
|
package/dist/generator.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|