@camstack/types 0.1.30 → 0.1.31

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 (65) hide show
  1. package/dist/addon/build-addon-route-provider.d.ts +55 -0
  2. package/dist/addon/build-addon-route-provider.d.ts.map +1 -0
  3. package/dist/capabilities/addon-routes.cap.d.ts +64 -0
  4. package/dist/capabilities/addon-routes.cap.d.ts.map +1 -1
  5. package/dist/capabilities/auth-provider.cap.d.ts +4 -4
  6. package/dist/capabilities/auth-provider.cap.d.ts.map +1 -1
  7. package/dist/capabilities/authentication.cap.d.ts +4 -0
  8. package/dist/capabilities/authentication.cap.d.ts.map +1 -1
  9. package/dist/capabilities/home-assistant.cap.d.ts +138 -0
  10. package/dist/capabilities/home-assistant.cap.d.ts.map +1 -0
  11. package/dist/capabilities/index.d.ts +16 -1
  12. package/dist/capabilities/index.d.ts.map +1 -1
  13. package/dist/capabilities/mesh-network.cap.d.ts +18 -0
  14. package/dist/capabilities/mesh-network.cap.d.ts.map +1 -1
  15. package/dist/capabilities/mqtt-provider.cap.d.ts +91 -0
  16. package/dist/capabilities/mqtt-provider.cap.d.ts.map +1 -0
  17. package/dist/capabilities/settings-store.cap.d.ts +8 -2
  18. package/dist/capabilities/settings-store.cap.d.ts.map +1 -1
  19. package/dist/capabilities/smtp-provider.cap.d.ts +62 -0
  20. package/dist/capabilities/smtp-provider.cap.d.ts.map +1 -0
  21. package/dist/capabilities/sso-bridge.cap.d.ts +58 -0
  22. package/dist/capabilities/sso-bridge.cap.d.ts.map +1 -0
  23. package/dist/capabilities/user-management.cap.d.ts +513 -184
  24. package/dist/capabilities/user-management.cap.d.ts.map +1 -1
  25. package/dist/capabilities/user-passkeys.cap.d.ts +92 -0
  26. package/dist/capabilities/user-passkeys.cap.d.ts.map +1 -0
  27. package/dist/enums/event-category.d.ts +8 -1
  28. package/dist/enums/event-category.d.ts.map +1 -1
  29. package/dist/generated/addon-api.d.ts +472 -86
  30. package/dist/generated/addon-api.d.ts.map +1 -1
  31. package/dist/generated/capability-router-map.d.ts +19 -4
  32. package/dist/generated/capability-router-map.d.ts.map +1 -1
  33. package/dist/generated/method-access-map.d.ts +6 -1
  34. package/dist/generated/method-access-map.d.ts.map +1 -1
  35. package/dist/generated/scope-presets.d.ts +17 -0
  36. package/dist/generated/scope-presets.d.ts.map +1 -0
  37. package/dist/generated/system-proxy.d.ts +2 -2
  38. package/dist/generated/system-proxy.d.ts.map +1 -1
  39. package/dist/{index-s8uJNgNs.js → index-BKifir_y.js} +557 -48
  40. package/dist/index-BKifir_y.js.map +1 -0
  41. package/dist/{index-DVKPWMwv.mjs → index-BKnvgAep.mjs} +852 -343
  42. package/dist/index-BKnvgAep.mjs.map +1 -0
  43. package/dist/index.d.ts +7 -3
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +781 -498
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +1038 -755
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/interfaces/addon-routes.d.ts +8 -2
  50. package/dist/interfaces/addon-routes.d.ts.map +1 -1
  51. package/dist/interfaces/api-responses.d.ts +2 -3
  52. package/dist/interfaces/api-responses.d.ts.map +1 -1
  53. package/dist/interfaces/auth.d.ts +14 -11
  54. package/dist/interfaces/auth.d.ts.map +1 -1
  55. package/dist/interfaces/storage.d.ts +15 -2
  56. package/dist/interfaces/storage.d.ts.map +1 -1
  57. package/dist/node.js +1 -1
  58. package/dist/node.mjs +1 -1
  59. package/dist/schemas/auth-records.d.ts +105 -50
  60. package/dist/schemas/auth-records.d.ts.map +1 -1
  61. package/package.json +1 -1
  62. package/dist/index-DVKPWMwv.mjs.map +0 -1
  63. package/dist/index-s8uJNgNs.js.map +0 -1
  64. package/dist/interfaces/auth-provider.d.ts +0 -39
  65. package/dist/interfaces/auth-provider.d.ts.map +0 -1
@@ -3544,7 +3544,7 @@ const SettingsRecordSchema = z.object({
3544
3544
  });
