@camstack/types 1.2.379 → 1.2.381

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 (45) hide show
  1. package/dist/addon.d.ts +3 -0
  2. package/dist/addon.js +67 -2
  3. package/dist/addon.mjs +5 -3
  4. package/dist/capabilities/caller-stamp.d.ts +12 -0
  5. package/dist/capabilities/index.d.ts +7 -2
  6. package/dist/capabilities/record-entries.cap.d.ts +84 -0
  7. package/dist/capabilities/records.cap.d.ts +399 -0
  8. package/dist/capabilities/storage-admin.cap.d.ts +268 -0
  9. package/dist/client.js +57 -32
  10. package/dist/client.mjs +57 -32
  11. package/dist/device/device-context.d.ts +2 -0
  12. package/dist/ffmpeg/fmp4-fragment-child.d.ts +2 -2
  13. package/dist/ffmpeg/process.d.ts +21 -0
  14. package/dist/generated/addon-api.d.ts +191 -0
  15. package/dist/generated/cap-input-defaults.d.ts +1 -1
  16. package/dist/generated/capability-router-map.d.ts +8 -2
  17. package/dist/generated/method-access-map.d.ts +1 -1
  18. package/dist/generated/method-device-selectors.d.ts +2 -2
  19. package/dist/generated/system-proxy.d.ts +2 -0
  20. package/dist/helpers/addon-slice-handle.d.ts +4 -0
  21. package/dist/helpers/trpc-leaf.d.ts +17 -0
  22. package/dist/index.d.ts +3 -1
  23. package/dist/index.js +724 -32
  24. package/dist/index.mjs +646 -33
  25. package/dist/interfaces/addon-peer-bytes.d.ts +19 -2
  26. package/dist/interfaces/addon.d.ts +13 -0
  27. package/dist/interfaces/config-ui.d.ts +4 -0
  28. package/dist/interfaces/event-bus.d.ts +32 -3
  29. package/dist/interfaces/storage.d.ts +1 -1
  30. package/dist/node.d.ts +2 -2
  31. package/dist/node.js +4 -0
  32. package/dist/node.mjs +4 -1
  33. package/dist/records/constants.d.ts +23 -0
  34. package/dist/records/entry-kind.d.ts +31 -0
  35. package/dist/records/errors.d.ts +81 -0
  36. package/dist/records/in-memory-records.d.ts +21 -0
  37. package/dist/records/index.d.ts +9 -0
  38. package/dist/records/record-kind.d.ts +144 -0
  39. package/dist/records/records-access.d.ts +153 -0
  40. package/dist/records/secret-paths.d.ts +52 -0
  41. package/dist/records/settings-array-adopts-from.d.ts +12 -0
  42. package/dist/records/settings-brokers-adopts-from.d.ts +10 -0
  43. package/dist/{sleep-DQYi915G.js → sleep-D8yJVc4r.js} +1971 -290
  44. package/dist/{sleep-D-Q2_Mcd.mjs → sleep-bZIhUvjd.mjs} +1413 -128
  45. package/package.json +1 -1
@@ -39,6 +39,7 @@ import type { pipelineExecutorCapability } from '../capabilities/pipeline-execut
39
39
  import type { pipelineOrchestratorCapability } from '../capabilities/pipeline-orchestrator.cap.js';
40
40
  import type { pipelineRunnerCapability } from '../capabilities/pipeline-runner.cap.js';
41
41
  import type { plateGalleryCapability } from '../capabilities/plate-gallery.cap.js';
42
+ import type { recordEntriesCapability } from '../capabilities/record-entries.cap.js';
42
43
  import type { recordingArchiveCapability } from '../capabilities/recording-archive.cap.js';
43
44
  import type { recordingExportCapability } from '../capabilities/recording-export.cap.js';
44
45
  import type { serverManagementCapability } from '../capabilities/server-management.cap.js';
