@7365admin1/core 2.8.0 → 2.10.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 +98 -8
- package/dist/index.js +758 -82
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +830 -151
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -549,6 +549,7 @@ type TAddress = {
|
|
|
549
549
|
postalCode: string;
|
|
550
550
|
taxId: string;
|
|
551
551
|
};
|
|
552
|
+
declare function MAddress(value: any): TAddress;
|
|
552
553
|
|
|
553
554
|
declare function useSubscriptionService(): {
|
|
554
555
|
createOrgSubscription: (value: {
|
|
@@ -1476,6 +1477,7 @@ type TSiteMetadata = {
|
|
|
1476
1477
|
guardPosts?: number;
|
|
1477
1478
|
gracePeriod?: number;
|
|
1478
1479
|
incidentCounter?: number;
|
|
1480
|
+
incidentLogo?: string;
|
|
1479
1481
|
};
|
|
1480
1482
|
type TSite = {
|
|
1481
1483
|
_id?: ObjectId;
|
|
@@ -3689,6 +3691,30 @@ type TDocs = {
|
|
|
3689
3691
|
id: string;
|
|
3690
3692
|
name: string;
|
|
3691
3693
|
};
|
|
3694
|
+
interface AdditionalSettings {
|
|
3695
|
+
physicalPass: boolean | null;
|
|
3696
|
+
nfcPass: boolean | null;
|
|
3697
|
+
qrPass: boolean | null;
|
|
3698
|
+
keyPass: boolean | null;
|
|
3699
|
+
printer?: {
|
|
3700
|
+
vendorId: string | null | number;
|
|
3701
|
+
productId: string | null | number;
|
|
3702
|
+
};
|
|
3703
|
+
qrTemplate?: {
|
|
3704
|
+
header: string | null;
|
|
3705
|
+
subText: string | null;
|
|
3706
|
+
date: string | null;
|
|
3707
|
+
};
|
|
3708
|
+
url: string | null;
|
|
3709
|
+
}
|
|
3710
|
+
type TAccessMngmntSettings = {
|
|
3711
|
+
site: ObjectId;
|
|
3712
|
+
isEnabled: boolean | null;
|
|
3713
|
+
api: unknown;
|
|
3714
|
+
port: unknown;
|
|
3715
|
+
serviceId: unknown;
|
|
3716
|
+
settings: AdditionalSettings;
|
|
3717
|
+
};
|
|
3692
3718
|
interface IAccessCardTransaction {
|
|
3693
3719
|
_id?: ObjectId;
|
|
3694
3720
|
index: number | string;
|
|
@@ -3744,7 +3770,8 @@ declare class MAccessCard implements Partial<IAccessCard> {
|
|
|
3744
3770
|
liftName?: string;
|
|
3745
3771
|
replacementStatus?: string;
|
|
3746
3772
|
vmsRemarks?: string;
|
|
3747
|
-
|
|
3773
|
+
isWinsland?: boolean;
|
|
3774
|
+
constructor({ _id, userId, site, staffNo, type, accessLevel, accessGroup, accessType, cardNo, pin, qrData, startDate, endDate, isActivated, isAntiPassBack, isLiftCard, liftAccessLevel, createdAt, updatedAt, assignedUnit, userType, doorName, liftName, replacementStatus, vmsRemarks, isWinsland, }?: IAccessCard);
|
|
3748
3775
|
}
|
|
3749
3776
|
interface QrTagProps {
|
|
3750
3777
|
_id: string | ObjectId;
|
|
@@ -3755,6 +3782,7 @@ interface QrTagProps {
|
|
|
3755
3782
|
|
|
3756
3783
|
declare function UseAccessManagementRepo(): {
|
|
3757
3784
|
createIndexes: () => Promise<string>;
|
|
3785
|
+
createIndexForEntrypass: () => Promise<string>;
|
|
3758
3786
|
addPhysicalCardRepo: ({ payload, }: {
|
|
3759
3787
|
payload: TDefaultAccessCard;
|
|
3760
3788
|
}) => Promise<ObjectId>;
|
|
@@ -3773,11 +3801,39 @@ declare function UseAccessManagementRepo(): {
|
|
|
3773
3801
|
endDate: Date | string;
|
|
3774
3802
|
createdAt: Date | string;
|
|
3775
3803
|
updatedAt: Date | string;
|
|
3804
|
+
isWinsland?: boolean;
|
|
3776
3805
|
}) => Promise<{
|
|
3777
3806
|
acknowledged: boolean;
|
|
3778
3807
|
insertedCount: number;
|
|
3779
3808
|
insertedIds: Record<number, ObjectId>;
|
|
3780
3809
|
}>;
|
|
3810
|
+
accessManagementSettingsRepo: (params: TAccessMngmntSettings) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
3811
|
+
allAccessCardsCountsRepo: (params: {
|
|
3812
|
+
site: string;
|
|
3813
|
+
userType: string;
|
|
3814
|
+
}) => Promise<{
|
|
3815
|
+
available_physical: any;
|
|
3816
|
+
available_non_physical: any;
|
|
3817
|
+
assigned_physical: any;
|
|
3818
|
+
assigned_non_physical: any;
|
|
3819
|
+
}>;
|
|
3820
|
+
availableAccessCardsRepo: (params: {
|
|
3821
|
+
site: string;
|
|
3822
|
+
userType: string;
|
|
3823
|
+
type: string;
|
|
3824
|
+
}) => Promise<bson.Document[]>;
|
|
3825
|
+
userTypeAccessCardsRepo: (params: {
|
|
3826
|
+
page: number;
|
|
3827
|
+
limit: number;
|
|
3828
|
+
search: string;
|
|
3829
|
+
site: string;
|
|
3830
|
+
organization: string;
|
|
3831
|
+
userType: EAccessCardUserTypes;
|
|
3832
|
+
}) => Promise<{
|
|
3833
|
+
items: any[];
|
|
3834
|
+
pages: number;
|
|
3835
|
+
pageRange: string;
|
|
3836
|
+
}>;
|
|
3781
3837
|
};
|
|
3782
3838
|
|
|
3783
3839
|
declare function useAccessManagementController(): {
|
|
@@ -3786,6 +3842,10 @@ declare function useAccessManagementController(): {
|
|
|
3786
3842
|
doorAccessLevels: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3787
3843
|
liftAccessLevels: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3788
3844
|
accessGroups: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3845
|
+
accessManagementSettings: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3846
|
+
allAccessCardsCounts: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3847
|
+
availableAccessCards: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3848
|
+
userTypeAccessCards: (req: Request, res: Response) => Promise<Response<any, Record<string, any>>>;
|
|
3789
3849
|
};
|
|
3790
3850
|
|
|
3791
3851
|
declare const DEVICE_STATUS: {
|
|
@@ -4261,6 +4321,13 @@ type TIncidentTypeAndTime = {
|
|
|
4261
4321
|
typeOfIncident: string;
|
|
4262
4322
|
dateOfIncident?: string | Date;
|
|
4263
4323
|
};
|
|
4324
|
+
type TAuthoritiesCalled = {
|
|
4325
|
+
type: string;
|
|
4326
|
+
vehicleNumber: string;
|
|
4327
|
+
personInCharge: string;
|
|
4328
|
+
caseReportReference: string;
|
|
4329
|
+
description: string;
|
|
4330
|
+
};
|
|
4264
4331
|
type TSubmissionForm = {
|
|
4265
4332
|
dateOfReport: string | Date;
|
|
4266
4333
|
time?: string;
|
|
@@ -4291,17 +4358,31 @@ type TIncidentInformation = {
|
|
|
4291
4358
|
recipientOfComplaint?: TRecipientOfComplaint;
|
|
4292
4359
|
complaintReceivedTo: TComplaintReceivedTo;
|
|
4293
4360
|
};
|
|
4361
|
+
type TAffectedInjured = {
|
|
4362
|
+
name: string;
|
|
4363
|
+
contact?: string;
|
|
4364
|
+
nric?: string;
|
|
4365
|
+
};
|
|
4366
|
+
type TanyoneDamageToProperty = {
|
|
4367
|
+
description: string;
|
|
4368
|
+
block: number;
|
|
4369
|
+
level: string;
|
|
4370
|
+
unit: string;
|
|
4371
|
+
blkLevelUnit: string;
|
|
4372
|
+
name: string;
|
|
4373
|
+
contact: string;
|
|
4374
|
+
};
|
|
4294
4375
|
type TAffectedEntities = {
|
|
4295
4376
|
anyUnitAffectedValue: "yes" | "no";
|
|
4296
4377
|
affectedUnit?: Record<string, any> | ObjectId;
|
|
4297
4378
|
anyoneAffectedValue: "yes" | "no";
|
|
4298
|
-
affectedInjured:
|
|
4379
|
+
affectedInjured: TAffectedInjured[];
|
|
4299
4380
|
anyPropertyAffectedValue: "yes" | "no";
|
|
4300
|
-
anyoneDamageToProperty:
|
|
4381
|
+
anyoneDamageToProperty: TanyoneDamageToProperty[];
|
|
4301
4382
|
};
|
|
4302
4383
|
type TAuthorities = {
|
|
4303
4384
|
authoritiesValue: "yes" | "no";
|
|
4304
|
-
authoritiesCalled:
|
|
4385
|
+
authoritiesCalled: TAuthoritiesCalled[];
|
|
4305
4386
|
incidentThereAfter?: string;
|
|
4306
4387
|
managementNotified?: TActionStatus;
|
|
4307
4388
|
incidentResolved?: string;
|
|
@@ -4331,7 +4412,7 @@ type TIncidentReport = {
|
|
|
4331
4412
|
photos?: string[];
|
|
4332
4413
|
approvedBy?: ObjectId | null;
|
|
4333
4414
|
approvedByName?: string;
|
|
4334
|
-
|
|
4415
|
+
remarks?: string | null;
|
|
4335
4416
|
status: "pending" | "approved" | "rejected";
|
|
4336
4417
|
createdAt?: string | Date;
|
|
4337
4418
|
updatedAt?: string | Date;
|
|
@@ -4352,7 +4433,7 @@ declare function MIncidentReport(value: TIncidentReport): {
|
|
|
4352
4433
|
photos: string[];
|
|
4353
4434
|
approvedBy: ObjectId | null;
|
|
4354
4435
|
approvedByName: string;
|
|
4355
|
-
|
|
4436
|
+
remarks: string | null;
|
|
4356
4437
|
status: "pending" | "approved" | "rejected";
|
|
4357
4438
|
createdAt: string | Date;
|
|
4358
4439
|
updatedAt: string | Date | undefined;
|
|
@@ -4360,9 +4441,10 @@ declare function MIncidentReport(value: TIncidentReport): {
|
|
|
4360
4441
|
};
|
|
4361
4442
|
|
|
4362
4443
|
declare function useIncidentReportService(): {
|
|
4363
|
-
add: (value: TIncidentReport) => Promise<
|
|
4444
|
+
add: (value: TIncidentReport) => Promise<ObjectId>;
|
|
4364
4445
|
updateIncidentReportById: (id: string | ObjectId, value: Partial<TIncidentReport>) => Promise<string>;
|
|
4365
4446
|
createIncidentSummary: (value: Partial<TIncidentReport>) => Promise<string>;
|
|
4447
|
+
reviewIncidentReport: (id: string | ObjectId, value: Partial<TIncidentReport>) => Promise<string>;
|
|
4366
4448
|
};
|
|
4367
4449
|
|
|
4368
4450
|
declare function useIncidentReportController(): {
|
|
@@ -4372,6 +4454,7 @@ declare function useIncidentReportController(): {
|
|
|
4372
4454
|
updateIncidentReportById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
4373
4455
|
deleteIncidentReportById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
4374
4456
|
createIncidentSummary: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
4457
|
+
reviewIncidentReport: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
4375
4458
|
};
|
|
4376
4459
|
|
|
4377
4460
|
declare function useIncidentReportRepo(): {
|
|
@@ -4394,6 +4477,7 @@ declare function useIncidentReportRepo(): {
|
|
|
4394
4477
|
deleteIncidentReportById: (_id: string | ObjectId) => Promise<number>;
|
|
4395
4478
|
createIndexes: () => Promise<void>;
|
|
4396
4479
|
createTextIndex: () => Promise<void>;
|
|
4480
|
+
reviewIncidentReport: (_id: ObjectId | string, value: Partial<TIncidentReport>, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
4397
4481
|
};
|
|
4398
4482
|
|
|
4399
4483
|
type TNfcPatrolSettings = {
|
|
@@ -4716,4 +4800,10 @@ declare function useNfcPatrolLogController(): {
|
|
|
4716
4800
|
getAllBySite: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
4717
4801
|
};
|
|
4718
4802
|
|
|
4719
|
-
|
|
4803
|
+
declare function useAddressRepo(): {
|
|
4804
|
+
createIndex: () => Promise<void>;
|
|
4805
|
+
add: (value: TAddress, session?: ClientSession) => Promise<ObjectId>;
|
|
4806
|
+
getByUserId: (user: string | ObjectId) => Promise<TAddress | null>;
|
|
4807
|
+
};
|
|
4808
|
+
|
|
4809
|
+
export { AccessTypeProps, AssignCardConfig, BulkCardUpdate, Camera, DEVICE_STATUS, EAccessCardTypes, EAccessCardUserTypes, IAccessCard, IAccessCardTransaction, MAccessCard, MAccessCardTransaction, MAddress, MAttendance, MAttendanceSettings, MBillingConfiguration, MBillingItem, MBuilding, MBuildingUnit, MBulletinBoard, MBulletinVideo, MChat, MCustomer, MCustomerSite, MDocumentManagement, MEntryPassSettings, MEventManagement, MFeedback, MFile, MGuestManagement, MIncidentReport, MMember, MNfcPatrolLog, MNfcPatrolRoute, MNfcPatrolSettings, MNfcPatrolSettingsUpdate, MNfcPatrolTag, MOccurrenceBook, MOccurrenceEntry, MOccurrenceSubject, MOnlineForm, MOrg, MPatrolLog, MPatrolQuestion, MPatrolRoute, MPerson, MPromoCode, MRobot, MRole, MServiceProvider, MServiceProviderBilling, MSession, MSite, MSiteCamera, MSiteFacility, MSiteFacilityBooking, MStatementOfAccount, MSubscription, MUnitBilling, MUser, MVehicle, MVehicleTransaction, MVerification, MVisitorTransaction, MWorkOrder, PERSON_TYPES, PersonType, QrTagProps, SiteType, TAccessMngmntSettings, TActionStatus, TAddress, TAffectedEntities, TAffectedInjured, TAttendance, TAttendanceCheckIn, TAttendanceCheckOut, TAttendanceCheckTime, TAttendanceLocation, TAttendanceSettings, TAttendanceSettingsGetBySite, TAuthorities, TAuthoritiesCalled, TBilling, TBillingConfiguration, TBillingItem, TBuilding, TBuildingUnit, TBulletinBoard, TBulletinVideo, TCamera, TChat, TCheckPoint$1 as TCheckPoint, TComplaintInfo, TComplaintReceivedTo, TCounter, TCustomer, TCustomerSite, TDayNumber, TDefaultAccessCard, TDocs, TDocumentManagement, TEntryPassSettings, TEventManagement, TFeedback, TFeedbackMetadata, TFeedbackUpdate, TFeedbackUpdateCategory, TFeedbackUpdateServiceProvider, TFeedbackUpdateStatus, TFeedbackUpdateToCompleted, TFile, TGetAttendancesByUserQuery, TGetAttendancesQuery, TGuestManagement, TIncidentInformation, TIncidentReport, TIncidentTypeAndTime, TInvoice, TMember, TMemberUpdateStatus, TMiniRole, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TOccurrenceBook, TOccurrenceEntry, TOccurrenceSubject, TOnlineForm, TOrg, TPatrolLog, TPatrolQuestion, TPatrolRoute, TPerson, TPlaceOfIncident, TPlates, TPrice, TPriceType, TPromoCode, TPromoTier, TRecipientOfComplaint, TRobot, TRobotMetadata, TRole, TRoute, TSOABillingItem, TSOAStatus, TServiceProvider, TServiceProviderBilling, TSession, TSessionCreate, TSite, TSiteCamera, TSiteFacility, TSiteFacilityBooking, TSiteInfo, TSiteMetadata, TSiteUpdateBlock, TStatementOfAccount, TSubmissionForm, TSubscription, TUnitBilling, TUnits, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationMetadata, TVisitorTransaction, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UseAccessManagementRepo, allowedCategories, allowedFieldsSite, allowedNatures, allowedTypes, attendanceSchema, attendanceSettingsSchema, chatSchema, customerSchema, feedbackSchema, logCamera, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, orgSchema, promoCodeSchema, robotSchema, schema, schemaBilling, schemaBillingConfiguration, schemaBillingItem, schemaBuilding, schemaBuildingUnit, schemaBuildingUpdateOptions, schemaBulletinBoard, schemaBulletinVideo, schemaCustomerSite, schemaDocumentManagement, schemaEntryPassSettings, schemaEventManagement, schemaGuestManagement, schemaIncidentReport, schemaNfcPatrolLog, schemaNfcPatrolRoute, schemaNfcPatrolTag, schemaNfcPatrolTagUpdateData, schemaOccurrenceBook, schemaOccurrenceEntry, schemaOccurrenceSubject, schemaOnlineForm, schemaPatrolLog, schemaPatrolQuestion, schemaPatrolRoute, schemaPerson, schemaPlate, schemaServiceProvider, schemaServiceProviderBilling, schemaSiteCamera, schemaSiteFacility, schemaSiteFacilityBooking, schemaStatementOfAccount, schemaUnitBilling, schemaUpdateBulletinBoard, schemaUpdateBulletinVideo, schemaUpdateDocumentManagement, schemaUpdateEntryPassSettings, schemaUpdateEventManagement, schemaUpdateGuestManagement, schemaUpdateIncidentReport, schemaUpdateOccurrenceBook, schemaUpdateOccurrenceEntry, schemaUpdateOccurrenceSubject, schemaUpdateOnlineForm, schemaUpdateOptions, schemaUpdatePatrolLog, schemaUpdatePatrolQuestion, schemaUpdatePatrolRoute, schemaUpdatePerson, schemaUpdateServiceProviderBilling, schemaUpdateSiteBillingConfiguration, schemaUpdateSiteBillingItem, schemaUpdateSiteCamera, schemaUpdateSiteFacility, schemaUpdateSiteUnitBilling, schemaUpdateStatementOfAccount, schemaUpdateVisTrans, schemaVehicleTransaction, schemaVisitorTransaction, schemeCamera, schemeLogCamera, siteSchema, tokenSchema, useAccessManagementController, useAddressRepo, useAttendanceController, useAttendanceRepository, useAttendanceSettingsController, useAttendanceSettingsRepository, useAttendanceSettingsService, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useBulletinBoardController, useBulletinBoardRepo, useBulletinBoardService, useBulletinVideoController, useBulletinVideoRepo, useBulletinVideoService, useChatController, useChatRepo, useCounterModel, useCounterRepo, useCustomerController, useCustomerRepo, useCustomerSiteController, useCustomerSiteRepo, useCustomerSiteService, useDahuaService, useDashboardController, useDashboardRepo, useDocumentManagementController, useDocumentManagementRepo, useDocumentManagementService, useEntryPassSettingsController, useEntryPassSettingsRepo, useEventManagementController, useEventManagementRepo, useEventManagementService, useFeedbackController, useFeedbackRepo, useFeedbackService, useFileController, useFileRepo, useFileService, useGuestManagementController, useGuestManagementRepo, useGuestManagementService, useIncidentReportController, useIncidentReportRepo, useIncidentReportService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useMemberController, useMemberRepo, useNfcPatrolLogController, useNfcPatrolLogRepo, useNfcPatrolLogService, useNfcPatrolRouteController, useNfcPatrolRouteRepo, useNfcPatrolRouteService, useNfcPatrolSettingsController, useNfcPatrolSettingsRepository, useNfcPatrolSettingsService, useNfcPatrolTagController, useNfcPatrolTagRepo, useNfcPatrolTagService, useOccurrenceBookController, useOccurrenceBookRepo, useOccurrenceBookService, useOccurrenceEntryController, useOccurrenceEntryRepo, useOccurrenceEntryService, useOccurrenceSubjectController, useOccurrenceSubjectRepo, useOccurrenceSubjectService, useOnlineFormController, useOnlineFormRepo, useOrgController, useOrgRepo, usePatrolLogController, usePatrolLogRepo, usePatrolQuestionController, usePatrolQuestionRepo, usePatrolRouteController, usePatrolRouteRepo, usePersonController, usePersonRepo, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRobotController, useRobotRepo, useRobotService, useRoleController, useRoleRepo, useServiceProviderBillingController, useServiceProviderBillingRepo, useServiceProviderBillingService, useServiceProviderController, useServiceProviderRepo, useSessionRepo, useSiteBillingConfigurationController, useSiteBillingConfigurationRepo, useSiteBillingItemController, useSiteBillingItemRepo, useSiteCameraController, useSiteCameraRepo, useSiteCameraService, useSiteController, useSiteFacilityBookingController, useSiteFacilityBookingRepo, useSiteFacilityBookingService, useSiteFacilityController, useSiteFacilityRepo, useSiteFacilityService, useSiteRepo, useSiteService, useSiteUnitBillingController, useSiteUnitBillingRepo, useSiteUnitBillingService, useStatementOfAccountController, useStatementOfAccountRepo, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useUserController, useUserRepo, useUserService, useVehicleController, useVehicleRepo, useVehicleService, useVerificationController, useVerificationRepo, useVerificationService, useVisitorTransactionController, useVisitorTransactionRepo, useVisitorTransactionService, useWorkOrderController, useWorkOrderRepo, useWorkOrderService, userSchema, vehicleSchema, workOrderSchema };
|