resurgence-data 1.1.49 → 1.1.50

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.
@@ -23,6 +23,15 @@ export declare class CreateTicketDTO extends BaseDTO {
23
23
  subject: string;
24
24
  body: string;
25
25
  }
26
+ export declare class UpdateTicketDTO extends BaseDTO {
27
+ id: string;
28
+ billerId?: string;
29
+ userId?: string;
30
+ ticketType: TICKET_TYPE;
31
+ transaction: string;
32
+ subject: string;
33
+ body: string;
34
+ }
26
35
  export declare class TicketStatusDTO extends BaseDTO {
27
36
  status: TICKET_STATUS;
28
37
  ticketId: string;
@@ -38,10 +47,22 @@ export declare class ResponseDTO extends BaseDTO {
38
47
  ticketId: string;
39
48
  attachments?: AttachmentDTO[];
40
49
  }
50
+ export declare class UpdateResponseDTO extends BaseDTO {
51
+ id: string;
52
+ userId?: string;
53
+ response?: string;
54
+ ticketId?: string;
55
+ attachments?: AttachmentDTO[];
56
+ }
41
57
  export declare class NoteDTO extends BaseDTO {
42
58
  ticketId: string;
43
59
  note: string;
44
60
  }
61
+ export declare class UpdateNoteDTO extends BaseDTO {
62
+ id: string;
63
+ ticketId?: string;
64
+ note?: string;
65
+ }
45
66
  export declare class EscalationDTO extends BaseDTO {
46
67
  priority: PRIORITY;
47
68
  ticketId: string;
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.AssignmentDTO = exports.EscalationDTO = exports.NoteDTO = exports.ResponseDTO = exports.AttachmentDTO = exports.TicketStatusDTO = exports.CreateTicketDTO = void 0;
12
+ exports.AssignmentDTO = exports.EscalationDTO = exports.UpdateNoteDTO = exports.NoteDTO = exports.UpdateResponseDTO = exports.ResponseDTO = exports.AttachmentDTO = exports.TicketStatusDTO = exports.UpdateTicketDTO = exports.CreateTicketDTO = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const class_validator_1 = require("class-validator");
15
15
  const dto_type_1 = require("../types/dto.type");
@@ -68,6 +68,47 @@ __decorate([
68
68
  (0, class_validator_1.IsString)(),
69
69
  __metadata("design:type", String)
70
70
  ], CreateTicketDTO.prototype, "body", void 0);
71
+ class UpdateTicketDTO extends dto_type_1.BaseDTO {
72
+ }
73
+ exports.UpdateTicketDTO = UpdateTicketDTO;
74
+ __decorate([
75
+ (0, swagger_1.ApiProperty)({ description: "ID of the ticket" }),
76
+ (0, class_validator_1.IsUUID)(),
77
+ __metadata("design:type", String)
78
+ ], UpdateTicketDTO.prototype, "id", void 0);
79
+ __decorate([
80
+ (0, swagger_1.ApiProperty)({ description: "ID of the biller", required: false }),
81
+ (0, class_validator_1.IsOptional)(),
82
+ (0, class_validator_1.IsUUID)(),
83
+ __metadata("design:type", String)
84
+ ], UpdateTicketDTO.prototype, "billerId", void 0);
85
+ __decorate([
86
+ (0, swagger_1.ApiProperty)({ description: "ID of the user", required: false }),
87
+ (0, class_validator_1.IsOptional)(),
88
+ (0, class_validator_1.IsUUID)(),
89
+ __metadata("design:type", String)
90
+ ], UpdateTicketDTO.prototype, "userId", void 0);
91
+ __decorate([
92
+ (0, swagger_1.ApiProperty)({ description: "Type of the ticket", enum: TICKET_TYPE, default: TICKET_TYPE.ENQUIRY }),
93
+ (0, class_validator_1.IsEnum)(TICKET_TYPE),
94
+ __metadata("design:type", Number)
95
+ ], UpdateTicketDTO.prototype, "ticketType", void 0);
96
+ __decorate([
97
+ (0, swagger_1.ApiProperty)({ description: "Transaction details", maxLength: 100 }),
98
+ (0, class_validator_1.IsString)(),
99
+ (0, class_validator_1.Length)(0, 100),
100
+ __metadata("design:type", String)
101
+ ], UpdateTicketDTO.prototype, "transaction", void 0);
102
+ __decorate([
103
+ (0, swagger_1.ApiProperty)({ description: "Subject of the ticket" }),
104
+ (0, class_validator_1.IsString)(),
105
+ __metadata("design:type", String)
106
+ ], UpdateTicketDTO.prototype, "subject", void 0);
107
+ __decorate([
108
+ (0, swagger_1.ApiProperty)({ description: "Body of the ticket" }),
109
+ (0, class_validator_1.IsString)(),
110
+ __metadata("design:type", String)
111
+ ], UpdateTicketDTO.prototype, "body", void 0);
71
112
  class TicketStatusDTO extends dto_type_1.BaseDTO {
72
113
  }
73
114
  exports.TicketStatusDTO = TicketStatusDTO;
@@ -124,6 +165,34 @@ __decorate([
124
165
  (0, class_validator_1.IsOptional)(),
125
166
  __metadata("design:type", Array)
126
167
  ], ResponseDTO.prototype, "attachments", void 0);
168
+ class UpdateResponseDTO extends dto_type_1.BaseDTO {
169
+ }
170
+ exports.UpdateResponseDTO = UpdateResponseDTO;
171
+ __decorate([
172
+ (0, swagger_1.ApiProperty)({ description: "ID of the response" }),
173
+ (0, class_validator_1.IsUUID)(),
174
+ __metadata("design:type", String)
175
+ ], UpdateResponseDTO.prototype, "id", void 0);
176
+ __decorate([
177
+ (0, swagger_1.ApiProperty)({ description: "ID of the user", required: true }),
178
+ (0, class_validator_1.IsUUID)(),
179
+ __metadata("design:type", String)
180
+ ], UpdateResponseDTO.prototype, "userId", void 0);
181
+ __decorate([
182
+ (0, swagger_1.ApiProperty)({ description: "Response text" }),
183
+ (0, class_validator_1.IsString)(),
184
+ __metadata("design:type", String)
185
+ ], UpdateResponseDTO.prototype, "response", void 0);
186
+ __decorate([
187
+ (0, swagger_1.ApiProperty)({ description: "ID of the ticket", required: true }),
188
+ (0, class_validator_1.IsUUID)(),
189
+ __metadata("design:type", String)
190
+ ], UpdateResponseDTO.prototype, "ticketId", void 0);
191
+ __decorate([
192
+ (0, swagger_1.ApiProperty)({ description: "Attachments related to the response", type: [String], required: false }),
193
+ (0, class_validator_1.IsOptional)(),
194
+ __metadata("design:type", Array)
195
+ ], UpdateResponseDTO.prototype, "attachments", void 0);
127
196
  class NoteDTO extends dto_type_1.BaseDTO {
128
197
  }
129
198
  exports.NoteDTO = NoteDTO;
@@ -137,6 +206,24 @@ __decorate([
137
206
  (0, class_validator_1.IsString)({ message: "Note must be a string" }),
138
207
  __metadata("design:type", String)
139
208
  ], NoteDTO.prototype, "note", void 0);
209
+ class UpdateNoteDTO extends dto_type_1.BaseDTO {
210
+ }
211
+ exports.UpdateNoteDTO = UpdateNoteDTO;
212
+ __decorate([
213
+ (0, swagger_1.ApiProperty)({ description: "ID of the note", required: true }),
214
+ (0, class_validator_1.IsUUID)(4, { message: "Invalid UUID format for ticket ID" }),
215
+ __metadata("design:type", String)
216
+ ], UpdateNoteDTO.prototype, "id", void 0);
217
+ __decorate([
218
+ (0, swagger_1.ApiProperty)({ description: "ID of the ticket", required: true }),
219
+ (0, class_validator_1.IsUUID)(4, { message: "Invalid UUID format for ticket ID" }),
220
+ __metadata("design:type", String)
221
+ ], UpdateNoteDTO.prototype, "ticketId", void 0);
222
+ __decorate([
223
+ (0, swagger_1.ApiProperty)({ description: "Content of the note" }),
224
+ (0, class_validator_1.IsString)({ message: "Note must be a string" }),
225
+ __metadata("design:type", String)
226
+ ], UpdateNoteDTO.prototype, "note", void 0);
140
227
  class EscalationDTO extends dto_type_1.BaseDTO {
141
228
  }
142
229
  exports.EscalationDTO = EscalationDTO;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resurgence-data",
3
- "version": "1.1.49",
3
+ "version": "1.1.50",
4
4
  "description": "DTOs and shareable resources",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -49,6 +49,37 @@ export class CreateTicketDTO extends BaseDTO {
49
49
  @IsString()
50
50
  body: string;
51
51
  }
52
+ export class UpdateTicketDTO extends BaseDTO {
53
+ @ApiProperty({ description: "ID of the ticket" })
54
+ @IsUUID()
55
+ id: string;
56
+ @ApiProperty({ description: "ID of the biller", required: false })
57
+ @IsOptional()
58
+ @IsUUID()
59
+ billerId?: string;
60
+
61
+ @ApiProperty({ description: "ID of the user", required: false })
62
+ @IsOptional()
63
+ @IsUUID()
64
+ userId?: string;
65
+
66
+ @ApiProperty({ description: "Type of the ticket", enum: TICKET_TYPE, default: TICKET_TYPE.ENQUIRY })
67
+ @IsEnum(TICKET_TYPE)
68
+ ticketType: TICKET_TYPE;
69
+
70
+ @ApiProperty({ description: "Transaction details", maxLength: 100 })
71
+ @IsString()
72
+ @Length(0, 100)
73
+ transaction: string;
74
+
75
+ @ApiProperty({ description: "Subject of the ticket" })
76
+ @IsString()
77
+ subject: string;
78
+
79
+ @ApiProperty({ description: "Body of the ticket" })
80
+ @IsString()
81
+ body: string;
82
+ }
52
83
 
53
84
  export class TicketStatusDTO extends BaseDTO {
54
85
  @ApiProperty({ description: "Status of the ticket", enum: TICKET_STATUS, default: TICKET_STATUS.PENDING })
@@ -93,6 +124,27 @@ export class ResponseDTO extends BaseDTO {
93
124
  @IsOptional()
94
125
  attachments?: AttachmentDTO[];
95
126
  }
127
+ export class UpdateResponseDTO extends BaseDTO {
128
+ @ApiProperty({ description: "ID of the response" })
129
+ @IsUUID()
130
+ id: string;
131
+
132
+ @ApiProperty({ description: "ID of the user", required: true })
133
+ @IsUUID()
134
+ userId?: string;
135
+
136
+ @ApiProperty({ description: "Response text" })
137
+ @IsString()
138
+ response?: string;
139
+
140
+ @ApiProperty({ description: "ID of the ticket", required: true })
141
+ @IsUUID()
142
+ ticketId?: string;
143
+
144
+ @ApiProperty({ description: "Attachments related to the response", type: [String], required: false })
145
+ @IsOptional()
146
+ attachments?: AttachmentDTO[];
147
+ }
96
148
 
97
149
  export class NoteDTO extends BaseDTO {
98
150
  @ApiProperty({ description: "ID of the ticket", required: true })
@@ -103,6 +155,18 @@ export class NoteDTO extends BaseDTO {
103
155
  @IsString({ message: "Note must be a string" })
104
156
  note: string;
105
157
  }
158
+ export class UpdateNoteDTO extends BaseDTO {
159
+ @ApiProperty({ description: "ID of the note", required: true })
160
+ @IsUUID(4, { message: "Invalid UUID format for ticket ID" })
161
+ id: string;
162
+ @ApiProperty({ description: "ID of the ticket", required: true })
163
+ @IsUUID(4, { message: "Invalid UUID format for ticket ID" })
164
+ ticketId?: string;
165
+
166
+ @ApiProperty({ description: "Content of the note" })
167
+ @IsString({ message: "Note must be a string" })
168
+ note?: string;
169
+ }
106
170
 
107
171
  export class EscalationDTO extends BaseDTO {
108
172
  @ApiProperty({ description: "Priority of the escalation", enum: PRIORITY, default: PRIORITY.NORMAL })