@camstack/addon-provider-unifi 0.2.121 → 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.
Files changed (3) hide show
  1. package/dist/addon.js +268 -12
  2. package/dist/addon.mjs +268 -12
  3. 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-BNeXenvr.mjs
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(object({ deviceIds: array(number()).optional() }), object({ url: string() }), {
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()
@@ -28875,6 +28986,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
28875
28986
  var RestartAddonResultSchema = unknown();
28876
28987
  var InstallPackageResultSchema = unknown();
28877
28988
  var ReloadPackagesResultSchema = unknown();
28989
+ /**
28990
+ * What an uninstall did on ONE node.
28991
+ * - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
28992
+ * - `not-installed` — the node did not have it (nothing to do).
28993
+ * - `refused` — protected / bootstrap package; nothing touched.
28994
+ * - `failed` — attempted and did not complete; `error` says why.
28995
+ * - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
28996
+ * back-fill never returns the package, and the stale-addon sweep removes the
28997
+ * copy when the node registers again (only once the hub no longer has it).
28998
+ */
28999
+ var UninstallNodeOutcomeSchema = _enum([
29000
+ "uninstalled",
29001
+ "not-installed",
29002
+ "refused",
29003
+ "failed",
29004
+ "pending-reconnect"
29005
+ ]);
29006
+ var UninstallNodeResultSchema = object({
29007
+ nodeId: string(),
29008
+ outcome: UninstallNodeOutcomeSchema,
29009
+ error: string().optional(),
29010
+ addonIds: array(string()).readonly(),
29011
+ runnersStopped: array(string()).readonly(),
29012
+ warnings: array(string()).readonly()
29013
+ });
29014
+ var UninstallPackageResultSchema = object({
29015
+ /** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
29016
+ success: boolean(),
29017
+ packageName: string(),
29018
+ results: array(UninstallNodeResultSchema).readonly()
29019
+ });
29020
+ /**
29021
+ * `unreachable` lists online agents whose status read FAILED — absence from
29022
+ * `installations` is only "not installed" for a node that answered (D315).
29023
+ */
29024
+ var PackageInstallationsSchema = object({
29025
+ installations: array(object({
29026
+ packageName: string(),
29027
+ nodeId: string(),
29028
+ nodeName: string(),
29029
+ isHub: boolean(),
29030
+ isOnline: boolean(),
29031
+ version: string().nullable(),
29032
+ addonIds: array(string()).readonly(),
29033
+ source: _enum(["live", "recorded"]),
29034
+ /** The hub installs this package too. `false` on an agent row = an orphan. */
29035
+ onHub: boolean()
29036
+ })).readonly(),
29037
+ unreachable: array(object({
29038
+ nodeId: string(),
29039
+ error: string()
29040
+ })).readonly()
29041
+ });
28878
29042
  var BulkUpdateItemStatusSchema = _enum([
28879
29043
  "queued",
28880
29044
  "updating",
@@ -28957,10 +29121,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
28957
29121
  }), method(object({ packageName: string() }), InstallPackageResultSchema, {
28958
29122
  kind: "mutation",
28959
29123
  auth: "admin"
28960
- }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({ packageName: string() }), unknown(), {
29124
+ }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
29125
+ packageName: string().min(1),
29126
+ nodeId: string().optional(),
29127
+ everywhere: boolean().optional()
29128
+ }), UninstallPackageResultSchema, {
28961
29129
  kind: "mutation",
28962
29130
  auth: "admin"
28963
- }), method(_void(), ReloadPackagesResultSchema, {
29131
+ }), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
28964
29132
  kind: "mutation",
28965
29133
  auth: "admin"
28966
29134
  }), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
@@ -38887,6 +39055,32 @@ var TotpStatusSchema = object({
38887
39055
  /** Null when no row exists OR the row is still pending confirmation. */
38888
39056
  confirmedAt: number().nullable()
38889
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
+ });
38890
39084
  method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
38891
39085
  kind: "mutation",
38892
39086
  auth: "admin",
@@ -39000,7 +39194,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
39000
39194
  userId: string(),
39001
39195
  username: string(),
39002
39196
  scopes: array(TokenScopeSchema)
