@tak-ps/cloudtak 12.55.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.
Files changed (179) hide show
  1. package/dist/types/plugin.d.ts +57 -0
  2. package/dist/types/src/base/chatroom-chats.d.ts +3 -1
  3. package/dist/types/src/base/chatroom.d.ts +2 -0
  4. package/dist/types/src/base/config.d.ts +17 -0
  5. package/dist/types/src/base/contact.d.ts +14 -0
  6. package/dist/types/src/base/cot.d.ts +8 -7
  7. package/dist/types/src/base/database.d.ts +86 -9
  8. package/dist/types/src/base/events.d.ts +4 -2
  9. package/dist/types/src/base/group.d.ts +27 -0
  10. package/dist/types/src/base/handler.d.ts +2 -4
  11. package/dist/types/src/base/mission-template-logs.d.ts +9 -0
  12. package/dist/types/src/base/mission-template.d.ts +20 -0
  13. package/dist/types/src/base/profile.d.ts +20 -0
  14. package/dist/types/src/base/server.d.ts +9 -0
  15. package/dist/types/src/base/subscription-changes.d.ts +18 -0
  16. package/dist/types/src/base/subscription-chat.d.ts +23 -0
  17. package/dist/types/src/base/subscription-contents.d.ts +27 -0
  18. package/dist/types/src/base/subscription-feature.d.ts +1 -1
  19. package/dist/types/src/base/subscription-log.d.ts +4 -2
  20. package/dist/types/src/base/subscription.d.ts +16 -3
  21. package/dist/types/src/base/validators.d.ts +9 -0
  22. package/dist/types/src/components/CloudTAK/ActiveMission.vue.d.ts +3 -0
  23. package/dist/types/src/components/CloudTAK/CoTView.vue.d.ts +3 -0
  24. package/dist/types/src/components/CloudTAK/DrawTools.vue.d.ts +3 -0
  25. package/dist/types/src/components/CloudTAK/GenericBottomPane.vue.d.ts +13 -0
  26. package/dist/types/src/components/CloudTAK/Inputs/BufferInput.vue.d.ts +10 -0
  27. package/dist/types/src/components/CloudTAK/Inputs/CoordInput.vue.d.ts +7 -0
  28. package/dist/types/src/components/CloudTAK/Inputs/GeoJSONInput.vue.d.ts +24 -0
  29. package/dist/types/src/components/CloudTAK/Inputs/RangeInput.vue.d.ts +7 -0
  30. package/dist/types/src/components/CloudTAK/Inputs/RangeRingsInput.vue.d.ts +7 -0
  31. package/dist/types/src/components/CloudTAK/MainMenu.vue.d.ts +9 -0
  32. package/dist/types/src/components/CloudTAK/MainMenuContents.vue.d.ts +16 -0
  33. package/dist/types/src/components/CloudTAK/Map.vue.d.ts +8 -0
  34. package/dist/types/src/components/CloudTAK/MapLoading.vue.d.ts +3 -0
  35. package/dist/types/src/components/CloudTAK/Menu/Basemaps/EditModal.vue.d.ts +13 -0
  36. package/dist/types/src/components/CloudTAK/Menu/Debugger.vue.d.ts +3 -0
  37. package/dist/types/src/components/CloudTAK/Menu/Iconset/EditModal.vue.d.ts +7 -0
  38. package/dist/types/src/components/CloudTAK/Menu/MenuBasemaps.vue.d.ts +3 -0
  39. package/dist/types/src/components/CloudTAK/Menu/MenuChannels.vue.d.ts +3 -0
  40. package/dist/types/src/components/CloudTAK/Menu/MenuChat.vue.d.ts +3 -0
  41. package/dist/types/src/components/CloudTAK/Menu/MenuChats.vue.d.ts +3 -0
  42. package/dist/types/src/components/CloudTAK/Menu/MenuConnections.vue.d.ts +3 -0
  43. package/dist/types/src/components/CloudTAK/Menu/MenuContacts.vue.d.ts +3 -0
  44. package/dist/types/src/components/CloudTAK/Menu/MenuFeatView.vue.d.ts +8 -0
  45. package/dist/types/src/components/CloudTAK/Menu/MenuFeatures.vue.d.ts +3 -0
  46. package/dist/types/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue.d.ts +3 -0
  47. package/dist/types/src/components/CloudTAK/Menu/MenuFiles.vue.d.ts +3 -0
  48. package/dist/types/src/components/CloudTAK/Menu/MenuHistory.vue.d.ts +3 -0
  49. package/dist/types/src/components/CloudTAK/Menu/MenuIcon.vue.d.ts +3 -0
  50. package/dist/types/src/components/CloudTAK/Menu/MenuIconset.vue.d.ts +3 -0
  51. package/dist/types/src/components/CloudTAK/Menu/MenuIconsets.vue.d.ts +3 -0
  52. package/dist/types/src/components/CloudTAK/Menu/MenuImport.vue.d.ts +3 -0
  53. package/dist/types/src/components/CloudTAK/Menu/MenuImports.vue.d.ts +3 -0
  54. package/dist/types/src/components/CloudTAK/Menu/MenuItemCard.vue.d.ts +103 -0
  55. package/dist/types/src/components/CloudTAK/Menu/MenuMission.vue.d.ts +3 -0
  56. package/dist/types/src/components/CloudTAK/Menu/MenuMissions.vue.d.ts +3 -0
  57. package/dist/types/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue.d.ts +3 -0
  58. package/dist/types/src/components/CloudTAK/Menu/MenuOverlays.vue.d.ts +3 -0
  59. package/dist/types/src/components/CloudTAK/Menu/MenuPackage.vue.d.ts +3 -0
  60. package/dist/types/src/components/CloudTAK/Menu/MenuPackages.vue.d.ts +3 -0
  61. package/dist/types/src/components/CloudTAK/Menu/MenuRoutes.vue.d.ts +3 -0
  62. package/dist/types/src/components/CloudTAK/Menu/MenuRoutesNew.vue.d.ts +3 -0
  63. package/dist/types/src/components/CloudTAK/Menu/MenuSettings.vue.d.ts +3 -0
  64. package/dist/types/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue.d.ts +3 -0
  65. package/dist/types/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue.d.ts +3 -0
  66. package/dist/types/src/components/CloudTAK/Menu/MenuSettingsTokens.vue.d.ts +3 -0
  67. package/dist/types/src/components/CloudTAK/Menu/MenuVideos.vue.d.ts +3 -0
  68. package/dist/types/src/components/CloudTAK/Menu/MenuVideosRemote.vue.d.ts +3 -0
  69. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionChanges.vue.d.ts +7 -0
  70. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionChats.vue.d.ts +7 -0
  71. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionContents.vue.d.ts +7 -0
  72. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionCreate.vue.d.ts +7 -0
  73. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInfo.vue.d.ts +11 -0
  74. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue.d.ts +13 -0
  75. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue.d.ts +15 -0
  76. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue.d.ts +15 -0
  77. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayers.vue.d.ts +10 -0
  78. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLog.vue.d.ts +9 -0
  79. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLogs.vue.d.ts +7 -0
  80. package/dist/types/src/components/CloudTAK/Menu/Mission/MissionUsers.vue.d.ts +7 -0
  81. package/dist/types/src/components/CloudTAK/Menu/Mission/PendingInvites.vue.d.ts +11 -0
  82. package/dist/types/src/components/CloudTAK/Menu/Overlays/DeleteModal.vue.d.ts +39 -0
  83. package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeCots.vue.d.ts +7 -0
  84. package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeMission.vue.d.ts +7 -0
  85. package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeVector.vue.d.ts +13 -0
  86. package/dist/types/src/components/CloudTAK/Menu/Settings/TokenModal.vue.d.ts +13 -0
  87. package/dist/types/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue.d.ts +16 -0
  88. package/dist/types/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue.d.ts +13 -0
  89. package/dist/types/src/components/CloudTAK/Notifications.vue.d.ts +3 -0
  90. package/dist/types/src/components/CloudTAK/Query/Magnetic.vue.d.ts +7 -0
  91. package/dist/types/src/components/CloudTAK/Query/Reverse.vue.d.ts +8 -0
  92. package/dist/types/src/components/CloudTAK/Query/Sun.vue.d.ts +7 -0
  93. package/dist/types/src/components/CloudTAK/Query/Weather.vue.d.ts +7 -0
  94. package/dist/types/src/components/CloudTAK/QueryView.vue.d.ts +3 -0
  95. package/dist/types/src/components/CloudTAK/RadialMenu/RadialMenu.vue.d.ts +22 -0
  96. package/dist/types/src/components/CloudTAK/util/Breadcrumb.vue.d.ts +10 -0
  97. package/dist/types/src/components/CloudTAK/util/ChannelInfo.vue.d.ts +15 -0
  98. package/dist/types/src/components/CloudTAK/util/Contact.vue.d.ts +38 -0
  99. package/dist/types/src/components/CloudTAK/util/ContactPuck.vue.d.ts +7 -0
  100. package/dist/types/src/components/CloudTAK/util/Coordinate.vue.d.ts +67 -0
  101. package/dist/types/src/components/CloudTAK/util/CoordinateType.vue.d.ts +27 -0
  102. package/dist/types/src/components/CloudTAK/util/CopyButton.vue.d.ts +32 -0
  103. package/dist/types/src/components/CloudTAK/util/CopyField.vue.d.ts +122 -0
  104. package/dist/types/src/components/CloudTAK/util/DrawOverlay.vue.d.ts +3 -0
  105. package/dist/types/src/components/CloudTAK/util/EmptyInfo.vue.d.ts +24 -0
  106. package/dist/types/src/components/CloudTAK/util/FeatureIcon.vue.d.ts +23 -0
  107. package/dist/types/src/components/CloudTAK/util/FeatureRow.vue.d.ts +81 -0
  108. package/dist/types/src/components/CloudTAK/util/FloatingAttachment.vue.d.ts +17 -0
  109. package/dist/types/src/components/CloudTAK/util/FloatingGeneric.vue.d.ts +17 -0
  110. package/dist/types/src/components/CloudTAK/util/FloatingPane.vue.d.ts +31 -0
  111. package/dist/types/src/components/CloudTAK/util/FloatingVideo.vue.d.ts +27 -0
  112. package/dist/types/src/components/CloudTAK/util/GenericChat.vue.d.ts +34 -0
  113. package/dist/types/src/components/CloudTAK/util/GenericSelect.vue.d.ts +34 -0
  114. package/dist/types/src/components/CloudTAK/util/GroupSelect.vue.d.ts +14 -0
  115. package/dist/types/src/components/CloudTAK/util/Icons.vue.d.ts +24 -0
  116. package/dist/types/src/components/CloudTAK/util/JSONModal.vue.d.ts +27 -0
  117. package/dist/types/src/components/CloudTAK/util/Keywords.vue.d.ts +10 -0
  118. package/dist/types/src/components/CloudTAK/util/LineLength.vue.d.ts +24 -0
  119. package/dist/types/src/components/CloudTAK/util/MenuTemplate.vue.d.ts +89 -0
  120. package/dist/types/src/components/CloudTAK/util/MultipleSelect.vue.d.ts +7 -0
  121. package/dist/types/src/components/CloudTAK/util/NotificationIcon.vue.d.ts +10 -0
  122. package/dist/types/src/components/CloudTAK/util/NotificationToast.vue.d.ts +13 -0
  123. package/dist/types/src/components/CloudTAK/util/PolygonArea.vue.d.ts +24 -0
  124. package/dist/types/src/components/CloudTAK/util/PropertyAttachments.vue.d.ts +14 -0
  125. package/dist/types/src/components/CloudTAK/util/PropertyBattery.vue.d.ts +13 -0
  126. package/dist/types/src/components/CloudTAK/util/PropertyBearing.vue.d.ts +58 -0
  127. package/dist/types/src/components/CloudTAK/util/PropertyCreator.vue.d.ts +7 -0
  128. package/dist/types/src/components/CloudTAK/util/PropertyDistance.vue.d.ts +54 -0
  129. package/dist/types/src/components/CloudTAK/util/PropertyElevation.vue.d.ts +32 -0
  130. package/dist/types/src/components/CloudTAK/util/PropertyEmail.vue.d.ts +13 -0
  131. package/dist/types/src/components/CloudTAK/util/PropertyGeofence.vue.d.ts +10 -0
  132. package/dist/types/src/components/CloudTAK/util/PropertyLinks.vue.d.ts +14 -0
  133. package/dist/types/src/components/CloudTAK/util/PropertyMetadata.vue.d.ts +7 -0
  134. package/dist/types/src/components/CloudTAK/util/PropertyMilSym.vue.d.ts +25 -0
  135. package/dist/types/src/components/CloudTAK/util/PropertyPhone.vue.d.ts +13 -0
  136. package/dist/types/src/components/CloudTAK/util/PropertySensor.vue.d.ts +18 -0
  137. package/dist/types/src/components/CloudTAK/util/PropertySpeed.vue.d.ts +23 -0
  138. package/dist/types/src/components/CloudTAK/util/PropertyStyle.vue.d.ts +7 -0
  139. package/dist/types/src/components/CloudTAK/util/PropertyTimes.vue.d.ts +7 -0
  140. package/dist/types/src/components/CloudTAK/util/PropertyType.vue.d.ts +27 -0
  141. package/dist/types/src/components/CloudTAK/util/SearchBox.vue.d.ts +46 -0
  142. package/dist/types/src/components/CloudTAK/util/SelectFeats.vue.d.ts +7 -0
  143. package/dist/types/src/components/CloudTAK/util/SettingsCallsign.vue.d.ts +28 -0
  144. package/dist/types/src/components/CloudTAK/util/Share.vue.d.ts +14 -0
  145. package/dist/types/src/components/CloudTAK/util/ShareToMission.vue.d.ts +53 -0
  146. package/dist/types/src/components/CloudTAK/util/ShareToPackage.vue.d.ts +62 -0
  147. package/dist/types/src/components/CloudTAK/util/SlideDownHeader.vue.d.ts +41 -0
  148. package/dist/types/src/components/CloudTAK/util/StandardItem.vue.d.ts +18 -0
  149. package/dist/types/src/components/CloudTAK/util/Subscriptions.vue.d.ts +7 -0
  150. package/dist/types/src/components/CloudTAK/util/TagEntry.vue.d.ts +51 -0
  151. package/dist/types/src/components/CloudTAK/util/UserClientSelect.vue.d.ts +16 -0
  152. package/dist/types/src/components/CloudTAK/util/VideoLeaseSourceType.vue.d.ts +6 -0
  153. package/dist/types/src/components/CloudTAK/util/WarnChannels.vue.d.ts +7 -0
  154. package/dist/types/src/components/CloudTAK/util/WarnConfiguration.vue.d.ts +7 -0
  155. package/dist/types/src/components/Configure.vue.d.ts +3 -0
  156. package/dist/types/src/components/ETL/Connection/AgencyBadge.vue.d.ts +8 -0
  157. package/dist/types/src/components/ETL/Connection/CertificateP12.vue.d.ts +13 -0
  158. package/dist/types/src/components/ETL/Connection/StatusDot.vue.d.ts +13 -0
  159. package/dist/types/src/components/ETL/Styling/Layer.vue.d.ts +24 -0
  160. package/dist/types/src/components/Login.vue.d.ts +7 -0
  161. package/dist/types/src/components/util/GroupSelect.vue.d.ts +14 -0
  162. package/dist/types/src/components/util/IconSelect.vue.d.ts +29 -0
  163. package/dist/types/src/components/util/StatusDot.vue.d.ts +8 -0
  164. package/dist/types/src/components/util/Upload.vue.d.ts +46 -0
  165. package/dist/types/src/components/util/UploadLogo.vue.d.ts +14 -0
  166. package/dist/types/src/router.d.ts +3 -0
  167. package/dist/types/src/stores/float.d.ts +42 -0
  168. package/dist/types/src/stores/map.d.ts +11 -2
  169. package/dist/types/src/stores/modules/draw.d.ts +26 -0
  170. package/dist/types/src/stores/modules/menu.d.ts +7 -2
  171. package/dist/types/src/timediff.d.ts +1 -0
  172. package/dist/types/src/types.d.ts +14 -3
  173. package/dist/types/src/workers/atlas-breadcrumb.d.ts +65 -0
  174. package/dist/types/src/workers/atlas-connection.d.ts +2 -0
  175. package/dist/types/src/workers/atlas-database.d.ts +3 -0
  176. package/dist/types/src/workers/atlas-profile.d.ts +21 -16
  177. package/dist/types/src/workers/atlas.d.ts +1 -3
  178. package/package.json +27 -16
  179. package/dist/types/src/workers/atlas-team.d.ts +0 -13
