@7365admin1/core 3.79.1-staging.344 → 3.79.1-staging.345

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,18 @@
1
+ ---
2
+ "@7365admin1/core": minor
3
+ ---
4
+
5
+ The robot's live position, streamed
6
+
7
+ Adds `robot-tracking.service.ts` and a `trackRobot` SSE endpoint. The parsing,
8
+ staleness and backoff shipped earlier were pure and tested but nothing opened a
9
+ connection, so nothing was ever live — the screens read `get-robot-list`, which
10
+ carries no position at all, and the 3D layout could not draw the robot.
11
+
12
+ The stream follows a viewer rather than running as a fleet-wide daemon: a screen
13
+ opens it, the API opens one upstream, and both close when the viewer leaves.
14
+
15
+ Events are ours, not the vendor's frames: a normalised pose, and an explicit
16
+ `lost` when the stream goes quiet — a screen has to tell "the robot is here"
17
+ from "we no longer know where the robot is", and the vendor's stream cannot say
18
+ the second thing.
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ import * as bson from 'bson';
6
6
  import * as qs from 'qs';
7
7
  import * as express_serve_static_core from 'express-serve-static-core';
8
8
  import { z } from 'zod';
9
+ import { Readable } from 'stream';
9
10
  import { Server } from 'socket.io';
10
11
 
