@fiado/type-kit 1.2.52 → 1.2.54

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,11 +1,13 @@
1
- export default class CreateRiskProfileRequest {
2
- private directoryId;
3
- private peopleId;
4
- private sex;
5
- private dob;
6
- private countryOfBirth;
7
- private countryOfResidence;
8
- private stateOfResidence;
9
- private activity;
10
- private pepLevel;
1
+ import { SexDocument } from "../../identity";
2
+ import { PepLevelEnum } from "../enums/PepLevelEnum";
3
+ export declare class CreateRiskProfileRequest {
4
+ directoryId: string;
5
+ peopleId: string;
6
+ sex: SexDocument;
7
+ dob: string;
8
+ countryOfBirth: string;
9
+ countryOfResidence: string;
10
+ stateOfResidence: string;
11
+ activity: string;
12
+ pepLevel: PepLevelEnum;
11
13
  }
@@ -1,5 +1,63 @@
1
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateRiskProfileRequest = void 0;
13
+ const identity_1 = require("../../identity");
14
+ const PepLevelEnum_1 = require("../enums/PepLevelEnum");
15
+ const class_validator_1 = require("class-validator");
3
16
  class CreateRiskProfileRequest {
4
17
  }
5
- exports.default = CreateRiskProfileRequest;
18
+ exports.CreateRiskProfileRequest = CreateRiskProfileRequest;
19
+ __decorate([
20
+ (0, class_validator_1.IsString)(),
21
+ (0, class_validator_1.IsNotEmpty)(),
22
+ __metadata("design:type", String)
23
+ ], CreateRiskProfileRequest.prototype, "directoryId", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsString)(),
26
+ (0, class_validator_1.IsNotEmpty)(),
27
+ __metadata("design:type", String)
28
+ ], CreateRiskProfileRequest.prototype, "peopleId", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsEnum)(identity_1.SexDocument),
31
+ (0, class_validator_1.IsNotEmpty)(),
32
+ __metadata("design:type", String)
33
+ ], CreateRiskProfileRequest.prototype, "sex", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsString)(),
36
+ (0, class_validator_1.IsNotEmpty)(),
37
+ __metadata("design:type", String)
38
+ ], CreateRiskProfileRequest.prototype, "dob", void 0);
39
+ __decorate([
40
+ (0, class_validator_1.IsString)(),
41
+ (0, class_validator_1.IsNotEmpty)(),
42
+ __metadata("design:type", String)
43
+ ], CreateRiskProfileRequest.prototype, "countryOfBirth", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsString)(),
46
+ (0, class_validator_1.IsNotEmpty)(),
47
+ __metadata("design:type", String)
48
+ ], CreateRiskProfileRequest.prototype, "countryOfResidence", void 0);
49
+ __decorate([
50
+ (0, class_validator_1.IsString)(),
51
+ (0, class_validator_1.IsNotEmpty)(),
52
+ __metadata("design:type", String)
53
+ ], CreateRiskProfileRequest.prototype, "stateOfResidence", void 0);
54
+ __decorate([
55
+ (0, class_validator_1.IsString)(),
56
+ (0, class_validator_1.IsNotEmpty)(),
57
+ __metadata("design:type", String)
58
+ ], CreateRiskProfileRequest.prototype, "activity", void 0);
59
+ __decorate([
60
+ (0, class_validator_1.IsEnum)(PepLevelEnum_1.PepLevelEnum),
61
+ (0, class_validator_1.IsNotEmpty)(),
62
+ __metadata("design:type", String)
63
+ ], CreateRiskProfileRequest.prototype, "pepLevel", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "1.2.52",
3
+ "version": "1.2.54",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -1,14 +1,41 @@
1
1
  import {SexDocument} from "../../identity";
2
2
  import {PepLevelEnum} from "../enums/PepLevelEnum";
3
+ import {IsEnum, IsNotEmpty, IsString} from "class-validator";
3
4
 
4
- export default class CreateRiskProfileRequest {
5
- private directoryId!: string;
6
- private peopleId!: string;
7
- private sex!: SexDocument;
8
- private dob!: string;
9
- private countryOfBirth!: string;
10
- private countryOfResidence!: string;
11
- private stateOfResidence!: string;
12
- private activity!: string;
13
- private pepLevel!: PepLevelEnum;
5
+ export class CreateRiskProfileRequest {
6
+ @IsString()
7
+ @IsNotEmpty()
8
+ directoryId!: string;
9
+
10
+ @IsString()
11
+ @IsNotEmpty()
12
+ peopleId!: string;
13
+
14
+ @IsEnum(SexDocument)
15
+ @IsNotEmpty()
16
+ sex!: SexDocument;
17
+
18
+ @IsString()
19
+ @IsNotEmpty()
20
+ dob!: string;
21
+
22
+ @IsString()
23
+ @IsNotEmpty()
24
+ countryOfBirth!: string;
25
+
26
+ @IsString()
27
+ @IsNotEmpty()
28
+ countryOfResidence!: string;
29
+
30
+ @IsString()
31
+ @IsNotEmpty()
32
+ stateOfResidence!: string;
33
+
34
+ @IsString()
35
+ @IsNotEmpty()
36
+ activity!: string;
37
+
38
+ @IsEnum(PepLevelEnum)
39
+ @IsNotEmpty()
40
+ pepLevel!: PepLevelEnum;
14
41
  }