@7365admin1/core 3.47.1-staging.131 → 3.47.1-staging.133

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,71 @@
1
+ ---
2
+ "@7365admin1/core": minor
3
+ ---
4
+
5
+ Only Seven365 staff can create a Seven365 staff membership.
6
+
7
+ `members.type` decides who is platform staff. `isSuperAdmin` answers true for a
8
+ live `members` row of type `"admin"` whose role is also of type `"admin"`, and
9
+ that field was validated as `Joi.string().required()` — a free-form string with
10
+ no allow-list. Every request path that writes a membership takes the value
11
+ straight from the caller:
12
+
13
+ - `POST /api/members/direct` writes the body's `app` verbatim as `type`
14
+ (`member.service.ts:137`);
15
+ - `POST /api/auth/invite` stores the body's `app` on the invitation, and
16
+ accepting it writes that value as `type` (`member.service.ts:73`);
17
+ - `PUT /api/members/id/:id/role/:role/type/:type/org/:org` re-pointed a
18
+ membership at any role, including the seeded platform one, checking only that
19
+ an owner role existed and that the target was not the last owner — never who
20
+ was asking.
21
+
22
+ All three are `requireAuth`-only. So any signed-in account — a resident, a
23
+ cleaner, a guard — could post `{ app: "admin" }`, or invite itself as `admin`
24
+ and accept its own invitation, and be Seven365 platform staff on the next
25
+ request. That defeats every gate built on `isSuperAdmin`: the staff console,
26
+ service-provider approvals, the notification broadcast and client suspension.
27
+ Executed end to end against a throwaway in-memory database, the chain succeeded
28
+ at every step.
29
+
30
+ Three changes, all fail-closed:
31
+
32
+ - `members.type` now validates against `MEMBER_TYPES`, enumerated from the
33
+ values this package actually writes — `admin` (`user.service.ts`
34
+ `createDefaultUser` and the console's own invitations), `organization` (the
35
+ default in `member.service.ts`, `user.service.ts`, `user-v2.service.ts` and
36
+ `subscription.service.ts`), `resident` (`person.service.ts`), and the eight
37
+ `AppServiceType` service memberships, the same list `organization.model.ts`
38
+ already accepts as an organisation's `nature`.
39
+ - `createMemberDirect` refuses `app: "admin"`, and refuses a role of type
40
+ `"admin"`, unless the caller is already platform staff. The caller is resolved
41
+ from the session by the controller and passed in; it is never read from a body
42
+ or a URL.
43
+ - `createUserInvite` refuses `app: "admin"` unless the caller is already
44
+ platform staff, so the invitation road to the same place is shut too.
45
+
46
+ `updateRoleById` refuses to move a membership onto a role of type `"admin"` for
47
+ the same reason — that was step 6 of the chain, the one that turned
48
+ `isPlatformOwner` true by pointing a membership at the seeded owner role.
49
+
50
+ The seeded role marker `default: true` was re-checked rather than assumed and is
51
+ still not forgeable: Joi rejects unknown keys on all three role schemas.
52
+
53
+ Every legitimate caller across the sibling repos was checked and still works.
54
+ `web-app-main pages/sign-in.vue` and `pages/verify/email/index.vue`, and
55
+ `web-app-org pages/onboarding/getting-started/index.vue`, all pass
56
+ `app: "organization"` or a service type — none reaches a gate. The one caller
57
+ that does send `"admin"` is the staff console itself
58
+ (`web-app-org pages/super-admin/invitations/index.vue:403`), operated by an
59
+ account that already is staff.
60
+
61
+ One transitional case is kept deliberately. `web-app-org
62
+ pages/org/[organization]/invitations/invite.vue:122` and `web-app-hygiene
63
+ pages/[org]/[site]/invitations/invite.vue:135` send the ORGANISATION ID as the
64
+ invitation's `app`, so accepting one of those invitations writes an org id into
65
+ `members.type`. That is a defect in those two screens, but it is live: the
66
+ validator therefore also accepts a 24-character hex string, with the two file
67
+ references named at the line, to be removed once both screens send a real
68
+ membership type. It cannot be used to escalate — `"admin"` is not 24 hex
69
+ characters, so the allow-list still decides that.
70
+
71
+ No response shape, status code or field changed for a permitted caller.
@@ -0,0 +1,58 @@
1
+ ---
2
+ "@7365admin1/core": minor
3
+ ---
4
+
5
+ Scope role writes to the role's own organisation, and reserve platform roles for Seven365 staff.
6
+
7
+ Every write on `role.controller.ts` carried `requireAuth` and nothing more, and
8
+ the role id comes from the URL. So any signed-in account on the platform — a
9
+ resident, a cleaner, a guard — could reach any organisation's roles:
10
+
11
+ - `PATCH /api/roles/permissions/id/:id` rewrote another client's role, including
12
+ its owner role. Executed against a throwaway database during the audit, an
13
+ outsider rewrote a second organisation's owner role and got a 200.
14
+ - `PATCH /api/roles/id/:id` renamed it and replaced its permissions.
15
+ - `PUT /api/roles/deleted/role` and `PUT /api/roles/:id/delete-with-reassignments`
16
+ deleted it, the second one moving its members onto other roles on the way.
17
+ - `GET /api/roles/:id/deletion-preview` listed the members holding it — another
18
+ client's staff list by another name.
19
+ - `POST /api/roles` and `POST /api/roles/v2` minted a role of `type: "admin"` —
20
+ the half of `isSuperAdmin` that lives in the roles collection.
21
+
22
+ Each of the five writes now loads the role first and authorises on the
23
+ organisation stored ON THAT ROLE, never on one the caller supplied:
24
+
25
+ - a role carrying an `org` is a tenant's, and goes through `requireOrgAccess` —
26
+ Seven365 staff, or a live member of that organisation. That is the rule the
27
+ invitation and subscription paths already use; no new mechanism is introduced.
28
+ - a role with NO `org` is a platform role — the staff console's own, and the one
29
+ `createDefaultUser` seeds — and only Seven365 staff may touch it. A missing org
30
+ is refused, not waved through.
31
+
32
+ `createRole` on both `/api/roles` and `/api/roles/v2` requires the caller to be
33
+ platform staff before it will accept `type: "admin"`. `/api/roles/v2` is a
34
+ separate mount onto a separate controller, so gating one and not the other would
35
+ have left the hole reachable by adding `/v2` to the URL.
36
+
37
+ A role the caller may not reach is reported the same as a role that does not
38
+ exist, so role ids cannot be enumerated by watching the difference.
39
+
40
+ Two things are deliberately NOT changed, and are asserted in the tests so they
41
+ read as decisions rather than oversights. `createRole` is not scoped to the
42
+ caller's own organisation, and neither are the role reads: `web-app-main
43
+ pages/sign-in.vue:311,439` and `pages/verify/email/index.vue:474` look up and
44
+ create the "Admin Service Provider" role in the INVITING organisation, which the
45
+ caller has not joined yet — that is what accepting a service-provider invitation
46
+ is, and an org-membership check there would break sign-in for every invited
47
+ provider. Scoping those needs the invitation to be consulted as well as the
48
+ membership, and is a separate change.
49
+
50
+ Every legitimate caller was checked and still works: the tenant screens
51
+ (`web-app-org pages/org/[organization]/roles-permissions.vue`, and the
52
+ `[org]/[site]/roles-permissions` screens in hygiene, security and
53
+ property-management, all through `layer-common RolePermissionMain.vue` and
54
+ `RolePermissionFormPreviewUpdate.vue`) edit roles in an organisation the operator
55
+ is a member of; the staff console (`web-app-org pages/super-admin/*` and the
56
+ retired admin app) is operated by staff and keeps cross-tenant reach.
57
+
58
+ No response shape or field changed for a permitted caller.
package/dist/index.d.ts CHANGED
@@ -250,6 +250,17 @@ declare function useUserService(): {
250
250
  updatePasswordById: (id: string, currentPassword: string, newPassword: string, passwordConfirmation: string) => Promise<mongodb.UpdateResult<bson.Document>>;
251
251
  };
252
252
 
253
+ /**
254
+ * The role type that makes its holder Seven365 platform staff.
255
+ *
256
+ * `isSuperAdmin` (`utils/super-admin.util.ts`) requires BOTH a `members` row of
257
+ * type "admin" AND a role of this type; `isPlatformOwner` additionally requires
258
+ * `default: true` on it. So this is the most privileged value in the roles
259
+ * collection, and `createRole` accepted it from any signed-in caller. Named once
260
+ * here rather than typed as a literal in each gate, because a second spelling is
261
+ * how a check drifts out of agreement with the thing it is defending.
262
+ */
263
+ declare const PLATFORM_STAFF_ROLE_TYPE = "admin";
253
264
  type TRole = {
254
265
  _id?: ObjectId;
255
266
  name?: string;
@@ -320,6 +331,41 @@ declare function useRoleController(): {
320
331
  deleteWithReassignments: (req: Request, res: Response, next: NextFunction) => Promise<void>;
321
332
  };
322
333
 
334
+ /**
335
+ * The membership type that makes somebody Seven365 platform staff.
336
+ *
337
+ * `isSuperAdmin` (`utils/super-admin.util.ts`) answers true for a live
338
+ * `members` row of this type whose role is also of type "admin". That makes
339
+ * this string the most privileged value in the collection, so it is named once
340
+ * and gated on the caller wherever a request can supply it — see
341
+ * `member.service.ts` and `verification-v2.controller.ts`.
342
+ */
343
+ declare const PLATFORM_STAFF_MEMBER_TYPE = "admin";
344
+ /**
345
+ * Every membership type this package actually writes.
346
+ *
347
+ * `type` used to be `Joi.string().required()` with no allow-list at all, and it
348
+ * is the field the platform-staff test reads. Any signed-in account could post
349
+ * `{ app: "admin" }` to `POST /api/members/direct`, or invite itself with
350
+ * `app: "admin"`, and be Seven365 staff on the next request.
351
+ *
352
+ * Nothing here is invented. Each value is one this package writes today:
353
+ *
354
+ * - `admin` — `user.service.ts createDefaultUser` seeds it, and the staff
355
+ * console's own invitations send `app: "admin"`.
356
+ * - `organization` — the default in `member.service.ts:73`,
357
+ * `user.service.ts:197` and `user-v2.service.ts:114`, and what
358
+ * `subscription.service.ts:167` writes for a new client's first member.
359
+ * - `resident` — `person.service.ts:163`, when a resident record gets a login.
360
+ * - the eight `AppServiceType` values — the service-provider memberships, the
361
+ * same list `organization.model.ts allowedNatures` already accepts for an
362
+ * organisation's nature.
363
+ *
364
+ * Being on this list is not permission to BE that type. `admin` is allowed here
365
+ * because the seed and the console legitimately write it; who may ask for it is
366
+ * decided separately, on the caller, in `member.service.ts`.
367
+ */
368
+ declare const MEMBER_TYPES: string[];
323
369
  type TMember = {
324
370
  _id?: ObjectId;
325
371
  name: string;
@@ -434,7 +480,7 @@ declare function useMemberService(): {
434
480
  createMember: (id: string) => Promise<{
435
481
  member: string;
436
482
  }>;
437
- createMemberDirect: ({ userId, orgId, roleId, app, siteId, siteName, onboardingRequired, }: {
483
+ createMemberDirect: ({ userId, orgId, roleId, app, siteId, siteName, onboardingRequired, callerId, }: {
438
484
  userId: string;
439
485
  orgId: string;
440
486
  roleId: string;
@@ -442,10 +488,12 @@ declare function useMemberService(): {
442
488
  siteId?: string | undefined;
443
489
  siteName?: string | undefined;
444
490
  onboardingRequired?: boolean | undefined;
491
+ /** the session's user id, from the controller — never from the body */
492
+ callerId?: string | undefined;
445
493
  }) => Promise<{
446
494
  member: string;
447
495
  }>;
448
- updateRoleById: (id: string, role: string, type: string, org: string) => Promise<{
496
+ updateRoleById: (id: string, role: string, type: string, org: string, callerId?: string) => Promise<{
449
497
  message: string;
450
498
  }>;
451
499
  updateSiteById: (id: string, siteId: string, siteName: string) => Promise<{
@@ -4192,7 +4240,7 @@ declare function MPerson(value: TPerson): {
4192
4240
  unit: string | ObjectId | null;
4193
4241
  start: string | Date | undefined;
4194
4242
  end: string | Date | undefined;
4195
- type: "walk-in" | "drop-off" | "contractor" | "delivery" | "pick-up" | "guest" | "tenant" | "resident" | undefined;
4243
+ type: "resident" | "walk-in" | "drop-off" | "contractor" | "delivery" | "pick-up" | "guest" | "tenant" | undefined;
4196
4244
  email: string | undefined;
4197
4245
  password: string;
4198
4246
  status: string;
@@ -4554,7 +4602,7 @@ declare function usePersonRepo(): {
4554
4602
  getPersonByPhoneNumber: (value: string) => Promise<TPerson | null>;
4555
4603
  getPeopleByUnit: ({ status, type, unit, }: {
4556
4604
  status: string;
4557
- type?: ("walk-in" | "drop-off" | "contractor" | "delivery" | "pick-up" | "guest" | "tenant" | "resident")[] | undefined;
4605
+ type?: ("resident" | "walk-in" | "drop-off" | "contractor" | "delivery" | "pick-up" | "guest" | "tenant")[] | undefined;
4558
4606
  unit?: string | undefined;
4559
4607
  }, session?: ClientSession) => Promise<TPerson[]>;
4560
4608
  getCompany: (search?: string) => Promise<any[]>;
@@ -9790,7 +9838,7 @@ declare function MHidAmicoIdentity(value: THidAmicoIdentity): {
9790
9838
  member: ObjectId | undefined;
9791
9839
  serviceProvider: ObjectId | undefined;
9792
9840
  visitor: ObjectId | undefined;
9793
- type: "admin" | "contractor" | "resident" | "unknown" | "visitor" | "staff";
9841
+ type: "admin" | "resident" | "contractor" | "unknown" | "visitor" | "staff";
9794
9842
  status: "deleted" | "active" | "inactive";
9795
9843
  metadata: Record<string, unknown>;
9796
9844
  createdAt: string | Date;
@@ -9894,7 +9942,7 @@ declare function useHidAmicoRepo(): {
9894
9942
  member: ObjectId | undefined;
9895
9943
  serviceProvider: ObjectId | undefined;
9896
9944
  visitor: ObjectId | undefined;
9897
- type: "admin" | "contractor" | "resident" | "unknown" | "visitor" | "staff";
9945
+ type: "admin" | "resident" | "contractor" | "unknown" | "visitor" | "staff";
9898
9946
  status: "deleted" | "active" | "inactive";
9899
9947
  metadata: Record<string, unknown>;
9900
9948
  createdAt: string | Date;
@@ -10251,7 +10299,7 @@ declare function useHidAmicoService(): {
10251
10299
  member: bson.ObjectId | undefined;
10252
10300
  serviceProvider: bson.ObjectId | undefined;
10253
10301
  visitor: bson.ObjectId | undefined;
10254
- type: "admin" | "contractor" | "resident" | "unknown" | "visitor" | "staff";
10302
+ type: "admin" | "resident" | "contractor" | "unknown" | "visitor" | "staff";
10255
10303
  status: "deleted" | "active" | "inactive";
10256
10304
  metadata: Record<string, unknown>;
10257
10305
  createdAt: string | Date;
@@ -11410,4 +11458,4 @@ declare function useNotificationPreferenceController(): {
11410
11458
  update: (req: Request, res: Response, next: NextFunction) => Promise<void>;
11411
11459
  };
11412
11460
 
11413
- export { ANPRMode, AUDIT_VALUE_MAX_LENGTH, AccessTypeProps, AppServiceType, AssignCardConfig, BidStatus, BidType, BuildingLevelStatus, BuildingStatus, BulkCardUpdate, BulletinOrder, BulletinRecipient, BulletinSort, BulletinStatus, BulletinVideoOrder, BulletinVideoSort, CAMERA_ANPR_PERMISSIONS, CAMERA_CAPABILITIES, CAMERA_CAPABILITY_REASONS, CAMERA_NOT_PATROL_OR_CCTV, CAMERA_NO_SUB_STREAM_TTL_SECONDS, CAMERA_PTZ_PERMISSIONS, CAMERA_REQUEST_TIMEOUT_MS, CAMERA_RTSP_TIMEOUT_MS, CAMERA_SETUP_PERMISSIONS, CAMERA_SNAPSHOT_CACHE_SECONDS, CAMERA_SNAPSHOT_MAX_BYTES, CAMERA_TEST_MIN_INTERVAL_SECONDS, CAMERA_TEST_ROUND_LIMIT, CAMERA_TEST_ROUND_SECONDS, CAMERA_TYPE_ANPR, CAMERA_TYPE_IP, CAMERA_VIEW_PERMISSIONS, CLIENT_ACTIONS, CLOCK_DRIFT_WARN_SECONDS, CONSOLE_AUDIT_LABELS, CURRENT_TIME_ENDPOINT, Camera, CameraAddressInput, CameraCapability, CameraCapabilityContext, CameraCapabilityDescriptor, CameraCapabilityEntry, CameraCapabilityReason, CameraCapabilityState, CameraCapabilityTrace, CameraDevice, CameraFrame, CameraMembership, CameraStream, CameraTestStatus, CameraTransport, CameraType, ConsoleAuditAction, ConsoleAuditTarget, DEVICE_STATUS, DOBStatus, DUPLICATE_TERMS_VERSION_MESSAGE, DayOfWeek, DeviceHttpTarget, DeviceProbeResult, DynamicFormFields, EAccessCardTypes, EAccessCardUserTypes, EmailSender, EntryOrder, EntrySort, EventOrder, EventSort, EventStatus, EventType, FacilitySort, FacilityStatus, FormEntryStatus, GuestSort, GuestStatus, HID_CARD_VALUE_FACTOR, HID_PERMISSION_CATEGORIES, HID_UINT32_MAX, HID_UINT64_MAX, HidRawUint64, IAccessCard, IAccessCardTransaction, InviteActor, MAX_CAMERA_CHANNEL, MAccessCard, MAccessCardTransaction, MAddress, MAttendance, MAttendanceSettings, MBidPreloved, MBillingConfiguration, MBillingItem, MBuilding, MBuildingLevel, MBuildingUnit, MBulletinBoard, MBulletinVideo, MCategoryPreloved, MChannelPreloved, MChat, MChatPreloved, MConsoleAudit, MCustomer, MCustomerSite, MDocumentManagement, MEntryPassSettings, MEventManagement, MFeedback, MFile, MFormEntry, MGuestManagement, MHidAmicoEvent, MHidAmicoIdentity, MHidAmicoReader, MHidSipAccount, MHidSitePermissions, MIncidentReport, MManpowerDesignations, MManpowerMonitoring, MManpowerRemarks, MManpowerSites, MMember, MNfcPatrolLog, MNfcPatrolRoute, MNfcPatrolSettings, MNfcPatrolSettingsUpdate, MNfcPatrolTag, MNotification, MNotificationPreference, MOccurrenceBook, MOccurrenceEntry, MOccurrenceSubject, MOnlineForm, MOrg, MOvernightParkingApprovalHours, MOvernightParkingRequest, MPatrolLog, MPatrolQuestion, MPatrolRoute, MPerson, MPlatformTerms, MPost, MPostFavorite, MPromoCode, MRobot, MRole, MRoleV2, MServiceProvider, MServiceProviderBilling, MSession, MSite, MSiteCamera, MSiteFacility, MSiteFacilityBooking, MStatementOfAccount, MSubcategoryPreloved, MSubscription, MSubscriptionPlan, MUnitBilling, MUser, MVehicle, MVehicleTransaction, MVerification, MVerificationV2, MVisitorTransaction, MWorkOrder, NOTIFICATION_CATEGORIES, NOTIFICATION_CHANNELS, NOTIFICATION_CHANNEL_LABELS, NOTIFICATION_NAMESPACE, NotificationAppSlug, NotificationCategory, NotificationChannel, NotificationModule, NotificationPreferenceView, NotificationService, ORG_MARKETPLACE_VENDOR_FIELD, OrgNature, OvernightParkingRequestSort, OvernightParkingRequestStatus, PATROL_CCTV_CAMERA_FILTER, PERSON_TYPES, PROPERTY_MANAGEMENT_MEMBER_TYPES, PStatus, PTZ_ALLOWED_ACTIONS, PTZ_ALLOWED_CODES, Period, PersonStatus, PersonType, PersonTypes, PlatformTermsStatus, PostOrder, PostSort, PostStatus, QrTagProps, REALTIME_MAX_FANOUT, ResidentAppModuleKey, SERVICE_PROVIDER_INVITE_LABELS, SERVICE_PROVIDER_INVITE_TRANSITIONS, SERVICE_PROVIDER_SIGN_IN_SUBJECT, SERVICE_PROVIDER_SIGN_IN_TYPE, SERVICE_PROVIDER_SIGN_UP_SUBJECT, SERVICE_PROVIDER_SIGN_UP_TYPE, SOFTWARE_VERSION_ENDPOINT, ServiceProviderInviteAction, ServiceProviderInviteDecision, ServiceProviderInviteFacts, SiteAddress, SiteCategories, SiteStatus, SortFields, SortOrder, Status, SubjectOrder, SubjectSort, SubscriptionBillingMode, SubscriptionType, TAccessMngmntSettings, TActionStatus, TAddress, TAffectedEntities, TAffectedInjured, TAppServiceType, TApprovedBy, TApprover, TAttendance, TAttendanceCheckIn, TAttendanceCheckOut, TAttendanceCheckTime, TAttendanceLocation, TAttendanceSettings, TAttendanceSettingsGetBySite, TAuthorities, TAuthoritiesCalled, TBidPreloved, TBilling, TBillingConfiguration, TBillingItem, TBuilding, TBuildingLevel, TBuildingUnit, TBulletinBoard, TBulletinVideo, TCamera, TCameraHealthClaim, TCategoryPreloved, TChannelPreloved, TChat, TChatPreloved, TCheckPoint$1 as TCheckPoint, TComplaintInfo, TComplaintReceivedTo, TConsoleAudit, TConsoleAuditQuery, TCounter, TCreateNfcPatrolLog, TCustomer, TCustomerSite, TCustomerSitePropertyField, TDayNumber, TDaySchedule, TDefaultAccessCard, TDesignations, TDocs, TDocumentCreate, TDocumentManagement, TEntryPassSettings, TEventManagement, TFeedback, TFeedbackMetadata, TFeedbackUpdate, TFeedbackUpdateCategory, TFeedbackUpdateServiceProvider, TFeedbackUpdateStatus, TFeedbackUpdateToCompleted, TFile, TFiles, TFolderUpdate, TFormEntry, TGetAttendancesByUserQuery, TGetAttendancesQuery, TGuestManagement, THidAmicoEvent, THidAmicoGatewayJob, THidAmicoIdentity, THidAmicoPhysicalCard, THidAmicoReader, THidPermissionAssignment, THidPermissionCategory, THidPhysicalCardInput, THidPhysicalCardType$1 as THidPhysicalCardType, THidSipAccount, THidSitePermissions, TIncidentInformation, TIncidentReport, TIncidentTypeAndTime, TInvoice, TKeyRef, TManpowerDesignations, TManpowerDesignationsUpdate, TManpowerMonitoring, TManpowerMonitoringUpdate, TManpowerRemarks, TManpowerRemarksStatusUpdate, TManpowerRemarksUpdate, TManpowerSearchFilter, TManpowerSites, TMember, TMemberUpdateStatus, TMessagePreloved, TMiniRole, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TNotification, TNotificationPreference, TNotificationPreferenceOff, TOccurrenceBook, TOccurrenceEntry, TOccurrenceSubject, TOnlineForm, TOrg, TOvernightParkingApprovalHours, TOvernightParkingRequest, TPatrolLog, TPatrolQuestion, TPatrolRoute, TPerson, TPlaceOfIncident, TPlates, TPlatformTerms, TPost, TPostFavorite, TPrice, TPriceType, TPromoCode, TPromoCurrencyInput, TPromoTier, TRANSPORT_DEVICE_HTTP, TRANSPORT_RELAY_PLAYER, TRANSPORT_RTSP_FRAME, TRecipientOfComplaint, TRemarks, TResident, TResidentAppModules, TRobot, TRobotMetadata, TRole, TRoleV2, TRoute, TSOABillingItem, TSOAStatus, TServiceProvider, TServiceProviderBilling, TSession, TSessionCreate, TShifts, TSignNfcPatrolLog, TSite, TSiteCamera, TSiteFacility, TSiteFacilityBooking, TSiteInfo, TSiteInformation, TSiteMetadata, TSiteUpdateBlock, TStatementOfAccount, TSubcategoryPreloved, TSubmissionForm, TSubscription, TSubscriptionPlan, TSubscriptionPlanApplication, TUnitBilling, TUnits, TUpdateFormEntry, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationEvent, TVerificationMetadata, TVerificationMetadataV2, TVerificationV2, TVisitorTransaction, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UseAccessManagementRepo, UserStatus, VERIFICATION_OPEN_STATUSES, VehicleCategory, VehicleOrder, VehicleSort, VehicleStatus, VehicleType, VerificationLinkType, VerificationStatus, VerificationSubjectType, VerificationType, VisitorSort, VisitorStatus, addressSchema, allowedFieldsSite, allowedNatures, allowedPlanApplications, attendanceSchema, attendanceSettingsSchema, building_level_namespace_collection, building_units_namespace_collection, buildings_namespace_collection, bulletin_boards_namespace_collection, cameraBaseUrl, cameraCapabilitiesFor, cameraDevices, cameraGrant, cameraHealthClaim, cameraHealthSummary, cameraManagePermissions, cameraProbeCacheKey, cameraTransports, canRevokeRefreshTokenFamily, categoriesForPermissions, categorySupportsChannel, chatPrelovedEvents, chatSchema, clampPtzSpeed, clockDriftSeconds, console_audit_namespace_collection, createManpowerRemarksDaily, customerSchema, customerSitePropertyFields, decideServiceProviderInvite, decodeHidPacsCard, deriveCameraHost, describeCameraCapabilities, designationsSchema, deviceControlEnabled, deviceHttpEnabled, deviceHttpTargets, deviceHttpTimeoutMs, deviceProbeTtlSeconds, emitNotificationCreated, encodeHidPacsCard, events_namespace_collection, facility_bookings_namespace_collection, feedbackSchema, feedbacks2_namespace_collection, feedbacks_namespace_collection, ffmpegFrameArgs, ffmpegPath, formatCapabilityTrace, formatDahuaDate, getIO, getSessionIdFromRequest, grabWithSubStreamFallback, guests_namespace_collection, hasAnyCapability, hasAnyPermission, hidRawUint64, incidentReport, incidentReportLog, incidents_namespace_collection, isCameraEntitled, isDuplicateVersionError, isPatrolCctvCamera, isPlatformOwner, isPromoCodeExpired, isRelayPlayerUrl, isSuperAdmin, isTermsCurrent, logCamera, manpowerDesignationsSchema, manpowerEvents, manpowerMonitoringSchema, manpowerRemarksSchema, manpowerSitesSchema, mapWithLimit, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, normalizeAcceptedTerms, normalizeHidCardValue, notificationCategory, notificationCategoryLabel, notificationEvents, notificationRoom, occurrence_book_namespace_collection, online_forms_namespace_collection, orgSchema, overnight_parking_requests_namespace_collection, parseCameraChannel, parseCameraHost, parseDahuaFind, parseDeviceTime, parseHidJsonLossless, parsePromoExpiry, parseSoftwareVersion, pickAuditFields, pickCustomerSiteProperties, platform_terms_namespace_collection, promoCodeRefusal, promoCodeSchema, promoCodeStatusSchema, promoCodeUpdate, promoCodeUpdateSchema, ptzEndpoint, publicCameraFields, recordConsoleAction, refuseServiceProviderInviteAction, registerCameraTransport, relayForRecorder, remarksSchema, resetCameraTransports, residentAppModuleKeys, residentFormEntry, resolutionRefusalReason, resolveCamera, resolveDeviceHttp, resolveHidPhysicalCardValue, resolveInviteActor, robotSchema, rtspUrl, schema, schemaAppSlugNotification, schemaApprovedBy, schemaApprover, schemaBidPreloved, schemaBilling, schemaBillingConfiguration, schemaBillingItem, schemaBuilding, schemaBuildingLevel, schemaBuildingUnit, schemaBuildingUpdateOptions, schemaBulletinBoard, schemaBulletinVideo, schemaCategoryPreloved, schemaChannelPreloved, schemaChatPreloved, schemaConsoleAudit, schemaCreateHidAmicoIdentity, schemaCreateNfcPatrolLog, schemaCreateNotification, schemaCustomerSite, schemaDiscoverHidAmicoReader, schemaDocumentManagement, schemaEntryPassSettings, schemaEventManagement, schemaFiles, schemaFormEntry, schemaGuestManagement, schemaHidAmicoAccessLogQuery, schemaHidAmicoAssignUserCard, schemaHidAmicoConfiguration, schemaHidAmicoEnrollUserCard, schemaHidAmicoEvent, schemaHidAmicoExecuteActions, schemaHidAmicoIdentity, schemaHidAmicoIdentityIdParams, schemaHidAmicoIdentityQuery, schemaHidAmicoIntercomCall, schemaHidAmicoLogQuery, schemaHidAmicoMonitor, schemaHidAmicoNotificationParams, schemaHidAmicoObjectOperation, schemaHidAmicoOperatingMode, schemaHidAmicoReader, schemaHidAmicoReaderIdParams, schemaHidAmicoReaderListQuery, schemaHidAmicoReaderUserQuery, schemaHidAmicoSetConfiguration, schemaHidAmicoSiteIdParams, schemaHidAmicoSync, schemaHidAmicoUserCardIdParams, schemaHidAmicoUserCardParams, schemaHidAmicoUserImageParams, schemaHidAmicoUserImageUploadQuery, schemaHidAmicoUserPin, schemaHidAmicoUserPinParams, schemaHidAmicoVisitorImageParams, schemaHidAmicoVisitorImageUploadQuery, schemaHidAmicoVisitorQr, schemaHidPermissionCandidateQuery, schemaHidPermissionScopeQuery, schemaHidSipAccountRequest, schemaIncidentReport, schemaListNotification, schemaMultipleDocumentManagement, schemaNfcPatrolLog, schemaNfcPatrolRoute, schemaNfcPatrolTag, schemaNfcPatrolTagUpdateData, schemaNotification, schemaNotificationPreference, schemaNotificationPreferenceOff, schemaOccurrenceBook, schemaOccurrenceEntry, schemaOccurrenceSubject, schemaOnlineForm, schemaOvernightParkingApprovalHours, schemaOvernightParkingRequest, schemaPatrolLog, schemaPatrolQuestion, schemaPatrolRoute, schemaPerson, schemaPlate, schemaPlatformTerms, schemaPost, schemaPostFavorite, schemaServiceProvider, schemaServiceProviderBilling, schemaSignNfcPatrolLog, schemaSiteCamera, schemaSiteFacility, schemaSiteFacilityBooking, schemaStatementOfAccount, schemaSubcategoryPreloved, schemaUnitBilling, schemaUpdateBidPreloved, schemaUpdateBuildingLevel, schemaUpdateBulletinBoard, schemaUpdateBulletinVideo, schemaUpdateCategoryPreloved, schemaUpdateChatPreloved, schemaUpdateDocumentManagement, schemaUpdateEntryPassSettings, schemaUpdateEventManagement, schemaUpdateFolderManagement, schemaUpdateFormEntry, schemaUpdateGuestManagement, schemaUpdateHidAmicoIdentity, schemaUpdateHidAmicoReader, schemaUpdateHidSitePermissions, schemaUpdateIncidentReport, schemaUpdateNotification, schemaUpdateNotificationPreference, schemaUpdateOccurrenceBook, schemaUpdateOccurrenceEntry, schemaUpdateOccurrenceSubject, schemaUpdateOnlineForm, schemaUpdateOptions, schemaUpdateOvernightParkingRequest, schemaUpdatePatrolLog, schemaUpdatePatrolQuestion, schemaUpdatePatrolRoute, schemaUpdatePerson, schemaUpdatePost, schemaUpdatePostFavorite, schemaUpdateServiceProviderBilling, schemaUpdateSiteBillingConfiguration, schemaUpdateSiteBillingItem, schemaUpdateSiteCamera, schemaUpdateSiteFacility, schemaUpdateSiteFacilityBooking, schemaUpdateSiteUnitBilling, schemaUpdateStatementOfAccount, schemaUpdateSubcategoryPreloved, schemaUpdateVisTrans, schemaVehicleTransaction, schemaVisitorTransaction, schemeCamera, schemeLogCamera, serviceProviderInviteLabel, sessionSchema, setIO, shiftSchema, siteSchema, site_people_namespace_collection, snapshotEndpoint, snapshotRefusalReason, stringifyHidJson, subscriptionPlanSchema, updateRemarksStatusEod, updateRemarksisAcknowledged, updateSiteSchema, useAccessManagementController, useAddressRepo, useAttendanceController, useAttendanceRepository, useAttendanceSettingsController, useAttendanceSettingsRepository, useAttendanceSettingsService, useAuthController, useAuthControllerV2, useAuthService, useAuthServiceV2, useBidPrelovedController, useBidPrelovedRepo, useBidPrelovedService, useBuildingController, useBuildingLevelController, useBuildingLevelRepo, useBuildingLevelService, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useBulletinBoardController, useBulletinBoardRepo, useBulletinBoardService, useBulletinVideoController, useBulletinVideoRepo, useBulletinVideoService, useCameraViewController, useCameraViewService, useCategoryPrelovedController, useCategoryPrelovedRepo, useChannelPrelovedController, useChannelPrelovedRepo, useChatController, useChatPrelovedController, useChatPrelovedRepo, useChatPrelovedService, useChatRepo, useConsoleAuditController, useConsoleAuditRepo, useCounterModel, useCounterRepo, useCustomerController, useCustomerRepo, useCustomerSiteController, useCustomerSiteRepo, useCustomerSiteService, useDahuaService, useDashboardController, useDashboardRepo, useDocumentManagementController, useDocumentManagementRepo, useDocumentManagementService, useEntryPassSettingsController, useEntryPassSettingsRepo, useEventManagementController, useEventManagementRepo, useEventManagementService, useFeedbackController, useFeedbackRepo, useFeedbackService, useFileController, useFileRepo, useFileService, useFormEntryController, useFormEntryRepo, useGuestManagementController, useGuestManagementRepo, useGuestManagementService, useHidAmicoController, useHidAmicoRepo, useHidAmicoService, useHrmLabsAttendanceCtrl, useHrmLabsAttendanceSrvc, useIncidentReportController, useIncidentReportRepo, useIncidentReportService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useManpowerDesignationCtrl, useManpowerDesignationRepo, useManpowerMonitoringCtrl, useManpowerMonitoringRepo, useManpowerMonitoringSrvc, useManpowerRemarkCtrl, useManpowerRemarksRepo, useManpowerSitesCtrl, useManpowerSitesRepo, useManpowerSitesSrvc, useMemberController, useMemberRepo, useMemberService, useNewDashboardController, useNewDashboardRepo, useNfcPatrolLogController, useNfcPatrolLogRepo, useNfcPatrolLogService, useNfcPatrolRouteController, useNfcPatrolRouteRepo, useNfcPatrolRouteService, useNfcPatrolSettingsController, useNfcPatrolSettingsRepository, useNfcPatrolSettingsService, useNfcPatrolTagController, useNfcPatrolTagRepo, useNfcPatrolTagService, useNotificationController, useNotificationPreferenceController, useNotificationPreferenceRepo, useNotificationPreferenceService, useNotificationRepo, useOccurrenceBookController, useOccurrenceBookRepo, useOccurrenceBookService, useOccurrenceEntryController, useOccurrenceEntryRepo, useOccurrenceEntryService, useOccurrenceSubjectController, useOccurrenceSubjectRepo, useOccurrenceSubjectService, useOnlineFormController, useOnlineFormRepo, useOrgController, useOrgControllerV2, useOrgRepo, useOvernightParkingController, useOvernightParkingRepo, useOvernightParkingRequestController, useOvernightParkingRequestRepo, useOvernightParkingRequestService, usePatrolLogController, usePatrolLogRepo, usePatrolLogService, usePatrolQuestionController, usePatrolQuestionRepo, usePatrolRouteController, usePatrolRouteRepo, usePersonController, usePersonRepo, usePlatformTermsController, usePlatformTermsRepo, usePlatformTermsService, usePostFavoriteController, usePostFavoriteRepo, usePostFavoriteService, usePostPrelovedController, usePostPrelovedRepo, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRedDotPaymentController, useRedDotPaymentRepo, useRedDotPaymentSvc, useRobotController, useRobotRepo, useRobotService, useRoleController, useRoleControllerV2, useRoleRepo, useRoleRepoV2, useRoleServiceV2, useServiceProviderBillingController, useServiceProviderBillingRepo, useServiceProviderBillingService, useServiceProviderController, useServiceProviderInviteController, useServiceProviderInviteService, useServiceProviderRepo, useSessionRepo, useSiteBillingConfigurationController, useSiteBillingConfigurationRepo, useSiteBillingItemController, useSiteBillingItemRepo, useSiteCameraController, useSiteCameraRepo, useSiteCameraService, useSiteController, useSiteFacilityBookingController, useSiteFacilityBookingRepo, useSiteFacilityBookingService, useSiteFacilityController, useSiteFacilityRepo, useSiteFacilityService, useSiteRepo, useSiteService, useSiteUnitBillingController, useSiteUnitBillingRepo, useSiteUnitBillingService, useStatementOfAccountController, useStatementOfAccountRepo, useSubcategoryPrelovedController, useSubcategoryPrelovedRepo, useSubscriptionController, useSubscriptionPlanController, useSubscriptionPlanRepo, useSubscriptionRepo, useSubscriptionService, useUserController, useUserControllerV2, useUserRepo, useUserRepoV2, useUserService, useUserServiceV2, useVehicleController, useVehicleRepo, useVehicleService, useVerificationController, useVerificationControllerV2, useVerificationRepo, useVerificationRepoV2, useVerificationService, useVerificationServiceV2, useVisitorTransactionController, useVisitorTransactionRepo, useVisitorTransactionService, useWorkOrderController, useWorkOrderRepo, useWorkOrderService, userSchema, vehicleSchema, vehicles_namespace_collection, visitorPersonRepo, visitorPersonService, visitorType, visitors_namespace_collection, wallConfig, workOrderSchema, work_orders2_namespace_collection, work_orders_namespace_collection };
11461
+ export { ANPRMode, AUDIT_VALUE_MAX_LENGTH, AccessTypeProps, AppServiceType, AssignCardConfig, BidStatus, BidType, BuildingLevelStatus, BuildingStatus, BulkCardUpdate, BulletinOrder, BulletinRecipient, BulletinSort, BulletinStatus, BulletinVideoOrder, BulletinVideoSort, CAMERA_ANPR_PERMISSIONS, CAMERA_CAPABILITIES, CAMERA_CAPABILITY_REASONS, CAMERA_NOT_PATROL_OR_CCTV, CAMERA_NO_SUB_STREAM_TTL_SECONDS, CAMERA_PTZ_PERMISSIONS, CAMERA_REQUEST_TIMEOUT_MS, CAMERA_RTSP_TIMEOUT_MS, CAMERA_SETUP_PERMISSIONS, CAMERA_SNAPSHOT_CACHE_SECONDS, CAMERA_SNAPSHOT_MAX_BYTES, CAMERA_TEST_MIN_INTERVAL_SECONDS, CAMERA_TEST_ROUND_LIMIT, CAMERA_TEST_ROUND_SECONDS, CAMERA_TYPE_ANPR, CAMERA_TYPE_IP, CAMERA_VIEW_PERMISSIONS, CLIENT_ACTIONS, CLOCK_DRIFT_WARN_SECONDS, CONSOLE_AUDIT_LABELS, CURRENT_TIME_ENDPOINT, Camera, CameraAddressInput, CameraCapability, CameraCapabilityContext, CameraCapabilityDescriptor, CameraCapabilityEntry, CameraCapabilityReason, CameraCapabilityState, CameraCapabilityTrace, CameraDevice, CameraFrame, CameraMembership, CameraStream, CameraTestStatus, CameraTransport, CameraType, ConsoleAuditAction, ConsoleAuditTarget, DEVICE_STATUS, DOBStatus, DUPLICATE_TERMS_VERSION_MESSAGE, DayOfWeek, DeviceHttpTarget, DeviceProbeResult, DynamicFormFields, EAccessCardTypes, EAccessCardUserTypes, EmailSender, EntryOrder, EntrySort, EventOrder, EventSort, EventStatus, EventType, FacilitySort, FacilityStatus, FormEntryStatus, GuestSort, GuestStatus, HID_CARD_VALUE_FACTOR, HID_PERMISSION_CATEGORIES, HID_UINT32_MAX, HID_UINT64_MAX, HidRawUint64, IAccessCard, IAccessCardTransaction, InviteActor, MAX_CAMERA_CHANNEL, MAccessCard, MAccessCardTransaction, MAddress, MAttendance, MAttendanceSettings, MBidPreloved, MBillingConfiguration, MBillingItem, MBuilding, MBuildingLevel, MBuildingUnit, MBulletinBoard, MBulletinVideo, MCategoryPreloved, MChannelPreloved, MChat, MChatPreloved, MConsoleAudit, MCustomer, MCustomerSite, MDocumentManagement, MEMBER_TYPES, MEntryPassSettings, MEventManagement, MFeedback, MFile, MFormEntry, MGuestManagement, MHidAmicoEvent, MHidAmicoIdentity, MHidAmicoReader, MHidSipAccount, MHidSitePermissions, MIncidentReport, MManpowerDesignations, MManpowerMonitoring, MManpowerRemarks, MManpowerSites, MMember, MNfcPatrolLog, MNfcPatrolRoute, MNfcPatrolSettings, MNfcPatrolSettingsUpdate, MNfcPatrolTag, MNotification, MNotificationPreference, MOccurrenceBook, MOccurrenceEntry, MOccurrenceSubject, MOnlineForm, MOrg, MOvernightParkingApprovalHours, MOvernightParkingRequest, MPatrolLog, MPatrolQuestion, MPatrolRoute, MPerson, MPlatformTerms, MPost, MPostFavorite, MPromoCode, MRobot, MRole, MRoleV2, MServiceProvider, MServiceProviderBilling, MSession, MSite, MSiteCamera, MSiteFacility, MSiteFacilityBooking, MStatementOfAccount, MSubcategoryPreloved, MSubscription, MSubscriptionPlan, MUnitBilling, MUser, MVehicle, MVehicleTransaction, MVerification, MVerificationV2, MVisitorTransaction, MWorkOrder, NOTIFICATION_CATEGORIES, NOTIFICATION_CHANNELS, NOTIFICATION_CHANNEL_LABELS, NOTIFICATION_NAMESPACE, NotificationAppSlug, NotificationCategory, NotificationChannel, NotificationModule, NotificationPreferenceView, NotificationService, ORG_MARKETPLACE_VENDOR_FIELD, OrgNature, OvernightParkingRequestSort, OvernightParkingRequestStatus, PATROL_CCTV_CAMERA_FILTER, PERSON_TYPES, PLATFORM_STAFF_MEMBER_TYPE, PLATFORM_STAFF_ROLE_TYPE, PROPERTY_MANAGEMENT_MEMBER_TYPES, PStatus, PTZ_ALLOWED_ACTIONS, PTZ_ALLOWED_CODES, Period, PersonStatus, PersonType, PersonTypes, PlatformTermsStatus, PostOrder, PostSort, PostStatus, QrTagProps, REALTIME_MAX_FANOUT, ResidentAppModuleKey, SERVICE_PROVIDER_INVITE_LABELS, SERVICE_PROVIDER_INVITE_TRANSITIONS, SERVICE_PROVIDER_SIGN_IN_SUBJECT, SERVICE_PROVIDER_SIGN_IN_TYPE, SERVICE_PROVIDER_SIGN_UP_SUBJECT, SERVICE_PROVIDER_SIGN_UP_TYPE, SOFTWARE_VERSION_ENDPOINT, ServiceProviderInviteAction, ServiceProviderInviteDecision, ServiceProviderInviteFacts, SiteAddress, SiteCategories, SiteStatus, SortFields, SortOrder, Status, SubjectOrder, SubjectSort, SubscriptionBillingMode, SubscriptionType, TAccessMngmntSettings, TActionStatus, TAddress, TAffectedEntities, TAffectedInjured, TAppServiceType, TApprovedBy, TApprover, TAttendance, TAttendanceCheckIn, TAttendanceCheckOut, TAttendanceCheckTime, TAttendanceLocation, TAttendanceSettings, TAttendanceSettingsGetBySite, TAuthorities, TAuthoritiesCalled, TBidPreloved, TBilling, TBillingConfiguration, TBillingItem, TBuilding, TBuildingLevel, TBuildingUnit, TBulletinBoard, TBulletinVideo, TCamera, TCameraHealthClaim, TCategoryPreloved, TChannelPreloved, TChat, TChatPreloved, TCheckPoint$1 as TCheckPoint, TComplaintInfo, TComplaintReceivedTo, TConsoleAudit, TConsoleAuditQuery, TCounter, TCreateNfcPatrolLog, TCustomer, TCustomerSite, TCustomerSitePropertyField, TDayNumber, TDaySchedule, TDefaultAccessCard, TDesignations, TDocs, TDocumentCreate, TDocumentManagement, TEntryPassSettings, TEventManagement, TFeedback, TFeedbackMetadata, TFeedbackUpdate, TFeedbackUpdateCategory, TFeedbackUpdateServiceProvider, TFeedbackUpdateStatus, TFeedbackUpdateToCompleted, TFile, TFiles, TFolderUpdate, TFormEntry, TGetAttendancesByUserQuery, TGetAttendancesQuery, TGuestManagement, THidAmicoEvent, THidAmicoGatewayJob, THidAmicoIdentity, THidAmicoPhysicalCard, THidAmicoReader, THidPermissionAssignment, THidPermissionCategory, THidPhysicalCardInput, THidPhysicalCardType$1 as THidPhysicalCardType, THidSipAccount, THidSitePermissions, TIncidentInformation, TIncidentReport, TIncidentTypeAndTime, TInvoice, TKeyRef, TManpowerDesignations, TManpowerDesignationsUpdate, TManpowerMonitoring, TManpowerMonitoringUpdate, TManpowerRemarks, TManpowerRemarksStatusUpdate, TManpowerRemarksUpdate, TManpowerSearchFilter, TManpowerSites, TMember, TMemberUpdateStatus, TMessagePreloved, TMiniRole, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TNotification, TNotificationPreference, TNotificationPreferenceOff, TOccurrenceBook, TOccurrenceEntry, TOccurrenceSubject, TOnlineForm, TOrg, TOvernightParkingApprovalHours, TOvernightParkingRequest, TPatrolLog, TPatrolQuestion, TPatrolRoute, TPerson, TPlaceOfIncident, TPlates, TPlatformTerms, TPost, TPostFavorite, TPrice, TPriceType, TPromoCode, TPromoCurrencyInput, TPromoTier, TRANSPORT_DEVICE_HTTP, TRANSPORT_RELAY_PLAYER, TRANSPORT_RTSP_FRAME, TRecipientOfComplaint, TRemarks, TResident, TResidentAppModules, TRobot, TRobotMetadata, TRole, TRoleV2, TRoute, TSOABillingItem, TSOAStatus, TServiceProvider, TServiceProviderBilling, TSession, TSessionCreate, TShifts, TSignNfcPatrolLog, TSite, TSiteCamera, TSiteFacility, TSiteFacilityBooking, TSiteInfo, TSiteInformation, TSiteMetadata, TSiteUpdateBlock, TStatementOfAccount, TSubcategoryPreloved, TSubmissionForm, TSubscription, TSubscriptionPlan, TSubscriptionPlanApplication, TUnitBilling, TUnits, TUpdateFormEntry, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationEvent, TVerificationMetadata, TVerificationMetadataV2, TVerificationV2, TVisitorTransaction, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UseAccessManagementRepo, UserStatus, VERIFICATION_OPEN_STATUSES, VehicleCategory, VehicleOrder, VehicleSort, VehicleStatus, VehicleType, VerificationLinkType, VerificationStatus, VerificationSubjectType, VerificationType, VisitorSort, VisitorStatus, addressSchema, allowedFieldsSite, allowedNatures, allowedPlanApplications, attendanceSchema, attendanceSettingsSchema, building_level_namespace_collection, building_units_namespace_collection, buildings_namespace_collection, bulletin_boards_namespace_collection, cameraBaseUrl, cameraCapabilitiesFor, cameraDevices, cameraGrant, cameraHealthClaim, cameraHealthSummary, cameraManagePermissions, cameraProbeCacheKey, cameraTransports, canRevokeRefreshTokenFamily, categoriesForPermissions, categorySupportsChannel, chatPrelovedEvents, chatSchema, clampPtzSpeed, clockDriftSeconds, console_audit_namespace_collection, createManpowerRemarksDaily, customerSchema, customerSitePropertyFields, decideServiceProviderInvite, decodeHidPacsCard, deriveCameraHost, describeCameraCapabilities, designationsSchema, deviceControlEnabled, deviceHttpEnabled, deviceHttpTargets, deviceHttpTimeoutMs, deviceProbeTtlSeconds, emitNotificationCreated, encodeHidPacsCard, events_namespace_collection, facility_bookings_namespace_collection, feedbackSchema, feedbacks2_namespace_collection, feedbacks_namespace_collection, ffmpegFrameArgs, ffmpegPath, formatCapabilityTrace, formatDahuaDate, getIO, getSessionIdFromRequest, grabWithSubStreamFallback, guests_namespace_collection, hasAnyCapability, hasAnyPermission, hidRawUint64, incidentReport, incidentReportLog, incidents_namespace_collection, isCameraEntitled, isDuplicateVersionError, isPatrolCctvCamera, isPlatformOwner, isPromoCodeExpired, isRelayPlayerUrl, isSuperAdmin, isTermsCurrent, logCamera, manpowerDesignationsSchema, manpowerEvents, manpowerMonitoringSchema, manpowerRemarksSchema, manpowerSitesSchema, mapWithLimit, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, normalizeAcceptedTerms, normalizeHidCardValue, notificationCategory, notificationCategoryLabel, notificationEvents, notificationRoom, occurrence_book_namespace_collection, online_forms_namespace_collection, orgSchema, overnight_parking_requests_namespace_collection, parseCameraChannel, parseCameraHost, parseDahuaFind, parseDeviceTime, parseHidJsonLossless, parsePromoExpiry, parseSoftwareVersion, pickAuditFields, pickCustomerSiteProperties, platform_terms_namespace_collection, promoCodeRefusal, promoCodeSchema, promoCodeStatusSchema, promoCodeUpdate, promoCodeUpdateSchema, ptzEndpoint, publicCameraFields, recordConsoleAction, refuseServiceProviderInviteAction, registerCameraTransport, relayForRecorder, remarksSchema, resetCameraTransports, residentAppModuleKeys, residentFormEntry, resolutionRefusalReason, resolveCamera, resolveDeviceHttp, resolveHidPhysicalCardValue, resolveInviteActor, robotSchema, rtspUrl, schema, schemaAppSlugNotification, schemaApprovedBy, schemaApprover, schemaBidPreloved, schemaBilling, schemaBillingConfiguration, schemaBillingItem, schemaBuilding, schemaBuildingLevel, schemaBuildingUnit, schemaBuildingUpdateOptions, schemaBulletinBoard, schemaBulletinVideo, schemaCategoryPreloved, schemaChannelPreloved, schemaChatPreloved, schemaConsoleAudit, schemaCreateHidAmicoIdentity, schemaCreateNfcPatrolLog, schemaCreateNotification, schemaCustomerSite, schemaDiscoverHidAmicoReader, schemaDocumentManagement, schemaEntryPassSettings, schemaEventManagement, schemaFiles, schemaFormEntry, schemaGuestManagement, schemaHidAmicoAccessLogQuery, schemaHidAmicoAssignUserCard, schemaHidAmicoConfiguration, schemaHidAmicoEnrollUserCard, schemaHidAmicoEvent, schemaHidAmicoExecuteActions, schemaHidAmicoIdentity, schemaHidAmicoIdentityIdParams, schemaHidAmicoIdentityQuery, schemaHidAmicoIntercomCall, schemaHidAmicoLogQuery, schemaHidAmicoMonitor, schemaHidAmicoNotificationParams, schemaHidAmicoObjectOperation, schemaHidAmicoOperatingMode, schemaHidAmicoReader, schemaHidAmicoReaderIdParams, schemaHidAmicoReaderListQuery, schemaHidAmicoReaderUserQuery, schemaHidAmicoSetConfiguration, schemaHidAmicoSiteIdParams, schemaHidAmicoSync, schemaHidAmicoUserCardIdParams, schemaHidAmicoUserCardParams, schemaHidAmicoUserImageParams, schemaHidAmicoUserImageUploadQuery, schemaHidAmicoUserPin, schemaHidAmicoUserPinParams, schemaHidAmicoVisitorImageParams, schemaHidAmicoVisitorImageUploadQuery, schemaHidAmicoVisitorQr, schemaHidPermissionCandidateQuery, schemaHidPermissionScopeQuery, schemaHidSipAccountRequest, schemaIncidentReport, schemaListNotification, schemaMultipleDocumentManagement, schemaNfcPatrolLog, schemaNfcPatrolRoute, schemaNfcPatrolTag, schemaNfcPatrolTagUpdateData, schemaNotification, schemaNotificationPreference, schemaNotificationPreferenceOff, schemaOccurrenceBook, schemaOccurrenceEntry, schemaOccurrenceSubject, schemaOnlineForm, schemaOvernightParkingApprovalHours, schemaOvernightParkingRequest, schemaPatrolLog, schemaPatrolQuestion, schemaPatrolRoute, schemaPerson, schemaPlate, schemaPlatformTerms, schemaPost, schemaPostFavorite, schemaServiceProvider, schemaServiceProviderBilling, schemaSignNfcPatrolLog, schemaSiteCamera, schemaSiteFacility, schemaSiteFacilityBooking, schemaStatementOfAccount, schemaSubcategoryPreloved, schemaUnitBilling, schemaUpdateBidPreloved, schemaUpdateBuildingLevel, schemaUpdateBulletinBoard, schemaUpdateBulletinVideo, schemaUpdateCategoryPreloved, schemaUpdateChatPreloved, schemaUpdateDocumentManagement, schemaUpdateEntryPassSettings, schemaUpdateEventManagement, schemaUpdateFolderManagement, schemaUpdateFormEntry, schemaUpdateGuestManagement, schemaUpdateHidAmicoIdentity, schemaUpdateHidAmicoReader, schemaUpdateHidSitePermissions, schemaUpdateIncidentReport, schemaUpdateNotification, schemaUpdateNotificationPreference, schemaUpdateOccurrenceBook, schemaUpdateOccurrenceEntry, schemaUpdateOccurrenceSubject, schemaUpdateOnlineForm, schemaUpdateOptions, schemaUpdateOvernightParkingRequest, schemaUpdatePatrolLog, schemaUpdatePatrolQuestion, schemaUpdatePatrolRoute, schemaUpdatePerson, schemaUpdatePost, schemaUpdatePostFavorite, schemaUpdateServiceProviderBilling, schemaUpdateSiteBillingConfiguration, schemaUpdateSiteBillingItem, schemaUpdateSiteCamera, schemaUpdateSiteFacility, schemaUpdateSiteFacilityBooking, schemaUpdateSiteUnitBilling, schemaUpdateStatementOfAccount, schemaUpdateSubcategoryPreloved, schemaUpdateVisTrans, schemaVehicleTransaction, schemaVisitorTransaction, schemeCamera, schemeLogCamera, serviceProviderInviteLabel, sessionSchema, setIO, shiftSchema, siteSchema, site_people_namespace_collection, snapshotEndpoint, snapshotRefusalReason, stringifyHidJson, subscriptionPlanSchema, updateRemarksStatusEod, updateRemarksisAcknowledged, updateSiteSchema, useAccessManagementController, useAddressRepo, useAttendanceController, useAttendanceRepository, useAttendanceSettingsController, useAttendanceSettingsRepository, useAttendanceSettingsService, useAuthController, useAuthControllerV2, useAuthService, useAuthServiceV2, useBidPrelovedController, useBidPrelovedRepo, useBidPrelovedService, useBuildingController, useBuildingLevelController, useBuildingLevelRepo, useBuildingLevelService, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useBulletinBoardController, useBulletinBoardRepo, useBulletinBoardService, useBulletinVideoController, useBulletinVideoRepo, useBulletinVideoService, useCameraViewController, useCameraViewService, useCategoryPrelovedController, useCategoryPrelovedRepo, useChannelPrelovedController, useChannelPrelovedRepo, useChatController, useChatPrelovedController, useChatPrelovedRepo, useChatPrelovedService, useChatRepo, useConsoleAuditController, useConsoleAuditRepo, useCounterModel, useCounterRepo, useCustomerController, useCustomerRepo, useCustomerSiteController, useCustomerSiteRepo, useCustomerSiteService, useDahuaService, useDashboardController, useDashboardRepo, useDocumentManagementController, useDocumentManagementRepo, useDocumentManagementService, useEntryPassSettingsController, useEntryPassSettingsRepo, useEventManagementController, useEventManagementRepo, useEventManagementService, useFeedbackController, useFeedbackRepo, useFeedbackService, useFileController, useFileRepo, useFileService, useFormEntryController, useFormEntryRepo, useGuestManagementController, useGuestManagementRepo, useGuestManagementService, useHidAmicoController, useHidAmicoRepo, useHidAmicoService, useHrmLabsAttendanceCtrl, useHrmLabsAttendanceSrvc, useIncidentReportController, useIncidentReportRepo, useIncidentReportService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useManpowerDesignationCtrl, useManpowerDesignationRepo, useManpowerMonitoringCtrl, useManpowerMonitoringRepo, useManpowerMonitoringSrvc, useManpowerRemarkCtrl, useManpowerRemarksRepo, useManpowerSitesCtrl, useManpowerSitesRepo, useManpowerSitesSrvc, useMemberController, useMemberRepo, useMemberService, useNewDashboardController, useNewDashboardRepo, useNfcPatrolLogController, useNfcPatrolLogRepo, useNfcPatrolLogService, useNfcPatrolRouteController, useNfcPatrolRouteRepo, useNfcPatrolRouteService, useNfcPatrolSettingsController, useNfcPatrolSettingsRepository, useNfcPatrolSettingsService, useNfcPatrolTagController, useNfcPatrolTagRepo, useNfcPatrolTagService, useNotificationController, useNotificationPreferenceController, useNotificationPreferenceRepo, useNotificationPreferenceService, useNotificationRepo, useOccurrenceBookController, useOccurrenceBookRepo, useOccurrenceBookService, useOccurrenceEntryController, useOccurrenceEntryRepo, useOccurrenceEntryService, useOccurrenceSubjectController, useOccurrenceSubjectRepo, useOccurrenceSubjectService, useOnlineFormController, useOnlineFormRepo, useOrgController, useOrgControllerV2, useOrgRepo, useOvernightParkingController, useOvernightParkingRepo, useOvernightParkingRequestController, useOvernightParkingRequestRepo, useOvernightParkingRequestService, usePatrolLogController, usePatrolLogRepo, usePatrolLogService, usePatrolQuestionController, usePatrolQuestionRepo, usePatrolRouteController, usePatrolRouteRepo, usePersonController, usePersonRepo, usePlatformTermsController, usePlatformTermsRepo, usePlatformTermsService, usePostFavoriteController, usePostFavoriteRepo, usePostFavoriteService, usePostPrelovedController, usePostPrelovedRepo, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRedDotPaymentController, useRedDotPaymentRepo, useRedDotPaymentSvc, useRobotController, useRobotRepo, useRobotService, useRoleController, useRoleControllerV2, useRoleRepo, useRoleRepoV2, useRoleServiceV2, useServiceProviderBillingController, useServiceProviderBillingRepo, useServiceProviderBillingService, useServiceProviderController, useServiceProviderInviteController, useServiceProviderInviteService, useServiceProviderRepo, useSessionRepo, useSiteBillingConfigurationController, useSiteBillingConfigurationRepo, useSiteBillingItemController, useSiteBillingItemRepo, useSiteCameraController, useSiteCameraRepo, useSiteCameraService, useSiteController, useSiteFacilityBookingController, useSiteFacilityBookingRepo, useSiteFacilityBookingService, useSiteFacilityController, useSiteFacilityRepo, useSiteFacilityService, useSiteRepo, useSiteService, useSiteUnitBillingController, useSiteUnitBillingRepo, useSiteUnitBillingService, useStatementOfAccountController, useStatementOfAccountRepo, useSubcategoryPrelovedController, useSubcategoryPrelovedRepo, useSubscriptionController, useSubscriptionPlanController, useSubscriptionPlanRepo, useSubscriptionRepo, useSubscriptionService, useUserController, useUserControllerV2, useUserRepo, useUserRepoV2, useUserService, useUserServiceV2, useVehicleController, useVehicleRepo, useVehicleService, useVerificationController, useVerificationControllerV2, useVerificationRepo, useVerificationRepoV2, useVerificationService, useVerificationServiceV2, useVisitorTransactionController, useVisitorTransactionRepo, useVisitorTransactionService, useWorkOrderController, useWorkOrderRepo, useWorkOrderService, userSchema, vehicleSchema, vehicles_namespace_collection, visitorPersonRepo, visitorPersonService, visitorType, visitors_namespace_collection, wallConfig, workOrderSchema, work_orders2_namespace_collection, work_orders_namespace_collection };
package/dist/index.js CHANGED
@@ -5971,6 +5971,7 @@ __export(src_exports, {
5971
5971
  MCustomer: () => MCustomer,
5972
5972
  MCustomerSite: () => MCustomerSite,
5973
5973
  MDocumentManagement: () => MDocumentManagement,
5974
+ MEMBER_TYPES: () => MEMBER_TYPES,
5974
5975
  MEntryPassSettings: () => MEntryPassSettings,
5975
5976
  MEventManagement: () => MEventManagement,
5976
5977
  MFeedback: () => MFeedback,
@@ -6045,6 +6046,8 @@ __export(src_exports, {
6045
6046
  OvernightParkingRequestStatus: () => OvernightParkingRequestStatus,
6046
6047
  PATROL_CCTV_CAMERA_FILTER: () => PATROL_CCTV_CAMERA_FILTER,
6047
6048
  PERSON_TYPES: () => PERSON_TYPES,
6049
+ PLATFORM_STAFF_MEMBER_TYPE: () => PLATFORM_STAFF_MEMBER_TYPE,
6050
+ PLATFORM_STAFF_ROLE_TYPE: () => PLATFORM_STAFF_ROLE_TYPE,
6048
6051
  PROPERTY_MANAGEMENT_MEMBER_TYPES: () => PROPERTY_MANAGEMENT_MEMBER_TYPES,
6049
6052
  PStatus: () => PStatus,
6050
6053
  PTZ_ALLOWED_ACTIONS: () => PTZ_ALLOWED_ACTIONS,
@@ -9590,13 +9593,32 @@ var import_node_server_utils13 = require("@7365admin1/node-server-utils");
9590
9593
  var import_node_server_utils12 = require("@7365admin1/node-server-utils");
9591
9594
  var import_joi7 = __toESM(require("joi"));
9592
9595
  var import_mongodb11 = require("mongodb");
9596
+ var PLATFORM_STAFF_MEMBER_TYPE = "admin";
9597
+ var MEMBER_TYPES = [
9598
+ PLATFORM_STAFF_MEMBER_TYPE,
9599
+ "organization",
9600
+ "resident",
9601
+ ...Object.values(AppServiceType)
9602
+ ];
9593
9603
  function MMember(value) {
9594
9604
  const schema2 = import_joi7.default.object({
9595
9605
  _id: import_joi7.default.string().hex().optional().allow("", null),
9596
9606
  name: import_joi7.default.string().required(),
9597
9607
  email: import_joi7.default.string().email().optional().allow("", null),
9598
9608
  user: import_joi7.default.string().hex().required(),
9599
- type: import_joi7.default.string().required(),
9609
+ // TRANSITIONAL — the second branch is a 24-character hex id, not a type.
9610
+ // `web-app-org pages/org/[organization]/invitations/invite.vue:122` and
9611
+ // `web-app-hygiene pages/[org]/[site]/invitations/invite.vue:135` send the
9612
+ // ORGANISATION ID as the invitation's `app`, so accepting one of those
9613
+ // invitations writes an org id into this field. That is a defect in those
9614
+ // two screens, but it is live: rejecting it here would 400 every user
9615
+ // accepting an invitation from either screen. Delete the alternation once
9616
+ // both send a real membership type. It cannot be used to escalate — "admin"
9617
+ // is not 24 hex characters, so the allow-list still decides that.
9618
+ type: import_joi7.default.alternatives().try(
9619
+ import_joi7.default.string().valid(...MEMBER_TYPES),
9620
+ import_joi7.default.string().hex().length(24)
9621
+ ).required(),
9600
9622
  role: import_joi7.default.string().hex().optional().allow("", null),
9601
9623
  org: import_joi7.default.string().hex().optional().allow("", null),
9602
9624
  orgName: import_joi7.default.string().optional().allow("", null),
@@ -15987,6 +16009,7 @@ var import_node_server_utils35 = require("@7365admin1/node-server-utils");
15987
16009
  // src/models/role.model.ts
15988
16010
  var import_node_server_utils34 = require("@7365admin1/node-server-utils");
15989
16011
  var import_mongodb31 = require("mongodb");
16012
+ var PLATFORM_STAFF_ROLE_TYPE = "admin";
15990
16013
  var MRole = class {
15991
16014
  constructor(value) {
15992
16015
  if (typeof value._id === "string") {
@@ -18518,6 +18541,14 @@ function useRoleService() {
18518
18541
  }
18519
18542
 
18520
18543
  // src/controllers/role.controller.ts
18544
+ async function requireRoleOrg(req, org) {
18545
+ const orgId = org?.toString() ?? "";
18546
+ if (!orgId) {
18547
+ await requirePlatformStaff(req);
18548
+ return;
18549
+ }
18550
+ await requireOrgAccess(req, orgId);
18551
+ }
18521
18552
  function useRoleController() {
18522
18553
  const {
18523
18554
  addRole: _createRole,
@@ -18549,6 +18580,9 @@ function useRoleController() {
18549
18580
  return;
18550
18581
  }
18551
18582
  try {
18583
+ if (payload.type === PLATFORM_STAFF_ROLE_TYPE) {
18584
+ await requirePlatformStaff(req);
18585
+ }
18552
18586
  const role = await _createRole(payload);
18553
18587
  res.status(201).json({ message: "Successfully created role.", data: { role } });
18554
18588
  return;
@@ -18643,6 +18677,10 @@ function useRoleController() {
18643
18677
  const name = req.body.name ?? "";
18644
18678
  const permissions = req.body.permissions ?? [];
18645
18679
  try {
18680
+ const existing = await _getRoleById(_id);
18681
+ if (!existing)
18682
+ throw new import_node_server_utils44.NotFoundError("Role not found.");
18683
+ await requireRoleOrg(req, existing.org);
18646
18684
  const role = await _updateRole(_id, { name, permissions });
18647
18685
  res.json({ message: "Successfully updated role.", data: { role } });
18648
18686
  return;
@@ -18667,6 +18705,10 @@ function useRoleController() {
18667
18705
  }
18668
18706
  const permissions = req.body.permissions ?? [];
18669
18707
  try {
18708
+ const existing = await _getRoleById(_id);
18709
+ if (!existing)
18710
+ throw new import_node_server_utils44.NotFoundError("Role not found.");
18711
+ await requireRoleOrg(req, existing.org);
18670
18712
  await _updatePermissionsById(_id, permissions);
18671
18713
  res.json({ message: "Successfully updated role permissions." });
18672
18714
  return;
@@ -18686,6 +18728,10 @@ function useRoleController() {
18686
18728
  return;
18687
18729
  }
18688
18730
  try {
18731
+ const existing = await _getRoleById(_id);
18732
+ if (!existing)
18733
+ throw new import_node_server_utils44.NotFoundError("Role not found.");
18734
+ await requireRoleOrg(req, existing.org);
18689
18735
  const message = await _deleteRole(_id);
18690
18736
  res.json({ message });
18691
18737
  return;
@@ -18705,6 +18751,10 @@ function useRoleController() {
18705
18751
  return;
18706
18752
  }
18707
18753
  try {
18754
+ const existing = await _getRoleById(_id);
18755
+ if (!existing)
18756
+ throw new import_node_server_utils44.NotFoundError("Role not found.");
18757
+ await requireRoleOrg(req, existing.org);
18708
18758
  const data = await _getDeletionPreview(_id);
18709
18759
  res.json({ data });
18710
18760
  return;
@@ -18734,6 +18784,10 @@ function useRoleController() {
18734
18784
  return;
18735
18785
  }
18736
18786
  try {
18787
+ const existing = await _getRoleById(req.params.id);
18788
+ if (!existing)
18789
+ throw new import_node_server_utils44.NotFoundError("Role not found.");
18790
+ await requireRoleOrg(req, existing.org);
18737
18791
  const message = await _deleteWithReassignments(
18738
18792
  req.params.id,
18739
18793
  req.body.reassignments
@@ -18765,6 +18819,13 @@ var import_node_server_utils46 = require("@7365admin1/node-server-utils");
18765
18819
 
18766
18820
  // src/services/member.service.ts
18767
18821
  var import_node_server_utils45 = require("@7365admin1/node-server-utils");
18822
+ async function requireStaffCaller(callerId4, what) {
18823
+ if (!await isSuperAdmin(callerId4)) {
18824
+ throw new import_node_server_utils45.UnauthorizedError(
18825
+ `Only Seven365 staff can ${what}.`
18826
+ );
18827
+ }
18828
+ }
18768
18829
  function useMemberService() {
18769
18830
  const {
18770
18831
  add: addMember,
@@ -18778,7 +18839,7 @@ function useMemberService() {
18778
18839
  const { getUserByEmail, updateDefaultOrgByEmail, getUserById } = useUserRepo();
18779
18840
  const { getById: getOrgById } = useOrgRepo();
18780
18841
  const { getSiteById } = useSiteRepo();
18781
- const { getOwnerRolesByTypeOrg } = useRoleRepo();
18842
+ const { getOwnerRolesByTypeOrg, getRoleById } = useRoleRepo();
18782
18843
  async function createMember(id) {
18783
18844
  const session = import_node_server_utils45.useAtlas.getClient()?.startSession();
18784
18845
  session?.startTransaction();
@@ -18846,8 +18907,16 @@ function useMemberService() {
18846
18907
  app,
18847
18908
  siteId,
18848
18909
  siteName,
18849
- onboardingRequired
18910
+ onboardingRequired,
18911
+ callerId: callerId4
18850
18912
  }) {
18913
+ if (app === PLATFORM_STAFF_MEMBER_TYPE) {
18914
+ await requireStaffCaller(callerId4, "create a Seven365 staff membership");
18915
+ }
18916
+ const targetRole = roleId ? await getRoleById(roleId) : null;
18917
+ if (targetRole?.type === PLATFORM_STAFF_MEMBER_TYPE) {
18918
+ await requireStaffCaller(callerId4, "assign a Seven365 staff role");
18919
+ }
18851
18920
  const session = import_node_server_utils45.useAtlas.getClient()?.startSession();
18852
18921
  session?.startTransaction();
18853
18922
  try {
@@ -18898,7 +18967,11 @@ function useMemberService() {
18898
18967
  session?.endSession();
18899
18968
  }
18900
18969
  }
18901
- async function updateRoleById(id, role, type, org) {
18970
+ async function updateRoleById(id, role, type, org, callerId4) {
18971
+ const newRole = await getRoleById(role);
18972
+ if (newRole?.type === PLATFORM_STAFF_MEMBER_TYPE) {
18973
+ await requireStaffCaller(callerId4, "assign a Seven365 staff role");
18974
+ }
18902
18975
  const owner = await getOwnerRolesByTypeOrg(type, org);
18903
18976
  if (!owner.length) {
18904
18977
  throw new import_node_server_utils45.BadRequestError("No owner role found.");
@@ -19192,7 +19265,7 @@ function useMemberController() {
19192
19265
  const type = req.params.type;
19193
19266
  const org = req.params.org;
19194
19267
  try {
19195
- await _updateRoleById(_id, role, type, org);
19268
+ await _updateRoleById(_id, role, type, org, callerId(req));
19196
19269
  res.json({ message: "Successfully updated member role." });
19197
19270
  return;
19198
19271
  } catch (error2) {
@@ -19219,7 +19292,7 @@ function useMemberController() {
19219
19292
  }
19220
19293
  const { userId, orgId, roleId, app, siteId, siteName, onboardingRequired } = req.body;
19221
19294
  try {
19222
- const data = await _createMemberDirect({ userId, orgId, roleId, app, siteId, siteName, onboardingRequired });
19295
+ const data = await _createMemberDirect({ userId, orgId, roleId, app, siteId, siteName, onboardingRequired, callerId: callerId(req) });
19223
19296
  res.status(201).json(data);
19224
19297
  return;
19225
19298
  } catch (error2) {
@@ -79053,6 +79126,9 @@ function useVerificationControllerV2() {
79053
79126
  }
79054
79127
  const { email, app, role, name, org, siteId, siteName } = value;
79055
79128
  try {
79129
+ if (app === PLATFORM_STAFF_MEMBER_TYPE) {
79130
+ await requirePlatformStaff(req);
79131
+ }
79056
79132
  await _createUserInvite({
79057
79133
  email,
79058
79134
  metadata: {
@@ -80857,6 +80933,9 @@ function useRoleControllerV2() {
80857
80933
  return;
80858
80934
  }
80859
80935
  try {
80936
+ if (value.type === PLATFORM_STAFF_ROLE_TYPE) {
80937
+ await requirePlatformStaff(req);
80938
+ }
80860
80939
  const role = await _createRole(value);
80861
80940
  res.status(201).json({ message: "Successfully created role.", data: { role } });
80862
80941
  return;
@@ -85868,6 +85947,7 @@ function useNotificationPreferenceController() {
85868
85947
  MCustomer,
85869
85948
  MCustomerSite,
85870
85949
  MDocumentManagement,
85950
+ MEMBER_TYPES,
85871
85951
  MEntryPassSettings,
85872
85952
  MEventManagement,
85873
85953
  MFeedback,
@@ -85942,6 +86022,8 @@ function useNotificationPreferenceController() {
85942
86022
  OvernightParkingRequestStatus,
85943
86023
  PATROL_CCTV_CAMERA_FILTER,
85944
86024
  PERSON_TYPES,
86025
+ PLATFORM_STAFF_MEMBER_TYPE,
86026
+ PLATFORM_STAFF_ROLE_TYPE,
85945
86027
  PROPERTY_MANAGEMENT_MEMBER_TYPES,
85946
86028
  PStatus,
85947
86029
  PTZ_ALLOWED_ACTIONS,