resurgence-data 1.0.33 → 1.0.35

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.
@@ -195,8 +195,9 @@ export declare class UpdateBillerItemCategoryDto extends BaseDTO {
195
195
  export declare class CreateBillerItemDto extends BaseDTO {
196
196
  billerId: string;
197
197
  itemCategoryId?: string;
198
+ itemCode?: string;
198
199
  amount: number;
199
- name?: string;
200
+ name: string;
200
201
  source?: string;
201
202
  customerIdentifierName?: string;
202
203
  serviceFee: number;
@@ -208,6 +209,7 @@ export declare class UpdateBillerItemDto extends BaseDTO {
208
209
  id: string;
209
210
  billerId?: string;
210
211
  itemCategoryId?: string;
212
+ itemCode?: string;
211
213
  amount?: number;
212
214
  name?: string;
213
215
  source?: string;
@@ -1231,6 +1231,15 @@ __decorate([
1231
1231
  (0, class_validator_1.IsOptional)(),
1232
1232
  __metadata("design:type", String)
1233
1233
  ], CreateBillerItemDto.prototype, "itemCategoryId", void 0);
1234
+ __decorate([
1235
+ (0, swagger_1.ApiProperty)({
1236
+ description: "The item code ",
1237
+ example: "ICO05678",
1238
+ }),
1239
+ (0, class_validator_1.IsString)({ message: "Item category code must be a valid string" }),
1240
+ (0, class_validator_1.IsOptional)(),
1241
+ __metadata("design:type", String)
1242
+ ], CreateBillerItemDto.prototype, "itemCode", void 0);
1234
1243
  __decorate([
1235
1244
  (0, swagger_1.ApiProperty)({
1236
1245
  description: "The amount associated with the biller item",
@@ -1338,6 +1347,15 @@ __decorate([
1338
1347
  (0, class_validator_1.IsOptional)(),
1339
1348
  __metadata("design:type", String)
1340
1349
  ], UpdateBillerItemDto.prototype, "itemCategoryId", void 0);
1350
+ __decorate([
1351
+ (0, swagger_1.ApiProperty)({
1352
+ description: "The item code ",
1353
+ example: "ICO05678",
1354
+ }),
1355
+ (0, class_validator_1.IsString)({ message: "Item category code must be a valid string" }),
1356
+ (0, class_validator_1.IsOptional)(),
1357
+ __metadata("design:type", String)
1358
+ ], UpdateBillerItemDto.prototype, "itemCode", void 0);
1341
1359
  __decorate([
1342
1360
  (0, swagger_1.ApiProperty)({
1343
1361
  description: "The amount associated with the biller item",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resurgence-data",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "DTOs and shareable resources",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -1091,6 +1091,14 @@ export class CreateBillerItemDto extends BaseDTO {
1091
1091
  @IsOptional()
1092
1092
  itemCategoryId?: string;
1093
1093
 
1094
+ @ApiProperty({
1095
+ description: "The item code ",
1096
+ example: "ICO05678",
1097
+ })
1098
+ @IsString({ message: "Item category code must be a valid string" })
1099
+ @IsOptional()
1100
+ itemCode?: string;
1101
+
1094
1102
  @ApiProperty({
1095
1103
  description: "The amount associated with the biller item",
1096
1104
  example: 100,
@@ -1105,7 +1113,7 @@ export class CreateBillerItemDto extends BaseDTO {
1105
1113
  required: false,
1106
1114
  })
1107
1115
  @IsString({ message: "Name must be a valid string" })
1108
- name?: string;
1116
+ name: string;
1109
1117
  @ApiProperty({
1110
1118
  description: "The source of the biller item",
1111
1119
  example: "Utility Bill",
@@ -1185,6 +1193,14 @@ export class UpdateBillerItemDto extends BaseDTO {
1185
1193
  @IsOptional()
1186
1194
  itemCategoryId?: string;
1187
1195
 
1196
+ @ApiProperty({
1197
+ description: "The item code ",
1198
+ example: "ICO05678",
1199
+ })
1200
+ @IsString({ message: "Item category code must be a valid string" })
1201
+ @IsOptional()
1202
+ itemCode?: string;
1203
+
1188
1204
  @ApiProperty({
1189
1205
  description: "The amount associated with the biller item",
1190
1206
  example: 100,
@@ -2,3 +2,12 @@ export const accountTypes = ["ADMINISTRATOR", "USER", "SUPPORT", "BILLER", "BILL
2
2
  export const inviteAccountTypes = ["BILLER_ADMINISTRATOR", "BILLER_USER"];
3
3
 
4
4
  export const InviteStatuses = ["ACCEPTED", "PENDING", "REVOKED"];
5
+
6
+ enum ROLE {
7
+ ADMINISTRATOR,
8
+ USER,
9
+ SUPPORT,
10
+ BILLER,
11
+ BILLER_ADMINISTRATOR,
12
+ BILLER_USER,
13
+ }
package/src/user/user.ts CHANGED
@@ -2,6 +2,14 @@ import { IsBoolean, IsEmail, IsIn, IsOptional, IsString, IsUUID } from "class-va
2
2
  import { accountTypes } from "../types/account.type";
3
3
  import { ApiProperty } from "@nestjs/swagger";
4
4
 
5
+ enum ROLE {
6
+ ADMINISTRATOR,
7
+ USER,
8
+ SUPPORT,
9
+ BILLER,
10
+ BILLER_ADMINISTRATOR,
11
+ BILLER_USER,
12
+ }
5
13
  export class CreateUserDTO {
6
14
  @IsString({ message: "First name is required. Please provide it." })
7
15
  @ApiProperty({ description: "User's first name" })
@@ -32,7 +40,7 @@ export class CreateUserDTO {
32
40
 
33
41
  @IsString({ message: "Account type is required. Please specify it." })
34
42
  @IsIn(accountTypes, { message: "Please select a valid account type" })
35
- @ApiProperty({ description: "users role" })
43
+ @ApiProperty({ description: "users role", enumName: "ROLE", enum: ROLE })
36
44
  role: string;
37
45
  }
38
46