11
12
  interface IBaseModel {
@@ -8141,6 +8142,75 @@ declare function createOunitechAdapter(credentials: TRobotCloudCredentials, opti
8141
8142
  */
8142
8143
  declare function registerOunitechBrand(): void;
8143
8144
 
8145
+ declare const ROBOT_CLOUD_TIMEOUT_MS: number;
8146
+
8147
+ /**
8148
+ * The live pose stream — the half that owns the socket.
8149
+ *
8150
+ * `robot-tracking.util.ts` has the parsing, the staleness rule and the backoff,
8151
+ * all pure and tested. This opens the connection and drives them.
8152
+ *
8153
+ * ## It follows a viewer, it is not a fleet-wide daemon
8154
+ *
8155
+ * A stream per robot held open forever would make a stateless API server
8156
+ * stateful: every instance behind the load balancer would hold its own copy of
8157
+ * every robot's connection, and the vendor's per-credential stream limit —
8158
+ * which we have asked about and do not yet know — would be hit by our own
8159
+ * scaling.
8160
+ *
8161
+ * So a stream lives exactly as long as somebody is watching. A screen opens it,
8162
+ * the API opens one upstream, and when the viewer leaves both close. That also
8163
+ * means the robot is not being polled at 5 Hz all night for nobody.
8164
+ *
8165
+ * ## Why it reconnects rather than failing
8166
+ *
8167
+ * The vendor's stream has no documented heartbeat, so a dead TCP connection and
8168
+ * a parked robot look identical. The idle watchdog treats silence past
8169
+ * `TRACKING_IDLE_TIMEOUT_MS` as a dead connection and reconnects with jittered
8170
+ * backoff — jitter because every robot on a site streams from the same cloud,
8171
+ * and a cloud restart drops them together.
8172
+ *
8173
+ * Every reconnect re-signs. The signature covers a timestamp, so a stale one is
8174
+ * refused — reusing the first signature would work once and then fail forever,
8175
+ * which reads as "the robot went offline".
8176
+ */
8177
+ type TTrackingEvent = {
8178
+ type: "pose";
8179
+ pose: TRobotPose;
8180
+ at: number;
8181
+ }
8182
+ /** The stream went quiet or dropped. The robot is not known to be anywhere. */
8183
+ | {
8184
+ type: "lost";
8185
+ reason: string;
8186
+ at: number;
8187
+ }
8188
+ /** Reconnected and receiving again. */
8189
+ | {
8190
+ type: "reconnected";
8191
+ at: number;
8192
+ };
8193
+ type TTrackingHandle = {
8194
+ /** Stop watching and close the upstream connection. Safe to call twice. */
8195
+ stop(): void;
8196
+ };
8197
+ type TStartOptions = {
8198
+ credentials: TRobotCloudCredentials;
8199
+ robotSn: string;
8200
+ onEvent: (event: TTrackingEvent) => void;
8201
+ baseUrl?: string;
8202
+ idleTimeoutMs?: number;
8203
+ /** Injected in tests so no socket is opened. */
8204
+ openStream?: (url: string, body: unknown) => Promise<Readable>;
8205
+ now?: () => number;
8206
+ };
8207
+ /**
8208
+ * Watch one robot's position until told to stop.
8209
+ *
8210
+ * Returns immediately with a handle; events arrive on the callback.
8211
+ */
8212
+ declare function startRobotTracking(options: TStartOptions): TTrackingHandle;
8213
+
8144
8214
  /**
8145
8215
  * The fleet endpoints: everything about a robot that lives in the vendor cloud.
8146
8216
  *
@@ -8176,6 +8246,7 @@ declare function useRobotFleetController(deps?: {
8176
8246
  getMapImages: (req: Request, res: Response, next: NextFunction) => Promise<void>;
8177
8247
  getPlans: (req: Request, res: Response, next: NextFunction) => Promise<void>;
8178
8248
  sendCommand: (req: Request, res: Response, next: NextFunction) => Promise<void>;
8249
+ trackRobot: (req: Request, res: Response, next: NextFunction) => Promise<void>;
8179
8250
  };
8180
8251
 
8181
8252
  type TPatrolQuestion = {
@@ -17150,4 +17221,4 @@ declare function usePersonalEmergencyChainController(): {
17150
17221
  update: (req: Request, res: Response, next: NextFunction) => Promise<void>;
17151
17222
  };
17152
17223
 
17153
- export { ANPRMode, APP_BASE_URLS, AUDIT_VALUE_MAX_LENGTH, AccessTypeProps, AppKey, AppServiceType, AssignCardConfig, BLOCKLIST_CATEGORIES, 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_SCALE_M_PER_PX, 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, LIFT_DOOR, LIFT_MODE, LIFT_MOTION, LIFT_REQUEST, LIVE_ROLE, LIVE_VEHICLE_STATUSES, 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, OCCUPANCY_ROLES, 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, OUNITECH_BRAND, OUNITECH_CAPABILITIES, OccupancyRole, OccupancyRoles, OrgNature, OvernightParkingRequestSort, OvernightParkingRequestStatus, PATROL_CCTV_CAMERA_FILTER, PATROL_EMAIL_MAX_LOGS, PATROL_EMAIL_MAX_PER_HOUR, PATROL_EMAIL_MAX_RECIPIENTS, PERSON_TYPES, PLAN_RANGE, 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, REGISTERED_VEHICLE_CATEGORIES, ROBOT_APP_SCOPES, ROBOT_CAPABILITIES, ROBOT_CLOUD_DOC_CONFIRMATIONS, ROBOT_CLOUD_PATHS, ROBOT_MODULE, ROBOT_PERMISSIONS, ROBOT_STATUS_NAMES, ROBOT_TYPES, ResidentAppModuleKey, RobotCloudError, 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, TAdapterCommand, TAdapterRobot, TAddress, TAffectedEntities, TAffectedInjured, TAppServiceType, TApprovedBy, TApprover, TAreaColour, 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, TCleanLevel, TCleanMode, TCleanOptionValues, TCleanOptions, TCleanSubMode, TCloudArea, TCloudFile, TCloudMap, TCloudPlan, TCloudPlanJob, TCloudRobot, 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, TFleetRobot, TFloorPlanLevel, TFloorPlanMap, TFloorSlab, 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, TLevelSolids, TLiftDoorState, TLiftDriver, TLiftMode, TLiftMotionState, TLiftRequest, TLiftRequestType, TLiftState, TManpowerDesignations, TManpowerDesignationsUpdate, TManpowerMonitoring, TManpowerMonitoringUpdate, TManpowerRemarks, TManpowerRemarksStatusUpdate, TManpowerRemarksUpdate, TManpowerSearchFilter, TManpowerSites, TMapDoor, TMapFloor, TMapMeasurement, TMapSegment, TMapVertex, TMapWall, TMember, TMemberModulesDeps, TMemberUpdateStatus, TMessagePreloved, TMiniRole, TModuleAccess, TModuleGateMode, TModuleImpact, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TNotification, TNotificationPreference, TNotificationPreferenceOff, TNotifyAccessContext, TNotifyAccessMode, TNotifyAccessReport, TOccupancyGrid, 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, TRACKING_BACKOFF_BASE_MS, TRACKING_BACKOFF_CAP_MS, TRACKING_IDLE_TIMEOUT_MS, TRANSPORT_DEVICE_HTTP, TRANSPORT_RELAY_PLAYBACK, TRANSPORT_RELAY_PLAYER, TRANSPORT_RTSP_FRAME, TRecipientOfComplaint, TRemarks, TResident, TResidentAppModules, TRobot, TRobotAction, TRobotAdapter, TRobotAppScope, TRobotCapabilities, TRobotCapability, TRobotCloudCredentials, TRobotCloudPath, TRobotCloudReply, TRobotCommand, TRobotLiveState, TRobotMetadata, TRobotMode, TRobotPermissionActor, TRobotPose, TRobotTier, TRobotType, 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, TSseEvent, TStatementOfAccount, TSubcategoryPreloved, TSubmissionForm, TSubscription, TSubscriptionPlan, TSubscriptionPlanApplication, TUnitBilling, TUnits, TUpdateFormEntry, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleAnprCamera, TVehicleHistoryEntry, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationCode, TVerificationEvent, TVerificationMetadata, TVerificationMetadataV2, TVerificationOnboarding, TVerificationV2, TVisitorTransaction, TWallSolid, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UNSTORED_COLUMNS, UseAccessManagementRepo, UserStatus, VEHICLE_HISTORY_LIMIT, VERIFICATION_OPEN_STATUSES, VehicleCategory, VehicleListView, VehicleOrder, VehicleSort, VehicleStatus, VehicleType, VerificationLinkType, VerificationStatus, VerificationSubjectType, VerificationType, VisitorSort, VisitorStatus, WALL_HEIGHT_M, WALL_THICKNESS_M, addressSchema, allowedFieldsSite, allowedNatures, allowedPlanApplications, allowsRobotAction, allowsRobotListing, applyTrackingFrame, areaColourToHex, attendanceSchema, attendanceSettingsSchema, buildSelfServiceEmailContext, buildingMapFromRobotMaps, buildingSolids, 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, canMonitorRobotType, canRevokeRefreshTokenFamily, canSetUpRobotType, categoriesForPermissions, categorySupportsChannel, chatPrelovedEvents, chatSchema, claimReadsAsStale, clampPtzSpeed, clearRobotAdapters, clockDriftSeconds, commandSupported, consoleRoleAllows, consoleRoleAllowsAll, consoleSpellings, console_audit_namespace_collection, createLiftSimulator, createManpowerRemarksDaily, createOunitechAdapter, createSseParser, customerSchema, customerSitePropertyFields, decideSelfServiceResend, decideServiceProviderInvite, decodeHidPacsCard, decodeTrackingFrame, deniedModules, deriveBulletinStatus, deriveCameraHost, describeCameraCapabilities, designationsSchema, deviceControlEnabled, deviceHttpEnabled, deviceHttpTargets, deviceHttpTimeoutMs, deviceProbeTtlSeconds, disconnectedState, 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, hexToAreaColour, hidRawUint64, holdsLift, holdsRole, incidentReport, incidentReportLog, incidents_namespace_collection, invitationOffersRole, isAvailableForWork, isCameraEntitled, isDispatchable, isDuplicateMemberError, isDuplicateVersionError, isLiftAvailable, isLikelySelfServiceEmail, isLiveVehicleStatus, isPatrolCctvCamera, isPlatformOwner, isPromoCodeExpired, isRelayPlayerUrl, isSafeRelativePath, isSafeToCross, isSeasonPassVehicle, isSuperAdmin, isTermsCurrent, isTrackingStale, isValidTimezone, levelPixelToMetres, levelScale, levelSolids, listStaffUserIds, liveStatusFor, logCamera, manpowerDesignationsSchema, manpowerEvents, manpowerMonitoringSchema, manpowerRemarksSchema, manpowerSitesSchema, mapWithLimit, maskNric, memberModulesHandlers, metresToPixel, missingForTier, moduleDeniedForCaller, moduleGateEnforceKeys, moduleGateMode, moduleImpact, moduleListGateOn, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, normalizeAcceptedTerms, normalizeHidCardValue, notificationAccessReport, notificationCategory, notificationCategoryLabel, notificationEvents, notificationRoom, notifyAccessMode, occasionForStatus, occurrence_book_namespace_collection, onBookTimezonesChanged, online_forms_namespace_collection, orgLevelRoles, orgModulesHandlers, orgOwnerRepairHandlers, orgOwnerRepairOn, orgQualifiesForOwnerRepair, orgSchema, overnight_parking_requests_namespace_collection, ownerFlagFor, parseCameraChannel, parseCameraHost, parseDahuaFind, parseDeviceTime, parseHidJsonLossless, parsePromoExpiry, parseRobotCommand, parseSoftwareVersion, pickAuditFields, pickCustomerSiteProperties, pixelToMetres, planBulkCameraImport, planDayFromJsDay, planOrgOwnerRepair, platform_terms_namespace_collection, playbackRelays, playbackWindowRefusal, promoCodeRefusal, promoCodeSchema, promoCodeStatusSchema, promoCodeUpdate, promoCodeUpdateSchema, ptzEndpoint, publicCameraFields, readsAsApprovedAccount, recordConsoleAction, refuseServiceProviderInviteAction, registerCameraTransport, registerOunitechBrand, registerRobotAdapter, registeredRobotBrands, relayForRecorder, remarksSchema, renderPagePdf, requireConsolePermission, requirePlatformStaff, resetCameraTransports, residentAppModuleKeys, residentAppModulesSchema, residentFormEntry, resolutionRefusalReason, resolveCamera, resolveDeviceHttp, resolveHidPhysicalCardValue, resolveInviteActor, resolveSiteTimezone, resolveStaffRole, robotActionsFor, robotAdapterFor, robotCloudBody, robotCloudSign, robotCloudSigningString, robotCloudTimestamp, robotMode, robotModeFromList, robotSchema, robotScopeForApp, robotTier, robotTypesVisibleTo, rtspUrl, scaleFromMeasurement, 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, servesFloor, serviceProviderInviteLabel, sessionSchema, setIO, shiftSchema, signLiveLink, signPlaybackLink, siteDayBounds, siteModulesHandlers, siteSchema, site_people_namespace_collection, snapshotEndpoint, snapshotRefusalReason, staffMayBypass, startTodaysBookForSite, stringifyHidJson, stripFacialImageMetadata, subscriptionPlanSchema, summariseBulkCameraPlan, supports, toExpiryDate, trackingBackoffMs, uncontrollableFleetWarning, 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, useRobotCloudService, useRobotController, useRobotFleetController, useRobotFleetService, 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, vehicleCategoryFor, vehicleHistoryEntry, vehicleListViewQuery, vehicleSchema, vehicleViewOf, vehicles_namespace_collection, vertexDistancePx, visitorPersonRepo, visitorPersonService, visitorType, visitors_namespace_collection, wallConfig, wallsFromOccupancyGrid, withLiveLink, workOrderSchema, work_orders2_namespace_collection, work_orders_namespace_collection };
17224
+ export { ANPRMode, APP_BASE_URLS, AUDIT_VALUE_MAX_LENGTH, AccessTypeProps, AppKey, AppServiceType, AssignCardConfig, BLOCKLIST_CATEGORIES, 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_SCALE_M_PER_PX, 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, LIFT_DOOR, LIFT_MODE, LIFT_MOTION, LIFT_REQUEST, LIVE_ROLE, LIVE_VEHICLE_STATUSES, 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, OCCUPANCY_ROLES, 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, OUNITECH_BRAND, OUNITECH_CAPABILITIES, OccupancyRole, OccupancyRoles, OrgNature, OvernightParkingRequestSort, OvernightParkingRequestStatus, PATROL_CCTV_CAMERA_FILTER, PATROL_EMAIL_MAX_LOGS, PATROL_EMAIL_MAX_PER_HOUR, PATROL_EMAIL_MAX_RECIPIENTS, PERSON_TYPES, PLAN_RANGE, 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, REGISTERED_VEHICLE_CATEGORIES, ROBOT_APP_SCOPES, ROBOT_CAPABILITIES, ROBOT_CLOUD_DOC_CONFIRMATIONS, ROBOT_CLOUD_PATHS, ROBOT_CLOUD_TIMEOUT_MS, ROBOT_MODULE, ROBOT_PERMISSIONS, ROBOT_STATUS_NAMES, ROBOT_TYPES, ResidentAppModuleKey, RobotCloudError, 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, TAdapterCommand, TAdapterRobot, TAddress, TAffectedEntities, TAffectedInjured, TAppServiceType, TApprovedBy, TApprover, TAreaColour, 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, TCleanLevel, TCleanMode, TCleanOptionValues, TCleanOptions, TCleanSubMode, TCloudArea, TCloudFile, TCloudMap, TCloudPlan, TCloudPlanJob, TCloudRobot, 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, TFleetRobot, TFloorPlanLevel, TFloorPlanMap, TFloorSlab, 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, TLevelSolids, TLiftDoorState, TLiftDriver, TLiftMode, TLiftMotionState, TLiftRequest, TLiftRequestType, TLiftState, TManpowerDesignations, TManpowerDesignationsUpdate, TManpowerMonitoring, TManpowerMonitoringUpdate, TManpowerRemarks, TManpowerRemarksStatusUpdate, TManpowerRemarksUpdate, TManpowerSearchFilter, TManpowerSites, TMapDoor, TMapFloor, TMapMeasurement, TMapSegment, TMapVertex, TMapWall, TMember, TMemberModulesDeps, TMemberUpdateStatus, TMessagePreloved, TMiniRole, TModuleAccess, TModuleGateMode, TModuleImpact, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TNotification, TNotificationPreference, TNotificationPreferenceOff, TNotifyAccessContext, TNotifyAccessMode, TNotifyAccessReport, TOccupancyGrid, 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, TRACKING_BACKOFF_BASE_MS, TRACKING_BACKOFF_CAP_MS, TRACKING_IDLE_TIMEOUT_MS, TRANSPORT_DEVICE_HTTP, TRANSPORT_RELAY_PLAYBACK, TRANSPORT_RELAY_PLAYER, TRANSPORT_RTSP_FRAME, TRecipientOfComplaint, TRemarks, TResident, TResidentAppModules, TRobot, TRobotAction, TRobotAdapter, TRobotAppScope, TRobotCapabilities, TRobotCapability, TRobotCloudCredentials, TRobotCloudPath, TRobotCloudReply, TRobotCommand, TRobotLiveState, TRobotMetadata, TRobotMode, TRobotPermissionActor, TRobotPose, TRobotTier, TRobotType, 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, TSseEvent, TStatementOfAccount, TSubcategoryPreloved, TSubmissionForm, TSubscription, TSubscriptionPlan, TSubscriptionPlanApplication, TTrackingEvent, TTrackingHandle, TUnitBilling, TUnits, TUpdateFormEntry, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleAnprCamera, TVehicleHistoryEntry, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationCode, TVerificationEvent, TVerificationMetadata, TVerificationMetadataV2, TVerificationOnboarding, TVerificationV2, TVisitorTransaction, TWallSolid, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UNSTORED_COLUMNS, UseAccessManagementRepo, UserStatus, VEHICLE_HISTORY_LIMIT, VERIFICATION_OPEN_STATUSES, VehicleCategory, VehicleListView, VehicleOrder, VehicleSort, VehicleStatus, VehicleType, VerificationLinkType, VerificationStatus, VerificationSubjectType, VerificationType, VisitorSort, VisitorStatus, WALL_HEIGHT_M, WALL_THICKNESS_M, addressSchema, allowedFieldsSite, allowedNatures, allowedPlanApplications, allowsRobotAction, allowsRobotListing, applyTrackingFrame, areaColourToHex, attendanceSchema, attendanceSettingsSchema, buildSelfServiceEmailContext, buildingMapFromRobotMaps, buildingSolids, 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, canMonitorRobotType, canRevokeRefreshTokenFamily, canSetUpRobotType, categoriesForPermissions, categorySupportsChannel, chatPrelovedEvents, chatSchema, claimReadsAsStale, clampPtzSpeed, clearRobotAdapters, clockDriftSeconds, commandSupported, consoleRoleAllows, consoleRoleAllowsAll, consoleSpellings, console_audit_namespace_collection, createLiftSimulator, createManpowerRemarksDaily, createOunitechAdapter, createSseParser, customerSchema, customerSitePropertyFields, decideSelfServiceResend, decideServiceProviderInvite, decodeHidPacsCard, decodeTrackingFrame, deniedModules, deriveBulletinStatus, deriveCameraHost, describeCameraCapabilities, designationsSchema, deviceControlEnabled, deviceHttpEnabled, deviceHttpTargets, deviceHttpTimeoutMs, deviceProbeTtlSeconds, disconnectedState, 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, hexToAreaColour, hidRawUint64, holdsLift, holdsRole, incidentReport, incidentReportLog, incidents_namespace_collection, invitationOffersRole, isAvailableForWork, isCameraEntitled, isDispatchable, isDuplicateMemberError, isDuplicateVersionError, isLiftAvailable, isLikelySelfServiceEmail, isLiveVehicleStatus, isPatrolCctvCamera, isPlatformOwner, isPromoCodeExpired, isRelayPlayerUrl, isSafeRelativePath, isSafeToCross, isSeasonPassVehicle, isSuperAdmin, isTermsCurrent, isTrackingStale, isValidTimezone, levelPixelToMetres, levelScale, levelSolids, listStaffUserIds, liveStatusFor, logCamera, manpowerDesignationsSchema, manpowerEvents, manpowerMonitoringSchema, manpowerRemarksSchema, manpowerSitesSchema, mapWithLimit, maskNric, memberModulesHandlers, metresToPixel, missingForTier, moduleDeniedForCaller, moduleGateEnforceKeys, moduleGateMode, moduleImpact, moduleListGateOn, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, normalizeAcceptedTerms, normalizeHidCardValue, notificationAccessReport, notificationCategory, notificationCategoryLabel, notificationEvents, notificationRoom, notifyAccessMode, occasionForStatus, occurrence_book_namespace_collection, onBookTimezonesChanged, online_forms_namespace_collection, orgLevelRoles, orgModulesHandlers, orgOwnerRepairHandlers, orgOwnerRepairOn, orgQualifiesForOwnerRepair, orgSchema, overnight_parking_requests_namespace_collection, ownerFlagFor, parseCameraChannel, parseCameraHost, parseDahuaFind, parseDeviceTime, parseHidJsonLossless, parsePromoExpiry, parseRobotCommand, parseSoftwareVersion, pickAuditFields, pickCustomerSiteProperties, pixelToMetres, planBulkCameraImport, planDayFromJsDay, planOrgOwnerRepair, platform_terms_namespace_collection, playbackRelays, playbackWindowRefusal, promoCodeRefusal, promoCodeSchema, promoCodeStatusSchema, promoCodeUpdate, promoCodeUpdateSchema, ptzEndpoint, publicCameraFields, readsAsApprovedAccount, recordConsoleAction, refuseServiceProviderInviteAction, registerCameraTransport, registerOunitechBrand, registerRobotAdapter, registeredRobotBrands, relayForRecorder, remarksSchema, renderPagePdf, requireConsolePermission, requirePlatformStaff, resetCameraTransports, residentAppModuleKeys, residentAppModulesSchema, residentFormEntry, resolutionRefusalReason, resolveCamera, resolveDeviceHttp, resolveHidPhysicalCardValue, resolveInviteActor, resolveSiteTimezone, resolveStaffRole, robotActionsFor, robotAdapterFor, robotCloudBody, robotCloudSign, robotCloudSigningString, robotCloudTimestamp, robotMode, robotModeFromList, robotSchema, robotScopeForApp, robotTier, robotTypesVisibleTo, rtspUrl, scaleFromMeasurement, 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, servesFloor, serviceProviderInviteLabel, sessionSchema, setIO, shiftSchema, signLiveLink, signPlaybackLink, siteDayBounds, siteModulesHandlers, siteSchema, site_people_namespace_collection, snapshotEndpoint, snapshotRefusalReason, staffMayBypass, startRobotTracking, startTodaysBookForSite, stringifyHidJson, stripFacialImageMetadata, subscriptionPlanSchema, summariseBulkCameraPlan, supports, toExpiryDate, trackingBackoffMs, uncontrollableFleetWarning, 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, useRobotCloudService, useRobotController, useRobotFleetController, useRobotFleetService, 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, vehicleCategoryFor, vehicleHistoryEntry, vehicleListViewQuery, vehicleSchema, vehicleViewOf, vehicles_namespace_collection, vertexDistancePx, visitorPersonRepo, visitorPersonService, visitorType, visitors_namespace_collection, wallConfig, wallsFromOccupancyGrid, withLiveLink, workOrderSchema, work_orders2_namespace_collection, work_orders_namespace_collection };
package/dist/index.js CHANGED
@@ -250,6 +250,7 @@ __export(src_exports, {
250
250
  ROBOT_CAPABILITIES: () => ROBOT_CAPABILITIES,
251
251
  ROBOT_CLOUD_DOC_CONFIRMATIONS: () => ROBOT_CLOUD_DOC_CONFIRMATIONS,
252
252
  ROBOT_CLOUD_PATHS: () => ROBOT_CLOUD_PATHS,
253
+ ROBOT_CLOUD_TIMEOUT_MS: () => ROBOT_CLOUD_TIMEOUT_MS,
253
254
  ROBOT_MODULE: () => ROBOT_MODULE,
254
255
  ROBOT_PERMISSIONS: () => ROBOT_PERMISSIONS,
255
256
  ROBOT_STATUS_NAMES: () => ROBOT_STATUS_NAMES,
@@ -693,6 +694,7 @@ __export(src_exports, {
693
694
  snapshotEndpoint: () => snapshotEndpoint,
694
695
  snapshotRefusalReason: () => snapshotRefusalReason,
695
696
  staffMayBypass: () => staffMayBypass,
697
+ startRobotTracking: () => startRobotTracking,
696
698
  startTodaysBookForSite: () => startTodaysBookForSite,
697
699
  stringifyHidJson: () => stringifyHidJson,
698
700
  stripFacialImageMetadata: () => stripFacialImageMetadata,
@@ -61830,6 +61832,145 @@ function registerOunitechBrand() {
61830
61832
  });
61831
61833
  }
61832
61834
 
61835
+ // src/services/robot-tracking.service.ts
61836
+ var import_axios4 = __toESM(require("axios"));
61837
+ async function openWithAxios(url, body) {
61838
+ const response = await import_axios4.default.post(url, body, {
61839
+ responseType: "stream",
61840
+ // No read timeout: this connection is SUPPOSED to stay open and mostly
61841
+ // silent. A request timeout here would sever a healthy stream on a quiet
61842
+ // robot. The idle watchdog is what decides a stream is dead, because it can
61843
+ // tell silence from a closed socket.
61844
+ timeout: 0,
61845
+ headers: { "Content-Type": "application/json", Accept: "text/event-stream" }
61846
+ });
61847
+ return response.data;
61848
+ }
61849
+ function startRobotTracking(options) {
61850
+ const {
61851
+ credentials,
61852
+ robotSn,
61853
+ onEvent,
61854
+ baseUrl = ROBOT_CLOUD_BASE_URL,
61855
+ idleTimeoutMs = TRACKING_IDLE_TIMEOUT_MS,
61856
+ openStream = openWithAxios,
61857
+ now = Date.now
61858
+ } = options;
61859
+ if (!baseUrl)
61860
+ throw new Error("Robot cloud: ROBOT_CLOUD_BASE_URL is not configured.");
61861
+ let stopped = false;
61862
+ let attempt = 0;
61863
+ let current = null;
61864
+ let watchdog = null;
61865
+ let retry = null;
61866
+ let lastActivityAt = now();
61867
+ let everConnected = false;
61868
+ const parser = createSseParser();
61869
+ function clearTimers() {
61870
+ if (watchdog) {
61871
+ clearInterval(watchdog);
61872
+ watchdog = null;
61873
+ }
61874
+ if (retry) {
61875
+ clearTimeout(retry);
61876
+ retry = null;
61877
+ }
61878
+ }
61879
+ function dropUpstream() {
61880
+ if (!current)
61881
+ return;
61882
+ try {
61883
+ current.destroy();
61884
+ } catch {
61885
+ }
61886
+ current = null;
61887
+ }
61888
+ function lose(reason) {
61889
+ if (stopped)
61890
+ return;
61891
+ onEvent({ type: "lost", reason, at: now() });
61892
+ dropUpstream();
61893
+ scheduleReconnect();
61894
+ }
61895
+ function scheduleReconnect() {
61896
+ if (stopped)
61897
+ return;
61898
+ clearTimers();
61899
+ const delay2 = trackingBackoffMs(attempt++);
61900
+ retry = setTimeout(connect2, delay2);
61901
+ }
61902
+ async function connect2() {
61903
+ if (stopped)
61904
+ return;
61905
+ const body = robotCloudBody(
61906
+ credentials.appid,
61907
+ credentials.secret,
61908
+ ROBOT_CLOUD_PATHS.tracking,
61909
+ { robotSn }
61910
+ );
61911
+ let stream;
61912
+ try {
61913
+ stream = await openStream(
61914
+ `${baseUrl.replace(/\/+$/, "")}${ROBOT_CLOUD_PATHS.tracking}`,
61915
+ body
61916
+ );
61917
+ } catch (error) {
61918
+ lose(error?.message ?? "Could not open the robot's tracking stream.");
61919
+ return;
61920
+ }
61921
+ if (stopped) {
61922
+ try {
61923
+ stream.destroy();
61924
+ } catch {
61925
+ }
61926
+ return;
61927
+ }
61928
+ parser.reset();
61929
+ current = stream;
61930
+ lastActivityAt = now();
61931
+ if (everConnected)
61932
+ onEvent({ type: "reconnected", at: now() });
61933
+ everConnected = true;
61934
+ attempt = 0;
61935
+ stream.on("data", (chunk) => {
61936
+ if (stopped)
61937
+ return;
61938
+ const { events, sawActivity } = parser.push(chunk.toString("utf8"));
61939
+ if (sawActivity)
61940
+ lastActivityAt = now();
61941
+ for (const event of events) {
61942
+ const pose = decodeTrackingFrame(event.data);
61943
+ if (pose)
61944
+ onEvent({ type: "pose", pose, at: now() });
61945
+ }
61946
+ });
61947
+ stream.on("error", (error) => lose(error?.message ?? "The tracking stream failed."));
61948
+ stream.on("end", () => lose("The robot cloud closed the tracking stream."));
61949
+ stream.on("close", () => {
61950
+ if (!stopped && current === stream)
61951
+ lose("The tracking stream closed.");
61952
+ });
61953
+ clearTimers();
61954
+ watchdog = setInterval(() => {
61955
+ if (stopped)
61956
+ return;
61957
+ if (now() - lastActivityAt >= idleTimeoutMs) {
61958
+ lose("The robot stopped reporting.");
61959
+ }
61960
+ }, Math.max(1e3, Math.floor(idleTimeoutMs / 3)));
61961
+ }
61962
+ void connect2();
61963
+ return {
61964
+ stop() {
61965
+ if (stopped)
61966
+ return;
61967
+ stopped = true;
61968
+ clearTimers();
61969
+ dropUpstream();
61970
+ }
61971
+ };
61972
+ }
61973
+
61833
61974
  // src/controllers/robot-fleet.controller.ts
61834
61975
  var import_joi76 = __toESM(require("joi"));
61835
61976
  var import_node_server_utils158 = require("@7365admin1/node-server-utils");
@@ -61908,7 +62049,55 @@ function useRobotFleetController(deps) {
61908
62049
  fail(next, error);
61909
62050
  }
61910
62051
  }
61911
- return { getState, getMaps, getMapImages, getPlans, sendCommand: sendCommand2 };
62052
+ async function trackRobot(req, res, next) {
62053
+ let robot;
62054
+ let robotSn;
62055
+ try {
62056
+ robot = await entitleRobot(req, req.params.id);
62057
+ robotSn = await getFleet().resolveRobotSn(robot);
62058
+ } catch (error) {
62059
+ fail(next, error);
62060
+ return;
62061
+ }
62062
+ res.writeHead(200, {
62063
+ "Content-Type": "text/event-stream",
62064
+ "Cache-Control": "no-cache, no-transform",
62065
+ Connection: "keep-alive",
62066
+ // Nginx buffers proxied responses by default, which holds an SSE stream
62067
+ // until the buffer fills - the stream appears dead for minutes.
62068
+ "X-Accel-Buffering": "no"
62069
+ });
62070
+ res.flushHeaders?.();
62071
+ const send2 = (event) => {
62072
+ if (res.writableEnded)
62073
+ return;
62074
+ res.write(`data: ${JSON.stringify(event)}
62075
+
62076
+ `);
62077
+ };
62078
+ const handle = startRobotTracking({
62079
+ credentials: {
62080
+ appid: (robot.appKey ?? "").trim(),
62081
+ secret: (robot.appToken ?? "").trim()
62082
+ },
62083
+ robotSn,
62084
+ onEvent: send2
62085
+ });
62086
+ const keepAlive = setInterval(() => {
62087
+ if (!res.writableEnded)
62088
+ res.write(": keep-alive\n\n");
62089
+ }, 15e3);
62090
+ const close = () => {
62091
+ clearInterval(keepAlive);
62092
+ handle.stop();
62093
+ if (!res.writableEnded)
62094
+ res.end();
62095
+ };
62096
+ req.on("close", close);
62097
+ req.on("aborted", close);
62098
+ res.on("error", close);
62099
+ }
62100
+ return { getState, getMaps, getMapImages, getPlans, sendCommand: sendCommand2, trackRobot };
61912
62101
  }
61913
62102
 
61914
62103
  // src/models/patrol-question.model.ts
@@ -82555,7 +82744,7 @@ var MManpowerMonitoring = class {
82555
82744
  var import_node_server_utils248 = require("@7365admin1/node-server-utils");
82556
82745
 
82557
82746
  // src/utils/hrmlabs-attendance.util.ts
82558
- var import_axios4 = __toESM(require("axios"));
82747
+ var import_axios5 = __toESM(require("axios"));
82559
82748
  var import_moment_timezone7 = __toESM(require("moment-timezone"));
82560
82749
  var default_early_checkIn = 4;
82561
82750
  async function hrmLabsAuthentication({
@@ -82564,7 +82753,7 @@ async function hrmLabsAuthentication({
82564
82753
  password,
82565
82754
  domain
82566
82755
  }) {
82567
- const res = await import_axios4.default.post(
82756
+ const res = await import_axios5.default.post(
82568
82757
  authUrl,
82569
82758
  {
82570
82759
  grant_type: "password",
@@ -82594,7 +82783,7 @@ async function fetchAttendanceData({
82594
82783
  search
82595
82784
  }) {
82596
82785
  try {
82597
- const res = await import_axios4.default.post(
82786
+ const res = await import_axios5.default.post(
82598
82787
  attendanceUrl,
82599
82788
  {
82600
82789
  start: startDate,
@@ -82794,7 +82983,7 @@ async function fetchSites({ siteUrl, token }) {
82794
82983
  do {
82795
82984
  try {
82796
82985
  attempt++;
82797
- const res = await import_axios4.default.get(siteUrl, {
82986
+ const res = await import_axios5.default.get(siteUrl, {
82798
82987
  headers: { Authorization: `Bearer ${token}` },
82799
82988
  timeout: 15e3
82800
82989
  });
@@ -86392,7 +86581,7 @@ async function manpowerEvents(io) {
86392
86581
  }
86393
86582
 
86394
86583
  // src/services/reddot-payment.service.ts
86395
- var import_axios5 = __toESM(require("axios"));
86584
+ var import_axios6 = __toESM(require("axios"));
86396
86585
 
86397
86586
  // src/utils/payment-signature.util.ts
86398
86587
  var crypto9 = __toESM(require("crypto"));
@@ -87026,7 +87215,7 @@ var useRedDotPaymentSvc = () => {
87026
87215
  );
87027
87216
  }
87028
87217
  const url = process.env.MERCHANT_PAYMENT;
87029
- const response = await import_axios5.default.post(url, dataString, { headers });
87218
+ const response = await import_axios6.default.post(url, dataString, { headers });
87030
87219
  const result = response.data;
87031
87220
  return result;
87032
87221
  } catch (error) {
@@ -87060,7 +87249,7 @@ var useRedDotPaymentSvc = () => {
87060
87249
  );
87061
87250
  }
87062
87251
  const url = process.env.MERCHANT_ENQUIRY;
87063
- const response = await import_axios5.default.post(url, dataString, { headers });
87252
+ const response = await import_axios6.default.post(url, dataString, { headers });
87064
87253
  const result = response.data;
87065
87254
  const transactionId = result.transaction_id;
87066
87255
  const amount = result.request_amount || 0;
@@ -95878,6 +96067,7 @@ function usePersonalEmergencyChainController() {
95878
96067
  ROBOT_CAPABILITIES,
95879
96068
  ROBOT_CLOUD_DOC_CONFIRMATIONS,
95880
96069
  ROBOT_CLOUD_PATHS,
96070
+ ROBOT_CLOUD_TIMEOUT_MS,
95881
96071
  ROBOT_MODULE,
95882
96072
  ROBOT_PERMISSIONS,
95883
96073
  ROBOT_STATUS_NAMES,
@@ -96321,6 +96511,7 @@ function usePersonalEmergencyChainController() {
96321
96511
  snapshotEndpoint,
96322
96512
  snapshotRefusalReason,
96323
96513
  staffMayBypass,
96514
+ startRobotTracking,
96324
96515
  startTodaysBookForSite,
96325
96516
  stringifyHidJson,
96326
96517
  stripFacialImageMetadata,