@7365admin1/core 3.52.19 → 3.53.0
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 +20 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2706 -2527
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2748 -2569
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/scripts/organizations-name-index.mjs +251 -0
- package/test/e2e/guard-invite-scope.e2e.test.mjs +368 -0
- package/test/e2e/harness.mjs +18 -0
- package/test/e2e/organizations-name-index.e2e.test.mjs +122 -0
- package/test/guard-invite-schema.test.mjs +173 -0
- package/test/guard-invite-wiring.test.mjs +161 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.53.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 525e85a: Add a guard invite path for visitors and contractors.
|
|
8
|
+
|
|
9
|
+
`POST /api/visitor-transactions/invite/:inviterId` is the resident app's
|
|
10
|
+
"invite to my unit" flow: it derives site, org, block, level and unit from the
|
|
11
|
+
inviter's `site.people` row. A guard has no such row, so the guard app's invite
|
|
12
|
+
screens could not use it — every request 400'd on the `site`/`org`/`nric` keys
|
|
13
|
+
they sent, and removing those keys would have written an invitation with no site
|
|
14
|
+
and no org.
|
|
15
|
+
|
|
16
|
+
Adds `schemaGuardInviteVisitor`, `inviteVisitorAsGuard` on the visitor
|
|
17
|
+
transaction service and controller, for a new `POST
|
|
18
|
+
/api/visitor-transactions/guard-invite` mount. The site comes from the request
|
|
19
|
+
and is checked with `requireSiteReach` before anything is written; `org` is read
|
|
20
|
+
off the resolved site; block/level/unit are null; the author is the session's
|
|
21
|
+
caller. The resident schema and flow are unchanged.
|
|
22
|
+
|
|
3
23
|
## 3.52.19
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -4909,7 +4909,7 @@ type TVisitorTransaction = {
|
|
|
4909
4909
|
site?: string | ObjectId;
|
|
4910
4910
|
plateNumber?: string;
|
|
4911
4911
|
recNo?: string;
|
|
4912
|
-
unitName?: string;
|
|
4912
|
+
unitName?: string | null;
|
|
4913
4913
|
company?: string;
|
|
4914
4914
|
deliveryType?: string;
|
|
4915
4915
|
attachments?: string[];
|
|
@@ -4999,7 +4999,7 @@ declare function MVisitorTransaction(value: TVisitorTransaction): {
|
|
|
4999
4999
|
passKeys: TKeyRef[];
|
|
5000
5000
|
checkInRemarks: string | undefined;
|
|
5001
5001
|
checkOutRemarks: string | undefined;
|
|
5002
|
-
unitName: string | undefined;
|
|
5002
|
+
unitName: string | null | undefined;
|
|
5003
5003
|
expiredAt: string | Date | null;
|
|
5004
5004
|
createdAt: string | Date;
|
|
5005
5005
|
updatedAt: string | Date;
|
|
@@ -5089,6 +5089,7 @@ declare function useVisitorTransactionService(): {
|
|
|
5089
5089
|
updateVisitorTransactionById: (id: string | ObjectId, value: TVisitorTransaction) => Promise<string>;
|
|
5090
5090
|
processTransactionDahuaStatus: () => Promise<void>;
|
|
5091
5091
|
inviteVisitor: (value: TVisitorTransaction, userId: string) => Promise<ObjectId[]>;
|
|
5092
|
+
inviteVisitorAsGuard: (value: TVisitorTransaction, userId: string, siteId: string) => Promise<ObjectId[]>;
|
|
5092
5093
|
createInvitedMemberDocuments: (leadId: string | ObjectId, status: VisitorStatus) => Promise<ObjectId[]>;
|
|
5093
5094
|
deleteVisitorTransaction: (id: string) => Promise<void>;
|
|
5094
5095
|
};
|
|
@@ -5102,6 +5103,7 @@ declare function useVisitorTransactionController(): {
|
|
|
5102
5103
|
updateVisitorTansactionById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
5103
5104
|
deleteVisitorTransaction: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
5104
5105
|
inviteVisitor: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
5106
|
+
inviteVisitorAsGuard: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
5105
5107
|
getVisitorTransactionById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
5106
5108
|
};
|
|
5107
5109
|
|