@camstack/types 1.2.386 → 1.2.388

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.
Files changed (41) hide show
  1. package/dist/addon.js +26 -16
  2. package/dist/addon.mjs +26 -16
  3. package/dist/auth/credential-scope.d.ts +37 -5
  4. package/dist/auth/principal-scope.d.ts +1 -1
  5. package/dist/capabilities/alarm-panel.cap.d.ts +10 -2
  6. package/dist/capabilities/capability-definition.d.ts +21 -3
  7. package/dist/capabilities/connectivity.cap.d.ts +10 -2
  8. package/dist/capabilities/device-history.cap.d.ts +195 -3
  9. package/dist/capabilities/dishwasher.cap.d.ts +17 -0
  10. package/dist/capabilities/enum-sensor.cap.d.ts +12 -2
  11. package/dist/capabilities/index.d.ts +6 -5
  12. package/dist/capabilities/llm.cap.d.ts +252 -309
  13. package/dist/capabilities/lock-control.cap.d.ts +9 -2
  14. package/dist/capabilities/log-destination.cap.d.ts +148 -19
  15. package/dist/capabilities/media-player.cap.d.ts +15 -2
  16. package/dist/capabilities/notification-rules.cap.d.ts +213 -13
  17. package/dist/capabilities/stream-params.cap.d.ts +24 -2
  18. package/dist/capabilities/user-management.cap.d.ts +4 -409
  19. package/dist/client.js +76 -11
  20. package/dist/client.mjs +76 -11
  21. package/dist/device/base-device.d.ts +34 -1
  22. package/dist/device/index.d.ts +2 -2
  23. package/dist/generated/addon-api.d.ts +548 -187
  24. package/dist/generated/cap-input-defaults.d.ts +1 -1
  25. package/dist/generated/collection-array-methods.d.ts +2 -2
  26. package/dist/generated/history-catalog.d.ts +1 -1
  27. package/dist/generated/method-access-map.d.ts +1 -1
  28. package/dist/generated/method-device-selectors.d.ts +2 -2
  29. package/dist/generated/system-proxy.d.ts +2 -2
  30. package/dist/index.d.ts +5 -3
  31. package/dist/index.js +861 -164
  32. package/dist/index.mjs +815 -162
  33. package/dist/interfaces/addon-data-plane.d.ts +4 -4
  34. package/dist/interfaces/addon-peer-bytes.d.ts +1 -1
  35. package/dist/interfaces/logging.d.ts +16 -1
  36. package/dist/notification/media-image.d.ts +67 -0
  37. package/dist/schemas/auth-records.d.ts +1 -1
  38. package/dist/schemas/user-preferences.d.ts +103 -0
  39. package/dist/{sleep-BxjU_fJM.mjs → sleep-BSuCCFjf.mjs} +34 -5
  40. package/dist/{sleep-BE7_6UnC.js → sleep-DKtoyk6X.js} +34 -5
  41. package/package.json +1 -1
@@ -11,7 +11,7 @@
11
11
  * Plain data, zero Zod: a forked runner must not import the schema barrel
12
12
  * (~144MB RSS per runner — D28).
13
13
  *
14
- * Coverage: 29 caps, 71 methods with defaults.
14
+ * Coverage: 29 caps, 72 methods with defaults.
15
15
  */
16
16
  export declare const CAP_INPUT_DEFAULTS: Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
17
17
  /**
@@ -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: 27 collection caps, 46 array methods.
11
+ * Coverage: 26 collection caps, 44 array methods.
12
12
  */
13
13
  export declare const COLLECTION_ARRAY_METHODS: Readonly<Record<string, readonly string[]>>;
14
14
  /**
@@ -21,7 +21,7 @@ export declare function isCollectionArrayMethodName(capName: string, method: str
21
21
  * Per capability, the methods declared `optionalMethod` — the ones whose
22
22
  * ABSENCE on a provider is a fact about that provider, not a bug.
23
23
  *
24
- * Coverage: 1 caps, 4 methods.
24
+ * Coverage: 2 caps, 7 methods.
25
25
  */
26
26
  export declare const PROVIDER_OPTIONAL_METHODS: Readonly<Record<string, readonly string[]>>;
