@awarevue/api-types 2.0.117 → 2.0.119

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.
@@ -248,6 +248,8 @@ export declare const sRunCommandRq: z.ZodObject<{
248
248
  type: z.ZodLiteral<"nvr-analytics-server">;
249
249
  }, z.core.$strip>, z.ZodObject<{
250
250
  type: z.ZodLiteral<"system">;
251
+ }, z.core.$strip>, z.ZodObject<{
252
+ type: z.ZodLiteral<"position-tracker">;
251
253
  }, z.core.$strip>], "type">>;
252
254
  command: z.ZodString;
253
255
  batchId: z.ZodOptional<z.ZodString>;
@@ -376,6 +378,8 @@ export declare const sQueryRq: z.ZodObject<{
376
378
  type: z.ZodLiteral<"nvr-analytics-server">;
377
379
  }, z.core.$strip>, z.ZodObject<{
378
380
  type: z.ZodLiteral<"system">;
381
+ }, z.core.$strip>, z.ZodObject<{
382
+ type: z.ZodLiteral<"position-tracker">;
379
383
  }, z.core.$strip>], "type">>;
380
384
  args: z.ZodUnknown;
381
385
  }, z.core.$strip>;
@@ -508,10 +512,27 @@ export declare const sPushFile: z.ZodObject<{
508
512
  type: z.ZodLiteral<"nvr-analytics-server">;
509
513
  }, z.core.$strip>, z.ZodObject<{
510
514
  type: z.ZodLiteral<"system">;
515
+ }, z.core.$strip>, z.ZodObject<{
516
+ type: z.ZodLiteral<"position-tracker">;
511
517
  }, z.core.$strip>], "type">>;
512
518
  args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
513
519
  url: z.ZodString;
514
520
  }, z.core.$strip>;
521
+ export declare const sPushTrackableUpdate: z.ZodObject<{
522
+ timestamp: z.ZodNumber;
523
+ objectId: z.ZodString;
524
+ objectName: z.ZodString;
525
+ objectKind: z.ZodNullable<z.ZodString>;
526
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
527
+ longitude: z.ZodNumber;
528
+ latitude: z.ZodNumber;
529
+ altitude: z.ZodOptional<z.ZodNumber>;
530
+ speed: z.ZodOptional<z.ZodNumber>;
531
+ heading: z.ZodOptional<z.ZodNumber>;
532
+ kind: z.ZodLiteral<"trackable-update">;
533
+ provider: z.ZodString;
534
+ foreignRef: z.ZodString;
535
+ }, z.core.$strip>;
515
536
  export declare const sPushStateUpdateRq: z.ZodObject<{
516
537
  kind: z.ZodLiteral<"state">;
517
538
  foreignRef: z.ZodString;
@@ -651,6 +672,8 @@ export declare const sGetAvailableDevicesRs: z.ZodObject<{
651
672
  type: z.ZodLiteral<"nvr-analytics-server">;
652
673
  }, z.core.$strip>, z.ZodObject<{
653
674
  type: z.ZodLiteral<"system">;
675
+ }, z.core.$strip>, z.ZodObject<{
676
+ type: z.ZodLiteral<"position-tracker">;
654
677
  }, z.core.$strip>], "type">>>;
