shared-dto 1.0.13 → 1.0.14
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/Duty.dto.d.ts +30 -0
- package/dist/Duty.dto.d.ts.map +1 -0
- package/dist/Duty.dto.js +107 -0
- package/dist/Duty.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/Duty.dto.ts +75 -0
- package/src/index.ts +2 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare enum DutyType {
|
|
2
|
+
CLEANING = "CLEANING",
|
|
3
|
+
DISHES = "DISHES",
|
|
4
|
+
SHOPPING = "SHOPPING",
|
|
5
|
+
DOG_WALKING = "DOG_WALKING",
|
|
6
|
+
OTHER = "OTHER"
|
|
7
|
+
}
|
|
8
|
+
export declare class CreateDutyDto {
|
|
9
|
+
type: DutyType;
|
|
10
|
+
description?: string;
|
|
11
|
+
isDone?: boolean;
|
|
12
|
+
userId: string;
|
|
13
|
+
apartmentId: string;
|
|
14
|
+
dutyDate?: Date;
|
|
15
|
+
}
|
|
16
|
+
export declare class UpdateDutyDto extends CreateDutyDto {
|
|
17
|
+
id: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class DutyDTO {
|
|
20
|
+
id: string;
|
|
21
|
+
type: DutyType;
|
|
22
|
+
description?: string;
|
|
23
|
+
isDone: boolean;
|
|
24
|
+
userId: string;
|
|
25
|
+
apartmentId: string;
|
|
26
|
+
dutyDate: Date;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
updatedAt: Date;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=Duty.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Duty.dto.d.ts","sourceRoot":"","sources":["../src/Duty.dto.ts"],"names":[],"mappings":"AAEA,oBAAY,QAAQ;IAChB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;CAChB;AAEH,qBAAa,aAAa;IAGtB,IAAI,EAAE,QAAQ,CAAC;IAIf,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,MAAM,CAAC,EAAE,OAAO,CAAC;IAIjB,MAAM,EAAE,MAAM,CAAC;IAIf,WAAW,EAAE,MAAM,CAAC;IAIpB,QAAQ,CAAC,EAAE,IAAI,CAAC;CACnB;AAED,qBAAa,aAAc,SAAQ,aAAa;IAG5C,EAAE,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,OAAO;IAGhB,EAAE,EAAE,MAAM,CAAC;IAIX,IAAI,EAAE,QAAQ,CAAC;IAIf,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,MAAM,EAAE,OAAO,CAAC;IAIhB,MAAM,EAAE,MAAM,CAAC;IAIf,WAAW,EAAE,MAAM,CAAC;IAGpB,QAAQ,EAAE,IAAI,CAAC;IAGf,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
package/dist/Duty.dto.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
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.DutyDTO = exports.UpdateDutyDto = exports.CreateDutyDto = exports.DutyType = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
var DutyType;
|
|
15
|
+
(function (DutyType) {
|
|
16
|
+
DutyType["CLEANING"] = "CLEANING";
|
|
17
|
+
DutyType["DISHES"] = "DISHES";
|
|
18
|
+
DutyType["SHOPPING"] = "SHOPPING";
|
|
19
|
+
DutyType["DOG_WALKING"] = "DOG_WALKING";
|
|
20
|
+
DutyType["OTHER"] = "OTHER";
|
|
21
|
+
})(DutyType || (exports.DutyType = DutyType = {}));
|
|
22
|
+
class CreateDutyDto {
|
|
23
|
+
}
|
|
24
|
+
exports.CreateDutyDto = CreateDutyDto;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsEnum)(DutyType),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], CreateDutyDto.prototype, "type", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], CreateDutyDto.prototype, "description", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsBoolean)(),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], CreateDutyDto.prototype, "isDone", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], CreateDutyDto.prototype, "userId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], CreateDutyDto.prototype, "apartmentId", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsDate)(),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
__metadata("design:type", Date)
|
|
54
|
+
], CreateDutyDto.prototype, "dutyDate", void 0);
|
|
55
|
+
class UpdateDutyDto extends CreateDutyDto {
|
|
56
|
+
}
|
|
57
|
+
exports.UpdateDutyDto = UpdateDutyDto;
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsString)(),
|
|
60
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], UpdateDutyDto.prototype, "id", void 0);
|
|
63
|
+
class DutyDTO {
|
|
64
|
+
}
|
|
65
|
+
exports.DutyDTO = DutyDTO;
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], DutyDTO.prototype, "id", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsEnum)(DutyType),
|
|
73
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], DutyDTO.prototype, "type", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.IsOptional)(),
|
|
78
|
+
(0, class_validator_1.IsString)(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], DutyDTO.prototype, "description", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsBoolean)(),
|
|
83
|
+
__metadata("design:type", Boolean)
|
|
84
|
+
], DutyDTO.prototype, "isDone", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_validator_1.IsString)(),
|
|
87
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], DutyDTO.prototype, "userId", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, class_validator_1.IsString)(),
|
|
92
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], DutyDTO.prototype, "apartmentId", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, class_validator_1.IsDate)(),
|
|
97
|
+
__metadata("design:type", Date)
|
|
98
|
+
], DutyDTO.prototype, "dutyDate", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_validator_1.IsDate)(),
|
|
101
|
+
__metadata("design:type", Date)
|
|
102
|
+
], DutyDTO.prototype, "createdAt", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.IsDate)(),
|
|
105
|
+
__metadata("design:type", Date)
|
|
106
|
+
], DutyDTO.prototype, "updatedAt", void 0);
|
|
107
|
+
//# sourceMappingURL=Duty.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Duty.dto.js","sourceRoot":"","sources":["../src/Duty.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6F;AAE7F,IAAY,QAMT;AANH,WAAY,QAAQ;IAChB,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;IACrB,uCAA2B,CAAA;IAC3B,2BAAe,CAAA;AACjB,CAAC,EANS,QAAQ,wBAAR,QAAQ,QAMjB;AAEH,MAAa,aAAa;CAwBzB;AAxBD,sCAwBC;AArBG;IAFC,IAAA,wBAAM,EAAC,QAAQ,CAAC;IAChB,IAAA,4BAAU,GAAE;;2CACE;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kDACU;AAIrB;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;6CACI;AAIjB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6CACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACO;AAIpB;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;8BACF,IAAI;+CAAC;AAGpB,MAAa,aAAc,SAAQ,aAAa;CAI/C;AAJD,sCAIC;AADG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yCACF;AAGf,MAAa,OAAO;CAgCjB;AAhCH,0BAgCG;AA7BC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mCACF;AAIX;IAFC,IAAA,wBAAM,EAAC,QAAQ,CAAC;IAChB,IAAA,4BAAU,GAAE;;qCACE;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4CACU;AAGrB;IADC,IAAA,2BAAS,GAAE;;uCACI;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uCACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4CACO;AAGpB;IADC,IAAA,wBAAM,GAAE;8BACC,IAAI;yCAAC;AAGf;IADC,IAAA,wBAAM,GAAE;8BACE,IAAI;0CAAC;AAGhB;IADC,IAAA,wBAAM,GAAE;8BACE,IAAI;0CAAC"}
|
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"}
|
|
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"}
|
package/dist/index.js
CHANGED
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./UserDTO.dto"), exports);
|
|
18
18
|
__exportStar(require("./Apartment.dto"), exports);
|
|
19
19
|
__exportStar(require("./Task.dto"), exports);
|
|
20
|
+
__exportStar(require("./Duty.dto"), exports);
|
|
20
21
|
//# 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"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA0B"}
|
package/package.json
CHANGED
package/src/Duty.dto.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { IsString ,IsNotEmpty ,IsEnum ,IsBoolean ,IsDate ,IsOptional} from "class-validator";
|
|
2
|
+
|
|
3
|
+
export enum DutyType {
|
|
4
|
+
CLEANING = 'CLEANING',
|
|
5
|
+
DISHES = 'DISHES',
|
|
6
|
+
SHOPPING = 'SHOPPING',
|
|
7
|
+
DOG_WALKING = 'DOG_WALKING',
|
|
8
|
+
OTHER = 'OTHER'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class CreateDutyDto {
|
|
12
|
+
@IsEnum(DutyType)
|
|
13
|
+
@IsNotEmpty()
|
|
14
|
+
type: DutyType;
|
|
15
|
+
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsString()
|
|
18
|
+
description?: string;
|
|
19
|
+
|
|
20
|
+
@IsBoolean()
|
|
21
|
+
@IsOptional()
|
|
22
|
+
isDone?: boolean;
|
|
23
|
+
|
|
24
|
+
@IsString()
|
|
25
|
+
@IsNotEmpty()
|
|
26
|
+
userId: string;
|
|
27
|
+
|
|
28
|
+
@IsString()
|
|
29
|
+
@IsNotEmpty()
|
|
30
|
+
apartmentId: string;
|
|
31
|
+
|
|
32
|
+
@IsDate()
|
|
33
|
+
@IsOptional()
|
|
34
|
+
dutyDate?: Date;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class UpdateDutyDto extends CreateDutyDto {
|
|
38
|
+
@IsString()
|
|
39
|
+
@IsNotEmpty()
|
|
40
|
+
id: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export class DutyDTO {
|
|
44
|
+
@IsString()
|
|
45
|
+
@IsNotEmpty()
|
|
46
|
+
id: string;
|
|
47
|
+
|
|
48
|
+
@IsEnum(DutyType)
|
|
49
|
+
@IsNotEmpty()
|
|
50
|
+
type: DutyType;
|
|
51
|
+
|
|
52
|
+
@IsOptional()
|
|
53
|
+
@IsString()
|
|
54
|
+
description?: string;
|
|
55
|
+
|
|
56
|
+
@IsBoolean()
|
|
57
|
+
isDone: boolean;
|
|
58
|
+
|
|
59
|
+
@IsString()
|
|
60
|
+
@IsNotEmpty()
|
|
61
|
+
userId: string;
|
|
62
|
+
|
|
63
|
+
@IsString()
|
|
64
|
+
@IsNotEmpty()
|
|
65
|
+
apartmentId: string;
|
|
66
|
+
|
|
67
|
+
@IsDate()
|
|
68
|
+
dutyDate: Date;
|
|
69
|
+
|
|
70
|
+
@IsDate()
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
|
|
73
|
+
@IsDate()
|
|
74
|
+
updatedAt: Date;
|
|
75
|
+
}
|
package/src/index.ts
CHANGED