@camstack/types 1.2.295 → 1.2.297
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 +2 -1
- package/dist/addon.mjs +2 -1
- package/dist/capabilities/calendar-source.cap.d.ts +75 -0
- package/dist/capabilities/calendars.cap.d.ts +68 -0
- package/dist/capabilities/index.d.ts +8 -2
- package/dist/capabilities/notification-rules.cap.d.ts +241 -1
- package/dist/generated/addon-api.d.ts +52 -0
- package/dist/generated/capability-router-map.d.ts +10 -4
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +321 -14
- package/dist/index.mjs +300 -15
- package/dist/notification/alarm-controllable.d.ts +33 -0
- package/dist/notification/alarm-membership.d.ts +8 -1
- package/dist/notification/alarm-settings.d.ts +27 -6
- package/package.json +1 -1
|
@@ -22,6 +22,8 @@ import type { batteryCapability } from '../capabilities/battery.cap.js';
|
|
|
22
22
|
import type { brightnessCapability } from '../capabilities/brightness.cap.js';
|
|
23
23
|
import type { brokerCapability } from '../capabilities/broker.cap.js';
|
|
24
24
|
import type { buttonCapability } from '../capabilities/button.cap.js';
|
|
25
|
+
import type { calendarSourceCapability } from '../capabilities/calendar-source.cap.js';
|
|
26
|
+
import type { calendarsCapability } from '../capabilities/calendars.cap.js';
|
|
25
27
|
import type { cameraCredentialsCapability } from '../capabilities/camera-credentials.cap.js';
|
|
26
28
|
import type { cameraGridLayoutCapability } from '../capabilities/camera-grid-layout.cap.js';
|
|
27
29
|
import type { cameraStreamsCapability } from '../capabilities/camera-streams.cap.js';
|
|
@@ -1177,6 +1179,56 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
1177
1179
|
meta: object;
|
|
1178
1180
|
}>;
|
|
1179
1181
|
}>>;
|
|
1182
|
+
calendarSource: TRPCBuiltRouter<{
|
|
1183
|
+
ctx: TrpcContext;
|
|
1184
|
+
meta: object;
|
|
1185
|
+
errorShape: AugmentedErrorShape;
|
|
1186
|
+
transformer: true;
|
|
1187
|
+
}, TRPCDecorateCreateRouterOptions<{
|
|
1188
|
+
listCalendars: TRPCQueryProcedure<{
|
|
1189
|
+
input: {
|
|
1190
|
+
nodeId?: string | undefined;
|
|
1191
|
+
addonId?: string | undefined;
|
|
1192
|
+
} | undefined;
|
|
1193
|
+
output: z.infer<typeof calendarSourceCapability.methods.listCalendars.output>;
|
|
1194
|
+
meta: object;
|
|
1195
|
+
}>;
|
|
1196
|
+
listEvents: TRPCQueryProcedure<{
|
|
1197
|
+
input: {
|
|
1198
|
+
[x: string]: unknown;
|
|
1199
|
+
} & z.input<typeof calendarSourceCapability.methods.listEvents.input>;
|
|
1200
|
+
output: z.infer<typeof calendarSourceCapability.methods.listEvents.output>;
|
|
1201
|
+
meta: object;
|
|
1202
|
+
}>;
|
|
1203
|
+
}>>;
|
|
1204
|
+
calendars: TRPCBuiltRouter<{
|
|
1205
|
+
ctx: TrpcContext;
|
|
1206
|
+
meta: object;
|
|
1207
|
+
errorShape: AugmentedErrorShape;
|
|
1208
|
+
transformer: true;
|
|
1209
|
+
}, TRPCDecorateCreateRouterOptions<{
|
|
1210
|
+
listCalendars: TRPCQueryProcedure<{
|
|
1211
|
+
input: {
|
|
1212
|
+
nodeId?: string | undefined;
|
|
1213
|
+
} | undefined;
|
|
1214
|
+
output: z.infer<typeof calendarsCapability.methods.listCalendars.output>;
|
|
1215
|
+
meta: object;
|
|
1216
|
+
}>;
|
|
1217
|
+
listEvents: TRPCQueryProcedure<{
|
|
1218
|
+
input: {
|
|
1219
|
+
[x: string]: unknown;
|
|
1220
|
+
} & z.input<typeof calendarsCapability.methods.listEvents.input>;
|
|
1221
|
+
output: z.infer<typeof calendarsCapability.methods.listEvents.output>;
|
|
1222
|
+
meta: object;
|
|
1223
|
+
}>;
|
|
1224
|
+
importFromHomeAssistant: TRPCMutationProcedure<{
|
|
1225
|
+
input: {
|
|
1226
|
+
nodeId?: string | undefined;
|
|
1227
|
+
} | undefined;
|
|
1228
|
+
output: z.infer<typeof calendarsCapability.methods.importFromHomeAssistant.output>;
|
|
1229
|
+
meta: object;
|
|
1230
|
+
}>;
|
|
1231
|
+
}>>;
|
|
1180
1232
|
cameraCredentials: TRPCBuiltRouter<{
|
|
1181
1233
|
ctx: TrpcContext;
|
|
1182
1234
|
meta: object;
|
|
@@ -23,6 +23,8 @@ export { binaryCapability } from '../capabilities/binary.cap.js';
|
|
|
23
23
|
export { brightnessCapability } from '../capabilities/brightness.cap.js';
|
|
24
24
|
export { brokerCapability } from '../capabilities/broker.cap.js';
|
|
25
25
|
export { buttonCapability } from '../capabilities/button.cap.js';
|
|
26
|
+
export { calendarSourceCapability } from '../capabilities/calendar-source.cap.js';
|
|
27
|
+
export { calendarsCapability } from '../capabilities/calendars.cap.js';
|
|
26
28
|
export { cameraCredentialsCapability } from '../capabilities/camera-credentials.cap.js';
|
|
27
29
|
export { cameraGridLayoutCapability } from '../capabilities/camera-grid-layout.cap.js';
|
|
28
30
|
export { cameraPipelineConfigCapability } from '../capabilities/camera-pipeline-config.cap.js';
|
|
@@ -187,6 +189,8 @@ export declare const CAPABILITY_NAMES: {
|
|
|
187
189
|
readonly brightness: "brightness";
|
|
188
190
|
readonly broker: "broker";
|
|
189
191
|
readonly button: "button";
|
|
192
|
+
readonly calendarSource: "calendar-source";
|
|
193
|
+
readonly calendars: "calendars";
|
|
190
194
|
readonly cameraCredentials: "camera-credentials";
|
|
191
195
|
readonly cameraGridLayout: "camera-grid-layout";
|
|
192
196
|
readonly cameraPipelineConfig: "camera-pipeline-config";
|
|
@@ -364,6 +368,8 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
364
368
|
readonly brightness: TRouter;
|
|
365
369
|
readonly broker: TRouter;
|
|
366
370
|
readonly button: TRouter;
|
|
371
|
+
readonly calendarSource: TRouter;
|
|
372
|
+
readonly calendars: TRouter;
|
|
367
373
|
readonly cameraCredentials: TRouter;
|
|
368
374
|
readonly cameraGridLayout: TRouter;
|
|
369
375
|
readonly cameraPipelineConfig: TRouter;
|
|
@@ -503,12 +509,12 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
503
509
|
readonly zoneRules: TRouter;
|
|
504
510
|
readonly zones: TRouter;
|
|
505
511
|
}
|
|
506
|
-
/** Capability names whose mode is `singleton` (
|
|
507
|
-
export declare const SINGLETON_CAPABILITY_NAMES: readonly ["accessories", "addon-pages", "addon-settings", "addon-widgets", "addons", "admin-ui", "air-quality-sensor", "alarm-panel", "alerts", "ambient-light-sensor", "audio-analysis", "audio-analyzer", "audio-codec", "audio-metrics", "automation-control", "backup", "battery", "binary", "brightness", "button", "camera-credentials", "camera-grid-layout", "camera-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "composer", "connectivity", "consumables", "contact", "control", "core-blocks", "cover", "database-snapshot", "day-night", "decoder", "detection-pipeline", "device-admin-link", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "face-gallery", "fan-control", "feature-probe", "filesystem-browse", "flood", "gas", "humidifier", "humidity-sensor", "image", "image-settings", "integrations", "intercom", "lawn-mower-control", "llm-runtime", "local-network", "lock-control", "media-player", "metrics-provider", "model-convert", "model-distributor", "motion", "motion-detection", "motion-trigger", "motion-zones", "native-object-detection", "navigation", "network-link", "network-quality", "nodes", "notification-rules", "notifier", "numeric-sensor", "osd", "osd-manager", "pet-feeder", "pipeline-analytics", "pipeline-executor", "pipeline-orchestrator", "pipeline-runner", "plate-gallery", "platform-probe", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "reboot", "recording-archive", "recording-export", "recording-onboard", "recording-signal", "scene-monitor", "script-runner", "server-management", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "storage-migration", "stream-broker", "stream-catalog", "stream-params", "stream-signals", "switch", "system", "tamper", "temperature-sensor", "terminal-session", "toast", "update", "user-management", "vacuum-control", "valve", "vector-store", "vibration", "viewer-ui", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
|
|
512
|
+
/** Capability names whose mode is `singleton` (133 caps). */
|
|
513
|
+
export declare const SINGLETON_CAPABILITY_NAMES: readonly ["accessories", "addon-pages", "addon-settings", "addon-widgets", "addons", "admin-ui", "air-quality-sensor", "alarm-panel", "alerts", "ambient-light-sensor", "audio-analysis", "audio-analyzer", "audio-codec", "audio-metrics", "automation-control", "backup", "battery", "binary", "brightness", "button", "calendars", "camera-credentials", "camera-grid-layout", "camera-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "composer", "connectivity", "consumables", "contact", "control", "core-blocks", "cover", "database-snapshot", "day-night", "decoder", "detection-pipeline", "device-admin-link", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "face-gallery", "fan-control", "feature-probe", "filesystem-browse", "flood", "gas", "humidifier", "humidity-sensor", "image", "image-settings", "integrations", "intercom", "lawn-mower-control", "llm-runtime", "local-network", "lock-control", "media-player", "metrics-provider", "model-convert", "model-distributor", "motion", "motion-detection", "motion-trigger", "motion-zones", "native-object-detection", "navigation", "network-link", "network-quality", "nodes", "notification-rules", "notifier", "numeric-sensor", "osd", "osd-manager", "pet-feeder", "pipeline-analytics", "pipeline-executor", "pipeline-orchestrator", "pipeline-runner", "plate-gallery", "platform-probe", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "reboot", "recording-archive", "recording-export", "recording-onboard", "recording-signal", "scene-monitor", "script-runner", "server-management", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "storage-migration", "stream-broker", "stream-catalog", "stream-params", "stream-signals", "switch", "system", "tamper", "temperature-sensor", "terminal-session", "toast", "update", "user-management", "vacuum-control", "valve", "vector-store", "vibration", "viewer-ui", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
|
|
508
514
|
/** Union of singleton capability names (literal string union). */
|
|
509
515
|
export type SingletonCapabilityName = typeof SINGLETON_CAPABILITY_NAMES[number];
|
|
510
|
-
/** Capability names whose mode is `collection` (
|
|
511
|
-
export declare const COLLECTION_CAPABILITY_NAMES: readonly ["addon-pages-source", "addon-routes", "addon-widgets-source", "auth-provider", "broker", "connection-test", "custom-model-registry", "data-store-provider", "device-export", "device-extension", "device-provider", "embedding-encoder", "failure-contribution", "llm", "load-contribution", "log-channels", "log-destination", "login-method", "mesh-network", "mqtt-broker", "network-access", "notification-output", "oauth-integration", "recording", "smtp-provider", "storage-evictable", "storage-occupancy", "storage-provider", "turn-provider", "user-passkeys", "videoclips"];
|
|
516
|
+
/** Capability names whose mode is `collection` (32 caps). */
|
|
517
|
+
export declare const COLLECTION_CAPABILITY_NAMES: readonly ["addon-pages-source", "addon-routes", "addon-widgets-source", "auth-provider", "broker", "calendar-source", "connection-test", "custom-model-registry", "data-store-provider", "device-export", "device-extension", "device-provider", "embedding-encoder", "failure-contribution", "llm", "load-contribution", "log-channels", "log-destination", "login-method", "mesh-network", "mqtt-broker", "network-access", "notification-output", "oauth-integration", "recording", "smtp-provider", "storage-evictable", "storage-occupancy", "storage-provider", "turn-provider", "user-passkeys", "videoclips"];
|
|
512
518
|
/** Union of collection capability names (literal string union). */
|
|
513
519
|
export type CollectionCapabilityName = typeof COLLECTION_CAPABILITY_NAMES[number];
|
|
514
520
|
/** Capability mode lookup at runtime — mirrors the `.cap.ts` definitions. */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
|
|
9
9
|
* forked runner. See docs/decisions/adr-0028.md.
|
|
10
10
|
*
|
|
11
|
-
* Coverage:
|
|
11
|
+
* Coverage: 25 collection caps, 41 array methods.
|
|
12
12
|
*/
|
|
13
13
|
export declare const COLLECTION_ARRAY_METHODS: Readonly<Record<string, readonly string[]>>;
|
|
14
14
|
/**
|
|
@@ -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: 1207 method paths across 165 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -9,6 +9,7 @@ import type { audioAnalyzerCapability } from '../capabilities/audio-analyzer.cap
|
|
|
9
9
|
import type { audioCodecCapability } from '../capabilities/audio-codec.cap.js';
|
|
10
10
|
import type { backupCapability } from '../capabilities/backup.cap.js';
|
|
11
11
|
import type { brokerCapability } from '../capabilities/broker.cap.js';
|
|
12
|
+
import type { calendarsCapability } from '../capabilities/calendars.cap.js';
|
|
12
13
|
import type { connectionTestCapability } from '../capabilities/connection-test.cap.js';
|
|
13
14
|
import type { coreBlocksCapability } from '../capabilities/core-blocks.cap.js';
|
|
14
15
|
import type { decoderCapability } from '../capabilities/decoder.cap.js';
|
|
@@ -64,6 +65,7 @@ export interface SystemProxy {
|
|
|
64
65
|
readonly audioCodec: Pick<InferProvider<typeof audioCodecCapability>, 'listSupportedCodecs' | 'canHandle' | 'createDecodeSession' | 'createEncodeSession' | 'closeSession' | 'pushEncodedFrame' | 'pullPcm' | 'pushPcm' | 'pullEncoded' | 'flushEncode' | 'listActiveSessions'>;
|
|
65
66
|
readonly backup: Pick<InferProvider<typeof backupCapability>, 'listDestinations' | 'trigger' | 'listRuns' | 'cancel' | 'list' | 'listLocations' | 'getEntries' | 'restore' | 'delete' | 'listArchives' | 'upsertDestinationPolicy' | 'previewSchedule' | 'listSchedules' | 'upsertSchedule' | 'deleteSchedule'>;
|
|
66
67
|
readonly broker: Pick<InferProvider<typeof brokerCapability>, 'list' | 'get' | 'listProviders' | 'add' | 'remove' | 'testConnection' | 'getSettings' | 'setSettings' | 'getBrokerConfig' | 'getSettingsSchema' | 'testSettings' | 'publish' | 'subscribe' | 'unsubscribe' | 'getState' | 'getStatus'>;
|
|
68
|
+
readonly calendars: Pick<InferProvider<typeof calendarsCapability>, 'listCalendars' | 'listEvents' | 'importFromHomeAssistant'>;
|
|
67
69
|
readonly connectionTest: Pick<InferProvider<typeof connectionTestCapability>, 'testSettings' | 'describeTest'>;
|
|
68
70
|
readonly coreBlocks: Pick<InferProvider<typeof coreBlocksCapability>, 'list' | 'get' | 'create' | 'update' | 'delete' | 'setEnabled' | 'restart' | 'compile' | 'getTypeDefs' | 'createComposition' | 'updateComposition' | 'getComposition' | 'listCompositions' | 'getCustomization' | 'listComposableCaps' | 'validateComposition'>;
|
|
69
71
|
readonly decoder: Pick<InferProvider<typeof decoderCapability>, 'supportsCodec' | 'getInfo' | 'createSession' | 'destroySession' | 'pushPacket' | 'openStream' | 'pullFrames' | 'pullHandles' | 'getFrame' | 'getShmStats' | 'updateConfig' | 'getStats' | 'listActiveSessions' | 'reprobeHwaccel'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -238,8 +238,9 @@ export { type PreparedAction, type PreparedAttachment, type PreparedNotification
|
|
|
238
238
|
export { htmlToText, markdownToHtmlLite, markdownToText, type NotificationFormat as NotificationBodyFormat, resolveFormat, textToHtml, transcodeBody, } from './notification/format-transcode.js';
|
|
239
239
|
export { conditionExclusionReason, conditionVisibleForKind, defaultDeliveryForSection, droppedConditionsForKind, isAudioRule, isOccupancyRule, isSystemDelivery, isSystemRuleKind, kindsForDiscriminator, NC_AUDIO_SEED, NC_CAMERA_SCOPE_CAP_NAME, NC_OCCUPANCY_DEFAULTS, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_RULE_SECTIONS, NC_SYSTEM_DELIVERY, NC_SYSTEM_RULE_KINDS, type NcDroppedCondition, type NcKindVisibilitySubject, type NcRuleEditorSection, type NcRuleEditorSectionKey, type NcRuleKind, type NcRuleKindSpec, type NcRuleOwningSectionKey, type NcRuleSection, type NcRuleSectionKey, type NcRuleConditionsSubject, type NcRuleSectionSubject, type NcRuleSeed, parseRuleSection, ruleDeviceCompatCapNames, ruleDeviceCompatCapQueries, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleMatchesSection, ruleSection, ruleSectionOf, ruleSeedForSection, systemFamilyOfKind, systemRuleKindOf, } from './notification/rule-kinds.js';
|
|
240
240
|
export { isScheduleActive } from './notification/schedule.js';
|
|
241
|
-
export { NC_ALARM_OPENING_EVENT_KINDS, NC_SENSOR_TRANSITION_NEVER_FIRES_WARNING, type NcAlarmMembershipSubject, type NcAlarmOpeningEventKind, ruleBelongsToAlarm, sensorTransitionNeverFires, } from './notification/alarm-membership.js';
|
|
242
|
-
export {
|
|
241
|
+
export { isAlarmControllableCap, NC_ALARM_CONTROLLABLE_CAPS, NC_ALARM_OPENING_EVENT_KINDS, NC_SENSOR_TRANSITION_NEVER_FIRES_WARNING, type NcAlarmControllableCap, type NcAlarmMembershipSubject, type NcAlarmOpeningEventKind, ruleBelongsToAlarm, sensorTransitionNeverFires, } from './notification/alarm-membership.js';
|
|
242
|
+
export { alarmDeviceBlocksArming, alarmDeviceSecureOnArm, type AlarmDeviceBlocksInput, type AlarmDeviceSecureOnArmInput, type NcAlarmSecureActuation, secureActuationFor, } from './notification/alarm-controllable.js';
|
|
243
|
+
export { alarmPatchLanded, applyBlockingEdit, applyModeDelaysEdits, applyModeDeviceListEdit, applyNonBlockingEdit, applySecureOnArmEdit, NC_ALARM_DELAY_FIELDS, type NcAlarmDelayField, type NcAlarmDelaySettings, type NcAlarmDelaySource, type NcAlarmModeDeviceListEditResult, type NcAlarmNonBlockingEditResult, type NcAlarmResolvedDelays, resolveModeDelays, } from './notification/alarm-settings.js';
|
|
243
244
|
export { NC_SENSOR_RAISED_FIELD_BY_KIND, NC_SENSOR_TRANSITION_KINDS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, sensorRaisedOf, sensorTransitionOffered, } from './notification/sensor-raised.js';
|
|
244
245
|
export { NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, isHeldBackTemplateVar, isKnownTemplateVar, servedTemplateVars, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, templateVarsFor, } from './notification/template-vars.js';
|
|
245
246
|
export { NC_SYSTEM_EVENT_FILTER_KEYS, type NcSystemEventFilterKey, systemEventFilterApplies, systemEventFilterAppliesToAnyKind, } from './notification/system-event-filters.js';
|