@camstack/types 1.2.90 → 1.2.91
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/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export type * from './interfaces/ffmpeg.js';
|
|
|
54
54
|
export type * from './interfaces/frame-handle.js';
|
|
55
55
|
export type * from './interfaces/inference-capabilities.js';
|
|
56
56
|
export type * from './interfaces/inference-engine.js';
|
|
57
|
-
export type {
|
|
57
|
+
export type { CreateIntegrationInput, IIntegrationRegistry, Integration, } from './interfaces/integration-registry.js';
|
|
58
58
|
export type * from './interfaces/kernel-abstractions.js';
|
|
59
59
|
export type * from './interfaces/lifecycle.js';
|
|
60
60
|
export type * from './interfaces/logging.js';
|
|
@@ -8,24 +8,6 @@ export interface Integration {
|
|
|
8
8
|
readonly createdAt: number;
|
|
9
9
|
readonly updatedAt: number;
|
|
10
10
|
}
|
|
11
|
-
/** Persisted device */
|
|
12
|
-
export interface PersistedDevice {
|
|
13
|
-
readonly id: string;
|
|
14
|
-
readonly integrationId: string;
|
|
15
|
-
readonly stableId: string;
|
|
16
|
-
readonly type: string;
|
|
17
|
-
readonly name: string;
|
|
18
|
-
readonly enabled: boolean;
|
|
19
|
-
readonly info: Readonly<Record<string, unknown>>;
|
|
20
|
-
readonly createdAt: number;
|
|
21
|
-
readonly updatedAt: number;
|
|
22
|
-
}
|
|
23
|
-
/** Setting entry with typed value */
|
|
24
|
-
export interface TypedSetting {
|
|
25
|
-
readonly key: string;
|
|
26
|
-
readonly value: string;
|
|
27
|
-
readonly valueType: 'string' | 'number' | 'boolean' | 'json';
|
|
28
|
-
}
|
|
29
11
|
/** Input for creating an integration */
|
|
30
12
|
export interface CreateIntegrationInput {
|
|
31
13
|
readonly addonId: string;
|
|
@@ -34,25 +16,18 @@ export interface CreateIntegrationInput {
|
|
|
34
16
|
readonly info?: Record<string, unknown>;
|
|
35
17
|
readonly settings?: Record<string, unknown>;
|
|
36
18
|
}
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
readonly stableId: string;
|
|
50
|
-
readonly type: string;
|
|
51
|
-
readonly name: string;
|
|
52
|
-
readonly info?: Record<string, unknown>;
|
|
53
|
-
readonly settings?: Record<string, unknown>;
|
|
54
|
-
}
|
|
55
|
-
/** Registry interface for managing integrations and devices */
|
|
19
|
+
/**
|
|
20
|
+
* The integration store.
|
|
21
|
+
*
|
|
22
|
+
* It carried a device half until 2026-08-19 — `createDevice`, `listCameras`,
|
|
23
|
+
* `setDeviceSetting` and a `dev_NNNN` id-space — declared on this interface,
|
|
24
|
+
* implemented over two SQLite tables, wrapped by the visibility filter, and
|
|
25
|
+
* called by nothing. Both tables held 0 rows against 974 live devices. The
|
|
26
|
+
* device authority is the `device-manager` capability
|
|
27
|
+
* ([D183](../../decisions/adr-0183-code-that-is-deleted-takes-its-tables-with-it.md));
|
|
28
|
+
* this interface is integrations only, and adding a device method back means
|
|
29
|
+
* creating a second authority.
|
|
30
|
+
*/
|
|
56
31
|
export interface IIntegrationRegistry {
|
|
57
32
|
createIntegration(input: CreateIntegrationInput): Promise<Integration>;
|
|
58
33
|
getIntegration(id: string): Promise<Integration | null>;
|
|
@@ -63,14 +38,4 @@ export interface IIntegrationRegistry {
|
|
|
63
38
|
getIntegrationSettings(integrationId: string): Promise<Record<string, unknown>>;
|
|
64
39
|
setIntegrationSetting(integrationId: string, key: string, value: unknown): Promise<void>;
|
|
65
40
|
setIntegrationSettings(integrationId: string, settings: Record<string, unknown>): Promise<void>;
|
|
66
|
-
createDevice(input: CreateDeviceInput): Promise<PersistedDevice>;
|
|
67
|
-
getDevice(id: string): Promise<PersistedDevice | null>;
|
|
68
|
-
getDeviceByStableId(stableId: string): Promise<PersistedDevice | null>;
|
|
69
|
-
listDevices(integrationId?: string): Promise<readonly PersistedDevice[]>;
|
|
70
|
-
listCameras(): Promise<readonly PersistedDevice[]>;
|
|
71
|
-
updateDevice(id: string, updates: Partial<Pick<PersistedDevice, 'name' | 'enabled' | 'info'>>): Promise<PersistedDevice | null>;
|
|
72
|
-
deleteDevice(id: string): Promise<boolean>;
|
|
73
|
-
getDeviceSettings(deviceId: string): Promise<Record<string, unknown>>;
|
|
74
|
-
setDeviceSetting(deviceId: string, key: string, value: unknown): Promise<void>;
|
|
75
|
-
setDeviceSettings(deviceId: string, settings: Record<string, unknown>): Promise<void>;
|
|
76
41
|
}
|