@7365admin1/core 3.99.1-staging.410 → 3.99.1-staging.411

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1373,7 +1373,47 @@ declare function MSite(value: TSite): {
1373
1373
  name: string;
1374
1374
  description: string;
1375
1375
  orgId: string | ObjectId;
1376
- metadata: TSiteMetadata;
1376
+ metadata: {
1377
+ /** Tier two of the module cascade — see `site-modules.util.ts`. */
1378
+ modules?: string[] | undefined;
1379
+ block?: number | undefined;
1380
+ guardPosts?: number | undefined;
1381
+ gracePeriod?: number | undefined;
1382
+ incidentCounter: number;
1383
+ incidentLogo?: string | undefined;
1384
+ services?: Record<string, unknown>[] | undefined;
1385
+ residentAppModules?: Partial<Record<"feedback" | "bulletin" | "bulletinVideos" | "inviteVisitors" | "myVisitors" | "billingAndSoa" | "access" | "accessEntryPass" | "accessHid" | "facilityBooking" | "onlineForm" | "emergencyContact", boolean>> | undefined;
1386
+ /** Reminder lead time in days — see `metadataSchema` for the bounds. */
1387
+ documentExpiryNotificationDays?: number | undefined;
1388
+ hidQrCodePass?: {
1389
+ enabled: boolean;
1390
+ onlineMode?: boolean | undefined;
1391
+ readerId: string;
1392
+ qrGatePermissions?: {
1393
+ resident: string[];
1394
+ propertyManagement: string[];
1395
+ } | undefined;
1396
+ qrFormat: "0" | "1" | "2";
1397
+ identificationMethods?: {
1398
+ facial: boolean;
1399
+ card: boolean;
1400
+ qrCode: boolean;
1401
+ idPassword: boolean;
1402
+ pin: boolean;
1403
+ bluetooth: boolean;
1404
+ } | undefined;
1405
+ printer: {
1406
+ vendorId: string;
1407
+ productId: string;
1408
+ };
1409
+ template: {
1410
+ header: string;
1411
+ subtext: string;
1412
+ };
1413
+ validityMinutes: number | null;
1414
+ updatedAt: string;
1415
+ } | undefined;
1416
+ };
1377
1417
  status: string;
1378
1418
  createdAt: Date;
1379
1419
  address: SiteAddress | undefined;
package/dist/index.js CHANGED
@@ -6845,7 +6845,21 @@ function MSite(value) {
6845
6845
  name: value.name ?? "",
6846
6846
  description: value.description ?? "",
6847
6847
  orgId: value.orgId ?? "",
6848
- metadata: value.metadata ?? {},
6848
+ /*
6849
+ * `incidentCounter` is seeded at creation rather than left absent.
6850
+ *
6851
+ * `incident-report.service.ts` increments it for every report, and it used
6852
+ * to spring into existence on the first one — a dotted `$set` creates the
6853
+ * key. Seeding it means a site's shape does not depend on whether anybody
6854
+ * has filed a report yet, so a reader cannot meet the field as `undefined`
6855
+ * on a new site and only as a number on an old one.
6856
+ *
6857
+ * `siteSchema` does not permit `metadata` on creation at all, so the spread
6858
+ * below never fires today — it is there so that a caller supplying its own
6859
+ * metadata would still win if the schema ever allows it, rather than having
6860
+ * its counter silently reset to zero.
6861
+ */
6862
+ metadata: { incidentCounter: 0, ...value.metadata ?? {} },
6849
6863
  status: "active",
6850
6864
  createdAt: /* @__PURE__ */ new Date(),
6851
6865
  address: value.address,