@camstack/types 1.2.585 → 1.2.586

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/client.js CHANGED
@@ -21134,6 +21134,25 @@ function iconCategoryLabel(category) {
21134
21134
  const spaced = category.replace(/-/g, " ");
21135
21135
  return spaced.charAt(0).toUpperCase() + spaced.slice(1);
21136
21136
  }
21137
+ /** One tag name: trimmed, 1..40 characters. */
21138
+ var TagNameSchema = zod.z.string().trim().min(1).max(40);
21139
+ /** The `tags` field every owner record carries. Absent = no tags. */
21140
+ var TagsFieldSchema = zod.z.array(TagNameSchema).max(20);
21141
+ var TagColorIdSchema = zod.z.enum([
21142
+ "tag-a",
21143
+ "tag-b",
21144
+ "tag-c",
21145
+ "tag-d",
21146
+ "tag-e",
21147
+ "tag-f",
21148
+ "tag-g",
21149
+ "tag-h"
21150
+ ]);
21151
+ zod.z.object({
21152
+ name: TagNameSchema,
21153
+ color: TagColorIdSchema,
21154
+ icon: IconKeySchema
21155
+ });
21137
21156
  //#endregion
21138
21157
  //#region src/device/device-type.ts
21139
21158
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
@@ -24499,7 +24518,32 @@ var NcRuleInputSchema = zod.z.object({
24499
24518
  * authored before this field meant. An editor turns it off by writing
24500
24519
  * `false`, so it needs no `clear` key.
24501
24520
  */
24502
- askVerdict: zod.z.boolean().optional()
24521
+ askVerdict: zod.z.boolean().optional(),
24522
+ /**
24523
+ * Operator tags (D1054), kept on the rule like a core block's. Absent = no
24524
+ * tags. `.optional()`, never `.default()`: a partial `updateRule` patch that
24525
+ * does not name `tags` keeps the stored ones (the store merges), and an
24526
+ * editor empties them by sending `[]` (the store drops an empty list).
24527
+ * Renamed or removed fleet-wide only through the `tags` cap, which writes
24528
+ * here with `setRuleTags`.
24529
+ */
24530
+ tags: TagsFieldSchema.optional()
24531
+ });
24532
+ /**
24533
+ * The rule kinds that carry tags (D1054) — each one its own store. Every kind
24534
+ * labels its rules the same way; this names which store a tag write goes to.
24535
+ */
24536
+ var NcTaggedRuleKindSchema = zod.z.enum([
24537
+ "event",
24538
+ "summary",
24539
+ "timelapse",
24540
+ "calendar-events"
24541
+ ]);
24542
+ /** One rule's tags, as the `tags` cap reads them across every kind. */
24543
+ var NcRuleTagsEntrySchema = zod.z.object({
24544
+ kind: NcTaggedRuleKindSchema,
24545
+ ruleId: zod.z.string(),
24546
+ tags: zod.z.array(zod.z.string())
24503
24547
  });
