camstreamerlib 4.0.0-beta.71 → 4.0.0-beta.72

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.
@@ -1,5 +1,5 @@
1
1
  import { IClient, TBlobResponse, TParameters, TResponse } from './internal/types';
2
- import { ICAO, TApiUser, TBlackList, TCameraSettings, TExportDataType, TGetIcaoByOption, TImportDataType, TPriorityList, TTrackingMode, TWhiteList, TZones } from './types/PlaneTrackerAPI';
2
+ import { ICAO, TApiUser, TBlackList, TCameraSettings, TExportDataType, TGetIcaoByOption, TImportDataType, TPriorityList, TTrackingMode, TTypePriorityList, TWhiteList, TZones } from './types/PlaneTrackerAPI';
3
3
  import { THttpRequestOptions, TProxyParams } from './types/common';
4
4
  import { ProxyClient } from './internal/ProxyClient';
5
5
  export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
@@ -188,6 +188,8 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
188
188
  getIcao(by: TGetIcaoByOption, value: string, options?: THttpRequestOptions): Promise<string>;
189
189
  getPriorityList(options?: THttpRequestOptions): Promise<string[]>;
190
190
  setPriorityList(priorityList: TPriorityList['priorityList'], options?: THttpRequestOptions): Promise<TResponse>;
191
+ getTypePriorityList(options?: THttpRequestOptions): Promise<string[]>;
192
+ setTypePriorityList(typePriorityList: TTypePriorityList['typePriorityList'], options?: THttpRequestOptions): Promise<TResponse>;
191
193
  getWhiteList(options?: THttpRequestOptions): Promise<string[]>;
192
194
  setWhiteList(whiteList: TWhiteList['whiteList'], options?: THttpRequestOptions): Promise<TResponse>;
193
195
  getBlackList(options?: THttpRequestOptions): Promise<string[]>;
