@fiado/type-kit 1.0.21 → 1.0.23
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/bin/group/dtos/GroupCreateRequest.d.ts +9 -0
- package/bin/group/dtos/GroupCreateRequest.js +49 -0
- package/bin/group/dtos/GroupUpdateRequest.d.ts +8 -0
- package/bin/group/dtos/GroupUpdateRequest.js +44 -0
- package/bin/group/index.d.ts +3 -0
- package/bin/group/index.js +3 -0
- package/package.json +1 -1
- package/src/group/dtos/GroupCreateRequest.ts +33 -0
- package/src/group/dtos/GroupUpdateRequest.ts +27 -0
- package/src/group/index.ts +3 -0
|
@@ -0,0 +1,49 @@
|
|
|
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.GroupCreateRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const GroupStatus_1 = require("../enums/GroupStatus");
|
|
15
|
+
class GroupCreateRequest {
|
|
16
|
+
}
|
|
17
|
+
exports.GroupCreateRequest = GroupCreateRequest;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.Length)(3, 50),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], GroupCreateRequest.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.Length)(1, 50),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], GroupCreateRequest.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.Length)(1, 200),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], GroupCreateRequest.prototype, "description", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
38
|
+
(0, class_validator_1.IsEmail)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], GroupCreateRequest.prototype, "leader", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsEnum)(GroupStatus_1.GroupStatus),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], GroupCreateRequest.prototype, "status", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
(0, class_validator_1.Length)(3, 20),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], GroupCreateRequest.prototype, "codeToRefer", void 0);
|
|
@@ -0,0 +1,44 @@
|
|
|
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.GroupUpdateRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const GroupStatus_1 = require("../enums/GroupStatus");
|
|
15
|
+
class GroupUpdateRequest {
|
|
16
|
+
}
|
|
17
|
+
exports.GroupUpdateRequest = GroupUpdateRequest;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsOptional)(),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.Length)(1, 50),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], GroupUpdateRequest.prototype, "name", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.Length)(1, 200),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], GroupUpdateRequest.prototype, "description", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsEmail)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], GroupUpdateRequest.prototype, "leader", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsEnum)(GroupStatus_1.GroupStatus),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], GroupUpdateRequest.prototype, "status", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.Length)(3, 20),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], GroupUpdateRequest.prototype, "codeToRefer", void 0);
|
package/bin/group/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export * from './dtos/GroupResponse';
|
|
2
|
+
export * from './dtos/GroupCreateRequest';
|
|
3
|
+
export * from './dtos/GroupDirectoryRelationsResponse';
|
|
4
|
+
export * from './dtos/GroupUpdateRequest';
|
|
2
5
|
export * from './enums/GroupStatus';
|
|
3
6
|
export * from './enums/RelationType';
|
|
4
7
|
export * from './enums/RelationStatus';
|
package/bin/group/index.js
CHANGED
|
@@ -16,6 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
//dtos
|
|
18
18
|
__exportStar(require("./dtos/GroupResponse"), exports);
|
|
19
|
+
__exportStar(require("./dtos/GroupCreateRequest"), exports);
|
|
20
|
+
__exportStar(require("./dtos/GroupDirectoryRelationsResponse"), exports);
|
|
21
|
+
__exportStar(require("./dtos/GroupUpdateRequest"), exports);
|
|
19
22
|
//enums
|
|
20
23
|
__exportStar(require("./enums/GroupStatus"), exports);
|
|
21
24
|
__exportStar(require("./enums/RelationType"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IsEmail, IsEnum, IsNotEmpty, IsOptional, IsString, Length } from "class-validator";
|
|
2
|
+
import { GroupStatus } from "../enums/GroupStatus";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class GroupCreateRequest {
|
|
7
|
+
|
|
8
|
+
@IsNotEmpty()
|
|
9
|
+
@IsString()
|
|
10
|
+
@Length(3, 50)
|
|
11
|
+
id: string;
|
|
12
|
+
|
|
13
|
+
@IsNotEmpty()
|
|
14
|
+
@IsString()
|
|
15
|
+
@Length(1, 50)
|
|
16
|
+
name: string;
|
|
17
|
+
|
|
18
|
+
@IsNotEmpty()
|
|
19
|
+
@IsString()
|
|
20
|
+
@Length(1, 200)
|
|
21
|
+
description: string;
|
|
22
|
+
|
|
23
|
+
@IsNotEmpty()
|
|
24
|
+
@IsEmail()
|
|
25
|
+
leader: string
|
|
26
|
+
|
|
27
|
+
@IsEnum(GroupStatus)
|
|
28
|
+
status: GroupStatus
|
|
29
|
+
|
|
30
|
+
@IsOptional()
|
|
31
|
+
@Length(3, 20)
|
|
32
|
+
codeToRefer: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IsEmail, IsEnum, IsOptional, IsString, Length } from "class-validator";
|
|
2
|
+
import { GroupStatus } from "../enums/GroupStatus";
|
|
3
|
+
|
|
4
|
+
export class GroupUpdateRequest {
|
|
5
|
+
|
|
6
|
+
@IsOptional()
|
|
7
|
+
@IsString()
|
|
8
|
+
@Length(1, 50)
|
|
9
|
+
name: string;
|
|
10
|
+
|
|
11
|
+
@IsOptional()
|
|
12
|
+
@IsString()
|
|
13
|
+
@Length(1, 200)
|
|
14
|
+
description: string;
|
|
15
|
+
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsEmail()
|
|
18
|
+
leader: string
|
|
19
|
+
|
|
20
|
+
@IsOptional()
|
|
21
|
+
@IsEnum(GroupStatus)
|
|
22
|
+
status: GroupStatus
|
|
23
|
+
|
|
24
|
+
@IsOptional()
|
|
25
|
+
@Length(3, 20)
|
|
26
|
+
codeToRefer: string;
|
|
27
|
+
}
|