@tak-ps/cloudtak 12.94.0 → 12.102.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.
- package/dist/types/plugin.d.ts +156 -0
- package/dist/types/src/base/chatroom-chats.d.ts +19 -0
- package/dist/types/src/base/chatroom.d.ts +49 -0
- package/dist/types/src/base/config.d.ts +17 -0
- package/dist/types/src/base/contact.d.ts +14 -0
- package/dist/types/src/base/cot.d.ts +95 -0
- package/dist/types/src/base/database.d.ts +192 -0
- package/dist/types/src/base/events.d.ts +32 -0
- package/dist/types/src/base/filter.d.ts +41 -0
- package/dist/types/src/base/group.d.ts +27 -0
- package/dist/types/src/base/handler.d.ts +9 -0
- package/dist/types/src/base/icon.d.ts +4 -0
- package/dist/types/src/base/mission-template-logs.d.ts +9 -0
- package/dist/types/src/base/mission-template.d.ts +20 -0
- package/dist/types/src/base/notification.d.ts +37 -0
- package/dist/types/src/base/overlay.d.ts +94 -0
- package/dist/types/src/base/profile.d.ts +20 -0
- package/dist/types/src/base/server.d.ts +9 -0
- package/dist/types/src/base/subscription-changes.d.ts +18 -0
- package/dist/types/src/base/subscription-chat.d.ts +23 -0
- package/dist/types/src/base/subscription-contents.d.ts +27 -0
- package/dist/types/src/base/subscription-feature.d.ts +49 -0
- package/dist/types/src/base/subscription-log.d.ts +34 -0
- package/dist/types/src/base/subscription.d.ts +128 -0
- package/dist/types/src/base/utils/styles.d.ts +11 -0
- package/dist/types/src/base/validators.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/ActiveMission.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/CoTView.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/DrawTools.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/GenericBottomPane.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Inputs/BufferInput.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/Inputs/CoordInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Inputs/GeoJSONInput.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/Inputs/RangeInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Inputs/RangeRingsInput.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/MainMenu.vue.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/MainMenuContents.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/Map.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/MapLoading.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Basemaps/EditModal.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Debugger.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Iconset/EditModal.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuBasemaps.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChannels.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChat.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuChats.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuConnections.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuContacts.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeatView.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeatures.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuFiles.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuHistory.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuIcon.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuIconset.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuIconsets.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuImport.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuImports.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuItemCard.vue.d.ts +103 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuMission.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuMissions.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlays.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuPackage.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuPackages.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutes.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutesNew.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettings.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsTokens.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuVideos.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/MenuVideosRemote.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionChanges.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionChats.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionContents.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionCreate.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInfo.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayers.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLog.vue.d.ts +9 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLogs.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionUsers.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Mission/PendingInvites.vue.d.ts +11 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/DeleteModal.vue.d.ts +39 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeCots.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeMission.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeVector.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Settings/TokenModal.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/Notifications.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/Query/Magnetic.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Query/Reverse.vue.d.ts +8 -0
- package/dist/types/src/components/CloudTAK/Query/Sun.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/Query/Weather.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/QueryView.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/RadialMenu/RadialMenu.vue.d.ts +22 -0
- package/dist/types/src/components/CloudTAK/util/Breadcrumb.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/ChannelInfo.vue.d.ts +15 -0
- package/dist/types/src/components/CloudTAK/util/Contact.vue.d.ts +38 -0
- package/dist/types/src/components/CloudTAK/util/ContactPuck.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/Coordinate.vue.d.ts +67 -0
- package/dist/types/src/components/CloudTAK/util/CoordinateType.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/CopyButton.vue.d.ts +32 -0
- package/dist/types/src/components/CloudTAK/util/CopyField.vue.d.ts +122 -0
- package/dist/types/src/components/CloudTAK/util/DrawOverlay.vue.d.ts +3 -0
- package/dist/types/src/components/CloudTAK/util/EmptyInfo.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/FeatureIcon.vue.d.ts +23 -0
- package/dist/types/src/components/CloudTAK/util/FeatureRow.vue.d.ts +81 -0
- package/dist/types/src/components/CloudTAK/util/FloatingAttachment.vue.d.ts +17 -0
- package/dist/types/src/components/CloudTAK/util/FloatingGeneric.vue.d.ts +17 -0
- package/dist/types/src/components/CloudTAK/util/FloatingPane.vue.d.ts +31 -0
- package/dist/types/src/components/CloudTAK/util/FloatingVideo.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/GenericChat.vue.d.ts +34 -0
- package/dist/types/src/components/CloudTAK/util/GenericSelect.vue.d.ts +34 -0
- package/dist/types/src/components/CloudTAK/util/GroupSelect.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/Icons.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/JSONModal.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/Keywords.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/LineLength.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/MenuTemplate.vue.d.ts +89 -0
- package/dist/types/src/components/CloudTAK/util/MultipleSelect.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/NotificationIcon.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/NotificationToast.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PolygonArea.vue.d.ts +24 -0
- package/dist/types/src/components/CloudTAK/util/PropertyAttachments.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/PropertyBattery.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertyBearing.vue.d.ts +58 -0
- package/dist/types/src/components/CloudTAK/util/PropertyCreator.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyDistance.vue.d.ts +54 -0
- package/dist/types/src/components/CloudTAK/util/PropertyElevation.vue.d.ts +32 -0
- package/dist/types/src/components/CloudTAK/util/PropertyEmail.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertyGeofence.vue.d.ts +10 -0
- package/dist/types/src/components/CloudTAK/util/PropertyLinks.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/PropertyMetadata.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyMilSym.vue.d.ts +25 -0
- package/dist/types/src/components/CloudTAK/util/PropertyPhone.vue.d.ts +13 -0
- package/dist/types/src/components/CloudTAK/util/PropertySensor.vue.d.ts +18 -0
- package/dist/types/src/components/CloudTAK/util/PropertySpeed.vue.d.ts +23 -0
- package/dist/types/src/components/CloudTAK/util/PropertyStyle.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyTimes.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/PropertyType.vue.d.ts +27 -0
- package/dist/types/src/components/CloudTAK/util/SearchBox.vue.d.ts +46 -0
- package/dist/types/src/components/CloudTAK/util/SelectFeats.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/SettingsCallsign.vue.d.ts +28 -0
- package/dist/types/src/components/CloudTAK/util/Share.vue.d.ts +14 -0
- package/dist/types/src/components/CloudTAK/util/ShareToMission.vue.d.ts +53 -0
- package/dist/types/src/components/CloudTAK/util/ShareToPackage.vue.d.ts +62 -0
- package/dist/types/src/components/CloudTAK/util/SlideDownHeader.vue.d.ts +41 -0
- package/dist/types/src/components/CloudTAK/util/StandardItem.vue.d.ts +18 -0
- package/dist/types/src/components/CloudTAK/util/Subscriptions.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/TagEntry.vue.d.ts +51 -0
- package/dist/types/src/components/CloudTAK/util/UserClientSelect.vue.d.ts +16 -0
- package/dist/types/src/components/CloudTAK/util/VideoLeaseSourceType.vue.d.ts +6 -0
- package/dist/types/src/components/CloudTAK/util/WarnChannels.vue.d.ts +7 -0
- package/dist/types/src/components/CloudTAK/util/WarnConfiguration.vue.d.ts +7 -0
- package/dist/types/src/components/Configure.vue.d.ts +3 -0
- package/dist/types/src/components/ETL/Connection/AgencyBadge.vue.d.ts +8 -0
- package/dist/types/src/components/ETL/Connection/CertificateP12.vue.d.ts +13 -0
- package/dist/types/src/components/ETL/Connection/StatusDot.vue.d.ts +13 -0
- package/dist/types/src/components/ETL/Styling/Layer.vue.d.ts +24 -0
- package/dist/types/src/components/Login.vue.d.ts +7 -0
- package/dist/types/src/components/util/GroupSelect.vue.d.ts +14 -0
- package/dist/types/src/components/util/IconSelect.vue.d.ts +29 -0
- package/dist/types/src/components/util/StatusDot.vue.d.ts +8 -0
- package/dist/types/src/components/util/Upload.vue.d.ts +46 -0
- package/dist/types/src/components/util/UploadLogo.vue.d.ts +14 -0
- package/dist/types/src/router.d.ts +3 -0
- package/dist/types/src/std.d.ts +19 -0
- package/dist/types/src/stores/float.d.ts +42 -0
- package/dist/types/src/stores/map.d.ts +124 -0
- package/dist/types/src/stores/modules/draw.d.ts +61 -0
- package/dist/types/src/stores/modules/icons.d.ts +38 -0
- package/dist/types/src/stores/modules/menu.d.ts +39 -0
- package/dist/types/src/timediff.d.ts +1 -0
- package/dist/types/src/types.d.ts +169 -0
- package/dist/types/src/workers/atlas-breadcrumb.d.ts +65 -0
- package/dist/types/src/workers/atlas-connection.d.ts +14 -0
- package/dist/types/src/workers/atlas-database.d.ts +137 -0
- package/dist/types/src/workers/atlas-profile.d.ts +44 -0
- package/dist/types/src/workers/atlas.d.ts +17 -0
- package/package.json +13 -7
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import type { Component } from 'vue';
|
|
3
|
+
import type { Router, RouteRecordRaw } from 'vue-router';
|
|
4
|
+
import type { Pinia } from 'pinia';
|
|
5
|
+
import { type PaneConfig } from './src/stores/float.ts';
|
|
6
|
+
import type { MenuItemConfig } from './src/stores/modules/menu.ts';
|
|
7
|
+
import { type DBFeature } from './src/base/database.ts';
|
|
8
|
+
import { type Observable } from 'rxjs';
|
|
9
|
+
import mapgl from 'maplibre-gl';
|
|
10
|
+
export type { MenuItemConfig };
|
|
11
|
+
export type { DBFeature };
|
|
12
|
+
export interface PluginInstance {
|
|
13
|
+
/**
|
|
14
|
+
* Called after `install` if the server has the plugin enabled by default
|
|
15
|
+
* or if the user has opted in to the plugin functionality
|
|
16
|
+
*/
|
|
17
|
+
enable(): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Called if the user disables the plugin, the plugin must
|
|
20
|
+
* remove all functionality from the user facing app
|
|
21
|
+
*/
|
|
22
|
+
disable(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export interface PluginStatic {
|
|
25
|
+
/**
|
|
26
|
+
* Hook called on init, note the plugin should not make itself
|
|
27
|
+
* usable unless enable() is called.
|
|
28
|
+
*/
|
|
29
|
+
install(app: App, api: PluginAPI): PluginInstance | Promise<PluginInstance>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The Main Plugin API for managing CloudTAK UI functions
|
|
33
|
+
*/
|
|
34
|
+
export declare class PluginAPI {
|
|
35
|
+
/**
|
|
36
|
+
* The Vue App instance
|
|
37
|
+
*/
|
|
38
|
+
app: App;
|
|
39
|
+
/**
|
|
40
|
+
* The Vue Router instance
|
|
41
|
+
*/
|
|
42
|
+
router: Router;
|
|
43
|
+
/**
|
|
44
|
+
* The Pinia Store instance
|
|
45
|
+
*/
|
|
46
|
+
pinia: Pinia;
|
|
47
|
+
/**
|
|
48
|
+
* @param app The Vue App instance
|
|
49
|
+
* @param router The Vue Router instance
|
|
50
|
+
* @param pinia The Pinia Store instance
|
|
51
|
+
*/
|
|
52
|
+
constructor(app: App, router: Router, pinia: Pinia);
|
|
53
|
+
/**
|
|
54
|
+
* Manage the Main Menu
|
|
55
|
+
*/
|
|
56
|
+
get menu(): {
|
|
57
|
+
/**
|
|
58
|
+
* Add a new item to the main menu
|
|
59
|
+
* @param item The menu item configuration
|
|
60
|
+
*/
|
|
61
|
+
add: (item: MenuItemConfig) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Remove an item from the main menu
|
|
64
|
+
* @param key The key of the menu item to remove
|
|
65
|
+
*/
|
|
66
|
+
remove: (key: string) => void;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Manage Application Routes
|
|
70
|
+
*/
|
|
71
|
+
get routes(): {
|
|
72
|
+
/**
|
|
73
|
+
* Add a new route to the application
|
|
74
|
+
* @param route The route configuration
|
|
75
|
+
* @param parentName The name of the parent route to add this route to (optional)
|
|
76
|
+
*/
|
|
77
|
+
add: (route: RouteRecordRaw, parentName?: string) => void;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Map Accessors
|
|
81
|
+
*/
|
|
82
|
+
get map(): mapgl.Map;
|
|
83
|
+
/**
|
|
84
|
+
* Manage Features
|
|
85
|
+
*/
|
|
86
|
+
get feature(): {
|
|
87
|
+
/**
|
|
88
|
+
* List features from the local database
|
|
89
|
+
* @param opts Filter options
|
|
90
|
+
*/
|
|
91
|
+
list: (opts?: {
|
|
92
|
+
filter?: (feature: DBFeature) => boolean;
|
|
93
|
+
}) => Promise<DBFeature[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Stream features from the local database
|
|
96
|
+
* @param opts Filter options
|
|
97
|
+
*/
|
|
98
|
+
stream: (opts?: {
|
|
99
|
+
filter?: (feature: DBFeature) => boolean;
|
|
100
|
+
}) => Observable<DBFeature[]>;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Manage Breadcrumb Trails
|
|
104
|
+
*/
|
|
105
|
+
get breadcrumb(): {
|
|
106
|
+
/**
|
|
107
|
+
* Manage live breadcrumb trail recording
|
|
108
|
+
*/
|
|
109
|
+
live: {
|
|
110
|
+
/**
|
|
111
|
+
* Enable live breadcrumb trail recording for a given CoT UID
|
|
112
|
+
* @param uid The CoT UID to start recording
|
|
113
|
+
*/
|
|
114
|
+
add: (uid: string) => Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Disable live breadcrumb trail recording for a given CoT UID
|
|
117
|
+
* @param uid The CoT UID to stop recording
|
|
118
|
+
*/
|
|
119
|
+
remove: (uid: string) => Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* Returns all CoT UIDs that currently have live breadcrumb recording enabled
|
|
122
|
+
*/
|
|
123
|
+
list: () => Promise<string[]>;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Manage Floating Panes on top of the Map View
|
|
128
|
+
*/
|
|
129
|
+
get float(): {
|
|
130
|
+
/**
|
|
131
|
+
* Add a new floating pane
|
|
132
|
+
* @param opts Floating pane configuration
|
|
133
|
+
*/
|
|
134
|
+
add: (opts: {
|
|
135
|
+
uid: string;
|
|
136
|
+
name?: string;
|
|
137
|
+
component: Component;
|
|
138
|
+
actions?: Component;
|
|
139
|
+
props?: Record<string, unknown>;
|
|
140
|
+
height?: number;
|
|
141
|
+
width?: number;
|
|
142
|
+
x?: number;
|
|
143
|
+
y?: number;
|
|
144
|
+
}) => import("./src/stores/float.ts").Pane<PaneConfig>;
|
|
145
|
+
/**
|
|
146
|
+
* Remove a floating pane
|
|
147
|
+
* @param uid The unique identifier of the pane to remove
|
|
148
|
+
*/
|
|
149
|
+
remove: (uid: string) => void;
|
|
150
|
+
/**
|
|
151
|
+
* Check if a floating pane exists
|
|
152
|
+
* @param uid The unique identifier to check
|
|
153
|
+
*/
|
|
154
|
+
has: (uid: string) => boolean;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DBChatroomChat } from './database.ts';
|
|
2
|
+
import type Atlas from '../workers/atlas.ts';
|
|
3
|
+
import type { Remote } from 'comlink';
|
|
4
|
+
export default class ChatroomChats {
|
|
5
|
+
chatroom: string;
|
|
6
|
+
constructor(chatroom: string);
|
|
7
|
+
refresh(): Promise<void>;
|
|
8
|
+
list(opts?: {
|
|
9
|
+
refresh?: boolean;
|
|
10
|
+
}): Promise<Array<DBChatroomChat>>;
|
|
11
|
+
markRead(): Promise<void>;
|
|
12
|
+
send(message: string, sender: {
|
|
13
|
+
uid: string;
|
|
14
|
+
callsign: string;
|
|
15
|
+
}, worker: Remote<Atlas>, recipient?: {
|
|
16
|
+
uid: string;
|
|
17
|
+
callsign: string;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { DBChatroom } from './database.ts';
|
|
2
|
+
import ChatroomChats from './chatroom-chats.ts';
|
|
3
|
+
import { type Observable } from 'dexie';
|
|
4
|
+
import type { ProfileChatroomList, ProfileChatList } from '../types.ts';
|
|
5
|
+
/**
|
|
6
|
+
* High Level Wrapper around the Profile Chatroom API
|
|
7
|
+
*
|
|
8
|
+
* @property {string} name - The name of the chatroom
|
|
9
|
+
*/
|
|
10
|
+
export default class Chatroom {
|
|
11
|
+
name: string;
|
|
12
|
+
chats: ChatroomChats;
|
|
13
|
+
constructor(name: string);
|
|
14
|
+
static liveUnreadCount(): Observable<number>;
|
|
15
|
+
/**
|
|
16
|
+
* Return a Chatroom instance if one already exists in the local DB,
|
|
17
|
+
*/
|
|
18
|
+
static from(name: string): Promise<Chatroom | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* Loads an existing Chatroom from the local DB and refresh it,
|
|
21
|
+
*
|
|
22
|
+
* @param name - The unique identifier for the chatroom
|
|
23
|
+
* @param opts - Options for loading the chatroom
|
|
24
|
+
* @param opts.reload - Whether to reload the chatroom from the local DB
|
|
25
|
+
*/
|
|
26
|
+
static load(name: string, opts?: {
|
|
27
|
+
reload?: boolean;
|
|
28
|
+
}): Promise<Chatroom>;
|
|
29
|
+
static delete(names: string[]): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Reload the Chatroom from the local Database
|
|
32
|
+
*/
|
|
33
|
+
reload(): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Perform a hard refresh of the Chatroom from the Server
|
|
36
|
+
*/
|
|
37
|
+
refresh(): Promise<void>;
|
|
38
|
+
fetch(): Promise<void>;
|
|
39
|
+
getChats(): Promise<ProfileChatList>;
|
|
40
|
+
deleteChats(ids: string[]): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* List all locally stored chatrooms
|
|
43
|
+
*/
|
|
44
|
+
static localList(): Promise<Set<{
|
|
45
|
+
name: string;
|
|
46
|
+
}>>;
|
|
47
|
+
static list(filter?: string): Promise<DBChatroom[]>;
|
|
48
|
+
static sync(): Promise<ProfileChatroomList>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Subscription } from 'dexie';
|
|
2
|
+
import type { paths } from '../derived-types.js';
|
|
3
|
+
export type FullConfig = paths['/api/config']['get']['responses']['200']['content']['application/json'];
|
|
4
|
+
export default class Config<K extends keyof FullConfig = keyof FullConfig> {
|
|
5
|
+
key: K;
|
|
6
|
+
value: FullConfig[K];
|
|
7
|
+
_sub?: Subscription;
|
|
8
|
+
constructor(key: K, value: FullConfig[K]);
|
|
9
|
+
subscribe(): void;
|
|
10
|
+
subscribed(): boolean;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
static get<K extends keyof FullConfig>(key: K): Promise<Config<K> | undefined>;
|
|
13
|
+
static list(keys: (keyof FullConfig)[], opts?: {
|
|
14
|
+
defaults?: Partial<FullConfig>;
|
|
15
|
+
}): Promise<Partial<FullConfig>>;
|
|
16
|
+
static refresh(keys: (keyof FullConfig)[]): Promise<Partial<FullConfig>>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Observable } from 'dexie';
|
|
2
|
+
import type { Contact } from '../types.ts';
|
|
3
|
+
export default class ContactManager {
|
|
4
|
+
static liveCount(): Observable<number>;
|
|
5
|
+
static liveList(filter?: string): Observable<Contact[]>;
|
|
6
|
+
static list(opts?: {
|
|
7
|
+
token?: string;
|
|
8
|
+
filter?: string;
|
|
9
|
+
}): Promise<Contact[]>;
|
|
10
|
+
static get(uid: string): Promise<Contact | undefined>;
|
|
11
|
+
static getByCallsign(callsign: string): Promise<Contact | undefined>;
|
|
12
|
+
static put(contact: Contact): Promise<void>;
|
|
13
|
+
static sync(token?: string): Promise<Contact[]>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { Feature, Subscription } from '../types.ts';
|
|
2
|
+
import type { BBox as GeoJSONBBox, Feature as GeoJSONFeature, Geometry as GeoJSONGeometry } from 'geojson';
|
|
3
|
+
export interface Origin {
|
|
4
|
+
mode: OriginMode;
|
|
5
|
+
mode_id?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare enum OriginMode {
|
|
8
|
+
CONNECTION = "Connection",
|
|
9
|
+
MISSION = "Mission"
|
|
10
|
+
}
|
|
11
|
+
export declare const RENDERED_PROPERTIES: string[];
|
|
12
|
+
export default class COT {
|
|
13
|
+
id: string;
|
|
14
|
+
instance: string;
|
|
15
|
+
_path: string;
|
|
16
|
+
_properties: Feature["properties"];
|
|
17
|
+
_geometry: Feature["geometry"];
|
|
18
|
+
_remote: boolean;
|
|
19
|
+
_liveQuerySubscription: {
|
|
20
|
+
unsubscribe: () => void;
|
|
21
|
+
} | null;
|
|
22
|
+
static selfUid: string | null;
|
|
23
|
+
_username?: string;
|
|
24
|
+
origin: Origin;
|
|
25
|
+
static load(feat: Feature, origin?: Origin, opts?: {
|
|
26
|
+
skipSave?: boolean;
|
|
27
|
+
remote?: boolean;
|
|
28
|
+
}): Promise<COT>;
|
|
29
|
+
constructor(feat: Feature, origin?: Origin, opts?: {
|
|
30
|
+
skipSave?: boolean;
|
|
31
|
+
remote?: boolean;
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Begin listening for remote updates via a DexieDB live query
|
|
35
|
+
* This is a seperate function due to the issues outlined in: https://stackoverflow.com/q/70184129
|
|
36
|
+
*/
|
|
37
|
+
reactivity(): void;
|
|
38
|
+
set path(path: string);
|
|
39
|
+
get path(): string;
|
|
40
|
+
set properties(properties: Feature["properties"]);
|
|
41
|
+
get properties(): Feature["properties"];
|
|
42
|
+
set geometry(geometry: Feature["geometry"]);
|
|
43
|
+
get geometry(): Feature["geometry"];
|
|
44
|
+
/**
|
|
45
|
+
* Update the COT and return a boolean as to whether the COT needs to be re-rendered
|
|
46
|
+
*/
|
|
47
|
+
update(update: {
|
|
48
|
+
path?: string;
|
|
49
|
+
properties?: Feature["properties"];
|
|
50
|
+
geometry?: Feature["geometry"];
|
|
51
|
+
}, opts?: {
|
|
52
|
+
skipSave?: boolean;
|
|
53
|
+
}): Promise<boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* Attempt to save the CoT to the database if necessary
|
|
56
|
+
*/
|
|
57
|
+
save(): Promise<void>;
|
|
58
|
+
get is_skittle(): boolean;
|
|
59
|
+
get is_self(): boolean;
|
|
60
|
+
get is_archivable(): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Determines if the COT type allows editing
|
|
63
|
+
* But does not determine if a COT is part of a Misison Sync, if the mission allows editing
|
|
64
|
+
*/
|
|
65
|
+
get is_editable(): boolean;
|
|
66
|
+
subscription(): Promise<Subscription>;
|
|
67
|
+
username(): Promise<string>;
|
|
68
|
+
/**
|
|
69
|
+
* Returns a proxy that will correctly call the internal update function if changes are made
|
|
70
|
+
* Warning: Cannot be used with Vue3's reactivity system
|
|
71
|
+
*/
|
|
72
|
+
as_proxy(): COT;
|
|
73
|
+
as_feature(opts?: {
|
|
74
|
+
clone?: boolean;
|
|
75
|
+
}): Feature;
|
|
76
|
+
as_rendered(): GeoJSONFeature<GeoJSONGeometry, Record<string, unknown>>;
|
|
77
|
+
/**
|
|
78
|
+
* The slimmer we can get the Features, the better
|
|
79
|
+
* This returns the minium feature we need to actually style the COT in the vector tiles
|
|
80
|
+
*/
|
|
81
|
+
static as_rendered(input: Feature): GeoJSONFeature<GeoJSONGeometry, Record<string, unknown>>;
|
|
82
|
+
vectorId(): number;
|
|
83
|
+
/**
|
|
84
|
+
* string hash function to convert the COT ID into a number for use as a vector tile feature ID
|
|
85
|
+
*/
|
|
86
|
+
static vectorId(id: string): number;
|
|
87
|
+
length(): number;
|
|
88
|
+
bounds(): GeoJSONBBox;
|
|
89
|
+
flyTo(): Promise<void>;
|
|
90
|
+
static style(feat: Feature): Promise<Feature>;
|
|
91
|
+
/**
|
|
92
|
+
* Consistent feature manipulation between add & update
|
|
93
|
+
*/
|
|
94
|
+
static styleProperties(type: string, properties: Feature["properties"]): Promise<Feature["properties"]>;
|
|
95
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import Dexie, { type EntityTable } from 'dexie';
|
|
2
|
+
import type { Feature, GroupChannel, Mission, MissionRole, MissionChange, MissionLog, Contact, Server } from '../types.ts';
|
|
3
|
+
export interface DBIcon {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface DBFeature {
|
|
7
|
+
id: string;
|
|
8
|
+
path: string;
|
|
9
|
+
properties: Feature["properties"];
|
|
10
|
+
geometry: Feature["geometry"];
|
|
11
|
+
}
|
|
12
|
+
export interface DBBreadcrumb {
|
|
13
|
+
id: string;
|
|
14
|
+
uid: string;
|
|
15
|
+
path: string;
|
|
16
|
+
callsign: string;
|
|
17
|
+
color?: string;
|
|
18
|
+
coordinates: number[][];
|
|
19
|
+
live: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface DBChatroom {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
created: string;
|
|
25
|
+
updated: string;
|
|
26
|
+
unread?: number;
|
|
27
|
+
last_read: string | null;
|
|
28
|
+
}
|
|
29
|
+
export interface DBChatroomChat {
|
|
30
|
+
id: string;
|
|
31
|
+
chatroom: string;
|
|
32
|
+
sender: string;
|
|
33
|
+
sender_uid: string;
|
|
34
|
+
message: string;
|
|
35
|
+
created: string;
|
|
36
|
+
unread?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface DBIconset {
|
|
39
|
+
uid: string;
|
|
40
|
+
created: string;
|
|
41
|
+
updated: string;
|
|
42
|
+
version: number;
|
|
43
|
+
name: string;
|
|
44
|
+
username: string | null;
|
|
45
|
+
default_group: string | null;
|
|
46
|
+
default_friendly: string | null;
|
|
47
|
+
default_hostile: string | null;
|
|
48
|
+
default_neutral: string | null;
|
|
49
|
+
default_unknown: string | null;
|
|
50
|
+
skip_resize: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface DBFilter {
|
|
53
|
+
id: string;
|
|
54
|
+
external: string;
|
|
55
|
+
name: string;
|
|
56
|
+
source: string;
|
|
57
|
+
internal: boolean;
|
|
58
|
+
query: string;
|
|
59
|
+
}
|
|
60
|
+
export declare enum NotificationType {
|
|
61
|
+
Contact = "Contact",
|
|
62
|
+
Import = "Import",
|
|
63
|
+
Alert = "Alert",
|
|
64
|
+
Medical = "Medical",
|
|
65
|
+
Mission = "Mission",
|
|
66
|
+
Chat = "Chat"
|
|
67
|
+
}
|
|
68
|
+
export interface DBNotification {
|
|
69
|
+
id: string;
|
|
70
|
+
type: NotificationType;
|
|
71
|
+
name: string;
|
|
72
|
+
body: string;
|
|
73
|
+
url: string;
|
|
74
|
+
toast: boolean;
|
|
75
|
+
read: boolean;
|
|
76
|
+
created: string;
|
|
77
|
+
}
|
|
78
|
+
export interface DBVideo {
|
|
79
|
+
id: string;
|
|
80
|
+
created: string;
|
|
81
|
+
updated: string;
|
|
82
|
+
lease: number;
|
|
83
|
+
username: string;
|
|
84
|
+
}
|
|
85
|
+
export interface DBSubscriptionFeature {
|
|
86
|
+
id: string;
|
|
87
|
+
path: string;
|
|
88
|
+
mission: string;
|
|
89
|
+
properties: Feature["properties"];
|
|
90
|
+
geometry: Feature["geometry"];
|
|
91
|
+
}
|
|
92
|
+
export interface DBSubscriptionContent {
|
|
93
|
+
uid: string;
|
|
94
|
+
mission: string;
|
|
95
|
+
timestamp: string;
|
|
96
|
+
creatorUid?: string;
|
|
97
|
+
keywords: string[];
|
|
98
|
+
name: string;
|
|
99
|
+
hash: string;
|
|
100
|
+
submissionTime: string;
|
|
101
|
+
size: number;
|
|
102
|
+
mimeType?: string;
|
|
103
|
+
submitter?: string;
|
|
104
|
+
expiration: number;
|
|
105
|
+
}
|
|
106
|
+
export interface DBSubscriptionChanges extends MissionChange {
|
|
107
|
+
id?: number;
|
|
108
|
+
mission: string;
|
|
109
|
+
}
|
|
110
|
+
export interface DBSubscriptionChat {
|
|
111
|
+
id: string;
|
|
112
|
+
mission: string;
|
|
113
|
+
chatroom: string;
|
|
114
|
+
sender: string;
|
|
115
|
+
sender_uid: string;
|
|
116
|
+
message: string;
|
|
117
|
+
created: string;
|
|
118
|
+
unread: boolean;
|
|
119
|
+
}
|
|
120
|
+
export interface DBSubscription {
|
|
121
|
+
guid: string;
|
|
122
|
+
name: string;
|
|
123
|
+
meta: Mission;
|
|
124
|
+
role: MissionRole;
|
|
125
|
+
token?: string;
|
|
126
|
+
dirty: boolean;
|
|
127
|
+
subscribed: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface DBSubscriptionLog extends MissionLog {
|
|
130
|
+
mission: string;
|
|
131
|
+
read: boolean;
|
|
132
|
+
}
|
|
133
|
+
export interface DBMissionTemplate {
|
|
134
|
+
id: string;
|
|
135
|
+
name: string;
|
|
136
|
+
icon: string;
|
|
137
|
+
description: string;
|
|
138
|
+
created: string;
|
|
139
|
+
updated: string;
|
|
140
|
+
}
|
|
141
|
+
export interface DBMissionTemplateLog {
|
|
142
|
+
id: string;
|
|
143
|
+
template: string;
|
|
144
|
+
name: string;
|
|
145
|
+
icon?: string | null;
|
|
146
|
+
description: string;
|
|
147
|
+
created: string;
|
|
148
|
+
updated: string;
|
|
149
|
+
schema: unknown;
|
|
150
|
+
keywords: string[];
|
|
151
|
+
}
|
|
152
|
+
export interface DBProfileConfig {
|
|
153
|
+
key: string;
|
|
154
|
+
value: unknown;
|
|
155
|
+
}
|
|
156
|
+
export interface DBConfig {
|
|
157
|
+
key: string;
|
|
158
|
+
value: unknown;
|
|
159
|
+
}
|
|
160
|
+
export interface DBServer extends Server {
|
|
161
|
+
_id: string;
|
|
162
|
+
}
|
|
163
|
+
export interface DBCache {
|
|
164
|
+
key: string;
|
|
165
|
+
updated: number;
|
|
166
|
+
}
|
|
167
|
+
export type DatabaseType = Dexie & {
|
|
168
|
+
icon: EntityTable<DBIcon, 'name'>;
|
|
169
|
+
iconset: EntityTable<DBIconset, 'uid'>;
|
|
170
|
+
group: EntityTable<GroupChannel, 'name'>;
|
|
171
|
+
video: EntityTable<DBVideo, 'id'>;
|
|
172
|
+
filter: EntityTable<DBFilter, 'id'>;
|
|
173
|
+
feature: EntityTable<DBFeature, 'id'>;
|
|
174
|
+
breadcrumb: EntityTable<DBBreadcrumb, 'id'>;
|
|
175
|
+
chatroom: EntityTable<DBChatroom, 'id'>;
|
|
176
|
+
chatroom_chats: EntityTable<DBChatroomChat, 'id'>;
|
|
177
|
+
notification: EntityTable<DBNotification, 'id'>;
|
|
178
|
+
subscription: EntityTable<DBSubscription, 'guid'>;
|
|
179
|
+
subscription_contents: EntityTable<DBSubscriptionContent, 'uid'>;
|
|
180
|
+
subscription_changes: EntityTable<DBSubscriptionChanges, 'id'>;
|
|
181
|
+
server: EntityTable<DBServer, '_id'>;
|
|
182
|
+
subscription_log: EntityTable<DBSubscriptionLog, 'id'>;
|
|
183
|
+
subscription_feature: EntityTable<DBSubscriptionFeature, 'id'>;
|
|
184
|
+
subscription_chat: EntityTable<DBSubscriptionChat, 'id'>;
|
|
185
|
+
mission_template: EntityTable<DBMissionTemplate, 'id'>;
|
|
186
|
+
mission_template_log: EntityTable<DBMissionTemplateLog, 'id'>;
|
|
187
|
+
profile: EntityTable<DBProfileConfig, 'key'>;
|
|
188
|
+
config: EntityTable<DBConfig, 'key'>;
|
|
189
|
+
cache: EntityTable<DBCache, 'key'>;
|
|
190
|
+
contact: EntityTable<Contact, 'uid'>;
|
|
191
|
+
};
|
|
192
|
+
export declare const db: DatabaseType;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare enum WorkerMessageType {
|
|
2
|
+
Map_FlyTo = "cloudtak:map:flyto",
|
|
3
|
+
Map_FitBounds = "cloudtak:map:fitbounds",
|
|
4
|
+
Map_Projection = "cloudtak:map:projection",
|
|
5
|
+
Profile_Callsign = "cloudtak:profile:callsign",
|
|
6
|
+
Profile_Display_Zoom = "cloudtak:profile:display:zoom",
|
|
7
|
+
Profile_Icon_Rotation = "cloudtak:profile:icon:rotation",
|
|
8
|
+
Profile_Distance_Unit = "cloudtak:profile:distance:unit",
|
|
9
|
+
Profile_Location_Coordinates = "cloudtak:profile:location:coordinates",
|
|
10
|
+
Profile_Location_Source = "cloudtak:profile:location:source",
|
|
11
|
+
Feature_Archived_Added = "cloudtak:feature:archived:added",
|
|
12
|
+
Feature_Archived_Removed = "cloudtak:feature:archived:removed",
|
|
13
|
+
Channels_None = "channels:none",
|
|
14
|
+
Channels_List = "channels:list",
|
|
15
|
+
Connection_Open = "connection:open",
|
|
16
|
+
Connection_Close = "connection:close",
|
|
17
|
+
Mission_Change_Feature = "mission:change:feature",
|
|
18
|
+
Mission_Invite = "mission:invite",
|
|
19
|
+
Channel_Change = "channel:change",
|
|
20
|
+
Feature_Update = "cloudtak:feature:update",
|
|
21
|
+
Profile_Update = "cloudtak:profile:update"
|
|
22
|
+
}
|
|
23
|
+
export type WorkerMessage = {
|
|
24
|
+
type: WorkerMessageType;
|
|
25
|
+
body?: any;
|
|
26
|
+
};
|
|
27
|
+
export declare enum LocationState {
|
|
28
|
+
Loading = 0,
|
|
29
|
+
Disabled = 1,
|
|
30
|
+
Preset = 2,
|
|
31
|
+
Live = 3
|
|
32
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Feature } from '../types.ts';
|
|
2
|
+
import jsonata from 'jsonata';
|
|
3
|
+
/**
|
|
4
|
+
* High Level Wrapper around the Data Filters
|
|
5
|
+
*
|
|
6
|
+
* TODO: Once all COTs are in IndexDB, apply the filter on to a new field in the COT
|
|
7
|
+
* called "filtered": [ <filterid>, ... ] so we don't have to re-evaluate the filter each time
|
|
8
|
+
*
|
|
9
|
+
* @property {string} id - The unique identifier for the filter
|
|
10
|
+
* @property {string} external - The external ID of the filter
|
|
11
|
+
* @property {string} name - The name of the filter
|
|
12
|
+
* @property {string} source - The source of the filter
|
|
13
|
+
* @property {boolean} internal - Whether the filter is internal
|
|
14
|
+
* @property {string} query - The JSONata query string for the filter
|
|
15
|
+
*/
|
|
16
|
+
export default class Filter {
|
|
17
|
+
id: string;
|
|
18
|
+
external: string;
|
|
19
|
+
name: string;
|
|
20
|
+
source: string;
|
|
21
|
+
internal: boolean;
|
|
22
|
+
query: string;
|
|
23
|
+
expression: jsonata.Expression;
|
|
24
|
+
constructor(name: string, external: string, source: string, internal: boolean, query: string);
|
|
25
|
+
test(feature: Feature): Promise<boolean>;
|
|
26
|
+
static list(): Promise<Filter[]>;
|
|
27
|
+
static from(id: string): Promise<Filter | null>;
|
|
28
|
+
update(body: {
|
|
29
|
+
name?: string;
|
|
30
|
+
external?: string;
|
|
31
|
+
source?: string;
|
|
32
|
+
internal?: boolean;
|
|
33
|
+
query?: string;
|
|
34
|
+
}): Promise<void>;
|
|
35
|
+
static create(name: string, external: string, source: string, internal: boolean, query: string): Promise<Filter>;
|
|
36
|
+
delete(): Promise<void>;
|
|
37
|
+
static delete(id: {
|
|
38
|
+
id?: string;
|
|
39
|
+
external?: string;
|
|
40
|
+
}): Promise<void>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type Observable } from 'dexie';
|
|
2
|
+
import type { Group, GroupChannel } from '../types.ts';
|
|
3
|
+
export default class GroupManager {
|
|
4
|
+
/**
|
|
5
|
+
* Merge an array of API Group entries (each with a single direction string)
|
|
6
|
+
* into GroupChannel entries keyed by name with direction as a string array
|
|
7
|
+
*/
|
|
8
|
+
static merge(groups: Group[]): GroupChannel[];
|
|
9
|
+
/**
|
|
10
|
+
* Explode a GroupChannel (with direction array) back into individual
|
|
11
|
+
* API Group entries (each with a single direction string)
|
|
12
|
+
*/
|
|
13
|
+
static explode(channels: GroupChannel[]): Group[];
|
|
14
|
+
static live(opts?: {
|
|
15
|
+
active?: boolean;
|
|
16
|
+
direction?: string;
|
|
17
|
+
}): Observable<GroupChannel[]>;
|
|
18
|
+
static list(opts?: {
|
|
19
|
+
token?: string;
|
|
20
|
+
active?: boolean;
|
|
21
|
+
direction?: string;
|
|
22
|
+
}): Promise<GroupChannel[]>;
|
|
23
|
+
static get(name: string): Promise<GroupChannel | undefined>;
|
|
24
|
+
static put(channels: GroupChannel[] | GroupChannel): Promise<void>;
|
|
25
|
+
static sync(token?: string): Promise<GroupChannel[]>;
|
|
26
|
+
static update(channels: GroupChannel[], token?: string): Promise<GroupChannel[]>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import COT from '../base/cot.ts';
|
|
2
|
+
import type { TransferHandler } from 'comlink';
|
|
3
|
+
import type { Feature } from '../types.ts';
|
|
4
|
+
export declare class CloudTAKTransferHandler {
|
|
5
|
+
remote: boolean;
|
|
6
|
+
constructor(transferHandlers: Map<string, TransferHandler<unknown, unknown>>, remote: boolean);
|
|
7
|
+
cots: TransferHandler<Set<COT>, Array<Feature>>;
|
|
8
|
+
cot: TransferHandler<COT, Feature>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DBMissionTemplateLog } from './database.ts';
|
|
2
|
+
export default class MissionTemplateLogs {
|
|
3
|
+
template: string;
|
|
4
|
+
constructor(template: string);
|
|
5
|
+
refresh(): Promise<void>;
|
|
6
|
+
list(opts?: {
|
|
7
|
+
refresh?: boolean;
|
|
8
|
+
}): Promise<Array<DBMissionTemplateLog>>;
|
|
9
|
+
}
|