@hedhog/admin 0.0.104 → 0.0.106
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +141 -141
- package/dist/admin.module.d.ts.map +1 -1
- package/dist/admin.module.js +8 -7
- package/dist/admin.module.js.map +1 -1
- package/dist/auth/auth.service.d.ts +1 -1
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +8 -8
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/auth/auth.service.spec.js +16 -16
- package/dist/auth/auth.service.spec.js.map +1 -1
- package/dist/dto/with-locale.dto.d.ts +4 -0
- package/dist/dto/with-locale.dto.d.ts.map +1 -0
- package/dist/dto/{with-locales.dto.js → with-locale.dto.js} +5 -5
- package/dist/dto/with-locale.dto.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/locale/locale.controller.d.ts +1 -1
- package/dist/locale/locale.controller.d.ts.map +1 -1
- package/dist/locale/locale.controller.js +4 -4
- package/dist/locale/locale.controller.js.map +1 -1
- package/dist/locale/locale.middleware.d.ts +1 -1
- package/dist/locale/locale.middleware.d.ts.map +1 -1
- package/dist/locale/locale.middleware.js +2 -2
- package/dist/locale/locale.middleware.js.map +1 -1
- package/dist/locale/locale.service.d.ts +6 -6
- package/dist/locale/locale.service.d.ts.map +1 -1
- package/dist/locale/locale.service.js +43 -43
- package/dist/locale/locale.service.js.map +1 -1
- package/dist/locale/locale.service.spec.js +14 -14
- package/dist/locale/locale.service.spec.js.map +1 -1
- package/dist/menu/menu.controller.js +3 -3
- package/dist/menu/menu.controller.js.map +1 -1
- package/dist/menu/menu.service.d.ts +3 -3
- package/dist/menu/menu.service.d.ts.map +1 -1
- package/dist/menu/menu.service.js +35 -35
- package/dist/menu/menu.service.js.map +1 -1
- package/dist/menu/menu.service.spec.js +33 -37
- package/dist/menu/menu.service.spec.js.map +1 -1
- package/dist/role/dto/create.dto.d.ts +2 -2
- package/dist/role/dto/create.dto.d.ts.map +1 -1
- package/dist/role/dto/create.dto.js +2 -2
- package/dist/role/dto/create.dto.js.map +1 -1
- package/dist/role/guards/role.guard.js +4 -4
- package/dist/role/guards/role.guard.js.map +1 -1
- package/dist/role/role.controller.d.ts.map +1 -1
- package/dist/role/role.controller.js +9 -9
- package/dist/role/role.controller.js.map +1 -1
- package/dist/role/role.service.d.ts +2 -2
- package/dist/role/role.service.d.ts.map +1 -1
- package/dist/role/role.service.js +35 -35
- package/dist/role/role.service.js.map +1 -1
- package/dist/role/role.service.spec.d.ts +0 -1
- package/dist/role/role.service.spec.js +400 -340
- package/dist/role/role.service.spec.js.map +1 -1
- package/dist/route/route.controller.js +3 -3
- package/dist/route/route.controller.js.map +1 -1
- package/dist/route/route.service.d.ts +2 -2
- package/dist/route/route.service.d.ts.map +1 -1
- package/dist/route/route.service.js +19 -19
- package/dist/route/route.service.js.map +1 -1
- package/dist/route/route.service.spec.js +27 -27
- package/dist/route/route.service.spec.js.map +1 -1
- package/dist/screen/screen.controller.d.ts +1 -1
- package/dist/screen/screen.controller.d.ts.map +1 -1
- package/dist/screen/screen.controller.js +8 -8
- package/dist/screen/screen.controller.js.map +1 -1
- package/dist/screen/screen.service.d.ts +3 -3
- package/dist/screen/screen.service.d.ts.map +1 -1
- package/dist/screen/screen.service.js +18 -18
- package/dist/screen/screen.service.js.map +1 -1
- package/dist/screen/screen.service.spec.js +16 -16
- package/dist/screen/screen.service.spec.js.map +1 -1
- package/dist/setting/dto/setting.dto.d.ts +9 -0
- package/dist/setting/dto/setting.dto.d.ts.map +1 -0
- package/dist/setting/dto/{settings.dto.js → setting.dto.js} +6 -6
- package/dist/setting/dto/setting.dto.js.map +1 -0
- package/dist/setting/{settings.controller.d.ts → setting.controller.d.ts} +8 -8
- package/dist/setting/setting.controller.d.ts.map +1 -0
- package/dist/setting/{settings.controller.js → setting.controller.js} +26 -26
- package/dist/setting/setting.controller.js.map +1 -0
- package/dist/setting/setting.module.d.ts +3 -0
- package/dist/setting/setting.module.d.ts.map +1 -0
- package/dist/setting/{settings.module.js → setting.module.js} +6 -6
- package/dist/setting/setting.module.js.map +1 -0
- package/dist/setting/{settings.service.d.ts → setting.service.d.ts} +6 -6
- package/dist/setting/setting.service.d.ts.map +1 -0
- package/dist/setting/{settings.service.js → setting.service.js} +44 -44
- package/dist/setting/setting.service.js.map +1 -0
- package/dist/setting/setting.service.spec.d.ts +2 -0
- package/dist/setting/setting.service.spec.d.ts.map +1 -0
- package/dist/setting/{settings.service.spec.js → setting.service.spec.js} +17 -17
- package/dist/setting/setting.service.spec.js.map +1 -0
- package/dist/user/user.controller.d.ts +2 -2
- package/dist/user/user.controller.d.ts.map +1 -1
- package/dist/user/user.controller.js +8 -8
- package/dist/user/user.controller.js.map +1 -1
- package/dist/user/user.service.d.ts +3 -3
- package/dist/user/user.service.d.ts.map +1 -1
- package/dist/user/user.service.js +10 -10
- package/dist/user/user.service.js.map +1 -1
- package/dist/user/user.service.spec.js +62 -49
- package/dist/user/user.service.spec.js.map +1 -1
- package/package.json +2 -2
- package/src/admin.module.ts +37 -0
- package/src/auth/auth.controller.ts +48 -0
- package/src/auth/auth.module.ts +39 -0
- package/src/auth/auth.service.spec.ts +196 -0
- package/src/auth/auth.service.ts +175 -0
- package/src/auth/decorators/public.decorator.ts +4 -0
- package/src/auth/decorators/user.decorator.ts +17 -0
- package/src/auth/dto/forget.dto.ts +6 -0
- package/src/auth/dto/login.dto.ts +15 -0
- package/src/auth/dto/otp.dto.ts +11 -0
- package/src/auth/enums/multifactor-type.enum.ts +4 -0
- package/src/auth/guards/auth.guard.ts +50 -0
- package/src/auth/types/user.type.ts +8 -0
- package/src/dto/delete.dto.ts +8 -0
- package/src/dto/update-ids.dto.ts +9 -0
- package/src/dto/with-locale.dto.ts +8 -0
- package/src/index.ts +34 -0
- package/src/locale/dto/create.dto.ts +12 -0
- package/src/locale/dto/delete.dto.ts +8 -0
- package/src/locale/dto/set-enabled.dto.ts +9 -0
- package/src/locale/dto/update.dto.ts +15 -0
- package/src/locale/index.ts +4 -0
- package/src/locale/locale.controller.ts +79 -0
- package/src/locale/locale.decorator.ts +8 -0
- package/src/locale/locale.middleware.ts +34 -0
- package/src/locale/locale.module.ts +23 -0
- package/src/locale/locale.service.spec.ts +193 -0
- package/src/locale/locale.service.ts +366 -0
- package/src/menu/dto/create.dto.ts +25 -0
- package/src/menu/dto/order.dto.ts +8 -0
- package/src/menu/dto/update.dto.ts +19 -0
- package/src/menu/menu.controller.ts +106 -0
- package/src/menu/menu.module.ts +18 -0
- package/src/menu/menu.service.spec.ts +247 -0
- package/src/menu/menu.service.ts +263 -0
- package/src/role/decorators/role.decorator.ts +4 -0
- package/src/role/dto/create.dto.ts +7 -0
- package/src/role/dto/update.dto.ts +4 -0
- package/src/role/guards/role.guard.ts +122 -0
- package/src/role/role.controller.ts +126 -0
- package/src/role/role.module.ts +28 -0
- package/src/role/role.service.spec.ts +417 -0
- package/src/role/role.service.ts +302 -0
- package/src/route/dto/create.dto.ts +13 -0
- package/src/route/dto/update.dto.ts +15 -0
- package/src/route/route.controller.ts +91 -0
- package/src/route/route.module.ts +18 -0
- package/src/route/route.service.spec.ts +299 -0
- package/src/route/route.service.ts +164 -0
- package/src/screen/dto/create.dto.ts +19 -0
- package/src/screen/dto/update.dto.ts +19 -0
- package/src/screen/screen.controller.ts +93 -0
- package/src/screen/screen.module.ts +18 -0
- package/src/screen/screen.service.spec.ts +298 -0
- package/src/screen/screen.service.ts +181 -0
- package/src/setting/dto/create.dto.ts +1 -0
- package/src/setting/dto/setting-user.dto.ts +6 -0
- package/src/setting/dto/setting.dto.ts +17 -0
- package/src/setting/dto/update.dto.ts +3 -0
- package/src/setting/setting.controller.ts +100 -0
- package/src/setting/setting.module.ts +18 -0
- package/src/setting/setting.service.spec.ts +183 -0
- package/src/setting/setting.service.ts +346 -0
- package/src/types/http-method.ts +8 -0
- package/src/user/constants/user.constants.ts +1 -0
- package/src/user/dto/create.dto.ts +24 -0
- package/src/user/dto/update.dto.ts +41 -0
- package/src/user/user.controller.ts +75 -0
- package/src/user/user.module.ts +18 -0
- package/src/user/user.service.spec.ts +294 -0
- package/src/user/user.service.ts +129 -0
- package/tsconfig.lib.json +9 -0
- package/tsconfig.production.json +20 -0
- package/dist/dto/with-locales.dto.d.ts +0 -4
- package/dist/dto/with-locales.dto.d.ts.map +0 -1
- package/dist/dto/with-locales.dto.js.map +0 -1
- package/dist/setting/dto/settings.dto.d.ts +0 -9
- package/dist/setting/dto/settings.dto.d.ts.map +0 -1
- package/dist/setting/dto/settings.dto.js.map +0 -1
- package/dist/setting/settings.controller.d.ts.map +0 -1
- package/dist/setting/settings.controller.js.map +0 -1
- package/dist/setting/settings.module.d.ts +0 -3
- package/dist/setting/settings.module.d.ts.map +0 -1
- package/dist/setting/settings.module.js.map +0 -1
- package/dist/setting/settings.service.d.ts.map +0 -1
- package/dist/setting/settings.service.js.map +0 -1
- package/dist/setting/settings.service.spec.d.ts +0 -2
- package/dist/setting/settings.service.spec.d.ts.map +0 -1
- package/dist/setting/settings.service.spec.js.map +0 -1
@@ -22,12 +22,12 @@ let ScreenService = class ScreenService {
|
|
22
22
|
this.paginationService = paginationService;
|
23
23
|
}
|
24
24
|
async updateRoles(screenId, data) {
|
25
|
-
await this.prismaService.
|
25
|
+
await this.prismaService.role_screen.deleteMany({
|
26
26
|
where: {
|
27
27
|
screen_id: screenId,
|
28
28
|
},
|
29
29
|
});
|
30
|
-
return this.prismaService.
|
30
|
+
return this.prismaService.role_screen.createMany({
|
31
31
|
data: data.ids.map((roleId) => ({
|
32
32
|
screen_id: screenId,
|
33
33
|
role_id: roleId,
|
@@ -36,7 +36,7 @@ let ScreenService = class ScreenService {
|
|
36
36
|
});
|
37
37
|
}
|
38
38
|
async updateRoutes(screenId, { ids }) {
|
39
|
-
ids = (await this.prismaService.
|
39
|
+
ids = (await this.prismaService.route.findMany({
|
40
40
|
where: {
|
41
41
|
id: {
|
42
42
|
in: ids,
|
@@ -46,12 +46,12 @@ let ScreenService = class ScreenService {
|
|
46
46
|
id: true,
|
47
47
|
},
|
48
48
|
})).map((route) => route.id);
|
49
|
-
await this.prismaService.
|
49
|
+
await this.prismaService.route_screen.deleteMany({
|
50
50
|
where: {
|
51
51
|
screen_id: screenId,
|
52
52
|
},
|
53
53
|
});
|
54
|
-
return this.prismaService.
|
54
|
+
return this.prismaService.route_screen.createMany({
|
55
55
|
data: ids.map((routeId) => ({
|
56
56
|
screen_id: screenId,
|
57
57
|
route_id: routeId,
|
@@ -60,9 +60,9 @@ let ScreenService = class ScreenService {
|
|
60
60
|
});
|
61
61
|
}
|
62
62
|
async listRoutes(screenId, paginationParams) {
|
63
|
-
return this.paginationService.paginate(this.prismaService.
|
63
|
+
return this.paginationService.paginate(this.prismaService.route, paginationParams, {
|
64
64
|
include: {
|
65
|
-
|
65
|
+
route_screen: {
|
66
66
|
where: {
|
67
67
|
screen_id: screenId,
|
68
68
|
},
|
@@ -75,9 +75,9 @@ let ScreenService = class ScreenService {
|
|
75
75
|
});
|
76
76
|
}
|
77
77
|
async listRoles(locale, screenId, paginationParams) {
|
78
|
-
return this.paginationService.paginate(this.prismaService.
|
78
|
+
return this.paginationService.paginate(this.prismaService.role, paginationParams, {
|
79
79
|
include: {
|
80
|
-
|
80
|
+
role_screen: {
|
81
81
|
where: {
|
82
82
|
screen_id: screenId,
|
83
83
|
},
|
@@ -89,17 +89,17 @@ let ScreenService = class ScreenService {
|
|
89
89
|
},
|
90
90
|
});
|
91
91
|
}
|
92
|
-
async
|
92
|
+
async list(locale, paginationParams) {
|
93
93
|
const fields = ['slug', 'icon'];
|
94
94
|
const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
|
95
|
-
const result = await this.paginationService.paginate(this.prismaService.
|
95
|
+
const result = await this.paginationService.paginate(this.prismaService.screen, paginationParams, {
|
96
96
|
where: {
|
97
97
|
OR,
|
98
98
|
},
|
99
99
|
include: {
|
100
|
-
|
100
|
+
screen_locale: {
|
101
101
|
where: {
|
102
|
-
|
102
|
+
locale: {
|
103
103
|
code: locale,
|
104
104
|
},
|
105
105
|
},
|
@@ -109,14 +109,14 @@ let ScreenService = class ScreenService {
|
|
109
109
|
},
|
110
110
|
},
|
111
111
|
},
|
112
|
-
}, '
|
112
|
+
}, 'screen_locale');
|
113
113
|
return result;
|
114
114
|
}
|
115
115
|
async get(screenId) {
|
116
|
-
return this.prismaService.
|
116
|
+
return this.prismaService.screen.findUnique({ where: { id: screenId } });
|
117
117
|
}
|
118
118
|
async create({ name, slug, description, icon }) {
|
119
|
-
return this.prismaService.
|
119
|
+
return this.prismaService.screen.create({
|
120
120
|
data: {
|
121
121
|
name,
|
122
122
|
slug,
|
@@ -126,7 +126,7 @@ let ScreenService = class ScreenService {
|
|
126
126
|
});
|
127
127
|
}
|
128
128
|
async update({ id, data }) {
|
129
|
-
return this.prismaService.
|
129
|
+
return this.prismaService.screen.update({
|
130
130
|
where: { id },
|
131
131
|
data,
|
132
132
|
});
|
@@ -135,7 +135,7 @@ let ScreenService = class ScreenService {
|
|
135
135
|
if (ids == undefined || ids == null) {
|
136
136
|
throw new common_1.BadRequestException(`You must select at least one screen to delete.`);
|
137
137
|
}
|
138
|
-
return this.prismaService.
|
138
|
+
return this.prismaService.screen.deleteMany({
|
139
139
|
where: {
|
140
140
|
id: {
|
141
141
|
in: ids,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"screen.service.js","sourceRoot":"","sources":["../../src/screen/screen.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AAOjB,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,QAAgB,EAAE,IAAkB;QACpD,MAAM,IAAI,CAAC,aAAa,CAAC,
|
1
|
+
{"version":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AE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAtKY,sCAAa;wBAAb,aAAa;IADzB,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,aAAa,CAsKzB"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const testing_1 = require("@nestjs/testing");
|
4
|
-
const screen_service_1 = require("./screen.service");
|
5
|
-
const prisma_1 = require("@hedhog/prisma");
|
6
3
|
const pagination_1 = require("@hedhog/pagination");
|
4
|
+
const prisma_1 = require("@hedhog/prisma");
|
7
5
|
const common_1 = require("@nestjs/common");
|
6
|
+
const testing_1 = require("@nestjs/testing");
|
7
|
+
const screen_service_1 = require("./screen.service");
|
8
8
|
describe('ScreenService', () => {
|
9
9
|
let service;
|
10
10
|
let prismaService;
|
@@ -22,10 +22,10 @@ describe('ScreenService', () => {
|
|
22
22
|
deleteMany: jest.fn(),
|
23
23
|
findUnique: jest.fn(),
|
24
24
|
},
|
25
|
-
|
25
|
+
route: {
|
26
26
|
findMany: jest.fn(),
|
27
27
|
},
|
28
|
-
|
28
|
+
role_screen: {
|
29
29
|
deleteMany: jest.fn(),
|
30
30
|
createMany: jest.fn(),
|
31
31
|
},
|
@@ -124,20 +124,20 @@ describe('ScreenService', () => {
|
|
124
124
|
});
|
125
125
|
});
|
126
126
|
describe('updateRoles', () => {
|
127
|
-
it('should update
|
127
|
+
it('should update role for a screen', async () => {
|
128
128
|
const screenId = 1;
|
129
129
|
const updateIdsDTO = { ids: [1, 2, 3] };
|
130
|
-
jest.spyOn(prismaService.
|
130
|
+
jest.spyOn(prismaService.role_screen, 'deleteMany').mockResolvedValue({
|
131
131
|
count: 1,
|
132
132
|
});
|
133
|
-
jest.spyOn(prismaService.
|
133
|
+
jest.spyOn(prismaService.role_screen, 'createMany').mockResolvedValue({
|
134
134
|
count: updateIdsDTO.ids.length,
|
135
135
|
});
|
136
136
|
await service.updateRoles(screenId, updateIdsDTO);
|
137
|
-
expect(prismaService.
|
137
|
+
expect(prismaService.role_screen.deleteMany).toHaveBeenCalledWith({
|
138
138
|
where: { screen_id: screenId },
|
139
139
|
});
|
140
|
-
expect(prismaService.
|
140
|
+
expect(prismaService.role_screen.createMany).toHaveBeenCalledWith({
|
141
141
|
data: updateIdsDTO.ids.map((roleId) => ({
|
142
142
|
screen_id: screenId,
|
143
143
|
role_id: roleId,
|
@@ -150,13 +150,13 @@ describe('ScreenService', () => {
|
|
150
150
|
it('should delete existing route_screens and create new ones', async () => {
|
151
151
|
const screenId = 1;
|
152
152
|
const updateIdsDTO = { ids: [1, 2, 3] };
|
153
|
-
prismaService.
|
153
|
+
prismaService.route.findMany = jest
|
154
154
|
.fn()
|
155
155
|
.mockResolvedValue([{ id: 1 }, { id: 2 }, { id: 3 }]);
|
156
156
|
prismaService.route_screens.deleteMany = jest.fn();
|
157
157
|
prismaService.route_screens.createMany = jest.fn();
|
158
158
|
await service.updateRoutes(screenId, updateIdsDTO);
|
159
|
-
expect(prismaService.
|
159
|
+
expect(prismaService.route.findMany).toHaveBeenCalledWith({
|
160
160
|
where: { id: { in: updateIdsDTO.ids } },
|
161
161
|
select: { id: true },
|
162
162
|
});
|
@@ -189,9 +189,9 @@ describe('ScreenService', () => {
|
|
189
189
|
total: 0,
|
190
190
|
});
|
191
191
|
await service.listRoles(locale, screenId, paginationParams);
|
192
|
-
expect(paginationService.paginate).toHaveBeenCalledWith(prismaService.
|
192
|
+
expect(paginationService.paginate).toHaveBeenCalledWith(prismaService.role, paginationParams, {
|
193
193
|
include: {
|
194
|
-
|
194
|
+
role_screen: {
|
195
195
|
where: {
|
196
196
|
screen_id: screenId,
|
197
197
|
},
|
@@ -205,7 +205,7 @@ describe('ScreenService', () => {
|
|
205
205
|
});
|
206
206
|
});
|
207
207
|
describe('listRoutes', () => {
|
208
|
-
it('should paginate the
|
208
|
+
it('should paginate the route linked to a screen', async () => {
|
209
209
|
const paginationParams = {
|
210
210
|
page: 1,
|
211
211
|
pageSize: 10,
|
@@ -228,7 +228,7 @@ describe('ScreenService', () => {
|
|
228
228
|
.spyOn(paginationService, 'paginate')
|
229
229
|
.mockResolvedValue(mockPaginationResult);
|
230
230
|
await service.listRoutes(screenId, paginationParams);
|
231
|
-
expect(paginationService.paginate).toHaveBeenCalledWith(prismaService.
|
231
|
+
expect(paginationService.paginate).toHaveBeenCalledWith(prismaService.route, paginationParams, {
|
232
232
|
include: {
|
233
233
|
route_screens: {
|
234
234
|
where: { screen_id: screenId },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"screen.service.spec.js","sourceRoot":"","sources":["../../src/screen/screen.service.spec.ts"],"names":[],"mappings":";;AAAA,
|
1
|
+
{"version":3,"file":"screen.service.spec.js","sourceRoot":"","sources":["../../src/screen/screen.service.spec.ts"],"names":[],"mappings":";;AAAA,mDAI4B;AAC5B,2CAA+C;AAC/C,2CAAqD;AACrD,6CAAsD;AAGtD,qDAAiD;AAEjD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,OAAsB,CAAC;IAC3B,IAAI,aAA4B,CAAC;IACjC,IAAI,iBAAoC,CAAC;IAEzC,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,SAAS,EAAE;gBACT,8BAAa;gBACb;oBACE,OAAO,EAAE,sBAAa;oBACtB,QAAQ,EAAE;wBACR,OAAO,EAAE;4BACP,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;4BACjB,MAAM,EAAE,IAAI,CAAC,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AGA,cAAM,OAAO;IAEX,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,UAAU;IAIrB,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB"}
|
@@ -9,9 +9,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.
|
13
|
-
const class_validator_1 = require("class-validator");
|
12
|
+
exports.SettingDTO = void 0;
|
14
13
|
const class_transformer_1 = require("class-transformer");
|
14
|
+
const class_validator_1 = require("class-validator");
|
15
15
|
class Setting {
|
16
16
|
}
|
17
17
|
__decorate([
|
@@ -22,13 +22,13 @@ __decorate([
|
|
22
22
|
(0, class_validator_1.IsString)(),
|
23
23
|
__metadata("design:type", String)
|
24
24
|
], Setting.prototype, "value", void 0);
|
25
|
-
class
|
25
|
+
class SettingDTO {
|
26
26
|
}
|
27
|
-
exports.
|
27
|
+
exports.SettingDTO = SettingDTO;
|
28
28
|
__decorate([
|
29
29
|
(0, class_validator_1.IsArray)(),
|
30
30
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
31
31
|
(0, class_transformer_1.Type)(() => Setting),
|
32
32
|
__metadata("design:type", Array)
|
33
|
-
],
|
34
|
-
//# sourceMappingURL=
|
33
|
+
], SettingDTO.prototype, "setting", void 0);
|
34
|
+
//# sourceMappingURL=setting.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"setting.dto.js","sourceRoot":"","sources":["../../../src/setting/dto/setting.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAAoE;AAEpE,MAAM,OAAO;CAMZ;AAJC;IADC,IAAA,0BAAQ,GAAE;;qCACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;sCACG;AAGhB,MAAa,UAAU;CAKtB;AALD,gCAKC;AADC;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;2CACD"}
|
@@ -1,25 +1,25 @@
|
|
1
1
|
import { DeleteDTO } from '../dto/delete.dto';
|
2
2
|
import { CreateDTO } from './dto/create.dto';
|
3
3
|
import { SettingUserDTO } from './dto/setting-user.dto';
|
4
|
-
import {
|
4
|
+
import { SettingDTO } from './dto/setting.dto';
|
5
5
|
import { UpdateDTO } from './dto/update.dto';
|
6
|
-
import {
|
6
|
+
import { SettingService } from './setting.service';
|
7
7
|
export declare class SettingsController {
|
8
|
-
private readonly
|
9
|
-
constructor(
|
8
|
+
private readonly settingService;
|
9
|
+
constructor(settingService: SettingService);
|
10
10
|
getSettingFromGroup(paginationParams: any, locale: any, slug: string): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
11
|
-
|
12
|
-
|
11
|
+
listSettingGroups(paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
12
|
+
listSettings(paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
13
13
|
show(settingId: number): Promise<any>;
|
14
14
|
create(data: CreateDTO): Promise<any>;
|
15
15
|
updateUserFromSlug(slug: string, { value }: SettingUserDTO, { id }: {
|
16
16
|
id: any;
|
17
17
|
}): Promise<any>;
|
18
18
|
updateFromSlug(slug: string, data: UpdateDTO): Promise<any>;
|
19
|
-
setManySettings(data:
|
19
|
+
setManySettings(data: SettingDTO): Promise<{
|
20
20
|
success: boolean;
|
21
21
|
}>;
|
22
22
|
update(settingId: number, data: UpdateDTO): Promise<any>;
|
23
23
|
delete(data: DeleteDTO): Promise<any>;
|
24
24
|
}
|
25
|
-
//# sourceMappingURL=
|
25
|
+
//# sourceMappingURL=setting.controller.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"setting.controller.d.ts","sourceRoot":"","sources":["../../src/setting/setting.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAEa,kBAAkB;IAG3B,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAI3C,mBAAmB,CACT,gBAAgB,KAAA,EACpB,MAAM,KAAA,EACD,IAAI,EAAE,MAAM;IAUvB,iBAAiB,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;IAKlE,YAAY,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;IAK7D,IAAI,CAAmC,SAAS,EAAE,MAAM;IAK9D,MAAM,CAAS,IAAI,EAAE,SAAS;IAKxB,kBAAkB,CACP,IAAI,EAAE,MAAM,EACnB,EAAE,KAAK,EAAE,EAAE,cAAc,EACzB,EAAE,EAAE,EAAE;;KAAA;IAMV,cAAc,CAAgB,IAAI,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;IAKnE,eAAe,CAAS,IAAI,EAAE,UAAU;;;IAKxC,MAAM,CACwB,SAAS,EAAE,MAAM,EAC3C,IAAI,EAAE,SAAS;IASnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
|
@@ -21,50 +21,50 @@ const locale_1 = require("../locale");
|
|
21
21
|
const role_decorator_1 = require("../role/decorators/role.decorator");
|
22
22
|
const create_dto_1 = require("./dto/create.dto");
|
23
23
|
const setting_user_dto_1 = require("./dto/setting-user.dto");
|
24
|
-
const
|
24
|
+
const setting_dto_1 = require("./dto/setting.dto");
|
25
25
|
const update_dto_1 = require("./dto/update.dto");
|
26
|
-
const
|
26
|
+
const setting_service_1 = require("./setting.service");
|
27
27
|
let SettingsController = class SettingsController {
|
28
|
-
constructor(
|
29
|
-
this.
|
28
|
+
constructor(settingService) {
|
29
|
+
this.settingService = settingService;
|
30
30
|
}
|
31
31
|
async getSettingFromGroup(paginationParams, locale, slug) {
|
32
|
-
return this.
|
32
|
+
return this.settingService.getSettingFromGroup(locale, paginationParams, slug);
|
33
33
|
}
|
34
|
-
async
|
35
|
-
return this.
|
34
|
+
async listSettingGroups(paginationParams, locale) {
|
35
|
+
return this.settingService.listSettingGroups(locale, paginationParams);
|
36
36
|
}
|
37
|
-
async
|
38
|
-
return this.
|
37
|
+
async listSettings(paginationParams, locale) {
|
38
|
+
return this.settingService.listSettings(locale, paginationParams);
|
39
39
|
}
|
40
40
|
async show(settingId) {
|
41
|
-
return this.
|
41
|
+
return this.settingService.get(settingId);
|
42
42
|
}
|
43
43
|
create(data) {
|
44
|
-
return this.
|
44
|
+
return this.settingService.create(data);
|
45
45
|
}
|
46
46
|
async updateUserFromSlug(slug, { value }, { id }) {
|
47
|
-
return this.
|
47
|
+
return this.settingService.setSettingUserValue(id, slug, value);
|
48
48
|
}
|
49
49
|
async updateFromSlug(slug, data) {
|
50
|
-
return this.
|
50
|
+
return this.settingService.updateFromSlug(slug, data);
|
51
51
|
}
|
52
52
|
async setManySettings(data) {
|
53
|
-
return this.
|
53
|
+
return this.settingService.setManySettings(data);
|
54
54
|
}
|
55
55
|
async update(settingId, data) {
|
56
|
-
return this.
|
56
|
+
return this.settingService.update({
|
57
57
|
id: settingId,
|
58
58
|
data,
|
59
59
|
});
|
60
60
|
}
|
61
61
|
async delete(data) {
|
62
|
-
return this.
|
62
|
+
return this.settingService.delete(data);
|
63
63
|
}
|
64
64
|
};
|
65
65
|
exports.SettingsController = SettingsController;
|
66
66
|
__decorate([
|
67
|
-
(0, common_1.Get)('
|
67
|
+
(0, common_1.Get)('group/:slug'),
|
68
68
|
__param(0, (0, pagination_1.Pagination)()),
|
69
69
|
__param(1, (0, locale_1.Locale)()),
|
70
70
|
__param(2, (0, common_1.Param)('slug')),
|
@@ -73,13 +73,13 @@ __decorate([
|
|
73
73
|
__metadata("design:returntype", Promise)
|
74
74
|
], SettingsController.prototype, "getSettingFromGroup", null);
|
75
75
|
__decorate([
|
76
|
-
(0, common_1.Get)('
|
76
|
+
(0, common_1.Get)('group'),
|
77
77
|
__param(0, (0, pagination_1.Pagination)()),
|
78
78
|
__param(1, (0, locale_1.Locale)()),
|
79
79
|
__metadata("design:type", Function),
|
80
80
|
__metadata("design:paramtypes", [Object, Object]),
|
81
81
|
__metadata("design:returntype", Promise)
|
82
|
-
], SettingsController.prototype, "
|
82
|
+
], SettingsController.prototype, "listSettingGroups", null);
|
83
83
|
__decorate([
|
84
84
|
(0, common_1.Get)(),
|
85
85
|
__param(0, (0, pagination_1.Pagination)()),
|
@@ -87,7 +87,7 @@ __decorate([
|
|
87
87
|
__metadata("design:type", Function),
|
88
88
|
__metadata("design:paramtypes", [Object, Object]),
|
89
89
|
__metadata("design:returntype", Promise)
|
90
|
-
], SettingsController.prototype, "
|
90
|
+
], SettingsController.prototype, "listSettings", null);
|
91
91
|
__decorate([
|
92
92
|
(0, common_1.Get)(':settingId'),
|
93
93
|
__param(0, (0, common_1.Param)('settingId', common_1.ParseIntPipe)),
|
@@ -103,7 +103,7 @@ __decorate([
|
|
103
103
|
__metadata("design:returntype", void 0)
|
104
104
|
], SettingsController.prototype, "create", null);
|
105
105
|
__decorate([
|
106
|
-
(0, common_1.Put)('
|
106
|
+
(0, common_1.Put)('user/:slug'),
|
107
107
|
__param(0, (0, common_1.Param)('slug')),
|
108
108
|
__param(1, (0, common_1.Body)()),
|
109
109
|
__param(2, (0, user_decorator_1.User)()),
|
@@ -123,7 +123,7 @@ __decorate([
|
|
123
123
|
(0, common_1.Put)(),
|
124
124
|
__param(0, (0, common_1.Body)()),
|
125
125
|
__metadata("design:type", Function),
|
126
|
-
__metadata("design:paramtypes", [
|
126
|
+
__metadata("design:paramtypes", [setting_dto_1.SettingDTO]),
|
127
127
|
__metadata("design:returntype", Promise)
|
128
128
|
], SettingsController.prototype, "setManySettings", null);
|
129
129
|
__decorate([
|
@@ -143,8 +143,8 @@ __decorate([
|
|
143
143
|
], SettingsController.prototype, "delete", null);
|
144
144
|
exports.SettingsController = SettingsController = __decorate([
|
145
145
|
(0, role_decorator_1.Role)(),
|
146
|
-
(0, common_1.Controller)('
|
147
|
-
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() =>
|
148
|
-
__metadata("design:paramtypes", [
|
146
|
+
(0, common_1.Controller)('setting'),
|
147
|
+
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => setting_service_1.SettingService))),
|
148
|
+
__metadata("design:paramtypes", [setting_service_1.SettingService])
|
149
149
|
], SettingsController);
|
150
|
-
//# sourceMappingURL=
|
150
|
+
//# sourceMappingURL=setting.controller.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"setting.controller.js","sourceRoot":"","sources":["../../src/setting/setting.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAYwB;AACxB,sEAAyD;AACzD,kDAA8C;AAC9C,sCAAmC;AACnC,sEAAyD;AACzD,iDAA6C;AAC7C,6DAAwD;AACxD,mDAA+C;AAC/C,iDAA6C;AAC7C,uDAAmD;AAI5C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAEmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;IAC9C,CAAC;IAGE,AAAN,KAAK,CAAC,mBAAmB,CACT,gBAAgB,EACpB,MAAM,EACD,IAAY;QAE3B,OAAO,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAC5C,MAAM,EACN,gBAAgB,EAChB,IAAI,CACL,CAAC;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,iBAAiB,CAAe,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,sBAAS;;gDAMxB;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;gDAEnC;6BAxEU,kBAAkB;IAF9B,IAAA,qBAAI,GAAE;IACN,IAAA,mBAAU,EAAC,SAAS,CAAC;IAGjB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,gCAAc,CAAC,CAAC,CAAA;qCACR,gCAAc;GAHtC,kBAAkB,CAyE9B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"setting.module.d.ts","sourceRoot":"","sources":["../../src/setting/setting.module.ts"],"names":[],"mappings":"AAOA,qBAUa,aAAa;CAAG"}
|
@@ -10,17 +10,17 @@ exports.SettingModule = void 0;
|
|
10
10
|
const pagination_1 = require("@hedhog/pagination");
|
11
11
|
const prisma_1 = require("@hedhog/prisma");
|
12
12
|
const common_1 = require("@nestjs/common");
|
13
|
-
const settings_controller_1 = require("./settings.controller");
|
14
|
-
const settings_service_1 = require("./settings.service");
|
15
13
|
const auth_module_1 = require("../auth/auth.module");
|
14
|
+
const setting_controller_1 = require("./setting.controller");
|
15
|
+
const setting_service_1 = require("./setting.service");
|
16
16
|
let SettingModule = class SettingModule {
|
17
17
|
};
|
18
18
|
exports.SettingModule = SettingModule;
|
19
19
|
exports.SettingModule = SettingModule = __decorate([
|
20
20
|
(0, common_1.Module)({
|
21
|
-
providers: [
|
22
|
-
exports: [
|
23
|
-
controllers: [
|
21
|
+
providers: [setting_service_1.SettingService],
|
22
|
+
exports: [setting_service_1.SettingService],
|
23
|
+
controllers: [setting_controller_1.SettingsController],
|
24
24
|
imports: [
|
25
25
|
(0, common_1.forwardRef)(() => auth_module_1.AuthModule),
|
26
26
|
(0, common_1.forwardRef)(() => prisma_1.PrismaModule),
|
@@ -28,4 +28,4 @@ exports.SettingModule = SettingModule = __decorate([
|
|
28
28
|
],
|
29
29
|
})
|
30
30
|
], SettingModule);
|
31
|
-
//# sourceMappingURL=
|
31
|
+
//# sourceMappingURL=setting.module.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"setting.module.js","sourceRoot":"","sources":["../../src/setting/setting.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,qDAAiD;AACjD,6DAA0D;AAC1D,uDAAmD;AAY5C,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAVzB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,gCAAc,CAAC;QAC3B,OAAO,EAAE,CAAC,gCAAc,CAAC;QACzB,WAAW,EAAE,CAAC,uCAAkB,CAAC;QACjC,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;SACnC;KACF,CAAC;GACW,aAAa,CAAG"}
|
@@ -2,18 +2,18 @@ import { PaginationDTO, PaginationService } from '@hedhog/pagination';
|
|
2
2
|
import { PrismaService } from '@hedhog/prisma';
|
3
3
|
import { DeleteDTO } from '../dto/delete.dto';
|
4
4
|
import { CreateDTO } from './dto/create.dto';
|
5
|
-
import {
|
5
|
+
import { SettingDTO } from './dto/setting.dto';
|
6
6
|
import { UpdateDTO } from './dto/update.dto';
|
7
|
-
export declare class
|
7
|
+
export declare class SettingService {
|
8
8
|
private readonly prismaService;
|
9
9
|
private readonly paginationService;
|
10
10
|
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
11
|
-
setManySettings(data:
|
11
|
+
setManySettings(data: SettingDTO): Promise<{
|
12
12
|
success: boolean;
|
13
13
|
}>;
|
14
14
|
getSettingFromGroup(locale: any, paginationParams: any, slug: string): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
15
|
-
|
16
|
-
|
15
|
+
listSettingGroups(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
16
|
+
listSettings(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
17
17
|
get(settingId: number): Promise<any>;
|
18
18
|
create({}: CreateDTO): Promise<any>;
|
19
19
|
update({ id, data }: {
|
@@ -25,4 +25,4 @@ export declare class SettingsService {
|
|
25
25
|
setSettingUserValue(user_id: number, slug: string, value: string): Promise<any>;
|
26
26
|
getSettingValues(slug: string | string[]): Promise<Record<string, any>>;
|
27
27
|
}
|
28
|
-
//# sourceMappingURL=
|
28
|
+
//# sourceMappingURL=setting.service.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"setting.service.d.ts","sourceRoot":"","sources":["../../src/setting/setting.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAQ/C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,eAAe,CAAC,IAAI,EAAE,UAAU;;;IAehC,mBAAmB,CAAC,MAAM,EAAE,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM;IAiEpE,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAA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