@camstack/types 1.2.303 → 1.2.305

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.
@@ -57,6 +57,7 @@ export declare const OsdTemplateBindingSchema: z.ZodObject<{
57
57
  valuePath: z.ZodString;
58
58
  displayUnit: z.ZodOptional<z.ZodString>;
59
59
  maxDecimals: z.ZodDefault<z.ZodNumber>;
60
+ valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
60
61
  }, z.core.$strip>;
61
62
  export type OsdTemplateBinding = z.infer<typeof OsdTemplateBindingSchema>;
62
63
  /**
@@ -76,6 +77,7 @@ export declare const OsdNamedTemplateSchema: z.ZodObject<{
76
77
  valuePath: z.ZodString;
77
78
  displayUnit: z.ZodOptional<z.ZodString>;
78
79
  maxDecimals: z.ZodDefault<z.ZodNumber>;
80
+ valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
79
81
  }, z.core.$strip>>>;
80
82
  parser: z.ZodDefault<z.ZodString>;
81
83
  }, z.core.$strip>;
@@ -131,9 +133,7 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
131
133
  templateId: z.ZodString;
132
134
  }, z.core.$strip>], "kind">;
133
135
  template: z.ZodDefault<z.ZodString>;
134
- maxCharacters: z.ZodOptional<z.ZodNumber>;
135
136
  maxDecimals: z.ZodDefault<z.ZodNumber>;
136
- unitLabel: z.ZodOptional<z.ZodString>;
137
137
  valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
138
138
  schedule: z.ZodOptional<z.ZodObject<{
139
139
  windows: z.ZodArray<z.ZodObject<{
@@ -280,7 +280,6 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
280
280
  confirmWindowSec: z.ZodOptional<z.ZodNumber>;
281
281
  }, z.core.$strip>>;
282
282
  }, z.core.$strip>>;
283
- fallbackText: z.ZodDefault<z.ZodString>;
284
283
  }, z.core.$strip>;
285
284
  export type OsdSlotBinding = z.infer<typeof OsdSlotBindingSchema>;
286
285
  /** One camera slot, as the operator sees it: firmware truth + our binding. */
@@ -320,9 +319,7 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
320
319
  templateId: z.ZodString;
321
320
  }, z.core.$strip>], "kind">;
322
321
  template: z.ZodDefault<z.ZodString>;
323
- maxCharacters: z.ZodOptional<z.ZodNumber>;
324
322
  maxDecimals: z.ZodDefault<z.ZodNumber>;
325
- unitLabel: z.ZodOptional<z.ZodString>;
326
323
  valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
327
324
  schedule: z.ZodOptional<z.ZodObject<{
328
325
  windows: z.ZodArray<z.ZodObject<{
@@ -469,7 +466,6 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
469
466
  confirmWindowSec: z.ZodOptional<z.ZodNumber>;
470
467
  }, z.core.$strip>>;
471
468
  }, z.core.$strip>>;
472
- fallbackText: z.ZodDefault<z.ZodString>;
473
469
  }, z.core.$strip>>;
474
470
  }, z.core.$strip>;
475
471
  export type OsdSlotView = z.infer<typeof OsdSlotViewSchema>;
@@ -581,9 +577,7 @@ export declare const osdManagerCapability: {
581
577
  templateId: z.ZodString;
582
578
  }, z.core.$strip>], "kind">;
583
579
  template: z.ZodDefault<z.ZodString>;
584
- maxCharacters: z.ZodOptional<z.ZodNumber>;
585
580
  maxDecimals: z.ZodDefault<z.ZodNumber>;
586
- unitLabel: z.ZodOptional<z.ZodString>;
587
581
  valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
588
582
  schedule: z.ZodOptional<z.ZodObject<{
589
583
  windows: z.ZodArray<z.ZodObject<{
@@ -730,7 +724,6 @@ export declare const osdManagerCapability: {
730
724
  confirmWindowSec: z.ZodOptional<z.ZodNumber>;
731
725
  }, z.core.$strip>>;
732
726
  }, z.core.$strip>>;
733
- fallbackText: z.ZodDefault<z.ZodString>;
734
727
  }, z.core.$strip>>;
735
728
  }, z.core.$strip>>;
736
729
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
@@ -861,9 +854,7 @@ export declare const osdManagerCapability: {
861
854
  templateId: z.ZodString;
862
855
  }, z.core.$strip>], "kind">;