24504
24548
  /**
24505
24549
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -25541,6 +25585,16 @@ method(zod.z.object({}), zod.z.object({ rules: zod.z.array(NcRuleSchema) }), { a
25541
25585
  }), zod.z.object({ success: zod.z.literal(true) }), {
25542
25586
  kind: "mutation",
25543
25587
  auth: "admin"
25588
+ }), method(zod.z.object({}), zod.z.object({ rules: zod.z.array(NcRuleTagsEntrySchema) }), {
25589
+ kind: "query",
25590
+ auth: "admin"
25591
+ }), method(zod.z.object({
25592
+ kind: NcTaggedRuleKindSchema,
25593
+ ruleId: zod.z.string(),
25594
+ tags: TagsFieldSchema
25595
+ }), zod.z.object({ success: zod.z.literal(true) }), {
25596
+ kind: "mutation",
25597
+ auth: "admin"
25544
25598
  }), method(zod.z.object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(zod.z.object({}), zod.z.object({ mutedDeviceIds: zod.z.array(zod.z.number().int()).readonly() }), { auth: "admin" }), method(zod.z.object({
25545
25599
  deviceId: zod.z.number().int(),
25546
25600
  muted: zod.z.boolean()
@@ -29671,6 +29725,8 @@ function createSystemProxy(api) {
29671
29725
  updateRule: (input) => dispatch("notificationRules", "updateRule", "mutation", input),
29672
29726
  deleteRule: (input) => dispatch("notificationRules", "deleteRule", "mutation", input),
29673
29727
  setRuleEnabled: (input) => dispatch("notificationRules", "setRuleEnabled", "mutation", input),
29728
+ listRuleTags: (input) => dispatch("notificationRules", "listRuleTags", "query", input),
29729
+ setRuleTags: (input) => dispatch("notificationRules", "setRuleTags", "mutation", input),
29674
29730
  getClipRetentionAsks: (input) => dispatch("notificationRules", "getClipRetentionAsks", "query", input),
29675
29731
  listDeviceMutes: (input) => dispatch("notificationRules", "listDeviceMutes", "query", input),
29676
29732
  testRule: (input) => dispatch("notificationRules", "testRule", "mutation", input),
@@ -33672,6 +33728,8 @@ var TimelapseRuleInputSchema = zod.z.object({
33672
33728
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
33673
33729
  priority: PriorityField.default(3),
33674
33730
  /** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
33731
+ /** Operator labels (D1054) — optional and NEVER defaulted: an absent key leaves the stored tags alone; `[]` clears them. Admin-only. */
33732
+ tags: TagsFieldSchema.optional(),
33675
33733
  targetOverrides: NcTargetOverridesSchema.optional()
33676
33734
  });
33677
33735
  /**
@@ -33698,6 +33756,8 @@ zod.z.object({
33698
33756
  reportClasses: ReportClassesField.optional(),
33699
33757
  priority: PriorityField.optional(),
33700
33758
  /** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
33759
+ /** Absent = keep the stored tags; `[]` clears them (D1054). Never defaulted. */
33760
+ tags: TagsFieldSchema.optional(),
33701
33761
  targetOverrides: NcTargetOverridesSchema.optional()
33702
33762
  });
33703
33763
  /** A persisted timelapse rule. */
package/dist/client.mjs CHANGED
@@ -21133,6 +21133,25 @@ function iconCategoryLabel(category) {
21133
21133
  const spaced = category.replace(/-/g, " ");
21134
21134
  return spaced.charAt(0).toUpperCase() + spaced.slice(1);
21135
21135
  }
21136
+ /** One tag name: trimmed, 1..40 characters. */
21137
+ var TagNameSchema = z.string().trim().min(1).max(40);
21138
+ /** The `tags` field every owner record carries. Absent = no tags. */
21139
+ var TagsFieldSchema = z.array(TagNameSchema).max(20);
21140
+ var TagColorIdSchema = z.enum([
21141
+ "tag-a",
21142
+ "tag-b",
21143
+ "tag-c",
21144
+ "tag-d",
21145
+ "tag-e",
21146
+ "tag-f",
21147
+ "tag-g",
21148
+ "tag-h"
21149
+ ]);
21150
+ z.object({
21151
+ name: TagNameSchema,
21152
+ color: TagColorIdSchema,
21153
+ icon: IconKeySchema
21154
+ });
21136
21155
  //#endregion
21137
21156
  //#region src/device/device-type.ts
