@escapenavigator/types 2.1.28 → 2.1.30

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.
@@ -79,7 +79,16 @@ __decorate([
79
79
  __decorate([
80
80
  (0, class_validator_1.IsArray)(),
81
81
  (0, class_validator_1.ArrayNotEmpty)(),
82
- (0, class_transformer_1.Transform)(({ value }) => ((value === null || value === void 0 ? void 0 : value.length) ? value : [0, 1, 2, 3, 4, 5, 6])),
82
+ (0, class_transformer_1.Transform)(({ value }) => {
83
+ const source = Array.isArray(value) ? value : [];
84
+ const days = [
85
+ ...new Set(source
86
+ .map((day) => (typeof day === 'number' ? day : Number(day)))
87
+ .filter((day) => Number.isInteger(day) && day >= 0 && day <= 6)),
88
+ ];
89
+ // «holiday» из чипов дней недели в int[] не влезает и роняет UPDATE.
90
+ return days.length ? days : [0, 1, 2, 3, 4, 5, 6];
91
+ }),
83
92
  (0, class_transformer_1.Expose)(),
84
93
  __metadata("design:type", Array)
85
94
  ], CreateUpsellingDto.prototype, "availableDays", void 0);
@@ -4,7 +4,7 @@ import { RO } from '../../shared/ro-class';
4
4
  * - identity: `email`, `phone`, `name`, `surname`, `photo`;
5
5
  * - админка ролей/доступов: `roleId`, `questroomsIds`, `access`;
6
6
  * - таблица users-list / `working-shifts`: `lastVisit`, `lastDevice`,
7
- * `updatedAt`, `hoursContract`, `showInReports`.
7
+ * `updatedAt`, `hoursContract`, `showInReports`, `deletedAt`.
8
8
  * Personalia текущего пользователя — `language`, `theme`,
9
9
  * `notificationTriggers`, `pushNotifications`, `profileId` —
10
10
  * читается только через `useCurrentUser()` (JWT/auth context), а не
@@ -26,4 +26,6 @@ export declare class UserLightRO extends RO {
26
26
  roleId: number;
27
27
  lastDevice: string;
28
28
  lastVisit: Date;
29
+ /** Soft-delete. В справочнике остаётся ради имён в истории, в селекты не попадает. */
30
+ deletedAt?: Date | null;
29
31
  }
@@ -17,7 +17,7 @@ const ro_class_1 = require("../../shared/ro-class");
17
17
  * - identity: `email`, `phone`, `name`, `surname`, `photo`;
18
18
  * - админка ролей/доступов: `roleId`, `questroomsIds`, `access`;
19
19
  * - таблица users-list / `working-shifts`: `lastVisit`, `lastDevice`,
20
- * `updatedAt`, `hoursContract`, `showInReports`.
20
+ * `updatedAt`, `hoursContract`, `showInReports`, `deletedAt`.
21
21
  * Personalia текущего пользователя — `language`, `theme`,
22
22
  * `notificationTriggers`, `pushNotifications`, `profileId` —
23
23
  * читается только через `useCurrentUser()` (JWT/auth context), а не
@@ -83,3 +83,7 @@ __decorate([
83
83
  (0, class_transformer_1.Expose)(),
84
84
  __metadata("design:type", Date)
85
85
  ], UserLightRO.prototype, "lastVisit", void 0);
86
+ __decorate([
87
+ (0, class_transformer_1.Expose)(),
88
+ __metadata("design:type", Date)
89
+ ], UserLightRO.prototype, "deletedAt", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/types",
3
- "version": "2.1.28",
3
+ "version": "2.1.30",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,7 +23,7 @@
23
23
  "reflect-metadata": "^0.1.13",
24
24
  "rxjs": "^7.5.5"
25
25
  },
26
- "gitHead": "924b64647909d9ba40d926f6e678cb809b795935",
26
+ "gitHead": "089c7026734588a852850ab98ef6984711a5f343",
27
27
  "devDependencies": {
28
28
  "@types/validator": "13.0.0",
29
29
  "typescript": "^5.6"