655
678
  relations: z.ZodArray<z.ZodIntersection<z.ZodObject<{
656
679
  leftId: z.ZodString;
@@ -1853,6 +1876,7 @@ export type QueryRq = z.infer<typeof sQueryRq>;
1853
1876
  export type QueryRs = z.infer<typeof sQueryRs>;
1854
1877
  export type ProgressUpdate = z.infer<typeof sProgressUpdate>;
1855
1878
  export type PushFile = z.infer<typeof sPushFile>;
1879
+ export type PushTrackableUpdate = z.infer<typeof sPushTrackableUpdate>;
1856
1880
  export type PushStateUpdateRq = z.infer<typeof sPushStateUpdateRq>;
1857
1881
  export type PushStateUpdateRs = z.infer<typeof sPushStateUpdateRs>;
1858
1882
  export type PushEventRq = z.infer<typeof sPushEventRq>;
@@ -1907,8 +1931,9 @@ export type PayloadByKind = {
1907
1931
  'describe-object': DescribeObjectRq;
1908
1932
  'describe-object-rs': DescribeObjectRs;
1909
1933
  'error-rs': ErrorPayload;
1934
+ 'trackable-update': PushTrackableUpdate;
1910
1935
  };
1911
- export type FromAgent = ErrorPayload | RegisterRq | Unregister | ValidateProviderConfigRs | StartServiceRs | StopServiceRs | RunCommandRs | QueryRs | PushStateUpdateRq | PushEventRq | ProgressUpdate | GetAvailableDevicesRs | AccessValidateChangeRs | AccessApplyChangeRs | AccessApplyChangeProgress | DescribeObjectRs;
1936
+ export type FromAgent = ErrorPayload | RegisterRq | Unregister | ValidateProviderConfigRs | StartServiceRs | StopServiceRs | RunCommandRs | QueryRs | PushStateUpdateRq | PushTrackableUpdate | PushEventRq | ProgressUpdate | GetAvailableDevicesRs | AccessValidateChangeRs | AccessApplyChangeRs | AccessApplyChangeProgress | DescribeObjectRs;
1912
1937
  export type FromServer = ErrorPayload | RegisterRs | ValidateProviderConfigRq | StartServiceRq | StopServiceRq | RunCommandRq | QueryRq | PushFile | PushStateUpdateRs | PushEventRs | GetAvailableDevicesRq | AccessValidateChangeRq | AccessApplyChange | AccessAbortChange | DescribeObjectRq;
1913
1938
  export type AnyPayload = FromAgent | FromServer;
1914
1939
  export declare const ReplyKindByRequestKind: {
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isMessageFromAgent = exports.getAgentMessageIssues = exports.ReplyKindByRequestKind = exports.sDescribeObjectRs = exports.sDescribeObjectRq = exports.sAbortChange = exports.sApplyChangeProgress = exports.sApplyChangeRs = exports.sApplyChange = exports.sValidateChangeRs = exports.sChangeIssue = exports.sChangeIssueCode = exports.sValidateChangeRq = exports.sRefMap = exports.sDeviceMap = exports.sAccessMutation = exports.sObjectDelete = exports.sObjectMerge = exports.sExternalObjectProps = exports.sExternalZoneProps = exports.sExternalAccessRuleProps = exports.sExternalScheduleProps = exports.sExternalPersonProps = exports.sGetAvailableDevicesRs = exports.sGetAvailableDevicesRq = exports.sPushEventRs = exports.sPushEventRq = exports.sPushStateUpdateRs = exports.sPushStateUpdateRq = exports.sPushFile = exports.sProgressUpdate = exports.sQueryRs = exports.sQueryRq = exports.sRunCommandRs = exports.sRunCommandRq = exports.sStopServiceRs = exports.sStopServiceRq = exports.sStartServiceRs = exports.sStartServiceRq = exports.sValidateProviderConfigRs = exports.sConfigurationIssue = exports.sValidateProviderConfigRq = exports.sUnregister = exports.sRegisterRs = exports.sRegisterRq = exports.sErrorPayload = exports.sAgentErrorCode = exports.sResponsePayload = exports.sMessageWithPayload = exports.sMessageHeader = void 0;
3
+ exports.getAgentMessageIssues = exports.ReplyKindByRequestKind = exports.sDescribeObjectRs = exports.sDescribeObjectRq = exports.sAbortChange = exports.sApplyChangeProgress = exports.sApplyChangeRs = exports.sApplyChange = exports.sValidateChangeRs = exports.sChangeIssue = exports.sChangeIssueCode = exports.sValidateChangeRq = exports.sRefMap = exports.sDeviceMap = exports.sAccessMutation = exports.sObjectDelete = exports.sObjectMerge = exports.sExternalObjectProps = exports.sExternalZoneProps = exports.sExternalAccessRuleProps = exports.sExternalScheduleProps = exports.sExternalPersonProps = exports.sGetAvailableDevicesRs = exports.sGetAvailableDevicesRq = exports.sPushEventRs = exports.sPushEventRq = exports.sPushStateUpdateRs = exports.sPushStateUpdateRq = exports.sPushTrackableUpdate = exports.sPushFile = exports.sProgressUpdate = exports.sQueryRs = exports.sQueryRq = exports.sRunCommandRs = exports.sRunCommandRq = exports.sStopServiceRs = exports.sStopServiceRq = exports.sStartServiceRs = exports.sStartServiceRq = exports.sValidateProviderConfigRs = exports.sConfigurationIssue = exports.sValidateProviderConfigRq = exports.sUnregister = exports.sRegisterRs = exports.sRegisterRq = exports.sErrorPayload = exports.sAgentErrorCode = exports.sResponsePayload = exports.sMessageWithPayload = exports.sMessageHeader = void 0;
4
+ exports.isMessageFromAgent = void 0;
4
5
  const device_import_1 = require("../../objects/device/device-import");
5
6
  const zod_1 = require("zod");
6
7
  const rest_1 = require("../rest");
7
8
  const primitives_1 = require("../../primitives");
8
9
  const agent_metadata_1 = require("../../objects/agent-metadata");
9
10
  const objects_1 = require("../../objects");
11
+ const trackables_1 = require("../ws/trackables");
10
12
  // PROTOCOL ENVELOPE
11
13
  exports.sMessageHeader = zod_1.z.object({
12
14
  version: zod_1.z.number().describe('Protocol version'),
@@ -133,6 +135,16 @@ exports.sPushFile = zod_1.z
133
135
  url: zod_1.z.string().nonempty().describe('URL to pull the file from'),
134
136
  })
135
137
  .describe('Instruction to push a file from an agent to file relay');
138
+ exports.sPushTrackableUpdate = trackables_1.sTrackableUpdatePayload
139
+ .extend({
140
+ kind: zod_1.z.literal('trackable-update'),
141
+ provider: zod_1.z.string().nonempty().describe('Provider that sent the update'),
142
+ foreignRef: zod_1.z
143
+ .string()
144
+ .nonempty()
145
+ .describe('Foreign reference of the trackable in the source provider'),
146
+ })
147
+ .describe('Instruction to push a trackable update from an agent to server');
136
148
  // PUSH DEVICE STATE UPDATE
137
149
  exports.sPushStateUpdateRq = zod_1.z
138
150
  .object({
@@ -420,6 +432,7 @@ const fromAgentSchemaByKind = {
420
432
  'query-rs': exports.sQueryRs,
421
433
  progress: exports.sProgressUpdate,
422
434
  state: exports.sPushStateUpdateRq,
435
+ 'trackable-update': exports.sPushTrackableUpdate,
423
436
  event: exports.sPushEventRq,
424
437
  'get-available-devices-rs': exports.sGetAvailableDevicesRs,
425
438
  'validate-change-rs': exports.sValidateChangeRs,
@@ -144,6 +144,8 @@ export declare const commandSchemas: {
144
144
  type: import("zod").ZodLiteral<"nvr-analytics-server">;
145
145
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
146
146
  type: import("zod").ZodLiteral<"system">;
147
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
148
+ type: import("zod").ZodLiteral<"position-tracker">;
147
149
  }, import("zod/v4/core").$strip>], "type">>]>, import("zod").ZodTuple<[import("zod").ZodString, import("zod").ZodString], null>]>;
148
150
  message: import("zod").ZodString;
149
151
  severity: import("zod").ZodEnum<{
@@ -275,6 +277,8 @@ export declare const commandSchemas: {
275
277
  type: import("zod").ZodLiteral<"nvr-analytics-server">;
276
278
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
277
279
  type: import("zod").ZodLiteral<"system">;
280
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
281
+ type: import("zod").ZodLiteral<"position-tracker">;
278
282
  }, import("zod/v4/core").$strip>], "type">>]>, import("zod").ZodTuple<[import("zod").ZodString, import("zod").ZodString], null>]>;
279
283
  streamId: import("zod").ZodString;
280
284
  rtspUrl: import("zod").ZodString;
@@ -421,6 +425,8 @@ export declare const commandSchemas: {
421
425
  type: import("zod").ZodLiteral<"nvr-analytics-server">;
422
426
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
423
427
  type: import("zod").ZodLiteral<"system">;
428
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
429
+ type: import("zod").ZodLiteral<"position-tracker">;
424
430
  }, import("zod/v4/core").$strip>], "type">>]>, import("zod").ZodTuple<[import("zod").ZodString, import("zod").ZodString], null>]>;
425
431
  streamId: import("zod").ZodString;
426
432
  timeFrom: import("zod").ZodNumber;
@@ -553,6 +559,8 @@ export declare const commandSchemas: {
553
559
  type: import("zod").ZodLiteral<"nvr-analytics-server">;
554
560
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
555
561
  type: import("zod").ZodLiteral<"system">;
562
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
563
+ type: import("zod").ZodLiteral<"position-tracker">;
556
564
  }, import("zod/v4/core").$strip>], "type">>]>, import("zod").ZodTuple<[import("zod").ZodString, import("zod").ZodString], null>]>;
