@camstack/addon-provider-tuya 0.2.51 → 0.2.52

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/addon.js CHANGED
@@ -20028,6 +20028,34 @@ var KeyEventsForDeviceSchema = object({
20028
20028
  deviceId: number(),
20029
20029
  events: array(KeyEventSchema).readonly()
20030
20030
  });
20031
+ /** One non-empty bucket of the timeline histogram. */
20032
+ var EventDensityBucketSchema = object({
20033
+ bucketStart: number(),
20034
+ motion: number().int(),
20035
+ object: number().int(),
20036
+ audio: number().int()
20037
+ });
20038
+ /**
20039
+ * One camera's row in a `getEventDensityBatch` answer.
20040
+ *
20041
+ * TWO facts, and the timeline draws them differently:
20042
+ *
20043
+ * - `read: 'read'` — the histogram for this camera. `buckets: []` is a real
20044
+ * claim: read, and nothing happened in the window.
20045
+ * - `read: 'unreadable'` — nobody could answer for this camera. `buckets` is
20046
+ * empty and that emptiness means NOTHING; the timeline must render unknown,
20047
+ * not quiet.
20048
+ *
20049
+ * Fanned out per camera the difference was free — one query rejected while the
20050
+ * others resolved — and collapsing to a batch is the exact moment it is lost
20051
+ * silently. Every requested id gets a row: a caller that asked for twelve and
20052
+ * got eleven cannot tell which one is missing, or that any is.
20053
+ */
20054
+ var EventDensityForDeviceSchema = object({
20055
+ deviceId: number(),
20056
+ read: _enum(["read", "unreadable"]),
20057
+ buckets: array(EventDensityBucketSchema).readonly()
20058
+ });
20031
20059
  object({
20032
20060
  trackId: string(),
20033
20061
  className: string(),
@@ -20338,12 +20366,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20338
20366
  since: number(),
20339
20367
  until: number(),
20340
20368
  bucketMs: number().int().positive()
20341
- }), array(object({
20342
- bucketStart: number(),
20343
- motion: number().int(),
20344
- object: number().int(),
20345
- audio: number().int()
20346
- })).readonly()), method(object({
20369
+ }), array(EventDensityBucketSchema).readonly()), method(object({
20370
+ deviceIds: array(number()).min(1).max(200),
20371
+ since: number(),
20372
+ until: number(),
20373
+ bucketMs: number().int().positive()
20374
+ }), array(EventDensityForDeviceSchema).readonly()), method(object({
20347
20375
  deviceId: number(),
20348
20376
  cutoffMs: number()
20349
20377
  }), object({
@@ -29376,6 +29404,39 @@ var RecordingDaysSchema = object({
29376
29404
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
29377
29405
  days: array(number())
29378
29406
  });
29407
+ /**
29408
+ * One camera's row in a `getAvailabilityBatch` answer.
29409
+ *
29410
+ * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
29411
+ * batch collapses the transport, not the work — plus the one thing the singular
29412
+ * method never had to say:
29413
+ *
29414
+ * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
29415
+ * no footage in the window", which is a real claim.
29416
+ * - `read: 'unreadable'` — the recorder could not answer for this camera (its
29417
+ * calendar rung threw, its location is unmounted). `ranges` is empty and
29418
+ * that emptiness means NOTHING.
29419
+ *
29420
+ * A timeline that renders the second as the first tells an operator there is no
29421
+ * footage when the truth is that nobody looked.
29422
+ */
29423
+ var RecordingAvailabilityForDeviceSchema = object({
29424
+ deviceId: number(),
29425
+ read: _enum(["read", "unreadable"]),
29426
+ ranges: array(RecordingRangeSchema).readonly()
29427
+ });
29428
+ /**
29429
+ * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
29430
+ * {@link RecordingAvailabilityForDeviceSchema}: `days: []` on a `'read'` row is
29431
+ * "no footage in this month", `read: 'unreadable'` is "nobody could look", and
29432
+ * the date-picker's day dots must not spell them the same.
29433
+ */
29434
+ var RecordingDaysForDeviceSchema = object({
29435
+ deviceId: number(),
29436
+ read: _enum(["read", "unreadable"]),
29437
+ /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
29438
+ days: array(number()).readonly()
29439
+ });
29379
29440
  var RecordingManifestSchema = object({
29380
29441
  deviceId: number(),
29381
29442
  /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
@@ -29610,6 +29671,13 @@ method(object({
29610
29671
  }), RecordingAvailabilitySchema, {
29611
29672
  kind: "query",
29612
29673
  auth: "protected"
29674
+ }), method(object({
29675
+ deviceIds: array(number()).min(1).max(200),
29676
+ fromMs: number(),
29677
+ toMs: number()
29678
+ }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
29679
+ kind: "query",
29680
+ auth: "protected"
29613
29681
  }), method(object({
29614
29682
  deviceId: number(),
29615
29683
  fromMs: number(),
@@ -29618,6 +29686,14 @@ method(object({
29618
29686
  }), RecordingDaysSchema, {
29619
29687
  kind: "query",
29620
29688
  auth: "protected"
29689
+ }), method(object({
29690
+ deviceIds: array(number()).min(1).max(200),
29691
+ fromMs: number(),
29692
+ toMs: number(),
29693
+ tzOffsetMinutes: number()
29694
+ }), array(RecordingDaysForDeviceSchema).readonly(), {
29695
+ kind: "query",
29696
+ auth: "protected"
29621
29697
  }), method(object({
29622
29698
  deviceId: number(),
29623
29699
  fromMs: number(),
@@ -36514,6 +36590,12 @@ Object.freeze({
36514
36590
  addonId: null,
36515
36591
  access: "view"
36516
36592
  },
36593
+ "pipelineAnalytics.getEventDensityBatch": {
36594
+ capName: "pipeline-analytics",
36595
+ capScope: "device",
36596
+ addonId: null,
36597
+ access: "view"
36598
+ },
36517
36599
  "pipelineAnalytics.getEventMedia": {
36518
36600
  capName: "pipeline-analytics",
36519
36601
  capScope: "device",
@@ -37636,12 +37718,24 @@ Object.freeze({
37636
37718
  addonId: null,
37637
37719
  access: "view"
37638
37720
  },
37721
+ "recording.getAvailabilityBatch": {
37722
+ capName: "recording",
37723
+ capScope: "system",
37724
+ addonId: null,
37725
+ access: "view"
37726
+ },
37639
37727
  "recording.getDaysWithRecordings": {
37640
37728
  capName: "recording",
37641
37729
  capScope: "system",
37642
37730
  addonId: null,
37643
37731
  access: "view"
37644
37732
  },
37733
+ "recording.getDaysWithRecordingsBatch": {
37734
+ capName: "recording",
37735
+ capScope: "system",
37736
+ addonId: null,
37737
+ access: "view"
37738
+ },
37645
37739
  "recording.getDeviceConfig": {
37646
37740
  capName: "recording",
37647
37741
  capScope: "system",
@@ -40246,6 +40340,11 @@ Object.freeze({
40246
40340
  form: "single",
40247
40341
  optional: false
40248
40342
  }],
40343
+ "pipelineAnalytics.getEventDensityBatch": [{
40344
+ name: "deviceIds",
40345
+ form: "array",
40346
+ optional: false
40347
+ }],
40249
40348
  "pipelineAnalytics.getEventMedia": [{
40250
40349
  name: "deviceId",
40251
40350
  form: "single",
@@ -40661,11 +40760,21 @@ Object.freeze({
40661
40760
  form: "single",
40662
40761
  optional: false
40663
40762
  }],
40763
+ "recording.getAvailabilityBatch": [{
40764
+ name: "deviceIds",
40765
+ form: "array",
40766
+ optional: false
40767
+ }],
40664
40768
  "recording.getDaysWithRecordings": [{
40665
40769
  name: "deviceId",
40666
40770
  form: "single",
40667
40771
  optional: false
40668
40772
  }],
40773
+ "recording.getDaysWithRecordingsBatch": [{
40774
+ name: "deviceIds",
40775
+ form: "array",
40776
+ optional: false
40777
+ }],
40669
40778
  "recording.getDeviceConfig": [{
40670
40779
  name: "deviceId",
40671
40780
  form: "single",
package/dist/addon.mjs CHANGED
@@ -20027,6 +20027,34 @@ var KeyEventsForDeviceSchema = object({
20027
20027
  deviceId: number(),
20028
20028
  events: array(KeyEventSchema).readonly()
20029
20029
  });
20030
+ /** One non-empty bucket of the timeline histogram. */
20031
+ var EventDensityBucketSchema = object({
20032
+ bucketStart: number(),
20033
+ motion: number().int(),
20034
+ object: number().int(),
20035
+ audio: number().int()
20036
+ });
20037
+ /**
20038
+ * One camera's row in a `getEventDensityBatch` answer.
20039
+ *
20040
+ * TWO facts, and the timeline draws them differently:
20041
+ *
20042
+ * - `read: 'read'` — the histogram for this camera. `buckets: []` is a real
20043
+ * claim: read, and nothing happened in the window.
20044
+ * - `read: 'unreadable'` — nobody could answer for this camera. `buckets` is
20045
+ * empty and that emptiness means NOTHING; the timeline must render unknown,
20046
+ * not quiet.
20047
+ *
20048
+ * Fanned out per camera the difference was free — one query rejected while the
20049
+ * others resolved — and collapsing to a batch is the exact moment it is lost
20050
+ * silently. Every requested id gets a row: a caller that asked for twelve and
20051
+ * got eleven cannot tell which one is missing, or that any is.
20052
+ */
20053
+ var EventDensityForDeviceSchema = object({
20054
+ deviceId: number(),
20055
+ read: _enum(["read", "unreadable"]),
20056
+ buckets: array(EventDensityBucketSchema).readonly()
20057
+ });
20030
20058
  object({
20031
20059
  trackId: string(),
20032
20060
  className: string(),
@@ -20337,12 +20365,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20337
20365
  since: number(),
20338
20366
  until: number(),
20339
20367
  bucketMs: number().int().positive()
20340
- }), array(object({
20341
- bucketStart: number(),
20342
- motion: number().int(),
20343
- object: number().int(),
20344
- audio: number().int()
20345
- })).readonly()), method(object({
20368
+ }), array(EventDensityBucketSchema).readonly()), method(object({
20369
+ deviceIds: array(number()).min(1).max(200),
20370
+ since: number(),
20371
+ until: number(),
20372
+ bucketMs: number().int().positive()
20373
+ }), array(EventDensityForDeviceSchema).readonly()), method(object({
20346
20374
  deviceId: number(),
20347
20375
  cutoffMs: number()
20348
20376
  }), object({
@@ -29375,6 +29403,39 @@ var RecordingDaysSchema = object({
29375
29403
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
29376
29404
  days: array(number())
29377
29405
  });
29406
+ /**
29407
+ * One camera's row in a `getAvailabilityBatch` answer.
29408
+ *
29409
+ * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
29410
+ * batch collapses the transport, not the work — plus the one thing the singular
29411
+ * method never had to say:
29412
+ *
29413
+ * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
29414
+ * no footage in the window", which is a real claim.
29415
+ * - `read: 'unreadable'` — the recorder could not answer for this camera (its
29416
+ * calendar rung threw, its location is unmounted). `ranges` is empty and
29417
+ * that emptiness means NOTHING.
29418
+ *
29419
+ * A timeline that renders the second as the first tells an operator there is no
29420
+ * footage when the truth is that nobody looked.
29421
+ */
29422
+ var RecordingAvailabilityForDeviceSchema = object({
29423
+ deviceId: number(),
29424
+ read: _enum(["read", "unreadable"]),
29425
+ ranges: array(RecordingRangeSchema).readonly()
29426
+ });
29427
+ /**
29428
+ * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
29429
+ * {@link RecordingAvailabilityForDeviceSchema}: `days: []` on a `'read'` row is
29430
+ * "no footage in this month", `read: 'unreadable'` is "nobody could look", and
29431
+ * the date-picker's day dots must not spell them the same.
29432
+ */
29433
+ var RecordingDaysForDeviceSchema = object({
29434
+ deviceId: number(),
29435
+ read: _enum(["read", "unreadable"]),
29436
+ /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
29437
+ days: array(number()).readonly()
29438
+ });
29378
29439
  var RecordingManifestSchema = object({
29379
29440
  deviceId: number(),
29380
29441
  /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
@@ -29609,6 +29670,13 @@ method(object({
29609
29670
  }), RecordingAvailabilitySchema, {
29610
29671
  kind: "query",
29611
29672
  auth: "protected"
29673
+ }), method(object({
29674
+ deviceIds: array(number()).min(1).max(200),
29675
+ fromMs: number(),
29676
+ toMs: number()
29677
+ }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
29678
+ kind: "query",
29679
+ auth: "protected"
29612
29680
  }), method(object({
29613
29681
  deviceId: number(),
29614
29682
  fromMs: number(),
@@ -29617,6 +29685,14 @@ method(object({
29617
29685
  }), RecordingDaysSchema, {
29618
29686
  kind: "query",
29619
29687
  auth: "protected"
29688
+ }), method(object({
29689
+ deviceIds: array(number()).min(1).max(200),
29690
+ fromMs: number(),
29691
+ toMs: number(),
29692
+ tzOffsetMinutes: number()
29693
+ }), array(RecordingDaysForDeviceSchema).readonly(), {
29694
+ kind: "query",
29695
+ auth: "protected"
29620
29696
  }), method(object({
29621
29697
  deviceId: number(),
29622
29698
  fromMs: number(),
@@ -36513,6 +36589,12 @@ Object.freeze({
36513
36589
  addonId: null,
36514
36590
  access: "view"
36515
36591
  },
36592
+ "pipelineAnalytics.getEventDensityBatch": {
36593
+ capName: "pipeline-analytics",
36594
+ capScope: "device",
36595
+ addonId: null,
36596
+ access: "view"
36597
+ },
36516
36598
  "pipelineAnalytics.getEventMedia": {
36517
36599
  capName: "pipeline-analytics",
36518
36600
  capScope: "device",
@@ -37635,12 +37717,24 @@ Object.freeze({
37635
37717
  addonId: null,
37636
37718
  access: "view"
37637
37719
  },
37720
+ "recording.getAvailabilityBatch": {
37721
+ capName: "recording",
37722
+ capScope: "system",
37723
+ addonId: null,
37724
+ access: "view"
37725
+ },
37638
37726
  "recording.getDaysWithRecordings": {
37639
37727
  capName: "recording",
37640
37728
  capScope: "system",
37641
37729
  addonId: null,
37642
37730
  access: "view"
37643
37731
  },
37732
+ "recording.getDaysWithRecordingsBatch": {
37733
+ capName: "recording",
37734
+ capScope: "system",
37735
+ addonId: null,
37736
+ access: "view"
37737
+ },
37644
37738
  "recording.getDeviceConfig": {
37645
37739
  capName: "recording",
37646
37740
  capScope: "system",
@@ -40245,6 +40339,11 @@ Object.freeze({
40245
40339
  form: "single",
40246
40340
  optional: false
40247
40341
  }],
40342
+ "pipelineAnalytics.getEventDensityBatch": [{
40343
+ name: "deviceIds",
40344
+ form: "array",
40345
+ optional: false
40346
+ }],
40248
40347
  "pipelineAnalytics.getEventMedia": [{
40249
40348
  name: "deviceId",
40250
40349
  form: "single",
@@ -40660,11 +40759,21 @@ Object.freeze({
40660
40759
  form: "single",
40661
40760
  optional: false
40662
40761
  }],
40762
+ "recording.getAvailabilityBatch": [{
40763
+ name: "deviceIds",
40764
+ form: "array",
40765
+ optional: false
40766
+ }],
40663
40767
  "recording.getDaysWithRecordings": [{
40664
40768
  name: "deviceId",
40665
40769
  form: "single",
40666
40770
  optional: false
40667
40771
  }],
40772
+ "recording.getDaysWithRecordingsBatch": [{
40773
+ name: "deviceIds",
40774
+ form: "array",
40775
+ optional: false
40776
+ }],
40668
40777
  "recording.getDeviceConfig": [{
40669
40778
  name: "deviceId",
40670
40779
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-tuya",
3
- "version": "0.2.51",
3
+ "version": "0.2.52",
4
4
  "description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
5
5
  "keywords": [
6
6
  "camstack",