@escapenavigator/types 1.10.156 → 1.10.158

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.
@@ -3,5 +3,6 @@ export declare enum BalanceItemTypeEnum {
3
3
  BONUS = "bonus",
4
4
  PAYMENT = "payment",
5
5
  CHARGE = "charge",
6
- AGGREGATOR = "aggregator"
6
+ AGGREGATOR = "aggregator",
7
+ AI_USAGE = "ai_usage"
7
8
  }
@@ -8,4 +8,5 @@ var BalanceItemTypeEnum;
8
8
  BalanceItemTypeEnum["PAYMENT"] = "payment";
9
9
  BalanceItemTypeEnum["CHARGE"] = "charge";
10
10
  BalanceItemTypeEnum["AGGREGATOR"] = "aggregator";
11
+ BalanceItemTypeEnum["AI_USAGE"] = "ai_usage";
11
12
  })(BalanceItemTypeEnum || (exports.BalanceItemTypeEnum = BalanceItemTypeEnum = {}));
@@ -0,0 +1,56 @@
1
+ import { QuestroomCancelationTypeEnum } from '../questroom/enum/questroom-cancelation-type.enum';
2
+ import { Languages } from '../shared/enum/languages.enum';
3
+ import { PrepaymentTypeEnum } from '../slot/enum/prepayment-type.enum';
4
+ /**
5
+ * Живой контекст КОМПАНИИ для ИИ-ассистента чата (всё, что не про конкретный
6
+ * квест): контакты, языки, локации, правила бронирования и часы работы.
7
+ *
8
+ * Собирается на лету (`CompanyAiContextService`) из профиля, локаций,
9
+ * default-правила слотов и расписания — в БД не хранится, всегда актуально.
10
+ * Свободный FAQ (что нельзя вывести из структуры) ведётся вручную в
11
+ * `widget_chat_knowledge` и ищется через searchKnowledge.
12
+ */
13
+ export type CompanyAiWorkingDay = {
14
+ open: string;
15
+ close: string;
16
+ };
17
+ export type CompanyAiContext = {
18
+ title: string;
19
+ country?: string;
20
+ timeZone?: string;
21
+ languages: Languages[];
22
+ contacts: {
23
+ phone?: string;
24
+ site?: string;
25
+ instagram?: string;
26
+ agreementLink?: string;
27
+ };
28
+ locations: Array<{
29
+ title?: string;
30
+ address: string;
31
+ city?: string;
32
+ subwayStation?: string | null;
33
+ phone?: string;
34
+ howToFind?: string;
35
+ prepareText?: string;
36
+ timeZone?: string;
37
+ amenities: {
38
+ wifi: boolean;
39
+ wardrobe: boolean;
40
+ freeParking: boolean;
41
+ parking: boolean;
42
+ waitingArea: boolean;
43
+ waitingAreaSize?: number;
44
+ };
45
+ }>;
46
+ booking?: {
47
+ prepaymentType: PrepaymentTypeEnum;
48
+ prepayment: number;
49
+ currency?: string;
50
+ freeCancelHours?: number;
51
+ minBookingHours?: number;
52
+ cancelationRule: QuestroomCancelationTypeEnum;
53
+ clientCanCancel: boolean;
54
+ };
55
+ workingHours?: Partial<Record<'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun', CompanyAiWorkingDay>>;
56
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -54,5 +54,6 @@ export declare class CreateQuestroomDto {
54
54
  flexPlayersSelect?: boolean;
55
55
  slotStepMinutes?: number;
56
56
  questOpeningDate?: string;
57
+ aiNote?: string;
57
58
  }
58
59
  export {};
@@ -306,3 +306,11 @@ __decorate([
306
306
  (0, class_transformer_1.Expose)(),
307
307
  __metadata("design:type", String)
308
308
  ], CreateQuestroomDto.prototype, "questOpeningDate", void 0);
309
+ __decorate([
310
+ (0, class_validator_1.IsOptional)(),
311
+ (0, class_validator_1.IsString)(),
312
+ (0, class_transformer_1.Transform)(({ value }) => value || null),
313
+ (0, class_transformer_1.Expose)(),
314
+ (0, class_validator_1.MaxLength)(2000),
315
+ __metadata("design:type", String)
316
+ ], CreateQuestroomDto.prototype, "aiNote", void 0);
@@ -0,0 +1,93 @@
1
+ import { Languages } from '../shared/enum/languages.enum';
2
+ import { TagsEnum } from '../shared/enum/tags.enum';
3
+ import { QuestroomActorsEnum } from './enum/questroom-actors.enum';
4
+ import { QuestroomTypeEnum } from './enum/questroom-type.enum';
5
+ /**
6
+ * Структурированный контекст квеста для ИИ-ассистента виджет-чата.
7
+ *
8
+ * Собирается «на лету» из `QuestroomEntity` (+ профиль/локация) билдером
9
+ * `buildQuestroomAiContext` — в БД НЕ хранится, поэтому всегда актуален при
10
+ * любом изменении квеста. Единственное, что владелец правит руками, — это
11
+ * `aiNote` («Что учесть перед ответом»), оно живёт на самом квесте.
12
+ *
13
+ * Шкалы (`difficulty`/`fear`) отдаются вместе с максимумом (`X из max`),
14
+ * чтобы модель понимала диапазон, а не абсолютное число. Значения enum'ов
15
+ * расшифровываются глоссарием в системном промпте ассистента.
16
+ */
17
+ export type QuestroomAiScale = {
18
+ value: number;
19
+ max: number;
20
+ };
21
+ export type QuestroomAiContext = {
22
+ id: number;
23
+ title: string;
24
+ location?: {
25
+ phone?: string;
26
+ address: string;
27
+ city?: string;
28
+ subwayStation?: string | null;
29
+ howToFind?: string;
30
+ prepareText?: string;
31
+ amenities?: {
32
+ wifi: boolean;
33
+ wardrobe: boolean;
34
+ freeParking: boolean;
35
+ parking: boolean;
36
+ waitingArea: boolean;
37
+ waitingAreaSize?: number;
38
+ };
39
+ };
40
+ description?: {
41
+ teaser?: string;
42
+ legend?: string;
43
+ importantInfo?: string;
44
+ };
45
+ gameplay: {
46
+ type: QuestroomTypeEnum;
47
+ tags: TagsEnum[];
48
+ actors: QuestroomActorsEnum;
49
+ difficulty: QuestroomAiScale;
50
+ fear: QuestroomAiScale;
51
+ minAge: number;
52
+ durationMinutes: number;
53
+ playersMin: number;
54
+ playersMax: number;
55
+ };
56
+ price?: {
57
+ min?: number;
58
+ max?: number;
59
+ currency?: string;
60
+ };
61
+ languages?: Languages[];
62
+ booking: {
63
+ isClosed: boolean;
64
+ openingDate?: string;
65
+ };
66
+ media?: {
67
+ mainPhoto?: string;
68
+ photos?: string[];
69
+ video?: string;
70
+ };
71
+ aiNote?: string;
72
+ };
73
+ /**
74
+ * Компактная карточка квеста для «индекса» — одна строка на квест. Кладётся
75
+ * в системный контекст целиком (все квесты профиля), чтобы модель видела весь
76
+ * ассортимент и ничего не «пропадало» при большом числе квестов. Полный
77
+ * `QuestroomAiContext` модель догружает по id через tool getQuestroomDetails.
78
+ */
79
+ export type QuestroomAiIndexItem = {
80
+ id: number;
81
+ title: string;
82
+ type: QuestroomTypeEnum;
83
+ playersMin: number;
84
+ playersMax: number;
85
+ minAge: number;
86
+ durationMinutes: number;
87
+ priceMin?: number;
88
+ priceMax?: number;
89
+ currency?: string;
90
+ tags: TagsEnum[];
91
+ languages: Languages[];
92
+ isClosed: boolean;
93
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -26,4 +26,5 @@ export declare class QuestroomRO extends QuestroomLightRO {
26
26
  top: boolean;
27
27
  awailableForNavigator: boolean;
28
28
  photoFrame: string;
29
+ aiNote?: string;
29
30
  }
@@ -90,3 +90,7 @@ __decorate([
90
90
  (0, class_transformer_1.Expose)(),
91
91
  __metadata("design:type", String)
92
92
  ], QuestroomRO.prototype, "photoFrame", void 0);
93
+ __decorate([
94
+ (0, class_transformer_1.Expose)(),
95
+ __metadata("design:type", String)
96
+ ], QuestroomRO.prototype, "aiNote", void 0);
@@ -6,6 +6,7 @@ export declare class CreateRoleDto {
6
6
  canSeeOnlyHisBookings: boolean;
7
7
  canLockBookings: boolean;
8
8
  accessToClientsSection: boolean;
9
+ canUseChat: boolean;
9
10
  accessToMarketingSection: boolean;
10
11
  accessToFinanceSection: boolean;
11
12
  accessToStatisticSection: boolean;
@@ -57,6 +57,12 @@ __decorate([
57
57
  (0, class_transformer_1.Expose)(),
58
58
  __metadata("design:type", Boolean)
59
59
  ], CreateRoleDto.prototype, "accessToClientsSection", void 0);
60
+ __decorate([
61
+ (0, class_validator_1.IsBoolean)(),
62
+ (0, class_transformer_1.Transform)(({ value }) => (value !== undefined ? value : false)),
63
+ (0, class_transformer_1.Expose)(),
64
+ __metadata("design:type", Boolean)
65
+ ], CreateRoleDto.prototype, "canUseChat", void 0);
60
66
  __decorate([
61
67
  (0, class_validator_1.IsBoolean)(),
62
68
  (0, class_transformer_1.Transform)(({ value }) => (value !== undefined ? value : false)),
@@ -5,6 +5,7 @@ export declare class RoleRO extends RoleLightRO {
5
5
  canSeeOnlyHisBookings: boolean;
6
6
  canLockBookings: boolean;
7
7
  accessToClientsSection: boolean;
8
+ canUseChat: boolean;
8
9
  accessToMarketingSection: boolean;
9
10
  accessToFinanceSection: boolean;
10
11
  accessToStatisticSection: boolean;
@@ -35,6 +35,10 @@ __decorate([
35
35
  (0, class_transformer_1.Expose)(),
36
36
  __metadata("design:type", Boolean)
37
37
  ], RoleRO.prototype, "accessToClientsSection", void 0);
38
+ __decorate([
39
+ (0, class_transformer_1.Expose)(),
40
+ __metadata("design:type", Boolean)
41
+ ], RoleRO.prototype, "canUseChat", void 0);
38
42
  __decorate([
39
43
  (0, class_transformer_1.Expose)(),
40
44
  __metadata("design:type", Boolean)
@@ -56,6 +56,12 @@ export type SlotRO = {
56
56
  upsellingsTotal?: number;
57
57
  /** Проблема доставки письма клиенту (красный имейл-бейдж). */
58
58
  emailTrouble?: boolean;
59
+ /**
60
+ * Есть комментарии по заказу для иконки на слоте: заметка сотрудника
61
+ * (денорм `orders.hasStaffComments`) ИЛИ комментарий игрока
62
+ * (`orders.comment`). Считается в serializeSlot.
63
+ */
64
+ hasComments?: boolean;
59
65
  client?: {
60
66
  id: number;
61
67
  name?: string;