27
27
  /**
@@ -1,7 +1,7 @@
1
1
  import type { CapabilityHistoryField } from '../capabilities/capability-definition.js';
2
2
  /**
3
3
  * Cap history catalog, projected from every `*.cap.ts` `history` block.
4
- * 34 caps with series (62 series), 37 caps answered `'none'`.
4
+ * 40 caps with series (77 series), 31 caps answered `'none'`.
5
5
  * Field keys are `runtimeState` paths (`a.b` into fixed objects only).
6
6
  */
7
7
  export declare const HISTORY_CATALOG: Readonly<Record<string, Readonly<Record<string, CapabilityHistoryField>>>>;
@@ -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: 1386 method paths across 179 capabilities.
9
+ * Coverage: 1384 method paths across 179 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -6,8 +6,8 @@
6
6
  * system-scope cap that takes a deviceId was previously never device-filtered
7
7
  * — see the generator header).
8
8
  *
9
- * Coverage: 550 methods carry a device reference, of which
10
- * 179 are on SYSTEM-scope caps.
9
+ * Coverage: 551 methods carry a device reference, of which
10
+ * 180 are on SYSTEM-scope caps.
11
11
  *
12
12
  * Top-level fields, number arrays, and one-level arrays of objects carrying
13
13
  * a numeric device field (targets[].deviceId) are all mapped; the matcher
