camstreamerlib 4.0.10 → 4.0.11

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.
@@ -89,8 +89,8 @@ class PlaneTrackerAPI extends BasicAPI_1.BasicAPI {
89
89
  }
90
90
  }
91
91
  async getDomainList(options) {
92
- const res = await this._getJson(`${BASE_PATH}/getDomainList.cgi`, { action: 'get' }, options);
93
- return PlaneTrackerAPI_1.domainListSchema.parse(res);
92
+ const res = await this._getJson(`${BASE_PATH}/package/getDomainList.cgi`, { action: 'get' }, options);
93
+ return zod_1.z.object({ domainList: PlaneTrackerAPI_1.domainListSchema }).parse(res).domainList;
94
94
  }
95
95
  async fetchFlightInfo(targetId, options) {
96
96
  const res = await this._getJson(`${BASE_PATH}/package/flightInfo.cgi`, { targetId }, options);
@@ -105,6 +105,7 @@ declare const apiUserSchema: z.ZodObject<{
105
105
  export type TEventType = 'CAMERA_POSITION' | 'TRACKING_START' | 'TRACKING_STOP' | 'FLIGHT_LIST' | 'USER_ACTION' | 'CONNECTED_USERS' | 'FORCE_TRACKING_STATUS' | 'API_LOCK_STATUS';
106
106
  export declare enum EUserActions {
107
107
  TRACK_ICAO = "trackIcao.cgi",
108
+ TRACK_TARGET = "trackTarget.cgi",
108
109
  RESET_ICAO = "resetIcao.cgi",
109
110
  SET_PRIORITY_LIST = "setPriorityList.cgi",
110
111
  SET_BLACK_LIST = "setBlackList.cgi",
@@ -325,6 +326,50 @@ declare const eventsDataSchema: z.ZodUnion<readonly [z.ZodObject<{
325
326
  ip: string;
326
327
  cgi: EUserActions.TRACK_ICAO;
327
328
  postJsonBody?: any;
329
+ }>, z.ZodObject<{
330
+ type: z.ZodLiteral<"USER_ACTION">;
331
+ cgi: z.ZodLiteral<EUserActions.TRACK_TARGET>;
332
+ ip: z.ZodString;
333
+ params: z.ZodObject<{
334
+ userId: z.ZodString;
335
+ userName: z.ZodString;
336
+ userPriority: z.ZodString;
337
+ } & {
338
+ targetId: z.ZodString;
339
+ }, "strip", z.ZodTypeAny, {
340
+ targetId: string;
341
+ userId: string;
342
+ userName: string;
343
+ userPriority: string;
344
+ }, {
345
+ targetId: string;
346
+ userId: string;
347
+ userName: string;
348
+ userPriority: string;
349
+ }>;
350
+ postJsonBody: z.ZodAny;
351
+ }, "strip", z.ZodTypeAny, {
352
+ params: {
353
+ targetId: string;
354
+ userId: string;
355
+ userName: string;
356
+ userPriority: string;
357
+ };
358
+ type: "USER_ACTION";
359
+ ip: string;
360
+ cgi: EUserActions.TRACK_TARGET;
361
+ postJsonBody?: any;
362
+ }, {
363
+ params: {
364
+ targetId: string;
365
+ userId: string;
366
+ userName: string;
367
+ userPriority: string;
368
+ };
369
+ type: "USER_ACTION";
370
+ ip: string;
371
+ cgi: EUserActions.TRACK_TARGET;
372
+ postJsonBody?: any;
328
373
  }>, z.ZodObject<{
329
374
  type: z.ZodLiteral<"USER_ACTION">;
330
375
  cgi: z.ZodLiteral<EUserActions.RESET_ICAO>;
@@ -1279,6 +1324,50 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
1279
1324
  ip: string;
1280
1325
  cgi: EUserActions.TRACK_ICAO;
1281
1326
  postJsonBody?: any;
1327
+ }>, z.ZodObject<{
1328
+ type: z.ZodLiteral<"USER_ACTION">;
1329
+ cgi: z.ZodLiteral<EUserActions.TRACK_TARGET>;
1330
+ ip: z.ZodString;
1331
+ params: z.ZodObject<{
1332
+ userId: z.ZodString;
1333
+ userName: z.ZodString;
1334
+ userPriority: z.ZodString;
1335
+ } & {
1336
+ targetId: z.ZodString;
1337
+ }, "strip", z.ZodTypeAny, {
1338
+ targetId: string;
1339
+ userId: string;
1340
+ userName: string;
1341
+ userPriority: string;
1342
+ }, {
1343
+ targetId: string;
1344
+ userId: string;
1345
+ userName: string;
1346
+ userPriority: string;
1347
+ }>;
1348
+ postJsonBody: z.ZodAny;
1349
+ }, "strip", z.ZodTypeAny, {
1350
+ params: {
1351
+ targetId: string;
1352
+ userId: string;
1353
+ userName: string;
1354
+ userPriority: string;
1355
+ };
1356
+ type: "USER_ACTION";
1357
+ ip: string;
1358
+ cgi: EUserActions.TRACK_TARGET;
1359
+ postJsonBody?: any;
1360
+ }, {
1361
+ params: {
1362
+ targetId: string;
1363
+ userId: string;
1364
+ userName: string;
1365
+ userPriority: string;
1366
+ };
1367
+ type: "USER_ACTION";
1368
+ ip: string;
1369
+ cgi: EUserActions.TRACK_TARGET;
1370
+ postJsonBody?: any;
1282
1371
  }>, z.ZodObject<{
1283
1372
  type: z.ZodLiteral<"USER_ACTION">;
1284
1373
  cgi: z.ZodLiteral<EUserActions.RESET_ICAO>;
@@ -2075,6 +2164,17 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
2075
2164
  ip: string;
2076
2165
  cgi: EUserActions.TRACK_ICAO;
2077
2166
  postJsonBody?: any;
2167
+ } | {
2168
+ params: {
2169
+ targetId: string;
2170
+ userId: string;
2171
+ userName: string;
2172
+ userPriority: string;
2173
+ };
2174
+ type: "USER_ACTION";
2175
+ ip: string;
2176
+ cgi: EUserActions.TRACK_TARGET;
2177
+ postJsonBody?: any;
2078
2178
  } | {
2079
2179
  params: {
2080
2180
  userId: string;
@@ -2293,6 +2393,17 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
2293
2393
  ip: string;
2294
2394
  cgi: EUserActions.TRACK_ICAO;
2295
2395
  postJsonBody?: any;
2396
+ } | {
2397
+ params: {
2398
+ targetId: string;
2399
+ userId: string;
2400
+ userName: string;
2401
+ userPriority: string;
2402
+ };
2403
+ type: "USER_ACTION";
2404
+ ip: string;
2405
+ cgi: EUserActions.TRACK_TARGET;
2406
+ postJsonBody?: any;
2296
2407
  } | {
2297
2408
  params: {
2298
2409
  userId: string;
@@ -2667,6 +2778,50 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
2667
2778
  ip: string;
2668
2779
  cgi: EUserActions.TRACK_ICAO;
2669
2780
  postJsonBody?: any;
2781
+ }>, z.ZodObject<{
2782
+ type: z.ZodLiteral<"USER_ACTION">;
2783
+ cgi: z.ZodLiteral<EUserActions.TRACK_TARGET>;
2784
+ ip: z.ZodString;
2785
+ params: z.ZodObject<{
2786
+ userId: z.ZodString;
2787
+ userName: z.ZodString;
2788
+ userPriority: z.ZodString;
2789
+ } & {
2790
+ targetId: z.ZodString;
2791
+ }, "strip", z.ZodTypeAny, {
2792
+ targetId: string;
2793
+ userId: string;
2794
+ userName: string;
2795
+ userPriority: string;
2796
+ }, {
2797
+ targetId: string;
2798
+ userId: string;
2799
+ userName: string;
2800
+ userPriority: string;
2801
+ }>;
2802
+ postJsonBody: z.ZodAny;
2803
+ }, "strip", z.ZodTypeAny, {
2804
+ params: {
2805
+ targetId: string;
2806
+ userId: string;
2807
+ userName: string;
2808
+ userPriority: string;
2809
+ };
2810
+ type: "USER_ACTION";
2811
+ ip: string;
2812
+ cgi: EUserActions.TRACK_TARGET;
2813
+ postJsonBody?: any;
2814
+ }, {
2815
+ params: {
2816
+ targetId: string;
2817
+ userId: string;
2818
+ userName: string;
2819
+ userPriority: string;
2820
+ };
2821
+ type: "USER_ACTION";
2822
+ ip: string;
2823
+ cgi: EUserActions.TRACK_TARGET;
2824
+ postJsonBody?: any;
2670
2825
  }>, z.ZodObject<{
2671
2826
  type: z.ZodLiteral<"USER_ACTION">;
2672
2827
  cgi: z.ZodLiteral<EUserActions.RESET_ICAO>;
@@ -45,6 +45,7 @@ const apiUserSchema = userSchema.extend({
45
45
  var EUserActions;
46
46
  (function (EUserActions) {
47
47
  EUserActions["TRACK_ICAO"] = "trackIcao.cgi";
48
+ EUserActions["TRACK_TARGET"] = "trackTarget.cgi";
48
49
  EUserActions["RESET_ICAO"] = "resetIcao.cgi";
49
50
  EUserActions["SET_PRIORITY_LIST"] = "setPriorityList.cgi";
50
51
  EUserActions["SET_BLACK_LIST"] = "setBlackList.cgi";
@@ -74,6 +75,13 @@ const eventsDataSchema = zod_1.z.union([
74
75
  params: userSchema.extend({ icao: zod_1.z.string() }),
75
76
  postJsonBody: zod_1.z.any(),
76
77
  }),
78
+ zod_1.z.object({
79
+ type: zod_1.z.literal('USER_ACTION'),
80
+ cgi: zod_1.z.literal(EUserActions.TRACK_TARGET),
81
+ ip: zod_1.z.string(),
82
+ params: userSchema.extend({ targetId: zod_1.z.string() }),
83
+ postJsonBody: zod_1.z.any(),
84
+ }),
77
85
  zod_1.z.object({
78
86
  type: zod_1.z.literal('USER_ACTION'),
79
87
  cgi: zod_1.z.literal(EUserActions.RESET_ICAO),
@@ -86,8 +86,8 @@ export class PlaneTrackerAPI extends BasicAPI {
86
86
  }
87
87
  }
88
88
  async getDomainList(options) {
89
- const res = await this._getJson(`${BASE_PATH}/getDomainList.cgi`, { action: 'get' }, options);
90
- return domainListSchema.parse(res);
89
+ const res = await this._getJson(`${BASE_PATH}/package/getDomainList.cgi`, { action: 'get' }, options);
90
+ return z.object({ domainList: domainListSchema }).parse(res).domainList;
91
91
  }
92
92
  async fetchFlightInfo(targetId, options) {
93
93
  const res = await this._getJson(`${BASE_PATH}/package/flightInfo.cgi`, { targetId }, options);
@@ -42,6 +42,7 @@ const apiUserSchema = userSchema.extend({
42
42
  export var EUserActions;
43
43
  (function (EUserActions) {
44
44
  EUserActions["TRACK_ICAO"] = "trackIcao.cgi";
45
+ EUserActions["TRACK_TARGET"] = "trackTarget.cgi";
45
46
  EUserActions["RESET_ICAO"] = "resetIcao.cgi";
46
47
  EUserActions["SET_PRIORITY_LIST"] = "setPriorityList.cgi";
47
48
  EUserActions["SET_BLACK_LIST"] = "setBlackList.cgi";
@@ -71,6 +72,13 @@ const eventsDataSchema = z.union([
71
72
  params: userSchema.extend({ icao: z.string() }),
72
73
  postJsonBody: z.any(),
73
74
  }),
75
+ z.object({
76
+ type: z.literal('USER_ACTION'),
77
+ cgi: z.literal(EUserActions.TRACK_TARGET),
78
+ ip: z.string(),
79
+ params: userSchema.extend({ targetId: z.string() }),
80
+ postJsonBody: z.any(),
81
+ }),
74
82
  z.object({
75
83
  type: z.literal('USER_ACTION'),
76
84
  cgi: z.literal(EUserActions.RESET_ICAO),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.10",
3
+ "version": "4.0.11",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {
@@ -105,6 +105,7 @@ declare const apiUserSchema: z.ZodObject<{
105
105
  export type TEventType = 'CAMERA_POSITION' | 'TRACKING_START' | 'TRACKING_STOP' | 'FLIGHT_LIST' | 'USER_ACTION' | 'CONNECTED_USERS' | 'FORCE_TRACKING_STATUS' | 'API_LOCK_STATUS';
106
106
  export declare enum EUserActions {
107
107
  TRACK_ICAO = "trackIcao.cgi",
108
+ TRACK_TARGET = "trackTarget.cgi",
108
109
  RESET_ICAO = "resetIcao.cgi",
109
110
  SET_PRIORITY_LIST = "setPriorityList.cgi",
110
111
  SET_BLACK_LIST = "setBlackList.cgi",
@@ -325,6 +326,50 @@ declare const eventsDataSchema: z.ZodUnion<readonly [z.ZodObject<{
325
326
  ip: string;
326
327
  cgi: EUserActions.TRACK_ICAO;
327
328
  postJsonBody?: any;
329
+ }>, z.ZodObject<{
330
+ type: z.ZodLiteral<"USER_ACTION">;
331
+ cgi: z.ZodLiteral<EUserActions.TRACK_TARGET>;
332
+ ip: z.ZodString;
333
+ params: z.ZodObject<{
334
+ userId: z.ZodString;
335
+ userName: z.ZodString;
336
+ userPriority: z.ZodString;
337
+ } & {
338
+ targetId: z.ZodString;
339
+ }, "strip", z.ZodTypeAny, {
340
+ targetId: string;
341
+ userId: string;
342
+ userName: string;
343
+ userPriority: string;
344
+ }, {
345
+ targetId: string;
346
+ userId: string;
347
+ userName: string;
348
+ userPriority: string;
349
+ }>;
350
+ postJsonBody: z.ZodAny;
351
+ }, "strip", z.ZodTypeAny, {
352
+ params: {
353
+ targetId: string;
354
+ userId: string;
355
+ userName: string;
356
+ userPriority: string;
357
+ };
358
+ type: "USER_ACTION";
359
+ ip: string;
360
+ cgi: EUserActions.TRACK_TARGET;
361
+ postJsonBody?: any;
362
+ }, {
363
+ params: {
364
+ targetId: string;
365
+ userId: string;
366
+ userName: string;
367
+ userPriority: string;
368
+ };
369
+ type: "USER_ACTION";
370
+ ip: string;
371
+ cgi: EUserActions.TRACK_TARGET;
372
+ postJsonBody?: any;
328
373
  }>, z.ZodObject<{
329
374
  type: z.ZodLiteral<"USER_ACTION">;
330
375
  cgi: z.ZodLiteral<EUserActions.RESET_ICAO>;
@@ -1279,6 +1324,50 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
1279
1324
  ip: string;
1280
1325
  cgi: EUserActions.TRACK_ICAO;
1281
1326
  postJsonBody?: any;
1327
+ }>, z.ZodObject<{
1328
+ type: z.ZodLiteral<"USER_ACTION">;
1329
+ cgi: z.ZodLiteral<EUserActions.TRACK_TARGET>;
1330
+ ip: z.ZodString;
1331
+ params: z.ZodObject<{
1332
+ userId: z.ZodString;
1333
+ userName: z.ZodString;
1334
+ userPriority: z.ZodString;
1335
+ } & {
1336
+ targetId: z.ZodString;
1337
+ }, "strip", z.ZodTypeAny, {
1338
+ targetId: string;
1339
+ userId: string;
1340
+ userName: string;
1341
+ userPriority: string;
1342
+ }, {
1343
+ targetId: string;
1344
+ userId: string;
1345
+ userName: string;
1346
+ userPriority: string;
1347
+ }>;
1348
+ postJsonBody: z.ZodAny;
1349
+ }, "strip", z.ZodTypeAny, {
1350
+ params: {
1351
+ targetId: string;
1352
+ userId: string;
1353
+ userName: string;
1354
+ userPriority: string;
1355
+ };
1356
+ type: "USER_ACTION";
1357
+ ip: string;
1358
+ cgi: EUserActions.TRACK_TARGET;
1359
+ postJsonBody?: any;
1360
+ }, {
1361
+ params: {
1362
+ targetId: string;
1363
+ userId: string;
1364
+ userName: string;
1365
+ userPriority: string;
1366
+ };
1367
+ type: "USER_ACTION";
1368
+ ip: string;
1369
+ cgi: EUserActions.TRACK_TARGET;
1370
+ postJsonBody?: any;
1282
1371
  }>, z.ZodObject<{
1283
1372
  type: z.ZodLiteral<"USER_ACTION">;
1284
1373
  cgi: z.ZodLiteral<EUserActions.RESET_ICAO>;
@@ -2075,6 +2164,17 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
2075
2164
  ip: string;
2076
2165
  cgi: EUserActions.TRACK_ICAO;
2077
2166
  postJsonBody?: any;
2167
+ } | {
2168
+ params: {
2169
+ targetId: string;
2170
+ userId: string;
2171
+ userName: string;
2172
+ userPriority: string;
2173
+ };
2174
+ type: "USER_ACTION";
2175
+ ip: string;
2176
+ cgi: EUserActions.TRACK_TARGET;
2177
+ postJsonBody?: any;
2078
2178
  } | {
2079
2179
  params: {
2080
2180
  userId: string;
@@ -2293,6 +2393,17 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
2293
2393
  ip: string;
2294
2394
  cgi: EUserActions.TRACK_ICAO;
2295
2395
  postJsonBody?: any;
2396
+ } | {
2397
+ params: {
2398
+ targetId: string;
2399
+ userId: string;
2400
+ userName: string;
2401
+ userPriority: string;
2402
+ };
2403
+ type: "USER_ACTION";
2404
+ ip: string;
2405
+ cgi: EUserActions.TRACK_TARGET;
2406
+ postJsonBody?: any;
2296
2407
  } | {
2297
2408
  params: {
2298
2409
  userId: string;
@@ -2667,6 +2778,50 @@ export declare const ptrEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
2667
2778
  ip: string;
2668
2779
  cgi: EUserActions.TRACK_ICAO;
2669
2780
  postJsonBody?: any;
2781
+ }>, z.ZodObject<{
2782
+ type: z.ZodLiteral<"USER_ACTION">;
2783
+ cgi: z.ZodLiteral<EUserActions.TRACK_TARGET>;
2784
+ ip: z.ZodString;
2785
+ params: z.ZodObject<{
2786
+ userId: z.ZodString;
2787
+ userName: z.ZodString;
2788
+ userPriority: z.ZodString;
2789
+ } & {
2790
+ targetId: z.ZodString;
2791
+ }, "strip", z.ZodTypeAny, {
2792
+ targetId: string;
2793
+ userId: string;
2794
+ userName: string;
2795
+ userPriority: string;
2796
+ }, {
2797
+ targetId: string;
2798
+ userId: string;
2799
+ userName: string;
2800
+ userPriority: string;
2801
+ }>;
2802
+ postJsonBody: z.ZodAny;
2803
+ }, "strip", z.ZodTypeAny, {
2804
+ params: {
2805
+ targetId: string;
2806
+ userId: string;
2807
+ userName: string;
2808
+ userPriority: string;
2809
+ };
2810
+ type: "USER_ACTION";
2811
+ ip: string;
2812
+ cgi: EUserActions.TRACK_TARGET;
2813
+ postJsonBody?: any;
2814
+ }, {
2815
+ params: {
2816
+ targetId: string;
2817
+ userId: string;
2818
+ userName: string;
2819
+ userPriority: string;
2820
+ };
2821
+ type: "USER_ACTION";
2822
+ ip: string;
2823
+ cgi: EUserActions.TRACK_TARGET;
2824
+ postJsonBody?: any;
2670
2825
  }>, z.ZodObject<{
2671
2826
  type: z.ZodLiteral<"USER_ACTION">;
2672
2827
  cgi: z.ZodLiteral<EUserActions.RESET_ICAO>;