@camstack/addon-agent-ui 1.2.230 → 1.2.232
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 +667 -3
- package/dist/assets/{MotionZonesSettings-DRoJwz93.js → MotionZonesSettings-CAq-BlIY.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-C02fBJtX.js → PrivacyMaskSettings-C5duEFBK.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-Cl4aqfZH.js → SceneMonitorEditor-DOR4rcIM.js} +1 -1
- package/dist/assets/index-DWvKml73.js +112 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/index-ZFlzsWIa.js +0 -112
package/dist/addon.js
CHANGED
|
@@ -5388,7 +5388,7 @@ var ZodIssueCode = {
|
|
|
5388
5388
|
var ZodFirstPartyTypeKind;
|
|
5389
5389
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5390
5390
|
//#endregion
|
|
5391
|
-
//#region ../types/dist/sleep-
|
|
5391
|
+
//#region ../types/dist/sleep--g-h2_c_.mjs
|
|
5392
5392
|
/**
|
|
5393
5393
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5394
5394
|
* window to float samples (D455).
|
|
@@ -12171,6 +12171,167 @@ var ConvertResultSchema = object({
|
|
|
12171
12171
|
files: array(string()).readonly()
|
|
12172
12172
|
})).readonly()
|
|
12173
12173
|
});
|
|
12174
|
+
/**
|
|
12175
|
+
* Device certificates (D855) — the wire contract shared by the hub, the admin
|
|
12176
|
+
* UI and the native viewer.
|
|
12177
|
+
*
|
|
12178
|
+
* A device (a phone) generates its OWN P-256 key pair in hardware (Secure
|
|
12179
|
+
* Enclave / Android Keystore / a non-extractable WebCrypto key). The private
|
|
12180
|
+
* key never travels. The hub signs the PUBLIC key into an X.509 leaf under a
|
|
12181
|
+
* dedicated device CA; the device later proves possession of the key by
|
|
12182
|
+
* signing a hub-issued nonce, and the hub answers with the same session a
|
|
12183
|
+
* password login opens.
|
|
12184
|
+
*
|
|
12185
|
+
* Everything on the wire is a small string (a PEM, a base64url signature):
|
|
12186
|
+
* D613 is about bulk bytes, and a certificate is ~600 bytes.
|
|
12187
|
+
*/
|
|
12188
|
+
/** Signature algorithm of every device credential: ECDSA, curve P-256, SHA-256. */
|
|
12189
|
+
var DEVICE_CERT_SIGNATURE = "ecdsa-p256-sha256";
|
|
12190
|
+
/** First line of every signed message; a change of format bumps the version. */
|
|
12191
|
+
var DEVICE_SIGNATURE_MESSAGE_VERSION = "camstack-device-cert-v1";
|
|
12192
|
+
_enum([
|
|
12193
|
+
"login",
|
|
12194
|
+
"renew",
|
|
12195
|
+
"revoke"
|
|
12196
|
+
]);
|
|
12197
|
+
var DevicePlatformSchema = _enum([
|
|
12198
|
+
"ios",
|
|
12199
|
+
"android",
|
|
12200
|
+
"web",
|
|
12201
|
+
"other"
|
|
12202
|
+
]);
|
|
12203
|
+
var Base64UrlSchema = string().min(1).max(4096).regex(/^[A-Za-z0-9_-]+$/);
|
|
12204
|
+
var PemSchema = string().min(1).max(16384);
|
|
12205
|
+
/**
|
|
12206
|
+
* Why a device-certificate endpoint said no. Distinct from a transport / 5xx
|
|
12207
|
+
* failure: those carry no reason and mean "try again", never "the credential is
|
|
12208
|
+
* dead". The viewer switches on this exhaustively.
|
|
12209
|
+
*/
|
|
12210
|
+
var DeviceRefusalReasonSchema = _enum([
|
|
12211
|
+
"revoked",
|
|
12212
|
+
"unknown-credential",
|
|
12213
|
+
"expired",
|
|
12214
|
+
"bad-signature",
|
|
12215
|
+
"nonce-invalid",
|
|
12216
|
+
"rate-limited",
|
|
12217
|
+
"invalid-certificate",
|
|
12218
|
+
"superseded",
|
|
12219
|
+
"user-gone",
|
|
12220
|
+
"unavailable",
|
|
12221
|
+
"code-invalid",
|
|
12222
|
+
"self-enrollment-disabled",
|
|
12223
|
+
"step-up-required",
|
|
12224
|
+
"bad-public-key"
|
|
12225
|
+
]);
|
|
12226
|
+
var DeviceRefusalSchema = object({
|
|
12227
|
+
ok: literal(false),
|
|
12228
|
+
reason: DeviceRefusalReasonSchema,
|
|
12229
|
+
definitive: boolean(),
|
|
12230
|
+
retryAfterSeconds: number().optional()
|
|
12231
|
+
});
|
|
12232
|
+
object({
|
|
12233
|
+
code: string().min(1).max(256),
|
|
12234
|
+
/** SubjectPublicKeyInfo DER of the device's P-256 public key, base64url. */
|
|
12235
|
+
publicKeySpki: Base64UrlSchema,
|
|
12236
|
+
deviceName: string().min(1).max(80).optional(),
|
|
12237
|
+
platform: DevicePlatformSchema
|
|
12238
|
+
});
|
|
12239
|
+
discriminatedUnion("ok", [object({
|
|
12240
|
+
credentialId: string(),
|
|
12241
|
+
certPem: PemSchema,
|
|
12242
|
+
/** The device CA certificate the leaf chains to. */
|
|
12243
|
+
chainPem: PemSchema,
|
|
12244
|
+
notAfter: number(),
|
|
12245
|
+
user: object({
|
|
12246
|
+
id: string(),
|
|
12247
|
+
username: string()
|
|
12248
|
+
})
|
|
12249
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12250
|
+
object({
|
|
12251
|
+
/** The single-use step-up proof (`auth.deviceEnrollProofFrom…`). */
|
|
12252
|
+
proof: string().min(1).max(512),
|
|
12253
|
+
publicKeySpki: Base64UrlSchema,
|
|
12254
|
+
deviceName: string().min(1).max(80),
|
|
12255
|
+
platform: DevicePlatformSchema
|
|
12256
|
+
});
|
|
12257
|
+
object({
|
|
12258
|
+
proof: string(),
|
|
12259
|
+
expiresAt: number()
|
|
12260
|
+
});
|
|
12261
|
+
discriminatedUnion("ok", [object({
|
|
12262
|
+
nonce: string(),
|
|
12263
|
+
/** The origin to put in the signed message. The app compares it to the hub it dialled. */
|
|
12264
|
+
origin: string(),
|
|
12265
|
+
expiresAt: number(),
|
|
12266
|
+
signature: literal(DEVICE_CERT_SIGNATURE)
|
|
12267
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12268
|
+
object({
|
|
12269
|
+
certPem: PemSchema,
|
|
12270
|
+
nonce: string().min(1).max(256),
|
|
12271
|
+
/** ECDSA P-256 SHA-256 over {@link buildDeviceSignatureMessage}; raw r||s or DER, base64url. */
|
|
12272
|
+
signature: Base64UrlSchema
|
|
12273
|
+
});
|
|
12274
|
+
discriminatedUnion("ok", [object({
|
|
12275
|
+
credentialId: string(),
|
|
12276
|
+
certPem: PemSchema,
|
|
12277
|
+
chainPem: PemSchema,
|
|
12278
|
+
notAfter: number()
|
|
12279
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12280
|
+
discriminatedUnion("ok", [object({
|
|
12281
|
+
ok: literal(true),
|
|
12282
|
+
credentialId: string(),
|
|
12283
|
+
sessionsEnded: number().int()
|
|
12284
|
+
}), DeviceRefusalSchema]);
|
|
12285
|
+
var DeviceCredentialStatusSchema = _enum([
|
|
12286
|
+
"active",
|
|
12287
|
+
"expired",
|
|
12288
|
+
"revoked"
|
|
12289
|
+
]);
|
|
12290
|
+
var DeviceCredentialSchema = object({
|
|
12291
|
+
id: string(),
|
|
12292
|
+
userId: string(),
|
|
12293
|
+
username: string().nullable(),
|
|
12294
|
+
deviceName: string(),
|
|
12295
|
+
platform: DevicePlatformSchema,
|
|
12296
|
+
enrolledVia: _enum(["qr", "self"]),
|
|
12297
|
+
/** SHA-256 of the leaf certificate DER, colon-hex. */
|
|
12298
|
+
fingerprint: string(),
|
|
12299
|
+
issuedAt: number(),
|
|
12300
|
+
expiresAt: number(),
|
|
12301
|
+
lastUsedAt: number().nullable(),
|
|
12302
|
+
lastUsedFrom: string().nullable(),
|
|
12303
|
+
revokedAt: number().nullable(),
|
|
12304
|
+
/** `admin:<userId>` | `user:<userId>` | `device` | `user-deleted`. */
|
|
12305
|
+
revokedBy: string().nullable(),
|
|
12306
|
+
status: DeviceCredentialStatusSchema
|
|
12307
|
+
});
|
|
12308
|
+
var StartEnrollmentOutputSchema = object({
|
|
12309
|
+
/** Shown once; only its hash is kept. */
|
|
12310
|
+
code: string(),
|
|
12311
|
+
expiresAt: number(),
|
|
12312
|
+
/** `camstack://enroll?hub=…&code=…` — what the QR encodes. */
|
|
12313
|
+
enrollUrl: string(),
|
|
12314
|
+
/** The hub origin in the link, or `null` when the hub could not name one (the link then has no `hub`). */
|
|
12315
|
+
hubOrigin: string().nullable(),
|
|
12316
|
+
/** Every origin the apps may try (role `appConnections`). */
|
|
12317
|
+
hubOrigins: array(string())
|
|
12318
|
+
});
|
|
12319
|
+
object({
|
|
12320
|
+
kind: literal("device-certificate"),
|
|
12321
|
+
id: literal("device-certificate"),
|
|
12322
|
+
label: string(),
|
|
12323
|
+
stage: literal("primary"),
|
|
12324
|
+
/** tRPC paths under the hub's `auth` router, so a client names no literal. */
|
|
12325
|
+
challengePath: literal("auth.getDeviceChallenge"),
|
|
12326
|
+
revokePath: literal("auth.revokeOwnDeviceCertificate"),
|
|
12327
|
+
enrollSelfPath: literal("auth.enrollSelf"),
|
|
12328
|
+
loginPath: literal("auth.loginWithDeviceCertificate"),
|
|
12329
|
+
renewPath: literal("auth.renewDeviceCertificate"),
|
|
12330
|
+
signature: literal(DEVICE_CERT_SIGNATURE),
|
|
12331
|
+
messageVersion: literal(DEVICE_SIGNATURE_MESSAGE_VERSION),
|
|
12332
|
+
/** Which clients can execute it: a native app silently, a browser with a non-extractable WebCrypto key. */
|
|
12333
|
+
clients: array(_enum(["native", "web"]))
|
|
12334
|
+
});
|
|
12174
12335
|
var ExpressionBindingSourceSchema = union([
|
|
12175
12336
|
object({
|
|
12176
12337
|
kind: literal("field").optional(),
|
|
@@ -15726,6 +15887,338 @@ method(object({
|
|
|
15726
15887
|
kind: "mutation",
|
|
15727
15888
|
auth: "admin"
|
|
15728
15889
|
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
15890
|
+
/**
|
|
15891
|
+
* device-history — the ONE mechanism for numeric history (D850).
|
|
15892
|
+
*
|
|
15893
|
+
* A device value is recorded because its capability says so (the `history`
|
|
15894
|
+
* block of a `*.cap.ts`, captured hub-side from `DeviceStateChanged`); any
|
|
15895
|
+
* other series is DECLARED by the addon that produces it and fed with points
|
|
15896
|
+
* (`record`) or closed five-minute buckets (`recordBuckets`). Rollups 5m / 1h /
|
|
15897
|
+
* 1d are computed here and nowhere else. Storage is `history.db` (D851).
|
|
15898
|
+
*
|
|
15899
|
+
* Who the PRODUCER is: `declareSeries`, `record` and `recordBuckets` are owner
|
|
15900
|
+
* checked against the `callerAddonId` the transport stamps into a call that
|
|
15901
|
+
* crossed a process (never in an input schema, so a session cannot supply it).
|
|
15902
|
+
* A call with no stamp is refused `not-owner`. The methods are `admin` so a
|
|
15903
|
+
* non-admin session never reaches them; an addon's `ctx.api` call bypasses the
|
|
15904
|
+
* tier by design.
|
|
15905
|
+
*/
|
|
15906
|
+
/** Whose history: a real device, or a cluster node (load, memory). */
|
|
15907
|
+
var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
|
|
15908
|
+
kind: literal("device"),
|
|
15909
|
+
deviceId: number().int()
|
|
15910
|
+
}), object({
|
|
15911
|
+
kind: literal("node"),
|
|
15912
|
+
nodeId: string().min(1)
|
|
15913
|
+
})]);
|
|
15914
|
+
var DeviceHistoryKindSchema = _enum([
|
|
15915
|
+
"gauge",
|
|
15916
|
+
"counter",
|
|
15917
|
+
"boolean"
|
|
15918
|
+
]);
|
|
15919
|
+
var DeviceHistoryResolutionSchema = _enum([
|
|
15920
|
+
"raw",
|
|
15921
|
+
"5m",
|
|
15922
|
+
"1h",
|
|
15923
|
+
"1d"
|
|
15924
|
+
]);
|
|
15925
|
+
/** Why a producer's point or bucket was not stored. Counted, never silent (D391). */
|
|
15926
|
+
var DeviceHistoryRefusalReasonSchema = _enum([
|
|
15927
|
+
"undeclared",
|
|
15928
|
+
"not-owner",
|
|
15929
|
+
"opted-out",
|
|
15930
|
+
"not-a-real-device",
|
|
15931
|
+
"rate",
|
|
15932
|
+
"ingest-mismatch",
|
|
15933
|
+
"out-of-range"
|
|
15934
|
+
]);
|
|
15935
|
+
var RefusalSchema = object({
|
|
15936
|
+
key: string(),
|
|
15937
|
+
reason: DeviceHistoryRefusalReasonSchema,
|
|
15938
|
+
count: number().int()
|
|
15939
|
+
});
|
|
15940
|
+
var IngestResultSchema = object({
|
|
15941
|
+
accepted: number().int(),
|
|
15942
|
+
refused: array(RefusalSchema).readonly()
|
|
15943
|
+
});
|
|
15944
|
+
var SeriesInfoSchema = object({
|
|
15945
|
+
key: string(),
|
|
15946
|
+
scope: string(),
|
|
15947
|
+
kind: DeviceHistoryKindSchema,
|
|
15948
|
+
/** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
|
|
15949
|
+
unit: string().nullable(),
|
|
15950
|
+
displayName: string(),
|
|
15951
|
+
source: _enum(["cap", "addon"]),
|
|
15952
|
+
firstTs: number(),
|
|
15953
|
+
lastTs: number()
|
|
15954
|
+
});
|
|
15955
|
+
var QueryPointSchema = object({
|
|
15956
|
+
/** Raw: the point's time. Rollup: the bucket start. */
|
|
15957
|
+
t: number(),
|
|
15958
|
+
samples: number().int(),
|
|
15959
|
+
/** `sum / samples`. */
|
|
15960
|
+
mean: number().nullable(),
|
|
15961
|
+
/** Time-weighted mean (`tw_sum / tw_ms`); `null` for bucket-ingested series. For a boolean: the fraction of time true. */
|
|
15962
|
+
twMean: number().nullable(),
|
|
15963
|
+
min: number(),
|
|
15964
|
+
max: number(),
|
|
15965
|
+
/** `null` is unknown, never zero (D393). */
|
|
15966
|
+
last: number().nullable()
|
|
15967
|
+
});
|
|
15968
|
+
var QuerySeriesSchema = object({
|
|
15969
|
+
scope: string(),
|
|
15970
|
+
/** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
|
|
15971
|
+
before: object({
|
|
15972
|
+
t: number(),
|
|
15973
|
+
value: number().nullable()
|
|
15974
|
+
}).nullable(),
|
|
15975
|
+
points: array(QueryPointSchema).readonly()
|
|
15976
|
+
});
|
|
15977
|
+
/** The window part of a query, shared by the device and node forms. */
|
|
15978
|
+
var QueryWindowShape = {
|
|
15979
|
+
key: string(),
|
|
15980
|
+
scope: string().optional(),
|
|
15981
|
+
from: number(),
|
|
15982
|
+
to: number(),
|
|
15983
|
+
resolution: union([DeviceHistoryResolutionSchema, literal("auto")]).default("auto"),
|
|
15984
|
+
maxPoints: number().int().positive().max(5e3).default(1e3)
|
|
15985
|
+
};
|
|
15986
|
+
var QueryResultSchema = object({
|
|
15987
|
+
resolution: DeviceHistoryResolutionSchema,
|
|
15988
|
+
series: array(QuerySeriesSchema).readonly(),
|
|
15989
|
+
truncated: boolean()
|
|
15990
|
+
});
|
|
15991
|
+
var TierStatusSchema = object({
|
|
15992
|
+
tier: DeviceHistoryResolutionSchema,
|
|
15993
|
+
/** `null` until the first background count answered. */
|
|
15994
|
+
rows: number().int().nullable(),
|
|
15995
|
+
/** `rows` times a fixed per-row estimate — approximate, labelled so. */
|
|
15996
|
+
approxBytes: number().nullable(),
|
|
15997
|
+
countedAt: number().nullable()
|
|
15998
|
+
});
|
|
15999
|
+
/** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
|
|
16000
|
+
var DeviceHistoryStatusSchema = object({
|
|
16001
|
+
startedAt: number(),
|
|
16002
|
+
/** The store is declared, series loaded and the first reconcile has answered. */
|
|
16003
|
+
ready: boolean(),
|
|
16004
|
+
series: number().int(),
|
|
16005
|
+
metrics: number().int(),
|
|
16006
|
+
optedOutDevices: number().int(),
|
|
16007
|
+
tiers: array(TierStatusSchema).readonly(),
|
|
16008
|
+
capture: object({
|
|
16009
|
+
eventsSeen: number().int(),
|
|
16010
|
+
pointsEmitted: number().int(),
|
|
16011
|
+
pointsWritten: number().int(),
|
|
16012
|
+
pointsDropped: number().int(),
|
|
16013
|
+
bufferDepth: number().int(),
|
|
16014
|
+
trailingEmitted: number().int(),
|
|
16015
|
+
reconciledPoints: number().int(),
|
|
16016
|
+
reconcileRuns: number().int(),
|
|
16017
|
+
reconcileFailures: number().int(),
|
|
16018
|
+
lastReconcileAt: number().nullable(),
|
|
16019
|
+
lastFlushAt: number().nullable(),
|
|
16020
|
+
flushFailures: number().int(),
|
|
16021
|
+
skipped: record(string(), number().int())
|
|
16022
|
+
}),
|
|
16023
|
+
ingest: object({
|
|
16024
|
+
accepted: number().int(),
|
|
16025
|
+
refused: record(string(), number().int())
|
|
16026
|
+
}),
|
|
16027
|
+
rollup: object({
|
|
16028
|
+
last5mAt: number().nullable(),
|
|
16029
|
+
last1hAt: number().nullable(),
|
|
16030
|
+
last1dAt: number().nullable(),
|
|
16031
|
+
errors: number().int(),
|
|
16032
|
+
dirty5m: number().int(),
|
|
16033
|
+
dirty1h: number().int(),
|
|
16034
|
+
dirty1d: number().int()
|
|
16035
|
+
}),
|
|
16036
|
+
retention: object({
|
|
16037
|
+
lastRunAt: number().nullable(),
|
|
16038
|
+
deleted: record(string(), number().int()),
|
|
16039
|
+
purgedSeries: number().int()
|
|
16040
|
+
}),
|
|
16041
|
+
directory: object({
|
|
16042
|
+
devices: number().int(),
|
|
16043
|
+
lastRefreshAt: number().nullable()
|
|
16044
|
+
})
|
|
16045
|
+
});
|
|
16046
|
+
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
16047
|
+
deviceId: number().int(),
|
|
16048
|
+
...QueryWindowShape
|
|
16049
|
+
}), QueryResultSchema), method(object({
|
|
16050
|
+
nodeId: string().min(1),
|
|
16051
|
+
...QueryWindowShape
|
|
16052
|
+
}), QueryResultSchema, { auth: "admin" }), method(object({
|
|
16053
|
+
name: string().regex(/^[a-z0-9-]+$/),
|
|
16054
|
+
subjectKind: _enum(["device", "node"]),
|
|
16055
|
+
kind: DeviceHistoryKindSchema,
|
|
16056
|
+
unit: string().optional(),
|
|
16057
|
+
displayName: string().min(1),
|
|
16058
|
+
ingest: _enum(["points", "buckets"])
|
|
16059
|
+
}), object({ key: string() }), {
|
|
16060
|
+
kind: "mutation",
|
|
16061
|
+
auth: "admin"
|
|
16062
|
+
}), method(object({ points: array(object({
|
|
16063
|
+
key: string(),
|
|
16064
|
+
subject: DeviceHistorySubjectSchema,
|
|
16065
|
+
scope: string().default(""),
|
|
16066
|
+
ts: number(),
|
|
16067
|
+
value: number()
|
|
16068
|
+
})).max(5e3) }), IngestResultSchema, {
|
|
16069
|
+
kind: "mutation",
|
|
16070
|
+
auth: "admin"
|
|
16071
|
+
}), method(object({ buckets: array(object({
|
|
16072
|
+
key: string(),
|
|
16073
|
+
subject: DeviceHistorySubjectSchema,
|
|
16074
|
+
scope: string().default(""),
|
|
16075
|
+
bucketStart: number(),
|
|
16076
|
+
samples: number().int().positive(),
|
|
16077
|
+
sum: number(),
|
|
16078
|
+
min: number(),
|
|
16079
|
+
max: number(),
|
|
16080
|
+
last: number().nullable(),
|
|
16081
|
+
lastTs: number().nullable()
|
|
16082
|
+
})).max(5e3) }), IngestResultSchema, {
|
|
16083
|
+
kind: "mutation",
|
|
16084
|
+
auth: "admin"
|
|
16085
|
+
}), method(object({ deviceId: number().int() }), object({ enabled: boolean() })), method(object({
|
|
16086
|
+
deviceId: number().int(),
|
|
16087
|
+
enabled: boolean()
|
|
16088
|
+
}), object({ enabled: boolean() }), {
|
|
16089
|
+
kind: "mutation",
|
|
16090
|
+
auth: "admin"
|
|
16091
|
+
}), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
|
|
16092
|
+
var DeviceCaStatusSchema = discriminatedUnion("state", [
|
|
16093
|
+
object({ state: literal("absent") }),
|
|
16094
|
+
object({
|
|
16095
|
+
state: literal("ready"),
|
|
16096
|
+
subject: string(),
|
|
16097
|
+
fingerprintSha256: string(),
|
|
16098
|
+
validTo: string()
|
|
16099
|
+
}),
|
|
16100
|
+
object({
|
|
16101
|
+
state: literal("unavailable"),
|
|
16102
|
+
reason: string()
|
|
16103
|
+
})
|
|
16104
|
+
]);
|
|
16105
|
+
var DeviceCertificateSettingsSchema = object({ selfEnrollment: _enum(["allowed", "disabled"]) });
|
|
16106
|
+
method(object({
|
|
16107
|
+
userId: string().min(1).optional(),
|
|
16108
|
+
includeRevoked: boolean().default(false)
|
|
16109
|
+
}), array(DeviceCredentialSchema).readonly(), { auth: "admin" }), method(object({
|
|
16110
|
+
userId: string().min(1),
|
|
16111
|
+
deviceName: string().min(1).max(80)
|
|
16112
|
+
}), StartEnrollmentOutputSchema, {
|
|
16113
|
+
kind: "mutation",
|
|
16114
|
+
auth: "admin",
|
|
16115
|
+
caller: "required"
|
|
16116
|
+
}), method(object({ id: string().min(1) }), object({
|
|
16117
|
+
revoked: boolean(),
|
|
16118
|
+
sessionsEnded: number().int(),
|
|
16119
|
+
status: DeviceCredentialStatusSchema
|
|
16120
|
+
}), {
|
|
16121
|
+
kind: "mutation",
|
|
16122
|
+
auth: "admin",
|
|
16123
|
+
caller: "required"
|
|
16124
|
+
}), method(object({}), DeviceCertificateSettingsSchema, { auth: "admin" }), method(DeviceCertificateSettingsSchema, DeviceCertificateSettingsSchema, {
|
|
16125
|
+
kind: "mutation",
|
|
16126
|
+
auth: "admin"
|
|
16127
|
+
}), method(object({ id: string().min(1) }), object({ result: _enum([
|
|
16128
|
+
"deleted",
|
|
16129
|
+
"live",
|
|
16130
|
+
"unknown"
|
|
16131
|
+
]) }), {
|
|
16132
|
+
kind: "mutation",
|
|
16133
|
+
auth: "admin",
|
|
16134
|
+
caller: "required"
|
|
16135
|
+
}), method(object({}), DeviceCaStatusSchema, { auth: "admin" }), method(object({
|
|
16136
|
+
id: string().min(1),
|
|
16137
|
+
deviceName: string().min(1).max(80)
|
|
16138
|
+
}), object({ renamed: boolean() }), {
|
|
16139
|
+
kind: "mutation",
|
|
16140
|
+
auth: "admin"
|
|
16141
|
+
});
|
|
16142
|
+
/**
|
|
16143
|
+
* `node-certificates` - what a node holds and the two renewals the hub drives
|
|
16144
|
+
* (D856): the node's MESH leaf (mutual TLS to the hub) and its HTTPS leaf (issued
|
|
16145
|
+
* from the hub's local CA so a device that trusts the hub root trusts the node).
|
|
16146
|
+
*
|
|
16147
|
+
* Provided by the AGENT RUNTIME (the synthetic `agent-runtime` addon id, like
|
|
16148
|
+
* `server-management`): the hub reaches it through the ordinary node-pinned
|
|
16149
|
+
* capability call - no new Moleculer action. The hub's own certificates are
|
|
16150
|
+
* handled in-process by the hub (`certificates` router), so this cap has no hub
|
|
16151
|
+
* provider.
|
|
16152
|
+
*
|
|
16153
|
+
* No private key ever crosses the mesh: the node generates its key pair, sends a
|
|
16154
|
+
* CSR, and the hub returns only the signed certificate.
|
|
16155
|
+
*/
|
|
16156
|
+
var MeshLeafInfoSchema = object({
|
|
16157
|
+
cn: string(),
|
|
16158
|
+
serial: string(),
|
|
16159
|
+
fingerprintSha256: string(),
|
|
16160
|
+
notBefore: number(),
|
|
16161
|
+
notAfter: number()
|
|
16162
|
+
});
|
|
16163
|
+
var HttpsLeafInfoSchema = object({
|
|
16164
|
+
fingerprintSha256: string(),
|
|
16165
|
+
issuer: string(),
|
|
16166
|
+
sans: array(string()),
|
|
16167
|
+
notBefore: number(),
|
|
16168
|
+
notAfter: number()
|
|
16169
|
+
});
|
|
16170
|
+
var NodeHttpsStateSchema = discriminatedUnion("state", [object({
|
|
16171
|
+
state: literal("served"),
|
|
16172
|
+
leaf: HttpsLeafInfoSchema
|
|
16173
|
+
}), object({
|
|
16174
|
+
state: literal("not-issued"),
|
|
16175
|
+
reason: string()
|
|
16176
|
+
})]);
|
|
16177
|
+
method(object({}), object({
|
|
16178
|
+
nodeId: string(),
|
|
16179
|
+
mesh: MeshLeafInfoSchema.nullable(),
|
|
16180
|
+
https: NodeHttpsStateSchema
|
|
16181
|
+
}), { auth: "admin" }), method(object({}), object({ csrPem: string() }), {
|
|
16182
|
+
kind: "mutation",
|
|
16183
|
+
auth: "admin"
|
|
16184
|
+
}), method(object({
|
|
16185
|
+
certPem: string().min(1),
|
|
16186
|
+
caCertPem: string().min(1),
|
|
16187
|
+
confirmWithinMs: number().int().min(1e4).max(6e5)
|
|
16188
|
+
}), object({
|
|
16189
|
+
fingerprintSha256: string(),
|
|
16190
|
+
serial: string()
|
|
16191
|
+
}), {
|
|
16192
|
+
kind: "mutation",
|
|
16193
|
+
auth: "admin"
|
|
16194
|
+
}), method(object({ fingerprintSha256: string() }), object({ confirmed: boolean() }), {
|
|
16195
|
+
kind: "mutation",
|
|
16196
|
+
auth: "admin"
|
|
16197
|
+
}), method(object({}), object({ rolledBack: boolean() }), {
|
|
16198
|
+
kind: "mutation",
|
|
16199
|
+
auth: "admin"
|
|
16200
|
+
}), method(object({}), object({
|
|
16201
|
+
csrPem: string(),
|
|
16202
|
+
hostnames: array(string()),
|
|
16203
|
+
addresses: array(string()),
|
|
16204
|
+
/** SHA-256 of the hub local CA this node pinned at its first install; `null` before one. */
|
|
16205
|
+
pinnedCaFingerprintSha256: string().nullable()
|
|
16206
|
+
}), {
|
|
16207
|
+
kind: "mutation",
|
|
16208
|
+
auth: "admin"
|
|
16209
|
+
}), method(object({
|
|
16210
|
+
certPem: string().min(1),
|
|
16211
|
+
caCertPem: string().min(1),
|
|
16212
|
+
/**
|
|
16213
|
+
* The hub signals that its local CA was rotated (D227) and this leaf chains to the NEW
|
|
16214
|
+
* one. Only the hub, over the authenticated mesh, can say so; a leaf with a different CA
|
|
16215
|
+
* and no signal is refused.
|
|
16216
|
+
*/
|
|
16217
|
+
caRotation: boolean().optional()
|
|
16218
|
+
}), HttpsLeafInfoSchema, {
|
|
16219
|
+
kind: "mutation",
|
|
16220
|
+
auth: "admin"
|
|
16221
|
+
});
|
|
15729
16222
|
var KeychainKeySourceSchema = object({
|
|
15730
16223
|
kind: _enum([
|
|
15731
16224
|
"config-file",
|
|
@@ -54422,7 +54915,7 @@ var MotionOnMotionChangedDataSchema = object({
|
|
|
54422
54915
|
/** Who started it (D672). Absent = the camera itself. Only `onboard` carries `sensor`. */
|
|
54423
54916
|
triggeredBy: MotionTriggeredBySchema.optional()
|
|
54424
54917
|
});
|
|
54425
|
-
DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean());
|
|
54918
|
+
DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean()), DeviceType.Camera;
|
|
54426
54919
|
object({
|
|
54427
54920
|
enabled: boolean(),
|
|
54428
54921
|
/** Ms epoch of the last operator-driven change. */
|
|
@@ -61629,6 +62122,54 @@ Object.freeze({
|
|
|
61629
62122
|
addonId: null,
|
|
61630
62123
|
access: "create"
|
|
61631
62124
|
},
|
|
62125
|
+
"deviceCredentials.deleteDeviceCredential": {
|
|
62126
|
+
capName: "device-credentials",
|
|
62127
|
+
capScope: "system",
|
|
62128
|
+
addonId: null,
|
|
62129
|
+
access: "delete"
|
|
62130
|
+
},
|
|
62131
|
+
"deviceCredentials.getDeviceCaStatus": {
|
|
62132
|
+
capName: "device-credentials",
|
|
62133
|
+
capScope: "system",
|
|
62134
|
+
addonId: null,
|
|
62135
|
+
access: "view"
|
|
62136
|
+
},
|
|
62137
|
+
"deviceCredentials.getDeviceCertificateSettings": {
|
|
62138
|
+
capName: "device-credentials",
|
|
62139
|
+
capScope: "system",
|
|
62140
|
+
addonId: null,
|
|
62141
|
+
access: "view"
|
|
62142
|
+
},
|
|
62143
|
+
"deviceCredentials.listDeviceCredentials": {
|
|
62144
|
+
capName: "device-credentials",
|
|
62145
|
+
capScope: "system",
|
|
62146
|
+
addonId: null,
|
|
62147
|
+
access: "view"
|
|
62148
|
+
},
|
|
62149
|
+
"deviceCredentials.renameDeviceCredential": {
|
|
62150
|
+
capName: "device-credentials",
|
|
62151
|
+
capScope: "system",
|
|
62152
|
+
addonId: null,
|
|
62153
|
+
access: "create"
|
|
62154
|
+
},
|
|
62155
|
+
"deviceCredentials.revokeDeviceCredential": {
|
|
62156
|
+
capName: "device-credentials",
|
|
62157
|
+
capScope: "system",
|
|
62158
|
+
addonId: null,
|
|
62159
|
+
access: "delete"
|
|
62160
|
+
},
|
|
62161
|
+
"deviceCredentials.setDeviceCertificateSettings": {
|
|
62162
|
+
capName: "device-credentials",
|
|
62163
|
+
capScope: "system",
|
|
62164
|
+
addonId: null,
|
|
62165
|
+
access: "create"
|
|
62166
|
+
},
|
|
62167
|
+
"deviceCredentials.startEnrollment": {
|
|
62168
|
+
capName: "device-credentials",
|
|
62169
|
+
capScope: "system",
|
|
62170
|
+
addonId: null,
|
|
62171
|
+
access: "create"
|
|
62172
|
+
},
|
|
61632
62173
|
"deviceDiscovery.adoptDevice": {
|
|
61633
62174
|
capName: "device-discovery",
|
|
61634
62175
|
capScope: "device",
|
|
@@ -61731,6 +62272,66 @@ Object.freeze({
|
|
|
61731
62272
|
addonId: null,
|
|
61732
62273
|
access: "create"
|
|
61733
62274
|
},
|
|
62275
|
+
"deviceHistory.declareSeries": {
|
|
62276
|
+
capName: "device-history",
|
|
62277
|
+
capScope: "system",
|
|
62278
|
+
addonId: null,
|
|
62279
|
+
access: "create"
|
|
62280
|
+
},
|
|
62281
|
+
"deviceHistory.getDeviceEnabled": {
|
|
62282
|
+
capName: "device-history",
|
|
62283
|
+
capScope: "system",
|
|
62284
|
+
addonId: null,
|
|
62285
|
+
access: "view"
|
|
62286
|
+
},
|
|
62287
|
+
"deviceHistory.getStatus": {
|
|
62288
|
+
capName: "device-history",
|
|
62289
|
+
capScope: "system",
|
|
62290
|
+
addonId: null,
|
|
62291
|
+
access: "view"
|
|
62292
|
+
},
|
|
62293
|
+
"deviceHistory.listNodeSeries": {
|
|
62294
|
+
capName: "device-history",
|
|
62295
|
+
capScope: "system",
|
|
62296
|
+
addonId: null,
|
|
62297
|
+
access: "view"
|
|
62298
|
+
},
|
|
62299
|
+
"deviceHistory.listSeries": {
|
|
62300
|
+
capName: "device-history",
|
|
62301
|
+
capScope: "system",
|
|
62302
|
+
addonId: null,
|
|
62303
|
+
access: "view"
|
|
62304
|
+
},
|
|
62305
|
+
"deviceHistory.query": {
|
|
62306
|
+
capName: "device-history",
|
|
62307
|
+
capScope: "system",
|
|
62308
|
+
addonId: null,
|
|
62309
|
+
access: "view"
|
|
62310
|
+
},
|
|
62311
|
+
"deviceHistory.queryNode": {
|
|
62312
|
+
capName: "device-history",
|
|
62313
|
+
capScope: "system",
|
|
62314
|
+
addonId: null,
|
|
62315
|
+
access: "view"
|
|
62316
|
+
},
|
|
62317
|
+
"deviceHistory.record": {
|
|
62318
|
+
capName: "device-history",
|
|
62319
|
+
capScope: "system",
|
|
62320
|
+
addonId: null,
|
|
62321
|
+
access: "create"
|
|
62322
|
+
},
|
|
62323
|
+
"deviceHistory.recordBuckets": {
|
|
62324
|
+
capName: "device-history",
|
|
62325
|
+
capScope: "system",
|
|
62326
|
+
addonId: null,
|
|
62327
|
+
access: "create"
|
|
62328
|
+
},
|
|
62329
|
+
"deviceHistory.setDeviceEnabled": {
|
|
62330
|
+
capName: "device-history",
|
|
62331
|
+
capScope: "system",
|
|
62332
|
+
addonId: null,
|
|
62333
|
+
access: "create"
|
|
62334
|
+
},
|
|
61734
62335
|
"deviceManager.addLocation": {
|
|
61735
62336
|
capName: "device-manager",
|
|
61736
62337
|
capScope: "system",
|
|
@@ -63789,6 +64390,48 @@ Object.freeze({
|
|
|
63789
64390
|
addonId: null,
|
|
63790
64391
|
access: "create"
|
|
63791
64392
|
},
|
|
64393
|
+
"nodeCertificates.confirmMeshLeaf": {
|
|
64394
|
+
capName: "node-certificates",
|
|
64395
|
+
capScope: "system",
|
|
64396
|
+
addonId: null,
|
|
64397
|
+
access: "create"
|
|
64398
|
+
},
|
|
64399
|
+
"nodeCertificates.getCertificates": {
|
|
64400
|
+
capName: "node-certificates",
|
|
64401
|
+
capScope: "system",
|
|
64402
|
+
addonId: null,
|
|
64403
|
+
access: "view"
|
|
64404
|
+
},
|
|
64405
|
+
"nodeCertificates.installHttpsCertificate": {
|
|
64406
|
+
capName: "node-certificates",
|
|
64407
|
+
capScope: "system",
|
|
64408
|
+
addonId: null,
|
|
64409
|
+
access: "create"
|
|
64410
|
+
},
|
|
64411
|
+
"nodeCertificates.installMeshLeaf": {
|
|
64412
|
+
capName: "node-certificates",
|
|
64413
|
+
capScope: "system",
|
|
64414
|
+
addonId: null,
|
|
64415
|
+
access: "create"
|
|
64416
|
+
},
|
|
64417
|
+
"nodeCertificates.prepareHttpsCertificate": {
|
|
64418
|
+
capName: "node-certificates",
|
|
64419
|
+
capScope: "system",
|
|
64420
|
+
addonId: null,
|
|
64421
|
+
access: "create"
|
|
64422
|
+
},
|
|
64423
|
+
"nodeCertificates.prepareMeshRenewal": {
|
|
64424
|
+
capName: "node-certificates",
|
|
64425
|
+
capScope: "system",
|
|
64426
|
+
addonId: null,
|
|
64427
|
+
access: "create"
|
|
64428
|
+
},
|
|
64429
|
+
"nodeCertificates.rollbackMeshLeaf": {
|
|
64430
|
+
capName: "node-certificates",
|
|
64431
|
+
capScope: "system",
|
|
64432
|
+
addonId: null,
|
|
64433
|
+
access: "create"
|
|
64434
|
+
},
|
|
63792
64435
|
"nodes.clusterAddonStatus": {
|
|
63793
64436
|
capName: "nodes",
|
|
63794
64437
|
capScope: "system",
|
|
@@ -68480,6 +69123,26 @@ Object.freeze({
|
|
|
68480
69123
|
form: "single",
|
|
68481
69124
|
optional: false
|
|
68482
69125
|
}],
|
|
69126
|
+
"deviceHistory.getDeviceEnabled": [{
|
|
69127
|
+
name: "deviceId",
|
|
69128
|
+
form: "single",
|
|
69129
|
+
optional: false
|
|
69130
|
+
}],
|
|
69131
|
+
"deviceHistory.listSeries": [{
|
|
69132
|
+
name: "deviceId",
|
|
69133
|
+
form: "single",
|
|
69134
|
+
optional: false
|
|
69135
|
+
}],
|
|
69136
|
+
"deviceHistory.query": [{
|
|
69137
|
+
name: "deviceId",
|
|
69138
|
+
form: "single",
|
|
69139
|
+
optional: false
|
|
69140
|
+
}],
|
|
69141
|
+
"deviceHistory.setDeviceEnabled": [{
|
|
69142
|
+
name: "deviceId",
|
|
69143
|
+
form: "single",
|
|
69144
|
+
optional: false
|
|
69145
|
+
}],
|
|
68483
69146
|
"deviceManager.adoptionRelease": [{
|
|
68484
69147
|
name: "camDeviceId",
|
|
68485
69148
|
form: "single",
|
|
@@ -70658,6 +71321,7 @@ Object.freeze({
|
|
|
70658
71321
|
"network-access": "ingress",
|
|
70659
71322
|
"smtp-provider": "email"
|
|
70660
71323
|
});
|
|
71324
|
+
DeviceType.Camera;
|
|
70661
71325
|
var G711_SCALE_CORRECTION_DB = {
|
|
70662
71326
|
PCMU: 20 * Math.log10(4),
|
|
70663
71327
|
PCMA: 20 * Math.log10(8)
|
|
@@ -71744,7 +72408,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
71744
72408
|
capability: adminUiCapability,
|
|
71745
72409
|
provider: {
|
|
71746
72410
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
71747
|
-
getVersion: async () => ({ version: "1.2.
|
|
72411
|
+
getVersion: async () => ({ version: "1.2.232" })
|
|
71748
72412
|
}
|
|
71749
72413
|
}];
|
|
71750
72414
|
}
|