@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
|
@@ -5387,7 +5387,7 @@ var ZodIssueCode = {
|
|
|
5387
5387
|
var ZodFirstPartyTypeKind;
|
|
5388
5388
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5389
5389
|
//#endregion
|
|
5390
|
-
//#region ../types/dist/sleep-
|
|
5390
|
+
//#region ../types/dist/sleep--g-h2_c_.mjs
|
|
5391
5391
|
/**
|
|
5392
5392
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5393
5393
|
* window to float samples (D455).
|
|
@@ -12170,6 +12170,167 @@ var ConvertResultSchema = object({
|
|
|
12170
12170
|
files: array(string()).readonly()
|
|
12171
12171
|
})).readonly()
|
|
12172
12172
|
});
|
|
12173
|
+
/**
|
|
12174
|
+
* Device certificates (D855) — the wire contract shared by the hub, the admin
|
|
12175
|
+
* UI and the native viewer.
|
|
12176
|
+
*
|
|
12177
|
+
* A device (a phone) generates its OWN P-256 key pair in hardware (Secure
|
|
12178
|
+
* Enclave / Android Keystore / a non-extractable WebCrypto key). The private
|
|
12179
|
+
* key never travels. The hub signs the PUBLIC key into an X.509 leaf under a
|
|
12180
|
+
* dedicated device CA; the device later proves possession of the key by
|
|
12181
|
+
* signing a hub-issued nonce, and the hub answers with the same session a
|
|
12182
|
+
* password login opens.
|
|
12183
|
+
*
|
|
12184
|
+
* Everything on the wire is a small string (a PEM, a base64url signature):
|
|
12185
|
+
* D613 is about bulk bytes, and a certificate is ~600 bytes.
|
|
12186
|
+
*/
|
|
12187
|
+
/** Signature algorithm of every device credential: ECDSA, curve P-256, SHA-256. */
|
|
12188
|
+
var DEVICE_CERT_SIGNATURE = "ecdsa-p256-sha256";
|
|
12189
|
+
/** First line of every signed message; a change of format bumps the version. */
|
|
12190
|
+
var DEVICE_SIGNATURE_MESSAGE_VERSION = "camstack-device-cert-v1";
|
|
12191
|
+
_enum([
|
|
12192
|
+
"login",
|
|
12193
|
+
"renew",
|
|
12194
|
+
"revoke"
|
|
12195
|
+
]);
|
|
12196
|
+
var DevicePlatformSchema = _enum([
|
|
12197
|
+
"ios",
|
|
12198
|
+
"android",
|
|
12199
|
+
"web",
|
|
12200
|
+
"other"
|
|
12201
|
+
]);
|
|
12202
|
+
var Base64UrlSchema = string().min(1).max(4096).regex(/^[A-Za-z0-9_-]+$/);
|
|
12203
|
+
var PemSchema = string().min(1).max(16384);
|
|
12204
|
+
/**
|
|
12205
|
+
* Why a device-certificate endpoint said no. Distinct from a transport / 5xx
|
|
12206
|
+
* failure: those carry no reason and mean "try again", never "the credential is
|
|
12207
|
+
* dead". The viewer switches on this exhaustively.
|
|
12208
|
+
*/
|
|
12209
|
+
var DeviceRefusalReasonSchema = _enum([
|
|
12210
|
+
"revoked",
|
|
12211
|
+
"unknown-credential",
|
|
12212
|
+
"expired",
|
|
12213
|
+
"bad-signature",
|
|
12214
|
+
"nonce-invalid",
|
|
12215
|
+
"rate-limited",
|
|
12216
|
+
"invalid-certificate",
|
|
12217
|
+
"superseded",
|
|
12218
|
+
"user-gone",
|
|
12219
|
+
"unavailable",
|
|
12220
|
+
"code-invalid",
|
|
12221
|
+
"self-enrollment-disabled",
|
|
12222
|
+
"step-up-required",
|
|
12223
|
+
"bad-public-key"
|
|
12224
|
+
]);
|
|
12225
|
+
var DeviceRefusalSchema = object({
|
|
12226
|
+
ok: literal(false),
|
|
12227
|
+
reason: DeviceRefusalReasonSchema,
|
|
12228
|
+
definitive: boolean(),
|
|
12229
|
+
retryAfterSeconds: number().optional()
|
|
12230
|
+
});
|
|
12231
|
+
object({
|
|
12232
|
+
code: string().min(1).max(256),
|
|
12233
|
+
/** SubjectPublicKeyInfo DER of the device's P-256 public key, base64url. */
|
|
12234
|
+
publicKeySpki: Base64UrlSchema,
|
|
12235
|
+
deviceName: string().min(1).max(80).optional(),
|
|
12236
|
+
platform: DevicePlatformSchema
|
|
12237
|
+
});
|
|
12238
|
+
discriminatedUnion("ok", [object({
|
|
12239
|
+
credentialId: string(),
|
|
12240
|
+
certPem: PemSchema,
|
|
12241
|
+
/** The device CA certificate the leaf chains to. */
|
|
12242
|
+
chainPem: PemSchema,
|
|
12243
|
+
notAfter: number(),
|
|
12244
|
+
user: object({
|
|
12245
|
+
id: string(),
|
|
12246
|
+
username: string()
|
|
12247
|
+
})
|
|
12248
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12249
|
+
object({
|
|
12250
|
+
/** The single-use step-up proof (`auth.deviceEnrollProofFrom…`). */
|
|
12251
|
+
proof: string().min(1).max(512),
|
|
12252
|
+
publicKeySpki: Base64UrlSchema,
|
|
12253
|
+
deviceName: string().min(1).max(80),
|
|
12254
|
+
platform: DevicePlatformSchema
|
|
12255
|
+
});
|
|
12256
|
+
object({
|
|
12257
|
+
proof: string(),
|
|
12258
|
+
expiresAt: number()
|
|
12259
|
+
});
|
|
12260
|
+
discriminatedUnion("ok", [object({
|
|
12261
|
+
nonce: string(),
|
|
12262
|
+
/** The origin to put in the signed message. The app compares it to the hub it dialled. */
|
|
12263
|
+
origin: string(),
|
|
12264
|
+
expiresAt: number(),
|
|
12265
|
+
signature: literal(DEVICE_CERT_SIGNATURE)
|
|
12266
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12267
|
+
object({
|
|
12268
|
+
certPem: PemSchema,
|
|
12269
|
+
nonce: string().min(1).max(256),
|
|
12270
|
+
/** ECDSA P-256 SHA-256 over {@link buildDeviceSignatureMessage}; raw r||s or DER, base64url. */
|
|
12271
|
+
signature: Base64UrlSchema
|
|
12272
|
+
});
|
|
12273
|
+
discriminatedUnion("ok", [object({
|
|
12274
|
+
credentialId: string(),
|
|
12275
|
+
certPem: PemSchema,
|
|
12276
|
+
chainPem: PemSchema,
|
|
12277
|
+
notAfter: number()
|
|
12278
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12279
|
+
discriminatedUnion("ok", [object({
|
|
12280
|
+
ok: literal(true),
|
|
12281
|
+
credentialId: string(),
|
|
12282
|
+
sessionsEnded: number().int()
|
|
12283
|
+
}), DeviceRefusalSchema]);
|
|
12284
|
+
var DeviceCredentialStatusSchema = _enum([
|
|
12285
|
+
"active",
|
|
12286
|
+
"expired",
|
|
12287
|
+
"revoked"
|
|
12288
|
+
]);
|
|
12289
|
+
var DeviceCredentialSchema = object({
|
|
12290
|
+
id: string(),
|
|
12291
|
+
userId: string(),
|
|
12292
|
+
username: string().nullable(),
|
|
12293
|
+
deviceName: string(),
|
|
12294
|
+
platform: DevicePlatformSchema,
|
|
12295
|
+
enrolledVia: _enum(["qr", "self"]),
|
|
12296
|
+
/** SHA-256 of the leaf certificate DER, colon-hex. */
|
|
12297
|
+
fingerprint: string(),
|
|
12298
|
+
issuedAt: number(),
|
|
12299
|
+
expiresAt: number(),
|
|
12300
|
+
lastUsedAt: number().nullable(),
|
|
12301
|
+
lastUsedFrom: string().nullable(),
|
|
12302
|
+
revokedAt: number().nullable(),
|
|
12303
|
+
/** `admin:<userId>` | `user:<userId>` | `device` | `user-deleted`. */
|
|
12304
|
+
revokedBy: string().nullable(),
|
|
12305
|
+
status: DeviceCredentialStatusSchema
|
|
12306
|
+
});
|
|
12307
|
+
var StartEnrollmentOutputSchema = object({
|
|
12308
|
+
/** Shown once; only its hash is kept. */
|
|
12309
|
+
code: string(),
|
|
12310
|
+
expiresAt: number(),
|
|
12311
|
+
/** `camstack://enroll?hub=…&code=…` — what the QR encodes. */
|
|
12312
|
+
enrollUrl: string(),
|
|
12313
|
+
/** The hub origin in the link, or `null` when the hub could not name one (the link then has no `hub`). */
|
|
12314
|
+
hubOrigin: string().nullable(),
|
|
12315
|
+
/** Every origin the apps may try (role `appConnections`). */
|
|
12316
|
+
hubOrigins: array(string())
|
|
12317
|
+
});
|
|
12318
|
+
object({
|
|
12319
|
+
kind: literal("device-certificate"),
|
|
12320
|
+
id: literal("device-certificate"),
|
|
12321
|
+
label: string(),
|
|
12322
|
+
stage: literal("primary"),
|
|
12323
|
+
/** tRPC paths under the hub's `auth` router, so a client names no literal. */
|
|
12324
|
+
challengePath: literal("auth.getDeviceChallenge"),
|
|
12325
|
+
revokePath: literal("auth.revokeOwnDeviceCertificate"),
|
|
12326
|
+
enrollSelfPath: literal("auth.enrollSelf"),
|
|
12327
|
+
loginPath: literal("auth.loginWithDeviceCertificate"),
|
|
12328
|
+
renewPath: literal("auth.renewDeviceCertificate"),
|
|
12329
|
+
signature: literal(DEVICE_CERT_SIGNATURE),
|
|
12330
|
+
messageVersion: literal(DEVICE_SIGNATURE_MESSAGE_VERSION),
|
|
12331
|
+
/** Which clients can execute it: a native app silently, a browser with a non-extractable WebCrypto key. */
|
|
12332
|
+
clients: array(_enum(["native", "web"]))
|
|
12333
|
+
});
|
|
12173
12334
|
var ExpressionBindingSourceSchema = union([
|
|
12174
12335
|
object({
|
|
12175
12336
|
kind: literal("field").optional(),
|
|
@@ -15742,6 +15903,338 @@ method(object({
|
|
|
15742
15903
|
kind: "mutation",
|
|
15743
15904
|
auth: "admin"
|
|
15744
15905
|
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
15906
|
+
/**
|
|
15907
|
+
* device-history — the ONE mechanism for numeric history (D850).
|
|
15908
|
+
*
|
|
15909
|
+
* A device value is recorded because its capability says so (the `history`
|
|
15910
|
+
* block of a `*.cap.ts`, captured hub-side from `DeviceStateChanged`); any
|
|
15911
|
+
* other series is DECLARED by the addon that produces it and fed with points
|
|
15912
|
+
* (`record`) or closed five-minute buckets (`recordBuckets`). Rollups 5m / 1h /
|
|
15913
|
+
* 1d are computed here and nowhere else. Storage is `history.db` (D851).
|
|
15914
|
+
*
|
|
15915
|
+
* Who the PRODUCER is: `declareSeries`, `record` and `recordBuckets` are owner
|
|
15916
|
+
* checked against the `callerAddonId` the transport stamps into a call that
|
|
15917
|
+
* crossed a process (never in an input schema, so a session cannot supply it).
|
|
15918
|
+
* A call with no stamp is refused `not-owner`. The methods are `admin` so a
|
|
15919
|
+
* non-admin session never reaches them; an addon's `ctx.api` call bypasses the
|
|
15920
|
+
* tier by design.
|
|
15921
|
+
*/
|
|
15922
|
+
/** Whose history: a real device, or a cluster node (load, memory). */
|
|
15923
|
+
var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
|
|
15924
|
+
kind: literal("device"),
|
|
15925
|
+
deviceId: number().int()
|
|
15926
|
+
}), object({
|
|
15927
|
+
kind: literal("node"),
|
|
15928
|
+
nodeId: string().min(1)
|
|
15929
|
+
})]);
|
|
15930
|
+
var DeviceHistoryKindSchema = _enum([
|
|
15931
|
+
"gauge",
|
|
15932
|
+
"counter",
|
|
15933
|
+
"boolean"
|
|
15934
|
+
]);
|
|
15935
|
+
var DeviceHistoryResolutionSchema = _enum([
|
|
15936
|
+
"raw",
|
|
15937
|
+
"5m",
|
|
15938
|
+
"1h",
|
|
15939
|
+
"1d"
|
|
15940
|
+
]);
|
|
15941
|
+
/** Why a producer's point or bucket was not stored. Counted, never silent (D391). */
|
|
15942
|
+
var DeviceHistoryRefusalReasonSchema = _enum([
|
|
15943
|
+
"undeclared",
|
|
15944
|
+
"not-owner",
|
|
15945
|
+
"opted-out",
|
|
15946
|
+
"not-a-real-device",
|
|
15947
|
+
"rate",
|
|
15948
|
+
"ingest-mismatch",
|
|
15949
|
+
"out-of-range"
|
|
15950
|
+
]);
|
|
15951
|
+
var RefusalSchema = object({
|
|
15952
|
+
key: string(),
|
|
15953
|
+
reason: DeviceHistoryRefusalReasonSchema,
|
|
15954
|
+
count: number().int()
|
|
15955
|
+
});
|
|
15956
|
+
var IngestResultSchema = object({
|
|
15957
|
+
accepted: number().int(),
|
|
15958
|
+
refused: array(RefusalSchema).readonly()
|
|
15959
|
+
});
|
|
15960
|
+
var SeriesInfoSchema = object({
|
|
15961
|
+
key: string(),
|
|
15962
|
+
scope: string(),
|
|
15963
|
+
kind: DeviceHistoryKindSchema,
|
|
15964
|
+
/** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
|
|
15965
|
+
unit: string().nullable(),
|
|
15966
|
+
displayName: string(),
|
|
15967
|
+
source: _enum(["cap", "addon"]),
|
|
15968
|
+
firstTs: number(),
|
|
15969
|
+
lastTs: number()
|
|
15970
|
+
});
|
|
15971
|
+
var QueryPointSchema = object({
|
|
15972
|
+
/** Raw: the point's time. Rollup: the bucket start. */
|
|
15973
|
+
t: number(),
|
|
15974
|
+
samples: number().int(),
|
|
15975
|
+
/** `sum / samples`. */
|
|
15976
|
+
mean: number().nullable(),
|
|
15977
|
+
/** Time-weighted mean (`tw_sum / tw_ms`); `null` for bucket-ingested series. For a boolean: the fraction of time true. */
|
|
15978
|
+
twMean: number().nullable(),
|
|
15979
|
+
min: number(),
|
|
15980
|
+
max: number(),
|
|
15981
|
+
/** `null` is unknown, never zero (D393). */
|
|
15982
|
+
last: number().nullable()
|
|
15983
|
+
});
|
|
15984
|
+
var QuerySeriesSchema = object({
|
|
15985
|
+
scope: string(),
|
|
15986
|
+
/** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
|
|
15987
|
+
before: object({
|
|
15988
|
+
t: number(),
|
|
15989
|
+
value: number().nullable()
|
|
15990
|
+
}).nullable(),
|
|
15991
|
+
points: array(QueryPointSchema).readonly()
|
|
15992
|
+
});
|
|
15993
|
+
/** The window part of a query, shared by the device and node forms. */
|
|
15994
|
+
var QueryWindowShape = {
|
|
15995
|
+
key: string(),
|
|
15996
|
+
scope: string().optional(),
|
|
15997
|
+
from: number(),
|
|
15998
|
+
to: number(),
|
|
15999
|
+
resolution: union([DeviceHistoryResolutionSchema, literal("auto")]).default("auto"),
|
|
16000
|
+
maxPoints: number().int().positive().max(5e3).default(1e3)
|
|
16001
|
+
};
|
|
16002
|
+
var QueryResultSchema = object({
|
|
16003
|
+
resolution: DeviceHistoryResolutionSchema,
|
|
16004
|
+
series: array(QuerySeriesSchema).readonly(),
|
|
16005
|
+
truncated: boolean()
|
|
16006
|
+
});
|
|
16007
|
+
var TierStatusSchema = object({
|
|
16008
|
+
tier: DeviceHistoryResolutionSchema,
|
|
16009
|
+
/** `null` until the first background count answered. */
|
|
16010
|
+
rows: number().int().nullable(),
|
|
16011
|
+
/** `rows` times a fixed per-row estimate — approximate, labelled so. */
|
|
16012
|
+
approxBytes: number().nullable(),
|
|
16013
|
+
countedAt: number().nullable()
|
|
16014
|
+
});
|
|
16015
|
+
/** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
|
|
16016
|
+
var DeviceHistoryStatusSchema = object({
|
|
16017
|
+
startedAt: number(),
|
|
16018
|
+
/** The store is declared, series loaded and the first reconcile has answered. */
|
|
16019
|
+
ready: boolean(),
|
|
16020
|
+
series: number().int(),
|
|
16021
|
+
metrics: number().int(),
|
|
16022
|
+
optedOutDevices: number().int(),
|
|
16023
|
+
tiers: array(TierStatusSchema).readonly(),
|
|
16024
|
+
capture: object({
|
|
16025
|
+
eventsSeen: number().int(),
|
|
16026
|
+
pointsEmitted: number().int(),
|
|
16027
|
+
pointsWritten: number().int(),
|
|
16028
|
+
pointsDropped: number().int(),
|
|
16029
|
+
bufferDepth: number().int(),
|
|
16030
|
+
trailingEmitted: number().int(),
|
|
16031
|
+
reconciledPoints: number().int(),
|
|
16032
|
+
reconcileRuns: number().int(),
|
|
16033
|
+
reconcileFailures: number().int(),
|
|
16034
|
+
lastReconcileAt: number().nullable(),
|
|
16035
|
+
lastFlushAt: number().nullable(),
|
|
16036
|
+
flushFailures: number().int(),
|
|
16037
|
+
skipped: record(string(), number().int())
|
|
16038
|
+
}),
|
|
16039
|
+
ingest: object({
|
|
16040
|
+
accepted: number().int(),
|
|
16041
|
+
refused: record(string(), number().int())
|
|
16042
|
+
}),
|
|
16043
|
+
rollup: object({
|
|
16044
|
+
last5mAt: number().nullable(),
|
|
16045
|
+
last1hAt: number().nullable(),
|
|
16046
|
+
last1dAt: number().nullable(),
|
|
16047
|
+
errors: number().int(),
|
|
16048
|
+
dirty5m: number().int(),
|
|
16049
|
+
dirty1h: number().int(),
|
|
16050
|
+
dirty1d: number().int()
|
|
16051
|
+
}),
|
|
16052
|
+
retention: object({
|
|
16053
|
+
lastRunAt: number().nullable(),
|
|
16054
|
+
deleted: record(string(), number().int()),
|
|
16055
|
+
purgedSeries: number().int()
|
|
16056
|
+
}),
|
|
16057
|
+
directory: object({
|
|
16058
|
+
devices: number().int(),
|
|
16059
|
+
lastRefreshAt: number().nullable()
|
|
16060
|
+
})
|
|
16061
|
+
});
|
|
16062
|
+
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
16063
|
+
deviceId: number().int(),
|
|
16064
|
+
...QueryWindowShape
|
|
16065
|
+
}), QueryResultSchema), method(object({
|
|
16066
|
+
nodeId: string().min(1),
|
|
16067
|
+
...QueryWindowShape
|
|
16068
|
+
}), QueryResultSchema, { auth: "admin" }), method(object({
|
|
16069
|
+
name: string().regex(/^[a-z0-9-]+$/),
|
|
16070
|
+
subjectKind: _enum(["device", "node"]),
|
|
16071
|
+
kind: DeviceHistoryKindSchema,
|
|
16072
|
+
unit: string().optional(),
|
|
16073
|
+
displayName: string().min(1),
|
|
16074
|
+
ingest: _enum(["points", "buckets"])
|
|
16075
|
+
}), object({ key: string() }), {
|
|
16076
|
+
kind: "mutation",
|
|
16077
|
+
auth: "admin"
|
|
16078
|
+
}), method(object({ points: array(object({
|
|
16079
|
+
key: string(),
|
|
16080
|
+
subject: DeviceHistorySubjectSchema,
|
|
16081
|
+
scope: string().default(""),
|
|
16082
|
+
ts: number(),
|
|
16083
|
+
value: number()
|
|
16084
|
+
})).max(5e3) }), IngestResultSchema, {
|
|
16085
|
+
kind: "mutation",
|
|
16086
|
+
auth: "admin"
|
|
16087
|
+
}), method(object({ buckets: array(object({
|
|
16088
|
+
key: string(),
|
|
16089
|
+
subject: DeviceHistorySubjectSchema,
|
|
16090
|
+
scope: string().default(""),
|
|
16091
|
+
bucketStart: number(),
|
|
16092
|
+
samples: number().int().positive(),
|
|
16093
|
+
sum: number(),
|
|
16094
|
+
min: number(),
|
|
16095
|
+
max: number(),
|
|
16096
|
+
last: number().nullable(),
|
|
16097
|
+
lastTs: number().nullable()
|
|
16098
|
+
})).max(5e3) }), IngestResultSchema, {
|
|
16099
|
+
kind: "mutation",
|
|
16100
|
+
auth: "admin"
|
|
16101
|
+
}), method(object({ deviceId: number().int() }), object({ enabled: boolean() })), method(object({
|
|
16102
|
+
deviceId: number().int(),
|
|
16103
|
+
enabled: boolean()
|
|
16104
|
+
}), object({ enabled: boolean() }), {
|
|
16105
|
+
kind: "mutation",
|
|
16106
|
+
auth: "admin"
|
|
16107
|
+
}), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
|
|
16108
|
+
var DeviceCaStatusSchema = discriminatedUnion("state", [
|
|
16109
|
+
object({ state: literal("absent") }),
|
|
16110
|
+
object({
|
|
16111
|
+
state: literal("ready"),
|
|
16112
|
+
subject: string(),
|
|
16113
|
+
fingerprintSha256: string(),
|
|
16114
|
+
validTo: string()
|
|
16115
|
+
}),
|
|
16116
|
+
object({
|
|
16117
|
+
state: literal("unavailable"),
|
|
16118
|
+
reason: string()
|
|
16119
|
+
})
|
|
16120
|
+
]);
|
|
16121
|
+
var DeviceCertificateSettingsSchema = object({ selfEnrollment: _enum(["allowed", "disabled"]) });
|
|
16122
|
+
method(object({
|
|
16123
|
+
userId: string().min(1).optional(),
|
|
16124
|
+
includeRevoked: boolean().default(false)
|
|
16125
|
+
}), array(DeviceCredentialSchema).readonly(), { auth: "admin" }), method(object({
|
|
16126
|
+
userId: string().min(1),
|
|
16127
|
+
deviceName: string().min(1).max(80)
|
|
16128
|
+
}), StartEnrollmentOutputSchema, {
|
|
16129
|
+
kind: "mutation",
|
|
16130
|
+
auth: "admin",
|
|
16131
|
+
caller: "required"
|
|
16132
|
+
}), method(object({ id: string().min(1) }), object({
|
|
16133
|
+
revoked: boolean(),
|
|
16134
|
+
sessionsEnded: number().int(),
|
|
16135
|
+
status: DeviceCredentialStatusSchema
|
|
16136
|
+
}), {
|
|
16137
|
+
kind: "mutation",
|
|
16138
|
+
auth: "admin",
|
|
16139
|
+
caller: "required"
|
|
16140
|
+
}), method(object({}), DeviceCertificateSettingsSchema, { auth: "admin" }), method(DeviceCertificateSettingsSchema, DeviceCertificateSettingsSchema, {
|
|
16141
|
+
kind: "mutation",
|
|
16142
|
+
auth: "admin"
|
|
16143
|
+
}), method(object({ id: string().min(1) }), object({ result: _enum([
|
|
16144
|
+
"deleted",
|
|
16145
|
+
"live",
|
|
16146
|
+
"unknown"
|
|
16147
|
+
]) }), {
|
|
16148
|
+
kind: "mutation",
|
|
16149
|
+
auth: "admin",
|
|
16150
|
+
caller: "required"
|
|
16151
|
+
}), method(object({}), DeviceCaStatusSchema, { auth: "admin" }), method(object({
|
|
16152
|
+
id: string().min(1),
|
|
16153
|
+
deviceName: string().min(1).max(80)
|
|
16154
|
+
}), object({ renamed: boolean() }), {
|
|
16155
|
+
kind: "mutation",
|
|
16156
|
+
auth: "admin"
|
|
16157
|
+
});
|
|
16158
|
+
/**
|
|
16159
|
+
* `node-certificates` - what a node holds and the two renewals the hub drives
|
|
16160
|
+
* (D856): the node's MESH leaf (mutual TLS to the hub) and its HTTPS leaf (issued
|
|
16161
|
+
* from the hub's local CA so a device that trusts the hub root trusts the node).
|
|
16162
|
+
*
|
|
16163
|
+
* Provided by the AGENT RUNTIME (the synthetic `agent-runtime` addon id, like
|
|
16164
|
+
* `server-management`): the hub reaches it through the ordinary node-pinned
|
|
16165
|
+
* capability call - no new Moleculer action. The hub's own certificates are
|
|
16166
|
+
* handled in-process by the hub (`certificates` router), so this cap has no hub
|
|
16167
|
+
* provider.
|
|
16168
|
+
*
|
|
16169
|
+
* No private key ever crosses the mesh: the node generates its key pair, sends a
|
|
16170
|
+
* CSR, and the hub returns only the signed certificate.
|
|
16171
|
+
*/
|
|
16172
|
+
var MeshLeafInfoSchema = object({
|
|
16173
|
+
cn: string(),
|
|
16174
|
+
serial: string(),
|
|
16175
|
+
fingerprintSha256: string(),
|
|
16176
|
+
notBefore: number(),
|
|
16177
|
+
notAfter: number()
|
|
16178
|
+
});
|
|
16179
|
+
var HttpsLeafInfoSchema = object({
|
|
16180
|
+
fingerprintSha256: string(),
|
|
16181
|
+
issuer: string(),
|
|
16182
|
+
sans: array(string()),
|
|
16183
|
+
notBefore: number(),
|
|
16184
|
+
notAfter: number()
|
|
16185
|
+
});
|
|
16186
|
+
var NodeHttpsStateSchema = discriminatedUnion("state", [object({
|
|
16187
|
+
state: literal("served"),
|
|
16188
|
+
leaf: HttpsLeafInfoSchema
|
|
16189
|
+
}), object({
|
|
16190
|
+
state: literal("not-issued"),
|
|
16191
|
+
reason: string()
|
|
16192
|
+
})]);
|
|
16193
|
+
method(object({}), object({
|
|
16194
|
+
nodeId: string(),
|
|
16195
|
+
mesh: MeshLeafInfoSchema.nullable(),
|
|
16196
|
+
https: NodeHttpsStateSchema
|
|
16197
|
+
}), { auth: "admin" }), method(object({}), object({ csrPem: string() }), {
|
|
16198
|
+
kind: "mutation",
|
|
16199
|
+
auth: "admin"
|
|
16200
|
+
}), method(object({
|
|
16201
|
+
certPem: string().min(1),
|
|
16202
|
+
caCertPem: string().min(1),
|
|
16203
|
+
confirmWithinMs: number().int().min(1e4).max(6e5)
|
|
16204
|
+
}), object({
|
|
16205
|
+
fingerprintSha256: string(),
|
|
16206
|
+
serial: string()
|
|
16207
|
+
}), {
|
|
16208
|
+
kind: "mutation",
|
|
16209
|
+
auth: "admin"
|
|
16210
|
+
}), method(object({ fingerprintSha256: string() }), object({ confirmed: boolean() }), {
|
|
16211
|
+
kind: "mutation",
|
|
16212
|
+
auth: "admin"
|
|
16213
|
+
}), method(object({}), object({ rolledBack: boolean() }), {
|
|
16214
|
+
kind: "mutation",
|
|
16215
|
+
auth: "admin"
|
|
16216
|
+
}), method(object({}), object({
|
|
16217
|
+
csrPem: string(),
|
|
16218
|
+
hostnames: array(string()),
|
|
16219
|
+
addresses: array(string()),
|
|
16220
|
+
/** SHA-256 of the hub local CA this node pinned at its first install; `null` before one. */
|
|
16221
|
+
pinnedCaFingerprintSha256: string().nullable()
|
|
16222
|
+
}), {
|
|
16223
|
+
kind: "mutation",
|
|
16224
|
+
auth: "admin"
|
|
16225
|
+
}), method(object({
|
|
16226
|
+
certPem: string().min(1),
|
|
16227
|
+
caCertPem: string().min(1),
|
|
16228
|
+
/**
|
|
16229
|
+
* The hub signals that its local CA was rotated (D227) and this leaf chains to the NEW
|
|
16230
|
+
* one. Only the hub, over the authenticated mesh, can say so; a leaf with a different CA
|
|
16231
|
+
* and no signal is refused.
|
|
16232
|
+
*/
|
|
16233
|
+
caRotation: boolean().optional()
|
|
16234
|
+
}), HttpsLeafInfoSchema, {
|
|
16235
|
+
kind: "mutation",
|
|
16236
|
+
auth: "admin"
|
|
16237
|
+
});
|
|
15745
16238
|
var KeychainKeySourceSchema = object({
|
|
15746
16239
|
kind: _enum([
|
|
15747
16240
|
"config-file",
|
|
@@ -54438,7 +54931,7 @@ var MotionOnMotionChangedDataSchema = object({
|
|
|
54438
54931
|
/** Who started it (D672). Absent = the camera itself. Only `onboard` carries `sensor`. */
|
|
54439
54932
|
triggeredBy: MotionTriggeredBySchema.optional()
|
|
54440
54933
|
});
|
|
54441
|
-
DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean());
|
|
54934
|
+
DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean()), DeviceType.Camera;
|
|
54442
54935
|
object({
|
|
54443
54936
|
enabled: boolean(),
|
|
54444
54937
|
/** Ms epoch of the last operator-driven change. */
|
|
@@ -61745,6 +62238,54 @@ Object.freeze({
|
|
|
61745
62238
|
addonId: null,
|
|
61746
62239
|
access: "create"
|
|
61747
62240
|
},
|
|
62241
|
+
"deviceCredentials.deleteDeviceCredential": {
|
|
62242
|
+
capName: "device-credentials",
|
|
62243
|
+
capScope: "system",
|
|
62244
|
+
addonId: null,
|
|
62245
|
+
access: "delete"
|
|
62246
|
+
},
|
|
62247
|
+
"deviceCredentials.getDeviceCaStatus": {
|
|
62248
|
+
capName: "device-credentials",
|
|
62249
|
+
capScope: "system",
|
|
62250
|
+
addonId: null,
|
|
62251
|
+
access: "view"
|
|
62252
|
+
},
|
|
62253
|
+
"deviceCredentials.getDeviceCertificateSettings": {
|
|
62254
|
+
capName: "device-credentials",
|
|
62255
|
+
capScope: "system",
|
|
62256
|
+
addonId: null,
|
|
62257
|
+
access: "view"
|
|
62258
|
+
},
|
|
62259
|
+
"deviceCredentials.listDeviceCredentials": {
|
|
62260
|
+
capName: "device-credentials",
|
|
62261
|
+
capScope: "system",
|
|
62262
|
+
addonId: null,
|
|
62263
|
+
access: "view"
|
|
62264
|
+
},
|
|
62265
|
+
"deviceCredentials.renameDeviceCredential": {
|
|
62266
|
+
capName: "device-credentials",
|
|
62267
|
+
capScope: "system",
|
|
62268
|
+
addonId: null,
|
|
62269
|
+
access: "create"
|
|
62270
|
+
},
|
|
62271
|
+
"deviceCredentials.revokeDeviceCredential": {
|
|
62272
|
+
capName: "device-credentials",
|
|
62273
|
+
capScope: "system",
|
|
62274
|
+
addonId: null,
|
|
62275
|
+
access: "delete"
|
|
62276
|
+
},
|
|
62277
|
+
"deviceCredentials.setDeviceCertificateSettings": {
|
|
62278
|
+
capName: "device-credentials",
|
|
62279
|
+
capScope: "system",
|
|
62280
|
+
addonId: null,
|
|
62281
|
+
access: "create"
|
|
62282
|
+
},
|
|
62283
|
+
"deviceCredentials.startEnrollment": {
|
|
62284
|
+
capName: "device-credentials",
|
|
62285
|
+
capScope: "system",
|
|
62286
|
+
addonId: null,
|
|
62287
|
+
access: "create"
|
|
62288
|
+
},
|
|
61748
62289
|
"deviceDiscovery.adoptDevice": {
|
|
61749
62290
|
capName: "device-discovery",
|
|
61750
62291
|
capScope: "device",
|
|
@@ -61847,6 +62388,66 @@ Object.freeze({
|
|
|
61847
62388
|
addonId: null,
|
|
61848
62389
|
access: "create"
|
|
61849
62390
|
},
|
|
62391
|
+
"deviceHistory.declareSeries": {
|
|
62392
|
+
capName: "device-history",
|
|
62393
|
+
capScope: "system",
|
|
62394
|
+
addonId: null,
|
|
62395
|
+
access: "create"
|
|
62396
|
+
},
|
|
62397
|
+
"deviceHistory.getDeviceEnabled": {
|
|
62398
|
+
capName: "device-history",
|
|
62399
|
+
capScope: "system",
|
|
62400
|
+
addonId: null,
|
|
62401
|
+
access: "view"
|
|
62402
|
+
},
|
|
62403
|
+
"deviceHistory.getStatus": {
|
|
62404
|
+
capName: "device-history",
|
|
62405
|
+
capScope: "system",
|
|
62406
|
+
addonId: null,
|
|
62407
|
+
access: "view"
|
|
62408
|
+
},
|
|
62409
|
+
"deviceHistory.listNodeSeries": {
|
|
62410
|
+
capName: "device-history",
|
|
62411
|
+
capScope: "system",
|
|
62412
|
+
addonId: null,
|
|
62413
|
+
access: "view"
|
|
62414
|
+
},
|
|
62415
|
+
"deviceHistory.listSeries": {
|
|
62416
|
+
capName: "device-history",
|
|
62417
|
+
capScope: "system",
|
|
62418
|
+
addonId: null,
|
|
62419
|
+
access: "view"
|
|
62420
|
+
},
|
|
62421
|
+
"deviceHistory.query": {
|
|
62422
|
+
capName: "device-history",
|
|
62423
|
+
capScope: "system",
|
|
62424
|
+
addonId: null,
|
|
62425
|
+
access: "view"
|
|
62426
|
+
},
|
|
62427
|
+
"deviceHistory.queryNode": {
|
|
62428
|
+
capName: "device-history",
|
|
62429
|
+
capScope: "system",
|
|
62430
|
+
addonId: null,
|
|
62431
|
+
access: "view"
|
|
62432
|
+
},
|
|
62433
|
+
"deviceHistory.record": {
|
|
62434
|
+
capName: "device-history",
|
|
62435
|
+
capScope: "system",
|
|
62436
|
+
addonId: null,
|
|
62437
|
+
access: "create"
|
|
62438
|
+
},
|
|
62439
|
+
"deviceHistory.recordBuckets": {
|
|
62440
|
+
capName: "device-history",
|
|
62441
|
+
capScope: "system",
|
|
62442
|
+
addonId: null,
|
|
62443
|
+
access: "create"
|
|
62444
|
+
},
|
|
62445
|
+
"deviceHistory.setDeviceEnabled": {
|
|
62446
|
+
capName: "device-history",
|
|
62447
|
+
capScope: "system",
|
|
62448
|
+
addonId: null,
|
|
62449
|
+
access: "create"
|
|
62450
|
+
},
|
|
61850
62451
|
"deviceManager.addLocation": {
|
|
61851
62452
|
capName: "device-manager",
|
|
61852
62453
|
capScope: "system",
|
|
@@ -63905,6 +64506,48 @@ Object.freeze({
|
|
|
63905
64506
|
addonId: null,
|
|
63906
64507
|
access: "create"
|
|
63907
64508
|
},
|
|
64509
|
+
"nodeCertificates.confirmMeshLeaf": {
|
|
64510
|
+
capName: "node-certificates",
|
|
64511
|
+
capScope: "system",
|
|
64512
|
+
addonId: null,
|
|
64513
|
+
access: "create"
|
|
64514
|
+
},
|
|
64515
|
+
"nodeCertificates.getCertificates": {
|
|
64516
|
+
capName: "node-certificates",
|
|
64517
|
+
capScope: "system",
|
|
64518
|
+
addonId: null,
|
|
64519
|
+
access: "view"
|
|
64520
|
+
},
|
|
64521
|
+
"nodeCertificates.installHttpsCertificate": {
|
|
64522
|
+
capName: "node-certificates",
|
|
64523
|
+
capScope: "system",
|
|
64524
|
+
addonId: null,
|
|
64525
|
+
access: "create"
|
|
64526
|
+
},
|
|
64527
|
+
"nodeCertificates.installMeshLeaf": {
|
|
64528
|
+
capName: "node-certificates",
|
|
64529
|
+
capScope: "system",
|
|
64530
|
+
addonId: null,
|
|
64531
|
+
access: "create"
|
|
64532
|
+
},
|
|
64533
|
+
"nodeCertificates.prepareHttpsCertificate": {
|
|
64534
|
+
capName: "node-certificates",
|
|
64535
|
+
capScope: "system",
|
|
64536
|
+
addonId: null,
|
|
64537
|
+
access: "create"
|
|
64538
|
+
},
|
|
64539
|
+
"nodeCertificates.prepareMeshRenewal": {
|
|
64540
|
+
capName: "node-certificates",
|
|
64541
|
+
capScope: "system",
|
|
64542
|
+
addonId: null,
|
|
64543
|
+
access: "create"
|
|
64544
|
+
},
|
|
64545
|
+
"nodeCertificates.rollbackMeshLeaf": {
|
|
64546
|
+
capName: "node-certificates",
|
|
64547
|
+
capScope: "system",
|
|
64548
|
+
addonId: null,
|
|
64549
|
+
access: "create"
|
|
64550
|
+
},
|
|
63908
64551
|
"nodes.clusterAddonStatus": {
|
|
63909
64552
|
capName: "nodes",
|
|
63910
64553
|
capScope: "system",
|
|
@@ -68596,6 +69239,26 @@ Object.freeze({
|
|
|
68596
69239
|
form: "single",
|
|
68597
69240
|
optional: false
|
|
68598
69241
|
}],
|
|
69242
|
+
"deviceHistory.getDeviceEnabled": [{
|
|
69243
|
+
name: "deviceId",
|
|
69244
|
+
form: "single",
|
|
69245
|
+
optional: false
|
|
69246
|
+
}],
|
|
69247
|
+
"deviceHistory.listSeries": [{
|
|
69248
|
+
name: "deviceId",
|
|
69249
|
+
form: "single",
|
|
69250
|
+
optional: false
|
|
69251
|
+
}],
|
|
69252
|
+
"deviceHistory.query": [{
|
|
69253
|
+
name: "deviceId",
|
|
69254
|
+
form: "single",
|
|
69255
|
+
optional: false
|
|
69256
|
+
}],
|
|
69257
|
+
"deviceHistory.setDeviceEnabled": [{
|
|
69258
|
+
name: "deviceId",
|
|
69259
|
+
form: "single",
|
|
69260
|
+
optional: false
|
|
69261
|
+
}],
|
|
68599
69262
|
"deviceManager.adoptionRelease": [{
|
|
68600
69263
|
name: "camDeviceId",
|
|
68601
69264
|
form: "single",
|
|
@@ -70774,6 +71437,7 @@ Object.freeze({
|
|
|
70774
71437
|
"network-access": "ingress",
|
|
70775
71438
|
"smtp-provider": "email"
|
|
70776
71439
|
});
|
|
71440
|
+
DeviceType.Camera;
|
|
70777
71441
|
var G711_SCALE_CORRECTION_DB = {
|
|
70778
71442
|
PCMU: 20 * Math.log10(4),
|
|
70779
71443
|
PCMA: 20 * Math.log10(8)
|