@camstack/addon-advanced-notifier 0.1.26 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -10192,51 +10192,6 @@ const AuthResultSchema = object({
10192
10192
  validateToken: method(object({ token: string() }), AuthResultSchema.nullable())
10193
10193
  }
10194
10194
  });
10195
- const AuthProviderInfoSchema = object({
10196
- /** Stable id matching the addon id (used for `getLoginUrl({addonId,…})`). */
10197
- addonId: string(),
10198
- /**
10199
- * Per-instance id when one addon registers multiple "logical"
10200
- * providers (e.g. OIDC with Google + Microsoft + custom). The login
10201
- * URL becomes `/addon/${addonId}/${instanceId}/start` — handler reads
10202
- * `:instanceId` from the route. Empty/unset means the addon is a
10203
- * single-instance provider; the URL is `/addon/${addonId}/start`.
10204
- */
10205
- instanceId: string().optional(),
10206
- /** Display label shown on the login button + admin row. */
10207
- displayName: string(),
10208
- /** Optional iconography hint (lucide-react icon name OR emoji). */
10209
- icon: string().optional(),
10210
- /** When true, the provider exposes a redirect-based login flow
10211
- * (`getLoginUrl` returns a URL the browser navigates to). */
10212
- hasRedirectFlow: boolean(),
10213
- /** When true, the provider exposes a credential-form login flow
10214
- * (`validateCredentials` accepts username + password). */
10215
- hasCredentialFlow: boolean(),
10216
- /** Provider kind, drives admin-UI hint dispatch (oidc / saml / totp / …). */
10217
- kind: string().optional(),
10218
- /** Operator-facing status string (e.g. "Connected to https://login.acme.com"). */
10219
- status: string().optional(),
10220
- /** When false, the provider is registered but disabled by config; the
10221
- * UI surfaces it as inactive without enumerating it for login. */
10222
- enabled: boolean()
10223
- });
10224
- ({
10225
- methods: {
10226
- /** All registered auth providers, both enabled and disabled. */
10227
- listProviders: method(_void(), array(AuthProviderInfoSchema).readonly()),
10228
- /**
10229
- * Toggle a provider's enabled flag. Disabled providers stay
10230
- * registered but aren't surfaced on the login page. The orchestrator
10231
- * persists the state in `addon-settings` so it survives restarts.
10232
- */
10233
- setProviderEnabled: method(
10234
- object({ addonId: string(), enabled: boolean() }),
10235
- object({ success: literal(true) }),
10236
- { kind: "mutation", auth: "admin" }
10237
- )
10238
- }
10239
- });
10240
10195
  const NetworkEndpointSchema = object({
10241
10196
  url: string(),
10242
10197
  hostname: string(),
@@ -10268,55 +10223,13 @@ const NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
10268
10223
  getEndpoint: method(_void(), NetworkEndpointSchema.nullable()),
10269
10224
  getStatus: method(_void(), NetworkAccessStatusSchema),
10270
10225
  /**
10271
- * Enumerate every active ingress entry. Default implementation (when
10272
- * the provider omits this method) is derived from `getEndpoint()` —
10273
- * see the remote-access orchestrator for the fallback path.
10226
+ * Enumerate every active ingress entry. Providers that expose only a
10227
+ * single endpoint may omit this method; callers fall back to
10228
+ * `getEndpoint()` in that case.
10274
10229
  */
10275
10230
  listEndpoints: method(_void(), array(NetworkEndpointEntrySchema).readonly())
10276
10231
  }
10277
10232
  });
10278
- const RemoteAccessEndpointSchema = object({
10279
- url: string(),
10280
- hostname: string(),
10281
- port: number(),
10282
- protocol: _enum(["http", "https"])
10283
- });
10284
- const RemoteAccessProviderInfoSchema = object({
10285
- /** Stable id matching the addon id. */
10286
- addonId: string(),
10287
- /** Display label shown on the admin row — sourced from the addon manifest. */
10288
- displayName: string(),
10289
- /** When false, the provider is registered but disabled. */
10290
- enabled: boolean(),
10291
- /** True when the underlying tunnel/connection is up. */
10292
- connected: boolean(),
10293
- /** Public-facing endpoint, when connected. Null otherwise. */
10294
- endpoint: RemoteAccessEndpointSchema.nullable(),
10295
- /** Last error message (when connected=false), if available. */
10296
- error: string().optional()
10297
- });
10298
- ({
10299
- methods: {
10300
- /** All registered remote-access providers + their live status. */
10301
- listProviders: method(_void(), array(RemoteAccessProviderInfoSchema).readonly()),
10302
- /**
10303
- * Start a specific provider's tunnel. Per-provider config still
10304
- * lives on the addon's settings panel; this is just the on/off
10305
- * trigger so the admin UI can manage the lifecycle from one place.
10306
- */
10307
- startProvider: method(
10308
- object({ addonId: string() }),
10309
- RemoteAccessEndpointSchema,
10310
- { kind: "mutation", auth: "admin" }
10311
- ),
10312
- /** Stop a specific provider's tunnel (idempotent on already-stopped). */
10313
- stopProvider: method(
10314
- object({ addonId: string() }),
10315
- object({ success: literal(true) }),
10316
- { kind: "mutation", auth: "admin" }
10317
- )
10318
- }
10319
- });
10320
10233
  const TurnServerSchema = object({
10321
10234
  /** Single URL or list of URLs (e.g. "turn:turn.example.com:3478?transport=udp"). */
10322
10235
  urls: union([string(), array(string())]),
@@ -10336,45 +10249,6 @@ const TurnServerSchema = object({
10336
10249
  )
10337
10250
  }
10338
10251
  });
