@7365admin1/core 3.52.2-staging.239 → 3.52.2
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/CHANGELOG.md +61 -0
- package/package.json +1 -1
- package/.changeset/mailer-transport-defaults.md +0 -5
- package/.changeset/self-service-contractor-emails-and-resend.md +0 -37
- package/.changeset/vehicle-anpr-revoke-safety.md +0 -11
- package/.changeset/vehicle-create-fail-closed.md +0 -10
- package/.changeset/vehicle-deleted-plates-and-alert-pacing.md +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.52.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cfd7739: Fix the mailer transport defaults: an unset or unparseable port no longer resolves to `NaN`, and `MAILER_TRANSPORT_SECURE` now defaults to match the port instead of a fixed `false`. Same `Number(...) ?? n` fix applied to `PORT` and `REDIS_PORT`.
|
|
8
|
+
- eea5d0a: Self-service onboarding: email a contractor and every member their own pass link, and let them ask for it again (DV-0080).
|
|
9
|
+
|
|
10
|
+
Registration used to email `guest` submissions only. A contractor now gets the same mail — whether
|
|
11
|
+
the site auto-approved them or left them pending — and so does every member who supplied an email
|
|
12
|
+
address, each with their OWN pass link rather than the lead's. Members who arrive on a pending
|
|
13
|
+
group are emailed when staff approve it, through the same fan-out that creates their records.
|
|
14
|
+
|
|
15
|
+
The staff Approve/Reject notification was also `guest`-only and now covers a self-service
|
|
16
|
+
contractor group and its members, so nobody is left holding a link they do not know went live,
|
|
17
|
+
or one that no longer works. A group raised through the resident-app invite flow is deliberately
|
|
18
|
+
excluded — its members are already told by that flow's own invitation email, and they hold a
|
|
19
|
+
resident-app registration link rather than a self-service pass link.
|
|
20
|
+
|
|
21
|
+
`self-service-visitor.hbs` grew a contractor shape rather than a second template: Company and
|
|
22
|
+
Contractor Type on, passenger count, arrival time, duration and purpose off. Its context, its
|
|
23
|
+
subject line and the NRIC mask moved into `self-service-email.util.ts`, which all three senders
|
|
24
|
+
now share.
|
|
25
|
+
|
|
26
|
+
New public `resendSelfServicePass` controller, behind
|
|
27
|
+
`POST /api/visitor-transactions/self-service/resend/:id`. An address already on a record can never
|
|
28
|
+
be redirected — a supplied one is only accepted for a record whose `email` is blank, which is the
|
|
29
|
+
case the links card's inline field exists for — and a 60-second per-record cooldown sits on top of
|
|
30
|
+
the route's per-IP limiter. The route now only ever accepts self-service records: registration
|
|
31
|
+
stamps every lead and member row with `source: "self-service"`, and the resend lookup filters on
|
|
32
|
+
it, so a public caller can no longer read, re-address or resend a staff-created walk-in, delivery
|
|
33
|
+
or resident-app invite via a guessed or harvested id — a non-self-service id answers the same 404
|
|
34
|
+
as one that does not exist at all.
|
|
35
|
+
|
|
36
|
+
`schemaSelfServiceVisitor.members[]` accepts `email` and now requires it. Both the lead's and each
|
|
37
|
+
member's email in that schema deliberately validate with `tlds: { allow: false }` — the client-side
|
|
38
|
+
check and the resend route's own check both use a looser regex with no IANA TLD list, and a
|
|
39
|
+
mismatch would 400 an entire submission over a field the contractor can no longer see once the
|
|
40
|
+
members dialog has closed. The mail server stays the real judge of deliverability.
|
|
41
|
+
|
|
42
|
+
- b59a636: Vehicle management: make deleting and editing a vehicle safe against the ANPR cameras.
|
|
43
|
+
|
|
44
|
+
Deleting a vehicle no longer reports success when the plate is still on a camera. `bypass` now defaults to false, `removePlateNumber` returns an explicit per-camera outcome instead of swallowing its error, and a delete that cannot be confirmed on every camera holding the plate is refused with the record left intact so it can be retried. A site with no ANPR camera has nothing to revoke and now deletes successfully instead of failing with "No site cameras found."
|
|
45
|
+
|
|
46
|
+
Each camera is asked for its own record id before the removal, because a Dahua `recNo` is a per-device sequence number and the one stored on the vehicle only matches whichever camera was written last. Editing only the vehicle's name now removes the old whitelist record before inserting the new one, instead of leaving the previous entry on the camera for good.
|
|
47
|
+
|
|
48
|
+
Also: `pullVehicleByRecNo` is scoped to the person or site the plate belongs to (it matched on the record id alone, which is not unique across devices), the paginated camera lookups no longer skip their last page, and editing or deleting a vehicle now requires `vehicle-mgmt:update-vehicle` / `vehicle-mgmt:delete-vehicle` on the server, matching the gate the apps already apply in the browser.
|
|
49
|
+
|
|
50
|
+
- 643a92a: Vehicle ANPR: create now fails closed, an unregistered vehicle can be deleted, and camera errors are readable
|
|
51
|
+
|
|
52
|
+
- `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.
|
|
53
|
+
- Deleting a vehicle with a blank or missing `recno` is no longer rejected by request validation. The per-camera revoke guarantee is unchanged.
|
|
54
|
+
- 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.
|
|
55
|
+
- 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.
|
|
56
|
+
|
|
57
|
+
- d904033: 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
|
|
58
|
+
|
|
59
|
+
- 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.
|
|
60
|
+
- Creating a vehicle no longer refuses a plate number that only exists on a deleted record. A live duplicate is still refused.
|
|
61
|
+
- 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.
|
|
62
|
+
- 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.
|
|
63
|
+
|
|
3
64
|
## 3.52.1
|
|
4
65
|
|
|
5
66
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
"@7365admin1/core": patch
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Fix the mailer transport defaults: an unset or unparseable port no longer resolves to `NaN`, and `MAILER_TRANSPORT_SECURE` now defaults to match the port instead of a fixed `false`. Same `Number(...) ?? n` fix applied to `PORT` and `REDIS_PORT`.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
"@7365admin1/core": patch
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Self-service onboarding: email a contractor and every member their own pass link, and let them ask for it again (DV-0080).
|
|
6
|
-
|
|
7
|
-
Registration used to email `guest` submissions only. A contractor now gets the same mail — whether
|
|
8
|
-
the site auto-approved them or left them pending — and so does every member who supplied an email
|
|
9
|
-
address, each with their OWN pass link rather than the lead's. Members who arrive on a pending
|
|
10
|
-
group are emailed when staff approve it, through the same fan-out that creates their records.
|
|
11
|
-
|
|
12
|
-
The staff Approve/Reject notification was also `guest`-only and now covers a self-service
|
|
13
|
-
contractor group and its members, so nobody is left holding a link they do not know went live,
|
|
14
|
-
or one that no longer works. A group raised through the resident-app invite flow is deliberately
|
|
15
|
-
excluded — its members are already told by that flow's own invitation email, and they hold a
|
|
16
|
-
resident-app registration link rather than a self-service pass link.
|
|
17
|
-
|
|
18
|
-
`self-service-visitor.hbs` grew a contractor shape rather than a second template: Company and
|
|
19
|
-
Contractor Type on, passenger count, arrival time, duration and purpose off. Its context, its
|
|
20
|
-
subject line and the NRIC mask moved into `self-service-email.util.ts`, which all three senders
|
|
21
|
-
now share.
|
|
22
|
-
|
|
23
|
-
New public `resendSelfServicePass` controller, behind
|
|
24
|
-
`POST /api/visitor-transactions/self-service/resend/:id`. An address already on a record can never
|
|
25
|
-
be redirected — a supplied one is only accepted for a record whose `email` is blank, which is the
|
|
26
|
-
case the links card's inline field exists for — and a 60-second per-record cooldown sits on top of
|
|
27
|
-
the route's per-IP limiter. The route now only ever accepts self-service records: registration
|
|
28
|
-
stamps every lead and member row with `source: "self-service"`, and the resend lookup filters on
|
|
29
|
-
it, so a public caller can no longer read, re-address or resend a staff-created walk-in, delivery
|
|
30
|
-
or resident-app invite via a guessed or harvested id — a non-self-service id answers the same 404
|
|
31
|
-
as one that does not exist at all.
|
|
32
|
-
|
|
33
|
-
`schemaSelfServiceVisitor.members[]` accepts `email` and now requires it. Both the lead's and each
|
|
34
|
-
member's email in that schema deliberately validate with `tlds: { allow: false }` — the client-side
|
|
35
|
-
check and the resend route's own check both use a looser regex with no IANA TLD list, and a
|
|
36
|
-
mismatch would 400 an entire submission over a field the contractor can no longer see once the
|
|
37
|
-
members dialog has closed. The mail server stays the real judge of deliverability.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
"@7365admin1/core": patch
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Vehicle management: make deleting and editing a vehicle safe against the ANPR cameras.
|
|
6
|
-
|
|
7
|
-
Deleting a vehicle no longer reports success when the plate is still on a camera. `bypass` now defaults to false, `removePlateNumber` returns an explicit per-camera outcome instead of swallowing its error, and a delete that cannot be confirmed on every camera holding the plate is refused with the record left intact so it can be retried. A site with no ANPR camera has nothing to revoke and now deletes successfully instead of failing with "No site cameras found."
|
|
8
|
-
|
|
9
|
-
Each camera is asked for its own record id before the removal, because a Dahua `recNo` is a per-device sequence number and the one stored on the vehicle only matches whichever camera was written last. Editing only the vehicle's name now removes the old whitelist record before inserting the new one, instead of leaving the previous entry on the camera for good.
|
|
10
|
-
|
|
11
|
-
Also: `pullVehicleByRecNo` is scoped to the person or site the plate belongs to (it matched on the record id alone, which is not unique across devices), the paginated camera lookups no longer skip their last page, and editing or deleting a vehicle now requires `vehicle-mgmt:update-vehicle` / `vehicle-mgmt:delete-vehicle` on the server, matching the gate the apps already apply in the browser.
|
|
@@ -1,10 +0,0 @@
|
|
|
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.
|
|
@@ -1,10 +0,0 @@
|
|
|
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.
|