@camera.ui/browser 0.0.47 → 0.0.49
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/{packages/client/node → types/packages/client/browser}/src/client.d.ts +6 -1
- package/dist/types/packages/client/browser/src/index.d.ts +2 -0
- package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +21 -0
- package/dist/{packages/client/node → types/packages/client/browser}/src/proxy/deviceManager.d.ts +3 -2
- package/dist/types/packages/client/browser/src/proxy/index.d.ts +4 -0
- package/dist/{packages → types/packages}/client/node/src/types.d.ts +1 -10
- package/dist/{server → types/server}/src/api/database/types.d.ts +1 -0
- package/dist/{server → types/server}/src/api/schemas/backup.schema.d.ts +52 -52
- package/dist/{server → types/server}/src/api/schemas/cameras.schema.d.ts +70 -64
- package/dist/{server → types/server}/src/api/types/index.d.ts +0 -1
- package/dist/{server/src/camera/index.d.ts → types/server/src/camera/base.d.ts} +37 -36
- package/dist/{server → types/server}/src/camera/streaming/browser/browser-peer-connection.d.ts +2 -1
- package/dist/{server → types/server}/src/camera/streaming/browser/browser-streaming-session.d.ts +2 -1
- package/dist/{server → types/server}/src/camera/streaming/browser/webrtc-browser-connection.d.ts +2 -1
- package/dist/{server → types/server}/src/camera/streaming/peer-connection.d.ts +3 -2
- package/dist/{server → types/server}/src/camera/streaming/streaming-session.d.ts +2 -1
- package/dist/{server → types/server}/src/camera/streaming/webrtc-connection.d.ts +2 -1
- package/dist/{server → types/server}/src/camera/types.d.ts +8 -63
- package/dist/types/server/src/camera/utils/subscribed.d.ts +9 -0
- package/dist/types/server/src/detector/types.d.ts +48 -0
- package/dist/{server → types/server}/src/plugins/types.d.ts +2 -8
- package/dist/{server → types/server}/src/proxy/types.d.ts +12 -13
- package/dist/{server → types/server}/src/services/config/types.d.ts +1 -1
- package/dist/{shared → types/shared}/types/index.d.ts +2 -0
- package/package.json +24 -14
- package/dist/packages/client/node/src/index.d.ts +0 -2
- package/dist/packages/client/node/src/proxy/cameraDevice/cameraDevice.browser.d.ts +0 -83
- package/dist/packages/client/node/src/proxy/cameraDevice/cameraDevice.mock.d.ts +0 -1
- package/dist/packages/client/node/src/proxy/cameraDevice/cameraDevice.node.d.ts +0 -19
- package/dist/packages/client/node/src/proxy/cameraDevice/index.d.ts +0 -2
- package/dist/packages/client/node/src/proxy/index.d.ts +0 -4
- package/dist/server/bin/python.d.ts +0 -26
- package/dist/server/src/api/database/index.d.ts +0 -25
- package/dist/server/src/api/go2rtc/api/application.d.ts +0 -9
- package/dist/server/src/api/go2rtc/api/config.d.ts +0 -9
- package/dist/server/src/api/go2rtc/api/index.d.ts +0 -3
- package/dist/server/src/api/go2rtc/api/snapshot.d.ts +0 -8
- package/dist/server/src/api/go2rtc/api/streams.d.ts +0 -11
- package/dist/server/src/api/go2rtc/index.d.ts +0 -13
- package/dist/server/src/api/go2rtc/queue.d.ts +0 -10
- package/dist/server/src/api/middlewares/socketAuth.middleware.d.ts +0 -41
- package/dist/server/src/api/services/auth.service.d.ts +0 -20
- package/dist/server/src/api/services/cameras.service.d.ts +0 -55
- package/dist/server/src/api/services/plugins.service.d.ts +0 -25
- package/dist/server/src/api/services/users.service.d.ts +0 -13
- package/dist/server/src/api/utils/constants.d.ts +0 -15
- package/dist/server/src/api/ws/index.d.ts +0 -15
- package/dist/server/src/api/ws/nsp/logs.d.ts +0 -11
- package/dist/server/src/api/ws/nsp/main.d.ts +0 -9
- package/dist/server/src/api/ws/nsp/metrics.d.ts +0 -33
- package/dist/server/src/api/ws/nsp/notifications.d.ts +0 -11
- package/dist/server/src/api/ws/nsp/plugins.d.ts +0 -13
- package/dist/server/src/api/ws/nsp/status.d.ts +0 -20
- package/dist/server/src/api/ws/nsp/streams.d.ts +0 -15
- package/dist/server/src/api.d.ts +0 -31
- package/dist/server/src/camera/utils/subscribed.d.ts +0 -6
- package/dist/server/src/go2rtc/index.d.ts +0 -26
- package/dist/server/src/plugins/index.d.ts +0 -29
- package/dist/server/src/plugins/node/api.d.ts +0 -37
- package/dist/server/src/plugins/node/cameraStorage.d.ts +0 -107
- package/dist/server/src/plugins/node/config.d.ts +0 -104
- package/dist/server/src/plugins/node/logger.d.ts +0 -11
- package/dist/server/src/plugins/node/proxy/cameraDevice.d.ts +0 -33
- package/dist/server/src/plugins/node/proxy/deviceManager.d.ts +0 -45
- package/dist/server/src/plugins/node/proxy/index.d.ts +0 -4
- package/dist/server/src/plugins/node/proxy/pluginsManager.d.ts +0 -36
- package/dist/server/src/plugins/node/proxy/queue.d.ts +0 -17
- package/dist/server/src/plugins/node/proxy/systemManager.d.ts +0 -34
- package/dist/server/src/plugins/node/schema.d.ts +0 -268
- package/dist/server/src/plugins/node/storageController.d.ts +0 -28
- package/dist/server/src/plugins/plugin.d.ts +0 -51
- package/dist/server/src/plugins/worker-ipc.d.ts +0 -16
- package/dist/server/src/plugins/worker.d.ts +0 -30
- package/dist/server/src/proxy/api.d.ts +0 -29
- package/dist/server/src/proxy/camera.d.ts +0 -98
- package/dist/server/src/proxy/constants.d.ts +0 -7
- package/dist/server/src/proxy/index.d.ts +0 -29
- package/dist/server/src/proxy/plugin.d.ts +0 -12
- package/dist/server/src/proxy/queue.d.ts +0 -16
- package/dist/server/src/proxy/utils/generateKeys.d.ts +0 -5
- package/dist/server/src/proxy/ws.d.ts +0 -12
- package/dist/server/src/services/config/constants.d.ts +0 -6
- package/dist/server/src/services/config/index.d.ts +0 -58
- package/dist/server/src/services/logger/index.d.ts +0 -28
- package/dist/shared/common/utils.d.ts +0 -6
- package/dist/{packages → types/packages}/client/node/src/api.d.ts +0 -0
- package/dist/{packages → types/packages}/client/node/src/proxy/pluginsManager.d.ts +0 -0
- package/dist/{packages → types/packages}/client/node/src/proxy/systemManager.d.ts +0 -0
- package/dist/{packages → types/packages}/client/node/src/socket.d.ts +0 -0
- package/dist/{server → types/server}/src/api/go2rtc/types.d.ts +0 -0
- package/dist/{server → types/server}/src/api/schemas/config.schema.d.ts +5 -5
- package/dist/{server → types/server}/src/api/schemas/go2rtc.schema.d.ts +79 -79
- package/dist/{server → types/server}/src/api/schemas/users.schema.d.ts +84 -84
- /package/dist/{server → types/server}/src/api/ws/types.d.ts +0 -0
- /package/dist/{server → types/server}/src/go2rtc/types.d.ts +0 -0
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import type { PluginJsonSchema, PluginJsonSchemaForm, SchemaConfig } from '../types';
|
|
2
|
-
import type { PluginAPI } from './api';
|
|
3
|
-
export declare class CameraStorage {
|
|
4
|
-
private cameraId;
|
|
5
|
-
private instance;
|
|
6
|
-
private api;
|
|
7
|
-
private db;
|
|
8
|
-
private _schema;
|
|
9
|
-
private _values;
|
|
10
|
-
get values(): Record<string, any>;
|
|
11
|
-
constructor(api: PluginAPI, instance: any, cameraId: string, schema?: PluginJsonSchemaForm);
|
|
12
|
-
/**
|
|
13
|
-
* Initialize the storage.
|
|
14
|
-
* This will load the configuration from the database.
|
|
15
|
-
*/
|
|
16
|
-
initializeStorage(): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Get a value from the configuration by its key/path.
|
|
19
|
-
* If the schema has an onGet function, the onGet function will be called.
|
|
20
|
-
* If the onGet functions is undefined, the value from the configuration will be returned.
|
|
21
|
-
* If the schema has a default value, and the configuration value is undefined, the default value will be returned.
|
|
22
|
-
*
|
|
23
|
-
* @param path - The path to the configuration value.
|
|
24
|
-
* @returns The value from the configuration.
|
|
25
|
-
*/
|
|
26
|
-
getValue<T = string>(path: string): Promise<T> | T | undefined;
|
|
27
|
-
getValue<T = string>(path: string, defaultValue: T): Promise<T> | T;
|
|
28
|
-
/**
|
|
29
|
-
* Set a new value for a given key/path in the configuration.
|
|
30
|
-
* If the schema of the value has an onSet function, and the value has changed, the onSet function will be called.
|
|
31
|
-
* If the schema of the value is declared as storable, the value will be saved to the database.
|
|
32
|
-
*
|
|
33
|
-
* @param path - The path to the configuration value.
|
|
34
|
-
* @param newValue - The new value to set.
|
|
35
|
-
*/
|
|
36
|
-
setValue<T = string>(path: string, newValue: T): Promise<void>;
|
|
37
|
-
/**
|
|
38
|
-
* Check if a value exists by its config path/key.
|
|
39
|
-
*
|
|
40
|
-
* @param path - The path to the value to check.
|
|
41
|
-
* @returns True if the value exists, false otherwise.
|
|
42
|
-
*/
|
|
43
|
-
hasValue(path: string): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Get the root schema and configuration.
|
|
46
|
-
* This will also call the onGet functions for the schema.
|
|
47
|
-
*
|
|
48
|
-
* @returns The root schema and configuration.
|
|
49
|
-
*/
|
|
50
|
-
getConfig(): Promise<SchemaConfig>;
|
|
51
|
-
/**
|
|
52
|
-
* Set a new configuration.
|
|
53
|
-
* If the schema of a value which has been changed has an onSet function, the onSet function will be called.
|
|
54
|
-
*
|
|
55
|
-
* @param newConfig - The new configuration to set.
|
|
56
|
-
*/
|
|
57
|
-
setConfig(newConfig: Record<string, any>): Promise<void>;
|
|
58
|
-
/**
|
|
59
|
-
* Add a new schema to the existing schema.
|
|
60
|
-
* It will also add the value to the configuration.
|
|
61
|
-
* If the schema is declared as storable, the value will be saved to the database.
|
|
62
|
-
*
|
|
63
|
-
* @param schema - The new schema to add.
|
|
64
|
-
* @param path - The path to the schema to add.
|
|
65
|
-
*/
|
|
66
|
-
addSchema(schema: PluginJsonSchemaForm): Promise<void>;
|
|
67
|
-
addSchema(path: string, schema: PluginJsonSchema): Promise<void>;
|
|
68
|
-
/**
|
|
69
|
-
* Remove a schema by its config path/key from the existing schema.
|
|
70
|
-
* It will also remove the value from the configuration.
|
|
71
|
-
* If the schema is declared as storable, the value will be removed from the database.
|
|
72
|
-
*
|
|
73
|
-
* @param path - The path to the schema to remove.
|
|
74
|
-
*/
|
|
75
|
-
removeSchema(path: string): Promise<void>;
|
|
76
|
-
/**
|
|
77
|
-
* Change a schema by its config path/key from the existing schema.
|
|
78
|
-
* It will also change the value from the configuration.
|
|
79
|
-
* If the schema is declared as storable, the value will be saved to the database.
|
|
80
|
-
*
|
|
81
|
-
* @param path - The path to the schema to change.
|
|
82
|
-
* @param schema - The new schema to set.
|
|
83
|
-
*/
|
|
84
|
-
changeSchema(path: string, newSchema: Partial<PluginJsonSchema>): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* Get a schema by its config path/key.
|
|
87
|
-
*
|
|
88
|
-
* @param path - The path to the schema to get.
|
|
89
|
-
* @returns The schema.
|
|
90
|
-
*/
|
|
91
|
-
getSchema<T>(path: string): T | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* Check if a schema exists by its config path/key.
|
|
94
|
-
*
|
|
95
|
-
* @param path - The path to the schema to check.
|
|
96
|
-
* @returns True if the schema exists, false otherwise.
|
|
97
|
-
*/
|
|
98
|
-
hasSchema(path: string): boolean;
|
|
99
|
-
private resolveOnGetFunctions;
|
|
100
|
-
private resolveOnGetFunctionsForObject;
|
|
101
|
-
private resolveOnGetFunctionsForSchema;
|
|
102
|
-
private triggerOnSetForChanges;
|
|
103
|
-
private filterStorableValues;
|
|
104
|
-
private containsStorableSchema;
|
|
105
|
-
private saveDb;
|
|
106
|
-
private removeDb;
|
|
107
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { type Path } from 'object-path';
|
|
2
|
-
import type { JSONValue, PluginConfig } from '../types';
|
|
3
|
-
export declare class PluginConfigService {
|
|
4
|
-
private config;
|
|
5
|
-
private configFile;
|
|
6
|
-
constructor(configFile: string);
|
|
7
|
-
/**
|
|
8
|
-
* Get key (Path) from config.json
|
|
9
|
-
*
|
|
10
|
-
* @param key - Key to lookup for
|
|
11
|
-
* @param defaultValue - Default value if `key` not exist
|
|
12
|
-
* @param validate - Validate the value of the `key` and replace with `defaultValue` if it is not valid
|
|
13
|
-
* @param refresh - Re-Read config.json before lookup for the `key`
|
|
14
|
-
* @param writeIfNotValid - Optional parameter, if true, the changes will be written to the file, if the value of the `key` is not valid and is replaced by the `defaultValue`
|
|
15
|
-
*
|
|
16
|
-
* @returns `value` for the given `key` or `defaultValue`
|
|
17
|
-
*/
|
|
18
|
-
get(key: Path, defaultValue: JSONValue, validate: Function, refresh?: boolean, writeIfNotValid?: boolean): any;
|
|
19
|
-
get(key: Path, defaultValue?: unknown, validate?: Function, refresh?: boolean, writeIfNotValid?: boolean): any;
|
|
20
|
-
/**
|
|
21
|
-
* Test key (Path) existence
|
|
22
|
-
*
|
|
23
|
-
* @param key - Key to lookup for
|
|
24
|
-
* @param refresh - Re-Read config.json before lookup for the `key`
|
|
25
|
-
*/
|
|
26
|
-
has(key: Path, refresh?: boolean): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Set a value if it doesn't exist, do nothing if it does
|
|
29
|
-
*
|
|
30
|
-
* @param key - Key whose existence is to be checked
|
|
31
|
-
* @param defaultValue - Default value if `key` not exist
|
|
32
|
-
* @param write - Optional parameter, if true, the changes will be written to the file.
|
|
33
|
-
*/
|
|
34
|
-
ensureExists(key: Path, defaultValue: JSONValue, write?: boolean): void;
|
|
35
|
-
/**
|
|
36
|
-
* Set a key (Path) to a value
|
|
37
|
-
*
|
|
38
|
-
* @param key - Key
|
|
39
|
-
* @param value - Value to set for they given `key`
|
|
40
|
-
* @param write - Optional parameter, if true, the changes will be written to the file.
|
|
41
|
-
*/
|
|
42
|
-
set(key: Path, value: any, write?: boolean): void;
|
|
43
|
-
/**
|
|
44
|
-
* Insert an item in an array path
|
|
45
|
-
*
|
|
46
|
-
* @param key - Key to the array
|
|
47
|
-
* @param value - Value to insert in the array
|
|
48
|
-
* @param at - Index
|
|
49
|
-
* @param write - Optional parameter, if true, the changes will be written to the file.
|
|
50
|
-
*/
|
|
51
|
-
insert(key: Path, value: any, at?: number, write?: boolean): void;
|
|
52
|
-
/**
|
|
53
|
-
* Create (if path isn't an array) and push the value to it. Can push unlimited number of values
|
|
54
|
-
*
|
|
55
|
-
* @param key - Key to the array
|
|
56
|
-
* @param write - Optional parameter, if true, the changes will be written to the file.
|
|
57
|
-
* @param items - Values to push in to the array
|
|
58
|
-
*/
|
|
59
|
-
push(key: Path, write?: boolean, ...items: any[]): void;
|
|
60
|
-
/**
|
|
61
|
-
* Deletes a member from object or array
|
|
62
|
-
*
|
|
63
|
-
* @param key - Key to lookup for
|
|
64
|
-
* @param write - Optional parameter, if true, the changes will be written to the file.
|
|
65
|
-
*/
|
|
66
|
-
delete(key: Path, write?: boolean): void;
|
|
67
|
-
/**
|
|
68
|
-
* @param refresh - Re-Read config.json
|
|
69
|
-
*
|
|
70
|
-
* @returns config.json
|
|
71
|
-
*/
|
|
72
|
-
all(refresh?: boolean): PluginConfig;
|
|
73
|
-
/**
|
|
74
|
-
* @param config - New config.json
|
|
75
|
-
* @param write - Optional parameter, if true, the changes will be written to the file.
|
|
76
|
-
*/
|
|
77
|
-
replace(config: PluginConfig, write?: boolean): void;
|
|
78
|
-
/**
|
|
79
|
-
* Updates a specific value in a nested object structure by a given path and key.
|
|
80
|
-
*
|
|
81
|
-
* @param path - The path to the nested object.
|
|
82
|
-
* @param searchKey - The key to search for.
|
|
83
|
-
* @param searchValue - The value to match the searchKey.
|
|
84
|
-
* @param targetKey - The key of the value to be updated.
|
|
85
|
-
* @param newValue - The new value to be set.
|
|
86
|
-
* @param write - Optional parameter, if true, the changes will be written to the file.
|
|
87
|
-
*/
|
|
88
|
-
updateValue(path: string, searchKey: string, searchValue: any, targetKey: string, newValue: any, write?: boolean): void;
|
|
89
|
-
/**
|
|
90
|
-
* Replaces a specific item in a nested object structure by a given path and key.
|
|
91
|
-
* If the item does not exist, it will be added.
|
|
92
|
-
* If the path does not exist, it will be created.
|
|
93
|
-
*
|
|
94
|
-
* @param path - The path to the nested object.
|
|
95
|
-
* @param searchKey - The key to search for.
|
|
96
|
-
* @param searchValue - The value to match the searchKey.
|
|
97
|
-
* @param newItem - The new item to replace the old one. If the item does not exist, it will be added.
|
|
98
|
-
* @param write - Optional parameter, if true, the changes will be written to the file.
|
|
99
|
-
*/
|
|
100
|
-
replaceOrAddItem(path: string, searchKey: string, searchValue: any, newItem: any, write?: boolean): void;
|
|
101
|
-
private init;
|
|
102
|
-
private read;
|
|
103
|
-
private write;
|
|
104
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class PluginLogger {
|
|
2
|
-
private _loggerPrefix;
|
|
3
|
-
private get prefix();
|
|
4
|
-
constructor(prefix: string);
|
|
5
|
-
log(...args: any[]): void;
|
|
6
|
-
error(...args: any[]): void;
|
|
7
|
-
warn(...args: any[]): void;
|
|
8
|
-
attention(...args: any[]): void;
|
|
9
|
-
debug(...args: any[]): void;
|
|
10
|
-
trace(...args: any[]): void;
|
|
11
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { CameraController } from '../../../camera';
|
|
2
|
-
import type { Camera } from '../../../api/database/types';
|
|
3
|
-
import type { CameraSource, OnSetEvent, StateValues } from '../../../camera/types';
|
|
4
|
-
import type { IceServer } from '../../../services/config/types';
|
|
5
|
-
import type { ProxyInfo } from '../../types';
|
|
6
|
-
import type { PluginAPI } from '../api';
|
|
7
|
-
import type { PluginLogger } from '../logger';
|
|
8
|
-
export declare class CameraDeviceClientProxy extends CameraController {
|
|
9
|
-
private api;
|
|
10
|
-
private logger;
|
|
11
|
-
private dealer;
|
|
12
|
-
private subscriber;
|
|
13
|
-
private messageQueue;
|
|
14
|
-
private dealerId;
|
|
15
|
-
private subscriberIds;
|
|
16
|
-
private pluginID;
|
|
17
|
-
private routerAddress;
|
|
18
|
-
private publisherAddress;
|
|
19
|
-
get sources(): CameraSource[];
|
|
20
|
-
constructor(api: PluginAPI, logger: PluginLogger, camera: Camera, pluginId: string, pluginName: string, proxy: ProxyInfo);
|
|
21
|
-
connect(): Promise<void>;
|
|
22
|
-
disconnect(): Promise<void>;
|
|
23
|
-
reboot(): Promise<void>;
|
|
24
|
-
getFfmpegPath(): Promise<string>;
|
|
25
|
-
getIceServers(): Promise<IceServer[]>;
|
|
26
|
-
snapshot(forceNew?: boolean): Promise<ArrayBuffer>;
|
|
27
|
-
updateState<T extends keyof StateValues>(stateName: T, eventData: OnSetEvent<T>): Promise<void>;
|
|
28
|
-
refreshStates(): Promise<void>;
|
|
29
|
-
close(): void;
|
|
30
|
-
private handleRouterRequest;
|
|
31
|
-
private listenToSubscriberEvents;
|
|
32
|
-
private onRequest;
|
|
33
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import { CameraDeviceClientProxy } from './cameraDevice';
|
|
4
|
-
import type { CameraConfig, CameraDevice } from '../../../camera/types';
|
|
5
|
-
import type { DeviceManagerProxyEventCallbacks, DeviceManagerProxyMethods } from '../../../proxy/types';
|
|
6
|
-
import type { ProxyInfo } from '../../types';
|
|
7
|
-
import type { PluginAPI } from '../api';
|
|
8
|
-
import type { PluginLogger } from '../logger';
|
|
9
|
-
export declare interface DeviceManager extends DeviceManagerProxyMethods {
|
|
10
|
-
on<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
11
|
-
once<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
12
|
-
off<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
13
|
-
removeListener<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
14
|
-
removeAllListeners<E extends keyof DeviceManagerProxyEventCallbacks>(event?: E): this;
|
|
15
|
-
}
|
|
16
|
-
export declare class DeviceManagerClient extends EventEmitter implements DeviceManager {
|
|
17
|
-
private api;
|
|
18
|
-
private logger;
|
|
19
|
-
private dealer;
|
|
20
|
-
private subscriber;
|
|
21
|
-
private messageQueue;
|
|
22
|
-
private proxy;
|
|
23
|
-
private pluginId;
|
|
24
|
-
private pluginName;
|
|
25
|
-
private dealerId;
|
|
26
|
-
private subscriberIds;
|
|
27
|
-
private devices;
|
|
28
|
-
constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxy: ProxyInfo);
|
|
29
|
-
getCameraById(id: string): Promise<CameraDevice | undefined>;
|
|
30
|
-
getCameraByName(name: string): Promise<CameraDevice | undefined>;
|
|
31
|
-
createCamera(cameraConfig: CameraConfig): Promise<CameraDevice>;
|
|
32
|
-
removeCameraByName(name: string): Promise<void>;
|
|
33
|
-
removeCameraById(id: string): Promise<void>;
|
|
34
|
-
emit(): boolean;
|
|
35
|
-
on<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
36
|
-
once<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
37
|
-
off<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
38
|
-
removeListener<E extends keyof DeviceManagerProxyEventCallbacks>(event: E, listener: DeviceManagerProxyEventCallbacks[E]): this;
|
|
39
|
-
removeAllListeners<E extends keyof DeviceManagerProxyEventCallbacks>(event?: E): this;
|
|
40
|
-
configureCameras(cameraDevices: CameraDeviceClientProxy[]): void;
|
|
41
|
-
private handleRouterRequest;
|
|
42
|
-
private listenToSubscriberEvents;
|
|
43
|
-
private onRequest;
|
|
44
|
-
private addOrGetCamera;
|
|
45
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import type { PluginsManagerProxyEventCallbacks, PluginsManagerProxyMethods } from '../../../proxy/types';
|
|
4
|
-
import type { ProxyInfo } from '../../types';
|
|
5
|
-
import type { PluginAPI } from '../api';
|
|
6
|
-
import type { PluginLogger } from '../logger';
|
|
7
|
-
export declare interface PluginsManager extends PluginsManagerProxyMethods {
|
|
8
|
-
on<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
|
|
9
|
-
once<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
|
|
10
|
-
off<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
|
|
11
|
-
removeListener<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
|
|
12
|
-
removeAllListeners<E extends keyof PluginsManagerProxyEventCallbacks>(event?: E): this;
|
|
13
|
-
}
|
|
14
|
-
export declare class PluginsManagerClient extends EventEmitter implements PluginsManager {
|
|
15
|
-
private api;
|
|
16
|
-
private logger;
|
|
17
|
-
private dealer;
|
|
18
|
-
private subscriber;
|
|
19
|
-
private messageQueue;
|
|
20
|
-
private pluginId;
|
|
21
|
-
private pluginName;
|
|
22
|
-
private dealerId;
|
|
23
|
-
private subscriberIds;
|
|
24
|
-
constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxy: ProxyInfo);
|
|
25
|
-
emit(): boolean;
|
|
26
|
-
on<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
|
|
27
|
-
once<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
|
|
28
|
-
off<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
|
|
29
|
-
removeListener<E extends keyof PluginsManagerProxyEventCallbacks>(event: E, listener: PluginsManagerProxyEventCallbacks[E]): this;
|
|
30
|
-
removeAllListeners<E extends keyof PluginsManagerProxyEventCallbacks>(event?: E): this;
|
|
31
|
-
private handleRouterRequest;
|
|
32
|
-
private listenToSubscriberEvents;
|
|
33
|
-
private onRequest;
|
|
34
|
-
private isPluginMessage;
|
|
35
|
-
private isStorageMessage;
|
|
36
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Dealer } from '@seydx/zeromq';
|
|
2
|
-
import type { ProxyMessageStructure } from '../../../proxy/types';
|
|
3
|
-
import type { PluginLogger } from '../logger';
|
|
4
|
-
export declare class ClientMessageQueue {
|
|
5
|
-
private logger;
|
|
6
|
-
private dealer;
|
|
7
|
-
private requestHandler;
|
|
8
|
-
private aborted;
|
|
9
|
-
private isProcessing;
|
|
10
|
-
private queue;
|
|
11
|
-
private pendingResponses;
|
|
12
|
-
constructor(logger: PluginLogger, requestHandler: (message: ProxyMessageStructure) => void, dealer: Dealer);
|
|
13
|
-
abortQueue(): void;
|
|
14
|
-
enqueue(message: ProxyMessageStructure): Promise<any>;
|
|
15
|
-
private processQueue;
|
|
16
|
-
private listenToRouter;
|
|
17
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import type { SystemManagerProxyEventCallbacks, SystemManagerProxyMethods } from '../../../proxy/types';
|
|
4
|
-
import type { ProxyInfo } from '../../types';
|
|
5
|
-
import type { PluginAPI } from '../api';
|
|
6
|
-
import type { PluginLogger } from '../logger';
|
|
7
|
-
export declare interface SystemManager extends SystemManagerProxyMethods {
|
|
8
|
-
on<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
|
|
9
|
-
once<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
|
|
10
|
-
off<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
|
|
11
|
-
removeListener<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
|
|
12
|
-
removeAllListeners<E extends keyof SystemManagerProxyEventCallbacks>(event?: E): this;
|
|
13
|
-
}
|
|
14
|
-
export declare class SystemManagerClient extends EventEmitter implements SystemManager {
|
|
15
|
-
private api;
|
|
16
|
-
private logger;
|
|
17
|
-
private dealer;
|
|
18
|
-
private subscriber;
|
|
19
|
-
private messageQueue;
|
|
20
|
-
private pluginId;
|
|
21
|
-
private pluginName;
|
|
22
|
-
private dealerId;
|
|
23
|
-
private subscriberIds;
|
|
24
|
-
constructor(api: PluginAPI, logger: PluginLogger, pluginId: string, pluginName: string, proxy: ProxyInfo);
|
|
25
|
-
emit(): boolean;
|
|
26
|
-
on<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
|
|
27
|
-
once<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
|
|
28
|
-
off<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
|
|
29
|
-
removeListener<E extends keyof SystemManagerProxyEventCallbacks>(event: E, listener: SystemManagerProxyEventCallbacks[E]): this;
|
|
30
|
-
removeAllListeners<E extends keyof SystemManagerProxyEventCallbacks>(event?: E): this;
|
|
31
|
-
private handleRouterRequest;
|
|
32
|
-
private listenToSubscriberEvents;
|
|
33
|
-
private onRequest;
|
|
34
|
-
}
|
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
import { z, type ZodTypeAny } from 'zod';
|
|
2
|
-
import type { JsonSchema, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBoolean, JsonSchemaButton, JsonSchemaEnum, JsonSchemaNumber, JsonSchemaObject, JsonSchemaObjectWithButtons, JsonSchemaString, PluginJsonSchema, PluginJsonSchemaForm, PluginRootSchema, RootSchema } from '../types';
|
|
3
|
-
type RootZodSchema = z.ZodObject<Record<string, ZodTypeAny>, 'strict', ZodTypeAny, {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
}, {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
}>;
|
|
8
|
-
type OptionalZodString = z.ZodOptional<z.ZodString> | z.ZodString | z.ZodOptional<z.ZodEffects<z.ZodString, string, string>> | z.ZodEffects<z.ZodString, string, string>;
|
|
9
|
-
type OptionalZodNumber = z.ZodOptional<z.ZodNumber> | z.ZodNumber | z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>> | z.ZodEffects<z.ZodNumber, number, number>;
|
|
10
|
-
type OptionalZodBoolean = z.ZodOptional<z.ZodBoolean> | z.ZodBoolean;
|
|
11
|
-
type OptionalZodZobject = z.ZodOptional<z.ZodObject<Record<string, z.ZodTypeAny>, 'strict', z.ZodTypeAny, {
|
|
12
|
-
[x: string]: any;
|
|
13
|
-
}, {
|
|
14
|
-
[x: string]: any;
|
|
15
|
-
}>> | z.ZodObject<Record<string, z.ZodTypeAny>, 'strict', z.ZodTypeAny, {
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
}, {
|
|
18
|
-
[x: string]: any;
|
|
19
|
-
}> | z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>> | z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
20
|
-
type OptionalZodArray = z.ZodOptional<z.ZodType<any, any, any>> | z.ZodType<any, any, any>;
|
|
21
|
-
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>;
|
|
22
|
-
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>;
|
|
23
|
-
type ZodAny = z.ZodType<any, any, any>;
|
|
24
|
-
/**
|
|
25
|
-
* Generate root JSON schema from value.
|
|
26
|
-
*
|
|
27
|
-
* @param value - Value.
|
|
28
|
-
* @returns - Root JSON schema.
|
|
29
|
-
*/
|
|
30
|
-
export declare const generateRootSchema: (value: Record<string, any>) => RootSchema;
|
|
31
|
-
/**
|
|
32
|
-
* Generate JSON schema from value.
|
|
33
|
-
*
|
|
34
|
-
* @param value - Value.
|
|
35
|
-
* @returns - JSON schema.
|
|
36
|
-
*/
|
|
37
|
-
export declare const generateSchema: (value: any) => JsonSchema;
|
|
38
|
-
/**
|
|
39
|
-
* Generate a JSON object from a given Root JSON schema.
|
|
40
|
-
*
|
|
41
|
-
* @param rootSchema - The Root JSON schema.
|
|
42
|
-
* @returns - The generated JSON object.
|
|
43
|
-
*/
|
|
44
|
-
export declare const generateJsonFromRootSchema: (rootSchema: RootSchema | PluginRootSchema) => Record<string, any>;
|
|
45
|
-
/**
|
|
46
|
-
* Generate a JSON object from a JSON schema.
|
|
47
|
-
*
|
|
48
|
-
* @param jsonSchema - The JSON schema.
|
|
49
|
-
* @returns - The generated JSON object.
|
|
50
|
-
*/
|
|
51
|
-
export declare const generateJsonFromSchema: (jsonSchema: JsonSchema | PluginJsonSchema) => any;
|
|
52
|
-
/**
|
|
53
|
-
* Generate a JSON object from a given JSON schema and use values from a config file.
|
|
54
|
-
*
|
|
55
|
-
* @param jsonSchema - The JSON schema.
|
|
56
|
-
* @param config - The config file with values to use.
|
|
57
|
-
* @returns - The generated JSON object.
|
|
58
|
-
*/
|
|
59
|
-
export declare const generateJsonFromSchemaWithConfig: (jsonSchema: JsonSchema | PluginJsonSchema, config: Record<string, any>, path?: string) => any;
|
|
60
|
-
/**
|
|
61
|
-
* Removes all functions from a given Plugin JSON schema form.
|
|
62
|
-
*
|
|
63
|
-
* @param schemaForm - The Plugin JSON schema form from which the functions should be removed.
|
|
64
|
-
* @returns - The Plugin JSON schema form without functions.
|
|
65
|
-
*/
|
|
66
|
-
export declare const removeFunctionsFromSchemaForm: (schemaForm: PluginJsonSchemaForm) => PluginJsonSchemaForm;
|
|
67
|
-
/**
|
|
68
|
-
* Removes all functions from a given Plugin JSON schema.
|
|
69
|
-
*
|
|
70
|
-
* @param jsonSchema - The JSON schema from which the functions should be removed.
|
|
71
|
-
* @returns - The JSON schema without functions.
|
|
72
|
-
*/
|
|
73
|
-
export declare const removeFunctionsFromSchema: (jsonSchema: PluginJsonSchema) => PluginJsonSchema;
|
|
74
|
-
/**
|
|
75
|
-
* Converts a config path to a schema path.
|
|
76
|
-
*
|
|
77
|
-
* @param configPath - The config path to be converted.
|
|
78
|
-
* @returns - The converted schema path.
|
|
79
|
-
*/
|
|
80
|
-
export declare const configPathToSchemaPath: (configPath: string) => string;
|
|
81
|
-
/**
|
|
82
|
-
* Converts a schema path to a config path.
|
|
83
|
-
*
|
|
84
|
-
* @param schemaPath - The schema path to be converted.
|
|
85
|
-
* @returns - The converted config path.
|
|
86
|
-
*/
|
|
87
|
-
export declare const schemaPathToConfigPath: (schemaPath: string) => string;
|
|
88
|
-
/**
|
|
89
|
-
* Recursively searches a JSON object for a specific, potentially nested key path and returns its value.
|
|
90
|
-
*
|
|
91
|
-
* @param obj - The JSON object to be searched.
|
|
92
|
-
* @param path - The key path to search for.
|
|
93
|
-
* @returns - The value of the searched key path, if found, otherwise undefined.
|
|
94
|
-
*/
|
|
95
|
-
export declare const getValueByPath: (obj: any, path: string) => any;
|
|
96
|
-
/**
|
|
97
|
-
* Generates a Zod schema from a given JSON schema.
|
|
98
|
-
*
|
|
99
|
-
* @param jsonSchema - The JSON schema from which the Zod schema should be generated.
|
|
100
|
-
* @returns - The generated Zod schema.
|
|
101
|
-
*/
|
|
102
|
-
export declare const generateZodSchemaFromRoot: (rootSchema: RootSchema) => RootZodSchema;
|
|
103
|
-
/**
|
|
104
|
-
* Generates a Zod schema from a given JSON schema.
|
|
105
|
-
*
|
|
106
|
-
* @param jsonSchema - The JSON schema from which the Zod schema should be generated.
|
|
107
|
-
* @param initial - A boolean indicating whether this is the initial call to the function.
|
|
108
|
-
* This is used for handling nested schemas.
|
|
109
|
-
* @returns - The generated Zod schema.
|
|
110
|
-
*/
|
|
111
|
-
export declare const generateZodSchema: (jsonSchema: JsonSchema) => ZodAny;
|
|
112
|
-
/**
|
|
113
|
-
* Generates a JSON schema for a number.
|
|
114
|
-
*
|
|
115
|
-
* @param value - The number for which the JSON schema should be generated.
|
|
116
|
-
* @returns - The generated JSON schema for the number.
|
|
117
|
-
*/
|
|
118
|
-
export declare const generateNumberSchema: () => JsonSchemaNumber;
|
|
119
|
-
/**
|
|
120
|
-
* Generates a JSON schema for a boolean.
|
|
121
|
-
*
|
|
122
|
-
* @param value - The boolean for which the JSON schema should be generated.
|
|
123
|
-
* @returns - The generated JSON schema for the boolean.
|
|
124
|
-
*/
|
|
125
|
-
export declare const genereateBooleanSchema: () => JsonSchemaBoolean;
|
|
126
|
-
/**
|
|
127
|
-
* Generates a JSON schema for a string.
|
|
128
|
-
*
|
|
129
|
-
* @param value - The string for which the JSON schema should be generated.
|
|
130
|
-
* @returns - The generated JSON schema for the string.
|
|
131
|
-
*/
|
|
132
|
-
export declare const generateStringSchema: (value: string) => JsonSchemaString;
|
|
133
|
-
/**
|
|
134
|
-
* Generates a JSON schema for an enum.
|
|
135
|
-
*
|
|
136
|
-
* @param value - The enum for which the JSON schema should be generated.
|
|
137
|
-
* @param type - The type of the enum.
|
|
138
|
-
* @returns - The generated JSON schema for the enum.
|
|
139
|
-
*/
|
|
140
|
-
export declare const generateEnumSchema: (value: string[]) => JsonSchemaEnum;
|
|
141
|
-
/**
|
|
142
|
-
* Generates a JSON schema for an object.
|
|
143
|
-
*
|
|
144
|
-
* @param value - The object for which the JSON schema should be generated.
|
|
145
|
-
* @returns - The generated JSON schema for the object.
|
|
146
|
-
*/
|
|
147
|
-
export declare const generateObjectSchema: (value: Record<string, any>) => JsonSchemaObject;
|
|
148
|
-
/**
|
|
149
|
-
* Generates a JSON schema for an object including up to two buttons.
|
|
150
|
-
*
|
|
151
|
-
* @param value - The object for which the JSON schema should be generated.
|
|
152
|
-
* @param buttons - Array of min one button and up to two buttons to be included in the schema.
|
|
153
|
-
* @returns - The generated JSON schema for the object.
|
|
154
|
-
*/
|
|
155
|
-
export declare const generateObjectSchemaWithButtons: (value: Record<string, any>, buttons: [JsonSchemaButton, JsonSchemaButton?]) => JsonSchemaObjectWithButtons;
|
|
156
|
-
/**
|
|
157
|
-
* Generates a JSON schema for an array.
|
|
158
|
-
*
|
|
159
|
-
* @param array - The array for which the JSON schema should be generated.
|
|
160
|
-
* @returns - The generated JSON schema for the array.
|
|
161
|
-
*/
|
|
162
|
-
export declare const generateArraySchema: (array: any[]) => JsonSchemaArray;
|
|
163
|
-
/**
|
|
164
|
-
* Checks if the given JSON schema is of string type.
|
|
165
|
-
*
|
|
166
|
-
* @param jsonSchema - The JSON schema to check.
|
|
167
|
-
* @returns - True if the JSON schema is of string type, false otherwise.
|
|
168
|
-
*/
|
|
169
|
-
export declare const isStringType: (jsonSchema: Partial<JsonSchema>) => jsonSchema is JsonSchemaString;
|
|
170
|
-
/**
|
|
171
|
-
* Checks if the given JSON schema is of number type.
|
|
172
|
-
*
|
|
173
|
-
* @param jsonSchema - The JSON schema to check.
|
|
174
|
-
* @returns - True if the JSON schema is of number type, false otherwise.
|
|
175
|
-
*/
|
|
176
|
-
export declare const isNumberType: (jsonSchema: Partial<JsonSchema>) => jsonSchema is JsonSchemaNumber;
|
|
177
|
-
/**
|
|
178
|
-
* Checks if the given JSON schema is of boolean type.
|
|
179
|
-
*
|
|
180
|
-
* @param jsonSchema - The JSON schema to check.
|
|
181
|
-
* @returns - True if the JSON schema is of boolean type, false otherwise.
|
|
182
|
-
*/
|
|
183
|
-
export declare const isBooleanType: (jsonSchema: Partial<JsonSchema>) => jsonSchema is JsonSchemaBoolean;
|
|
184
|
-
/**
|
|
185
|
-
* Checks if the given JSON schema is of enum type.
|
|
186
|
-
*
|
|
187
|
-
* @param jsonSchema - The JSON schema to check.
|
|
188
|
-
* @returns - True if the JSON schema is of enum type, false otherwise.
|
|
189
|
-
*/
|
|
190
|
-
export declare const isEnumType: (jsonSchema: Partial<JsonSchema>) => jsonSchema is JsonSchemaEnum;
|
|
191
|
-
/**
|
|
192
|
-
* Checks if the given JSON schema is of object type.
|
|
193
|
-
*
|
|
194
|
-
* @param jsonSchema - The JSON schema to check.
|
|
195
|
-
* @returns - True if the JSON schema is of object type, false otherwise.
|
|
196
|
-
*/
|
|
197
|
-
export declare const isObjectType: (jsonSchema: Partial<JsonSchema>) => jsonSchema is JsonSchemaObject;
|
|
198
|
-
/**
|
|
199
|
-
* Checks if the given JSON schema is of object type with buttons.
|
|
200
|
-
*
|
|
201
|
-
* @param jsonSchema - The JSON schema to check.
|
|
202
|
-
* @returns - True if the JSON schema is of object type with buttons, false otherwise.
|
|
203
|
-
*/
|
|
204
|
-
export declare const isObjectTypeWithButtons: (jsonSchema: Partial<JsonSchema>) => jsonSchema is JsonSchemaObjectWithButtons;
|
|
205
|
-
/**
|
|
206
|
-
* Checks if the given JSON schema is of array type.
|
|
207
|
-
*
|
|
208
|
-
* @param jsonSchema - The JSON schema to check.
|
|
209
|
-
* @returns - True if the JSON schema is of array type, false otherwise.
|
|
210
|
-
*/
|
|
211
|
-
export declare const isArrayType: (jsonSchema: Partial<JsonSchema>) => jsonSchema is JsonSchemaArray;
|
|
212
|
-
/**
|
|
213
|
-
* Checks if the given value is a JSON AnyOf Schema.
|
|
214
|
-
*
|
|
215
|
-
* @param value - The value to check.
|
|
216
|
-
* @returns - True if the value is a JSON AnyOf schema, false otherwise.
|
|
217
|
-
*/
|
|
218
|
-
export declare const isAnyOfSchema: (value: any) => value is JsonSchemaAnyOf;
|
|
219
|
-
/**
|
|
220
|
-
* Checks if the given value is a JSON Primitive schema.
|
|
221
|
-
*
|
|
222
|
-
* @param value - The value to check.
|
|
223
|
-
* @returns - True if the value is a JSON schema, false otherwise.
|
|
224
|
-
*/
|
|
225
|
-
export declare const isPrimitiveType: (value: any) => value is JsonSchemaString | JsonSchemaNumber | JsonSchemaBoolean | JsonSchemaEnum;
|
|
226
|
-
/**
|
|
227
|
-
* Creates a Zod string schema from a given JSON schema.
|
|
228
|
-
*
|
|
229
|
-
* @param jsonSchema - The JSON schema from which the Zod schema should be created.
|
|
230
|
-
* @returns - The created Zod string schema.
|
|
231
|
-
*/
|
|
232
|
-
export declare const createZodStringSchema: (jsonSchema: JsonSchemaString) => OptionalZodString;
|
|
233
|
-
/**
|
|
234
|
-
* Creates a Zod number schema from a given JSON schema.
|
|
235
|
-
*
|
|
236
|
-
* @param jsonSchema - The JSON schema from which the Zod schema should be created.
|
|
237
|
-
* @returns - The created Zod number schema.
|
|
238
|
-
*/
|
|
239
|
-
export declare const createZodNumberSchema: (jsonSchema: JsonSchemaNumber) => OptionalZodNumber;
|
|
240
|
-
/**
|
|
241
|
-
* Creates a Zod boolean schema from a given JSON schema.
|
|
242
|
-
*
|
|
243
|
-
* @param jsonSchema - The JSON schema from which the Zod schema should be created.
|
|
244
|
-
* @returns - The created Zod boolean schema.
|
|
245
|
-
*/
|
|
246
|
-
export declare const createZodBooleanSchema: (jsonSchema: JsonSchemaBoolean) => OptionalZodBoolean;
|
|
247
|
-
/**
|
|
248
|
-
* Creates a Zod union schema from a given JSON schema.
|
|
249
|
-
*
|
|
250
|
-
* @param jsonSchema - The JSON schema from which the Zod schema should be created.
|
|
251
|
-
* @returns - The created Zod union schema.
|
|
252
|
-
*/
|
|
253
|
-
export declare const createEnumSchema: (jsonSchema: JsonSchemaEnum) => OptionalZodEnum | OptionalZodEnumMultiple;
|
|
254
|
-
/**
|
|
255
|
-
* Creates a Zod object schema from a given JSON schema.
|
|
256
|
-
*
|
|
257
|
-
* @param jsonSchema - The JSON schema from which the Zod schema should be created.
|
|
258
|
-
* @returns - The created Zod object schema.
|
|
259
|
-
*/
|
|
260
|
-
export declare const createZodObjectSchema: (jsonSchema: JsonSchemaObject) => OptionalZodZobject;
|
|
261
|
-
/**
|
|
262
|
-
* Creates a Zod array schema from a given JSON schema.
|
|
263
|
-
*
|
|
264
|
-
* @param jsonSchema - The JSON schema from which the Zod schema should be created.
|
|
265
|
-
* @returns - The created Zod array schema.
|
|
266
|
-
*/
|
|
267
|
-
export declare const createZodArraySchema: (jsonSchema: JsonSchemaArray) => OptionalZodArray;
|
|
268
|
-
export {};
|