@xube/kit-schema 0.2.7 → 0.2.12
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/base.d.ts +1 -11
- package/dist/base.d.ts.map +1 -1
- package/dist/time-series.d.ts +18 -114
- package/dist/time-series.d.ts.map +1 -1
- package/package.json +6 -7
- package/src/generate-open-api-schema.ts +0 -4
package/dist/base.d.ts
CHANGED
|
@@ -4,17 +4,7 @@ export declare const BaseDataSchema: z.ZodObject<{
|
|
|
4
4
|
us: z.ZodOptional<z.ZodNumber>;
|
|
5
5
|
type: z.ZodString;
|
|
6
6
|
id: z.ZodString;
|
|
7
|
-
},
|
|
8
|
-
s: number;
|
|
9
|
-
type: string;
|
|
10
|
-
id: string;
|
|
11
|
-
us?: number | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
s: number;
|
|
14
|
-
type: string;
|
|
15
|
-
id: string;
|
|
16
|
-
us?: number | undefined;
|
|
17
|
-
}>;
|
|
7
|
+
}, z.core.$strip>;
|
|
18
8
|
export type BaseData = z.infer<typeof BaseDataSchema>;
|
|
19
9
|
export declare const isBaseData: (item: unknown) => item is BaseData;
|
|
20
10
|
//# sourceMappingURL=base.d.ts.map
|
package/dist/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,eAAO,MAAM,UAAU,SAAU,OAAO,KAAG,IAAI,IAAI,QACX,CAAC"}
|
package/dist/time-series.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const SourceTypes: {
|
|
|
4
4
|
readonly component: "component";
|
|
5
5
|
readonly platform: "platform";
|
|
6
6
|
};
|
|
7
|
-
export declare const SourceTypeSchema: z.
|
|
7
|
+
export declare const SourceTypeSchema: z.ZodEnum<{
|
|
8
8
|
readonly device: "device";
|
|
9
9
|
readonly component: "component";
|
|
10
10
|
readonly platform: "platform";
|
|
@@ -14,7 +14,7 @@ export declare const TriggerTypes: {
|
|
|
14
14
|
readonly data: "data";
|
|
15
15
|
readonly event: "event";
|
|
16
16
|
};
|
|
17
|
-
export declare const TriggerTypeSchema: z.
|
|
17
|
+
export declare const TriggerTypeSchema: z.ZodEnum<{
|
|
18
18
|
readonly data: "data";
|
|
19
19
|
readonly event: "event";
|
|
20
20
|
}>;
|
|
@@ -27,7 +27,7 @@ export declare const TimeUnit: {
|
|
|
27
27
|
readonly h: "h";
|
|
28
28
|
readonly d: "d";
|
|
29
29
|
};
|
|
30
|
-
export declare const TimeUnitSchema: z.
|
|
30
|
+
export declare const TimeUnitSchema: z.ZodEnum<{
|
|
31
31
|
readonly us: "us";
|
|
32
32
|
readonly ms: "ms";
|
|
33
33
|
readonly s: "s";
|
|
@@ -36,34 +36,24 @@ export declare const TimeUnitSchema: z.ZodNativeEnum<{
|
|
|
36
36
|
readonly d: "d";
|
|
37
37
|
}>;
|
|
38
38
|
export type TimeUnit = z.infer<typeof TimeUnitSchema>;
|
|
39
|
-
export declare const GenericDataTypesSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{},
|
|
39
|
+
export declare const GenericDataTypesSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{}, z.core.$loose>]>;
|
|
40
40
|
export declare const TimeSeriesEntrySchema: z.ZodObject<{
|
|
41
41
|
v: z.ZodString;
|
|
42
42
|
m: z.ZodObject<{
|
|
43
43
|
id: z.ZodString;
|
|
44
|
-
trigger: z.
|
|
44
|
+
trigger: z.ZodEnum<{
|
|
45
45
|
readonly data: "data";
|
|
46
46
|
readonly event: "event";
|
|
47
47
|
}>;
|
|
48
|
-
source: z.
|
|
48
|
+
source: z.ZodEnum<{
|
|
49
49
|
readonly device: "device";
|
|
50
50
|
readonly component: "component";
|
|
51
51
|
readonly platform: "platform";
|
|
52
52
|
}>;
|
|
53
53
|
component: z.ZodOptional<z.ZodString>;
|
|
54
|
-
},
|
|
55
|
-
id: string;
|
|
56
|
-
trigger: "data" | "event";
|
|
57
|
-
source: "device" | "component" | "platform";
|
|
58
|
-
component?: string | undefined;
|
|
59
|
-
}, {
|
|
60
|
-
id: string;
|
|
61
|
-
trigger: "data" | "event";
|
|
62
|
-
source: "device" | "component" | "platform";
|
|
63
|
-
component?: string | undefined;
|
|
64
|
-
}>;
|
|
54
|
+
}, z.core.$strip>;
|
|
65
55
|
t0: z.ZodString;
|
|
66
|
-
dtt: z.ZodDefault<z.
|
|
56
|
+
dtt: z.ZodDefault<z.ZodEnum<{
|
|
67
57
|
readonly us: "us";
|
|
68
58
|
readonly ms: "ms";
|
|
69
59
|
readonly s: "s";
|
|
@@ -75,75 +65,27 @@ export declare const TimeSeriesEntrySchema: z.ZodObject<{
|
|
|
75
65
|
dataT: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
76
66
|
i: z.ZodNumber;
|
|
77
67
|
dt: z.ZodNumber;
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
82
|
-
i: z.ZodNumber;
|
|
83
|
-
dt: z.ZodNumber;
|
|
84
|
-
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
85
|
-
data: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>]>, "many">;
|
|
86
|
-
}, "strip", z.ZodTypeAny, {
|
|
87
|
-
data: (string | number | boolean | z.objectOutputType<{}, z.ZodTypeAny, "passthrough">)[];
|
|
88
|
-
m: {
|
|
89
|
-
id: string;
|
|
90
|
-
trigger: "data" | "event";
|
|
91
|
-
source: "device" | "component" | "platform";
|
|
92
|
-
component?: string | undefined;
|
|
93
|
-
};
|
|
94
|
-
v: string;
|
|
95
|
-
t0: string;
|
|
96
|
-
dtt: "s" | "us" | "ms" | "m" | "h" | "d";
|
|
97
|
-
dt: number;
|
|
98
|
-
dataT?: z.objectOutputType<{
|
|
99
|
-
i: z.ZodNumber;
|
|
100
|
-
dt: z.ZodNumber;
|
|
101
|
-
}, z.ZodTypeAny, "passthrough">[] | undefined;
|
|
102
|
-
}, {
|
|
103
|
-
data: (string | number | boolean | z.objectInputType<{}, z.ZodTypeAny, "passthrough">)[];
|
|
104
|
-
m: {
|
|
105
|
-
id: string;
|
|
106
|
-
trigger: "data" | "event";
|
|
107
|
-
source: "device" | "component" | "platform";
|
|
108
|
-
component?: string | undefined;
|
|
109
|
-
};
|
|
110
|
-
v: string;
|
|
111
|
-
t0: string;
|
|
112
|
-
dt: number;
|
|
113
|
-
dtt?: "s" | "us" | "ms" | "m" | "h" | "d" | undefined;
|
|
114
|
-
dataT?: z.objectInputType<{
|
|
115
|
-
i: z.ZodNumber;
|
|
116
|
-
dt: z.ZodNumber;
|
|
117
|
-
}, z.ZodTypeAny, "passthrough">[] | undefined;
|
|
118
|
-
}>;
|
|
68
|
+
}, z.core.$loose>>>;
|
|
69
|
+
data: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{}, z.core.$loose>]>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
119
71
|
export type TimeSeriesEntry = z.infer<typeof TimeSeriesEntrySchema>;
|
|
120
72
|
export declare const TimeSeriesSchema: z.ZodArray<z.ZodObject<{
|
|
121
73
|
v: z.ZodString;
|
|
122
74
|
m: z.ZodObject<{
|
|
123
75
|
id: z.ZodString;
|
|
124
|
-
trigger: z.
|
|
76
|
+
trigger: z.ZodEnum<{
|
|
125
77
|
readonly data: "data";
|
|
126
78
|
readonly event: "event";
|
|
127
79
|
}>;
|
|
128
|
-
source: z.
|
|
80
|
+
source: z.ZodEnum<{
|
|
129
81
|
readonly device: "device";
|
|
130
82
|
readonly component: "component";
|
|
131
83
|
readonly platform: "platform";
|
|
132
84
|
}>;
|
|
133
85
|
component: z.ZodOptional<z.ZodString>;
|
|
134
|
-
},
|
|
135
|
-
id: string;
|
|
136
|
-
trigger: "data" | "event";
|
|
137
|
-
source: "device" | "component" | "platform";
|
|
138
|
-
component?: string | undefined;
|
|
139
|
-
}, {
|
|
140
|
-
id: string;
|
|
141
|
-
trigger: "data" | "event";
|
|
142
|
-
source: "device" | "component" | "platform";
|
|
143
|
-
component?: string | undefined;
|
|
144
|
-
}>;
|
|
86
|
+
}, z.core.$strip>;
|
|
145
87
|
t0: z.ZodString;
|
|
146
|
-
dtt: z.ZodDefault<z.
|
|
88
|
+
dtt: z.ZodDefault<z.ZodEnum<{
|
|
147
89
|
readonly us: "us";
|
|
148
90
|
readonly ms: "ms";
|
|
149
91
|
readonly s: "s";
|
|
@@ -155,47 +97,9 @@ export declare const TimeSeriesSchema: z.ZodArray<z.ZodObject<{
|
|
|
155
97
|
dataT: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
156
98
|
i: z.ZodNumber;
|
|
157
99
|
dt: z.ZodNumber;
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
162
|
-
i: z.ZodNumber;
|
|
163
|
-
dt: z.ZodNumber;
|
|
164
|
-
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
165
|
-
data: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>]>, "many">;
|
|
166
|
-
}, "strip", z.ZodTypeAny, {
|
|
167
|
-
data: (string | number | boolean | z.objectOutputType<{}, z.ZodTypeAny, "passthrough">)[];
|
|
168
|
-
m: {
|
|
169
|
-
id: string;
|
|
170
|
-
trigger: "data" | "event";
|
|
171
|
-
source: "device" | "component" | "platform";
|
|
172
|
-
component?: string | undefined;
|
|
173
|
-
};
|
|
174
|
-
v: string;
|
|
175
|
-
t0: string;
|
|
176
|
-
dtt: "s" | "us" | "ms" | "m" | "h" | "d";
|
|
177
|
-
dt: number;
|
|
178
|
-
dataT?: z.objectOutputType<{
|
|
179
|
-
i: z.ZodNumber;
|
|
180
|
-
dt: z.ZodNumber;
|
|
181
|
-
}, z.ZodTypeAny, "passthrough">[] | undefined;
|
|
182
|
-
}, {
|
|
183
|
-
data: (string | number | boolean | z.objectInputType<{}, z.ZodTypeAny, "passthrough">)[];
|
|
184
|
-
m: {
|
|
185
|
-
id: string;
|
|
186
|
-
trigger: "data" | "event";
|
|
187
|
-
source: "device" | "component" | "platform";
|
|
188
|
-
component?: string | undefined;
|
|
189
|
-
};
|
|
190
|
-
v: string;
|
|
191
|
-
t0: string;
|
|
192
|
-
dt: number;
|
|
193
|
-
dtt?: "s" | "us" | "ms" | "m" | "h" | "d" | undefined;
|
|
194
|
-
dataT?: z.objectInputType<{
|
|
195
|
-
i: z.ZodNumber;
|
|
196
|
-
dt: z.ZodNumber;
|
|
197
|
-
}, z.ZodTypeAny, "passthrough">[] | undefined;
|
|
198
|
-
}>, "many">;
|
|
100
|
+
}, z.core.$loose>>>;
|
|
101
|
+
data: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{}, z.core.$loose>]>>;
|
|
102
|
+
}, z.core.$strip>>;
|
|
199
103
|
export type TimeSeries = z.infer<typeof TimeSeriesSchema>;
|
|
200
104
|
export declare const timeSeriesExample: TimeSeries;
|
|
201
105
|
//# sourceMappingURL=time-series.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-series.d.ts","sourceRoot":"","sources":["../src/time-series.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;;CAId,CAAC;AACX,eAAO,MAAM,gBAAgB;;;;EAA4B,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,YAAY;;;CAGf,CAAC;AACX,eAAO,MAAM,iBAAiB;;;EAA6B,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,QAAQ;;;;;;;CAOX,CAAC;AACX,eAAO,MAAM,cAAc;;;;;;;EAAyB,CAAC;AACrD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"time-series.d.ts","sourceRoot":"","sources":["../src/time-series.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;;CAId,CAAC;AACX,eAAO,MAAM,gBAAgB;;;;EAA4B,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,YAAY;;;CAGf,CAAC;AACX,eAAO,MAAM,iBAAiB;;;EAA6B,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,QAAQ;;;;;;;CAOX,CAAC;AACX,eAAO,MAAM,cAAc;;;;;;;EAAyB,CAAC;AACrD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,sBAAsB,+FAKjC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAiC,CAAC;AAC/D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,iBAAiB,EAAE,UAyC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xube/kit-schema",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,13 +17,12 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/XubeLtd/data-logger#readme",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@xube/kit-
|
|
22
|
-
"@xube/kit-
|
|
23
|
-
"
|
|
24
|
-
"zod": "^3.23.8"
|
|
20
|
+
"@xube/kit-constants": "^0.2.12",
|
|
21
|
+
"@xube/kit-generator": "^0.2.12",
|
|
22
|
+
"@xube/kit-log": "^0.2.12",
|
|
23
|
+
"zod": "^4.4.3"
|
|
25
24
|
},
|
|
26
25
|
"devDependencies": {
|
|
27
|
-
"@xube/kit-build": "^0.2.
|
|
26
|
+
"@xube/kit-build": "^0.2.12"
|
|
28
27
|
}
|
|
29
28
|
}
|