shared-dto 1.0.77 → 1.0.78
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.
- package/dist/PaymentRequest.dto.d.ts +15 -0
- package/dist/PaymentRequest.dto.d.ts.map +1 -0
- package/dist/PaymentRequest.dto.js +63 -0
- package/dist/PaymentRequest.dto.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/PaymentRequest.dto.ts +39 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class BasePaymentRequestDTO {
|
|
2
|
+
apartmentId: string;
|
|
3
|
+
fromUserUid: string;
|
|
4
|
+
toUserUid: string;
|
|
5
|
+
linkToPayment?: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class CreatePaymentRequestDTO extends BasePaymentRequestDTO {
|
|
9
|
+
}
|
|
10
|
+
export declare class PaymentRequestDTO extends BasePaymentRequestDTO {
|
|
11
|
+
id: string;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
isDone: boolean;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=PaymentRequest.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentRequest.dto.d.ts","sourceRoot":"","sources":["../src/PaymentRequest.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,qBAAqB;IAGhC,WAAW,EAAE,MAAM,CAAC;IAIpB,WAAW,EAAE,MAAM,CAAC;IAIpB,SAAS,EAAE,MAAM,CAAC;IAIlB,aAAa,CAAC,EAAE,MAAM,CAAC;IAIvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,uBAAwB,SAAQ,qBAAqB;CAAG;AAErE,qBAAa,iBAAkB,SAAQ,qBAAqB;IAG1D,EAAE,EAAE,MAAM,CAAC;IAIX,SAAS,CAAC,EAAE,IAAI,CAAC;IAIjB,MAAM,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
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.PaymentRequestDTO = exports.CreatePaymentRequestDTO = exports.BasePaymentRequestDTO = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class BasePaymentRequestDTO {
|
|
15
|
+
}
|
|
16
|
+
exports.BasePaymentRequestDTO = BasePaymentRequestDTO;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], BasePaymentRequestDTO.prototype, "apartmentId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], BasePaymentRequestDTO.prototype, "fromUserUid", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], BasePaymentRequestDTO.prototype, "toUserUid", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], BasePaymentRequestDTO.prototype, "linkToPayment", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], BasePaymentRequestDTO.prototype, "amount", void 0);
|
|
42
|
+
class CreatePaymentRequestDTO extends BasePaymentRequestDTO {
|
|
43
|
+
}
|
|
44
|
+
exports.CreatePaymentRequestDTO = CreatePaymentRequestDTO;
|
|
45
|
+
class PaymentRequestDTO extends BasePaymentRequestDTO {
|
|
46
|
+
}
|
|
47
|
+
exports.PaymentRequestDTO = PaymentRequestDTO;
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], PaymentRequestDTO.prototype, "id", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsDate)(),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
__metadata("design:type", Date)
|
|
57
|
+
], PaymentRequestDTO.prototype, "createdAt", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsBoolean)(),
|
|
60
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
61
|
+
__metadata("design:type", Boolean)
|
|
62
|
+
], PaymentRequestDTO.prototype, "isDone", void 0);
|
|
63
|
+
//# sourceMappingURL=PaymentRequest.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentRequest.dto.js","sourceRoot":"","sources":["../src/PaymentRequest.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsF;AAEtF,MAAa,qBAAqB;CAoBjC;AApBD,sDAoBC;AAjBC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACU;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAGjB,MAAa,uBAAwB,SAAQ,qBAAqB;CAAG;AAArE,0DAAqE;AAErE,MAAa,iBAAkB,SAAQ,qBAAqB;CAY3D;AAZD,8CAYC;AATC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6CACF;AAIX;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;8BACD,IAAI;oDAAC;AAIjB;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;iDACG"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,5 @@ __exportStar(require("./Task.dto"), exports);
|
|
|
20
20
|
__exportStar(require("./Duty.dto"), exports);
|
|
21
21
|
__exportStar(require("./Payments.dto"), exports);
|
|
22
22
|
__exportStar(require("./Expenses.dto"), exports);
|
|
23
|
+
__exportStar(require("./PaymentRequest.dto"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA0B;AAC1B,iDAA8B;AAC9B,iDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA0B;AAC1B,iDAA8B;AAC9B,iDAA8B;AAC9B,uDAAoC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IsBoolean, IsDate, IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
export class BasePaymentRequestDTO {
|
|
4
|
+
@IsString()
|
|
5
|
+
@IsNotEmpty()
|
|
6
|
+
apartmentId: string;
|
|
7
|
+
|
|
8
|
+
@IsString()
|
|
9
|
+
@IsNotEmpty()
|
|
10
|
+
fromUserUid: string;
|
|
11
|
+
|
|
12
|
+
@IsString()
|
|
13
|
+
@IsNotEmpty()
|
|
14
|
+
toUserUid: string;
|
|
15
|
+
|
|
16
|
+
@IsString()
|
|
17
|
+
@IsOptional()
|
|
18
|
+
linkToPayment?: string;
|
|
19
|
+
|
|
20
|
+
@IsString()
|
|
21
|
+
@IsNotEmpty()
|
|
22
|
+
amount: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class CreatePaymentRequestDTO extends BasePaymentRequestDTO {}
|
|
26
|
+
|
|
27
|
+
export class PaymentRequestDTO extends BasePaymentRequestDTO {
|
|
28
|
+
@IsString()
|
|
29
|
+
@IsNotEmpty()
|
|
30
|
+
id: string;
|
|
31
|
+
|
|
32
|
+
@IsDate()
|
|
33
|
+
@IsOptional()
|
|
34
|
+
createdAt?: Date;
|
|
35
|
+
|
|
36
|
+
@IsBoolean()
|
|
37
|
+
@IsNotEmpty()
|
|
38
|
+
isDone: boolean;
|
|
39
|
+
}
|
package/src/index.ts
CHANGED