@@ -100,6 +101,7 @@ export interface SystemProxy {
100
101
  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' | 'getNodeInferenceDevices' | 'resetNodePipelineDefaults' | 'planAutoTune' | 'applyAutoTune' | 'setLoadBalancingShares' | 'getPlacementStats' | 'suggestShares' | 'getEffectiveShares' | 'setShareSource' | 'getNodeBenchmarkPreflight' | 'startNodeBenchmark' | 'getNodeBenchmarkStatus' | 'abortNodeBenchmark' | 'getNodeBenchmarkCandidates' | 'listNodeBenchmarkResults' | 'deleteNodeBenchmarkResult' | 'getCameraStatuses' | 'setCameraSensors' | 'reconcileFromDisk' | 'getReconcileFromDiskStatus'>;
101
102
  readonly pipelineRunner: Pick<InferProvider<typeof pipelineRunnerCapability>, 'attachCamera' | 'reportMotion' | 'getLocalLoad' | 'getLocalMetrics' | 'getAllCameraMetrics' | 'getLocalCameras' | 'getNativeCrop' | 'runStatelessStep' | 'startNodeBench' | 'getNodeBenchStatus' | 'abortNodeBench'>;
102
103
  readonly plateGallery: Pick<InferProvider<typeof plateGalleryCapability>, 'getPlateMedia' | 'searchPlates' | 'suggestPlateClusters' | 'correctPlateText' | 'deletePlate' | 'listVehicles' | 'createVehicle' | 'renameVehicle' | 'deleteVehicle' | 'listVehicleSamples' | 'removeVehicleSample' | 'assignPlate' | 'unassignPlate' | 'assignPlates' | 'unassignPlates'>;
104
+ readonly recordEntries: Pick<InferProvider<typeof recordEntriesCapability>, 'listEntryKinds' | 'listEntries' | 'putEntry' | 'deleteEntry'>;
103
105
  readonly recordingArchive: Pick<InferProvider<typeof recordingArchiveCapability>, 'getAvailabilityBatch' | 'getDaysWithRecordingsBatch' | 'getStorageUsage' | 'listOpsLog' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'refreshStorageLocationsForMigration' | 'startStorageMigrationMove' | 'getStorageMigrationMoveStatus' | 'cancelStorageMigrationMove' | 'relocateFootage' | 'listRelocateJobs' | 'getRelocateResidue' | 'reconcileLedgerAgainstDisk' | 'cancelRelocateJob' | 'planStorageRebalance' | 'startStorageRebalance' | 'getPlacement' | 'setDevicePlacement'>;
104
106
  readonly recordingExport: Pick<InferProvider<typeof recordingExportCapability>, 'createExport' | 'getExport' | 'cancelExport' | 'deleteExport' | 'getDownloadUrl' | 'readExportBytes'>;
105
107
  readonly serverManagement: Pick<InferProvider<typeof serverManagementCapability>, 'getServerPackageStatus' | 'checkServerUpdate' | 'applyServerUpdate' | 'rollbackServerUpdate' | 'restartServer'>;
@@ -0,0 +1,4 @@
1
+ import type { SliceHandleApi } from '../device/device-state-handle.js';
2
+ import type { AddonApi } from '../generated/addon-api.js';
3
+ /** Structural bridge: every `AddonApi` client carries `deviceState` (+ optional `live`). */
4
+ export declare function addonSliceHandleApi(api: AddonApi): SliceHandleApi;
@@ -0,0 +1,17 @@
1
+ import type { AddonApi } from '../generated/addon-api.js';
2
+ /** tRPC client procedure bundle (`query` / `mutate` / `subscribe`). */
3
+ export interface TrpcProcedureLeaf {
4
+ readonly query?: (input?: unknown) => unknown;
5
+ readonly mutate?: (input?: unknown) => unknown;
6
+ readonly subscribe?: (input?: unknown, push?: unknown) => unknown;
7
+ }
8
+ export declare function isTrpcProcedureLeaf(value: unknown): value is TrpcProcedureLeaf;
9
+ export declare function readTrpcLeaf(api: AddonApi, capProp: string, method: string): TrpcProcedureLeaf;
10
+ export type TrpcDispatchKind = 'query' | 'mutation' | 'subscription';
11
+ /**
12
+ * Invoke `api.<capProp>.<method>.{query|mutate|subscribe}(input)`.
13
+ * `Result` is the generated proxy method's return. The leaf itself is only
14
+ * `unknown` (the client is a structural bag), so the assertion is the one
15
+ * boundary between that bag and the typed proxy.
16
+ */
17
+ export declare function invokeTrpcLeaf<Result>(api: AddonApi, capProp: string, method: string, kind: TrpcDispatchKind, input?: unknown, push?: unknown): Result;
package/dist/index.d.ts CHANGED
@@ -47,9 +47,10 @@ export type * from './interfaces/capability.js';
47
47
  export type * from './interfaces/config-port.js';
48
48
  export type * from './interfaces/config-ui.js';
49
49
  export type { HydratedFieldEntry } from './interfaces/config-ui.js';
50
- export { collectHydratedFieldEntries, collectHydratedFieldValues, hydrateSchema, resolveHydratedFieldValue, WELL_KNOWN_TAB_MAP, WELL_KNOWN_TABS, } from './interfaces/config-ui.js';
50
+ export { collectHydratedFieldEntries, collectHydratedFieldValues, dehydrateConfigField, dehydrateSchema, hydrateSchema, resolveHydratedFieldValue, WELL_KNOWN_TAB_MAP, WELL_KNOWN_TABS, } from './interfaces/config-ui.js';
51
51
  export { collectKeychainStoredKeys, collectSecretConfigKeys, isKeychainStoredField, isSecretConfigField, REDACTED_SECRET, schemaDeclaresAnyField, } from './interfaces/config-ui-secrets.js';
52
52
  export * from './keychain/index.js';
53
+ export * from './records/index.js';
53
54
  export * from './training/index.js';
54
55
  export * from './retrain-review.js';
55
56
  export { mergeSecretStatePaths, parseSecretStatePath, type SecretNode, type SecretTree, secretTreeFromPaths, secretTreeFromSchema, } from './addon/secret-paths.js';
@@ -189,6 +190,7 @@ export type { IDevice } from './device/device.js';
189
190
  export type { DeviceBinding, DeviceBindingEntry } from './device/device-binding.js';
190
191
  export { DeviceConfig } from './device/device-config.js';
191
192
  export type { DeviceConstructor, DeviceContext, DeviceManagerApi, DevicePersistConfigOptions, IDeviceRegistry, IDeviceRegistryReader, } from './device/device-context.js';
193
+ export { widenDeviceConstructor } from './device/device-context.js';
192
194
  export type { AccessoryControlInput, AccessoryControlKind, AccessoryControlPick, DeviceControlKind, SensorMapping, } from './device/device-control-resolution.js';
193
195
  export { DEVICE_TYPE_CONTROL_KIND, hasMotionTrigger, isNode, MOTION_TRIGGER_FEATURE, pickAccessoryControl, resolveDeviceControlKind, resolveMutate, SENSOR_FEATURES, SENSOR_MAP, } from './device/device-control-resolution.js';
194
196
  export type { DeviceDoAction, DeviceDoOpenArg } from './device/device-do-actions.js';