@hedhog/admin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/admin.module.d.ts +3 -0
- package/dist/admin.module.d.ts.map +1 -0
- package/dist/admin.module.js +33 -0
- package/dist/admin.module.js.map +1 -0
- package/dist/auth/src/auth.controller.d.ts +21 -0
- package/dist/auth/src/auth.controller.d.ts.map +1 -0
- package/dist/auth/src/auth.controller.js +77 -0
- package/dist/auth/src/auth.controller.js.map +1 -0
- package/dist/auth/src/auth.module.d.ts +3 -0
- package/dist/auth/src/auth.module.d.ts.map +1 -0
- package/dist/auth/src/auth.module.js +50 -0
- package/dist/auth/src/auth.module.js.map +1 -0
- package/dist/auth/src/auth.service.d.ts +36 -0
- package/dist/auth/src/auth.service.d.ts.map +1 -0
- package/dist/auth/src/auth.service.js +162 -0
- package/dist/auth/src/auth.service.js.map +1 -0
- package/dist/auth/src/auth.service.spec.d.ts +2 -0
- package/dist/auth/src/auth.service.spec.d.ts.map +1 -0
- package/dist/auth/src/auth.service.spec.js +17 -0
- package/dist/auth/src/auth.service.spec.js.map +1 -0
- package/dist/auth/src/decorators/public.decorator.d.ts +3 -0
- package/dist/auth/src/decorators/public.decorator.d.ts.map +1 -0
- package/dist/auth/src/decorators/public.decorator.js +8 -0
- package/dist/auth/src/decorators/public.decorator.js.map +1 -0
- package/dist/auth/src/decorators/user.decorator.d.ts +2 -0
- package/dist/auth/src/decorators/user.decorator.d.ts.map +1 -0
- package/dist/auth/src/decorators/user.decorator.js +12 -0
- package/dist/auth/src/decorators/user.decorator.js.map +1 -0
- package/dist/auth/src/dto/forget.dto.d.ts +4 -0
- package/dist/auth/src/dto/forget.dto.d.ts.map +1 -0
- package/dist/auth/src/dto/forget.dto.js +21 -0
- package/dist/auth/src/dto/forget.dto.js.map +1 -0
- package/dist/auth/src/dto/login.dto.d.ts +5 -0
- package/dist/auth/src/dto/login.dto.d.ts.map +1 -0
- package/dist/auth/src/dto/login.dto.js +31 -0
- package/dist/auth/src/dto/login.dto.js.map +1 -0
- package/dist/auth/src/dto/otp.dto.d.ts +5 -0
- package/dist/auth/src/dto/otp.dto.d.ts.map +1 -0
- package/dist/auth/src/dto/otp.dto.js +27 -0
- package/dist/auth/src/dto/otp.dto.js.map +1 -0
- package/dist/auth/src/enums/multifactor-type.enum.d.ts +5 -0
- package/dist/auth/src/enums/multifactor-type.enum.d.ts.map +1 -0
- package/dist/auth/src/enums/multifactor-type.enum.js +9 -0
- package/dist/auth/src/enums/multifactor-type.enum.js.map +1 -0
- package/dist/auth/src/guards/auth.guard.d.ts +11 -0
- package/dist/auth/src/guards/auth.guard.d.ts.map +1 -0
- package/dist/auth/src/guards/auth.guard.js +56 -0
- package/dist/auth/src/guards/auth.guard.js.map +1 -0
- package/dist/auth/src/migrations/index.d.ts +6 -0
- package/dist/auth/src/migrations/index.d.ts.map +1 -0
- package/dist/auth/src/migrations/index.js +121 -0
- package/dist/auth/src/migrations/index.js.map +1 -0
- package/dist/auth/src/types/user.type.d.ts +9 -0
- package/dist/auth/src/types/user.type.d.ts.map +1 -0
- package/dist/auth/src/types/user.type.js +3 -0
- package/dist/auth/src/types/user.type.js.map +1 -0
- package/dist/file/src/dto/delete.dto.d.ts +4 -0
- package/dist/file/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/file/src/dto/delete.dto.js +23 -0
- package/dist/file/src/dto/delete.dto.js.map +1 -0
- package/dist/file/src/file.module.d.ts +3 -0
- package/dist/file/src/file.module.d.ts.map +1 -0
- package/dist/file/src/file.module.js +29 -0
- package/dist/file/src/file.module.js.map +1 -0
- package/dist/file/src/file.service.d.ts +12 -0
- package/dist/file/src/file.service.d.ts.map +1 -0
- package/dist/file/src/file.service.js +59 -0
- package/dist/file/src/file.service.js.map +1 -0
- package/dist/file/src/migrations/index.d.ts +6 -0
- package/dist/file/src/migrations/index.d.ts.map +1 -0
- package/dist/file/src/migrations/index.js +137 -0
- package/dist/file/src/migrations/index.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/mail/src/enums/mail-configuration-type.enum.d.ts +6 -0
- package/dist/mail/src/enums/mail-configuration-type.enum.d.ts.map +1 -0
- package/dist/mail/src/enums/mail-configuration-type.enum.js +10 -0
- package/dist/mail/src/enums/mail-configuration-type.enum.js.map +1 -0
- package/dist/mail/src/interfaces/index.d.ts +3 -0
- package/dist/mail/src/interfaces/index.d.ts.map +1 -0
- package/dist/mail/src/interfaces/index.js +19 -0
- package/dist/mail/src/interfaces/index.js.map +1 -0
- package/dist/mail/src/interfaces/mail-module-options.interface.d.ts +32 -0
- package/dist/mail/src/interfaces/mail-module-options.interface.d.ts.map +1 -0
- package/dist/mail/src/interfaces/mail-module-options.interface.js +3 -0
- package/dist/mail/src/interfaces/mail-module-options.interface.js.map +1 -0
- package/dist/mail/src/interfaces/mail-type.d.ts +13 -0
- package/dist/mail/src/interfaces/mail-type.d.ts.map +1 -0
- package/dist/mail/src/interfaces/mail-type.js +3 -0
- package/dist/mail/src/interfaces/mail-type.js.map +1 -0
- package/dist/mail/src/mail.consts.d.ts +17 -0
- package/dist/mail/src/mail.consts.d.ts.map +1 -0
- package/dist/mail/src/mail.consts.js +5 -0
- package/dist/mail/src/mail.consts.js.map +1 -0
- package/dist/mail/src/mail.module.d.ts +8 -0
- package/dist/mail/src/mail.module.d.ts.map +1 -0
- package/dist/mail/src/mail.module.js +51 -0
- package/dist/mail/src/mail.module.js.map +1 -0
- package/dist/mail/src/mail.service.d.ts +14 -0
- package/dist/mail/src/mail.service.d.ts.map +1 -0
- package/dist/mail/src/mail.service.js +281 -0
- package/dist/mail/src/mail.service.js.map +1 -0
- package/dist/mail/src/mail.service.spec.d.ts +2 -0
- package/dist/mail/src/mail.service.spec.d.ts.map +1 -0
- package/dist/mail/src/mail.service.spec.js +17 -0
- package/dist/mail/src/mail.service.spec.js.map +1 -0
- package/dist/menu/src/dto/create.dto.d.ts +8 -0
- package/dist/menu/src/dto/create.dto.d.ts.map +1 -0
- package/dist/menu/src/dto/create.dto.js +44 -0
- package/dist/menu/src/dto/create.dto.js.map +1 -0
- package/dist/menu/src/dto/delete.dto.d.ts +4 -0
- package/dist/menu/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/menu/src/dto/delete.dto.js +24 -0
- package/dist/menu/src/dto/delete.dto.js.map +1 -0
- package/dist/menu/src/dto/order.dto.d.ts +4 -0
- package/dist/menu/src/dto/order.dto.d.ts.map +1 -0
- package/dist/menu/src/dto/order.dto.js +23 -0
- package/dist/menu/src/dto/order.dto.js.map +1 -0
- package/dist/menu/src/dto/update.dto.d.ts +7 -0
- package/dist/menu/src/dto/update.dto.d.ts.map +1 -0
- package/dist/menu/src/dto/update.dto.js +37 -0
- package/dist/menu/src/dto/update.dto.js.map +1 -0
- package/dist/menu/src/menu.controller.d.ts +19 -0
- package/dist/menu/src/menu.controller.d.ts.map +1 -0
- package/dist/menu/src/menu.controller.js +117 -0
- package/dist/menu/src/menu.controller.js.map +1 -0
- package/dist/menu/src/menu.module.d.ts +3 -0
- package/dist/menu/src/menu.module.d.ts.map +1 -0
- package/dist/menu/src/menu.module.js +31 -0
- package/dist/menu/src/menu.module.js.map +1 -0
- package/dist/menu/src/menu.service.d.ts +23 -0
- package/dist/menu/src/menu.service.d.ts.map +1 -0
- package/dist/menu/src/menu.service.js +117 -0
- package/dist/menu/src/menu.service.js.map +1 -0
- package/dist/menu/src/migrations/index.d.ts +7 -0
- package/dist/menu/src/migrations/index.d.ts.map +1 -0
- package/dist/menu/src/migrations/index.js +101 -0
- package/dist/menu/src/migrations/index.js.map +1 -0
- package/dist/migrations/1726795702341-migrate.d.ts +6 -0
- package/dist/migrations/1726795702341-migrate.d.ts.map +1 -0
- package/dist/migrations/1726795702341-migrate.js +121 -0
- package/dist/migrations/1726795702341-migrate.js.map +1 -0
- package/dist/migrations/1726795734665-migrate.d.ts +6 -0
- package/dist/migrations/1726795734665-migrate.d.ts.map +1 -0
- package/dist/migrations/1726795734665-migrate.js +40 -0
- package/dist/migrations/1726795734665-migrate.js.map +1 -0
- package/dist/migrations/1726795818403-migrate.d.ts +7 -0
- package/dist/migrations/1726795818403-migrate.d.ts.map +1 -0
- package/dist/migrations/1726795818403-migrate.js +101 -0
- package/dist/migrations/1726795818403-migrate.js.map +1 -0
- package/dist/migrations/1726795828359-migrate.d.ts +6 -0
- package/dist/migrations/1726795828359-migrate.d.ts.map +1 -0
- package/dist/migrations/1726795828359-migrate.js +525 -0
- package/dist/migrations/1726795828359-migrate.js.map +1 -0
- package/dist/permission/src/decorators/permission.decorator.d.ts +3 -0
- package/dist/permission/src/decorators/permission.decorator.d.ts.map +1 -0
- package/dist/permission/src/decorators/permission.decorator.js +8 -0
- package/dist/permission/src/decorators/permission.decorator.js.map +1 -0
- package/dist/permission/src/dto/create.dto.d.ts +5 -0
- package/dist/permission/src/dto/create.dto.d.ts.map +1 -0
- package/dist/permission/src/dto/create.dto.js +27 -0
- package/dist/permission/src/dto/create.dto.js.map +1 -0
- package/dist/permission/src/dto/delete.dto.d.ts +4 -0
- package/dist/permission/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/permission/src/dto/delete.dto.js +23 -0
- package/dist/permission/src/dto/delete.dto.js.map +1 -0
- package/dist/permission/src/dto/update.dto.d.ts +5 -0
- package/dist/permission/src/dto/update.dto.d.ts.map +1 -0
- package/dist/permission/src/dto/update.dto.js +27 -0
- package/dist/permission/src/dto/update.dto.js.map +1 -0
- package/dist/permission/src/guards/permission.guard.d.ts +11 -0
- package/dist/permission/src/guards/permission.guard.d.ts.map +1 -0
- package/dist/permission/src/guards/permission.guard.js +99 -0
- package/dist/permission/src/guards/permission.guard.js.map +1 -0
- package/dist/permission/src/migrations/index.d.ts +6 -0
- package/dist/permission/src/migrations/index.d.ts.map +1 -0
- package/dist/permission/src/migrations/index.js +520 -0
- package/dist/permission/src/migrations/index.js.map +1 -0
- package/dist/permission/src/permission.controller.d.ts +14 -0
- package/dist/permission/src/permission.controller.d.ts.map +1 -0
- package/dist/permission/src/permission.controller.js +95 -0
- package/dist/permission/src/permission.controller.js.map +1 -0
- package/dist/permission/src/permission.module.d.ts +3 -0
- package/dist/permission/src/permission.module.d.ts.map +1 -0
- package/dist/permission/src/permission.module.js +39 -0
- package/dist/permission/src/permission.module.js.map +1 -0
- package/dist/permission/src/permission.service.d.ts +19 -0
- package/dist/permission/src/permission.service.d.ts.map +1 -0
- package/dist/permission/src/permission.service.js +73 -0
- package/dist/permission/src/permission.service.js.map +1 -0
- package/dist/permission/src/types/permission.types.d.ts +33 -0
- package/dist/permission/src/types/permission.types.d.ts.map +1 -0
- package/dist/permission/src/types/permission.types.js +3 -0
- package/dist/permission/src/types/permission.types.js.map +1 -0
- package/dist/screen/src/dto/create.dto.d.ts +7 -0
- package/dist/screen/src/dto/create.dto.d.ts.map +1 -0
- package/dist/screen/src/dto/create.dto.js +37 -0
- package/dist/screen/src/dto/create.dto.js.map +1 -0
- package/dist/screen/src/dto/delete.dto.d.ts +4 -0
- package/dist/screen/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/screen/src/dto/delete.dto.js +23 -0
- package/dist/screen/src/dto/delete.dto.js.map +1 -0
- package/dist/screen/src/dto/update.dto.d.ts +7 -0
- package/dist/screen/src/dto/update.dto.d.ts.map +1 -0
- package/dist/screen/src/dto/update.dto.js +37 -0
- package/dist/screen/src/dto/update.dto.js.map +1 -0
- package/dist/screen/src/migrations/index.d.ts +6 -0
- package/dist/screen/src/migrations/index.d.ts.map +1 -0
- package/dist/screen/src/migrations/index.js +40 -0
- package/dist/screen/src/migrations/index.js.map +1 -0
- package/dist/screen/src/screen.controller.d.ts +14 -0
- package/dist/screen/src/screen.controller.d.ts.map +1 -0
- package/dist/screen/src/screen.controller.js +94 -0
- package/dist/screen/src/screen.controller.js.map +1 -0
- package/dist/screen/src/screen.module.d.ts +3 -0
- package/dist/screen/src/screen.module.d.ts.map +1 -0
- package/dist/screen/src/screen.module.js +31 -0
- package/dist/screen/src/screen.module.js.map +1 -0
- package/dist/screen/src/screen.service.d.ts +19 -0
- package/dist/screen/src/screen.service.d.ts.map +1 -0
- package/dist/screen/src/screen.service.js +73 -0
- package/dist/screen/src/screen.service.js.map +1 -0
- package/dist/setting/src/dto/create.dto.d.ts +4 -0
- package/dist/setting/src/dto/create.dto.d.ts.map +1 -0
- package/dist/setting/src/dto/create.dto.js +22 -0
- package/dist/setting/src/dto/create.dto.js.map +1 -0
- package/dist/setting/src/dto/delete.dto.d.ts +4 -0
- package/dist/setting/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/setting/src/dto/delete.dto.js +23 -0
- package/dist/setting/src/dto/delete.dto.js.map +1 -0
- package/dist/setting/src/dto/update.dto.d.ts +4 -0
- package/dist/setting/src/dto/update.dto.d.ts.map +1 -0
- package/dist/setting/src/dto/update.dto.js +8 -0
- package/dist/setting/src/dto/update.dto.js.map +1 -0
- package/dist/setting/src/migrations/index.d.ts +6 -0
- package/dist/setting/src/migrations/index.d.ts.map +1 -0
- package/dist/setting/src/migrations/index.js +67 -0
- package/dist/setting/src/migrations/index.js.map +1 -0
- package/dist/setting/src/settings.controller.d.ts +14 -0
- package/dist/setting/src/settings.controller.d.ts.map +1 -0
- package/dist/setting/src/settings.controller.js +94 -0
- package/dist/setting/src/settings.controller.js.map +1 -0
- package/dist/setting/src/settings.module.d.ts +3 -0
- package/dist/setting/src/settings.module.d.ts.map +1 -0
- package/dist/setting/src/settings.module.js +31 -0
- package/dist/setting/src/settings.module.js.map +1 -0
- package/dist/setting/src/settings.service.d.ts +19 -0
- package/dist/setting/src/settings.service.d.ts.map +1 -0
- package/dist/setting/src/settings.service.js +70 -0
- package/dist/setting/src/settings.service.js.map +1 -0
- package/dist/user/src/constants/user.constants.d.ts +2 -0
- package/dist/user/src/constants/user.constants.d.ts.map +1 -0
- package/dist/user/src/constants/user.constants.js +5 -0
- package/dist/user/src/constants/user.constants.js.map +1 -0
- package/dist/user/src/dto/create.dto.d.ts +6 -0
- package/dist/user/src/dto/create.dto.d.ts.map +1 -0
- package/dist/user/src/dto/create.dto.js +37 -0
- package/dist/user/src/dto/create.dto.js.map +1 -0
- package/dist/user/src/dto/delete.dto.d.ts +4 -0
- package/dist/user/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/user/src/dto/delete.dto.js +23 -0
- package/dist/user/src/dto/delete.dto.js.map +1 -0
- package/dist/user/src/dto/update.dto.d.ts +8 -0
- package/dist/user/src/dto/update.dto.d.ts.map +1 -0
- package/dist/user/src/dto/update.dto.js +50 -0
- package/dist/user/src/dto/update.dto.js.map +1 -0
- package/dist/user/src/user.controller.d.ts +14 -0
- package/dist/user/src/user.controller.d.ts.map +1 -0
- package/dist/user/src/user.controller.js +94 -0
- package/dist/user/src/user.controller.js.map +1 -0
- package/dist/user/src/user.module.d.ts +3 -0
- package/dist/user/src/user.module.d.ts.map +1 -0
- package/dist/user/src/user.module.js +31 -0
- package/dist/user/src/user.module.js.map +1 -0
- package/dist/user/src/user.service.d.ts +20 -0
- package/dist/user/src/user.service.d.ts.map +1 -0
- package/dist/user/src/user.service.js +84 -0
- package/dist/user/src/user.service.js.map +1 -0
- package/dist/user/src/user.service.spec.d.ts +2 -0
- package/dist/user/src/user.service.spec.d.ts.map +1 -0
- package/dist/user/src/user.service.spec.js +17 -0
- package/dist/user/src/user.service.spec.js.map +1 -0
- package/package.json +29 -0
- package/src/mail/src/mail.template.ejs +1 -0
- package/src/migrations/1726795702341-migrate.ts +107 -0
- package/src/migrations/1726795734665-migrate.ts +40 -0
- package/src/migrations/1726795818403-migrate.ts +161 -0
- package/src/migrations/1726795828359-migrate.ts +573 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/permission/src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,yCAA0D;AAE1D,qCAMiB;AAEjB,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,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AC,CAAC;QACrC,MAAM,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;CACF;AA5iBD,0BA4iBC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { CreateDTO } from './dto/create.dto';
|
2
|
+
import { DeleteDTO } from './dto/delete.dto';
|
3
|
+
import { UpdateDTO } from './dto/update.dto';
|
4
|
+
import { PermissionService } from './permission.service';
|
5
|
+
export declare class PermissionController {
|
6
|
+
private readonly permissionService;
|
7
|
+
constructor(permissionService: PermissionService);
|
8
|
+
getPermissions(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
9
|
+
show(permissionId: number): Promise<any>;
|
10
|
+
create(data: CreateDTO): Promise<any>;
|
11
|
+
update(permissionId: number, data: UpdateDTO): Promise<any>;
|
12
|
+
delete(data: DeleteDTO): Promise<any>;
|
13
|
+
}
|
14
|
+
//# sourceMappingURL=permission.controller.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"permission.controller.d.ts","sourceRoot":"","sources":["../../../src/permission/src/permission.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,qBAEa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAKjD,cAAc,CAAe,gBAAgB,KAAA;IAM7C,IAAI,CAAsC,YAAY,EAAE,MAAM;IAMpE,MAAM,CAAS,IAAI,EAAE,SAAS;IAMxB,MAAM,CAC2B,YAAY,EAAE,MAAM,EACjD,IAAI,EAAE,SAAS;IAUnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
|
@@ -0,0 +1,95 @@
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
exports.PermissionController = void 0;
|
16
|
+
const __1 = require("../../");
|
17
|
+
const pagination_1 = require("@hedhog/pagination");
|
18
|
+
const common_1 = require("@nestjs/common");
|
19
|
+
const create_dto_1 = require("./dto/create.dto");
|
20
|
+
const delete_dto_1 = require("./dto/delete.dto");
|
21
|
+
const update_dto_1 = require("./dto/update.dto");
|
22
|
+
const permission_service_1 = require("./permission.service");
|
23
|
+
const permission_decorator_1 = require("./decorators/permission.decorator");
|
24
|
+
let PermissionController = class PermissionController {
|
25
|
+
constructor(permissionService) {
|
26
|
+
this.permissionService = permissionService;
|
27
|
+
}
|
28
|
+
async getPermissions(paginationParams) {
|
29
|
+
return this.permissionService.getPermissions(paginationParams);
|
30
|
+
}
|
31
|
+
async show(permissionId) {
|
32
|
+
return this.permissionService.get(permissionId);
|
33
|
+
}
|
34
|
+
create(data) {
|
35
|
+
return this.permissionService.create(data);
|
36
|
+
}
|
37
|
+
async update(permissionId, data) {
|
38
|
+
return this.permissionService.update({
|
39
|
+
id: permissionId,
|
40
|
+
data,
|
41
|
+
});
|
42
|
+
}
|
43
|
+
async delete(data) {
|
44
|
+
return this.permissionService.delete(data);
|
45
|
+
}
|
46
|
+
};
|
47
|
+
exports.PermissionController = PermissionController;
|
48
|
+
__decorate([
|
49
|
+
(0, common_1.UseGuards)(__1.AuthGuard),
|
50
|
+
(0, common_1.Get)(),
|
51
|
+
__param(0, (0, pagination_1.Pagination)()),
|
52
|
+
__metadata("design:type", Function),
|
53
|
+
__metadata("design:paramtypes", [Object]),
|
54
|
+
__metadata("design:returntype", Promise)
|
55
|
+
], PermissionController.prototype, "getPermissions", null);
|
56
|
+
__decorate([
|
57
|
+
(0, common_1.UseGuards)(__1.AuthGuard),
|
58
|
+
(0, common_1.Get)(':permissionId'),
|
59
|
+
__param(0, (0, common_1.Param)('PermissionId', common_1.ParseIntPipe)),
|
60
|
+
__metadata("design:type", Function),
|
61
|
+
__metadata("design:paramtypes", [Number]),
|
62
|
+
__metadata("design:returntype", Promise)
|
63
|
+
], PermissionController.prototype, "show", null);
|
64
|
+
__decorate([
|
65
|
+
(0, common_1.UseGuards)(__1.AuthGuard),
|
66
|
+
(0, common_1.Post)(),
|
67
|
+
__param(0, (0, common_1.Body)()),
|
68
|
+
__metadata("design:type", Function),
|
69
|
+
__metadata("design:paramtypes", [create_dto_1.CreateDTO]),
|
70
|
+
__metadata("design:returntype", void 0)
|
71
|
+
], PermissionController.prototype, "create", null);
|
72
|
+
__decorate([
|
73
|
+
(0, common_1.UseGuards)(__1.AuthGuard),
|
74
|
+
(0, common_1.Patch)(':permissionId'),
|
75
|
+
__param(0, (0, common_1.Param)('PermissionId', common_1.ParseIntPipe)),
|
76
|
+
__param(1, (0, common_1.Body)()),
|
77
|
+
__metadata("design:type", Function),
|
78
|
+
__metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
|
79
|
+
__metadata("design:returntype", Promise)
|
80
|
+
], PermissionController.prototype, "update", null);
|
81
|
+
__decorate([
|
82
|
+
(0, common_1.UseGuards)(__1.AuthGuard),
|
83
|
+
(0, common_1.Delete)(),
|
84
|
+
__param(0, (0, common_1.Body)()),
|
85
|
+
__metadata("design:type", Function),
|
86
|
+
__metadata("design:paramtypes", [delete_dto_1.DeleteDTO]),
|
87
|
+
__metadata("design:returntype", Promise)
|
88
|
+
], PermissionController.prototype, "delete", null);
|
89
|
+
exports.PermissionController = PermissionController = __decorate([
|
90
|
+
(0, permission_decorator_1.Permission)(),
|
91
|
+
(0, common_1.Controller)('permissions'),
|
92
|
+
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => permission_service_1.PermissionService))),
|
93
|
+
__metadata("design:paramtypes", [permission_service_1.PermissionService])
|
94
|
+
], PermissionController);
|
95
|
+
//# sourceMappingURL=permission.controller.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"permission.controller.js","sourceRoot":"","sources":["../../../src/permission/src/permission.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8BAAmC;AACnC,mDAAgD;AAChD,2CAYwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,6DAAyD;AACzD,4EAA+D;AAIxD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAIE,AAAN,KAAK,CAAC,cAAc,CAAe,gBAAgB;QACjD,OAAO,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;IACjE,CAAC;IAIK,AAAN,KAAK,CAAC,IAAI,CAAsC,YAAoB;QAClE,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAClD,CAAC;IAID,MAAM,CAAS,IAAe;QAC5B,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAIK,AAAN,KA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oBAAoB,CAyChC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"permission.module.d.ts","sourceRoot":"","sources":["../../../src/permission/src/permission.module.ts"],"names":[],"mappings":"AASA,qBAgBa,gBAAgB;CAAG"}
|
@@ -0,0 +1,39 @@
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
+
exports.PermissionModule = void 0;
|
10
|
+
const __1 = require("../../");
|
11
|
+
const pagination_1 = require("@hedhog/pagination");
|
12
|
+
const prisma_1 = require("@hedhog/prisma");
|
13
|
+
const common_1 = require("@nestjs/common");
|
14
|
+
const permission_service_1 = require("./permission.service");
|
15
|
+
const permission_controller_1 = require("./permission.controller");
|
16
|
+
const permission_guard_1 = require("./guards/permission.guard");
|
17
|
+
const core_1 = require("@nestjs/core");
|
18
|
+
let PermissionModule = class PermissionModule {
|
19
|
+
};
|
20
|
+
exports.PermissionModule = PermissionModule;
|
21
|
+
exports.PermissionModule = PermissionModule = __decorate([
|
22
|
+
(0, common_1.Module)({
|
23
|
+
imports: [
|
24
|
+
(0, common_1.forwardRef)(() => __1.AuthModule),
|
25
|
+
(0, common_1.forwardRef)(() => prisma_1.PrismaModule),
|
26
|
+
(0, common_1.forwardRef)(() => pagination_1.PaginationModule),
|
27
|
+
],
|
28
|
+
controllers: [permission_controller_1.PermissionController],
|
29
|
+
providers: [
|
30
|
+
permission_service_1.PermissionService,
|
31
|
+
{
|
32
|
+
provide: core_1.APP_GUARD,
|
33
|
+
useClass: permission_guard_1.PermissionGuard,
|
34
|
+
},
|
35
|
+
],
|
36
|
+
exports: [permission_service_1.PermissionService],
|
37
|
+
})
|
38
|
+
], PermissionModule);
|
39
|
+
//# sourceMappingURL=permission.module.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"permission.module.js","sourceRoot":"","sources":["../../../src/permission/src/permission.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,8BAAoC;AACpC,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,6DAAyD;AACzD,mEAA+D;AAC/D,gEAA4D;AAC5D,uCAAyC;AAkBlC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAhB5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,cAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;SACnC;QACD,WAAW,EAAE,CAAC,4CAAoB,CAAC;QACnC,SAAS,EAAE;YACT,sCAAiB;YACjB;gBACE,OAAO,EAAE,gBAAS;gBAClB,QAAQ,EAAE,kCAAe;aAC1B;SACF;QACD,OAAO,EAAE,CAAC,sCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { PaginationDTO, PaginationService } from '@hedhog/pagination';
|
2
|
+
import { PrismaService } from '@hedhog/prisma';
|
3
|
+
import { CreateDTO } from './dto/create.dto';
|
4
|
+
import { DeleteDTO } from './dto/delete.dto';
|
5
|
+
import { UpdateDTO } from './dto/update.dto';
|
6
|
+
export declare class PermissionService {
|
7
|
+
private readonly prismaService;
|
8
|
+
private readonly paginationService;
|
9
|
+
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
10
|
+
getPermissions(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
11
|
+
get(permissionId: number): Promise<any>;
|
12
|
+
create({ name, description }: CreateDTO): Promise<any>;
|
13
|
+
update({ id, data }: {
|
14
|
+
id: number;
|
15
|
+
data: UpdateDTO;
|
16
|
+
}): Promise<any>;
|
17
|
+
delete({ ids }: DeleteDTO): Promise<any>;
|
18
|
+
}
|
19
|
+
//# sourceMappingURL=permission.service.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"permission.service.d.ts","sourceRoot":"","sources":["../../../src/permission/src/permission.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,iBAAiB;IAG1B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,cAAc,CAAC,gBAAgB,EAAE,aAAa;IAmB9C,GAAG,CAAC,YAAY,EAAE,MAAM;IAMxB,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,SAAS;IASvC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IAOpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
|
@@ -0,0 +1,73 @@
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
exports.PermissionService = void 0;
|
16
|
+
const pagination_1 = require("@hedhog/pagination");
|
17
|
+
const prisma_1 = require("@hedhog/prisma");
|
18
|
+
const common_1 = require("@nestjs/common");
|
19
|
+
let PermissionService = class PermissionService {
|
20
|
+
constructor(prismaService, paginationService) {
|
21
|
+
this.prismaService = prismaService;
|
22
|
+
this.paginationService = paginationService;
|
23
|
+
}
|
24
|
+
async getPermissions(paginationParams) {
|
25
|
+
const fields = ['name', 'description'];
|
26
|
+
const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
|
27
|
+
return this.paginationService.paginate(this.prismaService.roles, paginationParams, {
|
28
|
+
where: {
|
29
|
+
OR,
|
30
|
+
},
|
31
|
+
});
|
32
|
+
}
|
33
|
+
async get(permissionId) {
|
34
|
+
return this.prismaService.roles.findUnique({
|
35
|
+
where: { id: permissionId },
|
36
|
+
});
|
37
|
+
}
|
38
|
+
async create({ name, description }) {
|
39
|
+
return this.prismaService.roles.create({
|
40
|
+
data: {
|
41
|
+
name,
|
42
|
+
description,
|
43
|
+
},
|
44
|
+
});
|
45
|
+
}
|
46
|
+
async update({ id, data }) {
|
47
|
+
return this.prismaService.roles.update({
|
48
|
+
where: { id },
|
49
|
+
data,
|
50
|
+
});
|
51
|
+
}
|
52
|
+
async delete({ ids }) {
|
53
|
+
if (ids == undefined || ids == null) {
|
54
|
+
throw new common_1.BadRequestException(`You must select at least one permission to delete.`);
|
55
|
+
}
|
56
|
+
return this.prismaService.roles.deleteMany({
|
57
|
+
where: {
|
58
|
+
id: {
|
59
|
+
in: ids,
|
60
|
+
},
|
61
|
+
},
|
62
|
+
});
|
63
|
+
}
|
64
|
+
};
|
65
|
+
exports.PermissionService = PermissionService;
|
66
|
+
exports.PermissionService = PermissionService = __decorate([
|
67
|
+
(0, common_1.Injectable)(),
|
68
|
+
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => prisma_1.PrismaService))),
|
69
|
+
__param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => pagination_1.PaginationService))),
|
70
|
+
__metadata("design:paramtypes", [prisma_1.PrismaService,
|
71
|
+
pagination_1.PaginationService])
|
72
|
+
], PermissionService);
|
73
|
+
//# sourceMappingURL=permission.service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"permission.service.js","sourceRoot":"","sources":["../../../src/permission/src/permission.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AAMjB,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,cAAc,CAAC,gBAA+B;QAClD,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAEvC,MAAM,EAAE,GAAU,IAAI,CAAC,aAAa,C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AU,EAAC,GAAG,EAAE,CAAC,sBAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAiB,CAAC,CAAC,CAAA;qCADZ,sBAAa;QAET,8BAAiB;GAL5C,iBAAiB,CAgE7B"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
export type PermissionType = {
|
2
|
+
id: number;
|
3
|
+
name: string;
|
4
|
+
slug: string;
|
5
|
+
description: string;
|
6
|
+
active: boolean;
|
7
|
+
created_at: string;
|
8
|
+
updated_at: string;
|
9
|
+
};
|
10
|
+
export type RoleType = {
|
11
|
+
id: number;
|
12
|
+
name: string;
|
13
|
+
slug: string;
|
14
|
+
description: string;
|
15
|
+
active: boolean;
|
16
|
+
created_at: string;
|
17
|
+
updated_at: string;
|
18
|
+
};
|
19
|
+
export type RolePermissionType = {
|
20
|
+
id: number;
|
21
|
+
role_id: number;
|
22
|
+
permission_id: number;
|
23
|
+
created_at: string;
|
24
|
+
updated_at: string;
|
25
|
+
};
|
26
|
+
export type RoleUserType = {
|
27
|
+
id: number;
|
28
|
+
role_id: number;
|
29
|
+
user_id: number;
|
30
|
+
created_at: string;
|
31
|
+
updated_at: string;
|
32
|
+
};
|
33
|
+
//# sourceMappingURL=permission.types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"permission.types.d.ts","sourceRoot":"","sources":["../../../../src/permission/src/types/permission.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"permission.types.js","sourceRoot":"","sources":["../../../../src/permission/src/types/permission.types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../../src/screen/src/dto/create.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAGpB,IAAI,EAAE,MAAM,CAAC;IAIb,IAAI,EAAE,MAAM,CAAC;IAIb,WAAW,EAAE,MAAM,CAAC;IAIpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
@@ -0,0 +1,37 @@
|
|
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.CreateDTO = void 0;
|
13
|
+
const class_validator_1 = require("class-validator");
|
14
|
+
class CreateDTO {
|
15
|
+
}
|
16
|
+
exports.CreateDTO = CreateDTO;
|
17
|
+
__decorate([
|
18
|
+
(0, class_validator_1.IsString)({ message: 'O nome deve ser uma string' }),
|
19
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'O nome é obrigatório.' }),
|
20
|
+
__metadata("design:type", String)
|
21
|
+
], CreateDTO.prototype, "name", void 0);
|
22
|
+
__decorate([
|
23
|
+
(0, class_validator_1.IsString)({ message: 'O slug deve ser uma string' }),
|
24
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'O slug é obrigatório.' }),
|
25
|
+
__metadata("design:type", String)
|
26
|
+
], CreateDTO.prototype, "slug", void 0);
|
27
|
+
__decorate([
|
28
|
+
(0, class_validator_1.IsString)({ message: 'A descrição deve ser uma string' }),
|
29
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'A descrição é obrigatória.' }),
|
30
|
+
__metadata("design:type", String)
|
31
|
+
], CreateDTO.prototype, "description", void 0);
|
32
|
+
__decorate([
|
33
|
+
(0, class_validator_1.IsString)({ message: 'O ícone deve ser uma string' }),
|
34
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'A descrição é obrigatória.' }),
|
35
|
+
__metadata("design:type", String)
|
36
|
+
], CreateDTO.prototype, "icon", void 0);
|
37
|
+
//# sourceMappingURL=create.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../../src/screen/src/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmE;AAEnE,MAAa,SAAS;CAgBrB;AAhBD,8BAgBC;AAbC;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACnD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;;uCACpC;AAIb;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACnD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;;uCACpC;AAIb;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC;IACxD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;;8CAClC;AAIpB;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;IACpD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;;uCACxC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../../src/screen/src/dto/delete.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAIpB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
|
@@ -0,0 +1,23 @@
|
|
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.DeleteDTO = void 0;
|
13
|
+
const class_validator_1 = require("class-validator");
|
14
|
+
class DeleteDTO {
|
15
|
+
}
|
16
|
+
exports.DeleteDTO = DeleteDTO;
|
17
|
+
__decorate([
|
18
|
+
(0, class_validator_1.IsArray)(),
|
19
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
20
|
+
(0, class_validator_1.IsInt)({ each: true }),
|
21
|
+
__metadata("design:type", Array)
|
22
|
+
], DeleteDTO.prototype, "ids", void 0);
|
23
|
+
//# sourceMappingURL=delete.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"delete.dto.js","sourceRoot":"","sources":["../../../../src/screen/src/dto/delete.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,MAAa,SAAS;CAKrB;AALD,8BAKC;AADC;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,8BAAY,EAAC,CAAC,CAAC;IACf,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sCACR"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../../src/screen/src/dto/update.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAGpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
@@ -0,0 +1,37 @@
|
|
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.UpdateDTO = void 0;
|
13
|
+
const class_validator_1 = require("class-validator");
|
14
|
+
class UpdateDTO {
|
15
|
+
}
|
16
|
+
exports.UpdateDTO = UpdateDTO;
|
17
|
+
__decorate([
|
18
|
+
(0, class_validator_1.IsOptional)(),
|
19
|
+
(0, class_validator_1.IsString)({ message: 'O nome deve ser uma string' }),
|
20
|
+
__metadata("design:type", String)
|
21
|
+
], UpdateDTO.prototype, "name", void 0);
|
22
|
+
__decorate([
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
24
|
+
(0, class_validator_1.IsString)({ message: 'O slug deve ser uma string' }),
|
25
|
+
__metadata("design:type", String)
|
26
|
+
], UpdateDTO.prototype, "slug", void 0);
|
27
|
+
__decorate([
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
29
|
+
(0, class_validator_1.IsString)({ message: 'A descrição deve ser uma string' }),
|
30
|
+
__metadata("design:type", String)
|
31
|
+
], UpdateDTO.prototype, "description", void 0);
|
32
|
+
__decorate([
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
34
|
+
(0, class_validator_1.IsString)({ message: 'O ícone deve ser uma string' }),
|
35
|
+
__metadata("design:type", String)
|
36
|
+
], UpdateDTO.prototype, "icon", void 0);
|
37
|
+
//# sourceMappingURL=update.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../../src/screen/src/dto/update.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,SAAS;CAgBrB;AAhBD,8BAgBC;AAbC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;;uCACtC;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;;uCACtC;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC;;8CACpC;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;;uCACvC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screen/src/migrations/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAS,MAAM,SAAS,CAAC;AAEjE,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IA+B3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAGpC"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
const utils_1 = require("@hedhog/utils");
|
5
|
+
const typeorm_1 = require("typeorm");
|
6
|
+
class Migrate {
|
7
|
+
async up(queryRunner) {
|
8
|
+
await queryRunner.createTable(new typeorm_1.Table({
|
9
|
+
name: 'screens',
|
10
|
+
columns: [
|
11
|
+
(0, utils_1.idColumn)(),
|
12
|
+
{
|
13
|
+
name: 'name',
|
14
|
+
type: 'varchar',
|
15
|
+
},
|
16
|
+
{
|
17
|
+
name: 'slug',
|
18
|
+
type: 'varchar',
|
19
|
+
isUnique: true,
|
20
|
+
},
|
21
|
+
{
|
22
|
+
name: 'description',
|
23
|
+
type: 'varchar',
|
24
|
+
},
|
25
|
+
{
|
26
|
+
name: 'icon',
|
27
|
+
type: 'varchar',
|
28
|
+
isNullable: true,
|
29
|
+
},
|
30
|
+
(0, utils_1.timestampColumn)(),
|
31
|
+
(0, utils_1.timestampColumn)('updated_at'),
|
32
|
+
],
|
33
|
+
}));
|
34
|
+
}
|
35
|
+
async down(queryRunner) {
|
36
|
+
await queryRunner.dropTable('screens');
|
37
|
+
}
|
38
|
+
}
|
39
|
+
exports.Migrate = Migrate;
|
40
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/screen/src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,yCAA0D;AAE1D,qCAAiE;AAEjE,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,SAAS;YACf,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,IAAI;iBACjB;gBACD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;CACF;AAnCD,0BAmCC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { CreateDTO } from './dto/create.dto';
|
2
|
+
import { DeleteDTO } from './dto/delete.dto';
|
3
|
+
import { UpdateDTO } from './dto/update.dto';
|
4
|
+
import { ScreenService } from './screen.service';
|
5
|
+
export declare class ScreenController {
|
6
|
+
private readonly screenService;
|
7
|
+
constructor(screenService: ScreenService);
|
8
|
+
getScreens(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
9
|
+
show(screenId: number): Promise<any>;
|
10
|
+
create(data: CreateDTO): Promise<any>;
|
11
|
+
update(screenId: number, data: UpdateDTO): Promise<any>;
|
12
|
+
delete(data: DeleteDTO): Promise<any>;
|
13
|
+
}
|
14
|
+
//# sourceMappingURL=screen.controller.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"screen.controller.d.ts","sourceRoot":"","sources":["../../../src/screen/src/screen.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAEa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAKzC,UAAU,CAAe,gBAAgB,KAAA;IAMzC,IAAI,CAAkC,QAAQ,EAAE,MAAM;IAM5D,MAAM,CAAS,IAAI,EAAE,SAAS;IAMxB,MAAM,CACuB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;IAUnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
|