863
856
  template: z.ZodDefault<z.ZodString>;
864
- maxCharacters: z.ZodOptional<z.ZodNumber>;
865
857
  maxDecimals: z.ZodDefault<z.ZodNumber>;
866
- unitLabel: z.ZodOptional<z.ZodString>;
867
858
  valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
868
859
  schedule: z.ZodOptional<z.ZodObject<{
869
860
  windows: z.ZodArray<z.ZodObject<{
@@ -1010,7 +1001,6 @@ export declare const osdManagerCapability: {
1010
1001
  confirmWindowSec: z.ZodOptional<z.ZodNumber>;
1011
1002
  }, z.core.$strip>>;
1012
1003
  }, z.core.$strip>>;
1013
- fallbackText: z.ZodDefault<z.ZodString>;
1014
1004
  }, z.core.$strip>;
1015
1005
  }, z.core.$strip>, z.ZodObject<{
1016
1006
  slot: z.ZodObject<{
@@ -1049,9 +1039,7 @@ export declare const osdManagerCapability: {
1049
1039
  templateId: z.ZodString;
1050
1040
  }, z.core.$strip>], "kind">;
1051
1041
  template: z.ZodDefault<z.ZodString>;
1052
- maxCharacters: z.ZodOptional<z.ZodNumber>;
1053
1042
  maxDecimals: z.ZodDefault<z.ZodNumber>;
1054
- unitLabel: z.ZodOptional<z.ZodString>;
1055
1043
  valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1056
1044
  schedule: z.ZodOptional<z.ZodObject<{
1057
1045
  windows: z.ZodArray<z.ZodObject<{
@@ -1198,7 +1186,6 @@ export declare const osdManagerCapability: {
1198
1186
  confirmWindowSec: z.ZodOptional<z.ZodNumber>;
1199
1187
  }, z.core.$strip>>;
1200
1188
  }, z.core.$strip>>;
1201
- fallbackText: z.ZodDefault<z.ZodString>;
1202
1189
  }, z.core.$strip>>;
1203
1190
  }, z.core.$strip>;
1204
1191
  render: z.ZodObject<{
@@ -1269,9 +1256,7 @@ export declare const osdManagerCapability: {
1269
1256
  templateId: z.ZodString;
1270
1257
  }, z.core.$strip>], "kind">;
1271
1258
  template: z.ZodDefault<z.ZodString>;
1272
- maxCharacters: z.ZodOptional<z.ZodNumber>;
1273
1259
  maxDecimals: z.ZodDefault<z.ZodNumber>;
1274
- unitLabel: z.ZodOptional<z.ZodString>;
1275
1260
  valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1276
1261
  schedule: z.ZodOptional<z.ZodObject<{
1277
1262
  windows: z.ZodArray<z.ZodObject<{
@@ -1418,7 +1403,6 @@ export declare const osdManagerCapability: {
1418
1403
  confirmWindowSec: z.ZodOptional<z.ZodNumber>;
1419
1404
  }, z.core.$strip>>;
1420
1405
  }, z.core.$strip>>;
1421
- fallbackText: z.ZodDefault<z.ZodString>;
1422
1406
  }, z.core.$strip>>;
1423
1407
  }, z.core.$strip>, z.ZodObject<{
1424
1408
  slotId: z.ZodString;
@@ -1468,6 +1452,7 @@ export declare const osdManagerCapability: {
1468
1452
  valuePath: z.ZodString;
1469
1453
  displayUnit: z.ZodOptional<z.ZodString>;
1470
1454
  maxDecimals: z.ZodDefault<z.ZodNumber>;
1455
+ valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1471
1456
  }, z.core.$strip>>>;
1472
1457
  parser: z.ZodDefault<z.ZodString>;
1473
1458
  }, z.core.$strip>>;
@@ -1490,6 +1475,7 @@ export declare const osdManagerCapability: {
1490
1475
  valuePath: z.ZodString;
1491
1476
  displayUnit: z.ZodOptional<z.ZodString>;
1492
1477
  maxDecimals: z.ZodDefault<z.ZodNumber>;
1478
+ valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1493
1479
  }, z.core.$strip>>>;
1494
1480
  parser: z.ZodDefault<z.ZodString>;
1495
1481
  }, z.core.$strip>;
