@awarevue/api-types 2.0.135 → 2.0.136

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>>;
@@ -168,3 +168,218 @@ export type DeviceSearchCriteria = {
168
168
  };
169
169
  export type EventVariantDescription = z.infer<typeof sEventVariantDescription>;
170
170
  export type GetEventCatalogResponse = z.infer<typeof sGetEventCatalogResponse>;
171
+ /** The 202 body of a device write that is being applied. */
172
+ export declare const sPendingDeviceWrite: z.ZodObject<{
173
+ device: z.ZodNullable<z.ZodIntersection<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
174
+ type: z.ZodLiteral<"alarm">;
175
+ }, z.core.$strip>, z.ZodObject<{
176
+ ptzCapable: z.ZodBoolean;
177
+ ptzPanSpeed: z.ZodNumber;
178
+ ptzTiltSpeed: z.ZodNumber;
179
+ ptzZoomSpeed: z.ZodNumber;
180
+ panMin: z.ZodNumber;
181
+ panMax: z.ZodNumber;
182
+ tiltMin: z.ZodNumber;
183
+ tiltMax: z.ZodNumber;
184
+ zoomMin: z.ZodNumber;
185
+ zoomMax: z.ZodNumber;
186
+ streams: z.ZodArray<z.ZodObject<{
187
+ id: z.ZodString;
188
+ displayName: z.ZodString;
189
+ externalPlayerUrl: z.ZodNullable<z.ZodString>;
190
+ rtspUrl: z.ZodNullable<z.ZodString>;
191
+ width: z.ZodNullable<z.ZodNumber>;
192
+ height: z.ZodNullable<z.ZodNumber>;
193
+ lensType: z.ZodEnum<{
194
+ flat: "flat";
195
+ fisheye: "fisheye";
196
+ }>;
197
+ mountPoint: z.ZodEnum<{
198
+ wall: "wall";
199
+ ceiling: "ceiling";
200
+ floor: "floor";
201
+ }>;
202
+ }, z.core.$strip>>;
203
+ defaultStreamId: z.ZodString;
204
+ autoSwitchStreams: z.ZodBoolean;
205
+ streamNaming: z.ZodEnum<{
206
+ cameraStreamNo: "cameraStreamNo";
207
+ cameraStream: "cameraStream";
208
+ stream: "stream";
209
+ }>;
210
+ type: z.ZodLiteral<"camera">;
211
+ }, z.core.$strip>, z.ZodObject<{
212
+ canReportOpenState: z.ZodBoolean;
213
+ canReportLockState: z.ZodBoolean;
214
+ canControlLock: z.ZodBoolean;
215
+ canRelease: z.ZodBoolean;
216
+ type: z.ZodLiteral<"door">;
217
+ }, z.core.$strip>, z.ZodObject<{
218
+ inputs: z.ZodArray<z.ZodString>;
219
+ outputs: z.ZodArray<z.ZodString>;
220
+ type: z.ZodLiteral<"io-board">;
221
+ }, z.core.$strip>, z.ZodObject<{
222
+ type: z.ZodLiteral<"camera-lift">;
223
+ }, z.core.$strip>, z.ZodObject<{
224
+ type: z.ZodLiteral<"motion-sensor">;
225
+ }, z.core.$strip>, z.ZodObject<{
226
+ type: z.ZodLiteral<"generic-sensor">;
227
+ }, z.core.$strip>, z.ZodObject<{
228
+ type: z.ZodLiteral<"panic-button">;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ sipUri: z.ZodString;
231
+ sipUser: z.ZodString;
232
+ sipPassword: z.ZodString;
233
+ sipRealm: z.ZodString;
234
+ remoteExtension: z.ZodString;
235
+ type: z.ZodLiteral<"intercom-terminal">;
236
+ }, z.core.$strip>, z.ZodObject<{
237
+ sipWsUrl: z.ZodString;
238
+ type: z.ZodLiteral<"pbx">;
239
+ }, z.core.$strip>, z.ZodObject<{
240
+ type: z.ZodLiteral<"server">;
241
+ }, z.core.$strip>, z.ZodObject<{
242
+ type: z.ZodLiteral<"intercom-operator">;
243
+ }, z.core.$strip>, z.ZodObject<{
244
+ type: z.ZodLiteral<"device-gateway">;
245
+ }, z.core.$strip>, z.ZodObject<{
246
+ type: z.ZodLiteral<"presence-tracker">;
247
+ }, z.core.$strip>, z.ZodObject<{
248
+ credentialTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
249
+ card: "card";
250
+ pin: "pin";
251
+ fingerprint: "fingerprint";
252
+ face: "face";
253
+ retina: "retina";
254
+ }>>>;
255
+ type: z.ZodLiteral<"reader">;
256
+ }, z.core.$strip>, z.ZodObject<{
257
+ type: z.ZodLiteral<"display">;
258
+ }, z.core.$strip>, z.ZodObject<{
259
+ type: z.ZodLiteral<"nvr-recorder">;
260
+ }, z.core.$strip>, z.ZodObject<{
261
+ type: z.ZodLiteral<"nvr-exporter">;
262
+ }, z.core.$strip>, z.ZodObject<{
263
+ capabilities: z.ZodArray<z.ZodEnum<{
264
+ motionDetection: "motionDetection";
265
+ labelDetection: "labelDetection";
266
+ faceRecognition: "faceRecognition";
267
+ semanticSearch: "semanticSearch";
268
+ }>>;
269
+ type: z.ZodLiteral<"nvr-analytics-server">;
270
+ }, z.core.$strip>, z.ZodObject<{
271
+ type: z.ZodLiteral<"system">;
272
+ }, z.core.$strip>, z.ZodObject<{
273
+ type: z.ZodLiteral<"position-tracker">;
274
+ }, z.core.$strip>], "type">, z.ZodObject<{
275
+ id: z.ZodString;
276
+ presets: z.ZodArray<z.ZodObject<{
277
+ id: z.ZodString;
278
+ name: z.ZodString;
279
+ params: z.ZodUnknown;
280
+ isDefault: z.ZodBoolean;
281
+ assignedRef: z.ZodNullable<z.ZodString>;
282
+ createdOn: z.ZodString;
283
+ lastModifiedOn: z.ZodString;
284
+ }, z.core.$strip>>;
285
+ providerAssignedName: z.ZodString;
286
+ notes: z.ZodNullable<z.ZodString>;
287
+ tags: z.ZodArray<z.ZodString>;
288
+ displaySettings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
289
+ relations: z.ZodArray<z.ZodObject<{
290
+ id: z.ZodString;
291
+ kind: z.ZodEnum<{
292
+ attachedTo: "attachedTo";
293
+ parent: "parent";
294
+ child: "child";
295
+ holds: "holds";
296
+ isHeldBy: "isHeldBy";
297
+ observes: "observes";
298
+ isObservedBy: "isObservedBy";
299
+ sendsInputTo: "sendsInputTo";
300
+ receivesInputFrom: "receivesInputFrom";
301
+ sendsOutputTo: "sendsOutputTo";
302
+ receivesOutputFrom: "receivesOutputFrom";
303
+ unlocks: "unlocks";
304
+ isUnlockedBy: "isUnlockedBy";
305
+ controls: "controls";
306
+ isControlledBy: "isControlledBy";
307
+ records: "records";
308
+ isRecordedBy: "isRecordedBy";
309
+ reads: "reads";
310
+ isReadBy: "isReadBy";
311
+ isIngestedBy: "isIngestedBy";
312
+ ingests: "ingests";
313
+ }>;
314
+ }, z.core.$catchall<z.ZodUnknown>>>;
315
+ groups: z.ZodArray<z.ZodString>;
316
+ enabled: z.ZodBoolean;
317
+ createdOn: z.ZodString;
318
+ lastModifiedOn: z.ZodString;
319
+ }, z.core.$strip>>, z.ZodObject<{
320
+ name: z.ZodString;
321
+ foreignRef: z.ZodString;
322
+ provider: z.ZodString;
323
+ providerMetadata: z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>;
324
+ }, z.core.$strip>>>;
325
+ changeset: z.ZodObject<{
326
+ id: z.ZodString;
327
+ phase: z.ZodEnum<{
328
+ failed: "failed";
329
+ pending: "pending";
330
+ committing: "committing";
331
+ }>;
332
+ label: z.ZodString;
333
+ originator: z.ZodString;
334
+ by: z.ZodNullable<z.ZodObject<{
335
+ id: z.ZodString;
336
+ name: z.ZodString;
337
+ }, z.core.$strip>>;
338
+ attempt: z.ZodNumber;
339
+ proposedAt: z.ZodNumber;
340
+ updatedAt: z.ZodNumber;
341
+ devices: z.ZodRecord<z.ZodString, z.ZodObject<{
342
+ id: z.ZodString;
343
+ name: z.ZodString;
344
+ type: z.ZodString;
345
+ change: z.ZodEnum<{
346
+ add: "add";
347
+ update: "update";
348
+ remove: "remove";
349
+ relation: "relation";
350
+ reconcile: "reconcile";
351
+ }>;
352
+ }, z.core.$strip>>;
353
+ steps: z.ZodArray<z.ZodObject<{
354
+ ref: z.ZodString;
355
+ deviceId: z.ZodString;
356
+ kind: z.ZodEnum<{
357
+ check: "check";
358
+ effect: "effect";
359
+ }>;
360
+ type: z.ZodString;
361
+ label: z.ZodString;
362
+ dependsOn: z.ZodArray<z.ZodString>;
363
+ status: z.ZodEnum<{
364
+ waiting: "waiting";
365
+ running: "running";
366
+ succeeded: "succeeded";
367
+ failed: "failed";
368
+ skipped: "skipped";
369
+ }>;
370
+ attempt: z.ZodNumber;
371
+ startedAt: z.ZodNullable<z.ZodNumber>;
372
+ finishedAt: z.ZodNullable<z.ZodNumber>;
373
+ error: z.ZodNullable<z.ZodObject<{
374
+ name: z.ZodString;
375
+ message: z.ZodString;
376
+ }, z.core.$strip>>;
377
+ }, z.core.$strip>>;
378
+ failure: z.ZodNullable<z.ZodObject<{
379
+ stepRef: z.ZodString;
380
+ message: z.ZodString;
381
+ at: z.ZodNumber;
382
+ }, z.core.$strip>>;
383
+ }, z.core.$strip>;
384
+ }, z.core.$strip>;
385
+ 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.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({
@@ -53,3 +53,8 @@ exports.sRemoveDevicePresetRequest = zod_1.z.object({
53
53
  });
54
54
  exports.sGetEventCatalogResponse = zod_1.z.array(objects_1.sEventDescription);
55
55
  exports.sSetUnsetRelationRequest = objects_1.sDeviceRelationDto;
56
+ /** The 202 body of a device write that is being applied. */
57
+ exports.sPendingDeviceWrite = zod_1.z.object({
58
+ device: objects_1.sDeviceDto.nullable(), // import sDeviceDto from the device schemas
59
+ changeset: objects_1.sChangeset,
60
+ });
@@ -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.136",
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.136",
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",