@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,29 +4,29 @@ exports.PlayGroupMutation = 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
|
|
9
|
-
const
|
|
7
|
+
const board_js_1 = require("../board/board.js");
|
|
8
|
+
const play_group_js_1 = require("./play-group.js");
|
|
9
|
+
const play_group_type_js_1 = require("./play-group-type.js");
|
|
10
10
|
let PlayGroupMutation = class PlayGroupMutation {
|
|
11
11
|
async createPlayGroup(playGroup, context) {
|
|
12
12
|
const { domain, user, tx } = context.state;
|
|
13
|
-
return await tx.getRepository(
|
|
13
|
+
return await tx.getRepository(play_group_js_1.PlayGroup).save(Object.assign(Object.assign({ domain }, playGroup), { creator: user, updater: user }));
|
|
14
14
|
}
|
|
15
15
|
async updatePlayGroup(id, patch, context) {
|
|
16
16
|
const { domain, user, tx } = context.state;
|
|
17
|
-
const repository = tx.getRepository(
|
|
17
|
+
const repository = tx.getRepository(play_group_js_1.PlayGroup);
|
|
18
18
|
const playGroup = await repository.findOneBy({ domain: { id: domain.id }, id });
|
|
19
19
|
return await repository.save(Object.assign(Object.assign(Object.assign({}, playGroup), patch), { updater: user }));
|
|
20
20
|
}
|
|
21
21
|
async reorderPlayGroup(id, boardIds, context) {
|
|
22
22
|
const { domain, user, tx } = context.state;
|
|
23
|
-
const repository = tx.getRepository(
|
|
23
|
+
const repository = tx.getRepository(play_group_js_1.PlayGroup);
|
|
24
24
|
const playGroup = await repository.findOneBy({ domain: { id: domain.id }, id });
|
|
25
25
|
return await repository.save(Object.assign(Object.assign({}, playGroup), { order: boardIds, updater: user }));
|
|
26
26
|
}
|
|
27
27
|
async joinPlayGroup(id, boardIds, context) {
|
|
28
28
|
const { tx } = context.state;
|
|
29
|
-
const repository = tx.getRepository(
|
|
29
|
+
const repository = tx.getRepository(play_group_js_1.PlayGroup);
|
|
30
30
|
const playGroup = await repository.findOne({
|
|
31
31
|
where: { id },
|
|
32
32
|
relations: ['boards']
|
|
@@ -41,7 +41,7 @@ let PlayGroupMutation = class PlayGroupMutation {
|
|
|
41
41
|
order.push(boardId);
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
const boardRepository = tx.getRepository(
|
|
44
|
+
const boardRepository = tx.getRepository(board_js_1.Board);
|
|
45
45
|
playGroup.boards = await boardRepository.findBy({ id: (0, typeorm_1.In)(boardIdList) });
|
|
46
46
|
playGroup.updatedAt = new Date();
|
|
47
47
|
playGroup.order = order;
|
|
@@ -49,7 +49,7 @@ let PlayGroupMutation = class PlayGroupMutation {
|
|
|
49
49
|
}
|
|
50
50
|
async leavePlayGroup(id, boardIds, context) {
|
|
51
51
|
const { tx } = context.state;
|
|
52
|
-
const repository = tx.getRepository(
|
|
52
|
+
const repository = tx.getRepository(play_group_js_1.PlayGroup);
|
|
53
53
|
const playGroup = await repository.findOne({
|
|
54
54
|
where: { id },
|
|
55
55
|
relations: ['boards']
|
|
@@ -66,7 +66,7 @@ let PlayGroupMutation = class PlayGroupMutation {
|
|
|
66
66
|
order.splice(index, 1);
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
const boardRepository = tx.getRepository(
|
|
69
|
+
const boardRepository = tx.getRepository(board_js_1.Board);
|
|
70
70
|
playGroup.boards = await boardRepository.findBy({ id: (0, typeorm_1.In)(boardIdList) });
|
|
71
71
|
playGroup.updatedAt = new Date();
|
|
72
72
|
playGroup.order = order;
|
|
@@ -74,7 +74,7 @@ let PlayGroupMutation = class PlayGroupMutation {
|
|
|
74
74
|
}
|
|
75
75
|
async deletePlayGroup(id, context) {
|
|
76
76
|
const { domain, tx } = context.state;
|
|
77
|
-
const repository = tx.getRepository(
|
|
77
|
+
const repository = tx.getRepository(play_group_js_1.PlayGroup);
|
|
78
78
|
/* TODO - 플레이 그룹은 소속된 보드-플레이그룹 관계들도 제거되어야 한다. */
|
|
79
79
|
const playGroup = await repository.findOneBy({ domain: { id: domain.id }, id });
|
|
80
80
|
await repository.delete(id);
|
|
@@ -83,26 +83,26 @@ let PlayGroupMutation = class PlayGroupMutation {
|
|
|
83
83
|
};
|
|
84
84
|
exports.PlayGroupMutation = PlayGroupMutation;
|
|
85
85
|
tslib_1.__decorate([
|
|
86
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
86
|
+
(0, type_graphql_1.Mutation)(returns => play_group_js_1.PlayGroup, { description: 'To create new PlayGroup' }),
|
|
87
87
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
88
88
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('playGroup')),
|
|
89
89
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
90
90
|
tslib_1.__metadata("design:type", Function),
|
|
91
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
91
|
+
tslib_1.__metadata("design:paramtypes", [play_group_type_js_1.NewPlayGroup, Object]),
|
|
92
92
|
tslib_1.__metadata("design:returntype", Promise)
|
|
93
93
|
], PlayGroupMutation.prototype, "createPlayGroup", null);
|
|
94
94
|
tslib_1.__decorate([
|
|
95
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
95
|
+
(0, type_graphql_1.Mutation)(returns => play_group_js_1.PlayGroup, { description: 'To modify PlayGroup information' }),
|
|
96
96
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
97
97
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
98
98
|
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
99
99
|
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
100
100
|
tslib_1.__metadata("design:type", Function),
|
|
101
|
-
tslib_1.__metadata("design:paramtypes", [String,
|
|
101
|
+
tslib_1.__metadata("design:paramtypes", [String, play_group_type_js_1.PlayGroupPatch, Object]),
|
|
102
102
|
tslib_1.__metadata("design:returntype", Promise)
|
|
103
103
|
], PlayGroupMutation.prototype, "updatePlayGroup", null);
|
|
104
104
|
tslib_1.__decorate([
|
|
105
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
105
|
+
(0, type_graphql_1.Mutation)(returns => play_group_js_1.PlayGroup, { description: 'To modify board order of a PlayGroup' }),
|
|
106
106
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
107
107
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
108
108
|
tslib_1.__param(1, (0, type_graphql_1.Arg)('boardIds', type => [String])),
|
|
@@ -112,7 +112,7 @@ tslib_1.__decorate([
|
|
|
112
112
|
tslib_1.__metadata("design:returntype", Promise)
|
|
113
113
|
], PlayGroupMutation.prototype, "reorderPlayGroup", null);
|
|
114
114
|
tslib_1.__decorate([
|
|
115
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
115
|
+
(0, type_graphql_1.Mutation)(returns => play_group_js_1.PlayGroup, { description: 'To make the board to join the play group' }),
|
|
116
116
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
117
117
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
118
118
|
tslib_1.__param(1, (0, type_graphql_1.Arg)('boardIds', type => [String])),
|
|
@@ -122,7 +122,7 @@ tslib_1.__decorate([
|
|
|
122
122
|
tslib_1.__metadata("design:returntype", Promise)
|
|
123
123
|
], PlayGroupMutation.prototype, "joinPlayGroup", null);
|
|
124
124
|
tslib_1.__decorate([
|
|
125
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
125
|
+
(0, type_graphql_1.Mutation)(returns => play_group_js_1.PlayGroup, { description: 'To make the board to leave from the play group' }),
|
|
126
126
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
127
127
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
128
128
|
tslib_1.__param(1, (0, type_graphql_1.Arg)('boardIds', type => [String])),
|
|
@@ -141,6 +141,6 @@ tslib_1.__decorate([
|
|
|
141
141
|
tslib_1.__metadata("design:returntype", Promise)
|
|
142
142
|
], PlayGroupMutation.prototype, "deletePlayGroup", null);
|
|
143
143
|
exports.PlayGroupMutation = PlayGroupMutation = tslib_1.__decorate([
|
|
144
|
-
(0, type_graphql_1.Resolver)(
|
|
144
|
+
(0, type_graphql_1.Resolver)(play_group_js_1.PlayGroup)
|
|
145
145
|
], PlayGroupMutation);
|
|
146
146
|
//# sourceMappingURL=play-group-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play-group-mutation.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-mutation.ts"],"names":[],"mappings":";;;;AACA,+CAAsE;AACtE,qCAA4B;AAE5B,0CAAsC;AACtC,6CAAwC;AACxC,uDAAgE;AAGzD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAGtB,AAAN,KAAK,CAAC,eAAe,CACD,SAAuB,EAClC,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,sBAAS,CAAC,CAAC,IAAI,+BAC3C,MAAM,IACH,SAAS,KACZ,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,eAAe,CACR,EAAU,EACP,KAAqB,EAC5B,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAC1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,sBAAS,CAAC,CAAA;QAE9C,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;QAE/E,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,SAAS,GACT,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,gBAAgB,CACT,EAAU,EACc,QAAkB,EAC9C,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAC1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,sBAAS,CAAC,CAA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BAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACpE,IAAA,wBAAS,EAAC,cAAc,CAAC;IACH,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;wDASlD;4BAzIU,iBAAiB;IAD7B,IAAA,uBAAQ,EAAC,sBAAS,CAAC;GACP,iBAAiB,CA0I7B","sourcesContent":["import { Data } from '@things-factory/shell'\nimport { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { Board } from '../board/board'\nimport { PlayGroup } from './play-group'\nimport { NewPlayGroup, PlayGroupPatch } from './play-group-type'\n\n@Resolver(PlayGroup)\nexport class PlayGroupMutation {\n @Mutation(returns => PlayGroup, { description: 'To create new PlayGroup' })\n @Directive('@transaction')\n async createPlayGroup(\n @Arg('playGroup') playGroup: NewPlayGroup,\n @Ctx() context: ResolverContext\n ): Promise<PlayGroup> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(PlayGroup).save({\n domain,\n ...playGroup,\n creator: user,\n updater: user\n })\n }\n\n @Mutation(returns => PlayGroup, { description: 'To modify PlayGroup information' })\n @Directive('@transaction')\n async updatePlayGroup(\n @Arg('id') id: string,\n @Arg('patch') patch: PlayGroupPatch,\n @Ctx() context: ResolverContext\n ): Promise<PlayGroup> {\n const { domain, user, tx } = context.state\n const repository = tx.getRepository(PlayGroup)\n\n const playGroup = await repository.findOneBy({ domain: { id: domain.id }, id })\n\n return await repository.save({\n ...playGroup,\n ...patch,\n updater: user\n })\n }\n\n @Mutation(returns => PlayGroup, { description: 'To modify board order of a PlayGroup' })\n @Directive('@transaction')\n async reorderPlayGroup(\n @Arg('id') id: string,\n @Arg('boardIds', type => [String]) boardIds: string[],\n @Ctx() context: ResolverContext\n ): Promise<PlayGroup> {\n const { domain, user, tx } = context.state\n const repository = tx.getRepository(PlayGroup)\n\n const playGroup = await repository.findOneBy({ domain: { id: domain.id }, id })\n\n return await repository.save({\n ...playGroup,\n order: boardIds,\n updater: user\n })\n }\n\n @Mutation(returns => PlayGroup, { description: 'To make the board to join the play group' })\n @Directive('@transaction')\n async joinPlayGroup(\n @Arg('id') id: string,\n @Arg('boardIds', type => [String]) boardIds: string[],\n @Ctx() context: ResolverContext\n ) {\n const { tx } = context.state\n\n const repository = tx.getRepository(PlayGroup)\n const playGroup = await repository.findOne({\n where: { id },\n relations: ['boards']\n })\n const order = playGroup.order || []\n\n const boardIdList = playGroup.boards.map(board => board.id)\n boardIds.forEach(boardId => {\n if (boardIdList.indexOf(boardId) == -1) {\n boardIdList.push(boardId)\n }\n if (order.indexOf(boardId) == -1) {\n order.push(boardId)\n }\n })\n\n const boardRepository = tx.getRepository(Board)\n playGroup.boards = await boardRepository.findBy({ id: In(boardIdList) })\n playGroup.updatedAt = new Date()\n playGroup.order = order\n\n return await repository.save(playGroup)\n }\n\n @Mutation(returns => PlayGroup, { description: 'To make the board to leave from the play group' })\n @Directive('@transaction')\n async leavePlayGroup(\n @Arg('id') id: string,\n @Arg('boardIds', type => [String]) boardIds: string[],\n @Ctx() context: ResolverContext\n ) {\n const { tx } = context.state\n\n const repository = tx.getRepository(PlayGroup)\n const playGroup = await repository.findOne({\n where: { id },\n relations: ['boards']\n })\n const order = playGroup.order || []\n\n const boardIdList = playGroup.boards.map(board => board.id)\n boardIds.forEach(boardId => {\n let index = boardIdList.indexOf(boardId)\n if (index !== -1) {\n boardIdList.splice(index, 1)\n }\n\n index = order.indexOf(boardId)\n if (index !== -1) {\n order.splice(index, 1)\n }\n })\n\n const boardRepository = tx.getRepository(Board)\n playGroup.boards = await boardRepository.findBy({ id: In(boardIdList) })\n playGroup.updatedAt = new Date()\n playGroup.order = order\n\n return await repository.save(playGroup)\n }\n\n @Mutation(returns => Boolean, { description: 'To delete PlayGroup' })\n @Directive('@transaction')\n async deletePlayGroup(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n const repository = tx.getRepository(PlayGroup)\n\n /* TODO - 플레이 그룹은 소속된 보드-플레이그룹 관계들도 제거되어야 한다. */\n const playGroup = await repository.findOneBy({ domain: { id: domain.id }, id })\n\n await repository.delete(id)\n return true\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"play-group-mutation.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-mutation.ts"],"names":[],"mappings":";;;;AACA,+CAAsE;AACtE,qCAA4B;AAE5B,gDAAyC;AACzC,mDAA2C;AAC3C,6DAAmE;AAG5D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAGtB,AAAN,KAAK,CAAC,eAAe,CACD,SAAuB,EAClC,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,yBAAS,CAAC,CAAC,IAAI,+BAC3C,MAAM,IACH,SAAS,KACZ,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,eAAe,CACR,EAAU,EACP,KAAqB,EAC5B,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAC1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,yBAAS,CAAC,CAAA;QAE9C,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;QAE/E,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,SAAS,GACT,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,gBAAgB,CACT,EAAU,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,CAAC,CAAA;IACT,mBAAA,IAAA,kBAAG,EAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IACjC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uDA8BP;AAIK;IAFL,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACpE,IAAA,wBAAS,EAAC,cAAc,CAAC;IACH,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;wDASlD;4BAzIU,iBAAiB;IAD7B,IAAA,uBAAQ,EAAC,yBAAS,CAAC;GACP,iBAAiB,CA0I7B","sourcesContent":["import { Data } from '@things-factory/shell'\nimport { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { Board } from '../board/board.js'\nimport { PlayGroup } from './play-group.js'\nimport { NewPlayGroup, PlayGroupPatch } from './play-group-type.js'\n\n@Resolver(PlayGroup)\nexport class PlayGroupMutation {\n @Mutation(returns => PlayGroup, { description: 'To create new PlayGroup' })\n @Directive('@transaction')\n async createPlayGroup(\n @Arg('playGroup') playGroup: NewPlayGroup,\n @Ctx() context: ResolverContext\n ): Promise<PlayGroup> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(PlayGroup).save({\n domain,\n ...playGroup,\n creator: user,\n updater: user\n })\n }\n\n @Mutation(returns => PlayGroup, { description: 'To modify PlayGroup information' })\n @Directive('@transaction')\n async updatePlayGroup(\n @Arg('id') id: string,\n @Arg('patch') patch: PlayGroupPatch,\n @Ctx() context: ResolverContext\n ): Promise<PlayGroup> {\n const { domain, user, tx } = context.state\n const repository = tx.getRepository(PlayGroup)\n\n const playGroup = await repository.findOneBy({ domain: { id: domain.id }, id })\n\n return await repository.save({\n ...playGroup,\n ...patch,\n updater: user\n })\n }\n\n @Mutation(returns => PlayGroup, { description: 'To modify board order of a PlayGroup' })\n @Directive('@transaction')\n async reorderPlayGroup(\n @Arg('id') id: string,\n @Arg('boardIds', type => [String]) boardIds: string[],\n @Ctx() context: ResolverContext\n ): Promise<PlayGroup> {\n const { domain, user, tx } = context.state\n const repository = tx.getRepository(PlayGroup)\n\n const playGroup = await repository.findOneBy({ domain: { id: domain.id }, id })\n\n return await repository.save({\n ...playGroup,\n order: boardIds,\n updater: user\n })\n }\n\n @Mutation(returns => PlayGroup, { description: 'To make the board to join the play group' })\n @Directive('@transaction')\n async joinPlayGroup(\n @Arg('id') id: string,\n @Arg('boardIds', type => [String]) boardIds: string[],\n @Ctx() context: ResolverContext\n ) {\n const { tx } = context.state\n\n const repository = tx.getRepository(PlayGroup)\n const playGroup = await repository.findOne({\n where: { id },\n relations: ['boards']\n })\n const order = playGroup.order || []\n\n const boardIdList = playGroup.boards.map(board => board.id)\n boardIds.forEach(boardId => {\n if (boardIdList.indexOf(boardId) == -1) {\n boardIdList.push(boardId)\n }\n if (order.indexOf(boardId) == -1) {\n order.push(boardId)\n }\n })\n\n const boardRepository = tx.getRepository(Board)\n playGroup.boards = await boardRepository.findBy({ id: In(boardIdList) })\n playGroup.updatedAt = new Date()\n playGroup.order = order\n\n return await repository.save(playGroup)\n }\n\n @Mutation(returns => PlayGroup, { description: 'To make the board to leave from the play group' })\n @Directive('@transaction')\n async leavePlayGroup(\n @Arg('id') id: string,\n @Arg('boardIds', type => [String]) boardIds: string[],\n @Ctx() context: ResolverContext\n ) {\n const { tx } = context.state\n\n const repository = tx.getRepository(PlayGroup)\n const playGroup = await repository.findOne({\n where: { id },\n relations: ['boards']\n })\n const order = playGroup.order || []\n\n const boardIdList = playGroup.boards.map(board => board.id)\n boardIds.forEach(boardId => {\n let index = boardIdList.indexOf(boardId)\n if (index !== -1) {\n boardIdList.splice(index, 1)\n }\n\n index = order.indexOf(boardId)\n if (index !== -1) {\n order.splice(index, 1)\n }\n })\n\n const boardRepository = tx.getRepository(Board)\n playGroup.boards = await boardRepository.findBy({ id: In(boardIdList) })\n playGroup.updatedAt = new Date()\n playGroup.order = order\n\n return await repository.save(playGroup)\n }\n\n @Mutation(returns => Boolean, { description: 'To delete PlayGroup' })\n @Directive('@transaction')\n async deletePlayGroup(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n const repository = tx.getRepository(PlayGroup)\n\n /* TODO - 플레이 그룹은 소속된 보드-플레이그룹 관계들도 제거되어야 한다. */\n const playGroup = await repository.findOneBy({ domain: { id: domain.id }, id })\n\n await repository.delete(id)\n return true\n }\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { User } from '@things-factory/auth-base';
|
|
2
2
|
import { Domain, ListParam } from '@things-factory/shell';
|
|
3
|
-
import { Board } from '../board/board';
|
|
4
|
-
import { PlayGroup } from './play-group';
|
|
5
|
-
import { PlayGroupList } from './play-group-type';
|
|
3
|
+
import { Board } from '../board/board.js';
|
|
4
|
+
import { PlayGroup } from './play-group.js';
|
|
5
|
+
import { PlayGroupList } from './play-group-type.js';
|
|
6
6
|
export declare class PlayGroupQuery {
|
|
7
7
|
playGroup(id: string, context: ResolverContext): Promise<PlayGroup>;
|
|
8
8
|
playGroupByName(name: string, context: ResolverContext): Promise<PlayGroup>;
|
|
@@ -5,26 +5,26 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
7
7
|
const shell_1 = require("@things-factory/shell");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const board_js_1 = require("../board/board.js");
|
|
9
|
+
const play_group_js_1 = require("./play-group.js");
|
|
10
|
+
const play_group_type_js_1 = require("./play-group-type.js");
|
|
11
11
|
let PlayGroupQuery = class PlayGroupQuery {
|
|
12
12
|
async playGroup(id, context) {
|
|
13
13
|
const { domain } = context.state;
|
|
14
|
-
return await (0, shell_1.getRepository)(
|
|
14
|
+
return await (0, shell_1.getRepository)(play_group_js_1.PlayGroup).findOne({
|
|
15
15
|
where: { domain: { id: domain.id }, id }
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
async playGroupByName(name, context) {
|
|
19
19
|
const { domain } = context.state;
|
|
20
|
-
return await (0, shell_1.getRepository)(
|
|
20
|
+
return await (0, shell_1.getRepository)(play_group_js_1.PlayGroup).findOne({
|
|
21
21
|
where: { domain: { id: domain.id }, name }
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
async playGroups(params, context) {
|
|
25
25
|
const { domain } = context.state;
|
|
26
26
|
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
27
|
-
repository: (0, shell_1.getRepository)(
|
|
27
|
+
repository: (0, shell_1.getRepository)(play_group_js_1.PlayGroup),
|
|
28
28
|
params,
|
|
29
29
|
domain,
|
|
30
30
|
searchables: ['name', 'description']
|
|
@@ -33,7 +33,7 @@ let PlayGroupQuery = class PlayGroupQuery {
|
|
|
33
33
|
return { items, total };
|
|
34
34
|
}
|
|
35
35
|
async boards(playGroup) {
|
|
36
|
-
const { order = [], boards = [] } = await (0, shell_1.getRepository)(
|
|
36
|
+
const { order = [], boards = [] } = await (0, shell_1.getRepository)(play_group_js_1.PlayGroup).findOne({
|
|
37
37
|
where: { id: playGroup.id },
|
|
38
38
|
relations: ['boards']
|
|
39
39
|
});
|
|
@@ -72,7 +72,7 @@ let PlayGroupQuery = class PlayGroupQuery {
|
|
|
72
72
|
};
|
|
73
73
|
exports.PlayGroupQuery = PlayGroupQuery;
|
|
74
74
|
tslib_1.__decorate([
|
|
75
|
-
(0, type_graphql_1.Query)(returns =>
|
|
75
|
+
(0, type_graphql_1.Query)(returns => play_group_js_1.PlayGroup, { nullable: true, description: 'To fetch a PlayGroup' }),
|
|
76
76
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
77
77
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
78
78
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -80,7 +80,7 @@ tslib_1.__decorate([
|
|
|
80
80
|
tslib_1.__metadata("design:returntype", Promise)
|
|
81
81
|
], PlayGroupQuery.prototype, "playGroup", null);
|
|
82
82
|
tslib_1.__decorate([
|
|
83
|
-
(0, type_graphql_1.Query)(returns =>
|
|
83
|
+
(0, type_graphql_1.Query)(returns => play_group_js_1.PlayGroup, { nullable: true, description: 'To fetch a PlayGroup by name' }),
|
|
84
84
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
85
85
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
86
86
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -88,7 +88,7 @@ tslib_1.__decorate([
|
|
|
88
88
|
tslib_1.__metadata("design:returntype", Promise)
|
|
89
89
|
], PlayGroupQuery.prototype, "playGroupByName", null);
|
|
90
90
|
tslib_1.__decorate([
|
|
91
|
-
(0, type_graphql_1.Query)(returns =>
|
|
91
|
+
(0, type_graphql_1.Query)(returns => play_group_type_js_1.PlayGroupList, { description: 'To fetch multiple PlayGroups' }),
|
|
92
92
|
tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
|
|
93
93
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
94
94
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -96,7 +96,7 @@ tslib_1.__decorate([
|
|
|
96
96
|
tslib_1.__metadata("design:returntype", Promise)
|
|
97
97
|
], PlayGroupQuery.prototype, "playGroups", null);
|
|
98
98
|
tslib_1.__decorate([
|
|
99
|
-
(0, type_graphql_1.FieldResolver)(type => [
|
|
99
|
+
(0, type_graphql_1.FieldResolver)(type => [board_js_1.Board]),
|
|
100
100
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
101
101
|
tslib_1.__metadata("design:type", Function),
|
|
102
102
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
@@ -106,24 +106,24 @@ tslib_1.__decorate([
|
|
|
106
106
|
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
107
107
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
108
108
|
tslib_1.__metadata("design:type", Function),
|
|
109
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
109
|
+
tslib_1.__metadata("design:paramtypes", [play_group_js_1.PlayGroup]),
|
|
110
110
|
tslib_1.__metadata("design:returntype", Promise)
|
|
111
111
|
], PlayGroupQuery.prototype, "domain", null);
|
|
112
112
|
tslib_1.__decorate([
|
|
113
113
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
114
114
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
115
115
|
tslib_1.__metadata("design:type", Function),
|
|
116
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
116
|
+
tslib_1.__metadata("design:paramtypes", [play_group_js_1.PlayGroup]),
|
|
117
117
|
tslib_1.__metadata("design:returntype", Promise)
|
|
118
118
|
], PlayGroupQuery.prototype, "updater", null);
|
|
119
119
|
tslib_1.__decorate([
|
|
120
120
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
121
121
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
122
122
|
tslib_1.__metadata("design:type", Function),
|
|
123
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
123
|
+
tslib_1.__metadata("design:paramtypes", [play_group_js_1.PlayGroup]),
|
|
124
124
|
tslib_1.__metadata("design:returntype", Promise)
|
|
125
125
|
], PlayGroupQuery.prototype, "creator", null);
|
|
126
126
|
exports.PlayGroupQuery = PlayGroupQuery = tslib_1.__decorate([
|
|
127
|
-
(0, type_graphql_1.Resolver)(
|
|
127
|
+
(0, type_graphql_1.Resolver)(play_group_js_1.PlayGroup)
|
|
128
128
|
], PlayGroupQuery);
|
|
129
129
|
//# sourceMappingURL=play-group-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play-group-query.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AAEnF,yDAAgD;AAChD,iDAAuG;AAEvG,
|
|
1
|
+
{"version":3,"file":"play-group-query.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AAEnF,yDAAgD;AAChD,iDAAuG;AAEvG,gDAAyC;AACzC,mDAA2C;AAC3C,6DAAoD;AAG7C,IAAM,cAAc,GAApB,MAAM,cAAc;IAEnB,AAAN,KAAK,CAAC,SAAS,CAAY,EAAU,EAAS,OAAwB;QACpE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,yBAAS,CAAC,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,eAAe,CAAc,IAAY,EAAS,OAAwB;QAC9E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,yBAAS,CAAC,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE;SAC3C,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,UAAU,CACW,MAAiB,EACnC,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,UAAU,EAAE,IAAA,qBAAa,EAAC,yBAAS,CAAC;YACpC,MAAM;YACN,MAAM;YACN,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CA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A;;6CAD2B,iBAAS;;gDAe3C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gBAAK,CAAC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;;;4CA0BnB;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,yBAAS;;4CAExC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,yBAAS;;6CAEzC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,yBAAS;;6CAEzC;yBAhFU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,yBAAS,CAAC;GACP,cAAc,CAiF1B","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\n\nimport { Board } from '../board/board.js'\nimport { PlayGroup } from './play-group.js'\nimport { PlayGroupList } from './play-group-type.js'\n\n@Resolver(PlayGroup)\nexport class PlayGroupQuery {\n @Query(returns => PlayGroup, { nullable: true, description: 'To fetch a PlayGroup' })\n async playGroup(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<PlayGroup> {\n const { domain } = context.state\n\n return await getRepository(PlayGroup).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => PlayGroup, { nullable: true, description: 'To fetch a PlayGroup by name' })\n async playGroupByName(@Arg('name') name: string, @Ctx() context: ResolverContext): Promise<PlayGroup> {\n const { domain } = context.state\n\n return await getRepository(PlayGroup).findOne({\n where: { domain: { id: domain.id }, name }\n })\n }\n\n @Query(returns => PlayGroupList, { description: 'To fetch multiple PlayGroups' })\n async playGroups(\n @Args(type => ListParam) params: ListParam,\n @Ctx() context: ResolverContext\n ): Promise<PlayGroupList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(PlayGroup),\n params,\n domain,\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => [Board])\n async boards(@Root() playGroup) {\n const { order = [], boards = [] } = await getRepository(PlayGroup).findOne({\n where: { id: playGroup.id },\n relations: ['boards']\n })\n\n return boards.sort((a, b) => {\n // 배열 A에 포함된 아이디의 순서를 가져옵니다.\n const indexOfOrder = (order || []).indexOf(a.id)\n const indexOfBoards = (order || []).indexOf(b.id)\n\n // 두 아이디의 순서를 비교하여 정렬합니다.\n if (indexOfOrder === -1 && indexOfBoards === -1) {\n // 두 아이디 모두 배열 A에 없는 경우, 그대로 유지합니다.\n return 0\n } else if (indexOfOrder === -1) {\n // 아이디 A만 배열 A에 없는 경우, 아이디 B를 먼저 정렬합니다.\n return 1\n } else if (indexOfBoards === -1) {\n // 아이디 B만 배열 A에 없는 경우, 아이디 A를 먼저 정렬합니다.\n return -1\n } else {\n // 두 아이디 모두 배열 A에 있는 경우, 배열 A의 아이디 순서대로 정렬합니다.\n return indexOfOrder - indexOfBoards\n }\n })\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() playGroup: PlayGroup) {\n return await getRepository(Domain).findOneBy({ id: playGroup.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() playGroup: PlayGroup): Promise<User> {\n return await getRepository(User).findOneBy({ id: playGroup.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() playGroup: PlayGroup): Promise<User> {\n return await getRepository(User).findOneBy({ id: playGroup.creatorId })\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const graphql_yoga_1 = require("graphql-yoga");
|
|
7
7
|
const shell_1 = require("@things-factory/shell");
|
|
8
|
-
const
|
|
8
|
+
const play_group_js_1 = require("./play-group.js");
|
|
9
9
|
let PlayGroupSubscription = class PlayGroupSubscription {
|
|
10
10
|
playGroup(payload, id) {
|
|
11
11
|
return payload.playGroup;
|
|
@@ -41,9 +41,9 @@ tslib_1.__decorate([
|
|
|
41
41
|
tslib_1.__param(1, (0, type_graphql_1.Arg)('id')),
|
|
42
42
|
tslib_1.__metadata("design:type", Function),
|
|
43
43
|
tslib_1.__metadata("design:paramtypes", [Object, String]),
|
|
44
|
-
tslib_1.__metadata("design:returntype",
|
|
44
|
+
tslib_1.__metadata("design:returntype", play_group_js_1.PlayGroup)
|
|
45
45
|
], PlayGroupSubscription.prototype, "playGroup", null);
|
|
46
46
|
exports.PlayGroupSubscription = PlayGroupSubscription = tslib_1.__decorate([
|
|
47
|
-
(0, type_graphql_1.Resolver)(
|
|
47
|
+
(0, type_graphql_1.Resolver)(play_group_js_1.PlayGroup)
|
|
48
48
|
], PlayGroupSubscription);
|
|
49
49
|
//# sourceMappingURL=play-group-subscription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play-group-subscription.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-subscription.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,+CAA2C;AAC3C,iDAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"play-group-subscription.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-subscription.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,+CAA2C;AAC3C,iDAA8C;AAC9C,mDAA2C;AAGpC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAiChC,SAAS,CAAS,OAAiC,EAAa,EAAU;QACxE,OAAO,OAAO,CAAC,SAAS,CAAA;IAC1B,CAAC;CACF,CAAA;AApCY,sDAAqB;AAiChC;IAhCC,IAAA,2BAAY,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4CAAc,yBAAS;sDAErF;gCAnCU,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,yBAAS,CAAC;GACP,qBAAqB,CAoCjC","sourcesContent":["import { Resolver, Subscription, Root, Arg } from 'type-graphql'\nimport { filter, pipe } from 'graphql-yoga'\nimport { pubsub } from '@things-factory/shell'\nimport { PlayGroup } from './play-group.js'\n\n@Resolver(PlayGroup)\nexport class PlayGroupSubscription {\n @Subscription({\n subscribe: ({ args, context, info }) => {\n const { domain, user } = context.state\n const { id } = args\n const subdomain = domain?.subdomain\n\n if (!domain) {\n throw new Error('domain required')\n }\n\n if (!user.domains?.find(d => d.subdomain === subdomain) && !process.superUserGranted(domain, user)) {\n throw new Error(`domain(${subdomain}) is not working for user(${user.email}).`)\n }\n\n return pipe(\n pubsub.subscribe('play-group'),\n filter((payload: { playGroup: PlayGroup }) => {\n const { id: playGroupId, domainId } = payload.playGroup\n\n if (domainId !== domain.id) {\n return false\n }\n\n if (id !== playGroupId) {\n return false\n }\n\n return true\n })\n )\n }\n })\n playGroup(@Root() payload: { playGroup: PlayGroup }, @Arg('id') id: string): PlayGroup {\n return payload.playGroup\n }\n}\n"]}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PlayGroupList = exports.PlayGroupPatch = exports.NewPlayGroup = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
|
-
const
|
|
6
|
+
const play_group_js_1 = require("./play-group.js");
|
|
7
7
|
let NewPlayGroup = class NewPlayGroup {
|
|
8
8
|
};
|
|
9
9
|
exports.NewPlayGroup = NewPlayGroup;
|
|
@@ -36,7 +36,7 @@ let PlayGroupList = class PlayGroupList {
|
|
|
36
36
|
};
|
|
37
37
|
exports.PlayGroupList = PlayGroupList;
|
|
38
38
|
tslib_1.__decorate([
|
|
39
|
-
(0, type_graphql_1.Field)(type => [
|
|
39
|
+
(0, type_graphql_1.Field)(type => [play_group_js_1.PlayGroup]),
|
|
40
40
|
tslib_1.__metadata("design:type", Array)
|
|
41
41
|
], PlayGroupList.prototype, "items", void 0);
|
|
42
42
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play-group-type.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,
|
|
1
|
+
{"version":3,"file":"play-group-type.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,mDAA2C;AAGpC,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AANY,oCAAY;AAEvB;IADC,IAAA,oBAAK,GAAE;;0CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;uBALT,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAMxB;AAGM,IAAM,cAAc,GAApB,MAAM,cAAc;CAM1B,CAAA;AANY,wCAAc;AAEzB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACd;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;yBALT,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAM1B;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAMzB,CAAA;AANY,sCAAa;AAExB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,yBAAS,CAAC,CAAC;;4CACT;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;4CACN;wBALF,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { PlayGroup } from './play-group.js'\n\n@InputType()\nexport class NewPlayGroup {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@InputType()\nexport class PlayGroupPatch {\n @Field({ nullable: true })\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@ObjectType()\nexport class PlayGroupList {\n @Field(type => [PlayGroup])\n items: PlayGroup[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -6,7 +6,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const typeorm_1 = require("typeorm");
|
|
7
7
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
8
|
const shell_1 = require("@things-factory/shell");
|
|
9
|
-
const
|
|
9
|
+
const board_js_1 = require("../board/board.js");
|
|
10
10
|
let PlayGroup = class PlayGroup {
|
|
11
11
|
};
|
|
12
12
|
exports.PlayGroup = PlayGroup;
|
|
@@ -37,9 +37,9 @@ tslib_1.__decorate([
|
|
|
37
37
|
tslib_1.__metadata("design:type", String)
|
|
38
38
|
], PlayGroup.prototype, "description", void 0);
|
|
39
39
|
tslib_1.__decorate([
|
|
40
|
-
(0, typeorm_1.ManyToMany)(type =>
|
|
40
|
+
(0, typeorm_1.ManyToMany)(type => board_js_1.Board, board => board.playGroups),
|
|
41
41
|
(0, typeorm_1.JoinTable)({ name: 'play_groups_boards' }),
|
|
42
|
-
(0, type_graphql_1.Field)(type => [
|
|
42
|
+
(0, type_graphql_1.Field)(type => [board_js_1.Board], { nullable: true }),
|
|
43
43
|
tslib_1.__metadata("design:type", Array)
|
|
44
44
|
], PlayGroup.prototype, "boards", void 0);
|
|
45
45
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play-group.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAWgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,
|
|
1
|
+
{"version":3,"file":"play-group.js","sourceRoot":"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edColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { Board } from '../board/board.js'\n\n@Entity()\n@Index('ix_play_group_0', (playGroup: PlayGroup) => [playGroup.domain, playGroup.name], { unique: true })\n@ObjectType({ description: 'Entity for Board PlayGroup' })\nexport class PlayGroup {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((playGroup: PlayGroup) => playGroup.domain)\n domainId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @ManyToMany(type => Board, board => board.playGroups)\n @JoinTable({ name: 'play_groups_boards' })\n @Field(type => [Board], { nullable: true })\n boards: Board[]\n\n @Column('simple-json', { nullable: true })\n order: any\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((playGroup: PlayGroup) => playGroup.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((playGroup: PlayGroup) => playGroup.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Theme } from './theme';
|
|
2
|
-
import { ThemeQuery } from './theme-query';
|
|
3
|
-
import { ThemeMutation } from './theme-mutation';
|
|
1
|
+
import { Theme } from './theme.js';
|
|
2
|
+
import { ThemeQuery } from './theme-query.js';
|
|
3
|
+
import { ThemeMutation } from './theme-mutation.js';
|
|
4
4
|
export declare const entities: (typeof Theme)[];
|
|
5
5
|
export declare const resolvers: (typeof ThemeQuery | typeof ThemeMutation)[];
|
|
6
6
|
export declare const subscribers: any[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.subscribers = exports.resolvers = exports.entities = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
exports.entities = [
|
|
8
|
-
exports.resolvers = [
|
|
4
|
+
const theme_js_1 = require("./theme.js");
|
|
5
|
+
const theme_query_js_1 = require("./theme-query.js");
|
|
6
|
+
const theme_mutation_js_1 = require("./theme-mutation.js");
|
|
7
|
+
exports.entities = [theme_js_1.Theme];
|
|
8
|
+
exports.resolvers = [theme_query_js_1.ThemeQuery, theme_mutation_js_1.ThemeMutation];
|
|
9
9
|
exports.subscribers = [];
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/theme/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/theme/index.ts"],"names":[],"mappings":";;;AAAA,yCAAkC;AAClC,qDAA6C;AAC7C,2DAAmD;AAEtC,QAAA,QAAQ,GAAG,CAAC,gBAAK,CAAC,CAAA;AAClB,QAAA,SAAS,GAAG,CAAC,2BAAU,EAAE,iCAAa,CAAC,CAAA;AACvC,QAAA,WAAW,GAAG,EAAE,CAAA","sourcesContent":["import { Theme } from './theme.js'\nimport { ThemeQuery } from './theme-query.js'\nimport { ThemeMutation } from './theme-mutation.js'\n\nexport const entities = [Theme]\nexport const resolvers = [ThemeQuery, ThemeMutation]\nexport const subscribers = []\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Theme } from './theme';
|
|
2
|
-
import { NewTheme, ThemePatch } from './theme-type';
|
|
1
|
+
import { Theme } from './theme.js';
|
|
2
|
+
import { NewTheme, ThemePatch } from './theme-type.js';
|
|
3
3
|
export declare class ThemeMutation {
|
|
4
4
|
createTheme(theme: NewTheme, context: ResolverContext): Promise<Theme>;
|
|
5
5
|
updateTheme(id: string, patch: ThemePatch, context: ResolverContext): Promise<Theme>;
|