@escapenavigator/types 2.2.0 → 2.2.1

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.
@@ -6,6 +6,7 @@ export type AdminRO = ResponseObject & {
6
6
  name: string;
7
7
  phone: string;
8
8
  novofonEmployeeId?: number | null;
9
+ novofonWebrtcToken?: string | null;
9
10
  password?: string;
10
11
  totalAccess: boolean;
11
12
  nowEscape: boolean;
@@ -21,6 +22,7 @@ export type AdminRO = ResponseObject & {
21
22
  canUseBilling?: boolean;
22
23
  canUseMarketing?: boolean;
23
24
  canUseEmailService?: boolean;
25
+ canUseSupportDesk?: boolean;
24
26
  canUseAnnouncements?: boolean;
25
27
  canUseAcademy?: boolean;
26
28
  canUseWidgetFunnel?: boolean;
@@ -5,6 +5,7 @@ export declare class CreateAdminDto {
5
5
  name: string;
6
6
  phone: string;
7
7
  novofonEmployeeId?: number | null;
8
+ novofonWebrtcToken?: string | null;
8
9
  email: string;
9
10
  totalAccess: boolean;
10
11
  nowEscape: boolean;
@@ -20,6 +21,7 @@ export declare class CreateAdminDto {
20
21
  canUseBilling: boolean;
21
22
  canUseMarketing: boolean;
22
23
  canUseEmailService: boolean;
24
+ canUseSupportDesk: boolean;
23
25
  canUseAnnouncements: boolean;
24
26
  canUseAcademy: boolean;
25
27
  canUseWidgetFunnel: boolean;
@@ -42,6 +42,19 @@ __decorate([
42
42
  }),
43
43
  __metadata("design:type", Number)
44
44
  ], CreateAdminDto.prototype, "novofonEmployeeId", void 0);
45
+ __decorate([
46
+ (0, class_transformer_1.Expose)(),
47
+ (0, class_validator_1.IsOptional)(),
48
+ (0, class_validator_1.IsString)(),
49
+ (0, class_validator_1.MaxLength)(255),
50
+ (0, class_transformer_1.Transform)(({ value }) => {
51
+ if (typeof value !== 'string')
52
+ return null;
53
+ const token = value.trim();
54
+ return token || null;
55
+ }),
56
+ __metadata("design:type", String)
57
+ ], CreateAdminDto.prototype, "novofonWebrtcToken", void 0);
45
58
  __decorate([
46
59
  (0, class_validator_1.IsEmail)(),
47
60
  (0, class_transformer_1.Expose)(),
@@ -132,6 +145,12 @@ __decorate([
132
145
  (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'boolean' ? value : false)),
133
146
  __metadata("design:type", Boolean)
134
147
  ], CreateAdminDto.prototype, "canUseEmailService", void 0);
148
+ __decorate([
149
+ (0, class_validator_1.IsBoolean)(),
150
+ (0, class_transformer_1.Expose)(),
151
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'boolean' ? value : false)),
152
+ __metadata("design:type", Boolean)
153
+ ], CreateAdminDto.prototype, "canUseSupportDesk", void 0);
135
154
  __decorate([
136
155
  (0, class_validator_1.IsBoolean)(),
137
156
  (0, class_transformer_1.Expose)(),
@@ -15,6 +15,12 @@ export declare class EmployeesAccessDto extends EmployeeCrudAccessDto implements
15
15
  */
16
16
  manageAccess: boolean;
17
17
  }
18
+ /**
19
+ * `@Expose` на каждом поле обязателен: модалка роли собирает форму через
20
+ * `serializeRecord` (`excludeExtraneousValues`). Без декоратора вложенный
21
+ * `employeeAccess` превращается в `{}`, и чекбокс «Просмотр» падает на
22
+ * `permissions.view`.
23
+ */
18
24
  export declare class EmployeeAccessDto implements EmployeeAccess {
19
25
  employees: EmployeesAccessDto;
20
26
  shifts: EmployeeScopedCrudAccessDto;
@@ -18,18 +18,22 @@ class EmployeeCrudAccessDto {
18
18
  exports.EmployeeCrudAccessDto = EmployeeCrudAccessDto;
19
19
  __decorate([
20
20
  (0, class_validator_1.IsBoolean)(),
21
+ (0, class_transformer_1.Expose)(),
21
22
  __metadata("design:type", Boolean)
22
23
  ], EmployeeCrudAccessDto.prototype, "view", void 0);
23
24
  __decorate([
24
25
  (0, class_validator_1.IsBoolean)(),
26
+ (0, class_transformer_1.Expose)(),
25
27
  __metadata("design:type", Boolean)
26
28
  ], EmployeeCrudAccessDto.prototype, "create", void 0);
27
29
  __decorate([
28
30
  (0, class_validator_1.IsBoolean)(),
31
+ (0, class_transformer_1.Expose)(),
29
32
  __metadata("design:type", Boolean)
30
33
  ], EmployeeCrudAccessDto.prototype, "edit", void 0);
31
34
  __decorate([
32
35
  (0, class_validator_1.IsBoolean)(),
36
+ (0, class_transformer_1.Expose)(),
33
37
  __metadata("design:type", Boolean)
34
38
  ], EmployeeCrudAccessDto.prototype, "delete", void 0);
35
39
  class EmployeeScopedCrudAccessDto extends EmployeeCrudAccessDto {
@@ -37,6 +41,7 @@ class EmployeeScopedCrudAccessDto extends EmployeeCrudAccessDto {
37
41
  exports.EmployeeScopedCrudAccessDto = EmployeeScopedCrudAccessDto;
38
42
  __decorate([
39
43
  (0, class_validator_1.IsEnum)(employee_access_1.EmployeeAccessScope),
44
+ (0, class_transformer_1.Expose)(),
40
45
  __metadata("design:type", String)
41
46
  ], EmployeeScopedCrudAccessDto.prototype, "scope", void 0);
42
47
  class EmployeesAccessDto extends EmployeeCrudAccessDto {
@@ -44,8 +49,15 @@ class EmployeesAccessDto extends EmployeeCrudAccessDto {
44
49
  exports.EmployeesAccessDto = EmployeesAccessDto;
45
50
  __decorate([
46
51
  (0, class_validator_1.IsBoolean)(),
52
+ (0, class_transformer_1.Expose)(),
47
53
  __metadata("design:type", Boolean)
48
54
  ], EmployeesAccessDto.prototype, "manageAccess", void 0);
55
+ /**
56
+ * `@Expose` на каждом поле обязателен: модалка роли собирает форму через
57
+ * `serializeRecord` (`excludeExtraneousValues`). Без декоратора вложенный
58
+ * `employeeAccess` превращается в `{}`, и чекбокс «Просмотр» падает на
59
+ * `permissions.view`.
60
+ */
49
61
  class EmployeeAccessDto {
50
62
  }
51
63
  exports.EmployeeAccessDto = EmployeeAccessDto;
@@ -53,47 +65,55 @@ __decorate([
53
65
  (0, class_validator_1.IsDefined)(),
54
66
  (0, class_validator_1.ValidateNested)(),
55
67
  (0, class_transformer_1.Type)(() => EmployeesAccessDto),
68
+ (0, class_transformer_1.Expose)(),
56
69
  __metadata("design:type", EmployeesAccessDto)
57
70
  ], EmployeeAccessDto.prototype, "employees", void 0);
58
71
  __decorate([
59
72
  (0, class_validator_1.IsDefined)(),
60
73
  (0, class_validator_1.ValidateNested)(),
61
74
  (0, class_transformer_1.Type)(() => EmployeeScopedCrudAccessDto),
75
+ (0, class_transformer_1.Expose)(),
62
76
  __metadata("design:type", EmployeeScopedCrudAccessDto)
63
77
  ], EmployeeAccessDto.prototype, "shifts", void 0);
64
78
  __decorate([
65
79
  (0, class_validator_1.IsDefined)(),
66
80
  (0, class_validator_1.ValidateNested)(),
67
81
  (0, class_transformer_1.Type)(() => EmployeeScopedCrudAccessDto),
82
+ (0, class_transformer_1.Expose)(),
68
83
  __metadata("design:type", EmployeeScopedCrudAccessDto)
69
84
  ], EmployeeAccessDto.prototype, "bonuses", void 0);
70
85
  __decorate([
71
86
  (0, class_validator_1.IsDefined)(),
72
87
  (0, class_validator_1.ValidateNested)(),
73
88
  (0, class_transformer_1.Type)(() => EmployeeScopedCrudAccessDto),
89
+ (0, class_transformer_1.Expose)(),
74
90
  __metadata("design:type", EmployeeScopedCrudAccessDto)
75
91
  ], EmployeeAccessDto.prototype, "fines", void 0);
76
92
  __decorate([
77
93
  (0, class_validator_1.IsDefined)(),
78
94
  (0, class_validator_1.ValidateNested)(),
79
95
  (0, class_transformer_1.Type)(() => EmployeeCrudAccessDto),
96
+ (0, class_transformer_1.Expose)(),
80
97
  __metadata("design:type", EmployeeCrudAccessDto)
81
98
  ], EmployeeAccessDto.prototype, "roles", void 0);
82
99
  __decorate([
83
100
  (0, class_validator_1.IsDefined)(),
84
101
  (0, class_validator_1.ValidateNested)(),
85
102
  (0, class_transformer_1.Type)(() => EmployeeCrudAccessDto),
103
+ (0, class_transformer_1.Expose)(),
86
104
  __metadata("design:type", EmployeeCrudAccessDto)
87
105
  ], EmployeeAccessDto.prototype, "positions", void 0);
88
106
  __decorate([
89
107
  (0, class_validator_1.IsDefined)(),
90
108
  (0, class_validator_1.ValidateNested)(),
91
109
  (0, class_transformer_1.Type)(() => EmployeeCrudAccessDto),
110
+ (0, class_transformer_1.Expose)(),
92
111
  __metadata("design:type", EmployeeCrudAccessDto)
93
112
  ], EmployeeAccessDto.prototype, "reports", void 0);
94
113
  __decorate([
95
114
  (0, class_validator_1.IsDefined)(),
96
115
  (0, class_validator_1.ValidateNested)(),
97
116
  (0, class_transformer_1.Type)(() => EmployeeScopedCrudAccessDto),
117
+ (0, class_transformer_1.Expose)(),
98
118
  __metadata("design:type", EmployeeScopedCrudAccessDto)
99
119
  ], EmployeeAccessDto.prototype, "payroll", void 0);
@@ -0,0 +1,8 @@
1
+ export declare class CreateSupportMessageDto {
2
+ body: string;
3
+ /**
4
+ * Разрешается только в admin/internal контроллерах. Клиентский
5
+ * контроллер всегда принудительно пишет публичное сообщение.
6
+ */
7
+ internal?: boolean;
8
+ }
@@ -0,0 +1,31 @@
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.CreateSupportMessageDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ class CreateSupportMessageDto {
16
+ }
17
+ exports.CreateSupportMessageDto = CreateSupportMessageDto;
18
+ __decorate([
19
+ (0, class_transformer_1.Expose)(),
20
+ (0, class_validator_1.IsString)(),
21
+ (0, class_validator_1.IsNotEmpty)(),
22
+ (0, class_validator_1.MaxLength)(10000),
23
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
24
+ __metadata("design:type", String)
25
+ ], CreateSupportMessageDto.prototype, "body", void 0);
26
+ __decorate([
27
+ (0, class_transformer_1.Expose)(),
28
+ (0, class_validator_1.IsOptional)(),
29
+ (0, class_validator_1.IsBoolean)(),
30
+ __metadata("design:type", Boolean)
31
+ ], CreateSupportMessageDto.prototype, "internal", void 0);
@@ -0,0 +1,17 @@
1
+ import { SupportContactMethod, SupportTicketType } from './support-ticket';
2
+ export declare class CreateSupportTicketDto {
3
+ type: SupportTicketType;
4
+ subject: string;
5
+ description: string;
6
+ reproductionSteps?: string;
7
+ expectedResult?: string;
8
+ actualResult?: string;
9
+ impact?: string;
10
+ proposal?: string;
11
+ benefit?: string;
12
+ errorDetails?: string;
13
+ contactMethod: SupportContactMethod;
14
+ contactValue: string;
15
+ pageUrl?: string;
16
+ userAgent?: string;
17
+ }
@@ -0,0 +1,122 @@
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.CreateSupportTicketDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const is_not_blank_1 = require("../shared/is-not-blank");
16
+ const support_ticket_1 = require("./support-ticket");
17
+ const trim = ({ value }) => typeof value === 'string' ? value.trim() : value;
18
+ class CreateSupportTicketDto {
19
+ }
20
+ exports.CreateSupportTicketDto = CreateSupportTicketDto;
21
+ __decorate([
22
+ (0, class_transformer_1.Expose)(),
23
+ (0, class_validator_1.IsEnum)(support_ticket_1.SupportTicketType),
24
+ __metadata("design:type", String)
25
+ ], CreateSupportTicketDto.prototype, "type", void 0);
26
+ __decorate([
27
+ (0, class_transformer_1.Expose)(),
28
+ (0, is_not_blank_1.IsNotBlank)(),
29
+ (0, class_validator_1.MaxLength)(160),
30
+ (0, class_transformer_1.Transform)(trim),
31
+ __metadata("design:type", String)
32
+ ], CreateSupportTicketDto.prototype, "subject", void 0);
33
+ __decorate([
34
+ (0, class_transformer_1.Expose)(),
35
+ (0, is_not_blank_1.IsNotBlank)(),
36
+ (0, class_validator_1.MinLength)(10),
37
+ (0, class_validator_1.MaxLength)(10000),
38
+ (0, class_transformer_1.Transform)(trim),
39
+ __metadata("design:type", String)
40
+ ], CreateSupportTicketDto.prototype, "description", void 0);
41
+ __decorate([
42
+ (0, class_transformer_1.Expose)(),
43
+ (0, class_validator_1.ValidateIf)((dto) => dto.type === support_ticket_1.SupportTicketType.BUG),
44
+ (0, is_not_blank_1.IsNotBlank)(),
45
+ (0, class_validator_1.MaxLength)(10000),
46
+ (0, class_transformer_1.Transform)(trim),
47
+ __metadata("design:type", String)
48
+ ], CreateSupportTicketDto.prototype, "reproductionSteps", void 0);
49
+ __decorate([
50
+ (0, class_transformer_1.Expose)(),
51
+ (0, class_validator_1.ValidateIf)((dto) => dto.type === support_ticket_1.SupportTicketType.BUG),
52
+ (0, is_not_blank_1.IsNotBlank)(),
53
+ (0, class_validator_1.MaxLength)(5000),
54
+ (0, class_transformer_1.Transform)(trim),
55
+ __metadata("design:type", String)
56
+ ], CreateSupportTicketDto.prototype, "expectedResult", void 0);
57
+ __decorate([
58
+ (0, class_transformer_1.Expose)(),
59
+ (0, class_validator_1.ValidateIf)((dto) => dto.type === support_ticket_1.SupportTicketType.BUG),
60
+ (0, is_not_blank_1.IsNotBlank)(),
61
+ (0, class_validator_1.MaxLength)(5000),
62
+ (0, class_transformer_1.Transform)(trim),
63
+ __metadata("design:type", String)
64
+ ], CreateSupportTicketDto.prototype, "actualResult", void 0);
65
+ __decorate([
66
+ (0, class_transformer_1.Expose)(),
67
+ (0, class_validator_1.IsOptional)(),
68
+ (0, class_validator_1.IsString)(),
69
+ (0, class_validator_1.MaxLength)(2000),
70
+ (0, class_transformer_1.Transform)(trim),
71
+ __metadata("design:type", String)
72
+ ], CreateSupportTicketDto.prototype, "impact", void 0);
73
+ __decorate([
74
+ (0, class_transformer_1.Expose)(),
75
+ (0, class_validator_1.ValidateIf)((dto) => dto.type === support_ticket_1.SupportTicketType.FEATURE),
76
+ (0, is_not_blank_1.IsNotBlank)(),
77
+ (0, class_validator_1.MaxLength)(10000),
78
+ (0, class_transformer_1.Transform)(trim),
79
+ __metadata("design:type", String)
80
+ ], CreateSupportTicketDto.prototype, "proposal", void 0);
81
+ __decorate([
82
+ (0, class_transformer_1.Expose)(),
83
+ (0, class_validator_1.IsOptional)(),
84
+ (0, class_validator_1.IsString)(),
85
+ (0, class_validator_1.MaxLength)(5000),
86
+ (0, class_transformer_1.Transform)(trim),
87
+ __metadata("design:type", String)
88
+ ], CreateSupportTicketDto.prototype, "benefit", void 0);
89
+ __decorate([
90
+ (0, class_transformer_1.Expose)(),
91
+ (0, class_validator_1.IsOptional)(),
92
+ (0, class_validator_1.IsString)(),
93
+ (0, class_validator_1.MaxLength)(20000),
94
+ (0, class_transformer_1.Transform)(trim),
95
+ __metadata("design:type", String)
96
+ ], CreateSupportTicketDto.prototype, "errorDetails", void 0);
97
+ __decorate([
98
+ (0, class_transformer_1.Expose)(),
99
+ (0, class_validator_1.IsEnum)(support_ticket_1.SupportContactMethod),
100
+ __metadata("design:type", String)
101
+ ], CreateSupportTicketDto.prototype, "contactMethod", void 0);
102
+ __decorate([
103
+ (0, class_transformer_1.Expose)(),
104
+ (0, is_not_blank_1.IsNotBlank)(),
105
+ (0, class_validator_1.MaxLength)(255),
106
+ (0, class_transformer_1.Transform)(trim),
107
+ __metadata("design:type", String)
108
+ ], CreateSupportTicketDto.prototype, "contactValue", void 0);
109
+ __decorate([
110
+ (0, class_transformer_1.Expose)(),
111
+ (0, class_validator_1.IsOptional)(),
112
+ (0, class_validator_1.IsUrl)({ require_tld: false }),
113
+ (0, class_validator_1.MaxLength)(2000),
114
+ __metadata("design:type", String)
115
+ ], CreateSupportTicketDto.prototype, "pageUrl", void 0);
116
+ __decorate([
117
+ (0, class_transformer_1.Expose)(),
118
+ (0, class_validator_1.IsOptional)(),
119
+ (0, class_validator_1.IsString)(),
120
+ (0, class_validator_1.MaxLength)(1000),
121
+ __metadata("design:type", String)
122
+ ], CreateSupportTicketDto.prototype, "userAgent", void 0);
@@ -0,0 +1,96 @@
1
+ import { Languages } from '../shared/enum/languages.enum';
2
+ import { QueryRO } from '../shared/query.ro';
3
+ import { ResponseObject } from '../shared/ro';
4
+ export declare enum SupportRegion {
5
+ RU = "ru",
6
+ COM = "com"
7
+ }
8
+ export declare enum SupportTicketType {
9
+ BUG = "bug",
10
+ FEATURE = "feature",
11
+ QUESTION = "question",
12
+ OTHER = "other"
13
+ }
14
+ export declare enum SupportTicketStatus {
15
+ NEW = "new",
16
+ IN_PROGRESS = "in_progress",
17
+ WAITING_FOR_CUSTOMER = "waiting_for_customer",
18
+ RESOLVED = "resolved",
19
+ CLOSED = "closed"
20
+ }
21
+ export declare enum SupportTicketPriority {
22
+ LOW = "low",
23
+ NORMAL = "normal",
24
+ HIGH = "high",
25
+ URGENT = "urgent"
26
+ }
27
+ export declare enum SupportContactMethod {
28
+ WHATSAPP = "whatsapp",
29
+ TELEGRAM = "telegram",
30
+ MAX = "max"
31
+ }
32
+ export declare enum SupportMessageAuthorType {
33
+ CUSTOMER = "customer",
34
+ ADMIN = "admin",
35
+ SYSTEM = "system"
36
+ }
37
+ export type SupportAttachmentRO = ResponseObject & {
38
+ ticketId: number;
39
+ messageId?: number | null;
40
+ authorType: SupportMessageAuthorType;
41
+ name: string;
42
+ mimeType: string;
43
+ size: number;
44
+ url: string;
45
+ };
46
+ export type SupportMessageRO = ResponseObject & {
47
+ ticketId: number;
48
+ authorType: SupportMessageAuthorType;
49
+ authorId?: number | null;
50
+ authorName: string;
51
+ body: string;
52
+ internal: boolean;
53
+ attachments?: SupportAttachmentRO[];
54
+ };
55
+ export type SupportTicketEventRO = ResponseObject & {
56
+ ticketId: number;
57
+ type: string;
58
+ actorName: string;
59
+ payload?: Record<string, unknown> | null;
60
+ };
61
+ export type SupportTicketRO = ResponseObject & {
62
+ region: SupportRegion;
63
+ profileId: number;
64
+ profileTitle: string;
65
+ requesterUserId: number;
66
+ requesterName: string;
67
+ requesterEmail: string;
68
+ locale: Languages;
69
+ type: SupportTicketType;
70
+ status: SupportTicketStatus;
71
+ priority: SupportTicketPriority;
72
+ subject: string;
73
+ description: string;
74
+ reproductionSteps?: string | null;
75
+ expectedResult?: string | null;
76
+ actualResult?: string | null;
77
+ impact?: string | null;
78
+ proposal?: string | null;
79
+ benefit?: string | null;
80
+ errorDetails?: string | null;
81
+ pageUrl?: string | null;
82
+ userAgent?: string | null;
83
+ contactMethod: SupportContactMethod;
84
+ contactValue: string;
85
+ assigneeEmail?: string | null;
86
+ assigneeName?: string | null;
87
+ lastMessageAt: Date | string;
88
+ unreadForCustomer: boolean;
89
+ unreadForAdmin: boolean;
90
+ messages?: SupportMessageRO[];
91
+ attachments?: SupportAttachmentRO[];
92
+ events?: SupportTicketEventRO[];
93
+ };
94
+ export type SupportTicketQueryRO = QueryRO<SupportTicketRO> & {
95
+ unavailableRegions?: SupportRegion[];
96
+ };
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SupportMessageAuthorType = exports.SupportContactMethod = exports.SupportTicketPriority = exports.SupportTicketStatus = exports.SupportTicketType = exports.SupportRegion = void 0;
4
+ var SupportRegion;
5
+ (function (SupportRegion) {
6
+ SupportRegion["RU"] = "ru";
7
+ SupportRegion["COM"] = "com";
8
+ })(SupportRegion || (exports.SupportRegion = SupportRegion = {}));
9
+ var SupportTicketType;
10
+ (function (SupportTicketType) {
11
+ SupportTicketType["BUG"] = "bug";
12
+ SupportTicketType["FEATURE"] = "feature";
13
+ SupportTicketType["QUESTION"] = "question";
14
+ SupportTicketType["OTHER"] = "other";
15
+ })(SupportTicketType || (exports.SupportTicketType = SupportTicketType = {}));
16
+ var SupportTicketStatus;
17
+ (function (SupportTicketStatus) {
18
+ SupportTicketStatus["NEW"] = "new";
19
+ SupportTicketStatus["IN_PROGRESS"] = "in_progress";
20
+ SupportTicketStatus["WAITING_FOR_CUSTOMER"] = "waiting_for_customer";
21
+ SupportTicketStatus["RESOLVED"] = "resolved";
22
+ SupportTicketStatus["CLOSED"] = "closed";
23
+ })(SupportTicketStatus || (exports.SupportTicketStatus = SupportTicketStatus = {}));
24
+ var SupportTicketPriority;
25
+ (function (SupportTicketPriority) {
26
+ SupportTicketPriority["LOW"] = "low";
27
+ SupportTicketPriority["NORMAL"] = "normal";
28
+ SupportTicketPriority["HIGH"] = "high";
29
+ SupportTicketPriority["URGENT"] = "urgent";
30
+ })(SupportTicketPriority || (exports.SupportTicketPriority = SupportTicketPriority = {}));
31
+ var SupportContactMethod;
32
+ (function (SupportContactMethod) {
33
+ SupportContactMethod["WHATSAPP"] = "whatsapp";
34
+ SupportContactMethod["TELEGRAM"] = "telegram";
35
+ SupportContactMethod["MAX"] = "max";
36
+ })(SupportContactMethod || (exports.SupportContactMethod = SupportContactMethod = {}));
37
+ var SupportMessageAuthorType;
38
+ (function (SupportMessageAuthorType) {
39
+ SupportMessageAuthorType["CUSTOMER"] = "customer";
40
+ SupportMessageAuthorType["ADMIN"] = "admin";
41
+ SupportMessageAuthorType["SYSTEM"] = "system";
42
+ })(SupportMessageAuthorType || (exports.SupportMessageAuthorType = SupportMessageAuthorType = {}));
@@ -0,0 +1,7 @@
1
+ import { SupportTicketPriority, SupportTicketStatus } from './support-ticket';
2
+ export declare class UpdateSupportTicketDto {
3
+ status?: SupportTicketStatus;
4
+ priority?: SupportTicketPriority;
5
+ assigneeEmail?: string | null;
6
+ assigneeName?: string | null;
7
+ }
@@ -0,0 +1,45 @@
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.UpdateSupportTicketDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const support_ticket_1 = require("./support-ticket");
16
+ class UpdateSupportTicketDto {
17
+ }
18
+ exports.UpdateSupportTicketDto = UpdateSupportTicketDto;
19
+ __decorate([
20
+ (0, class_transformer_1.Expose)(),
21
+ (0, class_validator_1.IsOptional)(),
22
+ (0, class_validator_1.IsEnum)(support_ticket_1.SupportTicketStatus),
23
+ __metadata("design:type", String)
24
+ ], UpdateSupportTicketDto.prototype, "status", void 0);
25
+ __decorate([
26
+ (0, class_transformer_1.Expose)(),
27
+ (0, class_validator_1.IsOptional)(),
28
+ (0, class_validator_1.IsEnum)(support_ticket_1.SupportTicketPriority),
29
+ __metadata("design:type", String)
30
+ ], UpdateSupportTicketDto.prototype, "priority", void 0);
31
+ __decorate([
32
+ (0, class_transformer_1.Expose)(),
33
+ (0, class_validator_1.IsOptional)(),
34
+ (0, class_validator_1.IsEmail)(),
35
+ (0, class_transformer_1.Transform)(({ value }) => (value === null || value === void 0 ? void 0 : value.trim().toLowerCase()) || null),
36
+ __metadata("design:type", String)
37
+ ], UpdateSupportTicketDto.prototype, "assigneeEmail", void 0);
38
+ __decorate([
39
+ (0, class_transformer_1.Expose)(),
40
+ (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsString)(),
42
+ (0, class_validator_1.MaxLength)(255),
43
+ (0, class_transformer_1.Transform)(({ value }) => (value === null || value === void 0 ? void 0 : value.trim()) || null),
44
+ __metadata("design:type", String)
45
+ ], UpdateSupportTicketDto.prototype, "assigneeName", void 0);