@fiado/type-kit 1.0.93 → 1.0.94

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,8 @@
1
- import { CountryId } from '../../country/enums/CountryId';
2
1
  import { VirtualOrPhysical } from '../enums/VirtualOrPhysical';
3
2
  import { DeliveryChannel } from '../enums/DeliveryChannel';
4
3
  export declare class CardApplicationRequest {
5
- countryId: CountryId;
6
4
  creditOrDebit: string;
7
- virtualOrPhysical: VirtualOrPhysical;
5
+ virtualOrPhysical: VirtualOrPhysical.PHYSICAL;
8
6
  addressId: string;
9
7
  deliveryChannel: DeliveryChannel;
10
- constructor(partial: Partial<CardApplicationRequest>);
11
8
  }
@@ -11,31 +11,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CardApplicationRequest = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
- const CountryId_1 = require("../../country/enums/CountryId");
15
14
  const CreditOrDebit_1 = require("../enums/CreditOrDebit");
16
15
  const VirtualOrPhysical_1 = require("../enums/VirtualOrPhysical");
17
16
  const DeliveryChannel_1 = require("../enums/DeliveryChannel");
18
17
  class CardApplicationRequest {
19
- constructor(partial) {
20
- this.virtualOrPhysical = VirtualOrPhysical_1.VirtualOrPhysical.PHYSICAL;
21
- Object.assign(this, partial);
22
- // Asegura que virtualOrPhysical tenga un valor por defecto si no se provee
23
- this.virtualOrPhysical = this.virtualOrPhysical || VirtualOrPhysical_1.VirtualOrPhysical.PHYSICAL;
24
- }
25
18
  }
26
19
  exports.CardApplicationRequest = CardApplicationRequest;
27
- __decorate([
28
- (0, class_validator_1.IsNotEmpty)(),
29
- (0, class_validator_1.IsEnum)(CountryId_1.CountryId),
30
- __metadata("design:type", String)
31
- ], CardApplicationRequest.prototype, "countryId", void 0);
32
20
  __decorate([
33
21
  (0, class_validator_1.IsOptional)(),
34
22
  (0, class_validator_1.IsEnum)(CreditOrDebit_1.CreditOrDebit),
35
23
  __metadata("design:type", String)
36
24
  ], CardApplicationRequest.prototype, "creditOrDebit", void 0);
37
25
  __decorate([
38
- (0, class_validator_1.IsOptional)(),
39
26
  (0, class_validator_1.IsEnum)(VirtualOrPhysical_1.VirtualOrPhysical),
40
27
  __metadata("design:type", String)
41
28
  ], CardApplicationRequest.prototype, "virtualOrPhysical", void 0);
@@ -1,4 +1,5 @@
1
+ import { UpdateKey } from "../enums/UpdateKey";
1
2
  export declare class CardUpdateRequest {
2
- type: string;
3
+ type: UpdateKey;
3
4
  value: string;
4
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "1.0.93",
3
+ "version": "1.0.94",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -1,34 +1,22 @@
1
1
 
2
2
 
3
3
  import { IsEnum, IsNotEmpty, IsOptional } from 'class-validator';
4
- import { CountryId } from '../../country/enums/CountryId';
5
4
  import { CreditOrDebit } from '../enums/CreditOrDebit';
6
5
  import { VirtualOrPhysical } from '../enums/VirtualOrPhysical';
7
6
  import { DeliveryChannel } from '../enums/DeliveryChannel';
8
7
 
9
8
  export class CardApplicationRequest {
10
9
 
11
- @IsNotEmpty()
12
- @IsEnum(CountryId)
13
- countryId: CountryId;
14
-
15
10
  @IsOptional()
16
11
  @IsEnum(CreditOrDebit)
17
12
  creditOrDebit: string;
18
13
 
19
- @IsOptional()
20
14
  @IsEnum(VirtualOrPhysical)
21
- virtualOrPhysical: VirtualOrPhysical = VirtualOrPhysical.PHYSICAL;
15
+ virtualOrPhysical: VirtualOrPhysical.PHYSICAL;
22
16
 
23
17
  @IsNotEmpty()
24
18
  addressId: string;
25
19
 
26
20
  @IsEnum(DeliveryChannel)
27
21
  deliveryChannel: DeliveryChannel
28
-
29
- constructor(partial: Partial<CardApplicationRequest>) {
30
- Object.assign(this, partial);
31
- // Asegura que virtualOrPhysical tenga un valor por defecto si no se provee
32
- this.virtualOrPhysical = this.virtualOrPhysical || VirtualOrPhysical.PHYSICAL;
33
- }
34
22
  }
@@ -6,7 +6,7 @@ import {IsValueValid} from "../validations/CardUpdateKeyConstraint";
6
6
  export class CardUpdateRequest {
7
7
 
8
8
  @IsEnum(UpdateKey)
9
- type: string;
9
+ type: UpdateKey;
10
10
 
11
11
  @IsString()
12
12
  @IsValueValid()