557
565
  streamId: import("zod").ZodString;
558
566
  }, import("zod/v4/core").$strip>;
@@ -676,6 +684,8 @@ export declare const commandSchemas: {
676
684
  type: import("zod").ZodLiteral<"nvr-analytics-server">;
677
685
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
678
686
  type: import("zod").ZodLiteral<"system">;
687
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
688
+ type: import("zod").ZodLiteral<"position-tracker">;
679
689
  }, import("zod/v4/core").$strip>], "type">>]>, import("zod").ZodTuple<[import("zod").ZodString, import("zod").ZodString], null>]>;
680
690
  streamId: import("zod").ZodString;
681
691
  }, import("zod/v4/core").$strip>;
@@ -799,6 +809,8 @@ export declare const commandSchemas: {
799
809
  type: import("zod").ZodLiteral<"nvr-analytics-server">;
800
810
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
801
811
  type: import("zod").ZodLiteral<"system">;
812
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
813
+ type: import("zod").ZodLiteral<"position-tracker">;
802
814
  }, import("zod/v4/core").$strip>], "type">>]>, import("zod").ZodTuple<[import("zod").ZodString, import("zod").ZodString], null>]>;
803
815
  streamId: import("zod").ZodString;
804
816
  rtspUrl: import("zod").ZodString;
@@ -925,6 +937,8 @@ export declare const commandSchemas: {
925
937
  type: import("zod").ZodLiteral<"nvr-analytics-server">;
926
938
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
927
939
  type: import("zod").ZodLiteral<"system">;
940
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
941
+ type: import("zod").ZodLiteral<"position-tracker">;
928
942
  }, import("zod/v4/core").$strip>], "type">>]>, import("zod").ZodTuple<[import("zod").ZodString, import("zod").ZodString], null>]>;
929
943
  streamId: import("zod").ZodString;
930
944
  }, import("zod/v4/core").$strip>;
