@umapi/contracts 1.0.32 → 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/dto/assign-role.dto.d.ts.map +1 -1
- package/dist/dto/assign-role.dto.js +9 -0
- package/dist/dto/assign-role.dto.js.map +1 -1
- package/dist/dto/create-role.dto.d.ts.map +1 -1
- package/dist/dto/create-role.dto.js +19 -0
- package/dist/dto/create-role.dto.js.map +1 -1
- package/dist/dto/role-response.dto.d.ts.map +1 -1
- package/dist/dto/role-response.dto.js +60 -0
- package/dist/dto/role-response.dto.js.map +1 -1
- package/dist/dto/update-role.dto.d.ts.map +1 -1
- package/dist/dto/update-role.dto.js +18 -0
- package/dist/dto/update-role.dto.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assign-role.dto.d.ts","sourceRoot":"","sources":["../../src/dto/assign-role.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assign-role.dto.d.ts","sourceRoot":"","sources":["../../src/dto/assign-role.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,aAAa;IAMtB,MAAM,EAAG,MAAM,CAAC;IAOhB,MAAM,EAAG,MAAM,CAAC;CACnB"}
|
|
@@ -11,14 +11,23 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AssignRoleDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
class AssignRoleDto {
|
|
15
16
|
}
|
|
16
17
|
exports.AssignRoleDto = AssignRoleDto;
|
|
17
18
|
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: 'ID пользователя',
|
|
21
|
+
example: '550e8400-e29b-41d4-a716-446655440000'
|
|
22
|
+
}),
|
|
18
23
|
(0, class_validator_1.IsUUID)(),
|
|
19
24
|
__metadata("design:type", String)
|
|
20
25
|
], AssignRoleDto.prototype, "userId", void 0);
|
|
21
26
|
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({
|
|
28
|
+
description: 'ID роли',
|
|
29
|
+
example: '550e8400-e29b-41d4-a716-446655440001'
|
|
30
|
+
}),
|
|
22
31
|
(0, class_validator_1.IsUUID)(),
|
|
23
32
|
__metadata("design:type", String)
|
|
24
33
|
], AssignRoleDto.prototype, "roleId", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assign-role.dto.js","sourceRoot":"","sources":["../../src/dto/assign-role.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"assign-role.dto.js","sourceRoot":"","sources":["../../src/dto/assign-role.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AACzC,6CAA8C;AAE9C,MAAa,aAAa;CAczB;AAdD,sCAcC;AARG;IALC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,iBAAiB;QAC9B,OAAO,EAAE,sCAAsC;KAClD,CAAC;IACD,IAAA,wBAAM,GAAE;;6CACO;AAOhB;IALC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,SAAS;QACtB,OAAO,EAAE,sCAAsC;KAClD,CAAC;IACD,IAAA,wBAAM,GAAE;;6CACO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-role.dto.d.ts","sourceRoot":"","sources":["../../src/dto/create-role.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-role.dto.d.ts","sourceRoot":"","sources":["../../src/dto/create-role.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,aAAa;IAMtB,IAAI,EAAG,MAAM,CAAC;IAOd,WAAW,EAAG,MAAM,CAAC;IAUrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IASvB,QAAQ,CAAC,EAAE,OAAO,CAAQ;CAC7B"}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CreateRoleDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
class CreateRoleDto {
|
|
15
16
|
constructor() {
|
|
16
17
|
this.isActive = true;
|
|
@@ -18,20 +19,38 @@ class CreateRoleDto {
|
|
|
18
19
|
}
|
|
19
20
|
exports.CreateRoleDto = CreateRoleDto;
|
|
20
21
|
__decorate([
|
|
22
|
+
(0, swagger_1.ApiProperty)({
|
|
23
|
+
description: 'Уникальное имя роли',
|
|
24
|
+
example: 'admin'
|
|
25
|
+
}),
|
|
21
26
|
(0, class_validator_1.IsString)(),
|
|
22
27
|
__metadata("design:type", String)
|
|
23
28
|
], CreateRoleDto.prototype, "name", void 0);
|
|
24
29
|
__decorate([
|
|
30
|
+
(0, swagger_1.ApiProperty)({
|
|
31
|
+
description: 'Описание роли',
|
|
32
|
+
example: 'Администратор системы'
|
|
33
|
+
}),
|
|
25
34
|
(0, class_validator_1.IsString)(),
|
|
26
35
|
__metadata("design:type", String)
|
|
27
36
|
], CreateRoleDto.prototype, "description", void 0);
|
|
28
37
|
__decorate([
|
|
38
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
39
|
+
description: 'Массив разрешений для роли',
|
|
40
|
+
example: ['user:create', 'user:read', 'user:update'],
|
|
41
|
+
type: [String]
|
|
42
|
+
}),
|
|
29
43
|
(0, class_validator_1.IsArray)(),
|
|
30
44
|
(0, class_validator_1.IsString)({ each: true }),
|
|
31
45
|
(0, class_validator_1.IsOptional)(),
|
|
32
46
|
__metadata("design:type", Array)
|
|
33
47
|
], CreateRoleDto.prototype, "permissions", void 0);
|
|
34
48
|
__decorate([
|
|
49
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
50
|
+
description: 'Статус активности роли',
|
|
51
|
+
example: true,
|
|
52
|
+
default: true
|
|
53
|
+
}),
|
|
35
54
|
(0, class_validator_1.IsBoolean)(),
|
|
36
55
|
(0, class_validator_1.IsOptional)(),
|
|
37
56
|
__metadata("design:type", Boolean)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-role.dto.js","sourceRoot":"","sources":["../../src/dto/create-role.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2E;
|
|
1
|
+
{"version":3,"file":"create-role.dto.js","sourceRoot":"","sources":["../../src/dto/create-role.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2E;AAC3E,6CAAmE;AAEnE,MAAa,aAAa;IAA1B;QAgCI,aAAQ,GAAa,IAAI,CAAC;IAC9B,CAAC;CAAA;AAjCD,sCAiCC;AA3BG;IALC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,OAAO;KACnB,CAAC;IACD,IAAA,0BAAQ,GAAE;;2CACG;AAOd;IALC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,uBAAuB;KACnC,CAAC;IACD,IAAA,0BAAQ,GAAE;;kDACU;AAUrB;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,aAAa,CAAC;QACpD,IAAI,EAAE,CAAC,MAAM,CAAC;KACjB,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;;kDACU;AASvB;IAPC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,wBAAwB;QACrC,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;KAChB,CAAC;IACD,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;+CACa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-response.dto.d.ts","sourceRoot":"","sources":["../../src/dto/role-response.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"role-response.dto.d.ts","sourceRoot":"","sources":["../../src/dto/role-response.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,eAAe;IAKxB,EAAE,EAAG,MAAM,CAAC;IAMZ,IAAI,EAAG,MAAM,CAAC;IAMd,WAAW,EAAG,MAAM,CAAC;IAOrB,WAAW,EAAG,MAAM,EAAE,CAAC;IAMvB,QAAQ,EAAG,OAAO,CAAC;IAMnB,SAAS,EAAG,IAAI,CAAC;IAMjB,SAAS,EAAG,IAAI,CAAC;CACpB"}
|
|
@@ -1,7 +1,67 @@
|
|
|
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
12
|
exports.RoleResponseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
4
14
|
class RoleResponseDto {
|
|
5
15
|
}
|
|
6
16
|
exports.RoleResponseDto = RoleResponseDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, swagger_1.ApiProperty)({
|
|
19
|
+
description: 'Уникальный идентификатор роли',
|
|
20
|
+
example: '550e8400-e29b-41d4-a716-446655440000'
|
|
21
|
+
}),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], RoleResponseDto.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiProperty)({
|
|
26
|
+
description: 'Уникальное имя роли',
|
|
27
|
+
example: 'admin'
|
|
28
|
+
}),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], RoleResponseDto.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({
|
|
33
|
+
description: 'Описание роли',
|
|
34
|
+
example: 'Администратор системы'
|
|
35
|
+
}),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], RoleResponseDto.prototype, "description", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
description: 'Массив разрешений для роли',
|
|
41
|
+
example: ['user:create', 'user:read', 'user:update'],
|
|
42
|
+
type: [String]
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", Array)
|
|
45
|
+
], RoleResponseDto.prototype, "permissions", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({
|
|
48
|
+
description: 'Статус активности роли',
|
|
49
|
+
example: true
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", Boolean)
|
|
52
|
+
], RoleResponseDto.prototype, "isActive", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, swagger_1.ApiProperty)({
|
|
55
|
+
description: 'Дата создания',
|
|
56
|
+
example: '2023-01-01T00:00:00.000Z'
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", Date)
|
|
59
|
+
], RoleResponseDto.prototype, "createdAt", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, swagger_1.ApiProperty)({
|
|
62
|
+
description: 'Дата последнего обновления',
|
|
63
|
+
example: '2023-01-01T00:00:00.000Z'
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Date)
|
|
66
|
+
], RoleResponseDto.prototype, "updatedAt", void 0);
|
|
7
67
|
//# sourceMappingURL=role-response.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-response.dto.js","sourceRoot":"","sources":["../../src/dto/role-response.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"role-response.dto.js","sourceRoot":"","sources":["../../src/dto/role-response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAE9C,MAAa,eAAe;CA2C3B;AA3CD,0CA2CC;AAtCG;IAJC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,+BAA+B;QAC5C,OAAO,EAAE,sCAAsC;KAClD,CAAC;;2CACU;AAMZ;IAJC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,OAAO;KACnB,CAAC;;6CACY;AAMd;IAJC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,uBAAuB;KACnC,CAAC;;oDACmB;AAOrB;IALC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,aAAa,CAAC;QACpD,IAAI,EAAE,CAAC,MAAM,CAAC;KACjB,CAAC;;oDACqB;AAMvB;IAJC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,wBAAwB;QACrC,OAAO,EAAE,IAAI;KAChB,CAAC;;iDACiB;AAMnB;IAJC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,0BAA0B;KACtC,CAAC;8BACU,IAAI;kDAAC;AAMjB;IAJC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE,0BAA0B;KACtC,CAAC;8BACU,IAAI;kDAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-role.dto.d.ts","sourceRoot":"","sources":["../../src/dto/update-role.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-role.dto.d.ts","sourceRoot":"","sources":["../../src/dto/update-role.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,aAAa;IAOtB,IAAI,CAAC,EAAE,MAAM,CAAC;IAQd,WAAW,CAAC,EAAE,MAAM,CAAC;IAUrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAQvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -11,26 +11,44 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UpdateRoleDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
class UpdateRoleDto {
|
|
15
16
|
}
|
|
16
17
|
exports.UpdateRoleDto = UpdateRoleDto;
|
|
17
18
|
__decorate([
|
|
19
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
20
|
+
description: 'Уникальное имя роли',
|
|
21
|
+
example: 'admin'
|
|
22
|
+
}),
|
|
18
23
|
(0, class_validator_1.IsString)(),
|
|
19
24
|
(0, class_validator_1.IsOptional)(),
|
|
20
25
|
__metadata("design:type", String)
|
|
21
26
|
], UpdateRoleDto.prototype, "name", void 0);
|
|
22
27
|
__decorate([
|
|
28
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
29
|
+
description: 'Описание роли',
|
|
30
|
+
example: 'Администратор системы'
|
|
31
|
+
}),
|
|
23
32
|
(0, class_validator_1.IsString)(),
|
|
24
33
|
(0, class_validator_1.IsOptional)(),
|
|
25
34
|
__metadata("design:type", String)
|
|
26
35
|
], UpdateRoleDto.prototype, "description", void 0);
|
|
27
36
|
__decorate([
|
|
37
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
38
|
+
description: 'Массив разрешений для роли',
|
|
39
|
+
example: ['user:create', 'user:read', 'user:update'],
|
|
40
|
+
type: [String]
|
|
41
|
+
}),
|
|
28
42
|
(0, class_validator_1.IsArray)(),
|
|
29
43
|
(0, class_validator_1.IsString)({ each: true }),
|
|
30
44
|
(0, class_validator_1.IsOptional)(),
|
|
31
45
|
__metadata("design:type", Array)
|
|
32
46
|
], UpdateRoleDto.prototype, "permissions", void 0);
|
|
33
47
|
__decorate([
|
|
48
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
49
|
+
description: 'Статус активности роли',
|
|
50
|
+
example: true
|
|
51
|
+
}),
|
|
34
52
|
(0, class_validator_1.IsBoolean)(),
|
|
35
53
|
(0, class_validator_1.IsOptional)(),
|
|
36
54
|
__metadata("design:type", Boolean)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-role.dto.js","sourceRoot":"","sources":["../../src/dto/update-role.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2E;
|
|
1
|
+
{"version":3,"file":"update-role.dto.js","sourceRoot":"","sources":["../../src/dto/update-role.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2E;AAC3E,6CAAsD;AAEtD,MAAa,aAAa;CAkCzB;AAlCD,sCAkCC;AA3BG;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,OAAO;KACnB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2CACC;AAQd;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,uBAAuB;KACnC,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACQ;AAUrB;IARC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,aAAa,CAAC;QACpD,IAAI,EAAE,CAAC,MAAM,CAAC;KACjB,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;;kDACU;AAQvB;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,wBAAwB;QACrC,OAAO,EAAE,IAAI;KAChB,CAAC;IACD,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;+CACM"}
|