3545
3545
  const CollectionColumnSchema = z.object({
3546
3546
  name: z.string(),
3547
- type: z.enum(["TEXT", "INTEGER", "REAL", "JSON"]),
3547
+ type: z.enum(["TEXT", "INTEGER", "REAL", "JSON", "BOOLEAN"]),
3548
3548
  primaryKey: z.boolean().optional(),
3549
3549
  notNull: z.boolean().optional(),
3550
3550
  unique: z.boolean().optional()
@@ -3669,6 +3669,352 @@ const adminUiCapability = {
3669
3669
  getVersion: method(z.void(), z.string())
3670
3670
  }
3671
3671
  };
3672
+ const SsoBridgeClaimsSchema = z.object({
3673
+ userId: z.string(),
3674
+ username: z.string(),
3675
+ isAdmin: z.boolean(),
3676
+ provider: z.string(),
3677
+ email: z.string().optional(),
3678
+ displayName: z.string().optional()
3679
+ });
3680
+ const ssoBridgeCapability = {
3681
+ name: "sso-bridge",
3682
+ scope: "system",
3683
+ mode: "singleton",
3684
+ internal: true,
3685
+ methods: {
3686
+ signBridgeToken: method(
3687
+ z.object({
3688
+ claims: SsoBridgeClaimsSchema,
3689
+ ttlSec: z.number().int().positive().optional()
3690
+ }),
3691
+ z.object({ token: z.string() })
3692
+ ),
3693
+ verifyBridgeToken: method(
3694
+ z.object({ token: z.string() }),
3695
+ SsoBridgeClaimsSchema.nullable()
3696
+ )
3697
+ }
3698
+ };
3699
+ const PasskeySummarySchema = z.object({
3700
+ credentialId: z.string(),
3701
+ label: z.string(),
3702
+ createdAt: z.number(),
3703
+ lastUsedAt: z.number().nullable(),
3704
+ transports: z.array(z.string()).default([])
3705
+ });
3706
+ const userPasskeysCapability = {
3707
+ name: "user-passkeys",
3708
+ scope: "system",
3709
+ mode: "collection",
3710
+ internal: true,
3711
+ methods: {
3712
+ beginRegistration: method(
3713
+ z.object({ userId: z.string(), username: z.string() }),
3714
+ // PublicKeyCredentialCreationOptionsJSON — opaque JSON shape from
3715
+ // @simplewebauthn. The browser passes it straight to credentials.create().
3716
+ z.object({ optionsJSON: z.record(z.string(), z.unknown()) }),
3717
+ { kind: "mutation", auth: "admin", access: "create" }
3718
+ ),
3719
+ finishRegistration: method(
3720
+ z.object({
3721
+ userId: z.string(),
3722
+ /** RegistrationResponseJSON from the browser. */
3723
+ response: z.record(z.string(), z.unknown()),
3724
+ /** Operator-visible label (e.g. "MacBook Touch ID"). */
3725
+ label: z.string()
3726
+ }),
3727
+ z.object({ success: z.literal(true), credentialId: z.string() }),
3728
+ { kind: "mutation", auth: "admin", access: "create" }
3729
+ ),
3730
+ beginAuthentication: method(
3731
+ // userId optional — when absent, the addon emits a "passkey discovery"
3732
+ // (`allowCredentials: []`) so the browser shows every available
3733
+ // credential. When present, only the user's credentials are allowed.
3734
+ z.object({ userId: z.string().optional() }),
3735
+ z.object({ optionsJSON: z.record(z.string(), z.unknown()) }),
3736
+ { kind: "mutation", access: "view" }
3737
+ ),
3738
+ finishAuthentication: method(
3739
+ z.object({
3740
+ /** Required — the user the assertion belongs to (verified). */
3741
+ userId: z.string(),
3742
+ /** AuthenticationResponseJSON from the browser. */
3743
+ response: z.record(z.string(), z.unknown())
3744
+ }),
3745
+ z.object({ verified: z.boolean() }),
3746
+ { kind: "mutation", access: "view" }
3747
+ ),
3748
+ listPasskeys: method(
3749
+ z.object({ userId: z.string() }),
3750
+ z.array(PasskeySummarySchema),
3751
+ { auth: "admin" }
3752
+ ),
3753
+ removePasskey: method(
3754
+ z.object({ userId: z.string(), credentialId: z.string() }),
3755
+ z.object({ success: z.literal(true) }),
3756
+ { kind: "mutation", auth: "admin", access: "delete" }
3757
+ )
3758
+ }
3759
+ };
3760
+ const EmailAddressSchema = z.string().email();
3761
+ const SendEmailInputSchema = z.object({
3762
+ to: z.union([EmailAddressSchema, z.array(EmailAddressSchema).min(1)]),
3763
+ cc: z.array(EmailAddressSchema).optional(),
3764
+ bcc: z.array(EmailAddressSchema).optional(),
3765
+ /** RFC 5322 `From` field. Most relays will reject if the domain
3766
+ * isn't authorised — the addon is responsible for substituting a
3767
+ * sane default when omitted. */
3768
+ from: z.string().optional(),
3769
+ /** Optional `Reply-To` override. */
3770
+ replyTo: z.string().optional(),
3771
+ subject: z.string(),
3772
+ /** Plain-text body. Required even when `html` is present (fallback
3773
+ * for clients that strip HTML — including most spam filters). */
3774
+ text: z.string(),
3775
+ /** Optional HTML body. Renders alongside `text` as multi-part. */
3776
+ html: z.string().optional()
3777
+ });
3778
+ const SendEmailResultSchema = z.object({
3779
+ messageId: z.string(),
3780
+ accepted: z.array(EmailAddressSchema).default([]),
3781
+ rejected: z.array(EmailAddressSchema).default([])
3782
+ });
3783
+ const SmtpStatusSchema = z.object({
3784
+ /** True iff the addon has successfully verified the relay. */
3785
+ ready: z.boolean(),
3786
+ /** Operator-visible host string (no credentials). */
3787
+ host: z.string(),
3788
+ /** Last error message reported by the relay, when not ready. */
3789
+ error: z.string().optional(),
3790
+ /** Last successful verify timestamp (unix ms). */
3791
+ lastVerifiedAt: z.number().optional()
3792
+ });
3793
+ const smtpProviderCapability = {
3794
+ name: "smtp-provider",
3795
+ scope: "system",
3796
+ mode: "collection",
3797
+ internal: true,
3798
+ methods: {
3799
+ sendEmail: method(
3800
+ SendEmailInputSchema,
3801
+ SendEmailResultSchema,
3802
+ { kind: "mutation", auth: "admin", access: "create" }
3803
+ ),
3804
+ /** Round-trip ping against the SMTP relay (EHLO + AUTH if configured).
3805
+ * Used by the operator's "Test connection" button. */
3806
+ verify: method(
3807
+ z.void(),
3808
+ SmtpStatusSchema,
3809
+ { kind: "mutation", auth: "admin", access: "view" }
3810
+ ),
3811
+ getStatus: method(
3812
+ z.void(),
3813
+ SmtpStatusSchema,
3814
+ { auth: "admin" }
3815
+ )
3816
+ }
3817
+ };
3818
+ const QosSchema = z.union([z.literal(0), z.literal(1), z.literal(2)]);
3819
+ const PublishInputSchema = z.object({
3820
+ topic: z.string(),
3821
+ /** UTF-8 payload. Binary payloads must be base64-encoded by the caller. */
3822
+ payload: z.string(),
3823
+ qos: QosSchema.default(0),
3824
+ retain: z.boolean().default(false)
3825
+ });
3826
+ const SubscribeInputSchema = z.object({
3827
+ /** MQTT topic filter (supports `+` single-level and `#` multi-level wildcards). */
3828
+ topic: z.string(),
3829
+ qos: QosSchema.default(0),
3830
+ /**
3831
+ * Caller-supplied owner tag. Useful for debugging + the
3832
+ * `listSubscriptions` admin view ("which consumer owns this?").
3833
+ * When omitted, the addon synthesizes one from the caller's addon id.
3834
+ */
3835
+ owner: z.string().optional()
3836
+ });
3837
+ const SubscribeResultSchema = z.object({
3838
+ success: z.literal(true),
3839
+ /** Server-generated subscription id. Pass to `unsubscribe` to release. */
3840
+ subscriptionId: z.string()
3841
+ });
3842
+ const UnsubscribeInputSchema = z.object({
3843
+ /** Subscription id from `subscribe`. */
3844
+ subscriptionId: z.string()
3845
+ });
3846
+ const MqttStatusSchema = z.object({
3847
+ /** True iff the addon has an active connection to the broker. */
3848
+ connected: z.boolean(),
3849
+ /** Operator-visible host string (e.g. `mqtt://broker.example:1883`). */
3850
+ brokerUrl: z.string(),
3851
+ /** Active subscription count (per-owner, NOT broker-side topic count). */
3852
+ subscriptionCount: z.number().int(),
3853
+ /** Last error reported by the broker. */
3854
+ error: z.string().optional(),
3855
+ /** Last successful connection timestamp (unix ms). */
3856
+ connectedAt: z.number().optional()
3857
+ });
3858
+ const SubscriptionInfoSchema = z.object({
3859
+ subscriptionId: z.string(),
3860
+ topic: z.string(),
3861
+ qos: QosSchema,
3862
+ owner: z.string(),
3863
+ /** When this individual subscription was created. */
3864
+ createdAt: z.number()
3865
+ });
3866
+ const mqttProviderCapability = {
3867
+ name: "mqtt-provider",
3868
+ scope: "system",
3869
+ mode: "collection",
3870
+ internal: true,
3871
+ methods: {
3872
+ /** Publish a message. Lazy-opens the connection if not yet active. */
3873
+ publish: method(
3874
+ PublishInputSchema,
3875
+ z.object({ success: z.literal(true) }),
3876
+ { kind: "mutation", auth: "admin", access: "create" }
3877
+ ),
3878
+ /**
3879
+ * Subscribe to a topic. Returns a `subscriptionId` to pass to
3880
+ * `unsubscribe`. The addon refcounts broker subscriptions —
3881
+ * multiple consumers on the same topic share one upstream sub.
3882
+ * Messages arrive on `mqtt.message` events with `subscriptionIds[]`
3883
+ * listing which subscriptions matched.
3884
+ */
3885
+ subscribe: method(
3886
+ SubscribeInputSchema,
3887
+ SubscribeResultSchema,
3888
+ { kind: "mutation", auth: "admin", access: "create" }
3889
+ ),
3890
+ /** Release a specific subscription. Tears down the broker sub
3891
+ * only when the last owner releases. Idempotent. */
3892
+ unsubscribe: method(
3893
+ UnsubscribeInputSchema,
3894
+ z.object({ success: z.literal(true) }),
3895
+ { kind: "mutation", auth: "admin", access: "delete" }
3896
+ ),
3897
+ /** List active per-owner subscriptions on this provider. */
3898
+ listSubscriptions: method(
3899
+ z.void(),
3900
+ z.array(SubscriptionInfoSchema),
3901
+ { auth: "admin" }
3902
+ ),
3903
+ getStatus: method(
3904
+ z.void(),
3905
+ MqttStatusSchema,
3906
+ { auth: "admin" }
3907
+ )
3908
+ }
3909
+ };
3910
+ const HaServiceCallSchema = z.object({
3911
+ /** HA domain (e.g. `light`, `switch`, `notify`). */
3912
+ domain: z.string(),
3913
+ /** HA service (e.g. `turn_on`, `toggle`). */
3914
+ service: z.string(),
3915
+ /** Service-specific data payload (e.g. `{entity_id: 'light.kitchen', brightness: 200}`). */
3916
+ serviceData: z.record(z.string(), z.unknown()).optional(),
3917
+ /** Optional target spec (entity_id / device_id / area_id). */
3918
+ target: z.record(z.string(), z.unknown()).optional()
3919
+ });
3920
+ const HaStateSchema = z.object({
3921
+ entity_id: z.string(),
3922
+ state: z.string(),
3923
+ attributes: z.record(z.string(), z.unknown()).default({}),
3924
+ last_changed: z.string().optional(),
3925
+ last_updated: z.string().optional()
3926
+ });
3927
+ const HaStatusSchema = z.object({
3928
+ connected: z.boolean(),
3929
+ host: z.string(),
3930
+ /** Active per-owner subscription count. */
3931
+ subscriptionCount: z.number().int(),
3932
+ /** Last error reported by the WebSocket. */
3933
+ error: z.string().optional(),
3934
+ /** HA version reported during the auth handshake, when reachable. */
3935
+ haVersion: z.string().optional(),
3936
+ connectedAt: z.number().optional()
3937
+ });
3938
+ const HaSubscribeInputSchema = z.object({
3939
+ /**
3940
+ * Specific HA event type to subscribe to (`state_changed`,
3941
+ * `service_called`, etc.). Empty string = all events (firehose —
3942
+ * only for debugging).
3943
+ */
3944
+ eventType: z.string().optional(),
3945
+ /** Caller-supplied tag for listSubscriptions debugging. */
3946
+ owner: z.string().optional()
3947
+ });
3948
+ const HaSubscribeResultSchema = z.object({
3949
+ success: z.literal(true),
3950
+ subscriptionId: z.string()
3951
+ });
3952
+ const HaUnsubscribeInputSchema = z.object({
3953
+ subscriptionId: z.string()
3954
+ });
3955
+ const HaSubscriptionInfoSchema = z.object({
3956
+ subscriptionId: z.string(),
3957
+ /** Empty string when subscribed to ALL events. */
3958
+ eventType: z.string(),
3959
+ owner: z.string(),
3960
+ createdAt: z.number()
3961
+ });
3962
+ const homeAssistantCapability = {
3963
+ name: "home-assistant",
3964
+ scope: "system",
3965
+ mode: "collection",
3966
+ internal: true,
3967
+ methods: {
3968
+ /**
3969
+ * Subscribe to HA events. Returns a `subscriptionId` to pass to
3970
+ * `unsubscribeEvents`. The addon refcounts upstream subscriptions
3971
+ * so multiple consumers share one HA-side event stream.
3972
+ * Events arrive on the kernel bus under `home-assistant.event`
3973
+ * with `subscriptionIds[]` listing which subs matched.
3974
+ */
3975
+ subscribeEvents: method(
3976
+ HaSubscribeInputSchema,
3977
+ HaSubscribeResultSchema,
3978
+ { kind: "mutation", auth: "admin", access: "create" }
3979
+ ),
3980
+ /** Release a specific subscription. Tears down the upstream sub
3981
+ * only when the last owner releases. Idempotent. */
3982
+ unsubscribeEvents: method(
3983
+ HaUnsubscribeInputSchema,
3984
+ z.object({ success: z.literal(true) }),
3985
+ { kind: "mutation", auth: "admin", access: "delete" }
3986
+ ),
3987
+ /**
3988
+ * Call an HA service (turn light on, run a script, etc.). Returns
3989
+ * the HA response object — usually `{context, response: ...}`.
3990
+ */
3991
+ callService: method(
3992
+ HaServiceCallSchema,
3993
+ z.object({ result: z.unknown() }),
3994
+ { kind: "mutation", auth: "admin", access: "create" }
3995
+ ),
3996
+ /** Fetch all entity states. Cheap snapshot — HA returns the full
3997
+ * state registry on every call. */
3998
+ getStates: method(
3999
+ z.void(),
4000
+ z.array(HaStateSchema).readonly(),
4001
+ { auth: "admin" }
4002
+ ),
4003
+ /** Fetch a single entity's current state. `null` when not found. */
4004
+ getState: method(
4005
+ z.object({ entityId: z.string() }),
4006
+ HaStateSchema.nullable(),
4007
+ { auth: "admin" }
4008
+ ),
4009
+ /** List active per-owner subscriptions. */
4010
+ listSubscriptions: method(
4011
+ z.void(),
4012
+ z.array(HaSubscriptionInfoSchema).readonly(),
4013
+ { auth: "admin" }
4014
+ ),
4015
+ getStatus: method(z.void(), HaStatusSchema, { auth: "admin" })
4016
+ }
4017
+ };
3672
4018
  const AddonPageDeclarationSchema$1 = z.object({
3673
4019
  id: z.string(),
3674
4020
  label: z.string(),
@@ -3782,7 +4128,35 @@ const addonWidgetsCapability = {
3782
4128
  };
3783
4129
  const AddonHttpRouteSchema = z.object({
3784
4130
  method: z.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]),
3785
- path: z.string()
4131
+ path: z.string(),
4132
+ access: z.enum(["public", "authenticated", "admin"]).optional(),
4133
+ description: z.string().optional()
4134
+ });
4135
+ const InvokeRequestSchema = z.object({
4136
+ method: z.string(),
4137
+ path: z.string(),
4138
+ params: z.record(z.string(), z.string()),
4139
+ query: z.record(z.string(), z.string()),
4140
+ body: z.unknown(),
4141
+ headers: z.record(z.string(), z.string()),
4142
+ user: z.object({
4143
+ id: z.string(),
4144
+ username: z.string(),
4145
+ isAdmin: z.boolean()
4146
+ }).optional(),
4147
+ scopedToken: z.unknown().optional()
4148
+ });
4149
+ const InvokeReplyEnvelopeSchema = z.object({
4150
+ status: z.number().int(),
4151
+ headers: z.record(z.string(), z.string()),
4152
+ /** When set, the hub MUST `reply.redirect(redirectUrl)` instead of
4153
+ * sending `body`. Status defaults to 302 when this is set unless
4154
+ * the handler called `reply.code(...)` explicitly. */
4155
+ redirectUrl: z.string().nullable(),
4156
+ /** JSON-serializable body. `undefined` is treated as "no body". */
4157
+ body: z.unknown().optional(),
4158
+ /** Set when the handler called `reply.type(mime)`. */
4159
+ contentType: z.string().optional()
3786
4160
  });
3787
4161
  const addonRoutesCapability = {
3788
4162
  name: "addon-routes",
@@ -3790,7 +4164,16 @@ const addonRoutesCapability = {
3790
4164
  mode: "collection",
3791
4165
  internal: true,
3792
4166
  methods: {
3793
- getRoutes: method(z.void(), z.array(AddonHttpRouteSchema))
4167
+ getRoutes: method(z.void(), z.array(AddonHttpRouteSchema)),
4168
+ /**
4169
+ * Cross-process dispatch entry point. Forked addons implement this
4170
+ * (via `buildAddonRouteProvider`) so the hub's Fastify catch-all
4171
+ * can route through Moleculer when the handler lives in a worker.
4172
+ *
4173
+ * Local addons can implement it for free with the same helper;
4174
+ * the hub bypasses the wire on co-located addons.
4175
+ */
4176
+ invoke: method(InvokeRequestSchema, InvokeReplyEnvelopeSchema, { kind: "mutation" })
3794
4177
  }
3795
4178
  };
3796
4179
  const HWACCEL_OPTIONS = [
@@ -5326,7 +5709,14 @@ const AuthResultSchema = z.object({
5326
5709
  username: z.string(),
5327
5710
  email: z.string().optional(),
5328
5711
  displayName: z.string().optional(),
5329
- roles: z.array(z.string()).optional()
5712
+ /**
5713
+ * Whether the authenticating user is an admin. The auth-provider
5714
+ * surface returns this so the server's login flow can mint a JWT
5715
+ * with the correct bypass flag. Non-admin users authenticated via
5716
+ * an external IdP still need their scopes assigned by an admin via
5717
+ * `setUserScopes` — the SSO flow doesn't carry permissions.
5718
+ */
5719
+ isAdmin: z.boolean().default(false)
5330
5720
  });
5331
5721
  const authProviderCapability = {
5332
5722
  name: "auth-provider",
@@ -5347,6 +5737,14 @@ const authProviderCapability = {
5347
5737
  const AuthProviderInfoSchema = z.object({
5348
5738
  /** Stable id matching the addon id (used for `getLoginUrl({addonId,…})`). */
5349
5739
  addonId: z.string(),
5740
+ /**
5741
+ * Per-instance id when one addon registers multiple "logical"
5742
+ * providers (e.g. OIDC with Google + Microsoft + custom). The login
5743
+ * URL becomes `/addon/${addonId}/${instanceId}/start` — handler reads
5744
+ * `:instanceId` from the route. Empty/unset means the addon is a
5745
+ * single-instance provider; the URL is `/addon/${addonId}/start`.
5746
+ */
5747
+ instanceId: z.string().optional(),
5350
5748
  /** Display label shown on the login button + admin row. */
5351
5749
  displayName: z.string(),
5352
5750
  /** Optional iconography hint (lucide-react icon name OR emoji). */
@@ -5357,6 +5755,8 @@ const AuthProviderInfoSchema = z.object({
5357
5755
  /** When true, the provider exposes a credential-form login flow
5358
5756
  * (`validateCredentials` accepts username + password). */
5359
5757
  hasCredentialFlow: z.boolean(),
5758
+ /** Provider kind, drives admin-UI hint dispatch (oidc / saml / totp / …). */
5759
+ kind: z.string().optional(),
5360
5760
  /** Operator-facing status string (e.g. "Connected to https://login.acme.com"). */
5361
5761
  status: z.string().optional(),
5362
5762
  /** When false, the provider is registered but disabled by config; the
@@ -7126,6 +7526,35 @@ const meshNetworkCapability = {
7126
7526
  MeshIngressConfigSchema,
7127
7527
  z.object({ success: z.literal(true) }),
7128
7528
  { kind: "mutation" }
7529
+ ),
7530
+ /**
7531
+ * Probe the mesh daemon / API for a sanity check WITHOUT joining.
7532
+ * Operator-facing "test connection" button: validates the auth key
7533
+ * + reaches the control plane and reports back what would happen
7534
+ * on join.
7535
+ *
7536
+ * Tailscale: dry-runs `tailscale up --auth-key=… --reset` against
7537
+ * an idempotency probe; for an already-joined node it just returns
7538
+ * the current status.
7539
+ */
7540
+ testConnection: method(
7541
+ z.object({
7542
+ /** Optional auth key — when provided, probes the key validity
7543
+ * against the provider's API. Omit when already joined to
7544
+ * just ping the daemon. */
7545
+ authKey: z.string().optional()
7546
+ }),
7547
+ z.object({
7548
+ ok: z.boolean(),
7549
+ /** Provider-side identifier resolved by the probe (tailnet
7550
+ * name for Tailscale, network id for ZeroTier, etc.). */
7551
+ tenant: z.string().optional(),
7552
+ /** Daemon binary version, when reachable. */
7553
+ daemonVersion: z.string().optional(),
7554
+ /** Human-readable error when `ok: false`. */
7555
+ error: z.string().optional()
7556
+ }),
7557
+ { kind: "mutation" }
7129
7558
  )
7130
7559
  }
7131
7560
  };
@@ -7183,26 +7612,54 @@ const meshOrchestratorCapability = {
7183
7612
  )
7184
7613
  }
7185
7614
  };
7186
- const UserRoleSchema = z.enum(["admin", "viewer", "agent", "scoped"]);
7615
+ const MethodAccessSchema = z.enum(["view", "create", "delete"]);
7187
7616
  const AllowedProviderSchema = z.union([z.literal("*"), z.array(z.string())]);
7188
7617
  const AllowedDevicesSchema = z.record(z.string(), z.union([z.literal("*"), z.array(z.string())]));
7189
- const MethodAccessSchema = z.enum(["view", "create", "delete"]);
7190
- const TokenScopeSchema = z.object({
7191
- type: z.enum(["addon", "capability"]),
7192
- target: z.string(),
7193
- access: z.array(MethodAccessSchema).min(1)
7194
- });
7618
+ const CapScopeSchema = z.enum(["device", "system"]);
7619
+ const TokenScopeSchema = z.discriminatedUnion("type", [
7620
+ z.object({
7621
+ type: z.literal("category"),
7622
+ target: CapScopeSchema,
7623
+ access: z.array(MethodAccessSchema).min(1)
7624
+ }),
7625
+ z.object({
7626
+ type: z.literal("capability"),
7627
+ target: z.string(),
7628
+ access: z.array(MethodAccessSchema).min(1)
7629
+ }),
7630
+ z.object({
7631
+ type: z.literal("addon"),
7632
+ target: z.string(),
7633
+ access: z.array(MethodAccessSchema).min(1)
7634
+ }),
7635
+ z.object({
7636
+ type: z.literal("device"),
7637
+ /**
7638
+ * One or more deviceIds (serialised as strings for wire-format
7639
+ * consistency with the rest of the union). Matcher accepts if
7640
+ * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
7641
+ * of one scope-per-device when granting access to a set of cameras.
7642
+ */
7643
+ targets: z.array(z.string()).min(1),
7644
+ access: z.array(MethodAccessSchema).min(1)
7645
+ })
7646
+ ]);
7195
7647
  const UserRecordSchema = z.object({
7196
7648
  id: z.string(),
7197
7649
  username: z.string(),
7198
7650
  passwordHash: z.string(),
7199
- role: UserRoleSchema,
7651
+ /**
7652
+ * Admin bypass. When true, the middleware skips the scope-access
7653
+ * check entirely. There is no other axis of privilege; the legacy
7654
+ * role enum collapsed onto this boolean in v2.
7655
+ */
7656
+ isAdmin: z.boolean().default(false),
7200
7657
  allowedProviders: AllowedProviderSchema,
7201
7658
  allowedDevices: AllowedDevicesSchema,
7202
7659
  /**
7203
- * Scopes granted to this user. Admins bypass; their `scopes` is ignored.
7204
- * Non-admins (`viewer`, `agent`, `scoped`) without scopes are locked out
7205
- * of every protected call.
7660
+ * Scopes granted to this user. Admins bypass; their `scopes` is
7661
+ * ignored. Non-admins without scopes are locked out of every
7662
+ * protected call.
7206
7663
  */
7207
7664
  scopes: z.array(TokenScopeSchema).default([]),
7208
7665
  createdAt: z.number(),
@@ -7211,7 +7668,7 @@ const UserRecordSchema = z.object({
7211
7668
  const ApiKeyRecordSchema = z.object({
7212
7669
  id: z.string(),
7213
7670
  label: z.string(),
7214
- role: UserRoleSchema,
7671
+ isAdmin: z.boolean().default(false),
7215
7672
  allowedProviders: AllowedProviderSchema,
7216
7673
  allowedDevices: AllowedDevicesSchema,
7217
7674
  tokenHash: z.string(),
@@ -7235,7 +7692,7 @@ const ScopedTokenSchema = z.object({
7235
7692
  const UserSummarySchema = z.object({
7236
7693
  id: z.string(),
7237
7694
  username: z.string(),
7238
- role: UserRoleSchema,
7695
+ isAdmin: z.boolean().default(false),
7239
7696
  allowedProviders: z.union([z.array(z.string()), z.literal("*")]),
7240
7697
  allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])),
7241
7698
  scopes: z.array(TokenScopeSchema).default([]),
@@ -7245,14 +7702,14 @@ const UserSummarySchema = z.object({
7245
7702
  const CreateUserInputSchema = z.object({
7246
7703
  username: z.string(),
7247
7704
  password: z.string().min(6),
7248
- role: UserRoleSchema,
7705
+ isAdmin: z.boolean().default(false),
7249
7706
  allowedProviders: z.union([z.array(z.string()), z.literal("*")]).optional(),
7250
7707
  allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])).optional(),
7251
7708
  scopes: z.array(TokenScopeSchema).optional()
7252
7709
  });
7253
7710
  const UpdateUserInputSchema = z.object({
7254
7711
  id: z.string(),
7255
- role: UserRoleSchema.optional(),
7712
+ isAdmin: z.boolean().optional(),
7256
7713
  allowedProviders: z.union([z.array(z.string()), z.literal("*")]).optional(),
7257
7714
  allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])).optional(),
7258
7715
  scopes: z.array(TokenScopeSchema).optional()
@@ -7260,7 +7717,7 @@ const UpdateUserInputSchema = z.object({
7260
7717
  const ApiKeySummarySchema = z.object({
7261
7718
  id: z.string(),
7262
7719
  label: z.string(),
7263
- role: UserRoleSchema,
7720
+ isAdmin: z.boolean().default(false),
7264
7721
  allowedProviders: z.union([z.array(z.string()), z.literal("*")]).optional(),
7265
7722
  allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])).optional(),
7266
7723
  tokenPrefix: z.string(),
@@ -7269,7 +7726,7 @@ const ApiKeySummarySchema = z.object({
7269
7726
  });
7270
7727
  const CreateApiKeyInputSchema = z.object({
7271
7728
  label: z.string(),
7272
- role: UserRoleSchema,
7729
+ isAdmin: z.boolean().default(false),
7273
7730
  allowedProviders: z.union([z.array(z.string()), z.literal("*")]).optional(),
7274
7731
  allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])).optional()
7275
7732
  });
@@ -7283,16 +7740,11 @@ const ScopedTokenSummarySchema = z.object({
7283
7740
  name: z.string(),
7284
7741
  tokenPrefix: z.string(),
7285
7742
  scopes: z.array(TokenScopeSchema),
7286
- // Mirror the storage schema: `.nullish()` accepts the SQLite-native
7287
- // `null` for absent timestamps as well as in-memory `undefined`.
7288
7743
  expiresAt: z.number().nullish(),
7289
7744
  lastUsedAt: z.number().nullish(),
7290
7745
  createdAt: z.number()
7291
7746
  });
7292
7747
  const CreateScopedTokenInputSchema = z.object({
7293
- // The owner the token is issued on behalf of. `adminProcedure` gates
7294
- // this call so an admin can mint tokens for any user; the CLI passes
7295
- // its own logged-in `user.id` here.
7296
7748
  userId: z.string(),
7297
7749
  name: z.string(),
7298
7750
  scopes: z.array(TokenScopeSchema),
@@ -7302,45 +7754,85 @@ const CreateScopedTokenResultSchema = z.object({
7302
7754
  token: z.string(),
7303
7755
  record: ScopedTokenSummarySchema
7304
7756
  });
7757
+ const TotpSetupResultSchema = z.object({
7758
+ secret: z.string(),
7759
+ otpauthUrl: z.string()
7760
+ });
7761
+ const TotpStatusSchema = z.object({
7762
+ /** True iff `confirmedAt != null` — a pending half-enrollment is reported as `enabled: false`. */
7763
+ enabled: z.boolean(),
7764
+ /** Null when no row exists OR the row is still pending confirmation. */
7765
+ confirmedAt: z.number().nullable()
7766
+ });
7305
7767
  const userManagementCapability = {
7306
7768
  name: "user-management",
7307
7769
  scope: "system",
7308
7770
  mode: "singleton",
7309
7771
  methods: {
7310
- // ── Users ──────────────────────────────────────────────────────
7311
7772
  listUsers: method(z.void(), z.array(UserSummarySchema), { auth: "admin" }),
7312
- createUser: method(CreateUserInputSchema, UserSummarySchema, { kind: "mutation", auth: "admin" }),
7313
- updateUser: method(UpdateUserInputSchema, z.object({ success: z.literal(true) }), { kind: "mutation", auth: "admin" }),
7314
- deleteUser: method(z.object({ id: z.string() }), z.object({ success: z.literal(true) }), { kind: "mutation", auth: "admin" }),
7773
+ createUser: method(CreateUserInputSchema, UserSummarySchema, { kind: "mutation", auth: "admin", access: "create" }),
7774
+ updateUser: method(UpdateUserInputSchema, z.object({ success: z.literal(true) }), { kind: "mutation", auth: "admin", access: "create" }),
7775
+ deleteUser: method(z.object({ id: z.string() }), z.object({ success: z.literal(true) }), { kind: "mutation", auth: "admin", access: "delete" }),
7315
7776
  resetPassword: method(
7316
7777
  z.object({ id: z.string(), newPassword: z.string().min(6) }),
7317
7778
  z.object({ success: z.literal(true) }),
7318
- { kind: "mutation", auth: "admin" }
7779
+ { kind: "mutation", auth: "admin", access: "create" }
7319
7780
  ),
7320
- /**
7321
- * Replace the scope set on a user. Subset check: the caller's scopes
7322
- * must include every requested scope+access (admin bypasses).
7323
- */
7324
7781
  setUserScopes: method(
7325
7782
  z.object({ userId: z.string(), scopes: z.array(TokenScopeSchema) }),
7326
7783
  z.object({ success: z.literal(true) }),
7327
- { kind: "mutation", auth: "admin" }
7784
+ { kind: "mutation", auth: "admin", access: "create" }
7328
7785
  ),
7329
7786
  validateCredentials: method(
7330
7787
  z.object({ username: z.string(), password: z.string() }),
7331
7788
  UserSummarySchema.extend({ passwordHash: z.string() }).nullable(),
7332
- { kind: "mutation" }
7789
+ { kind: "mutation", access: "view" }
7333
7790
  ),
7334
- // ── API Keys ──────────────────────────────────────────────────
7335
7791
  listApiKeys: method(z.void(), z.array(ApiKeySummarySchema), { auth: "admin" }),
7336
- createApiKey: method(CreateApiKeyInputSchema, CreateApiKeyResultSchema, { kind: "mutation", auth: "admin" }),
7337
- revokeApiKey: method(z.object({ id: z.string() }), z.object({ success: z.literal(true) }), { kind: "mutation", auth: "admin" }),
7338
- validateApiKey: method(z.object({ token: z.string() }), ApiKeySummarySchema.nullable(), { kind: "mutation" }),
7339
- // ── Scoped Tokens ─────────────────────────────────────────────
7340
- createScopedToken: method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, { kind: "mutation", auth: "admin" }),
7341
- revokeScopedToken: method(z.object({ id: z.string() }), z.object({ success: z.literal(true) }), { kind: "mutation", auth: "admin" }),
7342
- validateScopedToken: method(z.object({ token: z.string() }), ScopedTokenSummarySchema.nullable()),
7343
- listScopedTokens: method(z.object({ userId: z.string() }), z.array(ScopedTokenSummarySchema), { auth: "admin" })
7792
+ createApiKey: method(CreateApiKeyInputSchema, CreateApiKeyResultSchema, { kind: "mutation", auth: "admin", access: "create" }),
7793
+ revokeApiKey: method(z.object({ id: z.string() }), z.object({ success: z.literal(true) }), { kind: "mutation", auth: "admin", access: "delete" }),
7794
+ validateApiKey: method(z.object({ token: z.string() }), ApiKeySummarySchema.nullable(), { kind: "mutation", access: "view" }),
7795
+ createScopedToken: method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, { kind: "mutation", auth: "admin", access: "create" }),
7796
+ revokeScopedToken: method(z.object({ id: z.string() }), z.object({ success: z.literal(true) }), { kind: "mutation", auth: "admin", access: "delete" }),
7797
+ validateScopedToken: method(z.object({ token: z.string() }), ScopedTokenSummarySchema.nullable(), { access: "view" }),
7798
+ listScopedTokens: method(z.object({ userId: z.string() }), z.array(ScopedTokenSummarySchema), { auth: "admin" }),
7799
+ // ── TOTP / 2FA ─────────────────────────────────────────────────
7800
+ //
7801
+ // Setup → Confirm → (Verify on login) → Disable.
7802
+ //
7803
+ // Admin-only for now: operator enrolls TOTP on a user's behalf by
7804
+ // pairing their authenticator with the returned QR. Self-service
7805
+ // enrollment is a follow-up (needs the cap framework to expose the
7806
+ // caller's identity to the provider so the provider can enforce
7807
+ // self-or-admin).
7808
+ setupTotp: method(
7809
+ z.object({ userId: z.string() }),
7810
+ TotpSetupResultSchema,
7811
+ { kind: "mutation", auth: "admin", access: "create" }
7812
+ ),
7813
+ confirmTotp: method(
7814
+ z.object({ userId: z.string(), code: z.string() }),
7815
+ z.object({ success: z.literal(true) }),
7816
+ { kind: "mutation", auth: "admin", access: "create" }
7817
+ ),
7818
+ disableTotp: method(
7819
+ z.object({ userId: z.string() }),
7820
+ z.object({ success: z.literal(true) }),
7821
+ { kind: "mutation", auth: "admin", access: "delete" }
7822
+ ),
7823
+ getTotpStatus: method(
7824
+ z.object({ userId: z.string() }),
7825
+ TotpStatusSchema,
7826
+ { auth: "admin" }
7827
+ ),
7828
+ // Public (no `auth`) — used by the login flow's second-step
7829
+ // challenge endpoint. The userId comes from the password-validation
7830
+ // step (signed bridge token), so this method is not a free oracle.
7831
+ verifyTotp: method(
7832
+ z.object({ userId: z.string(), code: z.string() }),
7833
+ z.object({ valid: z.boolean() }),
7834
+ { kind: "mutation", access: "view" }
7835
+ )
7344
7836
  }
7345
7837
  };
7346
7838
  const FeatureManifestSchema = z.object({
@@ -7962,7 +8454,7 @@ const PIPELINE_OWNER_CAPABILITY_NAMES = [
7962
8454
  "pipeline-runner"
7963
8455
  ];
7964
8456
  export {
7965
- networkQualityCapability as $,
8457
+ nativeObjectDetectionCapability as $,
7966
8458
  adminUiCapability as A,
7967
8459
  advancedNotifierCapability as B,
7968
8460
  alertsCapability as C,
@@ -7980,306 +8472,323 @@ export {
7980
8472
  deviceStateCapability as O,
7981
8473
  embeddingEncoderCapability as P,
7982
8474
  eventsCapability as Q,
7983
- integrationsCapability as R,
7984
- intercomCapability as S,
7985
- localNetworkCapability as T,
7986
- logDestinationCapability as U,
7987
- meshNetworkCapability as V,
7988
- meshOrchestratorCapability as W,
7989
- metricsProviderCapability as X,
7990
- motionDetectionCapability as Y,
7991
- nativeObjectDetectionCapability as Z,
7992
- networkAccessCapability as _,
8475
+ homeAssistantCapability as R,
8476
+ integrationsCapability as S,
8477
+ intercomCapability as T,
8478
+ localNetworkCapability as U,
8479
+ logDestinationCapability as V,
8480
+ meshNetworkCapability as W,
8481
+ meshOrchestratorCapability as X,
8482
+ metricsProviderCapability as Y,
8483
+ motionDetectionCapability as Z,
8484
+ mqttProviderCapability as _,
7993
8485
  zoneRulesCapability as a,
7994
- AuthProviderInfoSchema as a$,
7995
- nodesCapability as a0,
7996
- notificationOutputCapability as a1,
7997
- osdCapability as a2,
7998
- pipelineAnalyticsCapability as a3,
7999
- pipelineExecutorCapability as a4,
8000
- pipelineOrchestratorCapability as a5,
8001
- pipelineRunnerCapability as a6,
8002
- platformProbeCapability as a7,
8003
- ptzCapability as a8,
8004
- rebootCapability as a9,
8005
- AddonPageDeclarationSchema as aA,
8006
- AddonPageInfoSchema as aB,
8007
- AgentLoadSummarySchema as aC,
8008
- AlertSchema as aD,
8009
- AlertSeveritySchema as aE,
8010
- AlertSourceSchema as aF,
8011
- AlertStatusSchema as aG,
8012
- ApiKeyRecordSchema as aH,
8013
- ApiKeySummarySchema as aI,
8014
- ArchiveEntrySchema as aJ,
8015
- ArchiveManifestSchema as aK,
8016
- AudioAnalysisResultSchema as aL,
8017
- AudioAnalysisSettingsSchema as aM,
8018
- AudioChunkInputSchema as aN,
8019
- AudioClassSummarySchema as aO,
8020
- AudioClassificationLabelSchema as aP,
8021
- AudioClassificationResultSchema as aQ,
8022
- AudioCodecInfoSchema as aR,
8023
- AudioDecodeSessionConfigSchema as aS,
8024
- AudioEncodeSessionConfigSchema as aT,
8025
- AudioEncodedChunkSchema as aU,
8026
- AudioEventSchema as aV,
8027
- AudioLevelSchema as aW,
8028
- AudioMetricsHistoryPointSchema as aX,
8029
- AudioMetricsHistorySchema as aY,
8030
- AudioMetricsSnapshotSchema as aZ,
8031
- AudioPcmChunkSchema as a_,
8032
- recordingCapability as aa,
8033
- recordingEngineCapability as ab,
8034
- remoteAccessCapability as ac,
8035
- restreamerCapability as ad,
8036
- settingsStoreCapability as ae,
8037
- snapshotCapability as af,
8038
- snapshotProviderCapability as ag,
8039
- storageCapability as ah,
8040
- storageProviderCapability as ai,
8041
- streamBrokerCapability as aj,
8042
- streamingEngineCapability as ak,
8043
- systemCapability as al,
8044
- toastCapability as am,
8045
- turnOrchestratorCapability as an,
8046
- turnProviderCapability as ao,
8047
- userManagementCapability as ap,
8048
- webrtcCapability as aq,
8049
- webrtcSessionCapability as ar,
8050
- ACCESSORY_LABEL as as,
8051
- APPLE_SA_TO_MACRO as at,
8052
- AUDIO_BACKEND_CHOICES as au,
8053
- AUDIO_MACRO_LABELS as av,
8054
- AccessoriesStatusSchema as aw,
8055
- AccessoryKind as ax,
8056
- AddonAutoUpdateSchema as ay,
8057
- AddonListItemSchema as az,
8486
+ AudioLevelSchema as a$,
8487
+ networkAccessCapability as a0,
8488
+ networkQualityCapability as a1,
8489
+ nodesCapability as a2,
8490
+ notificationOutputCapability as a3,
8491
+ osdCapability as a4,
8492
+ pipelineAnalyticsCapability as a5,
8493
+ pipelineExecutorCapability as a6,
8494
+ pipelineOrchestratorCapability as a7,
8495
+ pipelineRunnerCapability as a8,
8496
+ platformProbeCapability as a9,
8497
+ AUDIO_MACRO_LABELS as aA,
8498
+ AccessoriesStatusSchema as aB,
8499
+ AccessoryKind as aC,
8500
+ AddonAutoUpdateSchema as aD,
8501
+ AddonListItemSchema as aE,
8502
+ AddonPageDeclarationSchema as aF,
8503
+ AddonPageInfoSchema as aG,
8504
+ AgentLoadSummarySchema as aH,
8505
+ AlertSchema as aI,
8506
+ AlertSeveritySchema as aJ,
8507
+ AlertSourceSchema as aK,
8508
+ AlertStatusSchema as aL,
8509
+ ApiKeyRecordSchema as aM,
8510
+ ApiKeySummarySchema as aN,
8511
+ ArchiveEntrySchema as aO,
8512
+ ArchiveManifestSchema as aP,
8513
+ AudioAnalysisResultSchema as aQ,
8514
+ AudioAnalysisSettingsSchema as aR,
8515
+ AudioChunkInputSchema as aS,
8516
+ AudioClassSummarySchema as aT,
8517
+ AudioClassificationLabelSchema as aU,
8518
+ AudioClassificationResultSchema as aV,
8519
+ AudioCodecInfoSchema as aW,
8520
+ AudioDecodeSessionConfigSchema as aX,
8521
+ AudioEncodeSessionConfigSchema as aY,
8522
+ AudioEncodedChunkSchema as aZ,
8523
+ AudioEventSchema as a_,
8524
+ ptzCapability as aa,
8525
+ rebootCapability as ab,
8526
+ recordingCapability as ac,
8527
+ recordingEngineCapability as ad,
8528
+ remoteAccessCapability as ae,
8529
+ restreamerCapability as af,
8530
+ settingsStoreCapability as ag,
8531
+ smtpProviderCapability as ah,
8532
+ snapshotCapability as ai,
8533
+ snapshotProviderCapability as aj,
8534
+ ssoBridgeCapability as ak,
8535
+ storageCapability as al,
8536
+ storageProviderCapability as am,
8537
+ streamBrokerCapability as an,
8538
+ streamingEngineCapability as ao,
8539
+ systemCapability as ap,
8540
+ toastCapability as aq,
8541
+ turnOrchestratorCapability as ar,
8542
+ turnProviderCapability as as,
8543
+ userManagementCapability as at,
8544
+ userPasskeysCapability as au,
8545
+ webrtcCapability as av,
8546
+ webrtcSessionCapability as aw,
8547
+ ACCESSORY_LABEL as ax,
8548
+ APPLE_SA_TO_MACRO as ay,
8549
+ AUDIO_BACKEND_CHOICES as az,
8058
8550
  zoneAnalyticsCapability as b,
8059
- DoorbellStatusSchema as b$,
8060
- AuthResultSchema as b0,
8061
- AutoUpdateSettingsSchema as b1,
8062
- AvailableIntegrationTypeSchema as b2,
8063
- BATTERY_DEVICE_PROFILE as b3,
8064
- BackupDestinationInfoSchema as b4,
8065
- BackupEntrySchema as b5,
8066
- BatteryStatusSchema as b6,
8067
- BoundingBoxSchema as b7,
8068
- BrightnessStatusSchema as b8,
8069
- BrokerAudioClientSchema as b9,
8070
- CreateIntegrationInputSchema as bA,
8071
- CreateScopedTokenInputSchema as bB,
8072
- CreateScopedTokenResultSchema as bC,
8073
- CreateUserInputSchema as bD,
8074
- CustomActionInputSchema as bE,
8075
- DEFAULT_AUDIO_ANALYZER_CONFIG as bF,
8076
- DEFAULT_DECODER_HWACCEL_CONFIG as bG,
8077
- DEVICE_PROFILES as bH,
8078
- DEVICE_SETTINGS_CONTRIBUTION_METHODS as bI,
8079
- DEVICE_STATUS_METHOD as bJ,
8080
- DecodedFrameSchema as bK,
8081
- DecoderAssignmentSchema as bL,
8082
- DecoderSessionConfigSchema as bM,
8083
- DecoderStatsSchema as bN,
8084
- DeleteIntegrationResultSchema as bO,
8085
- DetectorOutputSchema as bP,
8086
- DeviceDiscoveryStatusSchema as bQ,
8087
- DeviceFeature as bR,
8088
- DeviceInfoSchema as bS,
8089
- DeviceNetworkStatsSchema as bT,
8090
- DeviceRole as bU,
8091
- DeviceStatusSchema as bV,
8092
- DeviceType as bW,
8093
- DiscoveredChildDeviceSchema as bX,
8094
- DiscoveredChildStatusSchema as bY,
8095
- DiscoveredDeviceSchema as bZ,
8096
- DoorbellPressEventSchema as b_,
8097
- BrokerClientsSchema as ba,
8098
- BrokerDecodedClientSchema as bb,
8099
- BrokerRtspClientSchema as bc,
8100
- BrokerStatsSchema as bd,
8101
- BrokerStatusSchema as be,
8102
- CAM_PROFILE_ORDER as bf,
8103
- CamProfileSchema as bg,
8104
- CamStreamKindSchema as bh,
8105
- CamStreamResolutionSchema as bi,
8106
- CameraCredentialsSchema as bj,
8107
- CameraCredentialsStatusSchema as bk,
8108
- CameraMetricsSchema as bl,
8109
- CameraMetricsWithDeviceIdSchema as bm,
8110
- CameraStreamSchema as bn,
8111
- CapabilityBindingsSchema as bo,
8112
- ChargingStatus as bp,
8113
- ClientNetworkStatsSchema as bq,
8114
- ClusterAddonNodeDeploymentSchema as br,
8115
- ClusterAddonStatusEntrySchema as bs,
8116
- CollectionColumnSchema as bt,
8117
- CollectionIndexSchema as bu,
8118
- ConfigEntrySchema$1 as bv,
8119
- ConfigSectionWithValuesSchema as bw,
8120
- ConfigTabDeclarationSchema as bx,
8121
- CreateApiKeyInputSchema as by,
8122
- CreateApiKeyResultSchema as bz,
8551
+ DeviceStatusSchema as b$,
8552
+ AudioMetricsHistoryPointSchema as b0,
8553
+ AudioMetricsHistorySchema as b1,
8554
+ AudioMetricsSnapshotSchema as b2,
8555
+ AudioPcmChunkSchema as b3,
8556
+ AuthProviderInfoSchema as b4,
8557
+ AuthResultSchema as b5,
8558
+ AutoUpdateSettingsSchema as b6,
8559
+ AvailableIntegrationTypeSchema as b7,
8560
+ BATTERY_DEVICE_PROFILE as b8,
8561
+ BackupDestinationInfoSchema as b9,
8562
+ CollectionIndexSchema as bA,
8563
+ ConfigEntrySchema$1 as bB,
8564
+ ConfigSectionWithValuesSchema as bC,
8565
+ ConfigTabDeclarationSchema as bD,
8566
+ CreateApiKeyInputSchema as bE,
8567
+ CreateApiKeyResultSchema as bF,
8568
+ CreateIntegrationInputSchema as bG,
8569
+ CreateScopedTokenInputSchema as bH,
8570
+ CreateScopedTokenResultSchema as bI,
8571
+ CreateUserInputSchema as bJ,
8572
+ CustomActionInputSchema as bK,
8573
+ DEFAULT_AUDIO_ANALYZER_CONFIG as bL,
8574
+ DEFAULT_DECODER_HWACCEL_CONFIG as bM,
8575
+ DEVICE_PROFILES as bN,
8576
+ DEVICE_SETTINGS_CONTRIBUTION_METHODS as bO,
8577
+ DEVICE_STATUS_METHOD as bP,
8578
+ DecodedFrameSchema as bQ,
8579
+ DecoderAssignmentSchema as bR,
8580
+ DecoderSessionConfigSchema as bS,
8581
+ DecoderStatsSchema as bT,
8582
+ DeleteIntegrationResultSchema as bU,
8583
+ DetectorOutputSchema as bV,
8584
+ DeviceDiscoveryStatusSchema as bW,
8585
+ DeviceFeature as bX,
8586
+ DeviceInfoSchema as bY,
8587
+ DeviceNetworkStatsSchema as bZ,
8588
+ DeviceRole as b_,
8589
+ BackupEntrySchema as ba,
8590
+ BatteryStatusSchema as bb,
8591
+ BoundingBoxSchema as bc,
8592
+ BrightnessStatusSchema as bd,
8593
+ BrokerAudioClientSchema as be,
8594
+ BrokerClientsSchema as bf,
8595
+ BrokerDecodedClientSchema as bg,
8596
+ BrokerRtspClientSchema as bh,
8597
+ BrokerStatsSchema as bi,
8598
+ BrokerStatusSchema as bj,
8599
+ CAM_PROFILE_ORDER as bk,
8600
+ CamProfileSchema as bl,
8601
+ CamStreamKindSchema as bm,
8602
+ CamStreamResolutionSchema as bn,
8603
+ CameraCredentialsSchema as bo,
8604
+ CameraCredentialsStatusSchema as bp,
8605
+ CameraMetricsSchema as bq,
8606
+ CameraMetricsWithDeviceIdSchema as br,
8607
+ CameraStreamSchema as bs,
8608
+ CapScopeSchema as bt,
8609
+ CapabilityBindingsSchema as bu,
8610
+ ChargingStatus as bv,
8611
+ ClientNetworkStatsSchema as bw,
8612
+ ClusterAddonNodeDeploymentSchema as bx,
8613
+ ClusterAddonStatusEntrySchema as by,
8614
+ CollectionColumnSchema as bz,
8123
8615
  motionCapability as c,
8124
- PlaceholderReasonSchema as c$,
8125
- EmbeddingInfoSchema as c0,
8126
- EmbeddingResultSchema as c1,
8127
- EncodedPacketSchema as c2,
8128
- EnrichedWidgetMetadataSchema as c3,
8129
- EventItemSchema as c4,
8130
- EventKindSchema as c5,
8131
- ExposedResourceSchema as c6,
8132
- FeatureManifestSchema as c7,
8133
- FeatureProbeStatusSchema as c8,
8134
- FrameInputSchema as c9,
8135
- NativeDetectionSchema as cA,
8136
- NativeObjectClassEnum as cB,
8137
- NativeObjectDetectionStatusSchema as cC,
8138
- NetworkAccessStatusSchema as cD,
8139
- NetworkAddressSchema as cE,
8140
- NetworkEndpointSchema as cF,
8141
- NotificationHistoryEntrySchema as cG,
8142
- NotificationRuleSchema as cH,
8143
- NotificationSchema as cI,
8144
- ObjectEventSchema as cJ,
8145
- OrchestratorMetricsSchema as cK,
8146
- OsdOverlayKindEnum as cL,
8147
- OsdOverlayPatchSchema as cM,
8148
- OsdOverlaySchema as cN,
8149
- OsdPositionEnum as cO,
8150
- OsdStatusSchema as cP,
8151
- PIPELINE_FLOW_CAPABILITY_NAMES as cQ,
8152
- PIPELINE_OWNER_CAPABILITY_NAMES as cR,
8153
- PackageUpdateSchema as cS,
8154
- PackageVersionInfoSchema as cT,
8155
- PcmSampleFormatSchema as cU,
8156
- PerScopeBreakdownSchema as cV,
8157
- PipelineAssignmentSchema as cW,
8158
- PipelineDefaultStepSchema as cX,
8159
- PipelineEngineChoiceSchema as cY,
8160
- PipelineRunResultBridge as cZ,
8161
- PipelineStepInputSchema as c_,
8162
- GlobalMetricsSchema as ca,
8163
- HWACCEL_OPTIONS as cb,
8164
- HealthStatusSchema as cc,
8165
- HistoryPointSchema as cd,
8166
- HistoryResolutionEnum as ce,
8167
- InstalledPackageSchema as cf,
8168
- IntegrationLiteSchema as cg,
8169
- IntegrationWithStateSchema as ch,
8170
- IntercomAbilitySchema as ci,
8171
- IntercomStatusSchema as cj,
8172
- LocationStatSchema as ck,
8173
- LogEntrySchema as cl,
8174
- LogLevelSchema$1 as cm,
8175
- LogStreamEntrySchema as cn,
8176
- MODEL_FORMATS as co,
8177
- MediaFileSchema as cp,
8178
- MethodAccessSchema as cq,
8179
- MotionAnalysisResultSchema as cr,
8180
- MotionEventSchema as cs,
8181
- MotionOnMotionChangedDataSchema as ct,
8182
- MotionRegionSchema as cu,
8183
- MotionSourceEnum as cv,
8184
- MotionSourcesSchema as cw,
8185
- MotionStatusSchema as cx,
8186
- MotionTriggerRuntimeStateSchema as cy,
8187
- MotionTriggerStatusSchema as cz,
8616
+ PIPELINE_OWNER_CAPABILITY_NAMES as c$,
8617
+ DeviceType as c0,
8618
+ DiscoveredChildDeviceSchema as c1,
8619
+ DiscoveredChildStatusSchema as c2,
8620
+ DiscoveredDeviceSchema as c3,
8621
+ DoorbellPressEventSchema as c4,
8622
+ DoorbellStatusSchema as c5,
8623
+ EmbeddingInfoSchema as c6,
8624
+ EmbeddingResultSchema as c7,
8625
+ EncodedPacketSchema as c8,
8626
+ EnrichedWidgetMetadataSchema as c9,
8627
+ MotionAnalysisResultSchema as cA,
8628
+ MotionEventSchema as cB,
8629
+ MotionOnMotionChangedDataSchema as cC,
8630
+ MotionRegionSchema as cD,
8631
+ MotionSourceEnum as cE,
8632
+ MotionSourcesSchema as cF,
8633
+ MotionStatusSchema as cG,
8634
+ MotionTriggerRuntimeStateSchema as cH,
8635
+ MotionTriggerStatusSchema as cI,
8636
+ MqttStatusSchema as cJ,
8637
+ NativeDetectionSchema as cK,
8638
+ NativeObjectClassEnum as cL,
8639
+ NativeObjectDetectionStatusSchema as cM,
8640
+ NetworkAccessStatusSchema as cN,
8641
+ NetworkAddressSchema as cO,
8642
+ NetworkEndpointSchema as cP,
8643
+ NotificationHistoryEntrySchema as cQ,
8644
+ NotificationRuleSchema as cR,
8645
+ NotificationSchema as cS,
8646
+ ObjectEventSchema as cT,
8647
+ OrchestratorMetricsSchema as cU,
8648
+ OsdOverlayKindEnum as cV,
8649
+ OsdOverlayPatchSchema as cW,
8650
+ OsdOverlaySchema as cX,
8651
+ OsdPositionEnum as cY,
8652
+ OsdStatusSchema as cZ,
8653
+ PIPELINE_FLOW_CAPABILITY_NAMES as c_,
8654
+ EventItemSchema as ca,
8655
+ EventKindSchema as cb,
8656
+ ExposedResourceSchema as cc,
8657
+ FeatureManifestSchema as cd,
8658
+ FeatureProbeStatusSchema as ce,
8659
+ FrameInputSchema as cf,
8660
+ GlobalMetricsSchema as cg,
8661
+ HWACCEL_OPTIONS as ch,
8662
+ HaServiceCallSchema as ci,
8663
+ HaStateSchema as cj,
8664
+ HaStatusSchema as ck,
8665
+ HealthStatusSchema as cl,
8666
+ HistoryPointSchema as cm,
8667
+ HistoryResolutionEnum as cn,
8668
+ InstalledPackageSchema as co,
8669
+ IntegrationLiteSchema as cp,
8670
+ IntegrationWithStateSchema as cq,
8671
+ IntercomAbilitySchema as cr,
8672
+ IntercomStatusSchema as cs,
8673
+ LocationStatSchema as ct,
8674
+ LogEntrySchema as cu,
8675
+ LogLevelSchema$1 as cv,
8676
+ LogStreamEntrySchema as cw,
8677
+ MODEL_FORMATS as cx,
8678
+ MediaFileSchema as cy,
8679
+ MethodAccessSchema as cz,
8188
8680
  doorbellCapability as d,
8189
- TurnProviderInfoSchema as d$,
8190
- PolygonPointSchema as d0,
8191
- ProfileSlotSchema as d1,
8192
- ProfileSlotStatusSchema as d2,
8193
- ProviderStatusSchema as d3,
8194
- PtzAutotrackRuntimeStateSchema as d4,
8195
- PtzAutotrackSettingsSchema as d5,
8196
- PtzAutotrackStatusSchema as d6,
8197
- PtzAutotrackTargetOptionSchema as d7,
8198
- PtzMoveCommandSchema as d8,
8199
- PtzPositionSchema as d9,
8200
- BeginUploadInputSchema as dA,
8201
- BeginUploadResultSchema as dB,
8202
- EndDownloadInputSchema as dC,
8203
- FinalizeUploadInputSchema as dD,
8204
- StorageLocationRefSchema as dE,
8205
- StorageLocationSchema as dF,
8206
- StorageLocationTypeSchema as dG,
8207
- ProviderInfoSchema as dH,
8208
- ReadChunkInputSchema as dI,
8209
- TestLocationResultSchema as dJ,
8210
- WriteChunkInputSchema as dK,
8211
- StreamFormatSchema as dL,
8212
- StreamInfoSchema as dM,
8213
- StreamNetworkStatsSchema as dN,
8214
- StreamSourceEntrySchema$1 as dO,
8215
- StreamSourceSchema as dP,
8216
- SwitchStatusSchema as dQ,
8217
- SystemMetricsSchema as dR,
8218
- TestConnectionResultSchema as dS,
8219
- ToastSchema as dT,
8220
- TokenScopeSchema as dU,
8221
- TopologyNodeSchema as dV,
8222
- TopologyProcessSchema as dW,
8223
- TopologyServiceSchema as dX,
8224
- TrackSchema as dY,
8225
- TrackStateSchema as dZ,
8226
- TrackedDetectionSchema as d_,
8227
- PtzPresetSchema as da,
8228
- QueryFilterSchema as db,
8229
- RegisteredStreamSchema as dc,
8230
- RemoteAccessEndpointSchema as dd,
8231
- RemoteAccessProviderInfoSchema as de,
8232
- ReportMotionInputSchema as df,
8233
- RtspRestreamEntrySchema as dg,
8234
- RunnerCameraConfigSchema as dh,
8235
- RunnerCameraDeviceUIFields as di,
8236
- RunnerLocalLoadSchema as dj,
8237
- RunnerLocalMetricsSchema as dk,
8238
- STORAGE_LOCATION_CARDINALITY as dl,
8239
- ScopedTokenSchema as dm,
8240
- ScopedTokenSummarySchema as dn,
8241
- SearchResultSchema as dp,
8242
- SegmentSchema as dq,
8243
- SettingsPatchSchema as dr,
8244
- SettingsRecordSchema as ds,
8245
- SettingsSchemaWithValuesSchema as dt,
8246
- SettingsUpdateResultSchema as du,
8247
- SnapshotImageSchema as dv,
8248
- SpatialDetectionSchema as dw,
8249
- AbortUploadInputSchema as dx,
8250
- BeginDownloadInputSchema as dy,
8251
- BeginDownloadResultSchema as dz,
8681
+ StreamFormatSchema as d$,
8682
+ PackageUpdateSchema as d0,
8683
+ PackageVersionInfoSchema as d1,
8684
+ PasskeySummarySchema as d2,
8685
+ PcmSampleFormatSchema as d3,
8686
+ PerScopeBreakdownSchema as d4,
8687
+ PipelineAssignmentSchema as d5,
8688
+ PipelineDefaultStepSchema as d6,
8689
+ PipelineEngineChoiceSchema as d7,
8690
+ PipelineRunResultBridge as d8,
8691
+ PipelineStepInputSchema as d9,
8692
+ ScopedTokenSummarySchema as dA,
8693
+ SearchResultSchema as dB,
8694
+ SegmentSchema as dC,
8695
+ SendEmailInputSchema as dD,
8696
+ SendEmailResultSchema as dE,
8697
+ SettingsPatchSchema as dF,
8698
+ SettingsRecordSchema as dG,
8699
+ SettingsSchemaWithValuesSchema as dH,
8700
+ SettingsUpdateResultSchema as dI,
8701
+ SmtpStatusSchema as dJ,
8702
+ SnapshotImageSchema as dK,
8703
+ SpatialDetectionSchema as dL,
8704
+ SsoBridgeClaimsSchema as dM,
8705
+ AbortUploadInputSchema as dN,
8706
+ BeginDownloadInputSchema as dO,
8707
+ BeginDownloadResultSchema as dP,
8708
+ BeginUploadInputSchema as dQ,
8709
+ BeginUploadResultSchema as dR,
8710
+ EndDownloadInputSchema as dS,
8711
+ FinalizeUploadInputSchema as dT,
8712
+ StorageLocationRefSchema as dU,
8713
+ StorageLocationSchema as dV,
8714
+ StorageLocationTypeSchema as dW,
8715
+ ProviderInfoSchema as dX,
8716
+ ReadChunkInputSchema as dY,
8717
+ TestLocationResultSchema as dZ,
8718
+ WriteChunkInputSchema as d_,
8719
+ PlaceholderReasonSchema as da,
8720
+ PolygonPointSchema as db,
8721
+ ProfileSlotSchema as dc,
8722
+ ProfileSlotStatusSchema as dd,
8723
+ ProviderStatusSchema as de,
8724
+ PtzAutotrackRuntimeStateSchema as df,
8725
+ PtzAutotrackSettingsSchema as dg,
8726
+ PtzAutotrackStatusSchema as dh,
8727
+ PtzAutotrackTargetOptionSchema as di,
8728
+ PtzMoveCommandSchema as dj,
8729
+ PtzPositionSchema as dk,
8730
+ PtzPresetSchema as dl,
8731
+ PublishInputSchema as dm,
8732
+ QueryFilterSchema as dn,
8733
+ RegisteredStreamSchema as dp,
8734
+ RemoteAccessEndpointSchema as dq,
8735
+ RemoteAccessProviderInfoSchema as dr,
8736
+ ReportMotionInputSchema as ds,
8737
+ RtspRestreamEntrySchema as dt,
8738
+ RunnerCameraConfigSchema as du,
8739
+ RunnerCameraDeviceUIFields as dv,
8740
+ RunnerLocalLoadSchema as dw,
8741
+ RunnerLocalMetricsSchema as dx,
8742
+ STORAGE_LOCATION_CARDINALITY as dy,
8743
+ ScopedTokenSchema as dz,
8252
8744
  errMsg as e,
8253
- TurnServerSchema as e0,
8254
- UpdateIntegrationInputSchema as e1,
8255
- UpdateUserInputSchema as e2,
8256
- UserRecordSchema as e3,
8257
- UserRoleSchema as e4,
8258
- UserSummarySchema as e5,
8259
- WELL_KNOWN_TABS as e6,
8260
- WELL_KNOWN_TAB_MAP as e7,
8261
- WebrtcStreamChoiceSchema as e8,
8262
- WebrtcStreamTargetSchema as e9,
8263
- WidgetHostEnum as ea,
8264
- WidgetMetadataSchema as eb,
8265
- WidgetSizeEnum as ec,
8266
- YAMNET_TO_MACRO as ed,
8267
- ZoneKindEnum as ee,
8268
- ZoneRuleModeEnum as ef,
8269
- ZoneRuleSchema as eg,
8270
- ZoneRuleStageEnum as eh,
8271
- ZoneRulesArraySchema as ei,
8272
- ZoneSchema as ej,
8273
- ZoneScopeBreakdownSchema as ek,
8274
- accessoryStableId as el,
8275
- deviceMatchesProfile as em,
8276
- event as en,
8277
- expandCapMethods as eo,
8278
- getAudioMacroClassIds as ep,
8279
- mapAudioLabelToMacro as eq,
8280
- method as er,
8281
- resolveDeviceProfile as es,
8282
- webrtcClientHintsSchema as et,
8745
+ StreamInfoSchema as e0,
8746
+ StreamNetworkStatsSchema as e1,
8747
+ StreamSourceEntrySchema$1 as e2,
8748
+ StreamSourceSchema as e3,
8749
+ SubscribeInputSchema as e4,
8750
+ SubscriptionInfoSchema as e5,
8751
+ SwitchStatusSchema as e6,
8752
+ SystemMetricsSchema as e7,
8753
+ TestConnectionResultSchema as e8,
8754
+ ToastSchema as e9,
8755
+ ZoneSchema as eA,
8756
+ ZoneScopeBreakdownSchema as eB,
8757
+ accessoryStableId as eC,
8758
+ deviceMatchesProfile as eD,
8759
+ event as eE,
8760
+ expandCapMethods as eF,
8761
+ getAudioMacroClassIds as eG,
8762
+ mapAudioLabelToMacro as eH,
8763
+ method as eI,
8764
+ resolveDeviceProfile as eJ,
8765
+ webrtcClientHintsSchema as eK,
8766
+ TokenScopeSchema as ea,
8767
+ TopologyNodeSchema as eb,
8768
+ TopologyProcessSchema as ec,
8769
+ TopologyServiceSchema as ed,
8770
+ TrackSchema as ee,
8771
+ TrackStateSchema as ef,
8772
+ TrackedDetectionSchema as eg,
8773
+ TurnProviderInfoSchema as eh,
8774
+ TurnServerSchema as ei,
8775
+ UpdateIntegrationInputSchema as ej,
8776
+ UpdateUserInputSchema as ek,
8777
+ UserRecordSchema as el,
8778
+ UserSummarySchema as em,
8779
+ WELL_KNOWN_TABS as en,
8780
+ WELL_KNOWN_TAB_MAP as eo,
8781
+ WebrtcStreamChoiceSchema as ep,
8782
+ WebrtcStreamTargetSchema as eq,
8783
+ WidgetHostEnum as er,
8784
+ WidgetMetadataSchema as es,
8785
+ WidgetSizeEnum as et,
8786
+ YAMNET_TO_MACRO as eu,
8787
+ ZoneKindEnum as ev,
8788
+ ZoneRuleModeEnum as ew,
8789
+ ZoneRuleSchema as ex,
8790
+ ZoneRuleStageEnum as ey,
8791
+ ZoneRulesArraySchema as ez,
8283
8792
  featureProbeCapability as f,
8284
8793
  deviceStatusCapability as g,
8285
8794
  hydrateSchema as h,
@@ -8302,4 +8811,4 @@ export {
8302
8811
  addonsCapability as y,
8303
8812
  zonesCapability as z
8304
8813
  };
8305
- //# sourceMappingURL=index-DVKPWMwv.mjs.map
8814
+ //# sourceMappingURL=index-BKnvgAep.mjs.map