@7365admin1/core 3.72.1-staging.324 → 3.72.1-staging.326
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/.changeset/cctv-live-view-signed.md +12 -0
- package/dist/index.d.ts +66 -4
- package/dist/index.js +153 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +151 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/scripts/hid-backfill-enrolment-access.mjs +198 -0
- package/test/camera-live-link.test.mjs +163 -0
- package/test/hid-enrolment-grants-access.test.mjs +162 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": minor
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Sign the camera relay's LIVE view link, the same way recorded footage is already signed
|
|
6
|
+
|
|
7
|
+
The relay's live routes (player page, stream socket, screenshot, clip) had no authorization at
|
|
8
|
+
all. The camera payloads this server returns now carry a signed `liveUrl` and a reusable
|
|
9
|
+
`liveAuth` (`exp=&sig=`), HMAC-SHA256 over `channel|exp` with the same PLAYBACK_SIGNING_KEY and
|
|
10
|
+
the same 120-second lifetime as a playback link. The stored `camera.host` is deliberately left
|
|
11
|
+
untouched: a query string there would switch off the liveVideo capability and would be frozen
|
|
12
|
+
into patrol-route documents. A camera whose relay is not configured is unchanged.
|
package/dist/index.d.ts
CHANGED
|
@@ -5150,6 +5150,9 @@ declare function formatCapabilityTrace(trace: CameraCapabilityTrace): string;
|
|
|
5150
5150
|
* ```
|
|
5151
5151
|
*
|
|
5152
5152
|
* The key is referenced by name, never embedded, so the JSON can be reviewed.
|
|
5153
|
+
*
|
|
5154
|
+
* The SAME key and the same configuration also sign LIVE view (`signLiveLink`
|
|
5155
|
+
* below), so a relay that is set up for recordings is set up for live view too.
|
|
5153
5156
|
*/
|
|
5154
5157
|
/** Who may watch recorded footage. `*` (full access) passes too. */
|
|
5155
5158
|
declare const CAMERA_RECORDINGS_PERMISSIONS: string[];
|
|
@@ -5180,6 +5183,46 @@ declare function signPlaybackLink(params: {
|
|
|
5180
5183
|
end: string;
|
|
5181
5184
|
expiresAt: string;
|
|
5182
5185
|
} | null;
|
|
5186
|
+
/**
|
|
5187
|
+
* The live routes on the relay had no check of any kind until now: anyone who
|
|
5188
|
+
* knew a channel number could watch a camera. They now take the SAME key as
|
|
5189
|
+
* recorded footage, over `channel|exp` — a live link has no window, so there is
|
|
5190
|
+
* no start/end to sign.
|
|
5191
|
+
*
|
|
5192
|
+
* **This never touches `camera.host`, and that is not a style choice.** Two
|
|
5193
|
+
* places in the estate break if a signature is written into the stored host:
|
|
5194
|
+
* `camera-capability.util.ts`'s `isRelayPlayerUrl` refuses any host carrying a
|
|
5195
|
+
* query (the `liveVideo` capability would go off for both mobile apps and the
|
|
5196
|
+
* web wall), and the patrol-route form copies `host` into the route document,
|
|
5197
|
+
* where a signature would be frozen at creation time and expire. So the signed
|
|
5198
|
+
* link is handed out as SEPARATE fields, minted per request.
|
|
5199
|
+
*/
|
|
5200
|
+
declare function signLiveLink(host: string | undefined, { relays, now, }?: {
|
|
5201
|
+
relays?: Record<string, string>;
|
|
5202
|
+
now?: Date;
|
|
5203
|
+
}): {
|
|
5204
|
+
liveUrl: string;
|
|
5205
|
+
liveAuth: string;
|
|
5206
|
+
liveExpiresAt: string;
|
|
5207
|
+
} | null;
|
|
5208
|
+
/**
|
|
5209
|
+
* A camera payload with its signed live link attached, or unchanged when no
|
|
5210
|
+
* relay is configured for it. The one place the wall, the health sweep and the
|
|
5211
|
+
* single-camera view all go through.
|
|
5212
|
+
*
|
|
5213
|
+
* It lives here rather than inside `publicCameraFields` only because
|
|
5214
|
+
* `camera-view.util.ts` cannot call this file without a circular import.
|
|
5215
|
+
*/
|
|
5216
|
+
declare function withLiveLink<T extends {
|
|
5217
|
+
host?: string;
|
|
5218
|
+
}>(fields: T, options?: {
|
|
5219
|
+
relays?: Record<string, string>;
|
|
5220
|
+
now?: Date;
|
|
5221
|
+
}): T & Partial<{
|
|
5222
|
+
liveUrl: string;
|
|
5223
|
+
liveAuth: string;
|
|
5224
|
+
liveExpiresAt: string;
|
|
5225
|
+
}>;
|
|
5183
5226
|
|
|
5184
5227
|
/**
|
|
5185
5228
|
* A client with ~150 cameras cannot be onboarded one two-field modal at a time,
|
|
@@ -5422,7 +5465,11 @@ declare function useCameraViewService(): {
|
|
|
5422
5465
|
relayVerified: null;
|
|
5423
5466
|
reachable: boolean;
|
|
5424
5467
|
health: "unsupported";
|
|
5425
|
-
camera: Record<string, any
|
|
5468
|
+
camera: Record<string, any> & Partial<{
|
|
5469
|
+
liveUrl: string;
|
|
5470
|
+
liveAuth: string;
|
|
5471
|
+
liveExpiresAt: string;
|
|
5472
|
+
}>;
|
|
5426
5473
|
snapshotSupported: boolean;
|
|
5427
5474
|
capabilities: CameraCapabilityDescriptor;
|
|
5428
5475
|
firmwareVersion: string | null;
|
|
@@ -5437,7 +5484,11 @@ declare function useCameraViewService(): {
|
|
|
5437
5484
|
reachable: boolean;
|
|
5438
5485
|
health: "ok" | "unreachable" | "drifted";
|
|
5439
5486
|
reason: string | null;
|
|
5440
|
-
camera: Record<string, any
|
|
5487
|
+
camera: Record<string, any> & Partial<{
|
|
5488
|
+
liveUrl: string;
|
|
5489
|
+
liveAuth: string;
|
|
5490
|
+
liveExpiresAt: string;
|
|
5491
|
+
}>;
|
|
5441
5492
|
snapshotSupported: boolean;
|
|
5442
5493
|
capabilities: CameraCapabilityDescriptor;
|
|
5443
5494
|
firmwareVersion: string | null;
|
|
@@ -5464,6 +5515,9 @@ declare function useCameraViewService(): {
|
|
|
5464
5515
|
cameras: {
|
|
5465
5516
|
unavailableReason: string | null;
|
|
5466
5517
|
capabilities: CameraCapabilityDescriptor;
|
|
5518
|
+
liveUrl?: string | undefined;
|
|
5519
|
+
liveAuth?: string | undefined;
|
|
5520
|
+
liveExpiresAt?: string | undefined;
|
|
5467
5521
|
}[];
|
|
5468
5522
|
}>;
|
|
5469
5523
|
getSiteHealth: (params: {
|
|
@@ -5486,6 +5540,9 @@ declare function useCameraViewService(): {
|
|
|
5486
5540
|
detailUnavailableReason: string;
|
|
5487
5541
|
lastFrameAt: string | null;
|
|
5488
5542
|
unavailableReason: string | null;
|
|
5543
|
+
liveUrl?: string | undefined;
|
|
5544
|
+
liveAuth?: string | undefined;
|
|
5545
|
+
liveExpiresAt?: string | undefined;
|
|
5489
5546
|
} | {
|
|
5490
5547
|
verified: "nothing" | "recorder-video-port";
|
|
5491
5548
|
verifiedDescription: string;
|
|
@@ -5501,6 +5558,9 @@ declare function useCameraViewService(): {
|
|
|
5501
5558
|
detailUnavailableReason: string;
|
|
5502
5559
|
lastFrameAt: string | null;
|
|
5503
5560
|
unavailableReason: string | null;
|
|
5561
|
+
liveUrl?: string | undefined;
|
|
5562
|
+
liveAuth?: string | undefined;
|
|
5563
|
+
liveExpiresAt?: string | undefined;
|
|
5504
5564
|
})[];
|
|
5505
5565
|
requested: number;
|
|
5506
5566
|
returned: number;
|
|
@@ -13532,7 +13592,9 @@ declare function useHidAmicoService(): {
|
|
|
13532
13592
|
hasMore: boolean;
|
|
13533
13593
|
pageRange: string;
|
|
13534
13594
|
}>;
|
|
13535
|
-
createIdentity: (readerId: string, value: Partial<THidAmicoIdentity>
|
|
13595
|
+
createIdentity: (readerId: string, value: Partial<THidAmicoIdentity> & {
|
|
13596
|
+
orgId?: string;
|
|
13597
|
+
}) => Promise<{
|
|
13536
13598
|
_id: bson.ObjectId;
|
|
13537
13599
|
reader: bson.ObjectId;
|
|
13538
13600
|
site: bson.ObjectId;
|
|
@@ -15333,4 +15395,4 @@ declare function usePersonalEmergencyChainController(): {
|
|
|
15333
15395
|
update: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
15334
15396
|
};
|
|
15335
15397
|
|
|
15336
|
-
export { ANPRMode, APP_BASE_URLS, AUDIT_VALUE_MAX_LENGTH, AccessTypeProps, AppKey, AppServiceType, AssignCardConfig, BULK_CAMERA_COLUMNS, BidStatus, BidType, BuildingLevelStatus, BuildingStatus, BulkCameraAccepted, BulkCameraOutcome, BulkCameraPlan, BulkCameraResult, 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_RECORDINGS_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, CONSOLE_PERMISSIONS, CONTRACTOR_TYPE_LABELS, CROSS_CLIENT_GRANT, CURRENT_TIME_ENDPOINT, Camera, CameraAddressInput, CameraCapability, CameraCapabilityContext, CameraCapabilityDescriptor, CameraCapabilityEntry, CameraCapabilityReason, CameraCapabilityState, CameraCapabilityTrace, CameraDevice, CameraFrame, CameraMembership, CameraStream, CameraTestStatus, CameraTransport, CameraType, ConsoleAuditAction, ConsoleAuditTarget, ConsoleGrant, DEFAULT_RING_SECONDS, DEFAULT_SITE_TIMEZONE, DEVICE_STATUS, DOBStatus, DUPLICATE_TERMS_VERSION_MESSAGE, DayOfWeek, DeviceHttpTarget, DeviceProbeResult, DynamicFormFields, E164, EAccessCardTypes, EAccessCardUserTypes, EmailSender, EntryOrder, EntrySort, EventOrder, EventSort, EventStatus, EventType, FacilitySort, FacilityStatus, FormEntryStatus, GOVERNED_MODULES, GuestSort, GuestStatus, HID_CARD_VALUE_FACTOR, HID_PERMISSION_CATEGORIES, HID_UINT32_MAX, HID_UINT64_MAX, HidRawUint64, IAccessCard, IAccessCardTransaction, InviteActor, LIVE_ROLE, MANAGE_SITE_MODULES, MAX_BULK_CAMERA_ROWS, MAX_CAMERA_CHANNEL, MAX_CAMERA_NAME_LENGTH, MAX_PERSONAL_EMERGENCY_CONTACTS, MAX_RING_SECONDS, 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, MIN_RING_SECONDS, MIncidentReport, MManpowerDesignations, MManpowerMonitoring, MManpowerRemarks, MManpowerSites, MMember, MNfcPatrolLog, MNfcPatrolRoute, MNfcPatrolSettings, MNfcPatrolSettingsUpdate, MNfcPatrolTag, MNotification, MNotificationPreference, MODULE_GATE_MODE_DEFAULT, MODULE_LIST_GATE_DEFAULT, MOccurrenceBook, MOccurrenceEntry, MOccurrenceSubject, MOnlineForm, MOrg, MOvernightParkingApprovalHours, MOvernightParkingRequest, MPatrolEmail, MPatrolLog, MPatrolQuestion, MPatrolRoute, MPerson, MPersonalEmergencyChain, 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, NOTIFY_ACCESS_FILTER_DEFAULT, NotificationAppSlug, NotificationCategory, NotificationChannel, NotificationModule, NotificationPreferenceView, NotificationService, ORG_MARKETPLACE_VENDOR_FIELD, ORG_OWNER_REPAIR_CLAIM_STALE_MS, ORG_OWNER_REPAIR_CLAIM_TAKEN_REASON, ORG_OWNER_REPAIR_DEFAULT, ORG_OWNER_REPAIR_OFF_REASON, 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, PLAYBACK_LINK_SECONDS, PLAYBACK_MAX_WINDOW_SECONDS, 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_SERVICE_RESEND_COOLDOWN_MS, 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, THidPermissionUserBinding, THidPhysicalCardInput, THidPhysicalCardType$1 as THidPhysicalCardType, THidSipAccount, THidSitePermissions, TIncidentInformation, TIncidentReport, TIncidentTypeAndTime, TInvoice, TKeyRef, TManpowerDesignations, TManpowerDesignationsUpdate, TManpowerMonitoring, TManpowerMonitoringUpdate, TManpowerRemarks, TManpowerRemarksStatusUpdate, TManpowerRemarksUpdate, TManpowerSearchFilter, TManpowerSites, TMember, TMemberModulesDeps, TMemberUpdateStatus, TMessagePreloved, TMiniRole, TModuleAccess, TModuleGateMode, TModuleImpact, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TNotification, TNotificationPreference, TNotificationPreferenceOff, TNotifyAccessContext, TNotifyAccessMode, TNotifyAccessReport, TOccurrenceBook, TOccurrenceEntry, TOccurrenceSubject, TOnlineForm, TOrg, TOrgModulesDeps, TOrgOwnerRepairClaim, TOrgOwnerRepairDeps, TOrgOwnerRepairInput, TOrgOwnerRepairPayload, TOrgOwnerRepairPlan, TOvernightParkingApprovalHours, TOvernightParkingRequest, TPatrolEmail, TPatrolEmailCreatedBy, TPatrolEmailLogRef, TPatrolLog, TPatrolQuestion, TPatrolRoute, TPerson, TPersonalEmergencyChain, TPersonalEmergencyContact, TPlaceOfIncident, TPlates, TPlatformTerms, TPost, TPostFavorite, TPrice, TPriceType, TPromoCode, TPromoCurrencyInput, TPromoTier, TRANSPORT_DEVICE_HTTP, TRANSPORT_RELAY_PLAYBACK, TRANSPORT_RELAY_PLAYER, TRANSPORT_RTSP_FRAME, TRecipientOfComplaint, TRemarks, TResident, TResidentAppModules, TRobot, TRobotMetadata, TRole, TRolePermissionHistoryEntry, TRoleV2, TRoute, TSOABillingItem, TSOAStatus, TSelfServiceEmailOccasion, TSelfServiceEmailRecord, TSelfServiceResendDecision, TSelfServiceResendFacts, TServiceProvider, TServiceProviderBilling, TSession, TSessionCreate, TShifts, TSignNfcPatrolLog, TSite, TSiteCamera, TSiteDayBounds, TSiteFacility, TSiteFacilityBooking, TSiteInfo, TSiteInformation, TSiteMetadata, TSiteModulesDeps, TSiteUpdateBlock, TStatementOfAccount, TSubcategoryPreloved, TSubmissionForm, TSubscription, TSubscriptionPlan, TSubscriptionPlanApplication, TUnitBilling, TUnits, TUpdateFormEntry, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationCode, TVerificationEvent, TVerificationMetadata, TVerificationMetadataV2, TVerificationOnboarding, TVerificationV2, TVisitorTransaction, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UNSTORED_COLUMNS, UseAccessManagementRepo, UserStatus, VERIFICATION_OPEN_STATUSES, VehicleCategory, VehicleOrder, VehicleSort, VehicleStatus, VehicleType, VerificationLinkType, VerificationStatus, VerificationSubjectType, VerificationType, VisitorSort, VisitorStatus, addressSchema, allowedFieldsSite, allowedNatures, allowedPlanApplications, attendanceSchema, attendanceSettingsSchema, buildSelfServiceEmailContext, building_level_namespace_collection, building_units_namespace_collection, buildings_namespace_collection, bulletin_boards_namespace_collection, callerAccountApproved, callerId, cameraBaseUrl, cameraCapabilitiesFor, cameraDevices, cameraGrant, cameraHealthClaim, cameraHealthSummary, cameraListClearConfirmation, cameraManagePermissions, cameraProbeCacheKey, cameraTransports, canManageSiteModules, canRevokeRefreshTokenFamily, categoriesForPermissions, categorySupportsChannel, chatPrelovedEvents, chatSchema, claimReadsAsStale, clampPtzSpeed, clockDriftSeconds, consoleRoleAllows, consoleRoleAllowsAll, consoleSpellings, console_audit_namespace_collection, createManpowerRemarksDaily, customerSchema, customerSitePropertyFields, decideSelfServiceResend, decideServiceProviderInvite, decodeHidPacsCard, deniedModules, deriveBulletinStatus, deriveCameraHost, describeCameraCapabilities, designationsSchema, deviceControlEnabled, deviceHttpEnabled, deviceHttpTargets, deviceHttpTimeoutMs, deviceProbeTtlSeconds, documentExpiryFilter, documents_namespace_collection, emitNotificationCreated, emptyPersonalEmergencyChain, encodeHidPacsCard, entitledSiteScope, events_namespace_collection, expandModules, expiredBulletinSweepFilter, expiredVehicleSweepFilter, facility_bookings_namespace_collection, feedbackSchema, feedbacks2_namespace_collection, feedbacks_namespace_collection, ffmpegFrameArgs, ffmpegPath, filterByAccess, formatCapabilityTrace, formatDahuaDate, getIO, getSessionIdFromRequest, grabWithSubStreamFallback, guests_namespace_collection, hasAnyCapability, hasAnyPermission, hasOrgInvitation, hasOrgOwnership, hasOrgSiteReach, hidRawUint64, holdsRole, incidentReport, incidentReportLog, incidents_namespace_collection, invitationOffersRole, isCameraEntitled, isDuplicateMemberError, isDuplicateVersionError, isLikelySelfServiceEmail, isPatrolCctvCamera, isPlatformOwner, isPromoCodeExpired, isRelayPlayerUrl, isSafeRelativePath, isSuperAdmin, isTermsCurrent, isValidTimezone, logCamera, manpowerDesignationsSchema, manpowerEvents, manpowerMonitoringSchema, manpowerRemarksSchema, manpowerSitesSchema, mapWithLimit, maskNric, memberModulesHandlers, moduleDeniedForCaller, moduleGateEnforceKeys, moduleGateMode, moduleImpact, moduleListGateOn, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, normalizeAcceptedTerms, normalizeHidCardValue, notificationAccessReport, notificationCategory, notificationCategoryLabel, notificationEvents, notificationRoom, notifyAccessMode, occasionForStatus, occurrence_book_namespace_collection, online_forms_namespace_collection, orgLevelRoles, orgModulesHandlers, orgOwnerRepairHandlers, orgOwnerRepairOn, orgQualifiesForOwnerRepair, orgSchema, overnight_parking_requests_namespace_collection, parseCameraChannel, parseCameraHost, parseDahuaFind, parseDeviceTime, parseHidJsonLossless, parsePromoExpiry, parseSoftwareVersion, pickAuditFields, pickCustomerSiteProperties, planBulkCameraImport, planOrgOwnerRepair, platform_terms_namespace_collection, playbackRelays, playbackWindowRefusal, promoCodeRefusal, promoCodeSchema, promoCodeStatusSchema, promoCodeUpdate, promoCodeUpdateSchema, ptzEndpoint, publicCameraFields, readsAsApprovedAccount, recordConsoleAction, refuseServiceProviderInviteAction, registerCameraTransport, relayForRecorder, remarksSchema, renderPagePdf, requireConsolePermission, requirePlatformStaff, resetCameraTransports, residentAppModuleKeys, residentAppModulesSchema, residentFormEntry, resolutionRefusalReason, resolveCamera, resolveDeviceHttp, resolveHidPhysicalCardValue, resolveInviteActor, resolveSiteTimezone, resolveStaffRole, 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, schemaHidAmicoUserPassword, schemaHidAmicoUserPasswordParams, 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, schemaPersonalEmergencyContact, 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, schemaUpdatePersonalEmergencyChain, schemaUpdatePost, schemaUpdatePostFavorite, schemaUpdateServiceProviderBilling, schemaUpdateSiteBillingConfiguration, schemaUpdateSiteBillingItem, schemaUpdateSiteCamera, schemaUpdateSiteFacility, schemaUpdateSiteFacilityBooking, schemaUpdateSiteUnitBilling, schemaUpdateStatementOfAccount, schemaUpdateSubcategoryPreloved, schemaUpdateVisTrans, schemaVehicleTransaction, schemaVisitorTransaction, schemeCamera, schemeLogCamera, selectHealthTargets, selfServiceEmailSubject, serviceProviderInviteLabel, sessionSchema, setIO, shiftSchema, signPlaybackLink, siteDayBounds, siteModulesHandlers, siteSchema, site_people_namespace_collection, snapshotEndpoint, snapshotRefusalReason, staffMayBypass, stringifyHidJson, stripFacialImageMetadata, subscriptionPlanSchema, summariseBulkCameraPlan, toExpiryDate, 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, useOrgOwnerRepairRepo, useOrgRepo, useOvernightParkingController, useOvernightParkingRepo, useOvernightParkingRequestController, useOvernightParkingRequestRepo, useOvernightParkingRequestService, usePatrolEmailController, usePatrolEmailRepo, usePatrolEmailService, usePatrolLogController, usePatrolLogRepo, usePatrolLogService, usePatrolQuestionController, usePatrolQuestionRepo, usePatrolRouteController, usePatrolRouteRepo, usePersonController, usePersonRepo, usePersonalEmergencyChainController, usePersonalEmergencyChainRepo, usePersonalEmergencyChainService, 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 };
|
|
15398
|
+
export { ANPRMode, APP_BASE_URLS, AUDIT_VALUE_MAX_LENGTH, AccessTypeProps, AppKey, AppServiceType, AssignCardConfig, BULK_CAMERA_COLUMNS, BidStatus, BidType, BuildingLevelStatus, BuildingStatus, BulkCameraAccepted, BulkCameraOutcome, BulkCameraPlan, BulkCameraResult, 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_RECORDINGS_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, CONSOLE_PERMISSIONS, CONTRACTOR_TYPE_LABELS, CROSS_CLIENT_GRANT, CURRENT_TIME_ENDPOINT, Camera, CameraAddressInput, CameraCapability, CameraCapabilityContext, CameraCapabilityDescriptor, CameraCapabilityEntry, CameraCapabilityReason, CameraCapabilityState, CameraCapabilityTrace, CameraDevice, CameraFrame, CameraMembership, CameraStream, CameraTestStatus, CameraTransport, CameraType, ConsoleAuditAction, ConsoleAuditTarget, ConsoleGrant, DEFAULT_RING_SECONDS, DEFAULT_SITE_TIMEZONE, DEVICE_STATUS, DOBStatus, DUPLICATE_TERMS_VERSION_MESSAGE, DayOfWeek, DeviceHttpTarget, DeviceProbeResult, DynamicFormFields, E164, EAccessCardTypes, EAccessCardUserTypes, EmailSender, EntryOrder, EntrySort, EventOrder, EventSort, EventStatus, EventType, FacilitySort, FacilityStatus, FormEntryStatus, GOVERNED_MODULES, GuestSort, GuestStatus, HID_CARD_VALUE_FACTOR, HID_PERMISSION_CATEGORIES, HID_UINT32_MAX, HID_UINT64_MAX, HidRawUint64, IAccessCard, IAccessCardTransaction, InviteActor, LIVE_ROLE, MANAGE_SITE_MODULES, MAX_BULK_CAMERA_ROWS, MAX_CAMERA_CHANNEL, MAX_CAMERA_NAME_LENGTH, MAX_PERSONAL_EMERGENCY_CONTACTS, MAX_RING_SECONDS, 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, MIN_RING_SECONDS, MIncidentReport, MManpowerDesignations, MManpowerMonitoring, MManpowerRemarks, MManpowerSites, MMember, MNfcPatrolLog, MNfcPatrolRoute, MNfcPatrolSettings, MNfcPatrolSettingsUpdate, MNfcPatrolTag, MNotification, MNotificationPreference, MODULE_GATE_MODE_DEFAULT, MODULE_LIST_GATE_DEFAULT, MOccurrenceBook, MOccurrenceEntry, MOccurrenceSubject, MOnlineForm, MOrg, MOvernightParkingApprovalHours, MOvernightParkingRequest, MPatrolEmail, MPatrolLog, MPatrolQuestion, MPatrolRoute, MPerson, MPersonalEmergencyChain, 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, NOTIFY_ACCESS_FILTER_DEFAULT, NotificationAppSlug, NotificationCategory, NotificationChannel, NotificationModule, NotificationPreferenceView, NotificationService, ORG_MARKETPLACE_VENDOR_FIELD, ORG_OWNER_REPAIR_CLAIM_STALE_MS, ORG_OWNER_REPAIR_CLAIM_TAKEN_REASON, ORG_OWNER_REPAIR_DEFAULT, ORG_OWNER_REPAIR_OFF_REASON, 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, PLAYBACK_LINK_SECONDS, PLAYBACK_MAX_WINDOW_SECONDS, 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_SERVICE_RESEND_COOLDOWN_MS, 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, THidPermissionUserBinding, THidPhysicalCardInput, THidPhysicalCardType$1 as THidPhysicalCardType, THidSipAccount, THidSitePermissions, TIncidentInformation, TIncidentReport, TIncidentTypeAndTime, TInvoice, TKeyRef, TManpowerDesignations, TManpowerDesignationsUpdate, TManpowerMonitoring, TManpowerMonitoringUpdate, TManpowerRemarks, TManpowerRemarksStatusUpdate, TManpowerRemarksUpdate, TManpowerSearchFilter, TManpowerSites, TMember, TMemberModulesDeps, TMemberUpdateStatus, TMessagePreloved, TMiniRole, TModuleAccess, TModuleGateMode, TModuleImpact, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TNotification, TNotificationPreference, TNotificationPreferenceOff, TNotifyAccessContext, TNotifyAccessMode, TNotifyAccessReport, TOccurrenceBook, TOccurrenceEntry, TOccurrenceSubject, TOnlineForm, TOrg, TOrgModulesDeps, TOrgOwnerRepairClaim, TOrgOwnerRepairDeps, TOrgOwnerRepairInput, TOrgOwnerRepairPayload, TOrgOwnerRepairPlan, TOvernightParkingApprovalHours, TOvernightParkingRequest, TPatrolEmail, TPatrolEmailCreatedBy, TPatrolEmailLogRef, TPatrolLog, TPatrolQuestion, TPatrolRoute, TPerson, TPersonalEmergencyChain, TPersonalEmergencyContact, TPlaceOfIncident, TPlates, TPlatformTerms, TPost, TPostFavorite, TPrice, TPriceType, TPromoCode, TPromoCurrencyInput, TPromoTier, TRANSPORT_DEVICE_HTTP, TRANSPORT_RELAY_PLAYBACK, TRANSPORT_RELAY_PLAYER, TRANSPORT_RTSP_FRAME, TRecipientOfComplaint, TRemarks, TResident, TResidentAppModules, TRobot, TRobotMetadata, TRole, TRolePermissionHistoryEntry, TRoleV2, TRoute, TSOABillingItem, TSOAStatus, TSelfServiceEmailOccasion, TSelfServiceEmailRecord, TSelfServiceResendDecision, TSelfServiceResendFacts, TServiceProvider, TServiceProviderBilling, TSession, TSessionCreate, TShifts, TSignNfcPatrolLog, TSite, TSiteCamera, TSiteDayBounds, TSiteFacility, TSiteFacilityBooking, TSiteInfo, TSiteInformation, TSiteMetadata, TSiteModulesDeps, TSiteUpdateBlock, TStatementOfAccount, TSubcategoryPreloved, TSubmissionForm, TSubscription, TSubscriptionPlan, TSubscriptionPlanApplication, TUnitBilling, TUnits, TUpdateFormEntry, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationCode, TVerificationEvent, TVerificationMetadata, TVerificationMetadataV2, TVerificationOnboarding, TVerificationV2, TVisitorTransaction, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UNSTORED_COLUMNS, UseAccessManagementRepo, UserStatus, VERIFICATION_OPEN_STATUSES, VehicleCategory, VehicleOrder, VehicleSort, VehicleStatus, VehicleType, VerificationLinkType, VerificationStatus, VerificationSubjectType, VerificationType, VisitorSort, VisitorStatus, addressSchema, allowedFieldsSite, allowedNatures, allowedPlanApplications, attendanceSchema, attendanceSettingsSchema, buildSelfServiceEmailContext, building_level_namespace_collection, building_units_namespace_collection, buildings_namespace_collection, bulletin_boards_namespace_collection, callerAccountApproved, callerId, cameraBaseUrl, cameraCapabilitiesFor, cameraDevices, cameraGrant, cameraHealthClaim, cameraHealthSummary, cameraListClearConfirmation, cameraManagePermissions, cameraProbeCacheKey, cameraTransports, canManageSiteModules, canRevokeRefreshTokenFamily, categoriesForPermissions, categorySupportsChannel, chatPrelovedEvents, chatSchema, claimReadsAsStale, clampPtzSpeed, clockDriftSeconds, consoleRoleAllows, consoleRoleAllowsAll, consoleSpellings, console_audit_namespace_collection, createManpowerRemarksDaily, customerSchema, customerSitePropertyFields, decideSelfServiceResend, decideServiceProviderInvite, decodeHidPacsCard, deniedModules, deriveBulletinStatus, deriveCameraHost, describeCameraCapabilities, designationsSchema, deviceControlEnabled, deviceHttpEnabled, deviceHttpTargets, deviceHttpTimeoutMs, deviceProbeTtlSeconds, documentExpiryFilter, documents_namespace_collection, emitNotificationCreated, emptyPersonalEmergencyChain, encodeHidPacsCard, entitledSiteScope, events_namespace_collection, expandModules, expiredBulletinSweepFilter, expiredVehicleSweepFilter, facility_bookings_namespace_collection, feedbackSchema, feedbacks2_namespace_collection, feedbacks_namespace_collection, ffmpegFrameArgs, ffmpegPath, filterByAccess, formatCapabilityTrace, formatDahuaDate, getIO, getSessionIdFromRequest, grabWithSubStreamFallback, guests_namespace_collection, hasAnyCapability, hasAnyPermission, hasOrgInvitation, hasOrgOwnership, hasOrgSiteReach, hidRawUint64, holdsRole, incidentReport, incidentReportLog, incidents_namespace_collection, invitationOffersRole, isCameraEntitled, isDuplicateMemberError, isDuplicateVersionError, isLikelySelfServiceEmail, isPatrolCctvCamera, isPlatformOwner, isPromoCodeExpired, isRelayPlayerUrl, isSafeRelativePath, isSuperAdmin, isTermsCurrent, isValidTimezone, logCamera, manpowerDesignationsSchema, manpowerEvents, manpowerMonitoringSchema, manpowerRemarksSchema, manpowerSitesSchema, mapWithLimit, maskNric, memberModulesHandlers, moduleDeniedForCaller, moduleGateEnforceKeys, moduleGateMode, moduleImpact, moduleListGateOn, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, normalizeAcceptedTerms, normalizeHidCardValue, notificationAccessReport, notificationCategory, notificationCategoryLabel, notificationEvents, notificationRoom, notifyAccessMode, occasionForStatus, occurrence_book_namespace_collection, online_forms_namespace_collection, orgLevelRoles, orgModulesHandlers, orgOwnerRepairHandlers, orgOwnerRepairOn, orgQualifiesForOwnerRepair, orgSchema, overnight_parking_requests_namespace_collection, parseCameraChannel, parseCameraHost, parseDahuaFind, parseDeviceTime, parseHidJsonLossless, parsePromoExpiry, parseSoftwareVersion, pickAuditFields, pickCustomerSiteProperties, planBulkCameraImport, planOrgOwnerRepair, platform_terms_namespace_collection, playbackRelays, playbackWindowRefusal, promoCodeRefusal, promoCodeSchema, promoCodeStatusSchema, promoCodeUpdate, promoCodeUpdateSchema, ptzEndpoint, publicCameraFields, readsAsApprovedAccount, recordConsoleAction, refuseServiceProviderInviteAction, registerCameraTransport, relayForRecorder, remarksSchema, renderPagePdf, requireConsolePermission, requirePlatformStaff, resetCameraTransports, residentAppModuleKeys, residentAppModulesSchema, residentFormEntry, resolutionRefusalReason, resolveCamera, resolveDeviceHttp, resolveHidPhysicalCardValue, resolveInviteActor, resolveSiteTimezone, resolveStaffRole, 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, schemaHidAmicoUserPassword, schemaHidAmicoUserPasswordParams, 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, schemaPersonalEmergencyContact, 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, schemaUpdatePersonalEmergencyChain, schemaUpdatePost, schemaUpdatePostFavorite, schemaUpdateServiceProviderBilling, schemaUpdateSiteBillingConfiguration, schemaUpdateSiteBillingItem, schemaUpdateSiteCamera, schemaUpdateSiteFacility, schemaUpdateSiteFacilityBooking, schemaUpdateSiteUnitBilling, schemaUpdateStatementOfAccount, schemaUpdateSubcategoryPreloved, schemaUpdateVisTrans, schemaVehicleTransaction, schemaVisitorTransaction, schemeCamera, schemeLogCamera, selectHealthTargets, selfServiceEmailSubject, serviceProviderInviteLabel, sessionSchema, setIO, shiftSchema, signLiveLink, signPlaybackLink, siteDayBounds, siteModulesHandlers, siteSchema, site_people_namespace_collection, snapshotEndpoint, snapshotRefusalReason, staffMayBypass, stringifyHidJson, stripFacialImageMetadata, subscriptionPlanSchema, summariseBulkCameraPlan, toExpiryDate, 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, useOrgOwnerRepairRepo, useOrgRepo, useOvernightParkingController, useOvernightParkingRepo, useOvernightParkingRequestController, useOvernightParkingRequestRepo, useOvernightParkingRequestService, usePatrolEmailController, usePatrolEmailRepo, usePatrolEmailService, usePatrolLogController, usePatrolLogRepo, usePatrolLogService, usePatrolQuestionController, usePatrolQuestionRepo, usePatrolRouteController, usePatrolRouteRepo, usePersonController, usePersonRepo, usePersonalEmergencyChainController, usePersonalEmergencyChainRepo, usePersonalEmergencyChainService, 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, withLiveLink, workOrderSchema, work_orders2_namespace_collection, work_orders_namespace_collection };
|
package/dist/index.js
CHANGED
|
@@ -603,6 +603,7 @@ __export(src_exports, {
|
|
|
603
603
|
sessionSchema: () => sessionSchema,
|
|
604
604
|
setIO: () => setIO,
|
|
605
605
|
shiftSchema: () => shiftSchema,
|
|
606
|
+
signLiveLink: () => signLiveLink,
|
|
606
607
|
signPlaybackLink: () => signPlaybackLink,
|
|
607
608
|
siteDayBounds: () => siteDayBounds,
|
|
608
609
|
siteModulesHandlers: () => siteModulesHandlers,
|
|
@@ -854,6 +855,7 @@ __export(src_exports, {
|
|
|
854
855
|
vehicles_namespace_collection: () => vehicles_namespace_collection,
|
|
855
856
|
visitors_namespace_collection: () => visitors_namespace_collection,
|
|
856
857
|
wallConfig: () => wallConfig,
|
|
858
|
+
withLiveLink: () => withLiveLink,
|
|
857
859
|
workOrderSchema: () => workOrderSchema,
|
|
858
860
|
work_orders2_namespace_collection: () => work_orders2_namespace_collection,
|
|
859
861
|
work_orders_namespace_collection: () => work_orders_namespace_collection
|
|
@@ -22121,6 +22123,37 @@ function signPlaybackLink(params) {
|
|
|
22121
22123
|
expiresAt: new Date(exp * 1e3).toISOString()
|
|
22122
22124
|
};
|
|
22123
22125
|
}
|
|
22126
|
+
function signLiveLink(host, {
|
|
22127
|
+
relays = playbackRelays(),
|
|
22128
|
+
now = /* @__PURE__ */ new Date()
|
|
22129
|
+
} = {}) {
|
|
22130
|
+
const parsed = host ? parseCameraHost(host) : null;
|
|
22131
|
+
if (!parsed || parsed.channel === null)
|
|
22132
|
+
return null;
|
|
22133
|
+
const key = relays[parsed.authority];
|
|
22134
|
+
if (!key)
|
|
22135
|
+
return null;
|
|
22136
|
+
const exp = Math.floor(now.getTime() / 1e3) + PLAYBACK_LINK_SECONDS;
|
|
22137
|
+
const channel = String(parsed.channel);
|
|
22138
|
+
const sig = (0, import_node_crypto2.createHmac)("sha256", key).update(`${channel}|${exp}`).digest("hex");
|
|
22139
|
+
const liveAuth = `exp=${exp}&sig=${sig}`;
|
|
22140
|
+
return {
|
|
22141
|
+
/** The player page, ready for an iframe or a WebView. */
|
|
22142
|
+
liveUrl: `https://${parsed.authority}/${channel}?${liveAuth}`,
|
|
22143
|
+
/**
|
|
22144
|
+
* The same signature, on its own, to append to any of the relay's live
|
|
22145
|
+
* routes — the socket, the still, the clip. One signature serves all four
|
|
22146
|
+
* because it covers the CHANNEL and not the path, which is what lets
|
|
22147
|
+
* `insertScreenshot` keep splicing `screenshot` into the path.
|
|
22148
|
+
*/
|
|
22149
|
+
liveAuth,
|
|
22150
|
+
liveExpiresAt: new Date(exp * 1e3).toISOString()
|
|
22151
|
+
};
|
|
22152
|
+
}
|
|
22153
|
+
function withLiveLink(fields, options) {
|
|
22154
|
+
const live = signLiveLink(fields.host, options);
|
|
22155
|
+
return live ? { ...fields, ...live } : fields;
|
|
22156
|
+
}
|
|
22124
22157
|
|
|
22125
22158
|
// src/utils/camera-capability.util.ts
|
|
22126
22159
|
var CAMERA_CAPABILITIES = [
|
|
@@ -23476,7 +23509,9 @@ function useCameraViewService() {
|
|
|
23476
23509
|
// player-page URL, which is the one picture path proven to work, and the
|
|
23477
23510
|
// plain `GET /site-cameras` already returns it to every authenticated
|
|
23478
23511
|
// caller. The credential fields are still never included.
|
|
23479
|
-
...
|
|
23512
|
+
...withLiveLink(
|
|
23513
|
+
publicCameraFields({ ...camera, siteName: site?.name })
|
|
23514
|
+
),
|
|
23480
23515
|
// Answered before anything is requested, so a camera with no address or
|
|
23481
23516
|
// an inactive one renders with a reason and costs zero device requests.
|
|
23482
23517
|
// (An ANPR unit never reaches here — it is filtered out above.)
|
|
@@ -23519,7 +23554,7 @@ function useCameraViewService() {
|
|
|
23519
23554
|
async function probeCamera(camera, cacheSeconds) {
|
|
23520
23555
|
const id = camera?._id?.toString?.() ?? "";
|
|
23521
23556
|
const identity = {
|
|
23522
|
-
...publicCameraFields(camera),
|
|
23557
|
+
...withLiveLink(publicCameraFields(camera)),
|
|
23523
23558
|
unavailableReason: snapshotRefusalReason(camera)
|
|
23524
23559
|
};
|
|
23525
23560
|
const lastFrameAt = await getCache(`lastframe:${id}`) || null;
|
|
@@ -23653,7 +23688,7 @@ function useCameraViewService() {
|
|
|
23653
23688
|
);
|
|
23654
23689
|
const { capabilities } = capabilitiesOf(camera, probe);
|
|
23655
23690
|
const base = {
|
|
23656
|
-
camera: publicCameraFields(camera),
|
|
23691
|
+
camera: withLiveLink(publicCameraFields(camera)),
|
|
23657
23692
|
snapshotSupported: refusal === null,
|
|
23658
23693
|
capabilities,
|
|
23659
23694
|
// Filled in from the probe when the device answers. Today it does not, so
|
|
@@ -44016,6 +44051,15 @@ var schemaHidAmicoIdentity = import_joi66.default.object({
|
|
|
44016
44051
|
}).or("hidUserId", "registration", "cardNo");
|
|
44017
44052
|
var schemaCreateHidAmicoIdentity = import_joi66.default.object({
|
|
44018
44053
|
site: objectIdSchema2.optional(),
|
|
44054
|
+
/*
|
|
44055
|
+
* Which organisation's HID permission document this enrolment's access grant
|
|
44056
|
+
* belongs in. Optional so existing callers keep working - the service falls
|
|
44057
|
+
* back to the site's own organisation - but a managing agent should send its
|
|
44058
|
+
* own org, because a site reached through `customer.sites` would otherwise
|
|
44059
|
+
* get a second document and the permissions screen would show the person as
|
|
44060
|
+
* unassigned while the door let them through.
|
|
44061
|
+
*/
|
|
44062
|
+
orgId: objectIdSchema2.optional(),
|
|
44019
44063
|
hidUserId: import_joi66.default.alternatives(import_joi66.default.string(), import_joi66.default.number()).optional().allow(null, ""),
|
|
44020
44064
|
registration: import_joi66.default.string().trim().optional().allow(""),
|
|
44021
44065
|
cardNo: import_joi66.default.string().optional().allow(null, ""),
|
|
@@ -45776,6 +45820,27 @@ function resolveHidPhysicalCardValue(input) {
|
|
|
45776
45820
|
return normalizeHidCardValue(input.cardValue);
|
|
45777
45821
|
}
|
|
45778
45822
|
|
|
45823
|
+
// src/utils/hid-assignment.util.ts
|
|
45824
|
+
function permissionSubjectOfIdentity(value) {
|
|
45825
|
+
if (value.person) {
|
|
45826
|
+
return { subjectId: String(value.person), category: "resident" };
|
|
45827
|
+
}
|
|
45828
|
+
if (value.member) {
|
|
45829
|
+
return { subjectId: String(value.member), category: "property_management" };
|
|
45830
|
+
}
|
|
45831
|
+
if (value.serviceProvider) {
|
|
45832
|
+
return { subjectId: String(value.serviceProvider), category: "service_provider" };
|
|
45833
|
+
}
|
|
45834
|
+
return null;
|
|
45835
|
+
}
|
|
45836
|
+
function assignmentNamesSubject(item, subject, scope) {
|
|
45837
|
+
if (String(item.subjectId ?? "") !== subject.subjectId)
|
|
45838
|
+
return false;
|
|
45839
|
+
if (item.category !== subject.category)
|
|
45840
|
+
return false;
|
|
45841
|
+
return item.readerId ? String(item.readerId) === scope.readerId : item.locationKey === scope.locationKey;
|
|
45842
|
+
}
|
|
45843
|
+
|
|
45779
45844
|
// src/utils/hid-json.util.ts
|
|
45780
45845
|
var import_node_crypto5 = __toESM(require("crypto"));
|
|
45781
45846
|
var UINT64_MAX = 2n ** 64n - 1n;
|
|
@@ -48549,6 +48614,71 @@ function useHidAmicoService() {
|
|
|
48549
48614
|
await client.logout();
|
|
48550
48615
|
}
|
|
48551
48616
|
}
|
|
48617
|
+
async function resolvePermissionOrgId(reader, requested) {
|
|
48618
|
+
if (requested)
|
|
48619
|
+
return String(requested);
|
|
48620
|
+
const site = await siteRepo.getSiteById(String(reader.site));
|
|
48621
|
+
const orgId = String(site?.org ?? "");
|
|
48622
|
+
if (!orgId) {
|
|
48623
|
+
throw new import_node_server_utils141.BadRequestError("This site has no organisation, so HID access cannot be granted.");
|
|
48624
|
+
}
|
|
48625
|
+
return orgId;
|
|
48626
|
+
}
|
|
48627
|
+
async function addEnrolmentAssignment(reader, orgId, subject) {
|
|
48628
|
+
const siteId = String(reader.site);
|
|
48629
|
+
const readerId = String(reader._id);
|
|
48630
|
+
const scope = await getPermissionScope(orgId, siteId, readerId);
|
|
48631
|
+
const current = await repo.getSitePermissions(orgId, siteId);
|
|
48632
|
+
const assignments = current.assignments ?? [];
|
|
48633
|
+
if (assignments.some((item) => assignmentNamesSubject(item, subject, scope))) {
|
|
48634
|
+
return null;
|
|
48635
|
+
}
|
|
48636
|
+
const [resolved] = await repo.resolvePermissionAssignments(siteId, [
|
|
48637
|
+
{ ...subject, intercom: false }
|
|
48638
|
+
]);
|
|
48639
|
+
if (!resolved) {
|
|
48640
|
+
throw new import_node_server_utils141.BadRequestError("This person cannot be granted access at this site.");
|
|
48641
|
+
}
|
|
48642
|
+
const next = [...assignments, {
|
|
48643
|
+
...resolved,
|
|
48644
|
+
readerId: scope.readerId,
|
|
48645
|
+
location: scope.location,
|
|
48646
|
+
locationKey: scope.locationKey
|
|
48647
|
+
}];
|
|
48648
|
+
await repo.saveSitePermissions(orgId, siteId, next);
|
|
48649
|
+
return async () => {
|
|
48650
|
+
await repo.saveSitePermissions(orgId, siteId, assignments);
|
|
48651
|
+
};
|
|
48652
|
+
}
|
|
48653
|
+
async function removeEnrolmentAssignment(reader, subject) {
|
|
48654
|
+
const siteId = String(reader.site);
|
|
48655
|
+
const readerId = String(reader._id);
|
|
48656
|
+
const scope = {
|
|
48657
|
+
readerId,
|
|
48658
|
+
locationKey: normalizePermissionLocation(String(reader.location ?? ""))
|
|
48659
|
+
};
|
|
48660
|
+
const documents = await repo.listSitePermissionDocuments(siteId);
|
|
48661
|
+
const undos = [];
|
|
48662
|
+
for (const document2 of documents) {
|
|
48663
|
+
const assignments = document2.assignments ?? [];
|
|
48664
|
+
const next = assignments.filter((item) => !assignmentNamesSubject(item, subject, scope));
|
|
48665
|
+
if (next.length === assignments.length)
|
|
48666
|
+
continue;
|
|
48667
|
+
const orgId = String(document2.orgId ?? "");
|
|
48668
|
+
if (!orgId)
|
|
48669
|
+
continue;
|
|
48670
|
+
await repo.saveSitePermissions(orgId, siteId, next);
|
|
48671
|
+
undos.push(async () => {
|
|
48672
|
+
await repo.saveSitePermissions(orgId, siteId, assignments);
|
|
48673
|
+
});
|
|
48674
|
+
}
|
|
48675
|
+
if (!undos.length)
|
|
48676
|
+
return null;
|
|
48677
|
+
return async () => {
|
|
48678
|
+
for (const undo of undos)
|
|
48679
|
+
await undo();
|
|
48680
|
+
};
|
|
48681
|
+
}
|
|
48552
48682
|
async function resolveSubjectUser(site, value) {
|
|
48553
48683
|
const subject = value.person ? { subjectId: String(value.person), category: "resident" } : value.member ? { subjectId: String(value.member), category: "property_management" } : value.serviceProvider ? { subjectId: String(value.serviceProvider), category: "service_provider" } : null;
|
|
48554
48684
|
if (!subject) {
|
|
@@ -48580,6 +48710,7 @@ function useHidAmicoService() {
|
|
|
48580
48710
|
);
|
|
48581
48711
|
}
|
|
48582
48712
|
async function createIdentity(readerId, value) {
|
|
48713
|
+
const { orgId: requestedOrgId, ...identityValue } = value;
|
|
48583
48714
|
const reader = await repo.getById(readerId);
|
|
48584
48715
|
const linkedSubjects = [value.person, value.member, value.serviceProvider, value.visitor].filter(Boolean);
|
|
48585
48716
|
if (linkedSubjects.length !== 1) {
|
|
@@ -48600,7 +48731,7 @@ function useHidAmicoService() {
|
|
|
48600
48731
|
const subjectUser = await resolveSubjectUser(String(reader.site), value);
|
|
48601
48732
|
await assertSubjectNotEnrolled(readerId, value, subjectUser);
|
|
48602
48733
|
const identity = await repo.addIdentity({
|
|
48603
|
-
...
|
|
48734
|
+
...identityValue,
|
|
48604
48735
|
// Stored, not derived on read. It is how this row is recognised as the
|
|
48605
48736
|
// same human as one written by a different screen, and a `site.people`
|
|
48606
48737
|
// row can be re-pointed at another account after the fact.
|
|
@@ -48608,9 +48739,17 @@ function useHidAmicoService() {
|
|
|
48608
48739
|
reader: readerId,
|
|
48609
48740
|
site: value.site || reader?.site?.toString()
|
|
48610
48741
|
});
|
|
48742
|
+
let undoAssignment = null;
|
|
48611
48743
|
try {
|
|
48744
|
+
const subject = permissionSubjectOfIdentity(identityValue);
|
|
48745
|
+
if (subject) {
|
|
48746
|
+
const orgId = await resolvePermissionOrgId(reader, requestedOrgId);
|
|
48747
|
+
undoAssignment = await addEnrolmentAssignment(reader, orgId, subject);
|
|
48748
|
+
}
|
|
48612
48749
|
await reconcileStoredReaderPermissions(readerId);
|
|
48613
48750
|
} catch (error) {
|
|
48751
|
+
if (undoAssignment)
|
|
48752
|
+
await undoAssignment();
|
|
48614
48753
|
await repo.deleteIdentity(identity._id);
|
|
48615
48754
|
throw error;
|
|
48616
48755
|
}
|
|
@@ -48671,9 +48810,17 @@ function useHidAmicoService() {
|
|
|
48671
48810
|
async function deleteIdentity(identityId) {
|
|
48672
48811
|
const current = await repo.getIdentityById(identityId);
|
|
48673
48812
|
const identity = await repo.deleteIdentity(identityId);
|
|
48813
|
+
let undoAssignment = null;
|
|
48674
48814
|
try {
|
|
48815
|
+
const subject = permissionSubjectOfIdentity(current);
|
|
48816
|
+
if (subject) {
|
|
48817
|
+
const reader = await repo.getById(String(current.reader));
|
|
48818
|
+
undoAssignment = await removeEnrolmentAssignment(reader, subject);
|
|
48819
|
+
}
|
|
48675
48820
|
await reconcileStoredReaderPermissions(String(current.reader));
|
|
48676
48821
|
} catch (error) {
|
|
48822
|
+
if (undoAssignment)
|
|
48823
|
+
await undoAssignment();
|
|
48677
48824
|
await repo.updateIdentity(identityId, { status: current.status || "active", deletedAt: "" });
|
|
48678
48825
|
throw error;
|
|
48679
48826
|
}
|
|
@@ -93018,6 +93165,7 @@ function usePersonalEmergencyChainController() {
|
|
|
93018
93165
|
sessionSchema,
|
|
93019
93166
|
setIO,
|
|
93020
93167
|
shiftSchema,
|
|
93168
|
+
signLiveLink,
|
|
93021
93169
|
signPlaybackLink,
|
|
93022
93170
|
siteDayBounds,
|
|
93023
93171
|
siteModulesHandlers,
|
|
@@ -93269,6 +93417,7 @@ function usePersonalEmergencyChainController() {
|
|
|
93269
93417
|
vehicles_namespace_collection,
|
|
93270
93418
|
visitors_namespace_collection,
|
|
93271
93419
|
wallConfig,
|
|
93420
|
+
withLiveLink,
|
|
93272
93421
|
workOrderSchema,
|
|
93273
93422
|
work_orders2_namespace_collection,
|
|
93274
93423
|
work_orders_namespace_collection
|