@@ -78,7 +78,7 @@ export interface SystemProxy {
78
78
  readonly deviceAdoption: Pick<InferProvider<typeof deviceAdoptionCapability>, 'listCandidateFilters' | 'listCandidates' | 'getCandidate' | 'refresh' | 'adopt' | 'release' | 'resync'>;
79
79
  readonly deviceCredentials: Pick<InferProvider<typeof deviceCredentialsCapability>, 'listDeviceCredentials' | 'startEnrollment' | 'revokeDeviceCredential' | 'getDeviceCertificateSettings' | 'setDeviceCertificateSettings' | 'deleteDeviceCredential' | 'getDeviceCaStatus' | 'renameDeviceCredential'>;
80
80
  readonly deviceExport: Pick<InferProvider<typeof deviceExportCapability>, 'getStatus' | 'listSupportedDeviceKinds' | 'listExposedDevices' | 'exposeDevice' | 'unexposeDevice'>;
81
- readonly deviceHistory: Pick<InferProvider<typeof deviceHistoryCapability>, 'listNodeSeries' | 'queryNode' | 'declareSeries' | 'record' | 'recordBuckets' | 'getStatus'>;
81
+ readonly deviceHistory: Pick<InferProvider<typeof deviceHistoryCapability>, 'listNodeSeries' | 'queryNode' | 'queryMany' | 'declareSeries' | 'record' | 'recordBuckets' | 'getStatus'>;
82
82
  readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'migrateDevice' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'getRoleDisplayDefaults' | 'setRoleDisplayDefaults' | 'listLocations' | 'addLocation' | 'removeLocation' | 'renameLocation' | 'listLocationIcons' | 'setLocationIcon' | 'listLocationDescriptions' | 'setLocationDescription' | 'listSiteZones' | 'setSiteZone' | 'removeSiteZone' | 'renameSiteZone' | 'setLocationZone' | 'listPersistedByAddon' | 'listAll' | 'getChildren' | 'getChildrenBatch' | 'getLinkedDevicesBatch' | 'listDeletedSince' | 'cleanupDeletedDevicesData' | 'removeByIntegration' | 'getBindingsBatch' | 'getAllBindings' | 'listDeviceIdsByCaps' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidateFilters' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionStartJob' | 'adoptionListJobs' | 'adoptionCancelJob' | 'adoptionResync' | 'discoveryProviders' | 'discoverAllProviders' | 'discoverProvider' | 'providerCreationType' | 'providerDiscoveryParamsSchema' | 'getDeviceStatusAggregateBatch'>;
83
83
  readonly deviceProvider: Pick<InferProvider<typeof deviceProviderCapability>, 'start' | 'stop' | 'getStatus' | 'getDevices' | 'reloadDevice' | 'supportsDiscovery' | 'discoverDevices' | 'getDiscoveryParamsSchema' | 'getManualCreationType' | 'adoptDiscoveredDevice' | 'supportsManualCreation' | 'getChildCreationSchema' | 'createDevice' | 'testCreationField'>;
84
84
  readonly deviceState: Pick<InferProvider<typeof deviceStateCapability>, 'getAllSnapshots' | 'listClaims'>;
@@ -114,7 +114,7 @@ export interface SystemProxy {
114
114
  readonly toast: Pick<InferProvider<typeof toastCapability>, 'onToast'>;
115
115
  readonly training: Pick<InferProvider<typeof trainingCapability>, 'listBaseModels' | 'planJob' | 'startJob' | 'startJobBatch' | 'listJobs' | 'getJob' | 'cancelJob' | 'getJobResult' | 'registerResult' | 'canaryResult' | 'rollbackCanary' | 'discardResult'>;
116
116
  readonly turnProvider: Pick<InferProvider<typeof turnProviderCapability>, 'getTurnServers'>;
117
- readonly userManagement: Pick<InferProvider<typeof userManagementCapability>, 'listUsers' | 'createUser' | 'updateUser' | 'deleteUser' | 'resetPassword' | 'setUserScopes' | 'validateCredentials' | 'listApiKeys' | 'revokeApiKey' | 'createScopedToken' | 'revokeScopedToken' | 'validateScopedToken' | 'listScopedTokens' | 'setupTotp' | 'confirmTotp' | 'disableTotp' | 'getTotpStatus' | 'migrateRawSecrets' | 'verifyTotp' | 'oauthIssueCode' | 'oauthExchangeCode' | 'oauthRefresh' | 'oauthVerifyAccessToken' | 'listExternalIdentities' | 'findUserByExternalIdentity' | 'unlinkExternalIdentity' | 'listOauthSessions' | 'revokeOauthSession'>;
117
+ readonly userManagement: Pick<InferProvider<typeof userManagementCapability>, 'listUsers' | 'createUser' | 'updateUser' | 'deleteUser' | 'resetPassword' | 'setUserScopes' | 'validateCredentials' | 'listApiKeys' | 'revokeApiKey' | 'setupTotp' | 'confirmTotp' | 'disableTotp' | 'getTotpStatus' | 'migrateRawSecrets' | 'verifyTotp' | 'oauthIssueCode' | 'oauthExchangeCode' | 'oauthRefresh' | 'oauthVerifyAccessToken' | 'listExternalIdentities' | 'findUserByExternalIdentity' | 'unlinkExternalIdentity' | 'listOauthSessions' | 'revokeOauthSession'>;
118
118
  }
119
119
  /**
120
120
  * Build a `SystemProxy` that dispatches every namespace method through
package/dist/index.d.ts CHANGED
@@ -151,7 +151,8 @@ export type { AvailableEngine, PipelineAddonSchema, PipelineDefaultStep, Pipelin
151
151
  export * from './types/pipeline-step.js';
152
152
  export * from './types/tracked.js';
153
153
  export { type BearerPayloadShape, type BearerPrincipal, classifyBearerPrincipal, methodAccessForHttpMethod, type PrincipalAddonReachInput, type PrincipalAddonReachVerdict, principalMayReachAddon, scopesAllowAddon, scopesAllowDeviceCap, } from './auth/principal-scope.js';
154
- export { ADMIN_SCOPE, ALL_METHOD_ACCESS, type AddonRoutesScope, AddonRoutesScopeSchema, capabilityScopesOf, CREDENTIAL_TOKEN_KIND, type CredentialScope, CredentialScopeSchema, type CredentialTokenClaims, CredentialTokenClaimsSchema, parseCredentialScopes, SHARE_VIEW_MAX_DEVICES, scopesAllowAddonRoutes, scopesGrantAdmin, type ShareViewGrant, ShareViewGrantSchema, type ShareViewScope, ShareViewScopeSchema, shareViewGrantOf, } from './auth/credential-scope.js';
154
+ export { ADMIN_SCOPE, ALL_METHOD_ACCESS, type AddonRoutesScope, AddonRoutesScopeSchema, capabilityScopesOf, CREDENTIAL_TOKEN_AUDIENCE, CREDENTIAL_TOKEN_KIND, isCredentialTokenPayload, type CredentialScope, CredentialScopeSchema, type CredentialTokenClaims, CredentialTokenClaimsSchema, parseCredentialScopes, PREFERENCES_SELF_SCOPE, type PreferencesSelfScope, PreferencesSelfScopeSchema, SHARE_VIEW_MAX_DEVICES, scopesAllowAddonRoutes, scopesAllowOwnPreferences, scopesGrantAdmin, type ShareViewGrant, ShareViewGrantSchema, type ShareViewScope, ShareViewScopeSchema, shareViewGrantOf, } from './auth/credential-scope.js';
155
+ export { type PreferenceNamespace, PreferenceNamespaceSchema, type PreferenceRow, PreferenceRowSchema, type PreferenceValue, PreferenceValueSchema, PreferenceDeviceIdSchema, type PreferencesChangedSinceInput, PreferencesChangedSinceInputSchema, type PreferencesChangedSinceOutput, PreferencesChangedSinceOutputSchema, type PreferencesDeleteInput, PreferencesDeleteInputSchema, type PreferencesDeleteOutput, PreferencesDeleteOutputSchema, type PreferencesGetInput, PreferencesGetInputSchema, type PreferencesGetOutput, PreferencesGetOutputSchema, type PreferencesPutInput, PreferencesPutInputSchema, type PreferencesPutOutput, PreferencesPutOutputSchema, PREFERENCES_MAX_DEVICE_ID_LENGTH, PREFERENCES_MAX_NAMESPACES, PREFERENCES_MAX_VALUE_BYTES, PREFERENCES_NAMESPACE_PATTERN, } from './schemas/user-preferences.js';
155
156
  export { APP_AUTH_CALLBACK_MAX_LENGTH, APP_AUTH_CALLBACK_URLS, canonicalizeAppCallback, hasUrlScheme, parseAppAuthCallback, } from './auth/app-callback.js';
156
157
  export { APP_FLOW_DEFAULT_REDIRECT, APP_FLOW_REFUSAL_MESSAGES, APP_FLOW_STATE_PREFIX, APP_REFUSED_PATH, APP_START_REFUSAL_MESSAGES, type AppFlowParse, type AppFlowPurpose, AppFlowPurposeSchema, type AppFlowRefusal, type AppFlowRequest, type AppPageLang, AppPageLangSchema, type AppLoginPath, AppLoginPathSchema, type AppStartRefusal, appFlowLocation, isAppStartRefusal, parseAppFlowRequest, parseAppPageLang, } from './auth/app-flow.js';
157
158
  export { SSO_STATE_COOKIE, SSO_STATE_COOKIE_MAX_AGE_SEC } from './auth/sso-state.js';
@@ -174,8 +175,8 @@ export { DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, evaluateSensorEdge, evaluateSensor
174
175
  export * from './constants.js';
175
176
  export type { AccessoryKindValue } from './device/accessory.js';
176
177
  export { ACCESSORY_LABEL, AccessoryKind, accessoryStableId, } from './device/accessory.js';
177
- export type { AccessoryChildSpec } from './device/base-device.js';
178
- export { BaseDevice } from './device/base-device.js';
178
+ export type { AccessoryChildrenAnswer, AccessoryChildrenComplete, AccessoryChildrenRead, AccessoryChildrenUnknown, AccessoryChildSpec, } from './device/base-device.js';
179
+ export { accessoryChildrenComplete, accessoryChildrenUnknown, BaseDevice, } from './device/base-device.js';
179
180
  export type { DeviceRestoreReport, DeviceSummary, DiscoveryCandidate, FieldProbeResult, } from './device/base-device-provider.js';
180
181
  export { BaseDeviceProvider, toDeviceSummary } from './device/base-device-provider.js';
181
182
  export type { BatteryPresence, BatteryPresenceInput } from './device/battery-presence.js';
@@ -260,6 +261,7 @@ export { isAudioClassName, isBaseConditionKey, knownValues, NC_BASE_CONDITION_KE
260
261
  export { type PreparedAction, type PreparedAttachment, type PreparedNotification, prepareNotification, type ResolvedLevel, } from './notification/degrade-engine.js';
261
262
  export { htmlToText, markdownToHtmlLite, markdownToText, type NotificationFormat as NotificationBodyFormat, resolveFormat, textToHtml, transcodeBody, } from './notification/format-transcode.js';
262
263
  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';
264
+ export { imageModesForKind, legacyImageMode, NC_MEDIA_IMAGE_MODES, type NcMediaRuleSubject, ncMediaPolicyError, normalizeNcMediaPolicy, resolveNcMediaImage, ruleTriggerZoneIds, } from './notification/media-image.js';
263
265
  export { isScheduleActive } from './notification/schedule.js';
264
266
  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';
265
267
  export { alarmDeviceBlocksArming, alarmDeviceSecureOnArm, type AlarmDeviceBlocksInput, type AlarmDeviceSecureOnArmInput, type NcAlarmSecureActuation, secureActuationFor, } from './notification/alarm-controllable.js';