@camstack/addon-model-studio 1.1.257 → 1.1.259
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-BT84Wq37.mjs → MotionZonesSettings-D85Kti2I.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-DdIj9GFm.mjs → PrivacyMaskSettings-Cj_Afwxb.mjs} +4 -4
- package/dist/{SceneMonitorEditor-BcP_WDA0.mjs → SceneMonitorEditor-B66YfelB.mjs} +3 -3
- package/dist/_stub.js +23 -23
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BleLhneU.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-wSH7KpHb.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BGNXnwH_.mjs +26 -0
- package/dist/{hostInit-ny0khOL5.mjs → hostInit-nJa6_txV.mjs} +2 -2
- package/dist/model-studio.addon.js +666 -2
- package/dist/model-studio.addon.mjs +666 -2
- package/dist/{player-overlays-ljYzYEn3.mjs → player-overlays-miGdycLL.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-BDi_5uNs.mjs → responsive-DyoB_c2Y.mjs} +1 -1
- package/dist/{scene-monitor-copy-BL2nsF7x.mjs → scene-monitor-copy-DBTY-6gg.mjs} +1 -1
- package/dist/{square-CoH9q721.mjs → square-Bgxk1vlP.mjs} +1 -1
- package/dist/{trash-2-Cxq92wV_.mjs → trash-2-9ynW2pBt.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CRMC3HGj.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CbS0rHPV.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C-FI2Czt.mjs +0 -26
|
@@ -5782,7 +5782,7 @@ var ZodIssueCode = {
|
|
|
5782
5782
|
var ZodFirstPartyTypeKind;
|
|
5783
5783
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5784
5784
|
//#endregion
|
|
5785
|
-
//#region ../types/dist/sleep-
|
|
5785
|
+
//#region ../types/dist/sleep--g-h2_c_.mjs
|
|
5786
5786
|
/**
|
|
5787
5787
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5788
5788
|
* window to float samples (D455).
|
|
@@ -12767,6 +12767,167 @@ var ConvertResultSchema = object({
|
|
|
12767
12767
|
entry: ModelCatalogEntrySchema,
|
|
12768
12768
|
artifacts: array(ConvertArtifactSchema).readonly()
|
|
12769
12769
|
});
|
|
12770
|
+
/**
|
|
12771
|
+
* Device certificates (D855) — the wire contract shared by the hub, the admin
|
|
12772
|
+
* UI and the native viewer.
|
|
12773
|
+
*
|
|
12774
|
+
* A device (a phone) generates its OWN P-256 key pair in hardware (Secure
|
|
12775
|
+
* Enclave / Android Keystore / a non-extractable WebCrypto key). The private
|
|
12776
|
+
* key never travels. The hub signs the PUBLIC key into an X.509 leaf under a
|
|
12777
|
+
* dedicated device CA; the device later proves possession of the key by
|
|
12778
|
+
* signing a hub-issued nonce, and the hub answers with the same session a
|
|
12779
|
+
* password login opens.
|
|
12780
|
+
*
|
|
12781
|
+
* Everything on the wire is a small string (a PEM, a base64url signature):
|
|
12782
|
+
* D613 is about bulk bytes, and a certificate is ~600 bytes.
|
|
12783
|
+
*/
|
|
12784
|
+
/** Signature algorithm of every device credential: ECDSA, curve P-256, SHA-256. */
|
|
12785
|
+
var DEVICE_CERT_SIGNATURE = "ecdsa-p256-sha256";
|
|
12786
|
+
/** First line of every signed message; a change of format bumps the version. */
|
|
12787
|
+
var DEVICE_SIGNATURE_MESSAGE_VERSION = "camstack-device-cert-v1";
|
|
12788
|
+
_enum([
|
|
12789
|
+
"login",
|
|
12790
|
+
"renew",
|
|
12791
|
+
"revoke"
|
|
12792
|
+
]);
|
|
12793
|
+
var DevicePlatformSchema = _enum([
|
|
12794
|
+
"ios",
|
|
12795
|
+
"android",
|
|
12796
|
+
"web",
|
|
12797
|
+
"other"
|
|
12798
|
+
]);
|
|
12799
|
+
var Base64UrlSchema = string().min(1).max(4096).regex(/^[A-Za-z0-9_-]+$/);
|
|
12800
|
+
var PemSchema = string().min(1).max(16384);
|
|
12801
|
+
/**
|
|
12802
|
+
* Why a device-certificate endpoint said no. Distinct from a transport / 5xx
|
|
12803
|
+
* failure: those carry no reason and mean "try again", never "the credential is
|
|
12804
|
+
* dead". The viewer switches on this exhaustively.
|
|
12805
|
+
*/
|
|
12806
|
+
var DeviceRefusalReasonSchema = _enum([
|
|
12807
|
+
"revoked",
|
|
12808
|
+
"unknown-credential",
|
|
12809
|
+
"expired",
|
|
12810
|
+
"bad-signature",
|
|
12811
|
+
"nonce-invalid",
|
|
12812
|
+
"rate-limited",
|
|
12813
|
+
"invalid-certificate",
|
|
12814
|
+
"superseded",
|
|
12815
|
+
"user-gone",
|
|
12816
|
+
"unavailable",
|
|
12817
|
+
"code-invalid",
|
|
12818
|
+
"self-enrollment-disabled",
|
|
12819
|
+
"step-up-required",
|
|
12820
|
+
"bad-public-key"
|
|
12821
|
+
]);
|
|
12822
|
+
var DeviceRefusalSchema = object({
|
|
12823
|
+
ok: literal(false),
|
|
12824
|
+
reason: DeviceRefusalReasonSchema,
|
|
12825
|
+
definitive: boolean(),
|
|
12826
|
+
retryAfterSeconds: number().optional()
|
|
12827
|
+
});
|
|
12828
|
+
object({
|
|
12829
|
+
code: string().min(1).max(256),
|
|
12830
|
+
/** SubjectPublicKeyInfo DER of the device's P-256 public key, base64url. */
|
|
12831
|
+
publicKeySpki: Base64UrlSchema,
|
|
12832
|
+
deviceName: string().min(1).max(80).optional(),
|
|
12833
|
+
platform: DevicePlatformSchema
|
|
12834
|
+
});
|
|
12835
|
+
discriminatedUnion("ok", [object({
|
|
12836
|
+
credentialId: string(),
|
|
12837
|
+
certPem: PemSchema,
|
|
12838
|
+
/** The device CA certificate the leaf chains to. */
|
|
12839
|
+
chainPem: PemSchema,
|
|
12840
|
+
notAfter: number(),
|
|
12841
|
+
user: object({
|
|
12842
|
+
id: string(),
|
|
12843
|
+
username: string()
|
|
12844
|
+
})
|
|
12845
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12846
|
+
object({
|
|
12847
|
+
/** The single-use step-up proof (`auth.deviceEnrollProofFrom…`). */
|
|
12848
|
+
proof: string().min(1).max(512),
|
|
12849
|
+
publicKeySpki: Base64UrlSchema,
|
|
12850
|
+
deviceName: string().min(1).max(80),
|
|
12851
|
+
platform: DevicePlatformSchema
|
|
12852
|
+
});
|
|
12853
|
+
object({
|
|
12854
|
+
proof: string(),
|
|
12855
|
+
expiresAt: number()
|
|
12856
|
+
});
|
|
12857
|
+
discriminatedUnion("ok", [object({
|
|
12858
|
+
nonce: string(),
|
|
12859
|
+
/** The origin to put in the signed message. The app compares it to the hub it dialled. */
|
|
12860
|
+
origin: string(),
|
|
12861
|
+
expiresAt: number(),
|
|
12862
|
+
signature: literal(DEVICE_CERT_SIGNATURE)
|
|
12863
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12864
|
+
object({
|
|
12865
|
+
certPem: PemSchema,
|
|
12866
|
+
nonce: string().min(1).max(256),
|
|
12867
|
+
/** ECDSA P-256 SHA-256 over {@link buildDeviceSignatureMessage}; raw r||s or DER, base64url. */
|
|
12868
|
+
signature: Base64UrlSchema
|
|
12869
|
+
});
|
|
12870
|
+
discriminatedUnion("ok", [object({
|
|
12871
|
+
credentialId: string(),
|
|
12872
|
+
certPem: PemSchema,
|
|
12873
|
+
chainPem: PemSchema,
|
|
12874
|
+
notAfter: number()
|
|
12875
|
+
}).extend({ ok: literal(true) }), DeviceRefusalSchema]);
|
|
12876
|
+
discriminatedUnion("ok", [object({
|
|
12877
|
+
ok: literal(true),
|
|
12878
|
+
credentialId: string(),
|
|
12879
|
+
sessionsEnded: number().int()
|
|
12880
|
+
}), DeviceRefusalSchema]);
|
|
12881
|
+
var DeviceCredentialStatusSchema = _enum([
|
|
12882
|
+
"active",
|
|
12883
|
+
"expired",
|
|
12884
|
+
"revoked"
|
|
12885
|
+
]);
|
|
12886
|
+
var DeviceCredentialSchema = object({
|
|
12887
|
+
id: string(),
|
|
12888
|
+
userId: string(),
|
|
12889
|
+
username: string().nullable(),
|
|
12890
|
+
deviceName: string(),
|
|
12891
|
+
platform: DevicePlatformSchema,
|
|
12892
|
+
enrolledVia: _enum(["qr", "self"]),
|
|
12893
|
+
/** SHA-256 of the leaf certificate DER, colon-hex. */
|
|
12894
|
+
fingerprint: string(),
|
|
12895
|
+
issuedAt: number(),
|
|
12896
|
+
expiresAt: number(),
|
|
12897
|
+
lastUsedAt: number().nullable(),
|
|
12898
|
+
lastUsedFrom: string().nullable(),
|
|
12899
|
+
revokedAt: number().nullable(),
|
|
12900
|
+
/** `admin:<userId>` | `user:<userId>` | `device` | `user-deleted`. */
|
|
12901
|
+
revokedBy: string().nullable(),
|
|
12902
|
+
status: DeviceCredentialStatusSchema
|
|
12903
|
+
});
|
|
12904
|
+
var StartEnrollmentOutputSchema = object({
|
|
12905
|
+
/** Shown once; only its hash is kept. */
|
|
12906
|
+
code: string(),
|
|
12907
|
+
expiresAt: number(),
|
|
12908
|
+
/** `camstack://enroll?hub=…&code=…` — what the QR encodes. */
|
|
12909
|
+
enrollUrl: string(),
|
|
12910
|
+
/** The hub origin in the link, or `null` when the hub could not name one (the link then has no `hub`). */
|
|
12911
|
+
hubOrigin: string().nullable(),
|
|
12912
|
+
/** Every origin the apps may try (role `appConnections`). */
|
|
12913
|
+
hubOrigins: array(string())
|
|
12914
|
+
});
|
|
12915
|
+
object({
|
|
12916
|
+
kind: literal("device-certificate"),
|
|
12917
|
+
id: literal("device-certificate"),
|
|
12918
|
+
label: string(),
|
|
12919
|
+
stage: literal("primary"),
|
|
12920
|
+
/** tRPC paths under the hub's `auth` router, so a client names no literal. */
|
|
12921
|
+
challengePath: literal("auth.getDeviceChallenge"),
|
|
12922
|
+
revokePath: literal("auth.revokeOwnDeviceCertificate"),
|
|
12923
|
+
enrollSelfPath: literal("auth.enrollSelf"),
|
|
12924
|
+
loginPath: literal("auth.loginWithDeviceCertificate"),
|
|
12925
|
+
renewPath: literal("auth.renewDeviceCertificate"),
|
|
12926
|
+
signature: literal(DEVICE_CERT_SIGNATURE),
|
|
12927
|
+
messageVersion: literal(DEVICE_SIGNATURE_MESSAGE_VERSION),
|
|
12928
|
+
/** Which clients can execute it: a native app silently, a browser with a non-extractable WebCrypto key. */
|
|
12929
|
+
clients: array(_enum(["native", "web"]))
|
|
12930
|
+
});
|
|
12770
12931
|
var ExpressionBindingSourceSchema = union([
|
|
12771
12932
|
object({
|
|
12772
12933
|
kind: literal("field").optional(),
|
|
@@ -16367,6 +16528,338 @@ method(object({
|
|
|
16367
16528
|
kind: "mutation",
|
|
16368
16529
|
auth: "admin"
|
|
16369
16530
|
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
16531
|
+
/**
|
|
16532
|
+
* device-history — the ONE mechanism for numeric history (D850).
|
|
16533
|
+
*
|
|
16534
|
+
* A device value is recorded because its capability says so (the `history`
|
|
16535
|
+
* block of a `*.cap.ts`, captured hub-side from `DeviceStateChanged`); any
|
|
16536
|
+
* other series is DECLARED by the addon that produces it and fed with points
|
|
16537
|
+
* (`record`) or closed five-minute buckets (`recordBuckets`). Rollups 5m / 1h /
|
|
16538
|
+
* 1d are computed here and nowhere else. Storage is `history.db` (D851).
|
|
16539
|
+
*
|
|
16540
|
+
* Who the PRODUCER is: `declareSeries`, `record` and `recordBuckets` are owner
|
|
16541
|
+
* checked against the `callerAddonId` the transport stamps into a call that
|
|
16542
|
+
* crossed a process (never in an input schema, so a session cannot supply it).
|
|
16543
|
+
* A call with no stamp is refused `not-owner`. The methods are `admin` so a
|
|
16544
|
+
* non-admin session never reaches them; an addon's `ctx.api` call bypasses the
|
|
16545
|
+
* tier by design.
|
|
16546
|
+
*/
|
|
16547
|
+
/** Whose history: a real device, or a cluster node (load, memory). */
|
|
16548
|
+
var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
|
|
16549
|
+
kind: literal("device"),
|
|
16550
|
+
deviceId: number().int()
|
|
16551
|
+
}), object({
|
|
16552
|
+
kind: literal("node"),
|
|
16553
|
+
nodeId: string().min(1)
|
|
16554
|
+
})]);
|
|
16555
|
+
var DeviceHistoryKindSchema = _enum([
|
|
16556
|
+
"gauge",
|
|
16557
|
+
"counter",
|
|
16558
|
+
"boolean"
|
|
16559
|
+
]);
|
|
16560
|
+
var DeviceHistoryResolutionSchema = _enum([
|
|
16561
|
+
"raw",
|
|
16562
|
+
"5m",
|
|
16563
|
+
"1h",
|
|
16564
|
+
"1d"
|
|
16565
|
+
]);
|
|
16566
|
+
/** Why a producer's point or bucket was not stored. Counted, never silent (D391). */
|
|
16567
|
+
var DeviceHistoryRefusalReasonSchema = _enum([
|
|
16568
|
+
"undeclared",
|
|
16569
|
+
"not-owner",
|
|
16570
|
+
"opted-out",
|
|
16571
|
+
"not-a-real-device",
|
|
16572
|
+
"rate",
|
|
16573
|
+
"ingest-mismatch",
|
|
16574
|
+
"out-of-range"
|
|
16575
|
+
]);
|
|
16576
|
+
var RefusalSchema = object({
|
|
16577
|
+
key: string(),
|
|
16578
|
+
reason: DeviceHistoryRefusalReasonSchema,
|
|
16579
|
+
count: number().int()
|
|
16580
|
+
});
|
|
16581
|
+
var IngestResultSchema = object({
|
|
16582
|
+
accepted: number().int(),
|
|
16583
|
+
refused: array(RefusalSchema).readonly()
|
|
16584
|
+
});
|
|
16585
|
+
var SeriesInfoSchema = object({
|
|
16586
|
+
key: string(),
|
|
16587
|
+
scope: string(),
|
|
16588
|
+
kind: DeviceHistoryKindSchema,
|
|
16589
|
+
/** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
|
|
16590
|
+
unit: string().nullable(),
|
|
16591
|
+
displayName: string(),
|
|
16592
|
+
source: _enum(["cap", "addon"]),
|
|
16593
|
+
firstTs: number(),
|
|
16594
|
+
lastTs: number()
|
|
16595
|
+
});
|
|
16596
|
+
var QueryPointSchema = object({
|
|
16597
|
+
/** Raw: the point's time. Rollup: the bucket start. */
|
|
16598
|
+
t: number(),
|
|
16599
|
+
samples: number().int(),
|
|
16600
|
+
/** `sum / samples`. */
|
|
16601
|
+
mean: number().nullable(),
|
|
16602
|
+
/** Time-weighted mean (`tw_sum / tw_ms`); `null` for bucket-ingested series. For a boolean: the fraction of time true. */
|
|
16603
|
+
twMean: number().nullable(),
|
|
16604
|
+
min: number(),
|
|
16605
|
+
max: number(),
|
|
16606
|
+
/** `null` is unknown, never zero (D393). */
|
|
16607
|
+
last: number().nullable()
|
|
16608
|
+
});
|
|
16609
|
+
var QuerySeriesSchema = object({
|
|
16610
|
+
scope: string(),
|
|
16611
|
+
/** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
|
|
16612
|
+
before: object({
|
|
16613
|
+
t: number(),
|
|
16614
|
+
value: number().nullable()
|
|
16615
|
+
}).nullable(),
|
|
16616
|
+
points: array(QueryPointSchema).readonly()
|
|
16617
|
+
});
|
|
16618
|
+
/** The window part of a query, shared by the device and node forms. */
|
|
16619
|
+
var QueryWindowShape = {
|
|
16620
|
+
key: string(),
|
|
16621
|
+
scope: string().optional(),
|
|
16622
|
+
from: number(),
|
|
16623
|
+
to: number(),
|
|
16624
|
+
resolution: union([DeviceHistoryResolutionSchema, literal("auto")]).default("auto"),
|
|
16625
|
+
maxPoints: number().int().positive().max(5e3).default(1e3)
|
|
16626
|
+
};
|
|
16627
|
+
var QueryResultSchema = object({
|
|
16628
|
+
resolution: DeviceHistoryResolutionSchema,
|
|
16629
|
+
series: array(QuerySeriesSchema).readonly(),
|
|
16630
|
+
truncated: boolean()
|
|
16631
|
+
});
|
|
16632
|
+
var TierStatusSchema = object({
|
|
16633
|
+
tier: DeviceHistoryResolutionSchema,
|
|
16634
|
+
/** `null` until the first background count answered. */
|
|
16635
|
+
rows: number().int().nullable(),
|
|
16636
|
+
/** `rows` times a fixed per-row estimate — approximate, labelled so. */
|
|
16637
|
+
approxBytes: number().nullable(),
|
|
16638
|
+
countedAt: number().nullable()
|
|
16639
|
+
});
|
|
16640
|
+
/** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
|
|
16641
|
+
var DeviceHistoryStatusSchema = object({
|
|
16642
|
+
startedAt: number(),
|
|
16643
|
+
/** The store is declared, series loaded and the first reconcile has answered. */
|
|
16644
|
+
ready: boolean(),
|
|
16645
|
+
series: number().int(),
|
|
16646
|
+
metrics: number().int(),
|
|
16647
|
+
optedOutDevices: number().int(),
|
|
16648
|
+
tiers: array(TierStatusSchema).readonly(),
|
|
16649
|
+
capture: object({
|
|
16650
|
+
eventsSeen: number().int(),
|
|
16651
|
+
pointsEmitted: number().int(),
|
|
16652
|
+
pointsWritten: number().int(),
|
|
16653
|
+
pointsDropped: number().int(),
|
|
16654
|
+
bufferDepth: number().int(),
|
|
16655
|
+
trailingEmitted: number().int(),
|
|
16656
|
+
reconciledPoints: number().int(),
|
|
16657
|
+
reconcileRuns: number().int(),
|
|
16658
|
+
reconcileFailures: number().int(),
|
|
16659
|
+
lastReconcileAt: number().nullable(),
|
|
16660
|
+
lastFlushAt: number().nullable(),
|
|
16661
|
+
flushFailures: number().int(),
|
|
16662
|
+
skipped: record(string(), number().int())
|
|
16663
|
+
}),
|
|
16664
|
+
ingest: object({
|
|
16665
|
+
accepted: number().int(),
|
|
16666
|
+
refused: record(string(), number().int())
|
|
16667
|
+
}),
|
|
16668
|
+
rollup: object({
|
|
16669
|
+
last5mAt: number().nullable(),
|
|
16670
|
+
last1hAt: number().nullable(),
|
|
16671
|
+
last1dAt: number().nullable(),
|
|
16672
|
+
errors: number().int(),
|
|
16673
|
+
dirty5m: number().int(),
|
|
16674
|
+
dirty1h: number().int(),
|
|
16675
|
+
dirty1d: number().int()
|
|
16676
|
+
}),
|
|
16677
|
+
retention: object({
|
|
16678
|
+
lastRunAt: number().nullable(),
|
|
16679
|
+
deleted: record(string(), number().int()),
|
|
16680
|
+
purgedSeries: number().int()
|
|
16681
|
+
}),
|
|
16682
|
+
directory: object({
|
|
16683
|
+
devices: number().int(),
|
|
16684
|
+
lastRefreshAt: number().nullable()
|
|
16685
|
+
})
|
|
16686
|
+
});
|
|
16687
|
+
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
16688
|
+
deviceId: number().int(),
|
|
16689
|
+
...QueryWindowShape
|
|
16690
|
+
}), QueryResultSchema), method(object({
|
|
16691
|
+
nodeId: string().min(1),
|
|
16692
|
+
...QueryWindowShape
|
|
16693
|
+
}), QueryResultSchema, { auth: "admin" }), method(object({
|
|
16694
|
+
name: string().regex(/^[a-z0-9-]+$/),
|
|
16695
|
+
subjectKind: _enum(["device", "node"]),
|
|
16696
|
+
kind: DeviceHistoryKindSchema,
|
|
16697
|
+
unit: string().optional(),
|
|
16698
|
+
displayName: string().min(1),
|
|
16699
|
+
ingest: _enum(["points", "buckets"])
|
|
16700
|
+
}), object({ key: string() }), {
|
|
16701
|
+
kind: "mutation",
|
|
16702
|
+
auth: "admin"
|
|
16703
|
+
}), method(object({ points: array(object({
|
|
16704
|
+
key: string(),
|
|
16705
|
+
subject: DeviceHistorySubjectSchema,
|
|
16706
|
+
scope: string().default(""),
|
|
16707
|
+
ts: number(),
|
|
16708
|
+
value: number()
|
|
16709
|
+
})).max(5e3) }), IngestResultSchema, {
|
|
16710
|
+
kind: "mutation",
|
|
16711
|
+
auth: "admin"
|
|
16712
|
+
}), method(object({ buckets: array(object({
|
|
16713
|
+
key: string(),
|
|
16714
|
+
subject: DeviceHistorySubjectSchema,
|
|
16715
|
+
scope: string().default(""),
|
|
16716
|
+
bucketStart: number(),
|
|
16717
|
+
samples: number().int().positive(),
|
|
16718
|
+
sum: number(),
|
|
16719
|
+
min: number(),
|
|
16720
|
+
max: number(),
|
|
16721
|
+
last: number().nullable(),
|
|
16722
|
+
lastTs: number().nullable()
|
|
16723
|
+
})).max(5e3) }), IngestResultSchema, {
|
|
16724
|
+
kind: "mutation",
|
|
16725
|
+
auth: "admin"
|
|
16726
|
+
}), method(object({ deviceId: number().int() }), object({ enabled: boolean() })), method(object({
|
|
16727
|
+
deviceId: number().int(),
|
|
16728
|
+
enabled: boolean()
|
|
16729
|
+
}), object({ enabled: boolean() }), {
|
|
16730
|
+
kind: "mutation",
|
|
16731
|
+
auth: "admin"
|
|
16732
|
+
}), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
|
|
16733
|
+
var DeviceCaStatusSchema = discriminatedUnion("state", [
|
|
16734
|
+
object({ state: literal("absent") }),
|
|
16735
|
+
object({
|
|
16736
|
+
state: literal("ready"),
|
|
16737
|
+
subject: string(),
|
|
16738
|
+
fingerprintSha256: string(),
|
|
16739
|
+
validTo: string()
|
|
16740
|
+
}),
|
|
16741
|
+
object({
|
|
16742
|
+
state: literal("unavailable"),
|
|
16743
|
+
reason: string()
|
|
16744
|
+
})
|
|
16745
|
+
]);
|
|
16746
|
+
var DeviceCertificateSettingsSchema = object({ selfEnrollment: _enum(["allowed", "disabled"]) });
|
|
16747
|
+
method(object({
|
|
16748
|
+
userId: string().min(1).optional(),
|
|
16749
|
+
includeRevoked: boolean().default(false)
|
|
16750
|
+
}), array(DeviceCredentialSchema).readonly(), { auth: "admin" }), method(object({
|
|
16751
|
+
userId: string().min(1),
|
|
16752
|
+
deviceName: string().min(1).max(80)
|
|
16753
|
+
}), StartEnrollmentOutputSchema, {
|
|
16754
|
+
kind: "mutation",
|
|
16755
|
+
auth: "admin",
|
|
16756
|
+
caller: "required"
|
|
16757
|
+
}), method(object({ id: string().min(1) }), object({
|
|
16758
|
+
revoked: boolean(),
|
|
16759
|
+
sessionsEnded: number().int(),
|
|
16760
|
+
status: DeviceCredentialStatusSchema
|
|
16761
|
+
}), {
|
|
16762
|
+
kind: "mutation",
|
|
16763
|
+
auth: "admin",
|
|
16764
|
+
caller: "required"
|
|
16765
|
+
}), method(object({}), DeviceCertificateSettingsSchema, { auth: "admin" }), method(DeviceCertificateSettingsSchema, DeviceCertificateSettingsSchema, {
|
|
16766
|
+
kind: "mutation",
|
|
16767
|
+
auth: "admin"
|
|
16768
|
+
}), method(object({ id: string().min(1) }), object({ result: _enum([
|
|
16769
|
+
"deleted",
|
|
16770
|
+
"live",
|
|
16771
|
+
"unknown"
|
|
16772
|
+
]) }), {
|
|
16773
|
+
kind: "mutation",
|
|
16774
|
+
auth: "admin",
|
|
16775
|
+
caller: "required"
|
|
16776
|
+
}), method(object({}), DeviceCaStatusSchema, { auth: "admin" }), method(object({
|
|
16777
|
+
id: string().min(1),
|
|
16778
|
+
deviceName: string().min(1).max(80)
|
|
16779
|
+
}), object({ renamed: boolean() }), {
|
|
16780
|
+
kind: "mutation",
|
|
16781
|
+
auth: "admin"
|
|
16782
|
+
});
|
|
16783
|
+
/**
|
|
16784
|
+
* `node-certificates` - what a node holds and the two renewals the hub drives
|
|
16785
|
+
* (D856): the node's MESH leaf (mutual TLS to the hub) and its HTTPS leaf (issued
|
|
16786
|
+
* from the hub's local CA so a device that trusts the hub root trusts the node).
|
|
16787
|
+
*
|
|
16788
|
+
* Provided by the AGENT RUNTIME (the synthetic `agent-runtime` addon id, like
|
|
16789
|
+
* `server-management`): the hub reaches it through the ordinary node-pinned
|
|
16790
|
+
* capability call - no new Moleculer action. The hub's own certificates are
|
|
16791
|
+
* handled in-process by the hub (`certificates` router), so this cap has no hub
|
|
16792
|
+
* provider.
|
|
16793
|
+
*
|
|
16794
|
+
* No private key ever crosses the mesh: the node generates its key pair, sends a
|
|
16795
|
+
* CSR, and the hub returns only the signed certificate.
|
|
16796
|
+
*/
|
|
16797
|
+
var MeshLeafInfoSchema = object({
|
|
16798
|
+
cn: string(),
|
|
16799
|
+
serial: string(),
|
|
16800
|
+
fingerprintSha256: string(),
|
|
16801
|
+
notBefore: number(),
|
|
16802
|
+
notAfter: number()
|
|
16803
|
+
});
|
|
16804
|
+
var HttpsLeafInfoSchema = object({
|
|
16805
|
+
fingerprintSha256: string(),
|
|
16806
|
+
issuer: string(),
|
|
16807
|
+
sans: array(string()),
|
|
16808
|
+
notBefore: number(),
|
|
16809
|
+
notAfter: number()
|
|
16810
|
+
});
|
|
16811
|
+
var NodeHttpsStateSchema = discriminatedUnion("state", [object({
|
|
16812
|
+
state: literal("served"),
|
|
16813
|
+
leaf: HttpsLeafInfoSchema
|
|
16814
|
+
}), object({
|
|
16815
|
+
state: literal("not-issued"),
|
|
16816
|
+
reason: string()
|
|
16817
|
+
})]);
|
|
16818
|
+
method(object({}), object({
|
|
16819
|
+
nodeId: string(),
|
|
16820
|
+
mesh: MeshLeafInfoSchema.nullable(),
|
|
16821
|
+
https: NodeHttpsStateSchema
|
|
16822
|
+
}), { auth: "admin" }), method(object({}), object({ csrPem: string() }), {
|
|
16823
|
+
kind: "mutation",
|
|
16824
|
+
auth: "admin"
|
|
16825
|
+
}), method(object({
|
|
16826
|
+
certPem: string().min(1),
|
|
16827
|
+
caCertPem: string().min(1),
|
|
16828
|
+
confirmWithinMs: number().int().min(1e4).max(6e5)
|
|
16829
|
+
}), object({
|
|
16830
|
+
fingerprintSha256: string(),
|
|
16831
|
+
serial: string()
|
|
16832
|
+
}), {
|
|
16833
|
+
kind: "mutation",
|
|
16834
|
+
auth: "admin"
|
|
16835
|
+
}), method(object({ fingerprintSha256: string() }), object({ confirmed: boolean() }), {
|
|
16836
|
+
kind: "mutation",
|
|
16837
|
+
auth: "admin"
|
|
16838
|
+
}), method(object({}), object({ rolledBack: boolean() }), {
|
|
16839
|
+
kind: "mutation",
|
|
16840
|
+
auth: "admin"
|
|
16841
|
+
}), method(object({}), object({
|
|
16842
|
+
csrPem: string(),
|
|
16843
|
+
hostnames: array(string()),
|
|
16844
|
+
addresses: array(string()),
|
|
16845
|
+
/** SHA-256 of the hub local CA this node pinned at its first install; `null` before one. */
|
|
16846
|
+
pinnedCaFingerprintSha256: string().nullable()
|
|
16847
|
+
}), {
|
|
16848
|
+
kind: "mutation",
|
|
16849
|
+
auth: "admin"
|
|
16850
|
+
}), method(object({
|
|
16851
|
+
certPem: string().min(1),
|
|
16852
|
+
caCertPem: string().min(1),
|
|
16853
|
+
/**
|
|
16854
|
+
* The hub signals that its local CA was rotated (D227) and this leaf chains to the NEW
|
|
16855
|
+
* one. Only the hub, over the authenticated mesh, can say so; a leaf with a different CA
|
|
16856
|
+
* and no signal is refused.
|
|
16857
|
+
*/
|
|
16858
|
+
caRotation: boolean().optional()
|
|
16859
|
+
}), HttpsLeafInfoSchema, {
|
|
16860
|
+
kind: "mutation",
|
|
16861
|
+
auth: "admin"
|
|
16862
|
+
});
|
|
16370
16863
|
var KeychainKeySourceSchema = object({
|
|
16371
16864
|
kind: _enum([
|
|
16372
16865
|
"config-file",
|
|
@@ -55069,7 +55562,7 @@ var MotionOnMotionChangedDataSchema = object({
|
|
|
55069
55562
|
/** Who started it (D672). Absent = the camera itself. Only `onboard` carries `sensor`. */
|
|
55070
55563
|
triggeredBy: MotionTriggeredBySchema.optional()
|
|
55071
55564
|
});
|
|
55072
|
-
DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean());
|
|
55565
|
+
DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean()), DeviceType.Camera;
|
|
55073
55566
|
object({
|
|
55074
55567
|
enabled: boolean(),
|
|
55075
55568
|
/** Ms epoch of the last operator-driven change. */
|
|
@@ -62374,6 +62867,54 @@ Object.freeze({
|
|
|
62374
62867
|
addonId: null,
|
|
62375
62868
|
access: "create"
|
|
62376
62869
|
},
|
|
62870
|
+
"deviceCredentials.deleteDeviceCredential": {
|
|
62871
|
+
capName: "device-credentials",
|
|
62872
|
+
capScope: "system",
|
|
62873
|
+
addonId: null,
|
|
62874
|
+
access: "delete"
|
|
62875
|
+
},
|
|
62876
|
+
"deviceCredentials.getDeviceCaStatus": {
|
|
62877
|
+
capName: "device-credentials",
|
|
62878
|
+
capScope: "system",
|
|
62879
|
+
addonId: null,
|
|
62880
|
+
access: "view"
|
|
62881
|
+
},
|
|
62882
|
+
"deviceCredentials.getDeviceCertificateSettings": {
|
|
62883
|
+
capName: "device-credentials",
|
|
62884
|
+
capScope: "system",
|
|
62885
|
+
addonId: null,
|
|
62886
|
+
access: "view"
|
|
62887
|
+
},
|
|
62888
|
+
"deviceCredentials.listDeviceCredentials": {
|
|
62889
|
+
capName: "device-credentials",
|
|
62890
|
+
capScope: "system",
|
|
62891
|
+
addonId: null,
|
|
62892
|
+
access: "view"
|
|
62893
|
+
},
|
|
62894
|
+
"deviceCredentials.renameDeviceCredential": {
|
|
62895
|
+
capName: "device-credentials",
|
|
62896
|
+
capScope: "system",
|
|
62897
|
+
addonId: null,
|
|
62898
|
+
access: "create"
|
|
62899
|
+
},
|
|
62900
|
+
"deviceCredentials.revokeDeviceCredential": {
|
|
62901
|
+
capName: "device-credentials",
|
|
62902
|
+
capScope: "system",
|
|
62903
|
+
addonId: null,
|
|
62904
|
+
access: "delete"
|
|
62905
|
+
},
|
|
62906
|
+
"deviceCredentials.setDeviceCertificateSettings": {
|
|
62907
|
+
capName: "device-credentials",
|
|
62908
|
+
capScope: "system",
|
|
62909
|
+
addonId: null,
|
|
62910
|
+
access: "create"
|
|
62911
|
+
},
|
|
62912
|
+
"deviceCredentials.startEnrollment": {
|
|
62913
|
+
capName: "device-credentials",
|
|
62914
|
+
capScope: "system",
|
|
62915
|
+
addonId: null,
|
|
62916
|
+
access: "create"
|
|
62917
|
+
},
|
|
62377
62918
|
"deviceDiscovery.adoptDevice": {
|
|
62378
62919
|
capName: "device-discovery",
|
|
62379
62920
|
capScope: "device",
|
|
@@ -62476,6 +63017,66 @@ Object.freeze({
|
|
|
62476
63017
|
addonId: null,
|
|
62477
63018
|
access: "create"
|
|
62478
63019
|
},
|
|
63020
|
+
"deviceHistory.declareSeries": {
|
|
63021
|
+
capName: "device-history",
|
|
63022
|
+
capScope: "system",
|
|
63023
|
+
addonId: null,
|
|
63024
|
+
access: "create"
|
|
63025
|
+
},
|
|
63026
|
+
"deviceHistory.getDeviceEnabled": {
|
|
63027
|
+
capName: "device-history",
|
|
63028
|
+
capScope: "system",
|
|
63029
|
+
addonId: null,
|
|
63030
|
+
access: "view"
|
|
63031
|
+
},
|
|
63032
|
+
"deviceHistory.getStatus": {
|
|
63033
|
+
capName: "device-history",
|
|
63034
|
+
capScope: "system",
|
|
63035
|
+
addonId: null,
|
|
63036
|
+
access: "view"
|
|
63037
|
+
},
|
|
63038
|
+
"deviceHistory.listNodeSeries": {
|
|
63039
|
+
capName: "device-history",
|
|
63040
|
+
capScope: "system",
|
|
63041
|
+
addonId: null,
|
|
63042
|
+
access: "view"
|
|
63043
|
+
},
|
|
63044
|
+
"deviceHistory.listSeries": {
|
|
63045
|
+
capName: "device-history",
|
|
63046
|
+
capScope: "system",
|
|
63047
|
+
addonId: null,
|
|
63048
|
+
access: "view"
|
|
63049
|
+
},
|
|
63050
|
+
"deviceHistory.query": {
|
|
63051
|
+
capName: "device-history",
|
|
63052
|
+
capScope: "system",
|
|
63053
|
+
addonId: null,
|
|
63054
|
+
access: "view"
|
|
63055
|
+
},
|
|
63056
|
+
"deviceHistory.queryNode": {
|
|
63057
|
+
capName: "device-history",
|
|
63058
|
+
capScope: "system",
|
|
63059
|
+
addonId: null,
|
|
63060
|
+
access: "view"
|
|
63061
|
+
},
|
|
63062
|
+
"deviceHistory.record": {
|
|
63063
|
+
capName: "device-history",
|
|
63064
|
+
capScope: "system",
|
|
63065
|
+
addonId: null,
|
|
63066
|
+
access: "create"
|
|
63067
|
+
},
|
|
63068
|
+
"deviceHistory.recordBuckets": {
|
|
63069
|
+
capName: "device-history",
|
|
63070
|
+
capScope: "system",
|
|
63071
|
+
addonId: null,
|
|
63072
|
+
access: "create"
|
|
63073
|
+
},
|
|
63074
|
+
"deviceHistory.setDeviceEnabled": {
|
|
63075
|
+
capName: "device-history",
|
|
63076
|
+
capScope: "system",
|
|
63077
|
+
addonId: null,
|
|
63078
|
+
access: "create"
|
|
63079
|
+
},
|
|
62479
63080
|
"deviceManager.addLocation": {
|
|
62480
63081
|
capName: "device-manager",
|
|
62481
63082
|
capScope: "system",
|
|
@@ -64534,6 +65135,48 @@ Object.freeze({
|
|
|
64534
65135
|
addonId: null,
|
|
64535
65136
|
access: "create"
|
|
64536
65137
|
},
|
|
65138
|
+
"nodeCertificates.confirmMeshLeaf": {
|
|
65139
|
+
capName: "node-certificates",
|
|
65140
|
+
capScope: "system",
|
|
65141
|
+
addonId: null,
|
|
65142
|
+
access: "create"
|
|
65143
|
+
},
|
|
65144
|
+
"nodeCertificates.getCertificates": {
|
|
65145
|
+
capName: "node-certificates",
|
|
65146
|
+
capScope: "system",
|
|
65147
|
+
addonId: null,
|
|
65148
|
+
access: "view"
|
|
65149
|
+
},
|
|
65150
|
+
"nodeCertificates.installHttpsCertificate": {
|
|
65151
|
+
capName: "node-certificates",
|
|
65152
|
+
capScope: "system",
|
|
65153
|
+
addonId: null,
|
|
65154
|
+
access: "create"
|
|
65155
|
+
},
|
|
65156
|
+
"nodeCertificates.installMeshLeaf": {
|
|
65157
|
+
capName: "node-certificates",
|
|
65158
|
+
capScope: "system",
|
|
65159
|
+
addonId: null,
|
|
65160
|
+
access: "create"
|
|
65161
|
+
},
|
|
65162
|
+
"nodeCertificates.prepareHttpsCertificate": {
|
|
65163
|
+
capName: "node-certificates",
|
|
65164
|
+
capScope: "system",
|
|
65165
|
+
addonId: null,
|
|
65166
|
+
access: "create"
|
|
65167
|
+
},
|
|
65168
|
+
"nodeCertificates.prepareMeshRenewal": {
|
|
65169
|
+
capName: "node-certificates",
|
|
65170
|
+
capScope: "system",
|
|
65171
|
+
addonId: null,
|
|
65172
|
+
access: "create"
|
|
65173
|
+
},
|
|
65174
|
+
"nodeCertificates.rollbackMeshLeaf": {
|
|
65175
|
+
capName: "node-certificates",
|
|
65176
|
+
capScope: "system",
|
|
65177
|
+
addonId: null,
|
|
65178
|
+
access: "create"
|
|
65179
|
+
},
|
|
64537
65180
|
"nodes.clusterAddonStatus": {
|
|
64538
65181
|
capName: "nodes",
|
|
64539
65182
|
capScope: "system",
|
|
@@ -69225,6 +69868,26 @@ Object.freeze({
|
|
|
69225
69868
|
form: "single",
|
|
69226
69869
|
optional: false
|
|
69227
69870
|
}],
|
|
69871
|
+
"deviceHistory.getDeviceEnabled": [{
|
|
69872
|
+
name: "deviceId",
|
|
69873
|
+
form: "single",
|
|
69874
|
+
optional: false
|
|
69875
|
+
}],
|
|
69876
|
+
"deviceHistory.listSeries": [{
|
|
69877
|
+
name: "deviceId",
|
|
69878
|
+
form: "single",
|
|
69879
|
+
optional: false
|
|
69880
|
+
}],
|
|
69881
|
+
"deviceHistory.query": [{
|
|
69882
|
+
name: "deviceId",
|
|
69883
|
+
form: "single",
|
|
69884
|
+
optional: false
|
|
69885
|
+
}],
|
|
69886
|
+
"deviceHistory.setDeviceEnabled": [{
|
|
69887
|
+
name: "deviceId",
|
|
69888
|
+
form: "single",
|
|
69889
|
+
optional: false
|
|
69890
|
+
}],
|
|
69228
69891
|
"deviceManager.adoptionRelease": [{
|
|
69229
69892
|
name: "camDeviceId",
|
|
69230
69893
|
form: "single",
|
|
@@ -71403,6 +72066,7 @@ Object.freeze({
|
|
|
71403
72066
|
"network-access": "ingress",
|
|
71404
72067
|
"smtp-provider": "email"
|
|
71405
72068
|
});
|
|
72069
|
+
DeviceType.Camera;
|
|
71406
72070
|
var G711_SCALE_CORRECTION_DB = {
|
|
71407
72071
|
PCMU: 20 * Math.log10(4),
|
|
71408
72072
|
PCMA: 20 * Math.log10(8)
|