@fiado/type-kit 1.0.53 → 1.0.55

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.
@@ -11,7 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CardCreateAdditionalRequest = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
- const IsNotEmpty_1 = require("class-validator/types/decorator/common/IsNotEmpty");
15
14
  const IsPhoneNumberConstraint_1 = require("../validations/IsPhoneNumberConstraint");
16
15
  const class_transformer_1 = require("class-transformer");
17
16
  const address_1 = require("../../address");
@@ -19,25 +18,25 @@ class CardCreateAdditionalRequest {
19
18
  }
20
19
  exports.CardCreateAdditionalRequest = CardCreateAdditionalRequest;
21
20
  __decorate([
22
- (0, IsNotEmpty_1.IsNotEmpty)(),
21
+ (0, class_validator_1.IsNotEmpty)(),
23
22
  (0, class_validator_1.IsString)(),
24
23
  (0, class_validator_1.Length)(3, 40),
25
24
  __metadata("design:type", String)
26
25
  ], CardCreateAdditionalRequest.prototype, "name", void 0);
27
26
  __decorate([
28
- (0, IsNotEmpty_1.IsNotEmpty)(),
27
+ (0, class_validator_1.IsNotEmpty)(),
29
28
  (0, class_validator_1.IsString)(),
30
29
  (0, class_validator_1.Length)(3, 20),
31
30
  __metadata("design:type", String)
32
31
  ], CardCreateAdditionalRequest.prototype, "lastNamePaternal", void 0);
33
32
  __decorate([
34
- (0, IsNotEmpty_1.IsNotEmpty)(),
33
+ (0, class_validator_1.IsNotEmpty)(),
35
34
  (0, class_validator_1.IsString)(),
36
35
  (0, class_validator_1.Length)(3, 20),
37
36
  __metadata("design:type", String)
38
37
  ], CardCreateAdditionalRequest.prototype, "lastNameMaternal", void 0);
39
38
  __decorate([
40
- (0, IsNotEmpty_1.IsNotEmpty)(),
39
+ (0, class_validator_1.IsNotEmpty)(),
41
40
  (0, class_validator_1.IsString)(),
42
41
  (0, IsPhoneNumberConstraint_1.IsPhoneNumberFiado)(),
43
42
  __metadata("design:type", String)
@@ -47,7 +46,7 @@ __decorate([
47
46
  __metadata("design:type", String)
48
47
  ], CardCreateAdditionalRequest.prototype, "dateOfBirth", void 0);
49
48
  __decorate([
50
- (0, IsNotEmpty_1.IsNotEmpty)(),
49
+ (0, class_validator_1.IsNotEmpty)(),
51
50
  (0, class_validator_1.IsString)(),
52
51
  (0, class_validator_1.Length)(3, 20),
53
52
  __metadata("design:type", String)
@@ -0,0 +1,5 @@
1
+ import { QueueMessageBase } from "../../queue/dtos/QueueMessageBase";
2
+ import { CardShipmentUpdateRequest } from "./CardShipmentUpdateRequest";
3
+ export declare class CardShipmentQueueMessage extends QueueMessageBase<CardShipmentUpdateRequest> {
4
+ message: CardShipmentUpdateRequest;
5
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CardShipmentQueueMessage = void 0;
4
+ const QueueMessageBase_1 = require("../../queue/dtos/QueueMessageBase");
5
+ class CardShipmentQueueMessage extends QueueMessageBase_1.QueueMessageBase {
6
+ }
7
+ exports.CardShipmentQueueMessage = CardShipmentQueueMessage;
@@ -0,0 +1,6 @@
1
+ export declare class CardShipmentUpdateRequest {
2
+ shippingId: string;
3
+ status: string;
4
+ statusDetail: string;
5
+ updateAt: string;
6
+ }
@@ -0,0 +1,36 @@
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
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CardShipmentUpdateRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CardShipmentUpdateRequest {
15
+ }
16
+ exports.CardShipmentUpdateRequest = CardShipmentUpdateRequest;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", String)
21
+ ], CardShipmentUpdateRequest.prototype, "shippingId", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], CardShipmentUpdateRequest.prototype, "status", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.IsNotEmpty)(),
30
+ __metadata("design:type", String)
31
+ ], CardShipmentUpdateRequest.prototype, "statusDetail", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.IsNotEmpty)(),
35
+ __metadata("design:type", String)
36
+ ], CardShipmentUpdateRequest.prototype, "updateAt", void 0);
@@ -5,6 +5,8 @@ export * from './dtos/CardUpdateRequest';
5
5
  export * from './dtos/CardCreateAdditionalRequest';
