resurgence-data 1.1.50 → 1.1.52

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,19 +1,19 @@
1
1
  import { BaseDTO } from "../types/dto.type";
2
2
  declare enum TICKET_TYPE {
3
- COMPLAINT = 0,
4
- ENQUIRY = 1
3
+ COMPLAINT = "COMPLAINT",
4
+ ENQUIRY = "ENQUIRY"
5
5
  }
6
6
  declare enum TICKET_STATUS {
7
- PENDING = 0,
8
- ASSIGNED = 1,
9
- IN_PROGRESS = 2,
10
- RESOLVED = 3
7
+ PENDING = "PENDING",
8
+ ASSIGNED = "ASSIGNED",
9
+ IN_PROGRESS = "IN_PROGRESS",
10
+ RESOLVED = "RESOLVED"
11
11
  }
12
12
  declare enum PRIORITY {
13
- LOW = 0,
14
- NORMAL = 1,
15
- HIGH = 2,
16
- URGENT = 3
13
+ LOW = "LOW",
14
+ NORMAL = "NORMAL",
15
+ HIGH = "HIGH",
16
+ URGENT = "URGENT"
17
17
  }
18
18
  export declare class CreateTicketDTO extends BaseDTO {
19
19
  billerId?: string;
@@ -56,6 +56,7 @@ export declare class UpdateResponseDTO extends BaseDTO {
56
56
  }
57
57
  export declare class NoteDTO extends BaseDTO {
58
58
  ticketId: string;
59
+ userId: string;
59
60
  note: string;
60
61
  }
61
62
  export declare class UpdateNoteDTO extends BaseDTO {
@@ -15,22 +15,22 @@ const class_validator_1 = require("class-validator");
15
15
  const dto_type_1 = require("../types/dto.type");
16
16
  var TICKET_TYPE;
17
17
  (function (TICKET_TYPE) {
18
- TICKET_TYPE[TICKET_TYPE["COMPLAINT"] = 0] = "COMPLAINT";
19
- TICKET_TYPE[TICKET_TYPE["ENQUIRY"] = 1] = "ENQUIRY";
18
+ TICKET_TYPE["COMPLAINT"] = "COMPLAINT";
19
+ TICKET_TYPE["ENQUIRY"] = "ENQUIRY";
20
20
  })(TICKET_TYPE || (TICKET_TYPE = {}));
21
21
  var TICKET_STATUS;
22
22
  (function (TICKET_STATUS) {
23
- TICKET_STATUS[TICKET_STATUS["PENDING"] = 0] = "PENDING";
24
- TICKET_STATUS[TICKET_STATUS["ASSIGNED"] = 1] = "ASSIGNED";
25
- TICKET_STATUS[TICKET_STATUS["IN_PROGRESS"] = 2] = "IN_PROGRESS";
26
- TICKET_STATUS[TICKET_STATUS["RESOLVED"] = 3] = "RESOLVED";
23
+ TICKET_STATUS["PENDING"] = "PENDING";
24
+ TICKET_STATUS["ASSIGNED"] = "ASSIGNED";
25
+ TICKET_STATUS["IN_PROGRESS"] = "IN_PROGRESS";
26
+ TICKET_STATUS["RESOLVED"] = "RESOLVED";
27
27
  })(TICKET_STATUS || (TICKET_STATUS = {}));
28
28
  var PRIORITY;
29
29
  (function (PRIORITY) {
30
- PRIORITY[PRIORITY["LOW"] = 0] = "LOW";
31
- PRIORITY[PRIORITY["NORMAL"] = 1] = "NORMAL";
32
- PRIORITY[PRIORITY["HIGH"] = 2] = "HIGH";
33
- PRIORITY[PRIORITY["URGENT"] = 3] = "URGENT";
30
+ PRIORITY["LOW"] = "LOW";
31
+ PRIORITY["NORMAL"] = "NORMAL";
32
+ PRIORITY["HIGH"] = "HIGH";
33
+ PRIORITY["URGENT"] = "URGENT";
34
34
  })(PRIORITY || (PRIORITY = {}));
35
35
  class CreateTicketDTO extends dto_type_1.BaseDTO {
36
36
  }
@@ -50,7 +50,7 @@ __decorate([
50
50
  __decorate([
51
51
  (0, swagger_1.ApiProperty)({ description: "Type of the ticket", enum: TICKET_TYPE, default: TICKET_TYPE.ENQUIRY }),
52
52
  (0, class_validator_1.IsEnum)(TICKET_TYPE),
53
- __metadata("design:type", Number)
53
+ __metadata("design:type", String)
54
54
  ], CreateTicketDTO.prototype, "ticketType", void 0);
55
55
  __decorate([
56
56
  (0, swagger_1.ApiProperty)({ description: "Transaction details", maxLength: 100 }),
@@ -91,7 +91,7 @@ __decorate([
91
91
  __decorate([
92
92
  (0, swagger_1.ApiProperty)({ description: "Type of the ticket", enum: TICKET_TYPE, default: TICKET_TYPE.ENQUIRY }),
93
93
  (0, class_validator_1.IsEnum)(TICKET_TYPE),
94
- __metadata("design:type", Number)
94
+ __metadata("design:type", String)
95
95
  ], UpdateTicketDTO.prototype, "ticketType", void 0);
96
96
  __decorate([
97
97
  (0, swagger_1.ApiProperty)({ description: "Transaction details", maxLength: 100 }),
@@ -115,7 +115,7 @@ exports.TicketStatusDTO = TicketStatusDTO;
115
115
  __decorate([
116
116
  (0, swagger_1.ApiProperty)({ description: "Status of the ticket", enum: TICKET_STATUS, default: TICKET_STATUS.PENDING }),
117
117
  (0, class_validator_1.IsEnum)(TICKET_STATUS, { message: "Invalid status value" }),
118
- __metadata("design:type", Number)
118
+ __metadata("design:type", String)
119
119
  ], TicketStatusDTO.prototype, "status", void 0);
120
120
  __decorate([
121
121
  (0, swagger_1.ApiProperty)({ description: "ID of the ticket", required: true }),
@@ -201,6 +201,11 @@ __decorate([
201
201
  (0, class_validator_1.IsUUID)(4, { message: "Invalid UUID format for ticket ID" }),
202
202
  __metadata("design:type", String)
203
203
  ], NoteDTO.prototype, "ticketId", void 0);
204
+ __decorate([
205
+ (0, swagger_1.ApiProperty)({ description: "User id of the note", required: true }),
206
+ (0, class_validator_1.IsUUID)(4, { message: "Invalid UUID format for user ID" }),
207
+ __metadata("design:type", String)
208
+ ], NoteDTO.prototype, "userId", void 0);
204
209
  __decorate([
205
210
  (0, swagger_1.ApiProperty)({ description: "Content of the note" }),
206
211
  (0, class_validator_1.IsString)({ message: "Note must be a string" }),
@@ -230,7 +235,7 @@ exports.EscalationDTO = EscalationDTO;
230
235
  __decorate([
231
236
  (0, swagger_1.ApiProperty)({ description: "Priority of the escalation", enum: PRIORITY, default: PRIORITY.NORMAL }),
232
237
  (0, class_validator_1.IsEnum)(PRIORITY, { message: "Invalid priority value" }),
233
- __metadata("design:type", Number)
238
+ __metadata("design:type", String)
234
239
  ], EscalationDTO.prototype, "priority", void 0);
235
240
  __decorate([
236
241
  (0, swagger_1.ApiProperty)({ description: "ID of the ticket", required: true }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resurgence-data",
3
- "version": "1.1.50",
3
+ "version": "1.1.52",
4
4
  "description": "DTOs and shareable resources",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -3,22 +3,22 @@ import { IsOptional, IsUUID, IsString, IsEnum, Length, IsNotEmpty } from "class-
3
3
  import { BaseDTO } from "../types/dto.type";
4
4
 
5
5
  enum TICKET_TYPE {
6
- COMPLAINT,
7
- ENQUIRY,
6
+ COMPLAINT = "COMPLAINT",
7
+ ENQUIRY = "ENQUIRY",
8
8
  }
9
9
 
10
10
  enum TICKET_STATUS {
11
- PENDING,
12
- ASSIGNED,
13
- IN_PROGRESS,
14
- RESOLVED,
11
+ PENDING = "PENDING",
12
+ ASSIGNED = "ASSIGNED",
13
+ IN_PROGRESS = "IN_PROGRESS",
14
+ RESOLVED = "RESOLVED",
15
15
  }
16
16
 
17
17
  enum PRIORITY {
18
- LOW,
19
- NORMAL,
20
- HIGH,
21
- URGENT,
18
+ LOW = "LOW",
19
+ NORMAL = "NORMAL",
20
+ HIGH = "HIGH",
21
+ URGENT = "URGENT",
22
22
  }
23
23
 
24
24
  export class CreateTicketDTO extends BaseDTO {
@@ -151,6 +151,10 @@ export class NoteDTO extends BaseDTO {
151
151
  @IsUUID(4, { message: "Invalid UUID format for ticket ID" })
152
152
  ticketId: string;
153
153
 
154
+ @ApiProperty({ description: "User id of the note", required: true })
155
+ @IsUUID(4, { message: "Invalid UUID format for user ID" })
156
+ userId: string;
157
+
154
158
  @ApiProperty({ description: "Content of the note" })
155
159
  @IsString({ message: "Note must be a string" })
156
160
  note: string;