@camstack/types 1.2.300 → 1.2.302
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/notification-output.cap.d.ts +41 -0
- package/dist/generated/addon-api.d.ts +14 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +91 -4
- package/dist/index.mjs +90 -5
- package/dist/interfaces/config-ui.d.ts +85 -1
- package/dist/notification/system-event-summary.d.ts +13 -0
- package/dist/{sleep-G4F3X9X_.js → sleep-C3gDpn7G.js} +783 -637
- package/dist/{sleep-CDCONfkt.mjs → sleep-DXKLNFvA.mjs} +783 -637
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-C3gDpn7G.js");
|
|
3
3
|
const require_event_category = require("./event-category-DmS_tLsU.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-Dx2Kor0g.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as normalizeAddonInitResult, B as nodePin, Ct as PEER_BYTES_STALL_MS, D as adminUiCapability, Et as DATAPLANE_SECRET_HEADER, N as expandCapMethods, Ot as DisposerChain, Pt as emitReadiness, S as DEVICE_CHILDREN_BATCH_MAX, St as PEER_BYTES_MAX_OUTSTANDING, T as describeCustomActions, U as ReadinessRegistry, V as readNodePin, W as ReadinessTimeoutError, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, h as createEventBusSliceSource, kt as BaseAddon, m as createDeviceProxy, p as isDeviceScopedCap, q as scopeKey, s as asString, t as sleep, u as parseJsonUnknown, wt as PEER_BYTES_TICKET_TTL_MS, x as viewerUiCapability, xt as PEER_BYTES_CHUNK_BYTES } from "./sleep-
|
|
1
|
+
import { At as normalizeAddonInitResult, B as nodePin, Ct as PEER_BYTES_STALL_MS, D as adminUiCapability, Et as DATAPLANE_SECRET_HEADER, N as expandCapMethods, Ot as DisposerChain, Pt as emitReadiness, S as DEVICE_CHILDREN_BATCH_MAX, St as PEER_BYTES_MAX_OUTSTANDING, T as describeCustomActions, U as ReadinessRegistry, V as readNodePin, W as ReadinessTimeoutError, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, h as createEventBusSliceSource, kt as BaseAddon, m as createDeviceProxy, p as isDeviceScopedCap, q as scopeKey, s as asString, t as sleep, u as parseJsonUnknown, wt as PEER_BYTES_TICKET_TTL_MS, x as viewerUiCapability, xt as PEER_BYTES_CHUNK_BYTES } from "./sleep-DXKLNFvA.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-BGmz_oxW.mjs";
|
|
3
3
|
import { a as DeviceType, t as errMsg } from "./err-msg-DX6i_MY4.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
@@ -85,7 +85,7 @@ export type { BrokerConnectionDetails, BrokerInfo as MqttBrokerInfo, BrokerStatu
|
|
|
85
85
|
export { AddBrokerInputSchema, BrokerConnectionDetailsSchema, BrokerInfoSchema as MqttBrokerInfoSchema, MqttBrokerStatusSchema, mqttBrokerCapability, StartEmbeddedInputSchema, } from './mqtt-broker.cap.js';
|
|
86
86
|
export type { NetworkAccessStatus, NetworkEndpoint } from './network-access.cap.js';
|
|
87
87
|
export { NetworkAccessStatusSchema, NetworkEndpointSchema, networkAccessCapability, } from './network-access.cap.js';
|
|
88
|
-
export { type Attachment, type AttachmentMediaType, AttachmentMediaTypeSchema, AttachmentSchema, type DiscoveredTarget, DiscoveredTargetSchema, type INotificationOutputProvider, type NotificationAction, type NotificationActionIcon, NotificationActionIconSchema, NotificationActionSchema, type NotificationFormat, NotificationFormatSchema, NotificationSchema, notificationOutputCapability, type RenderedAs, RenderedAsSchema, type SendResult, SendResultSchema, type Target, type TargetKind, type TargetKindCaps, TargetKindCapsSchema, type TargetKindLevel, TargetKindLevelSchema, TargetKindSchema, TargetSchema, type TestResult, TestResultSchema, } from './notification-output.cap.js';
|
|
88
|
+
export { type Attachment, type AttachmentMediaType, AttachmentMediaTypeSchema, AttachmentSchema, type DiscoveredTarget, DiscoveredTargetSchema, type INotificationOutputProvider, type NotificationAction, type NotificationActionIcon, NotificationActionIconSchema, NotificationActionSchema, type NotificationFormat, NotificationFormatSchema, NotificationSchema, notificationOutputCapability, type RenderedAs, RenderedAsSchema, type ProbeTargetConfigResult, ProbeTargetConfigResultSchema, type SendResult, SendResultSchema, type Target, type TargetKind, type TargetKindCaps, TargetKindCapsSchema, type TargetKindLevel, TargetKindLevelSchema, TargetKindSchema, TargetSchema, type TestResult, TestResultSchema, } from './notification-output.cap.js';
|
|
89
89
|
export { consumableLowPercentOf, type INotificationRulesProvider, isRetiredClearKey, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_NONBLOCKING_MAX, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_AUDIO_DBFS_FLOOR, NC_AUTHORABLE_SYSTEM_EVENT_KINDS, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CLIP_POST_ROLL_DEFAULT_SEC, NC_CLIP_PRE_ROLL_DEFAULT_SEC, NC_CLIP_RETENTION_MAX_SEC, NC_CONDITION_CATALOG, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, NC_CONFIRM_DEFAULT_TIMEOUT_MS, NC_CONFIRM_MAX_TIMEOUT_MS, NC_CONFIRM_MIN_TIMEOUT_MS, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_DEFAULT_SNOOZE_MINUTES, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_RULE_CLEARABLE_KEYS, NC_RULE_RETIRED_CLEAR_KEYS, NC_SNOOZE_MAX_MINUTES, NC_TANK_SYSTEM_EVENT_KINDS, type NcAlarmConfig, NcAlarmConfigSchema, type NcAlarmCreateProfileInput, NcAlarmCreateProfileInputSchema, type NcAlarmModeCoverage, NcAlarmModeCoverageSchema, type NcAlarmModeDelays, type NcAlarmModeDelaysEdit, NcAlarmModeDelaysEditSchema, NcAlarmModeDelaysSchema, type NcAlarmBlocking, type NcAlarmBlockingEdit, NcAlarmBlockingEditSchema, NcAlarmBlockingSchema, type NcAlarmModeDeviceList, NcAlarmModeDeviceListSchema, type NcAlarmNonBlocking, type NcAlarmNonBlockingEdit, NcAlarmNonBlockingEditSchema, NcAlarmNonBlockingSchema, type NcAlarmProfileIdInput, NcAlarmProfileIdInputSchema, type NcAlarmProfileMeta, NcAlarmProfileMetaSchema, type NcAlarmProfilesView, NcAlarmProfilesViewSchema, type NcAlarmRenameProfileInput, NcAlarmRenameProfileInputSchema, type NcAlarmSecureOnArmEdit, NcAlarmSecureOnArmEditSchema, type NcAlarmSecureOnArmOff, NcAlarmSecureOnArmOffSchema, type NcAlarmSensorReading, NcAlarmSensorReadingSchema, type NcAlarmSensorState, NcAlarmSensorStateSchema, type NcAlarmSensors, type NcAlarmSensorsInput, NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, type NcAlarmSettings, type NcAlarmSettingsPatch, NcAlarmSettingsPatchSchema, NcAlarmSettingsSchema, type NcAlarmSkippedDevice, NcAlarmSkippedDeviceSchema, type NcAlarmSkipReason, NcAlarmSkipReasonSchema, type NcAudioCondition, NcAudioConditionSchema, type NcClipRetentionAsk, NcClipRetentionAskSchema, type NcClipRetentionPlan, NcClipRetentionPlanSchema, type NcConditionDescriptor, NcConditionDescriptorSchema, type NcConditions, NcConditionsSchema, type NcConfirm, type NcConfirmExpect, NcConfirmExpectSchema, NcConfirmSchema, type NcCrossing, NcCrossingSchema, type NcDelivery, NcDeliverySchema, type NcDeviceStateCondition, NcDeviceStateConditionSchema, type NcHistoryEntry, NcHistoryEntrySchema, type NcHistoryFilter, NcHistoryFilterSchema, type NcHistoryRecordKind, NcHistoryRecordKindSchema, type NcHistoryStatus, NcHistoryStatusSchema, type NcHistorySubject, NcHistorySubjectSchema, type NcLinkedCameraMode, NcLinkedCameraModeSchema, type NcMediaFrame, NcMediaFrameSchema, type NcMediaPolicy, NcMediaPolicySchema, type NcOccupancyCondition, NcOccupancyConditionSchema, type NcPlateMatcher, NcPlateMatcherSchema, type NcRule, type NcActionBinding, NcActionBindingSchema, type NcHookBindings, NcHookBindingsSchema, type NcRuleAction, NcRuleActionSchema, type NcLegacyRuleActionSequence, NcLegacyRuleActionSequenceSchema, type NcRuleActionSequence, NcRuleActionSequenceSchema, type NcRuleActions, NcRuleActionsSchema, type NcSharedSequence, NcSharedSequenceInputSchema, type NcSharedSequenceInput, NcSharedSequenceSchema, type NcRuleClearableKey, NcRuleClearableKeySchema, type NcRuleInput, NcRuleInputSchema, NcRuleKindSchema, type NcRuleLastRun, NcRuleLastRunSchema, type NcRuleLastRuns, NcRuleLastRunsSchema, type NcRuleNotificationButton, NcRuleNotificationButtonSchema, type NcRulePatch, NcRulePatchSchema, NcRuleSchema, type NcRuleTarget, NcRuleTargetSchema, type NcRuleUpdateInput, NcRuleUpdateInputSchema, type NcSceneCondition, NcSceneConditionSchema, type NcSchedule, NcScheduleSchema, type NcScheduleWindow, NcScheduleWindowSchema, type NcSensorTransition, NcSensorTransitionSchema, type NcSnooze, type NcSnoozeInput, NcSnoozeInputSchema, NcSnoozeSchema, type NcSnoozeScope, NcSnoozeScopeSchema, type NcSnoozeSuppressed, NcSnoozeSuppressedSchema, type NcStateSummaryPreview, type NcStateSummaryPreviewRow, NcStateSummaryPreviewRowSchema, NcStateSummaryPreviewSchema, type NcStateSummaryPreviewSection, NcStateSummaryPreviewSectionSchema, type NcStateSummarySectionId, NcStateSummarySectionIdSchema, type NcStateSummarySplit, NcStateSummarySplitSchema, type NcSystemEventCondition, NcSystemEventConditionSchema, type NcSystemEventDelivery, type NcSystemEventDeliveryMode, NcSystemEventDeliveryModeSchema, NcSystemEventDeliverySchema, type NcSystemEventKind, NcSystemEventKindSchema, type NcTemplateFamily, NcTemplateFamilySchema, type NcTemplateField, NcTemplateFieldSchema, type NcTemplatePreview, type NcTemplatePreviewInput, NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, type NcTemplateVarContext, NcTemplateVarContextSchema, type NcTemplateVarDescriptor, NcTemplateVarDescriptorSchema, type NcTemplateVarGroup, NcTemplateVarGroupSchema, type NcTemplateVarKind, NcTemplateVarKindSchema, type NcTestResult, NcTestResultSchema, type NcThrottle, type NcThrottleGranularity, NcThrottleGranularitySchema, NcThrottleSchema, type NcZoneCondition, NcZoneConditionSchema, notificationRulesCapability, } from './notification-rules.cap.js';
|
|
90
90
|
export { type IOauthIntegrationProvider, type OauthIntegrationDescriptor, OauthIntegrationDescriptorSchema, oauthIntegrationCapability, } from './oauth-integration.cap.js';
|
|
91
91
|
export { AnalyticsLtsSeriesSchema, type AudioEvent, type AudioEventDraft, AudioEventSchema, type DetectionSource, DetectionSourceSchema, EVENT_DENSITY_BATCH_MAX, type EventDensityBucket, EventDensityBucketSchema, type EventDensityForDevice, EventDensityForDeviceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type EventKindsForDevice, EventKindsForDeviceSchema, type EventMediaKindBreakdown, type EventMediaKindFootprint, type EventPruneCounts, type EventStoreDeviceFootprint, type EventStoreFootprint, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type KeyEventsForDevice, type LabelAttribution, LabelAttributionSchema, type LabelTier, LabelTierSchema, LTS_SCOPE_CLASS_SEPARATOR, type LtsBucket, LtsBucketSchema, MAX_TRACK_DEBUG_NOTE_LEN, type MediaFile, type MediaFileBytes, type MediaFileInfo, MediaFileInfoSchema, type MediaFileKind, MediaFileKindEnum, type MediaFileRef, MediaFileRefSchema, MediaFileSchema, type MotionEvent, type MotionEventDraft, MotionEventSchema, type ObjectEvent, type ObjectEventDraft, ObjectEventSchema, occupancyScope, parseOccupancyScope, pipelineAnalyticsCapability, type RebuildObjectEmbeddingsRefusal, RebuildObjectEmbeddingsRefusalSchema, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type RetrainAnnotation, type RetrainAnnotationDraft, RetrainAnnotationDraftSchema, RetrainAnnotationKindSchema, RetrainAnnotationSchema, RetrainAnnotationSourceSchema, type RetrainAssistResult, RetrainAssistResultSchema, RetrainAssistSubjectSchema, RetrainCopyRefusalSchema, type RetrainFrame, type RetrainFrameCandidate, RetrainFrameCandidateSchema, type RetrainFrameList, RetrainFrameListSchema, RetrainFrameSchema, type RetrainFrameSelection, RetrainFrameSelectionSchema, type RetrainMacroClass, RetrainMacroClassSchema, type RetrainStatus, RetrainStatusSchema, type RetrainTrack, RetrainTrackSchema, type RetrainTransitionResult, RetrainTransitionResultSchema, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, type TrackEnvelope, TrackEnvelopeSchema, TrackedDetectionSchema, type TrackFlags, type TrackFlagsPatch, TrackFlagsPatchSchema, TrackFlagsSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackSource, TrackSourceSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, type TrainingExportDeviceTotals, TrainingExportDeviceTotalsSchema, type TrainingExportSummary, TrainingExportSummarySchema, type ZoneCrossing, type ZoneCrossingDirection, ZoneCrossingDirectionSchema, ZoneCrossingSchema, } from './pipeline-analytics.cap.js';
|
|
@@ -426,6 +426,18 @@ export declare const TestResultSchema: z.ZodObject<{
|
|
|
426
426
|
}, z.core.$strip>>;
|
|
427
427
|
}, z.core.$strip>;
|
|
428
428
|
export type TestResult = SendResult;
|
|
429
|
+
/**
|
|
430
|
+
* Pre-save credential probe against a partial (unsaved) target config.
|
|
431
|
+
* `resolvedUrl` never includes secrets (token stripped from path).
|
|
432
|
+
*/
|
|
433
|
+
export declare const ProbeTargetConfigResultSchema: z.ZodObject<{
|
|
434
|
+
ok: z.ZodBoolean;
|
|
435
|
+
resolvedUrl: z.ZodString;
|
|
436
|
+
httpStatus: z.ZodOptional<z.ZodNumber>;
|
|
437
|
+
stateInstance: z.ZodOptional<z.ZodString>;
|
|
438
|
+
error: z.ZodOptional<z.ZodString>;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
export type ProbeTargetConfigResult = z.infer<typeof ProbeTargetConfigResultSchema>;
|
|
429
441
|
export declare const notificationOutputCapability: {
|
|
430
442
|
readonly name: "notification-output";
|
|
431
443
|
readonly scope: "system";
|
|
@@ -491,14 +503,42 @@ export declare const notificationOutputCapability: {
|
|
|
491
503
|
enabled: z.ZodBoolean;
|
|
492
504
|
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
493
505
|
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
506
|
+
/**
|
|
507
|
+
* One target WITH secrets — admin edit / duplicate hydration only.
|
|
508
|
+
* `listTargets` stays redacted; the editor loads this so password fields
|
|
509
|
+
* are filled (masked in the input) and a save can round-trip the token
|
|
510
|
+
* when a destination changes (Duplicate with a new chatId, etc.).
|
|
511
|
+
*/
|
|
512
|
+
readonly getTarget: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
513
|
+
targetId: z.ZodString;
|
|
514
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
515
|
+
id: z.ZodString;
|
|
516
|
+
name: z.ZodString;
|
|
517
|
+
kind: z.ZodString;
|
|
518
|
+
addonId: z.ZodString;
|
|
519
|
+
enabled: z.ZodBoolean;
|
|
520
|
+
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
521
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
494
522
|
readonly discoverTargets: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
495
523
|
kind: z.ZodString;
|
|
496
524
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
525
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
497
526
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
498
527
|
kind: z.ZodString;
|
|
499
528
|
suggestedName: z.ZodString;
|
|
500
529
|
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
501
530
|
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
531
|
+
readonly probeTargetConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
532
|
+
kind: z.ZodString;
|
|
533
|
+
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
534
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
535
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
536
|
+
ok: z.ZodBoolean;
|
|
537
|
+
resolvedUrl: z.ZodString;
|
|
538
|
+
httpStatus: z.ZodOptional<z.ZodNumber>;
|
|
539
|
+
stateInstance: z.ZodOptional<z.ZodString>;
|
|
540
|
+
error: z.ZodOptional<z.ZodString>;
|
|
541
|
+
}, z.core.$strip>, "mutation">;
|
|
502
542
|
readonly send: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
503
543
|
targetId: z.ZodString;
|
|
504
544
|
notification: z.ZodObject<{
|
|
@@ -666,6 +706,7 @@ export declare const notificationOutputCapability: {
|
|
|
666
706
|
enabled: z.ZodBoolean;
|
|
667
707
|
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
668
708
|
}, z.core.$strip>;
|
|
709
|
+
cloneSecretsFrom: z.ZodOptional<z.ZodString>;
|
|
669
710
|
}, z.core.$strip>, z.ZodObject<{
|
|
670
711
|
id: z.ZodString;
|
|
671
712
|
name: z.ZodString;
|
|
@@ -4993,6 +4993,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
4993
4993
|
output: z.infer<typeof notificationOutputCapability.methods.listTargets.output>;
|
|
4994
4994
|
meta: object;
|
|
4995
4995
|
}>;
|
|
4996
|
+
getTarget: TRPCQueryProcedure<{
|
|
4997
|
+
input: {
|
|
4998
|
+
[x: string]: unknown;
|
|
4999
|
+
} & z.input<typeof notificationOutputCapability.methods.getTarget.input>;
|
|
5000
|
+
output: z.infer<typeof notificationOutputCapability.methods.getTarget.output>;
|
|
5001
|
+
meta: object;
|
|
5002
|
+
}>;
|
|
4996
5003
|
discoverTargets: TRPCQueryProcedure<{
|
|
4997
5004
|
input: {
|
|
4998
5005
|
[x: string]: unknown;
|
|
@@ -5000,6 +5007,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
5000
5007
|
output: z.infer<typeof notificationOutputCapability.methods.discoverTargets.output>;
|
|
5001
5008
|
meta: object;
|
|
5002
5009
|
}>;
|
|
5010
|
+
probeTargetConfig: TRPCMutationProcedure<{
|
|
5011
|
+
input: {
|
|
5012
|
+
[x: string]: unknown;
|
|
5013
|
+
} & z.input<typeof notificationOutputCapability.methods.probeTargetConfig.input>;
|
|
5014
|
+
output: z.infer<typeof notificationOutputCapability.methods.probeTargetConfig.output>;
|
|
5015
|
+
meta: object;
|
|
5016
|
+
}>;
|
|
5003
5017
|
send: TRPCMutationProcedure<{
|
|
5004
5018
|
input: {
|
|
5005
5019
|
[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:
|
|
9
|
+
* Coverage: 1221 method paths across 165 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -84,7 +84,7 @@ export interface SystemProxy {
|
|
|
84
84
|
readonly networkAccess: Pick<InferProvider<typeof networkAccessCapability>, 'start' | 'stop' | 'getEndpoint' | 'getStatus' | 'listEndpoints'>;
|
|
85
85
|
readonly networkQuality: Pick<InferProvider<typeof networkQualityCapability>, 'getAllStats'>;
|
|
86
86
|
readonly nodes: Pick<InferProvider<typeof nodesCapability>, 'topology' | 'directory' | 'deployAddon' | 'undeployAddon' | 'restartAddon' | 'restartProcess' | 'restartNode' | 'shutdownNode' | 'renameNode' | 'clusterAddonStatus' | 'getCapUsageGraph' | 'getNodeAddons' | 'setProcessLogLevel' | 'executeQuery'>;
|
|
87
|
-
readonly notificationOutput: Pick<InferProvider<typeof notificationOutputCapability>, 'listTargetKinds' | 'listTargets' | 'discoverTargets' | 'send' | 'testTarget' | 'upsertTarget' | 'deleteTarget' | 'setTargetEnabled'>;
|
|
87
|
+
readonly notificationOutput: Pick<InferProvider<typeof notificationOutputCapability>, 'listTargetKinds' | 'listTargets' | 'getTarget' | 'discoverTargets' | 'probeTargetConfig' | 'send' | 'testTarget' | 'upsertTarget' | 'deleteTarget' | 'setTargetEnabled'>;
|
|
88
88
|
readonly notificationRules: Pick<InferProvider<typeof notificationRulesCapability>, 'listRules' | 'getRule' | 'createRule' | 'updateRule' | 'deleteRule' | 'setRuleEnabled' | 'listSequences' | 'getSequence' | 'createSequence' | 'updateSequence' | 'deleteSequence' | 'getClipRetentionAsks' | 'listDeviceMutes' | 'testRule' | 'previewStateSummary' | 'getConditionCatalog' | 'getTemplateCatalog' | 'previewTemplate' | 'getHistory' | 'getRuleLastRuns' | 'resolveArtifactUrl' | 'listSnoozes' | 'createSnooze' | 'cancelSnooze' | 'getAlarmConfig' | 'setAlarmConfig' | 'createAlarmProfile' | 'renameAlarmProfile' | 'deleteAlarmProfile' | 'activateAlarmProfile' | 'getAlarmSensors'>;
|
|
89
89
|
readonly osdManager: Pick<InferProvider<typeof osdManagerCapability>, 'getConditionSupport' | 'copyDeviceConfiguration' | 'listTemplates' | 'upsertTemplate' | 'deleteTemplate'>;
|
|
90
90
|
readonly pipelineExecutor: Pick<InferProvider<typeof pipelineExecutorCapability>, 'getAvailableEngines' | 'getSelectedEngine' | 'getDefaultSteps' | 'getEngineProvisioning' | 'getVideoPipelineSteps' | 'setVideoPipelineSteps' | 'clearDeviceOverrides' | 'getInferenceDeviceHealth' | 'rearmInferenceDevice' | 'getSchema' | 'getGlobalSteps' | 'getGlobalPipelineConfig' | 'getOrchestratorConfigSchema' | 'validatePipeline' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate' | 'getCapabilities' | 'getAddonModels' | 'downloadModel' | 'deleteModel' | 'cacheFrameInPool' | 'inferCached' | 'uncacheFrame' | 'getEffectiveTuning' | 'listLoadedEngines' | 'spinEngine' | 'killEngine' | 'listReferenceImages' | 'getReferenceImage' | 'getReferenceAudioFiles' | 'getReferenceAudio' | 'getAudioCapabilities' | 'runAudioTest' | 'getDetectionConfigSchema'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -250,7 +250,7 @@ export { NC_SENSOR_RAISED_FIELD_BY_KIND, NC_SENSOR_TRANSITION_KINDS, NC_SENSOR_T
|
|
|
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';
|
|
251
251
|
export { NC_SYSTEM_EVENT_FILTER_KEYS, type NcSystemEventFilterKey, systemEventFilterApplies, systemEventFilterAppliesToAnyKind, } from './notification/system-event-filters.js';
|
|
252
252
|
export { describeSystemEventFamilyProblem, isSystemEventFamily, NC_SYSTEM_EVENT_CONDITION_FILTER_KEYS, NC_SYSTEM_EVENT_FAMILIES, NC_SYSTEM_EVENT_FAMILY, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, type NcSystemEventConditionFilterKey, type NcSystemEventFamily, type NcSystemEventFamilyProblem, type NcSystemEventFamilyVerdict, type NcSystemEventKindGroupSpec, systemEventFamilyOf, systemEventFamilyProblems, systemEventKindNamesOf, systemEventKindsOfFamily, } from './notification/system-event-families.js';
|
|
253
|
-
export { describeSystemEventDeliveryProblem, isSystemEventSummaryRule, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, type NcSummarySendTime, type NcSystemEventDeliveryProblem, type NcSystemEventDeliverySubject, scheduleForSendTimes, sendTimesOfSchedule, systemEventDeliveryProblems, systemEventSummaryScheduleOf, systemEventSummarySplitOf, templateCarriesSummary, } from './notification/system-event-summary.js';
|
|
253
|
+
export { describeSystemEventDeliveryProblem, isSystemEventSummaryRule, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, type NcSummarySendTime, type NcSystemEventDeliveryProblem, type NcSystemEventDeliverySubject, scheduleForSendTimes, sendTimesForEditor, sendTimesOfSchedule, systemEventDeliveryProblems, systemEventSummaryScheduleOf, systemEventSummarySplitOf, templateCarriesSummary, } from './notification/system-event-summary.js';
|
|
254
254
|
export { NC_SERVER_PACKAGE_NAME, NC_UPDATE_EVENT_PACKAGE_NAMES, type NcInstalledPackageLike, type NcScopePickerItem, nodePickerItems, packagePickerItems, } from './notification/scope-picker-items.js';
|
|
255
255
|
export type { TimelapseCadencePair, TimelapsePreviewMode, TimelapseRule, TimelapseRuleInput, TimelapseRulePatch, TimelapseTemplate, } from './notification/timelapse-rule.js';
|
|
256
256
|
export type { StateLabel, StateLabelKey, StateLabelLocale } from './i18n/state-labels.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-C3gDpn7G.js");
|
|
3
3
|
const require_event_category = require("./event-category-DmS_tLsU.js");
|
|
4
4
|
const require_composition = require("./composition-BLWAivB2.js");
|
|
5
5
|
const require_err_msg = require("./err-msg-Dx2Kor0g.js");
|
|
@@ -17904,6 +17904,17 @@ var SendResultSchema = zod.z.object({
|
|
|
17904
17904
|
});
|
|
17905
17905
|
/** Same shape as SendResult — kept as a distinct name for the test panel. */
|
|
17906
17906
|
var TestResultSchema = SendResultSchema;
|
|
17907
|
+
/**
|
|
17908
|
+
* Pre-save credential probe against a partial (unsaved) target config.
|
|
17909
|
+
* `resolvedUrl` never includes secrets (token stripped from path).
|
|
17910
|
+
*/
|
|
17911
|
+
var ProbeTargetConfigResultSchema = zod.z.object({
|
|
17912
|
+
ok: zod.z.boolean(),
|
|
17913
|
+
resolvedUrl: zod.z.string(),
|
|
17914
|
+
httpStatus: zod.z.number().int().optional(),
|
|
17915
|
+
stateInstance: zod.z.string().optional(),
|
|
17916
|
+
error: zod.z.string().optional()
|
|
17917
|
+
});
|
|
17907
17918
|
var notificationOutputCapability = {
|
|
17908
17919
|
name: "notification-output",
|
|
17909
17920
|
scope: "system",
|
|
@@ -17911,10 +17922,32 @@ var notificationOutputCapability = {
|
|
|
17911
17922
|
methods: {
|
|
17912
17923
|
listTargetKinds: require_sleep.method(zod.z.object({}), zod.z.array(TargetKindSchema)),
|
|
17913
17924
|
listTargets: require_sleep.method(zod.z.object({}), zod.z.array(TargetSchema), { auth: "admin" }),
|
|
17925
|
+
/**
|
|
17926
|
+
* One target WITH secrets — admin edit / duplicate hydration only.
|
|
17927
|
+
* `listTargets` stays redacted; the editor loads this so password fields
|
|
17928
|
+
* are filled (masked in the input) and a save can round-trip the token
|
|
17929
|
+
* when a destination changes (Duplicate with a new chatId, etc.).
|
|
17930
|
+
*/
|
|
17931
|
+
getTarget: require_sleep.method(zod.z.object({ targetId: zod.z.string() }), TargetSchema, { auth: "admin" }),
|
|
17914
17932
|
discoverTargets: require_sleep.method(zod.z.object({
|
|
17915
17933
|
kind: zod.z.string(),
|
|
17916
|
-
config: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
17934
|
+
config: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
|
|
17935
|
+
/**
|
|
17936
|
+
* When editing / duplicating, the blank password field never round-trips
|
|
17937
|
+
* the stored token. Pass the source target id so the provider can restore
|
|
17938
|
+
* secrets server-side before dialling (same merge as upsert).
|
|
17939
|
+
*/
|
|
17940
|
+
targetId: zod.z.string().optional()
|
|
17917
17941
|
}), zod.z.array(DiscoveredTargetSchema), { auth: "admin" }),
|
|
17942
|
+
probeTargetConfig: require_sleep.method(zod.z.object({
|
|
17943
|
+
kind: zod.z.string(),
|
|
17944
|
+
config: zod.z.record(zod.z.string(), zod.z.unknown()),
|
|
17945
|
+
/** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
|
|
17946
|
+
targetId: zod.z.string().optional()
|
|
17947
|
+
}), ProbeTargetConfigResultSchema, {
|
|
17948
|
+
kind: "mutation",
|
|
17949
|
+
auth: "admin"
|
|
17950
|
+
}),
|
|
17918
17951
|
send: require_sleep.method(zod.z.object({
|
|
17919
17952
|
targetId: zod.z.string(),
|
|
17920
17953
|
notification: NotificationSchema
|
|
@@ -17929,7 +17962,16 @@ var notificationOutputCapability = {
|
|
|
17929
17962
|
kind: "mutation",
|
|
17930
17963
|
auth: "admin"
|
|
17931
17964
|
}),
|
|
17932
|
-
upsertTarget: require_sleep.method(zod.z.object({
|
|
17965
|
+
upsertTarget: require_sleep.method(zod.z.object({
|
|
17966
|
+
target: TargetSchema,
|
|
17967
|
+
/**
|
|
17968
|
+
* Duplicate flow: create a NEW target id while copying secrets from an
|
|
17969
|
+
* existing row. The UI never holds the stored token; blank / redacted
|
|
17970
|
+
* password fields are restored from this source (D634 still applies if
|
|
17971
|
+
* destinations diverge without a re-typed secret).
|
|
17972
|
+
*/
|
|
17973
|
+
cloneSecretsFrom: zod.z.string().optional()
|
|
17974
|
+
}), TargetSchema, {
|
|
17933
17975
|
kind: "mutation",
|
|
17934
17976
|
auth: "admin"
|
|
17935
17977
|
}),
|
|
@@ -47089,7 +47131,8 @@ function roomCompositionExample(input) {
|
|
|
47089
47131
|
return require_composition.CompositionSchema.parse({
|
|
47090
47132
|
target: {
|
|
47091
47133
|
kind: "new",
|
|
47092
|
-
type: require_err_msg.DeviceType.Sensor
|
|
47134
|
+
type: require_err_msg.DeviceType.Sensor,
|
|
47135
|
+
role: require_err_msg.DeviceRole.TemperatureSensor
|
|
47093
47136
|
},
|
|
47094
47137
|
features: [{
|
|
47095
47138
|
kind: "fields",
|
|
@@ -53511,6 +53554,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
53511
53554
|
addonId: null,
|
|
53512
53555
|
access: "view"
|
|
53513
53556
|
},
|
|
53557
|
+
"notificationOutput.getTarget": {
|
|
53558
|
+
capName: "notification-output",
|
|
53559
|
+
capScope: "system",
|
|
53560
|
+
addonId: null,
|
|
53561
|
+
access: "view"
|
|
53562
|
+
},
|
|
53514
53563
|
"notificationOutput.listTargetKinds": {
|
|
53515
53564
|
capName: "notification-output",
|
|
53516
53565
|
capScope: "system",
|
|
@@ -53523,6 +53572,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
53523
53572
|
addonId: null,
|
|
53524
53573
|
access: "view"
|
|
53525
53574
|
},
|
|
53575
|
+
"notificationOutput.probeTargetConfig": {
|
|
53576
|
+
capName: "notification-output",
|
|
53577
|
+
capScope: "system",
|
|
53578
|
+
addonId: null,
|
|
53579
|
+
access: "create"
|
|
53580
|
+
},
|
|
53526
53581
|
"notificationOutput.send": {
|
|
53527
53582
|
capName: "notification-output",
|
|
53528
53583
|
capScope: "system",
|
|
@@ -65196,7 +65251,9 @@ function createSystemProxy(api) {
|
|
|
65196
65251
|
notificationOutput: {
|
|
65197
65252
|
listTargetKinds: (input) => dispatch("notificationOutput", "listTargetKinds", "query", input),
|
|
65198
65253
|
listTargets: (input) => dispatch("notificationOutput", "listTargets", "query", input),
|
|
65254
|
+
getTarget: (input) => dispatch("notificationOutput", "getTarget", "query", input),
|
|
65199
65255
|
discoverTargets: (input) => dispatch("notificationOutput", "discoverTargets", "query", input),
|
|
65256
|
+
probeTargetConfig: (input) => dispatch("notificationOutput", "probeTargetConfig", "mutation", input),
|
|
65200
65257
|
send: (input) => dispatch("notificationOutput", "send", "mutation", input),
|
|
65201
65258
|
testTarget: (input) => dispatch("notificationOutput", "testTarget", "mutation", input),
|
|
65202
65259
|
upsertTarget: (input) => dispatch("notificationOutput", "upsertTarget", "mutation", input),
|
|
@@ -68930,6 +68987,34 @@ function sendTimesOfSchedule(schedule) {
|
|
|
68930
68987
|
}
|
|
68931
68988
|
return times;
|
|
68932
68989
|
}
|
|
68990
|
+
/**
|
|
68991
|
+
* Punctual times for a `mode: 'times'` editor.
|
|
68992
|
+
*
|
|
68993
|
+
* Exact one-minute windows win. Otherwise each window's END is the fire time
|
|
68994
|
+
* (summary delivery fires when a window closes) — so a legacy 17:00→18:00 band
|
|
68995
|
+
* authored as a range still opens as a single "At 18:00" row instead of two
|
|
68996
|
+
* clocks. `null` only when inverted (cannot map to punctual rows).
|
|
68997
|
+
*/
|
|
68998
|
+
function sendTimesForEditor(schedule) {
|
|
68999
|
+
const exact = sendTimesOfSchedule(schedule);
|
|
69000
|
+
if (exact !== null) return {
|
|
69001
|
+
times: exact,
|
|
69002
|
+
approximated: false
|
|
69003
|
+
};
|
|
69004
|
+
if (schedule.invert === true) return null;
|
|
69005
|
+
const times = [];
|
|
69006
|
+
for (const window of schedule.windows) {
|
|
69007
|
+
const days = window.endMinute === 0 ? window.days.map((day) => (day + 1) % 7) : window.days;
|
|
69008
|
+
times.push({
|
|
69009
|
+
days: days.toSorted((a, b) => a - b),
|
|
69010
|
+
minute: window.endMinute
|
|
69011
|
+
});
|
|
69012
|
+
}
|
|
69013
|
+
return {
|
|
69014
|
+
times,
|
|
69015
|
+
approximated: times.length > 0
|
|
69016
|
+
};
|
|
69017
|
+
}
|
|
68933
69018
|
var SUMMARY_CONTENT_VAR = /\{\{\s*summary(?:Text|Devices|Streams|Battery|Consumables|Tanks|Detection|Nodes|Addons|Updates)\s*\}\}/;
|
|
68934
69019
|
/**
|
|
68935
69020
|
* Does a custom BODY carry the summary's content (`{{summaryText}}` or a
|
|
@@ -73085,6 +73170,7 @@ exports.PrivacyMaskPatchSchema = PrivacyMaskPatchSchema;
|
|
|
73085
73170
|
exports.PrivacyMaskRegionSchema = PrivacyMaskRegionSchema;
|
|
73086
73171
|
exports.PrivacyMaskShapeSchema = PrivacyMaskShapeSchema;
|
|
73087
73172
|
exports.PrivacyMaskStatusSchema = PrivacyMaskStatusSchema;
|
|
73173
|
+
exports.ProbeTargetConfigResultSchema = ProbeTargetConfigResultSchema;
|
|
73088
73174
|
exports.ProfileRtspEntrySchema = require_sleep.ProfileRtspEntrySchema;
|
|
73089
73175
|
exports.ProfileSlotSchema = require_sleep.ProfileSlotSchema;
|
|
73090
73176
|
exports.ProfileSlotStatusSchema = require_sleep.ProfileSlotStatusSchema;
|
|
@@ -74038,6 +74124,7 @@ exports.scriptRunnerCapability = scriptRunnerCapability;
|
|
|
74038
74124
|
exports.searchDisplayIcons = searchDisplayIcons;
|
|
74039
74125
|
exports.secureActuationFor = secureActuationFor;
|
|
74040
74126
|
exports.selectAssignedProfileSlots = require_sleep.selectAssignedProfileSlots;
|
|
74127
|
+
exports.sendTimesForEditor = sendTimesForEditor;
|
|
74041
74128
|
exports.sendTimesOfSchedule = sendTimesOfSchedule;
|
|
74042
74129
|
exports.sensorRaisedOf = sensorRaisedOf;
|
|
74043
74130
|
exports.sensorTransitionNeverFires = sensorTransitionNeverFires;
|