@awarevue/api-types 2.0.21 → 2.0.23

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.
Files changed (377) hide show
  1. package/dist/_legacy/index.d.ts +2 -0
  2. package/dist/_legacy/index.js +2 -0
  3. package/dist/_legacy/milestone.js +1 -0
  4. package/dist/_legacy/orchid.js +1 -0
  5. package/dist/alarm-automation.d.ts +3 -3
  6. package/dist/alarm-automation.js +26 -37
  7. package/dist/api/agent-protocol/index.d.ts +1 -0
  8. package/dist/api/agent-protocol/index.js +1 -0
  9. package/dist/{agent-communication → api/agent-protocol}/protocol.d.ts +412 -598
  10. package/dist/api/agent-protocol/protocol.js +382 -0
  11. package/dist/api/commands/alarm.js +59 -0
  12. package/dist/{commands → api/commands}/all.d.ts +83 -83
  13. package/dist/{commands → api/commands}/all.js +22 -25
  14. package/dist/api/commands/camera-lift.js +14 -0
  15. package/dist/api/commands/camera.js +93 -0
  16. package/dist/api/commands/display.js +34 -0
  17. package/dist/api/commands/door.js +24 -0
  18. package/dist/api/commands/index.js +12 -0
  19. package/dist/api/commands/intercom-terminal.js +2 -0
  20. package/dist/api/commands/io-board.js +12 -0
  21. package/dist/api/commands/nvr-exporter.js +23 -0
  22. package/dist/api/commands/pbx.js +14 -0
  23. package/dist/api/commands/presence-tracker.js +30 -0
  24. package/dist/api/commands/server.js +24 -0
  25. package/dist/api/error.js +181 -0
  26. package/dist/api/events/alarm.js +52 -0
  27. package/dist/{events → api/events}/all.d.ts +8 -8
  28. package/dist/api/events/all.js +124 -0
  29. package/dist/api/events/camera.js +84 -0
  30. package/dist/api/events/display.js +6 -0
  31. package/dist/api/events/door.js +59 -0
  32. package/dist/api/events/index.js +12 -0
  33. package/dist/api/events/intercom-terminal.js +16 -0
  34. package/dist/api/events/io-board.js +10 -0
  35. package/dist/api/events/nvr-exporter.js +18 -0
  36. package/dist/api/events/panic-button.js +8 -0
  37. package/dist/api/events/presence-tracker.js +30 -0
  38. package/dist/api/events/reader.js +10 -0
  39. package/dist/{events → api/events}/server.d.ts +5 -5
  40. package/dist/api/events/server.js +12 -0
  41. package/dist/api/index.d.ts +9 -4
  42. package/dist/api/index.js +9 -20
  43. package/dist/api/mqtt/index.d.ts +1 -0
  44. package/dist/api/mqtt/index.js +1 -0
  45. package/dist/api/mqtt/payloads.js +18 -0
  46. package/dist/api/queries/all.js +25 -0
  47. package/dist/api/queries/camera.js +24 -0
  48. package/dist/api/queries/index.js +5 -0
  49. package/dist/api/queries/nvr-analytics-server.js +73 -0
  50. package/dist/api/queries/nvr-exporter.js +33 -0
  51. package/dist/api/queries/nvr-recorder.js +39 -0
  52. package/dist/api/rest/access-rule.d.ts +117 -0
  53. package/dist/api/rest/access-rule.js +10 -0
  54. package/dist/{access-control → api/rest}/agreement.d.ts +0 -20
  55. package/dist/api/rest/agreement.js +7 -0
  56. package/dist/api/rest/alarm.js +1 -0
  57. package/dist/{api-keys.d.ts → api/rest/api-keys.d.ts} +0 -20
  58. package/dist/api/rest/api-keys.js +11 -0
  59. package/dist/api/rest/app.js +9 -0
  60. package/dist/api/rest/auth.js +16 -0
  61. package/dist/{automation.d.ts → api/rest/automation.d.ts} +0 -217
  62. package/dist/api/rest/automation.js +14 -0
  63. package/dist/api/rest/aware-config.js +1 -0
  64. package/dist/{bookmarks.d.ts → api/rest/bookmarks.d.ts} +0 -49
  65. package/dist/api/rest/bookmarks.js +18 -0
  66. package/dist/api/rest/cast.js +7 -0
  67. package/dist/{custom-field.d.ts → api/rest/custom-field.d.ts} +1 -19
  68. package/dist/api/rest/custom-field.js +3 -0
  69. package/dist/{device-event.d.ts → api/rest/device-event.d.ts} +1 -1
  70. package/dist/api/rest/device-event.js +1 -0
  71. package/dist/{device-group.d.ts → api/rest/device-group.d.ts} +0 -23
  72. package/dist/api/rest/device-group.js +17 -0
  73. package/dist/api/rest/file.js +1 -0
  74. package/dist/api/rest/index.d.ts +34 -0
  75. package/dist/api/rest/index.js +34 -0
  76. package/dist/{device-factory.d.ts → api/rest/io-device.d.ts} +1 -1
  77. package/dist/api/rest/io-device.js +19 -0
  78. package/dist/{layout.d.ts → api/rest/layout.d.ts} +6 -107
  79. package/dist/api/rest/layout.js +19 -0
  80. package/dist/{macros.d.ts → api/rest/macros.d.ts} +0 -82
  81. package/dist/api/rest/macros.js +8 -0
  82. package/dist/api/rest/media.js +65 -0
  83. package/dist/api/rest/module-config.d.ts +19 -0
  84. package/dist/api/rest/module-config.js +1 -0
  85. package/dist/api/rest/notifications.d.ts +21 -0
  86. package/dist/api/rest/notifications.js +9 -0
  87. package/dist/api/rest/person-agreement.d.ts +15 -0
  88. package/dist/api/rest/person-agreement.js +6 -0
  89. package/dist/api/rest/person-presence.d.ts +72 -0
  90. package/dist/api/rest/person-presence.js +29 -0
  91. package/dist/{access-control → api/rest}/person-type.d.ts +1 -33
  92. package/dist/api/rest/person-type.js +8 -0
  93. package/dist/api/rest/person.d.ts +128 -0
  94. package/dist/api/rest/person.js +8 -0
  95. package/dist/api/{query.js → rest/query.js} +8 -13
  96. package/dist/api/rest/schedule.d.ts +249 -0
  97. package/dist/api/rest/schedule.js +9 -0
  98. package/dist/{security-level.d.ts → api/rest/security-level.d.ts} +0 -29
  99. package/dist/api/rest/security-level.js +5 -0
  100. package/dist/{template.d.ts → api/rest/template.d.ts} +1 -18
  101. package/dist/api/rest/template.js +12 -0
  102. package/dist/{token-conversion.d.ts → api/rest/token-conversion.d.ts} +0 -22
  103. package/dist/api/rest/token-conversion.js +5 -0
  104. package/dist/{user.d.ts → api/rest/user.d.ts} +10 -60
  105. package/dist/api/rest/user.js +32 -0
  106. package/dist/api/rest/view.d.ts +397 -0
  107. package/dist/api/rest/view.js +16 -0
  108. package/dist/api/rest/webrtc-playback.js +8 -0
  109. package/dist/{access-control → api/rest}/zone.d.ts +0 -29
  110. package/dist/api/rest/zone.js +10 -0
  111. package/dist/api/state/index.d.ts +10 -0
  112. package/dist/api/state/index.js +1 -0
  113. package/dist/api/ws/device-communication.js +55 -0
  114. package/dist/api/ws/index.js +5 -0
  115. package/dist/api/ws/notifications.js +20 -0
  116. package/dist/api/ws/progress.js +44 -0
  117. package/dist/api/ws/web-rtc-signaling.js +92 -0
  118. package/dist/api/ws/web-socket.js +2 -0
  119. package/dist/index.d.ts +1 -36
  120. package/dist/index.js +6 -57
  121. package/dist/{access-control → objects}/access-rule.d.ts +9 -78
  122. package/dist/objects/access-rule.js +36 -0
  123. package/dist/objects/agent-metadata.d.ts +192 -0
  124. package/dist/objects/agent-metadata.js +49 -0
  125. package/dist/objects/agreement.d.ts +21 -0
  126. package/dist/objects/agreement.js +8 -0
  127. package/dist/{objects.d.ts → objects/all.d.ts} +18 -11
  128. package/dist/{objects.js → objects/all.js} +4 -7
  129. package/dist/objects/api-key.d.ts +21 -0
  130. package/dist/objects/api-key.js +8 -0
  131. package/dist/objects/automation-rule.d.ts +218 -0
  132. package/dist/objects/automation-rule.js +51 -0
  133. package/dist/objects/bookmark.d.ts +50 -0
  134. package/dist/objects/bookmark.js +13 -0
  135. package/dist/objects/credential.js +11 -0
  136. package/dist/objects/custom-field.d.ts +20 -0
  137. package/dist/objects/custom-field.js +14 -0
  138. package/dist/{device → objects/device}/alarm.js +3 -6
  139. package/dist/{device → objects/device}/any-device.d.ts +510 -510
  140. package/dist/objects/device/any-device.js +239 -0
  141. package/dist/objects/device/camera-lift.js +4 -0
  142. package/dist/objects/device/camera.js +32 -0
  143. package/dist/objects/device/device-gateway.js +2 -0
  144. package/dist/{device-import.d.ts → objects/device/device-import.d.ts} +44 -44
  145. package/dist/objects/device/device-import.js +30 -0
  146. package/dist/{device-relation.js → objects/device/device-relation.js} +13 -16
  147. package/dist/objects/device/display.js +4 -0
  148. package/dist/objects/device/door.js +9 -0
  149. package/dist/{device → objects/device}/index.d.ts +2 -0
  150. package/dist/objects/device/index.js +22 -0
  151. package/dist/objects/device/intercom-operator.js +1 -0
  152. package/dist/objects/device/intercom-terminal.js +23 -0
  153. package/dist/objects/device/io-board.js +7 -0
  154. package/dist/objects/device/motion-sensor.js +4 -0
  155. package/dist/objects/device/nvr-analytics-server.js +6 -0
  156. package/dist/objects/device/nvr-exporter.js +7 -0
  157. package/dist/objects/device/nvr-recorder.js +6 -0
  158. package/dist/objects/device/panic-button.js +4 -0
  159. package/dist/objects/device/pbx.js +6 -0
  160. package/dist/objects/device/presence-tracker.js +1 -0
  161. package/dist/objects/device/reader.js +1 -0
  162. package/dist/{device → objects/device}/server.d.ts +1 -1
  163. package/dist/objects/device/server.js +1 -0
  164. package/dist/objects/device/system.js +6 -0
  165. package/dist/objects/device-group.d.ts +24 -0
  166. package/dist/objects/device-group.js +9 -0
  167. package/dist/objects/index.d.ts +27 -0
  168. package/dist/objects/index.js +27 -0
  169. package/dist/objects/layout.d.ts +102 -0
  170. package/dist/objects/layout.js +22 -0
  171. package/dist/objects/macro.d.ts +83 -0
  172. package/dist/objects/macro.js +22 -0
  173. package/dist/{module-config.d.ts → objects/module-config.d.ts} +1 -18
  174. package/dist/objects/module-config.js +1 -0
  175. package/dist/{notifications.d.ts → objects/notification.d.ts} +0 -20
  176. package/dist/objects/notification.js +13 -0
  177. package/dist/{access-control → objects}/person-agreement.d.ts +1 -15
  178. package/dist/objects/person-agreement.js +8 -0
  179. package/dist/{access-control → objects}/person-presence.d.ts +2 -73
  180. package/dist/objects/person-presence.js +35 -0
  181. package/dist/objects/person-type.d.ts +33 -0
  182. package/dist/objects/person-type.js +16 -0
  183. package/dist/{access-control → objects}/person.d.ts +74 -140
  184. package/dist/objects/person.js +42 -0
  185. package/dist/objects/role.d.ts +21 -0
  186. package/dist/objects/role.js +15 -0
  187. package/dist/{access-control → objects}/schedule.d.ts +4 -129
  188. package/dist/objects/schedule.js +53 -0
  189. package/dist/objects/security-level.d.ts +30 -0
  190. package/dist/objects/security-level.js +11 -0
  191. package/dist/objects/template.d.ts +20 -0
  192. package/dist/objects/template.js +8 -0
  193. package/dist/objects/token-conversion.d.ts +23 -0
  194. package/dist/objects/token-conversion.js +8 -0
  195. package/dist/objects/user.d.ts +31 -0
  196. package/dist/objects/user.js +12 -0
  197. package/dist/{view.d.ts → objects/view.d.ts} +3 -399
  198. package/dist/objects/view.js +64 -0
  199. package/dist/{world-objects.js → objects/world-object.js} +9 -8
  200. package/dist/objects/zone.d.ts +41 -0
  201. package/dist/objects/zone.js +15 -0
  202. package/dist/package.json +1 -1
  203. package/dist/permissions.js +146 -149
  204. package/dist/primitives.d.ts +30 -30
  205. package/dist/primitives.js +27 -30
  206. package/package.json +1 -1
  207. package/dist/access-control/access-rule.js +0 -49
  208. package/dist/access-control/agreement.js +0 -20
  209. package/dist/access-control/credential.js +0 -17
  210. package/dist/access-control/index.d.ts +0 -9
  211. package/dist/access-control/index.js +0 -25
  212. package/dist/access-control/person-agreement.js +0 -19
  213. package/dist/access-control/person-presence.js +0 -66
  214. package/dist/access-control/person-type.js +0 -29
  215. package/dist/access-control/person.js +0 -53
  216. package/dist/access-control/schedule.js +0 -65
  217. package/dist/access-control/zone.js +0 -28
  218. package/dist/agent-communication/index.d.ts +0 -2
  219. package/dist/agent-communication/index.js +0 -18
  220. package/dist/agent-communication/mqtt-payloads.js +0 -21
  221. package/dist/agent-communication/protocol.js +0 -434
  222. package/dist/api/alarm.js +0 -2
  223. package/dist/api/auth.js +0 -19
  224. package/dist/api/media.js +0 -68
  225. package/dist/api-keys.js +0 -21
  226. package/dist/app.js +0 -12
  227. package/dist/automation.js +0 -66
  228. package/dist/aware-config.js +0 -2
  229. package/dist/bookmarks.js +0 -32
  230. package/dist/cast.js +0 -13
  231. package/dist/commands/alarm.js +0 -62
  232. package/dist/commands/camera-lift.js +0 -17
  233. package/dist/commands/camera.js +0 -97
  234. package/dist/commands/display.js +0 -37
  235. package/dist/commands/door.js +0 -27
  236. package/dist/commands/index.js +0 -28
  237. package/dist/commands/intercom-terminal.js +0 -3
  238. package/dist/commands/io-board.js +0 -15
  239. package/dist/commands/nvr-exporter.js +0 -26
  240. package/dist/commands/pbx.js +0 -17
  241. package/dist/commands/presence-tracker.js +0 -33
  242. package/dist/commands/server.js +0 -27
  243. package/dist/custom-field.js +0 -19
  244. package/dist/device/any-device.js +0 -242
  245. package/dist/device/camera-lift.js +0 -7
  246. package/dist/device/camera.js +0 -35
  247. package/dist/device/device-gateway.js +0 -5
  248. package/dist/device/display.js +0 -7
  249. package/dist/device/door.js +0 -12
  250. package/dist/device/index.js +0 -36
  251. package/dist/device/intercom-operator.js +0 -4
  252. package/dist/device/intercom-terminal.js +0 -26
  253. package/dist/device/io-board.js +0 -10
  254. package/dist/device/motion-sensor.js +0 -7
  255. package/dist/device/nvr-analytics-server.js +0 -9
  256. package/dist/device/nvr-exporter.js +0 -10
  257. package/dist/device/nvr-recorder.js +0 -9
  258. package/dist/device/panic-button.js +0 -7
  259. package/dist/device/pbx.js +0 -9
  260. package/dist/device/presence-tracker.js +0 -4
  261. package/dist/device/reader.js +0 -4
  262. package/dist/device/server.js +0 -4
  263. package/dist/device/system.js +0 -9
  264. package/dist/device-event.js +0 -2
  265. package/dist/device-factory.js +0 -26
  266. package/dist/device-group.js +0 -31
  267. package/dist/device-import.js +0 -33
  268. package/dist/device-state.d.ts +0 -10
  269. package/dist/device-state.js +0 -2
  270. package/dist/error.js +0 -185
  271. package/dist/events/alarm.js +0 -55
  272. package/dist/events/all.js +0 -128
  273. package/dist/events/camera.js +0 -87
  274. package/dist/events/display.js +0 -9
  275. package/dist/events/door.js +0 -62
  276. package/dist/events/index.js +0 -28
  277. package/dist/events/intercom-terminal.js +0 -19
  278. package/dist/events/io-board.js +0 -13
  279. package/dist/events/nvr-exporter.js +0 -21
  280. package/dist/events/panic-button.js +0 -11
  281. package/dist/events/presence-tracker.js +0 -33
  282. package/dist/events/reader.js +0 -13
  283. package/dist/events/server.js +0 -15
  284. package/dist/file.js +0 -2
  285. package/dist/layout.js +0 -45
  286. package/dist/macros.js +0 -32
  287. package/dist/messages/device-communication.js +0 -63
  288. package/dist/messages/index.js +0 -21
  289. package/dist/messages/notifications.js +0 -27
  290. package/dist/messages/progress.js +0 -51
  291. package/dist/messages/web-rtc-signaling.js +0 -99
  292. package/dist/messages/web-socket.js +0 -5
  293. package/dist/milestone.js +0 -2
  294. package/dist/module-config.js +0 -2
  295. package/dist/notifications.js +0 -23
  296. package/dist/orchid.js +0 -2
  297. package/dist/queries/all.js +0 -28
  298. package/dist/queries/camera.js +0 -27
  299. package/dist/queries/index.js +0 -21
  300. package/dist/queries/nvr-analytics-server.js +0 -76
  301. package/dist/queries/nvr-exporter.js +0 -36
  302. package/dist/queries/nvr-recorder.js +0 -42
  303. package/dist/security-level.js +0 -18
  304. package/dist/template.js +0 -21
  305. package/dist/token-conversion.js +0 -15
  306. package/dist/user.js +0 -57
  307. package/dist/view.js +0 -84
  308. package/dist/webrtc-playback.js +0 -14
  309. package/dist/{milestone.d.ts → _legacy/milestone.d.ts} +0 -0
  310. package/dist/{orchid.d.ts → _legacy/orchid.d.ts} +0 -0
  311. package/dist/{commands → api/commands}/alarm.d.ts +0 -0
  312. package/dist/{commands → api/commands}/camera-lift.d.ts +0 -0
  313. package/dist/{commands → api/commands}/camera.d.ts +0 -0
  314. package/dist/{commands → api/commands}/display.d.ts +0 -0
  315. package/dist/{commands → api/commands}/door.d.ts +0 -0
  316. package/dist/{commands → api/commands}/index.d.ts +0 -0
  317. package/dist/{commands → api/commands}/intercom-terminal.d.ts +0 -0
  318. package/dist/{commands → api/commands}/io-board.d.ts +0 -0
  319. package/dist/{commands → api/commands}/nvr-exporter.d.ts +86 -86
  320. package/dist/{commands → api/commands}/pbx.d.ts +0 -0
  321. package/dist/{commands → api/commands}/presence-tracker.d.ts +0 -0
  322. package/dist/{commands → api/commands}/server.d.ts +78 -78
  323. package/dist/{error.d.ts → api/error.d.ts} +0 -0
  324. package/dist/{events → api/events}/alarm.d.ts +0 -0
  325. package/dist/{events → api/events}/camera.d.ts +0 -0
  326. package/dist/{events → api/events}/display.d.ts +0 -0
  327. package/dist/{events → api/events}/door.d.ts +0 -0
  328. package/dist/{events → api/events}/index.d.ts +0 -0
  329. package/dist/{events → api/events}/intercom-terminal.d.ts +0 -0
  330. package/dist/{events → api/events}/io-board.d.ts +0 -0
  331. package/dist/{events → api/events}/nvr-exporter.d.ts +4 -4
  332. package/dist/{events → api/events}/panic-button.d.ts +0 -0
  333. package/dist/{events → api/events}/presence-tracker.d.ts +8 -8
  334. package/dist/{events → api/events}/reader.d.ts +0 -0
  335. package/dist/{agent-communication/mqtt-payloads.d.ts → api/mqtt/payloads.d.ts} +0 -0
  336. package/dist/{queries → api/queries}/all.d.ts +83 -83
  337. package/dist/{queries → api/queries}/camera.d.ts +0 -0
  338. package/dist/{queries → api/queries}/index.d.ts +0 -0
  339. package/dist/{queries → api/queries}/nvr-analytics-server.d.ts +4 -4
  340. package/dist/{queries → api/queries}/nvr-exporter.d.ts +0 -0
  341. package/dist/{queries → api/queries}/nvr-recorder.d.ts +162 -162
  342. package/dist/api/{alarm.d.ts → rest/alarm.d.ts} +0 -0
  343. package/dist/{app.d.ts → api/rest/app.d.ts} +0 -0
  344. package/dist/api/{auth.d.ts → rest/auth.d.ts} +0 -0
  345. package/dist/{aware-config.d.ts → api/rest/aware-config.d.ts} +0 -0
  346. package/dist/{cast.d.ts → api/rest/cast.d.ts} +0 -0
  347. package/dist/{file.d.ts → api/rest/file.d.ts} +0 -0
  348. package/dist/api/{media.d.ts → rest/media.d.ts} +2 -2
  349. /package/dist/api/{query.d.ts → rest/query.d.ts} +0 -0
  350. /package/dist/{webrtc-playback.d.ts → api/rest/webrtc-playback.d.ts} +0 -0
  351. /package/dist/{messages → api/ws}/device-communication.d.ts +0 -0
  352. /package/dist/{messages → api/ws}/index.d.ts +0 -0
  353. /package/dist/{messages → api/ws}/notifications.d.ts +0 -0
  354. /package/dist/{messages → api/ws}/progress.d.ts +0 -0
  355. /package/dist/{messages → api/ws}/web-rtc-signaling.d.ts +0 -0
  356. /package/dist/{messages → api/ws}/web-socket.d.ts +0 -0
  357. /package/dist/{access-control → objects}/credential.d.ts +0 -0
  358. /package/dist/{device → objects/device}/alarm.d.ts +0 -0
  359. /package/dist/{device → objects/device}/camera-lift.d.ts +0 -0
  360. /package/dist/{device → objects/device}/camera.d.ts +0 -0
  361. /package/dist/{device → objects/device}/device-gateway.d.ts +0 -0
  362. /package/dist/{device-relation.d.ts → objects/device/device-relation.d.ts} +0 -0
  363. /package/dist/{device → objects/device}/display.d.ts +0 -0
  364. /package/dist/{device → objects/device}/door.d.ts +0 -0
  365. /package/dist/{device → objects/device}/intercom-operator.d.ts +0 -0
  366. /package/dist/{device → objects/device}/intercom-terminal.d.ts +0 -0
  367. /package/dist/{device → objects/device}/io-board.d.ts +0 -0
  368. /package/dist/{device → objects/device}/motion-sensor.d.ts +0 -0
  369. /package/dist/{device → objects/device}/nvr-analytics-server.d.ts +0 -0
  370. /package/dist/{device → objects/device}/nvr-exporter.d.ts +0 -0
  371. /package/dist/{device → objects/device}/nvr-recorder.d.ts +0 -0
  372. /package/dist/{device → objects/device}/panic-button.d.ts +0 -0
  373. /package/dist/{device → objects/device}/pbx.d.ts +0 -0
  374. /package/dist/{device → objects/device}/presence-tracker.d.ts +0 -0
  375. /package/dist/{device → objects/device}/reader.d.ts +0 -0
  376. /package/dist/{device → objects/device}/system.d.ts +0 -0
  377. /package/dist/{world-objects.d.ts → objects/world-object.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import z from 'zod';
1
+ import { z } from 'zod';
2
2
  export declare const sPersonAccessRule: z.ZodObject<{
3
3
  id: z.ZodString;
4
4
  displayName: z.ZodString;
@@ -9,6 +9,66 @@ export declare const sPersonAccessRule: z.ZodObject<{
9
9
  id: string;
10
10
  displayName: string;
11
11
  }>;
12
+ export declare const sPersonProps: z.ZodObject<{
13
+ firstName: z.ZodString;
14
+ lastName: z.ZodString;
15
+ position: z.ZodNullable<z.ZodString>;
16
+ accessSuspended: z.ZodBoolean;
17
+ staffMember: z.ZodBoolean;
18
+ validFrom: z.ZodNullable<z.ZodString>;
19
+ validTo: z.ZodNullable<z.ZodString>;
20
+ avatarId: z.ZodNullable<z.ZodString>;
21
+ credentials: z.ZodArray<z.ZodObject<{
22
+ type: z.ZodEnum<["card", "pin", "fingerprint"]>;
23
+ value: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
24
+ note: z.ZodNullable<z.ZodString>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ type: "card" | "pin" | "fingerprint";
27
+ value: string | Record<string, unknown>;
28
+ note: string | null;
29
+ }, {
30
+ type: "card" | "pin" | "fingerprint";
31
+ value: string | Record<string, unknown>;
32
+ note: string | null;
33
+ }>, "many">;
34
+ accessRules: z.ZodArray<z.ZodString, "many">;
35
+ customFields: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
36
+ type: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ type: string;
39
+ position: string | null;
40
+ firstName: string;
41
+ lastName: string;
42
+ avatarId: string | null;
43
+ accessSuspended: boolean;
44
+ staffMember: boolean;
45
+ validFrom: string | null;
46
+ validTo: string | null;
47
+ credentials: {
48
+ type: "card" | "pin" | "fingerprint";
49
+ value: string | Record<string, unknown>;
50
+ note: string | null;
51
+ }[];
52
+ accessRules: string[];
53
+ customFields: Record<string, string> | null;
54
+ }, {
55
+ type: string;
56
+ position: string | null;
57
+ firstName: string;
58
+ lastName: string;
59
+ avatarId: string | null;
60
+ accessSuspended: boolean;
61
+ staffMember: boolean;
62
+ validFrom: string | null;
63
+ validTo: string | null;
64
+ credentials: {
65
+ type: "card" | "pin" | "fingerprint";
66
+ value: string | Record<string, unknown>;
67
+ note: string | null;
68
+ }[];
69
+ accessRules: string[];
70
+ customFields: Record<string, string> | null;
71
+ }>;
12
72
  export declare const sPersonDto: z.ZodObject<{
13
73
  id: z.ZodString;
14
74
  firstName: z.ZodString;
@@ -73,17 +133,16 @@ export declare const sPersonDto: z.ZodObject<{
73
133
  id: string;
74
134
  position: string | null;
75
135
  version: number;
76
- refs: Record<string, string | string[]>;
77
- createdOn: string;
78
- lastModifiedOn: string;
79
136
  firstName: string;
80
137
  lastName: string;
81
138
  avatarId: string | null;
82
- validFrom: string | null;
83
- validTo: string | null;
139
+ createdOn: string;
140
+ lastModifiedOn: string;
141
+ refs: Record<string, string | string[]>;
84
142
  accessSuspended: boolean;
85
- archived: boolean;
86
143
  staffMember: boolean;
144
+ validFrom: string | null;
145
+ validTo: string | null;
87
146
  credentials: {
88
147
  type: "card" | "pin" | "fingerprint";
89
148
  value: string | Record<string, unknown>;
@@ -94,6 +153,7 @@ export declare const sPersonDto: z.ZodObject<{
94
153
  displayName: string;
95
154
  }[];
96
155
  customFields: Record<string, string> | null;
156
+ archived: boolean;
97
157
  agreements: {
98
158
  createdOn: string;
99
159
  lastModifiedOn: string;
@@ -106,17 +166,16 @@ export declare const sPersonDto: z.ZodObject<{
106
166
  id: string;
107
167
  position: string | null;
108
168
  version: number;
109
- refs: Record<string, string | string[]>;
110
- createdOn: string;
111
- lastModifiedOn: string;
112
169
  firstName: string;
113
170
  lastName: string;
114
171
  avatarId: string | null;
115
- validFrom: string | null;
116
- validTo: string | null;
172
+ createdOn: string;
173
+ lastModifiedOn: string;
174
+ refs: Record<string, string | string[]>;
117
175
  accessSuspended: boolean;
118
- archived: boolean;
119
176
  staffMember: boolean;
177
+ validFrom: string | null;
178
+ validTo: string | null;
120
179
  credentials: {
121
180
  type: "card" | "pin" | "fingerprint";
122
181
  value: string | Record<string, unknown>;
@@ -127,6 +186,7 @@ export declare const sPersonDto: z.ZodObject<{
127
186
  displayName: string;
128
187
  }[];
129
188
  customFields: Record<string, string> | null;
189
+ archived: boolean;
130
190
  agreements: {
131
191
  createdOn: string;
132
192
  lastModifiedOn: string;
@@ -135,132 +195,6 @@ export declare const sPersonDto: z.ZodObject<{
135
195
  agreementImage: string;
136
196
  }[];
137
197
  }>;
138
- export declare const sCreatePersonRequest: z.ZodObject<{
139
- firstName: z.ZodString;
140
- lastName: z.ZodString;
141
- position: z.ZodNullable<z.ZodString>;
142
- accessSuspended: z.ZodBoolean;
143
- staffMember: z.ZodBoolean;
144
- validFrom: z.ZodNullable<z.ZodString>;
145
- validTo: z.ZodNullable<z.ZodString>;
146
- avatarId: z.ZodNullable<z.ZodString>;
147
- credentials: z.ZodArray<z.ZodObject<{
148
- type: z.ZodEnum<["card", "pin", "fingerprint"]>;
149
- value: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
150
- note: z.ZodNullable<z.ZodString>;
151
- }, "strip", z.ZodTypeAny, {
152
- type: "card" | "pin" | "fingerprint";
153
- value: string | Record<string, unknown>;
154
- note: string | null;
155
- }, {
156
- type: "card" | "pin" | "fingerprint";
157
- value: string | Record<string, unknown>;
158
- note: string | null;
159
- }>, "many">;
160
- accessRules: z.ZodArray<z.ZodString, "many">;
161
- customFields: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
162
- type: z.ZodString;
163
- }, "strip", z.ZodTypeAny, {
164
- type: string;
165
- position: string | null;
166
- firstName: string;
167
- lastName: string;
168
- avatarId: string | null;
169
- validFrom: string | null;
170
- validTo: string | null;
171
- accessSuspended: boolean;
172
- staffMember: boolean;
173
- credentials: {
174
- type: "card" | "pin" | "fingerprint";
175
- value: string | Record<string, unknown>;
176
- note: string | null;
177
- }[];
178
- accessRules: string[];
179
- customFields: Record<string, string> | null;
180
- }, {
181
- type: string;
182
- position: string | null;
183
- firstName: string;
184
- lastName: string;
185
- avatarId: string | null;
186
- validFrom: string | null;
187
- validTo: string | null;
188
- accessSuspended: boolean;
189
- staffMember: boolean;
190
- credentials: {
191
- type: "card" | "pin" | "fingerprint";
192
- value: string | Record<string, unknown>;
193
- note: string | null;
194
- }[];
195
- accessRules: string[];
196
- customFields: Record<string, string> | null;
197
- }>;
198
- export declare const sUpdatePersonRequest: z.ZodObject<{
199
- firstName: z.ZodOptional<z.ZodString>;
200
- lastName: z.ZodOptional<z.ZodString>;
201
- position: z.ZodOptional<z.ZodNullable<z.ZodString>>;
202
- accessSuspended: z.ZodOptional<z.ZodBoolean>;
203
- staffMember: z.ZodOptional<z.ZodBoolean>;
204
- validFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
205
- validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
- avatarId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
207
- credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
208
- type: z.ZodEnum<["card", "pin", "fingerprint"]>;
209
- value: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
210
- note: z.ZodNullable<z.ZodString>;
211
- }, "strip", z.ZodTypeAny, {
212
- type: "card" | "pin" | "fingerprint";
213
- value: string | Record<string, unknown>;
214
- note: string | null;
215
- }, {
216
- type: "card" | "pin" | "fingerprint";
217
- value: string | Record<string, unknown>;
218
- note: string | null;
219
- }>, "many">>;
220
- accessRules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
221
- customFields: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
222
- type: z.ZodOptional<z.ZodString>;
223
- archived: z.ZodOptional<z.ZodBoolean>;
224
- }, "strip", z.ZodTypeAny, {
225
- type?: string | undefined;
226
- position?: string | null | undefined;
227
- firstName?: string | undefined;
228
- lastName?: string | undefined;
229
- avatarId?: string | null | undefined;
230
- validFrom?: string | null | undefined;
231
- validTo?: string | null | undefined;
232
- accessSuspended?: boolean | undefined;
233
- archived?: boolean | undefined;
234
- staffMember?: boolean | undefined;
235
- credentials?: {
236
- type: "card" | "pin" | "fingerprint";
237
- value: string | Record<string, unknown>;
238
- note: string | null;
239
- }[] | undefined;
240
- accessRules?: string[] | undefined;
241
- customFields?: Record<string, string> | null | undefined;
242
- }, {
243
- type?: string | undefined;
244
- position?: string | null | undefined;
245
- firstName?: string | undefined;
246
- lastName?: string | undefined;
247
- avatarId?: string | null | undefined;
248
- validFrom?: string | null | undefined;
249
- validTo?: string | null | undefined;
250
- accessSuspended?: boolean | undefined;
251
- archived?: boolean | undefined;
252
- staffMember?: boolean | undefined;
253
- credentials?: {
254
- type: "card" | "pin" | "fingerprint";
255
- value: string | Record<string, unknown>;
256
- note: string | null;
257
- }[] | undefined;
258
- accessRules?: string[] | undefined;
259
- customFields?: Record<string, string> | null | undefined;
260
- }>;
261
198
  export type PersonAccessRuleDto = z.infer<typeof sPersonAccessRule>;
199
+ export type PersonProps = z.infer<typeof sPersonProps>;
262
200
  export type PersonDto = z.infer<typeof sPersonDto>;
263
- export type CreatePersonRequest = z.infer<typeof sCreatePersonRequest>;
264
- export type UpdatePersonRequest = {
265
- id: string;
266
- } & z.infer<typeof sUpdatePersonRequest>;
@@ -0,0 +1,42 @@
1
+ import { z } from 'zod';
2
+ import { sPersonAgeementDto } from './person-agreement';
3
+ import { sAssignedCredential } from './credential';
4
+ export const sPersonAccessRule = z.object({
5
+ id: z.string(),
6
+ displayName: z.string(),
7
+ });
8
+ export const sPersonProps = z.object({
9
+ firstName: z.string().min(1).max(64),
10
+ lastName: z.string().min(1).max(64),
11
+ position: z.string().nullable(),
12
+ accessSuspended: z.boolean(),
13
+ staffMember: z.boolean(),
14
+ validFrom: z.string().date().nullable(),
15
+ validTo: z.string().date().nullable(),
16
+ avatarId: z.string().nullable(),
17
+ credentials: z.array(sAssignedCredential),
18
+ accessRules: z.array(z.string().nonempty()),
19
+ customFields: z.record(z.string()).nullable(),
20
+ type: z.string().min(1).max(16),
21
+ });
22
+ export const sPersonDto = z.object({
23
+ id: z.string(),
24
+ firstName: z.string().min(1).max(64),
25
+ lastName: z.string().min(1).max(64),
26
+ position: z.string().max(128).nullable(),
27
+ validFrom: z.string().date().nullable(),
28
+ validTo: z.string().date().nullable(),
29
+ accessSuspended: z.boolean(),
30
+ archived: z.boolean(),
31
+ staffMember: z.boolean(),
32
+ createdOn: z.string(),
33
+ lastModifiedOn: z.string(),
34
+ avatarId: z.string().nullable(),
35
+ credentials: z.array(sAssignedCredential),
36
+ accessRules: z.array(sPersonAccessRule),
37
+ customFields: z.record(z.string()).nullable(),
38
+ refs: z.record(z.union([z.string(), z.array(z.string())])),
39
+ version: z.number(),
40
+ type: z.string().min(1).max(64),
41
+ agreements: z.array(sPersonAgeementDto),
42
+ });
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const sRoleDto: z.ZodObject<{
3
+ id: z.ZodString;
4
+ displayName: z.ZodString;
5
+ systemName: z.ZodEffects<z.ZodString, string, string>;
6
+ description: z.ZodString;
7
+ permissions: z.ZodArray<z.ZodUnion<[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<"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<"private-view:update">, z.ZodLiteral<"private-view:delete">, z.ZodLiteral<"private-view:create">, 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<"door-group:read">, z.ZodLiteral<"door-group:update">, z.ZodLiteral<"door-group:delete">, z.ZodLiteral<"door-group:create">, z.ZodLiteral<"access-rule:read">, z.ZodLiteral<"access-rule:update">, z.ZodLiteral<"access-rule:delete">, z.ZodLiteral<"access-rule:create">, z.ZodLiteral<"schedule:read">, 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:read">, 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:alarms">, z.ZodLiteral<"device:adjacent-cameras">, 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:create">, z.ZodLiteral<"template:read">, z.ZodLiteral<"template:update">, z.ZodLiteral<"template:delete">, z.ZodLiteral<"template:create">, z.ZodLiteral<"custom-field:read">, z.ZodLiteral<"custom-field:update">, z.ZodLiteral<"custom-field:delete">, z.ZodLiteral<"custom-field:create">, z.ZodLiteral<"media:read">, z.ZodLiteral<"about:read">, z.ZodLiteral<"intercom:read">, z.ZodLiteral<"display:read">, ...(z.ZodLiteral<"device:camera"> | z.ZodLiteral<"device:door"> | z.ZodLiteral<"device:motion-sensor"> | z.ZodLiteral<"device:panic-button"> | z.ZodLiteral<"device:intercom-terminal"> | z.ZodLiteral<"device:display"> | z.ZodLiteral<"device:nvr-recorder"> | z.ZodLiteral<"device:nvr-exporter"> | z.ZodLiteral<"device:nvr-analytics-server"> | z.ZodLiteral<"device:system">)[], z.ZodLiteral<"security-level: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:read">, 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">]>, "many">;
8
+ }, "strip", z.ZodTypeAny, {
9
+ id: string;
10
+ description: string;
11
+ displayName: string;
12
+ permissions: ("device:camera" | "device:door" | "device:motion-sensor" | "device:panic-button" | "device:intercom-terminal" | "device:display" | "device:nvr-recorder" | "device:nvr-exporter" | "device:nvr-analytics-server" | "device:system" | "layout:read" | "layout:update" | "layout:delete" | "layout:create" | "camera:live" | "camera:playback" | "camera:playback-export" | "camera:ptz" | "camera:privacy-mode" | "camera:assign" | "camera:detection" | "preset:read" | "preset:update" | "preset:delete" | "preset:create" | "door:release" | "door:lock" | "camera-lift:activate" | "io-board:activate" | "public-view:read" | "public-view:update" | "public-view:delete" | "public-view:create" | "private-view:read" | "private-view:update" | "private-view:delete" | "private-view:create" | "person:read" | "person:update" | "person:delete" | "person:create" | "person:assign" | "person:print" | "door-group:read" | "door-group:update" | "door-group:delete" | "door-group:create" | "access-rule:read" | "access-rule:update" | "access-rule:delete" | "access-rule:create" | "schedule:read" | "schedule:update" | "schedule:delete" | "schedule:create" | "presence:read" | "presence:update" | "presence:update-reader" | "factory:read" | "factory:update" | "factory:delete" | "factory:create" | "event:read" | "event:purge" | "alarm:read" | "alarm:acknowlede" | "alarm:arm" | "alarm:trigger" | "alarm:bypass" | "user:read" | "user:change-password" | "user:change-username" | "user:change-name" | "user:change-email" | "user:activate" | "user:delete" | "user:change-roles" | "user:create" | "role:read" | "role:create" | "role:delete" | "role:update" | "module:read" | "module:update" | "module:enable" | "device:discover" | "device:import" | "device:override-specs" | "device:notes" | "device:alarms" | "device:adjacent-cameras" | "automation:read" | "automation:update" | "automation:delete" | "automation:create" | "device-group:read" | "device-group:update" | "device-group:delete" | "device-group:create" | "macro:read" | "macro:update" | "macro:delete" | "macro:create" | "macro:run" | "notification:create" | "template:read" | "template:update" | "template:delete" | "template:create" | "custom-field:read" | "custom-field:update" | "custom-field:delete" | "custom-field:create" | "media:read" | "about:read" | "intercom:read" | "display:read" | "security-level:read" | "security-level:update" | "security-level:delete" | "security-level:create" | "citadel-mode:toggle" | "token-conversion:read" | "token-conversion:update" | "token-conversion:delete" | "token-conversion:create" | "bookmark:read" | "bookmark:create" | "bookmark:update" | "bookmark:delete" | "access-path:read" | "access-path:create" | "access-path:update" | "access-path:delete" | "person-type:create" | "person-type:update" | "person-type:delete" | "agreement:create" | "agreement:update" | "agreement:delete" | "api-key:create" | "api-key:revoke")[];
13
+ systemName: string;
14
+ }, {
15
+ id: string;
16
+ description: string;
17
+ displayName: string;
18
+ permissions: ("device:camera" | "device:door" | "device:motion-sensor" | "device:panic-button" | "device:intercom-terminal" | "device:display" | "device:nvr-recorder" | "device:nvr-exporter" | "device:nvr-analytics-server" | "device:system" | "layout:read" | "layout:update" | "layout:delete" | "layout:create" | "camera:live" | "camera:playback" | "camera:playback-export" | "camera:ptz" | "camera:privacy-mode" | "camera:assign" | "camera:detection" | "preset:read" | "preset:update" | "preset:delete" | "preset:create" | "door:release" | "door:lock" | "camera-lift:activate" | "io-board:activate" | "public-view:read" | "public-view:update" | "public-view:delete" | "public-view:create" | "private-view:read" | "private-view:update" | "private-view:delete" | "private-view:create" | "person:read" | "person:update" | "person:delete" | "person:create" | "person:assign" | "person:print" | "door-group:read" | "door-group:update" | "door-group:delete" | "door-group:create" | "access-rule:read" | "access-rule:update" | "access-rule:delete" | "access-rule:create" | "schedule:read" | "schedule:update" | "schedule:delete" | "schedule:create" | "presence:read" | "presence:update" | "presence:update-reader" | "factory:read" | "factory:update" | "factory:delete" | "factory:create" | "event:read" | "event:purge" | "alarm:read" | "alarm:acknowlede" | "alarm:arm" | "alarm:trigger" | "alarm:bypass" | "user:read" | "user:change-password" | "user:change-username" | "user:change-name" | "user:change-email" | "user:activate" | "user:delete" | "user:change-roles" | "user:create" | "role:read" | "role:create" | "role:delete" | "role:update" | "module:read" | "module:update" | "module:enable" | "device:discover" | "device:import" | "device:override-specs" | "device:notes" | "device:alarms" | "device:adjacent-cameras" | "automation:read" | "automation:update" | "automation:delete" | "automation:create" | "device-group:read" | "device-group:update" | "device-group:delete" | "device-group:create" | "macro:read" | "macro:update" | "macro:delete" | "macro:create" | "macro:run" | "notification:create" | "template:read" | "template:update" | "template:delete" | "template:create" | "custom-field:read" | "custom-field:update" | "custom-field:delete" | "custom-field:create" | "media:read" | "about:read" | "intercom:read" | "display:read" | "security-level:read" | "security-level:update" | "security-level:delete" | "security-level:create" | "citadel-mode:toggle" | "token-conversion:read" | "token-conversion:update" | "token-conversion:delete" | "token-conversion:create" | "bookmark:read" | "bookmark:create" | "bookmark:update" | "bookmark:delete" | "access-path:read" | "access-path:create" | "access-path:update" | "access-path:delete" | "person-type:create" | "person-type:update" | "person-type:delete" | "agreement:create" | "agreement:update" | "agreement:delete" | "api-key:create" | "api-key:revoke")[];
19
+ systemName: string;
20
+ }>;
21
+ export type RoleDto = z.infer<typeof sRoleDto>;
@@ -0,0 +1,15 @@
1
+ import { sPermissionId } from '../permissions';
2
+ import { z } from 'zod';
3
+ export const sRoleDto = z.object({
4
+ id: z.string().uuid(),
5
+ displayName: z.string().nonempty().max(100),
6
+ systemName: z
7
+ .string()
8
+ .nonempty()
9
+ .max(64)
10
+ .refine((value) => !/\s/.test(value), {
11
+ message: 'System name must not contain spaces',
12
+ }),
13
+ description: z.string().nonempty(),
14
+ permissions: z.array(sPermissionId),
15
+ });
@@ -162,9 +162,9 @@ export declare const sScheduleDto: z.ZodObject<{
162
162
  }[];
163
163
  } | null;
164
164
  displayName: string;
165
- refs: Record<string, string | string[]>;
166
165
  createdOn: string;
167
166
  lastModifiedOn: string;
167
+ refs: Record<string, string | string[]>;
168
168
  editable: boolean;
169
169
  deletable: boolean;
170
170
  flag: "always" | "never" | null;
@@ -192,9 +192,9 @@ export declare const sScheduleDto: z.ZodObject<{
192
192
  }[];
193
193
  } | null;
194
194
  displayName: string;
195
- refs: Record<string, string | string[]>;
196
195
  createdOn: string;
197
196
  lastModifiedOn: string;
197
+ refs: Record<string, string | string[]>;
198
198
  editable: boolean;
199
199
  deletable: boolean;
200
200
  flag: "always" | "never" | null;
@@ -250,7 +250,7 @@ export declare const sScheduleDetailsRequest: z.ZodObject<{
250
250
  }[];
251
251
  }>;
252
252
  export type ScheduleDetailsRequest = z.infer<typeof sScheduleDetailsRequest>;
253
- export declare const sCreateScheduleRequest: z.ZodObject<{
253
+ export declare const sScheduleProps: z.ZodObject<{
254
254
  displayName: z.ZodString;
255
255
  flag: z.ZodNullable<z.ZodEnum<["always", "never"]>>;
256
256
  include: z.ZodNullable<z.ZodObject<{
@@ -372,129 +372,4 @@ export declare const sCreateScheduleRequest: z.ZodObject<{
372
372
  displayName: string;
373
373
  flag: "always" | "never" | null;
374
374
  }>;
375
- export type CreateScheduleRequest = z.infer<typeof sCreateScheduleRequest>;
376
- export declare const sUpdateScheduleRequest: z.ZodObject<{
377
- displayName: z.ZodOptional<z.ZodString>;
378
- flag: z.ZodOptional<z.ZodNullable<z.ZodEnum<["always", "never"]>>>;
379
- include: z.ZodOptional<z.ZodNullable<z.ZodObject<{
380
- startDate: z.ZodNullable<z.ZodString>;
381
- endDate: z.ZodNullable<z.ZodString>;
382
- timeIntervals: z.ZodArray<z.ZodObject<{
383
- weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
384
- from: z.ZodNumber;
385
- to: z.ZodNumber;
386
- }, "strip", z.ZodTypeAny, {
387
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
388
- from: number;
389
- to: number;
390
- }, {
391
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
392
- from: number;
393
- to: number;
394
- }>, "many">;
395
- repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
396
- }, "strip", z.ZodTypeAny, {
397
- repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
398
- startDate: string | null;
399
- endDate: string | null;
400
- timeIntervals: {
401
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
402
- from: number;
403
- to: number;
404
- }[];
405
- }, {
406
- repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
407
- startDate: string | null;
408
- endDate: string | null;
409
- timeIntervals: {
410
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
411
- from: number;
412
- to: number;
413
- }[];
414
- }>>>;
415
- exclude: z.ZodOptional<z.ZodNullable<z.ZodObject<{
416
- startDate: z.ZodNullable<z.ZodString>;
417
- endDate: z.ZodNullable<z.ZodString>;
418
- timeIntervals: z.ZodArray<z.ZodObject<{
419
- weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
420
- from: z.ZodNumber;
421
- to: z.ZodNumber;
422
- }, "strip", z.ZodTypeAny, {
423
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
424
- from: number;
425
- to: number;
426
- }, {
427
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
428
- from: number;
429
- to: number;
430
- }>, "many">;
431
- repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
432
- }, "strip", z.ZodTypeAny, {
433
- repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
434
- startDate: string | null;
435
- endDate: string | null;
436
- timeIntervals: {
437
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
438
- from: number;
439
- to: number;
440
- }[];
441
- }, {
442
- repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
443
- startDate: string | null;
444
- endDate: string | null;
445
- timeIntervals: {
446
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
447
- from: number;
448
- to: number;
449
- }[];
450
- }>>>;
451
- }, "strip", z.ZodTypeAny, {
452
- include?: {
453
- repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
454
- startDate: string | null;
455
- endDate: string | null;
456
- timeIntervals: {
457
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
458
- from: number;
459
- to: number;
460
- }[];
461
- } | null | undefined;
462
- exclude?: {
463
- repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
464
- startDate: string | null;
465
- endDate: string | null;
466
- timeIntervals: {
467
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
468
- from: number;
469
- to: number;
470
- }[];
471
- } | null | undefined;
472
- displayName?: string | undefined;
473
- flag?: "always" | "never" | null | undefined;
474
- }, {
475
- include?: {
476
- repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
477
- startDate: string | null;
478
- endDate: string | null;
479
- timeIntervals: {
480
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
481
- from: number;
482
- to: number;
483
- }[];
484
- } | null | undefined;
485
- exclude?: {
486
- repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
487
- startDate: string | null;
488
- endDate: string | null;
489
- timeIntervals: {
490
- weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
491
- from: number;
492
- to: number;
493
- }[];
494
- } | null | undefined;
495
- displayName?: string | undefined;
496
- flag?: "always" | "never" | null | undefined;
497
- }>;
498
- export type UpdateScheduleRequest = {
499
- id: string;
500
- } & z.infer<typeof sUpdateScheduleRequest>;
375
+ export type ScheduleProps = z.infer<typeof sScheduleProps>;
@@ -0,0 +1,53 @@
1
+ import z from 'zod';
2
+ export const sWeekDay = z.enum([
3
+ 'mon',
4
+ 'tue',
5
+ 'wed',
6
+ 'thu',
7
+ 'fri',
8
+ 'sat',
9
+ 'sun',
10
+ ]);
11
+ export const sRepeatType = z.enum(['daily', 'weekly', 'monthly', 'yearly']);
12
+ export const sFlagType = z.enum(['always', 'never']);
13
+ export const sTimeIntervalDto = z.object({
14
+ weekDay: sWeekDay,
15
+ from: z.number(),
16
+ to: z.number(),
17
+ });
18
+ export const sScheduleDetailsDto = z.object({
19
+ startDate: z.string().nullable(),
20
+ endDate: z.string().nullable(),
21
+ timeIntervals: z.array(sTimeIntervalDto),
22
+ repeat: sRepeatType.nullable(),
23
+ });
24
+ export const sScheduleDto = z.object({
25
+ id: z.string(),
26
+ displayName: z.string(),
27
+ include: sScheduleDetailsDto.nullable(),
28
+ exclude: sScheduleDetailsDto.nullable(),
29
+ editable: z.boolean(),
30
+ deletable: z.boolean(),
31
+ createdOn: z.string(),
32
+ lastModifiedOn: z.string(),
33
+ refs: z.record(z.union([z.string(), z.array(z.string())])),
34
+ version: z.number(),
35
+ flag: sFlagType.nullable(),
36
+ });
37
+ export const sTimeInterval = z.object({
38
+ weekDay: sWeekDay,
39
+ from: z.number().max(240000).min(0),
40
+ to: z.number().max(240000).min(0),
41
+ });
42
+ export const sScheduleDetailsRequest = z.object({
43
+ startDate: z.string().nullable(),
44
+ endDate: z.string().nullable(),
45
+ timeIntervals: z.array(sTimeInterval),
46
+ repeat: sRepeatType.nullable(),
47
+ });
48
+ export const sScheduleProps = z.object({
49
+ displayName: z.string().nonempty(),
50
+ flag: sFlagType.nullable(),
51
+ include: sScheduleDetailsRequest.nullable(),
52
+ exclude: sScheduleDetailsRequest.nullable(),
53
+ });
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ export declare const sSecurityLevelDto: z.ZodObject<{
3
+ id: z.ZodString;
4
+ order: z.ZodNumber;
5
+ name: z.ZodString;
6
+ active: z.ZodBoolean;
7
+ color: z.ZodString;
8
+ checkFrequency: z.ZodNumber;
9
+ checkOnExit: z.ZodBoolean;
10
+ default: z.ZodBoolean;
11
+ }, "strip", z.ZodTypeAny, {
12
+ name: string;
13
+ default: boolean;
14
+ id: string;
15
+ active: boolean;
16
+ color: string;
17
+ order: number;
18
+ checkFrequency: number;
19
+ checkOnExit: boolean;
20
+ }, {
21
+ name: string;
22
+ default: boolean;
23
+ id: string;
24
+ active: boolean;
25
+ color: string;
26
+ order: number;
27
+ checkFrequency: number;
28
+ checkOnExit: boolean;
29
+ }>;
30
+ export type SecurityLevelDto = z.infer<typeof sSecurityLevelDto>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export const sSecurityLevelDto = z.object({
3
+ id: z.string().uuid(),
4
+ order: z.number().int().min(0),
5
+ name: z.string().max(64),
6
+ active: z.boolean(),
7
+ color: z.string().length(6),
8
+ checkFrequency: z.number().int().min(0).max(100),
9
+ checkOnExit: z.boolean(),
10
+ default: z.boolean(),
11
+ });
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ export declare const sTemplateTypeEnum: z.ZodEnum<["id", "report"]>;
3
+ export type TemplateTypeEnum = z.infer<typeof sTemplateTypeEnum>;
4
+ export declare const sTemplateDto: z.ZodObject<{
5
+ id: z.ZodString;
6
+ name: z.ZodString;
7
+ type: z.ZodEnum<["id", "report"]>;
8
+ templateHtmlId: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ name: string;
11
+ type: "id" | "report";
12
+ id: string;
13
+ templateHtmlId: string;
14
+ }, {
15
+ name: string;
16
+ type: "id" | "report";
17
+ id: string;
18
+ templateHtmlId: string;
19
+ }>;
20
+ export type TemplateDto = z.infer<typeof sTemplateDto>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export const sTemplateTypeEnum = z.enum(['id', 'report']);
3
+ export const sTemplateDto = z.object({
4
+ id: z.string().uuid(),
5
+ name: z.string(),
6
+ type: sTemplateTypeEnum,
7
+ templateHtmlId: z.string().uuid(),
8
+ });