21138
21157
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
@@ -24498,7 +24517,32 @@ var NcRuleInputSchema = z.object({
24498
24517
  * authored before this field meant. An editor turns it off by writing
24499
24518
  * `false`, so it needs no `clear` key.
24500
24519
  */
24501
- askVerdict: z.boolean().optional()
24520
+ askVerdict: z.boolean().optional(),
24521
+ /**
24522
+ * Operator tags (D1054), kept on the rule like a core block's. Absent = no
24523
+ * tags. `.optional()`, never `.default()`: a partial `updateRule` patch that
24524
+ * does not name `tags` keeps the stored ones (the store merges), and an
24525
+ * editor empties them by sending `[]` (the store drops an empty list).
24526
+ * Renamed or removed fleet-wide only through the `tags` cap, which writes
24527
+ * here with `setRuleTags`.
24528
+ */
24529
+ tags: TagsFieldSchema.optional()
24530
+ });
24531
+ /**
24532
+ * The rule kinds that carry tags (D1054) — each one its own store. Every kind
24533
+ * labels its rules the same way; this names which store a tag write goes to.
24534
+ */
24535
+ var NcTaggedRuleKindSchema = z.enum([
24536
+ "event",
24537
+ "summary",
24538
+ "timelapse",
24539
+ "calendar-events"
24540
+ ]);
24541
+ /** One rule's tags, as the `tags` cap reads them across every kind. */
24542
+ var NcRuleTagsEntrySchema = z.object({
24543
+ kind: NcTaggedRuleKindSchema,
24544
+ ruleId: z.string(),
24545
+ tags: z.array(z.string())
24502
24546
  });
24503
24547
  /**
24504
24548
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -25540,6 +25584,16 @@ method(z.object({}), z.object({ rules: z.array(NcRuleSchema) }), { auth: "admin"
25540
25584
  }), z.object({ success: z.literal(true) }), {
25541
25585
  kind: "mutation",
25542
25586
  auth: "admin"
25587
+ }), method(z.object({}), z.object({ rules: z.array(NcRuleTagsEntrySchema) }), {
25588
+ kind: "query",
25589
+ auth: "admin"
25590
+ }), method(z.object({
25591
+ kind: NcTaggedRuleKindSchema,
25592
+ ruleId: z.string(),
25593
+ tags: TagsFieldSchema
25594
+ }), z.object({ success: z.literal(true) }), {
25595
+ kind: "mutation",
25596
+ auth: "admin"
25543
25597
  }), method(z.object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(z.object({}), z.object({ mutedDeviceIds: z.array(z.number().int()).readonly() }), { auth: "admin" }), method(z.object({
25544
25598
  deviceId: z.number().int(),
25545
25599
  muted: z.boolean()
@@ -29670,6 +29724,8 @@ function createSystemProxy(api) {
29670
29724
  updateRule: (input) => dispatch("notificationRules", "updateRule", "mutation", input),
29671
29725
  deleteRule: (input) => dispatch("notificationRules", "deleteRule", "mutation", input),
29672
29726
  setRuleEnabled: (input) => dispatch("notificationRules", "setRuleEnabled", "mutation", input),
29727
+ listRuleTags: (input) => dispatch("notificationRules", "listRuleTags", "query", input),
29728
+ setRuleTags: (input) => dispatch("notificationRules", "setRuleTags", "mutation", input),
29673
29729
  getClipRetentionAsks: (input) => dispatch("notificationRules", "getClipRetentionAsks", "query", input),
29674
29730
  listDeviceMutes: (input) => dispatch("notificationRules", "listDeviceMutes", "query", input),
29675
29731
  testRule: (input) => dispatch("notificationRules", "testRule", "mutation", input),
@@ -33671,6 +33727,8 @@ var TimelapseRuleInputSchema = z.object({
33671
33727
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
33672
33728
  priority: PriorityField.default(3),
33673
33729
  /** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
33730
+ /** Operator labels (D1054) — optional and NEVER defaulted: an absent key leaves the stored tags alone; `[]` clears them. Admin-only. */
33731
+ tags: TagsFieldSchema.optional(),
33674
33732
  targetOverrides: NcTargetOverridesSchema.optional()
33675
33733
  });
33676
33734
  /**
@@ -33697,6 +33755,8 @@ z.object({
33697
33755
  reportClasses: ReportClassesField.optional(),
33698
33756
  priority: PriorityField.optional(),
33699
33757
  /** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
33758
+ /** Absent = keep the stored tags; `[]` clears them (D1054). Never defaulted. */
33759
+ tags: TagsFieldSchema.optional(),
33700
33760
  targetOverrides: NcTargetOverridesSchema.optional()
33701
33761
  });
33702
33762
  /** A persisted timelapse rule. */
