camstreamerlib 4.0.0-beta.55 → 4.0.0-beta.57

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.
Files changed (43) hide show
  1. package/cjs/PlaneTrackerAPI.js +24 -5
  2. package/cjs/errors/errors.js +36 -1
  3. package/cjs/internal/WsEvents.js +4 -4
  4. package/cjs/types/CamOverlayAPI/serviceCommonTypes.js +1 -1
  5. package/cjs/types/CamScripterAPI.js +4 -3
  6. package/cjs/types/common.js +4 -2
  7. package/cjs/types/ws/PlaneTrackerEvents.js +77 -1
  8. package/cjs/ws/CamOverlayEvents.js +1 -1
  9. package/cjs/ws/CamStreamerEvents.js +1 -1
  10. package/cjs/ws/CamSwitcherEvents.js +1 -1
  11. package/cjs/ws/PlaneTrackerEvents.js +9 -1
  12. package/esm/PlaneTrackerAPI.js +25 -6
  13. package/esm/errors/errors.js +30 -0
  14. package/esm/internal/WsEvents.js +4 -4
  15. package/esm/types/CamOverlayAPI/serviceCommonTypes.js +1 -1
  16. package/esm/types/CamScripterAPI.js +4 -3
  17. package/esm/types/common.js +3 -1
  18. package/esm/types/ws/PlaneTrackerEvents.js +76 -0
  19. package/esm/ws/CamOverlayEvents.js +1 -1
  20. package/esm/ws/CamStreamerEvents.js +1 -1
  21. package/esm/ws/CamSwitcherEvents.js +1 -1
  22. package/esm/ws/PlaneTrackerEvents.js +10 -2
  23. package/package.json +1 -1
  24. package/types/CamScripterAPI.d.ts +3 -3
  25. package/types/CamSwitcherAPI.d.ts +5 -5
  26. package/types/PlaneTrackerAPI.d.ts +3 -9
  27. package/types/errors/errors.d.ts +15 -0
  28. package/types/internal/WsEvents.d.ts +7 -9
  29. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +45 -45
  30. package/types/types/CamOverlayAPI/accuweatherSchema.d.ts +2 -2
  31. package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +2 -2
  32. package/types/types/CamOverlayAPI/imagesSchema.d.ts +2 -2
  33. package/types/types/CamOverlayAPI/infotickerSchema.d.ts +2 -2
  34. package/types/types/CamOverlayAPI/pipSchema.d.ts +2 -2
  35. package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +2 -2
  36. package/types/types/CamOverlayAPI/ptzSchema.d.ts +2 -2
  37. package/types/types/CamOverlayAPI/screenSharingSchema.d.ts +2 -2
  38. package/types/types/CamOverlayAPI/serviceCommonTypes.d.ts +4 -4
  39. package/types/types/CamOverlayAPI/webCameraSharingSchema.d.ts +2 -2
  40. package/types/types/CamScripterAPI.d.ts +9 -9
  41. package/types/types/CamSwitcherAPI.d.ts +32 -32
  42. package/types/types/common.d.ts +2 -0
  43. package/types/types/ws/PlaneTrackerEvents.d.ts +560 -0
@@ -99,6 +99,562 @@ export declare enum PlaneTrackerUserActions {
99
99
  LOCK_API = "lockApi.cgi",
100
100
  UNLOCK_API = "unlockApi.cgi"
101
101
  }