10339
- const TurnProviderInfoSchema = object({
10340
- /** Stable id matching the addon id. */
10341
- addonId: string(),
10342
- /** Display label shown on the admin row — sourced from the addon manifest. */
10343
- displayName: string(),
10344
- /** When false, the provider is registered but disabled. */
10345
- enabled: boolean(),
10346
- /** Number of servers this provider is currently exposing. */
10347
- serverCount: number(),
10348
- /**
10349
- * Flat list of every TURN/STUN URL this provider currently exposes.
10350
- * One row per URL (multi-URL ICE server entries are flattened). The
10351
- * admin UI shows this in a compact per-provider list so operators
10352
- * can verify what's actually being negotiated without having to dig
10353
- * into the combined `getAllServers` output.
10354
- */
10355
- urls: array(string()).readonly(),
10356
- /** Last fetch error (when serverCount=0 due to API failure), if any. */
10357
- error: string().optional()
10358
- });
10359
- ({
10360
- methods: {
10361
- /** All registered TURN providers + per-provider stats. */
10362
- listProviders: method(_void(), array(TurnProviderInfoSchema).readonly()),
10363
- /**
10364
- * Combined list of TURN/STUN servers from all ENABLED providers.
10365
- * Consumed by the WebRTC layer at session-creation time —
10366
- * implementations may fetch fresh short-lived credentials each
10367
- * call (e.g. Cloudflare API), so consumers SHOULD call per-session.
10368
- */
10369
- getAllServers: method(_void(), array(TurnServerSchema).readonly()),
10370
- /** Toggle a provider's enabled flag. */
10371
- setProviderEnabled: method(
10372
- object({ addonId: string(), enabled: boolean() }),
10373
- object({ success: literal(true) }),
10374
- { kind: "mutation", auth: "admin" }
10375
- )
10376
- }
10377
- });
10378
10252
  const SnapshotImageSchema = object({
10379
10253
  base64: string(),
10380
10254
  contentType: string()
@@ -11849,7 +11723,7 @@ const AllowedAddressesSchema = object({
11849
11723
  )
11850
11724
  }
11851
11725
  });
