@7365admin1/core 2.13.0 → 2.14.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 +6 -0
- package/dist/index.d.ts +92 -14
- package/dist/index.js +1475 -776
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +790 -91
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2621,6 +2621,8 @@ type logCamera = {
|
|
|
2621
2621
|
start: string;
|
|
2622
2622
|
end: string;
|
|
2623
2623
|
duration: number;
|
|
2624
|
+
status?: string;
|
|
2625
|
+
description?: string;
|
|
2624
2626
|
questions: Array<{
|
|
2625
2627
|
questionId: string | ObjectId;
|
|
2626
2628
|
question: string;
|
|
@@ -3460,6 +3462,7 @@ type TEventManagement = {
|
|
|
3460
3462
|
description?: string;
|
|
3461
3463
|
dateTime: string | Date;
|
|
3462
3464
|
status?: "planned" | "in_progress" | "completed";
|
|
3465
|
+
type?: "TASK" | "EVENT";
|
|
3463
3466
|
createdAt?: string | Date;
|
|
3464
3467
|
updatedAt?: string | Date;
|
|
3465
3468
|
deletedAt?: string | Date;
|
|
@@ -3473,6 +3476,7 @@ declare function MEventManagement(value: TEventManagement): {
|
|
|
3473
3476
|
description: string;
|
|
3474
3477
|
dateTime: string | Date;
|
|
3475
3478
|
status: "completed" | "planned" | "in_progress";
|
|
3479
|
+
type: "TASK" | "EVENT";
|
|
3476
3480
|
createdAt: string | Date;
|
|
3477
3481
|
updatedAt: string | Date | undefined;
|
|
3478
3482
|
deletedAt: string | Date | undefined;
|
|
@@ -3480,13 +3484,14 @@ declare function MEventManagement(value: TEventManagement): {
|
|
|
3480
3484
|
|
|
3481
3485
|
declare function useEventManagementRepo(): {
|
|
3482
3486
|
add: (value: TEventManagement, session?: ClientSession) => Promise<ObjectId>;
|
|
3483
|
-
getAll: ({ search, page, limit, sort, site, status, }: {
|
|
3487
|
+
getAll: ({ search, page, limit, sort, site, status, type, }: {
|
|
3484
3488
|
search?: string | undefined;
|
|
3485
3489
|
page?: number | undefined;
|
|
3486
3490
|
limit?: number | undefined;
|
|
3487
3491
|
sort?: Record<string, any> | undefined;
|
|
3488
3492
|
site: string | ObjectId;
|
|
3489
3493
|
status: string;
|
|
3494
|
+
type?: string | undefined;
|
|
3490
3495
|
}, session?: ClientSession) => Promise<{
|
|
3491
3496
|
items: any[];
|
|
3492
3497
|
pages: number;
|
|
@@ -3629,18 +3634,6 @@ interface AssignCardConfig {
|
|
|
3629
3634
|
accessLevel: string;
|
|
3630
3635
|
liftAccessLevel: string;
|
|
3631
3636
|
}
|
|
3632
|
-
interface BulkCardUpdate {
|
|
3633
|
-
updateOne: {
|
|
3634
|
-
filter: {
|
|
3635
|
-
_id: ObjectId;
|
|
3636
|
-
};
|
|
3637
|
-
update: {
|
|
3638
|
-
$set: {
|
|
3639
|
-
assignedUnit: ObjectId | ObjectId[];
|
|
3640
|
-
};
|
|
3641
|
-
};
|
|
3642
|
-
};
|
|
3643
|
-
}
|
|
3644
3637
|
declare enum EAccessCardTypes {
|
|
3645
3638
|
NFC = "NFC",
|
|
3646
3639
|
QR = "QRCODE"
|
|
@@ -3648,7 +3641,8 @@ declare enum EAccessCardTypes {
|
|
|
3648
3641
|
declare enum EAccessCardUserTypes {
|
|
3649
3642
|
RESIDENT = "Resident/Tenant",
|
|
3650
3643
|
CONTRACTOR = "Contractor",
|
|
3651
|
-
VISITOR = "Visitor"
|
|
3644
|
+
VISITOR = "Visitor",
|
|
3645
|
+
DEFAULT = "Visitor/Resident"
|
|
3652
3646
|
}
|
|
3653
3647
|
interface TDefaultAccessCard extends Omit<IAccessCard, "_id" | "staffNo" | "fullName" | "dateOrBirth" | "dateOfJoin" | "userId"> {
|
|
3654
3648
|
unit?: string[] | [];
|
|
@@ -3703,6 +3697,10 @@ interface AdditionalSettings {
|
|
|
3703
3697
|
nfcPass: boolean | null;
|
|
3704
3698
|
qrPass: boolean | null;
|
|
3705
3699
|
keyPass: boolean | null;
|
|
3700
|
+
template: {
|
|
3701
|
+
id: string;
|
|
3702
|
+
name: string;
|
|
3703
|
+
};
|
|
3706
3704
|
printer?: {
|
|
3707
3705
|
vendorId: string | null | number;
|
|
3708
3706
|
productId: string | null | number;
|
|
@@ -3786,6 +3784,30 @@ interface QrTagProps {
|
|
|
3786
3784
|
qrTag: string;
|
|
3787
3785
|
qrTagCardNo?: string;
|
|
3788
3786
|
}
|
|
3787
|
+
interface BulkCardUpdate {
|
|
3788
|
+
updateOne: {
|
|
3789
|
+
filter: {
|
|
3790
|
+
_id: ObjectId;
|
|
3791
|
+
};
|
|
3792
|
+
update: {
|
|
3793
|
+
$set: {
|
|
3794
|
+
assignedUnit: ObjectId | ObjectId[];
|
|
3795
|
+
};
|
|
3796
|
+
};
|
|
3797
|
+
};
|
|
3798
|
+
}
|
|
3799
|
+
interface BulkCardUpdate {
|
|
3800
|
+
updateOne: {
|
|
3801
|
+
filter: {
|
|
3802
|
+
_id: ObjectId;
|
|
3803
|
+
};
|
|
3804
|
+
update: {
|
|
3805
|
+
$set: {
|
|
3806
|
+
assignedUnit: ObjectId | ObjectId[];
|
|
3807
|
+
};
|
|
3808
|
+
};
|
|
3809
|
+
};
|
|
3810
|
+
}
|
|
3789
3811
|
|
|
3790
3812
|
declare function UseAccessManagementRepo(): {
|
|
3791
3813
|
createIndexes: () => Promise<string>;
|
|
@@ -3886,6 +3908,57 @@ declare function UseAccessManagementRepo(): {
|
|
|
3886
3908
|
cardId: string;
|
|
3887
3909
|
remarks: string;
|
|
3888
3910
|
}) => Promise<mongodb.WithId<bson.Document> | null>;
|
|
3911
|
+
visitorAccessCardsRepo: (params: {
|
|
3912
|
+
site: string;
|
|
3913
|
+
page: number;
|
|
3914
|
+
limit: number;
|
|
3915
|
+
type: EAccessCardUserTypes;
|
|
3916
|
+
search: string | undefined;
|
|
3917
|
+
}) => Promise<{
|
|
3918
|
+
items: any[];
|
|
3919
|
+
pages: number;
|
|
3920
|
+
pageRange: string;
|
|
3921
|
+
}>;
|
|
3922
|
+
getCardReplacementRepo: (params: {
|
|
3923
|
+
site: string;
|
|
3924
|
+
search?: string;
|
|
3925
|
+
statusFilter?: string;
|
|
3926
|
+
dateFrom?: Date;
|
|
3927
|
+
dateTo?: Date;
|
|
3928
|
+
page: number;
|
|
3929
|
+
limit: number;
|
|
3930
|
+
}) => Promise<{
|
|
3931
|
+
items: any[];
|
|
3932
|
+
pages: number;
|
|
3933
|
+
pageRange: string;
|
|
3934
|
+
}>;
|
|
3935
|
+
getAccessManagementSettingsRepo: (params: {
|
|
3936
|
+
site: string;
|
|
3937
|
+
}) => Promise<mongodb.WithId<bson.Document> | null>;
|
|
3938
|
+
bulkPhysicalAccessCardRepo: (params: {
|
|
3939
|
+
dataJson: string;
|
|
3940
|
+
site: string;
|
|
3941
|
+
}) => Promise<{
|
|
3942
|
+
cardNo: any;
|
|
3943
|
+
insertedId: ObjectId;
|
|
3944
|
+
}[]>;
|
|
3945
|
+
assignAccessCardToUnitRepo: (params: {
|
|
3946
|
+
units: string[];
|
|
3947
|
+
quantity: number;
|
|
3948
|
+
type: EAccessCardTypes;
|
|
3949
|
+
site: string;
|
|
3950
|
+
userType: EAccessCardUserTypes;
|
|
3951
|
+
accessLevel: string;
|
|
3952
|
+
liftAccessLevel: string;
|
|
3953
|
+
}) => Promise<{
|
|
3954
|
+
status: string;
|
|
3955
|
+
message: string;
|
|
3956
|
+
assigned?: undefined;
|
|
3957
|
+
} | {
|
|
3958
|
+
status: string;
|
|
3959
|
+
message: string;
|
|
3960
|
+
assigned: number;
|
|
3961
|
+
}>;
|
|
3889
3962
|
};
|
|
3890
3963
|
|
|
3891
3964
|
declare function useAccessManagementController(): {
|
|
@@ -3905,6 +3978,11 @@ declare function useAccessManagementController(): {
|
|
|
3905
3978
|
updateNFCStatus: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3906
3979
|
doorAndLiftDropdown: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3907
3980
|
cardReplacement: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3981
|
+
visitorAccessCards: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3982
|
+
getCardReplacement: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3983
|
+
getAccessManagementSettings: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3984
|
+
bulkPhysicalAccessCard: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3985
|
+
assignAccessCardToUnit: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3908
3986
|
};
|
|
3909
3987
|
|
|
3910
3988
|
declare const DEVICE_STATUS: {
|