@molecule/api-resource-readings 1.0.4 → 1.0.6
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/README.md +14 -8
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -3,15 +3,11 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-10-
|
|
6
|
+
Generated: 2026-10-26T04:23:54.632Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/api-resource-readings
|
|
10
10
|
|
|
11
|
-
> **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
|
|
12
|
-
> It is written to be read by coding agents as much as by people, and is generated from this
|
|
13
|
-
> package's source — edit `src/index.ts` JSDoc, not this file.
|
|
14
|
-
|
|
15
11
|
`@molecule/api-resource-readings` — generic time-series sensor data.
|
|
16
12
|
|
|
17
13
|
Ingest readings via `POST /` or `POST /bulk`, then query raw or
|
|
@@ -21,6 +17,10 @@ Extracted from the energy-monitoring flagship — the pattern works
|
|
|
21
17
|
for any time-series surface (IoT sensors, app metrics, financial
|
|
22
18
|
tick data, etc.).
|
|
23
19
|
|
|
20
|
+
> **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
|
|
21
|
+
> It is written to be read by coding agents as much as by people, and is generated from this
|
|
22
|
+
> package's source — edit `src/index.ts` JSDoc, not this file.
|
|
23
|
+
|
|
24
24
|
## Quick Start
|
|
25
25
|
|
|
26
26
|
```typescript
|
|
@@ -148,14 +148,14 @@ Persist multiple sensor readings in sequence, returning the number successfully
|
|
|
148
148
|
```typescript
|
|
149
149
|
function ingestBulk(
|
|
150
150
|
ownerId: string,
|
|
151
|
-
readings: {
|
|
151
|
+
readings: Array<{
|
|
152
152
|
sensor_id: string
|
|
153
153
|
metric: string
|
|
154
154
|
value: number
|
|
155
155
|
unit?: string | null
|
|
156
156
|
recorded_at?: string
|
|
157
157
|
metadata?: Record<string, unknown>
|
|
158
|
-
}
|
|
158
|
+
}>,
|
|
159
159
|
): Promise<number>
|
|
160
160
|
```
|
|
161
161
|
|
|
@@ -166,7 +166,13 @@ Fetch raw, unaggregated reading points for an owner, optionally filtered by sens
|
|
|
166
166
|
```typescript
|
|
167
167
|
function listRawReadings(
|
|
168
168
|
ownerId: string,
|
|
169
|
-
opts?: {
|
|
169
|
+
opts?: {
|
|
170
|
+
sensor_id?: string
|
|
171
|
+
metric?: string
|
|
172
|
+
from?: string
|
|
173
|
+
to?: string
|
|
174
|
+
limit?: number
|
|
175
|
+
},
|
|
170
176
|
): Promise<ReadingPoint[]>
|
|
171
177
|
```
|
|
172
178
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/api-resource-readings",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Generic time-series sensor readings with on-the-fly aggregation (raw/5min/hour/day rollups)",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/api-resource-readings",
|
|
6
6
|
"type": "module",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/express": "5.0.6",
|
|
41
|
-
"@types/node": "26.
|
|
42
|
-
"express": "5.
|
|
41
|
+
"@types/node": "26.6.5",
|
|
42
|
+
"express": "5.3.0",
|
|
43
43
|
"typescript": "6.0.3",
|
|
44
|
-
"vitest": "4.1.
|
|
45
|
-
"zod": "4.
|
|
44
|
+
"vitest": "4.1.12",
|
|
45
|
+
"zod": "4.6.7"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@molecule/api-bonds-default-express": "^1.0.1",
|