@awarevue/api-types 2.0.28 → 2.0.30

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -20,7 +20,7 @@ exports.sBoxLocator = zod_1.z.object({
20
20
  exports.sObjectLocator = exports.sBoxLocator;
21
21
  exports.sObjectDetectionData = zod_1.z
22
22
  .object({
23
- objectKind: zod_1.z.string().nullable(),
23
+ objectKind: primitives_1.sWorldObjectId.nullable(),
24
24
  probability: zod_1.z.number(),
25
25
  identifiedObjectId: zod_1.z.string().nullable(),
26
26
  frameTime: zod_1.z.number(),
@@ -0,0 +1,214 @@
1
+ import { z } from 'zod';
2
+ import { DeviceType, sEventVariantDescription } from '../../objects';
3
+ export declare const sAddDeviceRequest: z.ZodObject<{
4
+ name: z.ZodString;
5
+ foreignRef: z.ZodString;
6
+ notes: z.ZodNullable<z.ZodString>;
7
+ provider: z.ZodString;
8
+ providerMetadata: z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>;
9
+ tags: z.ZodArray<z.ZodString, "many">;
10
+ relations: z.ZodArray<z.ZodObject<{
11
+ id: z.ZodString;
12
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
13
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
14
+ id: z.ZodString;
15
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
16
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
17
+ id: z.ZodString;
18
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
19
+ }, z.ZodUnknown, "strip">>, "many">;
20
+ type: z.ZodEnum<["alarm", "server", "camera", "door", "reader", "io-board", "camera-lift", "motion-sensor", "panic-button", "intercom-operator", "intercom-terminal", "pbx", "device-gateway", "presence-tracker", "display", "nvr-recorder", "nvr-exporter", "nvr-analytics-server", "system"]>;
21
+ specs: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ name: string;
24
+ type: "camera" | "server" | "display" | "door" | "io-board" | "camera-lift" | "motion-sensor" | "panic-button" | "intercom-operator" | "intercom-terminal" | "pbx" | "alarm" | "reader" | "device-gateway" | "presence-tracker" | "nvr-recorder" | "nvr-exporter" | "nvr-analytics-server" | "system";
25
+ foreignRef: string;
26
+ notes: string | null;
27
+ tags: string[];
28
+ relations: z.objectOutputType<{
29
+ id: z.ZodString;
30
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
31
+ }, z.ZodUnknown, "strip">[];
32
+ provider: string;
33
+ providerMetadata: {} & {
34
+ [k: string]: unknown;
35
+ };
36
+ specs?: z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
37
+ }, {
38
+ name: string;
39
+ type: "camera" | "server" | "display" | "door" | "io-board" | "camera-lift" | "motion-sensor" | "panic-button" | "intercom-operator" | "intercom-terminal" | "pbx" | "alarm" | "reader" | "device-gateway" | "presence-tracker" | "nvr-recorder" | "nvr-exporter" | "nvr-analytics-server" | "system";
40
+ foreignRef: string;
41
+ notes: string | null;
42
+ tags: string[];
43
+ relations: z.objectInputType<{
44
+ id: z.ZodString;
45
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
46
+ }, z.ZodUnknown, "strip">[];
47
+ provider: string;
48
+ providerMetadata: {} & {
49
+ [k: string]: unknown;
50
+ };
51
+ specs?: z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
52
+ }>;
53
+ export declare const sUpdateDeviceRequest: z.ZodObject<{
54
+ id: z.ZodString;
55
+ name: z.ZodOptional<z.ZodString>;
56
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
+ providerMetadata: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>>;
58
+ specs: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>>;
59
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
60
+ relations: z.ZodOptional<z.ZodArray<z.ZodObject<{
61
+ id: z.ZodString;
62
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
63
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
64
+ id: z.ZodString;
65
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
66
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
67
+ id: z.ZodString;
68
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
69
+ }, z.ZodUnknown, "strip">>, "many">>;
70
+ enabled: z.ZodOptional<z.ZodBoolean>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ id: string;
73
+ name?: string | undefined;
74
+ specs?: z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
75
+ enabled?: boolean | undefined;
76
+ notes?: string | null | undefined;
77
+ tags?: string[] | undefined;
78
+ relations?: z.objectOutputType<{
79
+ id: z.ZodString;
80
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
81
+ }, z.ZodUnknown, "strip">[] | undefined;
82
+ providerMetadata?: z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
83
+ }, {
84
+ id: string;
85
+ name?: string | undefined;
86
+ specs?: z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
87
+ enabled?: boolean | undefined;
88
+ notes?: string | null | undefined;
89
+ tags?: string[] | undefined;
90
+ relations?: z.objectInputType<{
91
+ id: z.ZodString;
92
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
93
+ }, z.ZodUnknown, "strip">[] | undefined;
94
+ providerMetadata?: z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
95
+ }>;
96
+ export declare const sOverrideDeviceSpecsRequest: z.ZodObject<{
97
+ id: z.ZodString;
98
+ specs: z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>;
99
+ }, "strip", z.ZodTypeAny, {
100
+ id: string;
101
+ specs: {} & {
102
+ [k: string]: unknown;
103
+ };
104
+ }, {
105
+ id: string;
106
+ specs: {} & {
107
+ [k: string]: unknown;
108
+ };
109
+ }>;
110
+ export declare const sAddDevicePresetRequest: z.ZodObject<{
111
+ name: z.ZodString;
112
+ params: z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>;
113
+ assignedRef: z.ZodNullable<z.ZodString>;
114
+ isDefault: z.ZodBoolean;
115
+ deviceId: z.ZodString;
116
+ }, "strip", z.ZodTypeAny, {
117
+ name: string;
118
+ params: {} & {
119
+ [k: string]: unknown;
120
+ };
121
+ deviceId: string;
122
+ isDefault: boolean;
123
+ assignedRef: string | null;
124
+ }, {
125
+ name: string;
126
+ params: {} & {
127
+ [k: string]: unknown;
128
+ };
129
+ deviceId: string;
130
+ isDefault: boolean;
131
+ assignedRef: string | null;
132
+ }>;
133
+ export declare const sUpdateDevicePresetRequest: z.ZodObject<{
134
+ name: z.ZodOptional<z.ZodString>;
135
+ isDefault: z.ZodOptional<z.ZodBoolean>;
136
+ assignedRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
137
+ deviceId: z.ZodString;
138
+ presetId: z.ZodString;
139
+ }, "strip", z.ZodTypeAny, {
140
+ deviceId: string;
141
+ presetId: string;
142
+ name?: string | undefined;
143
+ isDefault?: boolean | undefined;
144
+ assignedRef?: string | null | undefined;
145
+ }, {
146
+ deviceId: string;
147
+ presetId: string;
148
+ name?: string | undefined;
149
+ isDefault?: boolean | undefined;
150
+ assignedRef?: string | null | undefined;
151
+ }>;
152
+ export declare const sRemoveDevicePresetRequest: z.ZodObject<{
153
+ deviceId: z.ZodString;
154
+ presetId: z.ZodString;
155
+ }, "strip", z.ZodTypeAny, {
156
+ deviceId: string;
157
+ presetId: string;
158
+ }, {
159
+ deviceId: string;
160
+ presetId: string;
161
+ }>;
162
+ export declare const sGetEventCatalogResponse: z.ZodArray<z.ZodObject<{
163
+ kind: z.ZodString;
164
+ label: z.ZodString;
165
+ variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
166
+ name: z.ZodString;
167
+ label: z.ZodString;
168
+ }, "strip", z.ZodTypeAny, {
169
+ name: string;
170
+ label: string;
171
+ }, {
172
+ name: string;
173
+ label: string;
174
+ }>, "many">>;
175
+ }, "strip", z.ZodTypeAny, {
176
+ label: string;
177
+ kind: string;
178
+ variants?: {
179
+ name: string;
180
+ label: string;
181
+ }[] | undefined;
182
+ }, {
183
+ label: string;
184
+ kind: string;
185
+ variants?: {
186
+ name: string;
187
+ label: string;
188
+ }[] | undefined;
189
+ }>, "many">;
190
+ export declare const sSetUnsetRelationRequest: z.ZodObject<{
191
+ leftId: z.ZodString;
192
+ rightId: z.ZodString;
193
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
194
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
195
+ leftId: z.ZodString;
196
+ rightId: z.ZodString;
197
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
198
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
199
+ leftId: z.ZodString;
200
+ rightId: z.ZodString;
201
+ kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
202
+ }, z.ZodUnknown, "strip">>;
203
+ export type AddDeviceRequest = z.infer<typeof sAddDeviceRequest>;
204
+ export type UpdateDeviceRequest = z.infer<typeof sUpdateDeviceRequest>;
205
+ export type OverrideDeviceSpecsRequest = z.infer<typeof sOverrideDeviceSpecsRequest>;
206
+ export type AddDevicePresetRequest = z.infer<typeof sAddDevicePresetRequest>;
207
+ export type UpdateDevicePresetRequest = z.infer<typeof sUpdateDevicePresetRequest>;
208
+ export type RemoveDevicePresetRequest = z.infer<typeof sRemoveDevicePresetRequest>;
209
+ export type SetUnsetDeviceRelationRequest = z.infer<typeof sSetUnsetRelationRequest>;
210
+ export type DeviceSearchCriteria = {
211
+ type: DeviceType;
212
+ };
213
+ export type EventVariantDescription = z.infer<typeof sEventVariantDescription>;
214
+ export type GetEventCatalogResponse = z.infer<typeof sGetEventCatalogResponse>;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sSetUnsetRelationRequest = exports.sGetEventCatalogResponse = exports.sRemoveDevicePresetRequest = exports.sUpdateDevicePresetRequest = exports.sAddDevicePresetRequest = exports.sOverrideDeviceSpecsRequest = exports.sUpdateDeviceRequest = exports.sAddDeviceRequest = void 0;
4
+ const zod_1 = require("zod");
5
+ const objects_1 = require("../../objects");
6
+ exports.sAddDeviceRequest = zod_1.z.object({
7
+ name: zod_1.z.string().nonempty(),
8
+ foreignRef: zod_1.z.string().nonempty(),
9
+ notes: zod_1.z.string().nullable(),
10
+ provider: zod_1.z.string().nonempty(),
11
+ providerMetadata: objects_1.sProviderMetadata,
12
+ tags: zod_1.z.array(zod_1.z.string().nonempty()),
13
+ relations: zod_1.z.array(objects_1.sDeviceRelationSide),
14
+ type: objects_1.sDeviceType,
15
+ specs: zod_1.z.object({}).catchall(zod_1.z.unknown()).optional(),
16
+ });
17
+ exports.sUpdateDeviceRequest = zod_1.z.object({
18
+ id: zod_1.z.string().nonempty(),
19
+ name: zod_1.z.string().optional(),
20
+ notes: zod_1.z.string().nullable().optional(),
21
+ providerMetadata: zod_1.z.object({}).catchall(zod_1.z.unknown()).optional(),
22
+ specs: zod_1.z.object({}).catchall(zod_1.z.unknown()).optional(),
23
+ tags: zod_1.z.array(zod_1.z.string()).optional(),
24
+ relations: zod_1.z.array(objects_1.sDeviceRelationSide).optional(),
25
+ enabled: zod_1.z.boolean().optional(),
26
+ });
27
+ exports.sOverrideDeviceSpecsRequest = zod_1.z.object({
28
+ id: zod_1.z.string(),
29
+ specs: zod_1.z.object({}).catchall(zod_1.z.unknown()),
30
+ });
31
+ exports.sAddDevicePresetRequest = zod_1.z.object({
32
+ name: zod_1.z.string().nonempty(),
33
+ params: zod_1.z.object({}).catchall(zod_1.z.unknown()),
34
+ assignedRef: zod_1.z.string().nullable(),
35
+ isDefault: zod_1.z.boolean(),
36
+ deviceId: zod_1.z.string().nonempty(),
37
+ });
38
+ exports.sUpdateDevicePresetRequest = zod_1.z.object({
39
+ name: zod_1.z.string().optional(),
40
+ isDefault: zod_1.z.boolean().optional(),
41
+ assignedRef: zod_1.z.string().nullable().optional(),
42
+ deviceId: zod_1.z.string().nonempty(),
43
+ presetId: zod_1.z.string().nonempty(),
44
+ });
45
+ exports.sRemoveDevicePresetRequest = zod_1.z.object({
46
+ deviceId: zod_1.z.string().nonempty(),
47
+ presetId: zod_1.z.string().nonempty(),
48
+ });
49
+ exports.sGetEventCatalogResponse = zod_1.z.array(objects_1.sEventDescription);
50
+ exports.sSetUnsetRelationRequest = objects_1.sDeviceRelationDto;
@@ -32,3 +32,4 @@ export * from './user';
32
32
  export * from './view';
33
33
  export * from './webrtc-playback';
34
34
  export * from './io-device';
35
+ export * from './device';
@@ -48,3 +48,4 @@ __exportStar(require("./user"), exports);
48
48
  __exportStar(require("./view"), exports);
49
49
  __exportStar(require("./webrtc-playback"), exports);
50
50
  __exportStar(require("./io-device"), exports);
51
+ __exportStar(require("./device"), exports);
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const DEVICE_TYPES: readonly ["alarm", "server", "camera", "door", "reader", "io-board", "camera-lift", "motion-sensor", "panic-button", "intercom-operator", "intercom-terminal", "pbx", "device-gateway", "presence-tracker", "display", "nvr-recorder", "nvr-exporter", "nvr-analytics-server", "system"];
3
- declare const sDeviceType: z.ZodEnum<["alarm", "server", "camera", "door", "reader", "io-board", "camera-lift", "motion-sensor", "panic-button", "intercom-operator", "intercom-terminal", "pbx", "device-gateway", "presence-tracker", "display", "nvr-recorder", "nvr-exporter", "nvr-analytics-server", "system"]>;
3
+ export declare const sDeviceType: z.ZodEnum<["alarm", "server", "camera", "door", "reader", "io-board", "camera-lift", "motion-sensor", "panic-button", "intercom-operator", "intercom-terminal", "pbx", "device-gateway", "presence-tracker", "display", "nvr-recorder", "nvr-exporter", "nvr-analytics-server", "system"]>;
4
4
  export declare const sDisplaySpecsWithType: z.ZodObject<{
5
5
  type: z.ZodLiteral<"display">;
6
6
  }, "strip", z.ZodTypeAny, {
@@ -3055,165 +3055,6 @@ export declare const sSystemDeviceDto: z.ZodIntersection<z.ZodIntersection<z.Zod
3055
3055
  [k: string]: unknown;
3056
3056
  };
3057
3057
  }>>;
3058
- export declare const sAddDeviceRequest: z.ZodObject<{
3059
- name: z.ZodString;
3060
- foreignRef: z.ZodString;
3061
- notes: z.ZodNullable<z.ZodString>;
3062
- provider: z.ZodString;
3063
- providerMetadata: z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>;
3064
- tags: z.ZodArray<z.ZodString, "many">;
3065
- relations: z.ZodArray<z.ZodObject<{
3066
- id: z.ZodString;
3067
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3068
- }, "strip", z.ZodUnknown, z.objectOutputType<{
3069
- id: z.ZodString;
3070
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3071
- }, z.ZodUnknown, "strip">, z.objectInputType<{
3072
- id: z.ZodString;
3073
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3074
- }, z.ZodUnknown, "strip">>, "many">;
3075
- type: z.ZodEnum<["alarm", "server", "camera", "door", "reader", "io-board", "camera-lift", "motion-sensor", "panic-button", "intercom-operator", "intercom-terminal", "pbx", "device-gateway", "presence-tracker", "display", "nvr-recorder", "nvr-exporter", "nvr-analytics-server", "system"]>;
3076
- specs: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>>;
3077
- }, "strip", z.ZodTypeAny, {
3078
- name: string;
3079
- type: "camera" | "server" | "display" | "door" | "io-board" | "camera-lift" | "motion-sensor" | "panic-button" | "intercom-operator" | "intercom-terminal" | "pbx" | "alarm" | "reader" | "device-gateway" | "presence-tracker" | "nvr-recorder" | "nvr-exporter" | "nvr-analytics-server" | "system";
3080
- foreignRef: string;
3081
- notes: string | null;
3082
- tags: string[];
3083
- relations: z.objectOutputType<{
3084
- id: z.ZodString;
3085
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3086
- }, z.ZodUnknown, "strip">[];
3087
- provider: string;
3088
- providerMetadata: {} & {
3089
- [k: string]: unknown;
3090
- };
3091
- specs?: z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
3092
- }, {
3093
- name: string;
3094
- type: "camera" | "server" | "display" | "door" | "io-board" | "camera-lift" | "motion-sensor" | "panic-button" | "intercom-operator" | "intercom-terminal" | "pbx" | "alarm" | "reader" | "device-gateway" | "presence-tracker" | "nvr-recorder" | "nvr-exporter" | "nvr-analytics-server" | "system";
3095
- foreignRef: string;
3096
- notes: string | null;
3097
- tags: string[];
3098
- relations: z.objectInputType<{
3099
- id: z.ZodString;
3100
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3101
- }, z.ZodUnknown, "strip">[];
3102
- provider: string;
3103
- providerMetadata: {} & {
3104
- [k: string]: unknown;
3105
- };
3106
- specs?: z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
3107
- }>;
3108
- export declare const sUpdateDeviceRequest: z.ZodObject<{
3109
- id: z.ZodString;
3110
- name: z.ZodOptional<z.ZodString>;
3111
- notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3112
- providerMetadata: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>>;
3113
- specs: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>>;
3114
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3115
- relations: z.ZodOptional<z.ZodArray<z.ZodObject<{
3116
- id: z.ZodString;
3117
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3118
- }, "strip", z.ZodUnknown, z.objectOutputType<{
3119
- id: z.ZodString;
3120
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3121
- }, z.ZodUnknown, "strip">, z.objectInputType<{
3122
- id: z.ZodString;
3123
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3124
- }, z.ZodUnknown, "strip">>, "many">>;
3125
- enabled: z.ZodOptional<z.ZodBoolean>;
3126
- }, "strip", z.ZodTypeAny, {
3127
- id: string;
3128
- name?: string | undefined;
3129
- specs?: z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
3130
- enabled?: boolean | undefined;
3131
- notes?: string | null | undefined;
3132
- tags?: string[] | undefined;
3133
- relations?: z.objectOutputType<{
3134
- id: z.ZodString;
3135
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3136
- }, z.ZodUnknown, "strip">[] | undefined;
3137
- providerMetadata?: z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
3138
- }, {
3139
- id: string;
3140
- name?: string | undefined;
3141
- specs?: z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
3142
- enabled?: boolean | undefined;
3143
- notes?: string | null | undefined;
3144
- tags?: string[] | undefined;
3145
- relations?: z.objectInputType<{
3146
- id: z.ZodString;
3147
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3148
- }, z.ZodUnknown, "strip">[] | undefined;
3149
- providerMetadata?: z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
3150
- }>;
3151
- export declare const sOverrideDeviceSpecsRequest: z.ZodObject<{
3152
- id: z.ZodString;
3153
- specs: z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>;
3154
- }, "strip", z.ZodTypeAny, {
3155
- id: string;
3156
- specs: {} & {
3157
- [k: string]: unknown;
3158
- };
3159
- }, {
3160
- id: string;
3161
- specs: {} & {
3162
- [k: string]: unknown;
3163
- };
3164
- }>;
3165
- export declare const sAddDevicePresetRequest: z.ZodObject<{
3166
- name: z.ZodString;
3167
- params: z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>;
3168
- assignedRef: z.ZodNullable<z.ZodString>;
3169
- isDefault: z.ZodBoolean;
3170
- deviceId: z.ZodString;
3171
- }, "strip", z.ZodTypeAny, {
3172
- name: string;
3173
- params: {} & {
3174
- [k: string]: unknown;
3175
- };
3176
- deviceId: string;
3177
- isDefault: boolean;
3178
- assignedRef: string | null;
3179
- }, {
3180
- name: string;
3181
- params: {} & {
3182
- [k: string]: unknown;
3183
- };
3184
- deviceId: string;
3185
- isDefault: boolean;
3186
- assignedRef: string | null;
3187
- }>;
3188
- export declare const sUpdateDevicePresetRequest: z.ZodObject<{
3189
- name: z.ZodOptional<z.ZodString>;
3190
- isDefault: z.ZodOptional<z.ZodBoolean>;
3191
- assignedRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3192
- deviceId: z.ZodString;
3193
- presetId: z.ZodString;
3194
- }, "strip", z.ZodTypeAny, {
3195
- deviceId: string;
3196
- presetId: string;
3197
- name?: string | undefined;
3198
- isDefault?: boolean | undefined;
3199
- assignedRef?: string | null | undefined;
3200
- }, {
3201
- deviceId: string;
3202
- presetId: string;
3203
- name?: string | undefined;
3204
- isDefault?: boolean | undefined;
3205
- assignedRef?: string | null | undefined;
3206
- }>;
3207
- export declare const sRemoveDevicePresetRequest: z.ZodObject<{
3208
- deviceId: z.ZodString;
3209
- presetId: z.ZodString;
3210
- }, "strip", z.ZodTypeAny, {
3211
- deviceId: string;
3212
- presetId: string;
3213
- }, {
3214
- deviceId: string;
3215
- presetId: string;
3216
- }>;
3217
3058
  export declare const sEventVariantDescription: z.ZodObject<{
3218
3059
  name: z.ZodString;
3219
3060
  label: z.ZodString;
@@ -3252,47 +3093,6 @@ export declare const sEventDescription: z.ZodObject<{
3252
3093
  label: string;
3253
3094
  }[] | undefined;
3254
3095
  }>;
3255
- export declare const sGetEventCatalogResponse: z.ZodArray<z.ZodObject<{
3256
- kind: z.ZodString;
3257
- label: z.ZodString;
3258
- variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
3259
- name: z.ZodString;
3260
- label: z.ZodString;
3261
- }, "strip", z.ZodTypeAny, {
3262
- name: string;
3263
- label: string;
3264
- }, {
3265
- name: string;
3266
- label: string;
3267
- }>, "many">>;
3268
- }, "strip", z.ZodTypeAny, {
3269
- label: string;
3270
- kind: string;
3271
- variants?: {
3272
- name: string;
3273
- label: string;
3274
- }[] | undefined;
3275
- }, {
3276
- label: string;
3277
- kind: string;
3278
- variants?: {
3279
- name: string;
3280
- label: string;
3281
- }[] | undefined;
3282
- }>, "many">;
3283
- export declare const sSetUnsetRelationRequest: z.ZodObject<{
3284
- leftId: z.ZodString;
3285
- rightId: z.ZodString;
3286
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3287
- }, "strip", z.ZodUnknown, z.objectOutputType<{
3288
- leftId: z.ZodString;
3289
- rightId: z.ZodString;
3290
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3291
- }, z.ZodUnknown, "strip">, z.objectInputType<{
3292
- leftId: z.ZodString;
3293
- rightId: z.ZodString;
3294
- kind: z.ZodEnum<["attachedTo", "parent", "child", "holds", "isHeldBy", "observes", "isObservedBy", "sendsInputTo", "receivesInputFrom", "sendsOutputTo", "receivesOutputFrom", "unlocks", "isUnlockedBy", "controls", "isControlledBy", "records", "isRecordedBy", "reads", "isReadBy"]>;
3295
- }, z.ZodUnknown, "strip">>;
3296
3096
  export type DeviceType = z.infer<typeof sDeviceType>;
3297
3097
  export type PresetDto = z.infer<typeof sPresetDto>;
3298
3098
  export type DeviceDto = z.infer<typeof sDeviceDto>;
@@ -3315,17 +3115,4 @@ export type RecorderDto = z.infer<typeof sRecorderDto>;
3315
3115
  export type NvrExporterDto = z.infer<typeof sNvrExporterDto>;
3316
3116
  export type NvrAnalyticsServerDto = z.infer<typeof sNvrAnalyticsServerDto>;
3317
3117
  export type SystemDeviceDto = z.infer<typeof sSystemDeviceDto>;
3318
- export type AddDeviceRequest = z.infer<typeof sAddDeviceRequest>;
3319
- export type UpdateDeviceRequest = z.infer<typeof sUpdateDeviceRequest>;
3320
- export type OverrideDeviceSpecsRequest = z.infer<typeof sOverrideDeviceSpecsRequest>;
3321
- export type AddDevicePresetRequest = z.infer<typeof sAddDevicePresetRequest>;
3322
- export type UpdateDevicePresetRequest = z.infer<typeof sUpdateDevicePresetRequest>;
3323
- export type RemoveDevicePresetRequest = z.infer<typeof sRemoveDevicePresetRequest>;
3324
- export type SetUnsetDeviceRelationRequest = z.infer<typeof sSetUnsetRelationRequest>;
3325
- export type DeviceSearchCriteria = {
3326
- type: DeviceType;
3327
- };
3328
3118
  export type EventDescription = z.infer<typeof sEventDescription>;
3329
- export type EventVariantDescription = z.infer<typeof sEventVariantDescription>;
3330
- export type GetEventCatalogResponse = z.infer<typeof sGetEventCatalogResponse>;
3331
- export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sSetUnsetRelationRequest = exports.sGetEventCatalogResponse = exports.sEventDescription = exports.sEventVariantDescription = exports.sRemoveDevicePresetRequest = exports.sUpdateDevicePresetRequest = exports.sAddDevicePresetRequest = exports.sOverrideDeviceSpecsRequest = exports.sUpdateDeviceRequest = exports.sAddDeviceRequest = 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.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.DEVICE_TYPES = void 0;
3
+ 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.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");
@@ -42,7 +42,7 @@ exports.DEVICE_TYPES = [
42
42
  nvr_analytics_server_1.NVR_ANALYTICS_SERVER,
43
43
  system_1.SYSTEM,
44
44
  ];
45
- const sDeviceType = zod_1.z.enum(exports.DEVICE_TYPES);
45
+ exports.sDeviceType = zod_1.z.enum(exports.DEVICE_TYPES);
46
46
  const sAlarmSpecsWithType = alarm_1.sAlarmSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(alarm_1.ALARM) }));
