@camstack/addon-provider-unifi 0.2.122 → 0.2.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +203 -10
- package/dist/addon.mjs +203 -10
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5370,7 +5370,7 @@ var ZodIssueCode = {
|
|
|
5370
5370
|
var ZodFirstPartyTypeKind;
|
|
5371
5371
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5372
5372
|
//#endregion
|
|
5373
|
-
//#region ../types/dist/sleep-
|
|
5373
|
+
//#region ../types/dist/sleep-B0JG7-_F.mjs
|
|
5374
5374
|
/**
|
|
5375
5375
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5376
5376
|
* window to float samples (D455).
|
|
@@ -15192,6 +15192,10 @@ var DeviceInfoSchema = object({
|
|
|
15192
15192
|
isCamera: boolean(),
|
|
15193
15193
|
/** Current config values — serializable snapshot */
|
|
15194
15194
|
config: record(string(), unknown()),
|
|
15195
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
15196
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
15197
|
+
* when the owning runner has not reported them. */
|
|
15198
|
+
secretConfigPaths: array(string()).optional(),
|
|
15195
15199
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
15196
15200
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
15197
15201
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -15397,7 +15401,13 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15397
15401
|
* call (workers re-register on init), so probe-driven updates
|
|
15398
15402
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
15399
15403
|
features: array(string()).optional(),
|
|
15400
|
-
config: record(string(), unknown())
|
|
15404
|
+
config: record(string(), unknown()),
|
|
15405
|
+
/** Config paths the device's own schema DECLARES secret
|
|
15406
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
15407
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
15408
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
15409
|
+
* omits it and the keyword backstop applies. */
|
|
15410
|
+
secretConfigPaths: array(string()).optional()
|
|
15401
15411
|
});
|
|
15402
15412
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15403
15413
|
var DevicePersistConfigPayloadSchema = object({
|
|
@@ -17056,7 +17066,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
17056
17066
|
icon: string().optional(),
|
|
17057
17067
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
17058
17068
|
startUrl: string(),
|
|
17059
|
-
stage: LoginStageEnum
|
|
17069
|
+
stage: LoginStageEnum,
|
|
17070
|
+
/**
|
|
17071
|
+
* The provider names an external identity a signed-in user can link to
|
|
17072
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
17073
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
17074
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
17075
|
+
*/
|
|
17076
|
+
linkable: boolean().optional()
|
|
17060
17077
|
}),
|
|
17061
17078
|
object({
|
|
17062
17079
|
kind: literal("widget"),
|
|
@@ -22491,7 +22508,13 @@ var RetrainFrameSchema = object({
|
|
|
22491
22508
|
sizeBytes: number().int(),
|
|
22492
22509
|
width: number().int(),
|
|
22493
22510
|
height: number().int(),
|
|
22494
|
-
copiedAt: number()
|
|
22511
|
+
copiedAt: number(),
|
|
22512
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
22513
|
+
capturedAt: number().optional(),
|
|
22514
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
22515
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
22516
|
+
* a false positive. */
|
|
22517
|
+
complete: boolean()
|
|
22495
22518
|
});
|
|
22496
22519
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
22497
22520
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -22512,6 +22535,51 @@ var RetrainFrameListSchema = object({
|
|
|
22512
22535
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
22513
22536
|
autoPickMediaId: number().int().optional()
|
|
22514
22537
|
});
|
|
22538
|
+
/**
|
|
22539
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
22540
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
22541
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
22542
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
22543
|
+
* export carried (`exportedInBatch`).
|
|
22544
|
+
*/
|
|
22545
|
+
var RetrainExportFilterSchema = object({
|
|
22546
|
+
deviceIds: array(number()).optional(),
|
|
22547
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
22548
|
+
batchId: string().optional(),
|
|
22549
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
22550
|
+
completeOnly: boolean().optional()
|
|
22551
|
+
});
|
|
22552
|
+
/**
|
|
22553
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
22554
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
22555
|
+
* convention — the classifier layout.
|
|
22556
|
+
*/
|
|
22557
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
22558
|
+
/**
|
|
22559
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
22560
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
22561
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
22562
|
+
* logged.
|
|
22563
|
+
*/
|
|
22564
|
+
var RetrainArchiveTargetSchema = object({
|
|
22565
|
+
kind: literal("http"),
|
|
22566
|
+
method: _enum(["PUT", "POST"]),
|
|
22567
|
+
url: string().url(),
|
|
22568
|
+
headers: record(string(), string()).optional()
|
|
22569
|
+
});
|
|
22570
|
+
var RetrainArchiveResultSchema = object({
|
|
22571
|
+
batchId: string(),
|
|
22572
|
+
frames: number().int(),
|
|
22573
|
+
crops: number().int(),
|
|
22574
|
+
annotations: number().int(),
|
|
22575
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
22576
|
+
missing: number().int(),
|
|
22577
|
+
bytes: number().int(),
|
|
22578
|
+
/** sha256 of the exact bytes sent. */
|
|
22579
|
+
sha256: string(),
|
|
22580
|
+
/** The target's HTTP status. */
|
|
22581
|
+
status: number().int()
|
|
22582
|
+
});
|
|
22515
22583
|
/** What the operator asked the assist to look for. */
|
|
22516
22584
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
22517
22585
|
kind: literal("package"),
|
|
@@ -23306,9 +23374,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23306
23374
|
}), RetrainTransitionResultSchema, {
|
|
23307
23375
|
kind: "mutation",
|
|
23308
23376
|
auth: "admin"
|
|
23309
|
-
}), method(
|
|
23377
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
23310
23378
|
kind: "query",
|
|
23311
23379
|
auth: "admin"
|
|
23380
|
+
}), method(object({
|
|
23381
|
+
deviceId: number(),
|
|
23382
|
+
trackId: string(),
|
|
23383
|
+
frameId: string(),
|
|
23384
|
+
complete: boolean()
|
|
23385
|
+
}), RetrainFrameSchema, {
|
|
23386
|
+
kind: "mutation",
|
|
23387
|
+
auth: "admin"
|
|
23388
|
+
}), method(object({
|
|
23389
|
+
filter: RetrainExportFilterSchema,
|
|
23390
|
+
layout: RetrainExportLayoutSchema,
|
|
23391
|
+
target: RetrainArchiveTargetSchema
|
|
23392
|
+
}), RetrainArchiveResultSchema, {
|
|
23393
|
+
kind: "mutation",
|
|
23394
|
+
auth: "admin",
|
|
23395
|
+
timeoutMs: 60 * 6e4
|
|
23312
23396
|
}), method(object({
|
|
23313
23397
|
/** Which of the three event tables owns the row. */
|
|
23314
23398
|
ownerType: EventOwnerTypeSchema,
|
|
@@ -26638,7 +26722,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
26638
26722
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
26639
26723
|
* operator already consented to.
|
|
26640
26724
|
*/
|
|
26641
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
26725
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
26726
|
+
/**
|
|
26727
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
26728
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
26729
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
26730
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
26731
|
+
*/
|
|
26732
|
+
linkIntent: string().optional(),
|
|
26733
|
+
/**
|
|
26734
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
26735
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
26736
|
+
*/
|
|
26737
|
+
issuer: string().optional()
|
|
26642
26738
|
});
|
|
26643
26739
|
method(object({
|
|
26644
26740
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -28573,7 +28669,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28573
28669
|
* field their hints were silently stripped by the schema and the
|
|
28574
28670
|
* adaptive ladder started blind on the client's display size.
|
|
28575
28671
|
*/
|
|
28576
|
-
hints: webrtcClientHintsSchema.optional()
|
|
28672
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
28673
|
+
/**
|
|
28674
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
28675
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
28676
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
28677
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
28678
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
28679
|
+
*
|
|
28680
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
28681
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
28682
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
28683
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
28684
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
28685
|
+
* flag must not become a second door to the camera's speaker.
|
|
28686
|
+
*/
|
|
28687
|
+
talkback: boolean().optional()
|
|
28577
28688
|
}), object({
|
|
28578
28689
|
sessionId: string(),
|
|
28579
28690
|
sdpAnswer: string()
|
|
@@ -38944,6 +39055,32 @@ var TotpStatusSchema = object({
|
|
|
38944
39055
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
38945
39056
|
confirmedAt: number().nullable()
|
|
38946
39057
|
});
|
|
39058
|
+
/**
|
|
39059
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
39060
|
+
* and scoped tokens.
|
|
39061
|
+
*
|
|
39062
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
39063
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
39064
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
39065
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
39066
|
+
* provider.
|
|
39067
|
+
*/
|
|
39068
|
+
var ExternalIdentitySchema = object({
|
|
39069
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
39070
|
+
provider: string(),
|
|
39071
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
39072
|
+
subject: string(),
|
|
39073
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
39074
|
+
issuer: string(),
|
|
39075
|
+
userId: string(),
|
|
39076
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
39077
|
+
label: string().optional(),
|
|
39078
|
+
linkedAt: number()
|
|
39079
|
+
});
|
|
39080
|
+
var ExternalIdentityKeySchema = object({
|
|
39081
|
+
provider: string().min(1),
|
|
39082
|
+
subject: string().min(1)
|
|
39083
|
+
});
|
|
38947
39084
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
38948
39085
|
kind: "mutation",
|
|
38949
39086
|
auth: "admin",
|
|
@@ -39057,7 +39194,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
39057
39194
|
userId: string(),
|
|
39058
39195
|
username: string(),
|
|
39059
39196
|
scopes: array(TokenScopeSchema)
|
|
39060
|
-
}).nullable(), { access: "view" }), method(
|
|
39197
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
39198
|
+
userId: string(),
|
|
39199
|
+
issuer: string()
|
|
39200
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
39201
|
+
userId: string(),
|
|
39202
|
+
issuer: string().min(1),
|
|
39203
|
+
label: string().optional()
|
|
39204
|
+
}), object({ success: literal(true) }), {
|
|
39205
|
+
kind: "mutation",
|
|
39206
|
+
auth: "admin",
|
|
39207
|
+
access: "create"
|
|
39208
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
39209
|
+
kind: "mutation",
|
|
39210
|
+
auth: "admin",
|
|
39211
|
+
access: "delete"
|
|
39212
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
39061
39213
|
kind: "mutation",
|
|
39062
39214
|
auth: "admin",
|
|
39063
39215
|
access: "delete"
|
|
@@ -45697,6 +45849,12 @@ Object.freeze({
|
|
|
45697
45849
|
addonId: null,
|
|
45698
45850
|
access: "create"
|
|
45699
45851
|
},
|
|
45852
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
45853
|
+
capName: "pipeline-analytics",
|
|
45854
|
+
capScope: "device",
|
|
45855
|
+
addonId: null,
|
|
45856
|
+
access: "create"
|
|
45857
|
+
},
|
|
45700
45858
|
"pipelineAnalytics.setTrackFlags": {
|
|
45701
45859
|
capName: "pipeline-analytics",
|
|
45702
45860
|
capScope: "device",
|
|
@@ -45733,6 +45891,12 @@ Object.freeze({
|
|
|
45733
45891
|
addonId: null,
|
|
45734
45892
|
access: "delete"
|
|
45735
45893
|
},
|
|
45894
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
45895
|
+
capName: "pipeline-analytics",
|
|
45896
|
+
capScope: "device",
|
|
45897
|
+
addonId: null,
|
|
45898
|
+
access: "create"
|
|
45899
|
+
},
|
|
45736
45900
|
"pipelineExecutor.cacheFrameInPool": {
|
|
45737
45901
|
capName: "pipeline-executor",
|
|
45738
45902
|
capScope: "system",
|
|
@@ -48085,18 +48249,36 @@ Object.freeze({
|
|
|
48085
48249
|
addonId: null,
|
|
48086
48250
|
access: "delete"
|
|
48087
48251
|
},
|
|
48252
|
+
"userManagement.findUserByExternalIdentity": {
|
|
48253
|
+
capName: "user-management",
|
|
48254
|
+
capScope: "system",
|
|
48255
|
+
addonId: null,
|
|
48256
|
+
access: "view"
|
|
48257
|
+
},
|
|
48088
48258
|
"userManagement.getTotpStatus": {
|
|
48089
48259
|
capName: "user-management",
|
|
48090
48260
|
capScope: "system",
|
|
48091
48261
|
addonId: null,
|
|
48092
48262
|
access: "view"
|
|
48093
48263
|
},
|
|
48264
|
+
"userManagement.linkExternalIdentity": {
|
|
48265
|
+
capName: "user-management",
|
|
48266
|
+
capScope: "system",
|
|
48267
|
+
addonId: null,
|
|
48268
|
+
access: "create"
|
|
48269
|
+
},
|
|
48094
48270
|
"userManagement.listApiKeys": {
|
|
48095
48271
|
capName: "user-management",
|
|
48096
48272
|
capScope: "system",
|
|
48097
48273
|
addonId: null,
|
|
48098
48274
|
access: "view"
|
|
48099
48275
|
},
|
|
48276
|
+
"userManagement.listExternalIdentities": {
|
|
48277
|
+
capName: "user-management",
|
|
48278
|
+
capScope: "system",
|
|
48279
|
+
addonId: null,
|
|
48280
|
+
access: "view"
|
|
48281
|
+
},
|
|
48100
48282
|
"userManagement.listOauthSessions": {
|
|
48101
48283
|
capName: "user-management",
|
|
48102
48284
|
capScope: "system",
|
|
@@ -48175,6 +48357,12 @@ Object.freeze({
|
|
|
48175
48357
|
addonId: null,
|
|
48176
48358
|
access: "create"
|
|
48177
48359
|
},
|
|
48360
|
+
"userManagement.unlinkExternalIdentity": {
|
|
48361
|
+
capName: "user-management",
|
|
48362
|
+
capScope: "system",
|
|
48363
|
+
addonId: null,
|
|
48364
|
+
access: "delete"
|
|
48365
|
+
},
|
|
48178
48366
|
"userManagement.updateUser": {
|
|
48179
48367
|
capName: "user-management",
|
|
48180
48368
|
capScope: "system",
|
|
@@ -51514,6 +51702,11 @@ Object.freeze({
|
|
|
51514
51702
|
form: "single",
|
|
51515
51703
|
optional: false
|
|
51516
51704
|
}],
|
|
51705
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
51706
|
+
name: "deviceId",
|
|
51707
|
+
form: "single",
|
|
51708
|
+
optional: false
|
|
51709
|
+
}],
|
|
51517
51710
|
"pipelineAnalytics.setTrackFlags": [{
|
|
51518
51711
|
name: "deviceId",
|
|
51519
51712
|
form: "single",
|
|
@@ -53577,9 +53770,9 @@ var MB = 1024 * 1024;
|
|
|
53577
53770
|
var unifiConnectionSchema = object({
|
|
53578
53771
|
host: string().min(1).describe("Controller host name or IP address"),
|
|
53579
53772
|
port: preprocess((v) => v === "" || v === null ? void 0 : v, number().int().min(1).max(65535).default(443)).describe("Controller HTTPS port (443 on UniFi OS, 8443 on legacy)"),
|
|
53580
|
-
apiKey: string().default("").describe("UniFi OS API key (preferred). Leave blank to use username + password."),
|
|
53773
|
+
apiKey: string().default("").describe("UniFi OS API key (preferred). Leave blank to use username + password.").meta({ secret: true }),
|
|
53581
53774
|
username: string().default("").describe("Local admin username (when no API key)"),
|
|
53582
|
-
password: string().default("").describe("Local admin password (when no API key)"),
|
|
53775
|
+
password: string().default("").describe("Local admin password (when no API key)").meta({ secret: true }),
|
|
53583
53776
|
site: string().default("default").describe("Controller site name"),
|
|
53584
53777
|
pollIntervalMs: preprocess((v) => v === "" || v === null ? void 0 : v, number().int().min(2e3).max(36e5).default(3e4)).describe("Infra + client poll interval (ms)")
|
|
53585
53778
|
});
|
package/dist/addon.mjs
CHANGED
|
@@ -5369,7 +5369,7 @@ var ZodIssueCode = {
|
|
|
5369
5369
|
var ZodFirstPartyTypeKind;
|
|
5370
5370
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5371
5371
|
//#endregion
|
|
5372
|
-
//#region ../types/dist/sleep-
|
|
5372
|
+
//#region ../types/dist/sleep-B0JG7-_F.mjs
|
|
5373
5373
|
/**
|
|
5374
5374
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5375
5375
|
* window to float samples (D455).
|
|
@@ -15191,6 +15191,10 @@ var DeviceInfoSchema = object({
|
|
|
15191
15191
|
isCamera: boolean(),
|
|
15192
15192
|
/** Current config values — serializable snapshot */
|
|
15193
15193
|
config: record(string(), unknown()),
|
|
15194
|
+
/** Paths inside `config` the device's schema declares secret (D783) —
|
|
15195
|
+
* what the non-admin redaction withholds. Paths, never values. Absent
|
|
15196
|
+
* when the owning runner has not reported them. */
|
|
15197
|
+
secretConfigPaths: array(string()).optional(),
|
|
15194
15198
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
15195
15199
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
15196
15200
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
@@ -15396,7 +15400,13 @@ var DeviceRegisterPayloadSchema = object({
|
|
|
15396
15400
|
* call (workers re-register on init), so probe-driven updates
|
|
15397
15401
|
* (e.g. PTZ flag flipping after the abilities probe) propagate. */
|
|
15398
15402
|
features: array(string()).optional(),
|
|
15399
|
-
config: record(string(), unknown())
|
|
15403
|
+
config: record(string(), unknown()),
|
|
15404
|
+
/** Config paths the device's own schema DECLARES secret
|
|
15405
|
+
* (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
|
|
15406
|
+
* `connection.password`). Re-published on every register; the non-admin
|
|
15407
|
+
* redaction withholds them at any depth (D783). Optional: an older runner
|
|
15408
|
+
* omits it and the keyword backstop applies. */
|
|
15409
|
+
secretConfigPaths: array(string()).optional()
|
|
15400
15410
|
});
|
|
15401
15411
|
var DeviceRemovePayloadSchema = object({ deviceId: number() });
|
|
15402
15412
|
var DevicePersistConfigPayloadSchema = object({
|
|
@@ -17055,7 +17065,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
17055
17065
|
icon: string().optional(),
|
|
17056
17066
|
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
17057
17067
|
startUrl: string(),
|
|
17058
|
-
stage: LoginStageEnum
|
|
17068
|
+
stage: LoginStageEnum,
|
|
17069
|
+
/**
|
|
17070
|
+
* The provider names an external identity a signed-in user can link to
|
|
17071
|
+
* their own account (D782): `auth.listLinkableProviders` /
|
|
17072
|
+
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
17073
|
+
* whatever their id. Absent / false — a login button only (magic-link).
|
|
17074
|
+
*/
|
|
17075
|
+
linkable: boolean().optional()
|
|
17059
17076
|
}),
|
|
17060
17077
|
object({
|
|
17061
17078
|
kind: literal("widget"),
|
|
@@ -22490,7 +22507,13 @@ var RetrainFrameSchema = object({
|
|
|
22490
22507
|
sizeBytes: number().int(),
|
|
22491
22508
|
width: number().int(),
|
|
22492
22509
|
height: number().int(),
|
|
22493
|
-
copiedAt: number()
|
|
22510
|
+
copiedAt: number(),
|
|
22511
|
+
/** When the CAMERA captured the frame. Absent on a copy taken before D785. */
|
|
22512
|
+
capturedAt: number().optional(),
|
|
22513
|
+
/** The operator's "every subject in this frame is boxed". Detector
|
|
22514
|
+
* evaluation keeps only complete frames: an unboxed subject would count as
|
|
22515
|
+
* a false positive. */
|
|
22516
|
+
complete: boolean()
|
|
22494
22517
|
});
|
|
22495
22518
|
/** Why a copy-on-select could not be honoured — named, never a silent skip. */
|
|
22496
22519
|
var RetrainCopyRefusalSchema = _enum([
|
|
@@ -22511,6 +22534,51 @@ var RetrainFrameListSchema = object({
|
|
|
22511
22534
|
/** What the page pre-selects — the native key frame when one survives. */
|
|
22512
22535
|
autoPickMediaId: number().int().optional()
|
|
22513
22536
|
});
|
|
22537
|
+
/**
|
|
22538
|
+
* Which frames an annotated export carries. Every field narrows; an empty
|
|
22539
|
+
* filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
|
|
22540
|
+
* list owned by whoever trains (the training orchestrator), so `frameIds` is
|
|
22541
|
+
* the primitive a version export uses; `batchId` re-selects what an earlier
|
|
22542
|
+
* export carried (`exportedInBatch`).
|
|
22543
|
+
*/
|
|
22544
|
+
var RetrainExportFilterSchema = object({
|
|
22545
|
+
deviceIds: array(number()).optional(),
|
|
22546
|
+
frameIds: array(string()).max(2e4).optional(),
|
|
22547
|
+
batchId: string().optional(),
|
|
22548
|
+
/** Only frames the operator marked complete (all subjects boxed). */
|
|
22549
|
+
completeOnly: boolean().optional()
|
|
22550
|
+
});
|
|
22551
|
+
/**
|
|
22552
|
+
* `frames`: the full frame copies, boxes in `annotations.json`.
|
|
22553
|
+
* `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
|
|
22554
|
+
* convention — the classifier layout.
|
|
22555
|
+
*/
|
|
22556
|
+
var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
|
|
22557
|
+
/**
|
|
22558
|
+
* Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
|
|
22559
|
+
* the archive, sent chunk by chunk. Covers a presigned PUT and a provider
|
|
22560
|
+
* addon's data-plane upload route alike. Headers are sent verbatim and never
|
|
22561
|
+
* logged.
|
|
22562
|
+
*/
|
|
22563
|
+
var RetrainArchiveTargetSchema = object({
|
|
22564
|
+
kind: literal("http"),
|
|
22565
|
+
method: _enum(["PUT", "POST"]),
|
|
22566
|
+
url: string().url(),
|
|
22567
|
+
headers: record(string(), string()).optional()
|
|
22568
|
+
});
|
|
22569
|
+
var RetrainArchiveResultSchema = object({
|
|
22570
|
+
batchId: string(),
|
|
22571
|
+
frames: number().int(),
|
|
22572
|
+
crops: number().int(),
|
|
22573
|
+
annotations: number().int(),
|
|
22574
|
+
/** Frames planned but not shipped (unreadable copy, path too long). */
|
|
22575
|
+
missing: number().int(),
|
|
22576
|
+
bytes: number().int(),
|
|
22577
|
+
/** sha256 of the exact bytes sent. */
|
|
22578
|
+
sha256: string(),
|
|
22579
|
+
/** The target's HTTP status. */
|
|
22580
|
+
status: number().int()
|
|
22581
|
+
});
|
|
22514
22582
|
/** What the operator asked the assist to look for. */
|
|
22515
22583
|
var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
|
|
22516
22584
|
kind: literal("package"),
|
|
@@ -23305,9 +23373,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
23305
23373
|
}), RetrainTransitionResultSchema, {
|
|
23306
23374
|
kind: "mutation",
|
|
23307
23375
|
auth: "admin"
|
|
23308
|
-
}), method(
|
|
23376
|
+
}), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
|
|
23309
23377
|
kind: "query",
|
|
23310
23378
|
auth: "admin"
|
|
23379
|
+
}), method(object({
|
|
23380
|
+
deviceId: number(),
|
|
23381
|
+
trackId: string(),
|
|
23382
|
+
frameId: string(),
|
|
23383
|
+
complete: boolean()
|
|
23384
|
+
}), RetrainFrameSchema, {
|
|
23385
|
+
kind: "mutation",
|
|
23386
|
+
auth: "admin"
|
|
23387
|
+
}), method(object({
|
|
23388
|
+
filter: RetrainExportFilterSchema,
|
|
23389
|
+
layout: RetrainExportLayoutSchema,
|
|
23390
|
+
target: RetrainArchiveTargetSchema
|
|
23391
|
+
}), RetrainArchiveResultSchema, {
|
|
23392
|
+
kind: "mutation",
|
|
23393
|
+
auth: "admin",
|
|
23394
|
+
timeoutMs: 60 * 6e4
|
|
23311
23395
|
}), method(object({
|
|
23312
23396
|
/** Which of the three event tables owns the row. */
|
|
23313
23397
|
ownerType: EventOwnerTypeSchema,
|
|
@@ -26637,7 +26721,19 @@ var SsoBridgeClaimsSchema = object({
|
|
|
26637
26721
|
* editing a descriptor must not retroactively extend or shorten a link the
|
|
26638
26722
|
* operator already consented to.
|
|
26639
26723
|
*/
|
|
26640
|
-
refreshTtl: union([number().int().positive(), literal("never")]).optional()
|
|
26724
|
+
refreshTtl: union([number().int().positive(), literal("never")]).optional(),
|
|
26725
|
+
/**
|
|
26726
|
+
* Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
|
|
26727
|
+
* that was started from a signed-in user's "Link" button: the finish then
|
|
26728
|
+
* links this identity to the intent's user instead of signing anyone in.
|
|
26729
|
+
* The handle carries no user id — the hub resolves it, single-use.
|
|
26730
|
+
*/
|
|
26731
|
+
linkIntent: string().optional(),
|
|
26732
|
+
/**
|
|
26733
|
+
* Verified `iss` of the id_token behind an OIDC login bridge (D782). A
|
|
26734
|
+
* subject is unique only per issuer, so a link is bound to it.
|
|
26735
|
+
*/
|
|
26736
|
+
issuer: string().optional()
|
|
26641
26737
|
});
|
|
26642
26738
|
method(object({
|
|
26643
26739
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -28572,7 +28668,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
28572
28668
|
* field their hints were silently stripped by the schema and the
|
|
28573
28669
|
* adaptive ladder started blind on the client's display size.
|
|
28574
28670
|
*/
|
|
28575
|
-
hints: webrtcClientHintsSchema.optional()
|
|
28671
|
+
hints: webrtcClientHintsSchema.optional(),
|
|
28672
|
+
/**
|
|
28673
|
+
* Talk-back (D771): relay the PEER's audio to the device's speaker
|
|
28674
|
+
* through the `intercom` cap's push-talk triple. When `true` and the
|
|
28675
|
+
* offer lets the peer send audio, the answer's audio is `sendrecv`
|
|
28676
|
+
* and every inbound frame goes to `intercom.pushTalkAudio` for this
|
|
28677
|
+
* `deviceId`; absent/false answers `sendonly`, as for every viewer.
|
|
28678
|
+
*
|
|
28679
|
+
* TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
|
|
28680
|
+
* with `intercom`, when the linked user may control that camera. The
|
|
28681
|
+
* hub STRIPS it from every request-bound call (a browser), exactly as
|
|
28682
|
+
* it overwrites `relayOnly` — a viewer's talk permission is the
|
|
28683
|
+
* intercom cap's own surface (share tokens gate it there), and this
|
|
28684
|
+
* flag must not become a second door to the camera's speaker.
|
|
28685
|
+
*/
|
|
28686
|
+
talkback: boolean().optional()
|
|
28576
28687
|
}), object({
|
|
28577
28688
|
sessionId: string(),
|
|
28578
28689
|
sdpAnswer: string()
|
|
@@ -38943,6 +39054,32 @@ var TotpStatusSchema = object({
|
|
|
38943
39054
|
/** Null when no row exists OR the row is still pending confirmation. */
|
|
38944
39055
|
confirmedAt: number().nullable()
|
|
38945
39056
|
});
|
|
39057
|
+
/**
|
|
39058
|
+
* user-management — singleton capability for user accounts, API keys,
|
|
39059
|
+
* and scoped tokens.
|
|
39060
|
+
*
|
|
39061
|
+
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
39062
|
+
* — the subset check on `setUserScopes` / `createScopedToken` is moot
|
|
39063
|
+
* because non-admins never reach these. If/when we open non-admin
|
|
39064
|
+
* delegation, structural caller-scope subset check goes inside the
|
|
39065
|
+
* provider.
|
|
39066
|
+
*/
|
|
39067
|
+
var ExternalIdentitySchema = object({
|
|
39068
|
+
/** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
|
|
39069
|
+
provider: string(),
|
|
39070
|
+
/** The IdP's stable subject (`sub`) for this account. */
|
|
39071
|
+
subject: string(),
|
|
39072
|
+
/** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
|
|
39073
|
+
issuer: string(),
|
|
39074
|
+
userId: string(),
|
|
39075
|
+
/** What the IdP called the account at link time (username / email) — display only. */
|
|
39076
|
+
label: string().optional(),
|
|
39077
|
+
linkedAt: number()
|
|
39078
|
+
});
|
|
39079
|
+
var ExternalIdentityKeySchema = object({
|
|
39080
|
+
provider: string().min(1),
|
|
39081
|
+
subject: string().min(1)
|
|
39082
|
+
});
|
|
38946
39083
|
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
38947
39084
|
kind: "mutation",
|
|
38948
39085
|
auth: "admin",
|
|
@@ -39056,7 +39193,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
39056
39193
|
userId: string(),
|
|
39057
39194
|
username: string(),
|
|
39058
39195
|
scopes: array(TokenScopeSchema)
|
|
39059
|
-
}).nullable(), { access: "view" }), method(
|
|
39196
|
+
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
39197
|
+
userId: string(),
|
|
39198
|
+
issuer: string()
|
|
39199
|
+
}).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
|
|
39200
|
+
userId: string(),
|
|
39201
|
+
issuer: string().min(1),
|
|
39202
|
+
label: string().optional()
|
|
39203
|
+
}), object({ success: literal(true) }), {
|
|
39204
|
+
kind: "mutation",
|
|
39205
|
+
auth: "admin",
|
|
39206
|
+
access: "create"
|
|
39207
|
+
}), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
|
|
39208
|
+
kind: "mutation",
|
|
39209
|
+
auth: "admin",
|
|
39210
|
+
access: "delete"
|
|
39211
|
+
}), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
|
|
39060
39212
|
kind: "mutation",
|
|
39061
39213
|
auth: "admin",
|
|
39062
39214
|
access: "delete"
|
|
@@ -45696,6 +45848,12 @@ Object.freeze({
|
|
|
45696
45848
|
addonId: null,
|
|
45697
45849
|
access: "create"
|
|
45698
45850
|
},
|
|
45851
|
+
"pipelineAnalytics.setRetrainFrameComplete": {
|
|
45852
|
+
capName: "pipeline-analytics",
|
|
45853
|
+
capScope: "device",
|
|
45854
|
+
addonId: null,
|
|
45855
|
+
access: "create"
|
|
45856
|
+
},
|
|
45699
45857
|
"pipelineAnalytics.setTrackFlags": {
|
|
45700
45858
|
capName: "pipeline-analytics",
|
|
45701
45859
|
capScope: "device",
|
|
@@ -45732,6 +45890,12 @@ Object.freeze({
|
|
|
45732
45890
|
addonId: null,
|
|
45733
45891
|
access: "delete"
|
|
45734
45892
|
},
|
|
45893
|
+
"pipelineAnalytics.writeRetrainArchive": {
|
|
45894
|
+
capName: "pipeline-analytics",
|
|
45895
|
+
capScope: "device",
|
|
45896
|
+
addonId: null,
|
|
45897
|
+
access: "create"
|
|
45898
|
+
},
|
|
45735
45899
|
"pipelineExecutor.cacheFrameInPool": {
|
|
45736
45900
|
capName: "pipeline-executor",
|
|
45737
45901
|
capScope: "system",
|
|
@@ -48084,18 +48248,36 @@ Object.freeze({
|
|
|
48084
48248
|
addonId: null,
|
|
48085
48249
|
access: "delete"
|
|
48086
48250
|
},
|
|
48251
|
+
"userManagement.findUserByExternalIdentity": {
|
|
48252
|
+
capName: "user-management",
|
|
48253
|
+
capScope: "system",
|
|
48254
|
+
addonId: null,
|
|
48255
|
+
access: "view"
|
|
48256
|
+
},
|
|
48087
48257
|
"userManagement.getTotpStatus": {
|
|
48088
48258
|
capName: "user-management",
|
|
48089
48259
|
capScope: "system",
|
|
48090
48260
|
addonId: null,
|
|
48091
48261
|
access: "view"
|
|
48092
48262
|
},
|
|
48263
|
+
"userManagement.linkExternalIdentity": {
|
|
48264
|
+
capName: "user-management",
|
|
48265
|
+
capScope: "system",
|
|
48266
|
+
addonId: null,
|
|
48267
|
+
access: "create"
|
|
48268
|
+
},
|
|
48093
48269
|
"userManagement.listApiKeys": {
|
|
48094
48270
|
capName: "user-management",
|
|
48095
48271
|
capScope: "system",
|
|
48096
48272
|
addonId: null,
|
|
48097
48273
|
access: "view"
|
|
48098
48274
|
},
|
|
48275
|
+
"userManagement.listExternalIdentities": {
|
|
48276
|
+
capName: "user-management",
|
|
48277
|
+
capScope: "system",
|
|
48278
|
+
addonId: null,
|
|
48279
|
+
access: "view"
|
|
48280
|
+
},
|
|
48099
48281
|
"userManagement.listOauthSessions": {
|
|
48100
48282
|
capName: "user-management",
|
|
48101
48283
|
capScope: "system",
|
|
@@ -48174,6 +48356,12 @@ Object.freeze({
|
|
|
48174
48356
|
addonId: null,
|
|
48175
48357
|
access: "create"
|
|
48176
48358
|
},
|
|
48359
|
+
"userManagement.unlinkExternalIdentity": {
|
|
48360
|
+
capName: "user-management",
|
|
48361
|
+
capScope: "system",
|
|
48362
|
+
addonId: null,
|
|
48363
|
+
access: "delete"
|
|
48364
|
+
},
|
|
48177
48365
|
"userManagement.updateUser": {
|
|
48178
48366
|
capName: "user-management",
|
|
48179
48367
|
capScope: "system",
|
|
@@ -51513,6 +51701,11 @@ Object.freeze({
|
|
|
51513
51701
|
form: "single",
|
|
51514
51702
|
optional: false
|
|
51515
51703
|
}],
|
|
51704
|
+
"pipelineAnalytics.setRetrainFrameComplete": [{
|
|
51705
|
+
name: "deviceId",
|
|
51706
|
+
form: "single",
|
|
51707
|
+
optional: false
|
|
51708
|
+
}],
|
|
51516
51709
|
"pipelineAnalytics.setTrackFlags": [{
|
|
51517
51710
|
name: "deviceId",
|
|
51518
51711
|
form: "single",
|
|
@@ -53576,9 +53769,9 @@ var MB = 1024 * 1024;
|
|
|
53576
53769
|
var unifiConnectionSchema = object({
|
|
53577
53770
|
host: string().min(1).describe("Controller host name or IP address"),
|
|
53578
53771
|
port: preprocess((v) => v === "" || v === null ? void 0 : v, number().int().min(1).max(65535).default(443)).describe("Controller HTTPS port (443 on UniFi OS, 8443 on legacy)"),
|
|
53579
|
-
apiKey: string().default("").describe("UniFi OS API key (preferred). Leave blank to use username + password."),
|
|
53772
|
+
apiKey: string().default("").describe("UniFi OS API key (preferred). Leave blank to use username + password.").meta({ secret: true }),
|
|
53580
53773
|
username: string().default("").describe("Local admin username (when no API key)"),
|
|
53581
|
-
password: string().default("").describe("Local admin password (when no API key)"),
|
|
53774
|
+
password: string().default("").describe("Local admin password (when no API key)").meta({ secret: true }),
|
|
53582
53775
|
site: string().default("default").describe("Controller site name"),
|
|
53583
53776
|
pollIntervalMs: preprocess((v) => v === "" || v === null ? void 0 : v, number().int().min(2e3).max(36e5).default(3e4)).describe("Infra + client poll interval (ms)")
|
|
53584
53777
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-unifi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.123",
|
|
4
4
|
"description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|