@camstack/types 1.2.20 → 1.2.22

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.
@@ -30,6 +30,7 @@ import type { consumablesCapability } from '../capabilities/consumables.cap.js';
30
30
  import type { controlCapability } from '../capabilities/control.cap.js';
31
31
  import type { coverCapability } from '../capabilities/cover.cap.js';
32
32
  import type { customModelRegistryCapability } from '../capabilities/custom-model-registry.cap.js';
33
+ import type { dataStoreProviderCapability } from '../capabilities/data-store-provider.cap.js';
33
34
  import type { dayNightCapability } from '../capabilities/day-night.cap.js';
34
35
  import type { decoderCapability } from '../capabilities/decoder.cap.js';
35
36
  import type { deviceAdoptionCapability } from '../capabilities/device-adoption.cap.js';
@@ -1453,6 +1454,105 @@ export type AppRouter = TrpcCoreRouter<{
1453
1454
  meta: object;
1454
1455
  }>;
1455
1456
  }>>;
1457
+ dataStoreProvider: TRPCBuiltRouter<{
1458
+ ctx: TrpcContext;
1459
+ meta: object;
1460
+ errorShape: AugmentedErrorShape;
1461
+ transformer: true;
1462
+ }, TRPCDecorateCreateRouterOptions<{
1463
+ getEngineInfo: TRPCQueryProcedure<{
1464
+ input: {
1465
+ nodeId?: string | undefined;
1466
+ addonId?: string | undefined;
1467
+ } | undefined;
1468
+ output: z.infer<typeof dataStoreProviderCapability.methods.getEngineInfo.output>;
1469
+ meta: object;
1470
+ }>;
1471
+ get: TRPCQueryProcedure<{
1472
+ input: {
1473
+ [x: string]: unknown;
1474
+ } & z.input<typeof dataStoreProviderCapability.methods.get.input>;
1475
+ output: z.infer<typeof dataStoreProviderCapability.methods.get.output>;
1476
+ meta: object;
1477
+ }>;
1478
+ set: TRPCMutationProcedure<{
1479
+ input: {
1480
+ [x: string]: unknown;
1481
+ } & z.input<typeof dataStoreProviderCapability.methods.set.input>;
1482
+ output: z.infer<typeof dataStoreProviderCapability.methods.set.output>;
1483
+ meta: object;
1484
+ }>;
1485
+ query: TRPCQueryProcedure<{
1486
+ input: {
1487
+ [x: string]: unknown;
1488
+ } & z.input<typeof dataStoreProviderCapability.methods.query.input>;
1489
+ output: z.infer<typeof dataStoreProviderCapability.methods.query.output>;
1490
+ meta: object;
1491
+ }>;
1492
+ insert: TRPCMutationProcedure<{
1493
+ input: {
1494
+ [x: string]: unknown;
1495
+ } & z.input<typeof dataStoreProviderCapability.methods.insert.input>;
1496
+ output: z.infer<typeof dataStoreProviderCapability.methods.insert.output>;
1497
+ meta: object;
1498
+ }>;
1499
+ update: TRPCMutationProcedure<{
1500
+ input: {
1501
+ [x: string]: unknown;
1502
+ } & z.input<typeof dataStoreProviderCapability.methods.update.input>;
1503
+ output: z.infer<typeof dataStoreProviderCapability.methods.update.output>;
1504
+ meta: object;
1505
+ }>;
1506
+ delete: TRPCMutationProcedure<{
1507
+ input: {
1508
+ [x: string]: unknown;
1509
+ } & z.input<typeof dataStoreProviderCapability.methods.delete.input>;
1510
+ output: z.infer<typeof dataStoreProviderCapability.methods.delete.output>;
1511
+ meta: object;
1512
+ }>;
1513
+ deleteWhere: TRPCMutationProcedure<{
1514
+ input: {
1515
+ [x: string]: unknown;
1516
+ } & z.input<typeof dataStoreProviderCapability.methods.deleteWhere.input>;
1517
+ output: z.infer<typeof dataStoreProviderCapability.methods.deleteWhere.output>;
1518
+ meta: object;
1519
+ }>;
1520
+ updateWhere: TRPCMutationProcedure<{
1521
+ input: {
1522
+ [x: string]: unknown;
1523
+ } & z.input<typeof dataStoreProviderCapability.methods.updateWhere.input>;
1524
+ output: z.infer<typeof dataStoreProviderCapability.methods.updateWhere.output>;
1525
+ meta: object;
1526
+ }>;
1527
+ count: TRPCQueryProcedure<{
1528
+ input: {
1529
+ [x: string]: unknown;
1530
+ } & z.input<typeof dataStoreProviderCapability.methods.count.input>;
1531
+ output: z.infer<typeof dataStoreProviderCapability.methods.count.output>;
1532
+ meta: object;
1533
+ }>;
1534
+ histogram: TRPCQueryProcedure<{
1535
+ input: {
1536
+ [x: string]: unknown;
1537
+ } & z.input<typeof dataStoreProviderCapability.methods.histogram.input>;
1538
+ output: z.infer<typeof dataStoreProviderCapability.methods.histogram.output>;
1539
+ meta: object;
1540
+ }>;
1541
+ isEmpty: TRPCQueryProcedure<{
1542
+ input: {
1543
+ [x: string]: unknown;
1544
+ } & z.input<typeof dataStoreProviderCapability.methods.isEmpty.input>;
1545
+ output: z.infer<typeof dataStoreProviderCapability.methods.isEmpty.output>;
1546
+ meta: object;
1547
+ }>;
1548
+ declareCollection: TRPCMutationProcedure<{
1549
+ input: {
1550
+ [x: string]: unknown;
1551
+ } & z.input<typeof dataStoreProviderCapability.methods.declareCollection.input>;
1552
+ output: z.infer<typeof dataStoreProviderCapability.methods.declareCollection.output>;
1553
+ meta: object;
1554
+ }>;
1555
+ }>>;
1456
1556
  dayNight: TRPCBuiltRouter<{
1457
1557
  ctx: TrpcContext;
1458
1558
  meta: object;
@@ -5994,6 +6094,20 @@ export type AppRouter = TrpcCoreRouter<{
5994
6094
  output: z.infer<typeof settingsStoreCapability.methods.delete.output>;
5995
6095
  meta: object;
5996
6096
  }>;
6097
+ deleteWhere: TRPCMutationProcedure<{
6098
+ input: {
6099
+ [x: string]: unknown;
6100
+ } & z.input<typeof settingsStoreCapability.methods.deleteWhere.input>;
6101
+ output: z.infer<typeof settingsStoreCapability.methods.deleteWhere.output>;
6102
+ meta: object;
6103
+ }>;
6104
+ updateWhere: TRPCMutationProcedure<{
6105
+ input: {
6106
+ [x: string]: unknown;
6107
+ } & z.input<typeof settingsStoreCapability.methods.updateWhere.input>;
6108
+ output: z.infer<typeof settingsStoreCapability.methods.updateWhere.output>;
6109
+ meta: object;
6110
+ }>;
5997
6111
  count: TRPCQueryProcedure<{
5998
6112
  input: {
5999
6113
  [x: string]: unknown;
@@ -7699,228 +7813,6 @@ export type AppRouter = TrpcCoreRouter<{
7699
7813
  meta: object;
7700
7814
  }>;
7701
7815
  }>;
7702
- settingsBackend: import("@trpc/server/unstable-core-do-not-import").Router<{
7703
- ctx: any;
7704
- meta: object;
7705
- errorShape: AugmentedErrorShape;
7706
- transformer: true;
7707
- }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
7708
- get: import("@trpc/server").TRPCQueryProcedure<{
7709
- input: {
7710
- collection: string;
7711
- key: string;
7712
- };
7713
- output: {
7714
- value: unknown;
7715
- };
7716
- meta: object;
7717
- }>;
7718
- set: import("@trpc/server").TRPCMutationProcedure<{
7719
- input: {
7720
- collection: string;
7721
- key: string;
7722
- value: unknown;
7723
- };
7724
- output: {
7725
- success: true;
7726
- };
7727
- meta: object;
7728
- }>;
7729
- query: import("@trpc/server").TRPCQueryProcedure<{
7730
- input: {
7731
- collection: string;
7732
- filter?: {
7733
- where?: Record<string, unknown> | undefined;
7734
- whereIn?: Record<string, unknown[]> | undefined;
7735
- whereBetween?: Record<string, [unknown, unknown]> | undefined;
7736
- orderBy?: {
7737
- field: string;
7738
- direction: "asc" | "desc";
7739
- } | undefined;
7740
- limit?: number | undefined;
7741
- offset?: number | undefined;
7742
- } | undefined;
7743
- };
7744
- output: {
7745
- records: {
7746
- id: string;
7747
- data: Record<string, unknown>;
7748
- }[];
7749
- };
7750
- meta: object;
7751
- }>;
7752
- insert: import("@trpc/server").TRPCMutationProcedure<{
7753
- input: {
7754
- collection: string;
7755
- record: {
7756
- id: string;
7757
- data: Record<string, unknown>;
7758
- };
7759
- };
7760
- output: {
7761
- success: true;
7762
- };
7763
- meta: object;
7764
- }>;
7765
- update: import("@trpc/server").TRPCMutationProcedure<{
7766
- input: {
7767
- collection: string;
7768
- id: string;
7769
- data: Record<string, unknown>;
7770
- };
7771
- output: {
7772
- success: true;
7773
- };
7774
- meta: object;
7775
- }>;
7776
- delete: import("@trpc/server").TRPCMutationProcedure<{
7777
- input: {
7778
- collection: string;
7779
- key: string;
7780
- };
7781
- output: {
7782
- success: true;
7783
- };
7784
- meta: object;
7785
- }>;
7786
- count: import("@trpc/server").TRPCQueryProcedure<{
7787
- input: {
7788
- collection: string;
7789
- filter?: {
7790
- where?: Record<string, unknown> | undefined;
7791
- whereIn?: Record<string, unknown[]> | undefined;
7792
- whereBetween?: Record<string, [unknown, unknown]> | undefined;
7793
- orderBy?: {
7794
- field: string;
7795
- direction: "asc" | "desc";
7796
- } | undefined;
7797
- limit?: number | undefined;
7798
- offset?: number | undefined;
7799
- } | undefined;
7800
- };
7801
- output: {
7802
- count: number;
7803
- };
7804
- meta: object;
7805
- }>;
7806
- isEmpty: import("@trpc/server").TRPCQueryProcedure<{
7807
- input: {
7808
- collection: string;
7809
- };
7810
- output: {
7811
- empty: boolean;
7812
- };
7813
- meta: object;
7814
- }>;
7815
- }>> & import("@trpc/server").TRPCDecorateCreateRouterOptions<{
7816
- get: import("@trpc/server").TRPCQueryProcedure<{
7817
- input: {
7818
- collection: string;
7819
- key: string;
7820
- };
7821
- output: {
7822
- value: unknown;
7823
- };
7824
- meta: object;
7825
- }>;
7826
- set: import("@trpc/server").TRPCMutationProcedure<{
7827
- input: {
7828
- collection: string;
7829
- key: string;
7830
- value: unknown;
7831
- };
7832
- output: {
7833
- success: true;
7834
- };
7835
- meta: object;
7836
- }>;
7837
- query: import("@trpc/server").TRPCQueryProcedure<{
7838
- input: {
7839
- collection: string;
7840
- filter?: {
7841
- where?: Record<string, unknown> | undefined;
7842
- whereIn?: Record<string, unknown[]> | undefined;
7843
- whereBetween?: Record<string, [unknown, unknown]> | undefined;
7844
- orderBy?: {
7845
- field: string;
7846
- direction: "asc" | "desc";
7847
- } | undefined;
7848
- limit?: number | undefined;
7849
- offset?: number | undefined;
7850
- } | undefined;
7851
- };
7852
- output: {
7853
- records: {
7854
- id: string;
7855
- data: Record<string, unknown>;
7856
- }[];
7857
- };
7858
- meta: object;
7859
- }>;
7860
- insert: import("@trpc/server").TRPCMutationProcedure<{
7861
- input: {
7862
- collection: string;
7863
- record: {
7864
- id: string;
7865
- data: Record<string, unknown>;
7866
- };
7867
- };
7868
- output: {
7869
- success: true;
7870
- };
7871
- meta: object;
7872
- }>;
7873
- update: import("@trpc/server").TRPCMutationProcedure<{
7874
- input: {
7875
- collection: string;
7876
- id: string;
7877
- data: Record<string, unknown>;
7878
- };
7879
- output: {
7880
- success: true;
7881
- };
7882
- meta: object;
7883
- }>;
7884
- delete: import("@trpc/server").TRPCMutationProcedure<{
7885
- input: {
7886
- collection: string;
7887
- key: string;
7888
- };
7889
- output: {
7890
- success: true;
7891
- };
7892
- meta: object;
7893
- }>;
7894
- count: import("@trpc/server").TRPCQueryProcedure<{
7895
- input: {
7896
- collection: string;
7897
- filter?: {
7898
- where?: Record<string, unknown> | undefined;
7899
- whereIn?: Record<string, unknown[]> | undefined;
7900
- whereBetween?: Record<string, [unknown, unknown]> | undefined;
7901
- orderBy?: {
7902
- field: string;
7903
- direction: "asc" | "desc";
7904
- } | undefined;
7905
- limit?: number | undefined;
7906
- offset?: number | undefined;
7907
- } | undefined;
7908
- };
7909
- output: {
7910
- count: number;
7911
- };
7912
- meta: object;
7913
- }>;
7914
- isEmpty: import("@trpc/server").TRPCQueryProcedure<{
7915
- input: {
7916
- collection: string;
7917
- };
7918
- output: {
7919
- empty: boolean;
7920
- };
7921
- meta: object;
7922
- }>;
7923
- }>;
7924
7816
  eventBusProxy: import("@trpc/server/unstable-core-do-not-import").Router<{
7925
7817
  ctx: any;
7926
7818
  meta: object;
@@ -35,6 +35,7 @@ export { contactCapability } from '../capabilities/contact.cap.js';
35
35
  export { controlCapability } from '../capabilities/control.cap.js';
36
36
  export { coverCapability } from '../capabilities/cover.cap.js';
37
37
  export { customModelRegistryCapability } from '../capabilities/custom-model-registry.cap.js';
38
+ export { dataStoreProviderCapability } from '../capabilities/data-store-provider.cap.js';
38
39
  export { dayNightCapability } from '../capabilities/day-night.cap.js';
39
40
  export { decoderCapability } from '../capabilities/decoder.cap.js';
40
41
  export { detectionPipelineCapability } from '../capabilities/detection-pipeline.cap.js';
@@ -179,6 +180,7 @@ export declare const CAPABILITY_NAMES: {
179
180
  readonly control: "control";
180
181
  readonly cover: "cover";
181
182
  readonly customModelRegistry: "custom-model-registry";
183
+ readonly dataStoreProvider: "data-store-provider";
182
184
  readonly dayNight: "day-night";
183
185
  readonly decoder: "decoder";
184
186
  readonly detectionPipeline: "detection-pipeline";
@@ -336,6 +338,7 @@ export interface CapabilityRouterMap<TRouter = unknown> {
336
338
  readonly control: TRouter;
337
339
  readonly cover: TRouter;
338
340
  readonly customModelRegistry: TRouter;
341
+ readonly dataStoreProvider: TRouter;
339
342
  readonly dayNight: TRouter;
340
343
  readonly decoder: TRouter;
341
344
  readonly detectionPipeline: TRouter;
@@ -447,8 +450,8 @@ export interface CapabilityRouterMap<TRouter = unknown> {
447
450
  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-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "cover", "day-night", "decoder", "detection-pipeline", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "events", "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", "network-quality", "nodes", "notification-rules", "notifier", "numeric-sensor", "osd", "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", "recordingExport", "scene-monitor", "script-runner", "server-management", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "stream-broker", "stream-catalog", "stream-params", "switch", "system", "tamper", "temperature-sensor", "terminal-session", "toast", "update", "user-management", "vacuum-control", "valve", "vibration", "videoclips", "viewer-ui", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
448
451
  /** Union of singleton capability names (literal string union). */
449
452
  export type SingletonCapabilityName = typeof SINGLETON_CAPABILITY_NAMES[number];
450
- /** Capability names whose mode is `collection` (22 caps). */
451
- export declare const COLLECTION_CAPABILITY_NAMES: readonly ["addon-pages-source", "addon-routes", "addon-widgets-source", "auth-provider", "broker", "custom-model-registry", "device-export", "device-provider", "embedding-encoder", "llm", "log-destination", "login-method", "mesh-network", "mqtt-broker", "network-access", "notification-output", "oauth-integration", "smtp-provider", "storage-evictable", "storage-provider", "turn-provider", "user-passkeys"];
453
+ /** Capability names whose mode is `collection` (23 caps). */
454
+ export declare const COLLECTION_CAPABILITY_NAMES: readonly ["addon-pages-source", "addon-routes", "addon-widgets-source", "auth-provider", "broker", "custom-model-registry", "data-store-provider", "device-export", "device-provider", "embedding-encoder", "llm", "log-destination", "login-method", "mesh-network", "mqtt-broker", "network-access", "notification-output", "oauth-integration", "smtp-provider", "storage-evictable", "storage-provider", "turn-provider", "user-passkeys"];
452
455
  /** Union of collection capability names (literal string union). */
453
456
  export type CollectionCapabilityName = typeof COLLECTION_CAPABILITY_NAMES[number];
454
457
  /** 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: 16 collection caps, 28 array methods.
11
+ * Coverage: 17 collection caps, 30 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: 826 method paths across 117 capabilities.
9
+ * Coverage: 841 method paths across 118 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -85,7 +85,7 @@ export interface SystemProxy {
85
85
  readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage' | 'listOpsLog' | 'relocateFootage' | 'getRelocateStatus' | 'cancelRelocate'>;
86
86
  readonly recordingExport: Pick<InferProvider<typeof recordingExportCapability>, 'getExport' | 'cancelExport' | 'deleteExport' | 'getDownloadUrl'>;
87
87
  readonly serverManagement: Pick<InferProvider<typeof serverManagementCapability>, 'getServerPackageStatus' | 'checkServerUpdate' | 'applyServerUpdate' | 'rollbackServerUpdate' | 'restartServer'>;
88
- readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'insert' | 'update' | 'delete' | 'count' | 'histogram' | 'isEmpty' | 'declareCollection'>;
88
+ readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'insert' | 'update' | 'delete' | 'deleteWhere' | 'updateWhere' | 'count' | 'histogram' | 'isEmpty' | 'declareCollection'>;
89
89
  readonly storage: Pick<InferProvider<typeof storageCapability>, 'resolve' | 'write' | 'read' | 'exists' | 'list' | 'delete' | 'getAvailableSpace' | 'beginUpload' | 'writeChunk' | 'finalizeUpload' | 'abortUpload' | 'beginDownload' | 'readChunk' | 'endDownload' | 'listLocations' | 'getDefaultLocation' | 'listLocationDeclarations' | 'upsertLocation' | 'deleteLocation' | 'testLocation' | 'listProviders' | 'testConfig'>;
90
90
  readonly streamBroker: Pick<InferProvider<typeof streamBrokerCapability>, 'listAllCameraStreams' | 'listAllProfileSlots' | 'getBrokerStats' | 'probeStream' | 'listClients' | 'killClient' | 'getStreamUrl' | 'getStreamWithCodec' | 'releaseStreamWithCodec' | 'subscribeAudioChunks' | 'pullAudioChunks' | 'unsubscribeAudioChunks' | 'subscribeFrames' | 'pullFrameHandles' | 'unsubscribeFrames' | 'setPreBufferDuration' | 'getPreBufferInfo' | 'getRtspPort' | 'getAllRtspEntries' | 'getRtspEntry' | 'regenerateRtspToken' | 'setRtspEnabled' | 'isRtspEnabled'>;
91
91
  readonly system: Pick<InferProvider<typeof systemCapability>, 'info' | 'health' | 'featureFlags' | 'networkAddresses' | 'getRetentionConfig' | 'setRetentionConfig' | 'forceRetentionCleanup'>;