@awarevue/api-types 2.0.154 → 2.0.155

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.
@@ -223,6 +223,14 @@ export declare const eventSchemaByKind: {
223
223
  }, z.core.$strip>;
224
224
  assignedRef: z.ZodNullable<z.ZodString>;
225
225
  }, z.core.$strip>;
226
+ 'privacy-mode-set': z.ZodObject<{
227
+ kind: z.ZodLiteral<"privacy-mode-set">;
228
+ userId: z.ZodOptional<z.ZodString>;
229
+ }, z.core.$strip>;
230
+ 'privacy-mode-unset': z.ZodObject<{
231
+ kind: z.ZodLiteral<"privacy-mode-unset">;
232
+ userId: z.ZodOptional<z.ZodString>;
233
+ }, z.core.$strip>;
226
234
  'object-detection-started': z.ZodIntersection<z.ZodObject<{
227
235
  kind: z.ZodLiteral<"object-detection-started">;
228
236
  providerAssignedRef: z.ZodString;
@@ -70,6 +70,8 @@ exports.eventKindLabels = {
70
70
  'object-updated': 'Object Updated',
71
71
  'object-deleted': 'Object Deleted',
72
72
  'ptz-preset-saved': 'PTZ Preset Saved on Device',
73
+ 'privacy-mode-set': 'Privacy Mode Set',
74
+ 'privacy-mode-unset': 'Privacy Mode Unset',
73
75
  'person-in': 'Person Checked In',
74
76
  'person-out': 'Person Checked Out',
75
77
  'object-detection-started': 'Object Detection Started',
@@ -9,6 +9,16 @@ export declare const sCameraPtzPresetSaved: z.ZodObject<{
9
9
  }, z.core.$strip>;
10
10
  assignedRef: z.ZodNullable<z.ZodString>;
11
11
  }, z.core.$strip>;
12
+ /** The camera's privacy mode was turned on: nothing is recorded or watched. */
13
+ export declare const sPrivacyModeSet: z.ZodObject<{
14
+ kind: z.ZodLiteral<"privacy-mode-set">;
15
+ userId: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ /** The camera's privacy mode was turned off: it records and can be watched again. */
18
+ export declare const sPrivacyModeUnset: z.ZodObject<{
19
+ kind: z.ZodLiteral<"privacy-mode-unset">;
20
+ userId: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strip>;
12
22
  /** A box in the picture the object was detected in, in pixels of that picture. */
13
23
  export declare const sBoxLocator: z.ZodObject<{
14
24
  locatorKind: z.ZodLiteral<"box">;
@@ -166,6 +176,14 @@ export declare const cameraEventSchemasByKind: {
166
176
  }, z.core.$strip>;
167
177
  assignedRef: z.ZodNullable<z.ZodString>;
168
178
  }, z.core.$strip>;
179
+ readonly 'privacy-mode-set': z.ZodObject<{
180
+ kind: z.ZodLiteral<"privacy-mode-set">;
181
+ userId: z.ZodOptional<z.ZodString>;
182
+ }, z.core.$strip>;
183
+ readonly 'privacy-mode-unset': z.ZodObject<{
184
+ kind: z.ZodLiteral<"privacy-mode-unset">;
185
+ userId: z.ZodOptional<z.ZodString>;
186
+ }, z.core.$strip>;
169
187
  readonly 'object-detection-started': z.ZodIntersection<z.ZodObject<{
170
188
  kind: z.ZodLiteral<"object-detection-started">;
171
189
  providerAssignedRef: z.ZodString;
@@ -267,6 +285,8 @@ export declare const cameraEventSchemasByKind: {
267
285
  }, z.core.$strip>>;
268
286
  };
269
287
  export type CameraPtzPresetSaved = z.infer<typeof sCameraPtzPresetSaved>;
288
+ export type PrivacyModeSet = z.infer<typeof sPrivacyModeSet>;
289
+ export type PrivacyModeUnset = z.infer<typeof sPrivacyModeUnset>;
270
290
  export type BoxLocator = z.infer<typeof sBoxLocator>;
271
291
  export type ObjectLocator = z.infer<typeof sObjectLocator>;
272
292
  export type ObjectDetectionData = z.infer<typeof sObjectDetectionData>;
@@ -277,4 +297,4 @@ export type SceneData = z.infer<typeof sSceneData>;
277
297
  export type SceneCreated = z.infer<typeof sSceneCreated>;
278
298
  export type SceneUpdated = z.infer<typeof sSceneUpdated>;
279
299
  export type SceneEnded = z.infer<typeof sSceneEnded>;
280
- export type CameraEvent = CameraPtzPresetSaved | ObjectDetectionStarted | ObjectDetectionUpdated | ObjectDetectionEnded | SceneCreated | SceneUpdated | SceneEnded;
300
+ export type CameraEvent = CameraPtzPresetSaved | PrivacyModeSet | PrivacyModeUnset | ObjectDetectionStarted | ObjectDetectionUpdated | ObjectDetectionEnded | SceneCreated | SceneUpdated | SceneEnded;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cameraEventSchemasByKind = exports.sSceneEnded = exports.sSceneUpdated = exports.sSceneCreated = exports.sSceneData = exports.sObjectDetectionEnded = exports.sObjectDetectionUpdated = exports.sObjectDetectionStarted = exports.sObjectDetectionData = exports.sObjectLocator = exports.sBoxLocator = exports.sCameraPtzPresetSaved = void 0;
3
+ exports.cameraEventSchemasByKind = exports.sSceneEnded = exports.sSceneUpdated = exports.sSceneCreated = exports.sSceneData = exports.sObjectDetectionEnded = exports.sObjectDetectionUpdated = exports.sObjectDetectionStarted = exports.sObjectDetectionData = exports.sObjectLocator = exports.sBoxLocator = exports.sPrivacyModeUnset = exports.sPrivacyModeSet = exports.sCameraPtzPresetSaved = void 0;
4
4
  const primitives_1 = require("../../primitives");
5
5
  const zod_1 = require("zod");
6
6
  // EVENTS
@@ -10,6 +10,16 @@ exports.sCameraPtzPresetSaved = zod_1.z.object({
10
10
  presetInfo: primitives_1.sCameraPresetInfo,
11
11
  assignedRef: zod_1.z.string().nullable(),
12
12
  });
13
+ /** The camera's privacy mode was turned on: nothing is recorded or watched. */
14
+ exports.sPrivacyModeSet = zod_1.z.object({
15
+ kind: zod_1.z.literal('privacy-mode-set'),
16
+ userId: zod_1.z.string().optional(),
17
+ });
18
+ /** The camera's privacy mode was turned off: it records and can be watched again. */
19
+ exports.sPrivacyModeUnset = zod_1.z.object({
20
+ kind: zod_1.z.literal('privacy-mode-unset'),
21
+ userId: zod_1.z.string().optional(),
22
+ });
13
23
  /** A box in the picture the object was detected in, in pixels of that picture. */
14
24
  exports.sBoxLocator = zod_1.z.object({
15
25
  locatorKind: zod_1.z.literal('box'),
@@ -112,6 +122,8 @@ exports.sSceneEnded = zod_1.z
112
122
  .and(exports.sSceneData);
113
123
  exports.cameraEventSchemasByKind = {
114
124
  'ptz-preset-saved': exports.sCameraPtzPresetSaved,
125
+ 'privacy-mode-set': exports.sPrivacyModeSet,
126
+ 'privacy-mode-unset': exports.sPrivacyModeUnset,
115
127
  'object-detection-started': exports.sObjectDetectionStarted,
116
128
  'object-detection-updated': exports.sObjectDetectionUpdated,
117
129
  'object-detection-ended': exports.sObjectDetectionEnded,
@@ -1,45 +1,8 @@
1
1
  import z from 'zod';
2
- export declare const sAddImageLayoutRequest: z.ZodObject<{
2
+ export declare const sAddLayoutRequest: z.ZodObject<{
3
3
  name: z.ZodString;
4
- order: z.ZodOptional<z.ZodNumber>;
5
- devices: z.ZodArray<z.ZodObject<{
6
- deviceId: z.ZodString;
7
- x: z.ZodNumber;
8
- y: z.ZodNumber;
9
- scale: z.ZodNumber;
10
- rotation: z.ZodNumber;
11
- fov: z.ZodNumber;
12
- far: z.ZodNumber;
13
- displayAs: z.ZodNullable<z.ZodString>;
14
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
16
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
17
- width: z.ZodOptional<z.ZodNumber>;
18
- hinge: z.ZodOptional<z.ZodEnum<{
19
- start: "start";
20
- end: "end";
21
- }>>;
22
- opens: z.ZodOptional<z.ZodEnum<{
23
- right: "right";
24
- left: "left";
25
- }>>;
26
- size: z.ZodOptional<z.ZodNumber>;
27
- room: z.ZodOptional<z.ZodString>;
28
- viewId: z.ZodOptional<z.ZodString>;
29
- calibration: z.ZodOptional<z.ZodObject<{
30
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
31
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
32
- }, z.core.$strip>>;
33
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
34
- }, z.core.$strip>>>;
35
- }, z.core.$strip>>;
36
- colorize: z.ZodBoolean;
37
- kind: z.ZodLiteral<"image">;
38
4
  thumbnailId: z.ZodString;
39
5
  imageId: z.ZodString;
40
- }, z.core.$strip>;
41
- export declare const sAddMapLayoutRequest: z.ZodObject<{
42
- name: z.ZodString;
43
6
  order: z.ZodOptional<z.ZodNumber>;
44
7
  devices: z.ZodArray<z.ZodObject<{
45
8
  deviceId: z.ZodString;
@@ -50,188 +13,10 @@ export declare const sAddMapLayoutRequest: z.ZodObject<{
50
13
  fov: z.ZodNumber;
51
14
  far: z.ZodNumber;
52
15
  displayAs: z.ZodNullable<z.ZodString>;
53
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
55
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
56
- width: z.ZodOptional<z.ZodNumber>;
57
- hinge: z.ZodOptional<z.ZodEnum<{
58
- start: "start";
59
- end: "end";
60
- }>>;
61
- opens: z.ZodOptional<z.ZodEnum<{
62
- right: "right";
63
- left: "left";
64
- }>>;
65
- size: z.ZodOptional<z.ZodNumber>;
66
- room: z.ZodOptional<z.ZodString>;
67
- viewId: z.ZodOptional<z.ZodString>;
68
- calibration: z.ZodOptional<z.ZodObject<{
69
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
70
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
71
- }, z.core.$strip>>;
72
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
73
- }, z.core.$strip>>>;
74
16
  }, z.core.$strip>>;
75
17
  colorize: z.ZodBoolean;
76
- kind: z.ZodLiteral<"map">;
77
- }, z.core.$strip>;
78
- /** An image layout, or a map layout when `map` is true, chosen by a flag rather than by `kind`. */
79
- export declare const sAddImageOrMapLayoutRequest: z.ZodObject<{
80
- name: z.ZodString;
81
- order: z.ZodOptional<z.ZodNumber>;
82
- devices: z.ZodArray<z.ZodObject<{
83
- deviceId: z.ZodString;
84
- x: z.ZodNumber;
85
- y: z.ZodNumber;
86
- scale: z.ZodNumber;
87
- rotation: z.ZodNumber;
88
- fov: z.ZodNumber;
89
- far: z.ZodNumber;
90
- displayAs: z.ZodNullable<z.ZodString>;
91
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
93
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
94
- width: z.ZodOptional<z.ZodNumber>;
95
- hinge: z.ZodOptional<z.ZodEnum<{
96
- start: "start";
97
- end: "end";
98
- }>>;
99
- opens: z.ZodOptional<z.ZodEnum<{
100
- right: "right";
101
- left: "left";
102
- }>>;
103
- size: z.ZodOptional<z.ZodNumber>;
104
- room: z.ZodOptional<z.ZodString>;
105
- viewId: z.ZodOptional<z.ZodString>;
106
- calibration: z.ZodOptional<z.ZodObject<{
107
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
108
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
109
- }, z.core.$strip>>;
110
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
111
- }, z.core.$strip>>>;
112
- }, z.core.$strip>>;
113
- colorize: z.ZodBoolean;
114
- thumbnailId: z.ZodString;
115
- imageId: z.ZodString;
116
18
  map: z.ZodBoolean;
117
19
  }, z.core.$strip>;
118
- /** `3d` layouts are created by importing their model (POST /layouts/models). */
119
- export declare const sAddLayoutRequest: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
120
- name: z.ZodString;
121
- order: z.ZodOptional<z.ZodNumber>;
122
- devices: z.ZodArray<z.ZodObject<{
123
- deviceId: z.ZodString;
124
- x: z.ZodNumber;
125
- y: z.ZodNumber;
126
- scale: z.ZodNumber;
127
- rotation: z.ZodNumber;
128
- fov: z.ZodNumber;
129
- far: z.ZodNumber;
130
- displayAs: z.ZodNullable<z.ZodString>;
131
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
133
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
134
- width: z.ZodOptional<z.ZodNumber>;
135
- hinge: z.ZodOptional<z.ZodEnum<{
136
- start: "start";
137
- end: "end";
138
- }>>;
139
- opens: z.ZodOptional<z.ZodEnum<{
140
- right: "right";
141
- left: "left";
142
- }>>;
143
- size: z.ZodOptional<z.ZodNumber>;
144
- room: z.ZodOptional<z.ZodString>;
145
- viewId: z.ZodOptional<z.ZodString>;
146
- calibration: z.ZodOptional<z.ZodObject<{
147
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
148
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
149
- }, z.core.$strip>>;
150
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
151
- }, z.core.$strip>>>;
152
- }, z.core.$strip>>;
153
- colorize: z.ZodBoolean;
154
- kind: z.ZodLiteral<"image">;
155
- thumbnailId: z.ZodString;
156
- imageId: z.ZodString;
157
- }, z.core.$strip>, z.ZodObject<{
158
- name: z.ZodString;
159
- order: z.ZodOptional<z.ZodNumber>;
160
- devices: z.ZodArray<z.ZodObject<{
161
- deviceId: z.ZodString;
162
- x: z.ZodNumber;
163
- y: z.ZodNumber;
164
- scale: z.ZodNumber;
165
- rotation: z.ZodNumber;
166
- fov: z.ZodNumber;
167
- far: z.ZodNumber;
168
- displayAs: z.ZodNullable<z.ZodString>;
169
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
170
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
171
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
172
- width: z.ZodOptional<z.ZodNumber>;
173
- hinge: z.ZodOptional<z.ZodEnum<{
174
- start: "start";
175
- end: "end";
176
- }>>;
177
- opens: z.ZodOptional<z.ZodEnum<{
178
- right: "right";
179
- left: "left";
180
- }>>;
181
- size: z.ZodOptional<z.ZodNumber>;
182
- room: z.ZodOptional<z.ZodString>;
183
- viewId: z.ZodOptional<z.ZodString>;
184
- calibration: z.ZodOptional<z.ZodObject<{
185
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
186
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
187
- }, z.core.$strip>>;
188
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
189
- }, z.core.$strip>>>;
190
- }, z.core.$strip>>;
191
- colorize: z.ZodBoolean;
192
- kind: z.ZodLiteral<"map">;
193
- }, z.core.$strip>], "kind">, z.ZodObject<{
194
- name: z.ZodString;
195
- order: z.ZodOptional<z.ZodNumber>;
196
- devices: z.ZodArray<z.ZodObject<{
197
- deviceId: z.ZodString;
198
- x: z.ZodNumber;
199
- y: z.ZodNumber;
200
- scale: z.ZodNumber;
201
- rotation: z.ZodNumber;
202
- fov: z.ZodNumber;
203
- far: z.ZodNumber;
204
- displayAs: z.ZodNullable<z.ZodString>;
205
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
207
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
208
- width: z.ZodOptional<z.ZodNumber>;
209
- hinge: z.ZodOptional<z.ZodEnum<{
210
- start: "start";
211
- end: "end";
212
- }>>;
213
- opens: z.ZodOptional<z.ZodEnum<{
214
- right: "right";
215
- left: "left";
216
- }>>;
217
- size: z.ZodOptional<z.ZodNumber>;
218
- room: z.ZodOptional<z.ZodString>;
219
- viewId: z.ZodOptional<z.ZodString>;
220
- calibration: z.ZodOptional<z.ZodObject<{
221
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
222
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
223
- }, z.core.$strip>>;
224
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
225
- }, z.core.$strip>>>;
226
- }, z.core.$strip>>;
227
- colorize: z.ZodBoolean;
228
- thumbnailId: z.ZodString;
229
- imageId: z.ZodString;
230
- map: z.ZodBoolean;
231
- }, z.core.$strip>]>;
232
- export type AddImageLayoutRequest = z.infer<typeof sAddImageLayoutRequest>;
233
- export type AddMapLayoutRequest = z.infer<typeof sAddMapLayoutRequest>;
234
- export type AddImageOrMapLayoutRequest = z.infer<typeof sAddImageOrMapLayoutRequest>;
235
20
  export type AddLayoutRequest = z.infer<typeof sAddLayoutRequest>;
