@molecule/api-resource-readings 1.0.6 → 1.0.8

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 CHANGED
@@ -3,7 +3,7 @@ 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-26T04:23:54.632Z
6
+ Generated: 2026-11-25T20:13:24.167Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-resource-readings
@@ -47,7 +47,7 @@ const hourly = await listAggregatedReadings(userId, { granularity: 'hour', metri
47
47
  ## Installation
48
48
 
49
49
  ```bash
50
- npm install @molecule/api-resource-readings @molecule/api-bonds-default-express @molecule/api-database @molecule/api-i18n @molecule/api-middleware-validation express zod
50
+ npm install @molecule/api-resource-readings @molecule/api-database @molecule/api-i18n @molecule/api-middleware-validation @molecule/api-resource express zod
51
51
  npm install -D @types/express
52
52
  ```
53
53
 
@@ -280,19 +280,19 @@ const readingQuerySchema: z.ZodObject<
280
280
 
281
281
  Peer dependencies:
282
282
 
283
- - `@molecule/api-bonds-default-express` ^1.0.1
284
283
  - `@molecule/api-database` ^1.0.1
285
284
  - `@molecule/api-i18n` ^1.0.1
286
285
  - `@molecule/api-middleware-validation` ^1.0.1
286
+ - `@molecule/api-resource` ^1.2.0
287
287
  - `express` ^5.0.0
288
288
  - `zod` ^4.0.0
289
289
 
290
290
  ### Runtime Dependencies
291
291
 
292
- - `@molecule/api-bonds-default-express`
293
292
  - `@molecule/api-database`
294
293
  - `@molecule/api-i18n`
295
294
  - `@molecule/api-middleware-validation`
295
+ - `@molecule/api-resource`
296
296
  - `express`
297
297
  - `zod`
298
298
 
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,MAAM,EAAE,MAAM,SAAS,CAAA;AAclF,kFAAkF;AAClF,wBAAgB,oBAAoB,IAAI,MAAM,CAkD7C"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,MAAM,EAAE,MAAM,SAAS,CAAA;AAQ7D,kFAAkF;AAClF,wBAAgB,oBAAoB,IAAI,MAAM,CAkD7C"}
package/dist/routes.js CHANGED
@@ -1,10 +1,8 @@
1
1
  import { Router } from 'express';
2
- import { requireUser } from '@molecule/api-bonds-default-express';
3
- import { validateBody as validateBodyRaw, validateQuery as validateQueryRaw, } from '@molecule/api-middleware-validation';
2
+ import { validateBody, validateQuery } from '@molecule/api-middleware-validation';
3
+ import { requireUser } from '@molecule/api-resource';
4
4
  import { ingestBulk, ingestReading, listAggregatedReadings, listRawReadings } from './service.js';
5
5
  import { readingBulkSchema, readingCreateSchema, readingQuerySchema } from './validation.js';
6
- const validateBody = validateBodyRaw;
7
- const validateQuery = validateQueryRaw;
8
6
  /** Creates and returns the Express router for the readings resource endpoints. */
9
7
  export function createReadingsRouter() {
10
8
  const router = Router();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@molecule/api-resource-readings",
3
- "version": "1.0.6",
4
- "description": "Generic time-series sensor readings with on-the-fly aggregation (raw/5min/hour/day rollups)",
3
+ "version": "1.0.8",
4
+ "description": "Generic time-series with on-the-fly aggregation",
5
5
  "homepage": "https://www.molecule.dev/packages/api-resource-readings",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -45,10 +45,10 @@
45
45
  "zod": "4.6.7"
46
46
  },
47
47
  "peerDependencies": {
48
- "@molecule/api-bonds-default-express": "^1.0.1",
49
48
  "@molecule/api-database": "^1.0.1",
50
49
  "@molecule/api-i18n": "^1.0.1",
51
50
  "@molecule/api-middleware-validation": "^1.0.1",
51
+ "@molecule/api-resource": "^1.2.0",
52
52
  "express": "^5.0.0",
53
53
  "zod": "^4.0.0"
54
54
  }