@camstack/addon-provider-tuya 0.2.50 → 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 +117 -6
- package/dist/addon.mjs +117 -6
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -16712,6 +16712,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16712
16712
|
"device-offline",
|
|
16713
16713
|
"device-disabled",
|
|
16714
16714
|
"device-enabled",
|
|
16715
|
+
"device-battery-low",
|
|
16716
|
+
"device-battery-normal",
|
|
16715
16717
|
"stream-online",
|
|
16716
16718
|
"stream-offline",
|
|
16717
16719
|
"node-online",
|
|
@@ -20026,6 +20028,34 @@ var KeyEventsForDeviceSchema = object({
|
|
|
20026
20028
|
deviceId: number(),
|
|
20027
20029
|
events: array(KeyEventSchema).readonly()
|
|
20028
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
|
+
});
|
|
20029
20059
|
object({
|
|
20030
20060
|
trackId: string(),
|
|
20031
20061
|
className: string(),
|
|
@@ -20336,12 +20366,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20336
20366
|
since: number(),
|
|
20337
20367
|
until: number(),
|
|
20338
20368
|
bucketMs: number().int().positive()
|
|
20339
|
-
}), array(object({
|
|
20340
|
-
|
|
20341
|
-
|
|
20342
|
-
|
|
20343
|
-
|
|
20344
|
-
})).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({
|
|
20345
20375
|
deviceId: number(),
|
|
20346
20376
|
cutoffMs: number()
|
|
20347
20377
|
}), object({
|
|
@@ -29374,6 +29404,39 @@ var RecordingDaysSchema = object({
|
|
|
29374
29404
|
/** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
|
|
29375
29405
|
days: array(number())
|
|
29376
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
|
+
});
|
|
29377
29440
|
var RecordingManifestSchema = object({
|
|
29378
29441
|
deviceId: number(),
|
|
29379
29442
|
/** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
|
|
@@ -29608,6 +29671,13 @@ method(object({
|
|
|
29608
29671
|
}), RecordingAvailabilitySchema, {
|
|
29609
29672
|
kind: "query",
|
|
29610
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"
|
|
29611
29681
|
}), method(object({
|
|
29612
29682
|
deviceId: number(),
|
|
29613
29683
|
fromMs: number(),
|
|
@@ -29616,6 +29686,14 @@ method(object({
|
|
|
29616
29686
|
}), RecordingDaysSchema, {
|
|
29617
29687
|
kind: "query",
|
|
29618
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"
|
|
29619
29697
|
}), method(object({
|
|
29620
29698
|
deviceId: number(),
|
|
29621
29699
|
fromMs: number(),
|
|
@@ -36512,6 +36590,12 @@ Object.freeze({
|
|
|
36512
36590
|
addonId: null,
|
|
36513
36591
|
access: "view"
|
|
36514
36592
|
},
|
|
36593
|
+
"pipelineAnalytics.getEventDensityBatch": {
|
|
36594
|
+
capName: "pipeline-analytics",
|
|
36595
|
+
capScope: "device",
|
|
36596
|
+
addonId: null,
|
|
36597
|
+
access: "view"
|
|
36598
|
+
},
|
|
36515
36599
|
"pipelineAnalytics.getEventMedia": {
|
|
36516
36600
|
capName: "pipeline-analytics",
|
|
36517
36601
|
capScope: "device",
|
|
@@ -37634,12 +37718,24 @@ Object.freeze({
|
|
|
37634
37718
|
addonId: null,
|
|
37635
37719
|
access: "view"
|
|
37636
37720
|
},
|
|
37721
|
+
"recording.getAvailabilityBatch": {
|
|
37722
|
+
capName: "recording",
|
|
37723
|
+
capScope: "system",
|
|
37724
|
+
addonId: null,
|
|
37725
|
+
access: "view"
|
|
37726
|
+
},
|
|
37637
37727
|
"recording.getDaysWithRecordings": {
|
|
37638
37728
|
capName: "recording",
|
|
37639
37729
|
capScope: "system",
|
|
37640
37730
|
addonId: null,
|
|
37641
37731
|
access: "view"
|
|
37642
37732
|
},
|
|
37733
|
+
"recording.getDaysWithRecordingsBatch": {
|
|
37734
|
+
capName: "recording",
|
|
37735
|
+
capScope: "system",
|
|
37736
|
+
addonId: null,
|
|
37737
|
+
access: "view"
|
|
37738
|
+
},
|
|
37643
37739
|
"recording.getDeviceConfig": {
|
|
37644
37740
|
capName: "recording",
|
|
37645
37741
|
capScope: "system",
|
|
@@ -40244,6 +40340,11 @@ Object.freeze({
|
|
|
40244
40340
|
form: "single",
|
|
40245
40341
|
optional: false
|
|
40246
40342
|
}],
|
|
40343
|
+
"pipelineAnalytics.getEventDensityBatch": [{
|
|
40344
|
+
name: "deviceIds",
|
|
40345
|
+
form: "array",
|
|
40346
|
+
optional: false
|
|
40347
|
+
}],
|
|
40247
40348
|
"pipelineAnalytics.getEventMedia": [{
|
|
40248
40349
|
name: "deviceId",
|
|
40249
40350
|
form: "single",
|
|
@@ -40659,11 +40760,21 @@ Object.freeze({
|
|
|
40659
40760
|
form: "single",
|
|
40660
40761
|
optional: false
|
|
40661
40762
|
}],
|
|
40763
|
+
"recording.getAvailabilityBatch": [{
|
|
40764
|
+
name: "deviceIds",
|
|
40765
|
+
form: "array",
|
|
40766
|
+
optional: false
|
|
40767
|
+
}],
|
|
40662
40768
|
"recording.getDaysWithRecordings": [{
|
|
40663
40769
|
name: "deviceId",
|
|
40664
40770
|
form: "single",
|
|
40665
40771
|
optional: false
|
|
40666
40772
|
}],
|
|
40773
|
+
"recording.getDaysWithRecordingsBatch": [{
|
|
40774
|
+
name: "deviceIds",
|
|
40775
|
+
form: "array",
|
|
40776
|
+
optional: false
|
|
40777
|
+
}],
|
|
40667
40778
|
"recording.getDeviceConfig": [{
|
|
40668
40779
|
name: "deviceId",
|
|
40669
40780
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -16711,6 +16711,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16711
16711
|
"device-offline",
|
|
16712
16712
|
"device-disabled",
|
|
16713
16713
|
"device-enabled",
|
|
16714
|
+
"device-battery-low",
|
|
16715
|
+
"device-battery-normal",
|
|
16714
16716
|
"stream-online",
|
|
16715
16717
|
"stream-offline",
|
|
16716
16718
|
"node-online",
|
|
@@ -20025,6 +20027,34 @@ var KeyEventsForDeviceSchema = object({
|
|
|
20025
20027
|
deviceId: number(),
|
|
20026
20028
|
events: array(KeyEventSchema).readonly()
|
|
20027
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
|
+
});
|
|
20028
20058
|
object({
|
|
20029
20059
|
trackId: string(),
|
|
20030
20060
|
className: string(),
|
|
@@ -20335,12 +20365,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20335
20365
|
since: number(),
|
|
20336
20366
|
until: number(),
|
|
20337
20367
|
bucketMs: number().int().positive()
|
|
20338
|
-
}), array(object({
|
|
20339
|
-
|
|
20340
|
-
|
|
20341
|
-
|
|
20342
|
-
|
|
20343
|
-
})).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({
|
|
20344
20374
|
deviceId: number(),
|
|
20345
20375
|
cutoffMs: number()
|
|
20346
20376
|
}), object({
|
|
@@ -29373,6 +29403,39 @@ var RecordingDaysSchema = object({
|
|
|
29373
29403
|
/** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
|
|
29374
29404
|
days: array(number())
|
|
29375
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
|
+
});
|
|
29376
29439
|
var RecordingManifestSchema = object({
|
|
29377
29440
|
deviceId: number(),
|
|
29378
29441
|
/** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
|
|
@@ -29607,6 +29670,13 @@ method(object({
|
|
|
29607
29670
|
}), RecordingAvailabilitySchema, {
|
|
29608
29671
|
kind: "query",
|
|
29609
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"
|
|
29610
29680
|
}), method(object({
|
|
29611
29681
|
deviceId: number(),
|
|
29612
29682
|
fromMs: number(),
|
|
@@ -29615,6 +29685,14 @@ method(object({
|
|
|
29615
29685
|
}), RecordingDaysSchema, {
|
|
29616
29686
|
kind: "query",
|
|
29617
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"
|
|
29618
29696
|
}), method(object({
|
|
29619
29697
|
deviceId: number(),
|
|
29620
29698
|
fromMs: number(),
|
|
@@ -36511,6 +36589,12 @@ Object.freeze({
|
|
|
36511
36589
|
addonId: null,
|
|
36512
36590
|
access: "view"
|
|
36513
36591
|
},
|
|
36592
|
+
"pipelineAnalytics.getEventDensityBatch": {
|
|
36593
|
+
capName: "pipeline-analytics",
|
|
36594
|
+
capScope: "device",
|
|
36595
|
+
addonId: null,
|
|
36596
|
+
access: "view"
|
|
36597
|
+
},
|
|
36514
36598
|
"pipelineAnalytics.getEventMedia": {
|
|
36515
36599
|
capName: "pipeline-analytics",
|
|
36516
36600
|
capScope: "device",
|
|
@@ -37633,12 +37717,24 @@ Object.freeze({
|
|
|
37633
37717
|
addonId: null,
|
|
37634
37718
|
access: "view"
|
|
37635
37719
|
},
|
|
37720
|
+
"recording.getAvailabilityBatch": {
|
|
37721
|
+
capName: "recording",
|
|
37722
|
+
capScope: "system",
|
|
37723
|
+
addonId: null,
|
|
37724
|
+
access: "view"
|
|
37725
|
+
},
|
|
37636
37726
|
"recording.getDaysWithRecordings": {
|
|
37637
37727
|
capName: "recording",
|
|
37638
37728
|
capScope: "system",
|
|
37639
37729
|
addonId: null,
|
|
37640
37730
|
access: "view"
|
|
37641
37731
|
},
|
|
37732
|
+
"recording.getDaysWithRecordingsBatch": {
|
|
37733
|
+
capName: "recording",
|
|
37734
|
+
capScope: "system",
|
|
37735
|
+
addonId: null,
|
|
37736
|
+
access: "view"
|
|
37737
|
+
},
|
|
37642
37738
|
"recording.getDeviceConfig": {
|
|
37643
37739
|
capName: "recording",
|
|
37644
37740
|
capScope: "system",
|
|
@@ -40243,6 +40339,11 @@ Object.freeze({
|
|
|
40243
40339
|
form: "single",
|
|
40244
40340
|
optional: false
|
|
40245
40341
|
}],
|
|
40342
|
+
"pipelineAnalytics.getEventDensityBatch": [{
|
|
40343
|
+
name: "deviceIds",
|
|
40344
|
+
form: "array",
|
|
40345
|
+
optional: false
|
|
40346
|
+
}],
|
|
40246
40347
|
"pipelineAnalytics.getEventMedia": [{
|
|
40247
40348
|
name: "deviceId",
|
|
40248
40349
|
form: "single",
|
|
@@ -40658,11 +40759,21 @@ Object.freeze({
|
|
|
40658
40759
|
form: "single",
|
|
40659
40760
|
optional: false
|
|
40660
40761
|
}],
|
|
40762
|
+
"recording.getAvailabilityBatch": [{
|
|
40763
|
+
name: "deviceIds",
|
|
40764
|
+
form: "array",
|
|
40765
|
+
optional: false
|
|
40766
|
+
}],
|
|
40661
40767
|
"recording.getDaysWithRecordings": [{
|
|
40662
40768
|
name: "deviceId",
|
|
40663
40769
|
form: "single",
|
|
40664
40770
|
optional: false
|
|
40665
40771
|
}],
|
|
40772
|
+
"recording.getDaysWithRecordingsBatch": [{
|
|
40773
|
+
name: "deviceIds",
|
|
40774
|
+
form: "array",
|
|
40775
|
+
optional: false
|
|
40776
|
+
}],
|
|
40666
40777
|
"recording.getDeviceConfig": [{
|
|
40667
40778
|
name: "deviceId",
|
|
40668
40779
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-tuya",
|
|
3
|
-
"version": "0.2.
|
|
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",
|