@@ -1507,6 +1493,7 @@ export declare const osdManagerCapability: {
1507
1493
  valuePath: z.ZodString;
1508
1494
  displayUnit: z.ZodOptional<z.ZodString>;
1509
1495
  maxDecimals: z.ZodDefault<z.ZodNumber>;
1496
+ valueMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1510
1497
  }, z.core.$strip>>>;
1511
1498
  parser: z.ZodDefault<z.ZodString>;
1512
1499
  }, z.core.$strip>;
@@ -52,6 +52,7 @@ export declare const OsdOverlaySchema: z.ZodObject<{
52
52
  "bottom-right": "bottom-right";
53
53
  }>>>;
54
54
  readOnly: z.ZodOptional<z.ZodBoolean>;
55
+ maxCharacters: z.ZodOptional<z.ZodNumber>;
55
56
  }, z.core.$strip>;
56
57
  export type OsdOverlay = z.infer<typeof OsdOverlaySchema>;
57
58
  export declare const OsdStatusSchema: z.ZodObject<{
@@ -83,6 +84,7 @@ export declare const OsdStatusSchema: z.ZodObject<{
83
84
  "bottom-right": "bottom-right";
84
85
  }>>>;
85
86
  readOnly: z.ZodOptional<z.ZodBoolean>;
87
+ maxCharacters: z.ZodOptional<z.ZodNumber>;
86
88
  }, z.core.$strip>>>;
87
89
  }, z.core.$strip>;
88
90
  export type OsdStatus = z.infer<typeof OsdStatusSchema>;
@@ -163,6 +165,7 @@ export declare const osdCapability: {
163
165
  "bottom-right": "bottom-right";
164
166
  }>>>;
165
167
  readOnly: z.ZodOptional<z.ZodBoolean>;
168
+ maxCharacters: z.ZodOptional<z.ZodNumber>;
166
169
  }, z.core.$strip>>>;
167
170
  }, z.core.$strip>;
168
171
  }, z.core.$strip>;
@@ -198,6 +201,7 @@ export declare const osdCapability: {
198
201
  "bottom-right": "bottom-right";
199
202
  }>>>;
200
203
  readOnly: z.ZodOptional<z.ZodBoolean>;
204
+ maxCharacters: z.ZodOptional<z.ZodNumber>;
201
205
  }, z.core.$strip>>>;
202
206
  }, z.core.$strip>;
203
207
  readonly kind: "command-driven";
@@ -192,7 +192,7 @@ declare const PipelineModelOptionSchema: z.ZodObject<{
192
192
  }>>;
193
193
  optimization: z.ZodOptional<z.ZodEnum<{
194
194
  standard: "standard";
195
- fast: "fast";
195
+ test: "test";
196
196
  }>>;
197
197
  resolution: z.ZodOptional<z.ZodNumber>;
198
198
  }, z.core.$strip>>;
@@ -240,7 +240,7 @@ declare const PipelineAddonSchemaSchema: z.ZodObject<{
240
240
  }>>;
241
241
  optimization: z.ZodOptional<z.ZodEnum<{
242
242
  standard: "standard";
243
- fast: "fast";
243
+ test: "test";
244
244
  }>>;
245
245
  resolution: z.ZodOptional<z.ZodNumber>;
246
246
  }, z.core.$strip>>;
@@ -313,7 +313,7 @@ declare const PipelineSlotSchemaSchema: z.ZodObject<{
313
313
  }>>;
314
314
  optimization: z.ZodOptional<z.ZodEnum<{
315
315
  standard: "standard";
316
- fast: "fast";
316
+ test: "test";
317
317
  }>>;
318
318
  resolution: z.ZodOptional<z.ZodNumber>;
319
319
  }, z.core.$strip>>;
@@ -422,7 +422,7 @@ declare const PipelineSchemaSchema: z.ZodObject<{
422
422
  }>>;
423
423
  optimization: z.ZodOptional<z.ZodEnum<{
424
424
  standard: "standard";
425
- fast: "fast";
425
+ test: "test";
426
426
  }>>;
427
427
  resolution: z.ZodOptional<z.ZodNumber>;
428
428
  }, z.core.$strip>>;
@@ -777,7 +777,7 @@ export declare const pipelineExecutorCapability: {
777
777
  }>>;
778
778
  optimization: z.ZodOptional<z.ZodEnum<{
779
779
  standard: "standard";
780
- fast: "fast";
780
+ test: "test";
781
781
  }>>;
782
782
  resolution: z.ZodOptional<z.ZodNumber>;