236
21
  export declare const sUpdateLayoutRequest: z.ZodObject<{
237
22
  name: z.ZodOptional<z.ZodString>;
@@ -248,29 +33,7 @@ export declare const sUpdateLayoutRequest: z.ZodObject<{
248
33
  fov: z.ZodNumber;
249
34
  far: z.ZodNumber;
250
35
  displayAs: z.ZodNullable<z.ZodString>;
251
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
252
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
253
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
254
- width: z.ZodOptional<z.ZodNumber>;
255
- hinge: z.ZodOptional<z.ZodEnum<{
256
- start: "start";
257
- end: "end";
258
- }>>;
259
- opens: z.ZodOptional<z.ZodEnum<{
260
- right: "right";
261
- left: "left";
262
- }>>;
263
- size: z.ZodOptional<z.ZodNumber>;
264
- room: z.ZodOptional<z.ZodString>;
265
- viewId: z.ZodOptional<z.ZodString>;
266
- calibration: z.ZodOptional<z.ZodObject<{
267
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
268
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
269
- }, z.core.$strip>>;
270
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
271
- }, z.core.$strip>>>;
272
36
  }, z.core.$strip>>>;
273
- placementsRev: z.ZodOptional<z.ZodNumber>;
274
37
  colorize: z.ZodOptional<z.ZodBoolean>;