11852
- const MeshEndpointSchema$1 = object({
11726
+ const MeshEndpointSchema = object({
11853
11727
  /** Stable identifier within the provider (e.g. `mesh-ipv4`, `magicdns`, `funnel`). */
11854
11728
  id: string(),
11855
11729
  /** Operator-facing label (e.g. "Mesh IPv4", "MagicDNS"). */
@@ -11922,7 +11796,7 @@ const MeshStatusSchema = object({
11922
11796
  /** Number of peers visible to this host (excluding self). */
11923
11797
  peerCount: number(),
11924
11798
  /** Every endpoint this provider exposes for the current host. */
11925
- endpoints: array(MeshEndpointSchema$1).readonly(),
11799
+ endpoints: array(MeshEndpointSchema).readonly(),
11926
11800
  /** Last error from the daemon, when not joined. */
11927
11801
  error: string().optional(),
11928
11802
  // ── Account / tenant identity (generic across providers) ────────
@@ -12085,105 +11959,6 @@ const MeshStatusSchema = object({
12085
11959
  // tabs driven by this cap.
12086
11960
  }
12087
11961
  });
12088
- const MeshEndpointSchema = object({
12089
- id: string(),
12090
- label: string(),
12091
- scope: _enum(["mesh", "public"]),
12092
- url: string(),
12093
- hostname: string(),
12094
- port: number(),
12095
- protocol: _enum(["http", "https"])
12096
- });
12097
- const MeshProviderInfoSchema = object({
12098
- /** Stable id matching the addon id. */
12099
- addonId: string(),
12100
- /** Display label shown on the admin row — sourced from the addon manifest. */
12101
- displayName: string(),
12102
- /** True when the host is joined to this provider's mesh. */
12103
- joined: boolean(),
12104
- /** Local mesh IP (empty when not joined). */
12105
- meshIp: string(),
12106
- /** MagicDNS / mesh hostname (empty when not configured). */
12107
- magicDnsHostname: string(),
12108
- /** Peer count (excluding self). */
12109
- peerCount: number(),
12110
- /** Active endpoints (mesh IP + MagicDNS + optional public Funnel). */
12111
- endpoints: array(MeshEndpointSchema).readonly(),
12112
- /** Last error reported by the provider. */
12113
- error: string().optional(),
12114
- // ── Generic identity fields mirrored from MeshStatus ─────────────
12115
- /** Tenant / tailnet / network display name. Empty pre-join. */
12116
- tenantName: string(),
12117
- /** Mesh DNS suffix (e.g. tailXXXX.ts.net). Empty when not configured. */
12118
- magicDnsSuffix: string(),
12119
- /** Authenticated user / account login. Null for token-only providers. */
12120
- userLogin: string().nullable(),
12121
- /** Provider control-plane URL. */
12122
- controlPlaneUrl: string(),
12123
- /** Machine-key expiry (epoch ms). Null when keys don't rotate. */
12124
- keyExpiry: number().nullable()
12125
- });
12126
- ({
12127
- methods: {
12128
- /** All registered mesh-network providers + live status. */
12129
- listProviders: method(_void(), array(MeshProviderInfoSchema).readonly()),
12130
- /**
12131
- * Join the mesh of a specific provider. Per-provider config still
12132
- * lives on its settings panel; the orchestrator forwards.
12133
- */
12134
- joinProvider: method(
12135
- object({
12136
- addonId: string(),
12137
- authKey: string().min(8),
12138
- hostname: string().optional()
12139
- }),
12140
- object({ joined: literal(true) }),
12141
- { kind: "mutation" }
12142
- ),
12143
- leaveProvider: method(
12144
- object({ addonId: string() }),
12145
- object({ success: literal(true) }),
12146
- { kind: "mutation" }
12147
- ),
12148
- /**
12149
- * Browser-redirect login flow. Forwards to the named provider's
12150
- * `mesh-network.startLogin` and returns the URL the daemon
12151
- * prints. UI opens it in a new tab, then polls `listProviders`
12152
- * for `joined: true`.
12153
- */
12154
- startLoginProvider: method(
12155
- object({
12156
- addonId: string(),
12157
- hostname: string().optional()
12158
- }),
12159
- object({ loginUrl: string() }),
12160
- { kind: "mutation" }
12161
- ),
12162
- /**
12163
- * Sign out of the provider's account entirely (`mesh-network.logout`).
12164
- * Distinct from `leaveProvider` which only takes the host off-mesh;
12165
- * `logoutProvider` wipes credentials so the next start requires a
12166
- * fresh login.
12167
- */
12168
- logoutProvider: method(
12169
- object({ addonId: string() }),
12170
- object({ loggedOut: literal(true) }),
12171
- { kind: "mutation" }
12172
- ),
12173
- /**
12174
- * Per-provider peer list. Forwards to `mesh-network.listPeers` on
12175
- * the addressed provider. Separate from `listProviders` because
12176
- * peer payloads can be large on a heavily-populated tailnet —
12177
- * fetch only when the operator opens the Peers tab.
12178
- */
12179
- listProviderPeers: method(
12180
- object({ addonId: string() }),
12181
- object({
12182
- peers: array(MeshPeerSchema).readonly()
12183
- })
12184
- )
12185
- }
12186
- });
12187
11962
  const MethodAccessSchema = _enum(["view", "create", "delete"]);
12188
11963
  const AllowedProviderSchema = union([literal("*"), array(string())]);
12189
11964
  const AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
@@ -13053,6 +12828,29 @@ const CustomActionInputSchema = object({
13053
12828
  isActive: boolean()
13054
12829
  })).readonly()
13055
12830
  ),
12831
+ /**
12832
+ * Toggle a single collection-cap provider on/off. Generic write-side
12833
+ * counterpart of `listCapabilityProviders` — drives the per-provider
12834
+ * Enable/Disable affordance in admin pages (TURN servers, etc.)
12835
+ * without needing a bespoke orchestrator cap.
12836
+ *
12837
+ * Reaches the hub's `CapabilityRegistry` directly:
12838
+ * `enableCollectionProvider` / `disableCollectionProvider` flip the
12839
+ * registry-level `disabledProviders` set. `getCollectionEntries`
12840
+ * already filters disabled providers out, so a disabled provider
12841
+ * drops out of every collection aggregate immediately. Only valid
12842
+ * for `mode: 'collection'` caps — the registry no-ops + warns for
12843
+ * singletons.
12844
+ */
12845
+ setCapabilityProviderEnabled: method(
12846
+ object({
12847
+ capName: string().min(1),
12848
+ addonId: string().min(1),
12849
+ enabled: boolean()
12850
+ }),
12851
+ object({ success: literal(true) }),
12852
+ { kind: "mutation", auth: "admin" }
12853
+ ),
13056
12854
  /**
13057
12855
  * Live-update one of the framework packages marked
13058
12856
  * `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).