resurgence-data 1.1.49 → 1.1.51

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,23 @@ 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;
59
+ userId: string;
43
60
  note: string;
44
61
  }
62
+ export declare class UpdateNoteDTO extends BaseDTO {
63
+ id: string;
64
+ ticketId?: string;
65
+ note?: string;
66
+ }
45
67
  export declare class EscalationDTO extends BaseDTO {
46
68
  priority: PRIORITY;
47
69
  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;
@@ -132,11 +201,34 @@ __decorate([
132
201
  (0, class_validator_1.IsUUID)(4, { message: "Invalid UUID format for ticket ID" }),
133
202
  __metadata("design:type", String)
134
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);
135
209
  __decorate([
136
210
  (0, swagger_1.ApiProperty)({ description: "Content of the note" }),
137
211
  (0, class_validator_1.IsString)({ message: "Note must be a string" }),
138
212
  __metadata("design:type", String)
139
213
  ], NoteDTO.prototype, "note", void 0);
214
+ class UpdateNoteDTO extends dto_type_1.BaseDTO {
215
+ }
216
+ exports.UpdateNoteDTO = UpdateNoteDTO;
217
+ __decorate([
218
+ (0, swagger_1.ApiProperty)({ description: "ID of the note", required: true }),
219
+ (0, class_validator_1.IsUUID)(4, { message: "Invalid UUID format for ticket ID" }),
220
+ __metadata("design:type", String)
221
+ ], UpdateNoteDTO.prototype, "id", void 0);
222
+ __decorate([
223
+ (0, swagger_1.ApiProperty)({ description: "ID of the ticket", required: true }),
224
+ (0, class_validator_1.IsUUID)(4, { message: "Invalid UUID format for ticket ID" }),
225
+ __metadata("design:type", String)
226
+ ], UpdateNoteDTO.prototype, "ticketId", void 0);
227
+ __decorate([
228
+ (0, swagger_1.ApiProperty)({ description: "Content of the note" }),
229
+ (0, class_validator_1.IsString)({ message: "Note must be a string" }),
230
+ __metadata("design:type", String)
231
+ ], UpdateNoteDTO.prototype, "note", void 0);
140
232
  class EscalationDTO extends dto_type_1.BaseDTO {
141
233
  }
142
234
  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.51",
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,16 +124,53 @@ 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 })
99
151
  @IsUUID(4, { message: "Invalid UUID format for ticket ID" })
100
152
  ticketId: string;
101
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
+
102
158
  @ApiProperty({ description: "Content of the note" })
103
159
  @IsString({ message: "Note must be a string" })
104
160
  note: string;
105
161
  }
162
+ export class UpdateNoteDTO extends BaseDTO {
163
+ @ApiProperty({ description: "ID of the note", required: true })
164
+ @IsUUID(4, { message: "Invalid UUID format for ticket ID" })
165
+ id: string;
166
+ @ApiProperty({ description: "ID of the ticket", required: true })
167
+ @IsUUID(4, { message: "Invalid UUID format for ticket ID" })
168
+ ticketId?: string;
169
+
170
+ @ApiProperty({ description: "Content of the note" })
171
+ @IsString({ message: "Note must be a string" })
172
+ note?: string;
173
+ }
106
174
 
107
175
  export class EscalationDTO extends BaseDTO {
108
176
  @ApiProperty({ description: "Priority of the escalation", enum: PRIORITY, default: PRIORITY.NORMAL })