783
783
  }, z.core.$strip>>;
@@ -180,6 +180,32 @@ export declare const MotionSourceEnum: z.ZodEnum<{
180
180
  "device-activity": "device-activity";
181
181
  }>;
182
182
  export type MotionSource = z.infer<typeof MotionSourceEnum>;
183
+ /**
184
+ * What opened an on-motion detection SESSION: the motion source that passed the
185
+ * camera's `motionSources` gate, and what raised it (the camera itself, or a
186
+ * sensor the operator attached — D672). `sensorName` is the attached sensor's
187
+ * device name as the orchestrator's camera-sensors resolution last read it;
188
+ * absent when unknown or when the camera itself triggered.
189
+ *
190
+ * Carried on the session attach ONLY so the runner's `DetectionPhaseTransition`
191
+ * can say what started the session (D672 rule 11, amended 2026-10-06). The
192
+ * runner never decides anything on it.
193
+ */
194
+ export declare const SessionTriggerSchema: z.ZodObject<{
195
+ source: z.ZodEnum<{
196
+ onboard: "onboard";
197
+ analyzer: "analyzer";
198
+ "device-activity": "device-activity";
199
+ }>;
200
+ triggeredBy: z.ZodDiscriminatedUnion<[z.ZodObject<{
201
+ kind: z.ZodLiteral<"camera">;
202
+ }, z.core.$strip>, z.ZodObject<{
203
+ kind: z.ZodLiteral<"sensor">;
204
+ deviceId: z.ZodNumber;
205
+ }, z.core.$strip>], "kind">;
206
+ sensorName: z.ZodOptional<z.ZodString>;
207
+ }, z.core.$strip>;
208
+ export type SessionTrigger = z.infer<typeof SessionTriggerSchema>;
183
209
  /**
184
210
  * List of motion sources active on a camera. Empty array is valid:
185
211
  * "no source" — happens for battery cams without firmware motion when
@@ -371,6 +397,20 @@ declare const RunnerCameraConfigSchema: z.ZodObject<{
371
397
  analyzer: "analyzer";
372
398
  "device-activity": "device-activity";
373
399
  }>>>;
400
+ sessionTrigger: z.ZodOptional<z.ZodObject<{
401
+ source: z.ZodEnum<{
402
+ onboard: "onboard";
403
+ analyzer: "analyzer";
404
+ "device-activity": "device-activity";
405
+ }>;
406
+ triggeredBy: z.ZodDiscriminatedUnion<[z.ZodObject<{
407
+ kind: z.ZodLiteral<"camera">;
408
+ }, z.core.$strip>, z.ZodObject<{
409
+ kind: z.ZodLiteral<"sensor">;
410
+ deviceId: z.ZodNumber;
411
+ }, z.core.$strip>], "kind">;
412
+ sensorName: z.ZodOptional<z.ZodString>;
413
+ }, z.core.$strip>>;
374
414
  detectionSources: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodEnum<{
375
415
  pipeline: "pipeline";
376
416
  onboard: "onboard";
@@ -660,6 +700,20 @@ export declare const pipelineRunnerCapability: {
660
700
  analyzer: "analyzer";
661
701
  "device-activity": "device-activity";
662
702
  }>>>;
703
+ sessionTrigger: z.ZodOptional<z.ZodObject<{
704
+ source: z.ZodEnum<{
705
+ onboard: "onboard";
706
+ analyzer: "analyzer";
707
+ "device-activity": "device-activity";
708
+ }>;
709
+ triggeredBy: z.ZodDiscriminatedUnion<[z.ZodObject<{
710
+ kind: z.ZodLiteral<"camera">;
711
+ }, z.core.$strip>, z.ZodObject<{
712
+ kind: z.ZodLiteral<"sensor">;
713
+ deviceId: z.ZodNumber;
714
+ }, z.core.$strip>], "kind">;
715
+ sensorName: z.ZodOptional<z.ZodString>;
716
+ }, z.core.$strip>>;
663
717
  detectionSources: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodEnum<{
664
718
  pipeline: "pipeline";
665
719
  onboard: "onboard";
@@ -408,11 +408,11 @@ export declare const EgressEncodeSchema: z.ZodObject<{
408
408
  gopFrames: z.ZodOptional<z.ZodNumber>;
409
409
  bf: z.ZodOptional<z.ZodNumber>;
410
410
  preset: z.ZodOptional<z.ZodEnum<{
411
- fast: "fast";
412
411
  ultrafast: "ultrafast";
413
412
  superfast: "superfast";
414
413
  veryfast: "veryfast";
415
414
  faster: "faster";
415
+ fast: "fast";
416
416
  medium: "medium";
417
417
  }>>;
418
418
  tune: z.ZodOptional<z.ZodEnum<{
@@ -480,11 +480,11 @@ export declare const EgressTranscodeRequestSchema: z.ZodObject<{
480
480
  gopFrames: z.ZodOptional<z.ZodNumber>;
481
481
  bf: z.ZodOptional<z.ZodNumber>;
482
482
  preset: z.ZodOptional<z.ZodEnum<{
483
- fast: "fast";
484
483
  ultrafast: "ultrafast";
485
484
  superfast: "superfast";
486
485
  veryfast: "veryfast";
487
486
  faster: "faster";
487
+ fast: "fast";
488
488
  medium: "medium";
489
489
  }>>;
490
490
  tune: z.ZodOptional<z.ZodEnum<{
@@ -630,11 +630,11 @@ export declare const streamBrokerCapability: {
630
630
  gopFrames: z.ZodOptional<z.ZodNumber>;
631
631
  bf: z.ZodOptional<z.ZodNumber>;
632
632
  preset: z.ZodOptional<z.ZodEnum<{
633
- fast: "fast";
634
633
  ultrafast: "ultrafast";
635
634
  superfast: "superfast";
636
635
  veryfast: "veryfast";
637
636
  faster: "faster";
637
+ fast: "fast";
638
638
  medium: "medium";
639
639
  }>>;
640
640
  tune: z.ZodOptional<z.ZodEnum<{
@@ -1183,11 +1183,11 @@ export declare const streamBrokerCapability: {
1183
1183
  gopFrames: z.ZodOptional<z.ZodNumber>;
1184
1184
  bf: z.ZodOptional<z.ZodNumber>;
1185
1185
  preset: z.ZodOptional<z.ZodEnum<{
1186
- fast: "fast";
1187
1186
  ultrafast: "ultrafast";
1188
1187
  superfast: "superfast";
1189
1188
  veryfast: "veryfast";
1190
1189
  faster: "faster";
1190
+ fast: "fast";
1191
1191
  medium: "medium";
1192
1192
  }>>;
1193
1193
  tune: z.ZodOptional<z.ZodEnum<{
@@ -0,0 +1,104 @@
1
+ /**
2
+ * viewer-link-url — the ONE builder for a link that opens a VIEWER page
3
+ * (a camera at an instant, the events timeline, the notification centre),
4
+ * and the one definition of the "CamStack app link" address (D709).
5
+ *
6
+ * The address a link points at is the endpoint the operator FLAGS for
7
+ * notifications on the admin Network page (`local-network`'s notification
8
+ * endpoint — one flag, one store). Among the addresses that page lists,
9
+ * `local-network` adds one generic entry: the app link,
10
+ * `https://camstack.zentik.app`, and that entry carries the flag BY DEFAULT.
11
+ * Two forms follow from which address is flagged:
12
+ *
13
+ * - `app` — the app link is flagged:
14
+ * `https://camstack.zentik.app/<path>?<query>&hub=<hub origin>`. The central
15
+ * domain the native app claims as a Universal Link / App Link
16
+ * (docs/design/2026-08-19-central-link-redirect.md): on a phone with the app
17
+ * it opens the app on that page; anywhere else the hosted viewer opens and
18
+ * `hub=` tells it which hub to talk to. `hub=` is filled automatically from
19
+ * the hub's own best public HTTPS address ({@link pickAppLinkHub}).
20
+ * - `hub` — one of the hub's own addresses is flagged:
21
+ * `<hub base>/viewer/camstack/<path>?<query>` (the pre-D709 form).
22
+ *
23
+ * The paths are the viewer's own routes, verbatim (§2.3 of that design), and
24
+ * only the families the app claims in its AASA (`camstack/web-server/
25
+ * app-links.ts`): `/camera/*`, `/events*`, `/notifications*`. A destination
26
+ * is a typed union rather than a free path so a caller cannot mint a central
27
+ * link the domain would 404.
28
+ *
29
+ * The admin UI is NOT a viewer destination: the central site hosts the
30
+ * viewer only, so an admin page (an addon update row → `/system/addons`)
31
+ * always points at the hub itself — see `system-event-tap-url.ts`. Nor is the
32
+ * app link a HUB address: signed media and action-button links never use it.
33
+ */
34
+ import type { ConnectionEndpoint } from './local-network.cap.js';
35
+ /** The central link domain the viewer app claims (Universal Links / App Links). */
36
+ export declare const CAMSTACK_APP_LINK_ORIGIN = "https://camstack.zentik.app";
37
+ /** Where the hub serves the viewer SPA. */
38
+ export declare const HUB_VIEWER_MOUNT = "/viewer/camstack";
39
+ /** Which form a viewer link takes — see the module header. */
40
+ export type ViewerLinkForm = 'hub' | 'app';
41
+ /**
42
+ * The base a viewer link is built on. `hub`: the flagged hub address (null =
43
+ * none reachable — no link). `app`: the hub origin to carry as `hub=` (null =
44
+ * none known — the link is still minted, without `hub=`; the central page then
45
+ * asks once, design §5).
46
+ */
47
+ export interface ViewerLinkBase {
48
+ readonly form: ViewerLinkForm;
49
+ readonly hubBaseUrl: string | null;
50
+ }
51
+ /** A viewer page a link may open. One member per AASA-claimed route family. */
52
+ export type ViewerDestination = {
53
+ readonly kind: 'camera';
54
+ readonly deviceId: number;
55
+ /** Recorded seek instant (`?at=`), epoch ms. Absent = live. */
56
+ readonly atMs?: number;
57
+ } | {
58
+ readonly kind: 'events';
59
+ } | {
60
+ readonly kind: 'notifications';
61
+ };
62
+ export interface ViewerLinkInput {
63
+ readonly base: ViewerLinkBase;
64
+ readonly destination: ViewerDestination;
65
+ }
66
+ /** True when `baseUrl` names the CamStack app link rather than a hub address. */
67
+ export declare function isAppLinkBase(baseUrl: string | null | undefined): boolean;
68
+ /**
69
+ * The fields of `local-network.getNotificationEndpoint` a viewer link reads.
70
+ * `appLinkHub` is absent on a pre-D709 hub, which never flags the app link.
71
+ */
72
+ export interface NotificationLinkEndpoint {
73
+ readonly baseUrl: string | null;
74
+ readonly resolved: string | null;
75
+ readonly appLinkHub?: string | null;
76
+ }
77
+ /**
78
+ * The base a viewer link is built on, from the flagged notification address:
79
+ * the effective address is the explicit choice, else AUTO's `resolved`. The
80
+ * one reading of that answer — the NC's tap and the Network page's preview
81
+ * both go through it.
82
+ */
83
+ export declare function viewerLinkBaseOf(endpoint: NotificationLinkEndpoint): ViewerLinkBase;
84
+ /**
85
+ * Reduce a base URL to the bare origin the central page accepts as `hub=`,
86
+ * or `null` when it cannot be one: not http(s), carries credentials, or does
87
+ * not parse. A path/query/fragment is dropped — the central page mounts the
88
+ * viewer under the origin itself.
89
+ */
90
+ export declare function toAppLinkHubOrigin(baseUrl: string): string | null;
91
+ /**
92
+ * The hub address an app link carries as `hub=`, chosen from the hub's OWN
93
+ * advertised palette so it always agrees with what the Network page lists:
94
+ * the public tunnel first, then the mesh (Tailscale MagicDNS) — HTTPS only,
95
+ * because the app and the hosted viewer reach it from off the LAN. `null`
96
+ * when the hub advertises neither.
97
+ */
98
+ export declare function pickAppLinkHub(endpoints: readonly ConnectionEndpoint[]): string | null;
99
+ /**
100
+ * The link for a viewer destination, or `null` when none can be minted: an
101
+ * unknown destination, or the `hub` form with no reachable base (a dead link
102
+ * is worse than none).
103
+ */
104
+ export declare function buildViewerLink(input: ViewerLinkInput): string | null;
@@ -30,11 +30,11 @@ export declare const VideoEncodeSchema: z.ZodObject<{
30
30
  gopFrames: z.ZodOptional<z.ZodNumber>;
31
31
  bf: z.ZodOptional<z.ZodNumber>;
32
32
  preset: z.ZodOptional<z.ZodEnum<{
33
- fast: "fast";
34
33
  ultrafast: "ultrafast";
35
34
  superfast: "superfast";
36
35
  veryfast: "veryfast";
37
36
  faster: "faster";
37
+ fast: "fast";
38
38
  medium: "medium";
39
39
  }>>;
40
40
  tune: z.ZodOptional<z.ZodEnum<{
@@ -78,11 +78,11 @@ export declare const EncodeProfileSchema: z.ZodObject<{
78
78
  gopFrames: z.ZodOptional<z.ZodNumber>;
79
79
  bf: z.ZodOptional<z.ZodNumber>;
80
80
  preset: z.ZodOptional<z.ZodEnum<{
81
- fast: "fast";
82
81
  ultrafast: "ultrafast";
83
82
  superfast: "superfast";
84
83
  veryfast: "veryfast";
85
84
  faster: "faster";
85
+ fast: "fast";
86
86
  medium: "medium";
87
87
  }>>;
88
88
  tune: z.ZodOptional<z.ZodEnum<{
package/dist/index.d.ts CHANGED
@@ -244,7 +244,7 @@ export { conditionExclusionReason, conditionVisibleForKind, defaultDeliveryForSe
244
244
  export { isScheduleActive } from './notification/schedule.js';
245
245
  export { isAlarmControllableCap, NC_ALARM_CONTROLLABLE_CAPS, NC_ALARM_OPENING_EVENT_KINDS, NC_SENSOR_TRANSITION_NEVER_FIRES_WARNING, type NcAlarmControllableCap, type NcAlarmMembershipSubject, type NcAlarmOpeningEventKind, ruleAutoTriggersAlarm, ruleBelongsToAlarm, ruleGatedOnArmedState, sensorTransitionNeverFires, } from './notification/alarm-membership.js';
246
246
  export { alarmDeviceBlocksArming, alarmDeviceSecureOnArm, type AlarmDeviceBlocksInput, type AlarmDeviceSecureOnArmInput, type NcAlarmSecureActuation, secureActuationFor, } from './notification/alarm-controllable.js';
247
- export { alarmPatchLanded, applyBlockingEdit, applyModeDelaysEdits, applyModeDeviceListEdit, applyNonBlockingEdit, applySecureOnArmEdit, derivePostTriggeredAction, NC_ALARM_DELAY_FIELDS, type NcAlarmDelayField, type NcAlarmDelaySettings, type NcAlarmDelaySource, type NcAlarmModeDeviceListEditResult, type NcAlarmNonBlockingEditResult, type NcAlarmResolvedDelays, resolveModeDelays, } from './notification/alarm-settings.js';
247
+ export { alarmPatchLanded, applyBlockingEdit, applyModeDelaysEdits, applyModeDeviceListEdit, applyNonBlockingEdit, applySecureOnArmEdit, derivePostTriggeredAction, NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, NC_ALARM_DELAY_FIELDS, NC_ALARM_NOTIFY_FIELDS, type NcAlarmDelayField, type NcAlarmDelaySettings, type NcAlarmDelaySource, type NcAlarmModeDeviceListEditResult, type NcAlarmModeNotifyPolicy, type NcAlarmNonBlockingEditResult, type NcAlarmNotifyField, type NcAlarmResolvedDelays, resolveModeDelays, resolveModeNotifyPolicy, } from './notification/alarm-settings.js';
248
248
  export { activateAlarmProfile, alarmProfileById, cloneAlarmSettings, createAlarmProfile, deleteAlarmProfile, ensureAlarmProfiles, isDefaultAlarmProfileId, NC_ALARM_DEFAULT_PROFILE_ID, NC_ALARM_DEFAULT_PROFILE_NAME, NC_ALARM_SYSTEM_DEFAULT_DELAYS, ncAlarmSystemDefaultSettings, type NcAlarmProfileCreateSource, type NcAlarmProfileRecord, type NcAlarmProfilesMutationResult, type NcAlarmProfilesRefuseReason, type NcAlarmProfilesState, renameAlarmProfile, syncActiveAlarmProfileSettings, } from './notification/alarm-profiles.js';
249
249
  export { NC_SENSOR_RAISED_FIELD_BY_KIND, NC_SENSOR_TRANSITION_KINDS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, sensorRaisedOf, sensorTransitionOffered, } from './notification/sensor-raised.js';
250
250
  export { NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, isHeldBackTemplateVar, isKnownTemplateVar, servedTemplateVars, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, templateVarsFor, } from './notification/template-vars.js';