@@ -125,6 +125,13 @@ class PlaneTrackerAPI {
125
125
  async setPriorityList(priorityList, options) {
126
126
  return await this._postJsonEncoded(`${BASE_PATH}/package/setPriorityList.cgi`, { priorityList }, this.apiUser, options);
127
127
  }
128
+ async getTypePriorityList(options) {
129
+ const res = await this._getJson(`${BASE_PATH}/package/getTypePriorityList.cgi`, undefined, options);
130
+ return PlaneTrackerAPI_1.typePriorityListSchema.parse(res).typePriorityList;
131
+ }
132
+ async setTypePriorityList(typePriorityList, options) {
133
+ return await this._postJsonEncoded(`${BASE_PATH}/package/setTypePriorityList.cgi`, { typePriorityList }, this.apiUser, options);
134
+ }
128
135
  async getWhiteList(options) {
129
136
  const res = await this._getJson(`${BASE_PATH}/package/getWhiteList.cgi`, undefined, options);
130
137
  return PlaneTrackerAPI_1.whiteListSchema.parse(res).whiteList;
@@ -11,6 +11,7 @@ declare const apiFlightDataSchema: z.ZodObject<{
11
11
  whiteListed: z.ZodBoolean;
12
12
  blackListed: z.ZodBoolean;
13
13
  priorityListed: z.ZodBoolean;
14
+ typePriorityListed: z.ZodDefault<z.ZodBoolean>;
14
15
  autoSelectionIgnored: z.ZodBoolean;
15
16
  signalQuality: z.ZodNumber;
16
17
  emitterCategorySet: z.ZodDefault<z.ZodNumber>;
@@ -29,6 +30,7 @@ declare const apiFlightDataSchema: z.ZodObject<{
29
30
  whiteListed: boolean;
30
31
  blackListed: boolean;
31
32
  priorityListed: boolean;
33
+ typePriorityListed: boolean;
32
34
  autoSelectionIgnored: boolean;
33
35
  signalQuality: number;
34
36
  emitterCategorySet: number;
@@ -51,6 +53,7 @@ declare const apiFlightDataSchema: z.ZodObject<{
51
53
  signalQuality: number;
52
54
  emergencyState: boolean;
53
55
  emergencyStatusMessage: string;
56
+ typePriorityListed?: boolean | undefined;
54
57
  emitterCategorySet?: number | undefined;
55
58
  emitterCategory?: number | undefined;
56
59
  }>;
@@ -96,6 +99,7 @@ export declare enum PlaneTrackerUserActions {
96
99
  TRACK_ICAO = "trackIcao.cgi",
97
100
  RESET_ICAO = "resetIcao.cgi",
98
101
  SET_PRIORITY_LIST = "setPriorityList.cgi",
102
+ SET_TYPE_PRIORITY_LIST = "setTypePriorityList.cgi",
99
103
  SET_BLACK_LIST = "setBlackList.cgi",
100
104
  SET_WHITE_LIST = "setWhiteList.cgi",
101
105
  GO_TO_COORDINATES = "goToCoordinates.cgi",
@@ -220,6 +224,51 @@ export declare const planeTrackerUserActionData: z.ZodDiscriminatedUnion<"cgi",
220
224
  postJsonBody: {
221
225
  priorityList: string[];
222
226
  };
227
+ }>, z.ZodObject<{
228
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST>;
229
+ ip: z.ZodString;
230
+ params: z.ZodObject<{
231
+ userId: z.ZodString;
232
+ userName: z.ZodString;
233
+ userPriority: z.ZodString;
234
+ }, "strip", z.ZodTypeAny, {
235
+ userId: string;
236
+ userName: string;
237
+ userPriority: string;
238
+ }, {
239
+ userId: string;
240
+ userName: string;
241
+ userPriority: string;
242
+ }>;
243
+ postJsonBody: z.ZodObject<{
244
+ typePriorityList: z.ZodArray<z.ZodString, "many">;
245
+ }, "strip", z.ZodTypeAny, {
246
+ typePriorityList: string[];
247
+ }, {
248
+ typePriorityList: string[];
249
+ }>;
250
+ }, "strip", z.ZodTypeAny, {
251
+ params: {
252
+ userId: string;
253
+ userName: string;
254
+ userPriority: string;
255
+ };
256
+ ip: string;
257
+ cgi: PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST;
258
+ postJsonBody: {
259
+ typePriorityList: string[];
260
+ };
261
+ }, {
262
+ params: {
263
+ userId: string;
264
+ userName: string;
265
+ userPriority: string;
266
+ };
267
+ ip: string;
268
+ cgi: PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST;
269
+ postJsonBody: {
270
+ typePriorityList: string[];
271
+ };
223
272
  }>, z.ZodObject<{
224
273
  cgi: z.ZodLiteral<PlaneTrackerUserActions.SET_BLACK_LIST>;
225
274
  ip: z.ZodString;
@@ -711,6 +760,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
711
760
  whiteListed: z.ZodBoolean;
712
761
  blackListed: z.ZodBoolean;
713
762
  priorityListed: z.ZodBoolean;
763
+ typePriorityListed: z.ZodDefault<z.ZodBoolean>;
714
764
  autoSelectionIgnored: z.ZodBoolean;
715
765
  signalQuality: z.ZodNumber;
716
766
  emitterCategorySet: z.ZodDefault<z.ZodNumber>;
@@ -729,6 +779,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
729
779
  whiteListed: boolean;
730
780
  blackListed: boolean;
731
781
  priorityListed: boolean;
782
+ typePriorityListed: boolean;
732
783
  autoSelectionIgnored: boolean;
733
784
  signalQuality: number;
734
785
  emitterCategorySet: number;
@@ -751,6 +802,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
751
802
  signalQuality: number;
752
803
  emergencyState: boolean;
753
804
  emergencyStatusMessage: string;
805
+ typePriorityListed?: boolean | undefined;
754
806
  emitterCategorySet?: number | undefined;
755
807
  emitterCategory?: number | undefined;
756
808
  }>, "many">;
@@ -768,6 +820,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
768
820
  whiteListed: boolean;
769
821
  blackListed: boolean;
770
822
  priorityListed: boolean;
823
+ typePriorityListed: boolean;
771
824
  autoSelectionIgnored: boolean;
772
825
  signalQuality: number;
773
826
  emitterCategorySet: number;
@@ -793,6 +846,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
793
846
  signalQuality: number;
794
847
  emergencyState: boolean;
795
848
  emergencyStatusMessage: string;
849
+ typePriorityListed?: boolean | undefined;
796
850
  emitterCategorySet?: number | undefined;
797
851
  emitterCategory?: number | undefined;
798
852
  }[];
@@ -822,7 +876,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
822
876
  lat?: string | undefined;
823
877
  lon?: string | undefined;
824
878
  }>;
825
- cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
879
+ cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
826
880
  postJsonBody: z.ZodAny;
827
881
  }, "strip", z.ZodTypeAny, {
828
882
  params: {
@@ -986,6 +1040,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
986
1040
  whiteListed: z.ZodBoolean;
987
1041
  blackListed: z.ZodBoolean;
988
1042
  priorityListed: z.ZodBoolean;
1043
+ typePriorityListed: z.ZodDefault<z.ZodBoolean>;
989
1044
  autoSelectionIgnored: z.ZodBoolean;
990
1045
  signalQuality: z.ZodNumber;
991
1046
  emitterCategorySet: z.ZodDefault<z.ZodNumber>;
@@ -1004,6 +1059,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1004
1059
  whiteListed: boolean;
1005
1060
  blackListed: boolean;
1006
1061
  priorityListed: boolean;
1062
+ typePriorityListed: boolean;
1007
1063
  autoSelectionIgnored: boolean;
1008
1064
  signalQuality: number;
1009
1065
  emitterCategorySet: number;
@@ -1026,6 +1082,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1026
1082
  signalQuality: number;
1027
1083
  emergencyState: boolean;
1028
1084
  emergencyStatusMessage: string;
1085
+ typePriorityListed?: boolean | undefined;
1029
1086
  emitterCategorySet?: number | undefined;
1030
1087
  emitterCategory?: number | undefined;
1031
1088
  }>, "many">;
@@ -1043,6 +1100,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1043
1100
  whiteListed: boolean;
1044
1101
  blackListed: boolean;
1045
1102
  priorityListed: boolean;
1103
+ typePriorityListed: boolean;
1046
1104
  autoSelectionIgnored: boolean;
1047
1105
  signalQuality: number;
1048
1106
  emitterCategorySet: number;
@@ -1068,6 +1126,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1068
1126
  signalQuality: number;
1069
1127
  emergencyState: boolean;
1070
1128
  emergencyStatusMessage: string;
1129
+ typePriorityListed?: boolean | undefined;
1071
1130
  emitterCategorySet?: number | undefined;
1072
1131
  emitterCategory?: number | undefined;
1073
1132
  }[];
@@ -1097,7 +1156,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1097
1156
  lat?: string | undefined;
1098
1157
  lon?: string | undefined;
1099
1158
  }>;