47
47
  const sCameraSpecsWithType = camera_1.sCameraSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(camera_1.CAMERA) }));
48
48
  const sDoorSpecsWithType = door_1.sDoorSpecs.merge(zod_1.z.object({ type: zod_1.z.literal(door_1.DOOR) }));
@@ -183,49 +183,6 @@ exports.sNvrAnalyticsServerDto = exports.sNvrAnalyticsServerSpecsWithType
183
183
  exports.sSystemDeviceDto = exports.sSystemDeviceSpecsWithType
184
184
  .and(exports.sDeviceMgmtInfo)
185
185
  .and(exports.sForeignDeviceInfo);
186
- exports.sAddDeviceRequest = zod_1.z.object({
187
- name: zod_1.z.string().nonempty(),
188
- foreignRef: zod_1.z.string().nonempty(),
189
- notes: zod_1.z.string().nullable(),
190
- provider: zod_1.z.string().nonempty(),
191
- providerMetadata: exports.sProviderMetadata,
192
- tags: zod_1.z.array(zod_1.z.string().nonempty()),
193
- relations: zod_1.z.array(device_relation_1.sDeviceRelationSide),
194
- type: sDeviceType,
195
- specs: zod_1.z.object({}).catchall(zod_1.z.unknown()).optional(),
196
- });
197
- exports.sUpdateDeviceRequest = zod_1.z.object({
198
- id: zod_1.z.string().nonempty(),
199
- name: zod_1.z.string().optional(),
200
- notes: zod_1.z.string().nullable().optional(),
201
- providerMetadata: zod_1.z.object({}).catchall(zod_1.z.unknown()).optional(),
202
- specs: zod_1.z.object({}).catchall(zod_1.z.unknown()).optional(),
203
- tags: zod_1.z.array(zod_1.z.string()).optional(),
204
- relations: zod_1.z.array(device_relation_1.sDeviceRelationSide).optional(),
205
- enabled: zod_1.z.boolean().optional(),
206
- });
207
- exports.sOverrideDeviceSpecsRequest = zod_1.z.object({
208
- id: zod_1.z.string(),
209
- specs: zod_1.z.object({}).catchall(zod_1.z.unknown()),
210
- });
211
- exports.sAddDevicePresetRequest = zod_1.z.object({
212
- name: zod_1.z.string().nonempty(),
213
- params: zod_1.z.object({}).catchall(zod_1.z.unknown()),
214
- assignedRef: zod_1.z.string().nullable(),
215
- isDefault: zod_1.z.boolean(),
216
- deviceId: zod_1.z.string().nonempty(),
217
- });
218
- exports.sUpdateDevicePresetRequest = zod_1.z.object({
219
- name: zod_1.z.string().optional(),
220
- isDefault: zod_1.z.boolean().optional(),
221
- assignedRef: zod_1.z.string().nullable().optional(),
222
- deviceId: zod_1.z.string().nonempty(),
223
- presetId: zod_1.z.string().nonempty(),
224
- });
225
- exports.sRemoveDevicePresetRequest = zod_1.z.object({
226
- deviceId: zod_1.z.string().nonempty(),
227
- presetId: zod_1.z.string().nonempty(),
228
- });
229
186
  exports.sEventVariantDescription = zod_1.z.object({
230
187
  name: zod_1.z.string().describe('The name of the variant'),
231
188
  label: zod_1.z.string().describe('A human-readable label for the variant'),
@@ -238,5 +195,3 @@ exports.sEventDescription = zod_1.z.object({
238
195
  .optional()
239
196
  .describe('Possible variants derived from event data'),
240
197
  });
241
- exports.sGetEventCatalogResponse = zod_1.z.array(exports.sEventDescription);
242
- exports.sSetUnsetRelationRequest = device_relation_1.sDeviceRelationDto;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "2.0.28",
3
+ "version": "2.0.30",
4
4
  "description": "Common types between backend, agent(s) and frontend(s)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -5,6 +5,7 @@ export declare const sDeviceEvent: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5
5
  export declare const sPersonId: z.ZodString;
6
6
  export declare const sZoneId: z.ZodString;
7
7
  export declare const sMacroId: z.ZodString;
8
+ export declare const sWorldObjectId: z.ZodString;
8
9
  export declare const sDuration: z.ZodNumber;
9
10
  export declare const sUrl: z.ZodString;
10
11
  export declare const sFileResponse: z.ZodNullable<z.ZodObject<{
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sCallDirection = exports.sCallState = exports.sCameraPresetInfo = exports.sNotificationSeverity = exports.sDeviceParam = exports.sForeignDeviceId = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sMacroId = exports.sZoneId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
3
+ exports.sCallDirection = exports.sCallState = exports.sCameraPresetInfo = exports.sNotificationSeverity = exports.sDeviceParam = exports.sForeignDeviceId = exports.sAgentDeviceInfo = exports.sFileResponse = exports.sUrl = exports.sDuration = exports.sWorldObjectId = exports.sMacroId = exports.sZoneId = exports.sPersonId = exports.sDeviceEvent = exports.sPresetId = exports.sDeviceId = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const device_1 = require("./objects/device");
6
6
  exports.sDeviceId = zod_1.z.string().uuid().nonempty();
@@ -9,6 +9,7 @@ exports.sDeviceEvent = zod_1.z.record(zod_1.z.unknown());
9
9
  exports.sPersonId = zod_1.z.string().uuid().nonempty();
10
10
  exports.sZoneId = zod_1.z.string().uuid().nonempty();
11
11
  exports.sMacroId = zod_1.z.string().uuid().nonempty();
12
+ exports.sWorldObjectId = zod_1.z.string().nonempty();
12
13
  // general
13
14
  exports.sDuration = zod_1.z.number().min(0).describe('Duration in milliseconds');
14
15
  exports.sUrl = zod_1.z.string().url().describe('A valid URL');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/api-types",
3
- "version": "2.0.28",
3
+ "version": "2.0.30",
4
4
  "description": "Common types between backend, agent(s) and frontend(s)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",