shared-dto 1.0.7 → 1.0.9
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/Apartment.dto.d.ts +2 -2
- package/dist/Apartment.dto.d.ts.map +1 -1
- package/dist/UserDTO.dto.d.ts +7 -0
- package/dist/UserDTO.dto.d.ts.map +1 -1
- package/dist/UserDTO.dto.js +39 -1
- package/dist/UserDTO.dto.js.map +1 -1
- package/package.json +22 -17
- package/src/Apartment.dto.ts +2 -2
- package/src/UserDTO.dto.ts +25 -0
- package/tsconfig.json +3 -1
package/dist/Apartment.dto.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export declare class ApartmentDTO {
|
|
|
6
6
|
number: string;
|
|
7
7
|
selectedWashing: string;
|
|
8
8
|
selectedBit: string;
|
|
9
|
-
fromDate: string | undefined;
|
|
10
|
-
toDate: string | undefined;
|
|
9
|
+
fromDate: string | undefined | null;
|
|
10
|
+
toDate: string | undefined | null;
|
|
11
11
|
partnersNumber: string;
|
|
12
12
|
rent: string;
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Apartment.dto.d.ts","sourceRoot":"","sources":["../src/Apartment.dto.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAY;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Apartment.dto.d.ts","sourceRoot":"","sources":["../src/Apartment.dto.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAY;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAE,IAAI,CAAC;IACnC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
package/dist/UserDTO.dto.d.ts
CHANGED
|
@@ -6,4 +6,11 @@ export declare class UserDTO {
|
|
|
6
6
|
profileURL: string | null | undefined;
|
|
7
7
|
userType: string | null | undefined;
|
|
8
8
|
}
|
|
9
|
+
export declare class BaseUserDto {
|
|
10
|
+
uid: string;
|
|
11
|
+
name: string;
|
|
12
|
+
aprtmontID: string;
|
|
13
|
+
profileURL: string;
|
|
14
|
+
userType: string;
|
|
15
|
+
}
|
|
9
16
|
//# sourceMappingURL=UserDTO.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserDTO.dto.d.ts","sourceRoot":"","sources":["../src/UserDTO.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UserDTO.dto.d.ts","sourceRoot":"","sources":["../src/UserDTO.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,OAAO;IAChB,GAAG,EAAC,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC;AAED,qBAAc,WAAW;IAGrB,GAAG,EAAE,MAAM,CAAC;IAIZ,IAAI,EAAE,MAAM,CAAC;IAIb,UAAU,EAAE,MAAM,CAAC;IAInB,UAAU,EAAE,MAAM,CAAC;IAInB,QAAQ,EAAC,MAAM,CAAC;CAChB"}
|
package/dist/UserDTO.dto.js
CHANGED
|
@@ -1,7 +1,45 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserDTO = void 0;
|
|
12
|
+
exports.BaseUserDto = exports.UserDTO = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
4
14
|
class UserDTO {
|
|
5
15
|
}
|
|
6
16
|
exports.UserDTO = UserDTO;
|
|
17
|
+
class BaseUserDto {
|
|
18
|
+
}
|
|
19
|
+
exports.BaseUserDto = BaseUserDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], BaseUserDto.prototype, "uid", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], BaseUserDto.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], BaseUserDto.prototype, "aprtmontID", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], BaseUserDto.prototype, "profileURL", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], BaseUserDto.prototype, "userType", void 0);
|
|
7
45
|
//# sourceMappingURL=UserDTO.dto.js.map
|
package/dist/UserDTO.dto.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserDTO.dto.js","sourceRoot":"","sources":["../src/UserDTO.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UserDTO.dto.js","sourceRoot":"","sources":["../src/UserDTO.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAGvD,MAAa,OAAO;CAOnB;AAPD,0BAOC;AAED,MAAc,WAAW;CAoBrB;AApBJ,kCAoBI;AAjBA;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wCACD;AAIZ;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yCACA;AAIb;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACM;AAInB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACM;AAInB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6CACG"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "shared-dto",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"types": "dist/index.d.ts",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "tsc",
|
|
8
|
-
"version-bump": "npm version patch",
|
|
9
|
-
"publish-lib": "npm publish --access public",
|
|
10
|
-
"update-frontend": "cd ../front_end && npm install shared-dto@latest",
|
|
11
|
-
"update-backend": "cd ../back_end && npm install shared-dto@latest",
|
|
12
|
-
"update-all": "npm run build && npm run version-bump && npm run publish-lib && npm run update-frontend && npm run update-backend"
|
|
13
|
-
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"typescript": "^5.6.2"
|
|
16
|
-
}
|
|
17
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "shared-dto",
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc",
|
|
8
|
+
"version-bump": "npm version patch",
|
|
9
|
+
"publish-lib": "npm publish --access public",
|
|
10
|
+
"update-frontend": "cd ../front_end && npm install shared-dto@latest",
|
|
11
|
+
"update-backend": "cd ../back_end && npm install shared-dto@latest",
|
|
12
|
+
"update-all": "npm run build && npm run version-bump && npm run publish-lib && npm run update-frontend && npm run update-backend"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"typescript": "^5.6.2"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"class-transformer": "^0.5.1",
|
|
19
|
+
"class-validator": "^0.14.1",
|
|
20
|
+
"reflect-metadata": "^0.2.2"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/Apartment.dto.ts
CHANGED
|
@@ -6,8 +6,8 @@ export class ApartmentDTO {
|
|
|
6
6
|
number: string;
|
|
7
7
|
selectedWashing: string;
|
|
8
8
|
selectedBit: string;
|
|
9
|
-
fromDate: string | undefined;
|
|
10
|
-
toDate: string | undefined;
|
|
9
|
+
fromDate: string | undefined |null;
|
|
10
|
+
toDate: string | undefined | null;
|
|
11
11
|
partnersNumber: string;
|
|
12
12
|
rent: string;
|
|
13
13
|
}
|
package/src/UserDTO.dto.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IsNotEmpty, IsString } from "class-validator";
|
|
2
|
+
|
|
1
3
|
|
|
2
4
|
export class UserDTO {
|
|
3
5
|
uid:string;
|
|
@@ -7,3 +9,26 @@ export class UserDTO {
|
|
|
7
9
|
profileURL: string | null | undefined;
|
|
8
10
|
userType: string | null | undefined;
|
|
9
11
|
}
|
|
12
|
+
|
|
13
|
+
export class BaseUserDto {
|
|
14
|
+
@IsString()
|
|
15
|
+
@IsNotEmpty()
|
|
16
|
+
uid: string;
|
|
17
|
+
|
|
18
|
+
@IsString()
|
|
19
|
+
@IsNotEmpty()
|
|
20
|
+
name: string;
|
|
21
|
+
|
|
22
|
+
@IsString()
|
|
23
|
+
@IsNotEmpty()
|
|
24
|
+
aprtmontID: string;
|
|
25
|
+
|
|
26
|
+
@IsString()
|
|
27
|
+
@IsNotEmpty()
|
|
28
|
+
profileURL: string;
|
|
29
|
+
|
|
30
|
+
@IsString()
|
|
31
|
+
@IsNotEmpty()
|
|
32
|
+
userType:string;
|
|
33
|
+
}
|
|
34
|
+
|
package/tsconfig.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"moduleResolution": "node",
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
"strictPropertyInitialization": false,
|
|
6
6
|
/* Language and Environment */
|
|
7
7
|
"target": "es2016",
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"emitDecoratorMetadata": true,
|
|
8
10
|
"module": "commonjs",
|
|
9
11
|
"esModuleInterop": true,
|
|
10
12
|
"forceConsistentCasingInFileNames": true,
|