1100
- cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
1159
+ cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
1101
1160
  postJsonBody: z.ZodAny;
1102
1161
  }, "strip", z.ZodTypeAny, {
1103
1162
  params: {
@@ -1237,6 +1296,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1237
1296
  whiteListed: boolean;
1238
1297
  blackListed: boolean;
1239
1298
  priorityListed: boolean;
1299
+ typePriorityListed: boolean;
1240
1300
  autoSelectionIgnored: boolean;
1241
1301
  signalQuality: number;
1242
1302
  emitterCategorySet: number;
@@ -1311,6 +1371,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1311
1371
  signalQuality: number;
1312
1372
  emergencyState: boolean;
1313
1373
  emergencyStatusMessage: string;
1374
+ typePriorityListed?: boolean | undefined;
1314
1375
  emitterCategorySet?: number | undefined;
1315
1376
  emitterCategory?: number | undefined;
1316
1377
  }[];
@@ -1399,6 +1460,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1399
1460
  whiteListed: z.ZodBoolean;
1400
1461
  blackListed: z.ZodBoolean;
1401
1462
  priorityListed: z.ZodBoolean;
1463
+ typePriorityListed: z.ZodDefault<z.ZodBoolean>;
1402
1464
  autoSelectionIgnored: z.ZodBoolean;
1403
1465
  signalQuality: z.ZodNumber;
1404
1466
  emitterCategorySet: z.ZodDefault<z.ZodNumber>;
@@ -1417,6 +1479,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1417
1479
  whiteListed: boolean;
1418
1480
  blackListed: boolean;
1419
1481
  priorityListed: boolean;
1482
+ typePriorityListed: boolean;
1420
1483
  autoSelectionIgnored: boolean;
1421
1484
  signalQuality: number;
1422
1485
  emitterCategorySet: number;
@@ -1439,6 +1502,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1439
1502
  signalQuality: number;
1440
1503
  emergencyState: boolean;
1441
1504
  emergencyStatusMessage: string;
1505
+ typePriorityListed?: boolean | undefined;
1442
1506
  emitterCategorySet?: number | undefined;
1443
1507
  emitterCategory?: number | undefined;
1444
1508
  }>, "many">;
@@ -1456,6 +1520,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1456
1520
  whiteListed: boolean;
1457
1521
  blackListed: boolean;
1458
1522
  priorityListed: boolean;
