@hedhog/admin 0.0.103 → 0.0.105

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/README.md +141 -141
  2. package/dist/admin.module.js +7 -7
  3. package/dist/admin.module.js.map +1 -1
  4. package/dist/auth/auth.service.d.ts +1 -1
  5. package/dist/auth/auth.service.d.ts.map +1 -1
  6. package/dist/auth/auth.service.js +8 -8
  7. package/dist/auth/auth.service.js.map +1 -1
  8. package/dist/auth/auth.service.spec.js +16 -16
  9. package/dist/auth/auth.service.spec.js.map +1 -1
  10. package/dist/dto/with-locale.dto.d.ts +4 -0
  11. package/dist/dto/with-locale.dto.d.ts.map +1 -0
  12. package/dist/dto/{with-locales.dto.js → with-locale.dto.js} +5 -5
  13. package/dist/dto/with-locale.dto.js.map +1 -0
  14. package/dist/index.d.ts +2 -2
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/locale/locale.controller.js +1 -1
  19. package/dist/locale/locale.controller.js.map +1 -1
  20. package/dist/locale/locale.middleware.d.ts +1 -1
  21. package/dist/locale/locale.middleware.d.ts.map +1 -1
  22. package/dist/locale/locale.middleware.js +2 -2
  23. package/dist/locale/locale.middleware.js.map +1 -1
  24. package/dist/locale/locale.service.d.ts +6 -6
  25. package/dist/locale/locale.service.d.ts.map +1 -1
  26. package/dist/locale/locale.service.js +40 -40
  27. package/dist/locale/locale.service.js.map +1 -1
  28. package/dist/locale/locale.service.spec.js +14 -14
  29. package/dist/locale/locale.service.spec.js.map +1 -1
  30. package/dist/menu/menu.controller.js +3 -3
  31. package/dist/menu/menu.controller.js.map +1 -1
  32. package/dist/menu/menu.service.d.ts +3 -3
  33. package/dist/menu/menu.service.d.ts.map +1 -1
  34. package/dist/menu/menu.service.js +35 -35
  35. package/dist/menu/menu.service.js.map +1 -1
  36. package/dist/menu/menu.service.spec.js +33 -37
  37. package/dist/menu/menu.service.spec.js.map +1 -1
  38. package/dist/role/dto/create.dto.d.ts +2 -2
  39. package/dist/role/dto/create.dto.d.ts.map +1 -1
  40. package/dist/role/dto/create.dto.js +2 -2
  41. package/dist/role/dto/create.dto.js.map +1 -1
  42. package/dist/role/guards/role.guard.js +4 -4
  43. package/dist/role/guards/role.guard.js.map +1 -1
  44. package/dist/role/role.controller.js +7 -7
  45. package/dist/role/role.controller.js.map +1 -1
  46. package/dist/role/role.service.d.ts +2 -2
  47. package/dist/role/role.service.d.ts.map +1 -1
  48. package/dist/role/role.service.js +35 -35
  49. package/dist/role/role.service.js.map +1 -1
  50. package/dist/role/role.service.spec.d.ts +0 -1
  51. package/dist/role/role.service.spec.js +400 -340
  52. package/dist/role/role.service.spec.js.map +1 -1
  53. package/dist/route/route.controller.js +3 -3
  54. package/dist/route/route.controller.js.map +1 -1
  55. package/dist/route/route.service.d.ts +2 -2
  56. package/dist/route/route.service.d.ts.map +1 -1
  57. package/dist/route/route.service.js +18 -18
  58. package/dist/route/route.service.js.map +1 -1
  59. package/dist/route/route.service.spec.js +27 -27
  60. package/dist/route/route.service.spec.js.map +1 -1
  61. package/dist/screen/screen.controller.js +4 -4
  62. package/dist/screen/screen.controller.js.map +1 -1
  63. package/dist/screen/screen.service.d.ts +2 -2
  64. package/dist/screen/screen.service.d.ts.map +1 -1
  65. package/dist/screen/screen.service.js +16 -16
  66. package/dist/screen/screen.service.js.map +1 -1
  67. package/dist/screen/screen.service.spec.js +16 -16
  68. package/dist/screen/screen.service.spec.js.map +1 -1
  69. package/dist/setting/dto/setting.dto.d.ts +9 -0
  70. package/dist/setting/dto/setting.dto.d.ts.map +1 -0
  71. package/dist/setting/dto/{settings.dto.js → setting.dto.js} +6 -6
  72. package/dist/setting/dto/setting.dto.js.map +1 -0
  73. package/dist/setting/{settings.controller.d.ts → setting.controller.d.ts} +6 -6
  74. package/dist/setting/setting.controller.d.ts.map +1 -0
  75. package/dist/setting/{settings.controller.js → setting.controller.js} +20 -20
  76. package/dist/setting/setting.controller.js.map +1 -0
  77. package/dist/setting/setting.module.d.ts +3 -0
  78. package/dist/setting/setting.module.d.ts.map +1 -0
  79. package/dist/setting/{settings.module.js → setting.module.js} +6 -6
  80. package/dist/setting/setting.module.js.map +1 -0
  81. package/dist/setting/{settings.service.d.ts → setting.service.d.ts} +4 -4
  82. package/dist/setting/setting.service.d.ts.map +1 -0
  83. package/dist/setting/{settings.service.js → setting.service.js} +42 -42
  84. package/dist/setting/setting.service.js.map +1 -0
  85. package/dist/setting/setting.service.spec.d.ts +2 -0
  86. package/dist/setting/setting.service.spec.d.ts.map +1 -0
  87. package/dist/setting/{settings.service.spec.js → setting.service.spec.js} +17 -17
  88. package/dist/setting/setting.service.spec.js.map +1 -0
  89. package/dist/user/user.controller.js +3 -3
  90. package/dist/user/user.controller.js.map +1 -1
  91. package/dist/user/user.service.d.ts +2 -2
  92. package/dist/user/user.service.d.ts.map +1 -1
  93. package/dist/user/user.service.js +9 -9
  94. package/dist/user/user.service.js.map +1 -1
  95. package/dist/user/user.service.spec.js +24 -24
  96. package/dist/user/user.service.spec.js.map +1 -1
  97. package/package.json +2 -2
  98. package/src/admin.module.ts +36 -0
  99. package/src/auth/auth.controller.ts +48 -0
  100. package/src/auth/auth.module.ts +39 -0
  101. package/src/auth/auth.service.spec.ts +196 -0
  102. package/src/auth/auth.service.ts +175 -0
  103. package/src/auth/decorators/public.decorator.ts +4 -0
  104. package/src/auth/decorators/user.decorator.ts +17 -0
  105. package/src/auth/dto/forget.dto.ts +6 -0
  106. package/src/auth/dto/login.dto.ts +15 -0
  107. package/src/auth/dto/otp.dto.ts +11 -0
  108. package/src/auth/enums/multifactor-type.enum.ts +4 -0
  109. package/src/auth/guards/auth.guard.ts +50 -0
  110. package/src/auth/types/user.type.ts +8 -0
  111. package/src/dto/delete.dto.ts +8 -0
  112. package/src/dto/update-ids.dto.ts +9 -0
  113. package/src/dto/with-locale.dto.ts +8 -0
  114. package/src/index.ts +34 -0
  115. package/src/locale/dto/create.dto.ts +12 -0
  116. package/src/locale/dto/delete.dto.ts +8 -0
  117. package/src/locale/dto/set-enabled.dto.ts +9 -0
  118. package/src/locale/dto/update.dto.ts +15 -0
  119. package/src/locale/index.ts +4 -0
  120. package/src/locale/locale.controller.ts +79 -0
  121. package/src/locale/locale.decorator.ts +8 -0
  122. package/src/locale/locale.middleware.ts +34 -0
  123. package/src/locale/locale.module.ts +23 -0
  124. package/src/locale/locale.service.spec.ts +193 -0
  125. package/src/locale/locale.service.ts +366 -0
  126. package/src/menu/dto/create.dto.ts +25 -0
  127. package/src/menu/dto/order.dto.ts +8 -0
  128. package/src/menu/dto/update.dto.ts +19 -0
  129. package/src/menu/menu.controller.ts +106 -0
  130. package/src/menu/menu.module.ts +18 -0
  131. package/src/menu/menu.service.spec.ts +247 -0
  132. package/src/menu/menu.service.ts +263 -0
  133. package/src/role/decorators/role.decorator.ts +4 -0
  134. package/src/role/dto/create.dto.ts +7 -0
  135. package/src/role/dto/update.dto.ts +4 -0
  136. package/src/role/guards/role.guard.ts +122 -0
  137. package/src/role/role.controller.ts +126 -0
  138. package/src/role/role.module.ts +28 -0
  139. package/src/role/role.service.spec.ts +417 -0
  140. package/src/role/role.service.ts +302 -0
  141. package/src/route/dto/create.dto.ts +13 -0
  142. package/src/route/dto/update.dto.ts +15 -0
  143. package/src/route/route.controller.ts +91 -0
  144. package/src/route/route.module.ts +18 -0
  145. package/src/route/route.service.spec.ts +299 -0
  146. package/src/route/route.service.ts +164 -0
  147. package/src/screen/dto/create.dto.ts +19 -0
  148. package/src/screen/dto/update.dto.ts +19 -0
  149. package/src/screen/screen.controller.ts +93 -0
  150. package/src/screen/screen.module.ts +18 -0
  151. package/src/screen/screen.service.spec.ts +298 -0
  152. package/src/screen/screen.service.ts +181 -0
  153. package/src/setting/dto/create.dto.ts +1 -0
  154. package/src/setting/dto/setting-user.dto.ts +6 -0
  155. package/src/setting/dto/setting.dto.ts +17 -0
  156. package/src/setting/dto/update.dto.ts +3 -0
  157. package/src/setting/setting.controller.ts +100 -0
  158. package/src/setting/setting.module.ts +18 -0
  159. package/src/setting/setting.service.spec.ts +183 -0
  160. package/src/setting/setting.service.ts +346 -0
  161. package/src/types/http-method.ts +8 -0
  162. package/src/user/constants/user.constants.ts +1 -0
  163. package/src/user/dto/create.dto.ts +24 -0
  164. package/src/user/dto/update.dto.ts +41 -0
  165. package/src/user/user.controller.ts +75 -0
  166. package/src/user/user.module.ts +18 -0
  167. package/src/user/user.service.spec.ts +294 -0
  168. package/src/user/user.service.ts +129 -0
  169. package/tsconfig.lib.json +9 -0
  170. package/tsconfig.production.json +20 -0
  171. package/dist/dto/with-locales.dto.d.ts +0 -4
  172. package/dist/dto/with-locales.dto.d.ts.map +0 -1
  173. package/dist/dto/with-locales.dto.js.map +0 -1
  174. package/dist/setting/dto/settings.dto.d.ts +0 -9
  175. package/dist/setting/dto/settings.dto.d.ts.map +0 -1
  176. package/dist/setting/dto/settings.dto.js.map +0 -1
  177. package/dist/setting/settings.controller.d.ts.map +0 -1
  178. package/dist/setting/settings.controller.js.map +0 -1
  179. package/dist/setting/settings.module.d.ts +0 -3
  180. package/dist/setting/settings.module.d.ts.map +0 -1
  181. package/dist/setting/settings.module.js.map +0 -1
  182. package/dist/setting/settings.service.d.ts.map +0 -1
  183. package/dist/setting/settings.service.js.map +0 -1
  184. package/dist/setting/settings.service.spec.d.ts +0 -2
  185. package/dist/setting/settings.service.spec.d.ts.map +0 -1
  186. package/dist/setting/settings.service.spec.js.map +0 -1