275
38
  map: z.ZodOptional<z.ZodBoolean>;
276
39
  }, z.core.$strip>;
@@ -3,55 +3,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.sUpdateLayoutRequest = exports.sAddLayoutRequest = exports.sAddImageOrMapLayoutRequest = exports.sAddMapLayoutRequest = exports.sAddImageLayoutRequest = void 0;
6
+ exports.sUpdateLayoutRequest = exports.sAddLayoutRequest = void 0;
7
7
  const layout_1 = require("../../objects/layout");
8
8
  const zod_1 = __importDefault(require("zod"));
9
- const sAddLayoutBase = zod_1.default.object({
9
+ exports.sAddLayoutRequest = zod_1.default.object({
10
10
  name: zod_1.default.string().nonempty(),
11
+ thumbnailId: zod_1.default.string().nonempty(),
12
+ imageId: zod_1.default.string().nonempty(),
11
13
  order: zod_1.default.number().optional(),
12
14
  devices: zod_1.default.array(layout_1.sLayoutDeviceDto),
13
15
  colorize: zod_1.default.boolean(),
16
+ map: zod_1.default.boolean(),
14
17
  });
15
- exports.sAddImageLayoutRequest = sAddLayoutBase.extend({
16
- kind: zod_1.default.literal('image'),
17
- thumbnailId: zod_1.default.string().nonempty(),
18
- imageId: zod_1.default.string().nonempty(),
19
- });
20
- exports.sAddMapLayoutRequest = sAddLayoutBase.extend({
21
- kind: zod_1.default.literal('map'),
22
- });
23
- /** An image layout, or a map layout when `map` is true, chosen by a flag rather than by `kind`. */
24
- exports.sAddImageOrMapLayoutRequest = sAddLayoutBase.extend({
25
- thumbnailId: zod_1.default.string().nonempty(),
26
- imageId: zod_1.default.string().nonempty(),
27
- map: zod_1.default.boolean().describe('True for a map layout, false for an image layout'),
28
- });
29
- /** `3d` layouts are created by importing their model (POST /layouts/models). */
30
- exports.sAddLayoutRequest = zod_1.default.union([
31
- zod_1.default.discriminatedUnion('kind', [exports.sAddImageLayoutRequest, exports.sAddMapLayoutRequest]),
32
- exports.sAddImageOrMapLayoutRequest,
33
- ]);
34
18
  exports.sUpdateLayoutRequest = zod_1.default.object({
35
19
  name: zod_1.default.string().optional(),
36
- thumbnailId: zod_1.default
37
- .string()
38
- .optional()
39
- .describe('Not for 3d layouts, which have no image'),
40
- imageId: zod_1.default
41
- .string()
42
- .optional()
43
- .describe('Not for 3d layouts, which have no image'),
20
+ thumbnailId: zod_1.default.string().optional(),
21
+ imageId: zod_1.default.string().optional(),
44
22
  order: zod_1.default.number().optional(),
45
23
  isDefault: zod_1.default.boolean().optional(),
46
24
  devices: zod_1.default.array(layout_1.sLayoutDeviceDto).optional(),
47
- placementsRev: zod_1.default
48
- .number()
49
- .int()
50
- .optional()
51
- .describe("The layout's placementsRev the devices were edited from. When sent with devices, the save is refused if someone else saved meanwhile."),
52
25
  colorize: zod_1.default.boolean().optional(),
53
- map: zod_1.default
54
- .boolean()
55
- .optional()
56
- .describe('Ignored: a layout keeps the kind it was made with'),
26
+ map: zod_1.default.boolean().optional(),
57
27
  });
@@ -1,51 +1,4 @@
1
1
  import { z } from 'zod';
2
- /**
3
- * What a layout's document is, fixed when the layout is created:
4
- * - `image`: a plan image (SVG/PNG); devices are placed on the image.
5
- * - `map`: the world map; devices are placed on the map.
6
- * - `3d`: a 3D model (model.json plus plan images); devices are placed on the model's levels, in metres.
7
- */
8
- export declare const sLayoutKind: z.ZodEnum<{
9
- map: "map";
10
- image: "image";
11
- "3d": "3d";
12
- }>;
13
- export type LayoutKind = z.infer<typeof sLayoutKind>;
14
- /** Four points in a camera's picture, as fractions of its width and height, and the four level points they show. */
15
- export declare const sCameraCalibration: z.ZodObject<{
16
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
17
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
18
- }, z.core.$strip>;
19
- export type CameraCalibration = z.infer<typeof sCameraCalibration>;
20
- /** Placement attributes that only some device types use. Absent keys take the device type's defaults. */
21
- export declare const sLayoutDeviceExtras: z.ZodObject<{
22
- width: z.ZodOptional<z.ZodNumber>;
23
- hinge: z.ZodOptional<z.ZodEnum<{
24
- start: "start";
25
- end: "end";
26
- }>>;
27
- opens: z.ZodOptional<z.ZodEnum<{
28
- right: "right";
29
- left: "left";
30
- }>>;
31
- size: z.ZodOptional<z.ZodNumber>;
32
- room: z.ZodOptional<z.ZodString>;
33
- viewId: z.ZodOptional<z.ZodString>;
34
- calibration: z.ZodOptional<z.ZodObject<{
35
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
36
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
37
- }, z.core.$strip>>;
38
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
39
- }, z.core.$strip>;
40
- export type LayoutDeviceExtras = z.infer<typeof sLayoutDeviceExtras>;
41
- /**
42
- * A device placed on a layout. What x, y and rotation mean depends on the layout's kind:
43
- * - `image` and `map`: a position on the image or map, as the layout editor stores it.
44
- * - `3d`: metres on the level, x along the model's x axis (towards the bow) and y along its z axis; rotation is the
45
- * heading in degrees, 0 towards +x and 90 towards +y; scale is 1.
46
- *
47
- * In requests, `level`, `height` and `extras` left out keep their stored values, and null clears them.
48
- */
49
2
  export declare const sLayoutDeviceDto: z.ZodObject<{
50
3
  deviceId: z.ZodString;
51
4
  x: z.ZodNumber;
@@ -55,77 +8,13 @@ export declare const sLayoutDeviceDto: z.ZodObject<{
55
8
  fov: z.ZodNumber;
56
9
  far: z.ZodNumber;
57
10
  displayAs: z.ZodNullable<z.ZodString>;
58
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
60
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
61
- width: z.ZodOptional<z.ZodNumber>;
62
- hinge: z.ZodOptional<z.ZodEnum<{
63
- start: "start";
64
- end: "end";
65
- }>>;
66
- opens: z.ZodOptional<z.ZodEnum<{
67
- right: "right";
68
- left: "left";
69
- }>>;
70
- size: z.ZodOptional<z.ZodNumber>;
71
- room: z.ZodOptional<z.ZodString>;
72
- viewId: z.ZodOptional<z.ZodString>;
73
- calibration: z.ZodOptional<z.ZodObject<{
74
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
75
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
76
- }, z.core.$strip>>;
77
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
78
- }, z.core.$strip>>>;
79
11
  }, z.core.$strip>;
80
12
  export type LayoutDeviceDto = z.infer<typeof sLayoutDeviceDto>;
81
- export declare const sImageLayoutDto: z.ZodObject<{
13
+ export declare const sLayoutDto: z.ZodObject<{
82
14
  id: z.ZodString;
83
15
  name: z.ZodString;
84
- order: z.ZodNumber;
85
- isDefault: z.ZodBoolean;
86
- devices: z.ZodArray<z.ZodObject<{
87
- deviceId: z.ZodString;
88
- x: z.ZodNumber;
89
- y: z.ZodNumber;
90
- scale: z.ZodNumber;
91
- rotation: z.ZodNumber;
92
- fov: z.ZodNumber;
93
- far: z.ZodNumber;
94
- displayAs: z.ZodNullable<z.ZodString>;
95
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
97
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
98
- width: z.ZodOptional<z.ZodNumber>;
99
- hinge: z.ZodOptional<z.ZodEnum<{
100
- start: "start";
101
- end: "end";
102
- }>>;
103
- opens: z.ZodOptional<z.ZodEnum<{
104
- right: "right";
105
- left: "left";
106
- }>>;
107
- size: z.ZodOptional<z.ZodNumber>;
108
- room: z.ZodOptional<z.ZodString>;
109
- viewId: z.ZodOptional<z.ZodString>;
110
- calibration: z.ZodOptional<z.ZodObject<{
111
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
112
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
113
- }, z.core.$strip>>;
114
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
115
- }, z.core.$strip>>>;
116
- }, z.core.$strip>>;
117
- colorize: z.ZodBoolean;
118
- placementsRev: z.ZodNumber;
119
- map: z.ZodBoolean;
120
- createdOn: z.ZodString;
121
- lastModifiedOn: z.ZodString;
122
- kind: z.ZodLiteral<"image">;
16
+ thumbnailUrl: z.ZodString;
123
17
  imageUrl: z.ZodString;
124
- thumbnailUrl: z.ZodOptional<z.ZodString>;
125
- }, z.core.$strip>;
126
- export declare const sMapLayoutDto: z.ZodObject<{
127
- id: z.ZodString;
128
- name: z.ZodString;
129
18
  order: z.ZodNumber;
130
19
  isDefault: z.ZodBoolean;
131
20
  devices: z.ZodArray<z.ZodObject<{
@@ -137,221 +26,10 @@ export declare const sMapLayoutDto: z.ZodObject<{
137
26
  fov: z.ZodNumber;
138
27
  far: z.ZodNumber;
139
28
  displayAs: z.ZodNullable<z.ZodString>;
140
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
142
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
143
- width: z.ZodOptional<z.ZodNumber>;
144
- hinge: z.ZodOptional<z.ZodEnum<{
145
- start: "start";
146
- end: "end";
147
- }>>;
148
- opens: z.ZodOptional<z.ZodEnum<{
149
- right: "right";
150
- left: "left";
151
- }>>;
152
- size: z.ZodOptional<z.ZodNumber>;
153
- room: z.ZodOptional<z.ZodString>;
154
- viewId: z.ZodOptional<z.ZodString>;
155
- calibration: z.ZodOptional<z.ZodObject<{
156
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
157
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
158
- }, z.core.$strip>>;
159
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
160
- }, z.core.$strip>>>;
161
29
  }, z.core.$strip>>;
162
30
  colorize: z.ZodBoolean;
163
- placementsRev: z.ZodNumber;
164
31
  map: z.ZodBoolean;
165
32
  createdOn: z.ZodString;
166
33
  lastModifiedOn: z.ZodString;
167
- kind: z.ZodLiteral<"map">;
168
- imageUrl: z.ZodOptional<z.ZodString>;
169
- thumbnailUrl: z.ZodOptional<z.ZodString>;
170
34
  }, z.core.$strip>;
171
- export declare const sModelLayoutDto: z.ZodObject<{
172
- id: z.ZodString;
173
- name: z.ZodString;
174
- order: z.ZodNumber;
175
- isDefault: z.ZodBoolean;
176
- devices: z.ZodArray<z.ZodObject<{
177
- deviceId: z.ZodString;
178
- x: z.ZodNumber;
179
- y: z.ZodNumber;
180
- scale: z.ZodNumber;
181
- rotation: z.ZodNumber;
182
- fov: z.ZodNumber;
183
- far: z.ZodNumber;
184
- displayAs: z.ZodNullable<z.ZodString>;
185
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
186
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
187
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
188
- width: z.ZodOptional<z.ZodNumber>;
189
- hinge: z.ZodOptional<z.ZodEnum<{
190
- start: "start";
191
- end: "end";
192
- }>>;
193
- opens: z.ZodOptional<z.ZodEnum<{
194
- right: "right";
195
- left: "left";
196
- }>>;
197
- size: z.ZodOptional<z.ZodNumber>;
198
- room: z.ZodOptional<z.ZodString>;
199
- viewId: z.ZodOptional<z.ZodString>;
200
- calibration: z.ZodOptional<z.ZodObject<{
201
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
202
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
203
- }, z.core.$strip>>;
204
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
205
- }, z.core.$strip>>>;
206
- }, z.core.$strip>>;
207
- colorize: z.ZodBoolean;
208
- placementsRev: z.ZodNumber;
209
- map: z.ZodBoolean;
210
- createdOn: z.ZodString;
211
- lastModifiedOn: z.ZodString;
212
- kind: z.ZodLiteral<"3d">;
213
- }, z.core.$strip>;
214
- export declare const sLayoutDto: z.ZodDiscriminatedUnion<[z.ZodObject<{
215
- id: z.ZodString;
216
- name: z.ZodString;
217
- order: z.ZodNumber;
218
- isDefault: z.ZodBoolean;
219
- devices: z.ZodArray<z.ZodObject<{
220
- deviceId: z.ZodString;
221
- x: z.ZodNumber;
222
- y: z.ZodNumber;
223
- scale: z.ZodNumber;
224
- rotation: z.ZodNumber;
225
- fov: z.ZodNumber;
226
- far: z.ZodNumber;
227
- displayAs: z.ZodNullable<z.ZodString>;
228
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
230
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
231
- width: z.ZodOptional<z.ZodNumber>;
232
- hinge: z.ZodOptional<z.ZodEnum<{
233
- start: "start";
234
- end: "end";
235
- }>>;
236
- opens: z.ZodOptional<z.ZodEnum<{
237
- right: "right";
238
- left: "left";
239
- }>>;
240
- size: z.ZodOptional<z.ZodNumber>;
241
- room: z.ZodOptional<z.ZodString>;
242
- viewId: z.ZodOptional<z.ZodString>;
243
- calibration: z.ZodOptional<z.ZodObject<{
244
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
245
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
246
- }, z.core.$strip>>;
247
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
248
- }, z.core.$strip>>>;
249
- }, z.core.$strip>>;
250
- colorize: z.ZodBoolean;
251
- placementsRev: z.ZodNumber;
252
- map: z.ZodBoolean;
253
- createdOn: z.ZodString;
254
- lastModifiedOn: z.ZodString;
255
- kind: z.ZodLiteral<"image">;
256
- imageUrl: z.ZodString;
257
- thumbnailUrl: z.ZodOptional<z.ZodString>;
258
- }, z.core.$strip>, z.ZodObject<{
259
- id: z.ZodString;
260
- name: z.ZodString;
261
- order: z.ZodNumber;
262
- isDefault: z.ZodBoolean;
263
- devices: z.ZodArray<z.ZodObject<{
264
- deviceId: z.ZodString;
265
- x: z.ZodNumber;
266
- y: z.ZodNumber;
267
- scale: z.ZodNumber;
268
- rotation: z.ZodNumber;
269
- fov: z.ZodNumber;
270
- far: z.ZodNumber;
271
- displayAs: z.ZodNullable<z.ZodString>;
272
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
273
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
274
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
275
- width: z.ZodOptional<z.ZodNumber>;
276
- hinge: z.ZodOptional<z.ZodEnum<{
277
- start: "start";
278
- end: "end";
279
- }>>;
280
- opens: z.ZodOptional<z.ZodEnum<{
281
- right: "right";
282
- left: "left";
283
- }>>;
284
- size: z.ZodOptional<z.ZodNumber>;
285
- room: z.ZodOptional<z.ZodString>;
286
- viewId: z.ZodOptional<z.ZodString>;
287
- calibration: z.ZodOptional<z.ZodObject<{
288
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
289
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
290
- }, z.core.$strip>>;
291
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
292
- }, z.core.$strip>>>;
293
- }, z.core.$strip>>;
294
- colorize: z.ZodBoolean;
295
- placementsRev: z.ZodNumber;
296
- map: z.ZodBoolean;
297
- createdOn: z.ZodString;
298
- lastModifiedOn: z.ZodString;
299
- kind: z.ZodLiteral<"map">;
300
- imageUrl: z.ZodOptional<z.ZodString>;
301
- thumbnailUrl: z.ZodOptional<z.ZodString>;
302
- }, z.core.$strip>, z.ZodObject<{
303
- id: z.ZodString;
304
- name: z.ZodString;
305
- order: z.ZodNumber;
306
- isDefault: z.ZodBoolean;
307
- devices: z.ZodArray<z.ZodObject<{
308
- deviceId: z.ZodString;
309
- x: z.ZodNumber;
310
- y: z.ZodNumber;
311
- scale: z.ZodNumber;
312
- rotation: z.ZodNumber;
313
- fov: z.ZodNumber;
314
- far: z.ZodNumber;
315
- displayAs: z.ZodNullable<z.ZodString>;
316
- level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
- height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
318
- extras: z.ZodOptional<z.ZodNullable<z.ZodObject<{
319
- width: z.ZodOptional<z.ZodNumber>;
320
- hinge: z.ZodOptional<z.ZodEnum<{
321
- start: "start";
322
- end: "end";
323
- }>>;
324
- opens: z.ZodOptional<z.ZodEnum<{
325
- right: "right";
326
- left: "left";
327
- }>>;
328
- size: z.ZodOptional<z.ZodNumber>;
329
- room: z.ZodOptional<z.ZodString>;
330
- viewId: z.ZodOptional<z.ZodString>;
331
- calibration: z.ZodOptional<z.ZodObject<{
332
- img: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
333
- level: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
334
- }, z.core.$strip>>;
335
- zoneRooms: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
336
- }, z.core.$strip>>>;
337
- }, z.core.$strip>>;
338
- colorize: z.ZodBoolean;
339
- placementsRev: z.ZodNumber;
340
- map: z.ZodBoolean;
341
- createdOn: z.ZodString;
342
- lastModifiedOn: z.ZodString;
343
- kind: z.ZodLiteral<"3d">;
344
- }, z.core.$strip>], "kind">;
345
- export type ImageLayoutDto = z.infer<typeof sImageLayoutDto>;
346
- export type MapLayoutDto = z.infer<typeof sMapLayoutDto>;
347
- export type ModelLayoutDto = z.infer<typeof sModelLayoutDto>;
348
35
  export type LayoutDto = z.infer<typeof sLayoutDto>;