39003
- }).nullable(), { access: "view" }), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
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() }), {
39004
39213
  kind: "mutation",
39005
39214
  auth: "admin",
39006
39215
  access: "delete"
@@ -41410,6 +41619,12 @@ Object.freeze({
41410
41619
  addonId: null,
41411
41620
  access: "view"
41412
41621
  },
41622
+ "addons.listInstallations": {
41623
+ capName: "addons",
41624
+ capScope: "system",
41625
+ addonId: null,
41626
+ access: "view"
41627
+ },
41413
41628
  "addons.listJobs": {
41414
41629
  capName: "addons",
41415
41630
  capScope: "system",
@@ -45634,6 +45849,12 @@ Object.freeze({
45634
45849
  addonId: null,
45635
45850
  access: "create"
45636
45851
  },
45852
+ "pipelineAnalytics.setRetrainFrameComplete": {
45853
+ capName: "pipeline-analytics",
45854
+ capScope: "device",
45855
+ addonId: null,
45856
+ access: "create"
45857
+ },
45637
45858
  "pipelineAnalytics.setTrackFlags": {
45638
45859
  capName: "pipeline-analytics",
45639
45860
  capScope: "device",
@@ -45670,6 +45891,12 @@ Object.freeze({
45670
45891
  addonId: null,
45671
45892
  access: "delete"
45672
45893
  },
45894
+ "pipelineAnalytics.writeRetrainArchive": {
45895
+ capName: "pipeline-analytics",
45896
+ capScope: "device",
45897
+ addonId: null,
45898
+ access: "create"
45899
+ },
45673
45900
  "pipelineExecutor.cacheFrameInPool": {
45674
45901
  capName: "pipeline-executor",
45675
45902
  capScope: "system",
@@ -48022,18 +48249,36 @@ Object.freeze({
48022
48249
  addonId: null,
48023
48250
  access: "delete"
48024
48251
  },
48252
+ "userManagement.findUserByExternalIdentity": {
48253
+ capName: "user-management",
48254
+ capScope: "system",
48255
+ addonId: null,
48256
+ access: "view"
48257
+ },
48025
48258
  "userManagement.getTotpStatus": {
48026
48259
  capName: "user-management",
48027
48260
  capScope: "system",
48028
48261
  addonId: null,
48029
48262
  access: "view"
48030
48263
  },
48264
+ "userManagement.linkExternalIdentity": {
48265
+ capName: "user-management",
48266
+ capScope: "system",
48267
+ addonId: null,
48268
+ access: "create"
48269
+ },
48031
48270
  "userManagement.listApiKeys": {
48032
48271
  capName: "user-management",
48033
48272
  capScope: "system",
48034
48273
  addonId: null,
48035
48274
  access: "view"
48036
48275
  },
48276
+ "userManagement.listExternalIdentities": {
48277
+ capName: "user-management",
48278
+ capScope: "system",
48279
+ addonId: null,
48280
+ access: "view"
48281
+ },
48037
48282
  "userManagement.listOauthSessions": {
48038
48283
  capName: "user-management",
48039
48284
  capScope: "system",
@@ -48112,6 +48357,12 @@ Object.freeze({
48112
48357
  addonId: null,
48113
48358
  access: "create"
48114
48359
  },
48360
+ "userManagement.unlinkExternalIdentity": {
48361
+ capName: "user-management",
48362
+ capScope: "system",
48363
+ addonId: null,
48364
+ access: "delete"
48365
+ },
48115
48366
  "userManagement.updateUser": {
48116
48367
  capName: "user-management",
48117
48368
  capScope: "system",
@@ -51451,6 +51702,11 @@ Object.freeze({
51451
51702
  form: "single",
51452
51703
  optional: false
51453
51704
  }],
51705
+ "pipelineAnalytics.setRetrainFrameComplete": [{
51706
+ name: "deviceId",
51707
+ form: "single",
51708
+ optional: false
51709
+ }],
51454
51710
  "pipelineAnalytics.setTrackFlags": [{
51455
51711
  name: "deviceId",
51456
51712
  form: "single",
@@ -53514,9 +53770,9 @@ var MB = 1024 * 1024;
53514
53770
  var unifiConnectionSchema = object({
53515
53771
  host: string().min(1).describe("Controller host name or IP address"),
53516
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)"),
53517
- 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 }),
53518
53774
  username: string().default("").describe("Local admin username (when no API key)"),
53519
- 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 }),
53520
53776
  site: string().default("default").describe("Controller site name"),
53521
53777
  pollIntervalMs: preprocess((v) => v === "" || v === null ? void 0 : v, number().int().min(2e3).max(36e5).default(3e4)).describe("Infra + client poll interval (ms)")
53522
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-BNeXenvr.mjs
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(object({ deviceIds: array(number()).optional() }), object({ url: string() }), {
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()
@@ -28874,6 +28985,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
28874
28985
  var RestartAddonResultSchema = unknown();
28875
28986
  var InstallPackageResultSchema = unknown();
28876
28987
  var ReloadPackagesResultSchema = unknown();
28988
+ /**
28989
+ * What an uninstall did on ONE node.
28990
+ * - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
28991
+ * - `not-installed` — the node did not have it (nothing to do).
28992
+ * - `refused` — protected / bootstrap package; nothing touched.
28993
+ * - `failed` — attempted and did not complete; `error` says why.
28994
+ * - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
28995
+ * back-fill never returns the package, and the stale-addon sweep removes the
28996
+ * copy when the node registers again (only once the hub no longer has it).
28997
+ */
28998
+ var UninstallNodeOutcomeSchema = _enum([
28999
+ "uninstalled",
29000
+ "not-installed",
29001
+ "refused",
29002
+ "failed",
29003
+ "pending-reconnect"
29004
+ ]);
29005
+ var UninstallNodeResultSchema = object({
29006
+ nodeId: string(),
29007
+ outcome: UninstallNodeOutcomeSchema,
29008
+ error: string().optional(),
29009
+ addonIds: array(string()).readonly(),
29010
+ runnersStopped: array(string()).readonly(),
29011
+ warnings: array(string()).readonly()
29012
+ });
29013
+ var UninstallPackageResultSchema = object({
29014
+ /** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
29015
+ success: boolean(),
29016
+ packageName: string(),
29017
+ results: array(UninstallNodeResultSchema).readonly()
29018
+ });
29019
+ /**
29020
+ * `unreachable` lists online agents whose status read FAILED — absence from
29021
+ * `installations` is only "not installed" for a node that answered (D315).
29022
+ */
29023
+ var PackageInstallationsSchema = object({
29024
+ installations: array(object({
29025
+ packageName: string(),
29026
+ nodeId: string(),
29027
+ nodeName: string(),
29028
+ isHub: boolean(),
29029
+ isOnline: boolean(),
29030
+ version: string().nullable(),
29031
+ addonIds: array(string()).readonly(),
29032
+ source: _enum(["live", "recorded"]),
29033
+ /** The hub installs this package too. `false` on an agent row = an orphan. */
29034
+ onHub: boolean()
29035
+ })).readonly(),
29036
+ unreachable: array(object({
29037
+ nodeId: string(),
29038
+ error: string()
29039
+ })).readonly()
29040
+ });
28877
29041
  var BulkUpdateItemStatusSchema = _enum([
28878
29042
  "queued",
28879
29043
  "updating",
@@ -28956,10 +29120,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
28956
29120
  }), method(object({ packageName: string() }), InstallPackageResultSchema, {
28957
29121
  kind: "mutation",
28958
29122
  auth: "admin"
28959
- }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({ packageName: string() }), unknown(), {
29123
+ }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
29124
+ packageName: string().min(1),
29125
+ nodeId: string().optional(),
29126
+ everywhere: boolean().optional()
29127
+ }), UninstallPackageResultSchema, {
28960
29128
  kind: "mutation",
28961
29129
  auth: "admin"
28962
- }), method(_void(), ReloadPackagesResultSchema, {
29130
+ }), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
28963
29131
  kind: "mutation",
28964
29132
  auth: "admin"
28965
29133
  }), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
@@ -38886,6 +39054,32 @@ var TotpStatusSchema = object({
38886
39054
  /** Null when no row exists OR the row is still pending confirmation. */
38887
39055
  confirmedAt: number().nullable()
38888
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
+ });
38889
39083
  method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
38890
39084
  kind: "mutation",
38891
39085
  auth: "admin",
@@ -38999,7 +39193,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
38999
39193
  userId: string(),
39000
39194
  username: string(),
39001
39195
  scopes: array(TokenScopeSchema)
39002
- }).nullable(), { access: "view" }), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
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() }), {
39003
39212
  kind: "mutation",
39004
39213
  auth: "admin",
39005
39214
  access: "delete"
@@ -41409,6 +41618,12 @@ Object.freeze({
41409
41618
  addonId: null,
41410
41619
  access: "view"
41411
41620
  },
41621
+ "addons.listInstallations": {
41622
+ capName: "addons",
41623
+ capScope: "system",
41624
+ addonId: null,
41625
+ access: "view"
41626
+ },
41412
41627
  "addons.listJobs": {
41413
41628
  capName: "addons",
41414
41629
  capScope: "system",
@@ -45633,6 +45848,12 @@ Object.freeze({
45633
45848
  addonId: null,
45634
45849
  access: "create"
45635
45850
  },
45851
+ "pipelineAnalytics.setRetrainFrameComplete": {
45852
+ capName: "pipeline-analytics",
45853
+ capScope: "device",
45854
+ addonId: null,
45855
+ access: "create"
45856
+ },
45636
45857
  "pipelineAnalytics.setTrackFlags": {
45637
45858
  capName: "pipeline-analytics",
45638
45859
  capScope: "device",
@@ -45669,6 +45890,12 @@ Object.freeze({
45669
45890
  addonId: null,
45670
45891
  access: "delete"
45671
45892
  },
45893
+ "pipelineAnalytics.writeRetrainArchive": {
45894
+ capName: "pipeline-analytics",
45895
+ capScope: "device",
45896
+ addonId: null,
45897
+ access: "create"
45898
+ },
45672
45899
  "pipelineExecutor.cacheFrameInPool": {
45673
45900
  capName: "pipeline-executor",
45674
45901
  capScope: "system",
@@ -48021,18 +48248,36 @@ Object.freeze({
48021
48248
  addonId: null,
48022
48249
  access: "delete"
48023
48250
  },
48251
+ "userManagement.findUserByExternalIdentity": {
48252
+ capName: "user-management",
48253
+ capScope: "system",
48254
+ addonId: null,
48255
+ access: "view"
48256
+ },
48024
48257
  "userManagement.getTotpStatus": {
48025
48258
  capName: "user-management",
48026
48259
  capScope: "system",
48027
48260
  addonId: null,
48028
48261
  access: "view"
48029
48262
  },
48263
+ "userManagement.linkExternalIdentity": {
48264
+ capName: "user-management",
48265
+ capScope: "system",
48266
+ addonId: null,
48267
+ access: "create"
48268
+ },
48030
48269
  "userManagement.listApiKeys": {
48031
48270
  capName: "user-management",
48032
48271
  capScope: "system",
48033
48272
  addonId: null,
48034
48273
  access: "view"
48035
48274
  },
48275
+ "userManagement.listExternalIdentities": {
48276
+ capName: "user-management",
48277
+ capScope: "system",
48278
+ addonId: null,
48279
+ access: "view"
48280
+ },
48036
48281
  "userManagement.listOauthSessions": {
48037
48282
  capName: "user-management",
48038
48283
  capScope: "system",
@@ -48111,6 +48356,12 @@ Object.freeze({
48111
48356
  addonId: null,
48112
48357
  access: "create"
48113
48358
  },
48359
+ "userManagement.unlinkExternalIdentity": {
48360
+ capName: "user-management",
48361
+ capScope: "system",
48362
+ addonId: null,
48363
+ access: "delete"
48364
+ },
48114
48365
  "userManagement.updateUser": {
48115
48366
  capName: "user-management",
48116
48367
  capScope: "system",
@@ -51450,6 +51701,11 @@ Object.freeze({
51450
51701
  form: "single",
51451
51702
  optional: false
51452
51703
  }],
51704
+ "pipelineAnalytics.setRetrainFrameComplete": [{
51705
+ name: "deviceId",
51706
+ form: "single",
51707
+ optional: false
51708
+ }],
51453
51709
  "pipelineAnalytics.setTrackFlags": [{
51454
51710
  name: "deviceId",
51455
51711
  form: "single",
@@ -53513,9 +53769,9 @@ var MB = 1024 * 1024;
53513
53769
  var unifiConnectionSchema = object({
53514
53770
  host: string().min(1).describe("Controller host name or IP address"),
53515
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)"),
53516
- 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 }),
53517
53773
  username: string().default("").describe("Local admin username (when no API key)"),
53518
- 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 }),
53519
53775
  site: string().default("default").describe("Controller site name"),
53520
53776
  pollIntervalMs: preprocess((v) => v === "" || v === null ? void 0 : v, number().int().min(2e3).max(36e5).default(3e4)).describe("Infra + client poll interval (ms)")
53521
53777
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unifi",
3
- "version": "0.2.121",
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",