@awarevue/api-types 2.0.135 → 2.0.137

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.
@@ -76,11 +76,11 @@ export declare const sRegisterRq: z.ZodObject<{
76
76
  maxPerPerson: z.ZodOptional<z.ZodNumber>;
77
77
  }, z.core.$strip>>;
78
78
  accessObjects: z.ZodArray<z.ZodEnum<{
79
+ accessRule: "accessRule";
80
+ schedule: "schedule";
79
81
  person: "person";
80
82
  zone: "zone";
81
- schedule: "schedule";
82
83
  device: "device";
83
- accessRule: "accessRule";
84
84
  }>>;
85
85
  oneSchedulePerDoor: z.ZodBoolean;
86
86
  }, z.core.$strip>>>;
@@ -1490,11 +1490,11 @@ export declare const sChangeIssueCode: z.ZodEnum<{
1490
1490
  export declare const sChangeIssue: z.ZodObject<{
1491
1491
  objectId: z.ZodOptional<z.ZodString>;
1492
1492
  objectKind: z.ZodOptional<z.ZodEnum<{
1493
+ accessRule: "accessRule";
1494
+ schedule: "schedule";
1493
1495
  person: "person";
1494
1496
  zone: "zone";
1495
- schedule: "schedule";
1496
1497
  device: "device";
1497
- accessRule: "accessRule";
1498
1498
  }>>;
1499
1499
  code: z.ZodOptional<z.ZodEnum<{
1500
1500
  BAD_REFERENCE: "BAD_REFERENCE";
@@ -1513,11 +1513,11 @@ export declare const sValidateChangeRs: z.ZodObject<{
1513
1513
  issues: z.ZodArray<z.ZodObject<{
1514
1514
  objectId: z.ZodOptional<z.ZodString>;
1515
1515
  objectKind: z.ZodOptional<z.ZodEnum<{
1516
+ accessRule: "accessRule";
1517
+ schedule: "schedule";
1516
1518
  person: "person";
1517
1519
  zone: "zone";
1518
- schedule: "schedule";
1519
1520
  device: "device";
1520
- accessRule: "accessRule";
1521
1521
  }>>;
1522
1522
  code: z.ZodOptional<z.ZodEnum<{
1523
1523
  BAD_REFERENCE: "BAD_REFERENCE";
@@ -1779,11 +1779,11 @@ export declare const sDescribeObjectRq: z.ZodObject<{
1779
1779
  provider: z.ZodString;
1780
1780
  objectAssignedRef: z.ZodString;
1781
1781
  objectKind: z.ZodEnum<{
1782
+ accessRule: "accessRule";
1783
+ schedule: "schedule";
1782
1784
  person: "person";
1783
1785
  zone: "zone";
1784
- schedule: "schedule";
1785
1786
  device: "device";
1786
- accessRule: "accessRule";
1787
1787
  }>;
1788
1788
  }, z.core.$strip>;
1789
1789
  export declare const sDescribeObjectRs: z.ZodObject<{
@@ -43,18 +43,18 @@ export declare const sAddDeviceRequest: z.ZodObject<{
43
43
  "intercom-operator": "intercom-operator";
44
44
  "intercom-terminal": "intercom-terminal";
45
45
  pbx: "pbx";
46
- alarm: "alarm";
47
- display: "display";
48
- "generic-sensor": "generic-sensor";
49
46
  server: "server";
47
+ alarm: "alarm";
48
+ "position-tracker": "position-tracker";
50
49
  "device-gateway": "device-gateway";
51
50
  "presence-tracker": "presence-tracker";
52
- reader: "reader";
51
+ display: "display";
53
52
  "nvr-recorder": "nvr-recorder";
54
53
  "nvr-exporter": "nvr-exporter";
55
54
  "nvr-analytics-server": "nvr-analytics-server";
56
55
  system: "system";
57
- "position-tracker": "position-tracker";
56
+ reader: "reader";
57
+ "generic-sensor": "generic-sensor";
58
58
  }>;
59
59
  specs: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>>;
60
60
  displaySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -95,6 +95,143 @@ export declare const sUpdateDeviceRequest: z.ZodObject<{
95
95
  }, z.core.$catchall<z.ZodUnknown>>>>;
96
96
  enabled: z.ZodOptional<z.ZodBoolean>;
97
97
  }, z.core.$strip>;
98
+ /**
99
+ * A set of device changes applied as one changeset: PUT /devices/changes.
100
+ * Validated, planned and committed as one; 202 with the changeset while it
101
+ * is being applied, 409 if any touched device is held by a pending one.
102
+ */
103
+ export declare const sApplyDeviceChangesRequest: z.ZodObject<{
104
+ added: z.ZodArray<z.ZodObject<{
105
+ name: z.ZodString;
106
+ foreignRef: z.ZodString;
107
+ notes: z.ZodNullable<z.ZodString>;
108
+ provider: z.ZodString;
109
+ providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
110
+ tags: z.ZodArray<z.ZodString>;
111
+ relations: z.ZodArray<z.ZodObject<{
112
+ id: z.ZodString;
113
+ kind: z.ZodEnum<{
114
+ attachedTo: "attachedTo";
115
+ parent: "parent";
116
+ child: "child";
117
+ holds: "holds";
118
+ isHeldBy: "isHeldBy";
119
+ observes: "observes";
120
+ isObservedBy: "isObservedBy";
121
+ sendsInputTo: "sendsInputTo";
122
+ receivesInputFrom: "receivesInputFrom";
123
+ sendsOutputTo: "sendsOutputTo";
124
+ receivesOutputFrom: "receivesOutputFrom";
125
+ unlocks: "unlocks";
126
+ isUnlockedBy: "isUnlockedBy";
127
+ controls: "controls";
128
+ isControlledBy: "isControlledBy";
129
+ records: "records";
130
+ isRecordedBy: "isRecordedBy";
131
+ reads: "reads";
132
+ isReadBy: "isReadBy";
133
+ isIngestedBy: "isIngestedBy";
134
+ ingests: "ingests";
135
+ }>;
136
+ }, z.core.$catchall<z.ZodUnknown>>>;
137
+ type: z.ZodEnum<{
138
+ camera: "camera";
139
+ door: "door";
140
+ "io-board": "io-board";
141
+ "camera-lift": "camera-lift";
142
+ "motion-sensor": "motion-sensor";
143
+ "panic-button": "panic-button";
144
+ "intercom-operator": "intercom-operator";
145
+ "intercom-terminal": "intercom-terminal";
146
+ pbx: "pbx";
147
+ server: "server";
148
+ alarm: "alarm";
149
+ "position-tracker": "position-tracker";
150
+ "device-gateway": "device-gateway";
151
+ "presence-tracker": "presence-tracker";
152
+ display: "display";
153
+ "nvr-recorder": "nvr-recorder";
154
+ "nvr-exporter": "nvr-exporter";
155
+ "nvr-analytics-server": "nvr-analytics-server";
156
+ system: "system";
157
+ reader: "reader";
158
+ "generic-sensor": "generic-sensor";
159
+ }>;
160
+ specs: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>>;
161
+ displaySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
162
+ }, z.core.$strip>>;
163
+ updated: z.ZodArray<z.ZodObject<{
164
+ id: z.ZodString;
165
+ name: z.ZodOptional<z.ZodString>;
166
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
+ providerMetadata: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>>;
168
+ displaySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
169
+ specs: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>>;
170
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
171
+ relations: z.ZodOptional<z.ZodArray<z.ZodObject<{
172
+ id: z.ZodString;
173
+ kind: z.ZodEnum<{
174
+ attachedTo: "attachedTo";
175
+ parent: "parent";
176
+ child: "child";
177
+ holds: "holds";
178
+ isHeldBy: "isHeldBy";
179
+ observes: "observes";
180
+ isObservedBy: "isObservedBy";
181
+ sendsInputTo: "sendsInputTo";
182
+ receivesInputFrom: "receivesInputFrom";
183
+ sendsOutputTo: "sendsOutputTo";
184
+ receivesOutputFrom: "receivesOutputFrom";
185
+ unlocks: "unlocks";
186
+ isUnlockedBy: "isUnlockedBy";
187
+ controls: "controls";
188
+ isControlledBy: "isControlledBy";
189
+ records: "records";
190
+ isRecordedBy: "isRecordedBy";
191
+ reads: "reads";
192
+ isReadBy: "isReadBy";
193
+ isIngestedBy: "isIngestedBy";
194
+ ingests: "ingests";
195
+ }>;
196
+ }, z.core.$catchall<z.ZodUnknown>>>>;
197
+ enabled: z.ZodOptional<z.ZodBoolean>;
198
+ }, z.core.$strip>>;
199
+ removed: z.ZodArray<z.ZodString>;
200
+ relations: z.ZodArray<z.ZodObject<{
201
+ relation: z.ZodObject<{
202
+ leftId: z.ZodString;
203
+ rightId: z.ZodString;
204
+ kind: z.ZodEnum<{
205
+ attachedTo: "attachedTo";
206
+ parent: "parent";
207
+ child: "child";
208
+ holds: "holds";
209
+ isHeldBy: "isHeldBy";
210
+ observes: "observes";
211
+ isObservedBy: "isObservedBy";
212
+ sendsInputTo: "sendsInputTo";
213
+ receivesInputFrom: "receivesInputFrom";
214
+ sendsOutputTo: "sendsOutputTo";
215
+ receivesOutputFrom: "receivesOutputFrom";
216
+ unlocks: "unlocks";
217
+ isUnlockedBy: "isUnlockedBy";
218
+ controls: "controls";
219
+ isControlledBy: "isControlledBy";
220
+ records: "records";
221
+ isRecordedBy: "isRecordedBy";
222
+ reads: "reads";
223
+ isReadBy: "isReadBy";
224
+ isIngestedBy: "isIngestedBy";
225
+ ingests: "ingests";
226
+ }>;
227
+ }, z.core.$catchall<z.ZodUnknown>>;
228
+ action: z.ZodEnum<{
229
+ added: "added";
230
+ updated: "updated";
231
+ removed: "removed";
232
+ }>;
233
+ }, z.core.$strip>>;
234
+ }, z.core.$strip>;
98
235
  export declare const sOverrideDeviceSpecsRequest: z.ZodObject<{
99
236
  id: z.ZodString;
100
237
  specs: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
@@ -158,6 +295,7 @@ export declare const sSetUnsetRelationRequest: z.ZodObject<{
158
295
  }, z.core.$catchall<z.ZodUnknown>>;
159
296
  export type AddDeviceRequest = z.infer<typeof sAddDeviceRequest>;
160
297
  export type UpdateDeviceRequest = z.infer<typeof sUpdateDeviceRequest>;
298
+ export type ApplyDeviceChangesRequest = z.infer<typeof sApplyDeviceChangesRequest>;
161
299
  export type OverrideDeviceSpecsRequest = z.infer<typeof sOverrideDeviceSpecsRequest>;
162
300
  export type AddDevicePresetRequest = z.infer<typeof sAddDevicePresetRequest>;
163
301
  export type UpdateDevicePresetRequest = z.infer<typeof sUpdateDevicePresetRequest>;
@@ -168,3 +306,218 @@ export type DeviceSearchCriteria = {
168
306
  };
169
307
  export type EventVariantDescription = z.infer<typeof sEventVariantDescription>;
170
308
  export type GetEventCatalogResponse = z.infer<typeof sGetEventCatalogResponse>;
309
+ /** The 202 body of a device write that is being applied. */
310
+ export declare const sPendingDeviceWrite: z.ZodObject<{
311
+ device: z.ZodNullable<z.ZodIntersection<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
312
+ type: z.ZodLiteral<"alarm">;
313
+ }, z.core.$strip>, z.ZodObject<{
314
+ ptzCapable: z.ZodBoolean;
315
+ ptzPanSpeed: z.ZodNumber;
316
+ ptzTiltSpeed: z.ZodNumber;
317
+ ptzZoomSpeed: z.ZodNumber;
318
+ panMin: z.ZodNumber;
319
+ panMax: z.ZodNumber;
320
+ tiltMin: z.ZodNumber;
321
+ tiltMax: z.ZodNumber;
322
+ zoomMin: z.ZodNumber;
323
+ zoomMax: z.ZodNumber;
324
+ streams: z.ZodArray<z.ZodObject<{
325
+ id: z.ZodString;
326
+ displayName: z.ZodString;
327
+ externalPlayerUrl: z.ZodNullable<z.ZodString>;
328
+ rtspUrl: z.ZodNullable<z.ZodString>;
329
+ width: z.ZodNullable<z.ZodNumber>;
330
+ height: z.ZodNullable<z.ZodNumber>;
331
+ lensType: z.ZodEnum<{
332
+ flat: "flat";
333
+ fisheye: "fisheye";
334
+ }>;
335
+ mountPoint: z.ZodEnum<{
336
+ wall: "wall";
337
+ ceiling: "ceiling";
338
+ floor: "floor";
339
+ }>;
340
+ }, z.core.$strip>>;
341
+ defaultStreamId: z.ZodString;
342
+ autoSwitchStreams: z.ZodBoolean;
343
+ streamNaming: z.ZodEnum<{
344
+ cameraStreamNo: "cameraStreamNo";
345
+ cameraStream: "cameraStream";
346
+ stream: "stream";
347
+ }>;
348
+ type: z.ZodLiteral<"camera">;
349
+ }, z.core.$strip>, z.ZodObject<{
350
+ canReportOpenState: z.ZodBoolean;
351
+ canReportLockState: z.ZodBoolean;
352
+ canControlLock: z.ZodBoolean;
353
+ canRelease: z.ZodBoolean;
354
+ type: z.ZodLiteral<"door">;
355
+ }, z.core.$strip>, z.ZodObject<{
356
+ inputs: z.ZodArray<z.ZodString>;
357
+ outputs: z.ZodArray<z.ZodString>;
358
+ type: z.ZodLiteral<"io-board">;
359
+ }, z.core.$strip>, z.ZodObject<{
360
+ type: z.ZodLiteral<"camera-lift">;
361
+ }, z.core.$strip>, z.ZodObject<{
362
+ type: z.ZodLiteral<"motion-sensor">;
363
+ }, z.core.$strip>, z.ZodObject<{
364
+ type: z.ZodLiteral<"generic-sensor">;
365
+ }, z.core.$strip>, z.ZodObject<{
366
+ type: z.ZodLiteral<"panic-button">;
367
+ }, z.core.$strip>, z.ZodObject<{
368
+ sipUri: z.ZodString;
369
+ sipUser: z.ZodString;
370
+ sipPassword: z.ZodString;
371
+ sipRealm: z.ZodString;
372
+ remoteExtension: z.ZodString;
373
+ type: z.ZodLiteral<"intercom-terminal">;
374
+ }, z.core.$strip>, z.ZodObject<{
375
+ sipWsUrl: z.ZodString;
376
+ type: z.ZodLiteral<"pbx">;
377
+ }, z.core.$strip>, z.ZodObject<{
378
+ type: z.ZodLiteral<"server">;
379
+ }, z.core.$strip>, z.ZodObject<{
380
+ type: z.ZodLiteral<"intercom-operator">;
381
+ }, z.core.$strip>, z.ZodObject<{
382
+ type: z.ZodLiteral<"device-gateway">;
383
+ }, z.core.$strip>, z.ZodObject<{
384
+ type: z.ZodLiteral<"presence-tracker">;
385
+ }, z.core.$strip>, z.ZodObject<{
386
+ credentialTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
387
+ card: "card";
388
+ pin: "pin";
389
+ fingerprint: "fingerprint";
390
+ face: "face";
391
+ retina: "retina";
392
+ }>>>;
393
+ type: z.ZodLiteral<"reader">;
394
+ }, z.core.$strip>, z.ZodObject<{
395
+ type: z.ZodLiteral<"display">;
396
+ }, z.core.$strip>, z.ZodObject<{
397
+ type: z.ZodLiteral<"nvr-recorder">;
398
+ }, z.core.$strip>, z.ZodObject<{
399
+ type: z.ZodLiteral<"nvr-exporter">;
400
+ }, z.core.$strip>, z.ZodObject<{
401
+ capabilities: z.ZodArray<z.ZodEnum<{
402
+ motionDetection: "motionDetection";
403
+ labelDetection: "labelDetection";
404
+ faceRecognition: "faceRecognition";
405
+ semanticSearch: "semanticSearch";
406
+ }>>;
407
+ type: z.ZodLiteral<"nvr-analytics-server">;
408
+ }, z.core.$strip>, z.ZodObject<{
409
+ type: z.ZodLiteral<"system">;
410
+ }, z.core.$strip>, z.ZodObject<{
411
+ type: z.ZodLiteral<"position-tracker">;
412
+ }, z.core.$strip>], "type">, z.ZodObject<{
413
+ id: z.ZodString;
414
+ presets: z.ZodArray<z.ZodObject<{
415
+ id: z.ZodString;
416
+ name: z.ZodString;
417
+ params: z.ZodUnknown;
418
+ isDefault: z.ZodBoolean;
419
+ assignedRef: z.ZodNullable<z.ZodString>;
420
+ createdOn: z.ZodString;
421
+ lastModifiedOn: z.ZodString;
422
+ }, z.core.$strip>>;
423
+ providerAssignedName: z.ZodString;
424
+ notes: z.ZodNullable<z.ZodString>;
425
+ tags: z.ZodArray<z.ZodString>;
426
+ displaySettings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
427
+ relations: z.ZodArray<z.ZodObject<{
428
+ id: z.ZodString;
429
+ kind: z.ZodEnum<{
430
+ attachedTo: "attachedTo";
431
+ parent: "parent";
432
+ child: "child";
433
+ holds: "holds";
434
+ isHeldBy: "isHeldBy";
435
+ observes: "observes";
436
+ isObservedBy: "isObservedBy";
437
+ sendsInputTo: "sendsInputTo";
438
+ receivesInputFrom: "receivesInputFrom";
439
+ sendsOutputTo: "sendsOutputTo";
440
+ receivesOutputFrom: "receivesOutputFrom";
441
+ unlocks: "unlocks";
442
+ isUnlockedBy: "isUnlockedBy";
443
+ controls: "controls";
444
+ isControlledBy: "isControlledBy";
445
+ records: "records";
446
+ isRecordedBy: "isRecordedBy";
447
+ reads: "reads";
448
+ isReadBy: "isReadBy";
449
+ isIngestedBy: "isIngestedBy";
450
+ ingests: "ingests";
451
+ }>;
452
+ }, z.core.$catchall<z.ZodUnknown>>>;
453
+ groups: z.ZodArray<z.ZodString>;
454
+ enabled: z.ZodBoolean;
455
+ createdOn: z.ZodString;
456
+ lastModifiedOn: z.ZodString;
457
+ }, z.core.$strip>>, z.ZodObject<{
458
+ name: z.ZodString;
459
+ foreignRef: z.ZodString;
460
+ provider: z.ZodString;
461
+ providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
462
+ }, z.core.$strip>>>;
463
+ changeset: z.ZodObject<{
464
+ id: z.ZodString;
465
+ phase: z.ZodEnum<{
466
+ failed: "failed";
467
+ pending: "pending";
468
+ committing: "committing";
469
+ }>;
470
+ label: z.ZodString;
471
+ originator: z.ZodString;
472
+ by: z.ZodNullable<z.ZodObject<{
473
+ id: z.ZodString;
474
+ name: z.ZodString;
475
+ }, z.core.$strip>>;
476
+ attempt: z.ZodNumber;
477
+ proposedAt: z.ZodNumber;
478
+ updatedAt: z.ZodNumber;
479
+ devices: z.ZodRecord<z.ZodString, z.ZodObject<{
480
+ id: z.ZodString;
481
+ name: z.ZodString;
482
+ type: z.ZodString;
483
+ change: z.ZodEnum<{
484
+ add: "add";
485
+ update: "update";
486
+ remove: "remove";
487
+ relation: "relation";
488
+ reconcile: "reconcile";
489
+ }>;
490
+ }, z.core.$strip>>;
491
+ steps: z.ZodArray<z.ZodObject<{
492
+ ref: z.ZodString;
493
+ deviceId: z.ZodString;
494
+ kind: z.ZodEnum<{
495
+ check: "check";
496
+ effect: "effect";
497
+ }>;
498
+ type: z.ZodString;
499
+ label: z.ZodString;
500
+ dependsOn: z.ZodArray<z.ZodString>;
501
+ status: z.ZodEnum<{
502
+ waiting: "waiting";
503
+ running: "running";
504
+ succeeded: "succeeded";
505
+ failed: "failed";
506
+ skipped: "skipped";
507
+ }>;
508
+ attempt: z.ZodNumber;
509
+ startedAt: z.ZodNullable<z.ZodNumber>;
510
+ finishedAt: z.ZodNullable<z.ZodNumber>;
511
+ error: z.ZodNullable<z.ZodObject<{
512
+ name: z.ZodString;
513
+ message: z.ZodString;
514
+ }, z.core.$strip>>;
515
+ }, z.core.$strip>>;
516
+ failure: z.ZodNullable<z.ZodObject<{
517
+ stepRef: z.ZodString;
518
+ message: z.ZodString;
519
+ at: z.ZodNumber;
520
+ }, z.core.$strip>>;
521
+ }, z.core.$strip>;
522
+ }, z.core.$strip>;
523
+ export type PendingDeviceWrite = z.infer<typeof sPendingDeviceWrite>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
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;
3
+ exports.sPendingDeviceWrite = exports.sSetUnsetRelationRequest = exports.sGetEventCatalogResponse = exports.sRemoveDevicePresetRequest = exports.sUpdateDevicePresetRequest = exports.sAddDevicePresetRequest = exports.sOverrideDeviceSpecsRequest = exports.sApplyDeviceChangesRequest = exports.sUpdateDeviceRequest = exports.sAddDeviceRequest = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const objects_1 = require("../../objects");
6
6
  exports.sAddDeviceRequest = zod_1.z.object({
@@ -26,6 +26,19 @@ exports.sUpdateDeviceRequest = zod_1.z.object({
26
26
  relations: zod_1.z.array(objects_1.sDeviceRelationSide).optional(),
27
27
  enabled: zod_1.z.boolean().optional(),
28
28
  });
29
+ /**
30
+ * A set of device changes applied as one changeset: PUT /devices/changes.
31
+ * Validated, planned and committed as one; 202 with the changeset while it
32
+ * is being applied, 409 if any touched device is held by a pending one.
33
+ */
34
+ exports.sApplyDeviceChangesRequest = zod_1.z.object({
35
+ /** No id: the server assigns one. */
36
+ added: zod_1.z.array(exports.sAddDeviceRequest),
37
+ updated: zod_1.z.array(exports.sUpdateDeviceRequest),
38
+ removed: zod_1.z.array(zod_1.z.string().nonempty()),
39
+ /** Both ends by device id. */
40
+ relations: zod_1.z.array(objects_1.sRelationDeltaDto),
41
+ });
29
42
  exports.sOverrideDeviceSpecsRequest = zod_1.z.object({
30
43
  id: zod_1.z.string(),
31
44
  specs: zod_1.z.object({}).catchall(zod_1.z.unknown()),
@@ -53,3 +66,8 @@ exports.sRemoveDevicePresetRequest = zod_1.z.object({
53
66
  });
54
67
  exports.sGetEventCatalogResponse = zod_1.z.array(objects_1.sEventDescription);
55
68
  exports.sSetUnsetRelationRequest = objects_1.sDeviceRelationDto;
69
+ /** The 202 body of a device write that is being applied. */
70
+ exports.sPendingDeviceWrite = zod_1.z.object({
71
+ device: objects_1.sDeviceDto.nullable(), // import sDeviceDto from the device schemas
72
+ changeset: objects_1.sChangeset,
73
+ });
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  export declare const sAddMacroRequest: z.ZodObject<{
3
3
  displayName: z.ZodString;
4
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4
5
  code: z.ZodNullable<z.ZodString>;
5
6
  module: z.ZodNullable<z.ZodString>;
6
- metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
7
7
  items: z.ZodArray<z.ZodObject<{
8
8
  id: z.ZodNullable<z.ZodString>;
9
9
  stepId: z.ZodString;
@@ -14,9 +14,9 @@ export declare const sAddMacroRequest: z.ZodObject<{
14
14
  }, z.core.$strip>;
15
15
  export declare const sUpdateMacroRequest: z.ZodObject<{
16
16
  displayName: z.ZodOptional<z.ZodString>;
17
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
17
18
  code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
19
  module: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
20
20
  items: z.ZodOptional<z.ZodArray<z.ZodObject<{
21
21
  id: z.ZodNullable<z.ZodString>;
22
22
  stepId: z.ZodString;
@@ -35,14 +35,14 @@ export declare const sMeResponse: z.ZodObject<{
35
35
  }, z.core.$strip>;
36
36
  export declare const sAddRoleRequest: z.ZodObject<{
37
37
  displayName: z.ZodString;
38
- permissions: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"layout:read">, z.ZodLiteral<"layout:update">, z.ZodLiteral<"layout:delete">, z.ZodLiteral<"layout:create">, z.ZodLiteral<"camera:live">, z.ZodLiteral<"camera:playback">, z.ZodLiteral<"camera:playback-export">, z.ZodLiteral<"camera:ptz">, z.ZodLiteral<"camera:privacy-mode">, z.ZodLiteral<"camera:assign">, z.ZodLiteral<"camera:detection">, z.ZodLiteral<"camera:record">, z.ZodLiteral<"preset:read">, z.ZodLiteral<"preset:update">, z.ZodLiteral<"preset:delete">, z.ZodLiteral<"preset:create">, z.ZodLiteral<"door:release">, z.ZodLiteral<"door:lock">, z.ZodLiteral<"camera-lift:activate">, z.ZodLiteral<"io-board:activate">, z.ZodLiteral<"public-view:read">, z.ZodLiteral<"public-view:update">, z.ZodLiteral<"public-view:delete">, z.ZodLiteral<"public-view:create">, z.ZodLiteral<"private-view:read">, z.ZodLiteral<"person:read">, z.ZodLiteral<"person:update">, z.ZodLiteral<"person:delete">, z.ZodLiteral<"person:create">, z.ZodLiteral<"person:assign">, z.ZodLiteral<"person:print">, z.ZodLiteral<"person:face">, z.ZodLiteral<"zone:update">, z.ZodLiteral<"zone:delete">, z.ZodLiteral<"zone:create">, z.ZodLiteral<"access-rule:read">, z.ZodLiteral<"access-rule:update">, z.ZodLiteral<"access-rule:delete">, z.ZodLiteral<"access-rule:create">, z.ZodLiteral<"schedule:update">, z.ZodLiteral<"schedule:delete">, z.ZodLiteral<"schedule:create">, z.ZodLiteral<"presence:read">, z.ZodLiteral<"presence:update">, z.ZodLiteral<"presence:update-reader">, z.ZodLiteral<"factory:read">, z.ZodLiteral<"factory:update">, z.ZodLiteral<"factory:delete">, z.ZodLiteral<"factory:create">, z.ZodLiteral<"event:read">, z.ZodLiteral<"event:purge">, z.ZodLiteral<"alarm:read">, z.ZodLiteral<"alarm:acknowlede">, z.ZodLiteral<"alarm:arm">, z.ZodLiteral<"alarm:trigger">, z.ZodLiteral<"alarm:bypass">, z.ZodLiteral<"user:read">, z.ZodLiteral<"user:change-password">, z.ZodLiteral<"user:change-username">, z.ZodLiteral<"user:change-name">, z.ZodLiteral<"user:change-email">, z.ZodLiteral<"user:activate">, z.ZodLiteral<"user:delete">, z.ZodLiteral<"user:change-roles">, z.ZodLiteral<"user:create">, z.ZodLiteral<"role:create">, z.ZodLiteral<"role:delete">, z.ZodLiteral<"role:update">, z.ZodLiteral<"module:read">, z.ZodLiteral<"module:update">, z.ZodLiteral<"module:enable">, z.ZodLiteral<"device:discover">, z.ZodLiteral<"device:import">, z.ZodLiteral<"device:override-specs">, z.ZodLiteral<"device:notes">, z.ZodLiteral<"device:rename">, z.ZodLiteral<"device:alarms">, z.ZodLiteral<"automation:read">, z.ZodLiteral<"automation:update">, z.ZodLiteral<"automation:delete">, z.ZodLiteral<"automation:create">, z.ZodLiteral<"device-group:read">, z.ZodLiteral<"device-group:update">, z.ZodLiteral<"device-group:delete">, z.ZodLiteral<"device-group:create">, z.ZodLiteral<"macro:read">, z.ZodLiteral<"macro:update">, z.ZodLiteral<"macro:delete">, z.ZodLiteral<"macro:create">, z.ZodLiteral<"macro:run">, z.ZodLiteral<"notification:read">, z.ZodLiteral<"notification:create">, z.ZodLiteral<"notification:acknowledge">, z.ZodLiteral<"template:update">, z.ZodLiteral<"template:delete">, z.ZodLiteral<"template:create">, z.ZodLiteral<"custom-field:update">, z.ZodLiteral<"custom-field:delete">, z.ZodLiteral<"custom-field:create">, z.ZodLiteral<"display:read">, z.ZodLiteral<"security-level:update">, z.ZodLiteral<"security-level:delete">, z.ZodLiteral<"security-level:create">, z.ZodLiteral<"citadel-mode:toggle">, z.ZodLiteral<"token-conversion:update">, z.ZodLiteral<"token-conversion:delete">, z.ZodLiteral<"token-conversion:create">, z.ZodLiteral<"bookmark:read">, z.ZodLiteral<"bookmark:create">, z.ZodLiteral<"bookmark:update">, z.ZodLiteral<"bookmark:delete">, z.ZodLiteral<"access-path:read">, z.ZodLiteral<"access-path:create">, z.ZodLiteral<"access-path:update">, z.ZodLiteral<"access-path:delete">, z.ZodLiteral<"person-type:create">, z.ZodLiteral<"person-type:update">, z.ZodLiteral<"person-type:delete">, z.ZodLiteral<"agreement:create">, z.ZodLiteral<"agreement:update">, z.ZodLiteral<"agreement:delete">, z.ZodLiteral<"api-key:create">, z.ZodLiteral<"api-key:revoke">, z.ZodLiteral<"access-authority:read">, z.ZodLiteral<"access-authority:sync">, z.ZodLiteral<"access-authority:delete">, z.ZodLiteral<"trackable:read">, z.ZodLiteral<"trackable:image-upload">, z.ZodLiteral<"trackable:user-favorite">, z.ZodLiteral<"trackable:global-favorite">, z.ZodLiteral<"trackable:manage">, z.ZodLiteral<"trackable:image-manage">]>>;
39
38
  description: z.ZodString;
39
+ permissions: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"layout:read">, z.ZodLiteral<"layout:update">, z.ZodLiteral<"layout:delete">, z.ZodLiteral<"layout:create">, z.ZodLiteral<"camera:live">, z.ZodLiteral<"camera:playback">, z.ZodLiteral<"camera:playback-export">, z.ZodLiteral<"camera:ptz">, z.ZodLiteral<"camera:privacy-mode">, z.ZodLiteral<"camera:assign">, z.ZodLiteral<"camera:detection">, z.ZodLiteral<"camera:record">, z.ZodLiteral<"preset:read">, z.ZodLiteral<"preset:update">, z.ZodLiteral<"preset:delete">, z.ZodLiteral<"preset:create">, z.ZodLiteral<"door:release">, z.ZodLiteral<"door:lock">, z.ZodLiteral<"camera-lift:activate">, z.ZodLiteral<"io-board:activate">, z.ZodLiteral<"public-view:read">, z.ZodLiteral<"public-view:update">, z.ZodLiteral<"public-view:delete">, z.ZodLiteral<"public-view:create">, z.ZodLiteral<"private-view:read">, z.ZodLiteral<"person:read">, z.ZodLiteral<"person:update">, z.ZodLiteral<"person:delete">, z.ZodLiteral<"person:create">, z.ZodLiteral<"person:assign">, z.ZodLiteral<"person:print">, z.ZodLiteral<"person:face">, z.ZodLiteral<"zone:update">, z.ZodLiteral<"zone:delete">, z.ZodLiteral<"zone:create">, z.ZodLiteral<"access-rule:read">, z.ZodLiteral<"access-rule:update">, z.ZodLiteral<"access-rule:delete">, z.ZodLiteral<"access-rule:create">, z.ZodLiteral<"schedule:update">, z.ZodLiteral<"schedule:delete">, z.ZodLiteral<"schedule:create">, z.ZodLiteral<"presence:read">, z.ZodLiteral<"presence:update">, z.ZodLiteral<"presence:update-reader">, z.ZodLiteral<"factory:read">, z.ZodLiteral<"factory:update">, z.ZodLiteral<"factory:delete">, z.ZodLiteral<"factory:create">, z.ZodLiteral<"event:read">, z.ZodLiteral<"event:purge">, z.ZodLiteral<"alarm:read">, z.ZodLiteral<"alarm:acknowlede">, z.ZodLiteral<"alarm:arm">, z.ZodLiteral<"alarm:trigger">, z.ZodLiteral<"alarm:bypass">, z.ZodLiteral<"user:read">, z.ZodLiteral<"user:change-password">, z.ZodLiteral<"user:change-username">, z.ZodLiteral<"user:change-name">, z.ZodLiteral<"user:change-email">, z.ZodLiteral<"user:activate">, z.ZodLiteral<"user:delete">, z.ZodLiteral<"user:change-roles">, z.ZodLiteral<"user:create">, z.ZodLiteral<"role:create">, z.ZodLiteral<"role:delete">, z.ZodLiteral<"role:update">, z.ZodLiteral<"module:read">, z.ZodLiteral<"module:update">, z.ZodLiteral<"module:enable">, z.ZodLiteral<"device:discover">, z.ZodLiteral<"device:import">, z.ZodLiteral<"device:override-specs">, z.ZodLiteral<"device:notes">, z.ZodLiteral<"device:rename">, z.ZodLiteral<"device:alarms">, z.ZodLiteral<"automation:read">, z.ZodLiteral<"automation:update">, z.ZodLiteral<"automation:delete">, z.ZodLiteral<"automation:create">, z.ZodLiteral<"device-group:read">, z.ZodLiteral<"device-group:update">, z.ZodLiteral<"device-group:delete">, z.ZodLiteral<"device-group:create">, z.ZodLiteral<"macro:read">, z.ZodLiteral<"macro:update">, z.ZodLiteral<"macro:delete">, z.ZodLiteral<"macro:create">, z.ZodLiteral<"macro:run">, z.ZodLiteral<"notification:read">, z.ZodLiteral<"notification:create">, z.ZodLiteral<"notification:acknowledge">, z.ZodLiteral<"template:update">, z.ZodLiteral<"template:delete">, z.ZodLiteral<"template:create">, z.ZodLiteral<"custom-field:update">, z.ZodLiteral<"custom-field:delete">, z.ZodLiteral<"custom-field:create">, z.ZodLiteral<"display:read">, z.ZodLiteral<"security-level:update">, z.ZodLiteral<"security-level:delete">, z.ZodLiteral<"security-level:create">, z.ZodLiteral<"citadel-mode:toggle">, z.ZodLiteral<"token-conversion:update">, z.ZodLiteral<"token-conversion:delete">, z.ZodLiteral<"token-conversion:create">, z.ZodLiteral<"bookmark:read">, z.ZodLiteral<"bookmark:create">, z.ZodLiteral<"bookmark:update">, z.ZodLiteral<"bookmark:delete">, z.ZodLiteral<"access-path:read">, z.ZodLiteral<"access-path:create">, z.ZodLiteral<"access-path:update">, z.ZodLiteral<"access-path:delete">, z.ZodLiteral<"person-type:create">, z.ZodLiteral<"person-type:update">, z.ZodLiteral<"person-type:delete">, z.ZodLiteral<"agreement:create">, z.ZodLiteral<"agreement:update">, z.ZodLiteral<"agreement:delete">, z.ZodLiteral<"api-key:create">, z.ZodLiteral<"api-key:revoke">, z.ZodLiteral<"access-authority:read">, z.ZodLiteral<"access-authority:sync">, z.ZodLiteral<"access-authority:delete">, z.ZodLiteral<"trackable:read">, z.ZodLiteral<"trackable:image-upload">, z.ZodLiteral<"trackable:user-favorite">, z.ZodLiteral<"trackable:global-favorite">, z.ZodLiteral<"trackable:manage">, z.ZodLiteral<"trackable:image-manage">]>>;
40
40
  systemName: z.ZodString;
41
41
  }, z.core.$strip>;
42
42
  export declare const sUpdateRoleRequest: z.ZodObject<{
43
43
  displayName: z.ZodOptional<z.ZodString>;
44
- permissions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"layout:read">, z.ZodLiteral<"layout:update">, z.ZodLiteral<"layout:delete">, z.ZodLiteral<"layout:create">, z.ZodLiteral<"camera:live">, z.ZodLiteral<"camera:playback">, z.ZodLiteral<"camera:playback-export">, z.ZodLiteral<"camera:ptz">, z.ZodLiteral<"camera:privacy-mode">, z.ZodLiteral<"camera:assign">, z.ZodLiteral<"camera:detection">, z.ZodLiteral<"camera:record">, z.ZodLiteral<"preset:read">, z.ZodLiteral<"preset:update">, z.ZodLiteral<"preset:delete">, z.ZodLiteral<"preset:create">, z.ZodLiteral<"door:release">, z.ZodLiteral<"door:lock">, z.ZodLiteral<"camera-lift:activate">, z.ZodLiteral<"io-board:activate">, z.ZodLiteral<"public-view:read">, z.ZodLiteral<"public-view:update">, z.ZodLiteral<"public-view:delete">, z.ZodLiteral<"public-view:create">, z.ZodLiteral<"private-view:read">, z.ZodLiteral<"person:read">, z.ZodLiteral<"person:update">, z.ZodLiteral<"person:delete">, z.ZodLiteral<"person:create">, z.ZodLiteral<"person:assign">, z.ZodLiteral<"person:print">, z.ZodLiteral<"person:face">, z.ZodLiteral<"zone:update">, z.ZodLiteral<"zone:delete">, z.ZodLiteral<"zone:create">, z.ZodLiteral<"access-rule:read">, z.ZodLiteral<"access-rule:update">, z.ZodLiteral<"access-rule:delete">, z.ZodLiteral<"access-rule:create">, z.ZodLiteral<"schedule:update">, z.ZodLiteral<"schedule:delete">, z.ZodLiteral<"schedule:create">, z.ZodLiteral<"presence:read">, z.ZodLiteral<"presence:update">, z.ZodLiteral<"presence:update-reader">, z.ZodLiteral<"factory:read">, z.ZodLiteral<"factory:update">, z.ZodLiteral<"factory:delete">, z.ZodLiteral<"factory:create">, z.ZodLiteral<"event:read">, z.ZodLiteral<"event:purge">, z.ZodLiteral<"alarm:read">, z.ZodLiteral<"alarm:acknowlede">, z.ZodLiteral<"alarm:arm">, z.ZodLiteral<"alarm:trigger">, z.ZodLiteral<"alarm:bypass">, z.ZodLiteral<"user:read">, z.ZodLiteral<"user:change-password">, z.ZodLiteral<"user:change-username">, z.ZodLiteral<"user:change-name">, z.ZodLiteral<"user:change-email">, z.ZodLiteral<"user:activate">, z.ZodLiteral<"user:delete">, z.ZodLiteral<"user:change-roles">, z.ZodLiteral<"user:create">, z.ZodLiteral<"role:create">, z.ZodLiteral<"role:delete">, z.ZodLiteral<"role:update">, z.ZodLiteral<"module:read">, z.ZodLiteral<"module:update">, z.ZodLiteral<"module:enable">, z.ZodLiteral<"device:discover">, z.ZodLiteral<"device:import">, z.ZodLiteral<"device:override-specs">, z.ZodLiteral<"device:notes">, z.ZodLiteral<"device:rename">, z.ZodLiteral<"device:alarms">, z.ZodLiteral<"automation:read">, z.ZodLiteral<"automation:update">, z.ZodLiteral<"automation:delete">, z.ZodLiteral<"automation:create">, z.ZodLiteral<"device-group:read">, z.ZodLiteral<"device-group:update">, z.ZodLiteral<"device-group:delete">, z.ZodLiteral<"device-group:create">, z.ZodLiteral<"macro:read">, z.ZodLiteral<"macro:update">, z.ZodLiteral<"macro:delete">, z.ZodLiteral<"macro:create">, z.ZodLiteral<"macro:run">, z.ZodLiteral<"notification:read">, z.ZodLiteral<"notification:create">, z.ZodLiteral<"notification:acknowledge">, z.ZodLiteral<"template:update">, z.ZodLiteral<"template:delete">, z.ZodLiteral<"template:create">, z.ZodLiteral<"custom-field:update">, z.ZodLiteral<"custom-field:delete">, z.ZodLiteral<"custom-field:create">, z.ZodLiteral<"display:read">, z.ZodLiteral<"security-level:update">, z.ZodLiteral<"security-level:delete">, z.ZodLiteral<"security-level:create">, z.ZodLiteral<"citadel-mode:toggle">, z.ZodLiteral<"token-conversion:update">, z.ZodLiteral<"token-conversion:delete">, z.ZodLiteral<"token-conversion:create">, z.ZodLiteral<"bookmark:read">, z.ZodLiteral<"bookmark:create">, z.ZodLiteral<"bookmark:update">, z.ZodLiteral<"bookmark:delete">, z.ZodLiteral<"access-path:read">, z.ZodLiteral<"access-path:create">, z.ZodLiteral<"access-path:update">, z.ZodLiteral<"access-path:delete">, z.ZodLiteral<"person-type:create">, z.ZodLiteral<"person-type:update">, z.ZodLiteral<"person-type:delete">, z.ZodLiteral<"agreement:create">, z.ZodLiteral<"agreement:update">, z.ZodLiteral<"agreement:delete">, z.ZodLiteral<"api-key:create">, z.ZodLiteral<"api-key:revoke">, z.ZodLiteral<"access-authority:read">, z.ZodLiteral<"access-authority:sync">, z.ZodLiteral<"access-authority:delete">, z.ZodLiteral<"trackable:read">, z.ZodLiteral<"trackable:image-upload">, z.ZodLiteral<"trackable:user-favorite">, z.ZodLiteral<"trackable:global-favorite">, z.ZodLiteral<"trackable:manage">, z.ZodLiteral<"trackable:image-manage">]>>>;
45
44
  description: z.ZodOptional<z.ZodString>;
45
+ permissions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"layout:read">, z.ZodLiteral<"layout:update">, z.ZodLiteral<"layout:delete">, z.ZodLiteral<"layout:create">, z.ZodLiteral<"camera:live">, z.ZodLiteral<"camera:playback">, z.ZodLiteral<"camera:playback-export">, z.ZodLiteral<"camera:ptz">, z.ZodLiteral<"camera:privacy-mode">, z.ZodLiteral<"camera:assign">, z.ZodLiteral<"camera:detection">, z.ZodLiteral<"camera:record">, z.ZodLiteral<"preset:read">, z.ZodLiteral<"preset:update">, z.ZodLiteral<"preset:delete">, z.ZodLiteral<"preset:create">, z.ZodLiteral<"door:release">, z.ZodLiteral<"door:lock">, z.ZodLiteral<"camera-lift:activate">, z.ZodLiteral<"io-board:activate">, z.ZodLiteral<"public-view:read">, z.ZodLiteral<"public-view:update">, z.ZodLiteral<"public-view:delete">, z.ZodLiteral<"public-view:create">, z.ZodLiteral<"private-view:read">, z.ZodLiteral<"person:read">, z.ZodLiteral<"person:update">, z.ZodLiteral<"person:delete">, z.ZodLiteral<"person:create">, z.ZodLiteral<"person:assign">, z.ZodLiteral<"person:print">, z.ZodLiteral<"person:face">, z.ZodLiteral<"zone:update">, z.ZodLiteral<"zone:delete">, z.ZodLiteral<"zone:create">, z.ZodLiteral<"access-rule:read">, z.ZodLiteral<"access-rule:update">, z.ZodLiteral<"access-rule:delete">, z.ZodLiteral<"access-rule:create">, z.ZodLiteral<"schedule:update">, z.ZodLiteral<"schedule:delete">, z.ZodLiteral<"schedule:create">, z.ZodLiteral<"presence:read">, z.ZodLiteral<"presence:update">, z.ZodLiteral<"presence:update-reader">, z.ZodLiteral<"factory:read">, z.ZodLiteral<"factory:update">, z.ZodLiteral<"factory:delete">, z.ZodLiteral<"factory:create">, z.ZodLiteral<"event:read">, z.ZodLiteral<"event:purge">, z.ZodLiteral<"alarm:read">, z.ZodLiteral<"alarm:acknowlede">, z.ZodLiteral<"alarm:arm">, z.ZodLiteral<"alarm:trigger">, z.ZodLiteral<"alarm:bypass">, z.ZodLiteral<"user:read">, z.ZodLiteral<"user:change-password">, z.ZodLiteral<"user:change-username">, z.ZodLiteral<"user:change-name">, z.ZodLiteral<"user:change-email">, z.ZodLiteral<"user:activate">, z.ZodLiteral<"user:delete">, z.ZodLiteral<"user:change-roles">, z.ZodLiteral<"user:create">, z.ZodLiteral<"role:create">, z.ZodLiteral<"role:delete">, z.ZodLiteral<"role:update">, z.ZodLiteral<"module:read">, z.ZodLiteral<"module:update">, z.ZodLiteral<"module:enable">, z.ZodLiteral<"device:discover">, z.ZodLiteral<"device:import">, z.ZodLiteral<"device:override-specs">, z.ZodLiteral<"device:notes">, z.ZodLiteral<"device:rename">, z.ZodLiteral<"device:alarms">, z.ZodLiteral<"automation:read">, z.ZodLiteral<"automation:update">, z.ZodLiteral<"automation:delete">, z.ZodLiteral<"automation:create">, z.ZodLiteral<"device-group:read">, z.ZodLiteral<"device-group:update">, z.ZodLiteral<"device-group:delete">, z.ZodLiteral<"device-group:create">, z.ZodLiteral<"macro:read">, z.ZodLiteral<"macro:update">, z.ZodLiteral<"macro:delete">, z.ZodLiteral<"macro:create">, z.ZodLiteral<"macro:run">, z.ZodLiteral<"notification:read">, z.ZodLiteral<"notification:create">, z.ZodLiteral<"notification:acknowledge">, z.ZodLiteral<"template:update">, z.ZodLiteral<"template:delete">, z.ZodLiteral<"template:create">, z.ZodLiteral<"custom-field:update">, z.ZodLiteral<"custom-field:delete">, z.ZodLiteral<"custom-field:create">, z.ZodLiteral<"display:read">, z.ZodLiteral<"security-level:update">, z.ZodLiteral<"security-level:delete">, z.ZodLiteral<"security-level:create">, z.ZodLiteral<"citadel-mode:toggle">, z.ZodLiteral<"token-conversion:update">, z.ZodLiteral<"token-conversion:delete">, z.ZodLiteral<"token-conversion:create">, z.ZodLiteral<"bookmark:read">, z.ZodLiteral<"bookmark:create">, z.ZodLiteral<"bookmark:update">, z.ZodLiteral<"bookmark:delete">, z.ZodLiteral<"access-path:read">, z.ZodLiteral<"access-path:create">, z.ZodLiteral<"access-path:update">, z.ZodLiteral<"access-path:delete">, z.ZodLiteral<"person-type:create">, z.ZodLiteral<"person-type:update">, z.ZodLiteral<"person-type:delete">, z.ZodLiteral<"agreement:create">, z.ZodLiteral<"agreement:update">, z.ZodLiteral<"agreement:delete">, z.ZodLiteral<"api-key:create">, z.ZodLiteral<"api-key:revoke">, z.ZodLiteral<"access-authority:read">, z.ZodLiteral<"access-authority:sync">, z.ZodLiteral<"access-authority:delete">, z.ZodLiteral<"trackable:read">, z.ZodLiteral<"trackable:image-upload">, z.ZodLiteral<"trackable:user-favorite">, z.ZodLiteral<"trackable:global-favorite">, z.ZodLiteral<"trackable:manage">, z.ZodLiteral<"trackable:image-manage">]>>>;
46
46
  systemName: z.ZodOptional<z.ZodString>;
47
47
  }, z.core.$strip>;
48
48
  export type NewUserRequest = z.infer<typeof sNewUserRequest>;
@@ -39,11 +39,11 @@ export declare const sProviderSpecs: z.ZodObject<{
39
39
  }, z.core.$strip>]>>>;
40
40
  }, z.core.$strip>;
41
41
  export declare const sAccessObjectKind: z.ZodEnum<{
42
+ accessRule: "accessRule";
43
+ schedule: "schedule";
42
44
  person: "person";
43
45
  zone: "zone";
44
- schedule: "schedule";
45
46
  device: "device";
46
- accessRule: "accessRule";
47
47
  }>;
48
48
  export declare const sTokenSpecs: z.ZodObject<{
49
49
  type: z.ZodEnum<{
@@ -71,11 +71,11 @@ export declare const sAccessControlCapabilityReport: z.ZodObject<{
71
71
  maxPerPerson: z.ZodOptional<z.ZodNumber>;
72
72
  }, z.core.$strip>>;
73
73
  accessObjects: z.ZodArray<z.ZodEnum<{
74
+ accessRule: "accessRule";
75
+ schedule: "schedule";
74
76
  person: "person";
75
77
  zone: "zone";
76
- schedule: "schedule";
77
78
  device: "device";
78
- accessRule: "accessRule";
79
79
  }>>;
80
80
  oneSchedulePerDoor: z.ZodBoolean;
81
81
  }, z.core.$strip>;
@@ -18,17 +18,17 @@ import { UserDto } from './user';
18
18
  import { ViewDto } from './view';
19
19
  import { ZoneDto, ZoneProps } from './zone';
20
20
  export declare const sObjectKind: z.ZodEnum<{
21
+ accessRule: "accessRule";
22
+ schedule: "schedule";
21
23
  person: "person";
22
24
  zone: "zone";
25
+ device: "device";
23
26
  layout: "layout";
24
- schedule: "schedule";
25
27
  user: "user";
26
28
  role: "role";
27
- device: "device";
28
29
  macro: "macro";
29
30
  bookmark: "bookmark";
30
31
  agreement: "agreement";
31
- accessRule: "accessRule";
32
32
  personPresence: "personPresence";
33
33
  deviceGroup: "deviceGroup";
34
34
  view: "view";
@@ -30,18 +30,18 @@ export declare const sDeviceType: z.ZodEnum<{
30
30
  "intercom-operator": "intercom-operator";
31
31
  "intercom-terminal": "intercom-terminal";
32
32
  pbx: "pbx";
33
- alarm: "alarm";
34
- display: "display";
35
- "generic-sensor": "generic-sensor";
36
33
  server: "server";
34
+ alarm: "alarm";
35
+ "position-tracker": "position-tracker";
37
36
  "device-gateway": "device-gateway";
38
37
  "presence-tracker": "presence-tracker";
39
- reader: "reader";
38
+ display: "display";
40
39
  "nvr-recorder": "nvr-recorder";
41
40
  "nvr-exporter": "nvr-exporter";
42
41
  "nvr-analytics-server": "nvr-analytics-server";
43
42
  system: "system";
44
- "position-tracker": "position-tracker";
43
+ reader: "reader";
44
+ "generic-sensor": "generic-sensor";
45
45
  }>;
46
46
  export declare const sDisplaySpecsWithType: z.ZodObject<{
47
47
  type: z.ZodLiteral<"display">;
@@ -0,0 +1,209 @@
1
+ import { z } from 'zod';
2
+ export declare const CONFIG_STATE_KEY = "deviceChanges";
3
+ export declare const COMMIT_STEP_REF = "<commit>";
4
+ export declare const MAX_STEP_ATTEMPTS = 3;
5
+ export declare const sChangesetId: z.ZodString;
6
+ /** `check` is reserved for verification steps; nothing emits it yet. */
7
+ export declare const sStepKind: z.ZodEnum<{
8
+ check: "check";
9
+ effect: "effect";
10
+ }>;
11
+ /** `skipped`: a step this one depended on failed, so it never ran. */
12
+ export declare const sStepStatus: z.ZodEnum<{
13
+ waiting: "waiting";
14
+ running: "running";
15
+ succeeded: "succeeded";
16
+ failed: "failed";
17
+ skipped: "skipped";
18
+ }>;
19
+ export declare const sStep: z.ZodObject<{
20
+ ref: z.ZodString;
21
+ deviceId: z.ZodString;
22
+ kind: z.ZodEnum<{
23
+ check: "check";
24
+ effect: "effect";
25
+ }>;
26
+ type: z.ZodString;
27
+ label: z.ZodString;
28
+ dependsOn: z.ZodArray<z.ZodString>;
29
+ status: z.ZodEnum<{
30
+ waiting: "waiting";
31
+ running: "running";
32
+ succeeded: "succeeded";
33
+ failed: "failed";
34
+ skipped: "skipped";
35
+ }>;
36
+ attempt: z.ZodNumber;
37
+ startedAt: z.ZodNullable<z.ZodNumber>;
38
+ finishedAt: z.ZodNullable<z.ZodNumber>;
39
+ error: z.ZodNullable<z.ZodObject<{
40
+ name: z.ZodString;
41
+ message: z.ZodString;
42
+ }, z.core.$strip>>;
43
+ }, z.core.$strip>;
44
+ export declare const sDeviceChange: z.ZodEnum<{
45
+ add: "add";
46
+ update: "update";
47
+ remove: "remove";
48
+ relation: "relation";
49
+ reconcile: "reconcile";
50
+ }>;
51
+ export declare const sChangesetDevice: z.ZodObject<{
52
+ id: z.ZodString;
53
+ name: z.ZodString;
54
+ type: z.ZodString;
55
+ change: z.ZodEnum<{
56
+ add: "add";
57
+ update: "update";
58
+ remove: "remove";
59
+ relation: "relation";
60
+ reconcile: "reconcile";
61
+ }>;
62
+ }, z.core.$strip>;
63
+ export declare const sChangesetPhase: z.ZodEnum<{
64
+ failed: "failed";
65
+ pending: "pending";
66
+ committing: "committing";
67
+ }>;
68
+ export declare const sChangesetFailure: z.ZodObject<{
69
+ stepRef: z.ZodString;
70
+ message: z.ZodString;
71
+ at: z.ZodNumber;
72
+ }, z.core.$strip>;
73
+ export declare const sChangeset: z.ZodObject<{
74
+ id: z.ZodString;
75
+ phase: z.ZodEnum<{
76
+ failed: "failed";
77
+ pending: "pending";
78
+ committing: "committing";
79
+ }>;
80
+ label: z.ZodString;
81
+ originator: z.ZodString;
82
+ by: z.ZodNullable<z.ZodObject<{
83
+ id: z.ZodString;
84
+ name: z.ZodString;
85
+ }, z.core.$strip>>;
86
+ attempt: z.ZodNumber;
87
+ proposedAt: z.ZodNumber;
88
+ updatedAt: z.ZodNumber;
89
+ devices: z.ZodRecord<z.ZodString, z.ZodObject<{
90
+ id: z.ZodString;
91
+ name: z.ZodString;
92
+ type: z.ZodString;
93
+ change: z.ZodEnum<{
94
+ add: "add";
95
+ update: "update";
96
+ remove: "remove";
97
+ relation: "relation";
98
+ reconcile: "reconcile";
99
+ }>;
100
+ }, z.core.$strip>>;
101
+ steps: z.ZodArray<z.ZodObject<{
102
+ ref: z.ZodString;
103
+ deviceId: z.ZodString;
104
+ kind: z.ZodEnum<{
105
+ check: "check";
106
+ effect: "effect";
107
+ }>;
108
+ type: z.ZodString;
109
+ label: z.ZodString;
110
+ dependsOn: z.ZodArray<z.ZodString>;
111
+ status: z.ZodEnum<{
112
+ waiting: "waiting";
113
+ running: "running";
114
+ succeeded: "succeeded";
115
+ failed: "failed";
116
+ skipped: "skipped";
117
+ }>;
118
+ attempt: z.ZodNumber;
119
+ startedAt: z.ZodNullable<z.ZodNumber>;
120
+ finishedAt: z.ZodNullable<z.ZodNumber>;
121
+ error: z.ZodNullable<z.ZodObject<{
122
+ name: z.ZodString;
123
+ message: z.ZodString;
124
+ }, z.core.$strip>>;
125
+ }, z.core.$strip>>;
126
+ failure: z.ZodNullable<z.ZodObject<{
127
+ stepRef: z.ZodString;
128
+ message: z.ZodString;
129
+ at: z.ZodNumber;
130
+ }, z.core.$strip>>;
131
+ }, z.core.$strip>;
132
+ /** Server device state, key `configState`. Committed changesets are absent. */
133
+ export declare const sConfigState: z.ZodObject<{
134
+ changesets: z.ZodRecord<z.ZodString, z.ZodObject<{
135
+ id: z.ZodString;
136
+ phase: z.ZodEnum<{
137
+ failed: "failed";
138
+ pending: "pending";
139
+ committing: "committing";
140
+ }>;
141
+ label: z.ZodString;
142
+ originator: z.ZodString;
143
+ by: z.ZodNullable<z.ZodObject<{
144
+ id: z.ZodString;
145
+ name: z.ZodString;
146
+ }, z.core.$strip>>;
147
+ attempt: z.ZodNumber;
148
+ proposedAt: z.ZodNumber;
149
+ updatedAt: z.ZodNumber;
150
+ devices: z.ZodRecord<z.ZodString, z.ZodObject<{
151
+ id: z.ZodString;
152
+ name: z.ZodString;
153
+ type: z.ZodString;
154
+ change: z.ZodEnum<{
155
+ add: "add";
156
+ update: "update";
157
+ remove: "remove";
158
+ relation: "relation";
159
+ reconcile: "reconcile";
160
+ }>;
161
+ }, z.core.$strip>>;
162
+ steps: z.ZodArray<z.ZodObject<{
163
+ ref: z.ZodString;
164
+ deviceId: z.ZodString;
165
+ kind: z.ZodEnum<{
166
+ check: "check";
167
+ effect: "effect";
168
+ }>;
169
+ type: z.ZodString;
170
+ label: z.ZodString;
171
+ dependsOn: z.ZodArray<z.ZodString>;
172
+ status: z.ZodEnum<{
173
+ waiting: "waiting";
174
+ running: "running";
175
+ succeeded: "succeeded";
176
+ failed: "failed";
177
+ skipped: "skipped";
178
+ }>;
179
+ attempt: z.ZodNumber;
180
+ startedAt: z.ZodNullable<z.ZodNumber>;
181
+ finishedAt: z.ZodNullable<z.ZodNumber>;
182
+ error: z.ZodNullable<z.ZodObject<{
183
+ name: z.ZodString;
184
+ message: z.ZodString;
185
+ }, z.core.$strip>>;
186
+ }, z.core.$strip>>;
187
+ failure: z.ZodNullable<z.ZodObject<{
188
+ stepRef: z.ZodString;
189
+ message: z.ZodString;
190
+ at: z.ZodNumber;
191
+ }, z.core.$strip>>;
192
+ }, z.core.$strip>>;
193
+ }, z.core.$strip>;
194
+ /** Any existing touched device's state, key `configState`. Absent when untouched. */
195
+ export declare const sDeviceConfigState: z.ZodObject<{
196
+ changesetId: z.ZodString;
197
+ phase: z.ZodEnum<{
198
+ failed: "failed";
199
+ pending: "pending";
200
+ committing: "committing";
201
+ }>;
202
+ }, z.core.$strip>;
203
+ export type Step = z.infer<typeof sStep>;
204
+ export type StepStatus = z.infer<typeof sStepStatus>;
205
+ export type ChangesetDevice = z.infer<typeof sChangesetDevice>;
206
+ export type ChangesetPhase = z.infer<typeof sChangesetPhase>;
207
+ export type Changeset = z.infer<typeof sChangeset>;
208
+ export type ConfigState = z.infer<typeof sConfigState>;
209
+ export type DeviceConfigState = z.infer<typeof sDeviceConfigState>;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sDeviceConfigState = exports.sConfigState = exports.sChangeset = exports.sChangesetFailure = exports.sChangesetPhase = exports.sChangesetDevice = exports.sDeviceChange = exports.sStep = exports.sStepStatus = exports.sStepKind = exports.sChangesetId = exports.MAX_STEP_ATTEMPTS = exports.COMMIT_STEP_REF = exports.CONFIG_STATE_KEY = void 0;
4
+ // api-types: objects/device/changeset.ts
5
+ const zod_1 = require("zod");
6
+ exports.CONFIG_STATE_KEY = 'deviceChanges';
7
+ exports.COMMIT_STEP_REF = '<commit>';
8
+ exports.MAX_STEP_ATTEMPTS = 3;
9
+ exports.sChangesetId = zod_1.z.string();
10
+ /** `check` is reserved for verification steps; nothing emits it yet. */
11
+ exports.sStepKind = zod_1.z.enum(['effect', 'check']);
12
+ /** `skipped`: a step this one depended on failed, so it never ran. */
13
+ exports.sStepStatus = zod_1.z.enum([
14
+ 'waiting',
15
+ 'running',
16
+ 'succeeded',
17
+ 'failed',
18
+ 'skipped',
19
+ ]);
20
+ exports.sStep = zod_1.z.object({
21
+ /** `<planner>/<deviceId>/<ref>`, unique within the changeset. */
22
+ ref: zod_1.z.string().min(1),
23
+ deviceId: zod_1.z.string(),
24
+ kind: exports.sStepKind,
25
+ type: zod_1.z.string().min(1),
26
+ label: zod_1.z.string(),
27
+ dependsOn: zod_1.z.array(zod_1.z.string()),
28
+ status: exports.sStepStatus,
29
+ attempt: zod_1.z.number().int().min(0).max(exports.MAX_STEP_ATTEMPTS),
30
+ startedAt: zod_1.z.number().int().nullable(),
31
+ finishedAt: zod_1.z.number().int().nullable(),
32
+ error: zod_1.z.object({ name: zod_1.z.string(), message: zod_1.z.string() }).nullable(),
33
+ });
34
+ exports.sDeviceChange = zod_1.z.enum([
35
+ 'add',
36
+ 'update',
37
+ 'remove',
38
+ 'relation',
39
+ 'reconcile',
40
+ ]);
41
+ exports.sChangesetDevice = zod_1.z.object({
42
+ id: zod_1.z.string(),
43
+ name: zod_1.z.string(),
44
+ type: zod_1.z.string(),
45
+ change: exports.sDeviceChange,
46
+ });
47
+ exports.sChangesetPhase = zod_1.z.enum(['pending', 'committing', 'failed']);
48
+ exports.sChangesetFailure = zod_1.z.object({
49
+ /** `COMMIT_STEP_REF` when the commit itself failed. */
50
+ stepRef: zod_1.z.string(),
51
+ message: zod_1.z.string(),
52
+ at: zod_1.z.number().int(),
53
+ });
54
+ exports.sChangeset = zod_1.z.object({
55
+ id: exports.sChangesetId,
56
+ phase: exports.sChangesetPhase,
57
+ label: zod_1.z.string(),
58
+ /** `http/<X-Request-Id>` or `system/boot`. How a client recognises its own. */
59
+ originator: zod_1.z.string(),
60
+ by: zod_1.z.object({ id: zod_1.z.string(), name: zod_1.z.string() }).nullable(),
61
+ /** 1 on proposal, +1 per retry. The id never changes. */
62
+ attempt: zod_1.z.number().int().min(1),
63
+ proposedAt: zod_1.z.number().int(),
64
+ updatedAt: zod_1.z.number().int(),
65
+ devices: zod_1.z.record(zod_1.z.string(), exports.sChangesetDevice),
66
+ steps: zod_1.z.array(exports.sStep),
67
+ failure: exports.sChangesetFailure.nullable(),
68
+ });
69
+ /** Server device state, key `configState`. Committed changesets are absent. */
70
+ exports.sConfigState = zod_1.z.object({
71
+ changesets: zod_1.z.record(exports.sChangesetId, exports.sChangeset),
72
+ });
73
+ /** Any existing touched device's state, key `configState`. Absent when untouched. */
74
+ exports.sDeviceConfigState = zod_1.z.object({
75
+ changesetId: exports.sChangesetId,
76
+ phase: exports.sChangesetPhase,
77
+ });
@@ -21,3 +21,4 @@ export * from './nvr-recorder';
21
21
  export * from './nvr-exporter';
22
22
  export * from './nvr-analytics-server';
23
23
  export * from './system';
24
+ export * from './changeset';
@@ -37,3 +37,4 @@ __exportStar(require("./nvr-recorder"), exports);
37
37
  __exportStar(require("./nvr-exporter"), exports);
38
38
  __exportStar(require("./nvr-analytics-server"), exports);
39
39
  __exportStar(require("./system"), exports);
40
+ __exportStar(require("./changeset"), exports);
@@ -1,4 +1,5 @@
1
- import { AccessControlCapabilityReport } from '../../objects';
1
+ import { ConfigState } from '../../objects/device/changeset';
2
+ import { AccessControlCapabilityReport } from '../agent-metadata';
2
3
  import { ModuleConfig, ModuleConfigMetadata } from '../module-config';
3
4
  export declare const SERVER = "server";
4
5
  export type AccessControlProviderState = AccessControlCapabilityReport & {
@@ -15,4 +16,5 @@ export type ServerState = {
15
16
  runnableProviders: string[];
16
17
  accessControlProviders: Record<string, AccessControlProviderState>;
17
18
  citadelMode: boolean;
19
+ deviceChanges: ConfigState;
18
20
  };
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.135",
7
+ "version": "2.0.137",
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.135",
7
+ "version": "2.0.137",
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",