@tak-ps/node-cot 12.28.0 → 12.30.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.
@@ -36,8 +36,14 @@ export const TogAttributes = Type.Object({
36
36
  })
37
37
 
38
38
  export const LinkAttributes = Type.Object({
39
- // Polygon/LineString
39
+ // Common to all Link Types
40
+ uid: Type.Optional(Type.String()),
41
+ relation: Type.Optional(Type.String()),
42
+
43
+ // Polgon/Linestring or Author
40
44
  type: Type.Optional(Type.String()),
45
+
46
+ // Polygon/LineString
41
47
  point: Type.Optional(Type.String()),
42
48
 
43
49
  // URL Style Links
@@ -45,11 +51,7 @@ export const LinkAttributes = Type.Object({
45
51
  mime: Type.Optional(Type.String()),
46
52
  remarks: Type.Optional(Type.String()),
47
53
 
48
- // Common to all Link Types
49
- uid: Type.Optional(Type.String()),
50
- relation: Type.Optional(Type.String()),
51
-
52
- // Seen on QuickPics
54
+ // Author Details
53
55
  production_time: Type.Optional(Type.String()),
54
56
  parent_callsign: Type.Optional(Type.String())
55
57
  })
@@ -304,6 +306,22 @@ export const Geofence = Type.Object({
304
306
  _attributes: GeofenceAttributes
305
307
  })
306
308
 
309
+ export const MilsymUnitModifier = Type.Object({
310
+ _attributes: Type.Object({
311
+ code: Type.String()
312
+ }),
313
+ _text: Type.Optional(Type.String())
314
+ });
315
+
316
+ export const MilsymAttributes = Type.Object({
317
+ id: Type.String(),
318
+ });
319
+
320
+ export const Milsym = Type.Object({
321
+ _attributes: MilsymAttributes,
322
+ unitmodifier: Type.Optional(Type.Union([MilsymUnitModifier, Type.Array(MilsymUnitModifier)]))
323
+ })
324
+
307
325
  export const Chat = Type.Object({
308
326
  _attributes: Type.Object({
309
327
  parent: Type.Optional(Type.String()),
@@ -378,6 +396,17 @@ export const Uid = Type.Object({
378
396
  })
379
397
  })
380
398
 
399
+ export const CreatorAttributes = Type.Object({
400
+ uid: Type.String(),
401
+ callsign: Type.String(),
402
+ time: Type.String(),
403
+ type: Type.String()
404
+ })
405
+
406
+ export const Creator = Type.Object({
407
+ _attributes: CreatorAttributes
408
+ })
409
+
381
410
  export const ContactAttributes = Type.Object({
382
411
  phone: Type.Optional(Type.String()),
383
412
  name: Type.Optional(Type.String()),
@@ -500,10 +529,12 @@ export const Detail = Type.Object({
500
529
  '__chat': Type.Optional(Chat),
501
530
  '__video': Type.Optional(Video),
502
531
  '__geofence': Type.Optional(Geofence),
532
+ '__milsym': Type.Optional(Milsym),
503
533
  '__forcedelete': Type.Optional(ForceDelete),
504
534
  '_flow-tags_': Type.Optional(FlowTags),
505
535
  uid: Type.Optional(Uid),
506
536
  status: Type.Optional(Status),
537
+ creator: Type.Optional(Creator),
507
538
  fileshare: Type.Optional(FileShare),
508
539
  ackrequest: Type.Optional(ACKRequest),
509
540
  remarks: Type.Optional(Remarks),
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "@tak-ps/node-cot",
3
3
  "type": "module",
4
- "version": "12.28.0",
4
+ "version": "12.30.0",
5
5
  "description": "Lightweight JavaScript library for parsing and manipulating TAK messages",
6
6
  "author": "Nick Ingalls <nick@ingalls.ca>",
7
7
  "main": "dist/index.js",
8
8
  "types": "index.ts",
9
9
  "scripts": {
10
- "test": "ts-node-test test/",
10
+ "test": "c8 --reporter=lcov ts-node-test test/",
11
11
  "lint": "eslint *.ts lib/ test/",
12
12
  "doc": "typedoc index.ts",
13
13
  "build": "tsc --build && cp package.json dist/ && cp ./lib/types/*.xml ./dist/lib/types/ && mkdir -p ./dist/lib/proto/ && cp lib/proto/* ./dist/lib/proto/",
14
14
  "pretest": "npm run lint"
15
15
  },
16
+ "engines": {
17
+ "node": ">= 22"
18
+ },
16
19
  "dependencies": {
17
20
  "@openaddresses/batch-error": "^2.4.0",
18
21
  "@sinclair/typebox": "^0.34.0",
@@ -35,6 +38,7 @@
35
38
  "devDependencies": {
36
39
  "@types/node": "^22.0.0",
37
40
  "@types/tape": "^5.6.0",
41
+ "c8": "^10.1.3",
38
42
  "eslint": "^9.0.0",
39
43
  "tape": "^5.6.1",
40
44
  "ts-node": "^10.9.1",