@7365admin1/core 3.79.1-staging.337 → 3.79.1-staging.339
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/cleaning-robot-cloud-connector.md +39 -0
- package/CHANGELOG.md +59 -0
- package/dist/index.d.ts +697 -4
- package/dist/index.js +3051 -2328
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1649 -966
- package/dist/index.mjs.map +1 -1
- package/package.json +68 -68
- package/test/e2e/robot-scope.e2e.test.mjs +57 -33
- package/test/robot-apps.test.mjs +154 -0
- package/test/robot-cloud.test.mjs +222 -0
- package/test/robot-permission.test.mjs +133 -0
- package/test/robot-tracking.test.mjs +231 -0
- package/.changeset/vehicle-one-plate-per-site.md +0 -58
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Cleaning robot: robot cloud connector, and stop projecting robot credentials
|
|
6
|
+
|
|
7
|
+
Adds the signed client for the cleaning-robot cloud (`robot-cloud.util.ts`,
|
|
8
|
+
`robot-cloud.service.ts`): request signing, the status vocabulary, the
|
|
9
|
+
pixel/metre transform and the area colour conversions, plus the nine
|
|
10
|
+
request/response endpoints. Credentials are passed in by the caller and are
|
|
11
|
+
never read from the environment, logged, or placed in a request body.
|
|
12
|
+
|
|
13
|
+
Also fixes a credential disclosure in the existing robot listing: `getRobots`
|
|
14
|
+
projected `appKey` and `appToken` — the pair that signs every command sent to
|
|
15
|
+
that estate's robots — into the response, so anyone holding `see-all-robots`
|
|
16
|
+
received them. They are no longer returned.
|
|
17
|
+
|
|
18
|
+
Fixes `POST /robots`, which had never worked: the service assigned an ObjectId
|
|
19
|
+
where the model's schema wanted a string, so every create ended in
|
|
20
|
+
`400 "createdBy" must be a string` and no robot could be registered at all.
|
|
21
|
+
|
|
22
|
+
Adds the server-side enforcement of the five robot permissions, which have
|
|
23
|
+
existed in the client catalogue but were never checked by the API. `"*"` allows
|
|
24
|
+
everything; an empty list allows everything only on a `type: "admin"` role (the
|
|
25
|
+
Seven365 staff role is seeded with `[]`, so enforcing it would refuse the
|
|
26
|
+
platform owner); a non-empty list is enforced exactly.
|
|
27
|
+
|
|
28
|
+
Adds `robotSn` to the robot record (optional, discovered from `get-robot-list`
|
|
29
|
+
when absent) and `robot-fleet.service.ts`, which bridges a stored robot to the
|
|
30
|
+
vendor cloud: live state, maps, map image URLs minted at use, and dispatch.
|
|
31
|
+
|
|
32
|
+
Adds a table of which application may set up and monitor which robot type, so
|
|
33
|
+
cleaning robots and security robots share one module while each app sees only
|
|
34
|
+
its own.
|
|
35
|
+
|
|
36
|
+
Adds an optional `type` ("cleaning" | "security") to the robot record with an
|
|
37
|
+
optional filter, so both device classes share one module and one collection
|
|
38
|
+
while each app lists only its own. Existing rows are untouched and an
|
|
39
|
+
unfiltered query behaves exactly as before.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.80.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a267a47: Vehicle statuses say which list a vehicle is on, a site holds a plate once
|
|
8
|
+
whatever its status, and every vehicle keeps a history.
|
|
9
|
+
|
|
10
|
+
**Statuses.** A whitelist vehicle is `active`, a season pass `temporary`, a
|
|
11
|
+
blocked vehicle `blocked`. Blocking a resident or season pass puts its plate on
|
|
12
|
+
the blocklist of every active camera except Exit for ten years (whatever the
|
|
13
|
+
pass's own dates) and takes it OFF every camera's allowed list, so no camera
|
|
14
|
+
holds a plate on both lists; approving a pending blocklist vehicle uses the
|
|
15
|
+
same ten years, and a new camera is filled the same way. Unblocking sets `unblocked` and takes the plate off every active camera's
|
|
16
|
+
blocklist by plate number - and off the allowed list too, so an unblocked car
|
|
17
|
+
is on no list rather than quietly whitelisted again. A blocked, unblocked,
|
|
18
|
+
deleted or inactive vehicle can be blocked again in place. Everything that
|
|
19
|
+
writes, syncs, revokes or recognises a plate at the gate now treats `active`,
|
|
20
|
+
`temporary` and `blocked` as live; the gate still recognises a season pass as a
|
|
21
|
+
registered resident until its expiry, and an unblocked plate no longer counts
|
|
22
|
+
as blocked at visitor check-in.
|
|
23
|
+
|
|
24
|
+
**Categories and tabs.** A whitelist vehicle is filed `resident`, a season
|
|
25
|
+
pass `season_pass` (new), and a vehicle added to the blocklist `visitor` or
|
|
26
|
+
`contractor` (new in the vehicle enum; default `visitor`); blocked from a visitor transaction it keeps that type - `delivery`, `pick-up` or `drop-off` (new), a guest as `visitor`. A season pass seen at the gate is logged as a `resident` transaction. Blocking keeps the
|
|
27
|
+
category, so a blocked resident is still `resident`; editing a season pass type
|
|
28
|
+
on or off moves a whitelist vehicle between `resident` and `season_pass`. The
|
|
29
|
+
vehicle list takes `view` - `residents`, `season-passes` or `block-listed` -
|
|
30
|
+
for the three tabs; older season passes saved as `resident` show under Season
|
|
31
|
+
Passes. The gate counts `resident` and `season_pass` as registered.
|
|
32
|
+
|
|
33
|
+
**Update an existing plate from the add form.** `existingPlatesAtSite`
|
|
34
|
+
answers which of the plates being added the site already holds, with each
|
|
35
|
+
record's tab and status; `moveVehicle` saves the form's details on that record
|
|
36
|
+
and moves it to the form's tab (off every camera list, onto the list of its new
|
|
37
|
+
kind; pending for a security agency without the approve permission). Its
|
|
38
|
+
history records "moved".
|
|
39
|
+
|
|
40
|
+
**Sync.** `syncVehicleToCameras` puts a live vehicle's plate on every active
|
|
41
|
+
camera of its list that lacks it (a plate saved while its cameras were
|
|
42
|
+
inactive), camera by camera, and records the cameras that took it;
|
|
43
|
+
`activeCameraCounts` gives the active cameras per list so the screens can offer
|
|
44
|
+
it.
|
|
45
|
+
|
|
46
|
+
**One plate per site.** Adding a plate the site already has - deleted,
|
|
47
|
+
pending, temporary, blocked or unblocked included - is refused with its status
|
|
48
|
+
and "edit the existing vehicle instead" (restore, for a deleted one). The same
|
|
49
|
+
check guards approve, restore and plate edits. Matching ignores case and
|
|
50
|
+
spacing.
|
|
51
|
+
|
|
52
|
+
**History.** `history` holds the last 20 changes - created, updated,
|
|
53
|
+
approved, restored, blocked, unblocked, deleted - each with the user's id, the
|
|
54
|
+
time and the fields that changed. `getSpecificVehicleById` adds each user's
|
|
55
|
+
name.
|
|
56
|
+
|
|
57
|
+
**Also:** the vehicle list returns every status unless one is asked for; the
|
|
58
|
+
camera's record id (`recNo`) is no longer stored; `processDeletingExpiredVehicles`
|
|
59
|
+
is no longer needed (the camera enforces each pass's own expiry) and should be
|
|
60
|
+
unscheduled by the API.
|
|
61
|
+
|
|
3
62
|
## 3.79.0
|
|
4
63
|
|
|
5
64
|
### Minor Changes
|