@escapenavigator/types 2.1.10 → 2.1.11

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,33 @@
1
+ /**
2
+ * Публичная лента свободных слотов города на одну локальную дату.
3
+ * Витрина last-minute: агрегатор и внешние партнёры (Spontano).
4
+ *
5
+ * Занятые слоты сюда не попадают. Квеста без свободного слота в ответе нет.
6
+ * Список может отстать на TTL кеша — бронь всё равно перепроверяется
7
+ * в виджете / create-booking.
8
+ */
9
+ export declare class AgregatorCityAvailableSlot {
10
+ slotId: string;
11
+ start: string;
12
+ end?: string;
13
+ startAt?: string;
14
+ priceMinor?: number;
15
+ seatsAvailable?: number;
16
+ deadline?: string | null;
17
+ }
18
+ export declare class AgregatorCityAvailableQuestroom {
19
+ id: number;
20
+ title: string;
21
+ slug: string;
22
+ photo?: string;
23
+ playersMin: number;
24
+ playersMax: number;
25
+ currency?: string;
26
+ slots: AgregatorCityAvailableSlot[];
27
+ }
28
+ export declare class AgregatorCityAvailableSlotsRO {
29
+ cityId: number;
30
+ date: string;
31
+ timezone: string;
32
+ questrooms: AgregatorCityAvailableQuestroom[];
33
+ }
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AgregatorCityAvailableSlotsRO = exports.AgregatorCityAvailableQuestroom = exports.AgregatorCityAvailableSlot = void 0;
13
+ /* eslint-disable max-classes-per-file */
14
+ const swagger_1 = require("@nestjs/swagger");
15
+ const class_transformer_1 = require("class-transformer");
16
+ /**
17
+ * Публичная лента свободных слотов города на одну локальную дату.
18
+ * Витрина last-minute: агрегатор и внешние партнёры (Spontano).
19
+ *
20
+ * Занятые слоты сюда не попадают. Квеста без свободного слота в ответе нет.
21
+ * Список может отстать на TTL кеша — бронь всё равно перепроверяется
22
+ * в виджете / create-booking.
23
+ */
24
+ class AgregatorCityAvailableSlot {
25
+ }
26
+ exports.AgregatorCityAvailableSlot = AgregatorCityAvailableSlot;
27
+ __decorate([
28
+ (0, swagger_1.ApiProperty)({ example: '884213' }),
29
+ (0, class_transformer_1.Expose)(),
30
+ __metadata("design:type", String)
31
+ ], AgregatorCityAvailableSlot.prototype, "slotId", void 0);
32
+ __decorate([
33
+ (0, swagger_1.ApiProperty)({ description: 'Local venue time, `HH:mm`.', example: '18:00' }),
34
+ (0, class_transformer_1.Expose)(),
35
+ __metadata("design:type", String)
36
+ ], AgregatorCityAvailableSlot.prototype, "start", void 0);
37
+ __decorate([
38
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Local venue time, `HH:mm`.', example: '19:15' }),
39
+ (0, class_transformer_1.Expose)(),
40
+ __metadata("design:type", String)
41
+ ], AgregatorCityAvailableSlot.prototype, "end", void 0);
42
+ __decorate([
43
+ (0, swagger_1.ApiPropertyOptional)({
44
+ description: 'Slot start in UTC, ISO.',
45
+ example: '2026-09-08T16:00:00.000Z',
46
+ }),
47
+ (0, class_transformer_1.Expose)(),
48
+ __metadata("design:type", String)
49
+ ], AgregatorCityAvailableSlot.prototype, "startAt", void 0);
50
+ __decorate([
51
+ (0, swagger_1.ApiPropertyOptional)({
52
+ description: 'Cheapest group price, minor units (cents).',
53
+ example: 8900,
54
+ }),
55
+ (0, class_transformer_1.Expose)(),
56
+ __metadata("design:type", Number)
57
+ ], AgregatorCityAvailableSlot.prototype, "priceMinor", void 0);
58
+ __decorate([
59
+ (0, swagger_1.ApiPropertyOptional)({ example: 6 }),
60
+ (0, class_transformer_1.Expose)(),
61
+ __metadata("design:type", Number)
62
+ ], AgregatorCityAvailableSlot.prototype, "seatsAvailable", void 0);
63
+ __decorate([
64
+ (0, swagger_1.ApiPropertyOptional)({
65
+ description: 'Last moment a booking is accepted, UTC ISO. `null` — no cutoff.',
66
+ example: '2026-09-08T14:00:00.000Z',
67
+ nullable: true,
68
+ }),
69
+ (0, class_transformer_1.Expose)(),
70
+ __metadata("design:type", String)
71
+ ], AgregatorCityAvailableSlot.prototype, "deadline", void 0);
72
+ class AgregatorCityAvailableQuestroom {
73
+ }
74
+ exports.AgregatorCityAvailableQuestroom = AgregatorCityAvailableQuestroom;
75
+ __decorate([
76
+ (0, swagger_1.ApiProperty)({ example: 41 }),
77
+ (0, class_transformer_1.Expose)(),
78
+ __metadata("design:type", Number)
79
+ ], AgregatorCityAvailableQuestroom.prototype, "id", void 0);
80
+ __decorate([
81
+ (0, swagger_1.ApiProperty)({ example: 'The Lost Tomb' }),
82
+ (0, class_transformer_1.Expose)(),
83
+ __metadata("design:type", String)
84
+ ], AgregatorCityAvailableQuestroom.prototype, "title", void 0);
85
+ __decorate([
86
+ (0, swagger_1.ApiProperty)({
87
+ description: 'Catalog slug: `/{country}/{city}/{quest}`.',
88
+ example: '/de/munich/the-lost-tomb',
89
+ }),
90
+ (0, class_transformer_1.Expose)(),
91
+ __metadata("design:type", String)
92
+ ], AgregatorCityAvailableQuestroom.prototype, "slug", void 0);
93
+ __decorate([
94
+ (0, swagger_1.ApiPropertyOptional)({ example: 'https://cdn.escapenavigator.com/questrooms/tomb.jpg' }),
95
+ (0, class_transformer_1.Expose)(),
96
+ __metadata("design:type", String)
97
+ ], AgregatorCityAvailableQuestroom.prototype, "photo", void 0);
98
+ __decorate([
99
+ (0, swagger_1.ApiProperty)({ example: 2 }),
100
+ (0, class_transformer_1.Expose)(),
101
+ __metadata("design:type", Number)
102
+ ], AgregatorCityAvailableQuestroom.prototype, "playersMin", void 0);
103
+ __decorate([
104
+ (0, swagger_1.ApiProperty)({ example: 6 }),
105
+ (0, class_transformer_1.Expose)(),
106
+ __metadata("design:type", Number)
107
+ ], AgregatorCityAvailableQuestroom.prototype, "playersMax", void 0);
108
+ __decorate([
109
+ (0, swagger_1.ApiPropertyOptional)({ description: 'ISO 4217.', example: 'EUR' }),
110
+ (0, class_transformer_1.Expose)(),
111
+ __metadata("design:type", String)
112
+ ], AgregatorCityAvailableQuestroom.prototype, "currency", void 0);
113
+ __decorate([
114
+ (0, swagger_1.ApiProperty)({ type: () => [AgregatorCityAvailableSlot] }),
115
+ (0, class_transformer_1.Type)(() => AgregatorCityAvailableSlot),
116
+ (0, class_transformer_1.Expose)(),
117
+ __metadata("design:type", Array)
118
+ ], AgregatorCityAvailableQuestroom.prototype, "slots", void 0);
119
+ class AgregatorCityAvailableSlotsRO {
120
+ }
121
+ exports.AgregatorCityAvailableSlotsRO = AgregatorCityAvailableSlotsRO;
122
+ __decorate([
123
+ (0, swagger_1.ApiProperty)({ example: 12 }),
124
+ (0, class_transformer_1.Expose)(),
125
+ __metadata("design:type", Number)
126
+ ], AgregatorCityAvailableSlotsRO.prototype, "cityId", void 0);
127
+ __decorate([
128
+ (0, swagger_1.ApiProperty)({
129
+ description: 'Resolved local city date, `yyyy-MM-dd`. Aliases `today`/`tomorrow` are expanded.',
130
+ example: '2026-09-08',
131
+ }),
132
+ (0, class_transformer_1.Expose)(),
133
+ __metadata("design:type", String)
134
+ ], AgregatorCityAvailableSlotsRO.prototype, "date", void 0);
135
+ __decorate([
136
+ (0, swagger_1.ApiProperty)({ description: 'IANA timezone of the city.', example: 'Europe/Berlin' }),
137
+ (0, class_transformer_1.Expose)(),
138
+ __metadata("design:type", String)
139
+ ], AgregatorCityAvailableSlotsRO.prototype, "timezone", void 0);
140
+ __decorate([
141
+ (0, swagger_1.ApiProperty)({ type: () => [AgregatorCityAvailableQuestroom] }),
142
+ (0, class_transformer_1.Type)(() => AgregatorCityAvailableQuestroom),
143
+ (0, class_transformer_1.Expose)(),
144
+ __metadata("design:type", Array)
145
+ ], AgregatorCityAvailableSlotsRO.prototype, "questrooms", void 0);
@@ -0,0 +1,5 @@
1
+ import { Languages } from '../../shared/enum/languages.enum';
2
+ export declare class AgregatorCityAvailableSlotsDto {
3
+ date: string;
4
+ language?: Languages;
5
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AgregatorCityAvailableSlotsDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const class_validator_1 = require("class-validator");
16
+ const languages_enum_1 = require("../../shared/enum/languages.enum");
17
+ class AgregatorCityAvailableSlotsDto {
18
+ }
19
+ exports.AgregatorCityAvailableSlotsDto = AgregatorCityAvailableSlotsDto;
20
+ __decorate([
21
+ (0, swagger_1.ApiProperty)({
22
+ description: '`yyyy-MM-dd`, or `today` / `tomorrow` in the city timezone. Horizon is today plus 7 days.',
23
+ example: 'today',
24
+ }),
25
+ (0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$|^(today|tomorrow)$/),
26
+ (0, class_transformer_1.Expose)(),
27
+ __metadata("design:type", String)
28
+ ], AgregatorCityAvailableSlotsDto.prototype, "date", void 0);
29
+ __decorate([
30
+ (0, swagger_1.ApiPropertyOptional)({
31
+ enum: languages_enum_1.Languages,
32
+ description: 'Localized quest titles. Defaults to `en`.',
33
+ example: languages_enum_1.Languages.DE,
34
+ }),
35
+ (0, class_validator_1.IsOptional)(),
36
+ (0, class_validator_1.IsEnum)(languages_enum_1.Languages),
37
+ (0, class_transformer_1.Expose)(),
38
+ __metadata("design:type", String)
39
+ ], AgregatorCityAvailableSlotsDto.prototype, "language", void 0);
@@ -6,3 +6,5 @@ export declare enum ProfileIntegrationTypeEnum {
6
6
  PARTNER = "partner",
7
7
  NONE = "none"
8
8
  }
9
+ /** CRM, с которых расписание тянется вовне — не собственный календарь Навигатора. */
10
+ export declare const EXTERNAL_CRM_INTEGRATION_TYPES: ProfileIntegrationTypeEnum[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProfileIntegrationTypeEnum = void 0;
3
+ exports.EXTERNAL_CRM_INTEGRATION_TYPES = exports.ProfileIntegrationTypeEnum = void 0;
4
4
  var ProfileIntegrationTypeEnum;
5
5
  (function (ProfileIntegrationTypeEnum) {
6
6
  ProfileIntegrationTypeEnum["BOOKEO"] = "bookeo";
@@ -10,3 +10,10 @@ var ProfileIntegrationTypeEnum;
10
10
  ProfileIntegrationTypeEnum["PARTNER"] = "partner";
11
11
  ProfileIntegrationTypeEnum["NONE"] = "none";
12
12
  })(ProfileIntegrationTypeEnum || (exports.ProfileIntegrationTypeEnum = ProfileIntegrationTypeEnum = {}));
13
+ /** CRM, с которых расписание тянется вовне — не собственный календарь Навигатора. */
14
+ exports.EXTERNAL_CRM_INTEGRATION_TYPES = [
15
+ ProfileIntegrationTypeEnum.BOOKEO,
16
+ ProfileIntegrationTypeEnum.MYERP,
17
+ ProfileIntegrationTypeEnum.KVESTADMIN,
18
+ ProfileIntegrationTypeEnum.PARTNER,
19
+ ];
@@ -5,4 +5,6 @@ export declare enum ProfileSubscriptionTypeEnum {
5
5
  GROWTH = "growth"
6
6
  }
7
7
  export declare const PAID_PRO_LIKE_SUBSCRIPTION_TYPES: ProfileSubscriptionTypeEnum[];
8
+ /** Платные подписки на админ-дашборде считаем только по заходам за эти дни. */
9
+ export declare const PAID_SUBSCRIPTION_RECENT_LOGIN_DAYS = 7;
8
10
  export declare const isProOrAbove: (type: ProfileSubscriptionTypeEnum) => boolean;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isProOrAbove = exports.PAID_PRO_LIKE_SUBSCRIPTION_TYPES = exports.ProfileSubscriptionTypeEnum = void 0;
3
+ exports.isProOrAbove = exports.PAID_SUBSCRIPTION_RECENT_LOGIN_DAYS = exports.PAID_PRO_LIKE_SUBSCRIPTION_TYPES = exports.ProfileSubscriptionTypeEnum = void 0;
4
4
  var ProfileSubscriptionTypeEnum;
5
5
  (function (ProfileSubscriptionTypeEnum) {
6
6
  ProfileSubscriptionTypeEnum["NONE"] = "none";
@@ -12,6 +12,8 @@ exports.PAID_PRO_LIKE_SUBSCRIPTION_TYPES = [
12
12
  ProfileSubscriptionTypeEnum.PRO,
13
13
  ProfileSubscriptionTypeEnum.GROWTH,
14
14
  ];
15
+ /** Платные подписки на админ-дашборде считаем только по заходам за эти дни. */
16
+ exports.PAID_SUBSCRIPTION_RECENT_LOGIN_DAYS = 7;
15
17
  const isProOrAbove = (type) => exports.PAID_PRO_LIKE_SUBSCRIPTION_TYPES.includes(type);
16
18
  exports.isProOrAbove = isProOrAbove;
17
19
  // trialing The subscription is currently in a trial period and it’s safe to provision your product for your customer. The subscription transitions automatically to active when the first payment is made.
@@ -19,6 +19,11 @@ export declare class QueryAdminProfileDto {
19
19
  lastVisitAfter?: string;
20
20
  /** lastVisit старше даты или отсутствует (для Free Lost на CRM-канбане). */
21
21
  lastVisitBeforeOrNever?: string;
22
+ /**
23
+ * Компании, у которых на Навигаторе реально открыто расписание:
24
+ * партнёрская программа active и есть живой квест с источником слотов.
25
+ */
26
+ hasAggregatorSchedule?: boolean;
22
27
  status?: ProfileStatusEnum[];
23
28
  salesStatus?: ProfileSalesStatus[];
24
29
  techStatus?: ProfileTechStatusEnum;
@@ -29,6 +34,7 @@ export declare class QueryAdminProfileDto {
29
34
  lastEmailSendId?: string;
30
35
  notlastEmailSendId?: string;
31
36
  integrationType?: ProfileIntegrationTypeEnum;
37
+ integrationTypes?: ProfileIntegrationTypeEnum[];
32
38
  /** true — только DNC; false — без DNC; пусто — все. */
33
39
  doNotContact?: boolean;
34
40
  }
@@ -60,6 +60,10 @@ __decorate([
60
60
  (0, class_transformer_1.Expose)(),
61
61
  __metadata("design:type", String)
62
62
  ], QueryAdminProfileDto.prototype, "lastVisitBeforeOrNever", void 0);
63
+ __decorate([
64
+ (0, class_transformer_1.Expose)(),
65
+ __metadata("design:type", Boolean)
66
+ ], QueryAdminProfileDto.prototype, "hasAggregatorSchedule", void 0);
63
67
  __decorate([
64
68
  (0, class_transformer_1.Expose)(),
65
69
  __metadata("design:type", Array)
@@ -96,6 +100,10 @@ __decorate([
96
100
  (0, class_transformer_1.Expose)(),
97
101
  __metadata("design:type", String)
98
102
  ], QueryAdminProfileDto.prototype, "integrationType", void 0);
103
+ __decorate([
104
+ (0, class_transformer_1.Expose)(),
105
+ __metadata("design:type", Array)
106
+ ], QueryAdminProfileDto.prototype, "integrationTypes", void 0);
99
107
  __decorate([
100
108
  (0, class_transformer_1.Expose)(),
101
109
  __metadata("design:type", Boolean)
@@ -45,7 +45,7 @@ __decorate([
45
45
  __decorate([
46
46
  (0, class_validator_1.IsOptional)(),
47
47
  (0, class_transformer_1.Expose)(),
48
- (0, class_validator_1.MaxLength)(2000),
48
+ (0, class_validator_1.MaxLength)(2500),
49
49
  __metadata("design:type", String)
50
50
  ], Locale.prototype, "importantInfo", void 0);
51
51
  __decorate([
@@ -294,7 +294,7 @@ __decorate([
294
294
  __decorate([
295
295
  (0, class_validator_1.IsOptional)(),
296
296
  (0, class_transformer_1.Expose)(),
297
- (0, class_validator_1.MaxLength)(2000),
297
+ (0, class_validator_1.MaxLength)(2500),
298
298
  __metadata("design:type", String)
299
299
  ], CreateQuestroomDto.prototype, "importantInfo", void 0);
300
300
  __decorate([
@@ -31,4 +31,6 @@ export declare class CreateRoleDto {
31
31
  canEditSchedule: boolean;
32
32
  canExportData: boolean;
33
33
  canRevealClientContacts: boolean;
34
+ canDeletePayments: boolean;
35
+ canSeeEmployeeReport: boolean;
34
36
  }
@@ -183,3 +183,15 @@ __decorate([
183
183
  (0, class_transformer_1.Expose)(),
184
184
  __metadata("design:type", Boolean)
185
185
  ], CreateRoleDto.prototype, "canRevealClientContacts", void 0);
186
+ __decorate([
187
+ (0, class_validator_1.IsBoolean)(),
188
+ (0, class_transformer_1.Transform)(({ value }) => (value !== undefined ? value : false)),
189
+ (0, class_transformer_1.Expose)(),
190
+ __metadata("design:type", Boolean)
191
+ ], CreateRoleDto.prototype, "canDeletePayments", void 0);
192
+ __decorate([
193
+ (0, class_validator_1.IsBoolean)(),
194
+ (0, class_transformer_1.Transform)(({ value }) => (value !== undefined ? value : false)),
195
+ (0, class_transformer_1.Expose)(),
196
+ __metadata("design:type", Boolean)
197
+ ], CreateRoleDto.prototype, "canSeeEmployeeReport", void 0);
@@ -30,4 +30,6 @@ export declare class RoleRO extends RoleLightRO {
30
30
  canEditSchedule: boolean;
31
31
  canExportData: boolean;
32
32
  canRevealClientContacts: boolean;
33
+ canDeletePayments: boolean;
34
+ canSeeEmployeeReport: boolean;
33
35
  }
@@ -119,3 +119,11 @@ __decorate([
119
119
  (0, class_transformer_1.Expose)(),
120
120
  __metadata("design:type", Boolean)
121
121
  ], RoleRO.prototype, "canRevealClientContacts", void 0);
122
+ __decorate([
123
+ (0, class_transformer_1.Expose)(),
124
+ __metadata("design:type", Boolean)
125
+ ], RoleRO.prototype, "canDeletePayments", void 0);
126
+ __decorate([
127
+ (0, class_transformer_1.Expose)(),
128
+ __metadata("design:type", Boolean)
129
+ ], RoleRO.prototype, "canSeeEmployeeReport", void 0);