6
6
  export * from './dtos/CardBalanceResponse';
7
7
  export * from './dtos/CardResponse';
8
+ export * from './dtos/CardShipmentQueueMessage';
9
+ export * from './dtos/CardShipmentUpdateRequest';
8
10
  export * from './enums/CardType';
9
11
  export * from './enums/CardUpdateKey';
10
12
  export * from './enums/IssuanceType';
package/bin/card/index.js CHANGED
@@ -22,6 +22,8 @@ __exportStar(require("./dtos/CardUpdateRequest"), exports);
22
22
  __exportStar(require("./dtos/CardCreateAdditionalRequest"), exports);
23
23
  __exportStar(require("./dtos/CardBalanceResponse"), exports);
24
24
  __exportStar(require("./dtos/CardResponse"), exports);
25
+ __exportStar(require("./dtos/CardShipmentQueueMessage"), exports);
26
+ __exportStar(require("./dtos/CardShipmentUpdateRequest"), exports);
25
27
  //enums
26
28
  __exportStar(require("./enums/CardType"), exports);
27
29
  __exportStar(require("./enums/CardUpdateKey"), exports);
@@ -0,0 +1,5 @@
1
+ export declare class QueueMessageBase<T> {
2
+ provider: string;
3
+ eventType: string;
4
+ message: T;
5
+ }
@@ -0,0 +1,25 @@
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
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.QueueMessageBase = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const provider_1 = require("../../provider");
15
+ class QueueMessageBase {
16
+ }
17
+ exports.QueueMessageBase = QueueMessageBase;
18
+ __decorate([
19
+ (0, class_validator_1.IsEnum)(provider_1.Provider),
20
+ __metadata("design:type", String)
21
+ ], QueueMessageBase.prototype, "provider", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ __metadata("design:type", String)
25
+ ], QueueMessageBase.prototype, "eventType", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "1.0.53",
3
+ "version": "1.0.55",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -1,5 +1,4 @@
1
- import { IsDateString, IsString, Length, ValidateNested } from "class-validator";
2
- import { IsNotEmpty } from "class-validator/types/decorator/common/IsNotEmpty";
1
+ import { IsDateString, IsNotEmpty, IsString, Length, ValidateNested } from "class-validator";
3
2
  import { IsPhoneNumberFiado } from "../validations/IsPhoneNumberConstraint";
4
3
  import { Type } from "class-transformer";
5
4
  import { AddressCreateRequest } from "../../address";
@@ -0,0 +1,8 @@
1
+ import { QueueMessageBase } from "../../queue/dtos/QueueMessageBase";
2
+ import { CardShipmentUpdateRequest } from "./CardShipmentUpdateRequest";
3
+
4
+ export class CardShipmentQueueMessage extends QueueMessageBase<CardShipmentUpdateRequest> {
5
+
6
+ message: CardShipmentUpdateRequest;
7
+
8
+ }
@@ -0,0 +1,20 @@
1
+ import { IsNotEmpty, IsString } from "class-validator";
2
+
3
+ export class CardShipmentUpdateRequest {
4
+
5
+ @IsString()
6
+ @IsNotEmpty()
7
+ shippingId: string
8
+
9
+ @IsString()
10
+ @IsNotEmpty()
11
+ status: string
12
+
13
+ @IsString()
14
+ @IsNotEmpty()
15
+ statusDetail: string
16
+
17
+ @IsString()
18
+ @IsNotEmpty()
19
+ updateAt: string
20
+ }
package/src/card/index.ts CHANGED
@@ -7,6 +7,8 @@ export * from './dtos/CardUpdateRequest';
7
7
  export * from './dtos/CardCreateAdditionalRequest';
8
8
  export * from './dtos/CardBalanceResponse';
9
9
  export * from './dtos/CardResponse';
10
+ export * from './dtos/CardShipmentQueueMessage'
11
+ export * from './dtos/CardShipmentUpdateRequest'
10
12
 
11
13
  //enums
12
14
  export * from './enums/CardType';
@@ -0,0 +1,14 @@
1
+ import { IsEnum, IsString } from "class-validator";
2
+ import { Provider } from "../../provider";
3
+
4
+
5
+ export class QueueMessageBase<T> {
6
+
7
+ @IsEnum(Provider)
8
+ provider: string;
9
+
10
+ @IsString()
11
+ eventType: string;
12
+
13
+ message: T
14
+ }