@hedhog/admin 0.0.109 → 0.0.110
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/admin.module.d.ts.map +1 -1
- package/dist/admin.module.js +0 -3
- package/dist/admin.module.js.map +1 -1
- package/dist/auth/auth.controller.d.ts.map +1 -1
- package/dist/auth/auth.controller.js +1 -2
- package/dist/auth/auth.controller.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +1 -1
- package/dist/menu/menu.controller.d.ts.map +1 -1
- package/dist/menu/menu.controller.js +1 -2
- package/dist/menu/menu.controller.js.map +1 -1
- package/dist/role/dto/create.dto.d.ts +1 -1
- 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/hedhog.yaml +0 -307
- package/package.json +3 -3
- package/src/admin.module.ts +0 -3
- package/src/auth/auth.controller.ts +1 -2
- package/src/index.ts +0 -4
- package/src/menu/menu.controller.ts +1 -2
- package/src/role/dto/create.dto.ts +1 -1
- package/dist/auth/decorators/user.decorator.d.ts +0 -2
- package/dist/auth/decorators/user.decorator.d.ts.map +0 -1
- package/dist/auth/decorators/user.decorator.js +0 -12
- package/dist/auth/decorators/user.decorator.js.map +0 -1
- package/dist/dto/with-locale.dto.d.ts +0 -4
- package/dist/dto/with-locale.dto.d.ts.map +0 -1
- package/dist/dto/with-locale.dto.js +0 -23
- package/dist/dto/with-locale.dto.js.map +0 -1
- package/dist/setting/dto/create.dto.d.ts +0 -3
- package/dist/setting/dto/create.dto.d.ts.map +0 -1
- package/dist/setting/dto/create.dto.js +0 -7
- package/dist/setting/dto/create.dto.js.map +0 -1
- package/dist/setting/dto/setting-user.dto.d.ts +0 -4
- package/dist/setting/dto/setting-user.dto.d.ts.map +0 -1
- package/dist/setting/dto/setting-user.dto.js +0 -21
- package/dist/setting/dto/setting-user.dto.js.map +0 -1
- package/dist/setting/dto/setting.dto.d.ts +0 -9
- package/dist/setting/dto/setting.dto.d.ts.map +0 -1
- package/dist/setting/dto/setting.dto.js +0 -34
- package/dist/setting/dto/setting.dto.js.map +0 -1
- package/dist/setting/dto/update.dto.d.ts +0 -4
- package/dist/setting/dto/update.dto.d.ts.map +0 -1
- package/dist/setting/dto/update.dto.js +0 -8
- package/dist/setting/dto/update.dto.js.map +0 -1
- package/dist/setting/setting.controller.d.ts +0 -26
- package/dist/setting/setting.controller.d.ts.map +0 -1
- package/dist/setting/setting.controller.js +0 -161
- package/dist/setting/setting.controller.js.map +0 -1
- package/dist/setting/setting.module.d.ts +0 -3
- package/dist/setting/setting.module.d.ts.map +0 -1
- package/dist/setting/setting.module.js +0 -33
- package/dist/setting/setting.module.js.map +0 -1
- package/dist/setting/setting.service.d.ts +0 -33
- package/dist/setting/setting.service.d.ts.map +0 -1
- package/dist/setting/setting.service.js +0 -377
- package/dist/setting/setting.service.js.map +0 -1
- package/dist/setting/setting.service.spec.d.ts +0 -2
- package/dist/setting/setting.service.spec.d.ts.map +0 -1
- package/dist/setting/setting.service.spec.js +0 -162
- package/dist/setting/setting.service.spec.js.map +0 -1
- package/src/auth/decorators/user.decorator.ts +0 -17
- package/src/dto/with-locale.dto.ts +0 -8
- package/src/setting/dto/create.dto.ts +0 -1
- package/src/setting/dto/setting-user.dto.ts +0 -6
- package/src/setting/dto/setting.dto.ts +0 -17
- package/src/setting/dto/update.dto.ts +0 -3
- package/src/setting/setting.controller.ts +0 -107
- package/src/setting/setting.module.ts +0 -20
- package/src/setting/setting.service.spec.ts +0 -183
- package/src/setting/setting.service.ts +0 -457
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.WithLocaleDTO = void 0;
|
13
|
-
const class_validator_1 = require("class-validator");
|
14
|
-
class WithLocaleDTO {
|
15
|
-
}
|
16
|
-
exports.WithLocaleDTO = WithLocaleDTO;
|
17
|
-
__decorate([
|
18
|
-
(0, class_validator_1.IsOptional)(),
|
19
|
-
(0, class_validator_1.IsObject)(),
|
20
|
-
(0, class_validator_1.ValidateNested)({ each: true }),
|
21
|
-
__metadata("design:type", Object)
|
22
|
-
], WithLocaleDTO.prototype, "locale", void 0);
|
23
|
-
//# sourceMappingURL=with-locale.dto.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"with-locale.dto.js","sourceRoot":"","sources":["../../src/dto/with-locale.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,MAAa,aAAa;CAKzB;AALD,sCAKC;AADC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;6CACgB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/setting/dto/create.dto.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;CAAG"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/setting/dto/create.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;CAAG;AAAzB,8BAAyB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"setting-user.dto.d.ts","sourceRoot":"","sources":["../../../src/setting/dto/setting-user.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,cAAc;IAEzB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.SettingUserDTO = void 0;
|
13
|
-
const class_validator_1 = require("class-validator");
|
14
|
-
class SettingUserDTO {
|
15
|
-
}
|
16
|
-
exports.SettingUserDTO = SettingUserDTO;
|
17
|
-
__decorate([
|
18
|
-
(0, class_validator_1.IsString)(),
|
19
|
-
__metadata("design:type", String)
|
20
|
-
], SettingUserDTO.prototype, "value", void 0);
|
21
|
-
//# sourceMappingURL=setting-user.dto.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"setting-user.dto.js","sourceRoot":"","sources":["../../../src/setting/dto/setting-user.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAE3C,MAAa,cAAc;CAG1B;AAHD,wCAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;6CACG"}
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,34 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.SettingDTO = void 0;
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
14
|
-
const class_validator_1 = require("class-validator");
|
15
|
-
class Setting {
|
16
|
-
}
|
17
|
-
__decorate([
|
18
|
-
(0, class_validator_1.IsString)(),
|
19
|
-
__metadata("design:type", String)
|
20
|
-
], Setting.prototype, "slug", void 0);
|
21
|
-
__decorate([
|
22
|
-
(0, class_validator_1.IsString)(),
|
23
|
-
__metadata("design:type", String)
|
24
|
-
], Setting.prototype, "value", void 0);
|
25
|
-
class SettingDTO {
|
26
|
-
}
|
27
|
-
exports.SettingDTO = SettingDTO;
|
28
|
-
__decorate([
|
29
|
-
(0, class_validator_1.IsArray)(),
|
30
|
-
(0, class_validator_1.ValidateNested)({ each: true }),
|
31
|
-
(0, class_transformer_1.Type)(() => Setting),
|
32
|
-
__metadata("design:type", Array)
|
33
|
-
], SettingDTO.prototype, "setting", void 0);
|
34
|
-
//# sourceMappingURL=setting.dto.js.map
|
@@ -1 +0,0 @@
|
|
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 +0,0 @@
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/setting/dto/update.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,qBAAa,SAAU,SAAQ,SAAS;CAAG"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.UpdateDTO = void 0;
|
4
|
-
const create_dto_1 = require("./create.dto");
|
5
|
-
class UpdateDTO extends create_dto_1.CreateDTO {
|
6
|
-
}
|
7
|
-
exports.UpdateDTO = UpdateDTO;
|
8
|
-
//# sourceMappingURL=update.dto.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/setting/dto/update.dto.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAEzC,MAAa,SAAU,SAAQ,sBAAS;CAAG;AAA3C,8BAA2C"}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import { DeleteDTO } from '../dto/delete.dto';
|
2
|
-
import { CreateDTO } from './dto/create.dto';
|
3
|
-
import { SettingUserDTO } from './dto/setting-user.dto';
|
4
|
-
import { SettingDTO } from './dto/setting.dto';
|
5
|
-
import { UpdateDTO } from './dto/update.dto';
|
6
|
-
import { SettingService } from './setting.service';
|
7
|
-
export declare class SettingsController {
|
8
|
-
private readonly settingService;
|
9
|
-
constructor(settingService: SettingService);
|
10
|
-
getSettingFromGroup(paginationParams: any, locale: any, slug: string): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
11
|
-
appearanceCSS(res: any): Promise<any>;
|
12
|
-
listSettingGroups(paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
13
|
-
listSettings(paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
14
|
-
show(settingId: number): Promise<any>;
|
15
|
-
create(data: CreateDTO): Promise<any>;
|
16
|
-
updateUserFromSlug(slug: string, { value }: SettingUserDTO, { id }: {
|
17
|
-
id: any;
|
18
|
-
}): Promise<any>;
|
19
|
-
updateFromSlug(slug: string, data: UpdateDTO): Promise<any>;
|
20
|
-
setManySettings(data: SettingDTO): Promise<{
|
21
|
-
success: boolean;
|
22
|
-
}>;
|
23
|
-
update(settingId: number, data: UpdateDTO): Promise<any>;
|
24
|
-
delete(data: DeleteDTO): Promise<any>;
|
25
|
-
}
|
26
|
-
//# sourceMappingURL=setting.controller.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"setting.controller.d.ts","sourceRoot":"","sources":["../../src/setting/setting.controller.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,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;IAWvB,aAAa,CAAQ,GAAG,KAAA;IAKxB,iBAAiB,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;IAKlE,YAAY,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;IAK7D,IAAI,CAAmC,SAAS,EAAE,MAAM;IAKxD,MAAM,CAAS,IAAI,EAAE,SAAS;IAK9B,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"}
|
@@ -1,161 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
13
|
-
};
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.SettingsController = void 0;
|
16
|
-
const pagination_1 = require("@hedhog/pagination");
|
17
|
-
const common_1 = require("@nestjs/common");
|
18
|
-
const locale_1 = require("@hedhog/locale");
|
19
|
-
const utils_1 = require("@hedhog/utils");
|
20
|
-
const user_decorator_1 = require("../auth/decorators/user.decorator");
|
21
|
-
const delete_dto_1 = require("../dto/delete.dto");
|
22
|
-
const create_dto_1 = require("./dto/create.dto");
|
23
|
-
const setting_user_dto_1 = require("./dto/setting-user.dto");
|
24
|
-
const setting_dto_1 = require("./dto/setting.dto");
|
25
|
-
const update_dto_1 = require("./dto/update.dto");
|
26
|
-
const setting_service_1 = require("./setting.service");
|
27
|
-
let SettingsController = class SettingsController {
|
28
|
-
constructor(settingService) {
|
29
|
-
this.settingService = settingService;
|
30
|
-
}
|
31
|
-
async getSettingFromGroup(paginationParams, locale, slug) {
|
32
|
-
return this.settingService.getSettingFromGroup(locale, paginationParams, slug);
|
33
|
-
}
|
34
|
-
async appearanceCSS(res) {
|
35
|
-
return this.settingService.getAppearanceCSS(res);
|
36
|
-
}
|
37
|
-
async listSettingGroups(paginationParams, locale) {
|
38
|
-
return this.settingService.listSettingGroups(locale, paginationParams);
|
39
|
-
}
|
40
|
-
async listSettings(paginationParams, locale) {
|
41
|
-
return this.settingService.listSettings(locale, paginationParams);
|
42
|
-
}
|
43
|
-
async show(settingId) {
|
44
|
-
return this.settingService.get(settingId);
|
45
|
-
}
|
46
|
-
async create(data) {
|
47
|
-
return this.settingService.create(data);
|
48
|
-
}
|
49
|
-
async updateUserFromSlug(slug, { value }, { id }) {
|
50
|
-
return this.settingService.setSettingUserValue(id, slug, value);
|
51
|
-
}
|
52
|
-
async updateFromSlug(slug, data) {
|
53
|
-
return this.settingService.updateFromSlug(slug, data);
|
54
|
-
}
|
55
|
-
async setManySettings(data) {
|
56
|
-
return this.settingService.setManySettings(data);
|
57
|
-
}
|
58
|
-
async update(settingId, data) {
|
59
|
-
return this.settingService.update({
|
60
|
-
id: settingId,
|
61
|
-
data,
|
62
|
-
});
|
63
|
-
}
|
64
|
-
async delete(data) {
|
65
|
-
return this.settingService.delete(data);
|
66
|
-
}
|
67
|
-
};
|
68
|
-
exports.SettingsController = SettingsController;
|
69
|
-
__decorate([
|
70
|
-
(0, common_1.Get)('group/:slug'),
|
71
|
-
__param(0, (0, pagination_1.Pagination)()),
|
72
|
-
__param(1, (0, locale_1.Locale)()),
|
73
|
-
__param(2, (0, common_1.Param)('slug')),
|
74
|
-
__metadata("design:type", Function),
|
75
|
-
__metadata("design:paramtypes", [Object, Object, String]),
|
76
|
-
__metadata("design:returntype", Promise)
|
77
|
-
], SettingsController.prototype, "getSettingFromGroup", null);
|
78
|
-
__decorate([
|
79
|
-
(0, utils_1.Public)(),
|
80
|
-
(0, common_1.Get)('appearance.css'),
|
81
|
-
__param(0, (0, common_1.Res)()),
|
82
|
-
__metadata("design:type", Function),
|
83
|
-
__metadata("design:paramtypes", [Object]),
|
84
|
-
__metadata("design:returntype", Promise)
|
85
|
-
], SettingsController.prototype, "appearanceCSS", null);
|
86
|
-
__decorate([
|
87
|
-
(0, common_1.Get)('group'),
|
88
|
-
__param(0, (0, pagination_1.Pagination)()),
|
89
|
-
__param(1, (0, locale_1.Locale)()),
|
90
|
-
__metadata("design:type", Function),
|
91
|
-
__metadata("design:paramtypes", [Object, Object]),
|
92
|
-
__metadata("design:returntype", Promise)
|
93
|
-
], SettingsController.prototype, "listSettingGroups", null);
|
94
|
-
__decorate([
|
95
|
-
(0, common_1.Get)(),
|
96
|
-
__param(0, (0, pagination_1.Pagination)()),
|
97
|
-
__param(1, (0, locale_1.Locale)()),
|
98
|
-
__metadata("design:type", Function),
|
99
|
-
__metadata("design:paramtypes", [Object, Object]),
|
100
|
-
__metadata("design:returntype", Promise)
|
101
|
-
], SettingsController.prototype, "listSettings", null);
|
102
|
-
__decorate([
|
103
|
-
(0, common_1.Get)(':settingId'),
|
104
|
-
__param(0, (0, common_1.Param)('settingId', common_1.ParseIntPipe)),
|
105
|
-
__metadata("design:type", Function),
|
106
|
-
__metadata("design:paramtypes", [Number]),
|
107
|
-
__metadata("design:returntype", Promise)
|
108
|
-
], SettingsController.prototype, "show", null);
|
109
|
-
__decorate([
|
110
|
-
(0, common_1.Post)(),
|
111
|
-
__param(0, (0, common_1.Body)()),
|
112
|
-
__metadata("design:type", Function),
|
113
|
-
__metadata("design:paramtypes", [create_dto_1.CreateDTO]),
|
114
|
-
__metadata("design:returntype", Promise)
|
115
|
-
], SettingsController.prototype, "create", null);
|
116
|
-
__decorate([
|
117
|
-
(0, common_1.Put)('user/:slug'),
|
118
|
-
__param(0, (0, common_1.Param)('slug')),
|
119
|
-
__param(1, (0, common_1.Body)()),
|
120
|
-
__param(2, (0, user_decorator_1.User)()),
|
121
|
-
__metadata("design:type", Function),
|
122
|
-
__metadata("design:paramtypes", [String, setting_user_dto_1.SettingUserDTO, Object]),
|
123
|
-
__metadata("design:returntype", Promise)
|
124
|
-
], SettingsController.prototype, "updateUserFromSlug", null);
|
125
|
-
__decorate([
|
126
|
-
(0, common_1.Put)(':slug'),
|
127
|
-
__param(0, (0, common_1.Param)('slug')),
|
128
|
-
__param(1, (0, common_1.Body)()),
|
129
|
-
__metadata("design:type", Function),
|
130
|
-
__metadata("design:paramtypes", [String, update_dto_1.UpdateDTO]),
|
131
|
-
__metadata("design:returntype", Promise)
|
132
|
-
], SettingsController.prototype, "updateFromSlug", null);
|
133
|
-
__decorate([
|
134
|
-
(0, common_1.Put)(),
|
135
|
-
__param(0, (0, common_1.Body)()),
|
136
|
-
__metadata("design:type", Function),
|
137
|
-
__metadata("design:paramtypes", [setting_dto_1.SettingDTO]),
|
138
|
-
__metadata("design:returntype", Promise)
|
139
|
-
], SettingsController.prototype, "setManySettings", null);
|
140
|
-
__decorate([
|
141
|
-
(0, common_1.Patch)(':settingId'),
|
142
|
-
__param(0, (0, common_1.Param)('settingId', common_1.ParseIntPipe)),
|
143
|
-
__param(1, (0, common_1.Body)()),
|
144
|
-
__metadata("design:type", Function),
|
145
|
-
__metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
|
146
|
-
__metadata("design:returntype", Promise)
|
147
|
-
], SettingsController.prototype, "update", null);
|
148
|
-
__decorate([
|
149
|
-
(0, common_1.Delete)(),
|
150
|
-
__param(0, (0, common_1.Body)()),
|
151
|
-
__metadata("design:type", Function),
|
152
|
-
__metadata("design:paramtypes", [delete_dto_1.DeleteDTO]),
|
153
|
-
__metadata("design:returntype", Promise)
|
154
|
-
], SettingsController.prototype, "delete", null);
|
155
|
-
exports.SettingsController = SettingsController = __decorate([
|
156
|
-
(0, utils_1.Role)(),
|
157
|
-
(0, common_1.Controller)('setting'),
|
158
|
-
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => setting_service_1.SettingService))),
|
159
|
-
__metadata("design:paramtypes", [setting_service_1.SettingService])
|
160
|
-
], SettingsController);
|
161
|
-
//# sourceMappingURL=setting.controller.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"setting.controller.js","sourceRoot":"","sources":["../../src/setting/setting.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAawB;AACxB,2CAAwC;AACxC,yCAA6C;AAC7C,sEAAyD;AACzD,kDAA8C;AAC9C,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,C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AAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,qBAAI,GAAE,CAAA;;6CADY,iCAAc;;4DAIlC;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;IACS,WAAA,IAAA,cAAK,EAAC,MAAM,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;6BA9EU,kBAAkB;IAF9B,IAAA,YAAI,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,CA+E9B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"setting.module.d.ts","sourceRoot":"","sources":["../../src/setting/setting.module.ts"],"names":[],"mappings":"AAQA,qBAWa,aAAa;CAAG"}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.SettingModule = void 0;
|
10
|
-
const file_1 = require("@hedhog/file");
|
11
|
-
const pagination_1 = require("@hedhog/pagination");
|
12
|
-
const prisma_1 = require("@hedhog/prisma");
|
13
|
-
const common_1 = require("@nestjs/common");
|
14
|
-
const auth_module_1 = require("../auth/auth.module");
|
15
|
-
const setting_controller_1 = require("./setting.controller");
|
16
|
-
const setting_service_1 = require("./setting.service");
|
17
|
-
let SettingModule = class SettingModule {
|
18
|
-
};
|
19
|
-
exports.SettingModule = SettingModule;
|
20
|
-
exports.SettingModule = SettingModule = __decorate([
|
21
|
-
(0, common_1.Module)({
|
22
|
-
providers: [setting_service_1.SettingService],
|
23
|
-
exports: [setting_service_1.SettingService],
|
24
|
-
controllers: [setting_controller_1.SettingsController],
|
25
|
-
imports: [
|
26
|
-
(0, common_1.forwardRef)(() => auth_module_1.AuthModule),
|
27
|
-
(0, common_1.forwardRef)(() => prisma_1.PrismaModule),
|
28
|
-
(0, common_1.forwardRef)(() => pagination_1.PaginationModule),
|
29
|
-
(0, common_1.forwardRef)(() => file_1.FileModule),
|
30
|
-
],
|
31
|
-
})
|
32
|
-
], SettingModule);
|
33
|
-
//# sourceMappingURL=setting.module.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"setting.module.js","sourceRoot":"","sources":["../../src/setting/setting.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAA0C;AAC1C,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,qDAAiD;AACjD,6DAA0D;AAC1D,uDAAmD;AAa5C,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAXzB,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;YAClC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iBAAU,CAAC;SAC7B;KACF,CAAC;GACW,aAAa,CAAG"}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import { FileService } from '@hedhog/file';
|
2
|
-
import { PaginationDTO, PaginationService } from '@hedhog/pagination';
|
3
|
-
import { PrismaService } from '@hedhog/prisma';
|
4
|
-
import { Response } from 'express';
|
5
|
-
import { DeleteDTO } from '../dto/delete.dto';
|
6
|
-
import { CreateDTO } from './dto/create.dto';
|
7
|
-
import { SettingDTO } from './dto/setting.dto';
|
8
|
-
import { UpdateDTO } from './dto/update.dto';
|
9
|
-
export declare class SettingService {
|
10
|
-
private readonly prismaService;
|
11
|
-
private readonly paginationService;
|
12
|
-
private readonly fileService;
|
13
|
-
constructor(prismaService: PrismaService, paginationService: PaginationService, fileService: FileService);
|
14
|
-
getAppearanceCSS(res: Response): Promise<any>;
|
15
|
-
updateAppearanceSettings(): Promise<void>;
|
16
|
-
setManySettings(data: SettingDTO): Promise<{
|
17
|
-
success: boolean;
|
18
|
-
}>;
|
19
|
-
getSettingFromGroup(locale: any, paginationParams: any, slug: string): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
20
|
-
listSettingGroups(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
21
|
-
listSettings(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
22
|
-
get(settingId: number): Promise<any>;
|
23
|
-
create({}: CreateDTO): Promise<any>;
|
24
|
-
update({ id, data }: {
|
25
|
-
id: number;
|
26
|
-
data: UpdateDTO;
|
27
|
-
}): Promise<any>;
|
28
|
-
updateFromSlug(slug: string, data: UpdateDTO): Promise<any>;
|
29
|
-
delete({ ids }: DeleteDTO): Promise<any>;
|
30
|
-
setSettingUserValue(user_id: number, slug: string, value: string): Promise<any>;
|
31
|
-
getSettingValues(slug: string | string[]): Promise<Record<string, any>>;
|
32
|
-
}
|
33
|
-
//# sourceMappingURL=setting.service.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"setting.service.d.ts","sourceRoot":"","sources":["../../src/setting/setting.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAQ/C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,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;IAElC,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAJX,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB,EAEpC,WAAW,EAAE,WAAW;IAGrC,gBAAgB,CAAC,GAAG,EAAE,QAAQ;IAQ9B,wBAAwB;IA8ExB,eAAe,CAAC,IAAI,EAAE,UAAU;;;IAoChC,mBAAmB,CAAC,MAAM,EAAE,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,IAAI,EAAE,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