349
- /** The document of a `3d` layout: its model definition and the plan images the definition names. */
350
- export declare const sLayoutModelDto: z.ZodObject<{
351
- definition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
352
- plans: z.ZodArray<z.ZodObject<{
353
- name: z.ZodString;
354
- url: z.ZodString;
355
- }, z.core.$strip>>;
356
- }, z.core.$strip>;
357
- export type LayoutModelDto = z.infer<typeof sLayoutModelDto>;
@@ -1,69 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sLayoutModelDto = exports.sLayoutDto = exports.sModelLayoutDto = exports.sMapLayoutDto = exports.sImageLayoutDto = exports.sLayoutDeviceDto = exports.sLayoutDeviceExtras = exports.sCameraCalibration = exports.sLayoutKind = void 0;
3
+ exports.sLayoutDto = exports.sLayoutDeviceDto = void 0;
4
4
  const zod_1 = require("zod");
5
- /**
6
- * What a layout's document is, fixed when the layout is created:
7
- * - `image`: a plan image (SVG/PNG); devices are placed on the image.
8
- * - `map`: the world map; devices are placed on the map.
9
- * - `3d`: a 3D model (model.json plus plan images); devices are placed on the model's levels, in metres.
10
- */
11
- exports.sLayoutKind = zod_1.z.enum(['image', 'map', '3d']);
12
- const sPoint = zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]);
13
- /** Four points in a camera's picture, as fractions of its width and height, and the four level points they show. */
14
- exports.sCameraCalibration = zod_1.z.object({
15
- img: zod_1.z.array(sPoint).length(4),
16
- level: zod_1.z.array(sPoint).length(4),
17
- });
18
- /** Placement attributes that only some device types use. Absent keys take the device type's defaults. */
19
- exports.sLayoutDeviceExtras = zod_1.z.object({
20
- width: zod_1.z
21
- .number()
22
- .min(0.4)
23
- .max(4)
24
- .optional()
25
- .describe('Door: width of the doorway in metres'),
26
- hinge: zod_1.z
27
- .enum(['start', 'end'])
28
- .optional()
29
- .describe('Door: the end of the doorway, along its rotation, the hinge is at (default start)'),
30
- opens: zod_1.z
31
- .enum(['right', 'left'])
32
- .optional()
33
- .describe('Door: the side of the doorway, looking along its rotation, the door swings to (default right)'),
34
- size: zod_1.z
35
- .number()
36
- .min(0.3)
37
- .max(6)
38
- .optional()
39
- .describe('Size of the device marker in metres'),
40
- room: zod_1.z
41
- .string()
42
- .min(1)
43
- .max(64)
44
- .optional()
45
- .describe("Room of the layout's document the device belongs to, when not the one it stands in"),
46
- viewId: zod_1.z
47
- .string()
48
- .nonempty()
49
- .optional()
50
- .describe('View to open from the device'),
51
- calibration: exports.sCameraCalibration
52
- .optional()
53
- .describe("Camera: maps points in the camera's picture to its level"),
54
- zoneRooms: zod_1.z
55
- .record(zod_1.z.string().min(1).max(128), zod_1.z.string().min(1).max(64))
56
- .optional()
57
- .describe("Camera: the detection provider's zone names, to rooms of the layout's document"),
58
- });
59
- /**
60
- * A device placed on a layout. What x, y and rotation mean depends on the layout's kind:
61
- * - `image` and `map`: a position on the image or map, as the layout editor stores it.
62
- * - `3d`: metres on the level, x along the model's x axis (towards the bow) and y along its z axis; rotation is the
63
- * heading in degrees, 0 towards +x and 90 towards +y; scale is 1.
64
- *
65
- * In requests, `level`, `height` and `extras` left out keep their stored values, and null clears them.
66
- */
67
5
  exports.sLayoutDeviceDto = zod_1.z.object({
68
6
  deviceId: zod_1.z.string(),
69
7
  x: zod_1.z.number(),
@@ -73,66 +11,17 @@ exports.sLayoutDeviceDto = zod_1.z.object({
73
11
  fov: zod_1.z.number(),
74
12
  far: zod_1.z.number(),
75
13
  displayAs: zod_1.z.string().nullable(),
76
- level: zod_1.z
77
- .string()
78
- .min(1)
79
- .max(64)
80
- .nullable()
81
- .optional()
82
- .describe("Level of the layout's document the device is on (3d: the model's deck id)"),
83
- height: zod_1.z
84
- .number()
85
- .min(0)
86
- .max(100)
87
- .nullable()
88
- .optional()
89
- .describe('Metres above the level'),
90
- extras: exports.sLayoutDeviceExtras.nullable().optional(),
91
14
  });
92
- const sLayoutBase = zod_1.z.object({
15
+ exports.sLayoutDto = zod_1.z.object({
93
16
  id: zod_1.z.string(),
94
17
  name: zod_1.z.string(),
18
+ thumbnailUrl: zod_1.z.string(),
19
+ imageUrl: zod_1.z.string(),
95
20
  order: zod_1.z.number(),
96
21
  isDefault: zod_1.z.boolean(),
97
22
  devices: zod_1.z.array(exports.sLayoutDeviceDto),
98
23
  colorize: zod_1.z.boolean(),
99
- placementsRev: zod_1.z
100
- .number()
101
- .int()
102
- .describe('Revision of the placements. Send it back when saving devices, to be refused if someone else saved meanwhile.'),
103
- map: zod_1.z.boolean().describe('True when kind is map'),
24
+ map: zod_1.z.boolean(),
104
25
  createdOn: zod_1.z.string(),
105
26
  lastModifiedOn: zod_1.z.string(),
106
27
  });
107
- exports.sImageLayoutDto = sLayoutBase.extend({
108
- kind: zod_1.z.literal('image'),
109
- imageUrl: zod_1.z.string(),
110
- thumbnailUrl: zod_1.z.string().optional(),
111
- });
112
- exports.sMapLayoutDto = sLayoutBase.extend({
113
- kind: zod_1.z.literal('map'),
114
- imageUrl: zod_1.z
115
- .string()
116
- .optional()
117
- .describe('Present when the map layout was created with an image'),
118
- thumbnailUrl: zod_1.z
119
- .string()
120
- .optional()
121
- .describe('Present when the map layout was created with an image'),
122
- });
123
- exports.sModelLayoutDto = sLayoutBase.extend({
124
- kind: zod_1.z.literal('3d'),
125
- });
126
- exports.sLayoutDto = zod_1.z.discriminatedUnion('kind', [
127
- exports.sImageLayoutDto,
128
- exports.sMapLayoutDto,
129
- exports.sModelLayoutDto,
130
- ]);
131
- /** The document of a `3d` layout: its model definition and the plan images the definition names. */
132
- exports.sLayoutModelDto = zod_1.z.object({
133
- definition: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
134
- plans: zod_1.z.array(zod_1.z.object({
135
- name: zod_1.z.string().describe('Name the definition refers to the plan by'),
136
- url: zod_1.z.string(),
137
- })),
138
- });
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.154",
7
+ "version": "2.0.155",
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.154",
7
+ "version": "2.0.155",
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",