camstreamerlib 4.0.5 → 4.0.7

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,10 +1,11 @@
1
1
  import { IClient, TResponse } from './internal/types';
2
- import { ICAO, TApiUser, TBlackList, TCameraSettings, TExportDataType, TGetIcaoByOption, TImportDataType, TPriorityList, TTrackingMode, TTypePriorityList, TWhiteList, TZones } from './types/PlaneTrackerAPI';
2
+ import { ICAO, TBlackList, TCameraSettings, TExportDataType, TGetIcaoByOption, TImportDataType, TPriorityList, TTrackingMode, TWhiteList, TZones } from './types/PlaneTrackerAPI';
3
3
  import { THttpRequestOptions } from './types/common';
4
4
  import { BasicAPI } from './internal/BasicAPI';
5
+ import { TApiUser } from './types/ws/PlaneTrackerEvents';
5
6
  export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> extends BasicAPI<Client> {
6
7
  private apiUser;
7
- constructor(client: Client, apiUser: TApiUser);
8
+ constructor(client: Client, apiUser: Omit<TApiUser, 'ip'>);
8
9
  static getProxyPath: () => string;
9
10
  static getWsEventsPath: () => string;
10
11
  checkAPIAvailable(options?: THttpRequestOptions): Promise<void>;
@@ -185,14 +186,31 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
185
186
  startTrackingPlane(icao: ICAO, options?: THttpRequestOptions): Promise<void>;
186
187
  stopTrackingPlane(options?: THttpRequestOptions): Promise<void>;
187
188
  getIcao(by: TGetIcaoByOption, value: string, options?: THttpRequestOptions): Promise<string>;
188
- getPriorityList(options?: THttpRequestOptions): Promise<string[]>;
189
- setPriorityList(priorityList: TPriorityList['priorityList'], options?: THttpRequestOptions): Promise<void>;
190
- getTypePriorityList(options?: THttpRequestOptions): Promise<string[]>;
191
- setTypePriorityList(typePriorityList: TTypePriorityList['typePriorityList'], options?: THttpRequestOptions): Promise<void>;
192
- getWhiteList(options?: THttpRequestOptions): Promise<string[]>;
193
- setWhiteList(whiteList: TWhiteList['whiteList'], options?: THttpRequestOptions): Promise<void>;
194
- getBlackList(options?: THttpRequestOptions): Promise<string[]>;
195
- setBlackList(blackList: TBlackList['blackList'], options?: THttpRequestOptions): Promise<void>;
189
+ getPriorityList(options?: THttpRequestOptions): Promise<{
190
+ list: {
191
+ priority: number;
192
+ domain: "adsb" | "remoteId";
193
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
194
+ idValue: string;
195
+ }[];
196
+ }>;
197
+ setPriorityList(priorityList: TPriorityList, options?: THttpRequestOptions): Promise<void>;
198
+ getWhiteList(options?: THttpRequestOptions): Promise<{
199
+ list: {
200
+ domain: "adsb" | "remoteId";
201
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
202
+ idValue: string;
203
+ }[];
204
+ }>;
205
+ setWhiteList(whiteList: TWhiteList, options?: THttpRequestOptions): Promise<void>;
206
+ getBlackList(options?: THttpRequestOptions): Promise<{
207
+ list: {
208
+ domain: "adsb" | "remoteId";
209
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
210
+ idValue: string;
211
+ }[];
212
+ }>;
213
+ setBlackList(blackList: TBlackList, options?: THttpRequestOptions): Promise<void>;
196
214
  fetchMapInfo(options?: THttpRequestOptions): Promise<{
197
215
  minZoom: number;
198
216
  maxZoom: number;
@@ -1,11 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export type TImportDataType = 'MAP_DATA' | 'SERVER_DATA' | 'ALL';
3
3
  export type TExportDataType = 'NIGHT_SKY_CALIBRATION_DATA' | 'ALL';
4
- export type TApiUser = {
5
- userId: string;
6
- userName: string;
7
- userPriority: number;
8
- };
9
4
  export declare const wsAliasResponseSchema: z.ZodObject<{
10
5
  alias: z.ZodString;
11
6
  ws: z.ZodString;
@@ -804,38 +799,132 @@ export declare const flightInfoSchema: z.ZodObject<{
804
799
  }[] | undefined;
805
800
  }>;
806
801
  export type TFlightInfo = z.infer<typeof flightInfoSchema>;
807
- export declare const typePriorityListSchema: z.ZodObject<{
808
- typePriorityList: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
802
+ export declare const listEntryDomainSchema: z.ZodEnum<["adsb", "remoteId"]>;
803
+ export declare const listEntryIdTypeSchema: z.ZodEnum<["icao", "type_icao", "drone_mac", "operator_mac", "category"]>;
804
+ export type TListEntryDomain = z.infer<typeof listEntryDomainSchema>;
805
+ export type TListEntryIdType = z.infer<typeof listEntryIdTypeSchema>;
806
+ export declare const listEntrySchema: z.ZodObject<{
807
+ domain: z.ZodEnum<["adsb", "remoteId"]>;
808
+ idType: z.ZodEnum<["icao", "type_icao", "drone_mac", "operator_mac", "category"]>;
809
+ idValue: z.ZodString;
809
810
  }, "strip", z.ZodTypeAny, {
810
- typePriorityList: string[];
811
+ domain: "adsb" | "remoteId";
812
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
813
+ idValue: string;
811
814
  }, {
812
- typePriorityList?: string[] | undefined;
815
+ domain: "adsb" | "remoteId";
816
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
817
+ idValue: string;
813
818
  }>;
814
- export type TTypePriorityList = z.infer<typeof typePriorityListSchema>;
815
- export declare const priorityListSchema: z.ZodObject<{
816
- priorityList: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
819
+ export declare const priorityListEntrySchema: z.ZodObject<{
820
+ domain: z.ZodEnum<["adsb", "remoteId"]>;
821
+ idType: z.ZodEnum<["icao", "type_icao", "drone_mac", "operator_mac", "category"]>;
822
+ idValue: z.ZodString;
823
+ } & {
824
+ priority: z.ZodNumber;
817
825
  }, "strip", z.ZodTypeAny, {
818
- priorityList: string[];
826
+ priority: number;
827
+ domain: "adsb" | "remoteId";
828
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
829
+ idValue: string;
819
830
  }, {
820
- priorityList?: string[] | undefined;
831
+ priority: number;
832
+ domain: "adsb" | "remoteId";
833
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
834
+ idValue: string;
821
835
  }>;
822
- export type TPriorityList = z.infer<typeof priorityListSchema>;
836
+ export type TListEntry = z.infer<typeof listEntrySchema>;
837
+ export type TPriorityListEntry = z.infer<typeof priorityListEntrySchema>;
823
838
  export declare const whiteListSchema: z.ZodObject<{
824
- whiteList: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
839
+ list: z.ZodDefault<z.ZodArray<z.ZodObject<{
840
+ domain: z.ZodEnum<["adsb", "remoteId"]>;
841
+ idType: z.ZodEnum<["icao", "type_icao", "drone_mac", "operator_mac", "category"]>;
842
+ idValue: z.ZodString;
843
+ }, "strip", z.ZodTypeAny, {
844
+ domain: "adsb" | "remoteId";
845
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
846
+ idValue: string;
847
+ }, {
848
+ domain: "adsb" | "remoteId";
849
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
850
+ idValue: string;
851
+ }>, "many">>;
825
852
  }, "strip", z.ZodTypeAny, {
826
- whiteList: string[];
853
+ list: {
854
+ domain: "adsb" | "remoteId";
855
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
856
+ idValue: string;
857
+ }[];
827
858
  }, {
828
- whiteList?: string[] | undefined;
859
+ list?: {
860
+ domain: "adsb" | "remoteId";
861
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
862
+ idValue: string;
863
+ }[] | undefined;
829
864
  }>;
830
- export type TWhiteList = z.infer<typeof whiteListSchema>;
831
865
  export declare const blackListSchema: z.ZodObject<{
832
- blackList: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
866
+ list: z.ZodDefault<z.ZodArray<z.ZodObject<{
867
+ domain: z.ZodEnum<["adsb", "remoteId"]>;
868
+ idType: z.ZodEnum<["icao", "type_icao", "drone_mac", "operator_mac", "category"]>;
869
+ idValue: z.ZodString;
870
+ }, "strip", z.ZodTypeAny, {
871
+ domain: "adsb" | "remoteId";
872
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
873
+ idValue: string;
874
+ }, {
875
+ domain: "adsb" | "remoteId";
876
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
877
+ idValue: string;
878
+ }>, "many">>;
879
+ }, "strip", z.ZodTypeAny, {
880
+ list: {
881
+ domain: "adsb" | "remoteId";
882
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
883
+ idValue: string;
884
+ }[];
885
+ }, {
886
+ list?: {
887
+ domain: "adsb" | "remoteId";
888
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
889
+ idValue: string;
890
+ }[] | undefined;
891
+ }>;
892
+ export declare const priorityListSchema: z.ZodObject<{
893
+ list: z.ZodDefault<z.ZodArray<z.ZodObject<{
894
+ domain: z.ZodEnum<["adsb", "remoteId"]>;
895
+ idType: z.ZodEnum<["icao", "type_icao", "drone_mac", "operator_mac", "category"]>;
896
+ idValue: z.ZodString;
897
+ } & {
898
+ priority: z.ZodNumber;
899
+ }, "strip", z.ZodTypeAny, {
900
+ priority: number;
901
+ domain: "adsb" | "remoteId";
902
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
903
+ idValue: string;
904
+ }, {
905
+ priority: number;
906
+ domain: "adsb" | "remoteId";
907
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
908
+ idValue: string;
909
+ }>, "many">>;
833
910
  }, "strip", z.ZodTypeAny, {
834
- blackList: string[];
911
+ list: {
912
+ priority: number;
913
+ domain: "adsb" | "remoteId";
914
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
915
+ idValue: string;
916
+ }[];
835
917
  }, {
836
- blackList?: string[] | undefined;
918
+ list?: {
919
+ priority: number;
920
+ domain: "adsb" | "remoteId";
921
+ idType: "icao" | "type_icao" | "drone_mac" | "operator_mac" | "category";
922
+ idValue: string;
923
+ }[] | undefined;
837
924
  }>;
925
+ export type TWhiteList = z.infer<typeof whiteListSchema>;
838
926
  export type TBlackList = z.infer<typeof blackListSchema>;
927
+ export type TPriorityList = z.infer<typeof priorityListSchema>;
839
928
  export declare const mapTypeSchema: z.ZodEnum<["roadmap", "satellite"]>;
840
929
  export type TMapType = z.infer<typeof mapTypeSchema>;
841
930
  export declare const mapInfoSchema: z.ZodObject<{
@@ -946,4 +1035,43 @@ export declare const zonesSchema: z.ZodObject<{
946
1035
  }[] | undefined;
947
1036
  }>;
948
1037
  export type TZones = z.infer<typeof zonesSchema>;
1038
+ export declare const domainIdSchema: z.ZodEnum<["adsb", "remoteId"]>;
1039
+ export type TDomainId = z.infer<typeof domainIdSchema>;
1040
+ export type TCategoryIcon = 'small' | 'large' | 'heavy' | 'helicopter' | 'drone' | 'operator' | 'unknown';
1041
+ export type TCategoryDescriptor = {
1042
+ categoryId: string;
1043
+ uiName: string;
1044
+ icon: TCategoryIcon;
1045
+ };
1046
+ export type TDomainDescriptor = {
1047
+ uiName: string;
1048
+ icon: TCategoryIcon;
1049
+ categoryList: TCategoryDescriptor[];
1050
+ };
1051
+ export type TDomainList = Record<TDomainId, TDomainDescriptor>;
1052
+ export declare const ADSB_CATEGORY_IDS: {
1053
+ readonly A_LIGHT: "A_LIGHT";
1054
+ readonly A_SMALL: "A_SMALL";
1055
+ readonly A_LARGE: "A_LARGE";
1056
+ readonly A_HIGH_VORTEX: "A_HIGH_VORTEX";
1057
+ readonly A_HEAVY: "A_HEAVY";
1058
+ readonly A_HIGH_PERF: "A_HIGH_PERF";
1059
+ readonly A_ROTORCRAFT: "A_ROTORCRAFT";
1060
+ readonly B_GLIDER: "B_GLIDER";
1061
+ readonly B_LIGHTER_THAN_AIR: "B_LIGHTER_THAN_AIR";
1062
+ readonly B_PARACHUTIST: "B_PARACHUTIST";
1063
+ readonly B_ULTRALIGHT: "B_ULTRALIGHT";
1064
+ readonly B_UAV: "B_UAV";
1065
+ readonly B_SPACE: "B_SPACE";
1066
+ readonly C_SURFACE_EMERGENCY: "C_SURFACE_EMERGENCY";
1067
+ readonly C_SERVICE_VEHICLE: "C_SERVICE_VEHICLE";
1068
+ readonly C_POINT_OBSTACLE: "C_POINT_OBSTACLE";
1069
+ readonly C_CLUSTER_OBSTACLE: "C_CLUSTER_OBSTACLE";
1070
+ readonly C_LINE_OBSTACLE: "C_LINE_OBSTACLE";
1071
+ readonly UNKNOWN: "UNKNOWN";
1072
+ };
1073
+ export declare const REMOTE_ID_CATEGORY_IDS: {
1074
+ readonly DRONE: "DRONE";
1075
+ readonly OPERATOR: "OPERATOR";
1076
+ };
949
1077
  export {};