@things-factory/board-service 4.3.671 → 4.3.673
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/fonts.js +11 -0
- package/dist-server/controllers/fonts.js.map +1 -0
- package/dist-server/controllers/headless-model.js +32 -0
- package/dist-server/controllers/headless-model.js.map +1 -0
- package/dist-server/controllers/headless-pool-for-board.js +86 -0
- package/dist-server/controllers/headless-pool-for-board.js.map +1 -0
- package/dist-server/controllers/headless-pool-for-label.js +157 -0
- package/dist-server/controllers/headless-pool-for-label.js.map +1 -0
- package/dist-server/controllers/index.js +19 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/controllers/label-command.js +52 -0
- package/dist-server/controllers/label-command.js.map +1 -0
- package/dist-server/controllers/pdf.js +92 -0
- package/dist-server/controllers/pdf.js.map +1 -0
- package/dist-server/controllers/print.js +57 -0
- package/dist-server/controllers/print.js.map +1 -0
- package/dist-server/controllers/screenshot.js +90 -0
- package/dist-server/controllers/screenshot.js.map +1 -0
- package/dist-server/controllers/thumbnail.js +16 -0
- package/dist-server/controllers/thumbnail.js.map +1 -0
- package/dist-server/index.js +21 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/migrations/1556862253000-SeedGroup.js +43 -0
- package/dist-server/migrations/1556862253000-SeedGroup.js.map +1 -0
- package/dist-server/migrations/index.js +12 -0
- package/dist-server/migrations/index.js.map +1 -0
- package/dist-server/routers/board-print-router.js +40 -0
- package/dist-server/routers/board-print-router.js.map +1 -0
- package/dist-server/routers/internal-board-view-router.js +19 -0
- package/dist-server/routers/internal-board-view-router.js.map +1 -0
- package/dist-server/routers/standalone-board-service-router.js +92 -0
- package/dist-server/routers/standalone-board-service-router.js.map +1 -0
- package/dist-server/routes.js +25 -0
- package/dist-server/routes.js.map +1 -0
- package/dist-server/service/board/board-mutation.js +133 -0
- package/dist-server/service/board/board-mutation.js.map +1 -0
- package/dist-server/service/board/board-query.js +121 -0
- package/dist-server/service/board/board-query.js.map +1 -0
- package/dist-server/service/board/board-type.js +81 -0
- package/dist-server/service/board/board-type.js.map +1 -0
- package/dist-server/service/board/board.js +128 -0
- package/dist-server/service/board/board.js.map +1 -0
- package/dist-server/service/board/index.js +9 -0
- package/dist-server/service/board/index.js.map +1 -0
- package/dist-server/service/group/group-mutation.js +96 -0
- package/dist-server/service/group/group-mutation.js.map +1 -0
- package/dist-server/service/group/group-query.js +100 -0
- package/dist-server/service/group/group-query.js.map +1 -0
- package/dist-server/service/group/group-type.js +57 -0
- package/dist-server/service/group/group-type.js.map +1 -0
- package/dist-server/service/group/group.js +90 -0
- package/dist-server/service/group/group.js.map +1 -0
- package/dist-server/service/group/index.js +9 -0
- package/dist-server/service/group/index.js.map +1 -0
- package/dist-server/service/index.js +40 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/play-group/index.js +9 -0
- package/dist-server/service/play-group/index.js.map +1 -0
- package/dist-server/service/play-group/play-group-mutation.js +119 -0
- package/dist-server/service/play-group/play-group-mutation.js.map +1 -0
- package/dist-server/service/play-group/play-group-query.js +99 -0
- package/dist-server/service/play-group/play-group-query.js.map +1 -0
- package/dist-server/service/play-group/play-group-type.js +57 -0
- package/dist-server/service/play-group/play-group-type.js.map +1 -0
- package/dist-server/service/play-group/play-group.js +91 -0
- package/dist-server/service/play-group/play-group.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,81 @@
|
|
|
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.BoardList = exports.BoardPatch = exports.NewBoard = void 0;
|
|
13
|
+
const type_graphql_1 = require("type-graphql");
|
|
14
|
+
const board_1 = require("./board");
|
|
15
|
+
let NewBoard = class NewBoard {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, type_graphql_1.Field)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], NewBoard.prototype, "name", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], NewBoard.prototype, "description", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, type_graphql_1.Field)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], NewBoard.prototype, "model", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], NewBoard.prototype, "groupId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], NewBoard.prototype, "thumbnail", void 0);
|
|
37
|
+
NewBoard = __decorate([
|
|
38
|
+
(0, type_graphql_1.InputType)()
|
|
39
|
+
], NewBoard);
|
|
40
|
+
exports.NewBoard = NewBoard;
|
|
41
|
+
let BoardPatch = class BoardPatch {
|
|
42
|
+
};
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], BoardPatch.prototype, "name", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], BoardPatch.prototype, "description", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], BoardPatch.prototype, "model", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], BoardPatch.prototype, "groupId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], BoardPatch.prototype, "thumbnail", void 0);
|
|
63
|
+
BoardPatch = __decorate([
|
|
64
|
+
(0, type_graphql_1.InputType)()
|
|
65
|
+
], BoardPatch);
|
|
66
|
+
exports.BoardPatch = BoardPatch;
|
|
67
|
+
let BoardList = class BoardList {
|
|
68
|
+
};
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, type_graphql_1.Field)(type => [board_1.Board]),
|
|
71
|
+
__metadata("design:type", Array)
|
|
72
|
+
], BoardList.prototype, "items", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
75
|
+
__metadata("design:type", Number)
|
|
76
|
+
], BoardList.prototype, "total", void 0);
|
|
77
|
+
BoardList = __decorate([
|
|
78
|
+
(0, type_graphql_1.ObjectType)()
|
|
79
|
+
], BoardList);
|
|
80
|
+
exports.BoardList = BoardList;
|
|
81
|
+
//# sourceMappingURL=board-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-type.js","sourceRoot":"","sources":["../../../server/service/board/board-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAsF;AAEtF,mCAA+B;AAGxB,IAAM,QAAQ,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"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 _a, _b, _c;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.Board = void 0;
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const type_graphql_1 = require("type-graphql");
|
|
16
|
+
const shell_1 = require("@things-factory/shell");
|
|
17
|
+
const group_1 = require("../group/group");
|
|
18
|
+
const play_group_1 = require("../play-group/play-group");
|
|
19
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
20
|
+
const env_1 = require("@things-factory/env");
|
|
21
|
+
const ORMCONFIG = env_1.config.get('ormconfig', {});
|
|
22
|
+
const DATABASE_TYPE = ORMCONFIG.type;
|
|
23
|
+
let Board = class Board {
|
|
24
|
+
};
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
27
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Board.prototype, "id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
32
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
33
|
+
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
34
|
+
], Board.prototype, "domain", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.RelationId)((board) => board.domain),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Board.prototype, "domainId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)(),
|
|
41
|
+
(0, type_graphql_1.Field)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Board.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
nullable: true
|
|
47
|
+
}),
|
|
48
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], Board.prototype, "description", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({
|
|
53
|
+
nullable: true,
|
|
54
|
+
type: DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
|
|
55
|
+
? 'longtext'
|
|
56
|
+
: DATABASE_TYPE == 'oracle'
|
|
57
|
+
? 'clob'
|
|
58
|
+
: 'varchar'
|
|
59
|
+
}),
|
|
60
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], Board.prototype, "model", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({
|
|
65
|
+
nullable: true,
|
|
66
|
+
type: DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
|
|
67
|
+
? 'longtext'
|
|
68
|
+
: DATABASE_TYPE == 'oracle'
|
|
69
|
+
? 'clob'
|
|
70
|
+
: 'varchar'
|
|
71
|
+
}),
|
|
72
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], Board.prototype, "thumbnail", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.ManyToOne)(type => group_1.Group, group => group.boards),
|
|
77
|
+
(0, type_graphql_1.Field)(type => group_1.Group, { nullable: true }),
|
|
78
|
+
__metadata("design:type", group_1.Group)
|
|
79
|
+
], Board.prototype, "group", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.RelationId)((board) => board.group),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], Board.prototype, "groupId", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.ManyToMany)(type => play_group_1.PlayGroup, playGroup => playGroup.boards),
|
|
86
|
+
(0, type_graphql_1.Field)(type => [play_group_1.PlayGroup], { nullable: true }),
|
|
87
|
+
__metadata("design:type", Array)
|
|
88
|
+
], Board.prototype, "playGroups", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
91
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
92
|
+
__metadata("design:type", Date)
|
|
93
|
+
], Board.prototype, "createdAt", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
96
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
97
|
+
__metadata("design:type", Date)
|
|
98
|
+
], Board.prototype, "updatedAt", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
101
|
+
nullable: true
|
|
102
|
+
}),
|
|
103
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
104
|
+
__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
|
|
105
|
+
], Board.prototype, "creator", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.RelationId)((board) => board.creator),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], Board.prototype, "creatorId", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
112
|
+
nullable: true
|
|
113
|
+
}),
|
|
114
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
115
|
+
__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
116
|
+
], Board.prototype, "updater", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, typeorm_1.RelationId)((board) => board.creator),
|
|
119
|
+
__metadata("design:type", String)
|
|
120
|
+
], Board.prototype, "updaterId", void 0);
|
|
121
|
+
Board = __decorate([
|
|
122
|
+
(0, typeorm_1.Entity)(),
|
|
123
|
+
(0, typeorm_1.Index)('ix_board_0', (board) => [board.domain, board.name], { unique: true }),
|
|
124
|
+
(0, typeorm_1.Index)('ix_board_3', (board) => [board.domain, board.group]),
|
|
125
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for Visualization Board' })
|
|
126
|
+
], Board);
|
|
127
|
+
exports.Board = Board;
|
|
128
|
+
//# sourceMappingURL=board.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board.js","sourceRoot":"","sources":["../../../server/service/board/board.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAUgB;AAChB,+CAAoD;AAEpD,iDAA8C;AAC9C,0CAAsC;AACtC,yDAAoD;AACpD,yDAAgD;AAChD,6CAA4C;AAE5C,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAM7B,IAAM,KAAK,GAAX,MAAM,KAAK;CAkFjB,CAAA;AAjFC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,I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AAK,CAAC,OAAO,CAAC;;wCAC1B;AAjFP,KAAK;IAJjB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,YAAY,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACnF,IAAA,eAAK,EAAC,YAAY,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAClE,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;GACjD,KAAK,CAkFjB;AAlFY,sBAAK"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const board_1 = require("./board");
|
|
5
|
+
const board_query_1 = require("./board-query");
|
|
6
|
+
const board_mutation_1 = require("./board-mutation");
|
|
7
|
+
exports.entities = [board_1.Board];
|
|
8
|
+
exports.resolvers = [board_query_1.BoardQuery, board_mutation_1.BoardMutation];
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/board/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAC/B,+CAA0C;AAC1C,qDAAgD;AAEnC,QAAA,QAAQ,GAAG,CAAC,aAAK,CAAC,CAAA;AAClB,QAAA,SAAS,GAAG,CAAC,wBAAU,EAAE,8BAAa,CAAC,CAAA"}
|
|
@@ -0,0 +1,96 @@
|
|
|
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.GroupMutation = void 0;
|
|
16
|
+
const type_graphql_1 = require("type-graphql");
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
const board_1 = require("../board/board");
|
|
19
|
+
const group_1 = require("./group");
|
|
20
|
+
const group_type_1 = require("./group-type");
|
|
21
|
+
let GroupMutation = class GroupMutation {
|
|
22
|
+
async createGroup(group, context) {
|
|
23
|
+
const { domain, user } = context.state;
|
|
24
|
+
return await (0, typeorm_1.getRepository)(group_1.Group).save(Object.assign(Object.assign({ domain }, group), { creator: user, updater: user }));
|
|
25
|
+
}
|
|
26
|
+
async updateGroup(id, patch, context) {
|
|
27
|
+
const { domain, user } = context.state;
|
|
28
|
+
const repository = (0, typeorm_1.getRepository)(group_1.Group);
|
|
29
|
+
const group = await repository.findOne({ domain, id });
|
|
30
|
+
return await repository.save(Object.assign(Object.assign(Object.assign({}, group), patch), { updater: user }));
|
|
31
|
+
}
|
|
32
|
+
async joinGroup(id, boardIds, context) {
|
|
33
|
+
const { domain } = context.state;
|
|
34
|
+
const repository = (0, typeorm_1.getRepository)(group_1.Group);
|
|
35
|
+
const group = await repository.findOne({ domain, id });
|
|
36
|
+
const boardRepository = (0, typeorm_1.getRepository)(board_1.Board);
|
|
37
|
+
await boardIds.forEach(async (boardId) => {
|
|
38
|
+
let board = await boardRepository.findOne({ domain, id: boardId });
|
|
39
|
+
board.group = group;
|
|
40
|
+
await boardRepository.save(board);
|
|
41
|
+
});
|
|
42
|
+
return await repository.findOne({
|
|
43
|
+
where: { domain, id },
|
|
44
|
+
relations: ['boards']
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async deleteGroup(id, context) {
|
|
48
|
+
const repository = (0, typeorm_1.getRepository)(group_1.Group);
|
|
49
|
+
/* TODO - 그룹에 소속된 보드가 있는 경우에는 그룹을 지워서는 안된다. */
|
|
50
|
+
const group = await repository.findOne({
|
|
51
|
+
domain: context.state.domain,
|
|
52
|
+
id
|
|
53
|
+
});
|
|
54
|
+
await repository.delete(id);
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, type_graphql_1.Mutation)(returns => group_1.Group, { nullable: true, description: 'To create new Group' }),
|
|
60
|
+
__param(0, (0, type_graphql_1.Arg)('group')),
|
|
61
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
62
|
+
__metadata("design:type", Function),
|
|
63
|
+
__metadata("design:paramtypes", [group_type_1.NewGroup, Object]),
|
|
64
|
+
__metadata("design:returntype", Promise)
|
|
65
|
+
], GroupMutation.prototype, "createGroup", null);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, type_graphql_1.Mutation)(returns => group_1.Group, { description: 'To modify Group information' }),
|
|
68
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
69
|
+
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
70
|
+
__param(2, (0, type_graphql_1.Ctx)()),
|
|
71
|
+
__metadata("design:type", Function),
|
|
72
|
+
__metadata("design:paramtypes", [String, group_type_1.GroupPatch, Object]),
|
|
73
|
+
__metadata("design:returntype", Promise)
|
|
74
|
+
], GroupMutation.prototype, "updateGroup", null);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, type_graphql_1.Mutation)(returns => group_1.Group, { description: 'To make the board to join the group' }),
|
|
77
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
78
|
+
__param(1, (0, type_graphql_1.Arg)('boardIds', type => [String])),
|
|
79
|
+
__param(2, (0, type_graphql_1.Ctx)()),
|
|
80
|
+
__metadata("design:type", Function),
|
|
81
|
+
__metadata("design:paramtypes", [String, Array, Object]),
|
|
82
|
+
__metadata("design:returntype", Promise)
|
|
83
|
+
], GroupMutation.prototype, "joinGroup", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete Group' }),
|
|
86
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
87
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
88
|
+
__metadata("design:type", Function),
|
|
89
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
90
|
+
__metadata("design:returntype", Promise)
|
|
91
|
+
], GroupMutation.prototype, "deleteGroup", null);
|
|
92
|
+
GroupMutation = __decorate([
|
|
93
|
+
(0, type_graphql_1.Resolver)(group_1.Group)
|
|
94
|
+
], GroupMutation);
|
|
95
|
+
exports.GroupMutation = GroupMutation;
|
|
96
|
+
//# sourceMappingURL=group-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-mutation.js","sourceRoot":"","sources":["../../../server/service/group/group-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2D;AAC3D,qCAAuC;AAEvC,0CAAsC;AACtC,mCAA+B;AAC/B,6CAAmD;AAG5C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAElB,AAAN,KAAK,CAAC,WAAW,CAAe,KAAe,EAAS,OAAY;QAClE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEtC,OAAO,MAAM,IAAA,uBAAa,EA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,CAAA;IAAsB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;8CAiBnG;AAGK;IADL,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IAC9C,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;gDAW9C;AA3DU,aAAa;IADzB,IAAA,uBAAQ,EAAC,aAAK,CAAC;GACH,aAAa,CA4DzB;AA5DY,sCAAa"}
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
var _a;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.GroupQuery = void 0;
|
|
17
|
+
const type_graphql_1 = require("type-graphql");
|
|
18
|
+
const typeorm_1 = require("typeorm");
|
|
19
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
20
|
+
const shell_1 = require("@things-factory/shell");
|
|
21
|
+
const board_1 = require("../board/board");
|
|
22
|
+
const group_1 = require("./group");
|
|
23
|
+
const group_type_1 = require("./group-type");
|
|
24
|
+
let GroupQuery = class GroupQuery {
|
|
25
|
+
async group(id, context) {
|
|
26
|
+
const { domain } = context.state;
|
|
27
|
+
return await (0, typeorm_1.getRepository)(group_1.Group).findOne({
|
|
28
|
+
where: { domain, id }
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async groups(params, context) {
|
|
32
|
+
const queryBuilder = (0, typeorm_1.getRepository)(group_1.Group).createQueryBuilder();
|
|
33
|
+
(0, shell_1.buildQuery)(queryBuilder, params, context);
|
|
34
|
+
const [items, total] = await queryBuilder.leftJoinAndSelect('Group.domain', 'Domain').getManyAndCount();
|
|
35
|
+
return { items, total };
|
|
36
|
+
}
|
|
37
|
+
async boards(group) {
|
|
38
|
+
return await (0, typeorm_1.getRepository)(board_1.Board).find({
|
|
39
|
+
group
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async domain(group) {
|
|
43
|
+
return await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(group.domainId);
|
|
44
|
+
}
|
|
45
|
+
async updater(group) {
|
|
46
|
+
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(group.updaterId);
|
|
47
|
+
}
|
|
48
|
+
async creator(group) {
|
|
49
|
+
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(group.creatorId);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, type_graphql_1.Query)(returns => group_1.Group, { nullable: true, description: 'To fetch a Group' }),
|
|
54
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
55
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
56
|
+
__metadata("design:type", Function),
|
|
57
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
58
|
+
__metadata("design:returntype", Promise)
|
|
59
|
+
], GroupQuery.prototype, "group", null);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, type_graphql_1.Query)(returns => group_type_1.GroupList, { description: 'To fetch multiple Groups' }),
|
|
62
|
+
__param(0, (0, type_graphql_1.Args)()),
|
|
63
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
64
|
+
__metadata("design:type", Function),
|
|
65
|
+
__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
66
|
+
__metadata("design:returntype", Promise)
|
|
67
|
+
], GroupQuery.prototype, "groups", null);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, type_graphql_1.FieldResolver)(type => [board_1.Board]),
|
|
70
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
71
|
+
__metadata("design:type", Function),
|
|
72
|
+
__metadata("design:paramtypes", [group_1.Group]),
|
|
73
|
+
__metadata("design:returntype", Promise)
|
|
74
|
+
], GroupQuery.prototype, "boards", null);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
77
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
78
|
+
__metadata("design:type", Function),
|
|
79
|
+
__metadata("design:paramtypes", [group_1.Group]),
|
|
80
|
+
__metadata("design:returntype", Promise)
|
|
81
|
+
], GroupQuery.prototype, "domain", null);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
84
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
85
|
+
__metadata("design:type", Function),
|
|
86
|
+
__metadata("design:paramtypes", [group_1.Group]),
|
|
87
|
+
__metadata("design:returntype", Promise)
|
|
88
|
+
], GroupQuery.prototype, "updater", null);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
91
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
92
|
+
__metadata("design:type", Function),
|
|
93
|
+
__metadata("design:paramtypes", [group_1.Group]),
|
|
94
|
+
__metadata("design:returntype", Promise)
|
|
95
|
+
], GroupQuery.prototype, "creator", null);
|
|
96
|
+
GroupQuery = __decorate([
|
|
97
|
+
(0, type_graphql_1.Resolver)(group_1.Group)
|
|
98
|
+
], GroupQuery);
|
|
99
|
+
exports.GroupQuery = GroupQuery;
|
|
100
|
+
//# sourceMappingURL=group-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-query.js","sourceRoot":"","sources":["../../../server/service/group/group-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAAqE;AAErE,0CAAsC;AACtC,mCAA+B;AAC/B,6CAAwC;AAGjC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAEf,AAAN,KAAK,CAAC,KAAK,CAAY,EAAU,EAAS,OAAY;QACpD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,aAAK,CAAC,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,MAAiB,EAAS,OAAY;QACzD,MAAM,YAAY,GAAG,IAAA,uBAAa,EAAC,aAAK,CAAC,CAAC,kBAAkB,EAAE,CAAA;QAC9D,IAAA,kBAAU,EAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;QAEzC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,iBAAiB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,eAAe,EAAE,CAAA;QAEvG,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,KAAY;QAC/B,OAAO,MAAM,IAAA,uBAAa,EAAC,aAAK,CAAC,C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CAAQ,aAAK;;wCAEhC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAQ,aAAK;;yCAEjC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAQ,aAAK;;yCAEjC;AAxCU,UAAU;IADtB,IAAA,uBAAQ,EAAC,aAAK,CAAC;GACH,UAAU,CAyCtB;AAzCY,gCAAU"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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.GroupList = exports.GroupPatch = exports.NewGroup = void 0;
|
|
13
|
+
const type_graphql_1 = require("type-graphql");
|
|
14
|
+
const group_1 = require("./group");
|
|
15
|
+
let NewGroup = class NewGroup {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, type_graphql_1.Field)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], NewGroup.prototype, "name", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], NewGroup.prototype, "description", void 0);
|
|
25
|
+
NewGroup = __decorate([
|
|
26
|
+
(0, type_graphql_1.InputType)()
|
|
27
|
+
], NewGroup);
|
|
28
|
+
exports.NewGroup = NewGroup;
|
|
29
|
+
let GroupPatch = class GroupPatch {
|
|
30
|
+
};
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], GroupPatch.prototype, "name", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], GroupPatch.prototype, "description", void 0);
|
|
39
|
+
GroupPatch = __decorate([
|
|
40
|
+
(0, type_graphql_1.InputType)()
|
|
41
|
+
], GroupPatch);
|
|
42
|
+
exports.GroupPatch = GroupPatch;
|
|
43
|
+
let GroupList = class GroupList {
|
|
44
|
+
};
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, type_graphql_1.Field)(type => [group_1.Group]),
|
|
47
|
+
__metadata("design:type", Array)
|
|
48
|
+
], GroupList.prototype, "items", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], GroupList.prototype, "total", void 0);
|
|
53
|
+
GroupList = __decorate([
|
|
54
|
+
(0, type_graphql_1.ObjectType)()
|
|
55
|
+
], GroupList);
|
|
56
|
+
exports.GroupList = GroupList;
|
|
57
|
+
//# sourceMappingURL=group-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-type.js","sourceRoot":"","sources":["../../../server/service/group/group-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAsF;AAEtF,mCAA+B;AAGxB,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAMpB,CAAA;AALC;IAAC,IAAA,oBAAK,GAAE;;sCACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACN;AALT,QAAQ;IADpB,IAAA,wBAAS,GAAE;GACC,QAAQ,CAMpB;AANY,4BAAQ;AASd,IAAM,UAAU,GAAhB,MAAM,UAAU;CAMtB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACd;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AALT,UAAU;IADtB,IAAA,wBAAS,GAAE;GACC,UAAU,CAMtB;AANY,gCAAU;AAShB,IAAM,SAAS,GAAf,MAAM,SAAS;CAMrB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,aAAK,CAAC,CAAC;;wCACT;AAEd;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;wCACN;AALF,SAAS;IADrB,IAAA,yBAAU,GAAE;GACA,SAAS,CAMrB;AANY,8BAAS"}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 _a, _b, _c;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.Group = void 0;
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const type_graphql_1 = require("type-graphql");
|
|
16
|
+
const shell_1 = require("@things-factory/shell");
|
|
17
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
18
|
+
const board_1 = require("../board/board");
|
|
19
|
+
let Group = class Group {
|
|
20
|
+
};
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
23
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], Group.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
28
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
30
|
+
], Group.prototype, "domain", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.RelationId)((group) => group.domain),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Group.prototype, "domainId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)(),
|
|
37
|
+
(0, type_graphql_1.Field)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Group.prototype, "name", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({
|
|
42
|
+
nullable: true
|
|
43
|
+
}),
|
|
44
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Group.prototype, "description", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.OneToMany)(type => board_1.Board, board => board.group),
|
|
49
|
+
(0, type_graphql_1.Field)(type => [board_1.Board], { nullable: true }),
|
|
50
|
+
__metadata("design:type", Array)
|
|
51
|
+
], Group.prototype, "boards", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
54
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
55
|
+
__metadata("design:type", Date)
|
|
56
|
+
], Group.prototype, "createdAt", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
59
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
60
|
+
__metadata("design:type", Date)
|
|
61
|
+
], Group.prototype, "updatedAt", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
64
|
+
nullable: true
|
|
65
|
+
}),
|
|
66
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
67
|
+
__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
|
|
68
|
+
], Group.prototype, "creator", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.RelationId)((group) => group.creator),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], Group.prototype, "creatorId", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
75
|
+
nullable: true
|
|
76
|
+
}),
|
|
77
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
78
|
+
__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
79
|
+
], Group.prototype, "updater", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.RelationId)((group) => group.creator),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], Group.prototype, "updaterId", void 0);
|
|
84
|
+
Group = __decorate([
|
|
85
|
+
(0, typeorm_1.Entity)(),
|
|
86
|
+
(0, typeorm_1.Index)('ix_group_0', (group) => [group.domain, group.name], { unique: true }),
|
|
87
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for Board Management Group' })
|
|
88
|
+
], Group);
|
|
89
|
+
exports.Group = Group;
|
|
90
|
+
//# sourceMappingURL=group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.js","sourceRoot":"","sources":["../../../server/service/group/group.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAUgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAChD,0CAAsC;AAK/B,IAAM,KAAK,GAAX,MAAM,KAAK;CAmDjB,CAAA;AAlDC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;iCACC;AAEnB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACjB,cAAM,oBAAN,cAAM;qCAAA;AAEf;IAAC,IAAA,oBAAU,EAAC,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;;uCAC1B;AAEjB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;mCACI;AAEZ;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACN;AAEpB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,aAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;IAC9C,IAAA,oBAAK,EAAC,IAAI,CAA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,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const group_1 = require("./group");
|
|
5
|
+
const group_query_1 = require("./group-query");
|
|
6
|
+
const group_mutation_1 = require("./group-mutation");
|
|
7
|
+
exports.entities = [group_1.Group];
|
|
8
|
+
exports.resolvers = [group_query_1.GroupQuery, group_mutation_1.GroupMutation];
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/group/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAC/B,+CAA0C;AAC1C,qDAAgD;AAEnC,QAAA,QAAQ,GAAG,CAAC,aAAK,CAAC,CAAA;AAClB,QAAA,SAAS,GAAG,CAAC,wBAAU,EAAE,8BAAa,CAAC,CAAA"}
|