@7365admin1/core 3.52.2-staging.236 → 3.52.2-staging.237
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.
- package/.changeset/vehicle-create-fail-closed.md +10 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3190 -3049
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3190 -3049
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/test/vehicle-create-and-delete-safety.test.mjs +156 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Vehicle ANPR: create now fails closed, an unregistered vehicle can be deleted, and camera errors are readable
|
|
6
|
+
|
|
7
|
+
- `add()` no longer reports "added to whitelist successfully" when nothing was written to a camera. Camera failures are collected per camera, any plate already written is taken back off, and the whole create is refused. A site with no active ANPR camera saves the vehicle but says plainly that the barrier does not know about it.
|
|
8
|
+
- Deleting a vehicle with a blank or missing `recno` is no longer rejected by request validation. The per-camera revoke guarantee is unchanged.
|
|
9
|
+
- Dahua's own reply (`Invalid Authority!`, `{"ErrorCode":...}`) is logged server-side and no longer put into the message the operator sees, on create, approve and edit.
|
|
10
|
+
- Editing a vehicle restores the previous plate on the camera if the re-insert fails, instead of leaving the resident locked out by a change the database then rolls back.
|
package/dist/index.d.ts
CHANGED
|
@@ -5051,6 +5051,8 @@ declare function usePersonRepo(): {
|
|
|
5051
5051
|
pullVehicleByRecNo: (recNo: string, scope: {
|
|
5052
5052
|
peopleId?: string | ObjectId;
|
|
5053
5053
|
site?: string | ObjectId;
|
|
5054
|
+
/** Used INSTEAD of `recNo` when the vehicle never got a record id. */
|
|
5055
|
+
plateNumber?: string;
|
|
5054
5056
|
}, session?: ClientSession) => Promise<void>;
|
|
5055
5057
|
getByUserId: (userId: string | ObjectId) => Promise<TPerson | null>;
|
|
5056
5058
|
reviewResidentPerson: (_id: ObjectId | string, value: Partial<TPerson>, session?: ClientSession) => Promise<mongodb.UpdateResult<TPerson>>;
|