@@ -118,6 +118,8 @@ export declare const sSetStreamAnalyticsCommand: z.ZodObject<{
118
118
  type: z.ZodLiteral<"nvr-analytics-server">;
119
119
  }, z.core.$strip>, z.ZodObject<{
120
120
  type: z.ZodLiteral<"system">;
121
+ }, z.core.$strip>, z.ZodObject<{
122
+ type: z.ZodLiteral<"position-tracker">;
121
123
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
122
124
  streamId: z.ZodString;
123
125
  rtspUrl: z.ZodString;
@@ -266,6 +268,8 @@ export declare const nvrAnalyticsServerCommandSchemas: {
266
268
  type: z.ZodLiteral<"nvr-analytics-server">;
267
269
  }, z.core.$strip>, z.ZodObject<{
268
270
  type: z.ZodLiteral<"system">;
271
+ }, z.core.$strip>, z.ZodObject<{
272
+ type: z.ZodLiteral<"position-tracker">;
269
273
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
270
274
  streamId: z.ZodString;
271
275
  rtspUrl: z.ZodString;
@@ -119,6 +119,8 @@ export declare const sStartExportCommand: z.ZodObject<{
119
119
  type: z.ZodLiteral<"nvr-analytics-server">;
120
120
  }, z.core.$strip>, z.ZodObject<{
121
121
  type: z.ZodLiteral<"system">;
122
+ }, z.core.$strip>, z.ZodObject<{
123
+ type: z.ZodLiteral<"position-tracker">;
122
124
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
123
125
  streamId: z.ZodString;
124
126
  timeFrom: z.ZodNumber;
@@ -256,6 +258,8 @@ export declare const nvrExporterCommandSchemas: {
256
258
  type: z.ZodLiteral<"nvr-analytics-server">;
257
259
  }, z.core.$strip>, z.ZodObject<{
258
260
  type: z.ZodLiteral<"system">;
261
+ }, z.core.$strip>, z.ZodObject<{
262
+ type: z.ZodLiteral<"position-tracker">;
259
263
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
260
264
  streamId: z.ZodString;
261
265
  timeFrom: z.ZodNumber;
@@ -118,6 +118,8 @@ export declare const sMountStreamCommand: z.ZodObject<{
118
118
  type: z.ZodLiteral<"nvr-analytics-server">;
119
119
  }, z.core.$strip>, z.ZodObject<{
120
120
  type: z.ZodLiteral<"system">;
121
+ }, z.core.$strip>, z.ZodObject<{
122
+ type: z.ZodLiteral<"position-tracker">;
121
123
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
122
124
  streamId: z.ZodString;
123
125
  rtspUrl: z.ZodString;
@@ -245,6 +247,8 @@ export declare const sUnmountStreamCommand: z.ZodObject<{
245
247
  type: z.ZodLiteral<"nvr-analytics-server">;
246
248
  }, z.core.$strip>, z.ZodObject<{
247
249
  type: z.ZodLiteral<"system">;
250
+ }, z.core.$strip>, z.ZodObject<{
251
+ type: z.ZodLiteral<"position-tracker">;
248
252
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
249
253
  streamId: z.ZodString;
250
254
  }, z.core.$strip>;
@@ -369,6 +373,8 @@ export declare const sStartRecordingCommand: z.ZodObject<{
369
373
  type: z.ZodLiteral<"nvr-analytics-server">;
370
374
  }, z.core.$strip>, z.ZodObject<{
371
375
  type: z.ZodLiteral<"system">;
376
+ }, z.core.$strip>, z.ZodObject<{
377
+ type: z.ZodLiteral<"position-tracker">;
372
378
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
373
379
  streamId: z.ZodString;
374
380
  }, z.core.$strip>;
@@ -493,6 +499,8 @@ export declare const sStopRecordingCommand: z.ZodObject<{
493
499
  type: z.ZodLiteral<"nvr-analytics-server">;
494
500
  }, z.core.$strip>, z.ZodObject<{
495
501
  type: z.ZodLiteral<"system">;
502
+ }, z.core.$strip>, z.ZodObject<{
503
+ type: z.ZodLiteral<"position-tracker">;
496
504
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
497
505
  streamId: z.ZodString;
498
506
  }, z.core.$strip>;
@@ -619,6 +627,8 @@ export declare const nvrRecorderCommandSchemas: {
619
627
  type: z.ZodLiteral<"nvr-analytics-server">;
620
628
  }, z.core.$strip>, z.ZodObject<{
621
629
  type: z.ZodLiteral<"system">;
630
+ }, z.core.$strip>, z.ZodObject<{
631
+ type: z.ZodLiteral<"position-tracker">;
622
632
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
623
633
  streamId: z.ZodString;
624
634
  }, z.core.$strip>;
@@ -742,6 +752,8 @@ export declare const nvrRecorderCommandSchemas: {
742
752
  type: z.ZodLiteral<"nvr-analytics-server">;
743
753
  }, z.core.$strip>, z.ZodObject<{
744
754
  type: z.ZodLiteral<"system">;
755
+ }, z.core.$strip>, z.ZodObject<{
756
+ type: z.ZodLiteral<"position-tracker">;
745
757
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
746
758
  streamId: z.ZodString;
747
759
  }, z.core.$strip>;
@@ -865,6 +877,8 @@ export declare const nvrRecorderCommandSchemas: {
865
877
  type: z.ZodLiteral<"nvr-analytics-server">;
866
878
  }, z.core.$strip>, z.ZodObject<{
867
879
  type: z.ZodLiteral<"system">;
880
+ }, z.core.$strip>, z.ZodObject<{
881
+ type: z.ZodLiteral<"position-tracker">;
868
882
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
869
883
  streamId: z.ZodString;
870
884
  rtspUrl: z.ZodString;
@@ -991,6 +1005,8 @@ export declare const nvrRecorderCommandSchemas: {
991
1005
  type: z.ZodLiteral<"nvr-analytics-server">;
992
1006
  }, z.core.$strip>, z.ZodObject<{
993
1007
  type: z.ZodLiteral<"system">;
1008
+ }, z.core.$strip>, z.ZodObject<{
1009
+ type: z.ZodLiteral<"position-tracker">;
994
1010
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
995
1011
  streamId: z.ZodString;
996
1012
  }, z.core.$strip>;
@@ -124,6 +124,8 @@ export declare const sNotify: z.ZodObject<{
124
124
  type: z.ZodLiteral<"nvr-analytics-server">;
125
125
  }, z.core.$strip>, z.ZodObject<{
126
126
  type: z.ZodLiteral<"system">;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ type: z.ZodLiteral<"position-tracker">;
127
129
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
128
130
  message: z.ZodString;
129
131
  severity: z.ZodEnum<{
@@ -264,6 +266,8 @@ export declare const serverCommands: {
264
266
  type: z.ZodLiteral<"nvr-analytics-server">;
265
267
  }, z.core.$strip>, z.ZodObject<{
266
268
  type: z.ZodLiteral<"system">;
269
+ }, z.core.$strip>, z.ZodObject<{
270
+ type: z.ZodLiteral<"position-tracker">;
267
271
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
268
272
  message: z.ZodString;
269
273
  severity: z.ZodEnum<{
@@ -189,6 +189,8 @@ export declare const requestSchemasByType: {
189
189
  type: z.ZodLiteral<"nvr-analytics-server">;
190
190
  }, z.core.$strip>, z.ZodObject<{
191
191
  type: z.ZodLiteral<"system">;
192
+ }, z.core.$strip>, z.ZodObject<{
193
+ type: z.ZodLiteral<"position-tracker">;
192
194
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
193
195
  streamId: z.ZodString;
194
196
  timeFrom: z.ZodNumber;
@@ -311,6 +313,8 @@ export declare const requestSchemasByType: {
311
313
  type: z.ZodLiteral<"nvr-analytics-server">;
312
314
  }, z.core.$strip>, z.ZodObject<{
313
315
  type: z.ZodLiteral<"system">;
316
+ }, z.core.$strip>, z.ZodObject<{
317
+ type: z.ZodLiteral<"position-tracker">;
314
318
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
315
319
  streamId: z.ZodString;
316
320
  time: z.ZodNumber;
@@ -433,6 +437,8 @@ export declare const requestSchemasByType: {
433
437
  type: z.ZodLiteral<"nvr-analytics-server">;
434
438
  }, z.core.$strip>, z.ZodObject<{
435
439
  type: z.ZodLiteral<"system">;
440
+ }, z.core.$strip>, z.ZodObject<{
441
+ type: z.ZodLiteral<"position-tracker">;
436
442
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
437
443
  streamId: z.ZodString;
438
444
  width: z.ZodNumber;
@@ -117,6 +117,8 @@ export declare const sRecordingsByTimeRangeArgs: z.ZodObject<{
117
117
  type: z.ZodLiteral<"nvr-analytics-server">;
118
118
  }, z.core.$strip>, z.ZodObject<{
119
119
  type: z.ZodLiteral<"system">;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ type: z.ZodLiteral<"position-tracker">;
120
122
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
121
123
  streamId: z.ZodString;
122
124
  timeFrom: z.ZodNumber;
@@ -248,6 +250,8 @@ export declare const sPreviewImageArgs: z.ZodObject<{
248
250
  type: z.ZodLiteral<"nvr-analytics-server">;
249
251
  }, z.core.$strip>, z.ZodObject<{
250
252
  type: z.ZodLiteral<"system">;
253
+ }, z.core.$strip>, z.ZodObject<{
254
+ type: z.ZodLiteral<"position-tracker">;
251
255
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
252
256
  streamId: z.ZodString;
253
257
  time: z.ZodNumber;
@@ -377,6 +381,8 @@ export declare const sCameraLatestFrameArgs: z.ZodObject<{
377
381
  type: z.ZodLiteral<"nvr-analytics-server">;
378
382
  }, z.core.$strip>, z.ZodObject<{
379
383
  type: z.ZodLiteral<"system">;
384
+ }, z.core.$strip>, z.ZodObject<{
385
+ type: z.ZodLiteral<"position-tracker">;
380
386
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
381
387
  streamId: z.ZodString;
382
388
  width: z.ZodNumber;
@@ -506,6 +512,8 @@ export declare const nvrRecorderRequestSchemas: {
506
512
  type: z.ZodLiteral<"nvr-analytics-server">;
507
513
  }, z.core.$strip>, z.ZodObject<{
508
514
  type: z.ZodLiteral<"system">;
515
+ }, z.core.$strip>, z.ZodObject<{
516
+ type: z.ZodLiteral<"position-tracker">;
509
517
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
510
518
  streamId: z.ZodString;
511
519
  timeFrom: z.ZodNumber;
@@ -628,6 +636,8 @@ export declare const nvrRecorderRequestSchemas: {
628
636
  type: z.ZodLiteral<"nvr-analytics-server">;
629
637
  }, z.core.$strip>, z.ZodObject<{
630
638
  type: z.ZodLiteral<"system">;
639
+ }, z.core.$strip>, z.ZodObject<{
640
+ type: z.ZodLiteral<"position-tracker">;
631
641
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
632
642
  streamId: z.ZodString;
633
643
  time: z.ZodNumber;
@@ -750,6 +760,8 @@ export declare const nvrRecorderRequestSchemas: {
750
760
  type: z.ZodLiteral<"nvr-analytics-server">;
751
761
  }, z.core.$strip>, z.ZodObject<{
752
762
  type: z.ZodLiteral<"system">;
763
+ }, z.core.$strip>, z.ZodObject<{
764
+ type: z.ZodLiteral<"position-tracker">;
753
765
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
754
766
  streamId: z.ZodString;
755
767
  width: z.ZodNumber;
@@ -54,6 +54,7 @@ export declare const sAddDeviceRequest: z.ZodObject<{
54
54
  "nvr-exporter": "nvr-exporter";
55
55
  "nvr-analytics-server": "nvr-analytics-server";
56
56
  system: "system";
57
+ "position-tracker": "position-tracker";
57
58
  }>;
58
59
  specs: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>>;
59
60
  displaySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -8,4 +8,5 @@ import { IntercomTerminalStateDto } from '../../objects/device/intercom-terminal
8
8
  import { IoBoardStateDto } from '../../objects/device/io-board';
9
9
  import { MotionSensorStateDto } from '../../objects/device/motion-sensor';
10
10
  import { PanicButtonStateDto } from '../../objects/device/panic-button';
11
- export type DeviceStateDto = CameraStateDto | DoorStateDto | AlarmStateDto | IoBoardStateDto | CameraLiftStateDto | MotionSensorStateDto | GenericSensorStateDto | PanicButtonStateDto | IntercomTerminalStateDto | IntercomOperatorStateDto;
11
+ import { PositionTrackerStateDto } from '../../objects/device/position-tracker';
12
+ export type DeviceStateDto = CameraStateDto | DoorStateDto | AlarmStateDto | IoBoardStateDto | CameraLiftStateDto | MotionSensorStateDto | GenericSensorStateDto | PanicButtonStateDto | IntercomTerminalStateDto | IntercomOperatorStateDto | PositionTrackerStateDto;
@@ -3,3 +3,4 @@ export * from './web-socket';
3
3
  export * from './progress';
4
4
  export * from './web-rtc-signaling';
5
5
  export * from './notifications';
6
+ export * from './trackables';
@@ -19,3 +19,4 @@ __exportStar(require("./web-socket"), exports);
19
19
  __exportStar(require("./progress"), exports);
20
20
  __exportStar(require("./web-rtc-signaling"), exports);
21
21
  __exportStar(require("./notifications"), exports);
22
+ __exportStar(require("./trackables"), exports);
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ import { WebSocketMessage } from './web-socket';
3
+ export declare const sTrackableUpdatePayload: z.ZodObject<{
4
+ timestamp: z.ZodNumber;
5
+ objectId: z.ZodString;
6
+ objectName: z.ZodString;
7
+ objectKind: z.ZodNullable<z.ZodString>;
8
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
9
+ longitude: z.ZodNumber;
10
+ latitude: z.ZodNumber;
11
+ altitude: z.ZodOptional<z.ZodNumber>;
12
+ speed: z.ZodOptional<z.ZodNumber>;
13
+ heading: z.ZodOptional<z.ZodNumber>;
14
+ }, z.core.$strip>;
15
+ export type TrackableUpdatePayload = z.infer<typeof sTrackableUpdatePayload>;
16
+ interface TrackableMessageMap {
17
+ update: TrackableUpdatePayload;
18
+ }
19
+ export type TrackableWsMessage = {
20
+ [K in keyof TrackableMessageMap]: {
21
+ event: K;
22
+ data: TrackableMessageMap[K];
23
+ };
24
+ }[keyof TrackableMessageMap];
25
+ export declare const isTrackableMessage: (message: WebSocketMessage) => message is TrackableWsMessage;
26
+ export {};
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTrackableMessage = exports.sTrackableUpdatePayload = void 0;
4
+ const zod_1 = require("zod");
5
+ const primitives_1 = require("../../primitives");
6
+ exports.sTrackableUpdatePayload = zod_1.z.object({
7
+ timestamp: zod_1.z.number(),
8
+ objectId: zod_1.z.string().nonempty(),
9
+ objectName: zod_1.z.string().nonempty(),
10
+ objectKind: primitives_1.sWorldObjectId.nullable(),
11
+ metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
12
+ longitude: zod_1.z.number().min(-180).max(180),
13
+ latitude: zod_1.z.number().min(-90).max(90),
14
+ altitude: zod_1.z.number().optional(),
15
+ speed: zod_1.z.number().optional(),
16
+ heading: zod_1.z.number().optional(),
17
+ });
18
+ const validators = {
19
+ update: exports.sTrackableUpdatePayload,
20
+ };
21
+ const isTrackableMessage = (message) => {
22
+ const validator = validators[message.event];
23
+ if (!validator) {
24
+ return false;
25
+ }
26
+ return validator.safeParse(message.data).success;
27
+ };
28
+ exports.isTrackableMessage = isTrackableMessage;
@@ -10,6 +10,7 @@ import { INTERCOM_TERMINAL } from './intercom-terminal';
10
10
  import { PBX } from './pbx';
11
11
  import { SERVER } from './server';
12
12
  import { ALARM } from './alarm';
13
+ import { POSITION_TRACKER } from './position-tracker';
13
14
  import { DEVICE_GATEWAY } from './device-gateway';
14
15
  import { PRESENCE_TRACKER } from './presence-tracker';
15
16
  import { DISPLAY } from './display';
@@ -18,7 +19,7 @@ import { NVR_EXPORTER } from './nvr-exporter';
18
19
  import { NVR_ANALYTICS_SERVER } from './nvr-analytics-server';
19
20
  import { SYSTEM } from './system';
20
21
  import { GENERIC_SENSOR } from './generic-sensor';
21
- export declare const DEVICE_TYPES: readonly ["alarm", "server", "camera", "door", "reader", "io-board", "camera-lift", "motion-sensor", "generic-sensor", "panic-button", "intercom-operator", "intercom-terminal", "pbx", "device-gateway", "presence-tracker", "display", "nvr-recorder", "nvr-exporter", "nvr-analytics-server", "system"];
22
+ export declare const DEVICE_TYPES: readonly ["alarm", "server", "camera", "door", "reader", "io-board", "camera-lift", "motion-sensor", "generic-sensor", "panic-button", "intercom-operator", "intercom-terminal", "pbx", "device-gateway", "presence-tracker", "display", "nvr-recorder", "nvr-exporter", "nvr-analytics-server", "position-tracker", "system"];
22
23
  export declare const sDeviceType: z.ZodEnum<{
23
24
  camera: "camera";
24
25
  door: "door";
@@ -40,6 +41,7 @@ export declare const sDeviceType: z.ZodEnum<{
40
41
  "nvr-exporter": "nvr-exporter";
41
42
  "nvr-analytics-server": "nvr-analytics-server";
42
43
  system: "system";
44
+ "position-tracker": "position-tracker";
43
45
  }>;
44
46
  export declare const sDisplaySpecsWithType: z.ZodObject<{
45
47
  type: z.ZodLiteral<"display">;
@@ -164,6 +166,8 @@ export declare const sAnyDeviceSpecs: z.ZodDiscriminatedUnion<[z.ZodObject<{
164
166
  type: z.ZodLiteral<"nvr-analytics-server">;
165
167
  }, z.core.$strip>, z.ZodObject<{
166
168
  type: z.ZodLiteral<"system">;
169
+ }, z.core.$strip>, z.ZodObject<{
170
+ type: z.ZodLiteral<"position-tracker">;
167
171
  }, z.core.$strip>], "type">;
168
172
  export declare const sProviderMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
169
173
  export declare const sPresetDto: z.ZodObject<{
@@ -329,6 +333,8 @@ export declare const sDeviceDto: z.ZodIntersection<z.ZodIntersection<z.ZodDiscri
329
333
  type: z.ZodLiteral<"nvr-analytics-server">;
330
334
  }, z.core.$strip>, z.ZodObject<{
331
335
  type: z.ZodLiteral<"system">;
336
+ }, z.core.$strip>, z.ZodObject<{
337
+ type: z.ZodLiteral<"position-tracker">;
332
338
  }, z.core.$strip>], "type">, z.ZodObject<{
333
339
  id: z.ZodString;
334
340
  presets: z.ZodArray<z.ZodObject<{
@@ -1502,6 +1508,59 @@ export declare const sSystemDeviceDto: z.ZodIntersection<z.ZodIntersection<z.Zod
1502
1508
  provider: z.ZodString;
1503
1509
  providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
1504
1510
  }, z.core.$strip>>;
1511
+ export declare const sPositionTrackerDto: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
1512
+ type: z.ZodLiteral<"position-tracker">;
1513
+ }, z.core.$strip>, z.ZodObject<{
1514
+ id: z.ZodString;
1515
+ presets: z.ZodArray<z.ZodObject<{
1516
+ id: z.ZodString;
1517
+ name: z.ZodString;
1518
+ params: z.ZodUnknown;
1519
+ isDefault: z.ZodBoolean;
1520
+ assignedRef: z.ZodNullable<z.ZodString>;
1521
+ createdOn: z.ZodString;
1522
+ lastModifiedOn: z.ZodString;
1523
+ }, z.core.$strip>>;
1524
+ providerAssignedName: z.ZodString;
1525
+ notes: z.ZodNullable<z.ZodString>;
1526
+ tags: z.ZodArray<z.ZodString>;
1527
+ displaySettings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1528
+ relations: z.ZodArray<z.ZodObject<{
1529
+ id: z.ZodString;
1530
+ kind: z.ZodEnum<{
1531
+ attachedTo: "attachedTo";
1532
+ parent: "parent";
1533
+ child: "child";
1534
+ holds: "holds";
1535
+ isHeldBy: "isHeldBy";
1536
+ observes: "observes";
1537
+ isObservedBy: "isObservedBy";
1538
+ sendsInputTo: "sendsInputTo";
1539
+ receivesInputFrom: "receivesInputFrom";
1540
+ sendsOutputTo: "sendsOutputTo";
1541
+ receivesOutputFrom: "receivesOutputFrom";
1542
+ unlocks: "unlocks";
1543
+ isUnlockedBy: "isUnlockedBy";
1544
+ controls: "controls";
1545
+ isControlledBy: "isControlledBy";
1546
+ records: "records";
1547
+ isRecordedBy: "isRecordedBy";
1548
+ reads: "reads";
1549
+ isReadBy: "isReadBy";
1550
+ isIngestedBy: "isIngestedBy";
1551
+ ingests: "ingests";
1552
+ }>;
1553
+ }, z.core.$catchall<z.ZodUnknown>>>;
1554
+ groups: z.ZodArray<z.ZodString>;
1555
+ enabled: z.ZodBoolean;
1556
+ createdOn: z.ZodString;
1557
+ lastModifiedOn: z.ZodString;
1558
+ }, z.core.$strip>>, z.ZodObject<{
1559
+ name: z.ZodString;
1560
+ foreignRef: z.ZodString;
1561
+ provider: z.ZodString;
1562
+ providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
1563
+ }, z.core.$strip>>;
1505
1564
  export declare const sEventVariantDescription: z.ZodObject<{
1506
1565
  name: z.ZodString;
1507
1566
  label: z.ZodString;
@@ -1515,6 +1574,7 @@ export declare const sEventDescription: z.ZodObject<{
1515
1574
  }, z.core.$strip>>>;
1516
1575
  }, z.core.$strip>;
1517
1576
  export type DeviceType = z.infer<typeof sDeviceType>;
1577
+ export type PositionTrackerDto = z.infer<typeof sPositionTrackerDto>;
1518
1578
  export type PresetDto = z.infer<typeof sPresetDto>;
1519
1579
  export type DeviceDto = z.infer<typeof sDeviceDto>;
1520
1580
  export type CameraDto = z.infer<typeof sCameraDto>;
@@ -1563,6 +1623,7 @@ export interface DeviceTypeToDtoMap {
1563
1623
  [NVR_ANALYTICS_SERVER]: NvrAnalyticsServerDto;
1564
1624
  [SYSTEM]: SystemDeviceDto;
1565
1625
  [GENERIC_SENSOR]: GenericSensorDto;
1626
+ [POSITION_TRACKER]: PositionTrackerDto;
1566
1627
  }
1567
1628
  /** Given a device type, resolves to the corresponding Dto type. */
1568
1629
  export type DeviceDtoFor<T extends DeviceType> = DeviceTypeToDtoMap[T];
@@ -2690,4 +2751,57 @@ export declare const deviceDtoSchemaMap: {
2690
2751
  provider: z.ZodString;
2691
2752
  providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
2692
2753
  }, z.core.$strip>>;
2754
+ readonly "position-tracker": z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
2755
+ type: z.ZodLiteral<"position-tracker">;
2756
+ }, z.core.$strip>, z.ZodObject<{
2757
+ id: z.ZodString;
2758
+ presets: z.ZodArray<z.ZodObject<{
2759
+ id: z.ZodString;
2760
+ name: z.ZodString;
2761
+ params: z.ZodUnknown;
2762
+ isDefault: z.ZodBoolean;
2763
+ assignedRef: z.ZodNullable<z.ZodString>;
2764
+ createdOn: z.ZodString;
2765
+ lastModifiedOn: z.ZodString;
2766
+ }, z.core.$strip>>;
2767
+ providerAssignedName: z.ZodString;
2768
+ notes: z.ZodNullable<z.ZodString>;
2769
+ tags: z.ZodArray<z.ZodString>;
2770
+ displaySettings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2771
+ relations: z.ZodArray<z.ZodObject<{
2772
+ id: z.ZodString;
2773
+ kind: z.ZodEnum<{
2774
+ attachedTo: "attachedTo";
2775
+ parent: "parent";
2776
+ child: "child";
2777
+ holds: "holds";
2778
+ isHeldBy: "isHeldBy";
2779
+ observes: "observes";
2780
+ isObservedBy: "isObservedBy";
2781
+ sendsInputTo: "sendsInputTo";
2782
+ receivesInputFrom: "receivesInputFrom";
2783
+ sendsOutputTo: "sendsOutputTo";
2784
+ receivesOutputFrom: "receivesOutputFrom";
2785
+ unlocks: "unlocks";
2786
+ isUnlockedBy: "isUnlockedBy";
2787
+ controls: "controls";
2788
+ isControlledBy: "isControlledBy";
2789
+ records: "records";
2790
+ isRecordedBy: "isRecordedBy";
2791
+ reads: "reads";
2792
+ isReadBy: "isReadBy";
2793
+ isIngestedBy: "isIngestedBy";
2794
+ ingests: "ingests";
2795
+ }>;
2796
+ }, z.core.$catchall<z.ZodUnknown>>>;
2797
+ groups: z.ZodArray<z.ZodString>;
2798
+ enabled: z.ZodBoolean;
2799
+ createdOn: z.ZodString;
2800
+ lastModifiedOn: z.ZodString;
2801
+ }, z.core.$strip>>, z.ZodObject<{
2802
+ name: z.ZodString;
2803
+ foreignRef: z.ZodString;
2804
+ provider: z.ZodString;
2805
+ providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
2806
+ }, z.core.$strip>>;
2693
2807
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deviceDtoSchemaMap = exports.sEventDescription = exports.sEventVariantDescription = exports.sSystemDeviceDto = exports.sNvrAnalyticsServerDto = exports.sNvrExporterDto = exports.sRecorderDto = exports.sDisplayDto = exports.sIntercomOperatorDto = exports.sAlarmDto = exports.sServerDto = exports.sPresenceTrackerDto = exports.sDeviceGatewayDto = exports.sPbxDto = exports.sIntercomTerminalDto = exports.sPanicButtonDto = exports.sGenericSensorDto = exports.sMotionSensorDto = exports.sCameraLiftDto = exports.sIoBoardDto = exports.sReaderDto = exports.sDoorDto = exports.sCameraDto = exports.sDeviceDto = exports.sForeignDeviceInfo = exports.sDeviceMgmtInfo = exports.sPresetDto = exports.sProviderMetadata = exports.sAnyDeviceSpecs = exports.sSystemDeviceSpecsWithType = exports.sNvrAnalyticsServerSpecsWithType = exports.sNvrExporterSpecsWithType = exports.sRecorderSpecsWithType = exports.sDisplaySpecsWithType = exports.sDeviceType = exports.DEVICE_TYPES = void 0;
3
+ exports.deviceDtoSchemaMap = exports.sEventDescription = exports.sEventVariantDescription = exports.sPositionTrackerDto = exports.sSystemDeviceDto = exports.sNvrAnalyticsServerDto = exports.sNvrExporterDto = exports.sRecorderDto = exports.sDisplayDto = exports.sIntercomOperatorDto = exports.sAlarmDto = exports.sServerDto = exports.sPresenceTrackerDto = exports.sDeviceGatewayDto = exports.sPbxDto = exports.sIntercomTerminalDto = exports.sPanicButtonDto = exports.sGenericSensorDto = exports.sMotionSensorDto = exports.sCameraLiftDto = exports.sIoBoardDto = exports.sReaderDto = exports.sDoorDto = exports.sCameraDto = exports.sDeviceDto = exports.sForeignDeviceInfo = exports.sDeviceMgmtInfo = exports.sPresetDto = exports.sProviderMetadata = exports.sAnyDeviceSpecs = exports.sSystemDeviceSpecsWithType = exports.sNvrAnalyticsServerSpecsWithType = exports.sNvrExporterSpecsWithType = exports.sRecorderSpecsWithType = exports.sDisplaySpecsWithType = exports.sDeviceType = exports.DEVICE_TYPES = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const camera_1 = require("./camera");
6
6
  const door_1 = require("./door");
@@ -13,6 +13,7 @@ const intercom_terminal_1 = require("./intercom-terminal");
13
13
  const pbx_1 = require("./pbx");
14
14
  const server_1 = require("./server");
15
15
  const alarm_1 = require("./alarm");
16
+ const position_tracker_1 = require("./position-tracker");
16
17
  const device_relation_1 = require("./device-relation");
17
18
  const device_gateway_1 = require("./device-gateway");
18
19
  const presence_tracker_1 = require("./presence-tracker");
@@ -43,9 +44,13 @@ exports.DEVICE_TYPES = [
43
44
  nvr_recorder_1.NVR_RECORDER,
44
45
  nvr_exporter_1.NVR_EXPORTER,
45
46
  nvr_analytics_server_1.NVR_ANALYTICS_SERVER,
47
+ position_tracker_1.POSITION_TRACKER,
46
48
  system_1.SYSTEM,
47
49
  ];
48
50
  exports.sDeviceType = zod_1.z.enum(exports.DEVICE_TYPES);
51
+ const sPositionTrackerSpecsWithType = position_tracker_1.sPositionTrackerSpecs.extend({
52
+ type: zod_1.z.literal(position_tracker_1.POSITION_TRACKER),
53
+ });
49
54
  const sAlarmSpecsWithType = alarm_1.sAlarmSpecs.extend({ type: zod_1.z.literal(alarm_1.ALARM) });
50
55
  const sCameraSpecsWithType = camera_1.sCameraSpecs.extend({ type: zod_1.z.literal(camera_1.CAMERA) });
51
56
  const sDoorSpecsWithType = door_1.sDoorSpecs.extend({ type: zod_1.z.literal(door_1.DOOR) });
@@ -115,6 +120,7 @@ exports.sAnyDeviceSpecs = zod_1.z.discriminatedUnion('type', [
115
120
  exports.sNvrExporterSpecsWithType,
116
121
  exports.sNvrAnalyticsServerSpecsWithType,
117
122
  exports.sSystemDeviceSpecsWithType,
123
+ sPositionTrackerSpecsWithType,
118
124
  ]);
119
125
  exports.sProviderMetadata = zod_1.z.object({}).catchall(zod_1.z.unknown());
120
126
  exports.sPresetDto = zod_1.z.object({
@@ -208,6 +214,9 @@ exports.sNvrAnalyticsServerDto = exports.sNvrAnalyticsServerSpecsWithType
208
214
  exports.sSystemDeviceDto = exports.sSystemDeviceSpecsWithType
209
215
  .and(exports.sDeviceMgmtInfo)
210
216
  .and(exports.sForeignDeviceInfo);
217
+ exports.sPositionTrackerDto = sPositionTrackerSpecsWithType
218
+ .and(exports.sDeviceMgmtInfo)
219
+ .and(exports.sForeignDeviceInfo);
211
220
  exports.sEventVariantDescription = zod_1.z.object({
212
221
  name: zod_1.z.string().describe('The name of the variant'),
213
222
  label: zod_1.z.string().describe('A human-readable label for the variant'),
@@ -242,4 +251,5 @@ exports.deviceDtoSchemaMap = {
242
251
  [nvr_exporter_1.NVR_EXPORTER]: exports.sNvrExporterDto,
243
252
  [nvr_analytics_server_1.NVR_ANALYTICS_SERVER]: exports.sNvrAnalyticsServerDto,
244
253
  [system_1.SYSTEM]: exports.sSystemDeviceDto,
254
+ [position_tracker_1.POSITION_TRACKER]: exports.sPositionTrackerDto,
245
255
  };
@@ -109,6 +109,8 @@ export declare const sImportedDevice: z.ZodIntersection<z.ZodIntersection<z.ZodO
109
109
  type: z.ZodLiteral<"nvr-analytics-server">;
110
110
  }, z.core.$strip>, z.ZodObject<{
111
111
  type: z.ZodLiteral<"system">;
112
+ }, z.core.$strip>, z.ZodObject<{
113
+ type: z.ZodLiteral<"position-tracker">;
112
114
  }, z.core.$strip>], "type">>;
113
115
  export declare const sDuplicateDevice: z.ZodObject<{
114
116
  name: z.ZodString;
@@ -224,6 +226,8 @@ export declare const sDeviceDiscoveryDto: z.ZodObject<{
224
226
  type: z.ZodLiteral<"nvr-analytics-server">;
225
227
  }, z.core.$strip>, z.ZodObject<{
226
228
  type: z.ZodLiteral<"system">;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ type: z.ZodLiteral<"position-tracker">;
227
231
  }, z.core.$strip>], "type">>>;
228
232
  relations: z.ZodArray<z.ZodIntersection<z.ZodObject<{
229
233
  leftId: z.ZodString;
@@ -400,6 +404,8 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
400
404
  type: z.ZodLiteral<"nvr-analytics-server">;
401
405
  }, z.core.$strip>, z.ZodObject<{
402
406
  type: z.ZodLiteral<"system">;
407
+ }, z.core.$strip>, z.ZodObject<{
408
+ type: z.ZodLiteral<"position-tracker">;
403
409
  }, z.core.$strip>], "type">>>;
404
410
  updated: z.ZodArray<z.ZodObject<{
405
411
  id: z.ZodString;
@@ -508,6 +514,8 @@ export declare const sDeviceGetChangesDto: z.ZodObject<{
508
514
  type: z.ZodLiteral<"nvr-analytics-server">;
509
515
  }, z.core.$strip>, z.ZodObject<{
510
516
  type: z.ZodLiteral<"system">;
517
+ }, z.core.$strip>, z.ZodObject<{
518
+ type: z.ZodLiteral<"position-tracker">;
511
519
  }, z.core.$strip>], "type">, z.ZodObject<{
512
520
  id: z.ZodString;
513
521
  presets: z.ZodArray<z.ZodObject<{
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const POSITION_TRACKER: "position-tracker";
3
+ export declare const sPositionTrackerSpecs: z.ZodObject<{}, z.core.$strip>;
4
+ export type PositionTrackerSpecs = z.infer<typeof sPositionTrackerSpecs>;
5
+ export type PositionTrackerStateDto = {
6
+ connected: boolean;
7
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sPositionTrackerSpecs = exports.POSITION_TRACKER = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.POSITION_TRACKER = 'position-tracker';
6
+ // SPECS
7
+ exports.sPositionTrackerSpecs = zod_1.z.object({});
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.117",
7
+ "version": "2.0.119",
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",
@@ -141,6 +141,8 @@ export declare const sAgentDeviceInfo: z.ZodIntersection<z.ZodObject<{
141
141
  type: z.ZodLiteral<"nvr-analytics-server">;
142
142
  }, z.core.$strip>, z.ZodObject<{
143
143
  type: z.ZodLiteral<"system">;
144
+ }, z.core.$strip>, z.ZodObject<{
145
+ type: z.ZodLiteral<"position-tracker">;
144
146
  }, z.core.$strip>], "type">>;
145
147
  export type AgentDeviceInfo = z.infer<typeof sAgentDeviceInfo>;
146
148
  export declare const sForeignDeviceId: z.ZodTuple<[z.ZodString, z.ZodString], null>;
@@ -260,6 +262,8 @@ export declare const sDeviceParam: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodInt
260
262
  type: z.ZodLiteral<"nvr-analytics-server">;
261
263
  }, z.core.$strip>, z.ZodObject<{
262
264
  type: z.ZodLiteral<"system">;
265
+ }, z.core.$strip>, z.ZodObject<{
266
+ type: z.ZodLiteral<"position-tracker">;
263
267
  }, z.core.$strip>], "type">>]>, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
264
268
  export type DeviceParam = z.infer<typeof sDeviceParam>;
265
269
  export declare const sStreamId: z.ZodString;
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.117",
7
+ "version": "2.0.119",
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",