@camera.ui/browser 0.0.103 → 0.0.104
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/bundle.js +1 -1
- package/dist/types/packages/client/browser/src/utils.d.ts +1 -1
- package/dist/types/packages/plugineer/src/polyglot/node/plugins/schema.d.ts +2 -14
- package/dist/types/packages/plugineer/src/polyglot/node/plugins/types.d.ts +1 -0
- package/dist/types/packages/types/src/index.d.ts +6 -7
- package/dist/types/server/src/api/database/index.d.ts +2 -3
- package/dist/types/server/src/api/database/types.d.ts +7 -13
- package/dist/types/server/src/api/go2rtc/index.d.ts +1 -0
- package/dist/types/server/src/api/middlewares/socketAuth.middleware.d.ts +1 -1
- package/dist/types/server/src/api/types/index.d.ts +103 -121
- package/dist/types/server/src/api/websocket/types.d.ts +3 -9
- package/dist/types/server/src/camera/controller.d.ts +3 -3
- package/dist/types/server/src/camera/frameWorker.d.ts +0 -1
- package/dist/types/server/src/plugins/plugin.d.ts +0 -2
- package/dist/types/server/src/plugins/worker.d.ts +2 -2
- package/dist/types/server/src/services/config/constants.d.ts +1 -1
- package/dist/types/server/src/services/config/index.d.ts +0 -1
- package/dist/types/server/src/services/config/types.d.ts +3 -9
- package/eslint.config.js +89 -0
- package/package.json +12 -13
|
@@ -5,7 +5,7 @@ export declare const isIpad: () => boolean;
|
|
|
5
5
|
export declare const isAppleMobile: () => boolean;
|
|
6
6
|
export declare const iosVersion: () => number[] | undefined;
|
|
7
7
|
export declare const isSafari: () => boolean;
|
|
8
|
-
export declare const safariVersion: () =>
|
|
8
|
+
export declare const safariVersion: () => RegExpExecArray | null;
|
|
9
9
|
export declare const isFirefox: () => boolean;
|
|
10
10
|
export declare const isChrome: () => boolean;
|
|
11
11
|
export declare const isTouch: () => boolean;
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { JsonSchema, JsonSchemaArray, JsonSchemaBoolean, JsonSchemaButton, JsonSchemaEnum, JsonSchemaForm, JsonSchemaNumber, JsonSchemaObject, JsonSchemaObjectButton, JsonSchemaObjectWithButtons, JsonSchemaString, RootSchema } from '@camera.ui/types';
|
|
3
3
|
import type { ZodTypeAny } from 'zod';
|
|
4
|
-
type RootZodSchema = z.ZodObject<Record<string, ZodTypeAny>, 'strict', ZodTypeAny,
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
}, {
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
}>;
|
|
4
|
+
type RootZodSchema = z.ZodObject<Record<string, ZodTypeAny>, 'strict', ZodTypeAny, Record<string, any>, Record<string, any>>;
|
|
9
5
|
type OptionalZodString = z.ZodOptional<z.ZodString> | z.ZodString | z.ZodOptional<z.ZodEffects<z.ZodString, string, string>> | z.ZodEffects<z.ZodString, string, string>;
|
|
10
6
|
type OptionalZodNumber = z.ZodOptional<z.ZodNumber> | z.ZodNumber | z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>> | z.ZodEffects<z.ZodNumber, number, number>;
|
|
11
7
|
type OptionalZodBoolean = z.ZodOptional<z.ZodBoolean> | z.ZodBoolean;
|
|
12
|
-
type OptionalZodZobject = z.ZodOptional<z.ZodObject<Record<string, z.ZodTypeAny>, 'strict', z.ZodTypeAny,
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
}, {
|
|
15
|
-
[x: string]: any;
|
|
16
|
-
}>> | z.ZodObject<Record<string, z.ZodTypeAny>, 'strict', z.ZodTypeAny, {
|
|
17
|
-
[x: string]: any;
|
|
18
|
-
}, {
|
|
19
|
-
[x: string]: any;
|
|
20
|
-
}> | z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>> | z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
8
|
+
type OptionalZodZobject = z.ZodOptional<z.ZodObject<Record<string, z.ZodTypeAny>, 'strict', z.ZodTypeAny, Record<string, any>, Record<string, any>>> | z.ZodObject<Record<string, z.ZodTypeAny>, 'strict', z.ZodTypeAny, Record<string, any>, Record<string, any>> | z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>> | z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
21
9
|
type OptionalZodArray = z.ZodOptional<z.ZodType<any, any, any>> | z.ZodType<any, any, any>;
|
|
22
10
|
type OptionalZodEnum = z.ZodOptional<z.ZodUnion<[z.ZodTypeAny, z.ZodTypeAny, ...z.ZodTypeAny[]]>> | z.ZodUnion<[z.ZodTypeAny, z.ZodTypeAny, ...z.ZodTypeAny[]]> | z.ZodEffects<z.ZodAny, any, any> | z.ZodUnion<any>;
|
|
23
11
|
type OptionalZodEnumMultiple = z.ZodOptional<z.ZodArray<z.ZodUnion<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>, 'many'>> | z.ZodArray<z.ZodUnion<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>, 'many'> | z.ZodEffects<z.ZodAny, any, any> | z.ZodUnion<any>;
|
|
@@ -55,6 +55,7 @@ export interface PluginContractBase {
|
|
|
55
55
|
options?: PluginOptions;
|
|
56
56
|
dependencies?: string[];
|
|
57
57
|
pythonVersion?: string;
|
|
58
|
+
bundled?: boolean;
|
|
58
59
|
}
|
|
59
60
|
export type PluginContract = PluginContractBase & ExtensionOrSupport;
|
|
60
61
|
export type CameraExtensionWithoutHub = 'prebuffer' | 'motionDetection' | 'objectDetection' | 'audioDetection' | 'ptz';
|
|
@@ -2,12 +2,12 @@ import type { Observable, ReplaySubject, Subject, Subscription } from 'rxjs';
|
|
|
2
2
|
import type sharp from 'sharp';
|
|
3
3
|
import type { ConnectionState, RTCIceCandidate, RTCSessionDescription, RtpPacket } from 'werift';
|
|
4
4
|
export type { ConnectionState, RTCIceCandidate, RTCSessionDescription, RtpPacket, sharp };
|
|
5
|
-
export type
|
|
6
|
-
export interface
|
|
7
|
-
[key: string]: JSONValue;
|
|
5
|
+
export type JSONObject = Record<string, JSONValue>;
|
|
6
|
+
export interface JSONValue {
|
|
7
|
+
[key: string]: string | number | boolean | JSONValue | JSONValue[];
|
|
8
8
|
}
|
|
9
9
|
export type JSONArray = JSONValue[];
|
|
10
|
-
export type Path =
|
|
10
|
+
export type Path = (number | string)[] | number | string;
|
|
11
11
|
export type CameraType = 'camera' | 'doorbell';
|
|
12
12
|
export type ZoneType = 'intersect' | 'contain';
|
|
13
13
|
export type ZoneFilter = 'include' | 'exclude';
|
|
@@ -24,6 +24,7 @@ export type AudioCodec = 'PCMU' | 'PCMA' | 'MPEG4-GENERIC' | 'opus' | 'G722' | '
|
|
|
24
24
|
export type AudioFFmpegCodec = 'pcm_mulaw' | 'pcm_alaw' | 'aac' | 'libopus' | 'g722' | 'mp3' | 'pcm_s16be' | 'pcm_s16le' | 'flac';
|
|
25
25
|
export type VideoCodec = 'H264' | 'H265' | 'VP8' | 'VP9' | 'AV1' | 'JPEG' | 'RAW';
|
|
26
26
|
export type VideoFFmpegCodec = 'h264' | 'hevc' | 'vp8' | 'vp9' | 'av1' | 'mjpeg' | 'rawvideo';
|
|
27
|
+
export type PythonVersion = '3.9' | '3.10' | '3.11' | '3.12';
|
|
27
28
|
export interface CameraInformation {
|
|
28
29
|
model?: string;
|
|
29
30
|
manufacturer?: string;
|
|
@@ -548,9 +549,7 @@ export interface JsonSchemaObjectWithButtons extends JsonSchemaObject {
|
|
|
548
549
|
buttons: JsonSchemaObjectButton[];
|
|
549
550
|
}
|
|
550
551
|
export type JsonSchema = JsonSchemaString | JsonSchemaNumber | JsonSchemaBoolean | JsonSchemaEnum | JsonSchemaObject | JsonSchemaObjectWithButtons | JsonSchemaArray | JsonSchemaButton;
|
|
551
|
-
export
|
|
552
|
-
[key: string]: JsonSchema;
|
|
553
|
-
}
|
|
552
|
+
export type JsonSchemaForm = Record<string, JsonSchema>;
|
|
554
553
|
export interface RootSchema {
|
|
555
554
|
schema: JsonSchemaForm;
|
|
556
555
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { FastifyInstance } from 'fastify';
|
|
2
1
|
import type { Database as DB, RootDatabase as RootDB } from 'lmdb';
|
|
3
2
|
import type { DBAuth, DBCamera, DBPlugin, DBSettings, DBSystem, DBUser } from './types.js';
|
|
4
3
|
export declare class Database {
|
|
@@ -13,11 +12,11 @@ export declare class Database {
|
|
|
13
12
|
private databaseMigration;
|
|
14
13
|
private selfCheck;
|
|
15
14
|
private databases;
|
|
16
|
-
private app;
|
|
17
15
|
private configService;
|
|
18
16
|
private logger;
|
|
17
|
+
private api;
|
|
19
18
|
private authDbPath;
|
|
20
|
-
constructor(
|
|
19
|
+
constructor();
|
|
21
20
|
initialize(): Promise<void>;
|
|
22
21
|
close(): Promise<void>;
|
|
23
22
|
getRootAdminId(): Promise<string | null>;
|
|
@@ -48,11 +48,9 @@ export interface DBCameraShortcut {
|
|
|
48
48
|
cameraId: string;
|
|
49
49
|
coords: ZoneCoord;
|
|
50
50
|
}
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
} | undefined;
|
|
55
|
-
}
|
|
51
|
+
export type DBUserCameraPreferences = Record<string, {
|
|
52
|
+
shortcuts: DBCameraShortcut[];
|
|
53
|
+
} | undefined>;
|
|
56
54
|
export interface DBUserPreferences {
|
|
57
55
|
camview: {
|
|
58
56
|
views: DBCamviewLayout[];
|
|
@@ -71,14 +69,10 @@ export interface DBCamviewLayoutCamera {
|
|
|
71
69
|
index: number;
|
|
72
70
|
cameraId: string;
|
|
73
71
|
}
|
|
74
|
-
export
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
export interface DBPluginStorageValue {
|
|
80
|
-
[key: string]: any;
|
|
81
|
-
}
|
|
72
|
+
export type DBPluginStorage = Record<string, {
|
|
73
|
+
config: DBPluginStorageValue;
|
|
74
|
+
}>;
|
|
75
|
+
export type DBPluginStorageValue = Record<string, any>;
|
|
82
76
|
export interface CameraExtensions {
|
|
83
77
|
hub?: string[];
|
|
84
78
|
prebuffer?: string;
|
|
@@ -3,6 +3,7 @@ import { ConfigApi } from './api/config.js';
|
|
|
3
3
|
import { SnapshotApi } from './api/snapshot.js';
|
|
4
4
|
import { StreamsApi } from './api/streams.js';
|
|
5
5
|
export declare class Go2RtcApi {
|
|
6
|
+
private api;
|
|
6
7
|
private requestQueue;
|
|
7
8
|
applicationApi: ApplicationApi;
|
|
8
9
|
configApi: ConfigApi;
|
|
@@ -35,7 +35,7 @@ type SecretCallback = (decodedToken: CompleteDecodedToken) => Promise<string> |
|
|
|
35
35
|
export interface AuthorizeOptions {
|
|
36
36
|
secret: string | SecretCallback;
|
|
37
37
|
algorithms?: Algorithm[];
|
|
38
|
-
onAuthentication?: (decodedToken: any) => Promise<any
|
|
38
|
+
onAuthentication?: (decodedToken: any) => Promise<any>;
|
|
39
39
|
}
|
|
40
40
|
export declare const authorize: (options: AuthorizeOptions) => SocketIOMiddleware;
|
|
41
41
|
export {};
|
|
@@ -181,213 +181,213 @@ export interface PaginationQuery {
|
|
|
181
181
|
page?: number;
|
|
182
182
|
pageSize?: number;
|
|
183
183
|
}
|
|
184
|
-
export
|
|
184
|
+
export interface PaginationRequest {
|
|
185
185
|
Querystring: PaginationQuery;
|
|
186
|
-
}
|
|
187
|
-
export
|
|
186
|
+
}
|
|
187
|
+
export interface AuthParamsRequest {
|
|
188
188
|
Params: {
|
|
189
189
|
id: string;
|
|
190
190
|
username?: string;
|
|
191
191
|
};
|
|
192
|
-
}
|
|
193
|
-
export
|
|
192
|
+
}
|
|
193
|
+
export interface AuthLoginRequest {
|
|
194
194
|
Querystring: {
|
|
195
195
|
username?: string;
|
|
196
196
|
password?: string;
|
|
197
197
|
token?: string;
|
|
198
198
|
};
|
|
199
|
-
}
|
|
200
|
-
export
|
|
199
|
+
}
|
|
200
|
+
export interface AuthNewLoginRequest {
|
|
201
201
|
Body: LoginUserInput;
|
|
202
|
-
}
|
|
203
|
-
export
|
|
202
|
+
}
|
|
203
|
+
export interface AuthRefreshRequest {
|
|
204
204
|
Body: {
|
|
205
205
|
refresh_token: string;
|
|
206
206
|
};
|
|
207
|
-
}
|
|
208
|
-
export
|
|
207
|
+
}
|
|
208
|
+
export interface AuthTokensRequest {
|
|
209
209
|
Querystring: {
|
|
210
210
|
clientData?: boolean;
|
|
211
211
|
};
|
|
212
|
-
}
|
|
213
|
-
export
|
|
212
|
+
}
|
|
213
|
+
export interface CamerasParamsRequest {
|
|
214
214
|
Params: {
|
|
215
215
|
cameraname: string;
|
|
216
216
|
};
|
|
217
|
-
}
|
|
218
|
-
export
|
|
217
|
+
}
|
|
218
|
+
export interface CameraSnapshotQueryRequest {
|
|
219
219
|
Querystring: {
|
|
220
220
|
forceNew?: boolean;
|
|
221
221
|
};
|
|
222
|
-
}
|
|
223
|
-
export
|
|
222
|
+
}
|
|
223
|
+
export interface CameraSourceParamsRequest {
|
|
224
224
|
Params: {
|
|
225
225
|
sourcename: string;
|
|
226
226
|
};
|
|
227
|
-
}
|
|
228
|
-
export
|
|
227
|
+
}
|
|
228
|
+
export interface CamerasParamsIdRequest {
|
|
229
229
|
Params: {
|
|
230
230
|
cameraid: string;
|
|
231
231
|
};
|
|
232
|
-
}
|
|
233
|
-
export
|
|
232
|
+
}
|
|
233
|
+
export interface CameraZonesParamsRequest {
|
|
234
234
|
Params: {
|
|
235
235
|
zonename: string;
|
|
236
236
|
};
|
|
237
|
-
}
|
|
238
|
-
export
|
|
237
|
+
}
|
|
238
|
+
export interface CamerasExtensionsParamsRequest {
|
|
239
239
|
Params: {
|
|
240
240
|
cameraname: string;
|
|
241
241
|
pluginname: string;
|
|
242
242
|
scope?: string;
|
|
243
243
|
};
|
|
244
|
-
}
|
|
245
|
-
export
|
|
244
|
+
}
|
|
245
|
+
export interface CamerasExtensionsRequest {
|
|
246
246
|
Querystring: {
|
|
247
247
|
type: CameraExtension;
|
|
248
248
|
};
|
|
249
|
-
}
|
|
250
|
-
export
|
|
249
|
+
}
|
|
250
|
+
export interface CameraZoneInsertPatchRequest {
|
|
251
251
|
Body: CameraZone;
|
|
252
|
-
}
|
|
253
|
-
export
|
|
252
|
+
}
|
|
253
|
+
export interface CamerasInsertRequest {
|
|
254
254
|
Body: CreateCameraInput;
|
|
255
|
-
}
|
|
256
|
-
export
|
|
255
|
+
}
|
|
256
|
+
export interface CamerasPreviewRequest {
|
|
257
257
|
Body: PreviewCameraInput;
|
|
258
|
-
}
|
|
259
|
-
export
|
|
258
|
+
}
|
|
259
|
+
export interface CamerasPatchRequest {
|
|
260
260
|
Body: PatchCameraInput;
|
|
261
|
-
}
|
|
262
|
-
export
|
|
261
|
+
}
|
|
262
|
+
export interface ExtensionsPatchRequest {
|
|
263
263
|
Body: Record<string, any>;
|
|
264
|
-
}
|
|
265
|
-
export
|
|
264
|
+
}
|
|
265
|
+
export interface ExtensionsSubmitRequest {
|
|
266
266
|
Body: {
|
|
267
267
|
configPath: string;
|
|
268
268
|
};
|
|
269
|
-
}
|
|
270
|
-
export
|
|
269
|
+
}
|
|
270
|
+
export interface ConfigRequest {
|
|
271
271
|
Querystring: {
|
|
272
272
|
json?: boolean;
|
|
273
273
|
};
|
|
274
|
-
}
|
|
275
|
-
export
|
|
274
|
+
}
|
|
275
|
+
export interface ConfigPatchRequest {
|
|
276
276
|
Body: PatchConfigInput;
|
|
277
|
-
}
|
|
278
|
-
export
|
|
277
|
+
}
|
|
278
|
+
export interface Go2RtcConfigPatchRequest {
|
|
279
279
|
Body: PatchGo2RtcConfigInput;
|
|
280
|
-
}
|
|
281
|
-
export
|
|
280
|
+
}
|
|
281
|
+
export interface FilesParamsRequest {
|
|
282
282
|
Params: {
|
|
283
283
|
file: string;
|
|
284
284
|
};
|
|
285
|
-
}
|
|
286
|
-
export
|
|
285
|
+
}
|
|
286
|
+
export interface PluginsParamsIdRequest {
|
|
287
287
|
Params: {
|
|
288
288
|
pluginid: string;
|
|
289
289
|
};
|
|
290
|
-
}
|
|
291
|
-
export
|
|
290
|
+
}
|
|
291
|
+
export interface PluginsParamsNameRequest {
|
|
292
292
|
Params: {
|
|
293
293
|
scope?: string;
|
|
294
294
|
pluginname: string;
|
|
295
295
|
};
|
|
296
|
-
}
|
|
297
|
-
export
|
|
296
|
+
}
|
|
297
|
+
export interface FrameWorkerParamsNameRequest {
|
|
298
298
|
Params: {
|
|
299
299
|
frameworkername: string;
|
|
300
300
|
};
|
|
301
|
-
}
|
|
302
|
-
export
|
|
301
|
+
}
|
|
302
|
+
export interface PluginsParamsRemoveRequest {
|
|
303
303
|
Querystring: {
|
|
304
304
|
removeStorage?: boolean;
|
|
305
305
|
};
|
|
306
|
-
}
|
|
306
|
+
}
|
|
307
307
|
export interface PluginsQuery {
|
|
308
308
|
pluginname?: string;
|
|
309
309
|
pluginversion?: string;
|
|
310
310
|
}
|
|
311
|
-
export
|
|
311
|
+
export interface PluginsQueryRequest {
|
|
312
312
|
Querystring: PluginsQuery;
|
|
313
|
-
}
|
|
314
|
-
export
|
|
313
|
+
}
|
|
314
|
+
export interface PluginsInsertRequest {
|
|
315
315
|
Body: {
|
|
316
316
|
pluginname: string;
|
|
317
317
|
pluginversion?: string;
|
|
318
318
|
};
|
|
319
|
-
}
|
|
320
|
-
export
|
|
319
|
+
}
|
|
320
|
+
export interface PluginsConfigPatchRequest {
|
|
321
321
|
Body: Record<string, any>;
|
|
322
|
-
}
|
|
323
|
-
export
|
|
322
|
+
}
|
|
323
|
+
export interface PluginsActionRequest {
|
|
324
324
|
Body: {
|
|
325
325
|
actionId: string;
|
|
326
326
|
payload: any;
|
|
327
327
|
};
|
|
328
|
-
}
|
|
329
|
-
export
|
|
328
|
+
}
|
|
329
|
+
export interface PluginsDetectMotionRequest {
|
|
330
330
|
Body: DetectMotionInput;
|
|
331
|
-
}
|
|
332
|
-
export
|
|
331
|
+
}
|
|
332
|
+
export interface PluginsDetectObjectRequest {
|
|
333
333
|
Body: DetectObjectInput;
|
|
334
|
-
}
|
|
335
|
-
export
|
|
334
|
+
}
|
|
335
|
+
export interface PluginsDetectAudioRequest {
|
|
336
336
|
Body: DetectAudioInput;
|
|
337
|
-
}
|
|
337
|
+
}
|
|
338
338
|
export interface PluginsInterfaceQueryType {
|
|
339
339
|
type: 'objectDetection' | 'motionDetection' | 'audioDetection';
|
|
340
340
|
}
|
|
341
|
-
export
|
|
341
|
+
export interface PluginsInterfaceQuery {
|
|
342
342
|
Querystring: {
|
|
343
343
|
type: PluginsInterfaceQueryType;
|
|
344
344
|
};
|
|
345
|
-
}
|
|
346
|
-
export
|
|
345
|
+
}
|
|
346
|
+
export interface UsersParamsRequest {
|
|
347
347
|
Params: {
|
|
348
348
|
username: string;
|
|
349
349
|
};
|
|
350
|
-
}
|
|
351
|
-
export
|
|
350
|
+
}
|
|
351
|
+
export interface UsersInsertRequest {
|
|
352
352
|
Body: CreateUserInput & {
|
|
353
353
|
avatar: string;
|
|
354
354
|
};
|
|
355
|
-
}
|
|
356
|
-
export
|
|
355
|
+
}
|
|
356
|
+
export interface UsersPatchRequest {
|
|
357
357
|
Body: PatchUserInput & {
|
|
358
358
|
avatar: string;
|
|
359
359
|
};
|
|
360
|
-
}
|
|
361
|
-
export
|
|
360
|
+
}
|
|
361
|
+
export interface SystemPatchRequest {
|
|
362
362
|
Body: PatchSystemInput;
|
|
363
|
-
}
|
|
364
|
-
export
|
|
363
|
+
}
|
|
364
|
+
export interface ViewsParamsRequest {
|
|
365
365
|
Params: {
|
|
366
366
|
viewid: string;
|
|
367
367
|
};
|
|
368
|
-
}
|
|
369
|
-
export
|
|
368
|
+
}
|
|
369
|
+
export interface ViewsInsertRequest {
|
|
370
370
|
Body: CreateViewInput;
|
|
371
|
-
}
|
|
372
|
-
export
|
|
371
|
+
}
|
|
372
|
+
export interface ViewsPatchRequest {
|
|
373
373
|
Body: PatchViewInput;
|
|
374
|
-
}
|
|
375
|
-
export
|
|
374
|
+
}
|
|
375
|
+
export interface ShortcutParamsRequest {
|
|
376
376
|
Params: {
|
|
377
377
|
shortcutid: string;
|
|
378
378
|
};
|
|
379
|
-
}
|
|
380
|
-
export
|
|
379
|
+
}
|
|
380
|
+
export interface ShortcutInsertRequest {
|
|
381
381
|
Body: CreateShortcutInput;
|
|
382
|
-
}
|
|
383
|
-
export
|
|
382
|
+
}
|
|
383
|
+
export interface ShortcutPatchRequest {
|
|
384
384
|
Body: PatchShortcutInput;
|
|
385
|
-
}
|
|
386
|
-
export
|
|
385
|
+
}
|
|
386
|
+
export interface BackupCreateRequest {
|
|
387
387
|
Body: {
|
|
388
388
|
localStorage: Partial<UiLocalStorage>;
|
|
389
389
|
};
|
|
390
|
-
}
|
|
390
|
+
}
|
|
391
391
|
export interface BackupInfo {
|
|
392
392
|
backupDirectory: string;
|
|
393
393
|
backupFile: string;
|
|
@@ -430,9 +430,9 @@ export interface UiLocalStorage {
|
|
|
430
430
|
theme: ThemeLocalStorage;
|
|
431
431
|
locale: SupportedLanguageAbbreviatons;
|
|
432
432
|
}
|
|
433
|
-
export
|
|
433
|
+
export interface BackupRestoreRequest {
|
|
434
434
|
Body: RestoreBackupInput;
|
|
435
|
-
}
|
|
435
|
+
}
|
|
436
436
|
export interface INpmPluginState {
|
|
437
437
|
updateAvailable: boolean;
|
|
438
438
|
betaUpdateAvailable: boolean;
|
|
@@ -463,32 +463,18 @@ export interface IPackageJson {
|
|
|
463
463
|
contributors?: string[] | INpmPerson[];
|
|
464
464
|
files?: string[];
|
|
465
465
|
main?: string;
|
|
466
|
-
bin?: string |
|
|
467
|
-
[key: string]: string;
|
|
468
|
-
};
|
|
466
|
+
bin?: string | Record<string, string>;
|
|
469
467
|
repository?: string | {
|
|
470
468
|
type: string;
|
|
471
469
|
url: string;
|
|
472
470
|
};
|
|
473
|
-
scripts?:
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
};
|
|
479
|
-
devDependencies?: {
|
|
480
|
-
[key: string]: string;
|
|
481
|
-
};
|
|
482
|
-
peerDependencies?: {
|
|
483
|
-
[key: string]: string;
|
|
484
|
-
};
|
|
485
|
-
optionalDependencies?: {
|
|
486
|
-
[key: string]: string;
|
|
487
|
-
};
|
|
471
|
+
scripts?: Record<string, string>;
|
|
472
|
+
dependencies?: Record<string, string>;
|
|
473
|
+
devDependencies?: Record<string, string>;
|
|
474
|
+
peerDependencies?: Record<string, string>;
|
|
475
|
+
optionalDependencies?: Record<string, string>;
|
|
488
476
|
bundledDependencies?: string[];
|
|
489
|
-
engines?:
|
|
490
|
-
[key: string]: string;
|
|
491
|
-
};
|
|
477
|
+
engines?: Record<string, string>;
|
|
492
478
|
os?: string[];
|
|
493
479
|
cpu?: string[];
|
|
494
480
|
preferGlobal?: boolean;
|
|
@@ -496,9 +482,7 @@ export interface IPackageJson {
|
|
|
496
482
|
publishConfig?: {
|
|
497
483
|
registry?: string;
|
|
498
484
|
};
|
|
499
|
-
exports?:
|
|
500
|
-
[key: string]: any;
|
|
501
|
-
};
|
|
485
|
+
exports?: Record<string, any>;
|
|
502
486
|
type?: 'module';
|
|
503
487
|
'camera.ui'?: PluginContract;
|
|
504
488
|
}
|
|
@@ -510,9 +494,7 @@ export interface INpmRegistryModule {
|
|
|
510
494
|
latest: string;
|
|
511
495
|
[key: string]: string;
|
|
512
496
|
};
|
|
513
|
-
versions:
|
|
514
|
-
[key: string]: IPackageJson;
|
|
515
|
-
};
|
|
497
|
+
versions: Record<string, IPackageJson>;
|
|
516
498
|
time: {
|
|
517
499
|
created: string;
|
|
518
500
|
modified: string;
|
|
@@ -23,12 +23,8 @@ export interface ServerProcesses {
|
|
|
23
23
|
go2rtc: ProcessInfo[];
|
|
24
24
|
nats: ProcessInfo[];
|
|
25
25
|
}
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
export interface WorkerProcesses {
|
|
30
|
-
[key: string]: ProcessInfo[];
|
|
31
|
-
}
|
|
26
|
+
export type WorkerProcessInfo = Record<string, ProcessInfo>;
|
|
27
|
+
export type WorkerProcesses = Record<string, ProcessInfo[]>;
|
|
32
28
|
export interface AllProcesses extends ServerProcessInfo {
|
|
33
29
|
plugins: WorkerProcessInfo;
|
|
34
30
|
workers: WorkerProcessInfo;
|
|
@@ -42,6 +38,4 @@ export interface ServerRuntime {
|
|
|
42
38
|
go2rtc?: RuntimeInfo;
|
|
43
39
|
nats?: RuntimeInfo;
|
|
44
40
|
}
|
|
45
|
-
export
|
|
46
|
-
[key: string]: PluginRuntimeInfo;
|
|
47
|
-
}
|
|
41
|
+
export type WorkerRuntime = Record<string, PluginRuntimeInfo>;
|
|
@@ -2,10 +2,11 @@ import { CameraDevice, CameraPrebufferInterface, CameraPTZInterface } from '@cam
|
|
|
2
2
|
import { FrameWorker } from './frameWorker.js';
|
|
3
3
|
import type { Logger } from '@camera.ui/common/logger';
|
|
4
4
|
import type { Camera, CameraConfigInputSettings, CameraDelegate, CameraDeviceInternalSource, CameraDeviceSource, MotionFrame, ProbeStream, SetValues, VideoFrame } from '@camera.ui/types';
|
|
5
|
+
import type { WriteStream } from 'node:fs';
|
|
5
6
|
export declare class CameraController extends CameraDevice {
|
|
6
7
|
readonly frameWorker: FrameWorker;
|
|
7
8
|
readonly streamInfos: Map<string, ProbeStream>;
|
|
8
|
-
|
|
9
|
+
readonly logStream?: WriteStream;
|
|
9
10
|
private motionTimeout?;
|
|
10
11
|
private objectTimeout?;
|
|
11
12
|
private objectTimeoutDuration;
|
|
@@ -40,7 +41,6 @@ export declare class CameraController extends CameraDevice {
|
|
|
40
41
|
updateCamera(updatedCamera: Camera): void;
|
|
41
42
|
cleanup(): void;
|
|
42
43
|
writeLog(...args: any[]): void;
|
|
43
|
-
private internalLog;
|
|
44
44
|
private subscribeToCameraState;
|
|
45
45
|
private subscribeToCameraChanges;
|
|
46
46
|
private subscribeToStateChanges;
|
|
@@ -55,7 +55,7 @@ export declare class CameraController extends CameraDevice {
|
|
|
55
55
|
private getAudioCodecProperties;
|
|
56
56
|
private getVideoCodecProperties;
|
|
57
57
|
private generateSdp;
|
|
58
|
-
private
|
|
58
|
+
private writeHeader;
|
|
59
59
|
private closeLogStream;
|
|
60
60
|
private removeLogStream;
|
|
61
61
|
private truncateLog;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PythonInstaller } from '@camera.ui/plugineer';
|
|
2
1
|
import { PluginWorker } from './worker.js';
|
|
3
2
|
import type { PluginContract } from '@camera.ui/plugineer';
|
|
4
3
|
import type { CameraExtension } from '@camera.ui/types';
|
|
@@ -20,7 +19,6 @@ export declare class Plugin {
|
|
|
20
19
|
readonly installPath: string;
|
|
21
20
|
readonly configFile: string;
|
|
22
21
|
readonly storagePath: string;
|
|
23
|
-
readonly py: PythonInstaller;
|
|
24
22
|
readonly logPath: string;
|
|
25
23
|
readonly worker: PluginWorker;
|
|
26
24
|
get contract(): PluginContract;
|
|
@@ -12,6 +12,7 @@ export declare class PluginWorker {
|
|
|
12
12
|
private configService;
|
|
13
13
|
private socketService;
|
|
14
14
|
private pluginManager;
|
|
15
|
+
private py;
|
|
15
16
|
private publisher?;
|
|
16
17
|
private subscriber?;
|
|
17
18
|
private subject;
|
|
@@ -46,8 +47,7 @@ export declare class PluginWorker {
|
|
|
46
47
|
private handleLogData;
|
|
47
48
|
private processLogEntry;
|
|
48
49
|
private writeProcessLog;
|
|
49
|
-
private
|
|
50
|
-
private createLogStream;
|
|
50
|
+
private writeHeader;
|
|
51
51
|
private closeLogStream;
|
|
52
52
|
private removeLogStream;
|
|
53
53
|
private truncateLog;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IceServer } from '@camera.ui/types';
|
|
2
2
|
import type { Go2RtcConfig, IConfig } from './types.js';
|
|
3
|
+
export declare const APP_NAME: string;
|
|
3
4
|
export declare const PROCESS_IDENTIFIER = "--id=camera.ui";
|
|
4
|
-
export declare const APP_NAME: any;
|
|
5
5
|
export declare const DEFAULT_ICE_SERVERS: IceServer[];
|
|
6
6
|
export declare const DEFAULT_CONFIG: IConfig;
|
|
7
7
|
export declare const DEFAULT_GO2RTC_CONFIG: Go2RtcConfig;
|
|
@@ -9,7 +9,6 @@ export declare class ConfigService {
|
|
|
9
9
|
static readonly NODE_VERSION: string;
|
|
10
10
|
static readonly MIN_NODE_VERSION: string;
|
|
11
11
|
static readonly INSTALL_PATH: string | null;
|
|
12
|
-
static readonly SERVER_PATH: string;
|
|
13
12
|
static readonly INTERFACE_PATH: string;
|
|
14
13
|
private logger;
|
|
15
14
|
private _config;
|