1523
+ typePriorityListed: boolean;
1459
1524
  autoSelectionIgnored: boolean;
1460
1525
  signalQuality: number;
1461
1526
  emitterCategorySet: number;
@@ -1481,6 +1546,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1481
1546
  signalQuality: number;
1482
1547
  emergencyState: boolean;
1483
1548
  emergencyStatusMessage: string;
1549
+ typePriorityListed?: boolean | undefined;
1484
1550
  emitterCategorySet?: number | undefined;
1485
1551
  emitterCategory?: number | undefined;
1486
1552
  }[];
@@ -1510,7 +1576,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1510
1576
  lat?: string | undefined;
1511
1577
  lon?: string | undefined;
1512
1578
  }>;
1513
- cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
1579
+ cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
1514
1580
  postJsonBody: z.ZodAny;
1515
1581
  }, "strip", z.ZodTypeAny, {
1516
1582
  params: {
@@ -15,6 +15,7 @@ const apiFlightDataSchema = zod_1.z.object({
15
15
  whiteListed: zod_1.z.boolean(),
16
16
  blackListed: zod_1.z.boolean(),
17
17
  priorityListed: zod_1.z.boolean(),
18
+ typePriorityListed: zod_1.z.boolean().default(false),
18
19
  autoSelectionIgnored: zod_1.z.boolean(),
19
20
  signalQuality: zod_1.z.number(),
20
21
  emitterCategorySet: zod_1.z.number().default(4),
@@ -48,6 +49,7 @@ var PlaneTrackerUserActions;
48
49
  PlaneTrackerUserActions["TRACK_ICAO"] = "trackIcao.cgi";
49
50
  PlaneTrackerUserActions["RESET_ICAO"] = "resetIcao.cgi";
50
51
  PlaneTrackerUserActions["SET_PRIORITY_LIST"] = "setPriorityList.cgi";
52
+ PlaneTrackerUserActions["SET_TYPE_PRIORITY_LIST"] = "setTypePriorityList.cgi";
51
53
  PlaneTrackerUserActions["SET_BLACK_LIST"] = "setBlackList.cgi";
52
54
  PlaneTrackerUserActions["SET_WHITE_LIST"] = "setWhiteList.cgi";
53
55
  PlaneTrackerUserActions["GO_TO_COORDINATES"] = "goToCoordinates.cgi";
@@ -78,6 +80,14 @@ exports.planeTrackerUserActionData = zod_1.z.discriminatedUnion('cgi', [
78
80
  priorityList: zod_1.z.array(zod_1.z.string()),
79
81
  }),
80
82
  }),
83
+ zod_1.z.object({
84
+ cgi: zod_1.z.literal(PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST),
85
+ ip: zod_1.z.string(),
86
+ params: apiStringUserSchema,
87
+ postJsonBody: zod_1.z.object({
88
+ typePriorityList: zod_1.z.array(zod_1.z.string()),
89
+ }),
90
+ }),
81
91
  zod_1.z.object({
82
92
  cgi: zod_1.z.literal(PlaneTrackerUserActions.SET_BLACK_LIST),
83
93
  ip: zod_1.z.string(),
@@ -164,6 +174,7 @@ const ptrEventsDataSchema = zod_1.z.discriminatedUnion('type', [
164
174
  PlaneTrackerUserActions.TRACK_ICAO,
165
175
  PlaneTrackerUserActions.RESET_ICAO,
166
176
  PlaneTrackerUserActions.SET_PRIORITY_LIST,
177
+ PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST,
167
178
  PlaneTrackerUserActions.SET_BLACK_LIST,
168
179
  PlaneTrackerUserActions.SET_WHITE_LIST,
169
180
  PlaneTrackerUserActions.GO_TO_COORDINATES,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { paramToUrl } from './internal/utils';
3
- import { blackListSchema, cameraSettingsSchema, flightInfoSchema, getIcaoSchema, mapInfoSchema, priorityListSchema, serverSettingsSchema, trackingModeSchema, whiteListSchema, wsAliasResponseSchema, zonesSchema, } from './types/PlaneTrackerAPI';
3
+ import { blackListSchema, cameraSettingsSchema, flightInfoSchema, getIcaoSchema, mapInfoSchema, priorityListSchema, serverSettingsSchema, trackingModeSchema, typePriorityListSchema, whiteListSchema, wsAliasResponseSchema, zonesSchema, } from './types/PlaneTrackerAPI';
4
4
  import { CannotSetCoordsInAutoModeError, ImportSettingsError, InvalidAltitudeError, InvalidLatLngError, ParsingBlobError, ResetCalibrationError, ServerError, BadRequestError, ErrorWithResponse, } from './errors/errors';
5
5
  import { ProxyClient } from './internal/ProxyClient';
6
6
  import { cameraListSchema } from './types/GenetecAgent';
@@ -122,6 +122,13 @@ export class PlaneTrackerAPI {
122
122
  async setPriorityList(priorityList, options) {
123
123
  return await this._postJsonEncoded(`${BASE_PATH}/package/setPriorityList.cgi`, { priorityList }, this.apiUser, options);
124
124
  }
125
+ async getTypePriorityList(options) {
126
+ const res = await this._getJson(`${BASE_PATH}/package/getTypePriorityList.cgi`, undefined, options);
127
+ return typePriorityListSchema.parse(res).typePriorityList;
128
+ }
129
+ async setTypePriorityList(typePriorityList, options) {
130
+ return await this._postJsonEncoded(`${BASE_PATH}/package/setTypePriorityList.cgi`, { typePriorityList }, this.apiUser, options);
131
+ }
125
132
  async getWhiteList(options) {
126
133
  const res = await this._getJson(`${BASE_PATH}/package/getWhiteList.cgi`, undefined, options);
127
134
  return whiteListSchema.parse(res).whiteList;
@@ -12,6 +12,7 @@ const apiFlightDataSchema = z.object({
12
12
  whiteListed: z.boolean(),
13
13
  blackListed: z.boolean(),
14
14
  priorityListed: z.boolean(),
15
+ typePriorityListed: z.boolean().default(false),
15
16
  autoSelectionIgnored: z.boolean(),
16
17
  signalQuality: z.number(),
17
18
  emitterCategorySet: z.number().default(4),
@@ -45,6 +46,7 @@ export var PlaneTrackerUserActions;
45
46
  PlaneTrackerUserActions["TRACK_ICAO"] = "trackIcao.cgi";
46
47
  PlaneTrackerUserActions["RESET_ICAO"] = "resetIcao.cgi";
47
48
  PlaneTrackerUserActions["SET_PRIORITY_LIST"] = "setPriorityList.cgi";
49
+ PlaneTrackerUserActions["SET_TYPE_PRIORITY_LIST"] = "setTypePriorityList.cgi";
48
50
  PlaneTrackerUserActions["SET_BLACK_LIST"] = "setBlackList.cgi";
49
51
  PlaneTrackerUserActions["SET_WHITE_LIST"] = "setWhiteList.cgi";
50
52
  PlaneTrackerUserActions["GO_TO_COORDINATES"] = "goToCoordinates.cgi";
@@ -75,6 +77,14 @@ export const planeTrackerUserActionData = z.discriminatedUnion('cgi', [
75
77
  priorityList: z.array(z.string()),
76
78
  }),
77
79
  }),
80
+ z.object({
81
+ cgi: z.literal(PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST),
82
+ ip: z.string(),
83
+ params: apiStringUserSchema,
84
+ postJsonBody: z.object({
85
+ typePriorityList: z.array(z.string()),
86
+ }),
87
+ }),
78
88
  z.object({
79
89
  cgi: z.literal(PlaneTrackerUserActions.SET_BLACK_LIST),
80
90
  ip: z.string(),
@@ -161,6 +171,7 @@ const ptrEventsDataSchema = z.discriminatedUnion('type', [
161
171
  PlaneTrackerUserActions.TRACK_ICAO,
162
172
  PlaneTrackerUserActions.RESET_ICAO,
163
173
  PlaneTrackerUserActions.SET_PRIORITY_LIST,
174
+ PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST,
164
175
  PlaneTrackerUserActions.SET_BLACK_LIST,
165
176
  PlaneTrackerUserActions.SET_WHITE_LIST,
166
177
  PlaneTrackerUserActions.GO_TO_COORDINATES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.71",
3
+ "version": "4.0.0-beta.72",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {
@@ -1,5 +1,5 @@
1
1
  import { IClient, TBlobResponse, TParameters, TResponse } from './internal/types';
2
- import { ICAO, TApiUser, TBlackList, TCameraSettings, TExportDataType, TGetIcaoByOption, TImportDataType, TPriorityList, TTrackingMode, TWhiteList, TZones } from './types/PlaneTrackerAPI';
2
+ import { ICAO, TApiUser, TBlackList, TCameraSettings, TExportDataType, TGetIcaoByOption, TImportDataType, TPriorityList, TTrackingMode, TTypePriorityList, TWhiteList, TZones } from './types/PlaneTrackerAPI';
3
3
  import { THttpRequestOptions, TProxyParams } from './types/common';
4
4
  import { ProxyClient } from './internal/ProxyClient';
5
5
  export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
@@ -188,6 +188,8 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
188
188
  getIcao(by: TGetIcaoByOption, value: string, options?: THttpRequestOptions): Promise<string>;
189
189
  getPriorityList(options?: THttpRequestOptions): Promise<string[]>;
190
190
  setPriorityList(priorityList: TPriorityList['priorityList'], options?: THttpRequestOptions): Promise<TResponse>;
191
+ getTypePriorityList(options?: THttpRequestOptions): Promise<string[]>;
192
+ setTypePriorityList(typePriorityList: TTypePriorityList['typePriorityList'], options?: THttpRequestOptions): Promise<TResponse>;
191
193
  getWhiteList(options?: THttpRequestOptions): Promise<string[]>;
192
194
  setWhiteList(whiteList: TWhiteList['whiteList'], options?: THttpRequestOptions): Promise<TResponse>;
193
195
  getBlackList(options?: THttpRequestOptions): Promise<string[]>;
@@ -11,6 +11,7 @@ declare const apiFlightDataSchema: z.ZodObject<{
11
11
  whiteListed: z.ZodBoolean;
12
12
  blackListed: z.ZodBoolean;
13
13
  priorityListed: z.ZodBoolean;
14
+ typePriorityListed: z.ZodDefault<z.ZodBoolean>;
14
15
  autoSelectionIgnored: z.ZodBoolean;
15
16
  signalQuality: z.ZodNumber;
16
17
  emitterCategorySet: z.ZodDefault<z.ZodNumber>;
@@ -29,6 +30,7 @@ declare const apiFlightDataSchema: z.ZodObject<{
29
30
  whiteListed: boolean;
30
31
  blackListed: boolean;
31
32
  priorityListed: boolean;
33
+ typePriorityListed: boolean;
32
34
  autoSelectionIgnored: boolean;
33
35
  signalQuality: number;
34
36
  emitterCategorySet: number;
@@ -51,6 +53,7 @@ declare const apiFlightDataSchema: z.ZodObject<{
51
53
  signalQuality: number;
52
54
  emergencyState: boolean;
53
55
  emergencyStatusMessage: string;
56
+ typePriorityListed?: boolean | undefined;
54
57
  emitterCategorySet?: number | undefined;
55
58
  emitterCategory?: number | undefined;
56
59
  }>;
@@ -96,6 +99,7 @@ export declare enum PlaneTrackerUserActions {
96
99
  TRACK_ICAO = "trackIcao.cgi",
97
100
  RESET_ICAO = "resetIcao.cgi",
98
101
  SET_PRIORITY_LIST = "setPriorityList.cgi",
102
+ SET_TYPE_PRIORITY_LIST = "setTypePriorityList.cgi",
99
103
  SET_BLACK_LIST = "setBlackList.cgi",
100
104
  SET_WHITE_LIST = "setWhiteList.cgi",
101
105
  GO_TO_COORDINATES = "goToCoordinates.cgi",
@@ -220,6 +224,51 @@ export declare const planeTrackerUserActionData: z.ZodDiscriminatedUnion<"cgi",
220
224
  postJsonBody: {
221
225
  priorityList: string[];
222
226
  };
227
+ }>, z.ZodObject<{
228
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST>;
229
+ ip: z.ZodString;
230
+ params: z.ZodObject<{
231
+ userId: z.ZodString;
232
+ userName: z.ZodString;
233
+ userPriority: z.ZodString;
234
+ }, "strip", z.ZodTypeAny, {
235
+ userId: string;
236
+ userName: string;
237
+ userPriority: string;
238
+ }, {
239
+ userId: string;
240
+ userName: string;
241
+ userPriority: string;
242
+ }>;
243
+ postJsonBody: z.ZodObject<{
244
+ typePriorityList: z.ZodArray<z.ZodString, "many">;
245
+ }, "strip", z.ZodTypeAny, {
246
+ typePriorityList: string[];
247
+ }, {
248
+ typePriorityList: string[];
249
+ }>;
250
+ }, "strip", z.ZodTypeAny, {
251
+ params: {
252
+ userId: string;
253
+ userName: string;
254
+ userPriority: string;
255
+ };
256
+ ip: string;
257
+ cgi: PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST;
258
+ postJsonBody: {
259
+ typePriorityList: string[];
260
+ };
261
+ }, {
262
+ params: {
263
+ userId: string;
264
+ userName: string;
265
+ userPriority: string;
266
+ };
267
+ ip: string;
268
+ cgi: PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST;
269
+ postJsonBody: {
270
+ typePriorityList: string[];
271
+ };
223
272
  }>, z.ZodObject<{
224
273
  cgi: z.ZodLiteral<PlaneTrackerUserActions.SET_BLACK_LIST>;
225
274
  ip: z.ZodString;
@@ -711,6 +760,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
711
760
  whiteListed: z.ZodBoolean;
712
761
  blackListed: z.ZodBoolean;
713
762
  priorityListed: z.ZodBoolean;
763
+ typePriorityListed: z.ZodDefault<z.ZodBoolean>;
714
764
  autoSelectionIgnored: z.ZodBoolean;
715
765
  signalQuality: z.ZodNumber;
716
766
  emitterCategorySet: z.ZodDefault<z.ZodNumber>;
@@ -729,6 +779,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
729
779
  whiteListed: boolean;
730
780
  blackListed: boolean;
731
781
  priorityListed: boolean;
782
+ typePriorityListed: boolean;
732
783
  autoSelectionIgnored: boolean;
733
784
  signalQuality: number;
734
785
  emitterCategorySet: number;
@@ -751,6 +802,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
751
802
  signalQuality: number;
752
803
  emergencyState: boolean;
753
804
  emergencyStatusMessage: string;
805
+ typePriorityListed?: boolean | undefined;
754
806
  emitterCategorySet?: number | undefined;
755
807
  emitterCategory?: number | undefined;
756
808
  }>, "many">;
@@ -768,6 +820,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
768
820
  whiteListed: boolean;
769
821
  blackListed: boolean;
770
822
  priorityListed: boolean;
823
+ typePriorityListed: boolean;
771
824
  autoSelectionIgnored: boolean;
772
825
  signalQuality: number;
773
826
  emitterCategorySet: number;
@@ -793,6 +846,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
793
846
  signalQuality: number;
794
847
  emergencyState: boolean;
795
848
  emergencyStatusMessage: string;
849
+ typePriorityListed?: boolean | undefined;
796
850
  emitterCategorySet?: number | undefined;
797
851
  emitterCategory?: number | undefined;
798
852
  }[];
@@ -822,7 +876,7 @@ declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
822
876
  lat?: string | undefined;
823
877
  lon?: string | undefined;
824
878
  }>;
825
- cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
879
+ cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
826
880
  postJsonBody: z.ZodAny;
827
881
  }, "strip", z.ZodTypeAny, {
828
882
  params: {
@@ -986,6 +1040,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
986
1040
  whiteListed: z.ZodBoolean;
987
1041
  blackListed: z.ZodBoolean;
988
1042
  priorityListed: z.ZodBoolean;
1043
+ typePriorityListed: z.ZodDefault<z.ZodBoolean>;
989
1044
  autoSelectionIgnored: z.ZodBoolean;
990
1045
  signalQuality: z.ZodNumber;
991
1046
  emitterCategorySet: z.ZodDefault<z.ZodNumber>;
@@ -1004,6 +1059,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1004
1059
  whiteListed: boolean;
1005
1060
  blackListed: boolean;
1006
1061
  priorityListed: boolean;
1062
+ typePriorityListed: boolean;
1007
1063
  autoSelectionIgnored: boolean;
1008
1064
  signalQuality: number;
1009
1065
  emitterCategorySet: number;
@@ -1026,6 +1082,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1026
1082
  signalQuality: number;
1027
1083
  emergencyState: boolean;
1028
1084
  emergencyStatusMessage: string;
1085
+ typePriorityListed?: boolean | undefined;
1029
1086
  emitterCategorySet?: number | undefined;
1030
1087
  emitterCategory?: number | undefined;
1031
1088
  }>, "many">;
@@ -1043,6 +1100,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1043
1100
  whiteListed: boolean;
1044
1101
  blackListed: boolean;
1045
1102
  priorityListed: boolean;
1103
+ typePriorityListed: boolean;
1046
1104
  autoSelectionIgnored: boolean;
1047
1105
  signalQuality: number;
1048
1106
  emitterCategorySet: number;
@@ -1068,6 +1126,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1068
1126
  signalQuality: number;
1069
1127
  emergencyState: boolean;
1070
1128
  emergencyStatusMessage: string;
1129
+ typePriorityListed?: boolean | undefined;
1071
1130
  emitterCategorySet?: number | undefined;
1072
1131
  emitterCategory?: number | undefined;
1073
1132
  }[];
@@ -1097,7 +1156,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1097
1156
  lat?: string | undefined;
1098
1157
  lon?: string | undefined;
1099
1158
  }>;
1100
- cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
1159
+ cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
1101
1160
  postJsonBody: z.ZodAny;
1102
1161
  }, "strip", z.ZodTypeAny, {
1103
1162
  params: {
@@ -1237,6 +1296,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1237
1296
  whiteListed: boolean;
1238
1297
  blackListed: boolean;
1239
1298
  priorityListed: boolean;
1299
+ typePriorityListed: boolean;
1240
1300
  autoSelectionIgnored: boolean;
1241
1301
  signalQuality: number;
1242
1302
  emitterCategorySet: number;
@@ -1311,6 +1371,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1311
1371
  signalQuality: number;
1312
1372
  emergencyState: boolean;
1313
1373
  emergencyStatusMessage: string;
1374
+ typePriorityListed?: boolean | undefined;
1314
1375
  emitterCategorySet?: number | undefined;
1315
1376
  emitterCategory?: number | undefined;
1316
1377
  }[];
@@ -1399,6 +1460,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1399
1460
  whiteListed: z.ZodBoolean;
1400
1461
  blackListed: z.ZodBoolean;
1401
1462
  priorityListed: z.ZodBoolean;
1463
+ typePriorityListed: z.ZodDefault<z.ZodBoolean>;
1402
1464
  autoSelectionIgnored: z.ZodBoolean;
1403
1465
  signalQuality: z.ZodNumber;
1404
1466
  emitterCategorySet: z.ZodDefault<z.ZodNumber>;
@@ -1417,6 +1479,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1417
1479
  whiteListed: boolean;
1418
1480
  blackListed: boolean;
1419
1481
  priorityListed: boolean;
1482
+ typePriorityListed: boolean;
1420
1483
  autoSelectionIgnored: boolean;
1421
1484
  signalQuality: number;
1422
1485
  emitterCategorySet: number;
@@ -1439,6 +1502,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1439
1502
  signalQuality: number;
1440
1503
  emergencyState: boolean;
1441
1504
  emergencyStatusMessage: string;
1505
+ typePriorityListed?: boolean | undefined;
1442
1506
  emitterCategorySet?: number | undefined;
1443
1507
  emitterCategory?: number | undefined;
1444
1508
  }>, "many">;
@@ -1456,6 +1520,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1456
1520
  whiteListed: boolean;
1457
1521
  blackListed: boolean;
1458
1522
  priorityListed: boolean;
1523
+ typePriorityListed: boolean;
1459
1524
  autoSelectionIgnored: boolean;
1460
1525
  signalQuality: number;
1461
1526
  emitterCategorySet: number;
@@ -1481,6 +1546,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1481
1546
  signalQuality: number;
1482
1547
  emergencyState: boolean;
1483
1548
  emergencyStatusMessage: string;
1549
+ typePriorityListed?: boolean | undefined;
1484
1550
  emitterCategorySet?: number | undefined;
1485
1551
  emitterCategory?: number | undefined;
1486
1552
  }[];
@@ -1510,7 +1576,7 @@ export declare const ptrEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
1510
1576
  lat?: string | undefined;
1511
1577
  lon?: string | undefined;
1512
1578
  }>;
1513
- cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
1579
+ cgi: z.ZodEnum<[PlaneTrackerUserActions.TRACK_ICAO, PlaneTrackerUserActions.RESET_ICAO, PlaneTrackerUserActions.SET_PRIORITY_LIST, PlaneTrackerUserActions.SET_TYPE_PRIORITY_LIST, PlaneTrackerUserActions.SET_BLACK_LIST, PlaneTrackerUserActions.SET_WHITE_LIST, PlaneTrackerUserActions.GO_TO_COORDINATES, PlaneTrackerUserActions.SET_TRACKING_MODE, PlaneTrackerUserActions.SET_ZONES, PlaneTrackerUserActions.RESET_PTZ_CALIBRATION, PlaneTrackerUserActions.LOCK_API, PlaneTrackerUserActions.UNLOCK_API]>;
1514
1580
  postJsonBody: z.ZodAny;
1515
1581
  }, "strip", z.ZodTypeAny, {
1516
1582
  params: {