@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.
Files changed (77) hide show
  1. package/dist/constants.d.ts +2 -0
  2. package/dist/constants.js +5 -0
  3. package/dist/decode/aggregate.d.ts +107 -0
  4. package/dist/decode/aggregate.js +17 -0
  5. package/dist/decode/reading.d.ts +94 -0
  6. package/dist/decode/reading.js +23 -0
  7. package/dist/generated/index.d.ts +16 -0
  8. package/dist/generated/index.js +41 -0
  9. package/dist/generated/types/aggregateMetadata.d.ts +11 -0
  10. package/dist/generated/types/aggregateMetadata.js +23 -0
  11. package/dist/generated/types/aggregateMetadataTypes.d.ts +19 -0
  12. package/dist/generated/types/aggregateMetadataTypes.js +23 -0
  13. package/dist/generated/types/aggregateMetadataV1.d.ts +19 -0
  14. package/dist/generated/types/aggregateMetadataV1.js +23 -0
  15. package/dist/generated/types/dataMessage.d.ts +15 -0
  16. package/dist/generated/types/dataMessage.js +23 -0
  17. package/dist/generated/types/deviceReadingMetadataV1.d.ts +12 -0
  18. package/dist/generated/types/deviceReadingMetadataV1.js +23 -0
  19. package/dist/generated/types/deviceReadingV1.d.ts +15 -0
  20. package/dist/generated/types/deviceReadingV1.js +23 -0
  21. package/dist/generated/types/readingMetadataV1.d.ts +12 -0
  22. package/dist/generated/types/readingMetadataV1.js +23 -0
  23. package/dist/generated/types/readingV1.d.ts +16 -0
  24. package/dist/generated/types/readingV1.js +23 -0
  25. package/dist/generated/validators/aggregateMetadata.d.ts +13 -0
  26. package/dist/generated/validators/aggregateMetadata.js +54 -0
  27. package/dist/generated/validators/aggregateMetadataTypes.d.ts +13 -0
  28. package/dist/generated/validators/aggregateMetadataTypes.js +236 -0
  29. package/dist/generated/validators/aggregateMetadataV1.d.ts +13 -0
  30. package/dist/generated/validators/aggregateMetadataV1.js +236 -0
  31. package/dist/generated/validators/dataMessage.d.ts +13 -0
  32. package/dist/generated/validators/dataMessage.js +142 -0
  33. package/dist/generated/validators/deviceReadingMetadataV1.d.ts +13 -0
  34. package/dist/generated/validators/deviceReadingMetadataV1.js +77 -0
  35. package/dist/generated/validators/deviceReadingV1.d.ts +13 -0
  36. package/dist/generated/validators/deviceReadingV1.js +127 -0
  37. package/dist/generated/validators/readingMetadataV1.d.ts +13 -0
  38. package/dist/generated/validators/readingMetadataV1.js +77 -0
  39. package/dist/generated/validators/readingV1.d.ts +13 -0
  40. package/dist/generated/validators/readingV1.js +216 -0
  41. package/dist/generator.d.ts +1 -0
  42. package/dist/generator.js +17 -0
  43. package/dist/get/get-data-by-date-range.d.ts +204 -0
  44. package/dist/get/get-data-by-date-range.js +35 -0
  45. package/dist/index.d.ts +7 -0
  46. package/dist/index.js +23 -0
  47. package/dist/key/get.d.ts +2 -0
  48. package/dist/key/get.js +11 -0
  49. package/dist/message/message.d.ts +20 -0
  50. package/dist/message/message.js +11 -0
  51. package/package.json +34 -0
  52. package/src/constants.ts +3 -0
  53. package/src/decode/aggregate.ts +18 -0
  54. package/src/decode/reading.ts +23 -0
  55. package/src/generated/index.ts +16 -0
  56. package/src/generated/types/aggregateMetadata.ts +26 -0
  57. package/src/generated/types/aggregateMetadataTypes.ts +34 -0
  58. package/src/generated/types/aggregateMetadataV1.ts +34 -0
  59. package/src/generated/types/dataMessage.ts +30 -0
  60. package/src/generated/types/deviceReadingMetadataV1.ts +27 -0
  61. package/src/generated/types/deviceReadingV1.ts +30 -0
  62. package/src/generated/types/readingMetadataV1.ts +27 -0
  63. package/src/generated/types/readingV1.ts +31 -0
  64. package/src/generated/validators/aggregateMetadata.js +1 -0
  65. package/src/generated/validators/aggregateMetadataTypes.js +1 -0
  66. package/src/generated/validators/aggregateMetadataV1.js +1 -0
  67. package/src/generated/validators/dataMessage.js +1 -0
  68. package/src/generated/validators/deviceReadingMetadataV1.js +1 -0
  69. package/src/generated/validators/deviceReadingV1.js +1 -0
  70. package/src/generated/validators/readingMetadataV1.js +1 -0
  71. package/src/generated/validators/readingV1.js +1 -0
  72. package/src/generator.ts +50 -0
  73. package/src/get/get-data-by-date-range.ts +52 -0
  74. package/src/index.ts +7 -0
  75. package/src/key/get.ts +11 -0
  76. package/src/message/message.ts +9 -0
  77. package/tsconfig.json +25 -0
