camstreamerlib 4.0.7 → 4.0.9
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/PlaneTrackerAPI.d.ts +12 -1
- package/cjs/PlaneTrackerAPI.js +23 -3
- package/cjs/VapixAPI.d.ts +11 -0
- package/cjs/VapixAPI.js +6 -1
- package/cjs/internal/convertors.js +4 -4
- package/cjs/types/PlaneTrackerAPI.d.ts +84 -9
- package/cjs/types/PlaneTrackerAPI.js +14 -1
- package/cjs/types/VapixAPI.d.ts +48 -0
- package/cjs/types/VapixAPI.js +14 -7
- package/cjs/types/ws/PlaneTrackerEvents.d.ts +2205 -589
- package/cjs/types/ws/PlaneTrackerEvents.js +48 -77
- package/cjs/ws/PlaneTrackerEvents.js +1 -9
- package/esm/PlaneTrackerAPI.js +24 -4
- package/esm/VapixAPI.js +7 -2
- package/esm/internal/convertors.js +4 -4
- package/esm/types/PlaneTrackerAPI.js +13 -0
- package/esm/types/VapixAPI.js +13 -6
- package/esm/types/ws/PlaneTrackerEvents.js +47 -76
- package/esm/ws/PlaneTrackerEvents.js +2 -10
- package/package.json +1 -1
- package/types/PlaneTrackerAPI.d.ts +12 -1
- package/types/VapixAPI.d.ts +11 -0
- package/types/types/PlaneTrackerAPI.d.ts +84 -9
- package/types/types/VapixAPI.d.ts +48 -0
- package/types/types/ws/PlaneTrackerEvents.d.ts +2205 -589
package/cjs/PlaneTrackerAPI.d.ts
CHANGED
|
@@ -158,7 +158,16 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
158
158
|
}>;
|
|
159
159
|
exportAppSettings(dataType: TExportDataType, options?: THttpRequestOptions): Promise<ReturnType<Awaited<ReturnType<Client["get"]>>["blob"]>>;
|
|
160
160
|
importAppSettings(dataType: TImportDataType, formData: Parameters<Client['post']>[0]['data'], options?: THttpRequestOptions): Promise<void>;
|
|
161
|
-
|
|
161
|
+
getDomainList(options?: THttpRequestOptions): Promise<Partial<Record<"adsb" | "remoteId", {
|
|
162
|
+
uiName: string;
|
|
163
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
164
|
+
categoryList: {
|
|
165
|
+
categoryId: string;
|
|
166
|
+
uiName: string;
|
|
167
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
168
|
+
}[];
|
|
169
|
+
}>>>;
|
|
170
|
+
fetchFlightInfo(targetId: string, options?: THttpRequestOptions): Promise<{
|
|
162
171
|
destinationAirport: {
|
|
163
172
|
icao?: string | undefined;
|
|
164
173
|
iata?: string | undefined;
|
|
@@ -185,6 +194,8 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
|
|
|
185
194
|
setTrackingMode(mode: TTrackingMode['mode'], options?: THttpRequestOptions): Promise<void>;
|
|
186
195
|
startTrackingPlane(icao: ICAO, options?: THttpRequestOptions): Promise<void>;
|
|
187
196
|
stopTrackingPlane(options?: THttpRequestOptions): Promise<void>;
|
|
197
|
+
startTrackingTarget(targetId: string, options?: THttpRequestOptions): Promise<void>;
|
|
198
|
+
stopTrackingTarget(options?: THttpRequestOptions): Promise<void>;
|
|
188
199
|
getIcao(by: TGetIcaoByOption, value: string, options?: THttpRequestOptions): Promise<string>;
|
|
189
200
|
getPriorityList(options?: THttpRequestOptions): Promise<{
|
|
190
201
|
list: {
|
package/cjs/PlaneTrackerAPI.js
CHANGED
|
@@ -88,8 +88,12 @@ class PlaneTrackerAPI extends BasicAPI_1.BasicAPI {
|
|
|
88
88
|
throw new errors_1.ImportSettingsError(res);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
async
|
|
92
|
-
const res = await this._getJson(`${BASE_PATH}/
|
|
91
|
+
async getDomainList(options) {
|
|
92
|
+
const res = await this._getJson(`${BASE_PATH}/getDomainList.cgi`, { action: 'get' }, options);
|
|
93
|
+
return PlaneTrackerAPI_1.domainListSchema.parse(res);
|
|
94
|
+
}
|
|
95
|
+
async fetchFlightInfo(targetId, options) {
|
|
96
|
+
const res = await this._getJson(`${BASE_PATH}/package/flightInfo.cgi`, { targetId }, options);
|
|
93
97
|
return PlaneTrackerAPI_1.flightInfoSchema.parse(res);
|
|
94
98
|
}
|
|
95
99
|
async getTrackingMode(options) {
|
|
@@ -115,9 +119,25 @@ class PlaneTrackerAPI extends BasicAPI_1.BasicAPI {
|
|
|
115
119
|
timeout: options?.timeout,
|
|
116
120
|
});
|
|
117
121
|
}
|
|
122
|
+
async startTrackingTarget(targetId, options) {
|
|
123
|
+
const agent = this.getClient(options?.proxyParams);
|
|
124
|
+
await agent.get({
|
|
125
|
+
path: `${BASE_PATH}/package/trackTarget.cgi`,
|
|
126
|
+
parameters: { targetId, ...this.apiUser },
|
|
127
|
+
timeout: options?.timeout,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
async stopTrackingTarget(options) {
|
|
131
|
+
const agent = this.getClient(options?.proxyParams);
|
|
132
|
+
await agent.get({
|
|
133
|
+
path: `${BASE_PATH}/package/resetTarget.cgi`,
|
|
134
|
+
parameters: this.apiUser,
|
|
135
|
+
timeout: options?.timeout,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
118
138
|
async getIcao(by, value, options) {
|
|
119
139
|
const res = await this._getJson(`${BASE_PATH}/package/getIcao.cgi`, { [by]: value }, options);
|
|
120
|
-
return PlaneTrackerAPI_1.getIcaoSchema.parse(res).
|
|
140
|
+
return PlaneTrackerAPI_1.getIcaoSchema.parse(res).targetId;
|
|
121
141
|
}
|
|
122
142
|
async getPriorityList(options) {
|
|
123
143
|
const res = await this._getJson(`${BASE_PATH}/package/getPriorityList.cgi`, undefined, options);
|
package/cjs/VapixAPI.d.ts
CHANGED
|
@@ -21,6 +21,17 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> extends Ba
|
|
|
21
21
|
getSystemLog(options?: THttpRequestOptions): Promise<string>;
|
|
22
22
|
getMaxFps(channel: number, options?: THttpRequestOptions): Promise<number>;
|
|
23
23
|
getTimezone(options?: THttpRequestOptions): Promise<string>;
|
|
24
|
+
getAllDateTimeInfo(options?: THttpRequestOptions): Promise<{
|
|
25
|
+
data: {
|
|
26
|
+
dateTime: string;
|
|
27
|
+
dstEnabled: boolean;
|
|
28
|
+
localDateTime: string;
|
|
29
|
+
posixTimeZone: string;
|
|
30
|
+
maxYearSupported: number;
|
|
31
|
+
timeZones: string[];
|
|
32
|
+
timeZone?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
24
35
|
getDateTimeInfo(options?: THttpRequestOptions): Promise<{
|
|
25
36
|
data: {
|
|
26
37
|
dateTime: string;
|
package/cjs/VapixAPI.js
CHANGED
|
@@ -152,12 +152,17 @@ class VapixAPI extends BasicAPI_1.BasicAPI {
|
|
|
152
152
|
console.warn('Failed to fetch time zone data from time API v2:', error instanceof Error ? error.message : JSON.stringify(error));
|
|
153
153
|
console.warn('Falling back to deprecated time API v1');
|
|
154
154
|
}
|
|
155
|
-
const data = await this.
|
|
155
|
+
const data = await this.getAllDateTimeInfo(options);
|
|
156
156
|
if (data.data.timeZone === undefined) {
|
|
157
157
|
throw new errors_1.TimezoneNotSetupError();
|
|
158
158
|
}
|
|
159
159
|
return zod_1.z.string().parse(data.data.timeZone);
|
|
160
160
|
}
|
|
161
|
+
async getAllDateTimeInfo(options) {
|
|
162
|
+
const data = { apiVersion: '1.0', method: 'getAll' };
|
|
163
|
+
const res = await this._postJsonEncoded('/axis-cgi/time.cgi', data, undefined, options);
|
|
164
|
+
return VapixAPI_1.allDateTimeInfoSchema.parse(await res.json());
|
|
165
|
+
}
|
|
161
166
|
async getDateTimeInfo(options) {
|
|
162
167
|
const data = { apiVersion: '1.0', method: 'getDateTimeInfo' };
|
|
163
168
|
const res = await this._postJsonEncoded('/axis-cgi/time.cgi', data, undefined, options);
|
|
@@ -77,8 +77,8 @@ const parseVideoOptionsToVapixParams = (firmWareVersion, video) => {
|
|
|
77
77
|
const nbrOfChannels = video.nbrOfChannels ? (video.audio === 1 ? `&nbrOfChannels=${video.nbrOfChannels}` : '') : '';
|
|
78
78
|
const audioParams = `audio=${video.audio}${nbrOfChannels}`;
|
|
79
79
|
const videoCodecParams = video.videoCodec === 'h264'
|
|
80
|
-
? `
|
|
81
|
-
: `
|
|
80
|
+
? `videocodec=${video.videoCodec}&h264Profile=${video.h264Profile}`
|
|
81
|
+
: `videocodec=${video.videoCodec}`;
|
|
82
82
|
const videoParams = `camera=${video.camera}&resolution=${video.resolution}&fps=${video.fps}&compression=${video.compression}&videokeyframeinterval=${video.govLength}&${videoCodecParams}${overlaysParams}`;
|
|
83
83
|
return [videoParams, bitrateParams, audioParams].join('&');
|
|
84
84
|
};
|
|
@@ -91,7 +91,7 @@ const parseVapixParamsToVideoOptions = (internalVapixParams) => {
|
|
|
91
91
|
params[key] = value;
|
|
92
92
|
});
|
|
93
93
|
let h264Profile = undefined;
|
|
94
|
-
if (params['
|
|
94
|
+
if (params['videocodec'] === 'h264') {
|
|
95
95
|
h264Profile = (params['h264Profile'] ?? 'high');
|
|
96
96
|
}
|
|
97
97
|
let nbrOfChannels = undefined;
|
|
@@ -105,7 +105,7 @@ const parseVapixParamsToVideoOptions = (internalVapixParams) => {
|
|
|
105
105
|
fps: parseInt(params['fps'] ?? '0', 10),
|
|
106
106
|
compression: parseInt(params['compression'] ?? '0', 10),
|
|
107
107
|
govLength: parseInt(params['videokeyframeinterval'] ?? '0', 10),
|
|
108
|
-
videoCodec: (params['
|
|
108
|
+
videoCodec: (params['videocodec'] ?? 'h264'),
|
|
109
109
|
h264Profile,
|
|
110
110
|
audio: parseInt(params['audio'] ?? '0'),
|
|
111
111
|
nbrOfChannels,
|
|
@@ -701,10 +701,13 @@ export type TServerSettings = z.infer<typeof serverSettingsSchema>;
|
|
|
701
701
|
export type ICAO = string;
|
|
702
702
|
export declare const getIcaoSchema: z.ZodObject<{
|
|
703
703
|
icao: z.ZodString;
|
|
704
|
+
targetId: z.ZodString;
|
|
704
705
|
}, "strip", z.ZodTypeAny, {
|
|
705
706
|
icao: string;
|
|
707
|
+
targetId: string;
|
|
706
708
|
}, {
|
|
707
709
|
icao: string;
|
|
710
|
+
targetId: string;
|
|
708
711
|
}>;
|
|
709
712
|
export type TGetIcaoByOption = 'registration' | 'callsign';
|
|
710
713
|
export declare const trackingModeSchema: z.ZodObject<{
|
|
@@ -1037,18 +1040,90 @@ export declare const zonesSchema: z.ZodObject<{
|
|
|
1037
1040
|
export type TZones = z.infer<typeof zonesSchema>;
|
|
1038
1041
|
export declare const domainIdSchema: z.ZodEnum<["adsb", "remoteId"]>;
|
|
1039
1042
|
export type TDomainId = z.infer<typeof domainIdSchema>;
|
|
1040
|
-
|
|
1041
|
-
export type
|
|
1043
|
+
declare const categoryIconSchema: z.ZodEnum<["small", "large", "heavy", "helicopter", "drone", "operator", "unknown"]>;
|
|
1044
|
+
export type TCategoryIcon = z.infer<typeof categoryIconSchema>;
|
|
1045
|
+
declare const categoryDescriptorSchema: z.ZodObject<{
|
|
1046
|
+
categoryId: z.ZodString;
|
|
1047
|
+
uiName: z.ZodString;
|
|
1048
|
+
icon: z.ZodEnum<["small", "large", "heavy", "helicopter", "drone", "operator", "unknown"]>;
|
|
1049
|
+
}, "strip", z.ZodTypeAny, {
|
|
1042
1050
|
categoryId: string;
|
|
1043
1051
|
uiName: string;
|
|
1044
|
-
icon:
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1052
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1053
|
+
}, {
|
|
1054
|
+
categoryId: string;
|
|
1047
1055
|
uiName: string;
|
|
1048
|
-
icon:
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1056
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1057
|
+
}>;
|
|
1058
|
+
export type TCategoryDescriptor = z.infer<typeof categoryDescriptorSchema>;
|
|
1059
|
+
declare const domainDescriptorSchema: z.ZodObject<{
|
|
1060
|
+
uiName: z.ZodString;
|
|
1061
|
+
icon: z.ZodEnum<["small", "large", "heavy", "helicopter", "drone", "operator", "unknown"]>;
|
|
1062
|
+
categoryList: z.ZodArray<z.ZodObject<{
|
|
1063
|
+
categoryId: z.ZodString;
|
|
1064
|
+
uiName: z.ZodString;
|
|
1065
|
+
icon: z.ZodEnum<["small", "large", "heavy", "helicopter", "drone", "operator", "unknown"]>;
|
|
1066
|
+
}, "strip", z.ZodTypeAny, {
|
|
1067
|
+
categoryId: string;
|
|
1068
|
+
uiName: string;
|
|
1069
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1070
|
+
}, {
|
|
1071
|
+
categoryId: string;
|
|
1072
|
+
uiName: string;
|
|
1073
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1074
|
+
}>, "many">;
|
|
1075
|
+
}, "strip", z.ZodTypeAny, {
|
|
1076
|
+
uiName: string;
|
|
1077
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1078
|
+
categoryList: {
|
|
1079
|
+
categoryId: string;
|
|
1080
|
+
uiName: string;
|
|
1081
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1082
|
+
}[];
|
|
1083
|
+
}, {
|
|
1084
|
+
uiName: string;
|
|
1085
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1086
|
+
categoryList: {
|
|
1087
|
+
categoryId: string;
|
|
1088
|
+
uiName: string;
|
|
1089
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1090
|
+
}[];
|
|
1091
|
+
}>;
|
|
1092
|
+
export type TDomainDescriptor = z.infer<typeof domainDescriptorSchema>;
|
|
1093
|
+
export declare const domainListSchema: z.ZodRecord<z.ZodEnum<["adsb", "remoteId"]>, z.ZodObject<{
|
|
1094
|
+
uiName: z.ZodString;
|
|
1095
|
+
icon: z.ZodEnum<["small", "large", "heavy", "helicopter", "drone", "operator", "unknown"]>;
|
|
1096
|
+
categoryList: z.ZodArray<z.ZodObject<{
|
|
1097
|
+
categoryId: z.ZodString;
|
|
1098
|
+
uiName: z.ZodString;
|
|
1099
|
+
icon: z.ZodEnum<["small", "large", "heavy", "helicopter", "drone", "operator", "unknown"]>;
|
|
1100
|
+
}, "strip", z.ZodTypeAny, {
|
|
1101
|
+
categoryId: string;
|
|
1102
|
+
uiName: string;
|
|
1103
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1104
|
+
}, {
|
|
1105
|
+
categoryId: string;
|
|
1106
|
+
uiName: string;
|
|
1107
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1108
|
+
}>, "many">;
|
|
1109
|
+
}, "strip", z.ZodTypeAny, {
|
|
1110
|
+
uiName: string;
|
|
1111
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1112
|
+
categoryList: {
|
|
1113
|
+
categoryId: string;
|
|
1114
|
+
uiName: string;
|
|
1115
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1116
|
+
}[];
|
|
1117
|
+
}, {
|
|
1118
|
+
uiName: string;
|
|
1119
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1120
|
+
categoryList: {
|
|
1121
|
+
categoryId: string;
|
|
1122
|
+
uiName: string;
|
|
1123
|
+
icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator";
|
|
1124
|
+
}[];
|
|
1125
|
+
}>>;
|
|
1126
|
+
export type TDomainList = z.infer<typeof domainListSchema>;
|
|
1052
1127
|
export declare const ADSB_CATEGORY_IDS: {
|
|
1053
1128
|
readonly A_LIGHT: "A_LIGHT";
|
|
1054
1129
|
readonly A_SMALL: "A_SMALL";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REMOTE_ID_CATEGORY_IDS = exports.ADSB_CATEGORY_IDS = exports.domainIdSchema = exports.zonesSchema = exports.mapInfoSchema = exports.mapTypeSchema = exports.priorityListSchema = exports.blackListSchema = exports.whiteListSchema = exports.priorityListEntrySchema = exports.listEntrySchema = exports.listEntryIdTypeSchema = exports.listEntryDomainSchema = exports.flightInfoSchema = exports.trackingModeSchema = exports.getIcaoSchema = exports.serverSettingsSchema = exports.cameraSettingsSchema = exports.widgetSchema = exports.connectionSchema = exports.wsAliasResponseSchema = void 0;
|
|
3
|
+
exports.REMOTE_ID_CATEGORY_IDS = exports.ADSB_CATEGORY_IDS = exports.domainListSchema = exports.domainIdSchema = exports.zonesSchema = exports.mapInfoSchema = exports.mapTypeSchema = exports.priorityListSchema = exports.blackListSchema = exports.whiteListSchema = exports.priorityListEntrySchema = exports.listEntrySchema = exports.listEntryIdTypeSchema = exports.listEntryDomainSchema = exports.flightInfoSchema = exports.trackingModeSchema = exports.getIcaoSchema = exports.serverSettingsSchema = exports.cameraSettingsSchema = exports.widgetSchema = exports.connectionSchema = exports.wsAliasResponseSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.wsAliasResponseSchema = zod_1.z.object({
|
|
6
6
|
alias: zod_1.z.string(),
|
|
@@ -251,6 +251,7 @@ exports.serverSettingsSchema = zod_1.z.object({
|
|
|
251
251
|
});
|
|
252
252
|
exports.getIcaoSchema = zod_1.z.object({
|
|
253
253
|
icao: zod_1.z.string(),
|
|
254
|
+
targetId: zod_1.z.string(),
|
|
254
255
|
});
|
|
255
256
|
exports.trackingModeSchema = zod_1.z.object({
|
|
256
257
|
mode: zod_1.z.union([zod_1.z.literal('MANUAL'), zod_1.z.literal('AUTOMATIC')]).default('AUTOMATIC'),
|
|
@@ -327,6 +328,18 @@ exports.zonesSchema = zod_1.z.object({
|
|
|
327
328
|
.default([]),
|
|
328
329
|
});
|
|
329
330
|
exports.domainIdSchema = zod_1.z.enum(['adsb', 'remoteId']);
|
|
331
|
+
const categoryIconSchema = zod_1.z.enum(['small', 'large', 'heavy', 'helicopter', 'drone', 'operator', 'unknown']);
|
|
332
|
+
const categoryDescriptorSchema = zod_1.z.object({
|
|
333
|
+
categoryId: zod_1.z.string(),
|
|
334
|
+
uiName: zod_1.z.string(),
|
|
335
|
+
icon: categoryIconSchema,
|
|
336
|
+
});
|
|
337
|
+
const domainDescriptorSchema = zod_1.z.object({
|
|
338
|
+
uiName: zod_1.z.string(),
|
|
339
|
+
icon: categoryIconSchema,
|
|
340
|
+
categoryList: zod_1.z.array(categoryDescriptorSchema),
|
|
341
|
+
});
|
|
342
|
+
exports.domainListSchema = zod_1.z.record(exports.domainIdSchema, domainDescriptorSchema);
|
|
330
343
|
exports.ADSB_CATEGORY_IDS = {
|
|
331
344
|
A_LIGHT: 'A_LIGHT',
|
|
332
345
|
A_SMALL: 'A_SMALL',
|
package/cjs/types/VapixAPI.d.ts
CHANGED
|
@@ -1576,6 +1576,54 @@ export declare const dateTimeinfoSchema: z.ZodObject<{
|
|
|
1576
1576
|
timeZone?: string | undefined;
|
|
1577
1577
|
};
|
|
1578
1578
|
}>;
|
|
1579
|
+
export declare const allDateTimeInfoSchema: z.ZodObject<{
|
|
1580
|
+
data: z.ZodObject<{
|
|
1581
|
+
dateTime: z.ZodString;
|
|
1582
|
+
dstEnabled: z.ZodBoolean;
|
|
1583
|
+
localDateTime: z.ZodString;
|
|
1584
|
+
posixTimeZone: z.ZodString;
|
|
1585
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
1586
|
+
} & {
|
|
1587
|
+
maxYearSupported: z.ZodNumber;
|
|
1588
|
+
timeZones: z.ZodArray<z.ZodString, "many">;
|
|
1589
|
+
}, "strip", z.ZodTypeAny, {
|
|
1590
|
+
dateTime: string;
|
|
1591
|
+
dstEnabled: boolean;
|
|
1592
|
+
localDateTime: string;
|
|
1593
|
+
posixTimeZone: string;
|
|
1594
|
+
maxYearSupported: number;
|
|
1595
|
+
timeZones: string[];
|
|
1596
|
+
timeZone?: string | undefined;
|
|
1597
|
+
}, {
|
|
1598
|
+
dateTime: string;
|
|
1599
|
+
dstEnabled: boolean;
|
|
1600
|
+
localDateTime: string;
|
|
1601
|
+
posixTimeZone: string;
|
|
1602
|
+
maxYearSupported: number;
|
|
1603
|
+
timeZones: string[];
|
|
1604
|
+
timeZone?: string | undefined;
|
|
1605
|
+
}>;
|
|
1606
|
+
}, "strip", z.ZodTypeAny, {
|
|
1607
|
+
data: {
|
|
1608
|
+
dateTime: string;
|
|
1609
|
+
dstEnabled: boolean;
|
|
1610
|
+
localDateTime: string;
|
|
1611
|
+
posixTimeZone: string;
|
|
1612
|
+
maxYearSupported: number;
|
|
1613
|
+
timeZones: string[];
|
|
1614
|
+
timeZone?: string | undefined;
|
|
1615
|
+
};
|
|
1616
|
+
}, {
|
|
1617
|
+
data: {
|
|
1618
|
+
dateTime: string;
|
|
1619
|
+
dstEnabled: boolean;
|
|
1620
|
+
localDateTime: string;
|
|
1621
|
+
posixTimeZone: string;
|
|
1622
|
+
maxYearSupported: number;
|
|
1623
|
+
timeZones: string[];
|
|
1624
|
+
timeZone?: string | undefined;
|
|
1625
|
+
};
|
|
1626
|
+
}>;
|
|
1579
1627
|
export declare const timeZoneSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
1580
1628
|
status: z.ZodLiteral<"success">;
|
|
1581
1629
|
data: z.ZodObject<{
|
package/cjs/types/VapixAPI.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.recordingConfigItemSchema = exports.portSequenceStateSchema = exports.portSetSchema = exports.getPortsResponseSchema = exports.portStatusSchema = exports.audioSampleRatesResponseSchema = exports.timeZoneSchema = exports.dateTimeinfoSchema = exports.maxFpsResponseSchema = exports.audioDeviceRequestSchema = exports.audioDeviceSchema = exports.audioDeviceInputOutputSchema = exports.audioDeviceConnectionTypeSchema = exports.audioDeviceSignalingTypeSchema = exports.audioDeviceSignalingChannelTypeSchema = exports.cameraPTZItemSchema = exports.cameraPTZItemDataSchema = exports.ptzOverviewSchema = exports.sdCardInfoSchema = exports.sdCardWatchedStatuses = exports.guardTourSchema = exports.ALL_APP_IDS = exports.APP_IDS = exports.applicationListSchema = exports.applicationSchema = void 0;
|
|
3
|
+
exports.recordingConfigItemSchema = exports.portSequenceStateSchema = exports.portSetSchema = exports.getPortsResponseSchema = exports.portStatusSchema = exports.audioSampleRatesResponseSchema = exports.timeZoneSchema = exports.allDateTimeInfoSchema = exports.dateTimeinfoSchema = exports.maxFpsResponseSchema = exports.audioDeviceRequestSchema = exports.audioDeviceSchema = exports.audioDeviceInputOutputSchema = exports.audioDeviceConnectionTypeSchema = exports.audioDeviceSignalingTypeSchema = exports.audioDeviceSignalingChannelTypeSchema = exports.cameraPTZItemSchema = exports.cameraPTZItemDataSchema = exports.ptzOverviewSchema = exports.sdCardInfoSchema = exports.sdCardWatchedStatuses = exports.guardTourSchema = exports.ALL_APP_IDS = exports.APP_IDS = exports.applicationListSchema = exports.applicationSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const transformers_1 = require("../internal/transformers");
|
|
6
6
|
exports.applicationSchema = zod_1.z.object({
|
|
@@ -123,13 +123,20 @@ exports.maxFpsResponseSchema = zod_1.z.object({
|
|
|
123
123
|
}))
|
|
124
124
|
.optional(),
|
|
125
125
|
});
|
|
126
|
+
const timeInfoSchema = zod_1.z.object({
|
|
127
|
+
dateTime: zod_1.z.string(),
|
|
128
|
+
dstEnabled: zod_1.z.boolean(),
|
|
129
|
+
localDateTime: zod_1.z.string(),
|
|
130
|
+
posixTimeZone: zod_1.z.string(),
|
|
131
|
+
timeZone: zod_1.z.string().optional(),
|
|
132
|
+
});
|
|
126
133
|
exports.dateTimeinfoSchema = zod_1.z.object({
|
|
127
|
-
data:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
data: timeInfoSchema,
|
|
135
|
+
});
|
|
136
|
+
exports.allDateTimeInfoSchema = zod_1.z.object({
|
|
137
|
+
data: timeInfoSchema.extend({
|
|
138
|
+
maxYearSupported: zod_1.z.number(),
|
|
139
|
+
timeZones: zod_1.z.array(zod_1.z.string()),
|
|
133
140
|
}),
|
|
134
141
|
});
|
|
135
142
|
exports.timeZoneSchema = zod_1.z.discriminatedUnion('status', [
|