@@ -6485,6 +6485,20 @@ export type AppRouter = TrpcCoreRouter<{
6485
6485
  output: z.infer<typeof notificationRulesCapability.methods.setRuleEnabled.output>;
6486
6486
  meta: object;
6487
6487
  }>;
6488
+ listRuleTags: TRPCQueryProcedure<{
6489
+ input: {
6490
+ [x: string]: unknown;
6491
+ } & z.input<typeof notificationRulesCapability.methods.listRuleTags.input>;
6492
+ output: z.infer<typeof notificationRulesCapability.methods.listRuleTags.output>;
6493
+ meta: object;
6494
+ }>;
6495
+ setRuleTags: TRPCMutationProcedure<{
6496
+ input: {
6497
+ [x: string]: unknown;
6498
+ } & z.input<typeof notificationRulesCapability.methods.setRuleTags.input>;
6499
+ output: z.infer<typeof notificationRulesCapability.methods.setRuleTags.output>;
6500
+ meta: object;
6501
+ }>;
6488
6502
  getClipRetentionAsks: TRPCQueryProcedure<{
6489
6503
  input: {
6490
6504
  [x: string]: unknown;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 1507 method paths across 210 capabilities.
9
+ * Coverage: 1509 method paths across 210 capabilities.
10
10
  */
11
11
  import type { MethodRole } from '../auth/viewer-access.js';
12
12
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
@@ -113,7 +113,7 @@ export interface SystemProxy {
113
113
  readonly networkQuality: Pick<InferProvider<typeof networkQualityCapability>, 'getAllStats'>;
114
114
  readonly nodes: Pick<InferProvider<typeof nodesCapability>, 'topology' | 'directory' | 'deployAddon' | 'undeployAddon' | 'restartAddon' | 'restartProcess' | 'restartNode' | 'shutdownNode' | 'renameNode' | 'clusterAddonStatus' | 'getCapUsageGraph' | 'getNodeAddons' | 'setProcessLogLevel' | 'executeQuery'>;
115
115
  readonly notificationOutput: Pick<InferProvider<typeof notificationOutputCapability>, 'listTargetKinds' | 'discoverTargets' | 'probeTargetConfig' | 'send' | 'testTarget'>;
116
- readonly notificationRules: Pick<InferProvider<typeof notificationRulesCapability>, 'listRules' | 'getRule' | 'createRule' | 'updateRule' | 'deleteRule' | 'setRuleEnabled' | 'getClipRetentionAsks' | 'listDeviceMutes' | 'testRule' | 'previewStateSummary' | 'getConditionCatalog' | 'getTemplateCatalog' | 'previewTemplate' | 'getHistory' | 'getRuleLastRuns' | 'resolveArtifactUrl' | 'listSnoozes' | 'createSnooze' | 'cancelSnooze' | 'getAlarmConfig' | 'setAlarmConfig' | 'createAlarmProfile' | 'renameAlarmProfile' | 'deleteAlarmProfile' | 'activateAlarmProfile' | 'getAlarmSensors'>;
116
+ readonly notificationRules: Pick<InferProvider<typeof notificationRulesCapability>, 'listRules' | 'getRule' | 'createRule' | 'updateRule' | 'deleteRule' | 'setRuleEnabled' | 'listRuleTags' | 'setRuleTags' | 'getClipRetentionAsks' | 'listDeviceMutes' | 'testRule' | 'previewStateSummary' | 'getConditionCatalog' | 'getTemplateCatalog' | 'previewTemplate' | 'getHistory' | 'getRuleLastRuns' | 'resolveArtifactUrl' | 'listSnoozes' | 'createSnooze' | 'cancelSnooze' | 'getAlarmConfig' | 'setAlarmConfig' | 'createAlarmProfile' | 'renameAlarmProfile' | 'deleteAlarmProfile' | 'activateAlarmProfile' | 'getAlarmSensors'>;
117
117
  readonly osdManager: Pick<InferProvider<typeof osdManagerCapability>, 'getConditionSupport' | 'copyDeviceConfiguration' | 'listTemplates' | 'upsertTemplate' | 'deleteTemplate'>;
118
118
  readonly pipelineExecutor: Pick<InferProvider<typeof pipelineExecutorCapability>, 'getAvailableEngines' | 'getSelectedEngine' | 'getEngineProvisioning' | 'getVideoPipelineSteps' | 'setVideoPipelineSteps' | 'getInferenceDeviceHealth' | 'rearmInferenceDevice' | 'getSchema' | 'getOrchestratorConfigSchema' | 'validatePipeline' | 'getCapabilities' | 'getAddonModels' | 'downloadModel' | 'deleteModel' | 'cacheFrameInPool' | 'inferCached' | 'uncacheFrame' | 'getEffectiveTuning' | 'listLoadedEngines' | 'spinEngine' | 'killEngine' | 'listReferenceImages' | 'getReferenceImage' | 'getReferenceAudioFiles' | 'getReferenceAudio' | 'getAudioCapabilities' | 'runAudioTest' | 'getDetectionConfigSchema'>;
119
119
  readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'requestOccupancyLook' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getClusterModelChoice' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAudioAssignments' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentCapabilities' | 'setAgentDecodeLimits' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'setNodeStepSettings' | 'getNodeInferenceDevices' | 'forgetInferenceDevice' | 'resetNodePipelineDefaults' | 'planAutoTune' | 'applyAutoTune' | 'setLoadBalancingShares' | 'getPlacementStats' | 'getHealthDigest' | 'suggestShares' | 'getEffectiveShares' | 'setShareSource' | 'getNodeBenchmarkPreflight' | 'startNodeBenchmark' | 'getNodeBenchmarkStatus' | 'abortNodeBenchmark' | 'getNodeBenchmarkCandidates' | 'listNodeBenchmarkResults' | 'deleteNodeBenchmarkResult' | 'getCameraStatuses' | 'setCameraSensors' | 'reconcileFromDisk' | 'getReconcileFromDiskStatus'>;
package/dist/index.js CHANGED
@@ -82101,7 +82101,32 @@ var NcRuleInputSchema = zod.z.object({
82101
82101
  * authored before this field meant. An editor turns it off by writing
82102
82102
  * `false`, so it needs no `clear` key.
82103
82103
  */
82104
- askVerdict: zod.z.boolean().optional()
82104
+ askVerdict: zod.z.boolean().optional(),
82105
+ /**
82106
+ * Operator tags (D1054), kept on the rule like a core block's. Absent = no
82107
+ * tags. `.optional()`, never `.default()`: a partial `updateRule` patch that
82108
+ * does not name `tags` keeps the stored ones (the store merges), and an
82109
+ * editor empties them by sending `[]` (the store drops an empty list).
82110
+ * Renamed or removed fleet-wide only through the `tags` cap, which writes
82111
+ * here with `setRuleTags`.
82112
+ */
82113
+ tags: TagsFieldSchema.optional()
82114
+ });
82115
+ /**
82116
+ * The rule kinds that carry tags (D1054) — each one its own store. Every kind
82117
+ * labels its rules the same way; this names which store a tag write goes to.
82118
+ */
82119
+ var NcTaggedRuleKindSchema = zod.z.enum([
82120
+ "event",
82121
+ "summary",
82122
+ "timelapse",
82123
+ "calendar-events"
82124
+ ]);
82125
+ /** One rule's tags, as the `tags` cap reads them across every kind. */
82126
+ var NcRuleTagsEntrySchema = zod.z.object({
82127
+ kind: NcTaggedRuleKindSchema,
82128
+ ruleId: zod.z.string(),
82129
+ tags: zod.z.array(zod.z.string())
82105
82130
  });
82106
82131
  /**
82107
82132
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -83824,6 +83849,29 @@ var notificationRulesCapability = {
83824
83849
  auth: "admin"
83825
83850
  }),
83826
83851
  /**
83852
+ * Every rule of every kind with its tags (D1054) — event rules, summaries,
83853
+ * timelapses and calendar-events rules. The `tags` cap counts and rewrites
83854
+ * from this one read; a rule without tags is listed with `[]`.
83855
+ */
83856
+ listRuleTags: require_sleep.method(zod.z.object({}), zod.z.object({ rules: zod.z.array(NcRuleTagsEntrySchema) }), {
83857
+ kind: "query",
83858
+ auth: "admin"
83859
+ }),
83860
+ /**
83861
+ * Replace ONE rule's tags (D1054) and nothing else — the `tags` cap's rename
83862
+ * and remove write through this. `kind` names the store the rule lives in.
83863
+ * Normalised on write (trimmed, deduplicated case-insensitively); `[]`
83864
+ * clears them.
83865
+ */
83866
+ setRuleTags: require_sleep.method(zod.z.object({
83867
+ kind: NcTaggedRuleKindSchema,
83868
+ ruleId: zod.z.string(),
83869
+ tags: TagsFieldSchema
83870
+ }), zod.z.object({ success: zod.z.literal(true) }), {
83871
+ kind: "mutation",
83872
+ auth: "admin"
83873
+ }),
83874
+ /**
83827
83875
  * WHAT THE RULES ACTUALLY ASK the stream broker to retain, per camera.
83828
83876
  *
83829
83877
  * The notification centre owns the rules, so it is the only thing that can
@@ -98034,10 +98082,11 @@ var systemCapability = {
98034
98082
  /**
98035
98083
  * tags — the registry of tag STYLES and the one place that renames or removes a
98036
98084
  * tag everywhere (D1054). A tag itself lives in the `tags` array of the record it
98037
- * labels (a core block, a scheduler, a template, an action, a device); only its
98085
+ * labels (a core block, a scheduler, a template, an action, a device, a
98086
+ * notification rule); only its
98038
98087
  * colour token and icon are registered here. Provided by the core-blocks builtin,
98039
- * the one place that knows every owner kind; devices are reached through
98040
- * `deviceManager` over `ctx.api`.
98088
+ * the one place that knows every owner kind; devices and notification rules
98089
+ * are reached through `deviceManager` / `notificationRules` over `ctx.api`.
98041
98090
  *
98042
98091
  * Tags compare trimmed and case-insensitively. `list` is the union of styled tags
98043
98092
  * and tags in use; a tag with no style answers a colour derived from its name and
@@ -98048,7 +98097,21 @@ var TagUsageCountsSchema = zod.z.object({
98048
98097
  schedulers: zod.z.number().int().nonnegative(),
98049
98098
  templates: zod.z.number().int().nonnegative(),
98050
98099
  actions: zod.z.number().int().nonnegative(),
98051
- devices: zod.z.number().int().nonnegative()
98100
+ devices: zod.z.number().int().nonnegative(),
98101
+ notificationRules: zod.z.number().int().nonnegative()
98102
+ });
98103
+ /**
98104
+ * The counts `list` answers. An owner that could not be read (a forked addon
98105
+ * that is down, redeploying or not installed) is `null` — unknown, never `0`
98106
+ * (D393) — and `list` still answers with the other owners' tags.
98107
+ */
98108
+ var TagListCountsSchema = zod.z.object({
98109
+ coreBlocks: zod.z.number().int().nonnegative().nullable(),
98110
+ schedulers: zod.z.number().int().nonnegative().nullable(),
98111
+ templates: zod.z.number().int().nonnegative().nullable(),
98112
+ actions: zod.z.number().int().nonnegative().nullable(),
98113
+ devices: zod.z.number().int().nonnegative().nullable(),
98114
+ notificationRules: zod.z.number().int().nonnegative().nullable()
98052
98115
  });
98053
98116
  var TagEntrySchema = zod.z.object({
98054
98117
  name: TagNameSchema,
@@ -98056,14 +98119,19 @@ var TagEntrySchema = zod.z.object({
98056
98119
  icon: IconKeySchema,
98057
98120
  /** `false` when the operator never chose a style: colour and icon are the derived defaults. */
98058
98121
  styled: zod.z.boolean(),
98059
- counts: TagUsageCountsSchema
98122
+ /** Per owner kind; `null` = that owner could not be read on this call. */
98123
+ counts: TagListCountsSchema
98060
98124
  });
98061
98125
  var tagsCapability = {
98062
98126
  name: "tags",
98063
98127
  scope: "system",
98064
98128
  mode: "singleton",
98065
98129
  methods: {
98066
- /** Every tag: styled or in use, with how many records of each kind carry it. */
98130
+ /**
98131
+ * Every tag: styled or in use, with how many records of each kind carry it.
98132
+ * An unreachable owner degrades that kind's count to `null`; the call still
98133
+ * answers.
98134
+ */
98067
98135
  list: require_sleep.method(zod.z.object({}), zod.z.array(TagEntrySchema), { auth: "protected" }),
98068
98136
  /** Choose the colour and icon of a tag. The tag need not be in use. */
98069
98137
  setStyle: require_sleep.method(zod.z.object({
@@ -98077,7 +98145,9 @@ var tagsCapability = {
98077
98145
  /**
98078
98146
  * Rename a tag on EVERY owner in one call. When `to` already exists the two
98079
98147
  * merge and the TARGET's style wins (like `renameLocation`). An empty `to`
98080
- * is refused before anything is written.
98148
+ * is refused before anything is written, and so is any call while an owner
98149
+ * cannot be read (the error names the owner): a rename applied to
98150
+ * only some owners would split the fleet across two spellings.
98081
98151
  */
98082
98152
  rename: require_sleep.method(zod.z.object({
98083
98153
  from: zod.z.string(),
@@ -98086,7 +98156,7 @@ var tagsCapability = {
98086
98156
  kind: "mutation",
98087
98157
  auth: "admin"
98088
98158
  }),
98089
- /** Drop a tag from every owner and delete its style. */
98159
+ /** Drop a tag from every owner and delete its style. Refused like `rename` while an owner cannot be read. */
98090
98160
  remove: require_sleep.method(zod.z.object({ name: zod.z.string() }), zod.z.object({ updated: TagUsageCountsSchema }), {
98091
98161
  kind: "mutation",
98092
98162
  auth: "admin"
@@ -99161,7 +99231,11 @@ var TerminalSessionInfoSchema = zod.z.object({
99161
99231
  cols: zod.z.number().int().positive(),
99162
99232
  rows: zod.z.number().int().positive(),
99163
99233
  /** ms-epoch the session's pty was spawned. */
99164
- startedAt: zod.z.number()
99234
+ startedAt: zod.z.number(),
99235
+ /** User id of the admin who opened it; `unattributed` when the caller was not passed. */
99236
+ openedBy: zod.z.string().optional(),
99237
+ /** ms-epoch of the last pty input or output — what the idle timeout measures. */
99238
+ lastActivityAt: zod.z.number().optional()
99165
99239
  });
99166
99240
  /**
99167
99241
  * A profile the operator may open — a pre-declared, allowlisted program
@@ -123895,6 +123969,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
123895
123969
  access: "view",
123896
123970
  role: "admin"
123897
123971
  },
123972
+ "notificationRules.listRuleTags": {
123973
+ capName: "notification-rules",
123974
+ capScope: "system",
123975
+ addonId: null,
123976
+ access: "view",
123977
+ role: "admin"
123978
+ },
123898
123979
  "notificationRules.listSnoozes": {
123899
123980
  capName: "notification-rules",
123900
123981
  capScope: "system",
@@ -123951,6 +124032,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
123951
124032
  access: "create",
123952
124033
  role: "admin"
123953
124034
  },
124035
+ "notificationRules.setRuleTags": {
124036
+ capName: "notification-rules",
124037
+ capScope: "system",
124038
+ addonId: null,
124039
+ access: "create",
124040
+ role: "admin"
124041
+ },
123954
124042
  "notificationRules.testRule": {
123955
124043
  capName: "notification-rules",
123956
124044
  capScope: "system",
@@ -136207,6 +136295,8 @@ function createSystemProxy(api) {
136207
136295
  updateRule: (input) => dispatch("notificationRules", "updateRule", "mutation", input),
136208
136296
  deleteRule: (input) => dispatch("notificationRules", "deleteRule", "mutation", input),
136209
136297
  setRuleEnabled: (input) => dispatch("notificationRules", "setRuleEnabled", "mutation", input),
136298
+ listRuleTags: (input) => dispatch("notificationRules", "listRuleTags", "query", input),
136299
+ setRuleTags: (input) => dispatch("notificationRules", "setRuleTags", "mutation", input),
136210
136300
  getClipRetentionAsks: (input) => dispatch("notificationRules", "getClipRetentionAsks", "query", input),
136211
136301
  listDeviceMutes: (input) => dispatch("notificationRules", "listDeviceMutes", "query", input),
136212
136302
  testRule: (input) => dispatch("notificationRules", "testRule", "mutation", input),
@@ -142781,6 +142871,8 @@ var TimelapseRuleInputSchema = zod.z.object({
142781
142871
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
142782
142872
  priority: PriorityField.default(3),
142783
142873
  /** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
142874
+ /** Operator labels (D1054) — optional and NEVER defaulted: an absent key leaves the stored tags alone; `[]` clears them. Admin-only. */
142875
+ tags: TagsFieldSchema.optional(),
142784
142876
  targetOverrides: NcTargetOverridesSchema.optional()
142785
142877
  });
142786
142878
  /**
@@ -142823,6 +142915,8 @@ var TimelapseRulePatchSchema = zod.z.object({
142823
142915
  reportClasses: ReportClassesField.optional(),
142824
142916
  priority: PriorityField.optional(),
142825
142917
  /** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
142918
+ /** Absent = keep the stored tags; `[]` clears them (D1054). Never defaulted. */
142919
+ tags: TagsFieldSchema.optional(),
142826
142920
  targetOverrides: NcTargetOverridesSchema.optional()
142827
142921
  });
142828
142922
  /** A persisted timelapse rule. */
@@ -150441,6 +150535,7 @@ exports.NcRuleLastRunsSchema = NcRuleLastRunsSchema;
150441
150535
  exports.NcRuleNotificationButtonSchema = NcRuleNotificationButtonSchema;
150442
150536
  exports.NcRulePatchSchema = NcRulePatchSchema;
150443
150537
  exports.NcRuleSchema = NcRuleSchema;
150538
+ exports.NcRuleTagsEntrySchema = NcRuleTagsEntrySchema;
150444
150539
  exports.NcRuleTargetSchema = NcRuleTargetSchema;
150445
150540
  exports.NcRuleUpdateInputSchema = NcRuleUpdateInputSchema;
150446
150541
  exports.NcSceneConditionSchema = NcSceneConditionSchema;
@@ -150461,6 +150556,7 @@ exports.NcSystemEventDeliveryModeSchema = NcSystemEventDeliveryModeSchema;
150461
150556
  exports.NcSystemEventDeliverySchema = NcSystemEventDeliverySchema;
150462
150557
  exports.NcSystemEventDeliveryToggleSchema = NcSystemEventDeliveryToggleSchema;
150463
150558
  exports.NcSystemEventKindSchema = NcSystemEventKindSchema;
150559
+ exports.NcTaggedRuleKindSchema = NcTaggedRuleKindSchema;
150464
150560
  exports.NcTargetAttachmentSchema = NcTargetAttachmentSchema;
150465
150561
  exports.NcTargetOverrideSchema = NcTargetOverrideSchema;
150466
150562
  exports.NcTargetOverridesSchema = NcTargetOverridesSchema;
@@ -151264,6 +151360,7 @@ exports.TRANSCODE_DOWN_MAX_HEIGHT = TRANSCODE_DOWN_MAX_HEIGHT;
151264
151360
  exports.TRIGGERED_BY_MAX_IDS = TRIGGERED_BY_MAX_IDS;
151265
151361
  exports.TagColorIdSchema = TagColorIdSchema;
151266
151362
  exports.TagEntrySchema = TagEntrySchema;
151363
+ exports.TagListCountsSchema = TagListCountsSchema;
151267
151364
  exports.TagNameSchema = TagNameSchema;
151268
151365
  exports.TagStyleSchema = TagStyleSchema;
151269
151366
  exports.TagUsageCountsSchema = TagUsageCountsSchema;