@things-factory/board-service 9.0.0-beta.8 → 9.0.0
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 +4 -4
- package/dist-server/controllers/analyzer/analyze-integration.js.map +1 -1
- package/dist-server/controllers/fonts.js +12 -9
- package/dist-server/controllers/fonts.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 +4 -17
- 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 +18 -11
- package/dist-server/controllers/pdf.js.map +1 -1
- package/dist-server/controllers/screenshot.js +14 -10
- 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 +4 -2
- 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 +7 -4
- package/dist-server/migrations/1556862253000-SeedGroup.js.map +1 -1
- package/dist-server/routers/internal-board-view-router.js +1 -1
- package/dist-server/routers/internal-board-view-router.js.map +1 -1
- package/dist-server/routers/standalone-board-service-router.js +41 -41
- 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 +4 -3
- package/dist-server/service/board/board-history.js +35 -20
- 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 +112 -53
- 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 +40 -39
- 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 +6 -6
- package/dist-server/service/board/board-subscription.js.map +1 -1
- package/dist-server/service/board/board-type.d.ts +4 -2
- package/dist-server/service/board/board-type.js +28 -20
- package/dist-server/service/board/board-type.js.map +1 -1
- package/dist-server/service/board/board.d.ts +3 -2
- package/dist-server/service/board/board.js +26 -21
- 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 +7 -7
- 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 +43 -25
- 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 +21 -18
- package/dist-server/service/board-template/board-template-type.js.map +1 -1
- package/dist-server/service/board-template/board-template.js +14 -14
- package/dist-server/service/board-template/board-template.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 +25 -16
- 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 +17 -17
- 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 +10 -10
- 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 +12 -12
- 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 +35 -22
- 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 +20 -18
- 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 +6 -6
- 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 +10 -10
- package/dist-server/service/play-group/play-group-type.js.map +1 -1
- package/dist-server/service/play-group/play-group.d.ts +2 -2
- package/dist-server/service/play-group/play-group.js +17 -13
- 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 +44 -24
- 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 +13 -13
- 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 +18 -18
- package/dist-server/service/theme/theme-type.js.map +1 -1
- package/dist-server/service/theme/theme.js +16 -13
- package/dist-server/service/theme/theme.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -9
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-template.js","sourceRoot":"","sources":["../../../server/service/board-template/board-template.ts"],"names":[],"mappings":";;;;AAAA,qCASgB;AAChB,+CAA2E;AAE3E,iDAA4D;AAC5D,yDAAgD;AAChD,6CAA4C;AAE5C,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAEpC,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,4CAAqB,CAAA;AACvB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAED,IAAA,+BAAgB,EAAC,mBAAmB,EAAE;IACpC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"board-template.js","sourceRoot":"","sources":["../../../server/service/board-template/board-template.ts"],"names":[],"mappings":";;;;AAAA,qCASgB;AAChB,+CAA2E;AAE3E,iDAA4D;AAC5D,yDAAgD;AAChD,6CAA4C;AAE5C,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAEpC,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,4CAAqB,CAAA;AACvB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAED,IAAA,+BAAgB,EAAC,mBAAmB,EAAE;IACpC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,2FAA2F;CACzG,CAAC,CAAA;AAOK,IAAM,aAAa,GAAnB,MAAM,aAAa;CA+EzB,CAAA;AA/EY,sCAAa;AAGf;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBA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,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC;sCACjF,gBAAI;8CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDAClD;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,yCAAyC,EAAE,CAAC;sCACtF,gBAAI;8CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDAClD;wBA9EP,aAAa;IALzB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE;QAC1G,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;GAC/D,aAAa,CA+EzB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\nexport enum BoardTemplateStatus {\n DRAFT = 'DRAFT',\n RELEASED = 'RELEASED'\n}\n\nregisterEnumType(BoardTemplateStatus, {\n name: 'BoardTemplateStatus',\n description: 'The publication status of a board template, indicating whether it is a draft or released.'\n})\n\n@Entity()\n@Index('ix_board_template_0', (boardTemplate: BoardTemplate) => [boardTemplate.domain, boardTemplate.name], {\n unique: true\n})\n@ObjectType({ description: 'A reusable template for creating new boards.' })\nexport class BoardTemplate {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the board template.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { description: 'The domain to which this template belongs.' })\n domain?: Domain\n\n @RelationId((boardTemplate: BoardTemplate) => boardTemplate.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true, description: 'The name of the board template.' })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'A detailed description of the board template.' })\n description?: string\n\n @Column('simple-json', { nullable: true, default: null })\n @Field(type => [String], { nullable: true, description: 'A list of tags for categorizing the template.' })\n tags?: string[]\n\n @Column({ nullable: true, default: 'private' })\n @Field({ nullable: true, description: \"The visibility of the template: 'private', 'public', or 'domain'.\" })\n visibility?: string // 'private' | 'public' | 'domain'\n\n @Column({\n nullable: true,\n type:\n DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'longtext'\n : DATABASE_TYPE == 'oracle'\n ? 'clob'\n : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n length: DATABASE_TYPE == 'mssql' ? 'MAX' : undefined\n })\n @Field({ nullable: true, description: 'The JSON model that defines the layout and components of the template.' })\n model?: string\n\n @Column({\n nullable: true,\n type:\n DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'longtext'\n : DATABASE_TYPE == 'oracle'\n ? 'clob'\n : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n length: DATABASE_TYPE == 'mssql' ? 'MAX' : undefined\n })\n @Field({ nullable: true, description: 'A base64 encoded thumbnail image of the template.' })\n thumbnail?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'The timestamp when the template was created.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'The timestamp when the template was last updated.' })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who created the template.' })\n creator?: User\n\n @RelationId((boardTemplate: BoardTemplate) => boardTemplate.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who last updated the template.' })\n updater?: User\n\n @RelationId((boardTemplate: BoardTemplate) => boardTemplate.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BoardTemplate } from './board-template';
|
|
2
|
-
import { BoardTemplateQuery } from './board-template-query';
|
|
3
|
-
import { BoardTemplateMutation } from './board-template-mutation';
|
|
1
|
+
import { BoardTemplate } from './board-template.js';
|
|
2
|
+
import { BoardTemplateQuery } from './board-template-query.js';
|
|
3
|
+
import { BoardTemplateMutation } from './board-template-mutation.js';
|
|
4
4
|
export declare const entities: (typeof BoardTemplate)[];
|
|
5
5
|
export declare const resolvers: (typeof BoardTemplateQuery | typeof BoardTemplateMutation)[];
|
|
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 board_template_js_1 = require("./board-template.js");
|
|
5
|
+
const board_template_query_js_1 = require("./board-template-query.js");
|
|
6
|
+
const board_template_mutation_js_1 = require("./board-template-mutation.js");
|
|
7
|
+
exports.entities = [board_template_js_1.BoardTemplate];
|
|
8
|
+
exports.resolvers = [board_template_query_js_1.BoardTemplateQuery, board_template_mutation_js_1.BoardTemplateMutation];
|
|
9
9
|
exports.subscribers = [];
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/board-template/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/board-template/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmD;AACnD,uEAA8D;AAC9D,6EAAoE;AAEvD,QAAA,QAAQ,GAAG,CAAC,iCAAa,CAAC,CAAA;AAC1B,QAAA,SAAS,GAAG,CAAC,4CAAkB,EAAE,kDAAqB,CAAC,CAAA;AACvD,QAAA,WAAW,GAAG,EAAE,CAAA","sourcesContent":["import { BoardTemplate } from './board-template.js'\nimport { BoardTemplateQuery } from './board-template-query.js'\nimport { BoardTemplateMutation } from './board-template-mutation.js'\n\nexport const entities = [BoardTemplate]\nexport const resolvers = [BoardTemplateQuery, BoardTemplateMutation]\nexport const subscribers = []\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Group } from './group';
|
|
2
|
-
import { GroupPatch, NewGroup } from './group-type';
|
|
1
|
+
import { Group } from './group.js';
|
|
2
|
+
import { GroupPatch, NewGroup } from './group-type.js';
|
|
3
3
|
export declare class GroupMutation {
|
|
4
4
|
createGroup(group: NewGroup, context: ResolverContext): Promise<Group>;
|
|
5
5
|
updateGroup(id: string, patch: GroupPatch, context: ResolverContext): Promise<Group>;
|
|
@@ -3,25 +3,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GroupMutation = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
const board_js_1 = require("../board/board.js");
|
|
7
|
+
const group_js_1 = require("./group.js");
|
|
8
|
+
const group_type_js_1 = require("./group-type.js");
|
|
9
9
|
let GroupMutation = class GroupMutation {
|
|
10
10
|
async createGroup(group, context) {
|
|
11
11
|
const { domain, user, tx } = context.state;
|
|
12
|
-
return await tx.getRepository(
|
|
12
|
+
return await tx.getRepository(group_js_1.Group).save({
|
|
13
|
+
domain,
|
|
14
|
+
...group,
|
|
15
|
+
creator: user,
|
|
16
|
+
updater: user
|
|
17
|
+
});
|
|
13
18
|
}
|
|
14
19
|
async updateGroup(id, patch, context) {
|
|
15
20
|
const { domain, user, tx } = context.state;
|
|
16
|
-
const repository = tx.getRepository(
|
|
21
|
+
const repository = tx.getRepository(group_js_1.Group);
|
|
17
22
|
const group = await repository.findOneBy({ domain: { id: domain.id }, id });
|
|
18
|
-
return await repository.save(
|
|
23
|
+
return await repository.save({
|
|
24
|
+
...group,
|
|
25
|
+
...patch,
|
|
26
|
+
updater: user
|
|
27
|
+
});
|
|
19
28
|
}
|
|
20
29
|
async joinGroup(id, boardIds, context) {
|
|
21
30
|
const { domain, tx } = context.state;
|
|
22
|
-
const repository = tx.getRepository(
|
|
31
|
+
const repository = tx.getRepository(group_js_1.Group);
|
|
23
32
|
const group = await repository.findOneBy({ domain: { id: domain.id }, id });
|
|
24
|
-
const boardRepository = tx.getRepository(
|
|
33
|
+
const boardRepository = tx.getRepository(board_js_1.Board);
|
|
25
34
|
await boardIds.forEach(async (boardId) => {
|
|
26
35
|
let board = await boardRepository.findOneBy({ domain: { id: domain.id }, id: boardId });
|
|
27
36
|
board.group = group;
|
|
@@ -34,7 +43,7 @@ let GroupMutation = class GroupMutation {
|
|
|
34
43
|
}
|
|
35
44
|
async deleteGroup(id, context) {
|
|
36
45
|
const { domain, tx } = context.state;
|
|
37
|
-
const repository = tx.getRepository(
|
|
46
|
+
const repository = tx.getRepository(group_js_1.Group);
|
|
38
47
|
/* TODO - 그룹에 소속된 보드가 있는 경우에는 그룹을 지워서는 안된다. */
|
|
39
48
|
const group = await repository.findOneBy({
|
|
40
49
|
domain: { id: domain.id },
|
|
@@ -47,26 +56,26 @@ let GroupMutation = class GroupMutation {
|
|
|
47
56
|
exports.GroupMutation = GroupMutation;
|
|
48
57
|
tslib_1.__decorate([
|
|
49
58
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
50
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
59
|
+
(0, type_graphql_1.Mutation)(returns => group_js_1.Group, { nullable: true, description: 'Creates a new board group.' }),
|
|
51
60
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('group')),
|
|
52
61
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
53
62
|
tslib_1.__metadata("design:type", Function),
|
|
54
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
63
|
+
tslib_1.__metadata("design:paramtypes", [group_type_js_1.NewGroup, Object]),
|
|
55
64
|
tslib_1.__metadata("design:returntype", Promise)
|
|
56
65
|
], GroupMutation.prototype, "createGroup", null);
|
|
57
66
|
tslib_1.__decorate([
|
|
58
67
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
59
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
68
|
+
(0, type_graphql_1.Mutation)(returns => group_js_1.Group, { description: 'Updates an existing board group.' }),
|
|
60
69
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
61
70
|
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
62
71
|
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
63
72
|
tslib_1.__metadata("design:type", Function),
|
|
64
|
-
tslib_1.__metadata("design:paramtypes", [String,
|
|
73
|
+
tslib_1.__metadata("design:paramtypes", [String, group_type_js_1.GroupPatch, Object]),
|
|
65
74
|
tslib_1.__metadata("design:returntype", Promise)
|
|
66
75
|
], GroupMutation.prototype, "updateGroup", null);
|
|
67
76
|
tslib_1.__decorate([
|
|
68
77
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
69
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
78
|
+
(0, type_graphql_1.Mutation)(returns => group_js_1.Group, { description: 'Assigns one or more boards to a group.' }),
|
|
70
79
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
71
80
|
tslib_1.__param(1, (0, type_graphql_1.Arg)('boardIds', type => [String])),
|
|
72
81
|
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
@@ -76,7 +85,7 @@ tslib_1.__decorate([
|
|
|
76
85
|
], GroupMutation.prototype, "joinGroup", null);
|
|
77
86
|
tslib_1.__decorate([
|
|
78
87
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
79
|
-
(0, type_graphql_1.Mutation)(returns => Boolean, { description: '
|
|
88
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'Deletes a board group.' }),
|
|
80
89
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
81
90
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
82
91
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -84,6 +93,6 @@ tslib_1.__decorate([
|
|
|
84
93
|
tslib_1.__metadata("design:returntype", Promise)
|
|
85
94
|
], GroupMutation.prototype, "deleteGroup", null);
|
|
86
95
|
exports.GroupMutation = GroupMutation = tslib_1.__decorate([
|
|
87
|
-
(0, type_graphql_1.Resolver)(
|
|
96
|
+
(0, type_graphql_1.Resolver)(group_js_1.Group)
|
|
88
97
|
], GroupMutation);
|
|
89
98
|
//# sourceMappingURL=group-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-mutation.js","sourceRoot":"","sources":["../../../server/service/group/group-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AAEtE,
|
|
1
|
+
{"version":3,"file":"group-mutation.js","sourceRoot":"","sources":["../../../server/service/group/group-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AAEtE,gDAAyC;AACzC,yCAAkC;AAClC,mDAAsD;AAG/C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGlB,AAAN,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AC,CAAA;IAAmB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAhB,wBAAQ;;gDAS9C;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,gBAAK,EAAE,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAE7E,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IACT,mBAAA,IAAA,kBAAG,EAAC,OAAO,CAAC,CAAA;IACZ,mBAAA,IAAA,kBAAG,GAAE,CAAA;;qDADe,0BAAU;;gDAahC;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,gBAAK,EAAE,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;IAEnF,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IACT,mBAAA,IAAA,kBAAG,EAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IACjC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;8CAkBP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACrD,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;gDAa9C;wBAzEU,aAAa;IADzB,IAAA,uBAAQ,EAAC,gBAAK,CAAC;GACH,aAAa,CA0EzB","sourcesContent":["import { Arg, Ctx, Mutation, Resolver, Directive } from 'type-graphql'\n\nimport { Board } from '../board/board.js'\nimport { Group } from './group.js'\nimport { GroupPatch, NewGroup } from './group-type.js'\n\n@Resolver(Group)\nexport class GroupMutation {\n @Directive('@transaction')\n @Mutation(returns => Group, { nullable: true, description: 'Creates a new board group.' })\n async createGroup(@Arg('group') group: NewGroup, @Ctx() context: ResolverContext): Promise<Group> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(Group).save({\n domain,\n ...group,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Group, { description: 'Updates an existing board group.' })\n async updateGroup(\n @Arg('id') id: string,\n @Arg('patch') patch: GroupPatch,\n @Ctx() context: ResolverContext\n ): Promise<Group> {\n const { domain, user, tx } = context.state\n const repository = tx.getRepository(Group)\n\n const group = await repository.findOneBy({ domain: { id: domain.id }, id })\n\n return await repository.save({\n ...group,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Group, { description: 'Assigns one or more boards to a group.' })\n async joinGroup(\n @Arg('id') id: string,\n @Arg('boardIds', type => [String]) boardIds: string[],\n @Ctx() context: ResolverContext\n ) {\n const { domain, tx } = context.state\n const repository = tx.getRepository(Group)\n const group = await repository.findOneBy({ domain: { id: domain.id }, id })\n\n const boardRepository = tx.getRepository(Board)\n\n await boardIds.forEach(async boardId => {\n let board = await boardRepository.findOneBy({ domain: { id: domain.id }, id: boardId })\n board.group = group\n await boardRepository.save(board)\n })\n\n return await repository.findOne({\n where: { domain: { id: domain.id }, id },\n relations: ['boards']\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'Deletes a board group.' })\n async deleteGroup(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n const repository = tx.getRepository(Group)\n\n /* TODO - 그룹에 소속된 보드가 있는 경우에는 그룹을 지워서는 안된다. */\n const group = await repository.findOneBy({\n domain: { id: domain.id },\n id\n })\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 { Group } from './group';
|
|
5
|
-
import { GroupList } from './group-type';
|
|
3
|
+
import { Board } from '../board/board.js';
|
|
4
|
+
import { Group } from './group.js';
|
|
5
|
+
import { GroupList } from './group-type.js';
|
|
6
6
|
export declare class GroupQuery {
|
|
7
7
|
group(id: string, context: ResolverContext): Promise<Group>;
|
|
8
8
|
groups(params: ListParam, context: ResolverContext): Promise<GroupList>;
|
|
@@ -5,20 +5,20 @@ 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 group_js_1 = require("./group.js");
|
|
10
|
+
const group_type_js_1 = require("./group-type.js");
|
|
11
11
|
let GroupQuery = class GroupQuery {
|
|
12
12
|
async group(id, context) {
|
|
13
13
|
const { domain } = context.state;
|
|
14
|
-
return await (0, shell_1.getRepository)(
|
|
14
|
+
return await (0, shell_1.getRepository)(group_js_1.Group).findOne({
|
|
15
15
|
where: { domain: { id: domain.id }, id }
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
async groups(params, context) {
|
|
19
19
|
const { domain } = context.state;
|
|
20
20
|
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
21
|
-
repository: (0, shell_1.getRepository)(
|
|
21
|
+
repository: (0, shell_1.getRepository)(group_js_1.Group),
|
|
22
22
|
params,
|
|
23
23
|
domain,
|
|
24
24
|
searchables: ['name', 'description']
|
|
@@ -27,7 +27,7 @@ let GroupQuery = class GroupQuery {
|
|
|
27
27
|
return { items, total };
|
|
28
28
|
}
|
|
29
29
|
async boards(group) {
|
|
30
|
-
return await (0, shell_1.getRepository)(
|
|
30
|
+
return await (0, shell_1.getRepository)(board_js_1.Board).findBy({
|
|
31
31
|
group: { id: group.id }
|
|
32
32
|
});
|
|
33
33
|
}
|
|
@@ -43,7 +43,7 @@ let GroupQuery = class GroupQuery {
|
|
|
43
43
|
};
|
|
44
44
|
exports.GroupQuery = GroupQuery;
|
|
45
45
|
tslib_1.__decorate([
|
|
46
|
-
(0, type_graphql_1.Query)(returns =>
|
|
46
|
+
(0, type_graphql_1.Query)(returns => group_js_1.Group, { nullable: true, description: 'Finds a single board group by its ID.' }),
|
|
47
47
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
48
48
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
49
49
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -51,7 +51,7 @@ tslib_1.__decorate([
|
|
|
51
51
|
tslib_1.__metadata("design:returntype", Promise)
|
|
52
52
|
], GroupQuery.prototype, "group", null);
|
|
53
53
|
tslib_1.__decorate([
|
|
54
|
-
(0, type_graphql_1.Query)(returns =>
|
|
54
|
+
(0, type_graphql_1.Query)(returns => group_type_js_1.GroupList, { description: 'Retrieves a paginated list of board groups.' }),
|
|
55
55
|
tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
|
|
56
56
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
57
57
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -59,34 +59,34 @@ tslib_1.__decorate([
|
|
|
59
59
|
tslib_1.__metadata("design:returntype", Promise)
|
|
60
60
|
], GroupQuery.prototype, "groups", null);
|
|
61
61
|
tslib_1.__decorate([
|
|
62
|
-
(0, type_graphql_1.FieldResolver)(type => [
|
|
62
|
+
(0, type_graphql_1.FieldResolver)(type => [board_js_1.Board], { description: 'Resolves the list of boards belonging to the group.' }),
|
|
63
63
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
64
64
|
tslib_1.__metadata("design:type", Function),
|
|
65
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
65
|
+
tslib_1.__metadata("design:paramtypes", [group_js_1.Group]),
|
|
66
66
|
tslib_1.__metadata("design:returntype", Promise)
|
|
67
67
|
], GroupQuery.prototype, "boards", null);
|
|
68
68
|
tslib_1.__decorate([
|
|
69
|
-
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
69
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain, { description: 'Resolves the domain associated with the group.' }),
|
|
70
70
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
71
71
|
tslib_1.__metadata("design:type", Function),
|
|
72
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
72
|
+
tslib_1.__metadata("design:paramtypes", [group_js_1.Group]),
|
|
73
73
|
tslib_1.__metadata("design:returntype", Promise)
|
|
74
74
|
], GroupQuery.prototype, "domain", null);
|
|
75
75
|
tslib_1.__decorate([
|
|
76
|
-
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
76
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { description: 'Resolves the user who last updated the group.' }),
|
|
77
77
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
78
78
|
tslib_1.__metadata("design:type", Function),
|
|
79
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
79
|
+
tslib_1.__metadata("design:paramtypes", [group_js_1.Group]),
|
|
80
80
|
tslib_1.__metadata("design:returntype", Promise)
|
|
81
81
|
], GroupQuery.prototype, "updater", null);
|
|
82
82
|
tslib_1.__decorate([
|
|
83
|
-
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
83
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { description: 'Resolves the user who created the group.' }),
|
|
84
84
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
85
85
|
tslib_1.__metadata("design:type", Function),
|
|
86
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
86
|
+
tslib_1.__metadata("design:paramtypes", [group_js_1.Group]),
|
|
87
87
|
tslib_1.__metadata("design:returntype", Promise)
|
|
88
88
|
], GroupQuery.prototype, "creator", null);
|
|
89
89
|
exports.GroupQuery = GroupQuery = tslib_1.__decorate([
|
|
90
|
-
(0, type_graphql_1.Resolver)(
|
|
90
|
+
(0, type_graphql_1.Resolver)(group_js_1.Group)
|
|
91
91
|
], GroupQuery);
|
|
92
92
|
//# sourceMappingURL=group-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-query.js","sourceRoot":"","sources":["../../../server/service/group/group-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AAEnF,yDAAgD;AAChD,iDAAuG;AAEvG,
|
|
1
|
+
{"version":3,"file":"group-query.js","sourceRoot":"","sources":["../../../server/service/group/group-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AAEnF,yDAAgD;AAChD,iDAAuG;AAEvG,gDAAyC;AACzC,yCAAkC;AAClC,mDAA2C;AAGpC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAEf,AAAN,KAAK,CAAC,KAAK,CAAY,EAAU,EAAS,OAAwB;QAChE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAK,CAAC,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAA0B,MAAiB,EAAS,OAAwB;QACtF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,UAAU,EAAE,IAAA,qBAAa,EAAC,gBAAK,CAAC;YAChC,MAAM;YACN,MAAM;YACN,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;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AA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;wCAatD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gBAAK,CAAC,EAAE,EAAE,WAAW,EAAE,qDAAqD,EAAE,CAAC;IACzF,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,gBAAK;;wCAIhC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,EAAE,EAAE,WAAW,EAAE,gDAAgD,EAAE,CAAC;IACnF,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,gBAAK;;wCAEhC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,WAAW,EAAE,+CAA+C,EAAE,CAAC;IAC/E,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,gBAAK;;yCAEjC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;IAC1E,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,gBAAK;;yCAEjC;qBA9CU,UAAU;IADtB,IAAA,uBAAQ,EAAC,gBAAK,CAAC;GACH,UAAU,CA+CtB","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 { Group } from './group.js'\nimport { GroupList } from './group-type.js'\n\n@Resolver(Group)\nexport class GroupQuery {\n @Query(returns => Group, { nullable: true, description: 'Finds a single board group by its ID.' })\n async group(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Group> {\n const { domain } = context.state\n\n return await getRepository(Group).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => GroupList, { description: 'Retrieves a paginated list of board groups.' })\n async groups(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<GroupList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(Group),\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], { description: 'Resolves the list of boards belonging to the group.' })\n async boards(@Root() group: Group) {\n return await getRepository(Board).findBy({\n group: { id: group.id }\n })\n }\n\n @FieldResolver(type => Domain, { description: 'Resolves the domain associated with the group.' })\n async domain(@Root() group: Group) {\n return await getRepository(Domain).findOneBy({ id: group.domainId })\n }\n\n @FieldResolver(type => User, { description: 'Resolves the user who last updated the group.' })\n async updater(@Root() group: Group): Promise<User> {\n return await getRepository(User).findOneBy({ id: group.updaterId })\n }\n\n @FieldResolver(type => User, { description: 'Resolves the user who created the group.' })\n async creator(@Root() group: Group): Promise<User> {\n return await getRepository(User).findOneBy({ id: group.creatorId })\n }\n}\n"]}
|
|
@@ -3,47 +3,47 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GroupList = exports.GroupPatch = exports.NewGroup = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
|
-
const
|
|
6
|
+
const group_js_1 = require("./group.js");
|
|
7
7
|
let NewGroup = class NewGroup {
|
|
8
8
|
};
|
|
9
9
|
exports.NewGroup = NewGroup;
|
|
10
10
|
tslib_1.__decorate([
|
|
11
|
-
(0, type_graphql_1.Field)(),
|
|
11
|
+
(0, type_graphql_1.Field)({ description: 'The name of the new group.' }),
|
|
12
12
|
tslib_1.__metadata("design:type", String)
|
|
13
13
|
], NewGroup.prototype, "name", void 0);
|
|
14
14
|
tslib_1.__decorate([
|
|
15
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
15
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'A detailed description for the new group.' }),
|
|
16
16
|
tslib_1.__metadata("design:type", String)
|
|
17
17
|
], NewGroup.prototype, "description", void 0);
|
|
18
18
|
exports.NewGroup = NewGroup = tslib_1.__decorate([
|
|
19
|
-
(0, type_graphql_1.InputType)()
|
|
19
|
+
(0, type_graphql_1.InputType)({ description: 'Input for creating a new board group.' })
|
|
20
20
|
], NewGroup);
|
|
21
21
|
let GroupPatch = class GroupPatch {
|
|
22
22
|
};
|
|
23
23
|
exports.GroupPatch = GroupPatch;
|
|
24
24
|
tslib_1.__decorate([
|
|
25
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
25
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The new name for the group.' }),
|
|
26
26
|
tslib_1.__metadata("design:type", String)
|
|
27
27
|
], GroupPatch.prototype, "name", void 0);
|
|
28
28
|
tslib_1.__decorate([
|
|
29
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
29
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The new description for the group.' }),
|
|
30
30
|
tslib_1.__metadata("design:type", String)
|
|
31
31
|
], GroupPatch.prototype, "description", void 0);
|
|
32
32
|
exports.GroupPatch = GroupPatch = tslib_1.__decorate([
|
|
33
|
-
(0, type_graphql_1.InputType)()
|
|
33
|
+
(0, type_graphql_1.InputType)({ description: 'Input for updating (patching) an existing board group.' })
|
|
34
34
|
], GroupPatch);
|
|
35
35
|
let GroupList = class GroupList {
|
|
36
36
|
};
|
|
37
37
|
exports.GroupList = GroupList;
|
|
38
38
|
tslib_1.__decorate([
|
|
39
|
-
(0, type_graphql_1.Field)(type => [
|
|
39
|
+
(0, type_graphql_1.Field)(type => [group_js_1.Group], { description: 'The list of group items.' }),
|
|
40
40
|
tslib_1.__metadata("design:type", Array)
|
|
41
41
|
], GroupList.prototype, "items", void 0);
|
|
42
42
|
tslib_1.__decorate([
|
|
43
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
43
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The total number of groups.' }),
|
|
44
44
|
tslib_1.__metadata("design:type", Number)
|
|
45
45
|
], GroupList.prototype, "total", void 0);
|
|
46
46
|
exports.GroupList = GroupList = tslib_1.__decorate([
|
|
47
|
-
(0, type_graphql_1.ObjectType)()
|
|
47
|
+
(0, type_graphql_1.ObjectType)({ description: 'A paginated list of board groups.' })
|
|
48
48
|
], GroupList);
|
|
49
49
|
//# sourceMappingURL=group-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-type.js","sourceRoot":"","sources":["../../../server/service/group/group-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,
|
|
1
|
+
{"version":3,"file":"group-type.js","sourceRoot":"","sources":["../../../server/service/group/group-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,yCAAkC;AAG3B,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAMpB,CAAA;AANY,4BAAQ;AAEnB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;;sCACzC;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,2CAA2C,EAAE,CAAC;;6CAChE;mBALT,QAAQ;IADpB,IAAA,wBAAS,EAAC,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;GACvD,QAAQ,CAMpB;AAGM,IAAM,UAAU,GAAhB,MAAM,UAAU;CAMtB,CAAA;AANY,gCAAU;AAErB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;;wCAC1D;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC;;+CACzD;qBALT,UAAU;IADtB,IAAA,wBAAS,EAAC,EAAE,WAAW,EAAE,wDAAwD,EAAE,CAAC;GACxE,UAAU,CAMtB;AAGM,IAAM,SAAS,GAAf,MAAM,SAAS;CAMrB,CAAA;AANY,8BAAS;AAEpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gBAAK,CAAC,EAAE,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;;wCACtD;AAGd;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;;wCACtD;oBALF,SAAS;IADrB,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;GACpD,SAAS,CAMrB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Group } from './group.js'\n\n@InputType({ description: 'Input for creating a new board group.' })\nexport class NewGroup {\n @Field({ description: 'The name of the new group.' })\n name: string\n\n @Field({ nullable: true, description: 'A detailed description for the new group.' })\n description?: string\n}\n\n@InputType({ description: 'Input for updating (patching) an existing board group.' })\nexport class GroupPatch {\n @Field({ nullable: true, description: 'The new name for the group.' })\n name: string\n\n @Field({ nullable: true, description: 'The new description for the group.' })\n description?: string\n}\n\n@ObjectType({ description: 'A paginated list of board groups.' })\nexport class GroupList {\n @Field(type => [Group], { description: 'The list of group items.' })\n items: Group[]\n\n @Field(type => Int, { description: 'The total number of groups.' })\n total: number\n}\n"]}
|
|
@@ -6,18 +6,18 @@ const typeorm_1 = require("typeorm");
|
|
|
6
6
|
const type_graphql_1 = require("type-graphql");
|
|
7
7
|
const shell_1 = require("@things-factory/shell");
|
|
8
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
|
-
const
|
|
9
|
+
const board_js_1 = require("../board/board.js");
|
|
10
10
|
let Group = class Group {
|
|
11
11
|
};
|
|
12
12
|
exports.Group = Group;
|
|
13
13
|
tslib_1.__decorate([
|
|
14
14
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
15
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
15
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier for the group.' }),
|
|
16
16
|
tslib_1.__metadata("design:type", String)
|
|
17
17
|
], Group.prototype, "id", void 0);
|
|
18
18
|
tslib_1.__decorate([
|
|
19
19
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
20
|
-
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true }),
|
|
20
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain to which this group belongs.' }),
|
|
21
21
|
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
22
22
|
], Group.prototype, "domain", void 0);
|
|
23
23
|
tslib_1.__decorate([
|
|
@@ -26,34 +26,34 @@ tslib_1.__decorate([
|
|
|
26
26
|
], Group.prototype, "domainId", void 0);
|
|
27
27
|
tslib_1.__decorate([
|
|
28
28
|
(0, typeorm_1.Column)(),
|
|
29
|
-
(0, type_graphql_1.Field)(),
|
|
29
|
+
(0, type_graphql_1.Field)({ description: 'The name of the group.' }),
|
|
30
30
|
tslib_1.__metadata("design:type", String)
|
|
31
31
|
], Group.prototype, "name", void 0);
|
|
32
32
|
tslib_1.__decorate([
|
|
33
33
|
(0, typeorm_1.Column)({
|
|
34
34
|
nullable: true
|
|
35
35
|
}),
|
|
36
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
36
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'A detailed description of the group.' }),
|
|
37
37
|
tslib_1.__metadata("design:type", String)
|
|
38
38
|
], Group.prototype, "description", void 0);
|
|
39
39
|
tslib_1.__decorate([
|
|
40
|
-
(0, typeorm_1.OneToMany)(type =>
|
|
41
|
-
(0, type_graphql_1.Field)(type => [
|
|
40
|
+
(0, typeorm_1.OneToMany)(type => board_js_1.Board, board => board.group),
|
|
41
|
+
(0, type_graphql_1.Field)(type => [board_js_1.Board], { nullable: true, description: 'The list of boards belonging to this group.' }),
|
|
42
42
|
tslib_1.__metadata("design:type", Array)
|
|
43
43
|
], Group.prototype, "boards", void 0);
|
|
44
44
|
tslib_1.__decorate([
|
|
45
45
|
(0, typeorm_1.CreateDateColumn)(),
|
|
46
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
46
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The timestamp when the group was created.' }),
|
|
47
47
|
tslib_1.__metadata("design:type", Date)
|
|
48
48
|
], Group.prototype, "createdAt", void 0);
|
|
49
49
|
tslib_1.__decorate([
|
|
50
50
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
51
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
51
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The timestamp when the group was last updated.' }),
|
|
52
52
|
tslib_1.__metadata("design:type", Date)
|
|
53
53
|
], Group.prototype, "updatedAt", void 0);
|
|
54
54
|
tslib_1.__decorate([
|
|
55
55
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
56
|
-
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
56
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who created the group.' }),
|
|
57
57
|
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
58
58
|
], Group.prototype, "creator", void 0);
|
|
59
59
|
tslib_1.__decorate([
|
|
@@ -62,7 +62,7 @@ tslib_1.__decorate([
|
|
|
62
62
|
], Group.prototype, "creatorId", void 0);
|
|
63
63
|
tslib_1.__decorate([
|
|
64
64
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
65
|
-
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
65
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who last updated the group.' }),
|
|
66
66
|
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
67
67
|
], Group.prototype, "updater", void 0);
|
|
68
68
|
tslib_1.__decorate([
|
|
@@ -72,6 +72,6 @@ tslib_1.__decorate([
|
|
|
72
72
|
exports.Group = Group = tslib_1.__decorate([
|
|
73
73
|
(0, typeorm_1.Entity)(),
|
|
74
74
|
(0, typeorm_1.Index)('ix_group_0', (group) => [group.domain, group.name], { unique: true }),
|
|
75
|
-
(0, type_graphql_1.ObjectType)({ description: '
|
|
75
|
+
(0, type_graphql_1.ObjectType)({ description: 'A group used to organize and manage boards.' })
|
|
76
76
|
], Group);
|
|
77
77
|
//# sourceMappingURL=group.js.map
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"group.js","sourceRoot":"","sources":["../../../server/service/group/group.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAChD,gDAAyC;AAKlC,IAAM,KAAK,GAAX,MAAM,KAAK;CA+CjB,CAAA;AA/CY,sBAAK;AAGP;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;;iCACpD;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,yCAAyC,EAAE,CAAC;sCACzF,cAAM;qCAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;;uCAC1B;AAIjB;IAFC,IAAA,gBAAM,GAA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AAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;sCACnF,gBAAI;sCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;;wCAC1B;gBA9CP,KAAK;IAHjB,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,yBAAU,EAAC,EAAE,WAAW,EAAE,6CAA6C,EAAE,CAAC;GAC9D,KAAK,CA+CjB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Board } from '../board/board.js'\n\n@Entity()\n@Index('ix_group_0', (group: Group) => [group.domain, group.name], { unique: true })\n@ObjectType({ description: 'A group used to organize and manage boards.' })\nexport class Group {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the group.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain to which this group belongs.' })\n domain?: Domain\n\n @RelationId((group: Group) => group.domain)\n domainId?: string\n\n @Column()\n @Field({ description: 'The name of the group.' })\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true, description: 'A detailed description of the group.' })\n description?: string\n\n @OneToMany(type => Board, board => board.group)\n @Field(type => [Board], { nullable: true, description: 'The list of boards belonging to this group.' })\n boards: Board[]\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'The timestamp when the group was created.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'The timestamp when the group was last updated.' })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who created the group.' })\n creator?: User\n\n @RelationId((group: Group) => group.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who last updated the group.' })\n updater?: User\n\n @RelationId((group: Group) => group.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Group } from './group';
|
|
2
|
-
import { GroupQuery } from './group-query';
|
|
3
|
-
import { GroupMutation } from './group-mutation';
|
|
1
|
+
import { Group } from './group.js';
|
|
2
|
+
import { GroupQuery } from './group-query.js';
|
|
3
|
+
import { GroupMutation } from './group-mutation.js';
|
|
4
4
|
export declare const entities: (typeof Group)[];
|
|
5
5
|
export declare const resolvers: (typeof GroupQuery | typeof GroupMutation)[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolvers = exports.entities = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
exports.entities = [
|
|
8
|
-
exports.resolvers = [
|
|
4
|
+
const group_js_1 = require("./group.js");
|
|
5
|
+
const group_query_js_1 = require("./group-query.js");
|
|
6
|
+
const group_mutation_js_1 = require("./group-mutation.js");
|
|
7
|
+
exports.entities = [group_js_1.Group];
|
|
8
|
+
exports.resolvers = [group_query_js_1.GroupQuery, group_mutation_js_1.GroupMutation];
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/group/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/group/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","sourcesContent":["import { Group } from './group.js'\nimport { GroupQuery } from './group-query.js'\nimport { GroupMutation } from './group-mutation.js'\n\nexport const entities = [Group]\nexport const resolvers = [GroupQuery, GroupMutation]\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './board-template/board-template';
|
|
2
|
-
export * from './theme/theme';
|
|
3
|
-
export * from './board/board';
|
|
4
|
-
export * from './group/group';
|
|
5
|
-
export * from './play-group/play-group';
|
|
1
|
+
export * from './board-template/board-template.js';
|
|
2
|
+
export * from './theme/theme.js';
|
|
3
|
+
export * from './board/board.js';
|
|
4
|
+
export * from './group/group.js';
|
|
5
|
+
export * from './play-group/play-group.js';
|
|
6
6
|
export declare const entities: any[];
|
|
7
7
|
export declare const subscribers: any[];
|
|
8
8
|
export declare const schema: {
|
|
9
|
-
resolverClasses: (typeof import("./board-template/board-template-query").BoardTemplateQuery | typeof import("./board-template/board-template-mutation").BoardTemplateMutation | typeof import("./theme/theme-query").ThemeQuery | typeof import("./theme/theme-mutation").ThemeMutation | typeof import("./board/board-query").BoardQuery | typeof import("./board/board-mutation").BoardMutation | typeof import("./board/board-subscription").BoardSubscription | typeof import("./group/group-query").GroupQuery | typeof import("./group/group-mutation").GroupMutation | typeof import("./play-group/play-group-query").PlayGroupQuery | typeof import("./play-group/play-group-mutation").PlayGroupMutation | typeof import("./play-group/play-group-subscription").PlayGroupSubscription | typeof import("./analysis/analysis-query").IntegrationAnalysisQuery | typeof import("./board-favorite/board-favorite-query").BoardFavoriteQuery)[];
|
|
9
|
+
resolverClasses: (typeof import("./board-template/board-template-query.js").BoardTemplateQuery | typeof import("./board-template/board-template-mutation.js").BoardTemplateMutation | typeof import("./theme/theme-query.js").ThemeQuery | typeof import("./theme/theme-mutation.js").ThemeMutation | typeof import("./board/board-query.js").BoardQuery | typeof import("./board/board-mutation.js").BoardMutation | typeof import("./board/board-subscription.js").BoardSubscription | typeof import("./group/group-query.js").GroupQuery | typeof import("./group/group-mutation.js").GroupMutation | typeof import("./play-group/play-group-query.js").PlayGroupQuery | typeof import("./play-group/play-group-mutation.js").PlayGroupMutation | typeof import("./play-group/play-group-subscription.js").PlayGroupSubscription | typeof import("./analysis/analysis-query.js").IntegrationAnalysisQuery | typeof import("./board-favorite/board-favorite-query.js").BoardFavoriteQuery)[];
|
|
10
10
|
};
|