@tak-ps/cloudtak 12.55.0 → 12.94.0

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,158 +0,0 @@
1
- import type { paths } from './derived-types.js';
2
- import type { Origin } from './base/cot.ts';
3
- import type { Geometry } from 'geojson';
4
- export type APIError = {
5
- status: number;
6
- message: string;
7
- };
8
- export type APIList<T> = {
9
- total: number;
10
- items: Array<T>;
11
- };
12
- export type COTTypeList = paths["/api/type/cot"]["get"]["responses"]["200"]["content"]["application/json"];
13
- export type COTType = paths["/api/type/cot/{:type}"]["get"]["responses"]["200"]["content"]["application/json"];
14
- export type Search = paths["/api/search"]["get"]["responses"]["200"]["content"]["application/json"];
15
- export type SearchSuggest = paths["/api/search/suggest"]["get"]["responses"]["200"]["content"]["application/json"];
16
- export type SearchForward = paths["/api/search/forward"]["get"]["responses"]["200"]["content"]["application/json"];
17
- export type VideoLease = paths["/api/video/lease/{:lease}"]["get"]["responses"]["200"]["content"]["application/json"];
18
- export type VideoLeaseList = paths["/api/video/lease"]["get"]["responses"]["200"]["content"]["application/json"];
19
- export type VideoLeaseMetadata = paths["/api/video/lease/{:lease}/metadata"]["get"]["responses"]["200"]["content"]["application/json"];
20
- export type VideoLeaseProtocols = paths["/api/video/lease/{:lease}/metadata"]["get"]["responses"]["200"]["content"]["application/json"]["protocols"];
21
- export type VideoLeaseResponse = paths["/api/video/lease/{:lease}"]["get"]["responses"]["200"]["content"]["application/json"];
22
- export type Subscription = paths["/api/marti/subscription/{:clientuid}"]["get"]["responses"]["200"]["content"]["application/json"];
23
- export type Group = paths["/api/marti/group"]["get"]["responses"]["200"]["content"]["application/json"]["data"][0];
24
- export type User = paths["/api/user/{:username}"]["get"]["responses"]["200"]["content"]["application/json"];
25
- export type UserList = paths["/api/user"]["get"]["responses"]["200"]["content"]["application/json"];
26
- export type Contact = paths["/api/marti/api/contacts/all"]["get"]["responses"]["200"]["content"]["application/json"][0];
27
- export type ContactList = paths["/api/marti/api/contacts/all"]["get"]["responses"]["200"]["content"]["application/json"];
28
- export type Content = paths["/api/marti/package"]["put"]["responses"]["200"]["content"]["application/json"];
29
- export type VideoConnection = paths["/api/marti/video/{:uid}"]["get"]["responses"]["200"]["content"]["application/json"];
30
- export type VideoConnectionFeed = paths["/api/marti/video/{:uid}"]["get"]["responses"]["200"]["content"]["application/json"]["feeds"][0];
31
- export type VideoConnection_Create = paths["/api/marti/video"]["post"]["requestBody"]["content"]["application/json"];
32
- export type VideoConnectionList = paths["/api/marti/video"]["get"]["responses"]["200"]["content"]["application/json"];
33
- export type Mission = paths["/api/marti/missions/{:name}"]["get"]["responses"]["200"]["content"]["application/json"];
34
- export type Mission_Create = paths["/api/marti/mission"]["post"]["requestBody"]["content"]["application/json"];
35
- export type MissionList = paths["/api/marti/mission"]["get"]["responses"]["200"]["content"]["application/json"];
36
- export type MissionInvite = paths["/api/marti/mission"]["get"]["responses"]["200"]["content"]["application/json"]["invites"][0];
37
- export type MissionRole = paths["/api/marti/missions/{:name}/role"]["get"]["responses"]["200"]["content"]["application/json"];
38
- export type MissionLog = paths["/api/marti/missions/{:name}/log/{:logid}"]["patch"]["responses"]["200"]["content"]["application/json"]["data"];
39
- export type MissionLogList = paths["/api/marti/missions/{:name}/log"]["get"]["responses"]["200"]["content"]["application/json"];
40
- export type MissionLayer = paths["/api/marti/missions/{:name}/layer/{:layerid}"]["get"]["responses"]["200"]["content"]["application/json"]["data"];
41
- export type MissionLayer_Create = paths["/api/marti/missions/{:name}/layer"]["post"]["requestBody"]["content"]["application/json"];
42
- export type MissionLayer_Update = paths["/api/marti/missions/{:name}/layer/{:uid}"]["patch"]["requestBody"]["content"]["application/json"];
43
- export type MissionLayerList = paths["/api/marti/missions/{:name}/layer"]["get"]["responses"]["200"]["content"]["application/json"];
44
- export type MissionChanges = paths["/api/marti/missions/{:name}/changes"]["get"]["responses"]["200"]["content"]["application/json"];
45
- export type MissionSubscriptions = paths["/api/marti/missions/{:name}/subscriptions/roles"]["get"]["responses"]["200"]["content"]["application/json"]["data"];
46
- export type Server_Update = paths["/api/server"]["patch"]["requestBody"]["content"]["application/json"];
47
- export type Server = paths["/api/server"]["get"]["responses"]["200"]["content"]["application/json"];
48
- export type MapConfig = paths["/api/config/map"]["get"]["responses"]["200"]["content"]["application/json"];
49
- export type Login = paths["/api/login"]["get"]["responses"]["200"]["content"]["application/json"];
50
- export type LoginConfig = paths["/api/config/login"]["get"]["responses"]["200"]["content"]["application/json"];
51
- export type Login_Create = paths["/api/login"]["post"]["requestBody"]["content"]["application/json"];
52
- export type Login_CreateRes = paths["/api/login"]["post"]["responses"]["200"]["content"]["application/json"];
53
- export type Import = paths["/api/import/{:import}"]["get"]["responses"]["200"]["content"]["application/json"];
54
- export type ImportList = paths["/api/import"]["get"]["responses"]["200"]["content"]["application/json"];
55
- export type Package = paths["/api/marti/package/{:uid}"]["get"]["responses"]["200"]["content"]["application/json"];
56
- export type PackageList = paths["/api/marti/package"]["get"]["responses"]["200"]["content"]["application/json"];
57
- export type ServerAdminVideoList = paths["/api/server/video"]["get"]["responses"]["200"]["content"]["application/json"];
58
- export type Iconset = paths["/api/iconset/{:iconset}"]["get"]["responses"]["200"]["content"]["application/json"];
59
- export type IconsetList = paths["/api/iconset"]["get"]["responses"]["200"]["content"]["application/json"];
60
- export type AttachmentList = paths["/api/attachment"]["get"]["responses"]["200"]["content"]["application/json"];
61
- export type Attachment = paths["/api/attachment"]["get"]["responses"]["200"]["content"]["application/json"]["items"][0];
62
- export type ConfigGroups = paths["/api/config/group"]["get"]["responses"]["200"]["content"]["application/json"];
63
- export type TileJSON = paths["/api/basemap/{:basemapid}/tiles"]["get"]["responses"]["200"]["content"]["application/json"];
64
- export type Basemap = paths["/api/basemap/{:basemapid}"]["patch"]["responses"]["200"]["content"]["application/json"];
65
- export type BasemapList = paths["/api/basemap"]["get"]["responses"]["200"]["content"]["application/json"];
66
- export type Palette = paths["/api/palette/{:palette}"]["get"]["responses"]["200"]["content"]["application/json"];
67
- export type Chat = {
68
- chatroom: string;
69
- messageId: string;
70
- from: {
71
- callsign: string;
72
- uid: string;
73
- };
74
- message: string;
75
- time: string;
76
- };
77
- export type APIProfileChat = {
78
- id: number;
79
- read: boolean;
80
- username: string;
81
- chatroom: string;
82
- sender_callsign: string;
83
- sender_uid: string;
84
- created: string;
85
- updated: string;
86
- message_id: string;
87
- message: string;
88
- };
89
- export type PaletteList = paths["/api/palette"]["get"]["responses"]["200"]["content"]["application/json"];
90
- export type PaletteFeature = paths["/api/palette/{:palette}/feature/{:feature}"]["get"]["responses"]["200"]["content"]["application/json"];
91
- export type MissionTemplate = paths["/api/template/mission/{:mission}"]["get"]["responses"]["200"]["content"]["application/json"];
92
- export type MissionTemplateList = paths["/api/template/mission"]["get"]["responses"]["200"]["content"]["application/json"];
93
- export type Profile = paths["/api/profile"]["get"]["responses"]["200"]["content"]["application/json"];
94
- export type Profile_Update = paths["/api/profile"]["patch"]["requestBody"]["content"]["application/json"];
95
- export type ProfileChatroomList = paths["/api/profile/chatroom"]["get"]["responses"]["200"]["content"]["application/json"];
96
- export type ProfileChatList = paths["/api/profile/chatroom/{:chatroom}/chat"]["get"]["responses"]["200"]["content"]["application/json"];
97
- export type ProfileVideoList = paths["/api/profile/video"]["get"]["responses"]["200"]["content"]["application/json"];
98
- export type ProfileVideo = paths["/api/profile/video/{:id}"]["get"]["responses"]["200"]["content"]["application/json"];
99
- export type ProfileFileList = paths["/api/profile/asset"]["get"]["responses"]["200"]["content"]["application/json"];
100
- export type ProfileFile = ProfileFileList["items"][0];
101
- export type Feature = Omit<paths["/api/profile/feature/{:id}"]["get"]["responses"]["200"]["content"]["application/json"], "geometry"> & {
102
- origin?: Origin;
103
- properties: {
104
- 'id': string;
105
- 'icon-opacity'?: number;
106
- 'circle-opacity'?: number;
107
- [index: string]: unknown;
108
- };
109
- geometry: Geometry;
110
- };
111
- export type InputFeature = Omit<paths["/api/profile/feature/{:id}"]["get"]["responses"]["200"]["content"]["application/json"], "geometry"> & {
112
- origin?: Origin;
113
- properties: {
114
- 'id'?: string;
115
- 'icon-opacity'?: number;
116
- 'circle-opacity'?: number;
117
- [index: string]: unknown;
118
- };
119
- geometry: Geometry;
120
- };
121
- export type FeaturePropertyCreator = Exclude<Feature["properties"]["creator"], undefined>;
122
- export type FeatureCollection = {
123
- type: string;
124
- features: Array<Feature>;
125
- };
126
- export type ProfileOverlay = paths["/api/profile/overlay/{:overlay}"]["get"]["responses"]["200"]["content"]["application/json"];
127
- export type ProfileOverlayList = paths["/api/profile/overlay"]["get"]["responses"]["200"]["content"]["application/json"];
128
- export type ProfileOverlay_Create = paths["/api/profile/overlay"]["post"]["requestBody"]["content"]["application/json"];
129
- export type ProfileOverlay_Update = paths["/api/profile/overlay/{:overlay}"]["patch"]["requestBody"]["content"]["application/json"];
130
- export type SearchReverse = paths["/api/search/reverse/{:longitude}/{:latitude}"]["get"]["responses"]["200"]["content"]["application/json"];
131
- export type ETLLdapChannel = paths["/api/ldap/channel"]["get"]["responses"]["200"]["content"]["application/json"]["items"][0];
132
- export type ETLLdapChannelList = paths["/api/ldap/channel"]["get"]["responses"]["200"]["content"]["application/json"];
133
- export type ETLLdapUser = paths["/api/ldap/user"]["post"]["responses"]["200"]["content"]["application/json"];
134
- export type ETLConnectionList = paths["/api/connection"]["get"]["responses"]["200"]["content"]["application/json"];
135
- export type ETLConnection = paths["/api/connection/{:connectionid}"]["get"]["responses"]["200"]["content"]["application/json"];
136
- export type ETLConnectionVideoLeaseList = paths["/api/connection/{:connectionid}/video/lease"]["get"]["responses"]["200"]["content"]["application/json"];
137
- export type ETLConnectionToken = paths["/api/connection/{:connectionid}/token"]["get"]["responses"]["200"]["content"]["application/json"]["items"][0];
138
- export type ETLConnectionTokenList = paths["/api/connection/{:connectionid}/token"]["get"]["responses"]["200"]["content"]["application/json"];
139
- export type ETLConnectionAssetList = paths["/api/connection/{:connectionid}/asset"]["get"]["responses"]["200"]["content"]["application/json"];
140
- export type ETLAgencyList = paths["/api/agency"]["get"]["responses"]["200"]["content"]["application/json"];
141
- export type ETLAgency = paths["/api/agency/{:agencyid}"]["get"]["responses"]["200"]["content"]["application/json"];
142
- export type ETLLayer = paths["/api/connection/{:connectionid}/layer/{:layerid}"]["get"]["responses"]["200"]["content"]["application/json"];
143
- export type ETLLayerList = paths["/api/connection/{:connectionid}/layer"]["get"]["responses"]["200"]["content"]["application/json"];
144
- export type ETLLayerTask = paths["/api/connection/{:connectionid}/layer/{:layerid}/task"]["get"]["responses"]["200"]["content"]["application/json"];
145
- export type ETLLayerTaskCapabilities = paths["/api/connection/{:connectionid}/layer/{:layerid}/task/capabilities"]["get"]["responses"]["200"]["content"]["application/json"];
146
- export type ETLLayerIncoming = paths["/api/connection/{:connectionid}/layer/{:layerid}/incoming"]["post"]["responses"]["200"]["content"]["application/json"];
147
- export type ETLLayerOutgoing = paths["/api/connection/{:connectionid}/layer/{:layerid}/outgoing"]["post"]["responses"]["200"]["content"]["application/json"];
148
- export type ETLData = paths["/api/connection/{:connectionid}/data/{:dataid}"]["get"]["responses"]["200"]["content"]["application/json"];
149
- export type VideoService = paths["/api/video/service"]["get"]["responses"]["200"]["content"]["application/json"];
150
- export type InjectorList = paths["/api/server/injector"]["get"]["responses"]["200"]["content"]["application/json"];
151
- export type Injector = paths["/api/server/injector"]["get"]["responses"]["200"]["content"]["application/json"]["items"][0];
152
- export type RepeaterList = paths["/api/server/repeater"]["get"]["responses"]["200"]["content"]["application/json"];
153
- export type Repeater = paths["/api/server/repeater"]["get"]["responses"]["200"]["content"]["application/json"]["items"][0];
154
- export type ETLRawTaskList = {
155
- total: number;
156
- items: Record<string, string[]>;
157
- };
158
- export type ETLTaskVersions = paths["/api/task/raw/{:task}"]["get"]["responses"]["200"]["content"]["application/json"];
@@ -1,12 +0,0 @@
1
- import type Atlas from './atlas.ts';
2
- export default class AtlasConnection {
3
- atlas: Atlas;
4
- isDestroyed: boolean;
5
- isOpen: boolean;
6
- ws: WebSocket | undefined;
7
- version: string;
8
- constructor(atlas: Atlas);
9
- connect(connection: string): void;
10
- destroy(): void;
11
- sendCOT(data: object, type?: string): void;
12
- }
@@ -1,134 +0,0 @@
1
- import type Atlas from './atlas.ts';
2
- import COT from '../base/cot.ts';
3
- import type { GeoJSONSourceDiff } from 'maplibre-gl';
4
- import type { Polygon } from 'geojson';
5
- import type { InputFeature, Feature } from '../types.ts';
6
- type NestedArray = {
7
- path: string;
8
- count: number;
9
- paths: Array<NestedArray>;
10
- };
11
- export default class AtlasDatabase {
12
- atlas: Atlas;
13
- cots: Map<string, COT>;
14
- mission?: string;
15
- pendingCreate: Map<string, COT>;
16
- pendingUpdate: Map<string, COT>;
17
- pendingHidden: Set<string>;
18
- pendingUnhide: Set<string>;
19
- pendingDelete: Set<string>;
20
- subscriptionPending: Map<string, string>;
21
- constructor(atlas: Atlas);
22
- makeActiveMission(guid?: string): Promise<void>;
23
- /**
24
- * Only Called by non-Mission CoTs, caller is responsible for creating Filters
25
- */
26
- hide(id: string): Promise<void>;
27
- /**
28
- * Only Called by non-Mission CoTs, caller is responsible for removing Filters
29
- */
30
- unhide(id: string): Promise<void>;
31
- init(): Promise<void>;
32
- /**
33
- * Return a Set of coordinates within the given Map bounds
34
- * so that vertex snapping can take place when editing
35
- */
36
- snapping(bboxarr: [number, number][]): Promise<Set<[number, number]>>;
37
- /**
38
- * Generate a GeoJSONDiff on existing COT Features
39
- */
40
- diff(): Promise<GeoJSONSourceDiff>;
41
- /**
42
- * Iterate over all CoTs and delete toTs that match the filter pattern
43
- * @param filter - JSONata filter expression to match CoTs against
44
- */
45
- filterRemove(filter: string, opts?: {
46
- mission?: boolean;
47
- skipNetwork?: boolean;
48
- }): Promise<void>;
49
- /**
50
- * Iterate over cot messages and return list of CoTs that match filter pattern
51
- */
52
- filter(filter: string, opts?: {
53
- limit?: number;
54
- mission?: boolean;
55
- }): Promise<Set<COT>>;
56
- filterDelete(filter: string, opts?: {
57
- mission?: boolean;
58
- }): Promise<void>;
59
- paths(store?: Map<string, COT>): Promise<Array<NestedArray>>;
60
- /**
61
- * Return CoTs touching a given polygon
62
- *
63
- * @param poly - GeoJSON Polygon to test CoTs against
64
- */
65
- touching(poly: Polygon): Promise<Set<COT>>;
66
- /**
67
- * Load Archived CoTs
68
- */
69
- loadArchive(): Promise<void>;
70
- /**
71
- * Remove a given CoT from the store
72
- *
73
- * @param id - UID of the CoT to remove
74
- * @param opts - Options
75
- * @param opts.mission - If true, search Mission Stores for the CoT
76
- * @param opts.skipNetwork - If an archived CoT, don't delete from the server
77
- */
78
- remove(id: string, opts?: {
79
- mission?: boolean;
80
- skipNetwork?: boolean;
81
- }): Promise<void>;
82
- /**
83
- * Empty the store
84
- *
85
- * @param opts - Options
86
- * @param opts.ignoreArchived - Don't delete archived features
87
- * @param opts.skipNetwork - Don't delete archived features from the server
88
- */
89
- clear(opts?: {
90
- ignoreArchived: boolean;
91
- skipNetwork: boolean;
92
- }): Promise<void>;
93
- /**
94
- * Called everytime a Mission Task message is received
95
- *
96
- * @param task - GeoJSON Feature representing the Mission Task
97
- */
98
- subChange(task: Feature): Promise<void>;
99
- /**
100
- * Add or Update a CoT GeoJSON to the store and modify props to meet MapLibre style requirements
101
- *
102
- * @param feat - GeoJSON Feature to create/update in Store
103
- *
104
- * @param opts - Optional Options
105
- * @param opts.skipSave - Don't save the COT to the Profile Feature Database
106
- * @param opts.skipBroadcast - Don't broadcast the COT on the internal message bus to the UI
107
- * @param opts.authored - If the COT is authored, append creator information if the CoT is new & potentially add it to a mission
108
- */
109
- add(feature: InputFeature, opts?: {
110
- skipSave?: boolean;
111
- skipBroadcast?: boolean;
112
- authored?: boolean;
113
- }): Promise<COT>;
114
- /**
115
- * Return a CoT by ID if it exists
116
- *
117
- * @param id - ID of the CoT to return
118
- * @param opts - Options
119
- * @param opts.mission - If true, search Mission Stores for the CoT
120
- */
121
- get(id: string, opts?: {
122
- mission?: boolean;
123
- }): Promise<COT | undefined>;
124
- /**
125
- * Returns if the CoT is present in the store given the ID
126
- */
127
- has(id: string): boolean;
128
- groups(store?: Map<string, COT>): Array<string>;
129
- pathFeatures(path?: string, store?: Map<string, COT>): Set<COT>;
130
- markers(store?: Map<string, COT>): Array<string>;
131
- markerFeatures(marker: string, store?: Map<string, COT>): Set<COT>;
132
- contacts(group?: string, store?: Map<string, COT>): Set<COT>;
133
- }
134
- export {};
@@ -1,39 +0,0 @@
1
- import type Atlas from './atlas.ts';
2
- import { LocationState } from '../base/events.ts';
3
- import type { Group, Server, Profile, Profile_Update, FeaturePropertyCreator } from '../types.ts';
4
- export type ProfileLocation = {
5
- source: LocationState;
6
- accuracy: number | undefined;
7
- altitude: number | null | undefined;
8
- coordinates: number[];
9
- };
10
- export default class AtlasProfile {
11
- atlas: Atlas;
12
- timerSelf: ReturnType<typeof setInterval> | undefined;
13
- location: ProfileLocation;
14
- channels: Array<Group>;
15
- profile: Profile | null;
16
- server: Server | null;
17
- constructor(atlas: Atlas);
18
- init(): Promise<string>;
19
- username(): Promise<string>;
20
- creator(): Promise<FeaturePropertyCreator>;
21
- callsign(): Promise<string>;
22
- isSystemAdmin(): Promise<boolean>;
23
- isAgencyAdmin(): Promise<boolean>;
24
- hasNoConfiguration(): boolean;
25
- hasNoChannels(): boolean;
26
- destroy(): void;
27
- setupTimer(): void;
28
- loadServer(): Promise<Server>;
29
- load(): Promise<Profile>;
30
- updateLocation(): void;
31
- setChannel(name: string, active: boolean): Promise<Array<Group>>;
32
- setAllChannels(active: boolean): Promise<Array<Group>>;
33
- updateChannels(channels: Array<Group>): Promise<Array<Group>>;
34
- postChannelStatus(): void;
35
- loadChannels(): Promise<Array<Group>>;
36
- update(body: Profile_Update): Promise<void>;
37
- uid(): string;
38
- CoT(coords?: number[], accuracy?: number, altitude?: number | null): Promise<void>;
39
- }
@@ -1,13 +0,0 @@
1
- import type Atlas from './atlas.ts';
2
- import type COT from '../base/cot.ts';
3
- import type { Contact } from '../types.ts';
4
- export default class AtlasTeam {
5
- atlas: Atlas;
6
- contacts: Map<string, Contact>;
7
- constructor(atlas: Atlas);
8
- init(): Promise<void>;
9
- set(cot: COT): Promise<Contact>;
10
- get(uid: string): Promise<Contact | undefined>;
11
- getByCallsign(callsign: string): Promise<Contact | undefined>;
12
- load(): Promise<Map<string, Contact>>;
13
- }
@@ -1,19 +0,0 @@
1
- import type { WorkerMessage } from '../base/events.ts';
2
- import * as Comlink from 'comlink';
3
- import AtlasProfile from './atlas-profile.ts';
4
- import AtlasTeam from './atlas-team.ts';
5
- import AtlasDatabase from './atlas-database.ts';
6
- import AtlasConnection from './atlas-connection.ts';
7
- export default class Atlas {
8
- channel: BroadcastChannel;
9
- sync: BroadcastChannel;
10
- token: string;
11
- db: AtlasDatabase & Comlink.ProxyMarked;
12
- team: AtlasTeam & Comlink.ProxyMarked;
13
- conn: AtlasConnection & Comlink.ProxyMarked;
14
- profile: AtlasProfile & Comlink.ProxyMarked;
15
- constructor();
16
- postMessage(msg: WorkerMessage): Promise<void>;
17
- init(authToken: string): Promise<void>;
18
- destroy(): void;
19
- }