@escapenavigator/types 2.0.23 → 2.0.24
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.
- package/dist/parse-results/parse-result-payload.d.ts +17 -1
- package/dist/parse-results/parse-result.ro.d.ts +2 -0
- package/dist/parse-results/parse-result.ro.js +4 -0
- package/dist/parse-results/update-parse-result.dto.d.ts +3 -1
- package/dist/parse-results/update-parse-result.dto.js +5 -0
- package/dist/profile/action/create-profile-action.dto.js +1 -2
- package/dist/profile/admin-profile.ro.d.ts +1 -0
- package/dist/profile/admin-profile.ro.js +4 -0
- package/dist/profile/enum/profile-sales-status.enum.d.ts +11 -4
- package/dist/profile/enum/profile-sales-status.enum.js +11 -4
- package/dist/profile/query-admin-profile.dto.d.ts +2 -0
- package/dist/profile/query-admin-profile.dto.js +4 -0
- package/dist/profile/sales-board.ro.d.ts +33 -0
- package/dist/profile/sales-board.ro.js +109 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { QuestroomTypeEnum } from '../questroom/enum/questroom-type.enum';
|
|
2
|
+
/** Кандидат матча для модератора (локация или квест). */
|
|
3
|
+
export type ParseMatchCandidate = {
|
|
4
|
+
id: number;
|
|
5
|
+
title: string;
|
|
6
|
+
score: number;
|
|
7
|
+
};
|
|
2
8
|
/** Квест, извлечённый с сайта компании (значения в терминах наших DTO). */
|
|
3
9
|
export type ParsedQuest = {
|
|
4
10
|
title: string;
|
|
@@ -20,6 +26,8 @@ export type ParsedQuest = {
|
|
|
20
26
|
sourceUrl?: string;
|
|
21
27
|
/** ID существующего квеста, если сматчен (для диффа). */
|
|
22
28
|
matchedQuestroomId?: number;
|
|
29
|
+
/** Альтернативы матча (top-N по названию). */
|
|
30
|
+
matchCandidates?: ParseMatchCandidate[];
|
|
23
31
|
/** Исключён модератором из применения. */
|
|
24
32
|
excluded?: boolean;
|
|
25
33
|
};
|
|
@@ -28,6 +36,8 @@ export type ParsedLocation = {
|
|
|
28
36
|
phone?: string;
|
|
29
37
|
/** ID существующей локации, если сматчена по координатам/адресу. */
|
|
30
38
|
matchedLocationId?: number;
|
|
39
|
+
/** Альтернативы матча локации. */
|
|
40
|
+
matchCandidates?: ParseMatchCandidate[];
|
|
31
41
|
quests: ParsedQuest[];
|
|
32
42
|
};
|
|
33
43
|
export type ParseResultPayload = {
|
|
@@ -39,7 +49,7 @@ export type ParseResultPayload = {
|
|
|
39
49
|
/** Замечания экстрактора (что не удалось распознать). */
|
|
40
50
|
notes?: string;
|
|
41
51
|
};
|
|
42
|
-
/** Операция диффа месячного
|
|
52
|
+
/** Операция диффа месячного контура / ручного парса. */
|
|
43
53
|
export type ParseDiffOperation = {
|
|
44
54
|
op: 'ADD_QUEST' | 'CLOSE_QUEST' | 'UPDATE_FIELDS' | 'ADD_LOCATION';
|
|
45
55
|
questroomId?: number;
|
|
@@ -51,4 +61,10 @@ export type ParseDiffOperation = {
|
|
|
51
61
|
from: unknown;
|
|
52
62
|
to: unknown;
|
|
53
63
|
}>;
|
|
64
|
+
/** Исключена модератором из Apply. */
|
|
65
|
+
excluded?: boolean;
|
|
66
|
+
/** Score матча (если применимо). */
|
|
67
|
+
matchScore?: number;
|
|
68
|
+
/** Человекочитаемый заголовок (для CLOSE_QUEST). */
|
|
69
|
+
title?: string;
|
|
54
70
|
};
|
|
@@ -10,6 +10,8 @@ export declare class ParseResultRO {
|
|
|
10
10
|
id: number;
|
|
11
11
|
profileId: number;
|
|
12
12
|
profile: ParseResultProfile;
|
|
13
|
+
/** Linked Google Places ids for the profile (for quick open from parse UI). */
|
|
14
|
+
googlePlaceIds: number[];
|
|
13
15
|
status: ParseResultStatusEnum;
|
|
14
16
|
source: ParseResultSourceEnum;
|
|
15
17
|
payload: ParseResultPayload;
|
|
@@ -44,6 +44,10 @@ __decorate([
|
|
|
44
44
|
(0, class_transformer_1.Type)(() => ParseResultProfile),
|
|
45
45
|
__metadata("design:type", ParseResultProfile)
|
|
46
46
|
], ParseResultRO.prototype, "profile", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
__metadata("design:type", Array)
|
|
50
|
+
], ParseResultRO.prototype, "googlePlaceIds", void 0);
|
|
47
51
|
__decorate([
|
|
48
52
|
(0, class_transformer_1.Expose)(),
|
|
49
53
|
__metadata("design:type", String)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { ParseResultPayload } from './parse-result-payload';
|
|
1
|
+
import { ParseDiffOperation, ParseResultPayload } from './parse-result-payload';
|
|
2
2
|
export declare class UpdateParseResultDto {
|
|
3
3
|
/** Правки модератора поверх извлечённого payload (полная копия с изменениями). */
|
|
4
4
|
moderatorPayload?: ParseResultPayload;
|
|
5
|
+
/** Diff с флагами excluded / правками changes.to. */
|
|
6
|
+
diff?: ParseDiffOperation[];
|
|
5
7
|
}
|
|
@@ -19,3 +19,8 @@ __decorate([
|
|
|
19
19
|
(0, class_validator_1.IsObject)(),
|
|
20
20
|
__metadata("design:type", Object)
|
|
21
21
|
], UpdateParseResultDto.prototype, "moderatorPayload", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
(0, class_validator_1.IsArray)(),
|
|
25
|
+
__metadata("design:type", Array)
|
|
26
|
+
], UpdateParseResultDto.prototype, "diff", void 0);
|
|
@@ -65,8 +65,7 @@ __decorate([
|
|
|
65
65
|
__metadata("design:type", Number)
|
|
66
66
|
], CreateProfileActionRO.prototype, "assigneeId", void 0);
|
|
67
67
|
__decorate([
|
|
68
|
-
(0, class_validator_1.ValidateIf)((o) => o.salesStatus === profile_sales_status_enum_1.ProfileSalesStatus.REJECTED
|
|
69
|
-
o.salesStatus === profile_sales_status_enum_1.ProfileSalesStatus.FREE_LOST),
|
|
68
|
+
(0, class_validator_1.ValidateIf)((o) => o.salesStatus === profile_sales_status_enum_1.ProfileSalesStatus.REJECTED),
|
|
70
69
|
(0, class_validator_1.IsEnum)(profile_lost_reason_enum_1.ProfileLostReasonEnum),
|
|
71
70
|
(0, class_transformer_1.Expose)(),
|
|
72
71
|
__metadata("design:type", String)
|
|
@@ -38,6 +38,7 @@ export declare class AdminProfileRO {
|
|
|
38
38
|
crmVerification: CrmVerificationEnum;
|
|
39
39
|
subscriptionType: ProfileSubscriptionTypeEnum;
|
|
40
40
|
subscriptionCancelationDate: number;
|
|
41
|
+
subscriptionStatusChangedAt: Date;
|
|
41
42
|
updateDate: Date;
|
|
42
43
|
status: ProfileStatusEnum;
|
|
43
44
|
integrationType: ProfileIntegrationTypeEnum;
|
|
@@ -116,6 +116,10 @@ __decorate([
|
|
|
116
116
|
(0, class_transformer_1.Expose)(),
|
|
117
117
|
__metadata("design:type", Number)
|
|
118
118
|
], AdminProfileRO.prototype, "subscriptionCancelationDate", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, class_transformer_1.Expose)(),
|
|
121
|
+
__metadata("design:type", Date)
|
|
122
|
+
], AdminProfileRO.prototype, "subscriptionStatusChangedAt", void 0);
|
|
119
123
|
__decorate([
|
|
120
124
|
(0, class_transformer_1.Expose)(),
|
|
121
125
|
__metadata("design:type", Date)
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ручная воронка продаж. Заполняется продажниками (DnD на сейлз-доске,
|
|
3
|
+
* модалка действия). Фактическое состояние подписки сюда не попадает —
|
|
4
|
+
* оно вычисляется из subscriptionStatus/subscriptionType (CRM-таб).
|
|
5
|
+
*
|
|
6
|
+
* CUSTOMER — терминальный скрытый статус: проставляется автоматически при
|
|
7
|
+
* покупке платного тарифа (pro/growth), колонки на доске не имеет. После
|
|
8
|
+
* отмены подписки компания остаётся в CUSTOMER, пока продажник вручную не
|
|
9
|
+
* вернёт её в воронку.
|
|
10
|
+
*/
|
|
1
11
|
export declare enum ProfileSalesStatus {
|
|
2
12
|
NEW = "new",
|
|
3
13
|
NO_ANSWER = "no_answer",
|
|
@@ -8,9 +18,6 @@ export declare enum ProfileSalesStatus {
|
|
|
8
18
|
DEMO = "demo",
|
|
9
19
|
THINKING = "thinking",
|
|
10
20
|
ONBOARDING = "onboarding",
|
|
11
|
-
ACTIVE = "active",
|
|
12
21
|
REJECTED = "rejected",
|
|
13
|
-
|
|
14
|
-
UNPAID = "unpaid",
|
|
15
|
-
FREE_LOST = "free_lost"
|
|
22
|
+
CUSTOMER = "customer"
|
|
16
23
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProfileSalesStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Ручная воронка продаж. Заполняется продажниками (DnD на сейлз-доске,
|
|
6
|
+
* модалка действия). Фактическое состояние подписки сюда не попадает —
|
|
7
|
+
* оно вычисляется из subscriptionStatus/subscriptionType (CRM-таб).
|
|
8
|
+
*
|
|
9
|
+
* CUSTOMER — терминальный скрытый статус: проставляется автоматически при
|
|
10
|
+
* покупке платного тарифа (pro/growth), колонки на доске не имеет. После
|
|
11
|
+
* отмены подписки компания остаётся в CUSTOMER, пока продажник вручную не
|
|
12
|
+
* вернёт её в воронку.
|
|
13
|
+
*/
|
|
4
14
|
var ProfileSalesStatus;
|
|
5
15
|
(function (ProfileSalesStatus) {
|
|
6
16
|
ProfileSalesStatus["NEW"] = "new";
|
|
@@ -12,9 +22,6 @@ var ProfileSalesStatus;
|
|
|
12
22
|
ProfileSalesStatus["DEMO"] = "demo";
|
|
13
23
|
ProfileSalesStatus["THINKING"] = "thinking";
|
|
14
24
|
ProfileSalesStatus["ONBOARDING"] = "onboarding";
|
|
15
|
-
ProfileSalesStatus["ACTIVE"] = "active";
|
|
16
25
|
ProfileSalesStatus["REJECTED"] = "rejected";
|
|
17
|
-
ProfileSalesStatus["
|
|
18
|
-
ProfileSalesStatus["UNPAID"] = "unpaid";
|
|
19
|
-
ProfileSalesStatus["FREE_LOST"] = "free_lost";
|
|
26
|
+
ProfileSalesStatus["CUSTOMER"] = "customer";
|
|
20
27
|
})(ProfileSalesStatus || (exports.ProfileSalesStatus = ProfileSalesStatus = {}));
|
|
@@ -17,6 +17,8 @@ export declare class QueryAdminProfileDto {
|
|
|
17
17
|
subscriptionTypes?: ProfileSubscriptionTypeEnum[];
|
|
18
18
|
subscriptionCancelationDate?: boolean;
|
|
19
19
|
lastVisitAfter?: string;
|
|
20
|
+
/** lastVisit старше даты или отсутствует (для Free Lost на CRM-канбане). */
|
|
21
|
+
lastVisitBeforeOrNever?: string;
|
|
20
22
|
status?: ProfileStatusEnum[];
|
|
21
23
|
salesStatus?: ProfileSalesStatus[];
|
|
22
24
|
techStatus?: ProfileTechStatusEnum;
|
|
@@ -56,6 +56,10 @@ __decorate([
|
|
|
56
56
|
(0, class_transformer_1.Expose)(),
|
|
57
57
|
__metadata("design:type", String)
|
|
58
58
|
], QueryAdminProfileDto.prototype, "lastVisitAfter", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_transformer_1.Expose)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], QueryAdminProfileDto.prototype, "lastVisitBeforeOrNever", void 0);
|
|
59
63
|
__decorate([
|
|
60
64
|
(0, class_transformer_1.Expose)(),
|
|
61
65
|
__metadata("design:type", Array)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CountriesEnum } from '../shared/enum/countries.enum';
|
|
2
|
+
import { ProfileSalesStatus } from './enum/profile-sales-status.enum';
|
|
3
|
+
import { ProfileSubscriptionEnum } from './enum/profile-subscription.enum';
|
|
4
|
+
import { ProfileSubscriptionTypeEnum } from './enum/profile-subscription-type.enum';
|
|
5
|
+
/**
|
|
6
|
+
* Карточка сейлз-доски: срез профиля + ближайшее открытое действие.
|
|
7
|
+
* nextAction* — самое раннее открытое (done=false) действие компании.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SalesBoardCardRO {
|
|
10
|
+
id: number;
|
|
11
|
+
title: string;
|
|
12
|
+
country: CountriesEnum;
|
|
13
|
+
crm: string;
|
|
14
|
+
salesStatus: ProfileSalesStatus;
|
|
15
|
+
subscriptionStatus: ProfileSubscriptionEnum;
|
|
16
|
+
subscriptionType: ProfileSubscriptionTypeEnum;
|
|
17
|
+
subscriptionCancelationDate: number;
|
|
18
|
+
lastVisit: Date;
|
|
19
|
+
updateDate: Date;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
nextActionId: number | null;
|
|
22
|
+
nextActionDate: string | null;
|
|
23
|
+
nextActionType: string | null;
|
|
24
|
+
nextActionDescription: string | null;
|
|
25
|
+
nextActionAssigneeId: number | null;
|
|
26
|
+
}
|
|
27
|
+
export declare class SalesBoardColumnRO {
|
|
28
|
+
salesStatus: ProfileSalesStatus;
|
|
29
|
+
total: number;
|
|
30
|
+
/** Сколько компаний в колонке с просроченным или сегодняшним действием. */
|
|
31
|
+
urgent: number;
|
|
32
|
+
items: SalesBoardCardRO[];
|
|
33
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
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.SalesBoardColumnRO = exports.SalesBoardCardRO = void 0;
|
|
13
|
+
/* eslint-disable max-classes-per-file */
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const countries_enum_1 = require("../shared/enum/countries.enum");
|
|
16
|
+
const profile_sales_status_enum_1 = require("./enum/profile-sales-status.enum");
|
|
17
|
+
const profile_subscription_enum_1 = require("./enum/profile-subscription.enum");
|
|
18
|
+
const profile_subscription_type_enum_1 = require("./enum/profile-subscription-type.enum");
|
|
19
|
+
/**
|
|
20
|
+
* Карточка сейлз-доски: срез профиля + ближайшее открытое действие.
|
|
21
|
+
* nextAction* — самое раннее открытое (done=false) действие компании.
|
|
22
|
+
*/
|
|
23
|
+
class SalesBoardCardRO {
|
|
24
|
+
}
|
|
25
|
+
exports.SalesBoardCardRO = SalesBoardCardRO;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], SalesBoardCardRO.prototype, "id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], SalesBoardCardRO.prototype, "title", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_transformer_1.Expose)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], SalesBoardCardRO.prototype, "country", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_transformer_1.Expose)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], SalesBoardCardRO.prototype, "crm", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_transformer_1.Expose)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], SalesBoardCardRO.prototype, "salesStatus", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_transformer_1.Expose)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], SalesBoardCardRO.prototype, "subscriptionStatus", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], SalesBoardCardRO.prototype, "subscriptionType", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], SalesBoardCardRO.prototype, "subscriptionCancelationDate", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_transformer_1.Expose)(),
|
|
60
|
+
__metadata("design:type", Date)
|
|
61
|
+
], SalesBoardCardRO.prototype, "lastVisit", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
__metadata("design:type", Date)
|
|
65
|
+
], SalesBoardCardRO.prototype, "updateDate", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_transformer_1.Expose)(),
|
|
68
|
+
__metadata("design:type", Date)
|
|
69
|
+
], SalesBoardCardRO.prototype, "createdAt", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_transformer_1.Expose)(),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], SalesBoardCardRO.prototype, "nextActionId", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_transformer_1.Expose)(),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], SalesBoardCardRO.prototype, "nextActionDate", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, class_transformer_1.Expose)(),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], SalesBoardCardRO.prototype, "nextActionType", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, class_transformer_1.Expose)(),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], SalesBoardCardRO.prototype, "nextActionDescription", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_transformer_1.Expose)(),
|
|
88
|
+
__metadata("design:type", Number)
|
|
89
|
+
], SalesBoardCardRO.prototype, "nextActionAssigneeId", void 0);
|
|
90
|
+
class SalesBoardColumnRO {
|
|
91
|
+
}
|
|
92
|
+
exports.SalesBoardColumnRO = SalesBoardColumnRO;
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_transformer_1.Expose)(),
|
|
95
|
+
__metadata("design:type", String)
|
|
96
|
+
], SalesBoardColumnRO.prototype, "salesStatus", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, class_transformer_1.Expose)(),
|
|
99
|
+
__metadata("design:type", Number)
|
|
100
|
+
], SalesBoardColumnRO.prototype, "total", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, class_transformer_1.Expose)(),
|
|
103
|
+
__metadata("design:type", Number)
|
|
104
|
+
], SalesBoardColumnRO.prototype, "urgent", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, class_transformer_1.Expose)(),
|
|
107
|
+
(0, class_transformer_1.Type)(() => SalesBoardCardRO),
|
|
108
|
+
__metadata("design:type", Array)
|
|
109
|
+
], SalesBoardColumnRO.prototype, "items", void 0);
|