@camstack/addon-training 0.1.42 → 0.1.44
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/{MotionZonesSettings-DZgoN8V_.mjs → MotionZonesSettings-saYfTUU5.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-7L2OX3dp.mjs → PrivacyMaskSettings-BjnoSHst.mjs} +2 -2
- package/dist/{SceneMonitorEditor-CwULmLkP.mjs → SceneMonitorEditor-DAfRhSCc.mjs} +1 -1
- package/dist/_stub.js +9 -9
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-DzsEYUgl.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-DXco-2WZ.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CPqE02WC.mjs +26 -0
- package/dist/{dist-wRpOWEq6.js → dist-D9rjOUX_.js} +666 -2
- package/dist/{dist-BtEl1kYQ.mjs → dist-DHAuY3ER.mjs} +666 -2
- package/dist/{hostInit-1OJB0wPE.mjs → hostInit-BIzo7aZA.mjs} +2 -2
- package/dist/index.js +1 -1
- package/dist/orchestrator/training.addon.js +1 -1
- package/dist/orchestrator/training.addon.mjs +1 -1
- package/dist/{player-overlays-CqD89xkd.mjs → player-overlays-BQSrUXGa.mjs} +1 -1
- package/dist/providers/modal/training-modal.addon.js +1 -1
- package/dist/providers/modal/training-modal.addon.mjs +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-Dwyuxd3q.mjs → responsive-K96jK17Q.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-D0zbWJUR.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-Cs46EdPN.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-LhaXEy4l.mjs +0 -26
|
@@ -5420,7 +5420,7 @@ var ZodIssueCode = {
|
|
|
5420
5420
|
var ZodFirstPartyTypeKind;
|
|
5421
5421
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5422
5422
|
//#endregion
|
|
5423
|
-
//#region ../types/dist/sleep-
|
|
5423
|
+
//#region ../types/dist/sleep--g-h2_c_.mjs
|
|
5424
5424
|
/**
|
|
5425
5425
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5426
5426
|
* window to float samples (D455).
|
|
@@ -12203,6 +12203,167 @@ var ConvertResultSchema = object({
|
|
|
12203
12203
|
files: array(string()).readonly()
|
|
12204
12204
|
})).readonly()
|
|
12205
12205
|
});
|
|
12206
|
+
/**
|
|
12207
|
+
* Device certificates (D855) — the wire contract shared by the hub, the admin
|
|
12208
|
+
* UI and the native viewer.
|
|
12209
|
+
*
|
|
12210
|
+
* A device (a phone) generates its OWN P-256 key pair in hardware (Secure
|
|
12211
|
+
* Enclave / Android Keystore / a non-extractable WebCrypto key). The private
|
|
12212
|
+
* key never travels. The hub signs the PUBLIC key into an X.509 leaf under a
|
|
12213
|
+
* dedicated device CA; the device later proves possession of the key by
|
|
12214
|
+
* signing a hub-issued nonce, and the hub answers with the same session a
|
|
12215
|
+
* password login opens.
|
|
12216
|
+
*
|
|
12217
|
+
* Everything on the wire is a small string (a PEM, a base64url signature):
|
|
12218
|
+
* D613 is about bulk bytes, and a certificate is ~600 bytes.
|
|
12219
|
+
*/
|
|
12220
|
+
/** Signature algorithm of every device credential: ECDSA, curve P-256, SHA-256. */
|
|
12221
|
+
var DEVICE_CERT_SIGNATURE = "ecdsa-p256-sha256";
|
|
12222
|
+
/** First line of every signed message; a change of format bumps the version. */
|
|
12223
|
+
var DEVICE_SIGNATURE_MESSAGE_VERSION = "camstack-device-cert-v1";
|
|
12224
|
+
_enum([
|
|
12225
|
+
"login",
|
|
12226
|
+
"renew",
|
|
12227
|
+
"revoke"
|
|
12228
|
+
]);
|
|
12229
|
+
var DevicePlatformSchema = _enum([
|
|
12230
|
+
"ios",
|
|
12231
|
+
"android",
|
|
12232
|
+
"web",
|
|
12233
|
+
"other"
|
|
12234
|
+
]);
|
|
12235
|
+
var Base64UrlSchema = string().min(1).max(4096).regex(/^[A-Za-z0-9_-]+$/);
|
|
12236
|
+
var PemSchema = string().min(1).max(16384);
|
|
12237
|
+
/**
|
|
12238
|
+
* Why a device-certificate endpoint said no. Distinct from a transport / 5xx
|
|
12239
|
+
* failure: those carry no reason and mean "try again", never "the credential is
|
|
12240
|
+
* dead". The viewer switches on this exhaustively.
|
|
12241
|
+
*/
|
|
12242
|
+
var DeviceRefusalReasonSchema = _enum([
|
|
12243
|
+
"revoked",
|
|
12244
|
+
"unknown-credential",
|
|
12245
|
+
"expired",
|
|
12246
|
+
"bad-signature",
|
|
12247
|
+
"nonce-invalid",
|
|
12248
|
+
"rate-limited",
|
|
12249
|
+
"invalid-certificate",
|
|
12250
|
+
"superseded",
|
|
12251
|
+
"user-gone",
|
|
12252
|
+
"unavailable",
|
|
12253
|
+
"code-invalid",
|
|
12254
|
+
"self-enrollment-disabled",
|
|
12255
|
+
"step-up-required",
|
|
12256
|
+
"bad-public-key"
|
|
12257
|
+
]);
|
|
12258
|
+
var DeviceRefusalSchema = object({
|
|
12259
|
+
ok: literal(false),
|
|
12260
|
+
reason: DeviceRefusalReasonSchema,
|
|
12261
|
+
definitive: boolean(),
|
|
12262
|
+
retryAfterSeconds: number().optional()
|
|
12263
|
+
});
|
|
12264
|
+
object({
|
|
12265
|
+
code: string().min(1).max(256),
|
|
12266
|
+
/** SubjectPublicKeyInfo DER of the device's P-256 public key, base64url. */
|
|
12267
|
+
publicKeySpki: Base64UrlSchema,
|
|
12268
|
+
deviceName: string().min(1).max(80).optional(),
|
|
12269
|
+
platform: DevicePlatformSchema
|
|
12270
|
+
});
|
|
12271
|
+
discriminatedUnion("ok", [object({
|
|
12272
|
+
credentialId: string(),
|
|
12273
|
+
certPem: PemSchema,
|
|
12274
|
+
/** The device CA certificate the leaf chains to. */
|
|
12275
|
+
chainPem: PemSchema,
|
|
12276
|
+
notAfter: number(),
|
|
12277
|
+
user: object({
|
|
12278
|
+
id: string(),
|
|
12279
|
+
username: string()
|
|
12280
|
+
})
|
|
12281
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12282
|
+
object({
|
|
12283
|
+
/** The single-use step-up proof (`auth.deviceEnrollProofFrom…`). */
|
|
12284
|
+
proof: string().min(1).max(512),
|
|
12285
|
+
publicKeySpki: Base64UrlSchema,
|
|
12286
|
+
deviceName: string().min(1).max(80),
|
|
12287
|
+
platform: DevicePlatformSchema
|
|
12288
|
+
});
|
|
12289
|
+
object({
|
|
12290
|
+
proof: string(),
|
|
12291
|
+
expiresAt: number()
|
|
12292
|
+
});
|
|
12293
|
+
discriminatedUnion("ok", [object({
|
|
12294
|
+
nonce: string(),
|
|
12295
|
+
/** The origin to put in the signed message. The app compares it to the hub it dialled. */
|
|
12296
|
+
origin: string(),
|
|
12297
|
+
expiresAt: number(),
|
|
12298
|
+
signature: literal(DEVICE_CERT_SIGNATURE)
|
|
12299
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12300
|
+
object({
|
|
12301
|
+
certPem: PemSchema,
|
|
12302
|
+
nonce: string().min(1).max(256),
|
|
12303
|
+
/** ECDSA P-256 SHA-256 over {@link buildDeviceSignatureMessage}; raw r||s or DER, base64url. */
|
|
12304
|
+
signature: Base64UrlSchema
|
|
12305
|
+
});
|
|
12306
|
+
discriminatedUnion("ok", [object({
|
|
12307
|
+
credentialId: string(),
|
|
12308
|
+
certPem: PemSchema,
|
|
12309
|
+
chainPem: PemSchema,
|
|
12310
|
+
notAfter: number()
|
|
12311
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12312
|
+
discriminatedUnion("ok", [object({
|
|
12313
|
+
ok: literal(true),
|
|
12314
|
+
credentialId: string(),
|
|
12315
|
+
sessionsEnded: number().int()
|
|
12316
|
+
}), DeviceRefusalSchema]);
|
|
12317
|
+
var DeviceCredentialStatusSchema = _enum([
|
|
12318
|
+
"active",
|
|
12319
|
+
"expired",
|
|
12320
|
+
"revoked"
|
|
12321
|
+
]);
|
|
12322
|
+
var DeviceCredentialSchema = object({
|
|
12323
|
+
id: string(),
|
|
12324
|
+
userId: string(),
|
|
12325
|
+
username: string().nullable(),
|
|
12326
|
+
deviceName: string(),
|
|
12327
|
+
platform: DevicePlatformSchema,
|
|
12328
|
+
enrolledVia: _enum(["qr", "self"]),
|
|
12329
|
+
/** SHA-256 of the leaf certificate DER, colon-hex. */
|
|
12330
|
+
fingerprint: string(),
|
|
12331
|
+
issuedAt: number(),
|
|
12332
|
+
expiresAt: number(),
|
|
12333
|
+
lastUsedAt: number().nullable(),
|
|
12334
|
+
lastUsedFrom: string().nullable(),
|
|
12335
|
+
revokedAt: number().nullable(),
|
|
12336
|
+
/** `admin:<userId>` | `user:<userId>` | `device` | `user-deleted`. */
|
|
12337
|
+
revokedBy: string().nullable(),
|
|
12338
|
+
status: DeviceCredentialStatusSchema
|
|
12339
|
+
});
|
|
12340
|
+
var StartEnrollmentOutputSchema = object({
|
|
12341
|
+
/** Shown once; only its hash is kept. */
|
|
12342
|
+
code: string(),
|
|
12343
|
+
expiresAt: number(),
|
|
12344
|
+
/** `camstack://enroll?hub=…&code=…` — what the QR encodes. */
|
|
12345
|
+
enrollUrl: string(),
|
|
12346
|
+
/** The hub origin in the link, or `null` when the hub could not name one (the link then has no `hub`). */
|
|
12347
|
+
hubOrigin: string().nullable(),
|
|
12348
|
+
/** Every origin the apps may try (role `appConnections`). */
|
|
12349
|
+
hubOrigins: array(string())
|
|
12350
|
+
});
|
|
12351
|
+
object({
|
|
12352
|
+
kind: literal("device-certificate"),
|
|
12353
|
+
id: literal("device-certificate"),
|
|
12354
|
+
label: string(),
|
|
12355
|
+
stage: literal("primary"),
|
|
12356
|
+
/** tRPC paths under the hub's `auth` router, so a client names no literal. */
|
|
12357
|
+
challengePath: literal("auth.getDeviceChallenge"),
|
|
12358
|
+
revokePath: literal("auth.revokeOwnDeviceCertificate"),
|
|
12359
|
+
enrollSelfPath: literal("auth.enrollSelf"),
|
|
12360
|
+
loginPath: literal("auth.loginWithDeviceCertificate"),
|
|
12361
|
+
renewPath: literal("auth.renewDeviceCertificate"),
|
|
12362
|
+
signature: literal(DEVICE_CERT_SIGNATURE),
|
|
12363
|
+
messageVersion: literal(DEVICE_SIGNATURE_MESSAGE_VERSION),
|
|
12364
|
+
/** Which clients can execute it: a native app silently, a browser with a non-extractable WebCrypto key. */
|
|
12365
|
+
clients: array(_enum(["native", "web"]))
|
|
12366
|
+
});
|
|
12206
12367
|
var ExpressionBindingSourceSchema = union([
|
|
12207
12368
|
object({
|
|
12208
12369
|
kind: literal("field").optional(),
|
|
@@ -15775,6 +15936,338 @@ method(object({
|
|
|
15775
15936
|
kind: "mutation",
|
|
15776
15937
|
auth: "admin"
|
|
15777
15938
|
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
15939
|
+
/**
|
|
15940
|
+
* device-history — the ONE mechanism for numeric history (D850).
|
|
15941
|
+
*
|
|
15942
|
+
* A device value is recorded because its capability says so (the `history`
|
|
15943
|
+
* block of a `*.cap.ts`, captured hub-side from `DeviceStateChanged`); any
|
|
15944
|
+
* other series is DECLARED by the addon that produces it and fed with points
|
|
15945
|
+
* (`record`) or closed five-minute buckets (`recordBuckets`). Rollups 5m / 1h /
|
|
15946
|
+
* 1d are computed here and nowhere else. Storage is `history.db` (D851).
|
|
15947
|
+
*
|
|
15948
|
+
* Who the PRODUCER is: `declareSeries`, `record` and `recordBuckets` are owner
|
|
15949
|
+
* checked against the `callerAddonId` the transport stamps into a call that
|
|
15950
|
+
* crossed a process (never in an input schema, so a session cannot supply it).
|
|
15951
|
+
* A call with no stamp is refused `not-owner`. The methods are `admin` so a
|
|
15952
|
+
* non-admin session never reaches them; an addon's `ctx.api` call bypasses the
|
|
15953
|
+
* tier by design.
|
|
15954
|
+
*/
|
|
15955
|
+
/** Whose history: a real device, or a cluster node (load, memory). */
|
|
15956
|
+
var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
|
|
15957
|
+
kind: literal("device"),
|
|
15958
|
+
deviceId: number().int()
|
|
15959
|
+
}), object({
|
|
15960
|
+
kind: literal("node"),
|
|
15961
|
+
nodeId: string().min(1)
|
|
15962
|
+
})]);
|
|
15963
|
+
var DeviceHistoryKindSchema = _enum([
|
|
15964
|
+
"gauge",
|
|
15965
|
+
"counter",
|
|
15966
|
+
"boolean"
|
|
15967
|
+
]);
|
|
15968
|
+
var DeviceHistoryResolutionSchema = _enum([
|
|
15969
|
+
"raw",
|
|
15970
|
+
"5m",
|
|
15971
|
+
"1h",
|
|
15972
|
+
"1d"
|
|
15973
|
+
]);
|
|
15974
|
+
/** Why a producer's point or bucket was not stored. Counted, never silent (D391). */
|
|
15975
|
+
var DeviceHistoryRefusalReasonSchema = _enum([
|
|
15976
|
+
"undeclared",
|
|
15977
|
+
"not-owner",
|
|
15978
|
+
"opted-out",
|
|
15979
|
+
"not-a-real-device",
|
|
15980
|
+
"rate",
|
|
15981
|
+
"ingest-mismatch",
|
|
15982
|
+
"out-of-range"
|
|
15983
|
+
]);
|
|
15984
|
+
var RefusalSchema = object({
|
|
15985
|
+
key: string(),
|
|
15986
|
+
reason: DeviceHistoryRefusalReasonSchema,
|
|
15987
|
+
count: number().int()
|
|
15988
|
+
});
|
|
15989
|
+
var IngestResultSchema = object({
|
|
15990
|
+
accepted: number().int(),
|
|
15991
|
+
refused: array(RefusalSchema).readonly()
|
|
15992
|
+
});
|
|
15993
|
+
var SeriesInfoSchema = object({
|
|
15994
|
+
key: string(),
|
|
15995
|
+
scope: string(),
|
|
15996
|
+
kind: DeviceHistoryKindSchema,
|
|
15997
|
+
/** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
|
|
15998
|
+
unit: string().nullable(),
|
|
15999
|
+
displayName: string(),
|
|
16000
|
+
source: _enum(["cap", "addon"]),
|
|
16001
|
+
firstTs: number(),
|
|
16002
|
+
lastTs: number()
|
|
16003
|
+
});
|
|
16004
|
+
var QueryPointSchema = object({
|
|
16005
|
+
/** Raw: the point's time. Rollup: the bucket start. */
|
|
16006
|
+
t: number(),
|
|
16007
|
+
samples: number().int(),
|
|
16008
|
+
/** `sum / samples`. */
|
|
16009
|
+
mean: number().nullable(),
|
|
16010
|
+
/** Time-weighted mean (`tw_sum / tw_ms`); `null` for bucket-ingested series. For a boolean: the fraction of time true. */
|
|
16011
|
+
twMean: number().nullable(),
|
|
16012
|
+
min: number(),
|
|
16013
|
+
max: number(),
|
|
16014
|
+
/** `null` is unknown, never zero (D393). */
|
|
16015
|
+
last: number().nullable()
|
|
16016
|
+
});
|
|
16017
|
+
var QuerySeriesSchema = object({
|
|
16018
|
+
scope: string(),
|
|
16019
|
+
/** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
|
|
16020
|
+
before: object({
|
|
16021
|
+
t: number(),
|
|
16022
|
+
value: number().nullable()
|
|
16023
|
+
}).nullable(),
|
|
16024
|
+
points: array(QueryPointSchema).readonly()
|
|
16025
|
+
});
|
|
16026
|
+
/** The window part of a query, shared by the device and node forms. */
|
|
16027
|
+
var QueryWindowShape = {
|
|
16028
|
+
key: string(),
|
|
16029
|
+
scope: string().optional(),
|
|
16030
|
+
from: number(),
|
|
16031
|
+
to: number(),
|
|
16032
|
+
resolution: union([DeviceHistoryResolutionSchema, literal("auto")]).default("auto"),
|
|
16033
|
+
maxPoints: number().int().positive().max(5e3).default(1e3)
|
|
16034
|
+
};
|
|
16035
|
+
var QueryResultSchema = object({
|
|
16036
|
+
resolution: DeviceHistoryResolutionSchema,
|
|
16037
|
+
series: array(QuerySeriesSchema).readonly(),
|
|
16038
|
+
truncated: boolean()
|
|
16039
|
+
});
|
|
16040
|
+
var TierStatusSchema = object({
|
|
16041
|
+
tier: DeviceHistoryResolutionSchema,
|
|
16042
|
+
/** `null` until the first background count answered. */
|
|
16043
|
+
rows: number().int().nullable(),
|
|
16044
|
+
/** `rows` times a fixed per-row estimate — approximate, labelled so. */
|
|
16045
|
+
approxBytes: number().nullable(),
|
|
16046
|
+
countedAt: number().nullable()
|
|
16047
|
+
});
|
|
16048
|
+
/** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
|
|
16049
|
+
var DeviceHistoryStatusSchema = object({
|
|
16050
|
+
startedAt: number(),
|
|
16051
|
+
/** The store is declared, series loaded and the first reconcile has answered. */
|
|
16052
|
+
ready: boolean(),
|
|
16053
|
+
series: number().int(),
|
|
16054
|
+
metrics: number().int(),
|
|
16055
|
+
optedOutDevices: number().int(),
|
|
16056
|
+
tiers: array(TierStatusSchema).readonly(),
|
|
16057
|
+
capture: object({
|
|
16058
|
+
eventsSeen: number().int(),
|
|
16059
|
+
pointsEmitted: number().int(),
|
|
16060
|
+
pointsWritten: number().int(),
|
|
16061
|
+
pointsDropped: number().int(),
|
|
16062
|
+
bufferDepth: number().int(),
|
|
16063
|
+
trailingEmitted: number().int(),
|
|
16064
|
+
reconciledPoints: number().int(),
|
|
16065
|
+
reconcileRuns: number().int(),
|
|
16066
|
+
reconcileFailures: number().int(),
|
|
16067
|
+
lastReconcileAt: number().nullable(),
|
|
16068
|
+
lastFlushAt: number().nullable(),
|
|
16069
|
+
flushFailures: number().int(),
|
|
16070
|
+
skipped: record(string(), number().int())
|
|
16071
|
+
}),
|
|
16072
|
+
ingest: object({
|
|
16073
|
+
accepted: number().int(),
|
|
16074
|
+
refused: record(string(), number().int())
|
|
16075
|
+
}),
|
|
16076
|
+
rollup: object({
|
|
16077
|
+
last5mAt: number().nullable(),
|
|
16078
|
+
last1hAt: number().nullable(),
|
|
16079
|
+
last1dAt: number().nullable(),
|
|
16080
|
+
errors: number().int(),
|
|
16081
|
+
dirty5m: number().int(),
|
|
16082
|
+
dirty1h: number().int(),
|
|
16083
|
+
dirty1d: number().int()
|
|
16084
|
+
}),
|
|
16085
|
+
retention: object({
|
|
16086
|
+
lastRunAt: number().nullable(),
|
|
16087
|
+
deleted: record(string(), number().int()),
|
|
16088
|
+
purgedSeries: number().int()
|
|
16089
|
+
}),
|
|
16090
|
+
directory: object({
|
|
16091
|
+
devices: number().int(),
|
|
16092
|
+
lastRefreshAt: number().nullable()
|
|
16093
|
+
})
|
|
16094
|
+
});
|
|
16095
|
+
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
16096
|
+
deviceId: number().int(),
|
|
16097
|
+
...QueryWindowShape
|
|
16098
|
+
}), QueryResultSchema), method(object({
|
|
16099
|
+
nodeId: string().min(1),
|
|
16100
|
+
...QueryWindowShape
|
|
16101
|
+
}), QueryResultSchema, { auth: "admin" }), method(object({
|
|
16102
|
+
name: string().regex(/^[a-z0-9-]+$/),
|
|
16103
|
+
subjectKind: _enum(["device", "node"]),
|
|
16104
|
+
kind: DeviceHistoryKindSchema,
|
|
16105
|
+
unit: string().optional(),
|
|
16106
|
+
displayName: string().min(1),
|
|
16107
|
+
ingest: _enum(["points", "buckets"])
|
|
16108
|
+
}), object({ key: string() }), {
|
|
16109
|
+
kind: "mutation",
|
|
16110
|
+
auth: "admin"
|
|
16111
|
+
}), method(object({ points: array(object({
|
|
16112
|
+
key: string(),
|
|
16113
|
+
subject: DeviceHistorySubjectSchema,
|
|
16114
|
+
scope: string().default(""),
|
|
16115
|
+
ts: number(),
|
|
16116
|
+
value: number()
|
|
16117
|
+
})).max(5e3) }), IngestResultSchema, {
|
|
16118
|
+
kind: "mutation",
|
|
16119
|
+
auth: "admin"
|
|
16120
|
+
}), method(object({ buckets: array(object({
|
|
16121
|
+
key: string(),
|
|
16122
|
+
subject: DeviceHistorySubjectSchema,
|
|
16123
|
+
scope: string().default(""),
|
|
16124
|
+
bucketStart: number(),
|
|
16125
|
+
samples: number().int().positive(),
|
|
16126
|
+
sum: number(),
|
|
16127
|
+
min: number(),
|
|
16128
|
+
max: number(),
|
|
16129
|
+
last: number().nullable(),
|
|
16130
|
+
lastTs: number().nullable()
|
|
16131
|
+
})).max(5e3) }), IngestResultSchema, {
|
|
16132
|
+
kind: "mutation",
|
|
16133
|
+
auth: "admin"
|
|
16134
|
+
}), method(object({ deviceId: number().int() }), object({ enabled: boolean() })), method(object({
|
|
16135
|
+
deviceId: number().int(),
|
|
16136
|
+
enabled: boolean()
|
|
16137
|
+
}), object({ enabled: boolean() }), {
|
|
16138
|
+
kind: "mutation",
|
|
16139
|
+
auth: "admin"
|
|
16140
|
+
}), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
|
|
16141
|
+
var DeviceCaStatusSchema = discriminatedUnion("state", [
|
|
16142
|
+
object({ state: literal("absent") }),
|
|
16143
|
+
object({
|
|
16144
|
+
state: literal("ready"),
|
|
16145
|
+
subject: string(),
|
|
16146
|
+
fingerprintSha256: string(),
|
|
16147
|
+
validTo: string()
|
|
16148
|
+
}),
|
|
16149
|
+
object({
|
|
16150
|
+
state: literal("unavailable"),
|
|
16151
|
+
reason: string()
|
|
16152
|
+
})
|
|
16153
|
+
]);
|
|
16154
|
+
var DeviceCertificateSettingsSchema = object({ selfEnrollment: _enum(["allowed", "disabled"]) });
|
|
16155
|
+
method(object({
|
|
16156
|
+
userId: string().min(1).optional(),
|
|
16157
|
+
includeRevoked: boolean().default(false)
|
|
16158
|
+
}), array(DeviceCredentialSchema).readonly(), { auth: "admin" }), method(object({
|
|
16159
|
+
userId: string().min(1),
|
|
16160
|
+
deviceName: string().min(1).max(80)
|
|
16161
|
+
}), StartEnrollmentOutputSchema, {
|
|
16162
|
+
kind: "mutation",
|
|
16163
|
+
auth: "admin",
|
|
16164
|
+
caller: "required"
|
|
16165
|
+
}), method(object({ id: string().min(1) }), object({
|
|
16166
|
+
revoked: boolean(),
|
|
16167
|
+
sessionsEnded: number().int(),
|
|
16168
|
+
status: DeviceCredentialStatusSchema
|
|
16169
|
+
}), {
|
|
16170
|
+
kind: "mutation",
|
|
16171
|
+
auth: "admin",
|
|
16172
|
+
caller: "required"
|
|
16173
|
+
}), method(object({}), DeviceCertificateSettingsSchema, { auth: "admin" }), method(DeviceCertificateSettingsSchema, DeviceCertificateSettingsSchema, {
|
|
16174
|
+
kind: "mutation",
|
|
16175
|
+
auth: "admin"
|
|
16176
|
+
}), method(object({ id: string().min(1) }), object({ result: _enum([
|
|
16177
|
+
"deleted",
|
|
16178
|
+
"live",
|
|
16179
|
+
"unknown"
|
|
16180
|
+
]) }), {
|
|
16181
|
+
kind: "mutation",
|
|
16182
|
+
auth: "admin",
|
|
16183
|
+
caller: "required"
|
|
16184
|
+
}), method(object({}), DeviceCaStatusSchema, { auth: "admin" }), method(object({
|
|
16185
|
+
id: string().min(1),
|
|
16186
|
+
deviceName: string().min(1).max(80)
|
|
16187
|
+
}), object({ renamed: boolean() }), {
|
|
16188
|
+
kind: "mutation",
|
|
16189
|
+
auth: "admin"
|
|
16190
|
+
});
|
|
16191
|
+
/**
|
|
16192
|
+
* `node-certificates` - what a node holds and the two renewals the hub drives
|
|
16193
|
+
* (D856): the node's MESH leaf (mutual TLS to the hub) and its HTTPS leaf (issued
|
|
16194
|
+
* from the hub's local CA so a device that trusts the hub root trusts the node).
|
|
16195
|
+
*
|
|
16196
|
+
* Provided by the AGENT RUNTIME (the synthetic `agent-runtime` addon id, like
|
|
16197
|
+
* `server-management`): the hub reaches it through the ordinary node-pinned
|
|
16198
|
+
* capability call - no new Moleculer action. The hub's own certificates are
|
|
16199
|
+
* handled in-process by the hub (`certificates` router), so this cap has no hub
|
|
16200
|
+
* provider.
|
|
16201
|
+
*
|
|
16202
|
+
* No private key ever crosses the mesh: the node generates its key pair, sends a
|
|
16203
|
+
* CSR, and the hub returns only the signed certificate.
|
|
16204
|
+
*/
|
|
16205
|
+
var MeshLeafInfoSchema = object({
|
|
16206
|
+
cn: string(),
|
|
16207
|
+
serial: string(),
|
|
16208
|
+
fingerprintSha256: string(),
|
|
16209
|
+
notBefore: number(),
|
|
16210
|
+
notAfter: number()
|
|
16211
|
+
});
|
|
16212
|
+
var HttpsLeafInfoSchema = object({
|
|
16213
|
+
fingerprintSha256: string(),
|
|
16214
|
+
issuer: string(),
|
|
16215
|
+
sans: array(string()),
|
|
16216
|
+
notBefore: number(),
|
|
16217
|
+
notAfter: number()
|
|
16218
|
+
});
|
|
16219
|
+
var NodeHttpsStateSchema = discriminatedUnion("state", [object({
|
|
16220
|
+
state: literal("served"),
|
|
16221
|
+
leaf: HttpsLeafInfoSchema
|
|
16222
|
+
}), object({
|
|
16223
|
+
state: literal("not-issued"),
|
|
16224
|
+
reason: string()
|
|
16225
|
+
})]);
|
|
16226
|
+
method(object({}), object({
|
|
16227
|
+
nodeId: string(),
|
|
16228
|
+
mesh: MeshLeafInfoSchema.nullable(),
|
|
16229
|
+
https: NodeHttpsStateSchema
|
|
16230
|
+
}), { auth: "admin" }), method(object({}), object({ csrPem: string() }), {
|
|
16231
|
+
kind: "mutation",
|
|
16232
|
+
auth: "admin"
|
|
16233
|
+
}), method(object({
|
|
16234
|
+
certPem: string().min(1),
|
|
16235
|
+
caCertPem: string().min(1),
|
|
16236
|
+
confirmWithinMs: number().int().min(1e4).max(6e5)
|
|
16237
|
+
}), object({
|
|
16238
|
+
fingerprintSha256: string(),
|
|
16239
|
+
serial: string()
|
|
16240
|
+
}), {
|
|
16241
|
+
kind: "mutation",
|
|
16242
|
+
auth: "admin"
|
|
16243
|
+
}), method(object({ fingerprintSha256: string() }), object({ confirmed: boolean() }), {
|
|
16244
|
+
kind: "mutation",
|
|
16245
|
+
auth: "admin"
|
|
16246
|
+
}), method(object({}), object({ rolledBack: boolean() }), {
|
|
16247
|
+
kind: "mutation",
|
|
16248
|
+
auth: "admin"
|
|
16249
|
+
}), method(object({}), object({
|
|
16250
|
+
csrPem: string(),
|
|
16251
|
+
hostnames: array(string()),
|
|
16252
|
+
addresses: array(string()),
|
|
16253
|
+
/** SHA-256 of the hub local CA this node pinned at its first install; `null` before one. */
|
|
16254
|
+
pinnedCaFingerprintSha256: string().nullable()
|
|
16255
|
+
}), {
|
|
16256
|
+
kind: "mutation",
|
|
16257
|
+
auth: "admin"
|
|
16258
|
+
}), method(object({
|
|
16259
|
+
certPem: string().min(1),
|
|
16260
|
+
caCertPem: string().min(1),
|
|
16261
|
+
/**
|
|
16262
|
+
* The hub signals that its local CA was rotated (D227) and this leaf chains to the NEW
|
|
16263
|
+
* one. Only the hub, over the authenticated mesh, can say so; a leaf with a different CA
|
|
16264
|
+
* and no signal is refused.
|
|
16265
|
+
*/
|
|
16266
|
+
caRotation: boolean().optional()
|
|
16267
|
+
}), HttpsLeafInfoSchema, {
|
|
16268
|
+
kind: "mutation",
|
|
16269
|
+
auth: "admin"
|
|
16270
|
+
});
|
|
15778
16271
|
var KeychainKeySourceSchema = object({
|
|
15779
16272
|
kind: _enum([
|
|
15780
16273
|
"config-file",
|
|
@@ -54471,7 +54964,7 @@ var MotionOnMotionChangedDataSchema = object({
|
|
|
54471
54964
|
/** Who started it (D672). Absent = the camera itself. Only `onboard` carries `sensor`. */
|
|
54472
54965
|
triggeredBy: MotionTriggeredBySchema.optional()
|
|
54473
54966
|
});
|
|
54474
|
-
DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean());
|
|
54967
|
+
DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean()), DeviceType.Camera;
|
|
54475
54968
|
object({
|
|
54476
54969
|
enabled: boolean(),
|
|
54477
54970
|
/** Ms epoch of the last operator-driven change. */
|
|
@@ -61778,6 +62271,54 @@ Object.freeze({
|
|
|
61778
62271
|
addonId: null,
|
|
61779
62272
|
access: "create"
|
|
61780
62273
|
},
|
|
62274
|
+
"deviceCredentials.deleteDeviceCredential": {
|
|
62275
|
+
capName: "device-credentials",
|
|
62276
|
+
capScope: "system",
|
|
62277
|
+
addonId: null,
|
|
62278
|
+
access: "delete"
|
|
62279
|
+
},
|
|
62280
|
+
"deviceCredentials.getDeviceCaStatus": {
|
|
62281
|
+
capName: "device-credentials",
|
|
62282
|
+
capScope: "system",
|
|
62283
|
+
addonId: null,
|
|
62284
|
+
access: "view"
|
|
62285
|
+
},
|
|
62286
|
+
"deviceCredentials.getDeviceCertificateSettings": {
|
|
62287
|
+
capName: "device-credentials",
|
|
62288
|
+
capScope: "system",
|
|
62289
|
+
addonId: null,
|
|
62290
|
+
access: "view"
|
|
62291
|
+
},
|
|
62292
|
+
"deviceCredentials.listDeviceCredentials": {
|
|
62293
|
+
capName: "device-credentials",
|
|
62294
|
+
capScope: "system",
|
|
62295
|
+
addonId: null,
|
|
62296
|
+
access: "view"
|
|
62297
|
+
},
|
|
62298
|
+
"deviceCredentials.renameDeviceCredential": {
|
|
62299
|
+
capName: "device-credentials",
|
|
62300
|
+
capScope: "system",
|
|
62301
|
+
addonId: null,
|
|
62302
|
+
access: "create"
|
|
62303
|
+
},
|
|
62304
|
+
"deviceCredentials.revokeDeviceCredential": {
|
|
62305
|
+
capName: "device-credentials",
|
|
62306
|
+
capScope: "system",
|
|
62307
|
+
addonId: null,
|
|
62308
|
+
access: "delete"
|
|
62309
|
+
},
|
|
62310
|
+
"deviceCredentials.setDeviceCertificateSettings": {
|
|
62311
|
+
capName: "device-credentials",
|
|
62312
|
+
capScope: "system",
|
|
62313
|
+
addonId: null,
|
|
62314
|
+
access: "create"
|
|
62315
|
+
},
|
|
62316
|
+
"deviceCredentials.startEnrollment": {
|
|
62317
|
+
capName: "device-credentials",
|
|
62318
|
+
capScope: "system",
|
|
62319
|
+
addonId: null,
|
|
62320
|
+
access: "create"
|
|
62321
|
+
},
|
|
61781
62322
|
"deviceDiscovery.adoptDevice": {
|
|
61782
62323
|
capName: "device-discovery",
|
|
61783
62324
|
capScope: "device",
|
|
@@ -61880,6 +62421,66 @@ Object.freeze({
|
|
|
61880
62421
|
addonId: null,
|
|
61881
62422
|
access: "create"
|
|
61882
62423
|
},
|
|
62424
|
+
"deviceHistory.declareSeries": {
|
|
62425
|
+
capName: "device-history",
|
|
62426
|
+
capScope: "system",
|
|
62427
|
+
addonId: null,
|
|
62428
|
+
access: "create"
|
|
62429
|
+
},
|
|
62430
|
+
"deviceHistory.getDeviceEnabled": {
|
|
62431
|
+
capName: "device-history",
|
|
62432
|
+
capScope: "system",
|
|
62433
|
+
addonId: null,
|
|
62434
|
+
access: "view"
|
|
62435
|
+
},
|
|
62436
|
+
"deviceHistory.getStatus": {
|
|
62437
|
+
capName: "device-history",
|
|
62438
|
+
capScope: "system",
|
|
62439
|
+
addonId: null,
|
|
62440
|
+
access: "view"
|
|
62441
|
+
},
|
|
62442
|
+
"deviceHistory.listNodeSeries": {
|
|
62443
|
+
capName: "device-history",
|
|
62444
|
+
capScope: "system",
|
|
62445
|
+
addonId: null,
|
|
62446
|
+
access: "view"
|
|
62447
|
+
},
|
|
62448
|
+
"deviceHistory.listSeries": {
|
|
62449
|
+
capName: "device-history",
|
|
62450
|
+
capScope: "system",
|
|
62451
|
+
addonId: null,
|
|
62452
|
+
access: "view"
|
|
62453
|
+
},
|
|
62454
|
+
"deviceHistory.query": {
|
|
62455
|
+
capName: "device-history",
|
|
62456
|
+
capScope: "system",
|
|
62457
|
+
addonId: null,
|
|
62458
|
+
access: "view"
|
|
62459
|
+
},
|
|
62460
|
+
"deviceHistory.queryNode": {
|
|
62461
|
+
capName: "device-history",
|
|
62462
|
+
capScope: "system",
|
|
62463
|
+
addonId: null,
|
|
62464
|
+
access: "view"
|
|
62465
|
+
},
|
|
62466
|
+
"deviceHistory.record": {
|
|
62467
|
+
capName: "device-history",
|
|
62468
|
+
capScope: "system",
|
|
62469
|
+
addonId: null,
|
|
62470
|
+
access: "create"
|
|
62471
|
+
},
|
|
62472
|
+
"deviceHistory.recordBuckets": {
|
|
62473
|
+
capName: "device-history",
|
|
62474
|
+
capScope: "system",
|
|
62475
|
+
addonId: null,
|
|
62476
|
+
access: "create"
|
|
62477
|
+
},
|
|
62478
|
+
"deviceHistory.setDeviceEnabled": {
|
|
62479
|
+
capName: "device-history",
|
|
62480
|
+
capScope: "system",
|
|
62481
|
+
addonId: null,
|
|
62482
|
+
access: "create"
|
|
62483
|
+
},
|
|
61883
62484
|
"deviceManager.addLocation": {
|
|
61884
62485
|
capName: "device-manager",
|
|
61885
62486
|
capScope: "system",
|
|
@@ -63938,6 +64539,48 @@ Object.freeze({
|
|
|
63938
64539
|
addonId: null,
|
|
63939
64540
|
access: "create"
|
|
63940
64541
|
},
|
|
64542
|
+
"nodeCertificates.confirmMeshLeaf": {
|
|
64543
|
+
capName: "node-certificates",
|
|
64544
|
+
capScope: "system",
|
|
64545
|
+
addonId: null,
|
|
64546
|
+
access: "create"
|
|
64547
|
+
},
|
|
64548
|
+
"nodeCertificates.getCertificates": {
|
|
64549
|
+
capName: "node-certificates",
|
|
64550
|
+
capScope: "system",
|
|
64551
|
+
addonId: null,
|
|
64552
|
+
access: "view"
|
|
64553
|
+
},
|
|
64554
|
+
"nodeCertificates.installHttpsCertificate": {
|
|
64555
|
+
capName: "node-certificates",
|
|
64556
|
+
capScope: "system",
|
|
64557
|
+
addonId: null,
|
|
64558
|
+
access: "create"
|
|
64559
|
+
},
|
|
64560
|
+
"nodeCertificates.installMeshLeaf": {
|
|
64561
|
+
capName: "node-certificates",
|
|
64562
|
+
capScope: "system",
|
|
64563
|
+
addonId: null,
|
|
64564
|
+
access: "create"
|
|
64565
|
+
},
|
|
64566
|
+
"nodeCertificates.prepareHttpsCertificate": {
|
|
64567
|
+
capName: "node-certificates",
|
|
64568
|
+
capScope: "system",
|
|
64569
|
+
addonId: null,
|
|
64570
|
+
access: "create"
|
|
64571
|
+
},
|
|
64572
|
+
"nodeCertificates.prepareMeshRenewal": {
|
|
64573
|
+
capName: "node-certificates",
|
|
64574
|
+
capScope: "system",
|
|
64575
|
+
addonId: null,
|
|
64576
|
+
access: "create"
|
|
64577
|
+
},
|
|
64578
|
+
"nodeCertificates.rollbackMeshLeaf": {
|
|
64579
|
+
capName: "node-certificates",
|
|
64580
|
+
capScope: "system",
|
|
64581
|
+
addonId: null,
|
|
64582
|
+
access: "create"
|
|
64583
|
+
},
|
|
63941
64584
|
"nodes.clusterAddonStatus": {
|
|
63942
64585
|
capName: "nodes",
|
|
63943
64586
|
capScope: "system",
|
|
@@ -68629,6 +69272,26 @@ Object.freeze({
|
|
|
68629
69272
|
form: "single",
|
|
68630
69273
|
optional: false
|
|
68631
69274
|
}],
|
|
69275
|
+
"deviceHistory.getDeviceEnabled": [{
|
|
69276
|
+
name: "deviceId",
|
|
69277
|
+
form: "single",
|
|
69278
|
+
optional: false
|
|
69279
|
+
}],
|
|
69280
|
+
"deviceHistory.listSeries": [{
|
|
69281
|
+
name: "deviceId",
|
|
69282
|
+
form: "single",
|
|
69283
|
+
optional: false
|
|
69284
|
+
}],
|
|
69285
|
+
"deviceHistory.query": [{
|
|
69286
|
+
name: "deviceId",
|
|
69287
|
+
form: "single",
|
|
69288
|
+
optional: false
|
|
69289
|
+
}],
|
|
69290
|
+
"deviceHistory.setDeviceEnabled": [{
|
|
69291
|
+
name: "deviceId",
|
|
69292
|
+
form: "single",
|
|
69293
|
+
optional: false
|
|
69294
|
+
}],
|
|
68632
69295
|
"deviceManager.adoptionRelease": [{
|
|
68633
69296
|
name: "camDeviceId",
|
|
68634
69297
|
form: "single",
|
|
@@ -70807,6 +71470,7 @@ Object.freeze({
|
|
|
70807
71470
|
"network-access": "ingress",
|
|
70808
71471
|
"smtp-provider": "email"
|
|
70809
71472
|
});
|
|
71473
|
+
DeviceType.Camera;
|
|
70810
71474
|
var G711_SCALE_CORRECTION_DB = {
|
|
70811
71475
|
PCMU: 20 * Math.log10(4),
|
|
70812
71476
|
PCMA: 20 * Math.log10(8)
|