@@ -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,IAA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M,CAAC,UAAU,CAAC;YAC1C,KAAK,EAAE;gBACL,EAAE,EAAE;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
- routes: {
25
+ route: {
26
26
  findMany: jest.fn(),
27
27
  },
28
- role_screens: {
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 roles for a screen', async () => {
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.role_screens, 'deleteMany').mockResolvedValue({
130
+ jest.spyOn(prismaService.role_screen, 'deleteMany').mockResolvedValue({
131
131
  count: 1,
132
132
  });
133
- jest.spyOn(prismaService.role_screens, 'createMany').mockResolvedValue({
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.role_screens.deleteMany).toHaveBeenCalledWith({
137
+ expect(prismaService.role_screen.deleteMany).toHaveBeenCalledWith({
138
138
  where: { screen_id: screenId },
139
139
  });
140
- expect(prismaService.role_screens.createMany).toHaveBeenCalledWith({
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.routes.findMany = jest
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.routes.findMany).toHaveBeenCalledWith({
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.roles, paginationParams, {
192
+ expect(paginationService.paginate).toHaveBeenCalledWith(prismaService.role, paginationParams, {
193
193
  include: {
194
- role_screens: {
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 routes linked to a screen', async () => {
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.routes, paginationParams, {
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,6CAAsD;AACtD,qDAAiD;AACjD,2CAA+C;AAC/C,mDAI4B;AAC5B,2CAAqD;AAIrD,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,EAAE,EAAE;4BACjB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;4BACrB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;yBACtB;wBACD,MAAM,EAAE;4BACN,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE;yBACpB;wBACD,YAAY,EAAE;4BACZ,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;4BACrB,UAAU,EAAE,IAA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ACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ declare class Setting {
2
+ slug: string;
3
+ value: string;
4
+ }
5
+ export declare class SettingDTO {
6
+ setting: Setting[];
7
+ }
8
+ export {};
9
+ //# sourceMappingURL=setting.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setting.dto.d.ts","sourceRoot":"","sources":["../../../src/setting/dto/setting.dto.ts"],"names":[],"mappings":"AAGA,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.SettingsDTO = void 0;
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 SettingsDTO {
25
+ class SettingDTO {
26
26
  }
27
- exports.SettingsDTO = SettingsDTO;
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
- ], SettingsDTO.prototype, "settings", void 0);
34
- //# sourceMappingURL=settings.dto.js.map
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,12 +1,12 @@
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 { SettingsDTO } from './dto/settings.dto';
4
+ import { SettingDTO } from './dto/setting.dto';
5
5
  import { UpdateDTO } from './dto/update.dto';
6
- import { SettingsService } from './settings.service';
6
+ import { SettingService } from './setting.service';
7
7
  export declare class SettingsController {
8
- private readonly settingsService;
9
- constructor(settingsService: SettingsService);
8
+ private readonly settingService;
9
+ constructor(settingService: SettingService);
10
10
  getSettingFromGroup(paginationParams: any, locale: any, slug: string): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
11
11
  getSettingGroups(paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
12
12
  getSettings(paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
@@ -16,10 +16,10 @@ export declare class SettingsController {
16
16
  id: any;
17
17
  }): Promise<any>;
18
18
  updateFromSlug(slug: string, data: UpdateDTO): Promise<any>;
19
- setManySettings(data: SettingsDTO): Promise<{
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=settings.controller.d.ts.map
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,gBAAgB,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;IAKjE,WAAW,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;IAK5D,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,45 +21,45 @@ 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 settings_dto_1 = require("./dto/settings.dto");
24
+ const setting_dto_1 = require("./dto/setting.dto");
25
25
  const update_dto_1 = require("./dto/update.dto");
26
- const settings_service_1 = require("./settings.service");
26
+ const setting_service_1 = require("./setting.service");
27
27
  let SettingsController = class SettingsController {
28
- constructor(settingsService) {
29
- this.settingsService = settingsService;
28
+ constructor(settingService) {
29
+ this.settingService = settingService;
30
30
  }
31
31
  async getSettingFromGroup(paginationParams, locale, slug) {
32
- return this.settingsService.getSettingFromGroup(locale, paginationParams, slug);
32
+ return this.settingService.getSettingFromGroup(locale, paginationParams, slug);
33
33
  }
34
34
  async getSettingGroups(paginationParams, locale) {
35
- return this.settingsService.getSettingGroups(locale, paginationParams);
35
+ return this.settingService.getSettingGroups(locale, paginationParams);
36
36
  }
37
37
  async getSettings(paginationParams, locale) {
38
- return this.settingsService.getSettings(locale, paginationParams);
38
+ return this.settingService.getSettings(locale, paginationParams);
39
39
  }
40
40
  async show(settingId) {
41
- return this.settingsService.get(settingId);
41
+ return this.settingService.get(settingId);
42
42
  }
43
43
  create(data) {
44
- return this.settingsService.create(data);
44
+ return this.settingService.create(data);
45
45
  }
46
46
  async updateUserFromSlug(slug, { value }, { id }) {
47
- return this.settingsService.setSettingUserValue(id, slug, value);
47
+ return this.settingService.setSettingUserValue(id, slug, value);
48
48
  }
49
49
  async updateFromSlug(slug, data) {
50
- return this.settingsService.updateFromSlug(slug, data);
50
+ return this.settingService.updateFromSlug(slug, data);
51
51
  }
52
52
  async setManySettings(data) {
53
- return this.settingsService.setManySettings(data);
53
+ return this.settingService.setManySettings(data);
54
54
  }
55
55
  async update(settingId, data) {
56
- return this.settingsService.update({
56
+ return this.settingService.update({
57
57
  id: settingId,
58
58
  data,
59
59
  });
60
60
  }
61
61
  async delete(data) {
62
- return this.settingsService.delete(data);
62
+ return this.settingService.delete(data);
63
63
  }
64
64
  };
65
65
  exports.SettingsController = SettingsController;
@@ -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)('users/:slug'),
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", [settings_dto_1.SettingsDTO]),
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)('settings'),
147
- __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => settings_service_1.SettingsService))),
148
- __metadata("design:paramtypes", [settings_service_1.SettingsService])
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=settings.controller.js.map
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,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AM,CAAC,CAAA;IAAgB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;wDAExE;AAGK;IADL,IAAA,YAAG,GAAE;IACiB,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,wBAAU;;yDAE7C;AAGK;IADL,IAAA,cAAK,EAAC,YAAY,CAAC;IAEjB,WAAA,IAAA,cAAK,EAAC,WAAW,EAAE,qBAAY,CAAC,CAAA;IAChC,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,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,3 @@
1
+ export declare class SettingModule {
2
+ }
3
+ //# sourceMappingURL=setting.module.d.ts.map
@@ -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: [settings_service_1.SettingsService],
22
- exports: [settings_service_1.SettingsService],
23
- controllers: [settings_controller_1.SettingsController],
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=settings.module.js.map
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,13 +2,13 @@ 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 { SettingsDTO } from './dto/settings.dto';
5
+ import { SettingDTO } from './dto/setting.dto';
6
6
  import { UpdateDTO } from './dto/update.dto';
7
- export declare class SettingsService {
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: SettingsDTO): Promise<{
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>>;
@@ -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=settings.service.d.ts.map
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,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aA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