@@ -1,11 +1,14 @@
1
1
  import type { App } from 'vue';
2
+ import type { Component } from 'vue';
2
3
  import type { Router, RouteRecordRaw } from 'vue-router';
3
4
  import type { Pinia } from 'pinia';
5
+ import { type PaneConfig } from './src/stores/float.ts';
4
6
  import type { MenuItemConfig } from './src/stores/modules/menu.ts';
5
7
  import { type DBFeature } from './src/base/database.ts';
6
8
  import { type Observable } from 'rxjs';
7
9
  import mapgl from 'maplibre-gl';
8
10
  export type { MenuItemConfig };
11
+ export type { DBFeature };
9
12
  export interface PluginInstance {
10
13
  /**
11
14
  * Called after `install` if the server has the plugin enabled by default
@@ -96,4 +99,58 @@ export declare class PluginAPI {
96
99
  filter?: (feature: DBFeature) => boolean;
97
100
  }) => Observable<DBFeature[]>;
98
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
+ };
99
156
  }
@@ -1,5 +1,6 @@
1
1
  import type { DBChatroomChat } from './database.ts';
2
2
  import type Atlas from '../workers/atlas.ts';
3
+ import type { Remote } from 'comlink';
3
4
  export default class ChatroomChats {
4
5
  chatroom: string;
5
6
  constructor(chatroom: string);
@@ -7,10 +8,11 @@ export default class ChatroomChats {
7
8
  list(opts?: {
8
9
  refresh?: boolean;
9
10
  }): Promise<Array<DBChatroomChat>>;
11
+ markRead(): Promise<void>;
10
12
  send(message: string, sender: {
11
13
  uid: string;
12
14
  callsign: string;
13
- }, worker: Atlas, recipient?: {
15
+ }, worker: Remote<Atlas>, recipient?: {
14
16
  uid: string;
15
17
  callsign: string;
16
18
  }): Promise<void>;
@@ -1,5 +1,6 @@
1
1
  import type { DBChatroom } from './database.ts';
2
2
  import ChatroomChats from './chatroom-chats.ts';
3
+ import { type Observable } from 'dexie';
3
4
  import type { ProfileChatroomList, ProfileChatList } from '../types.ts';
4
5
  /**
5
6
  * High Level Wrapper around the Profile Chatroom API
@@ -10,6 +11,7 @@ export default class Chatroom {
10
11
  name: string;
11
12
  chats: ChatroomChats;
12
13
  constructor(name: string);
14
+ static liveUnreadCount(): Observable<number>;
13
15
  /**
14
16
  * Return a Chatroom instance if one already exists in the local DB,
15
17
  */
@@ -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
+ }
@@ -1,5 +1,3 @@
1
- import type { Remote } from 'comlink';
2
- import type Atlas from '../workers/atlas.ts';
3
1
  import type { Feature, Subscription } from '../types.ts';