102
+ export declare const planeTrackerUserActionData: z.ZodDiscriminatedUnion<"cgi", [z.ZodObject<{
103
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.TRACK_ICAO>;
104
+ ip: z.ZodString;
105
+ params: z.ZodObject<{
106
+ userId: z.ZodString;
107
+ userName: z.ZodString;
108
+ userPriority: z.ZodString;
109
+ } & {
110
+ icao: z.ZodString;
111
+ }, "strip", z.ZodTypeAny, {
112
+ icao: string;
113
+ userId: string;
114
+ userName: string;
115
+ userPriority: string;
116
+ }, {
117
+ icao: string;
118
+ userId: string;
119
+ userName: string;
120
+ userPriority: string;
121
+ }>;
122
+ }, "strip", z.ZodTypeAny, {
123
+ params: {
124
+ icao: string;
125
+ userId: string;
126
+ userName: string;
127
+ userPriority: string;
128
+ };
129
+ ip: string;
130
+ cgi: PlaneTrackerUserActions.TRACK_ICAO;
131
+ }, {
132
+ params: {
133
+ icao: string;
134
+ userId: string;
135
+ userName: string;
136
+ userPriority: string;
137
+ };
138
+ ip: string;
139
+ cgi: PlaneTrackerUserActions.TRACK_ICAO;
140
+ }>, z.ZodObject<{
141
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.RESET_ICAO>;
142
+ ip: z.ZodString;
143
+ params: z.ZodObject<{
144
+ userId: z.ZodString;
145
+ userName: z.ZodString;
146
+ userPriority: z.ZodString;
147
+ }, "strip", z.ZodTypeAny, {
148
+ userId: string;
149
+ userName: string;
150
+ userPriority: string;
151
+ }, {
152
+ userId: string;
153
+ userName: string;
154
+ userPriority: string;
155
+ }>;
156
+ }, "strip", z.ZodTypeAny, {
157
+ params: {
158
+ userId: string;
159
+ userName: string;
160
+ userPriority: string;
161
+ };
162
+ ip: string;
163
+ cgi: PlaneTrackerUserActions.RESET_ICAO;
164
+ }, {
165
+ params: {
166
+ userId: string;
167
+ userName: string;
168
+ userPriority: string;
169
+ };
170
+ ip: string;
171
+ cgi: PlaneTrackerUserActions.RESET_ICAO;
172
+ }>, z.ZodObject<{
173
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.SET_PRIORITY_LIST>;
174
+ ip: z.ZodString;
175
+ params: z.ZodObject<{
176
+ userId: z.ZodString;
177
+ userName: z.ZodString;
178
+ userPriority: z.ZodString;
179
+ }, "strip", z.ZodTypeAny, {
180
+ userId: string;
181
+ userName: string;
182
+ userPriority: string;
183
+ }, {
184
+ userId: string;
185
+ userName: string;
186
+ userPriority: string;
187
+ }>;
188
+ postJsonBody: z.ZodObject<{
189
+ priorityList: z.ZodArray<z.ZodString, "many">;
190
+ }, "strip", z.ZodTypeAny, {
191
+ priorityList: string[];
192
+ }, {
193
+ priorityList: string[];
194
+ }>;
195
+ }, "strip", z.ZodTypeAny, {
196
+ params: {
197
+ userId: string;
198
+ userName: string;
199
+ userPriority: string;
200
+ };
201
+ ip: string;
202
+ cgi: PlaneTrackerUserActions.SET_PRIORITY_LIST;
203
+ postJsonBody: {
204
+ priorityList: string[];
205
+ };
206
+ }, {
207
+ params: {
208
+ userId: string;
209
+ userName: string;
210
+ userPriority: string;
211
+ };
212
+ ip: string;
213
+ cgi: PlaneTrackerUserActions.SET_PRIORITY_LIST;
214
+ postJsonBody: {
215
+ priorityList: string[];
216
+ };
217
+ }>, z.ZodObject<{
218
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.SET_BLACK_LIST>;
219
+ ip: z.ZodString;
220
+ params: z.ZodObject<{
221
+ userId: z.ZodString;
222
+ userName: z.ZodString;
223
+ userPriority: z.ZodString;
224
+ }, "strip", z.ZodTypeAny, {
225
+ userId: string;
226
+ userName: string;
227
+ userPriority: string;
228
+ }, {
229
+ userId: string;
230
+ userName: string;
231
+ userPriority: string;
232
+ }>;
233
+ postJsonBody: z.ZodObject<{
234
+ blackList: z.ZodArray<z.ZodString, "many">;
235
+ }, "strip", z.ZodTypeAny, {
236
+ blackList: string[];
237
+ }, {
238
+ blackList: string[];
239
+ }>;
240
+ }, "strip", z.ZodTypeAny, {
241
+ params: {
242
+ userId: string;
243
+ userName: string;
244
+ userPriority: string;
245
+ };
246
+ ip: string;
247
+ cgi: PlaneTrackerUserActions.SET_BLACK_LIST;
248
+ postJsonBody: {
249
+ blackList: string[];
250
+ };
251
+ }, {
252
+ params: {
253
+ userId: string;
254
+ userName: string;
255
+ userPriority: string;
256
+ };
257
+ ip: string;
258
+ cgi: PlaneTrackerUserActions.SET_BLACK_LIST;
259
+ postJsonBody: {
260
+ blackList: string[];
261
+ };
262
+ }>, z.ZodObject<{
263
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.SET_WHITE_LIST>;
264
+ ip: z.ZodString;
265
+ params: z.ZodObject<{
266
+ userId: z.ZodString;
267
+ userName: z.ZodString;
268
+ userPriority: z.ZodString;
269
+ }, "strip", z.ZodTypeAny, {
270
+ userId: string;
271
+ userName: string;
272
+ userPriority: string;
273
+ }, {
274
+ userId: string;
275
+ userName: string;
276
+ userPriority: string;
277
+ }>;
278
+ postJsonBody: z.ZodObject<{
279
+ whiteList: z.ZodArray<z.ZodString, "many">;
280
+ }, "strip", z.ZodTypeAny, {
281
+ whiteList: string[];
282
+ }, {
283
+ whiteList: string[];
284
+ }>;
285
+ }, "strip", z.ZodTypeAny, {
286
+ params: {
287
+ userId: string;
288
+ userName: string;
289
+ userPriority: string;
290
+ };
291
+ ip: string;
292
+ cgi: PlaneTrackerUserActions.SET_WHITE_LIST;
293
+ postJsonBody: {
294
+ whiteList: string[];
295
+ };
296
+ }, {
297
+ params: {
298
+ userId: string;
299
+ userName: string;
300
+ userPriority: string;
301
+ };
302
+ ip: string;
303
+ cgi: PlaneTrackerUserActions.SET_WHITE_LIST;
304
+ postJsonBody: {
305
+ whiteList: string[];
306
+ };
307
+ }>, z.ZodObject<{
308
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.GO_TO_COORDINATES>;
309
+ ip: z.ZodString;
310
+ params: z.ZodObject<{
311
+ userId: z.ZodString;
312
+ userName: z.ZodString;
313
+ userPriority: z.ZodString;
314
+ } & {
315
+ lat: z.ZodString;
316
+ lon: z.ZodString;
317
+ }, "strip", z.ZodTypeAny, {
318
+ lat: string;
319
+ lon: string;
320
+ userId: string;
321
+ userName: string;
322
+ userPriority: string;
323
+ }, {
324
+ lat: string;
325
+ lon: string;
326
+ userId: string;
327
+ userName: string;
328
+ userPriority: string;
329
+ }>;
330
+ }, "strip", z.ZodTypeAny, {
331
+ params: {
332
+ lat: string;
333
+ lon: string;
334
+ userId: string;
335
+ userName: string;
336
+ userPriority: string;
337
+ };
338
+ ip: string;
339
+ cgi: PlaneTrackerUserActions.GO_TO_COORDINATES;
340
+ }, {
341
+ params: {
342
+ lat: string;
343
+ lon: string;
344
+ userId: string;
345
+ userName: string;
346
+ userPriority: string;
347
+ };
348
+ ip: string;
349
+ cgi: PlaneTrackerUserActions.GO_TO_COORDINATES;
350
+ }>, z.ZodObject<{
351
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.SET_TRACKING_MODE>;
352
+ ip: z.ZodString;
353
+ params: z.ZodObject<{
354
+ userId: z.ZodString;
355
+ userName: z.ZodString;
356
+ userPriority: z.ZodString;
357
+ }, "strip", z.ZodTypeAny, {
358
+ userId: string;
359
+ userName: string;
360
+ userPriority: string;
361
+ }, {
362
+ userId: string;
363
+ userName: string;
364
+ userPriority: string;
365
+ }>;
366
+ postJsonBody: z.ZodObject<{
367
+ mode: z.ZodUnion<[z.ZodLiteral<"MANUAL">, z.ZodLiteral<"AUTOMATIC">]>;
368
+ }, "strip", z.ZodTypeAny, {
369
+ mode: "MANUAL" | "AUTOMATIC";
370
+ }, {
371
+ mode: "MANUAL" | "AUTOMATIC";
372
+ }>;
373
+ }, "strip", z.ZodTypeAny, {
374
+ params: {
375
+ userId: string;
376
+ userName: string;
377
+ userPriority: string;
378
+ };
379
+ ip: string;
380
+ cgi: PlaneTrackerUserActions.SET_TRACKING_MODE;
381
+ postJsonBody: {
382
+ mode: "MANUAL" | "AUTOMATIC";
383
+ };
384
+ }, {
385
+ params: {
386
+ userId: string;
387
+ userName: string;
388
+ userPriority: string;
389
+ };
390
+ ip: string;
391
+ cgi: PlaneTrackerUserActions.SET_TRACKING_MODE;
392
+ postJsonBody: {
393
+ mode: "MANUAL" | "AUTOMATIC";
394
+ };
395
+ }>, z.ZodObject<{
396
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.SET_ZONES>;
397
+ ip: z.ZodString;
398
+ params: z.ZodObject<{
399
+ userId: z.ZodString;
400
+ userName: z.ZodString;
401
+ userPriority: z.ZodString;
402
+ }, "strip", z.ZodTypeAny, {
403
+ userId: string;
404
+ userName: string;
405
+ userPriority: string;
406
+ }, {
407
+ userId: string;
408
+ userName: string;
409
+ userPriority: string;
410
+ }>;
411
+ postJsonBody: z.ZodObject<{
412
+ zones: z.ZodDefault<z.ZodArray<z.ZodObject<{
413
+ enabled: z.ZodDefault<z.ZodBoolean>;
414
+ name: z.ZodOptional<z.ZodString>;
415
+ area: z.ZodArray<z.ZodObject<{
416
+ lat: z.ZodNumber;
417
+ lon: z.ZodNumber;
418
+ }, "strip", z.ZodTypeAny, {
419
+ lat: number;
420
+ lon: number;
421
+ }, {
422
+ lat: number;
423
+ lon: number;
424
+ }>, "atleastone">;
425
+ minAltitudeAmsl: z.ZodOptional<z.ZodNumber>;
426
+ maxAltitudeAmsl: z.ZodOptional<z.ZodNumber>;
427
+ minSpeedKmph: z.ZodOptional<z.ZodNumber>;
428
+ maxSpeedKmph: z.ZodOptional<z.ZodNumber>;
429
+ flightDirection: z.ZodDefault<z.ZodEnum<["all", "arrival", "departure"]>>;
430
+ weight: z.ZodNumber;
431
+ }, "strip", z.ZodTypeAny, {
432
+ enabled: boolean;
433
+ area: [{
434
+ lat: number;
435
+ lon: number;
436
+ }, ...{
437
+ lat: number;
438
+ lon: number;
439
+ }[]];
440
+ flightDirection: "all" | "arrival" | "departure";
441
+ weight: number;
442
+ name?: string | undefined;
443
+ minAltitudeAmsl?: number | undefined;
444
+ maxAltitudeAmsl?: number | undefined;
445
+ minSpeedKmph?: number | undefined;
446
+ maxSpeedKmph?: number | undefined;
447
+ }, {
448
+ area: [{
449
+ lat: number;
450
+ lon: number;
451
+ }, ...{
452
+ lat: number;
453
+ lon: number;
454
+ }[]];
455
+ weight: number;
456
+ name?: string | undefined;
457
+ enabled?: boolean | undefined;
458
+ minAltitudeAmsl?: number | undefined;
459
+ maxAltitudeAmsl?: number | undefined;
460
+ minSpeedKmph?: number | undefined;
461
+ maxSpeedKmph?: number | undefined;
462
+ flightDirection?: "all" | "arrival" | "departure" | undefined;
463
+ }>, "many">>;
464
+ }, "strip", z.ZodTypeAny, {
465
+ zones: {
466
+ enabled: boolean;
467
+ area: [{
468
+ lat: number;
469
+ lon: number;
470
+ }, ...{
471
+ lat: number;
472
+ lon: number;
473
+ }[]];
474
+ flightDirection: "all" | "arrival" | "departure";
475
+ weight: number;
476
+ name?: string | undefined;
477
+ minAltitudeAmsl?: number | undefined;
478
+ maxAltitudeAmsl?: number | undefined;
479
+ minSpeedKmph?: number | undefined;
480
+ maxSpeedKmph?: number | undefined;
481
+ }[];
482
+ }, {
483
+ zones?: {
484
+ area: [{
485
+ lat: number;
486
+ lon: number;
487
+ }, ...{
488
+ lat: number;
489
+ lon: number;
490
+ }[]];
491
+ weight: number;
492
+ name?: string | undefined;
493
+ enabled?: boolean | undefined;
494
+ minAltitudeAmsl?: number | undefined;
495
+ maxAltitudeAmsl?: number | undefined;
496
+ minSpeedKmph?: number | undefined;
497
+ maxSpeedKmph?: number | undefined;
498
+ flightDirection?: "all" | "arrival" | "departure" | undefined;
499
+ }[] | undefined;
500
+ }>;
501
+ }, "strip", z.ZodTypeAny, {
502
+ params: {
503
+ userId: string;
504
+ userName: string;
505
+ userPriority: string;
506
+ };
507
+ ip: string;
508
+ cgi: PlaneTrackerUserActions.SET_ZONES;
509
+ postJsonBody: {
510
+ zones: {
511
+ enabled: boolean;
512
+ area: [{
513
+ lat: number;
514
+ lon: number;
515
+ }, ...{
516
+ lat: number;
517
+ lon: number;
518
+ }[]];
519
+ flightDirection: "all" | "arrival" | "departure";
520
+ weight: number;
521
+ name?: string | undefined;
522
+ minAltitudeAmsl?: number | undefined;
523
+ maxAltitudeAmsl?: number | undefined;
524
+ minSpeedKmph?: number | undefined;
525
+ maxSpeedKmph?: number | undefined;
526
+ }[];
527
+ };
528
+ }, {
529
+ params: {
530
+ userId: string;
531
+ userName: string;
532
+ userPriority: string;
533
+ };
534
+ ip: string;
535
+ cgi: PlaneTrackerUserActions.SET_ZONES;
536
+ postJsonBody: {
537
+ zones?: {
538
+ area: [{
539
+ lat: number;
540
+ lon: number;
541
+ }, ...{
542
+ lat: number;
543
+ lon: number;
544
+ }[]];
545
+ weight: number;
546
+ name?: string | undefined;
547
+ enabled?: boolean | undefined;
548
+ minAltitudeAmsl?: number | undefined;
549
+ maxAltitudeAmsl?: number | undefined;
550
+ minSpeedKmph?: number | undefined;
551
+ maxSpeedKmph?: number | undefined;
552
+ flightDirection?: "all" | "arrival" | "departure" | undefined;
553
+ }[] | undefined;
554
+ };
555
+ }>, z.ZodObject<{
556
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.RESET_PTZ_CALIBRATION>;
557
+ ip: z.ZodString;
558
+ params: z.ZodObject<{
559
+ userId: z.ZodString;
560
+ userName: z.ZodString;
561
+ userPriority: z.ZodString;
562
+ }, "strip", z.ZodTypeAny, {
563
+ userId: string;
564
+ userName: string;
565
+ userPriority: string;
566
+ }, {
567
+ userId: string;
568
+ userName: string;
569
+ userPriority: string;
570
+ }>;
571
+ }, "strip", z.ZodTypeAny, {
572
+ params: {
573
+ userId: string;
574
+ userName: string;
575
+ userPriority: string;
576
+ };
577
+ ip: string;
578
+ cgi: PlaneTrackerUserActions.RESET_PTZ_CALIBRATION;
579
+ }, {
580
+ params: {
581
+ userId: string;
582
+ userName: string;
583
+ userPriority: string;
584
+ };
585
+ ip: string;
586
+ cgi: PlaneTrackerUserActions.RESET_PTZ_CALIBRATION;
587
+ }>, z.ZodObject<{
588
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.LOCK_API>;
589
+ ip: z.ZodString;
590
+ params: z.ZodObject<{
591
+ userId: z.ZodString;
592
+ userName: z.ZodString;
593
+ userPriority: z.ZodString;
594
+ } & {
595
+ timeout: z.ZodString;
596
+ }, "strip", z.ZodTypeAny, {
597
+ timeout: string;
598
+ userId: string;
599
+ userName: string;
600
+ userPriority: string;
601
+ }, {
602
+ timeout: string;
603
+ userId: string;
604
+ userName: string;
605
+ userPriority: string;
606
+ }>;
607
+ }, "strip", z.ZodTypeAny, {
608
+ params: {
609
+ timeout: string;
610
+ userId: string;
611
+ userName: string;
612
+ userPriority: string;
613
+ };
614
+ ip: string;
615
+ cgi: PlaneTrackerUserActions.LOCK_API;
616
+ }, {
617
+ params: {
618
+ timeout: string;
619
+ userId: string;
620
+ userName: string;
621
+ userPriority: string;
622
+ };
623
+ ip: string;
624
+ cgi: PlaneTrackerUserActions.LOCK_API;
625
+ }>, z.ZodObject<{
626
+ cgi: z.ZodLiteral<PlaneTrackerUserActions.UNLOCK_API>;
627
+ ip: z.ZodString;
628
+ params: z.ZodObject<{
629
+ userId: z.ZodString;
630
+ userName: z.ZodString;
631
+ userPriority: z.ZodString;
632
+ }, "strip", z.ZodTypeAny, {
633
+ userId: string;
634
+ userName: string;
635
+ userPriority: string;
636
+ }, {
637
+ userId: string;
638
+ userName: string;
639
+ userPriority: string;
640
+ }>;
641
+ }, "strip", z.ZodTypeAny, {
642
+ params: {
643
+ userId: string;
644
+ userName: string;
645
+ userPriority: string;
646
+ };
647
+ ip: string;
648
+ cgi: PlaneTrackerUserActions.UNLOCK_API;
649
+ }, {
650
+ params: {
651
+ userId: string;
652
+ userName: string;
653
+ userPriority: string;
654
+ };
655
+ ip: string;
656
+ cgi: PlaneTrackerUserActions.UNLOCK_API;
657
+ }>]>;
102
658
  declare const ptrEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
103
659
  type: z.ZodLiteral<"CAMERA_POSITION">;
104
660
  lat: z.ZodNumber;
@@ -1034,4 +1590,8 @@ export type TPlaneTrackerEventOfType<T extends TPlaneTrackerEventType> = Extract
1034
1590
  export type TPlaneTrackerApiFlightData = z.infer<typeof apiFlightDataSchema>;
1035
1591
  export type TPlaneTrackerApiUser = z.infer<typeof apiUserSchema>;
1036
1592
  export type TPlaneTrackerStringApiUser = z.infer<typeof apiStringUserSchema>;
1593
+ export type TPlaneTrackerUserActionData = z.infer<typeof planeTrackerUserActionData>;
1594
+ export type TPlaneTrackerUserActionDataOfCgi<T extends PlaneTrackerUserActions> = Extract<TPlaneTrackerUserActionData, {
1595
+ cgi: T;
1596
+ }>;
1037
1597
  export {};