@hedhog/admin 0.0.37 → 0.0.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. package/dist/admin.module.d.ts.map +1 -1
  2. package/dist/admin.module.js +2 -0
  3. package/dist/admin.module.js.map +1 -1
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +3 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/locale/dto/create.dto.d.ts +7 -0
  9. package/dist/locale/dto/create.dto.d.ts.map +1 -0
  10. package/dist/locale/dto/create.dto.js +33 -0
  11. package/dist/locale/dto/create.dto.js.map +1 -0
  12. package/dist/locale/dto/delete.dto.d.ts +4 -0
  13. package/dist/locale/dto/delete.dto.d.ts.map +1 -0
  14. package/dist/locale/dto/delete.dto.js +23 -0
  15. package/dist/locale/dto/delete.dto.js.map +1 -0
  16. package/dist/locale/dto/update.dto.d.ts +7 -0
  17. package/dist/locale/dto/update.dto.d.ts.map +1 -0
  18. package/dist/locale/dto/update.dto.js +37 -0
  19. package/dist/locale/dto/update.dto.js.map +1 -0
  20. package/dist/locale/index.d.ts +5 -0
  21. package/dist/locale/index.d.ts.map +1 -0
  22. package/dist/locale/index.js +21 -0
  23. package/dist/locale/index.js.map +1 -0
  24. package/dist/locale/locale.controller.d.ts +16 -0
  25. package/dist/locale/locale.controller.d.ts.map +1 -0
  26. package/dist/locale/locale.controller.js +110 -0
  27. package/dist/locale/locale.controller.js.map +1 -0
  28. package/dist/locale/locale.decorator.d.ts +2 -0
  29. package/dist/locale/locale.decorator.d.ts.map +1 -0
  30. package/dist/locale/locale.decorator.js +9 -0
  31. package/dist/locale/locale.decorator.js.map +1 -0
  32. package/dist/locale/locale.middleware.d.ts +10 -0
  33. package/dist/locale/locale.middleware.d.ts.map +1 -0
  34. package/dist/locale/locale.middleware.js +45 -0
  35. package/dist/locale/locale.middleware.js.map +1 -0
  36. package/dist/locale/locale.module.d.ts +5 -0
  37. package/dist/locale/locale.module.d.ts.map +1 -0
  38. package/dist/locale/locale.module.js +35 -0
  39. package/dist/locale/locale.module.js.map +1 -0
  40. package/dist/locale/locale.service.d.ts +26 -0
  41. package/dist/locale/locale.service.d.ts.map +1 -0
  42. package/dist/locale/locale.service.js +166 -0
  43. package/dist/locale/locale.service.js.map +1 -0
  44. package/dist/menu/menu.controller.js +1 -1
  45. package/dist/menu/menu.controller.js.map +1 -1
  46. package/dist/role/role.controller.d.ts.map +1 -1
  47. package/dist/role/role.controller.js +1 -1
  48. package/dist/role/role.controller.js.map +1 -1
  49. package/dist/route/route.controller.js +1 -1
  50. package/dist/route/route.controller.js.map +1 -1
  51. package/dist/screen/screen.controller.js +1 -1
  52. package/dist/screen/screen.controller.js.map +1 -1
  53. package/package.json +1 -3
  54. package/src/migrations/migrate-01.ts +271 -127
  55. package/src/migrations/migrate-02.ts +137 -236
  56. package/src/migrations/migrate-03.ts +98 -192
  57. package/src/migrations/migrate-04.ts +167 -197
  58. package/src/migrations/migrate-05.ts +185 -42
  59. package/src/migrations/migrate-06.ts +245 -33
  60. package/src/migrations/migrate-07.ts +87 -21
  61. package/src/migrations/migrate-08.ts +8 -8
  62. package/src/migrations/migrate-09.ts +13 -14
  63. package/src/migrations/migrate-10.ts +8 -8
  64. package/src/migrations/migrate-11.ts +46 -17
  65. package/src/migrations/migrate-12.ts +46 -71
  66. package/src/migrations/migrate-13.ts +15 -9
  67. package/src/migrations/migrate-14.ts +55 -33
  68. package/src/migrations/migrate-15.ts +9 -16
  69. package/src/migrations/migrate-16.ts +37 -17
  70. package/src/migrations/migrate-17.ts +20 -169
  71. package/src/migrations/migrate-18.ts +30 -191
  72. package/src/migrations/migrate-19.ts +176 -0
  73. package/src/migrations/migrate-20.ts +198 -0
