@things-factory/board-service 9.0.0-beta.7 → 9.0.0-beta.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-server/controllers/analyzer/analyze-integration.js +2 -2
- package/dist-server/controllers/analyzer/analyze-integration.js.map +1 -1
- package/dist-server/controllers/headless-model.d.ts +1 -1
- package/dist-server/controllers/headless-model.js +6 -6
- package/dist-server/controllers/headless-model.js.map +1 -1
- package/dist-server/controllers/headless-playlist.d.ts +1 -1
- package/dist-server/controllers/headless-playlist.js +5 -5
- package/dist-server/controllers/headless-playlist.js.map +1 -1
- package/dist-server/controllers/headless-pool-for-label.js +2 -2
- package/dist-server/controllers/headless-pool-for-label.js.map +1 -1
- package/dist-server/controllers/index.d.ts +1 -1
- package/dist-server/controllers/index.js +8 -8
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/controllers/label-command.js +5 -5
- package/dist-server/controllers/label-command.js.map +1 -1
- package/dist-server/controllers/pdf.d.ts +9 -1
- package/dist-server/controllers/pdf.js +7 -7
- package/dist-server/controllers/pdf.js.map +1 -1
- package/dist-server/controllers/screenshot.js +7 -7
- package/dist-server/controllers/screenshot.js.map +1 -1
- package/dist-server/controllers/thumbnail.js +2 -2
- package/dist-server/controllers/thumbnail.js.map +1 -1
- package/dist-server/errors/index.d.ts +1 -1
- package/dist-server/errors/index.js +1 -1
- package/dist-server/errors/index.js.map +1 -1
- package/dist-server/errors/license-error.js +1 -1
- package/dist-server/errors/license-error.js.map +1 -1
- package/dist-server/index.d.ts +4 -4
- package/dist-server/index.js +4 -4
- package/dist-server/index.js.map +1 -1
- package/dist-server/migrations/1556862253000-SeedGroup.js +3 -3
- package/dist-server/migrations/1556862253000-SeedGroup.js.map +1 -1
- package/dist-server/routers/standalone-board-service-router.js +28 -28
- package/dist-server/routers/standalone-board-service-router.js.map +1 -1
- package/dist-server/routes.js +12 -10
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/analysis/analysis-query.js +2 -2
- package/dist-server/service/analysis/analysis-query.js.map +1 -1
- package/dist-server/service/analysis/index.d.ts +1 -1
- package/dist-server/service/analysis/index.js +2 -2
- package/dist-server/service/analysis/index.js.map +1 -1
- package/dist-server/service/board/board-history.d.ts +3 -3
- package/dist-server/service/board/board-history.js +7 -7
- package/dist-server/service/board/board-history.js.map +1 -1
- package/dist-server/service/board/board-mutation.d.ts +2 -2
- package/dist-server/service/board/board-mutation.js +39 -39
- package/dist-server/service/board/board-mutation.js.map +1 -1
- package/dist-server/service/board/board-query.d.ts +5 -5
- package/dist-server/service/board/board-query.js +34 -34
- package/dist-server/service/board/board-query.js.map +1 -1
- package/dist-server/service/board/board-subscription.d.ts +1 -1
- package/dist-server/service/board/board-subscription.js +3 -3
- package/dist-server/service/board/board-subscription.js.map +1 -1
- package/dist-server/service/board/board-type.d.ts +2 -2
- package/dist-server/service/board/board-type.js +4 -4
- package/dist-server/service/board/board-type.js.map +1 -1
- package/dist-server/service/board/board.d.ts +2 -2
- package/dist-server/service/board/board.js +7 -7
- package/dist-server/service/board/board.js.map +1 -1
- package/dist-server/service/board/event-subscriber.d.ts +5 -5
- package/dist-server/service/board/event-subscriber.js +8 -8
- package/dist-server/service/board/event-subscriber.js.map +1 -1
- package/dist-server/service/board/index.d.ts +6 -6
- package/dist-server/service/board/index.js +9 -9
- package/dist-server/service/board/index.js.map +1 -1
- package/dist-server/service/board-favorite/board-favorite-query.d.ts +1 -1
- package/dist-server/service/board-favorite/board-favorite-query.js +5 -5
- package/dist-server/service/board-favorite/board-favorite-query.js.map +1 -1
- package/dist-server/service/board-favorite/board-favorite-type.d.ts +1 -1
- package/dist-server/service/board-favorite/board-favorite-type.js +2 -2
- package/dist-server/service/board-favorite/board-favorite-type.js.map +1 -1
- package/dist-server/service/board-favorite/index.d.ts +1 -1
- package/dist-server/service/board-favorite/index.js +2 -2
- package/dist-server/service/board-favorite/index.js.map +1 -1
- package/dist-server/service/board-template/board-template-mutation.d.ts +2 -2
- package/dist-server/service/board-template/board-template-mutation.js +19 -19
- package/dist-server/service/board-template/board-template-mutation.js.map +1 -1
- package/dist-server/service/board-template/board-template-query.d.ts +2 -2
- package/dist-server/service/board-template/board-template-query.js +13 -13
- package/dist-server/service/board-template/board-template-query.js.map +1 -1
- package/dist-server/service/board-template/board-template-type.d.ts +1 -1
- package/dist-server/service/board-template/board-template-type.js +2 -2
- package/dist-server/service/board-template/board-template-type.js.map +1 -1
- package/dist-server/service/board-template/index.d.ts +3 -3
- package/dist-server/service/board-template/index.js +5 -5
- package/dist-server/service/board-template/index.js.map +1 -1
- package/dist-server/service/group/group-mutation.d.ts +2 -2
- package/dist-server/service/group/group-mutation.js +14 -14
- package/dist-server/service/group/group-mutation.js.map +1 -1
- package/dist-server/service/group/group-query.d.ts +3 -3
- package/dist-server/service/group/group-query.js +14 -14
- package/dist-server/service/group/group-query.js.map +1 -1
- package/dist-server/service/group/group-type.d.ts +1 -1
- package/dist-server/service/group/group-type.js +2 -2
- package/dist-server/service/group/group-type.js.map +1 -1
- package/dist-server/service/group/group.d.ts +1 -1
- package/dist-server/service/group/group.js +3 -3
- package/dist-server/service/group/group.js.map +1 -1
- package/dist-server/service/group/index.d.ts +3 -3
- package/dist-server/service/group/index.js +5 -5
- package/dist-server/service/group/index.js.map +1 -1
- package/dist-server/service/index.d.ts +6 -6
- package/dist-server/service/index.js +31 -31
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/permission/domain-permission-subscriber.js +3 -3
- package/dist-server/service/permission/domain-permission-subscriber.js.map +1 -1
- package/dist-server/service/permission/index.d.ts +1 -1
- package/dist-server/service/permission/index.js +2 -2
- package/dist-server/service/permission/index.js.map +1 -1
- package/dist-server/service/play-group/event-subscriber.d.ts +1 -1
- package/dist-server/service/play-group/event-subscriber.js +3 -3
- package/dist-server/service/play-group/event-subscriber.js.map +1 -1
- package/dist-server/service/play-group/index.d.ts +5 -5
- package/dist-server/service/play-group/index.js +8 -8
- package/dist-server/service/play-group/index.js.map +1 -1
- package/dist-server/service/play-group/play-group-mutation.d.ts +2 -2
- package/dist-server/service/play-group/play-group-mutation.js +19 -19
- package/dist-server/service/play-group/play-group-mutation.js.map +1 -1
- package/dist-server/service/play-group/play-group-query.d.ts +3 -3
- package/dist-server/service/play-group/play-group-query.js +15 -15
- package/dist-server/service/play-group/play-group-query.js.map +1 -1
- package/dist-server/service/play-group/play-group-subscription.d.ts +1 -1
- package/dist-server/service/play-group/play-group-subscription.js +3 -3
- package/dist-server/service/play-group/play-group-subscription.js.map +1 -1
- package/dist-server/service/play-group/play-group-type.d.ts +1 -1
- package/dist-server/service/play-group/play-group-type.js +2 -2
- package/dist-server/service/play-group/play-group-type.js.map +1 -1
- package/dist-server/service/play-group/play-group.d.ts +1 -1
- package/dist-server/service/play-group/play-group.js +3 -3
- package/dist-server/service/play-group/play-group.js.map +1 -1
- package/dist-server/service/theme/index.d.ts +3 -3
- package/dist-server/service/theme/index.js +5 -5
- package/dist-server/service/theme/index.js.map +1 -1
- package/dist-server/service/theme/theme-mutation.d.ts +2 -2
- package/dist-server/service/theme/theme-mutation.js +16 -16
- package/dist-server/service/theme/theme-mutation.js.map +1 -1
- package/dist-server/service/theme/theme-query.d.ts +2 -2
- package/dist-server/service/theme/theme-query.js +10 -10
- package/dist-server/service/theme/theme-query.js.map +1 -1
- package/dist-server/service/theme/theme-type.d.ts +1 -1
- package/dist-server/service/theme/theme-type.js +2 -2
- package/dist-server/service/theme/theme-type.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -8
- package/views/internal-board-full-feature-view.html +0 -1
- package/views/internal-board-player-view.html +0 -1
- package/views/internal-board-service-view.html +0 -1
|
@@ -4,16 +4,16 @@ exports.ThemeMutation = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const typeorm_1 = require("typeorm");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const theme_js_1 = require("./theme.js");
|
|
8
|
+
const theme_type_js_1 = require("./theme-type.js");
|
|
9
9
|
let ThemeMutation = class ThemeMutation {
|
|
10
10
|
async createTheme(theme, context) {
|
|
11
11
|
const { domain, user, tx } = context.state;
|
|
12
|
-
return await tx.getRepository(
|
|
12
|
+
return await tx.getRepository(theme_js_1.Theme).save(Object.assign(Object.assign({}, theme), { domain, creator: user, updater: user }));
|
|
13
13
|
}
|
|
14
14
|
async updateTheme(id, patch, context) {
|
|
15
15
|
const { domain, user, tx } = context.state;
|
|
16
|
-
const repository = tx.getRepository(
|
|
16
|
+
const repository = tx.getRepository(theme_js_1.Theme);
|
|
17
17
|
const theme = await repository.findOne({
|
|
18
18
|
where: { domain: { id: domain.id }, id }
|
|
19
19
|
});
|
|
@@ -24,7 +24,7 @@ let ThemeMutation = class ThemeMutation {
|
|
|
24
24
|
let results = [];
|
|
25
25
|
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
26
26
|
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
27
|
-
const themeRepo = tx.getRepository(
|
|
27
|
+
const themeRepo = tx.getRepository(theme_js_1.Theme);
|
|
28
28
|
if (_createRecords.length > 0) {
|
|
29
29
|
for (let i = 0; i < _createRecords.length; i++) {
|
|
30
30
|
const newRecord = _createRecords[i];
|
|
@@ -44,12 +44,12 @@ let ThemeMutation = class ThemeMutation {
|
|
|
44
44
|
}
|
|
45
45
|
async deleteTheme(id, context) {
|
|
46
46
|
const { domain, tx } = context.state;
|
|
47
|
-
await tx.getRepository(
|
|
47
|
+
await tx.getRepository(theme_js_1.Theme).delete({ domain: { id: domain.id }, id });
|
|
48
48
|
return true;
|
|
49
49
|
}
|
|
50
50
|
async deleteThemes(ids, context) {
|
|
51
51
|
const { domain, tx } = context.state;
|
|
52
|
-
await tx.getRepository(
|
|
52
|
+
await tx.getRepository(theme_js_1.Theme).delete({
|
|
53
53
|
domain: { id: domain.id },
|
|
54
54
|
id: (0, typeorm_1.In)(ids)
|
|
55
55
|
});
|
|
@@ -58,7 +58,7 @@ let ThemeMutation = class ThemeMutation {
|
|
|
58
58
|
async importThemes(themes, context) {
|
|
59
59
|
const { domain, tx } = context.state;
|
|
60
60
|
await Promise.all(themes.map(async (theme) => {
|
|
61
|
-
const createdTheme = await tx.getRepository(
|
|
61
|
+
const createdTheme = await tx.getRepository(theme_js_1.Theme).save(Object.assign({ domain }, theme));
|
|
62
62
|
}));
|
|
63
63
|
return true;
|
|
64
64
|
}
|
|
@@ -66,27 +66,27 @@ let ThemeMutation = class ThemeMutation {
|
|
|
66
66
|
exports.ThemeMutation = ThemeMutation;
|
|
67
67
|
tslib_1.__decorate([
|
|
68
68
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
69
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
69
|
+
(0, type_graphql_1.Mutation)(returns => theme_js_1.Theme, { description: 'To create new Theme' }),
|
|
70
70
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('theme')),
|
|
71
71
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
72
72
|
tslib_1.__metadata("design:type", Function),
|
|
73
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
73
|
+
tslib_1.__metadata("design:paramtypes", [theme_type_js_1.NewTheme, Object]),
|
|
74
74
|
tslib_1.__metadata("design:returntype", Promise)
|
|
75
75
|
], ThemeMutation.prototype, "createTheme", null);
|
|
76
76
|
tslib_1.__decorate([
|
|
77
77
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
78
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
78
|
+
(0, type_graphql_1.Mutation)(returns => theme_js_1.Theme, { description: 'To modify Theme information' }),
|
|
79
79
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
80
80
|
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
81
81
|
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
82
82
|
tslib_1.__metadata("design:type", Function),
|
|
83
|
-
tslib_1.__metadata("design:paramtypes", [String,
|
|
83
|
+
tslib_1.__metadata("design:paramtypes", [String, theme_type_js_1.ThemePatch, Object]),
|
|
84
84
|
tslib_1.__metadata("design:returntype", Promise)
|
|
85
85
|
], ThemeMutation.prototype, "updateTheme", null);
|
|
86
86
|
tslib_1.__decorate([
|
|
87
87
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
88
|
-
(0, type_graphql_1.Mutation)(returns => [
|
|
89
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [
|
|
88
|
+
(0, type_graphql_1.Mutation)(returns => [theme_js_1.Theme], { description: "To modify multiple Themes' information" }),
|
|
89
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [theme_type_js_1.ThemePatch])),
|
|
90
90
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
91
91
|
tslib_1.__metadata("design:type", Function),
|
|
92
92
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
@@ -113,13 +113,13 @@ tslib_1.__decorate([
|
|
|
113
113
|
tslib_1.__decorate([
|
|
114
114
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
115
115
|
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To import multiple Themes' }),
|
|
116
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('themes', type => [
|
|
116
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('themes', type => [theme_type_js_1.ThemePatch])),
|
|
117
117
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
118
118
|
tslib_1.__metadata("design:type", Function),
|
|
119
119
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
120
120
|
tslib_1.__metadata("design:returntype", Promise)
|
|
121
121
|
], ThemeMutation.prototype, "importThemes", null);
|
|
122
122
|
exports.ThemeMutation = ThemeMutation = tslib_1.__decorate([
|
|
123
|
-
(0, type_graphql_1.Resolver)(
|
|
123
|
+
(0, type_graphql_1.Resolver)(theme_js_1.Theme)
|
|
124
124
|
], ThemeMutation);
|
|
125
125
|
//# sourceMappingURL=theme-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-mutation.js","sourceRoot":"","sources":["../../../server/service/theme/theme-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,
|
|
1
|
+
{"version":3,"file":"theme-mutation.js","sourceRoot":"","sources":["../../../server/service/theme/theme-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,yCAAkC;AAClC,mDAAsD;AAG/C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGlB,AAAN,KAAK,CAAC,WAAW,CAAe,KAAe,EAAS,OAAwB;QAC9E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,gBAAK,CAAC,CAAC,IAAI,iCACpC,KAAK,KACR,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,WAAW,CACJ,EAAU,EACP,KAAiB,EACxB,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,gBAAK,CAAC,CAAA;QAC1C,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACrC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,KAAK,GACL,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IA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AAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;gDAM9C;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDASrE;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAExE,mBAAA,IAAA,kBAAG,EAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,0BAAU,CAAC,CAAC,CAAA;IACnC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDAWP;wBAvHU,aAAa;IADzB,IAAA,uBAAQ,EAAC,gBAAK,CAAC;GACH,aAAa,CAwHzB","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { Theme } from './theme.js'\nimport { NewTheme, ThemePatch } from './theme-type.js'\n\n@Resolver(Theme)\nexport class ThemeMutation {\n @Directive('@transaction')\n @Mutation(returns => Theme, { description: 'To create new Theme' })\n async createTheme(@Arg('theme') theme: NewTheme, @Ctx() context: ResolverContext): Promise<Theme> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(Theme).save({\n ...theme,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Theme, { description: 'To modify Theme information' })\n async updateTheme(\n @Arg('id') id: string,\n @Arg('patch') patch: ThemePatch,\n @Ctx() context: ResolverContext\n ): Promise<Theme> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Theme)\n const theme = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n return await repository.save({\n ...theme,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Theme], { description: \"To modify multiple Themes' information\" })\n async updateMultipleTheme(\n @Arg('patches', type => [ThemePatch]) patches: ThemePatch[],\n @Ctx() context: ResolverContext\n ): Promise<Theme[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const themeRepo = tx.getRepository(Theme)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await themeRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const theme = await themeRepo.findOneBy({ id: updateRecord.id })\n\n const result = await themeRepo.save({\n ...theme,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete Theme' })\n async deleteTheme(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Theme).delete({ domain: { id: domain.id }, id })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Themes' })\n async deleteThemes(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Theme).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple Themes' })\n async importThemes(\n @Arg('themes', type => [ThemePatch]) themes: ThemePatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n themes.map(async (theme: ThemePatch) => {\n const createdTheme: Theme = await tx.getRepository(Theme).save({ domain, ...theme })\n })\n )\n\n return true\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Domain, ListParam } from '@things-factory/shell';
|
|
2
2
|
import { User } from '@things-factory/auth-base';
|
|
3
|
-
import { Theme } from './theme';
|
|
4
|
-
import { ThemeList } from './theme-type';
|
|
3
|
+
import { Theme } from './theme.js';
|
|
4
|
+
import { ThemeList } from './theme-type.js';
|
|
5
5
|
export declare class ThemeQuery {
|
|
6
6
|
theme(id: string, context: ResolverContext): Promise<Theme>;
|
|
7
7
|
themes(params: ListParam, context: ResolverContext): Promise<ThemeList>;
|
|
@@ -5,12 +5,12 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const shell_1 = require("@things-factory/shell");
|
|
7
7
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const theme_js_1 = require("./theme.js");
|
|
9
|
+
const theme_type_js_1 = require("./theme-type.js");
|
|
10
10
|
let ThemeQuery = class ThemeQuery {
|
|
11
11
|
async theme(id, context) {
|
|
12
12
|
const { domain } = context.state;
|
|
13
|
-
return await (0, shell_1.getRepository)(
|
|
13
|
+
return await (0, shell_1.getRepository)(theme_js_1.Theme).findOne({
|
|
14
14
|
where: { domain: { id: domain.id }, id }
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -19,7 +19,7 @@ let ThemeQuery = class ThemeQuery {
|
|
|
19
19
|
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
20
20
|
domain,
|
|
21
21
|
params,
|
|
22
|
-
repository: await (0, shell_1.getRepository)(
|
|
22
|
+
repository: await (0, shell_1.getRepository)(theme_js_1.Theme),
|
|
23
23
|
searchables: ['name', 'description']
|
|
24
24
|
});
|
|
25
25
|
const [items, total] = await queryBuilder.getManyAndCount();
|
|
@@ -37,7 +37,7 @@ let ThemeQuery = class ThemeQuery {
|
|
|
37
37
|
};
|
|
38
38
|
exports.ThemeQuery = ThemeQuery;
|
|
39
39
|
tslib_1.__decorate([
|
|
40
|
-
(0, type_graphql_1.Query)(returns =>
|
|
40
|
+
(0, type_graphql_1.Query)(returns => theme_js_1.Theme, { nullable: true, description: 'To fetch a Theme' }),
|
|
41
41
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
42
42
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
43
43
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -45,7 +45,7 @@ tslib_1.__decorate([
|
|
|
45
45
|
tslib_1.__metadata("design:returntype", Promise)
|
|
46
46
|
], ThemeQuery.prototype, "theme", null);
|
|
47
47
|
tslib_1.__decorate([
|
|
48
|
-
(0, type_graphql_1.Query)(returns =>
|
|
48
|
+
(0, type_graphql_1.Query)(returns => theme_type_js_1.ThemeList, { description: 'To fetch multiple Themes' }),
|
|
49
49
|
tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
|
|
50
50
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
51
51
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -56,24 +56,24 @@ tslib_1.__decorate([
|
|
|
56
56
|
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
57
57
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
58
58
|
tslib_1.__metadata("design:type", Function),
|
|
59
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
59
|
+
tslib_1.__metadata("design:paramtypes", [theme_js_1.Theme]),
|
|
60
60
|
tslib_1.__metadata("design:returntype", Promise)
|
|
61
61
|
], ThemeQuery.prototype, "domain", null);
|
|
62
62
|
tslib_1.__decorate([
|
|
63
63
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
64
64
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
65
65
|
tslib_1.__metadata("design:type", Function),
|
|
66
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
66
|
+
tslib_1.__metadata("design:paramtypes", [theme_js_1.Theme]),
|
|
67
67
|
tslib_1.__metadata("design:returntype", Promise)
|
|
68
68
|
], ThemeQuery.prototype, "updater", null);
|
|
69
69
|
tslib_1.__decorate([
|
|
70
70
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
71
71
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
72
72
|
tslib_1.__metadata("design:type", Function),
|
|
73
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
73
|
+
tslib_1.__metadata("design:paramtypes", [theme_js_1.Theme]),
|
|
74
74
|
tslib_1.__metadata("design:returntype", Promise)
|
|
75
75
|
], ThemeQuery.prototype, "creator", null);
|
|
76
76
|
exports.ThemeQuery = ThemeQuery = tslib_1.__decorate([
|
|
77
|
-
(0, type_graphql_1.Resolver)(
|
|
77
|
+
(0, type_graphql_1.Resolver)(theme_js_1.Theme)
|
|
78
78
|
], ThemeQuery);
|
|
79
79
|
//# sourceMappingURL=theme-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-query.js","sourceRoot":"","sources":["../../../server/service/theme/theme-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"theme-query.js","sourceRoot":"","sources":["../../../server/service/theme/theme-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,yCAAkC;AAClC,mDAA2C;AAGpC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAEf,AAAN,KAAK,CAAC,KAAK,CAAY,EAAU,EAAS,OAAwB;QAChE,MAAM,EAAE,MAAM,EA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AAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IAC1F,CAAC;CACF,CAAA;AAxCY,gCAAU;AAEf;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,gBAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;IACjE,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uCAMxC;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,yBAAS,EAAE,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IAC3D,mBAAA,IAAA,mBAAI,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,CAAC,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;wCAatD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,gBAAK;;wCAEhC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,gBAAK;;yCAEjC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,gBAAK;;yCAEjC;qBAvCU,UAAU;IADtB,IAAA,uBAAQ,EAAC,gBAAK,CAAC;GACH,UAAU,CAwCtB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Theme } from './theme.js'\nimport { ThemeList } from './theme-type.js'\n\n@Resolver(Theme)\nexport class ThemeQuery {\n @Query(returns => Theme!, { nullable: true, description: 'To fetch a Theme' })\n async theme(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Theme> {\n const { domain } = context.state\n\n return await getRepository(Theme).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => ThemeList, { description: 'To fetch multiple Themes' })\n async themes(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<ThemeList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(Theme),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() theme: Theme): Promise<Domain> {\n return theme.domainId && (await getRepository(Domain).findOneBy({ id: theme.domainId }))\n }\n\n @FieldResolver(type => User)\n async updater(@Root() theme: Theme): Promise<User> {\n return theme.updaterId && (await getRepository(User).findOneBy({ id: theme.updaterId }))\n }\n\n @FieldResolver(type => User)\n async creator(@Root() theme: Theme): Promise<User> {\n return theme.creatorId && (await getRepository(User).findOneBy({ id: theme.creatorId }))\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ exports.ThemeList = exports.ThemePatch = exports.NewTheme = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const shell_1 = require("@things-factory/shell");
|
|
7
|
-
const
|
|
7
|
+
const theme_js_1 = require("./theme.js");
|
|
8
8
|
let NewTheme = class NewTheme {
|
|
9
9
|
};
|
|
10
10
|
exports.NewTheme = NewTheme;
|
|
@@ -69,7 +69,7 @@ let ThemeList = class ThemeList {
|
|
|
69
69
|
};
|
|
70
70
|
exports.ThemeList = ThemeList;
|
|
71
71
|
tslib_1.__decorate([
|
|
72
|
-
(0, type_graphql_1.Field)(type => [
|
|
72
|
+
(0, type_graphql_1.Field)(type => [theme_js_1.Theme]),
|
|
73
73
|
tslib_1.__metadata("design:type", Array)
|
|
74
74
|
], ThemeList.prototype, "items", void 0);
|
|
75
75
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-type.js","sourceRoot":"","sources":["../../../server/service/theme/theme-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"theme-type.js","sourceRoot":"","sources":["../../../server/service/theme/theme-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iDAAoD;AACpD,yCAAkC;AAG3B,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAepB,CAAA;AAfY,4BAAQ;AAEnB;IADC,IAAA,oBAAK,GAAE;;sCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACb;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACrC;mBAdA,QAAQ;IADpB,IAAA,wBAAS,GAAE;GACC,QAAQ,CAepB;AAGM,IAAM,UAAU,GAAhB,MAAM,UAAU;CAqBtB,CAAA;AArBY,gCAAU;AAErB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACb;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACrC;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACX;qBApBJ,UAAU;IADtB,IAAA,wBAAS,GAAE;GACC,UAAU,CAqBtB;AAGM,IAAM,SAAS,GAAf,MAAM,SAAS;CAMrB,CAAA;AANY,8BAAS;AAEpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gBAAK,CAAC,CAAC;;wCACT;AAGd;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;wCACN;oBALF,SAAS;IADrB,IAAA,yBAAU,GAAE;GACA,SAAS,CAMrB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\n\nimport { ScalarObject } from '@things-factory/shell'\nimport { Theme } from './theme.js'\n\n@InputType()\nexport class NewTheme {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n type?: string\n\n @Field(type => ScalarObject, { nullable: true })\n value?: any\n}\n\n@InputType()\nexport class ThemePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n type?: string\n\n @Field(type => ScalarObject, { nullable: true })\n value?: any\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ThemeList {\n @Field(type => [Theme])\n items: Theme[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|