@escapenavigator/types 2.2.10 → 2.3.0
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,6 @@
|
|
|
1
1
|
import { IntegrationBookingModeEnum } from './booking-mode.enum';
|
|
2
2
|
import { IntegrationConnectionStatusEnum } from './connection-status.enum';
|
|
3
|
-
import { IntegrationIncidentSeverityEnum } from './incident-status.enum';
|
|
3
|
+
import { IntegrationIncidentSeverityEnum, IntegrationIncidentStatusEnum } from './incident-status.enum';
|
|
4
4
|
import { IntegrationIncidentTypeEnum } from './incident-type.enum';
|
|
5
5
|
import { IntegrationRequestStatusEnum } from './integration-request-status.enum';
|
|
6
6
|
import { IntegrationProviderCodeEnum } from './provider-code.enum';
|
|
@@ -34,10 +34,68 @@ export type AdminIntegrationConnectionRow = {
|
|
|
34
34
|
lastSuccessHoursAgo: number | null;
|
|
35
35
|
breakerOpen: boolean;
|
|
36
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Неисправленный квест на вкладке «Проблемы».
|
|
39
|
+
*
|
|
40
|
+
* Одна строка — один квест. Несколько записей (расписание не приходит, пустое
|
|
41
|
+
* расписание, бронь) схлопываются: `incidentIds` — все записи, смена статуса
|
|
42
|
+
* применяется к ним вместе. `resolved` и `ignored` в список не входят.
|
|
43
|
+
*/
|
|
44
|
+
export type AdminIntegrationProblemRow = {
|
|
45
|
+
/** Меньший id среди записей квеста. Стабильный ключ строки. */
|
|
46
|
+
id: number;
|
|
47
|
+
/** Все неисправленные записи, из которых собрана строка. */
|
|
48
|
+
incidentIds: number[];
|
|
49
|
+
connectionId: number;
|
|
50
|
+
profileId: number;
|
|
51
|
+
profileTitle: string;
|
|
52
|
+
connectionTitle: string;
|
|
53
|
+
/** `null`, если подключение уже удалили, а инцидент ещё открыт. */
|
|
54
|
+
providerCode: IntegrationProviderCodeEnum | null;
|
|
55
|
+
connectionStatus: IntegrationConnectionStatusEnum;
|
|
56
|
+
breakerOpen: boolean;
|
|
57
|
+
/** Комната, по которой сгруппирована строка. `null` — отказ всего подключения. */
|
|
58
|
+
questroomId: number | null;
|
|
59
|
+
/** Квест, к которому относится инцидент. «—», если комнаты не сопоставлены. */
|
|
60
|
+
quest: string;
|
|
61
|
+
/** Тип самой тяжёлой записи. */
|
|
62
|
+
type: IntegrationIncidentTypeEnum;
|
|
63
|
+
/** Все типы, которые сейчас открыты у этого квеста. */
|
|
64
|
+
types: IntegrationIncidentTypeEnum[];
|
|
65
|
+
severity: IntegrationIncidentSeverityEnum;
|
|
66
|
+
/**
|
|
67
|
+
* `open`, если хотя бы одна запись ещё новая. Иначе все записи уже в работе.
|
|
68
|
+
*/
|
|
69
|
+
status: IntegrationIncidentStatusEnum;
|
|
70
|
+
/** Человеческое описание: что сломалось. Несколько записей через « · ». */
|
|
71
|
+
summary: string;
|
|
72
|
+
occurrences: number;
|
|
73
|
+
firstSeenAt: string;
|
|
74
|
+
lastSeenAt: string;
|
|
75
|
+
/** Сколько часов инцидент уже открыт. Берётся самая старая запись квеста. */
|
|
76
|
+
hoursOpen: number;
|
|
77
|
+
/** Текст последней ошибки вызова, если он есть и не повтор summary. */
|
|
78
|
+
lastError: string | null;
|
|
79
|
+
/** Дата и время игры — только у инцидентов конкретной брони. */
|
|
80
|
+
gameDate: string | null;
|
|
81
|
+
gameTime: string | null;
|
|
82
|
+
orderId: number | null;
|
|
83
|
+
};
|
|
84
|
+
export type AdminIntegrationIncidentCounts = {
|
|
85
|
+
/** Квесты, которые ещё никто не взял. Совпадает со строками «Новый». */
|
|
86
|
+
open: number;
|
|
87
|
+
/** Квесты, которые уже в работе. */
|
|
88
|
+
acknowledged: number;
|
|
89
|
+
/** Записи, закрытые за последние сутки. */
|
|
90
|
+
resolved24h: number;
|
|
91
|
+
/** Записи, которые сейчас помечены как «не ошибка». */
|
|
92
|
+
ignored: number;
|
|
93
|
+
};
|
|
37
94
|
export type AdminIntegrationDashboard = {
|
|
38
95
|
byStatus: Record<IntegrationConnectionStatusEnum, number>;
|
|
39
|
-
/**
|
|
40
|
-
problems:
|
|
96
|
+
/** Неисправленные квесты. Сначала критические, потом самые долгие. */
|
|
97
|
+
problems: AdminIntegrationProblemRow[];
|
|
98
|
+
incidents: AdminIntegrationIncidentCounts;
|
|
41
99
|
/** Броней, не доехавших за сутки. */
|
|
42
100
|
failedBookings24h: number;
|
|
43
101
|
/** Заявок на подключение, ждущих нашего ответа. */
|
|
@@ -66,6 +124,7 @@ export type AdminIntegrationIncidentRow = {
|
|
|
66
124
|
id: number;
|
|
67
125
|
type: IntegrationIncidentTypeEnum;
|
|
68
126
|
severity: IntegrationIncidentSeverityEnum;
|
|
127
|
+
status: IntegrationIncidentStatusEnum;
|
|
69
128
|
summary: string;
|
|
70
129
|
firstSeenAt: string;
|
|
71
130
|
lastSeenAt: string | null;
|