@7365admin1/core 3.50.0 → 3.50.1-staging.217

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.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@7365admin1/core": patch
3
+ ---
4
+
5
+ Constrain site camera `category` and `status` with Joi `.valid()` instead of `.allow()`
package/dist/index.d.ts CHANGED
@@ -5348,6 +5348,14 @@ type TPatrolEmail = {
5348
5348
  */
5349
5349
  sourceUrl?: string;
5350
5350
  status?: "sent" | "failed" | "deleted";
5351
+ /**
5352
+ * Set when this record was created by resending an earlier one.
5353
+ *
5354
+ * Always points at the **original** email, never at another resend, so the
5355
+ * chain stays one level deep no matter how many attempts are made. A record
5356
+ * with this set never offers a resend button of its own.
5357
+ */
5358
+ sourceEmail?: string | ObjectId | null;
5351
5359
  createdBy: TPatrolEmailCreatedBy;
5352
5360
  createdAt?: string;
5353
5361
  updatedAt?: string;
@@ -5357,6 +5365,14 @@ declare const schemaPatrolEmailLogRef: Joi.ObjectSchema<any>;
5357
5365
  declare const schemaPatrolEmailCreatedBy: Joi.ObjectSchema<any>;
5358
5366
  declare const schemaPatrolEmail: Joi.ObjectSchema<any>;
5359
5367
  declare const schemaSendPatrolEmail: Joi.ObjectSchema<any>;
5368
+ /**
5369
+ * The request body for resending.
5370
+ *
5371
+ * Everything else — subject, recipients, logs, url — is taken from the stored
5372
+ * record rather than the request, so a resend is provably the same email the
5373
+ * original was.
5374
+ */
5375
+ declare const schemaResendPatrolEmail: Joi.ObjectSchema<any>;
5360
5376
  declare const schemaPatrolEmailQuery: Joi.ObjectSchema<any>;
5361
5377
  declare function MPatrolEmail(value: TPatrolEmail): {
5362
5378
  _id: ObjectId | undefined;
@@ -5380,6 +5396,7 @@ declare function MPatrolEmail(value: TPatrolEmail): {
5380
5396
  } | null;
5381
5397
  sourceUrl: string;
5382
5398
  status: "deleted" | "failed" | "sent";
5399
+ sourceEmail: string | ObjectId | null;
5383
5400
  createdBy: {
5384
5401
  _id: string | ObjectId;
5385
5402
  name: string;
@@ -5412,6 +5429,7 @@ declare function usePatrolEmailRepo(): {
5412
5429
  } | undefined;
5413
5430
  sourceUrl?: string | undefined;
5414
5431
  status?: "deleted" | "failed" | "sent" | undefined;
5432
+ sourceEmail?: string | ObjectId | null | undefined;
5415
5433
  createdBy: TPatrolEmailCreatedBy;
5416
5434
  createdAt?: string | undefined;
5417
5435
  updatedAt?: string | undefined;
@@ -5501,6 +5519,29 @@ declare function usePatrolEmailService(): {
5501
5519
  logs: TPatrolEmailLogRef[];
5502
5520
  logCount: number;
5503
5521
  sourceUrl?: string | undefined;
5522
+ sourceEmail?: string | ObjectId | null | undefined;
5523
+ createdBy: TPatrolEmailCreatedBy;
5524
+ createdAt?: string | undefined;
5525
+ updatedAt?: string | undefined;
5526
+ deletedAt?: string | undefined;
5527
+ }>;
5528
+ resend: ({ id, createdBy, cookieHeader, appKey, }: {
5529
+ id: string | ObjectId;
5530
+ createdBy: TPatrolEmailCreatedBy;
5531
+ cookieHeader?: string | undefined;
5532
+ appKey?: "PROPERTY" | "SECURITY" | "HYGIENE" | "MECHANICAL_ELECTRICAL" | "PEST_CONTROL" | "LANDSCAPING" | "POOL_MAINTENANCE" | undefined;
5533
+ }) => Promise<{
5534
+ _id: ObjectId | undefined;
5535
+ pdf: any;
5536
+ status: "sent";
5537
+ site: string | ObjectId;
5538
+ org?: string | ObjectId | undefined;
5539
+ subject: string;
5540
+ recipients: string[];
5541
+ logs: TPatrolEmailLogRef[];
5542
+ logCount: number;
5543
+ sourceUrl?: string | undefined;
5544
+ sourceEmail?: string | ObjectId | null | undefined;
5504
5545
  createdBy: TPatrolEmailCreatedBy;
5505
5546
  createdAt?: string | undefined;
5506
5547
  updatedAt?: string | undefined;
@@ -5524,6 +5565,7 @@ declare function usePatrolEmailService(): {
5524
5565
 
5525
5566
  declare function usePatrolEmailController(): {
5526
5567
  send: (req: Request, res: Response, next: NextFunction) => Promise<void>;
5568
+ resend: (req: Request, res: Response, next: NextFunction) => Promise<void>;
5527
5569
  getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
5528
5570
  getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
5529
5571
  deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
@@ -12572,4 +12614,4 @@ declare function useNotificationPreferenceController(): {
12572
12614
  update: (req: Request, res: Response, next: NextFunction) => Promise<void>;
12573
12615
  };
12574
12616
 
12575
- export { ANPRMode, APP_BASE_URLS, AUDIT_VALUE_MAX_LENGTH, AccessTypeProps, AppKey, AppServiceType, AssignCardConfig, BidStatus, BidType, BuildingLevelStatus, BuildingStatus, BulkCardUpdate, BulletinOrder, BulletinRecipient, BulletinSort, BulletinStatus, BulletinVideoOrder, BulletinVideoSort, CAMERA_ANPR_PERMISSIONS, CAMERA_CAPABILITIES, CAMERA_CAPABILITY_REASONS, CAMERA_MANAGE_ANY_PERMISSIONS, CAMERA_NOT_PATROL_OR_CCTV, CAMERA_NO_SUB_STREAM_TTL_SECONDS, CAMERA_PTZ_PERMISSIONS, CAMERA_REQUEST_TIMEOUT_MS, CAMERA_RTSP_TIMEOUT_MS, CAMERA_SETUP_PERMISSIONS, CAMERA_SNAPSHOT_CACHE_SECONDS, CAMERA_SNAPSHOT_MAX_BYTES, CAMERA_TEST_MIN_INTERVAL_SECONDS, CAMERA_TEST_ROUND_LIMIT, CAMERA_TEST_ROUND_SECONDS, CAMERA_TYPE_ANPR, CAMERA_TYPE_IP, CAMERA_VIEW_PERMISSIONS, CLIENT_ACTIONS, CLOCK_DRIFT_WARN_SECONDS, CONSOLE_AUDIT_LABELS, CURRENT_TIME_ENDPOINT, Camera, CameraAddressInput, CameraCapability, CameraCapabilityContext, CameraCapabilityDescriptor, CameraCapabilityEntry, CameraCapabilityReason, CameraCapabilityState, CameraCapabilityTrace, CameraDevice, CameraFrame, CameraMembership, CameraStream, CameraTestStatus, CameraTransport, CameraType, ConsoleAuditAction, ConsoleAuditTarget, DEVICE_STATUS, DOBStatus, DUPLICATE_TERMS_VERSION_MESSAGE, DayOfWeek, DeviceHttpTarget, DeviceProbeResult, DynamicFormFields, EAccessCardTypes, EAccessCardUserTypes, EmailSender, EntryOrder, EntrySort, EventOrder, EventSort, EventStatus, EventType, FacilitySort, FacilityStatus, FormEntryStatus, GuestSort, GuestStatus, HID_CARD_VALUE_FACTOR, HID_PERMISSION_CATEGORIES, HID_UINT32_MAX, HID_UINT64_MAX, HidRawUint64, IAccessCard, IAccessCardTransaction, InviteActor, LIVE_ROLE, MAX_CAMERA_CHANNEL, MAccessCard, MAccessCardTransaction, MAddress, MAttendance, MAttendanceSettings, MBidPreloved, MBillingConfiguration, MBillingItem, MBuilding, MBuildingLevel, MBuildingUnit, MBulletinBoard, MBulletinVideo, MCategoryPreloved, MChannelPreloved, MChat, MChatPreloved, MConsoleAudit, MCustomer, MCustomerSite, MDocumentManagement, MEMBER_TYPES, MEntryPassSettings, MEventManagement, MFeedback, MFile, MFormEntry, MGuestManagement, MHidAmicoEvent, MHidAmicoIdentity, MHidAmicoReader, MHidSipAccount, MHidSitePermissions, MIncidentReport, MManpowerDesignations, MManpowerMonitoring, MManpowerRemarks, MManpowerSites, MMember, MNfcPatrolLog, MNfcPatrolRoute, MNfcPatrolSettings, MNfcPatrolSettingsUpdate, MNfcPatrolTag, MNotification, MNotificationPreference, MOccurrenceBook, MOccurrenceEntry, MOccurrenceSubject, MOnlineForm, MOrg, MOvernightParkingApprovalHours, MOvernightParkingRequest, MPatrolEmail, MPatrolLog, MPatrolQuestion, MPatrolRoute, MPerson, MPlatformTerms, MPost, MPostFavorite, MPromoCode, MRobot, MRole, MRoleV2, MServiceProvider, MServiceProviderBilling, MSession, MSite, MSiteCamera, MSiteFacility, MSiteFacilityBooking, MStatementOfAccount, MSubcategoryPreloved, MSubscription, MSubscriptionPlan, MUnitBilling, MUser, MVehicle, MVehicleTransaction, MVerification, MVerificationV2, MVisitorTransaction, MWorkOrder, NOTIFICATION_CATEGORIES, NOTIFICATION_CHANNELS, NOTIFICATION_CHANNEL_LABELS, NOTIFICATION_NAMESPACE, NotificationAppSlug, NotificationCategory, NotificationChannel, NotificationModule, NotificationPreferenceView, NotificationService, ORG_MARKETPLACE_VENDOR_FIELD, OrgNature, OvernightParkingRequestSort, OvernightParkingRequestStatus, PATROL_CCTV_CAMERA_FILTER, PATROL_EMAIL_MAX_LOGS, PATROL_EMAIL_MAX_PER_HOUR, PATROL_EMAIL_MAX_RECIPIENTS, PERSON_TYPES, PLATFORM_STAFF_MEMBER_TYPE, PLATFORM_STAFF_ROLE_TYPE, PROPERTY_MANAGEMENT_MEMBER_TYPES, PStatus, PTZ_ALLOWED_ACTIONS, PTZ_ALLOWED_CODES, Period, PersonStatus, PersonType, PersonTypes, PlatformTermsStatus, PostOrder, PostSort, PostStatus, QrTagProps, REALTIME_MAX_FANOUT, ResidentAppModuleKey, SELF_SIGNUP_PLATFORM, SELF_SIGNUP_STATUS, SELF_SIGNUP_TYPES, SERVICE_PROVIDER_INVITE_LABELS, SERVICE_PROVIDER_INVITE_TRANSITIONS, SERVICE_PROVIDER_SIGN_IN_SUBJECT, SERVICE_PROVIDER_SIGN_IN_TYPE, SERVICE_PROVIDER_SIGN_UP_SUBJECT, SERVICE_PROVIDER_SIGN_UP_TYPE, SOFTWARE_VERSION_ENDPOINT, ServiceProviderInviteAction, ServiceProviderInviteDecision, ServiceProviderInviteFacts, SiteAddress, SiteCategories, SiteStatus, SortFields, SortOrder, Status, SubjectOrder, SubjectSort, SubscriptionBillingMode, SubscriptionType, TAccessMngmntSettings, TActionStatus, TAddress, TAffectedEntities, TAffectedInjured, TAppServiceType, TApprovedBy, TApprover, TAttendance, TAttendanceCheckIn, TAttendanceCheckOut, TAttendanceCheckTime, TAttendanceLocation, TAttendanceSettings, TAttendanceSettingsGetBySite, TAuthorities, TAuthoritiesCalled, TBidPreloved, TBilling, TBillingConfiguration, TBillingItem, TBuilding, TBuildingLevel, TBuildingUnit, TBulletinBoard, TBulletinVideo, TCamera, TCameraHealthClaim, TCategoryPreloved, TChannelPreloved, TChat, TChatPreloved, TCheckPoint$1 as TCheckPoint, TComplaintInfo, TComplaintReceivedTo, TConsoleAudit, TConsoleAuditQuery, TCounter, TCreateNfcPatrolLog, TCustomer, TCustomerSite, TCustomerSitePropertyField, TDayNumber, TDaySchedule, TDefaultAccessCard, TDesignations, TDocs, TDocumentCreate, TDocumentManagement, TEntryPassSettings, TEventManagement, TFeedback, TFeedbackMetadata, TFeedbackUpdate, TFeedbackUpdateCategory, TFeedbackUpdateServiceProvider, TFeedbackUpdateStatus, TFeedbackUpdateToCompleted, TFile, TFiles, TFolderUpdate, TFormEntry, TGetAttendancesByUserQuery, TGetAttendancesQuery, TGuestManagement, THidAmicoEvent, THidAmicoGatewayJob, THidAmicoIdentity, THidAmicoPhysicalCard, THidAmicoReader, THidPermissionAssignment, THidPermissionCategory, THidPhysicalCardInput, THidPhysicalCardType$1 as THidPhysicalCardType, THidSipAccount, THidSitePermissions, TIncidentInformation, TIncidentReport, TIncidentTypeAndTime, TInvoice, TKeyRef, TManpowerDesignations, TManpowerDesignationsUpdate, TManpowerMonitoring, TManpowerMonitoringUpdate, TManpowerRemarks, TManpowerRemarksStatusUpdate, TManpowerRemarksUpdate, TManpowerSearchFilter, TManpowerSites, TMember, TMemberUpdateStatus, TMessagePreloved, TMiniRole, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TNotification, TNotificationPreference, TNotificationPreferenceOff, TOccurrenceBook, TOccurrenceEntry, TOccurrenceSubject, TOnlineForm, TOrg, TOvernightParkingApprovalHours, TOvernightParkingRequest, TPatrolEmail, TPatrolEmailCreatedBy, TPatrolEmailLogRef, TPatrolLog, TPatrolQuestion, TPatrolRoute, TPerson, TPlaceOfIncident, TPlates, TPlatformTerms, TPost, TPostFavorite, TPrice, TPriceType, TPromoCode, TPromoCurrencyInput, TPromoTier, TRANSPORT_DEVICE_HTTP, TRANSPORT_RELAY_PLAYER, TRANSPORT_RTSP_FRAME, TRecipientOfComplaint, TRemarks, TResident, TResidentAppModules, TRobot, TRobotMetadata, TRole, TRoleV2, TRoute, TSOABillingItem, TSOAStatus, TServiceProvider, TServiceProviderBilling, TSession, TSessionCreate, TShifts, TSignNfcPatrolLog, TSite, TSiteCamera, TSiteFacility, TSiteFacilityBooking, TSiteInfo, TSiteInformation, TSiteMetadata, TSiteUpdateBlock, TStatementOfAccount, TSubcategoryPreloved, TSubmissionForm, TSubscription, TSubscriptionPlan, TSubscriptionPlanApplication, TUnitBilling, TUnits, TUpdateFormEntry, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationEvent, TVerificationMetadata, TVerificationMetadataV2, TVerificationV2, TVisitorTransaction, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UseAccessManagementRepo, UserStatus, VERIFICATION_OPEN_STATUSES, VehicleCategory, VehicleOrder, VehicleSort, VehicleStatus, VehicleType, VerificationLinkType, VerificationStatus, VerificationSubjectType, VerificationType, VisitorSort, VisitorStatus, addressSchema, allowedFieldsSite, allowedNatures, allowedPlanApplications, attendanceSchema, attendanceSettingsSchema, building_level_namespace_collection, building_units_namespace_collection, buildings_namespace_collection, bulletin_boards_namespace_collection, cameraBaseUrl, cameraCapabilitiesFor, cameraDevices, cameraGrant, cameraHealthClaim, cameraHealthSummary, cameraManagePermissions, cameraProbeCacheKey, cameraTransports, canRevokeRefreshTokenFamily, categoriesForPermissions, categorySupportsChannel, chatPrelovedEvents, chatSchema, clampPtzSpeed, clockDriftSeconds, console_audit_namespace_collection, createManpowerRemarksDaily, customerSchema, customerSitePropertyFields, decideServiceProviderInvite, decodeHidPacsCard, deriveCameraHost, describeCameraCapabilities, designationsSchema, deviceControlEnabled, deviceHttpEnabled, deviceHttpTargets, deviceHttpTimeoutMs, deviceProbeTtlSeconds, emitNotificationCreated, encodeHidPacsCard, events_namespace_collection, facility_bookings_namespace_collection, feedbackSchema, feedbacks2_namespace_collection, feedbacks_namespace_collection, ffmpegFrameArgs, ffmpegPath, formatCapabilityTrace, formatDahuaDate, getIO, getSessionIdFromRequest, grabWithSubStreamFallback, guests_namespace_collection, hasAnyCapability, hasAnyPermission, hasOrgInvitation, hidRawUint64, incidentReport, incidentReportLog, incidents_namespace_collection, isCameraEntitled, isDuplicateVersionError, isPatrolCctvCamera, isPlatformOwner, isPromoCodeExpired, isRelayPlayerUrl, isSafeRelativePath, isSuperAdmin, isTermsCurrent, logCamera, manpowerDesignationsSchema, manpowerEvents, manpowerMonitoringSchema, manpowerRemarksSchema, manpowerSitesSchema, mapWithLimit, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, normalizeAcceptedTerms, normalizeHidCardValue, notificationCategory, notificationCategoryLabel, notificationEvents, notificationRoom, occurrence_book_namespace_collection, online_forms_namespace_collection, orgSchema, overnight_parking_requests_namespace_collection, parseCameraChannel, parseCameraHost, parseDahuaFind, parseDeviceTime, parseHidJsonLossless, parsePromoExpiry, parseSoftwareVersion, pickAuditFields, pickCustomerSiteProperties, platform_terms_namespace_collection, promoCodeRefusal, promoCodeSchema, promoCodeStatusSchema, promoCodeUpdate, promoCodeUpdateSchema, ptzEndpoint, publicCameraFields, recordConsoleAction, refuseServiceProviderInviteAction, registerCameraTransport, relayForRecorder, remarksSchema, renderPagePdf, resetCameraTransports, residentAppModuleKeys, residentFormEntry, resolutionRefusalReason, resolveCamera, resolveDeviceHttp, resolveHidPhysicalCardValue, resolveInviteActor, robotSchema, rtspUrl, schema, schemaAppSlugNotification, schemaApprovedBy, schemaApprover, schemaBidPreloved, schemaBilling, schemaBillingConfiguration, schemaBillingItem, schemaBuilding, schemaBuildingLevel, schemaBuildingUnit, schemaBuildingUpdateOptions, schemaBulletinBoard, schemaBulletinVideo, schemaCategoryPreloved, schemaChannelPreloved, schemaChatPreloved, schemaConsoleAudit, schemaCreateHidAmicoIdentity, schemaCreateNfcPatrolLog, schemaCreateNotification, schemaCustomerSite, schemaDiscoverHidAmicoReader, schemaDocumentManagement, schemaEntryPassSettings, schemaEventManagement, schemaFiles, schemaFormEntry, schemaGuestManagement, schemaHidAmicoAccessLogQuery, schemaHidAmicoAssignUserCard, schemaHidAmicoConfiguration, schemaHidAmicoEnrollUserCard, schemaHidAmicoEvent, schemaHidAmicoExecuteActions, schemaHidAmicoIdentity, schemaHidAmicoIdentityIdParams, schemaHidAmicoIdentityQuery, schemaHidAmicoIntercomCall, schemaHidAmicoLogQuery, schemaHidAmicoMonitor, schemaHidAmicoNotificationParams, schemaHidAmicoObjectOperation, schemaHidAmicoOperatingMode, schemaHidAmicoReader, schemaHidAmicoReaderIdParams, schemaHidAmicoReaderListQuery, schemaHidAmicoReaderUserQuery, schemaHidAmicoSetConfiguration, schemaHidAmicoSiteIdParams, schemaHidAmicoSync, schemaHidAmicoUserCardIdParams, schemaHidAmicoUserCardParams, schemaHidAmicoUserImageParams, schemaHidAmicoUserImageUploadQuery, schemaHidAmicoUserPin, schemaHidAmicoUserPinParams, schemaHidAmicoVisitorImageParams, schemaHidAmicoVisitorImageUploadQuery, schemaHidAmicoVisitorQr, schemaHidPermissionCandidateQuery, schemaHidPermissionScopeQuery, schemaHidSipAccountRequest, schemaIncidentReport, schemaListNotification, schemaMultipleDocumentManagement, schemaNfcPatrolLog, schemaNfcPatrolRoute, schemaNfcPatrolTag, schemaNfcPatrolTagUpdateData, schemaNotification, schemaNotificationPreference, schemaNotificationPreferenceOff, schemaOccurrenceBook, schemaOccurrenceEntry, schemaOccurrenceSubject, schemaOnlineForm, schemaOvernightParkingApprovalHours, schemaOvernightParkingRequest, schemaPatrolEmail, schemaPatrolEmailCreatedBy, schemaPatrolEmailLogRef, schemaPatrolEmailQuery, schemaPatrolLog, schemaPatrolQuestion, schemaPatrolRoute, schemaPerson, schemaPlate, schemaPlatformTerms, schemaPost, schemaPostFavorite, schemaResidentSelfSignUp, schemaSelfServiceVisitor, schemaSendPatrolEmail, schemaServiceProvider, schemaServiceProviderBilling, schemaSignNfcPatrolLog, schemaSiteCamera, schemaSiteFacility, schemaSiteFacilityBooking, schemaStatementOfAccount, schemaSubcategoryPreloved, schemaUnitBilling, schemaUpdateBidPreloved, schemaUpdateBuildingLevel, schemaUpdateBulletinBoard, schemaUpdateBulletinVideo, schemaUpdateCategoryPreloved, schemaUpdateChatPreloved, schemaUpdateDocumentManagement, schemaUpdateEntryPassSettings, schemaUpdateEventManagement, schemaUpdateFolderManagement, schemaUpdateFormEntry, schemaUpdateGuestManagement, schemaUpdateHidAmicoIdentity, schemaUpdateHidAmicoReader, schemaUpdateHidSitePermissions, schemaUpdateIncidentReport, schemaUpdateNotification, schemaUpdateNotificationPreference, schemaUpdateOccurrenceBook, schemaUpdateOccurrenceEntry, schemaUpdateOccurrenceSubject, schemaUpdateOnlineForm, schemaUpdateOptions, schemaUpdateOvernightParkingRequest, schemaUpdatePatrolLog, schemaUpdatePatrolQuestion, schemaUpdatePatrolRoute, schemaUpdatePerson, schemaUpdatePost, schemaUpdatePostFavorite, schemaUpdateServiceProviderBilling, schemaUpdateSiteBillingConfiguration, schemaUpdateSiteBillingItem, schemaUpdateSiteCamera, schemaUpdateSiteFacility, schemaUpdateSiteFacilityBooking, schemaUpdateSiteUnitBilling, schemaUpdateStatementOfAccount, schemaUpdateSubcategoryPreloved, schemaUpdateVisTrans, schemaVehicleTransaction, schemaVisitorTransaction, schemeCamera, schemeLogCamera, serviceProviderInviteLabel, sessionSchema, setIO, shiftSchema, siteSchema, site_people_namespace_collection, snapshotEndpoint, snapshotRefusalReason, stringifyHidJson, subscriptionPlanSchema, updateRemarksStatusEod, updateRemarksisAcknowledged, updateSiteSchema, useAccessManagementController, useAddressRepo, useAttendanceController, useAttendanceRepository, useAttendanceSettingsController, useAttendanceSettingsRepository, useAttendanceSettingsService, useAuthController, useAuthControllerV2, useAuthService, useAuthServiceV2, useBidPrelovedController, useBidPrelovedRepo, useBidPrelovedService, useBuildingController, useBuildingLevelController, useBuildingLevelRepo, useBuildingLevelService, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useBulletinBoardController, useBulletinBoardRepo, useBulletinBoardService, useBulletinVideoController, useBulletinVideoRepo, useBulletinVideoService, useCameraViewController, useCameraViewService, useCategoryPrelovedController, useCategoryPrelovedRepo, useChannelPrelovedController, useChannelPrelovedRepo, useChatController, useChatPrelovedController, useChatPrelovedRepo, useChatPrelovedService, useChatRepo, useConsoleAuditController, useConsoleAuditRepo, useCounterModel, useCounterRepo, useCustomerController, useCustomerRepo, useCustomerSiteController, useCustomerSiteRepo, useCustomerSiteService, useDahuaService, useDashboardController, useDashboardRepo, useDocumentManagementController, useDocumentManagementRepo, useDocumentManagementService, useEntryPassSettingsController, useEntryPassSettingsRepo, useEventManagementController, useEventManagementRepo, useEventManagementService, useFeedbackController, useFeedbackRepo, useFeedbackService, useFileController, useFileRepo, useFileService, useFormEntryController, useFormEntryRepo, useGuestManagementController, useGuestManagementRepo, useGuestManagementService, useHidAmicoController, useHidAmicoRepo, useHidAmicoService, useHrmLabsAttendanceCtrl, useHrmLabsAttendanceSrvc, useIncidentReportController, useIncidentReportRepo, useIncidentReportService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useManpowerDesignationCtrl, useManpowerDesignationRepo, useManpowerMonitoringCtrl, useManpowerMonitoringRepo, useManpowerMonitoringSrvc, useManpowerRemarkCtrl, useManpowerRemarksRepo, useManpowerSitesCtrl, useManpowerSitesRepo, useManpowerSitesSrvc, useMemberController, useMemberRepo, useMemberService, useNewDashboardController, useNewDashboardRepo, useNfcPatrolLogController, useNfcPatrolLogRepo, useNfcPatrolLogService, useNfcPatrolRouteController, useNfcPatrolRouteRepo, useNfcPatrolRouteService, useNfcPatrolSettingsController, useNfcPatrolSettingsRepository, useNfcPatrolSettingsService, useNfcPatrolTagController, useNfcPatrolTagRepo, useNfcPatrolTagService, useNotificationController, useNotificationPreferenceController, useNotificationPreferenceRepo, useNotificationPreferenceService, useNotificationRepo, useOccurrenceBookController, useOccurrenceBookRepo, useOccurrenceBookService, useOccurrenceEntryController, useOccurrenceEntryRepo, useOccurrenceEntryService, useOccurrenceSubjectController, useOccurrenceSubjectRepo, useOccurrenceSubjectService, useOnlineFormController, useOnlineFormRepo, useOrgController, useOrgControllerV2, useOrgRepo, useOvernightParkingController, useOvernightParkingRepo, useOvernightParkingRequestController, useOvernightParkingRequestRepo, useOvernightParkingRequestService, usePatrolEmailController, usePatrolEmailRepo, usePatrolEmailService, usePatrolLogController, usePatrolLogRepo, usePatrolLogService, usePatrolQuestionController, usePatrolQuestionRepo, usePatrolRouteController, usePatrolRouteRepo, usePersonController, usePersonRepo, usePlatformTermsController, usePlatformTermsRepo, usePlatformTermsService, usePostFavoriteController, usePostFavoriteRepo, usePostFavoriteService, usePostPrelovedController, usePostPrelovedRepo, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRedDotPaymentController, useRedDotPaymentRepo, useRedDotPaymentSvc, useRobotController, useRobotRepo, useRobotService, useRoleController, useRoleControllerV2, useRoleRepo, useRoleRepoV2, useRoleServiceV2, useServiceProviderBillingController, useServiceProviderBillingRepo, useServiceProviderBillingService, useServiceProviderController, useServiceProviderInviteController, useServiceProviderInviteService, useServiceProviderRepo, useSessionRepo, useSiteBillingConfigurationController, useSiteBillingConfigurationRepo, useSiteBillingItemController, useSiteBillingItemRepo, useSiteCameraController, useSiteCameraRepo, useSiteCameraService, useSiteController, useSiteFacilityBookingController, useSiteFacilityBookingRepo, useSiteFacilityBookingService, useSiteFacilityController, useSiteFacilityRepo, useSiteFacilityService, useSiteRepo, useSiteService, useSiteUnitBillingController, useSiteUnitBillingRepo, useSiteUnitBillingService, useStatementOfAccountController, useStatementOfAccountRepo, useSubcategoryPrelovedController, useSubcategoryPrelovedRepo, useSubscriptionController, useSubscriptionPlanController, useSubscriptionPlanRepo, useSubscriptionRepo, useSubscriptionService, useUserController, useUserControllerV2, useUserRepo, useUserRepoV2, useUserService, useUserServiceV2, useVehicleController, useVehicleRepo, useVehicleService, useVerificationController, useVerificationControllerV2, useVerificationRepo, useVerificationRepoV2, useVerificationService, useVerificationServiceV2, useVisitorTransactionController, useVisitorTransactionRepo, useVisitorTransactionService, useWorkOrderController, useWorkOrderRepo, useWorkOrderService, userSchema, vehicleSchema, vehicles_namespace_collection, visitorPersonRepo, visitorPersonService, visitorType, visitors_namespace_collection, wallConfig, workOrderSchema, work_orders2_namespace_collection, work_orders_namespace_collection };
12617
+ export { ANPRMode, APP_BASE_URLS, AUDIT_VALUE_MAX_LENGTH, AccessTypeProps, AppKey, AppServiceType, AssignCardConfig, BidStatus, BidType, BuildingLevelStatus, BuildingStatus, BulkCardUpdate, BulletinOrder, BulletinRecipient, BulletinSort, BulletinStatus, BulletinVideoOrder, BulletinVideoSort, CAMERA_ANPR_PERMISSIONS, CAMERA_CAPABILITIES, CAMERA_CAPABILITY_REASONS, CAMERA_MANAGE_ANY_PERMISSIONS, CAMERA_NOT_PATROL_OR_CCTV, CAMERA_NO_SUB_STREAM_TTL_SECONDS, CAMERA_PTZ_PERMISSIONS, CAMERA_REQUEST_TIMEOUT_MS, CAMERA_RTSP_TIMEOUT_MS, CAMERA_SETUP_PERMISSIONS, CAMERA_SNAPSHOT_CACHE_SECONDS, CAMERA_SNAPSHOT_MAX_BYTES, CAMERA_TEST_MIN_INTERVAL_SECONDS, CAMERA_TEST_ROUND_LIMIT, CAMERA_TEST_ROUND_SECONDS, CAMERA_TYPE_ANPR, CAMERA_TYPE_IP, CAMERA_VIEW_PERMISSIONS, CLIENT_ACTIONS, CLOCK_DRIFT_WARN_SECONDS, CONSOLE_AUDIT_LABELS, CURRENT_TIME_ENDPOINT, Camera, CameraAddressInput, CameraCapability, CameraCapabilityContext, CameraCapabilityDescriptor, CameraCapabilityEntry, CameraCapabilityReason, CameraCapabilityState, CameraCapabilityTrace, CameraDevice, CameraFrame, CameraMembership, CameraStream, CameraTestStatus, CameraTransport, CameraType, ConsoleAuditAction, ConsoleAuditTarget, DEVICE_STATUS, DOBStatus, DUPLICATE_TERMS_VERSION_MESSAGE, DayOfWeek, DeviceHttpTarget, DeviceProbeResult, DynamicFormFields, EAccessCardTypes, EAccessCardUserTypes, EmailSender, EntryOrder, EntrySort, EventOrder, EventSort, EventStatus, EventType, FacilitySort, FacilityStatus, FormEntryStatus, GuestSort, GuestStatus, HID_CARD_VALUE_FACTOR, HID_PERMISSION_CATEGORIES, HID_UINT32_MAX, HID_UINT64_MAX, HidRawUint64, IAccessCard, IAccessCardTransaction, InviteActor, LIVE_ROLE, MAX_CAMERA_CHANNEL, MAccessCard, MAccessCardTransaction, MAddress, MAttendance, MAttendanceSettings, MBidPreloved, MBillingConfiguration, MBillingItem, MBuilding, MBuildingLevel, MBuildingUnit, MBulletinBoard, MBulletinVideo, MCategoryPreloved, MChannelPreloved, MChat, MChatPreloved, MConsoleAudit, MCustomer, MCustomerSite, MDocumentManagement, MEMBER_TYPES, MEntryPassSettings, MEventManagement, MFeedback, MFile, MFormEntry, MGuestManagement, MHidAmicoEvent, MHidAmicoIdentity, MHidAmicoReader, MHidSipAccount, MHidSitePermissions, MIncidentReport, MManpowerDesignations, MManpowerMonitoring, MManpowerRemarks, MManpowerSites, MMember, MNfcPatrolLog, MNfcPatrolRoute, MNfcPatrolSettings, MNfcPatrolSettingsUpdate, MNfcPatrolTag, MNotification, MNotificationPreference, MOccurrenceBook, MOccurrenceEntry, MOccurrenceSubject, MOnlineForm, MOrg, MOvernightParkingApprovalHours, MOvernightParkingRequest, MPatrolEmail, MPatrolLog, MPatrolQuestion, MPatrolRoute, MPerson, MPlatformTerms, MPost, MPostFavorite, MPromoCode, MRobot, MRole, MRoleV2, MServiceProvider, MServiceProviderBilling, MSession, MSite, MSiteCamera, MSiteFacility, MSiteFacilityBooking, MStatementOfAccount, MSubcategoryPreloved, MSubscription, MSubscriptionPlan, MUnitBilling, MUser, MVehicle, MVehicleTransaction, MVerification, MVerificationV2, MVisitorTransaction, MWorkOrder, NOTIFICATION_CATEGORIES, NOTIFICATION_CHANNELS, NOTIFICATION_CHANNEL_LABELS, NOTIFICATION_NAMESPACE, NotificationAppSlug, NotificationCategory, NotificationChannel, NotificationModule, NotificationPreferenceView, NotificationService, ORG_MARKETPLACE_VENDOR_FIELD, OrgNature, OvernightParkingRequestSort, OvernightParkingRequestStatus, PATROL_CCTV_CAMERA_FILTER, PATROL_EMAIL_MAX_LOGS, PATROL_EMAIL_MAX_PER_HOUR, PATROL_EMAIL_MAX_RECIPIENTS, PERSON_TYPES, PLATFORM_STAFF_MEMBER_TYPE, PLATFORM_STAFF_ROLE_TYPE, PROPERTY_MANAGEMENT_MEMBER_TYPES, PStatus, PTZ_ALLOWED_ACTIONS, PTZ_ALLOWED_CODES, Period, PersonStatus, PersonType, PersonTypes, PlatformTermsStatus, PostOrder, PostSort, PostStatus, QrTagProps, REALTIME_MAX_FANOUT, ResidentAppModuleKey, SELF_SIGNUP_PLATFORM, SELF_SIGNUP_STATUS, SELF_SIGNUP_TYPES, SERVICE_PROVIDER_INVITE_LABELS, SERVICE_PROVIDER_INVITE_TRANSITIONS, SERVICE_PROVIDER_SIGN_IN_SUBJECT, SERVICE_PROVIDER_SIGN_IN_TYPE, SERVICE_PROVIDER_SIGN_UP_SUBJECT, SERVICE_PROVIDER_SIGN_UP_TYPE, SOFTWARE_VERSION_ENDPOINT, ServiceProviderInviteAction, ServiceProviderInviteDecision, ServiceProviderInviteFacts, SiteAddress, SiteCategories, SiteStatus, SortFields, SortOrder, Status, SubjectOrder, SubjectSort, SubscriptionBillingMode, SubscriptionType, TAccessMngmntSettings, TActionStatus, TAddress, TAffectedEntities, TAffectedInjured, TAppServiceType, TApprovedBy, TApprover, TAttendance, TAttendanceCheckIn, TAttendanceCheckOut, TAttendanceCheckTime, TAttendanceLocation, TAttendanceSettings, TAttendanceSettingsGetBySite, TAuthorities, TAuthoritiesCalled, TBidPreloved, TBilling, TBillingConfiguration, TBillingItem, TBuilding, TBuildingLevel, TBuildingUnit, TBulletinBoard, TBulletinVideo, TCamera, TCameraHealthClaim, TCategoryPreloved, TChannelPreloved, TChat, TChatPreloved, TCheckPoint$1 as TCheckPoint, TComplaintInfo, TComplaintReceivedTo, TConsoleAudit, TConsoleAuditQuery, TCounter, TCreateNfcPatrolLog, TCustomer, TCustomerSite, TCustomerSitePropertyField, TDayNumber, TDaySchedule, TDefaultAccessCard, TDesignations, TDocs, TDocumentCreate, TDocumentManagement, TEntryPassSettings, TEventManagement, TFeedback, TFeedbackMetadata, TFeedbackUpdate, TFeedbackUpdateCategory, TFeedbackUpdateServiceProvider, TFeedbackUpdateStatus, TFeedbackUpdateToCompleted, TFile, TFiles, TFolderUpdate, TFormEntry, TGetAttendancesByUserQuery, TGetAttendancesQuery, TGuestManagement, THidAmicoEvent, THidAmicoGatewayJob, THidAmicoIdentity, THidAmicoPhysicalCard, THidAmicoReader, THidPermissionAssignment, THidPermissionCategory, THidPhysicalCardInput, THidPhysicalCardType$1 as THidPhysicalCardType, THidSipAccount, THidSitePermissions, TIncidentInformation, TIncidentReport, TIncidentTypeAndTime, TInvoice, TKeyRef, TManpowerDesignations, TManpowerDesignationsUpdate, TManpowerMonitoring, TManpowerMonitoringUpdate, TManpowerRemarks, TManpowerRemarksStatusUpdate, TManpowerRemarksUpdate, TManpowerSearchFilter, TManpowerSites, TMember, TMemberUpdateStatus, TMessagePreloved, TMiniRole, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TNotification, TNotificationPreference, TNotificationPreferenceOff, TOccurrenceBook, TOccurrenceEntry, TOccurrenceSubject, TOnlineForm, TOrg, TOvernightParkingApprovalHours, TOvernightParkingRequest, TPatrolEmail, TPatrolEmailCreatedBy, TPatrolEmailLogRef, TPatrolLog, TPatrolQuestion, TPatrolRoute, TPerson, TPlaceOfIncident, TPlates, TPlatformTerms, TPost, TPostFavorite, TPrice, TPriceType, TPromoCode, TPromoCurrencyInput, TPromoTier, TRANSPORT_DEVICE_HTTP, TRANSPORT_RELAY_PLAYER, TRANSPORT_RTSP_FRAME, TRecipientOfComplaint, TRemarks, TResident, TResidentAppModules, TRobot, TRobotMetadata, TRole, TRoleV2, TRoute, TSOABillingItem, TSOAStatus, TServiceProvider, TServiceProviderBilling, TSession, TSessionCreate, TShifts, TSignNfcPatrolLog, TSite, TSiteCamera, TSiteFacility, TSiteFacilityBooking, TSiteInfo, TSiteInformation, TSiteMetadata, TSiteUpdateBlock, TStatementOfAccount, TSubcategoryPreloved, TSubmissionForm, TSubscription, TSubscriptionPlan, TSubscriptionPlanApplication, TUnitBilling, TUnits, TUpdateFormEntry, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationEvent, TVerificationMetadata, TVerificationMetadataV2, TVerificationV2, TVisitorTransaction, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UseAccessManagementRepo, UserStatus, VERIFICATION_OPEN_STATUSES, VehicleCategory, VehicleOrder, VehicleSort, VehicleStatus, VehicleType, VerificationLinkType, VerificationStatus, VerificationSubjectType, VerificationType, VisitorSort, VisitorStatus, addressSchema, allowedFieldsSite, allowedNatures, allowedPlanApplications, attendanceSchema, attendanceSettingsSchema, building_level_namespace_collection, building_units_namespace_collection, buildings_namespace_collection, bulletin_boards_namespace_collection, cameraBaseUrl, cameraCapabilitiesFor, cameraDevices, cameraGrant, cameraHealthClaim, cameraHealthSummary, cameraManagePermissions, cameraProbeCacheKey, cameraTransports, canRevokeRefreshTokenFamily, categoriesForPermissions, categorySupportsChannel, chatPrelovedEvents, chatSchema, clampPtzSpeed, clockDriftSeconds, console_audit_namespace_collection, createManpowerRemarksDaily, customerSchema, customerSitePropertyFields, decideServiceProviderInvite, decodeHidPacsCard, deriveCameraHost, describeCameraCapabilities, designationsSchema, deviceControlEnabled, deviceHttpEnabled, deviceHttpTargets, deviceHttpTimeoutMs, deviceProbeTtlSeconds, emitNotificationCreated, encodeHidPacsCard, events_namespace_collection, facility_bookings_namespace_collection, feedbackSchema, feedbacks2_namespace_collection, feedbacks_namespace_collection, ffmpegFrameArgs, ffmpegPath, formatCapabilityTrace, formatDahuaDate, getIO, getSessionIdFromRequest, grabWithSubStreamFallback, guests_namespace_collection, hasAnyCapability, hasAnyPermission, hasOrgInvitation, hidRawUint64, incidentReport, incidentReportLog, incidents_namespace_collection, isCameraEntitled, isDuplicateVersionError, isPatrolCctvCamera, isPlatformOwner, isPromoCodeExpired, isRelayPlayerUrl, isSafeRelativePath, isSuperAdmin, isTermsCurrent, logCamera, manpowerDesignationsSchema, manpowerEvents, manpowerMonitoringSchema, manpowerRemarksSchema, manpowerSitesSchema, mapWithLimit, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, normalizeAcceptedTerms, normalizeHidCardValue, notificationCategory, notificationCategoryLabel, notificationEvents, notificationRoom, occurrence_book_namespace_collection, online_forms_namespace_collection, orgSchema, overnight_parking_requests_namespace_collection, parseCameraChannel, parseCameraHost, parseDahuaFind, parseDeviceTime, parseHidJsonLossless, parsePromoExpiry, parseSoftwareVersion, pickAuditFields, pickCustomerSiteProperties, platform_terms_namespace_collection, promoCodeRefusal, promoCodeSchema, promoCodeStatusSchema, promoCodeUpdate, promoCodeUpdateSchema, ptzEndpoint, publicCameraFields, recordConsoleAction, refuseServiceProviderInviteAction, registerCameraTransport, relayForRecorder, remarksSchema, renderPagePdf, resetCameraTransports, residentAppModuleKeys, residentFormEntry, resolutionRefusalReason, resolveCamera, resolveDeviceHttp, resolveHidPhysicalCardValue, resolveInviteActor, robotSchema, rtspUrl, schema, schemaAppSlugNotification, schemaApprovedBy, schemaApprover, schemaBidPreloved, schemaBilling, schemaBillingConfiguration, schemaBillingItem, schemaBuilding, schemaBuildingLevel, schemaBuildingUnit, schemaBuildingUpdateOptions, schemaBulletinBoard, schemaBulletinVideo, schemaCategoryPreloved, schemaChannelPreloved, schemaChatPreloved, schemaConsoleAudit, schemaCreateHidAmicoIdentity, schemaCreateNfcPatrolLog, schemaCreateNotification, schemaCustomerSite, schemaDiscoverHidAmicoReader, schemaDocumentManagement, schemaEntryPassSettings, schemaEventManagement, schemaFiles, schemaFormEntry, schemaGuestManagement, schemaHidAmicoAccessLogQuery, schemaHidAmicoAssignUserCard, schemaHidAmicoConfiguration, schemaHidAmicoEnrollUserCard, schemaHidAmicoEvent, schemaHidAmicoExecuteActions, schemaHidAmicoIdentity, schemaHidAmicoIdentityIdParams, schemaHidAmicoIdentityQuery, schemaHidAmicoIntercomCall, schemaHidAmicoLogQuery, schemaHidAmicoMonitor, schemaHidAmicoNotificationParams, schemaHidAmicoObjectOperation, schemaHidAmicoOperatingMode, schemaHidAmicoReader, schemaHidAmicoReaderIdParams, schemaHidAmicoReaderListQuery, schemaHidAmicoReaderUserQuery, schemaHidAmicoSetConfiguration, schemaHidAmicoSiteIdParams, schemaHidAmicoSync, schemaHidAmicoUserCardIdParams, schemaHidAmicoUserCardParams, schemaHidAmicoUserImageParams, schemaHidAmicoUserImageUploadQuery, schemaHidAmicoUserPin, schemaHidAmicoUserPinParams, schemaHidAmicoVisitorImageParams, schemaHidAmicoVisitorImageUploadQuery, schemaHidAmicoVisitorQr, schemaHidPermissionCandidateQuery, schemaHidPermissionScopeQuery, schemaHidSipAccountRequest, schemaIncidentReport, schemaListNotification, schemaMultipleDocumentManagement, schemaNfcPatrolLog, schemaNfcPatrolRoute, schemaNfcPatrolTag, schemaNfcPatrolTagUpdateData, schemaNotification, schemaNotificationPreference, schemaNotificationPreferenceOff, schemaOccurrenceBook, schemaOccurrenceEntry, schemaOccurrenceSubject, schemaOnlineForm, schemaOvernightParkingApprovalHours, schemaOvernightParkingRequest, schemaPatrolEmail, schemaPatrolEmailCreatedBy, schemaPatrolEmailLogRef, schemaPatrolEmailQuery, schemaPatrolLog, schemaPatrolQuestion, schemaPatrolRoute, schemaPerson, schemaPlate, schemaPlatformTerms, schemaPost, schemaPostFavorite, schemaResendPatrolEmail, schemaResidentSelfSignUp, schemaSelfServiceVisitor, schemaSendPatrolEmail, schemaServiceProvider, schemaServiceProviderBilling, schemaSignNfcPatrolLog, schemaSiteCamera, schemaSiteFacility, schemaSiteFacilityBooking, schemaStatementOfAccount, schemaSubcategoryPreloved, schemaUnitBilling, schemaUpdateBidPreloved, schemaUpdateBuildingLevel, schemaUpdateBulletinBoard, schemaUpdateBulletinVideo, schemaUpdateCategoryPreloved, schemaUpdateChatPreloved, schemaUpdateDocumentManagement, schemaUpdateEntryPassSettings, schemaUpdateEventManagement, schemaUpdateFolderManagement, schemaUpdateFormEntry, schemaUpdateGuestManagement, schemaUpdateHidAmicoIdentity, schemaUpdateHidAmicoReader, schemaUpdateHidSitePermissions, schemaUpdateIncidentReport, schemaUpdateNotification, schemaUpdateNotificationPreference, schemaUpdateOccurrenceBook, schemaUpdateOccurrenceEntry, schemaUpdateOccurrenceSubject, schemaUpdateOnlineForm, schemaUpdateOptions, schemaUpdateOvernightParkingRequest, schemaUpdatePatrolLog, schemaUpdatePatrolQuestion, schemaUpdatePatrolRoute, schemaUpdatePerson, schemaUpdatePost, schemaUpdatePostFavorite, schemaUpdateServiceProviderBilling, schemaUpdateSiteBillingConfiguration, schemaUpdateSiteBillingItem, schemaUpdateSiteCamera, schemaUpdateSiteFacility, schemaUpdateSiteFacilityBooking, schemaUpdateSiteUnitBilling, schemaUpdateStatementOfAccount, schemaUpdateSubcategoryPreloved, schemaUpdateVisTrans, schemaVehicleTransaction, schemaVisitorTransaction, schemeCamera, schemeLogCamera, serviceProviderInviteLabel, sessionSchema, setIO, shiftSchema, siteSchema, site_people_namespace_collection, snapshotEndpoint, snapshotRefusalReason, stringifyHidJson, subscriptionPlanSchema, updateRemarksStatusEod, updateRemarksisAcknowledged, updateSiteSchema, useAccessManagementController, useAddressRepo, useAttendanceController, useAttendanceRepository, useAttendanceSettingsController, useAttendanceSettingsRepository, useAttendanceSettingsService, useAuthController, useAuthControllerV2, useAuthService, useAuthServiceV2, useBidPrelovedController, useBidPrelovedRepo, useBidPrelovedService, useBuildingController, useBuildingLevelController, useBuildingLevelRepo, useBuildingLevelService, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useBulletinBoardController, useBulletinBoardRepo, useBulletinBoardService, useBulletinVideoController, useBulletinVideoRepo, useBulletinVideoService, useCameraViewController, useCameraViewService, useCategoryPrelovedController, useCategoryPrelovedRepo, useChannelPrelovedController, useChannelPrelovedRepo, useChatController, useChatPrelovedController, useChatPrelovedRepo, useChatPrelovedService, useChatRepo, useConsoleAuditController, useConsoleAuditRepo, useCounterModel, useCounterRepo, useCustomerController, useCustomerRepo, useCustomerSiteController, useCustomerSiteRepo, useCustomerSiteService, useDahuaService, useDashboardController, useDashboardRepo, useDocumentManagementController, useDocumentManagementRepo, useDocumentManagementService, useEntryPassSettingsController, useEntryPassSettingsRepo, useEventManagementController, useEventManagementRepo, useEventManagementService, useFeedbackController, useFeedbackRepo, useFeedbackService, useFileController, useFileRepo, useFileService, useFormEntryController, useFormEntryRepo, useGuestManagementController, useGuestManagementRepo, useGuestManagementService, useHidAmicoController, useHidAmicoRepo, useHidAmicoService, useHrmLabsAttendanceCtrl, useHrmLabsAttendanceSrvc, useIncidentReportController, useIncidentReportRepo, useIncidentReportService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useManpowerDesignationCtrl, useManpowerDesignationRepo, useManpowerMonitoringCtrl, useManpowerMonitoringRepo, useManpowerMonitoringSrvc, useManpowerRemarkCtrl, useManpowerRemarksRepo, useManpowerSitesCtrl, useManpowerSitesRepo, useManpowerSitesSrvc, useMemberController, useMemberRepo, useMemberService, useNewDashboardController, useNewDashboardRepo, useNfcPatrolLogController, useNfcPatrolLogRepo, useNfcPatrolLogService, useNfcPatrolRouteController, useNfcPatrolRouteRepo, useNfcPatrolRouteService, useNfcPatrolSettingsController, useNfcPatrolSettingsRepository, useNfcPatrolSettingsService, useNfcPatrolTagController, useNfcPatrolTagRepo, useNfcPatrolTagService, useNotificationController, useNotificationPreferenceController, useNotificationPreferenceRepo, useNotificationPreferenceService, useNotificationRepo, useOccurrenceBookController, useOccurrenceBookRepo, useOccurrenceBookService, useOccurrenceEntryController, useOccurrenceEntryRepo, useOccurrenceEntryService, useOccurrenceSubjectController, useOccurrenceSubjectRepo, useOccurrenceSubjectService, useOnlineFormController, useOnlineFormRepo, useOrgController, useOrgControllerV2, useOrgRepo, useOvernightParkingController, useOvernightParkingRepo, useOvernightParkingRequestController, useOvernightParkingRequestRepo, useOvernightParkingRequestService, usePatrolEmailController, usePatrolEmailRepo, usePatrolEmailService, usePatrolLogController, usePatrolLogRepo, usePatrolLogService, usePatrolQuestionController, usePatrolQuestionRepo, usePatrolRouteController, usePatrolRouteRepo, usePersonController, usePersonRepo, usePlatformTermsController, usePlatformTermsRepo, usePlatformTermsService, usePostFavoriteController, usePostFavoriteRepo, usePostFavoriteService, usePostPrelovedController, usePostPrelovedRepo, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRedDotPaymentController, useRedDotPaymentRepo, useRedDotPaymentSvc, useRobotController, useRobotRepo, useRobotService, useRoleController, useRoleControllerV2, useRoleRepo, useRoleRepoV2, useRoleServiceV2, useServiceProviderBillingController, useServiceProviderBillingRepo, useServiceProviderBillingService, useServiceProviderController, useServiceProviderInviteController, useServiceProviderInviteService, useServiceProviderRepo, useSessionRepo, useSiteBillingConfigurationController, useSiteBillingConfigurationRepo, useSiteBillingItemController, useSiteBillingItemRepo, useSiteCameraController, useSiteCameraRepo, useSiteCameraService, useSiteController, useSiteFacilityBookingController, useSiteFacilityBookingRepo, useSiteFacilityBookingService, useSiteFacilityController, useSiteFacilityRepo, useSiteFacilityService, useSiteRepo, useSiteService, useSiteUnitBillingController, useSiteUnitBillingRepo, useSiteUnitBillingService, useStatementOfAccountController, useStatementOfAccountRepo, useSubcategoryPrelovedController, useSubcategoryPrelovedRepo, useSubscriptionController, useSubscriptionPlanController, useSubscriptionPlanRepo, useSubscriptionRepo, useSubscriptionService, useUserController, useUserControllerV2, useUserRepo, useUserRepoV2, useUserService, useUserServiceV2, useVehicleController, useVehicleRepo, useVehicleService, useVerificationController, useVerificationControllerV2, useVerificationRepo, useVerificationRepoV2, useVerificationService, useVerificationServiceV2, useVisitorTransactionController, useVisitorTransactionRepo, useVisitorTransactionService, useWorkOrderController, useWorkOrderRepo, useWorkOrderService, userSchema, vehicleSchema, vehicles_namespace_collection, visitorPersonRepo, visitorPersonService, visitorType, visitors_namespace_collection, wallConfig, workOrderSchema, work_orders2_namespace_collection, work_orders_namespace_collection };
package/dist/index.js CHANGED
@@ -6315,6 +6315,7 @@ __export(src_exports, {
6315
6315
  schemaPlatformTerms: () => schemaPlatformTerms,
6316
6316
  schemaPost: () => schemaPost,
6317
6317
  schemaPostFavorite: () => schemaPostFavorite,
6318
+ schemaResendPatrolEmail: () => schemaResendPatrolEmail,
6318
6319
  schemaResidentSelfSignUp: () => schemaResidentSelfSignUp,
6319
6320
  schemaSelfServiceVisitor: () => schemaSelfServiceVisitor,
6320
6321
  schemaSendPatrolEmail: () => schemaSendPatrolEmail,
@@ -19389,10 +19390,28 @@ var schemaUpdateSiteCamera = import_joi20.default.object({
19389
19390
  then: import_joi20.default.required(),
19390
19391
  otherwise: import_joi20.default.optional().allow(null, "")
19391
19392
  }),
19392
- category: import_joi20.default.string().allow("standard", "resident", "visitor").required(),
19393
+ /**
19394
+ * `.valid()`, NOT `.allow()` - the same defect already fixed on `type` in
19395
+ * `schemaSiteCamera` below, on the two
19396
+ * remaining fields where the stored value is safe to constrain.
19397
+ *
19398
+ * `.allow()` whitelists ADDITIONAL values on a validator that already accepts
19399
+ * every string, so these three lines have never rejected anything. Measured
19400
+ * on the staging `site.cameras` collection (22 rows, 2026-08-26): `category`
19401
+ * is only ever standard|resident|visitor and `status` only ever
19402
+ * active|inactive, with no nulls, blanks or missing fields - and the only two
19403
+ * write callers in the estate (layer-common `CameraForm.vue` and
19404
+ * `iservice365-mobile-app-security`) offer exactly those values.
19405
+ *
19406
+ * `direction` is deliberately left on `.allow()`: `CameraForm.vue` also
19407
+ * offers "visitors" and "residents", which are outside the intended
19408
+ * entry|exit|both|none set, so constraining it would 400 two of the form's
19409
+ * own five options. That mismatch needs a product decision, not a schema edit.
19410
+ */
19411
+ category: import_joi20.default.string().valid("standard", "resident", "visitor").required(),
19393
19412
  guardPost: import_joi20.default.number().integer().optional(),
19394
19413
  direction: import_joi20.default.string().optional().allow("entry", "exit", "both", "none"),
19395
- status: import_joi20.default.string().optional().allow("active", "inactive", "deleted"),
19414
+ status: import_joi20.default.string().optional().valid("active", "inactive", "deleted"),
19396
19415
  name: import_joi20.default.string().optional().allow(null, "")
19397
19416
  });
19398
19417
  var schemaSiteCamera = import_joi20.default.object({
@@ -19425,10 +19444,11 @@ var schemaSiteCamera = import_joi20.default.object({
19425
19444
  * today. Every client in the estate already sends the lower-case pair.
19426
19445
  */
19427
19446
  type: import_joi20.default.string().trim().lowercase().valid("ip", "anpr").required(),
19428
- category: import_joi20.default.string().allow("standard", "resident", "visitor").required(),
19447
+ /** See the note on `schemaUpdateSiteCamera` for why `direction` stays as it is. */
19448
+ category: import_joi20.default.string().valid("standard", "resident", "visitor").required(),
19429
19449
  direction: import_joi20.default.string().required().allow("entry", "exit", "both", "none"),
19430
19450
  guardPost: import_joi20.default.number().integer().optional(),
19431
- status: import_joi20.default.string().optional().allow("active", "inactive", "deleted"),
19451
+ status: import_joi20.default.string().optional().valid("active", "inactive", "deleted"),
19432
19452
  name: import_joi20.default.string().optional().allow(null, ""),
19433
19453
  createdAt: import_joi20.default.date().optional(),
19434
19454
  updatedAt: import_joi20.default.date().optional(),
@@ -50289,7 +50309,7 @@ function useVisitorTransactionService() {
50289
50309
  unitName: unit?.name,
50290
50310
  org: inviter?.org?.toString(),
50291
50311
  site: inviter?.site.toString(),
50292
- status: value?.type === "contractor" ? isAutoApprovedInvitation ? "approved" /* APPROVED */ : "Pending Approval" /* PENDING_APPROVAL */ : "Pending Approval" /* PENDING_APPROVAL */,
50312
+ status: value?.type === "contractor" ? isAutoApprovedInvitation ? "approved" /* APPROVED */ : "pending" /* PENDING */ : "pending" /* PENDING */,
50293
50313
  inviterId: userId
50294
50314
  };
50295
50315
  const leadId = new import_mongodb85.ObjectId();
@@ -50314,7 +50334,7 @@ function useVisitorTransactionService() {
50314
50334
  insertedIds.push(memberId);
50315
50335
  }
50316
50336
  }
50317
- const result = await _add({ ...payload, _id: leadId }, session);
50337
+ const result = await _add({ ...payload, _id: leadId.toString() }, session);
50318
50338
  insertedIds.push(result);
50319
50339
  await session?.commitTransaction();
50320
50340
  return insertedIds;
@@ -54716,8 +54736,12 @@ function useVisitorTransactionController() {
54716
54736
  numberOfPassengers: import_joi65.default.number().integer().optional().allow(null, ""),
54717
54737
  purpose: import_joi65.default.string().optional().allow(null, ""),
54718
54738
  inviterUserId: import_joi65.default.string().hex().length(24).required(),
54719
- type: import_joi65.default.string().valid("contractor", "guest").optional().allow(null, ""),
54720
- contractorType: import_joi65.default.string().valid("home-contractor", "house-mover").optional().allow(null, ""),
54739
+ type: import_joi65.default.string().valid("contractor", "guest").required(),
54740
+ contractorType: import_joi65.default.string().valid("home-contractor", "house-mover").when("type", {
54741
+ is: "contractor",
54742
+ then: import_joi65.default.required(),
54743
+ otherwise: import_joi65.default.optional().allow(null, "")
54744
+ }),
54721
54745
  members: import_joi65.default.array().items(
54722
54746
  import_joi65.default.object({
54723
54747
  name: import_joi65.default.string().optional().allow(null, ""),
@@ -57624,17 +57648,46 @@ function usePatrolLogRepo() {
57624
57648
  }
57625
57649
  },
57626
57650
  { $unwind: { path: "$routeData", preserveNullAndEmptyArrays: true } },
57651
+ {
57652
+ // The most recent email that included this log, for the sent/failed
57653
+ // indicator. Matches `logs.log` on the snapshot stored with the email,
57654
+ // so it still resolves after the log itself is soft-deleted, and is
57655
+ // served by the `{ "logs.log": 1 }` index on patrol.emails.
57656
+ $lookup: {
57657
+ from: "patrol.emails",
57658
+ localField: "_id",
57659
+ foreignField: "logs.log",
57660
+ pipeline: [
57661
+ // A deleted email record is not an attempt anyone should see.
57662
+ { $match: { status: { $ne: "deleted" } } },
57663
+ { $sort: { createdAt: -1 } },
57664
+ { $limit: 1 },
57665
+ { $project: { _id: 1, status: 1, createdAt: 1 } }
57666
+ ],
57667
+ as: "lastEmailData"
57668
+ }
57669
+ },
57670
+ {
57671
+ $unwind: { path: "$lastEmailData", preserveNullAndEmptyArrays: true }
57672
+ },
57627
57673
  {
57628
57674
  // Flattened to match the `approvedByName` shape used elsewhere.
57629
57675
  // `repeat` is read live rather than snapshotted on the log: it is the
57630
57676
  // route's current configuration, so editing a route must change what
57631
57677
  // the list shows.
57678
+ //
57679
+ // `lastEmailStatus` is three-state on purpose — "sent", "failed", or
57680
+ // null when the log has never been emailed. A boolean cannot separate
57681
+ // "the last send failed" from "there was no send", and those need
57682
+ // different treatment on screen.
57632
57683
  $addFields: {
57633
57684
  createdByName: "$createdByData.name",
57634
- repeat: "$routeData.repeat"
57685
+ repeat: "$routeData.repeat",
57686
+ lastEmailStatus: { $ifNull: ["$lastEmailData.status", null] },
57687
+ lastEmailAt: { $ifNull: ["$lastEmailData.createdAt", null] }
57635
57688
  }
57636
57689
  },
57637
- { $project: { createdByData: 0, routeData: 0 } }
57690
+ { $project: { createdByData: 0, routeData: 0, lastEmailData: 0 } }
57638
57691
  ];
57639
57692
  const countPipeline = [
57640
57693
  {
@@ -58057,6 +58110,7 @@ var schemaPatrolEmail = import_joi77.default.object({
58057
58110
  }).optional().allow(null),
58058
58111
  sourceUrl: import_joi77.default.string().optional().allow("", null),
58059
58112
  status: import_joi77.default.string().valid("sent", "failed", "deleted").optional(),
58113
+ sourceEmail: import_joi77.default.string().hex().length(24).optional().allow(null, ""),
58060
58114
  createdBy: schemaPatrolEmailCreatedBy.required(),
58061
58115
  createdAt: import_joi77.default.string().optional().allow("", null),
58062
58116
  updatedAt: import_joi77.default.string().optional().allow("", null),
@@ -58075,6 +58129,12 @@ var schemaSendPatrolEmail = import_joi77.default.object({
58075
58129
  name: import_joi77.default.string().trim().max(200).required()
58076
58130
  }).required()
58077
58131
  });
58132
+ var schemaResendPatrolEmail = import_joi77.default.object({
58133
+ createdBy: import_joi77.default.object({
58134
+ _id: import_joi77.default.string().hex().length(24).required(),
58135
+ name: import_joi77.default.string().trim().max(200).required()
58136
+ }).required()
58137
+ });
58078
58138
  var schemaPatrolEmailQuery = import_joi77.default.object({
58079
58139
  site: import_joi77.default.string().hex().length(24).required(),
58080
58140
  // Optional: present for one patrol log's email history, absent for the
@@ -58109,6 +58169,9 @@ function MPatrolEmail(value) {
58109
58169
  if (value.createdBy && typeof value.createdBy._id === "string") {
58110
58170
  value.createdBy._id = toObjectId15(value.createdBy._id, "created by id");
58111
58171
  }
58172
+ if (value.sourceEmail && typeof value.sourceEmail === "string") {
58173
+ value.sourceEmail = toObjectId15(value.sourceEmail, "source email id");
58174
+ }
58112
58175
  if (value.pdf?.file && typeof value.pdf.file === "string") {
58113
58176
  value.pdf.file = toObjectId15(value.pdf.file, "pdf file id");
58114
58177
  }
@@ -58143,6 +58206,7 @@ function MPatrolEmail(value) {
58143
58206
  pdf: value.pdf ?? null,
58144
58207
  sourceUrl: value.sourceUrl ?? "",
58145
58208
  status: value.status ?? "sent",
58209
+ sourceEmail: value.sourceEmail ?? null,
58146
58210
  createdBy: {
58147
58211
  _id: value.createdBy._id,
58148
58212
  name: value.createdBy.name ?? ""
@@ -58181,7 +58245,9 @@ function usePatrolEmailRepo() {
58181
58245
  // "What have I sent?", and the rate-limit count.
58182
58246
  { key: { "createdBy._id": 1, createdAt: -1 } },
58183
58247
  // Answers "was this log ever emailed, and to whom?" without a scan.
58184
- { key: { "logs.log": 1 } }
58248
+ { key: { "logs.log": 1 } },
58249
+ // Finds the resends spawned from an original, newest first.
58250
+ { key: { sourceEmail: 1, createdAt: -1 } }
58185
58251
  ]);
58186
58252
  return `Successfully created indexes for ${namespace_collection}.`;
58187
58253
  } catch (error) {
@@ -58258,6 +58324,34 @@ function usePatrolEmailRepo() {
58258
58324
  throw new import_node_server_utils159.InternalServerError("Failed to attach the patrol email PDF.");
58259
58325
  }
58260
58326
  }
58327
+ async function withResendState(items, session) {
58328
+ const originals = items.filter((item) => !item.sourceEmail).map((item) => item._id);
58329
+ const children = originals.length ? await collection.find(
58330
+ {
58331
+ sourceEmail: { $in: originals },
58332
+ status: { $ne: "deleted" }
58333
+ },
58334
+ { session }
58335
+ ).project({ _id: 1, sourceEmail: 1, status: 1, createdAt: 1 }).sort({ createdAt: -1 }).toArray() : [];
58336
+ const byOriginal = /* @__PURE__ */ new Map();
58337
+ for (const child of children) {
58338
+ const key = String(child.sourceEmail);
58339
+ if (!byOriginal.has(key))
58340
+ byOriginal.set(key, []);
58341
+ byOriginal.get(key).push(child);
58342
+ }
58343
+ return items.map((item) => {
58344
+ const resends = byOriginal.get(String(item._id)) ?? [];
58345
+ const last = resends[0];
58346
+ return {
58347
+ ...item,
58348
+ isResend: Boolean(item.sourceEmail),
58349
+ resendCount: resends.length,
58350
+ // Sorted newest first above, so [0] is the most recent attempt.
58351
+ lastResend: last ? { _id: last._id, status: last.status, createdAt: last.createdAt } : null
58352
+ };
58353
+ });
58354
+ }
58261
58355
  async function getAll({
58262
58356
  site,
58263
58357
  log,
@@ -58287,7 +58381,12 @@ function usePatrolEmailRepo() {
58287
58381
  collection.find(query2, { session }).sort({ createdAt: -1, _id: -1 }).skip(page * limit).limit(limit).toArray(),
58288
58382
  collection.countDocuments(query2, { session })
58289
58383
  ]);
58290
- return (0, import_node_server_utils159.paginate)(items, page, limit, totalCount);
58384
+ return (0, import_node_server_utils159.paginate)(
58385
+ await withResendState(items, session),
58386
+ page,
58387
+ limit,
58388
+ totalCount
58389
+ );
58291
58390
  } catch (error) {
58292
58391
  import_node_server_utils159.logger.log({ level: "error", message: error.message });
58293
58392
  throw new import_node_server_utils159.InternalServerError("Failed to retrieve patrol emails.");
@@ -58308,7 +58407,8 @@ function usePatrolEmailRepo() {
58308
58407
  if (!data) {
58309
58408
  throw new import_node_server_utils159.NotFoundError("Patrol email not found.");
58310
58409
  }
58311
- return data;
58410
+ const [decorated] = await withResendState([data], session);
58411
+ return decorated;
58312
58412
  }
58313
58413
  async function markDeleted(_id, session) {
58314
58414
  const id = toId2(_id);
@@ -58622,6 +58722,80 @@ function usePatrolEmailService() {
58622
58722
  throw error;
58623
58723
  }
58624
58724
  }
58725
+ async function resend({
58726
+ id,
58727
+ createdBy,
58728
+ cookieHeader,
58729
+ appKey = "SECURITY"
58730
+ }) {
58731
+ const original = await _getById(id);
58732
+ if (original.status !== "failed") {
58733
+ throw new import_node_server_utils161.BadRequestError("Only a failed patrol email can be resent.");
58734
+ }
58735
+ if (original.sourceEmail) {
58736
+ throw new import_node_server_utils161.BadRequestError(
58737
+ "Resend the original email rather than a previous resend."
58738
+ );
58739
+ }
58740
+ await assertWithinRateLimit(createdBy._id);
58741
+ const snapshot = (original.logs ?? []).map((entry) => ({
58742
+ log: String(entry.log),
58743
+ name: entry.name ?? "",
58744
+ ...entry.route ? { route: String(entry.route) } : {},
58745
+ start: entry.start ?? "",
58746
+ end: entry.end ?? "",
58747
+ status: Array.isArray(entry.status) ? entry.status : []
58748
+ }));
58749
+ const record = await _add({
58750
+ site: String(original.site),
58751
+ subject: original.subject,
58752
+ recipients: original.recipients,
58753
+ logs: snapshot,
58754
+ logCount: snapshot.length,
58755
+ sourceUrl: original.sourceUrl,
58756
+ sourceEmail: String(original._id),
58757
+ createdBy
58758
+ });
58759
+ const recordId = String(record._id);
58760
+ try {
58761
+ let pdf = original.pdf?.url ? original.pdf : null;
58762
+ if (!pdf) {
58763
+ const pdfBuffer = await renderPagePdf({
58764
+ url: original.sourceUrl,
58765
+ title: "Patrol Log",
58766
+ cookieHeader,
58767
+ appKey
58768
+ });
58769
+ pdf = await storePdf(
58770
+ Buffer.from(pdfBuffer),
58771
+ `patrol-log-${recordId}.pdf`
58772
+ );
58773
+ }
58774
+ await _setPdf(recordId, pdf);
58775
+ const html = (0, import_node_server_utils161.compileHandlebar)({
58776
+ context: {
58777
+ dateRange: describeDateRange(snapshot),
58778
+ pdfUrl: pdf.url,
58779
+ logoUrl: `${STORAGE_API}/seven-365.svg`
58780
+ },
58781
+ filePath: (0, import_node_server_utils161.getDirectory)(__dirname, "./public/handlebars/patrol-log-email")
58782
+ });
58783
+ await mailer.sendMail({
58784
+ to: original.recipients.join(","),
58785
+ subject: original.subject,
58786
+ html,
58787
+ sender: "iService365"
58788
+ });
58789
+ return { ...record, _id: record._id, pdf, status: "sent" };
58790
+ } catch (error) {
58791
+ import_node_server_utils161.logger.log({
58792
+ level: "error",
58793
+ message: `Failed to resend patrol email ${recordId}: ${error.message}`
58794
+ });
58795
+ await _markFailed(recordId, sanitizeError(error)).catch(() => void 0);
58796
+ throw error;
58797
+ }
58798
+ }
58625
58799
  async function getAll(value) {
58626
58800
  return _getAll(value);
58627
58801
  }
@@ -58632,7 +58806,7 @@ function usePatrolEmailService() {
58632
58806
  await _markDeleted(id);
58633
58807
  return "Successfully deleted patrol email.";
58634
58808
  }
58635
- return { send: send2, getAll, getById, deleteById };
58809
+ return { send: send2, resend, getAll, getById, deleteById };
58636
58810
  }
58637
58811
 
58638
58812
  // src/controllers/patrol-email.controller.ts
@@ -58641,6 +58815,7 @@ var import_joi78 = __toESM(require("joi"));
58641
58815
  function usePatrolEmailController() {
58642
58816
  const {
58643
58817
  send: _send,
58818
+ resend: _resend,
58644
58819
  getAll: _getAll,
58645
58820
  getById: _getById,
58646
58821
  deleteById: _deleteById
@@ -58676,6 +58851,41 @@ function usePatrolEmailController() {
58676
58851
  return;
58677
58852
  }
58678
58853
  }
58854
+ async function resend(req, res, next) {
58855
+ const params = import_joi78.default.object({
58856
+ id: import_joi78.default.string().hex().length(24).required()
58857
+ }).validate({ id: req.params.id });
58858
+ if (params.error) {
58859
+ import_node_server_utils162.logger.log({ level: "error", message: `${params.error.message}` });
58860
+ next(new import_node_server_utils162.BadRequestError(params.error.message));
58861
+ return;
58862
+ }
58863
+ const { error, value } = schemaResendPatrolEmail.validate(req.body, {
58864
+ abortEarly: false
58865
+ });
58866
+ if (error) {
58867
+ const messages = error.details.map((d) => d.message).join(", ");
58868
+ import_node_server_utils162.logger.log({ level: "error", message: messages });
58869
+ next(new import_node_server_utils162.BadRequestError(messages));
58870
+ return;
58871
+ }
58872
+ try {
58873
+ const data = await _resend({
58874
+ id: params.value.id,
58875
+ createdBy: value.createdBy,
58876
+ // Only used when the original has no PDF to reuse and one has to be
58877
+ // rendered again.
58878
+ cookieHeader: req.headers.cookie,
58879
+ appKey: req.query.appKey || "SECURITY"
58880
+ });
58881
+ res.status(201).json({ message: "success", data });
58882
+ return;
58883
+ } catch (err) {
58884
+ import_node_server_utils162.logger.log({ level: "error", message: `${err.message}` });
58885
+ next(err);
58886
+ return;
58887
+ }
58888
+ }
58679
58889
  async function getAll(req, res, next) {
58680
58890
  const { error, value } = schemaPatrolEmailQuery.validate(req.query, {
58681
58891
  abortEarly: false
@@ -58733,7 +58943,7 @@ function usePatrolEmailController() {
58733
58943
  return;
58734
58944
  }
58735
58945
  }
58736
- return { send: send2, getAll, getById, deleteById };
58946
+ return { send: send2, resend, getAll, getById, deleteById };
58737
58947
  }
58738
58948
 
58739
58949
  // src/models/site-facility.model.ts
@@ -89173,6 +89383,7 @@ function useNotificationPreferenceController() {
89173
89383
  schemaPlatformTerms,
89174
89384
  schemaPost,
89175
89385
  schemaPostFavorite,
89386
+ schemaResendPatrolEmail,
89176
89387
  schemaResidentSelfSignUp,
89177
89388
  schemaSelfServiceVisitor,
89178
89389
  schemaSendPatrolEmail,