@awarevue/api-types 2.0.142 → 2.0.143

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.
@@ -514,7 +514,12 @@ export declare const sPushTrackableUpdate: z.ZodObject<{
514
514
  timestamp: z.ZodNumber;
515
515
  objectId: z.ZodString;
516
516
  objectName: z.ZodOptional<z.ZodString>;
517
- objectKind: z.ZodOptional<z.ZodString>;
517
+ objectKind: z.ZodOptional<z.ZodEnum<{
518
+ vessel: "vessel";
519
+ "base-station": "base-station";
520
+ "aid-to-navigation": "aid-to-navigation";
521
+ "sar-aircraft": "sar-aircraft";
522
+ }>>;
518
523
  metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
519
524
  longitude: z.ZodOptional<z.ZodNumber>;
520
525
  latitude: z.ZodOptional<z.ZodNumber>;
@@ -1,27 +1,52 @@
1
1
  import { z } from 'zod';
2
2
  export declare const sTrackableProfileSnapshot: z.ZodObject<{
3
3
  objectName: z.ZodOptional<z.ZodString>;
4
- objectKind: z.ZodOptional<z.ZodString>;
4
+ objectKind: z.ZodOptional<z.ZodEnum<{
5
+ vessel: "vessel";
6
+ "base-station": "base-station";
7
+ "aid-to-navigation": "aid-to-navigation";
8
+ "sar-aircraft": "sar-aircraft";
9
+ }>>;
5
10
  }, z.core.$strip>;
6
11
  export declare const sSetTrackableFavoriteRequest: z.ZodObject<{
7
12
  objectName: z.ZodOptional<z.ZodString>;
8
- objectKind: z.ZodOptional<z.ZodString>;
13
+ objectKind: z.ZodOptional<z.ZodEnum<{
14
+ vessel: "vessel";
15
+ "base-station": "base-station";
16
+ "aid-to-navigation": "aid-to-navigation";
17
+ "sar-aircraft": "sar-aircraft";
18
+ }>>;
9
19
  }, z.core.$strip>;
10
20
  export type SetTrackableFavoriteRequest = z.infer<typeof sSetTrackableFavoriteRequest>;
11
21
  export declare const sCreateTrackableRequest: z.ZodObject<{
12
22
  objectName: z.ZodOptional<z.ZodString>;
13
- objectKind: z.ZodOptional<z.ZodString>;
23
+ objectKind: z.ZodOptional<z.ZodEnum<{
24
+ vessel: "vessel";
25
+ "base-station": "base-station";
26
+ "aid-to-navigation": "aid-to-navigation";
27
+ "sar-aircraft": "sar-aircraft";
28
+ }>>;
14
29
  objectId: z.ZodString;
15
30
  }, z.core.$strip>;
16
31
  export type CreateTrackableRequest = z.infer<typeof sCreateTrackableRequest>;
17
32
  export declare const sUpdateTrackableRequest: z.ZodObject<{
18
33
  objectName: z.ZodOptional<z.ZodString>;
19
- objectKind: z.ZodOptional<z.ZodString>;
34
+ objectKind: z.ZodOptional<z.ZodEnum<{
35
+ vessel: "vessel";
36
+ "base-station": "base-station";
37
+ "aid-to-navigation": "aid-to-navigation";
38
+ "sar-aircraft": "sar-aircraft";
39
+ }>>;
20
40
  }, z.core.$strip>;
21
41
  export type UpdateTrackableRequest = z.infer<typeof sUpdateTrackableRequest>;
22
42
  export declare const sAttachTrackableImageRequest: z.ZodObject<{
23
43
  objectName: z.ZodOptional<z.ZodString>;
24
- objectKind: z.ZodOptional<z.ZodString>;
44
+ objectKind: z.ZodOptional<z.ZodEnum<{
45
+ vessel: "vessel";
46
+ "base-station": "base-station";
47
+ "aid-to-navigation": "aid-to-navigation";
48
+ "sar-aircraft": "sar-aircraft";
49
+ }>>;
25
50
  imageId: z.ZodUUID;
26
51
  reviewed: z.ZodOptional<z.ZodBoolean>;
27
52
  }, z.core.$strip>;
@@ -33,7 +58,12 @@ export type SetTrackableImageReviewedRequest = z.infer<typeof sSetTrackableImage
33
58
  export declare const sCreateTrackableRetentionPolicyRequest: z.ZodObject<{
34
59
  ttlSeconds: z.ZodNumber;
35
60
  outOfDateSeconds: z.ZodNumber;
36
- objectKind: z.ZodString;
61
+ objectKind: z.ZodEnum<{
62
+ vessel: "vessel";
63
+ "base-station": "base-station";
64
+ "aid-to-navigation": "aid-to-navigation";
65
+ "sar-aircraft": "sar-aircraft";
66
+ }>;
37
67
  }, z.core.$strip>;
38
68
  export type CreateTrackableRetentionPolicyRequest = z.infer<typeof sCreateTrackableRetentionPolicyRequest>;
39
69
  export declare const sUpdateTrackableRetentionPolicyRequest: z.ZodObject<{
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sUpdateTrackableRetentionPolicyRequest = exports.sCreateTrackableRetentionPolicyRequest = exports.sSetTrackableImageReviewedRequest = exports.sAttachTrackableImageRequest = exports.sUpdateTrackableRequest = exports.sCreateTrackableRequest = exports.sSetTrackableFavoriteRequest = exports.sTrackableProfileSnapshot = void 0;
4
4
  const zod_1 = require("zod");
5
+ const trackable_1 = require("../../objects/trackable");
5
6
  exports.sTrackableProfileSnapshot = zod_1.z.object({
6
7
  objectName: zod_1.z.string().trim().max(255).optional(),
7
- objectKind: zod_1.z.string().trim().max(64).optional(),
8
+ objectKind: trackable_1.sTrackableKind.optional(),
8
9
  });
9
10
  exports.sSetTrackableFavoriteRequest = exports.sTrackableProfileSnapshot;
10
11
  exports.sCreateTrackableRequest = exports.sTrackableProfileSnapshot.extend({
@@ -29,7 +30,7 @@ const sTrackableRetentionValues = zod_1.z.object({
29
30
  });
30
31
  // Adds a policy for a specific kind (the default policy always exists)
31
32
  exports.sCreateTrackableRetentionPolicyRequest = sTrackableRetentionValues
32
- .extend({ objectKind: zod_1.z.string().trim().min(1) })
33
+ .extend({ objectKind: trackable_1.sTrackableKind })
33
34
  .refine(refineRetention, retentionRefineMessage);
34
35
  // Replaces both values, so the ttl/out-of-date relationship can be validated
35
36
  // here rather than against stored values
@@ -4,7 +4,12 @@ export declare const sTrackableUpdate: z.ZodObject<{
4
4
  timestamp: z.ZodNumber;
5
5
  objectId: z.ZodString;
6
6
  objectName: z.ZodOptional<z.ZodString>;
7
- objectKind: z.ZodOptional<z.ZodString>;
7
+ objectKind: z.ZodOptional<z.ZodEnum<{
8
+ vessel: "vessel";
9
+ "base-station": "base-station";
10
+ "aid-to-navigation": "aid-to-navigation";
11
+ "sar-aircraft": "sar-aircraft";
12
+ }>>;
8
13
  metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
9
14
  longitude: z.ZodOptional<z.ZodNumber>;
10
15
  latitude: z.ZodOptional<z.ZodNumber>;
@@ -26,7 +31,12 @@ export declare const sTrackableUpdatePayload: z.ZodObject<{
26
31
  timestamp: z.ZodNumber;
27
32
  objectId: z.ZodString;
28
33
  objectName: z.ZodOptional<z.ZodString>;
29
- objectKind: z.ZodOptional<z.ZodString>;
34
+ objectKind: z.ZodOptional<z.ZodEnum<{
35
+ vessel: "vessel";
36
+ "base-station": "base-station";
37
+ "aid-to-navigation": "aid-to-navigation";
38
+ "sar-aircraft": "sar-aircraft";
39
+ }>>;
30
40
  metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
31
41
  longitude: z.ZodOptional<z.ZodNumber>;
32
42
  latitude: z.ZodOptional<z.ZodNumber>;
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isTrackableMessage = exports.sTrackableRemovePayload = exports.sUnsubscribeTrackablePayload = exports.sSubscribeTrackablePayload = exports.sTrackableUpdatePayload = exports.sTrackableUpdate = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const primitives_1 = require("../../primitives");
6
+ const trackable_1 = require("../../objects/trackable");
6
7
  exports.sTrackableUpdate = zod_1.z.object({
7
8
  timestamp: zod_1.z.number(),
8
9
  objectId: zod_1.z.string().nonempty(),
9
10
  objectName: zod_1.z.string().optional(),
10
- objectKind: primitives_1.sWorldObjectId.optional(),
11
+ objectKind: trackable_1.sTrackableKind.optional(),
11
12
  metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
12
13
  longitude: zod_1.z.number().min(-180).max(180).optional(),
13
14
  latitude: zod_1.z.number().min(-90).max(90).optional(),
@@ -1,7 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  export declare const sTrackableRetentionPolicyDto: z.ZodObject<{
3
3
  id: z.ZodUUID;
4
- objectKind: z.ZodNullable<z.ZodString>;
4
+ objectKind: z.ZodNullable<z.ZodEnum<{
5
+ vessel: "vessel";
6
+ "base-station": "base-station";
7
+ "aid-to-navigation": "aid-to-navigation";
8
+ "sar-aircraft": "sar-aircraft";
9
+ }>>;
5
10
  ttlSeconds: z.ZodNumber;
6
11
  outOfDateSeconds: z.ZodNumber;
7
12
  createdOn: z.ZodString;
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sTrackableRetentionPolicyDto = void 0;
4
4
  const zod_1 = require("zod");
5
+ const trackable_1 = require("./trackable");
5
6
  exports.sTrackableRetentionPolicyDto = zod_1.z.object({
6
7
  id: zod_1.z.uuid(),
7
- objectKind: zod_1.z.string().nullable(), // null = the default policy, used by any kind without its own entry
8
+ objectKind: trackable_1.sTrackableKind.nullable(), // null = the default policy, used by any kind without its own entry
8
9
  ttlSeconds: zod_1.z.number().int().positive(), // Remove the trackable after this long without an update
9
10
  outOfDateSeconds: zod_1.z.number().int().positive(), // Show the trackable as out of date (faded) after this long without an update
10
11
  createdOn: zod_1.z.string(),
@@ -1,4 +1,10 @@
1
1
  import { z } from 'zod';
2
+ export declare const sTrackableKind: z.ZodEnum<{
3
+ vessel: "vessel";
4
+ "base-station": "base-station";
5
+ "aid-to-navigation": "aid-to-navigation";
6
+ "sar-aircraft": "sar-aircraft";
7
+ }>;
2
8
  export declare const sTrackableImageDto: z.ZodObject<{
3
9
  imageId: z.ZodUUID;
4
10
  reviewed: z.ZodBoolean;
@@ -10,7 +16,12 @@ export type TrackableImageDto = z.infer<typeof sTrackableImageDto>;
10
16
  export declare const sTrackableProfileDto: z.ZodObject<{
11
17
  id: z.ZodString;
12
18
  name: z.ZodNullable<z.ZodString>;
13
- kind: z.ZodNullable<z.ZodString>;
19
+ kind: z.ZodNullable<z.ZodEnum<{
20
+ vessel: "vessel";
21
+ "base-station": "base-station";
22
+ "aid-to-navigation": "aid-to-navigation";
23
+ "sar-aircraft": "sar-aircraft";
24
+ }>>;
14
25
  isUserFavorite: z.ZodBoolean;
15
26
  isGlobalFavorite: z.ZodBoolean;
16
27
  images: z.ZodArray<z.ZodObject<{
@@ -1,7 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sTrackableHistoryDto = exports.sTrackableProfileDto = exports.sTrackableImageDto = void 0;
3
+ exports.sTrackableHistoryDto = exports.sTrackableProfileDto = exports.sTrackableImageDto = exports.sTrackableKind = void 0;
4
4
  const zod_1 = require("zod");
5
+ exports.sTrackableKind = zod_1.z.enum([
6
+ //AIS
7
+ 'vessel',
8
+ 'base-station',
9
+ 'aid-to-navigation',
10
+ 'sar-aircraft',
11
+ ]);
5
12
  exports.sTrackableImageDto = zod_1.z.object({
6
13
  imageId: zod_1.z.uuid(),
7
14
  reviewed: zod_1.z.boolean(),
@@ -12,7 +19,7 @@ exports.sTrackableImageDto = zod_1.z.object({
12
19
  exports.sTrackableProfileDto = zod_1.z.object({
13
20
  id: zod_1.z.string(),
14
21
  name: zod_1.z.string().nullable(),
15
- kind: zod_1.z.string().nullable(),
22
+ kind: exports.sTrackableKind.nullable(),
16
23
  isUserFavorite: zod_1.z.boolean(),
17
24
  isGlobalFavorite: zod_1.z.boolean(),
18
25
  images: zod_1.z.array(exports.sTrackableImageDto),
package/dist/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/Linc-Security-Systems/aware-essentials.git"
6
6
  },
7
- "version": "2.0.142",
7
+ "version": "2.0.143",
8
8
  "description": "Common types between backend, agent(s) and frontend(s)",
9
9
  "main": "dist/index.js",
10
10
  "types": "dist/index.d.ts",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/Linc-Security-Systems/aware-essentials.git"
6
6
  },
7
- "version": "2.0.142",
7
+ "version": "2.0.143",
8
8
  "description": "Common types between backend, agent(s) and frontend(s)",
9
9
  "main": "dist/index.js",
10
10
  "types": "dist/index.d.ts",