@7365admin1/core 3.52.2-staging.238 → 3.52.2-staging.240

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.
@@ -0,0 +1,11 @@
1
+ ---
2
+ "@7365admin1/core": patch
3
+ ---
4
+
5
+ Write camera failures in words an operator can act on, and stop offering plates whose vehicle has been deleted.
6
+
7
+ Camera failure messages no longer carry a camera's `_id`, its host, an IP, a port or a raw driver error. A camera is named by its display name and direction ("North Gate (entry)", or "the entry camera" when it has no name), and the reason is plain language ("the camera could not be reached"). The full technical detail — record id, host, and the device's or driver's own text — goes to the server log instead. The same treatment is applied to create, approve, restore, block, unblock, edit and delete; `blocklistVehicles`, `removeFromBlocklist` and `reactivateVehicleById` previously said only "Failed to delete/update/add plate number to ANPR", which named no camera and said nothing about what happened to the record. Blocking now states the opposite consequence to saving, because a failed blacklist write leaves the car able to get in.
8
+
9
+ `site.people.plates[]` no longer keeps a plate after its vehicle is deleted. The pull matched on `recNo`, which Dahua numbers per device, so the copy on the vehicle and the copy on the person diverged and the update silently matched nothing; it now matches on the plate number, and leaves the plate alone when a second live vehicle still holds it. Unblocking, which soft-deletes the record, now pulls the plate too. `GET /api/people/unit/:unit` and `GET /api/people` also drop any plate whose vehicle records are all deleted, so rows that had already drifted are not offered either. A plate the resident merely declared, with no vehicle record at all, is unchanged.
10
+
11
+ Unblocking a vehicle at a site with no ANPR camera now succeeds instead of failing with "No site cameras found." — there is nothing to revoke, which is the state the unblock is trying to reach. Approve, Restore, Block and Edit still refuse in that state, now saying why and what did not happen.
@@ -0,0 +1,10 @@
1
+ ---
2
+ "@7365admin1/core": patch
3
+ ---
4
+
5
+ Vehicle management: a deleted plate is gone from every list, a plate with no camera record can be deleted, and a camera blip no longer raises an alarm
6
+
7
+ - Deleting a vehicle is a soft delete, and no read path filtered on it — so the row never disappeared from the vehicle list, still sat on the blocklist (still stopping the car at the barrier), still filled the by-unit lookup, the season-pass options and the row counts, and still blocked re-creating that plate number. `getVehicles`, `getBlocklistedVehicles`, `getBlocklistedVehicleByPlateNumber`, `getAllVehiclesByUnitId` and `getSeasonPassTypes` now exclude deleted records, and `getVehicleById` drops deleted sibling plates. An explicit `status=deleted` is still honoured, which is the only way to look at them.
8
+ - Creating a vehicle no longer refuses a plate number that only exists on a deleted record. A live duplicate is still refused.
9
+ - The two database writes at the end of a delete ran together on one session inside one transaction; they now run in order. The person-side failure no longer reports itself as an NRIC problem and logs its real cause.
10
+ - An ANPR camera alert now waits for the third consecutive failed reconnect instead of the first. Writing a plate to a camera drops that camera's own event stream while the device services the write, so a successful "add vehicle" raised "the camera is not responding — ask your site technician" at the exact moment it succeeded.
package/dist/index.d.ts CHANGED
@@ -2528,6 +2528,14 @@ type AnprRevokeOutcome = {
2528
2528
  statusCode?: number;
2529
2529
  /** Why it failed, in words an operator can act on. Empty when `ok`. */
2530
2530
  reason: string;
2531
+ /**
2532
+ * The technical cause, for the SERVER LOG only. Never rendered.
2533
+ *
2534
+ * `reason` used to BE this string, so a driver error went straight to the
2535
+ * browser: "connect EHOSTUNREACH 129.126.212.21:8081" put an internal IP and
2536
+ * port in front of a condo manager, who can do nothing with either.
2537
+ */
2538
+ detail?: string;
2531
2539
  };
2532
2540
 
2533
2541
  declare enum CameraType {