shared-dto 1.0.30 → 1.0.33
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/Payments.dto.d.ts +24 -0
- package/dist/Payments.dto.d.ts.map +1 -0
- package/dist/Payments.dto.js +84 -0
- package/dist/Payments.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/Payments.dto.ts +59 -0
- package/src/index.ts +2 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare enum PaymentStatus {
|
|
2
|
+
WAITING = "WAITING",
|
|
3
|
+
COMPLETED = "COMPLETED",
|
|
4
|
+
CANCELLED = "CANCELLED",
|
|
5
|
+
ON_HOLD = "ON_HOLD"
|
|
6
|
+
}
|
|
7
|
+
export declare class CreatePaymentDTO {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
status: PaymentStatus;
|
|
11
|
+
dueDate: Date;
|
|
12
|
+
apartmentId: string;
|
|
13
|
+
assignedUserIds: string[];
|
|
14
|
+
createdById: string;
|
|
15
|
+
prise: string;
|
|
16
|
+
imgsUrls?: string[];
|
|
17
|
+
assignedUsers?: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare class UpdatedPaymentDTO extends CreatePaymentDTO {
|
|
20
|
+
id: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class PaymentDTO extends UpdatedPaymentDTO {
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=Payments.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Payments.dto.d.ts","sourceRoot":"","sources":["../src/Payments.dto.ts"],"names":[],"mappings":"AAGA,oBAAY,aAAa;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAEH,qBAAa,gBAAgB;IAG3B,KAAK,EAAE,MAAM,CAAC;IAId,WAAW,EAAE,MAAM,CAAC;IAGpB,MAAM,EAAE,aAAa,CAAC;IAItB,OAAO,EAAE,IAAI,CAAC;IAId,WAAW,EAAE,MAAM,CAAC;IAIpB,eAAe,EAAE,MAAM,EAAE,CAAC;IAI1B,WAAW,EAAE,MAAM,CAAC;IAIpB,KAAK,EAAE,MAAM,CAAC;IAId,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAIpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,qBAAa,iBAAkB,SAAQ,gBAAgB;IAIrD,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,qBAAa,UAAW,SAAQ,iBAAiB;CAAG"}
|
|
@@ -0,0 +1,84 @@
|
|
|
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.PaymentDTO = exports.UpdatedPaymentDTO = exports.CreatePaymentDTO = exports.PaymentStatus = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var PaymentStatus;
|
|
15
|
+
(function (PaymentStatus) {
|
|
16
|
+
PaymentStatus["WAITING"] = "WAITING";
|
|
17
|
+
PaymentStatus["COMPLETED"] = "COMPLETED";
|
|
18
|
+
PaymentStatus["CANCELLED"] = "CANCELLED";
|
|
19
|
+
PaymentStatus["ON_HOLD"] = "ON_HOLD";
|
|
20
|
+
})(PaymentStatus || (exports.PaymentStatus = PaymentStatus = {}));
|
|
21
|
+
class CreatePaymentDTO {
|
|
22
|
+
}
|
|
23
|
+
exports.CreatePaymentDTO = CreatePaymentDTO;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], CreatePaymentDTO.prototype, "title", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], CreatePaymentDTO.prototype, "description", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsEnum)(PaymentStatus),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], CreatePaymentDTO.prototype, "status", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, class_validator_1.IsDate)(),
|
|
41
|
+
__metadata("design:type", Date)
|
|
42
|
+
], CreatePaymentDTO.prototype, "dueDate", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], CreatePaymentDTO.prototype, "apartmentId", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsArray)(),
|
|
50
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
51
|
+
__metadata("design:type", Array)
|
|
52
|
+
], CreatePaymentDTO.prototype, "assignedUserIds", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsString)(),
|
|
55
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], CreatePaymentDTO.prototype, "createdById", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsNumber)(),
|
|
60
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], CreatePaymentDTO.prototype, "prise", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsArray)(),
|
|
65
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
66
|
+
__metadata("design:type", Array)
|
|
67
|
+
], CreatePaymentDTO.prototype, "imgsUrls", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsArray)(),
|
|
70
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
71
|
+
__metadata("design:type", Array)
|
|
72
|
+
], CreatePaymentDTO.prototype, "assignedUsers", void 0);
|
|
73
|
+
class UpdatedPaymentDTO extends CreatePaymentDTO {
|
|
74
|
+
}
|
|
75
|
+
exports.UpdatedPaymentDTO = UpdatedPaymentDTO;
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.IsString)(),
|
|
78
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], UpdatedPaymentDTO.prototype, "id", void 0);
|
|
81
|
+
class PaymentDTO extends UpdatedPaymentDTO {
|
|
82
|
+
}
|
|
83
|
+
exports.PaymentDTO = PaymentDTO;
|
|
84
|
+
//# sourceMappingURL=Payments.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Payments.dto.js","sourceRoot":"","sources":["../src/Payments.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDAAsG;AAEtG,IAAY,aAKT;AALH,WAAY,aAAa;IACrB,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;IACvB,oCAAmB,CAAA;AACrB,CAAC,EALS,aAAa,6BAAb,aAAa,QAKtB;AAEH,MAAa,gBAAgB;CAuC5B;AAvCD,4CAuCC;AApCC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACO;AAGpB;IADC,IAAA,wBAAM,EAAC,aAAa,CAAC;;gDACA;AAItB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;8BACA,IAAI;iDAAC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACO;AAIpB;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;yDACC;AAI1B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACC;AAId;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;kDACL;AAIpB;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;uDACA;AAG3B,MAAa,iBAAkB,SAAQ,gBAAgB;CAKtD;AALD,8CAKC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6CACF;AAGb,MAAa,UAAW,SAAQ,iBAAiB;CAAG;AAApD,gCAAoD"}
|
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"}
|
|
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"}
|
package/dist/index.js
CHANGED
|
@@ -18,4 +18,5 @@ __exportStar(require("./UserDTO.dto"), exports);
|
|
|
18
18
|
__exportStar(require("./Apartment.dto"), exports);
|
|
19
19
|
__exportStar(require("./Task.dto"), exports);
|
|
20
20
|
__exportStar(require("./Duty.dto"), exports);
|
|
21
|
+
__exportStar(require("./Payments.dto"), exports);
|
|
21
22
|
//# 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"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA0B;AAC1B,iDAA8B"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// src/tasks/dto/create-task.dto.ts
|
|
2
|
+
import { IsString, IsNotEmpty, IsOptional, IsEnum, IsDate, IsArray, IsNumber } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
export enum PaymentStatus {
|
|
5
|
+
WAITING = 'WAITING',
|
|
6
|
+
COMPLETED = 'COMPLETED',
|
|
7
|
+
CANCELLED = 'CANCELLED',
|
|
8
|
+
ON_HOLD = 'ON_HOLD'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class CreatePaymentDTO {
|
|
12
|
+
@IsString()
|
|
13
|
+
@IsNotEmpty()
|
|
14
|
+
title: string;
|
|
15
|
+
|
|
16
|
+
@IsString()
|
|
17
|
+
@IsNotEmpty()
|
|
18
|
+
description: string;
|
|
19
|
+
|
|
20
|
+
@IsEnum(PaymentStatus)
|
|
21
|
+
status: PaymentStatus;
|
|
22
|
+
|
|
23
|
+
@IsOptional()
|
|
24
|
+
@IsDate()
|
|
25
|
+
dueDate: Date;
|
|
26
|
+
|
|
27
|
+
@IsString()
|
|
28
|
+
@IsNotEmpty()
|
|
29
|
+
apartmentId: string;
|
|
30
|
+
|
|
31
|
+
@IsArray()
|
|
32
|
+
@IsString({ each: true })
|
|
33
|
+
assignedUserIds: string[];
|
|
34
|
+
|
|
35
|
+
@IsString()
|
|
36
|
+
@IsNotEmpty()
|
|
37
|
+
createdById: string;
|
|
38
|
+
|
|
39
|
+
@IsNumber()
|
|
40
|
+
@IsNotEmpty()
|
|
41
|
+
prise: string;
|
|
42
|
+
|
|
43
|
+
@IsArray()
|
|
44
|
+
@IsString({ each: true })
|
|
45
|
+
imgsUrls?: string[];
|
|
46
|
+
|
|
47
|
+
@IsArray()
|
|
48
|
+
@IsString({ each: true })
|
|
49
|
+
assignedUsers?: string[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export class UpdatedPaymentDTO extends CreatePaymentDTO {
|
|
53
|
+
|
|
54
|
+
@IsString()
|
|
55
|
+
@IsNotEmpty()
|
|
56
|
+
id: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export class PaymentDTO extends UpdatedPaymentDTO {}
|
package/src/index.ts
CHANGED