@7365admin1/core 3.79.1-staging.337 → 3.79.1-staging.338

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 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
package/package.json CHANGED
@@ -1,68 +1,68 @@
1
- {
2
- "name": "@7365admin1/core",
3
- "license": "MIT",
4
- "version": "3.79.1-staging.337",
5
- "author": "7365admin1",
6
- "main": "dist/index.js",
7
- "module": "dist/index.mjs",
8
- "types": "dist/index.d.ts",
9
- "publishConfig": {
10
- "access": "public"
11
- },
12
- "scripts": {
13
- "build": "tsup src/index.ts --format cjs,esm --dts && shx cp -r src/public dist && shx cp -r src/utils/handlebars dist",
14
- "release": "yarn run build && changeset publish",
15
- "lint": "tsc",
16
- "test": "tsup src/config.ts src/utils/anpr-revoke.util.ts src/utils/anpr-plate.util.ts src/utils/vehicle-request.util.ts src/utils/camera-view.util.ts src/utils/camera-bulk-import.util.ts src/utils/dashboard-metrics.util.ts src/utils/camera-capability.util.ts src/utils/camera-playback.util.ts src/services/camera-device-http.service.ts src/utils/camera-alert.util.ts src/utils/dahua-protocol.util.ts src/utils/site-name.util.ts src/utils/service-provider-invite.util.ts src/utils/notification-category.util.ts src/utils/hid-card.util.ts src/utils/hid-json.util.ts src/utils/hid-access.util.ts src/utils/hid-assignment.util.ts src/models/customer-site.model.ts src/models/site-camera.model.ts src/models/member.model.ts src/models/subscription.model.ts src/utils/session-id.util.ts src/utils/occurrence-query.util.ts src/utils/occurrence-book-create.util.ts src/utils/update-result.util.ts src/utils/hid-amico-authz.util.ts src/utils/promo-code-currency.util.ts src/utils/console-audit.util.ts src/utils/org-suspension.util.ts src/utils/session-revoke.util.ts src/models/hid-amico.model.ts src/models/patrol-email.model.ts src/utils/patrol-email-pdf.util.ts src/utils/visitor-status.util.ts src/utils/self-service-email.util.ts src/utils/hid-secret.util.ts src/models/visitor-invite.model.ts src/models/guard-invite.model.ts src/utils/site-timezone.util.ts src/utils/bulletin-service-apps.util.ts src/models/bulletin-board.model.ts src/utils/vehicle-import.util.ts src/utils/expired-vehicle-sweep.util.ts src/models/vehicle.model.ts src/controllers/chat.controller.ts src/utils/file-owner.util.ts src/utils/console-permission.util.ts src/utils/role-scope.util.ts src/utils/org-default-roles.util.ts src/utils/resident-default-role.util.ts src/utils/invite-role-scope.util.ts src/models/personal-emergency-chain.model.ts src/utils/self-signup-files.util.ts src/models/person.model.ts src/utils/occupancy-tree.util.ts src/utils/org-modules.util.ts src/utils/site-modules.util.ts src/utils/resident-app-modules.util.ts src/utils/module-gate.util.ts src/utils/resident-account.util.ts src/utils/email-match.util.ts src/utils/member-lookup.util.ts src/utils/notification-access.util.ts src/utils/module-access.util.ts src/services/module-gate.service.ts src/controllers/site.controller.ts src/controllers/organization.controller.ts src/controllers/member.controller.ts src/utils/org-owner-repair.util.ts src/utils/socket-session.util.ts src/utils/people-create-gate.util.ts src/models/document-management.model.ts src/utils/document-expiry-event.util.ts src/utils/document-expiry-reminder.util.ts src/utils/service-app-type.util.ts --format esm --out-dir test/.build --no-dts --silent && node --test test/*.test.mjs",
17
- "test:camera": "yarn test",
18
- "test:e2e": "yarn build && node --test --test-concurrency=1 --test-timeout=600000 \"test/e2e/*.test.mjs\""
19
- },
20
- "devDependencies": {
21
- "@changesets/cli": "^2.26.0",
22
- "@types/express": "4.17.23",
23
- "@types/fast-levenshtein": "^0.0.4",
24
- "@types/jsonwebtoken": "^9.0.8",
25
- "@types/mongodb": "^4.0.7",
26
- "@types/multer": "^1.4.12",
27
- "@types/node-cron": "^3.0.11",
28
- "@types/nodemailer": "^8.0.0",
29
- "@types/xml2js": "^0.4.14",
30
- "mongodb-memory-server": "^10.1.4",
31
- "shx": "^0.4.0",
32
- "tsup": "^6.5.0",
33
- "typescript": "^4.9.4"
34
- },
35
- "dependencies": {
36
- "@7365admin1/node-server-utils": "^1.6.0",
37
- "@anthropic-ai/sdk": "^0.106.0",
38
- "@types/urllib": "^2.33.0",
39
- "axios": "^1.13.4",
40
- "cron-parser": "^5.3.1",
41
- "csv-parser": "^3.2.0",
42
- "dotenv": "^16.4.7",
43
- "exceljs": "^4.4.0",
44
- "express": "^4.21.2",
45
- "fast-levenshtein": "^3.0.0",
46
- "handlebars": "^4.7.8",
47
- "iservice365-expo-notifications": "^1.0.0",
48
- "joi": "^17.13.3",
49
- "jsonwebtoken": "^9.0.2",
50
- "moment": "^2.30.1",
51
- "moment-timezone": "^0.6.2",
52
- "mongodb": "^6.18.0",
53
- "multer": "^1.4.5-lts.2",
54
- "node-cron": "^3.0.3",
55
- "nodemailer": "^8.0.10",
56
- "openai": "^4.56.0",
57
- "puppeteer": "^24.33.1",
58
- "socket.io": "^4.8.3",
59
- "urllib": "^4.8.2",
60
- "uuid": "^11.1.0",
61
- "winston": "^3.13.0",
62
- "winston-daily-rotate-file": "^5.0.0",
63
- "xlsx": "^0.18.5",
64
- "xml2js": "^0.6.2",
65
- "zod": "^3.24.2"
66
- },
67
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
68
- }
1
+ {
2
+ "name": "@7365admin1/core",
3
+ "license": "MIT",
4
+ "version": "3.79.1-staging.338",
5
+ "author": "7365admin1",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.mjs",
8
+ "types": "dist/index.d.ts",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "scripts": {
13
+ "build": "tsup src/index.ts --format cjs,esm --dts && shx cp -r src/public dist && shx cp -r src/utils/handlebars dist",
14
+ "release": "yarn run build && changeset publish",
15
+ "lint": "tsc",
16
+ "test": "tsup src/config.ts src/utils/anpr-revoke.util.ts src/utils/anpr-plate.util.ts src/utils/vehicle-request.util.ts src/utils/camera-view.util.ts src/utils/camera-bulk-import.util.ts src/utils/dashboard-metrics.util.ts src/utils/camera-capability.util.ts src/utils/camera-playback.util.ts src/services/camera-device-http.service.ts src/utils/camera-alert.util.ts src/utils/dahua-protocol.util.ts src/utils/site-name.util.ts src/utils/service-provider-invite.util.ts src/utils/notification-category.util.ts src/utils/hid-card.util.ts src/utils/hid-json.util.ts src/utils/hid-access.util.ts src/utils/hid-assignment.util.ts src/models/customer-site.model.ts src/models/site-camera.model.ts src/models/member.model.ts src/models/subscription.model.ts src/utils/session-id.util.ts src/utils/occurrence-query.util.ts src/utils/occurrence-book-create.util.ts src/utils/update-result.util.ts src/utils/hid-amico-authz.util.ts src/utils/promo-code-currency.util.ts src/utils/console-audit.util.ts src/utils/org-suspension.util.ts src/utils/session-revoke.util.ts src/models/hid-amico.model.ts src/models/patrol-email.model.ts src/utils/patrol-email-pdf.util.ts src/utils/visitor-status.util.ts src/utils/self-service-email.util.ts src/utils/hid-secret.util.ts src/models/visitor-invite.model.ts src/models/guard-invite.model.ts src/utils/site-timezone.util.ts src/utils/bulletin-service-apps.util.ts src/models/bulletin-board.model.ts src/utils/vehicle-import.util.ts src/utils/expired-vehicle-sweep.util.ts src/models/vehicle.model.ts src/controllers/chat.controller.ts src/utils/file-owner.util.ts src/utils/console-permission.util.ts src/utils/role-scope.util.ts src/utils/org-default-roles.util.ts src/utils/resident-default-role.util.ts src/utils/invite-role-scope.util.ts src/models/personal-emergency-chain.model.ts src/utils/self-signup-files.util.ts src/models/person.model.ts src/utils/occupancy-tree.util.ts src/utils/org-modules.util.ts src/utils/site-modules.util.ts src/utils/resident-app-modules.util.ts src/utils/module-gate.util.ts src/utils/resident-account.util.ts src/utils/email-match.util.ts src/utils/member-lookup.util.ts src/utils/notification-access.util.ts src/utils/module-access.util.ts src/services/module-gate.service.ts src/controllers/site.controller.ts src/controllers/organization.controller.ts src/controllers/member.controller.ts src/utils/org-owner-repair.util.ts src/utils/socket-session.util.ts src/utils/people-create-gate.util.ts src/models/document-management.model.ts src/utils/document-expiry-event.util.ts src/utils/document-expiry-reminder.util.ts src/utils/service-app-type.util.ts --format esm --out-dir test/.build --no-dts --silent && node --test test/*.test.mjs",
17
+ "test:camera": "yarn test",
18
+ "test:e2e": "yarn build && node --test --test-concurrency=1 --test-timeout=600000 \"test/e2e/*.test.mjs\""
19
+ },
20
+ "devDependencies": {
21
+ "@changesets/cli": "^2.26.0",
22
+ "@types/express": "4.17.23",
23
+ "@types/fast-levenshtein": "^0.0.4",
24
+ "@types/jsonwebtoken": "^9.0.8",
25
+ "@types/mongodb": "^4.0.7",
26
+ "@types/multer": "^1.4.12",
27
+ "@types/node-cron": "^3.0.11",
28
+ "@types/nodemailer": "^8.0.0",
29
+ "@types/xml2js": "^0.4.14",
30
+ "mongodb-memory-server": "^10.1.4",
31
+ "shx": "^0.4.0",
32
+ "tsup": "^6.5.0",
33
+ "typescript": "^4.9.4"
34
+ },
35
+ "dependencies": {
36
+ "@7365admin1/node-server-utils": "^1.6.0",
37
+ "@anthropic-ai/sdk": "^0.106.0",
38
+ "@types/urllib": "^2.33.0",
39
+ "axios": "^1.13.4",
40
+ "cron-parser": "^5.3.1",
41
+ "csv-parser": "^3.2.0",
42
+ "dotenv": "^16.4.7",
43
+ "exceljs": "^4.4.0",
44
+ "express": "^4.21.2",
45
+ "fast-levenshtein": "^3.0.0",
46
+ "handlebars": "^4.7.8",
47
+ "iservice365-expo-notifications": "^1.0.0",
48
+ "joi": "^17.13.3",
49
+ "jsonwebtoken": "^9.0.2",
50
+ "moment": "^2.30.1",
51
+ "moment-timezone": "^0.6.2",
52
+ "mongodb": "^6.18.0",
53
+ "multer": "^1.4.5-lts.2",
54
+ "node-cron": "^3.0.3",
55
+ "nodemailer": "^8.0.10",
56
+ "openai": "^4.56.0",
57
+ "puppeteer": "^24.33.1",
58
+ "socket.io": "^4.8.3",
59
+ "urllib": "^4.8.2",
60
+ "uuid": "^11.1.0",
61
+ "winston": "^3.13.0",
62
+ "winston-daily-rotate-file": "^5.0.0",
63
+ "xlsx": "^0.18.5",
64
+ "xml2js": "^0.6.2",
65
+ "zod": "^3.24.2"
66
+ },
67
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
68
+ }
@@ -1,58 +0,0 @@
1
- ---
2
- "@7365admin1/core": minor
3
- ---
4
-
5
- Vehicle statuses say which list a vehicle is on, a site holds a plate once
6
- whatever its status, and every vehicle keeps a history.
7
-
8
- **Statuses.** A whitelist vehicle is `active`, a season pass `temporary`, a
9
- blocked vehicle `blocked`. Blocking a resident or season pass puts its plate on
10
- the blocklist of every active camera except Exit for ten years (whatever the
11
- pass's own dates) and takes it OFF every camera's allowed list, so no camera
12
- holds a plate on both lists; approving a pending blocklist vehicle uses the
13
- same ten years, and a new camera is filled the same way. Unblocking sets `unblocked` and takes the plate off every active camera's
14
- blocklist by plate number - and off the allowed list too, so an unblocked car
15
- is on no list rather than quietly whitelisted again. A blocked, unblocked,
16
- deleted or inactive vehicle can be blocked again in place. Everything that
17
- writes, syncs, revokes or recognises a plate at the gate now treats `active`,
18
- `temporary` and `blocked` as live; the gate still recognises a season pass as a
19
- registered resident until its expiry, and an unblocked plate no longer counts
20
- as blocked at visitor check-in.
21
-
22
- **Categories and tabs.** A whitelist vehicle is filed `resident`, a season
23
- pass `season_pass` (new), and a vehicle added to the blocklist `visitor` or
24
- `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
25
- category, so a blocked resident is still `resident`; editing a season pass type
26
- on or off moves a whitelist vehicle between `resident` and `season_pass`. The
27
- vehicle list takes `view` - `residents`, `season-passes` or `block-listed` -
28
- for the three tabs; older season passes saved as `resident` show under Season
29
- Passes. The gate counts `resident` and `season_pass` as registered.
30
-
31
- **Update an existing plate from the add form.** `existingPlatesAtSite`
32
- answers which of the plates being added the site already holds, with each
33
- record's tab and status; `moveVehicle` saves the form's details on that record
34
- and moves it to the form's tab (off every camera list, onto the list of its new
35
- kind; pending for a security agency without the approve permission). Its
36
- history records "moved".
37
-
38
- **Sync.** `syncVehicleToCameras` puts a live vehicle's plate on every active
39
- camera of its list that lacks it (a plate saved while its cameras were
40
- inactive), camera by camera, and records the cameras that took it;
41
- `activeCameraCounts` gives the active cameras per list so the screens can offer
42
- it.
43
-
44
- **One plate per site.** Adding a plate the site already has - deleted,
45
- pending, temporary, blocked or unblocked included - is refused with its status
46
- and "edit the existing vehicle instead" (restore, for a deleted one). The same
47
- check guards approve, restore and plate edits. Matching ignores case and
48
- spacing.
49
-
50
- **History.** `history` holds the last 20 changes - created, updated,
51
- approved, restored, blocked, unblocked, deleted - each with the user's id, the
52
- time and the fields that changed. `getSpecificVehicleById` adds each user's
53
- name.
54
-
55
- **Also:** the vehicle list returns every status unless one is asked for; the
56
- camera's record id (`recNo`) is no longer stored; `processDeletingExpiredVehicles`
57
- is no longer needed (the camera enforces each pass's own expiry) and should be
58
- unscheduled by the API.