@@ -1 +1 @@
1
- {"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":"AAWA,qBAsBa,WAAW;CAAG"}
1
+ {"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":"AAYA,qBAuBa,WAAW;CAAG"}
@@ -17,6 +17,7 @@ const user_module_1 = require("./user/user.module");
17
17
  const role_module_1 = require("./role/role.module");
18
18
  const route_module_1 = require("./route/route.module");
19
19
  const settings_module_1 = require("./setting/settings.module");
20
+ const locale_1 = require("./locale");
20
21
  let AdminModule = class AdminModule {
21
22
  };
22
23
  exports.AdminModule = AdminModule;
@@ -31,6 +32,7 @@ exports.AdminModule = AdminModule = __decorate([
31
32
  (0, common_1.forwardRef)(() => prisma_1.PrismaModule),
32
33
  (0, common_1.forwardRef)(() => screen_module_1.ScreenModule),
33
34
  (0, common_1.forwardRef)(() => settings_module_1.SettingModule),
35
+ (0, common_1.forwardRef)(() => locale_1.LocaleModule),
34
36
  (0, common_1.forwardRef)(() => user_module_1.UserModule),
35
37
  ],
36
38
  exports: [
@@ -1 +1 @@
1
- {"version":3,"file":"admin.module.js","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA8C;AAC9C,mDAAsD;AACtD,2CAAoD;AACpD,oDAAgD;AAChD,oDAAgD;AAChD,0DAAsD;AACtD,oDAAgD;AAChD,oDAAgD;AAChD,uDAAmD;AACnD,+DAA0D;AAwBnD,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IAtBvB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;YAClC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC;YAC7B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,+BAAa,CAAC;YAC/B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;SAC7B;QACD,OAAO,EAAE;YACP,wBAAU;YACV,wBAAU;YACV,0BAAW;YACX,wBAAU;YACV,wBAAU;YACV,+BAAa;YACb,4BAAY;SACb;KACF,CAAC;GACW,WAAW,CAAG"}
1
+ {"version":3,"file":"admin.module.js","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA8C;AAC9C,mDAAsD;AACtD,2CAAoD;AACpD,oDAAgD;AAChD,oDAAgD;AAChD,0DAAsD;AACtD,oDAAgD;AAChD,oDAAgD;AAChD,uDAAmD;AACnD,+DAA0D;AAC1D,qCAAwC;AAyBjC,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IAvBvB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;YAClC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC;YAC7B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,+BAAa,CAAC;YAC/B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;SAC7B;QACD,OAAO,EAAE;YACP,wBAAU;YACV,wBAAU;YACV,0BAAW;YACX,wBAAU;YACV,wBAAU;YACV,+BAAa;YACb,4BAAY;SACb;KACF,CAAC;GACW,WAAW,CAAG"}
package/dist/index.d.ts CHANGED
@@ -11,4 +11,6 @@ export * from './screen/screen.service';
11
11
  export * from './setting/settings.service';
12
12
  export * from './user/constants/user.constants';
13
13
  export * from './user/user.service';
14
+ export * from './locale/locale.service';
15
+ export * from './locale/locale.decorator';
14
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AAGzC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AAGzC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AAGzC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AAGzC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AAGpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -34,4 +34,7 @@ __exportStar(require("./setting/settings.service"), exports);
34
34
  // User Module
35
35
  __exportStar(require("./user/constants/user.constants"), exports);
36
36
  __exportStar(require("./user/user.service"), exports);
37
+ // Locale Module
38
+ __exportStar(require("./locale/locale.service"), exports);
39
+ __exportStar(require("./locale/locale.decorator"), exports);
37
40
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,eAAe;AACf,iDAA+B;AAE/B,cAAc;AACd,sDAAoC;AACpC,qEAAmD;AACnD,mEAAiD;AACjD,2DAAyC;AAEzC,cAAc;AACd,sDAAoC;AAEpC,oBAAoB;AACpB,sDAAoC;AACpC,mEAAiD;AACjD,2DAAyC;AAEzC,gBAAgB;AAChB,0DAAwC;AAExC,gBAAgB;AAChB,6DAA2C;AAE3C,cAAc;AACd,kEAAgD;AAChD,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,eAAe;AACf,iDAA+B;AAE/B,cAAc;AACd,sDAAoC;AACpC,qEAAmD;AACnD,mEAAiD;AACjD,2DAAyC;AAEzC,cAAc;AACd,sDAAoC;AAEpC,oBAAoB;AACpB,sDAAoC;AACpC,mEAAiD;AACjD,2DAAyC;AAEzC,gBAAgB;AAChB,0DAAwC;AAExC,gBAAgB;AAChB,6DAA2C;AAE3C,cAAc;AACd,kEAAgD;AAChD,sDAAoC;AAEpC,gBAAgB;AAChB,0DAAwC;AACxC,4DAA0C"}
@@ -0,0 +1,7 @@
1
+ export declare class CreateDTO {
2
+ name: string;
3
+ code: string;
4
+ region: string;
5
+ country_id: number;
6
+ }
7
+ //# sourceMappingURL=create.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/locale/dto/create.dto.ts"],"names":[],"mappings":"AAUA,qBAAa,SAAS;IAEpB,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,CAAC;IAGf,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CreateDTO {
15
+ }
16
+ exports.CreateDTO = CreateDTO;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ __metadata("design:type", String)
20
+ ], CreateDTO.prototype, "name", void 0);
21
+ __decorate([
22
+ (0, class_validator_1.IsString)(),
23
+ __metadata("design:type", String)
24
+ ], CreateDTO.prototype, "code", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ __metadata("design:type", String)
28
+ ], CreateDTO.prototype, "region", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsInt)(),
31
+ __metadata("design:type", Number)
32
+ ], CreateDTO.prototype, "country_id", void 0);
33
+ //# sourceMappingURL=create.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/locale/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAQyB;AAEzB,MAAa,SAAS;CAYrB;AAZD,8BAYC;AAVC;IADC,IAAA,0BAAQ,GAAE;;uCACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;uCACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;yCACI;AAGf;IADC,IAAA,uBAAK,GAAE;;6CACW"}
@@ -0,0 +1,4 @@
1
+ export declare class DeleteDTO {
2
+ ids: number[];
3
+ }
4
+ //# sourceMappingURL=delete.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../src/locale/dto/delete.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAIpB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DeleteDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class DeleteDTO {
15
+ }
16
+ exports.DeleteDTO = DeleteDTO;
17
+ __decorate([
18
+ (0, class_validator_1.IsArray)(),
19
+ (0, class_validator_1.ArrayMinSize)(1),
20
+ (0, class_validator_1.IsInt)({ each: true }),
21
+ __metadata("design:type", Array)
22
+ ], DeleteDTO.prototype, "ids", void 0);
23
+ //# sourceMappingURL=delete.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.dto.js","sourceRoot":"","sources":["../../../src/locale/dto/delete.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,MAAa,SAAS;CAKrB;AALD,8BAKC;AADC;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,8BAAY,EAAC,CAAC,CAAC;IACf,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sCACR"}
@@ -0,0 +1,7 @@
1
+ export declare class UpdateDTO {
2
+ name?: string;
3
+ code?: string;
4
+ region?: string;
5
+ country_id?: number;
6
+ }
7
+ //# sourceMappingURL=update.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/locale/dto/update.dto.ts"],"names":[],"mappings":"AAUA,qBAAa,SAAS;IAGpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,MAAM,CAAC,EAAE,MAAM,CAAC;IAIhB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UpdateDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class UpdateDTO {
15
+ }
16
+ exports.UpdateDTO = UpdateDTO;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsOptional)(),
20
+ __metadata("design:type", String)
21
+ ], UpdateDTO.prototype, "name", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ __metadata("design:type", String)
26
+ ], UpdateDTO.prototype, "code", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", String)
31
+ ], UpdateDTO.prototype, "region", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsInt)(),
34
+ (0, class_validator_1.IsOptional)(),
35
+ __metadata("design:type", Number)
36
+ ], UpdateDTO.prototype, "country_id", void 0);
37
+ //# sourceMappingURL=update.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/locale/dto/update.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAQyB;AAEzB,MAAa,SAAS;CAgBrB;AAhBD,8BAgBC;AAbC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uCACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uCACC;AAId;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yCACG;AAIhB;IAFC,IAAA,uBAAK,GAAE;IACP,IAAA,4BAAU,GAAE;;6CACO"}
@@ -0,0 +1,5 @@
1
+ export * from './locale.module';
2
+ export * from './locale.service';
3
+ export * from './locale.controller';
4
+ export * from './locale.decorator';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locale/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,21 @@
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("./locale.module"), exports);
18
+ __exportStar(require("./locale.service"), exports);
19
+ __exportStar(require("./locale.controller"), exports);
20
+ __exportStar(require("./locale.decorator"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/locale/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,mDAAiC;AACjC,sDAAoC;AACpC,qDAAmC"}
@@ -0,0 +1,16 @@
1
+ import { CreateDTO } from './dto/create.dto';
2
+ import { DeleteDTO } from './dto/delete.dto';
3
+ import { UpdateDTO } from './dto/update.dto';
4
+ import { LocaleService } from './locale.service';
5
+ export declare class LocaleController {
6
+ private readonly localeService;
7
+ constructor(localeService: LocaleService);
8
+ get(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
9
+ getTranslations(localeCode: string, namespace: string): Promise<{}>;
10
+ getEnableds(paginationParams: any, locale: string): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
11
+ getById(id: number): Promise<any>;
12
+ create(data: CreateDTO): Promise<any>;
13
+ update(id: number, data: UpdateDTO): Promise<any>;
14
+ delete(data: DeleteDTO): Promise<any>;
15
+ }
16
+ //# sourceMappingURL=locale.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.controller.d.ts","sourceRoot":"","sources":["../../src/locale/locale.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,qBACa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAIzC,GAAG,CAAe,gBAAgB,KAAA;IAKlC,eAAe,CACE,UAAU,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM;IAMjC,WAAW,CAAe,gBAAgB,KAAA,EAAY,MAAM,EAAE,MAAM;IAKpE,OAAO,CAA4B,EAAE,EAAE,MAAM;IAKnD,MAAM,CAAS,IAAI,EAAE,SAAS;IAKxB,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;IAQrE,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
@@ -0,0 +1,110 @@
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.LocaleController = void 0;
16
+ const pagination_1 = require("@hedhog/pagination");
17
+ const common_1 = require("@nestjs/common");
18
+ const create_dto_1 = require("./dto/create.dto");
19
+ const delete_dto_1 = require("./dto/delete.dto");
20
+ const update_dto_1 = require("./dto/update.dto");
21
+ const locale_service_1 = require("./locale.service");
22
+ const locale_decorator_1 = require("./locale.decorator");
23
+ let LocaleController = class LocaleController {
24
+ constructor(localeService) {
25
+ this.localeService = localeService;
26
+ }
27
+ async get(paginationParams) {
28
+ return this.localeService.get(paginationParams);
29
+ }
30
+ async getTranslations(localeCode, namespace) {
31
+ return this.localeService.getTranslations(localeCode, namespace);
32
+ }
33
+ async getEnableds(paginationParams, locale) {
34
+ return this.localeService.getEnableds(locale, paginationParams);
35
+ }
36
+ async getById(id) {
37
+ return this.localeService.getById(id);
38
+ }
39
+ create(data) {
40
+ return this.localeService.create(data);
41
+ }
42
+ async update(id, data) {
43
+ return this.localeService.update({
44
+ id,
45
+ data,
46
+ });
47
+ }
48
+ async delete(data) {
49
+ return this.localeService.delete(data);
50
+ }
51
+ };
52
+ exports.LocaleController = LocaleController;
53
+ __decorate([
54
+ (0, common_1.Get)(),
55
+ __param(0, (0, pagination_1.Pagination)()),
56
+ __metadata("design:type", Function),
57
+ __metadata("design:paramtypes", [Object]),
58
+ __metadata("design:returntype", Promise)
59
+ ], LocaleController.prototype, "get", null);
60
+ __decorate([
61
+ (0, common_1.Get)(':localeCode/:namespace'),
62
+ __param(0, (0, common_1.Param)('localeCode')),
63
+ __param(1, (0, common_1.Param)('namespace')),
64
+ __metadata("design:type", Function),
65
+ __metadata("design:paramtypes", [String, String]),
66
+ __metadata("design:returntype", Promise)
67
+ ], LocaleController.prototype, "getTranslations", null);
68
+ __decorate([
69
+ (0, common_1.Get)('system/enableds'),
70
+ __param(0, (0, pagination_1.Pagination)()),
71
+ __param(1, (0, locale_decorator_1.Locale)()),
72
+ __metadata("design:type", Function),
73
+ __metadata("design:paramtypes", [Object, String]),
74
+ __metadata("design:returntype", Promise)
75
+ ], LocaleController.prototype, "getEnableds", null);
76
+ __decorate([
77
+ (0, common_1.Get)(':id'),
78
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
79
+ __metadata("design:type", Function),
80
+ __metadata("design:paramtypes", [Number]),
81
+ __metadata("design:returntype", Promise)
82
+ ], LocaleController.prototype, "getById", null);
83
+ __decorate([
84
+ (0, common_1.Post)(),
85
+ __param(0, (0, common_1.Body)()),
86
+ __metadata("design:type", Function),
87
+ __metadata("design:paramtypes", [create_dto_1.CreateDTO]),
88
+ __metadata("design:returntype", void 0)
89
+ ], LocaleController.prototype, "create", null);
90
+ __decorate([
91
+ (0, common_1.Patch)(':id'),
92
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
93
+ __param(1, (0, common_1.Body)()),
94
+ __metadata("design:type", Function),
95
+ __metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
96
+ __metadata("design:returntype", Promise)
97
+ ], LocaleController.prototype, "update", null);
98
+ __decorate([
99
+ (0, common_1.Delete)(),
100
+ __param(0, (0, common_1.Body)()),
101
+ __metadata("design:type", Function),
102
+ __metadata("design:paramtypes", [delete_dto_1.DeleteDTO]),
103
+ __metadata("design:returntype", Promise)
104
+ ], LocaleController.prototype, "delete", null);
105
+ exports.LocaleController = LocaleController = __decorate([
106
+ (0, common_1.Controller)('locales'),
107
+ __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => locale_service_1.LocaleService))),
108
+ __metadata("design:paramtypes", [locale_service_1.LocaleService])
109
+ ], LocaleController);
110
+ //# sourceMappingURL=locale.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.controller.js","sourceRoot":"","sources":["../../src/locale/locale.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAWwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,qDAAiD;AACjD,yDAA4C;AAGrC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAEmB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAGE,AAAN,KAAK,CAAC,GAAG,CAAe,gBAAgB;QACtC,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;IAGK,AAAN,KAAK,CAAC,eAAe,CACE,UAAkB,EACnB,SAAiB;QAErC,OAAO,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IACnE,CAAC;IAGK,AAAN,KAAK,CAAC,WAAW,CAAe,gBAAgB,EAAY,MAAc;QACxE,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAClE,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAA4B,EAAU;QACjD,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;IAGD,MAAM,CAAS,IAAe;QAC5B,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAA4B,EAAU,EAAU,IAAe;QACzE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;YAC/B,EAAE;YACF,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;CACF,CAAA;AA9CY,4CAAgB;AAOrB;IADL,IAAA,YAAG,GAAE;IACK,WAAA,IAAA,uBAAU,GAAE,CAAA;;;;2CAEtB;AAGK;IADL,IAAA,YAAG,EAAC,wBAAwB,CAAC;IAE3B,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;IACnB,WAAA,IAAA,cAAK,EAAC,WAAW,CAAC,CAAA;;;;uDAGpB;AAGK;IADL,IAAA,YAAG,EAAC,iBAAiB,CAAC;IACJ,WAAA,IAAA,uBAAU,GAAE,CAAA;IAAoB,WAAA,IAAA,yBAAM,GAAE,CAAA;;;;mDAE1D;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACI,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;+CAEvC;AAGD;IADC,IAAA,aAAI,GAAE;IACC,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;8CAE7B;AAGK;IADL,IAAA,cAAK,EAAC,KAAK,CAAC;IACC,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;8CAK1E;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;8CAEnC;2BA7CU,gBAAgB;IAD5B,IAAA,mBAAU,EAAC,SAAS,CAAC;IAGjB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC,CAAC,CAAA;qCACR,8BAAa;GAHpC,gBAAgB,CA8C5B"}
@@ -0,0 +1,2 @@
1
+ export declare const Locale: (...dataOrPipes: unknown[]) => ParameterDecorator;
2
+ //# sourceMappingURL=locale.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.decorator.d.ts","sourceRoot":"","sources":["../../src/locale/locale.decorator.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,mDAKlB,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Locale = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ exports.Locale = (0, common_1.createParamDecorator)((_data, ctx) => {
6
+ const request = ctx.switchToHttp().getRequest();
7
+ return request['locale'];
8
+ });
9
+ //# sourceMappingURL=locale.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.decorator.js","sourceRoot":"","sources":["../../src/locale/locale.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAwE;AAE3D,QAAA,MAAM,GAAG,IAAA,6BAAoB,EACxC,CAAC,KAAc,EAAE,GAAqB,EAAE,EAAE;IACxC,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;IAChD,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC3B,CAAC,CACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { PrismaService } from '@hedhog/prisma';
2
+ import { NestMiddleware } from '@nestjs/common';
3
+ import { Request, Response, NextFunction } from 'express';
4
+ export declare class LocaleMiddleware implements NestMiddleware {
5
+ private prisma;
6
+ private languages;
7
+ constructor(prisma: PrismaService);
8
+ use(req: Request, _res: Response, next: NextFunction): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=locale.middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.middleware.d.ts","sourceRoot":"","sources":["../../src/locale/locale.middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAc,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE1D,qBACa,gBAAiB,YAAW,cAAc;IAGzC,OAAO,CAAC,MAAM;IAF1B,OAAO,CAAC,SAAS,CAAM;gBAEH,MAAM,EAAE,aAAa;IAEnC,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY;CAuB3D"}
@@ -0,0 +1,45 @@
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.LocaleMiddleware = void 0;
13
+ const prisma_1 = require("@hedhog/prisma");
14
+ const common_1 = require("@nestjs/common");
15
+ let LocaleMiddleware = class LocaleMiddleware {
16
+ constructor(prisma) {
17
+ this.prisma = prisma;
18
+ this.languages = [];
19
+ }
20
+ async use(req, _res, next) {
21
+ const locale = req.headers['accept-language'] || 'en-US';
22
+ let code = locale.split(',')[0].split('-')[0];
23
+ if (!this.languages.length) {
24
+ const locales = await this.prisma.locales.findMany({
25
+ select: {
26
+ code: true,
27
+ },
28
+ });
29
+ for (const l of locales) {
30
+ this.languages.push(l.code);
31
+ }
32
+ }
33
+ if (!this.languages.includes(code)) {
34
+ code = 'en';
35
+ }
36
+ req['locale'] = code;
37
+ next();
38
+ }
39
+ };
40
+ exports.LocaleMiddleware = LocaleMiddleware;
41
+ exports.LocaleMiddleware = LocaleMiddleware = __decorate([
42
+ (0, common_1.Injectable)(),
43
+ __metadata("design:paramtypes", [prisma_1.PrismaService])
44
+ ], LocaleMiddleware);
45
+ //# sourceMappingURL=locale.middleware.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.middleware.js","sourceRoot":"","sources":["../../src/locale/locale.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA+C;AAC/C,2CAA4D;AAIrD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAG3B,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QAFjC,cAAS,GAAG,EAAE,CAAC;IAEqB,CAAC;IAE7C,KAAK,CAAC,GAAG,CAAC,GAAY,EAAE,IAAc,EAAE,IAAkB;QACxD,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,OAAO,CAAC;QACzD,IAAI,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAE9C,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;YAC3B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;gBACjD,MAAM,EAAE;oBACN,IAAI,EAAE,IAAI;iBACX;aACF,CAAC,CAAC;YAEH,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;gBACxB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACnC,IAAI,GAAG,IAAI,CAAC;QACd,CAAC;QAED,GAAG,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;QACrB,IAAI,EAAE,CAAC;IACT,CAAC;CACF,CAAA;AA5BY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAIiB,sBAAa;GAH9B,gBAAgB,CA4B5B"}
@@ -0,0 +1,5 @@
1
+ import { MiddlewareConsumer } from '@nestjs/common';
2
+ export declare class LocaleModule {
3
+ configure(consumer: MiddlewareConsumer): void;
4
+ }
5
+ //# sourceMappingURL=locale.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.module.d.ts","sourceRoot":"","sources":["../../src/locale/locale.module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,kBAAkB,EAAU,MAAM,gBAAgB,CAAC;AAMxE,qBAUa,YAAY;IACvB,SAAS,CAAC,QAAQ,EAAE,kBAAkB;CAGvC"}
@@ -0,0 +1,35 @@
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.LocaleModule = void 0;
10
+ const pagination_1 = require("@hedhog/pagination");
11
+ const prisma_1 = require("@hedhog/prisma");
12
+ const common_1 = require("@nestjs/common");
13
+ const locale_service_1 = require("./locale.service");
14
+ const locale_controller_1 = require("./locale.controller");
15
+ const locale_middleware_1 = require("./locale.middleware");
16
+ const admin_1 = require("@hedhog/admin");
17
+ let LocaleModule = class LocaleModule {
18
+ configure(consumer) {
19
+ consumer.apply(locale_middleware_1.LocaleMiddleware).forRoutes('*');
20
+ }
21
+ };
22
+ exports.LocaleModule = LocaleModule;
23
+ exports.LocaleModule = LocaleModule = __decorate([
24
+ (0, common_1.Module)({
25
+ imports: [
26
+ (0, common_1.forwardRef)(() => admin_1.AdminModule),
27
+ (0, common_1.forwardRef)(() => prisma_1.PrismaModule),
28
+ (0, common_1.forwardRef)(() => pagination_1.PaginationModule),
29
+ ],
30
+ controllers: [locale_controller_1.LocaleController],
31
+ providers: [locale_service_1.LocaleService],
32
+ exports: [locale_service_1.LocaleService],
33
+ })
34
+ ], LocaleModule);
35
+ //# sourceMappingURL=locale.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.module.js","sourceRoot":"","sources":["../../src/locale/locale.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAwE;AACxE,qDAAiD;AACjD,2DAAuD;AACvD,2DAAuD;AACvD,yCAA4C;AAYrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,SAAS,CAAC,QAA4B;QACpC,QAAQ,CAAC,KAAK,CAAC,oCAAgB,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;AAJY,oCAAY;uBAAZ,YAAY;IAVxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,mBAAW,CAAC;YAC7B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;SACnC;QACD,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE,CAAC,8BAAa,CAAC;QAC1B,OAAO,EAAE,CAAC,8BAAa,CAAC;KACzB,CAAC;GACW,YAAY,CAIxB"}
@@ -0,0 +1,26 @@
1
+ import { PaginationDTO, PaginationService } from '@hedhog/pagination';
2
+ import { PrismaService } from '@hedhog/prisma';
3
+ import { CreateDTO } from './dto/create.dto';
4
+ import { DeleteDTO } from './dto/delete.dto';
5
+ import { UpdateDTO } from './dto/update.dto';
6
+ export declare class LocaleService {
7
+ private readonly prismaService;
8
+ private readonly paginationService;
9
+ constructor(prismaService: PrismaService, paginationService: PaginationService);
10
+ getEnableds(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
11
+ parseLocale(locale: string): {
12
+ code: string;
13
+ region: string;
14
+ locales: string[];
15
+ };
16
+ getTranslations(localeCode: string, namespace: string): Promise<{}>;
17
+ get(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
18
+ getById(localesId: number): Promise<any>;
19
+ create(data: CreateDTO): Promise<any>;
20
+ update({ id, data }: {
21
+ id: number;
22
+ data: UpdateDTO;
23
+ }): Promise<any>;
24
+ delete({ ids }: DeleteDTO): Promise<any>;
25
+ }
26
+ //# sourceMappingURL=locale.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.service.d.ts","sourceRoot":"","sources":["../../src/locale/locale.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,aAAa;IAGtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;IAgEjE,WAAW,CAAC,MAAM,EAAE,MAAM;;;;;IAWpB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAwCrD,GAAG,CAAC,gBAAgB,EAAE,aAAa;IAsBnC,OAAO,CAAC,SAAS,EAAE,MAAM;IAMzB,MAAM,CAAC,IAAI,EAAE,SAAS;IAMtB,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IAOpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}