camstreamerlib 4.0.0-beta.37 → 4.0.0-beta.38
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/cjs/CamOverlayAPI.js +42 -69
- package/cjs/CamScripterAPI.js +30 -24
- package/cjs/CamStreamerAPI.js +30 -33
- package/cjs/CamSwitcherAPI.js +57 -52
- package/cjs/PlaneTrackerAPI.js +55 -66
- package/cjs/VapixAPI.js +23 -22
- package/cjs/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +1 -1
- package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +4 -14
- package/cjs/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +1 -1
- package/cjs/{VapixEvents.js → node/VapixEvents.js} +1 -1
- package/cjs/node/events/GenetecAgent.js +5 -27
- package/cjs/node/index.js +17 -0
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
- package/cjs/types/CamOverlayPainter.js +12 -0
- package/cjs/types/CamScripterAPICameraEventsGenerator.js +2 -0
- package/cjs/types/CamSwitcherAPI.js +38 -1
- package/cjs/types/GenetecAgent.js +31 -0
- package/cjs/types/PlaneTrackerAPI.js +277 -0
- package/cjs/types/VapixAPI.js +20 -2
- package/cjs/types/VapixEvents.js +2 -0
- package/esm/CamOverlayAPI.js +43 -70
- package/esm/CamScripterAPI.js +30 -24
- package/esm/CamStreamerAPI.js +30 -30
- package/esm/CamSwitcherAPI.js +58 -53
- package/esm/PlaneTrackerAPI.js +56 -67
- package/esm/VapixAPI.js +24 -23
- package/esm/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +1 -1
- package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +1 -11
- package/esm/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +1 -1
- package/esm/{VapixEvents.js → node/VapixEvents.js} +1 -1
- package/esm/node/events/GenetecAgent.js +1 -23
- package/esm/node/index.js +10 -0
- package/esm/types/CamOverlayAPI/CamOverlayAPI.js +1 -1
- package/esm/types/CamOverlayPainter.js +11 -1
- package/esm/types/CamSwitcherAPI.js +38 -1
- package/esm/types/GenetecAgent.js +28 -0
- package/esm/types/PlaneTrackerAPI.js +276 -1
- package/esm/types/VapixAPI.js +19 -1
- package/esm/types/VapixEvents.js +1 -0
- package/package.json +1 -1
- package/types/CamOverlayAPI.d.ts +16 -6
- package/types/CamScripterAPI.d.ts +34 -9
- package/types/CamStreamerAPI.d.ts +27 -5
- package/types/CamSwitcherAPI.d.ts +136 -23
- package/types/PlaneTrackerAPI.d.ts +201 -20
- package/types/VapixAPI.d.ts +46 -12
- package/types/bin/CreatePackage.d.ts +1 -0
- package/types/{CamOverlayDrawingAPI.d.ts → node/CamOverlayDrawingAPI.d.ts} +1 -1
- package/types/{CamOverlayPainter → node/CamOverlayPainter}/Frame.d.ts +2 -2
- package/types/{CamOverlayPainter → node/CamOverlayPainter}/Painter.d.ts +2 -13
- package/types/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.d.ts +1 -1
- package/types/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
- package/types/node/VapixEvents.d.ts +16 -0
- package/types/node/events/GenetecAgent.d.ts +1 -144
- package/types/node/index.d.ts +10 -0
- package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +2 -2
- package/types/types/CamOverlayDrawingAPI.d.ts +3 -13
- package/types/types/CamOverlayPainter.d.ts +12 -10
- package/types/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
- package/types/types/CamStreamerAPI.d.ts +2 -2
- package/types/types/CamSwitcherAPI.d.ts +111 -30
- package/types/types/GenetecAgent.d.ts +174 -0
- package/types/types/PlaneTrackerAPI.d.ts +859 -0
- package/types/types/VapixAPI.d.ts +54 -8
- package/types/types/VapixEvents.d.ts +15 -0
- package/types/types/common.d.ts +1 -0
- package/types/CamScripterAPICameraEventsGenerator.d.ts +0 -74
- package/types/VapixEvents.d.ts +0 -43
- /package/cjs/{CreatePackage.js → bin/CreatePackage.js} +0 -0
- /package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +0 -0
- /package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +0 -0
- /package/esm/{CreatePackage.js → bin/CreatePackage.js} +0 -0
- /package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +0 -0
- /package/esm/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +0 -0
- /package/{types/CreatePackage.d.ts → esm/types/CamScripterAPICameraEventsGenerator.js} +0 -0
package/cjs/PlaneTrackerAPI.js
CHANGED
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PlaneTrackerAPI = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const utils_1 = require("./internal/utils");
|
|
6
|
+
const PlaneTrackerAPI_1 = require("./types/PlaneTrackerAPI");
|
|
6
7
|
const errors_1 = require("./errors/errors");
|
|
7
8
|
const ProxyClient_1 = require("./internal/ProxyClient");
|
|
9
|
+
const GenetecAgent_1 = require("./types/GenetecAgent");
|
|
8
10
|
const BASE_PATH = '/local/planetracker';
|
|
9
11
|
class PlaneTrackerAPI {
|
|
10
12
|
client;
|
|
@@ -13,13 +15,13 @@ class PlaneTrackerAPI {
|
|
|
13
15
|
this.client = client;
|
|
14
16
|
this.apiUser = apiUser;
|
|
15
17
|
}
|
|
16
|
-
static
|
|
18
|
+
static getProxyPath = () => `${BASE_PATH}/proxy.cgi`;
|
|
17
19
|
getClient(proxyParams) {
|
|
18
20
|
return proxyParams ? new ProxyClient_1.ProxyClient(this.client, proxyParams) : this.client;
|
|
19
21
|
}
|
|
20
22
|
async checkCameraTime(options) {
|
|
21
|
-
const
|
|
22
|
-
return zod_1.z.boolean().parse(
|
|
23
|
+
const res = await this._getJson(`${BASE_PATH}/camera_time.cgi`, undefined, options);
|
|
24
|
+
return zod_1.z.boolean().parse(res.state);
|
|
23
25
|
}
|
|
24
26
|
async resetPtzCalibration(options) {
|
|
25
27
|
const agent = this.getClient(options?.proxyParams);
|
|
@@ -50,7 +52,8 @@ class PlaneTrackerAPI {
|
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
async fetchCameraSettings(options) {
|
|
53
|
-
|
|
55
|
+
const res = await this._getJson(`${BASE_PATH}/package_camera_settings.cgi`, { action: 'get' }, options);
|
|
56
|
+
return PlaneTrackerAPI_1.cameraSettingsSchema.parse(res);
|
|
54
57
|
}
|
|
55
58
|
async setCameraSettings(settingsJsonString, options) {
|
|
56
59
|
return await this._postJsonEncoded(`${BASE_PATH}/package_camera_settings.cgi`, settingsJsonString, {
|
|
@@ -58,7 +61,8 @@ class PlaneTrackerAPI {
|
|
|
58
61
|
}, options);
|
|
59
62
|
}
|
|
60
63
|
async fetchServerSettings(options) {
|
|
61
|
-
|
|
64
|
+
const res = await this._getJson(`${BASE_PATH}/package_server_settings.cgi`, { action: 'get' }, options);
|
|
65
|
+
return PlaneTrackerAPI_1.serverSettingsSchema.parse(res);
|
|
62
66
|
}
|
|
63
67
|
async exportAppSettings(dataType, options) {
|
|
64
68
|
return await this._getBlob(`${BASE_PATH}/package_data.cgi`, { action: 'EXPORT', dataType }, options);
|
|
@@ -73,13 +77,15 @@ class PlaneTrackerAPI {
|
|
|
73
77
|
});
|
|
74
78
|
}
|
|
75
79
|
async fetchFlightInfo(icao, options) {
|
|
76
|
-
|
|
80
|
+
const res = await this._getJson(`${BASE_PATH}/package/flightInfo.cgi`, { icao }, options);
|
|
81
|
+
return PlaneTrackerAPI_1.flightInfoSchema.parse(res);
|
|
77
82
|
}
|
|
78
83
|
async getTrackingMode(options) {
|
|
79
|
-
|
|
84
|
+
const res = await this._getJson(`${BASE_PATH}/package/getTrackingMode.cgi`, undefined, options);
|
|
85
|
+
return PlaneTrackerAPI_1.trackingModeSchema.parse(res);
|
|
80
86
|
}
|
|
81
|
-
async setTrackingMode(
|
|
82
|
-
return await this._postJsonEncoded(`${BASE_PATH}/package/setTrackingMode.cgi`,
|
|
87
|
+
async setTrackingMode(mode, options) {
|
|
88
|
+
return await this._postJsonEncoded(`${BASE_PATH}/package/setTrackingMode.cgi`, { mode }, this.apiUser, options);
|
|
83
89
|
}
|
|
84
90
|
async startTrackingPlane(icao, options) {
|
|
85
91
|
const agent = this.getClient(options?.proxyParams);
|
|
@@ -98,31 +104,36 @@ class PlaneTrackerAPI {
|
|
|
98
104
|
});
|
|
99
105
|
}
|
|
100
106
|
async getPriorityList(options) {
|
|
101
|
-
|
|
107
|
+
const res = await this._getJson(`${BASE_PATH}/package/getPriorityList.cgi`, undefined, options);
|
|
108
|
+
return PlaneTrackerAPI_1.priorityListSchema.parse(res);
|
|
102
109
|
}
|
|
103
|
-
async setPriorityList(
|
|
104
|
-
return await this._postJsonEncoded(`${BASE_PATH}/package/setPriorityList.cgi`,
|
|
110
|
+
async setPriorityList(priorityList, options) {
|
|
111
|
+
return await this._postJsonEncoded(`${BASE_PATH}/package/setPriorityList.cgi`, { priorityList }, this.apiUser, options);
|
|
105
112
|
}
|
|
106
113
|
async getWhiteList(options) {
|
|
107
|
-
|
|
114
|
+
const res = await this._getJson(`${BASE_PATH}/package/getWhiteList.cgi`, undefined, options);
|
|
115
|
+
return PlaneTrackerAPI_1.whiteListSchema.parse(res);
|
|
108
116
|
}
|
|
109
|
-
async setWhiteList(
|
|
110
|
-
return await this._postJsonEncoded(`${BASE_PATH}/package/setWhiteList.cgi`,
|
|
117
|
+
async setWhiteList(whiteList, options) {
|
|
118
|
+
return await this._postJsonEncoded(`${BASE_PATH}/package/setWhiteList.cgi`, { whiteList }, this.apiUser, options);
|
|
111
119
|
}
|
|
112
120
|
async getBlackList(options) {
|
|
113
|
-
|
|
121
|
+
const res = await this._getJson(`${BASE_PATH}/package/getBlackList.cgi`, undefined, options);
|
|
122
|
+
return PlaneTrackerAPI_1.blackListSchema.parse(res);
|
|
114
123
|
}
|
|
115
|
-
async setBlackList(
|
|
116
|
-
return await this._postJsonEncoded(`${BASE_PATH}/package/setBlackList.cgi`,
|
|
124
|
+
async setBlackList(blackList, options) {
|
|
125
|
+
return await this._postJsonEncoded(`${BASE_PATH}/package/setBlackList.cgi`, { blackList }, this.apiUser, options);
|
|
117
126
|
}
|
|
118
127
|
async fetchMapInfo(options) {
|
|
119
|
-
|
|
128
|
+
const res = await this._getJson(`${BASE_PATH}/package/getMapInfo.cgi`, undefined, options);
|
|
129
|
+
return PlaneTrackerAPI_1.mapInfoSchema.parse(res);
|
|
120
130
|
}
|
|
121
131
|
async getZones(options) {
|
|
122
|
-
|
|
132
|
+
const res = await this._getJson(`${BASE_PATH}/package/getZones.cgi`, undefined, options);
|
|
133
|
+
return PlaneTrackerAPI_1.zonesSchema.parse(res);
|
|
123
134
|
}
|
|
124
|
-
async setZones(
|
|
125
|
-
return await this._postJsonEncoded(`${BASE_PATH}/package/setZones.cgi`,
|
|
135
|
+
async setZones(zones, options) {
|
|
136
|
+
return await this._postJsonEncoded(`${BASE_PATH}/package/setZones.cgi`, { zones }, this.apiUser, options);
|
|
126
137
|
}
|
|
127
138
|
async goToCoordinates(lat, lon, alt, options) {
|
|
128
139
|
const agent = this.getClient(options?.proxyParams);
|
|
@@ -133,19 +144,25 @@ class PlaneTrackerAPI {
|
|
|
133
144
|
});
|
|
134
145
|
}
|
|
135
146
|
async checkGenetecConnection(params, options) {
|
|
136
|
-
return await this._postUrlEncoded(`${BASE_PATH}/package/checkGenetecConnection.cgi`, params, options);
|
|
147
|
+
return await this._postUrlEncoded(`${BASE_PATH}/package/checkGenetecConnection.cgi`, '', params, options);
|
|
137
148
|
}
|
|
138
149
|
async getGenetecCameraList(params, options) {
|
|
139
|
-
const res = await this._postUrlEncoded(`${BASE_PATH}/package/getGenetecCameraList.cgi`, params, options);
|
|
140
|
-
return
|
|
150
|
+
const res = await this._postUrlEncoded(`${BASE_PATH}/package/getGenetecCameraList.cgi`, '', params, options);
|
|
151
|
+
return GenetecAgent_1.cameraListSchema.parse(res);
|
|
141
152
|
}
|
|
142
|
-
async _getJson(path, parameters, options) {
|
|
153
|
+
async _getJson(path, parameters, options, headers) {
|
|
143
154
|
const agent = this.getClient(options?.proxyParams);
|
|
144
|
-
const res = await agent.get({
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
155
|
+
const res = await agent.get({ path, parameters, timeout: options?.timeout, headers });
|
|
156
|
+
if (res.ok) {
|
|
157
|
+
return await res.json();
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
throw new Error(await (0, utils_1.responseStringify)(res));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
async _post(path, data, parameters, options, headers) {
|
|
164
|
+
const agent = this.getClient(options?.proxyParams);
|
|
165
|
+
const res = await agent.post({ path, data, parameters, headers, timeout: options?.timeout });
|
|
149
166
|
if (res.ok) {
|
|
150
167
|
return await res.json();
|
|
151
168
|
}
|
|
@@ -155,11 +172,7 @@ class PlaneTrackerAPI {
|
|
|
155
172
|
}
|
|
156
173
|
async _getBlob(path, parameters, options) {
|
|
157
174
|
const agent = this.getClient(options?.proxyParams);
|
|
158
|
-
const res = await agent.get({
|
|
159
|
-
path,
|
|
160
|
-
parameters,
|
|
161
|
-
timeout: options?.timeout,
|
|
162
|
-
});
|
|
175
|
+
const res = await agent.get({ path, parameters, timeout: options?.timeout });
|
|
163
176
|
if (res.ok) {
|
|
164
177
|
return await this.parseBlobResponse(res);
|
|
165
178
|
}
|
|
@@ -175,37 +188,13 @@ class PlaneTrackerAPI {
|
|
|
175
188
|
throw new errors_1.ParsingBlobError(err);
|
|
176
189
|
}
|
|
177
190
|
}
|
|
178
|
-
async
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
path,
|
|
182
|
-
data,
|
|
183
|
-
parameters,
|
|
184
|
-
headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' },
|
|
185
|
-
timeout: options?.timeout,
|
|
186
|
-
});
|
|
187
|
-
if (res.ok) {
|
|
188
|
-
return res;
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
throw new Error(await (0, utils_1.responseStringify)(res));
|
|
192
|
-
}
|
|
191
|
+
async _postUrlEncoded(path, data, parameters, options, headers) {
|
|
192
|
+
const baseHeaders = { 'Content-Type': 'application/x-www-form-urlencoded' };
|
|
193
|
+
return this._post(path, data, parameters, options, { ...baseHeaders, ...headers });
|
|
193
194
|
}
|
|
194
|
-
async
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
const res = await agent.post({
|
|
198
|
-
path,
|
|
199
|
-
data,
|
|
200
|
-
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
201
|
-
timeout: options?.timeout,
|
|
202
|
-
});
|
|
203
|
-
if (res.ok) {
|
|
204
|
-
return res;
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
throw new Error(await (0, utils_1.responseStringify)(res));
|
|
208
|
-
}
|
|
195
|
+
async _postJsonEncoded(path, data, parameters, options, headers) {
|
|
196
|
+
const baseHeaders = { 'Accept': 'application/json', 'Content-Type': 'application/json' };
|
|
197
|
+
return this._post(path, data, parameters, options, { ...baseHeaders, ...headers });
|
|
209
198
|
}
|
|
210
199
|
}
|
|
211
200
|
exports.PlaneTrackerAPI = PlaneTrackerAPI;
|
package/cjs/VapixAPI.js
CHANGED
|
@@ -110,11 +110,11 @@ class VapixAPI {
|
|
|
110
110
|
});
|
|
111
111
|
const result = parser.parse(xmlText);
|
|
112
112
|
const data = result.root.disks.disk;
|
|
113
|
-
return {
|
|
113
|
+
return VapixAPI_1.sdCardInfoSchema.parse({
|
|
114
114
|
totalSize: parseInt(data.totalsize),
|
|
115
115
|
freeSize: parseInt(data.freesize),
|
|
116
116
|
status: VapixAPI_1.sdCardWatchedStatuses.includes(data.status) ? data.status : 'disconnected',
|
|
117
|
-
};
|
|
117
|
+
});
|
|
118
118
|
}
|
|
119
119
|
mountSDCard(options) {
|
|
120
120
|
return this._doSDCardMountAction('MOUNT', options);
|
|
@@ -183,7 +183,7 @@ class VapixAPI {
|
|
|
183
183
|
if ((0, utils_1.isNullish)(captureMode.maxFPS)) {
|
|
184
184
|
throw new errors_1.MaxFPSError('FPS_NOT_SPECIFIED');
|
|
185
185
|
}
|
|
186
|
-
return captureMode.maxFPS;
|
|
186
|
+
return zod_1.z.number().parse(captureMode.maxFPS);
|
|
187
187
|
}
|
|
188
188
|
async getTimezone(options) {
|
|
189
189
|
try {
|
|
@@ -207,7 +207,7 @@ class VapixAPI {
|
|
|
207
207
|
if (data.data.timeZone === undefined) {
|
|
208
208
|
throw new Error('Time zone not setup on the device');
|
|
209
209
|
}
|
|
210
|
-
return data.data.timeZone;
|
|
210
|
+
return zod_1.z.string().parse(data.data.timeZone);
|
|
211
211
|
}
|
|
212
212
|
async getDateTimeInfo(options) {
|
|
213
213
|
const data = { apiVersion: '1.0', method: 'getDateTimeInfo' };
|
|
@@ -262,7 +262,7 @@ class VapixAPI {
|
|
|
262
262
|
const gTourList = new Array();
|
|
263
263
|
const response = await this.getParameter('GuardTour', options);
|
|
264
264
|
for (let i = 0; i < 20; i++) {
|
|
265
|
-
const gTourBaseName = '
|
|
265
|
+
const gTourBaseName = 'GuardTour.G' + i;
|
|
266
266
|
if (gTourBaseName + '.CamNbr' in response) {
|
|
267
267
|
const gTour = {
|
|
268
268
|
id: gTourBaseName,
|
|
@@ -274,7 +274,7 @@ class VapixAPI {
|
|
|
274
274
|
tour: [],
|
|
275
275
|
};
|
|
276
276
|
for (let j = 0; j < 100; j++) {
|
|
277
|
-
const tourBaseName = '
|
|
277
|
+
const tourBaseName = 'GuardTour.G' + i + '.Tour.T' + j;
|
|
278
278
|
if (tourBaseName + '.MoveSpeed' in response) {
|
|
279
279
|
const tour = {
|
|
280
280
|
moveSpeed: response[tourBaseName + '.MoveSpeed'],
|
|
@@ -292,17 +292,17 @@ class VapixAPI {
|
|
|
292
292
|
break;
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
return gTourList;
|
|
295
|
+
return VapixAPI_1.guardTourSchema.parse(gTourList);
|
|
296
296
|
}
|
|
297
|
-
setGuardTourEnabled(
|
|
297
|
+
setGuardTourEnabled(guardTourId, enable, options) {
|
|
298
298
|
const params = {};
|
|
299
|
-
params[
|
|
299
|
+
params[guardTourId + '.Running'] = enable ? 'yes' : 'no';
|
|
300
300
|
return this.setParameter(params, options);
|
|
301
301
|
}
|
|
302
302
|
async getPTZPresetList(channel, options) {
|
|
303
303
|
const res = await this.postUrlEncoded('/axis-cgi/com/ptz.cgi', {
|
|
304
304
|
query: 'presetposcam',
|
|
305
|
-
camera: channel
|
|
305
|
+
camera: channel,
|
|
306
306
|
}, undefined, options);
|
|
307
307
|
const text = await res.text();
|
|
308
308
|
const lines = text.split(/[\r\n]/);
|
|
@@ -316,7 +316,7 @@ class VapixAPI {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
return positions;
|
|
319
|
+
return zod_1.z.array(zod_1.z.string()).parse(positions);
|
|
320
320
|
}
|
|
321
321
|
async listPTZ(camera, options) {
|
|
322
322
|
const url = `/axis-cgi/com/ptz.cgi`;
|
|
@@ -350,7 +350,7 @@ class VapixAPI {
|
|
|
350
350
|
res[camera - 1] = item.map(({ data: itemData, ...d }) => d);
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
|
-
return res;
|
|
353
|
+
return VapixAPI_1.ptzOverviewSchema.parse(res);
|
|
354
354
|
}
|
|
355
355
|
goToPreset(channel, presetName, options) {
|
|
356
356
|
return this.postUrlEncoded('/axis-cgi/com/ptz.cgi', {
|
|
@@ -364,11 +364,11 @@ class VapixAPI {
|
|
|
364
364
|
camera: camera.toString(),
|
|
365
365
|
}, undefined, options);
|
|
366
366
|
const params = VapixAPI.parseParameters(await res.text());
|
|
367
|
-
return {
|
|
367
|
+
return VapixAPI_1.cameraPTZItemDataSchema.parse({
|
|
368
368
|
pan: Number(params.pan),
|
|
369
369
|
tilt: Number(params.tilt),
|
|
370
370
|
zoom: Number(params.zoom),
|
|
371
|
-
};
|
|
371
|
+
});
|
|
372
372
|
}
|
|
373
373
|
async getPorts(options) {
|
|
374
374
|
const res = await this.postJson('/axis-cgi/io/portmanagement.cgi', {
|
|
@@ -376,7 +376,7 @@ class VapixAPI {
|
|
|
376
376
|
context: '',
|
|
377
377
|
method: 'getPorts',
|
|
378
378
|
}, undefined, options);
|
|
379
|
-
const portResponseParsed =
|
|
379
|
+
const portResponseParsed = VapixAPI_1.getPortsResponseSchema.parse(await res.json());
|
|
380
380
|
return portResponseParsed.data.items;
|
|
381
381
|
}
|
|
382
382
|
async setPorts(ports, options) {
|
|
@@ -409,19 +409,20 @@ class VapixAPI {
|
|
|
409
409
|
if (!Array.isArray(apps)) {
|
|
410
410
|
apps = [apps];
|
|
411
411
|
}
|
|
412
|
-
|
|
412
|
+
const appList = apps.map((app) => {
|
|
413
413
|
return {
|
|
414
414
|
...app,
|
|
415
415
|
appId: VapixAPI_1.APP_IDS.find((id) => id.toLowerCase() === app.Name.toLowerCase()) ?? null,
|
|
416
416
|
};
|
|
417
417
|
});
|
|
418
|
+
return VapixAPI_1.applicationListSchema.parse(appList);
|
|
418
419
|
}
|
|
419
|
-
async startApplication(
|
|
420
|
+
async startApplication(applicationId, options) {
|
|
420
421
|
const agent = this.getClient(options?.proxyParams);
|
|
421
422
|
const res = await agent.get({
|
|
422
423
|
path: '/axis-cgi/applications/control.cgi',
|
|
423
424
|
parameters: {
|
|
424
|
-
package:
|
|
425
|
+
package: applicationId.toLowerCase(),
|
|
425
426
|
action: 'start',
|
|
426
427
|
},
|
|
427
428
|
timeout: options?.timeout,
|
|
@@ -431,12 +432,12 @@ class VapixAPI {
|
|
|
431
432
|
throw new errors_1.ApplicationAPIError('START', await (0, utils_1.responseStringify)(res));
|
|
432
433
|
}
|
|
433
434
|
}
|
|
434
|
-
async restartApplication(
|
|
435
|
+
async restartApplication(applicationId, options) {
|
|
435
436
|
const agent = this.getClient(options?.proxyParams);
|
|
436
437
|
const res = await agent.get({
|
|
437
438
|
path: '/axis-cgi/applications/control.cgi',
|
|
438
439
|
parameters: {
|
|
439
|
-
package:
|
|
440
|
+
package: applicationId.toLowerCase(),
|
|
440
441
|
action: 'restart',
|
|
441
442
|
},
|
|
442
443
|
timeout: options?.timeout,
|
|
@@ -446,12 +447,12 @@ class VapixAPI {
|
|
|
446
447
|
throw new errors_1.ApplicationAPIError('RESTART', await (0, utils_1.responseStringify)(res));
|
|
447
448
|
}
|
|
448
449
|
}
|
|
449
|
-
async stopApplication(
|
|
450
|
+
async stopApplication(applicationId, options) {
|
|
450
451
|
const agent = this.getClient(options?.proxyParams);
|
|
451
452
|
const res = await agent.get({
|
|
452
453
|
path: '/axis-cgi/applications/control.cgi',
|
|
453
454
|
parameters: {
|
|
454
|
-
package:
|
|
455
|
+
package: applicationId.toLowerCase(),
|
|
455
456
|
action: 'stop',
|
|
456
457
|
},
|
|
457
458
|
timeout: options?.timeout,
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CamOverlayDrawingAPI = void 0;
|
|
7
7
|
const events_1 = __importDefault(require("events"));
|
|
8
|
-
const WsClient_1 = require("./
|
|
8
|
+
const WsClient_1 = require("./WsClient");
|
|
9
9
|
class CamOverlayDrawingAPI extends events_1.default {
|
|
10
10
|
tls;
|
|
11
11
|
tlsInsecure;
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Painter =
|
|
3
|
+
exports.Painter = void 0;
|
|
4
4
|
const CamOverlayDrawingAPI_1 = require("../CamOverlayDrawingAPI");
|
|
5
5
|
const ResourceManager_1 = require("./ResourceManager");
|
|
6
6
|
const Frame_1 = require("./Frame");
|
|
7
|
-
|
|
8
|
-
top_left: [-1, -1],
|
|
9
|
-
center_left: [-1, 0],
|
|
10
|
-
bottom_left: [-1, 1],
|
|
11
|
-
top_center: [0, -1],
|
|
12
|
-
center: [0, 0],
|
|
13
|
-
bottom_center: [0, 1],
|
|
14
|
-
top_right: [1, -1],
|
|
15
|
-
center_right: [1, 0],
|
|
16
|
-
bottom_right: [1, 1],
|
|
17
|
-
};
|
|
7
|
+
const CamOverlayPainter_1 = require("../../types/CamOverlayPainter");
|
|
18
8
|
class Painter extends Frame_1.Frame {
|
|
19
9
|
screenWidth;
|
|
20
10
|
screenHeight;
|
|
@@ -25,7 +15,7 @@ class Painter extends Frame_1.Frame {
|
|
|
25
15
|
layers = [];
|
|
26
16
|
constructor(opt, coopt) {
|
|
27
17
|
super(opt);
|
|
28
|
-
this.coAlignment =
|
|
18
|
+
this.coAlignment = CamOverlayPainter_1.COORD[opt.coAlignment];
|
|
29
19
|
this.screenWidth = opt.screenWidth;
|
|
30
20
|
this.screenHeight = opt.screenHeight;
|
|
31
21
|
this.cod = new CamOverlayDrawingAPI_1.CamOverlayDrawingAPI(coopt);
|
|
@@ -69,7 +59,7 @@ class Painter extends Frame_1.Frame {
|
|
|
69
59
|
this.screenHeight = sh;
|
|
70
60
|
}
|
|
71
61
|
setCoAlignment(coAlignment) {
|
|
72
|
-
this.coAlignment =
|
|
62
|
+
this.coAlignment = CamOverlayPainter_1.COORD[coAlignment];
|
|
73
63
|
}
|
|
74
64
|
layoutChanged() {
|
|
75
65
|
this.refreshLayers = true;
|
package/cjs/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js}
RENAMED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CamScripterAPICameraEventsGenerator = void 0;
|
|
7
7
|
const events_1 = __importDefault(require("events"));
|
|
8
|
-
const WsClient_1 = require("./
|
|
8
|
+
const WsClient_1 = require("./WsClient");
|
|
9
9
|
class CamScripterAPICameraEventsGenerator extends events_1.default {
|
|
10
10
|
tls;
|
|
11
11
|
tlsInsecure;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VapixEvents = void 0;
|
|
4
4
|
const eventemitter2_1 = require("eventemitter2");
|
|
5
|
-
const WsClient_1 = require("./
|
|
5
|
+
const WsClient_1 = require("./WsClient");
|
|
6
6
|
class VapixEvents extends eventemitter2_1.EventEmitter2 {
|
|
7
7
|
tls;
|
|
8
8
|
tlsInsecure;
|
|
@@ -1,30 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GenetecAgent = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const utils_1 = require("../../internal/utils");
|
|
6
|
-
const
|
|
7
|
-
Rsp: zod_1.z.object({
|
|
8
|
-
Status: zod_1.z.literal('Ok'),
|
|
9
|
-
}),
|
|
10
|
-
});
|
|
11
|
-
const cameraGuidsResponseSchema = zod_1.z.object({
|
|
12
|
-
Rsp: zod_1.z.object({
|
|
13
|
-
Status: zod_1.z.literal('Ok'),
|
|
14
|
-
Result: zod_1.z.array(zod_1.z.object({ Guid: zod_1.z.string() })),
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
17
|
-
const cameraDetailSchema = zod_1.z.object({
|
|
18
|
-
Guid: zod_1.z.string().optional(),
|
|
19
|
-
Name: zod_1.z.string().optional(),
|
|
20
|
-
EntityType: zod_1.z.string().optional(),
|
|
21
|
-
});
|
|
22
|
-
const cameraDetailsResponseSchema = zod_1.z.object({
|
|
23
|
-
Rsp: zod_1.z.object({
|
|
24
|
-
Status: zod_1.z.literal('Ok'),
|
|
25
|
-
Result: zod_1.z.union([zod_1.z.array(cameraDetailSchema), cameraDetailSchema]),
|
|
26
|
-
}),
|
|
27
|
-
});
|
|
5
|
+
const GenetecAgent_1 = require("../../types/GenetecAgent");
|
|
28
6
|
class GenetecAgent {
|
|
29
7
|
settings;
|
|
30
8
|
baseUrl;
|
|
@@ -50,7 +28,7 @@ class GenetecAgent {
|
|
|
50
28
|
throw new Error(await (0, utils_1.responseStringify)(res));
|
|
51
29
|
}
|
|
52
30
|
const responseBody = await res.text();
|
|
53
|
-
const result = await successResponseSchema.safeParseAsync(JSON.parse(responseBody));
|
|
31
|
+
const result = await GenetecAgent_1.successResponseSchema.safeParseAsync(JSON.parse(responseBody));
|
|
54
32
|
if (!result.success) {
|
|
55
33
|
throw new Error('Genetec connection test failed: ' + JSON.stringify(result.error.issues) + '\n' + responseBody);
|
|
56
34
|
}
|
|
@@ -64,7 +42,7 @@ class GenetecAgent {
|
|
|
64
42
|
throw new Error(await (0, utils_1.responseStringify)(res));
|
|
65
43
|
}
|
|
66
44
|
const responseBody = await res.text();
|
|
67
|
-
const result = await cameraGuidsResponseSchema.safeParseAsync(JSON.parse(responseBody));
|
|
45
|
+
const result = await GenetecAgent_1.cameraGuidsResponseSchema.safeParseAsync(JSON.parse(responseBody));
|
|
68
46
|
if (!result.success) {
|
|
69
47
|
throw new Error('Genetec get camera guids failed: ' + JSON.stringify(result.error.issues) + '\n' + responseBody);
|
|
70
48
|
}
|
|
@@ -85,7 +63,7 @@ class GenetecAgent {
|
|
|
85
63
|
throw new Error(await (0, utils_1.responseStringify)(res));
|
|
86
64
|
}
|
|
87
65
|
const responseBody = await res.text();
|
|
88
|
-
const result = await cameraDetailsResponseSchema.safeParseAsync(JSON.parse(responseBody));
|
|
66
|
+
const result = await GenetecAgent_1.cameraDetailsResponseSchema.safeParseAsync(JSON.parse(responseBody));
|
|
89
67
|
if (!result.success) {
|
|
90
68
|
throw new Error('Genetec get camera details failed: ' + JSON.stringify(result.error.issues) + '\n' + responseBody);
|
|
91
69
|
}
|
|
@@ -105,7 +83,7 @@ class GenetecAgent {
|
|
|
105
83
|
throw new Error(await (0, utils_1.responseStringify)(res));
|
|
106
84
|
}
|
|
107
85
|
const responseBody = await res.text();
|
|
108
|
-
const result = await successResponseSchema.safeParseAsync(JSON.parse(responseBody));
|
|
86
|
+
const result = await GenetecAgent_1.successResponseSchema.safeParseAsync(JSON.parse(responseBody));
|
|
109
87
|
if (!result.success) {
|
|
110
88
|
throw new Error('Genetec send bookmark failed: ' + JSON.stringify(result.error.issues) + '\n' + responseBody);
|
|
111
89
|
}
|
package/cjs/node/index.js
CHANGED
|
@@ -14,8 +14,25 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.VapixEvents = exports.CamScripterAPICameraEventsGenerator = exports.CamOverlayDrawingAPI = exports.Frame = exports.Painter = exports.ResourceManager = void 0;
|
|
17
18
|
__exportStar(require("./DefaultClient"), exports);
|
|
18
19
|
__exportStar(require("./WsClient"), exports);
|
|
19
20
|
__exportStar(require("./HttpServer"), exports);
|
|
20
21
|
__exportStar(require("./events/AxisCameraStationEvents"), exports);
|
|
21
22
|
__exportStar(require("./events/GenetecAgent"), exports);
|
|
23
|
+
var ResourceManager_1 = require("./CamOverlayPainter/ResourceManager");
|
|
24
|
+
Object.defineProperty(exports, "ResourceManager", { enumerable: true, get: function () { return ResourceManager_1.ResourceManager; } });
|
|
25
|
+
var Painter_1 = require("./CamOverlayPainter/Painter");
|
|
26
|
+
Object.defineProperty(exports, "Painter", { enumerable: true, get: function () { return Painter_1.Painter; } });
|
|
27
|
+
var Frame_1 = require("./CamOverlayPainter/Frame");
|
|
28
|
+
Object.defineProperty(exports, "Frame", { enumerable: true, get: function () { return Frame_1.Frame; } });
|
|
29
|
+
__exportStar(require("../types/CamOverlayPainter"), exports);
|
|
30
|
+
var CamOverlayDrawingAPI_1 = require("./CamOverlayDrawingAPI");
|
|
31
|
+
Object.defineProperty(exports, "CamOverlayDrawingAPI", { enumerable: true, get: function () { return CamOverlayDrawingAPI_1.CamOverlayDrawingAPI; } });
|
|
32
|
+
__exportStar(require("../types/CamOverlayDrawingAPI"), exports);
|
|
33
|
+
var CamScripterAPICameraEventsGenerator_1 = require("./CamScripterAPICameraEventsGenerator");
|
|
34
|
+
Object.defineProperty(exports, "CamScripterAPICameraEventsGenerator", { enumerable: true, get: function () { return CamScripterAPICameraEventsGenerator_1.CamScripterAPICameraEventsGenerator; } });
|
|
35
|
+
__exportStar(require("../types/CamScripterAPICameraEventsGenerator"), exports);
|
|
36
|
+
var VapixEvents_1 = require("./VapixEvents");
|
|
37
|
+
Object.defineProperty(exports, "VapixEvents", { enumerable: true, get: function () { return VapixEvents_1.VapixEvents; } });
|
|
38
|
+
__exportStar(require("../types/VapixEvents"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fileDataSchema = exports.fileListSchema = exports.fileSchema = exports.storageResponseSchema = exports.storageDataListSchema = exports.storageSchema = exports.ImageType = exports.isScoreOverview = exports.isBaseballScoreBoardAutomatic = exports.isBaseballScoreBoard = exports.isScoreBoard = exports.isWebCameraSharing = exports.isScreenSharing = exports.isPtz = exports.isPtzCompass = exports.isPip = exports.isInfoticker = exports.isImages = exports.isCustomGraphics = exports.isAccuweather = exports.serviceListSchema = exports.servicesSchema = exports.
|
|
3
|
+
exports.fileDataSchema = exports.fileListSchema = exports.fileSchema = exports.storageResponseSchema = exports.storageDataListSchema = exports.storageSchema = exports.ImageType = exports.isScoreOverview = exports.isBaseballScoreBoardAutomatic = exports.isBaseballScoreBoard = exports.isScoreBoard = exports.isWebCameraSharing = exports.isScreenSharing = exports.isPtz = exports.isPtzCompass = exports.isPip = exports.isInfoticker = exports.isImages = exports.isCustomGraphics = exports.isAccuweather = exports.serviceListSchema = exports.servicesSchema = exports.wsResponseSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const infotickerSchema_1 = require("./infotickerSchema");
|
|
6
6
|
const accuweatherSchema_1 = require("./accuweatherSchema");
|
|
@@ -12,7 +12,7 @@ const customGraphicsSchema_1 = require("./customGraphicsSchema");
|
|
|
12
12
|
const screenSharingSchema_1 = require("./screenSharingSchema");
|
|
13
13
|
const webCameraSharingSchema_1 = require("./webCameraSharingSchema");
|
|
14
14
|
const scoreBoardSchema_1 = require("./scoreBoardSchema");
|
|
15
|
-
exports.
|
|
15
|
+
exports.wsResponseSchema = zod_1.z.object({
|
|
16
16
|
status: zod_1.z.number(),
|
|
17
17
|
message: zod_1.z.string(),
|
|
18
18
|
});
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COORD = void 0;
|
|
4
|
+
exports.COORD = {
|
|
5
|
+
top_left: [-1, -1],
|
|
6
|
+
center_left: [-1, 0],
|
|
7
|
+
bottom_left: [-1, 1],
|
|
8
|
+
top_center: [0, -1],
|
|
9
|
+
center: [0, 0],
|
|
10
|
+
bottom_center: [0, 1],
|
|
11
|
+
top_right: [1, -1],
|
|
12
|
+
center_right: [1, 0],
|
|
13
|
+
bottom_right: [1, 1],
|
|
14
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.clipListSchema = exports.playlistQueueSchema = exports.trackerSaveLoadSchema = exports.trackerSaveSchema = exports.playlistSaveLoadSchema = exports.clipSaveLoadSchema = exports.clipSaveSchema = exports.streamSaveLoadSchema = exports.audioPushInfoSchema = exports.outputInfoSchema = exports.storageInfoListSchema = void 0;
|
|
3
|
+
exports.secondaryAudioSettingsSchema = exports.globalAudioSettingsSchema = exports.globalAudioSettingsTypeSchema = exports.cameraOptionsSchema = exports.bitrateVapixParamsSchema = exports.bitrateModeSchema = exports.clipListSchema = exports.playlistQueueSchema = exports.trackerSaveLoadSchema = exports.trackerSaveSchema = exports.playlistSaveLoadSchema = exports.clipSaveLoadSchema = exports.clipSaveSchema = exports.streamSaveLoadSchema = exports.audioPushInfoSchema = exports.outputInfoSchema = exports.storageInfoListSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const transformers_1 = require("../internal/transformers");
|
|
6
6
|
const common_1 = require("./common");
|
|
@@ -135,3 +135,40 @@ exports.clipListSchema = zod_1.z.object({
|
|
|
135
135
|
])),
|
|
136
136
|
})),
|
|
137
137
|
});
|
|
138
|
+
exports.bitrateModeSchema = zod_1.z.union([zod_1.z.literal('VBR'), zod_1.z.literal('MBR'), zod_1.z.literal('ABR')]);
|
|
139
|
+
exports.bitrateVapixParamsSchema = zod_1.z.object({
|
|
140
|
+
bitrateMode: exports.bitrateModeSchema,
|
|
141
|
+
maximumBitRate: zod_1.z.number(),
|
|
142
|
+
retentionTime: zod_1.z.number(),
|
|
143
|
+
bitRateLimit: zod_1.z.number(),
|
|
144
|
+
});
|
|
145
|
+
exports.cameraOptionsSchema = exports.bitrateVapixParamsSchema
|
|
146
|
+
.extend({
|
|
147
|
+
resolution: zod_1.z.string(),
|
|
148
|
+
h264Profile: common_1.h264ProfileSchema,
|
|
149
|
+
fps: zod_1.z.number(),
|
|
150
|
+
compression: zod_1.z.number().min(0).max(100),
|
|
151
|
+
govLength: zod_1.z.number(),
|
|
152
|
+
bitrateVapixParams: zod_1.z.string().nullable(),
|
|
153
|
+
audioSampleRate: zod_1.z.number(),
|
|
154
|
+
audioChannelCount: common_1.audioChannelCountSchema,
|
|
155
|
+
keyboard: zod_1.z.object({
|
|
156
|
+
fromSource: common_1.keyboardShortcutSchema,
|
|
157
|
+
none: common_1.keyboardShortcutSchema,
|
|
158
|
+
}),
|
|
159
|
+
})
|
|
160
|
+
.partial();
|
|
161
|
+
exports.globalAudioSettingsTypeSchema = zod_1.z.union([zod_1.z.literal('fromSource'), zod_1.z.literal('source')]);
|
|
162
|
+
exports.globalAudioSettingsSchema = zod_1.z.object({
|
|
163
|
+
type: exports.globalAudioSettingsTypeSchema,
|
|
164
|
+
source: zod_1.z.string(),
|
|
165
|
+
storage: zod_1.z.string().optional(),
|
|
166
|
+
});
|
|
167
|
+
exports.secondaryAudioSettingsSchema = zod_1.z.object({
|
|
168
|
+
type: zod_1.z.union([zod_1.z.literal('CLIP'), zod_1.z.literal('STREAM'), zod_1.z.literal('NONE')]),
|
|
169
|
+
streamName: zod_1.z.string().optional(),
|
|
170
|
+
clipName: zod_1.z.string().optional(),
|
|
171
|
+
storage: common_1.storageTypeSchema,
|
|
172
|
+
secondaryAudioLevel: zod_1.z.number(),
|
|
173
|
+
masterAudioLevel: zod_1.z.number(),
|
|
174
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cameraListSchema = exports.cameraDetailsResponseSchema = exports.cameraDetailSchema = exports.cameraGuidsResponseSchema = exports.successResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.successResponseSchema = zod_1.z.object({
|
|
6
|
+
Rsp: zod_1.z.object({
|
|
7
|
+
Status: zod_1.z.literal('Ok'),
|
|
8
|
+
}),
|
|
9
|
+
});
|
|
10
|
+
exports.cameraGuidsResponseSchema = zod_1.z.object({
|
|
11
|
+
Rsp: zod_1.z.object({
|
|
12
|
+
Status: zod_1.z.literal('Ok'),
|
|
13
|
+
Result: zod_1.z.array(zod_1.z.object({ Guid: zod_1.z.string() })),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
exports.cameraDetailSchema = zod_1.z.object({
|
|
17
|
+
Guid: zod_1.z.string().optional(),
|
|
18
|
+
Name: zod_1.z.string().optional(),
|
|
19
|
+
EntityType: zod_1.z.string().optional(),
|
|
20
|
+
});
|
|
21
|
+
exports.cameraDetailsResponseSchema = zod_1.z.object({
|
|
22
|
+
Rsp: zod_1.z.object({
|
|
23
|
+
Status: zod_1.z.literal('Ok'),
|
|
24
|
+
Result: zod_1.z.union([zod_1.z.array(exports.cameraDetailSchema), exports.cameraDetailSchema]),
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
exports.cameraListSchema = zod_1.z.array(zod_1.z.object({
|
|
28
|
+
index: zod_1.z.number(),
|
|
29
|
+
value: zod_1.z.string(),
|
|
30
|
+
label: zod_1.z.string(),
|
|
31
|
+
}));
|