@7365admin1/core 2.12.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 +12 -0
- package/dist/index.d.ts +135 -18
- package/dist/index.js +2005 -841
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1386 -222
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2140,7 +2140,6 @@ type TPlates = {
|
|
|
2140
2140
|
type TPerson = {
|
|
2141
2141
|
_id?: ObjectId;
|
|
2142
2142
|
name: string;
|
|
2143
|
-
contact?: string;
|
|
2144
2143
|
nirc?: string;
|
|
2145
2144
|
type?: PersonType;
|
|
2146
2145
|
email?: string;
|
|
@@ -2151,6 +2150,7 @@ type TPerson = {
|
|
|
2151
2150
|
end?: string | Date;
|
|
2152
2151
|
status?: string;
|
|
2153
2152
|
nric?: string;
|
|
2153
|
+
contact?: string;
|
|
2154
2154
|
remarks?: string;
|
|
2155
2155
|
org: string | ObjectId;
|
|
2156
2156
|
site: string | ObjectId;
|
|
@@ -2169,7 +2169,7 @@ declare const schemaUpdatePerson: Joi.ObjectSchema<any>;
|
|
|
2169
2169
|
declare function MPerson(value: TPerson): {
|
|
2170
2170
|
_id: ObjectId | undefined;
|
|
2171
2171
|
name: string;
|
|
2172
|
-
contact: string
|
|
2172
|
+
contact: string;
|
|
2173
2173
|
block: number;
|
|
2174
2174
|
level: string;
|
|
2175
2175
|
unit: string;
|
|
@@ -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;
|
|
@@ -3175,7 +3177,7 @@ declare function useDocumentManagementRepo(): {
|
|
|
3175
3177
|
sort?: Record<string, any> | undefined;
|
|
3176
3178
|
status: string;
|
|
3177
3179
|
org?: string | undefined;
|
|
3178
|
-
site?: string | undefined;
|
|
3180
|
+
site?: string | ObjectId | undefined;
|
|
3179
3181
|
}) => Promise<{
|
|
3180
3182
|
items: any[];
|
|
3181
3183
|
pages: number;
|
|
@@ -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>;
|
|
@@ -3852,6 +3874,91 @@ declare function UseAccessManagementRepo(): {
|
|
|
3852
3874
|
cardId: string[];
|
|
3853
3875
|
site: string;
|
|
3854
3876
|
}) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
3877
|
+
accessandLiftCardsRepo: (params: {
|
|
3878
|
+
accessLevel: string | null;
|
|
3879
|
+
liftAccessLevel: string | null;
|
|
3880
|
+
site: string;
|
|
3881
|
+
userType: EAccessCardUserTypes;
|
|
3882
|
+
type: EAccessCardTypes;
|
|
3883
|
+
}) => Promise<bson.Document[]>;
|
|
3884
|
+
replaceCardRepo: (params: {
|
|
3885
|
+
userId: string;
|
|
3886
|
+
cardId: string;
|
|
3887
|
+
site: string;
|
|
3888
|
+
acm_url: string;
|
|
3889
|
+
}) => Promise<mongodb.InsertManyResult<bson.Document>>;
|
|
3890
|
+
updateNFCStatusRepo: (params: {
|
|
3891
|
+
nfcList: Array<{
|
|
3892
|
+
_id: string | ObjectId;
|
|
3893
|
+
status: string;
|
|
3894
|
+
vmsRemarks?: string;
|
|
3895
|
+
updatedAt?: Date;
|
|
3896
|
+
}>;
|
|
3897
|
+
visitorId: string;
|
|
3898
|
+
}) => Promise<{
|
|
3899
|
+
nfcId: string | ObjectId;
|
|
3900
|
+
modifiedCount?: number | undefined;
|
|
3901
|
+
}[]>;
|
|
3902
|
+
doorAndLiftDropdownRepo: (params: {
|
|
3903
|
+
site: string;
|
|
3904
|
+
type: string;
|
|
3905
|
+
userType: string;
|
|
3906
|
+
}) => Promise<bson.Document[]>;
|
|
3907
|
+
cardReplacementRepo: (params: {
|
|
3908
|
+
cardId: string;
|
|
3909
|
+
remarks: string;
|
|
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
|
+
}>;
|
|
3855
3962
|
};
|
|
3856
3963
|
|
|
3857
3964
|
declare function useAccessManagementController(): {
|
|
@@ -3866,6 +3973,16 @@ declare function useAccessManagementController(): {
|
|
|
3866
3973
|
userTypeAccessCards: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3867
3974
|
assignedAccessCards: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3868
3975
|
acknowlegdeCard: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3976
|
+
accessandLiftCards: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3977
|
+
replaceCard: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3978
|
+
updateNFCStatus: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3979
|
+
doorAndLiftDropdown: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
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>>>;
|
|
3869
3986
|
};
|
|
3870
3987
|
|
|
3871
3988
|
declare const DEVICE_STATUS: {
|
|
@@ -4669,7 +4786,7 @@ declare function useOnlineFormRepo(): {
|
|
|
4669
4786
|
sort?: Record<string, any> | undefined;
|
|
4670
4787
|
status: string;
|
|
4671
4788
|
org?: string | undefined;
|
|
4672
|
-
site?: string | undefined;
|
|
4789
|
+
site?: string | ObjectId | undefined;
|
|
4673
4790
|
}) => Promise<{
|
|
4674
4791
|
items: any[];
|
|
4675
4792
|
pages: number;
|