@escapenavigator/types 2.1.3 → 2.1.4

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.
@@ -1,6 +1,7 @@
1
1
  import { LogTitleEnum } from '../../log/log-title.enum';
2
2
  import { NotificationTriggerEnum } from '../../profile/notification-chanel/notification-chanel-action.enum';
3
3
  import { Languages } from '../../shared/enum/languages.enum';
4
+ import { OrderNotifyHorizonEnum } from '../enum/order-notify-horizon.enum';
4
5
  import { PushOrderScopeEnum } from '../enum/push-order-scope.enum';
5
6
  import { UserLightRO } from './user-light.ro';
6
7
  export declare class UserRO extends UserLightRO {
@@ -12,6 +13,7 @@ export declare class UserRO extends UserLightRO {
12
13
  pushOrderScope: PushOrderScopeEnum;
13
14
  pushShiftEvents: boolean;
14
15
  staffOrderShiftOnly: boolean;
16
+ orderNotifyHorizon: OrderNotifyHorizonEnum;
15
17
  /** Когда задан PIN быстрого входа. `null` — CRM потребует задать его. */
16
18
  pinSetAt: Date | null;
17
19
  }
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UserRO = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const languages_enum_1 = require("../../shared/enum/languages.enum");
15
+ const order_notify_horizon_enum_1 = require("../enum/order-notify-horizon.enum");
15
16
  const push_order_scope_enum_1 = require("../enum/push-order-scope.enum");
16
17
  const user_light_ro_1 = require("./user-light.ro");
17
18
  class UserRO extends user_light_ro_1.UserLightRO {
@@ -53,6 +54,11 @@ __decorate([
53
54
  (0, class_transformer_1.Transform)(({ value }) => value !== null && value !== void 0 ? value : false),
54
55
  __metadata("design:type", Boolean)
55
56
  ], UserRO.prototype, "staffOrderShiftOnly", void 0);
57
+ __decorate([
58
+ (0, class_transformer_1.Expose)(),
59
+ (0, class_transformer_1.Transform)(({ value }) => value || order_notify_horizon_enum_1.OrderNotifyHorizonEnum.ANY),
60
+ __metadata("design:type", String)
61
+ ], UserRO.prototype, "orderNotifyHorizon", void 0);
56
62
  __decorate([
57
63
  (0, class_transformer_1.Expose)(),
58
64
  __metadata("design:type", Date)
@@ -1,4 +1,5 @@
1
1
  import { NotificationTriggerEnum } from '../../profile/notification-chanel/notification-chanel-action.enum';
2
+ import { OrderNotifyHorizonEnum } from '../enum/order-notify-horizon.enum';
2
3
  import { PushOrderScopeEnum } from '../enum/push-order-scope.enum';
3
4
  export declare class UpdateCurrentUserNotificationsDto {
4
5
  notificationTriggers: NotificationTriggerEnum[];
@@ -15,4 +16,9 @@ export declare class UpdateCurrentUserNotificationsDto {
15
16
  * причине, что и пуш-поля: старые клиенты поле не присылают.
16
17
  */
17
18
  staffOrderShiftOnly?: boolean;
19
+ /**
20
+ * Горизонт броней для email, личного Telegram и пушей. Общая ось:
21
+ * «только ближайшие 24 часа» режет все три канала одинаково.
22
+ */
23
+ orderNotifyHorizon?: OrderNotifyHorizonEnum;
18
24
  }
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpdateCurrentUserNotificationsDto = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
+ const order_notify_horizon_enum_1 = require("../enum/order-notify-horizon.enum");
15
16
  const push_order_scope_enum_1 = require("../enum/push-order-scope.enum");
16
17
  class UpdateCurrentUserNotificationsDto {
17
18
  }
@@ -49,3 +50,9 @@ __decorate([
49
50
  (0, class_transformer_1.Expose)(),
50
51
  __metadata("design:type", Boolean)
51
52
  ], UpdateCurrentUserNotificationsDto.prototype, "staffOrderShiftOnly", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsOptional)(),
55
+ (0, class_validator_1.IsEnum)(order_notify_horizon_enum_1.OrderNotifyHorizonEnum),
56
+ (0, class_transformer_1.Expose)(),
57
+ __metadata("design:type", String)
58
+ ], UpdateCurrentUserNotificationsDto.prototype, "orderNotifyHorizon", void 0);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Горизонт уведомлений сотрудника о бронях (email, личный Telegram, пуши).
3
+ *
4
+ * Отдельная ось от скоупа смен: можно получать все брони локаций, но только
5
+ * если игра начинается в ближайшие сутки — типичный режим для админа на смене.
6
+ */
7
+ export declare enum OrderNotifyHorizonEnum {
8
+ /** Без ограничения по дате игры. */
9
+ ANY = "any",
10
+ /** Только брони, чья игра начинается в ближайшие 24 часа. */
11
+ NEXT_24H = "next24h"
12
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrderNotifyHorizonEnum = void 0;
4
+ /**
5
+ * Горизонт уведомлений сотрудника о бронях (email, личный Telegram, пуши).
6
+ *
7
+ * Отдельная ось от скоупа смен: можно получать все брони локаций, но только
8
+ * если игра начинается в ближайшие сутки — типичный режим для админа на смене.
9
+ */
10
+ var OrderNotifyHorizonEnum;
11
+ (function (OrderNotifyHorizonEnum) {
12
+ /** Без ограничения по дате игры. */
13
+ OrderNotifyHorizonEnum["ANY"] = "any";
14
+ /** Только брони, чья игра начинается в ближайшие 24 часа. */
15
+ OrderNotifyHorizonEnum["NEXT_24H"] = "next24h";
16
+ })(OrderNotifyHorizonEnum || (exports.OrderNotifyHorizonEnum = OrderNotifyHorizonEnum = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/types",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
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": "5b85efe5deb145b844c018076f1bfcd2a14a3299",
26
+ "gitHead": "e389cd613c0b7b746d6bf65b24e86c4ce25ce400",
27
27
  "devDependencies": {
28
28
  "@types/validator": "13.0.0",
29
29
  "typescript": "^5.6"