@hedhog/admin 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -0
- package/dist/index.js +12 -16
- package/package.json +32 -29
- package/src/migrations/migrate-01.ts +107 -0
- package/src/migrations/migrate-02.ts +40 -0
- package/src/migrations/{1726795818403-migrate.ts → migrate-03.ts} +49 -49
- package/src/migrations/{1726795828359-migrate.ts → migrate-04.ts} +1 -1
- package/dist/admin.module.d.ts +0 -3
- package/dist/admin.module.d.ts.map +0 -1
- package/dist/admin.module.js +0 -30
- package/dist/admin.module.js.map +0 -1
- package/dist/auth/src/auth.controller.d.ts +0 -21
- package/dist/auth/src/auth.controller.d.ts.map +0 -1
- package/dist/auth/src/auth.controller.js +0 -77
- package/dist/auth/src/auth.controller.js.map +0 -1
- package/dist/auth/src/auth.module.d.ts +0 -3
- package/dist/auth/src/auth.module.d.ts.map +0 -1
- package/dist/auth/src/auth.module.js +0 -50
- package/dist/auth/src/auth.module.js.map +0 -1
- package/dist/auth/src/auth.service.d.ts +0 -36
- package/dist/auth/src/auth.service.d.ts.map +0 -1
- package/dist/auth/src/auth.service.js +0 -162
- package/dist/auth/src/auth.service.js.map +0 -1
- package/dist/auth/src/auth.service.spec.d.ts +0 -2
- package/dist/auth/src/auth.service.spec.d.ts.map +0 -1
- package/dist/auth/src/auth.service.spec.js +0 -17
- package/dist/auth/src/auth.service.spec.js.map +0 -1
- package/dist/auth/src/decorators/public.decorator.d.ts +0 -3
- package/dist/auth/src/decorators/public.decorator.d.ts.map +0 -1
- package/dist/auth/src/decorators/public.decorator.js +0 -8
- package/dist/auth/src/decorators/public.decorator.js.map +0 -1
- package/dist/auth/src/decorators/user.decorator.d.ts +0 -2
- package/dist/auth/src/decorators/user.decorator.d.ts.map +0 -1
- package/dist/auth/src/decorators/user.decorator.js +0 -12
- package/dist/auth/src/decorators/user.decorator.js.map +0 -1
- package/dist/auth/src/dto/forget.dto.d.ts +0 -4
- package/dist/auth/src/dto/forget.dto.d.ts.map +0 -1
- package/dist/auth/src/dto/forget.dto.js +0 -21
- package/dist/auth/src/dto/forget.dto.js.map +0 -1
- package/dist/auth/src/dto/login.dto.d.ts +0 -5
- package/dist/auth/src/dto/login.dto.d.ts.map +0 -1
- package/dist/auth/src/dto/login.dto.js +0 -31
- package/dist/auth/src/dto/login.dto.js.map +0 -1
- package/dist/auth/src/dto/otp.dto.d.ts +0 -5
- package/dist/auth/src/dto/otp.dto.d.ts.map +0 -1
- package/dist/auth/src/dto/otp.dto.js +0 -27
- package/dist/auth/src/dto/otp.dto.js.map +0 -1
- package/dist/auth/src/enums/multifactor-type.enum.d.ts +0 -5
- package/dist/auth/src/enums/multifactor-type.enum.d.ts.map +0 -1
- package/dist/auth/src/enums/multifactor-type.enum.js +0 -9
- package/dist/auth/src/enums/multifactor-type.enum.js.map +0 -1
- package/dist/auth/src/guards/auth.guard.d.ts +0 -11
- package/dist/auth/src/guards/auth.guard.d.ts.map +0 -1
- package/dist/auth/src/guards/auth.guard.js +0 -56
- package/dist/auth/src/guards/auth.guard.js.map +0 -1
- package/dist/auth/src/migrations/index.d.ts +0 -6
- package/dist/auth/src/migrations/index.d.ts.map +0 -1
- package/dist/auth/src/migrations/index.js +0 -121
- package/dist/auth/src/migrations/index.js.map +0 -1
- package/dist/auth/src/types/user.type.d.ts +0 -9
- package/dist/auth/src/types/user.type.d.ts.map +0 -1
- package/dist/auth/src/types/user.type.js +0 -3
- package/dist/auth/src/types/user.type.js.map +0 -1
- package/dist/file/src/dto/delete.dto.d.ts +0 -4
- package/dist/file/src/dto/delete.dto.d.ts.map +0 -1
- package/dist/file/src/dto/delete.dto.js +0 -23
- package/dist/file/src/dto/delete.dto.js.map +0 -1
- package/dist/file/src/file.module.d.ts +0 -3
- package/dist/file/src/file.module.d.ts.map +0 -1
- package/dist/file/src/file.module.js +0 -29
- package/dist/file/src/file.module.js.map +0 -1
- package/dist/file/src/file.service.d.ts +0 -12
- package/dist/file/src/file.service.d.ts.map +0 -1
- package/dist/file/src/file.service.js +0 -59
- package/dist/file/src/file.service.js.map +0 -1
- package/dist/file/src/migrations/index.d.ts +0 -6
- package/dist/file/src/migrations/index.d.ts.map +0 -1
- package/dist/file/src/migrations/index.js +0 -137
- package/dist/file/src/migrations/index.js.map +0 -1
- package/dist/index.d.ts +0 -18
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mail/src/enums/mail-configuration-type.enum.d.ts +0 -6
- package/dist/mail/src/enums/mail-configuration-type.enum.d.ts.map +0 -1
- package/dist/mail/src/enums/mail-configuration-type.enum.js +0 -10
- package/dist/mail/src/enums/mail-configuration-type.enum.js.map +0 -1
- package/dist/mail/src/interfaces/index.d.ts +0 -3
- package/dist/mail/src/interfaces/index.d.ts.map +0 -1
- package/dist/mail/src/interfaces/index.js +0 -19
- package/dist/mail/src/interfaces/index.js.map +0 -1
- package/dist/mail/src/interfaces/mail-module-options.interface.d.ts +0 -32
- package/dist/mail/src/interfaces/mail-module-options.interface.d.ts.map +0 -1
- package/dist/mail/src/interfaces/mail-module-options.interface.js +0 -3
- package/dist/mail/src/interfaces/mail-module-options.interface.js.map +0 -1
- package/dist/mail/src/interfaces/mail-type.d.ts +0 -13
- package/dist/mail/src/interfaces/mail-type.d.ts.map +0 -1
- package/dist/mail/src/interfaces/mail-type.js +0 -3
- package/dist/mail/src/interfaces/mail-type.js.map +0 -1
- package/dist/mail/src/mail.consts.d.ts +0 -17
- package/dist/mail/src/mail.consts.d.ts.map +0 -1
- package/dist/mail/src/mail.consts.js +0 -5
- package/dist/mail/src/mail.consts.js.map +0 -1
- package/dist/mail/src/mail.module.d.ts +0 -8
- package/dist/mail/src/mail.module.d.ts.map +0 -1
- package/dist/mail/src/mail.module.js +0 -51
- package/dist/mail/src/mail.module.js.map +0 -1
- package/dist/mail/src/mail.service.d.ts +0 -14
- package/dist/mail/src/mail.service.d.ts.map +0 -1
- package/dist/mail/src/mail.service.js +0 -281
- package/dist/mail/src/mail.service.js.map +0 -1
- package/dist/mail/src/mail.service.spec.d.ts +0 -2
- package/dist/mail/src/mail.service.spec.d.ts.map +0 -1
- package/dist/mail/src/mail.service.spec.js +0 -17
- package/dist/mail/src/mail.service.spec.js.map +0 -1
- package/dist/menu/src/dto/create.dto.d.ts +0 -8
- package/dist/menu/src/dto/create.dto.d.ts.map +0 -1
- package/dist/menu/src/dto/create.dto.js +0 -44
- package/dist/menu/src/dto/create.dto.js.map +0 -1
- package/dist/menu/src/dto/delete.dto.d.ts +0 -4
- package/dist/menu/src/dto/delete.dto.d.ts.map +0 -1
- package/dist/menu/src/dto/delete.dto.js +0 -24
- package/dist/menu/src/dto/delete.dto.js.map +0 -1
- package/dist/menu/src/dto/order.dto.d.ts +0 -4
- package/dist/menu/src/dto/order.dto.d.ts.map +0 -1
- package/dist/menu/src/dto/order.dto.js +0 -23
- package/dist/menu/src/dto/order.dto.js.map +0 -1
- package/dist/menu/src/dto/update.dto.d.ts +0 -7
- package/dist/menu/src/dto/update.dto.d.ts.map +0 -1
- package/dist/menu/src/dto/update.dto.js +0 -37
- package/dist/menu/src/dto/update.dto.js.map +0 -1
- package/dist/menu/src/menu.controller.d.ts +0 -19
- package/dist/menu/src/menu.controller.d.ts.map +0 -1
- package/dist/menu/src/menu.controller.js +0 -117
- package/dist/menu/src/menu.controller.js.map +0 -1
- package/dist/menu/src/menu.module.d.ts +0 -3
- package/dist/menu/src/menu.module.d.ts.map +0 -1
- package/dist/menu/src/menu.module.js +0 -31
- package/dist/menu/src/menu.module.js.map +0 -1
- package/dist/menu/src/menu.service.d.ts +0 -23
- package/dist/menu/src/menu.service.d.ts.map +0 -1
- package/dist/menu/src/menu.service.js +0 -117
- package/dist/menu/src/menu.service.js.map +0 -1
- package/dist/menu/src/migrations/index.d.ts +0 -7
- package/dist/menu/src/migrations/index.d.ts.map +0 -1
- package/dist/menu/src/migrations/index.js +0 -101
- package/dist/menu/src/migrations/index.js.map +0 -1
- package/dist/migrations/1726795702341-migrate.d.ts +0 -6
- package/dist/migrations/1726795702341-migrate.d.ts.map +0 -1
- package/dist/migrations/1726795702341-migrate.js +0 -121
- package/dist/migrations/1726795702341-migrate.js.map +0 -1
- package/dist/migrations/1726795734665-migrate.d.ts +0 -6
- package/dist/migrations/1726795734665-migrate.d.ts.map +0 -1
- package/dist/migrations/1726795734665-migrate.js +0 -40
- package/dist/migrations/1726795734665-migrate.js.map +0 -1
- package/dist/migrations/1726795818403-migrate.d.ts +0 -7
- package/dist/migrations/1726795818403-migrate.d.ts.map +0 -1
- package/dist/migrations/1726795818403-migrate.js +0 -101
- package/dist/migrations/1726795818403-migrate.js.map +0 -1
- package/dist/migrations/1726795828359-migrate.d.ts +0 -6
- package/dist/migrations/1726795828359-migrate.d.ts.map +0 -1
- package/dist/migrations/1726795828359-migrate.js +0 -525
- package/dist/migrations/1726795828359-migrate.js.map +0 -1
- package/dist/permission/src/decorators/permission.decorator.d.ts +0 -3
- package/dist/permission/src/decorators/permission.decorator.d.ts.map +0 -1
- package/dist/permission/src/decorators/permission.decorator.js +0 -8
- package/dist/permission/src/decorators/permission.decorator.js.map +0 -1
- package/dist/permission/src/dto/create.dto.d.ts +0 -5
- package/dist/permission/src/dto/create.dto.d.ts.map +0 -1
- package/dist/permission/src/dto/create.dto.js +0 -27
- package/dist/permission/src/dto/create.dto.js.map +0 -1
- package/dist/permission/src/dto/delete.dto.d.ts +0 -4
- package/dist/permission/src/dto/delete.dto.d.ts.map +0 -1
- package/dist/permission/src/dto/delete.dto.js +0 -23
- package/dist/permission/src/dto/delete.dto.js.map +0 -1
- package/dist/permission/src/dto/update.dto.d.ts +0 -5
- package/dist/permission/src/dto/update.dto.d.ts.map +0 -1
- package/dist/permission/src/dto/update.dto.js +0 -27
- package/dist/permission/src/dto/update.dto.js.map +0 -1
- package/dist/permission/src/guards/permission.guard.d.ts +0 -11
- package/dist/permission/src/guards/permission.guard.d.ts.map +0 -1
- package/dist/permission/src/guards/permission.guard.js +0 -99
- package/dist/permission/src/guards/permission.guard.js.map +0 -1
- package/dist/permission/src/migrations/index.d.ts +0 -6
- package/dist/permission/src/migrations/index.d.ts.map +0 -1
- package/dist/permission/src/migrations/index.js +0 -520
- package/dist/permission/src/migrations/index.js.map +0 -1
- package/dist/permission/src/permission.controller.d.ts +0 -14
- package/dist/permission/src/permission.controller.d.ts.map +0 -1
- package/dist/permission/src/permission.controller.js +0 -95
- package/dist/permission/src/permission.controller.js.map +0 -1
- package/dist/permission/src/permission.module.d.ts +0 -3
- package/dist/permission/src/permission.module.d.ts.map +0 -1
- package/dist/permission/src/permission.module.js +0 -39
- package/dist/permission/src/permission.module.js.map +0 -1
- package/dist/permission/src/permission.service.d.ts +0 -19
- package/dist/permission/src/permission.service.d.ts.map +0 -1
- package/dist/permission/src/permission.service.js +0 -73
- package/dist/permission/src/permission.service.js.map +0 -1
- package/dist/permission/src/types/permission.types.d.ts +0 -33
- package/dist/permission/src/types/permission.types.d.ts.map +0 -1
- package/dist/permission/src/types/permission.types.js +0 -3
- package/dist/permission/src/types/permission.types.js.map +0 -1
- package/dist/screen/src/dto/create.dto.d.ts +0 -7
- package/dist/screen/src/dto/create.dto.d.ts.map +0 -1
- package/dist/screen/src/dto/create.dto.js +0 -37
- package/dist/screen/src/dto/create.dto.js.map +0 -1
- package/dist/screen/src/dto/delete.dto.d.ts +0 -4
- package/dist/screen/src/dto/delete.dto.d.ts.map +0 -1
- package/dist/screen/src/dto/delete.dto.js +0 -23
- package/dist/screen/src/dto/delete.dto.js.map +0 -1
- package/dist/screen/src/dto/update.dto.d.ts +0 -7
- package/dist/screen/src/dto/update.dto.d.ts.map +0 -1
- package/dist/screen/src/dto/update.dto.js +0 -37
- package/dist/screen/src/dto/update.dto.js.map +0 -1
- package/dist/screen/src/migrations/index.d.ts +0 -6
- package/dist/screen/src/migrations/index.d.ts.map +0 -1
- package/dist/screen/src/migrations/index.js +0 -40
- package/dist/screen/src/migrations/index.js.map +0 -1
- package/dist/screen/src/screen.controller.d.ts +0 -14
- package/dist/screen/src/screen.controller.d.ts.map +0 -1
- package/dist/screen/src/screen.controller.js +0 -94
- package/dist/screen/src/screen.controller.js.map +0 -1
- package/dist/screen/src/screen.module.d.ts +0 -3
- package/dist/screen/src/screen.module.d.ts.map +0 -1
- package/dist/screen/src/screen.module.js +0 -31
- package/dist/screen/src/screen.module.js.map +0 -1
- package/dist/screen/src/screen.service.d.ts +0 -19
- package/dist/screen/src/screen.service.d.ts.map +0 -1
- package/dist/screen/src/screen.service.js +0 -73
- package/dist/screen/src/screen.service.js.map +0 -1
- package/dist/setting/src/dto/create.dto.d.ts +0 -4
- package/dist/setting/src/dto/create.dto.d.ts.map +0 -1
- package/dist/setting/src/dto/create.dto.js +0 -22
- package/dist/setting/src/dto/create.dto.js.map +0 -1
- package/dist/setting/src/dto/delete.dto.d.ts +0 -4
- package/dist/setting/src/dto/delete.dto.d.ts.map +0 -1
- package/dist/setting/src/dto/delete.dto.js +0 -23
- package/dist/setting/src/dto/delete.dto.js.map +0 -1
- package/dist/setting/src/dto/update.dto.d.ts +0 -4
- package/dist/setting/src/dto/update.dto.d.ts.map +0 -1
- package/dist/setting/src/dto/update.dto.js +0 -8
- package/dist/setting/src/dto/update.dto.js.map +0 -1
- package/dist/setting/src/migrations/index.d.ts +0 -6
- package/dist/setting/src/migrations/index.d.ts.map +0 -1
- package/dist/setting/src/migrations/index.js +0 -67
- package/dist/setting/src/migrations/index.js.map +0 -1
- package/dist/setting/src/settings.controller.d.ts +0 -14
- package/dist/setting/src/settings.controller.d.ts.map +0 -1
- package/dist/setting/src/settings.controller.js +0 -94
- package/dist/setting/src/settings.controller.js.map +0 -1
- package/dist/setting/src/settings.module.d.ts +0 -3
- package/dist/setting/src/settings.module.d.ts.map +0 -1
- package/dist/setting/src/settings.module.js +0 -31
- package/dist/setting/src/settings.module.js.map +0 -1
- package/dist/setting/src/settings.service.d.ts +0 -19
- package/dist/setting/src/settings.service.d.ts.map +0 -1
- package/dist/setting/src/settings.service.js +0 -70
- package/dist/setting/src/settings.service.js.map +0 -1
- package/dist/user/src/constants/user.constants.d.ts +0 -2
- package/dist/user/src/constants/user.constants.d.ts.map +0 -1
- package/dist/user/src/constants/user.constants.js +0 -5
- package/dist/user/src/constants/user.constants.js.map +0 -1
- package/dist/user/src/dto/create.dto.d.ts +0 -6
- package/dist/user/src/dto/create.dto.d.ts.map +0 -1
- package/dist/user/src/dto/create.dto.js +0 -37
- package/dist/user/src/dto/create.dto.js.map +0 -1
- package/dist/user/src/dto/delete.dto.d.ts +0 -4
- package/dist/user/src/dto/delete.dto.d.ts.map +0 -1
- package/dist/user/src/dto/delete.dto.js +0 -23
- package/dist/user/src/dto/delete.dto.js.map +0 -1
- package/dist/user/src/dto/update.dto.d.ts +0 -8
- package/dist/user/src/dto/update.dto.d.ts.map +0 -1
- package/dist/user/src/dto/update.dto.js +0 -50
- package/dist/user/src/dto/update.dto.js.map +0 -1
- package/dist/user/src/user.controller.d.ts +0 -14
- package/dist/user/src/user.controller.d.ts.map +0 -1
- package/dist/user/src/user.controller.js +0 -94
- package/dist/user/src/user.controller.js.map +0 -1
- package/dist/user/src/user.module.d.ts +0 -3
- package/dist/user/src/user.module.d.ts.map +0 -1
- package/dist/user/src/user.module.js +0 -31
- package/dist/user/src/user.module.js.map +0 -1
- package/dist/user/src/user.service.d.ts +0 -20
- package/dist/user/src/user.service.d.ts.map +0 -1
- package/dist/user/src/user.service.js +0 -84
- package/dist/user/src/user.service.js.map +0 -1
- package/dist/user/src/user.service.spec.d.ts +0 -2
- package/dist/user/src/user.service.spec.d.ts.map +0 -1
- package/dist/user/src/user.service.spec.js +0 -17
- package/dist/user/src/user.service.spec.js.map +0 -1
- package/src/migrations/1726795702341-migrate.ts +0 -107
- package/src/migrations/1726795734665-migrate.ts +0 -40
@@ -1,121 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.Migrate = void 0;
|
27
|
-
const typeorm_1 = require("typeorm");
|
28
|
-
const utils_1 = require("@hedhog/utils");
|
29
|
-
const bcrypt = __importStar(require("bcrypt"));
|
30
|
-
class Migrate {
|
31
|
-
async up(queryRunner) {
|
32
|
-
await queryRunner.createTable(new typeorm_1.Table({
|
33
|
-
name: 'multifactors',
|
34
|
-
columns: [
|
35
|
-
(0, utils_1.idColumn)(),
|
36
|
-
{
|
37
|
-
name: 'name',
|
38
|
-
type: 'varchar',
|
39
|
-
},
|
40
|
-
(0, utils_1.timestampColumn)(),
|
41
|
-
(0, utils_1.timestampColumn)('updated_at'),
|
42
|
-
],
|
43
|
-
}));
|
44
|
-
await queryRunner.manager
|
45
|
-
.createQueryBuilder()
|
46
|
-
.insert()
|
47
|
-
.into('multifactors', ['name'])
|
48
|
-
.values([
|
49
|
-
{
|
50
|
-
name: 'Email',
|
51
|
-
},
|
52
|
-
{
|
53
|
-
name: 'Applicativo',
|
54
|
-
},
|
55
|
-
])
|
56
|
-
.execute();
|
57
|
-
await queryRunner.createTable(new typeorm_1.Table({
|
58
|
-
name: 'users',
|
59
|
-
columns: [
|
60
|
-
(0, utils_1.idColumn)(),
|
61
|
-
{
|
62
|
-
name: 'name',
|
63
|
-
type: 'varchar',
|
64
|
-
},
|
65
|
-
{
|
66
|
-
name: 'email',
|
67
|
-
type: 'varchar',
|
68
|
-
},
|
69
|
-
{
|
70
|
-
name: 'password',
|
71
|
-
type: 'varchar',
|
72
|
-
},
|
73
|
-
{
|
74
|
-
name: 'multifactor_id',
|
75
|
-
type: 'int',
|
76
|
-
isNullable: true,
|
77
|
-
unsigned: true,
|
78
|
-
},
|
79
|
-
{
|
80
|
-
name: 'code',
|
81
|
-
type: 'varchar',
|
82
|
-
isNullable: true,
|
83
|
-
},
|
84
|
-
(0, utils_1.timestampColumn)(),
|
85
|
-
(0, utils_1.timestampColumn)('updated_at'),
|
86
|
-
],
|
87
|
-
}));
|
88
|
-
await queryRunner.createForeignKeys('users', [
|
89
|
-
new typeorm_1.TableForeignKey({
|
90
|
-
columnNames: ['multifactor_id'],
|
91
|
-
referencedColumnNames: ['id'],
|
92
|
-
referencedTableName: 'multifactors',
|
93
|
-
name: 'fk_users_to_multifactors_on_multifactor_id',
|
94
|
-
onDelete: 'Cascade',
|
95
|
-
}),
|
96
|
-
]);
|
97
|
-
await queryRunner.manager
|
98
|
-
.createQueryBuilder()
|
99
|
-
.insert()
|
100
|
-
.into('users', ['name', 'email', 'password'])
|
101
|
-
.values([
|
102
|
-
{
|
103
|
-
name: 'Superuser',
|
104
|
-
email: 'root@hedhog.com',
|
105
|
-
password: await bcrypt.hash(`hedhog`, 12),
|
106
|
-
},
|
107
|
-
{
|
108
|
-
name: 'User',
|
109
|
-
email: 'user@hedhog.com',
|
110
|
-
password: await bcrypt.hash(`hedhog`, 12),
|
111
|
-
},
|
112
|
-
])
|
113
|
-
.execute();
|
114
|
-
}
|
115
|
-
async down(queryRunner) {
|
116
|
-
await queryRunner.dropTable('multifactors');
|
117
|
-
await queryRunner.dropTable('users');
|
118
|
-
}
|
119
|
-
}
|
120
|
-
exports.Migrate = Migrate;
|
121
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/auth/src/migrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAKiB;AACjB,yCAA0D;AAC1D,+CAAiC;AAEjC,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;iBAChB;gBACD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,OAAO;aACtB,kBAAkB,EAAE;aACpB,MAAM,EAAE;aACR,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC;aAC9B,MAAM,CAAC;YACN;gBACE,IAAI,EAAE,OAAO;aACd;YACD;gBACE,IAAI,EAAE,aAAa;aACpB;SACF,CAAC;aACD,OAAO,EAAE,CAAC;QAEb,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,OAAO;YACb,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,gBAAgB;oBACtB,IAAI,EAAE,KAAK;oBACX,UAAU,EAAE,IAAI;oBAChB,QAAQ,EAAE,IAAI;iBACf;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;QAEF,MAAM,WAAW,CAAC,iBAAiB,CAAC,OAAO,EAAE;YAC3C,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,gBAAgB,CAAC;gBAC/B,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,cAAc;gBACnC,IAAI,EAAE,4CAA4C;gBAClD,QAAQ,EAAE,SAAS;aACpB,CAAC;SACH,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,OAAO;aACtB,kBAAkB,EAAE;aACpB,MAAM,EAAE;aACR,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;aAC5C,MAAM,CAAC;YACN;gBACE,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,iBAAiB;gBACxB,QAAQ,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;aAC1C;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,iBAAiB;gBACxB,QAAQ,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;aAC1C;SACF,CAAC;aACD,OAAO,EAAE,CAAC;IACf,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAC5C,MAAM,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CACF;AAjGD,0BAiGC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"user.type.d.ts","sourceRoot":"","sources":["../../../../src/auth/src/types/user.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"user.type.js","sourceRoot":"","sources":["../../../../src/auth/src/types/user.type.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../../src/file/src/dto/delete.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAIpB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
|
@@ -1,23 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"delete.dto.js","sourceRoot":"","sources":["../../../../src/file/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"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file.module.d.ts","sourceRoot":"","sources":["../../../src/file/src/file.module.ts"],"names":[],"mappings":"AAMA,qBASa,UAAU;CAAG"}
|
@@ -1,29 +0,0 @@
|
|
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.FileModule = void 0;
|
10
|
-
const common_1 = require("@nestjs/common");
|
11
|
-
const file_service_1 = require("./file.service");
|
12
|
-
const __1 = require("../../");
|
13
|
-
const prisma_1 = require("@hedhog/prisma");
|
14
|
-
const pagination_1 = require("@hedhog/pagination");
|
15
|
-
let FileModule = class FileModule {
|
16
|
-
};
|
17
|
-
exports.FileModule = FileModule;
|
18
|
-
exports.FileModule = FileModule = __decorate([
|
19
|
-
(0, common_1.Module)({
|
20
|
-
imports: [
|
21
|
-
(0, common_1.forwardRef)(() => __1.AuthModule),
|
22
|
-
(0, common_1.forwardRef)(() => prisma_1.PrismaModule),
|
23
|
-
(0, common_1.forwardRef)(() => pagination_1.PaginationModule),
|
24
|
-
],
|
25
|
-
providers: [file_service_1.FileService],
|
26
|
-
exports: [file_service_1.FileService],
|
27
|
-
})
|
28
|
-
], FileModule);
|
29
|
-
//# sourceMappingURL=file.module.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file.module.js","sourceRoot":"","sources":["../../../src/file/src/file.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,iDAA6C;AAC7C,8BAAoC;AACpC,2CAA8C;AAC9C,mDAAsD;AAW/C,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IATtB,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,SAAS,EAAE,CAAC,0BAAW,CAAC;QACxB,OAAO,EAAE,CAAC,0BAAW,CAAC;KACvB,CAAC;GACW,UAAU,CAAG"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { PaginationDTO, PaginationService } from '@hedhog/pagination';
|
2
|
-
import { PrismaService } from '@hedhog/prisma';
|
3
|
-
import { DeleteDTO } from './dto/delete.dto';
|
4
|
-
export declare class FileService {
|
5
|
-
private readonly prismaService;
|
6
|
-
private readonly paginationService;
|
7
|
-
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
8
|
-
getFiles(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
9
|
-
get(fileId: number): Promise<any>;
|
10
|
-
delete({ ids }: DeleteDTO): Promise<any>;
|
11
|
-
}
|
12
|
-
//# sourceMappingURL=file.service.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file.service.d.ts","sourceRoot":"","sources":["../../../src/file/src/file.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;AAE7C,qBACa,WAAW;IAGpB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,QAAQ,CAAC,gBAAgB,EAAE,aAAa;IAkBxC,GAAG,CAAC,MAAM,EAAE,MAAM;IAMlB,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
|
@@ -1,59 +0,0 @@
|
|
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.FileService = 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 FileService = class FileService {
|
20
|
-
constructor(prismaService, paginationService) {
|
21
|
-
this.prismaService = prismaService;
|
22
|
-
this.paginationService = paginationService;
|
23
|
-
}
|
24
|
-
async getFiles(paginationParams) {
|
25
|
-
const fields = ['name', 'url', 'extension'];
|
26
|
-
const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
|
27
|
-
return this.paginationService.paginate(this.prismaService.files, paginationParams, {
|
28
|
-
where: {
|
29
|
-
OR,
|
30
|
-
},
|
31
|
-
});
|
32
|
-
}
|
33
|
-
async get(fileId) {
|
34
|
-
return this.prismaService.files.findUnique({
|
35
|
-
where: { id: fileId },
|
36
|
-
});
|
37
|
-
}
|
38
|
-
async delete({ ids }) {
|
39
|
-
if (ids == undefined || ids == null) {
|
40
|
-
throw new common_1.BadRequestException(`You must select at least one file to delete.`);
|
41
|
-
}
|
42
|
-
return this.prismaService.files.deleteMany({
|
43
|
-
where: {
|
44
|
-
id: {
|
45
|
-
in: ids,
|
46
|
-
},
|
47
|
-
},
|
48
|
-
});
|
49
|
-
}
|
50
|
-
};
|
51
|
-
exports.FileService = FileService;
|
52
|
-
exports.FileService = FileService = __decorate([
|
53
|
-
(0, common_1.Injectable)(),
|
54
|
-
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => prisma_1.PrismaService))),
|
55
|
-
__param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => pagination_1.PaginationService))),
|
56
|
-
__metadata("design:paramtypes", [prisma_1.PrismaService,
|
57
|
-
pagination_1.PaginationService])
|
58
|
-
], FileService);
|
59
|
-
//# sourceMappingURL=file.service.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file.service.js","sourceRoot":"","sources":["../../../src/file/src/file.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AAIjB,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,gBAA+B;QAC5C,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;QAC5C,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,uBAAuB,CACnD,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,KAAK,EACxB,gBAAgB,EAChB;YACE,KAAK,EAAE;gBACL,EAAE;aACH;SACF,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,MAAc;QACtB,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC;YACzC,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;SACtB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAa;QAC7B,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,8CAA8C,CAC/C,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC;YACzC,KAAK,EAAE;gBACL,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA/CY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,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,WAAW,CA+CvB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/file/src/migrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAS,MAAM,SAAS,CAAC;AAGjE,qBAAa,OAAQ,YAAW,kBAAkB;IACnC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA0I3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
|
@@ -1,137 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Migrate = void 0;
|
4
|
-
const typeorm_1 = require("typeorm");
|
5
|
-
const utils_1 = require("@hedhog/utils");
|
6
|
-
class Migrate {
|
7
|
-
async up(queryRunner) {
|
8
|
-
await queryRunner.createTable(new typeorm_1.Table({
|
9
|
-
name: 'files',
|
10
|
-
columns: [
|
11
|
-
(0, utils_1.idColumn)(),
|
12
|
-
{
|
13
|
-
name: 'name',
|
14
|
-
type: 'varchar',
|
15
|
-
},
|
16
|
-
{
|
17
|
-
name: 'url',
|
18
|
-
type: 'varchar',
|
19
|
-
},
|
20
|
-
{
|
21
|
-
name: 'extension',
|
22
|
-
type: 'varchar',
|
23
|
-
length: '15',
|
24
|
-
},
|
25
|
-
{
|
26
|
-
name: 'bytes',
|
27
|
-
type: 'int',
|
28
|
-
},
|
29
|
-
(0, utils_1.timestampColumn)(),
|
30
|
-
(0, utils_1.timestampColumn)('updated_at'),
|
31
|
-
],
|
32
|
-
}));
|
33
|
-
await queryRunner.manager
|
34
|
-
.createQueryBuilder()
|
35
|
-
.insert()
|
36
|
-
.into('settings')
|
37
|
-
.values([
|
38
|
-
{ name: 'Storage Provider' },
|
39
|
-
{ name: 'AWS Storage' },
|
40
|
-
{ name: 'Azure Storage' },
|
41
|
-
])
|
42
|
-
.execute();
|
43
|
-
const rows = await queryRunner.manager
|
44
|
-
.createQueryBuilder()
|
45
|
-
.select('*')
|
46
|
-
.from('settings', 's')
|
47
|
-
.where('s.name IN (:...names)', {
|
48
|
-
names: ['Storage Provider', 'AWS Storage', 'Azure Storage'],
|
49
|
-
})
|
50
|
-
.getRawMany();
|
51
|
-
for (const row of rows) {
|
52
|
-
switch (row.name) {
|
53
|
-
case 'AWS Storage':
|
54
|
-
await queryRunner.manager
|
55
|
-
.createQueryBuilder()
|
56
|
-
.insert()
|
57
|
-
.into('setting_values')
|
58
|
-
.values([
|
59
|
-
{
|
60
|
-
value: '',
|
61
|
-
name: 'ACCESS_KEY_ID',
|
62
|
-
description: 'Chave pública usada para identificar o usuário ou serviço que realiza chamadas à API da AWS, sendo necessária para autenticação junto com o AWS_SECRET_ACCESS_KEY.',
|
63
|
-
label: 'ID da chave de acesso',
|
64
|
-
setting_id: row.id,
|
65
|
-
},
|
66
|
-
{
|
67
|
-
value: '',
|
68
|
-
name: 'SECRET_ACCESS_KEY',
|
69
|
-
description: 'Chave secreta de acesso para autenticação segura em serviços da AWS.',
|
70
|
-
label: 'Chave Secreta de Acesso',
|
71
|
-
setting_id: row.id,
|
72
|
-
},
|
73
|
-
{
|
74
|
-
value: '',
|
75
|
-
name: 'BUCKET_NAME',
|
76
|
-
description: 'Nome do bucket de armazenamento na AWS.',
|
77
|
-
label: 'Nome do Bucket',
|
78
|
-
setting_id: row.id,
|
79
|
-
},
|
80
|
-
])
|
81
|
-
.execute();
|
82
|
-
break;
|
83
|
-
case 'Azure Storage':
|
84
|
-
await queryRunner.manager
|
85
|
-
.createQueryBuilder()
|
86
|
-
.insert()
|
87
|
-
.into('setting_values')
|
88
|
-
.values([
|
89
|
-
{
|
90
|
-
value: '',
|
91
|
-
name: 'ACCOUNT_NAME',
|
92
|
-
description: 'Nome da conta de armazenamento no Azure.',
|
93
|
-
label: 'Nome da Conta de Armazenamento',
|
94
|
-
setting_id: row.id,
|
95
|
-
},
|
96
|
-
{
|
97
|
-
value: '',
|
98
|
-
name: 'ACCOUNT_KEY',
|
99
|
-
description: 'Chave de acesso para autenticação e gerenciamento da conta de armazenamento.',
|
100
|
-
label: 'Chave da Conta de Armazenamento',
|
101
|
-
setting_id: row.id,
|
102
|
-
},
|
103
|
-
{
|
104
|
-
value: '',
|
105
|
-
name: 'CONTAINER_NAME',
|
106
|
-
description: 'Nome do contêiner dentro da conta de armazenamento.',
|
107
|
-
label: 'Nome do Container',
|
108
|
-
setting_id: row.id,
|
109
|
-
},
|
110
|
-
])
|
111
|
-
.execute();
|
112
|
-
break;
|
113
|
-
case 'Storage Provider':
|
114
|
-
await queryRunner.manager
|
115
|
-
.createQueryBuilder()
|
116
|
-
.insert()
|
117
|
-
.into('setting_values')
|
118
|
-
.values([
|
119
|
-
{
|
120
|
-
value: '',
|
121
|
-
name: 'STORAGE_PROVIDER',
|
122
|
-
description: 'Escolha entre AWS e Azure como provedor de armazenamento e forneça as informações correspondentes.',
|
123
|
-
label: 'Provedor de armazenamento',
|
124
|
-
setting_id: row.id,
|
125
|
-
},
|
126
|
-
])
|
127
|
-
.execute();
|
128
|
-
break;
|
129
|
-
}
|
130
|
-
}
|
131
|
-
}
|
132
|
-
async down(queryRunner) {
|
133
|
-
await queryRunner.dropTable('files');
|
134
|
-
}
|
135
|
-
}
|
136
|
-
exports.Migrate = Migrate;
|
137
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/file/src/migrations/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
export * from './admin.module';
|
2
|
-
export * from './auth/src/auth.module';
|
3
|
-
export * from './auth/src/auth.service';
|
4
|
-
export * from './auth/src/decorators/public.decorator';
|
5
|
-
export * from './auth/src/decorators/user.decorator';
|
6
|
-
export * from './auth/src/guards/auth.guard';
|
7
|
-
export * from './menu/src/menu.module';
|
8
|
-
export * from './menu/src/menu.service';
|
9
|
-
export * from './permission/src/permission.module';
|
10
|
-
export * from './permission/src/permission.service';
|
11
|
-
export * from './permission/src/types/permission.types';
|
12
|
-
export * from './permission/src/decorators/permission.decorator';
|
13
|
-
export * from './screen/src/screen.module';
|
14
|
-
export * from './screen/src/screen.service';
|
15
|
-
export * from './user/src/constants/user.constants';
|
16
|
-
export * from './user/src/user.module';
|
17
|
-
export * from './user/src/user.service';
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAG7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,kDAAkD,CAAC;AAGjE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAG5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
|
package/dist/index.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,eAAe;AACf,iDAA+B;AAE/B,cAAc;AACd,yDAAuC;AACvC,0DAAwC;AACxC,yEAAuD;AACvD,uEAAqD;AACrD,+DAA6C;AAE7C,cAAc;AACd,yDAAuC;AACvC,0DAAwC;AAExC,oBAAoB;AACpB,qEAAmD;AACnD,sEAAoD;AACpD,0EAAwD;AACxD,mFAAiE;AAEjE,gBAAgB;AAChB,6DAA2C;AAC3C,8DAA4C;AAE5C,cAAc;AACd,sEAAoD;AACpD,yDAAuC;AACvC,0DAAwC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mail-configuration-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/enums/mail-configuration-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IACnC,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;CAChB"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.MailConfigurationTypeEnum = void 0;
|
4
|
-
var MailConfigurationTypeEnum;
|
5
|
-
(function (MailConfigurationTypeEnum) {
|
6
|
-
MailConfigurationTypeEnum["AWS"] = "AWS";
|
7
|
-
MailConfigurationTypeEnum["SMTP"] = "SMTP";
|
8
|
-
MailConfigurationTypeEnum["GMAIL"] = "GMAIL";
|
9
|
-
})(MailConfigurationTypeEnum || (exports.MailConfigurationTypeEnum = MailConfigurationTypeEnum = {}));
|
10
|
-
//# sourceMappingURL=mail-configuration-type.enum.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mail-configuration-type.enum.js","sourceRoot":"","sources":["../../../../src/mail/src/enums/mail-configuration-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,wCAAW,CAAA;IACX,0CAAa,CAAA;IACb,4CAAe,CAAA;AACjB,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,aAAa,CAAC"}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./mail-module-options.interface"), exports);
|
18
|
-
__exportStar(require("./mail-type"), exports);
|
19
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,8CAA4B"}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import { ModuleMetadata } from '@nestjs/common';
|
2
|
-
export type MailModuleOptions = {
|
3
|
-
global?: boolean;
|
4
|
-
type: 'AWS';
|
5
|
-
region: string;
|
6
|
-
accessKeyId: string;
|
7
|
-
secretAccessKey: string;
|
8
|
-
from: string;
|
9
|
-
} | {
|
10
|
-
global?: boolean;
|
11
|
-
type: 'SMTP';
|
12
|
-
host: string;
|
13
|
-
port: number;
|
14
|
-
secure?: boolean;
|
15
|
-
username: string;
|
16
|
-
password: string;
|
17
|
-
} | {
|
18
|
-
global?: boolean;
|
19
|
-
type: 'GMAIL';
|
20
|
-
clientId: string;
|
21
|
-
clientSecret: string;
|
22
|
-
refreshToken: string;
|
23
|
-
from: string;
|
24
|
-
};
|
25
|
-
export interface MailOptionsFactory {
|
26
|
-
createMailOptions(): Promise<MailModuleOptions> | MailModuleOptions;
|
27
|
-
}
|
28
|
-
export interface MailModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
29
|
-
useFactory: (...args: any[]) => Promise<MailModuleOptions> | MailModuleOptions;
|
30
|
-
inject?: any[];
|
31
|
-
}
|
32
|
-
//# sourceMappingURL=mail-module-options.interface.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mail-module-options.interface.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-module-options.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GACzB;IACE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,GACD;IACE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,IAAI,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC;CACrE;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC;IACvC,UAAU,EAAE,CACV,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC;IACpD,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;CAChB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mail-module-options.interface.js","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-module-options.interface.ts"],"names":[],"mappings":""}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
export interface MailType {
|
2
|
-
from?: string;
|
3
|
-
to: string | string[];
|
4
|
-
cc?: string | string[];
|
5
|
-
bcc?: string | string[];
|
6
|
-
subject?: string;
|
7
|
-
body?: string;
|
8
|
-
replyTo?: string | string[];
|
9
|
-
priority?: string;
|
10
|
-
createdAt?: string;
|
11
|
-
updatedAt?: string;
|
12
|
-
}
|
13
|
-
//# sourceMappingURL=mail-type.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mail-type.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mail-type.js","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-type.ts"],"names":[],"mappings":""}
|