@@ -0,0 +1,142 @@
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
+ const err5 = { instancePath, schemaPath: "#/definitions/datamessageJsonSchema/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
62
+ if (vErrors === null) {
63
+ vErrors = [err5];
64
+ }
65
+ else {
66
+ vErrors.push(err5);
67
+ }
68
+ errors++;
69
+ }
70
+ }
71
+ if (data.payload !== undefined) {
72
+ if (typeof data.payload !== "string") {
73
+ const err6 = { instancePath: instancePath + "/payload", schemaPath: "#/definitions/datamessageJsonSchema/properties/payload/type", keyword: "type", params: { type: "string" }, message: "must be string" };
74
+ if (vErrors === null) {
75
+ vErrors = [err6];
76
+ }
77
+ else {
78
+ vErrors.push(err6);
79
+ }
80
+ errors++;
81
+ }
82
+ }
83
+ if (data.account !== undefined) {
84
+ if (typeof data.account !== "string") {
85
+ const err7 = { instancePath: instancePath + "/account", schemaPath: "#/definitions/datamessageJsonSchema/properties/account/type", keyword: "type", params: { type: "string" }, message: "must be string" };
86
+ if (vErrors === null) {
87
+ vErrors = [err7];
88
+ }
89
+ else {
90
+ vErrors.push(err7);
91
+ }
92
+ errors++;
93
+ }
94
+ }
95
+ if (data.device !== undefined) {
96
+ if (typeof data.device !== "string") {
97
+ const err8 = { instancePath: instancePath + "/device", schemaPath: "#/definitions/datamessageJsonSchema/properties/device/type", keyword: "type", params: { type: "string" }, message: "must be string" };
98
+ if (vErrors === null) {
99
+ vErrors = [err8];
100
+ }
101
+ else {
102
+ vErrors.push(err8);
103
+ }
104
+ errors++;
105
+ }
106
+ }
107
+ if (data.component !== undefined) {
108
+ if (typeof data.component !== "string") {
109
+ const err9 = { instancePath: instancePath + "/component", schemaPath: "#/definitions/datamessageJsonSchema/properties/component/type", keyword: "type", params: { type: "string" }, message: "must be string" };
110
+ if (vErrors === null) {
111
+ vErrors = [err9];
112
+ }
113
+ else {
114
+ vErrors.push(err9);
115
+ }
116
+ errors++;
117
+ }
118
+ }
119
+ if (data.timestamp !== undefined) {
120
+ let data4 = data.timestamp;
121
+ if (!((typeof data4 == "number") && (isFinite(data4)))) {
122
+ const err10 = { instancePath: instancePath + "/timestamp", schemaPath: "#/definitions/datamessageJsonSchema/properties/timestamp/type", keyword: "type", params: { type: "number" }, message: "must be number" };
123
+ if (vErrors === null) {
124
+ vErrors = [err10];
125
+ }
126
+ else {
127
+ vErrors.push(err10);
128
+ }
129
+ errors++;
130
+ }
131
+ }
132
+ }
133
+ else {
134
+ const err11 = { instancePath, schemaPath: "#/definitions/datamessageJsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
135
+ if (vErrors === null) {
136
+ vErrors = [err11];
137
+ }
138
+ else {
139
+ vErrors.push(err11);
140
+ }
141
+ errors++;
142
+ } 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,77 @@
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
+ const err2 = { instancePath, schemaPath: "#/definitions/devicereadingmetadatav1JsonSchema/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
32
+ if (vErrors === null) {
33
+ vErrors = [err2];
34
+ }
35
+ else {
36
+ vErrors.push(err2);
37
+ }
38
+ errors++;
39
+ }
40
+ }
41
+ if (data.s !== undefined) {
42
+ let data0 = data.s;
43
+ if (!((typeof data0 == "number") && (isFinite(data0)))) {
44
+ const err3 = { instancePath: instancePath + "/s", schemaPath: "#/definitions/devicereadingmetadatav1JsonSchema/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
45
+ if (vErrors === null) {
46
+ vErrors = [err3];
47
+ }
48
+ else {
49
+ vErrors.push(err3);
50
+ }
51
+ errors++;
52
+ }
53
+ }
54
+ if (data.us !== undefined) {
55
+ let data1 = data.us;
56
+ if (!((typeof data1 == "number") && (isFinite(data1)))) {
57
+ const err4 = { instancePath: instancePath + "/us", schemaPath: "#/definitions/devicereadingmetadatav1JsonSchema/properties/us/type", keyword: "type", params: { type: "number" }, message: "must be number" };
58
+ if (vErrors === null) {
59
+ vErrors = [err4];
60
+ }
61
+ else {
62
+ vErrors.push(err4);
63
+ }
64
+ errors++;
65
+ }
66
+ }
67
+ }
68
+ else {
69
+ const err5 = { instancePath, schemaPath: "#/definitions/devicereadingmetadatav1JsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
70
+ if (vErrors === null) {
71
+ vErrors = [err5];
72
+ }
73
+ else {
74
+ vErrors.push(err5);
75
+ }
76
+ errors++;
77
+ } 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,127 @@
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
+ const err1 = { instancePath, schemaPath: "#/definitions/devicereadingv1JsonSchema/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.m !== undefined) {
32
+ let data0 = data.m;
33
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
34
+ if (data0.s === undefined) {
35
+ const err2 = { instancePath: instancePath + "/m", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/required", keyword: "required", params: { missingProperty: "s" }, message: "must have required property '" + "s" + "'" };
36
+ if (vErrors === null) {
37
+ vErrors = [err2];
38
+ }
39
+ else {
40
+ vErrors.push(err2);
41
+ }
42
+ errors++;
43
+ }
44
+ if (data0.us === undefined) {
45
+ const err3 = { instancePath: instancePath + "/m", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/required", keyword: "required", params: { missingProperty: "us" }, message: "must have required property '" + "us" + "'" };
46
+ if (vErrors === null) {
47
+ vErrors = [err3];
48
+ }
49
+ else {
50
+ vErrors.push(err3);
51
+ }
52
+ errors++;
53
+ }
54
+ for (const key1 in data0) {
55
+ if (!((key1 === "s") || (key1 === "us"))) {
56
+ const err4 = { instancePath: instancePath + "/m", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
57
+ if (vErrors === null) {
58
+ vErrors = [err4];
59
+ }
60
+ else {
61
+ vErrors.push(err4);
62
+ }
63
+ errors++;
64
+ }
65
+ }
66
+ if (data0.s !== undefined) {
67
+ let data1 = data0.s;
68
+ if (!((typeof data1 == "number") && (isFinite(data1)))) {
69
+ const err5 = { instancePath: instancePath + "/m/s", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
70
+ if (vErrors === null) {
71
+ vErrors = [err5];
72
+ }
73
+ else {
74
+ vErrors.push(err5);
75
+ }
76
+ errors++;
77
+ }
78
+ }
79
+ if (data0.us !== undefined) {
80
+ let data2 = data0.us;
81
+ if (!((typeof data2 == "number") && (isFinite(data2)))) {
82
+ const err6 = { instancePath: instancePath + "/m/us", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/properties/us/type", keyword: "type", params: { type: "number" }, message: "must be number" };
83
+ if (vErrors === null) {
84
+ vErrors = [err6];
85
+ }
86
+ else {
87
+ vErrors.push(err6);
88
+ }
89
+ errors++;
90
+ }
91
+ }
92
+ }
93
+ else {
94
+ const err7 = { instancePath: instancePath + "/m", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/m/type", keyword: "type", params: { type: "object" }, message: "must be object" };
95
+ if (vErrors === null) {
96
+ vErrors = [err7];
97
+ }
98
+ else {
99
+ vErrors.push(err7);
100
+ }
101
+ errors++;
102
+ }
103
+ }
104
+ if (data.s !== undefined) {
105
+ let data3 = data.s;
106
+ if (!((typeof data3 == "number") && (isFinite(data3)))) {
107
+ const err8 = { instancePath: instancePath + "/s", schemaPath: "#/definitions/devicereadingv1JsonSchema/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
108
+ if (vErrors === null) {
109
+ vErrors = [err8];
110
+ }
111
+ else {
112
+ vErrors.push(err8);
113
+ }
114
+ errors++;
115
+ }
116
+ }
117
+ }
118
+ else {
119
+ const err9 = { instancePath, schemaPath: "#/definitions/devicereadingv1JsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
120
+ if (vErrors === null) {
121
+ vErrors = [err9];
122
+ }
123
+ else {
124
+ vErrors.push(err9);
125
+ }
126
+ errors++;
127
+ } 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,77 @@
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
+ const err2 = { instancePath, schemaPath: "#/definitions/readingmetadatav1JsonSchema/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
32
+ if (vErrors === null) {
33
+ vErrors = [err2];
34
+ }
35
+ else {
36
+ vErrors.push(err2);
37
+ }
38
+ errors++;
39
+ }
40
+ }
41
+ if (data.s !== undefined) {
42
+ let data0 = data.s;
43
+ if (!((typeof data0 == "number") && (isFinite(data0)))) {
44
+ const err3 = { instancePath: instancePath + "/s", schemaPath: "#/definitions/readingmetadatav1JsonSchema/properties/s/type", keyword: "type", params: { type: "number" }, message: "must be number" };
45
+ if (vErrors === null) {
46
+ vErrors = [err3];
47
+ }
48
+ else {
49
+ vErrors.push(err3);
50
+ }
51
+ errors++;
52
+ }
53
+ }
54
+ if (data.us !== undefined) {
55
+ let data1 = data.us;
56
+ if (!((typeof data1 == "number") && (isFinite(data1)))) {
57
+ const err4 = { instancePath: instancePath + "/us", schemaPath: "#/definitions/readingmetadatav1JsonSchema/properties/us/type", keyword: "type", params: { type: "number" }, message: "must be number" };
58
+ if (vErrors === null) {
59
+ vErrors = [err4];
60
+ }
61
+ else {
62
+ vErrors.push(err4);
63
+ }
64
+ errors++;
65
+ }
66
+ }
67
+ }
68
+ else {
69
+ const err5 = { instancePath, schemaPath: "#/definitions/readingmetadatav1JsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
70
+ if (vErrors === null) {
71
+ vErrors = [err5];
72
+ }
73
+ else {
74
+ vErrors.push(err5);
75
+ }
76
+ errors++;
77
+ } 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;