4
2
  import type { BBox as GeoJSONBBox, Feature as GeoJSONFeature, Geometry as GeoJSONGeometry } from 'geojson';
5
3
  export interface Origin {
@@ -17,20 +15,23 @@ export default class COT {
17
15
  _path: string;
18
16
  _properties: Feature["properties"];
19
17
  _geometry: Feature["geometry"];
20
- _remote: BroadcastChannel | null;
21
- _atlas: Atlas | Remote<Atlas>;
18
+ _remote: boolean;
19
+ _liveQuerySubscription: {
20
+ unsubscribe: () => void;
21
+ } | null;
22
+ static selfUid: string | null;
22
23
  _username?: string;
23
24
  origin: Origin;
24
- static load(atlas: Atlas, feat: Feature, origin?: Origin, opts?: {
25
+ static load(feat: Feature, origin?: Origin, opts?: {
25
26
  skipSave?: boolean;
26
27
  remote?: boolean;
27
28
  }): Promise<COT>;
28
- constructor(atlas: Atlas | Remote<Atlas>, feat: Feature, origin?: Origin, opts?: {
29
+ constructor(feat: Feature, origin?: Origin, opts?: {
29
30
  skipSave?: boolean;
30
31
  remote?: boolean;
31
32
  });
32
33
  /**
33
- * Begin listening for remote updates
34
+ * Begin listening for remote updates via a DexieDB live query
34
35
  * This is a seperate function due to the issues outlined in: https://stackoverflow.com/q/70184129
35
36
  */
36
37
  reactivity(): void;
@@ -1,5 +1,5 @@
1
1
  import Dexie, { type EntityTable } from 'dexie';
2
- import type { Feature, Mission, MissionRole } from '../types.ts';
2
+ import type { Feature, GroupChannel, Mission, MissionRole, MissionChange, MissionLog, Contact, Server } from '../types.ts';
3
3
  export interface DBIcon {
4
4
  name: string;
5
5
  }
@@ -9,11 +9,21 @@ export interface DBFeature {
9
9
  properties: Feature["properties"];
10
10
  geometry: Feature["geometry"];
11
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
+ }
12
21
  export interface DBChatroom {
13
22
  id: string;
14
23
  name: string;
15
24
  created: string;
16
25
  updated: string;
26
+ unread?: number;
17
27
  last_read: string | null;
18
28
  }
19
29
  export interface DBChatroomChat {
@@ -23,6 +33,7 @@ export interface DBChatroomChat {
23
33
  sender_uid: string;
24
34
  message: string;
25
35
  created: string;
36
+ unread?: boolean;
26
37
  }
27
38
  export interface DBIconset {
28
39
  uid: string;
@@ -78,6 +89,34 @@ export interface DBSubscriptionFeature {
78
89
  properties: Feature["properties"];
79
90
  geometry: Feature["geometry"];
80
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
+ }
81
120
  export interface DBSubscription {
82
121
  guid: string;
83
122
  name: string;
@@ -87,29 +126,67 @@ export interface DBSubscription {
87
126
  dirty: boolean;
88
127
  subscribed: boolean;
89
128
  }
90
- export interface DBSubscriptionLog {
129
+ export interface DBSubscriptionLog extends MissionLog {
130
+ mission: string;
131
+ read: boolean;
132
+ }
133
+ export interface DBMissionTemplate {
91
134
  id: string;
92
- dtg?: string;
93
- missionNames: string[];
135
+ name: string;
136
+ icon: string;
137
+ description: string;
94
138
  created: string;
95
- servertime: string;
96
- mission: string;
97
- content: string;
98
- creatorUid: string;
99
- contentHashes: unknown[];
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;
100
150
  keywords: string[];
101
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
+ }
102
167
  export type DatabaseType = Dexie & {
103
168
  icon: EntityTable<DBIcon, 'name'>;
104
169
  iconset: EntityTable<DBIconset, 'uid'>;
170
+ group: EntityTable<GroupChannel, 'name'>;
105
171
  video: EntityTable<DBVideo, 'id'>;
106
172
  filter: EntityTable<DBFilter, 'id'>;
107
173
  feature: EntityTable<DBFeature, 'id'>;
174
+ breadcrumb: EntityTable<DBBreadcrumb, 'id'>;
108
175
  chatroom: EntityTable<DBChatroom, 'id'>;
109
176
  chatroom_chats: EntityTable<DBChatroomChat, 'id'>;
110
177
  notification: EntityTable<DBNotification, 'id'>;
111
178
  subscription: EntityTable<DBSubscription, 'guid'>;
179
+ subscription_contents: EntityTable<DBSubscriptionContent, 'uid'>;
180
+ subscription_changes: EntityTable<DBSubscriptionChanges, 'id'>;
181
+ server: EntityTable<DBServer, '_id'>;
112
182
  subscription_log: EntityTable<DBSubscriptionLog, 'id'>;
113
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'>;
114
191
  };
115
192
  export declare const db: DatabaseType;
@@ -12,11 +12,13 @@ export declare enum WorkerMessageType {
12
12
  Feature_Archived_Removed = "cloudtak:feature:archived:removed",
13
13
  Channels_None = "channels:none",
14
14
  Channels_List = "channels:list",
15
- Contact_Change = "contact:change",
16
15
  Connection_Open = "connection:open",
17
16
  Connection_Close = "connection:close",
18
17
  Mission_Change_Feature = "mission:change:feature",
19
- Mission_Invite = "mission:invite"
18
+ Mission_Invite = "mission:invite",
19
+ Channel_Change = "channel:change",
20
+ Feature_Update = "cloudtak:feature:update",
21
+ Profile_Update = "cloudtak:profile:update"
20
22
  }
21
23
  export type WorkerMessage = {
22
24
  type: WorkerMessageType;
@@ -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
+ }
@@ -1,11 +1,9 @@
1
1
  import COT from '../base/cot.ts';
2
- import type Atlas from '../workers/atlas.ts';
3
- import type { Remote, TransferHandler } from 'comlink';
2
+ import type { TransferHandler } from 'comlink';
4
3
  import type { Feature } from '../types.ts';
5
4
  export declare class CloudTAKTransferHandler {
6
- atlas: Atlas | Remote<Atlas>;
7
5
  remote: boolean;
8
- constructor(atlas: Atlas | Remote<Atlas>, transferHandlers: Map<string, TransferHandler<unknown, unknown>>, remote: boolean);
6
+ constructor(transferHandlers: Map<string, TransferHandler<unknown, unknown>>, remote: boolean);
9
7
  cots: TransferHandler<Set<COT>, Array<Feature>>;
10
8
  cot: TransferHandler<COT, Feature>;
11
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
+ }
@@ -0,0 +1,20 @@
1
+ import type { DBMissionTemplate } from './database.ts';
2
+ import MissionTemplateLogs from './mission-template-logs.ts';
3
+ import type { MissionTemplateList } from '../types.ts';
4
+ export default class MissionTemplate {
5
+ id: string;
6
+ logs: MissionTemplateLogs;
7
+ name: string;
8
+ description: string;
9
+ icon: string;
10
+ created: string;
11
+ updated: string;
12
+ constructor(template: DBMissionTemplate);
13
+ static from(id: string): Promise<MissionTemplate | undefined>;
14
+ static load(id: string, opts?: {
15
+ refresh?: boolean;
16
+ }): Promise<MissionTemplate>;
17
+ refresh(): Promise<void>;
18
+ static list(filter?: string): Promise<DBMissionTemplate[]>;
19
+ static sync(): Promise<MissionTemplateList>;
20
+ }
@@ -0,0 +1,20 @@
1
+ import type { Profile } from '../types.ts';
2
+ import { type Subscription } from 'dexie';
3
+ export default class ProfileConfig<K extends keyof Profile = keyof Profile> {
4
+ key: K;
5
+ value: Profile[K];
6
+ _sub?: Subscription;
7
+ constructor(key: K, value: Profile[K]);
8
+ subscribe(): void;
9
+ subscribed(): boolean;
10
+ destroy(): void;
11
+ static get<K extends keyof Profile>(key: K): Promise<ProfileConfig<K> | undefined>;
12
+ static fetch(token?: string): Promise<Profile>;
13
+ commit(value: Profile[K]): Promise<void>;
14
+ static delete(key: string): Promise<void>;
15
+ static sync(opts?: {
16
+ refresh?: boolean;
17
+ token?: string;
18
+ }): Promise<void>;
19
+ static saveAll(profile: Profile): Promise<void>;
20
+ }
@@ -0,0 +1,9 @@
1
+ import { type Observable } from 'dexie';
2
+ import type { Server, Server_Update } from '../types.ts';
3
+ export default class ServerManager {
4
+ static live(): Observable<Server | undefined>;
5
+ static get(token?: string): Promise<Server>;
6
+ static sync(token?: string): Promise<Server>;
7
+ static update(server: Server_Update, token?: string): Promise<Server>;
8
+ static create(server: Server_Update, token?: string): Promise<Server>;
9
+ }
@@ -0,0 +1,18 @@
1
+ import type { MissionChange } from '../types.ts';
2
+ /**
3
+ * High Level Wrapper around the Data/Mission Sync API
4
+ */
5
+ export default class SubscriptionChanges {
6
+ guid: string;
7
+ token: string;
8
+ missiontoken?: string;
9
+ constructor(guid: string, opts: {
10
+ token: string;
11
+ missiontoken?: string;
12
+ });
13
+ headers(): Record<string, string>;
14
+ refresh(): Promise<void>;
15
+ list(opts?: {
16
+ refresh?: boolean;
17
+ }): Promise<Array<MissionChange>>;
18
+ }
@@ -0,0 +1,23 @@
1
+ import type { DBSubscriptionChat } from './database.ts';
2
+ import { type Observable } from 'dexie';
3
+ import type Atlas from '../workers/atlas.ts';
4
+ import type { Remote } from 'comlink';
5
+ /**
6
+ * High Level Wrapper around Mission Chat messages stored in the local Dexie DB.
7
+ *
8
+ * Chat messages are CoT features with type `b-t-f` that arrive via the mission
9
+ * feature endpoint. They are stored separately from map features so they can be
10
+ * queried and displayed as a chronological chat thread.
11
+ */
12
+ export default class SubscriptionChat {
13
+ guid: string;
14
+ name: string;
15
+ constructor(guid: string, name: string);
16
+ liveUnreadCount(): Observable<number>;
17
+ list(): Promise<Array<DBSubscriptionChat>>;
18
+ read(): Promise<void>;
19
+ send(message: string, sender: {
20
+ uid: string;
21
+ callsign: string;
22
+ }, worker: Remote<Atlas>): Promise<void>;
23
+ }
@@ -0,0 +1,27 @@
1
+ import type { DBSubscriptionContent } from './database.ts';
2
+ import type { Mission } from '../types.ts';
3
+ /**
4
+ * High Level Wrapper around Mission Contents (file attachments)
5
+ */
6
+ export default class SubscriptionContents {
7
+ guid: string;
8
+ token: string;
9
+ missiontoken?: string;
10
+ constructor(guid: string, opts: {
11
+ token: string;
12
+ missiontoken?: string;
13
+ });
14
+ headers(): Record<string, string>;
15
+ /**
16
+ * Populate the subscription_contents table from the Mission's contents field
17
+ */
18
+ refresh(contents: Mission['contents']): Promise<void>;
19
+ /**
20
+ * Delete/detach a content entry from the mission and remove it from the local database
21
+ */
22
+ delete(hash: string): Promise<void>;
23
+ list(opts?: {
24
+ refresh?: boolean;
25
+ contents?: Mission['contents'];
26
+ }): Promise<Array<DBSubscriptionContent>>;
27
+ }
@@ -17,7 +17,7 @@ export default class SubscriptionFeature {
17
17
  headers(): Record<string, string>;
18
18
  refresh(): Promise<void>;
19
19
  list(opts?: {
20
- refresh: false;
20
+ refresh?: boolean;
21
21
  }): Promise<Array<Feature>>;
22
22
  collection(raw?: boolean): Promise<FeatureCollection>;
23
23
  bounds(): Promise<BBox>;
@@ -1,3 +1,4 @@
1
+ import type { DBSubscriptionLog } from './database.ts';
1
2
  import type { MissionLog } from '../types.ts';
2
3
  /**
3
4
  * High Level Wrapper around the Data/Mission Sync API
@@ -14,8 +15,9 @@ export default class SubscriptionLog {
14
15
  refresh(): Promise<void>;
15
16
  list(opts?: {
16
17
  filter?: string;
17
- refresh: false;
18
- }): Promise<Array<MissionLog>>;
18
+ refresh?: boolean;
19
+ }): Promise<Array<DBSubscriptionLog>>;
20
+ read(): Promise<void>;
19
21
  create(body: {
20
22
  dtg?: string;
21
23
  content: string;
@@ -1,6 +1,9 @@
1
1
  import SubscriptionLog from './subscription-log.ts';
2
+ import SubscriptionChanges from './subscription-changes.ts';
3
+ import SubscriptionContents from './subscription-contents.ts';
2
4
  import SubscriptionFeature from './subscription-feature.ts';
3
- import type { Mission, MissionRole, MissionList, MissionLayer, MissionChanges, MissionLayerList, MissionLayer_Create, MissionLayer_Update, MissionSubscriptions } from '../types.ts';
5
+ import SubscriptionChat from './subscription-chat.ts';
6
+ import type { Mission, MissionRole, MissionList, MissionLayer, MissionLayerList, MissionLayer_Create, MissionLayer_Update, MissionSubscriptions, MissionInvite } from '../types.ts';
4
7
  export declare enum SubscriptionEventType {
5
8
  CREATE = "subscription::create",
6
9
  UPDATE = "subscription::update",
@@ -32,11 +35,15 @@ export default class Subscription {
32
35
  meta: Mission;
33
36
  role: MissionRole;
34
37
  log: SubscriptionLog;
38
+ change: SubscriptionChanges;
39
+ contents: SubscriptionContents;
35
40
  feature: SubscriptionFeature;
41
+ chat: SubscriptionChat;
36
42
  token: string;
37
43
  missiontoken?: string;
38
44
  dirty: boolean;
39
45
  subscribed: boolean;
46
+ templateid: string | null;
40
47
  _sync: BroadcastChannel;
41
48
  constructor(mission: Mission, role: MissionRole, opts: {
42
49
  subscribed: boolean;
@@ -84,7 +91,7 @@ export default class Subscription {
84
91
  refresh(opts?: {
85
92
  refreshMission?: boolean;
86
93
  }): Promise<void>;
87
- fetch(): Promise<void>;
94
+ fetch(): Promise<Mission>;
88
95
  /**
89
96
  * List all locally stored missions, with optional filtering
90
97
  *
@@ -106,8 +113,14 @@ export default class Subscription {
106
113
  defaultRole?: boolean;
107
114
  }): Promise<MissionList>;
108
115
  static headers(token?: string): Record<string, string>;
116
+ invite(invitee: string, role?: string): Promise<void>;
117
+ invites(): Promise<MissionInvite[]>;
118
+ deleteInvite(invite: {
119
+ type: string;
120
+ invitee: string;
121
+ }): Promise<void>;
122
+ removeUser(uid: string): Promise<void>;
109
123
  subscriptions(): Promise<MissionSubscriptions>;
110
- changes(): Promise<MissionChanges>;
111
124
  layerList(): Promise<MissionLayerList>;
112
125
  layerUpdate(guid: string, layerid: string, layer: MissionLayer_Update): Promise<MissionLayer>;
113
126
  layerCreate(layer: MissionLayer_Create): Promise<MissionLayer>;
@@ -0,0 +1,9 @@
1
+ export interface Validator {
2
+ (text: string): string;
3
+ }
4
+ export declare function validateJSON(text: string): string;
5
+ export declare function validateTextNotEmpty(text: string): string;
6
+ export declare function validateURL(text: string, opts?: {
7
+ protocols?: string[];
8
+ }): string;
9
+ export declare function validateLatLng(text: string): string;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ cotId: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ close: () => any;
6
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
7
+ onClose?: (() => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
+ close: (...args: any[]) => void;
3
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
+ onClose?: ((...args: any[]) => any) | undefined;
5
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;