@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
package/dist-server/routes.js
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const env_1 = require("@things-factory/env");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
4
|
+
const shell_1 = require("@things-factory/shell");
|
|
5
|
+
const headless_pool_for_board_js_1 = require("./controllers/headless-pool-for-board.js");
|
|
6
|
+
const headless_pool_for_label_js_1 = require("./controllers/headless-pool-for-label.js");
|
|
7
|
+
const internal_board_view_router_js_1 = require("./routers/internal-board-view-router.js");
|
|
8
|
+
const standalone_board_service_router_js_1 = require("./routers/standalone-board-service-router.js");
|
|
9
|
+
const isPathBaseDomain = !env_1.config.get('subdomain');
|
|
9
10
|
process.on('bootstrap-module-global-public-route', (app, domainGlobalPublicRouter) => {
|
|
10
|
-
(0,
|
|
11
|
-
(0,
|
|
12
|
-
domainGlobalPublicRouter.use('',
|
|
11
|
+
(0, headless_pool_for_label_js_1.getHeadlessPool)();
|
|
12
|
+
(0, headless_pool_for_board_js_1.getHeadlessPool)();
|
|
13
|
+
domainGlobalPublicRouter.use('', internal_board_view_router_js_1.internalBoardViewRouter.routes(), internal_board_view_router_js_1.internalBoardViewRouter.allowedMethods());
|
|
13
14
|
});
|
|
14
15
|
process.on('bootstrap-module-domain-private-route', (app, domainPrivateRouter) => {
|
|
15
16
|
if (isPathBaseDomain) {
|
|
16
|
-
|
|
17
|
+
const domainType = 'domain';
|
|
18
|
+
domainPrivateRouter.use(`/${(0, shell_1.getRoutePrefixForDomainType)()}/:domain`, standalone_board_service_router_js_1.standaloneBoardServiceRouter.routes(), standalone_board_service_router_js_1.standaloneBoardServiceRouter.allowedMethods());
|
|
17
19
|
}
|
|
18
20
|
else {
|
|
19
|
-
domainPrivateRouter.use('',
|
|
21
|
+
domainPrivateRouter.use('', standalone_board_service_router_js_1.standaloneBoardServiceRouter.routes(), standalone_board_service_router_js_1.standaloneBoardServiceRouter.allowedMethods());
|
|
20
22
|
}
|
|
21
23
|
});
|
|
22
24
|
//# sourceMappingURL=routes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;AAAA,6CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;AAAA,6CAA4C;AAC5C,iDAAmE;AACnE,yFAAqG;AACrG,yFAAqG;AACrG,2FAAiF;AACjF,qGAA2F;AAE3F,MAAM,gBAAgB,GAAG,CAAC,YAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;AAEjD,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,wBAAwB,EAAE,EAAE;IAC1F,IAAA,4CAAuB,GAAE,CAAA;IACzB,IAAA,4CAAuB,GAAE,CAAA;IACzB,wBAAwB,CAAC,GAAG,CAAC,EAAE,EAAE,uDAAuB,CAAC,MAAM,EAAE,EAAE,uDAAuB,CAAC,cAAc,EAAE,CAAC,CAAA;AAC9G,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF,IAAI,gBAAgB,EAAE,CAAC;QACrB,MAAM,UAAU,GAAG,QAAQ,CAAA;QAC3B,mBAAmB,CAAC,GAAG,CACrB,IAAI,IAAA,mCAA2B,GAAE,UAAU,EAC3C,iEAA4B,CAAC,MAAM,EAAE,EACrC,iEAA4B,CAAC,cAAc,EAAE,CAC9C,CAAA;IACH,CAAC;SAAM,CAAC;QACN,mBAAmB,CAAC,GAAG,CAAC,EAAE,EAAE,iEAA4B,CAAC,MAAM,EAAE,EAAE,iEAA4B,CAAC,cAAc,EAAE,CAAC,CAAA;IACnH,CAAC;AACH,CAAC,CAAC,CAAA","sourcesContent":["import { config } from '@things-factory/env'\nimport { getRoutePrefixForDomainType } from '@things-factory/shell'\nimport { getHeadlessPool as getHeadlessPoolForBoard } from './controllers/headless-pool-for-board.js'\nimport { getHeadlessPool as getHeadlessPoolForLabel } from './controllers/headless-pool-for-label.js'\nimport { internalBoardViewRouter } from './routers/internal-board-view-router.js'\nimport { standaloneBoardServiceRouter } from './routers/standalone-board-service-router.js'\n\nconst isPathBaseDomain = !config.get('subdomain')\n\nprocess.on('bootstrap-module-global-public-route' as any, (app, domainGlobalPublicRouter) => {\n getHeadlessPoolForLabel()\n getHeadlessPoolForBoard()\n domainGlobalPublicRouter.use('', internalBoardViewRouter.routes(), internalBoardViewRouter.allowedMethods())\n})\n\nprocess.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {\n if (isPathBaseDomain) {\n const domainType = 'domain'\n domainPrivateRouter.use(\n `/${getRoutePrefixForDomainType()}/:domain`,\n standaloneBoardServiceRouter.routes(),\n standaloneBoardServiceRouter.allowedMethods()\n )\n } else {\n domainPrivateRouter.use('', standaloneBoardServiceRouter.routes(), standaloneBoardServiceRouter.allowedMethods())\n }\n})\n"]}
|
|
@@ -4,11 +4,11 @@ exports.IntegrationAnalysisQuery = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const shell_1 = require("@things-factory/shell");
|
|
7
|
-
const
|
|
7
|
+
const analyze_integration_js_1 = require("../../controllers/analyzer/analyze-integration.js");
|
|
8
8
|
let IntegrationAnalysisQuery = class IntegrationAnalysisQuery {
|
|
9
9
|
async integrationAnalysis(context) {
|
|
10
10
|
const { domain } = context.state;
|
|
11
|
-
return await (0,
|
|
11
|
+
return await (0, analyze_integration_js_1.analyzeBoardIntegration)(domain);
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
exports.IntegrationAnalysisQuery = IntegrationAnalysisQuery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis-query.js","sourceRoot":"","sources":["../../../server/service/analysis/analysis-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmD;AACnD,iDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"analysis-query.js","sourceRoot":"","sources":["../../../server/service/analysis/analysis-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmD;AACnD,iDAAoD;AACpD,8FAA2F;AAGpF,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAE7B,AAAN,KAAK,CAAC,mBAAmB,CAAQ,OAAwB;QACvD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,gDAAuB,EAAC,MAAM,CAAC,CAAA;IAC9C,CAAC;CACF,CAAA;AAPY,4DAAwB;AAE7B;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;IACtD,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;mEAI/B;mCANU,wBAAwB;IADpC,IAAA,uBAAQ,GAAE;GACE,wBAAwB,CAOpC","sourcesContent":["import { Resolver, Query, Ctx } from 'type-graphql'\nimport { ScalarObject } from '@things-factory/shell'\nimport { analyzeBoardIntegration } from '../../controllers/analyzer/analyze-integration.js'\n\n@Resolver()\nexport class IntegrationAnalysisQuery {\n @Query(returns => ScalarObject, { description: 'To fetch integration Analyses' })\n async integrationAnalysis(@Ctx() context: ResolverContext): Promise<any> {\n const { domain } = context.state\n\n return await analyzeBoardIntegration(domain)\n }\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IntegrationAnalysisQuery } from './analysis-query';
|
|
1
|
+
import { IntegrationAnalysisQuery } from './analysis-query.js';
|
|
2
2
|
export declare const resolvers: (typeof IntegrationAnalysisQuery)[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolvers = void 0;
|
|
4
|
-
const
|
|
5
|
-
exports.resolvers = [
|
|
4
|
+
const analysis_query_js_1 = require("./analysis-query.js");
|
|
5
|
+
exports.resolvers = [analysis_query_js_1.IntegrationAnalysisQuery];
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/analysis/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/analysis/index.ts"],"names":[],"mappings":";;;AAAA,2DAA8D;AAEjD,QAAA,SAAS,GAAG,CAAC,4CAAwB,CAAC,CAAA","sourcesContent":["import { IntegrationAnalysisQuery } from './analysis-query.js'\n\nexport const resolvers = [IntegrationAnalysisQuery]\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HistoryActionType, HistoryEntityInterface } from '@operato/typeorm-history';
|
|
2
2
|
import { User } from '@things-factory/auth-base';
|
|
3
3
|
import { Domain } from '@things-factory/shell';
|
|
4
|
-
import { Board } from './board';
|
|
5
|
-
import { Group } from '../group/group';
|
|
6
|
-
import { PlayGroup } from '../play-group/play-group';
|
|
4
|
+
import { Board } from './board.js';
|
|
5
|
+
import { Group } from '../group/group.js';
|
|
6
|
+
import { PlayGroup } from '../play-group/play-group.js';
|
|
7
7
|
export declare class BoardHistory implements HistoryEntityInterface<Board> {
|
|
8
8
|
readonly id: string;
|
|
9
9
|
version?: number;
|
|
@@ -11,6 +11,7 @@ export declare class BoardHistory implements HistoryEntityInterface<Board> {
|
|
|
11
11
|
domainId?: string;
|
|
12
12
|
name?: string;
|
|
13
13
|
description?: string;
|
|
14
|
+
type?: 'main' | 'sub' | 'popup';
|
|
14
15
|
model?: string;
|
|
15
16
|
thumbnail?: string;
|
|
16
17
|
group?: Group;
|
|
@@ -8,8 +8,8 @@ const typeorm_history_1 = require("@operato/typeorm-history");
|
|
|
8
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
9
|
const shell_1 = require("@things-factory/shell");
|
|
10
10
|
const env_1 = require("@things-factory/env");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const group_js_1 = require("../group/group.js");
|
|
12
|
+
const play_group_js_1 = require("../play-group/play-group.js");
|
|
13
13
|
const ORMCONFIG = env_1.config.get('ormconfig', {});
|
|
14
14
|
const DATABASE_TYPE = ORMCONFIG.type;
|
|
15
15
|
let BoardHistory = class BoardHistory {
|
|
@@ -20,17 +20,17 @@ let BoardHistory = class BoardHistory {
|
|
|
20
20
|
exports.BoardHistory = BoardHistory;
|
|
21
21
|
tslib_1.__decorate([
|
|
22
22
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
23
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
23
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier for the board history record.' }),
|
|
24
24
|
tslib_1.__metadata("design:type", String)
|
|
25
25
|
], BoardHistory.prototype, "id", void 0);
|
|
26
26
|
tslib_1.__decorate([
|
|
27
27
|
(0, typeorm_1.Column)({ nullable: true, default: 1 }),
|
|
28
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
28
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The version number of this board history record.' }),
|
|
29
29
|
tslib_1.__metadata("design:type", Number)
|
|
30
30
|
], BoardHistory.prototype, "version", void 0);
|
|
31
31
|
tslib_1.__decorate([
|
|
32
32
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
33
|
-
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true }),
|
|
33
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain this board belonged to.' }),
|
|
34
34
|
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
35
35
|
], BoardHistory.prototype, "domain", void 0);
|
|
36
36
|
tslib_1.__decorate([
|
|
@@ -39,14 +39,22 @@ tslib_1.__decorate([
|
|
|
39
39
|
], BoardHistory.prototype, "domainId", void 0);
|
|
40
40
|
tslib_1.__decorate([
|
|
41
41
|
(0, typeorm_1.Column)(),
|
|
42
|
-
(0, type_graphql_1.Field)(),
|
|
42
|
+
(0, type_graphql_1.Field)({ description: 'The name of the board at this point in history.' }),
|
|
43
43
|
tslib_1.__metadata("design:type", String)
|
|
44
44
|
], BoardHistory.prototype, "name", void 0);
|
|
45
45
|
tslib_1.__decorate([
|
|
46
46
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
47
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
47
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The description of the board at this point in history.' }),
|
|
48
48
|
tslib_1.__metadata("design:type", String)
|
|
49
49
|
], BoardHistory.prototype, "description", void 0);
|
|
50
|
+
tslib_1.__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ nullable: true, default: 'main' }),
|
|
52
|
+
(0, type_graphql_1.Field)({
|
|
53
|
+
nullable: true,
|
|
54
|
+
description: "The type of the board at this point in history, can be 'main', 'sub', or 'popup'."
|
|
55
|
+
}),
|
|
56
|
+
tslib_1.__metadata("design:type", String)
|
|
57
|
+
], BoardHistory.prototype, "type", void 0);
|
|
50
58
|
tslib_1.__decorate([
|
|
51
59
|
(0, typeorm_1.Column)({
|
|
52
60
|
nullable: true,
|
|
@@ -59,7 +67,7 @@ tslib_1.__decorate([
|
|
|
59
67
|
: 'varchar',
|
|
60
68
|
length: DATABASE_TYPE == 'mssql' ? 'MAX' : undefined
|
|
61
69
|
}),
|
|
62
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
70
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The JSON model of the board at this point in history.' }),
|
|
63
71
|
tslib_1.__metadata("design:type", String)
|
|
64
72
|
], BoardHistory.prototype, "model", void 0);
|
|
65
73
|
tslib_1.__decorate([
|
|
@@ -74,36 +82,39 @@ tslib_1.__decorate([
|
|
|
74
82
|
: 'varchar',
|
|
75
83
|
length: DATABASE_TYPE == 'mssql' ? 'MAX' : undefined
|
|
76
84
|
}),
|
|
77
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
85
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The base64 encoded thumbnail image of the board at this point in history.' }),
|
|
78
86
|
tslib_1.__metadata("design:type", String)
|
|
79
87
|
], BoardHistory.prototype, "thumbnail", void 0);
|
|
80
88
|
tslib_1.__decorate([
|
|
81
|
-
(0, typeorm_1.ManyToOne)(type =>
|
|
82
|
-
(0, type_graphql_1.Field)(type =>
|
|
83
|
-
tslib_1.__metadata("design:type",
|
|
89
|
+
(0, typeorm_1.ManyToOne)(type => group_js_1.Group, group => group.boards),
|
|
90
|
+
(0, type_graphql_1.Field)(type => group_js_1.Group, { nullable: true, description: 'The group the board belonged to at this point in history.' }),
|
|
91
|
+
tslib_1.__metadata("design:type", group_js_1.Group)
|
|
84
92
|
], BoardHistory.prototype, "group", void 0);
|
|
85
93
|
tslib_1.__decorate([
|
|
86
94
|
(0, typeorm_1.RelationId)((board) => board.group),
|
|
87
95
|
tslib_1.__metadata("design:type", String)
|
|
88
96
|
], BoardHistory.prototype, "groupId", void 0);
|
|
89
97
|
tslib_1.__decorate([
|
|
90
|
-
(0, typeorm_1.ManyToMany)(type =>
|
|
91
|
-
(0, type_graphql_1.Field)(type => [
|
|
98
|
+
(0, typeorm_1.ManyToMany)(type => play_group_js_1.PlayGroup, playGroup => playGroup.boards),
|
|
99
|
+
(0, type_graphql_1.Field)(type => [play_group_js_1.PlayGroup], {
|
|
100
|
+
nullable: true,
|
|
101
|
+
description: 'The play groups the board was part of at this point in history.'
|
|
102
|
+
}),
|
|
92
103
|
tslib_1.__metadata("design:type", Array)
|
|
93
104
|
], BoardHistory.prototype, "playGroups", void 0);
|
|
94
105
|
tslib_1.__decorate([
|
|
95
106
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
96
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
107
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The creation timestamp of the original board.' }),
|
|
97
108
|
tslib_1.__metadata("design:type", Date)
|
|
98
109
|
], BoardHistory.prototype, "createdAt", void 0);
|
|
99
110
|
tslib_1.__decorate([
|
|
100
111
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
101
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
112
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The last update timestamp of the board at this point in history.' }),
|
|
102
113
|
tslib_1.__metadata("design:type", Date)
|
|
103
114
|
], BoardHistory.prototype, "updatedAt", void 0);
|
|
104
115
|
tslib_1.__decorate([
|
|
105
116
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
106
|
-
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
117
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who created the original board.' }),
|
|
107
118
|
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
108
119
|
], BoardHistory.prototype, "creator", void 0);
|
|
109
120
|
tslib_1.__decorate([
|
|
@@ -112,7 +123,7 @@ tslib_1.__decorate([
|
|
|
112
123
|
], BoardHistory.prototype, "creatorId", void 0);
|
|
113
124
|
tslib_1.__decorate([
|
|
114
125
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
115
|
-
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
126
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who made the changes recorded in this history entry.' }),
|
|
116
127
|
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
117
128
|
], BoardHistory.prototype, "updater", void 0);
|
|
118
129
|
tslib_1.__decorate([
|
|
@@ -121,11 +132,12 @@ tslib_1.__decorate([
|
|
|
121
132
|
], BoardHistory.prototype, "updaterId", void 0);
|
|
122
133
|
tslib_1.__decorate([
|
|
123
134
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
124
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
135
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The deletion timestamp of the board, if applicable.' }),
|
|
125
136
|
tslib_1.__metadata("design:type", Date)
|
|
126
137
|
], BoardHistory.prototype, "deletedAt", void 0);
|
|
127
138
|
tslib_1.__decorate([
|
|
128
139
|
(0, typeorm_history_1.HistoryOriginalIdColumn)(),
|
|
140
|
+
(0, type_graphql_1.Field)({ description: 'The ID of the original board entity this history record belongs to.' }),
|
|
129
141
|
tslib_1.__metadata("design:type", String)
|
|
130
142
|
], BoardHistory.prototype, "originalId", void 0);
|
|
131
143
|
tslib_1.__decorate([
|
|
@@ -143,6 +155,9 @@ tslib_1.__decorate([
|
|
|
143
155
|
: undefined,
|
|
144
156
|
length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10
|
|
145
157
|
}),
|
|
158
|
+
(0, type_graphql_1.Field)(type => String, {
|
|
159
|
+
description: 'The action that created this history record (e.g., created, updated, deleted).'
|
|
160
|
+
}),
|
|
146
161
|
tslib_1.__metadata("design:type", String)
|
|
147
162
|
], BoardHistory.prototype, "action", void 0);
|
|
148
163
|
exports.BoardHistory = BoardHistory = tslib_1.__decorate([
|
|
@@ -150,6 +165,6 @@ exports.BoardHistory = BoardHistory = tslib_1.__decorate([
|
|
|
150
165
|
(0, typeorm_1.Index)('ix_board_history_0', (boardHistory) => [boardHistory.originalId, boardHistory.version], {
|
|
151
166
|
unique: true
|
|
152
167
|
}),
|
|
153
|
-
(0, type_graphql_1.ObjectType)({ description: '
|
|
168
|
+
(0, type_graphql_1.ObjectType)({ description: 'Stores historical versions of board entities.' })
|
|
154
169
|
], BoardHistory);
|
|
155
170
|
//# sourceMappingURL=board-history.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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;IAC1B,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;+CAAA;AAGT;IADN,IAAA,yCAAuB,GAAE;;gDACA;AAkBnB;IAhBN,IAAA,qCAAmB,EAAC;QACnB,QAAQ,EAAE,KAAK;QACf,IAAI,EACF,aAAa,IAAI,UAAU,IAAI,aAAa,IAAI,OAAO,IAAI,aAAa,IAAI,SAAS;YACnF,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,aAAa,IAAI,QAAQ;gBACzB,CAAC,CAAC,UAAU;gBACZ,CAAC,CAAC,aAAa,IAAI,OAAO;oBACxB,CAAC,CAAC,UAAU;oBACZ,CAAC,CAAC,SAAS;QACnB,IAAI,EACF,aAAa,IAAI,UAAU,IAAI,aAAa,IAAI,OAAO,IAAI,aAAa,IAAI,SAAS;YACnF,CAAC,CAAC,mCAAiB;YACnB,CAAC,CAAC,SAAS;QACf,MAAM,EAAE,aAAa,IAAI,UAAU,IAAI,aAAa,IAAI,OAAO,IAAI,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;KAC/G,CAAC;;4CAC+B;uBA9GtB,YAAY;IALxB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,oBAAoB,EAAE,CAAC,YAA0B,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE;QAC5G,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;GAC1C,YAAY,CA+GxB","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport { Column, Entity, Index, ManyToOne, ManyToMany, PrimaryGeneratedColumn, RelationId } from 'typeorm'\n\nimport {\n HistoryActionColumn,\n HistoryActionType,\n HistoryEntityInterface,\n HistoryOriginalIdColumn\n} from '@operato/typeorm-history'\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\nimport { config } from '@things-factory/env'\n\nimport { Board } from './board'\nimport { Group } from '../group/group'\nimport { PlayGroup } from '../play-group/play-group'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index('ix_board_history_0', (boardHistory: BoardHistory) => [boardHistory.originalId, boardHistory.version], {\n unique: true\n})\n@ObjectType({ description: 'History Entity of Board' })\nexport class BoardHistory implements HistoryEntityInterface<Board> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((board: Board) => board.domain)\n domainId?: string\n\n @Column()\n @Field()\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: 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 })\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 })\n thumbnail?: string\n\n @ManyToOne(type => Group, group => group.boards)\n @Field(type => Group, { nullable: true })\n group?: Group\n\n @RelationId((board: Board) => board.group)\n groupId?: string\n\n @ManyToMany(type => PlayGroup, playGroup => playGroup.boards)\n @Field(type => [PlayGroup], { nullable: true })\n playGroups?: PlayGroup[]\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n createdAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((board: Board) => board.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((board: Board) => board.updater)\n updaterId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n deletedAt?: Date\n\n @HistoryOriginalIdColumn()\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n enum:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? HistoryActionType\n : undefined,\n length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10\n })\n public action!: HistoryActionType\n}\n"]}
|
|
1
|
+
{"version":3,"file":"board-history.js","sourceRoot":"","sources":["../../../server/service/board/board-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA0G;AAE1G,8DAKiC;AACjC,yDAAgD;AAChD,iDAA8C;AAC9C,6CAA4C;AAG5C,gDAAyC;AACzC,+DAAuD;AAEvD,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAO7B,IAAM,YAAY,GAAlB,MAAM,YAAY;IAAlB;QAOL,YAAO,GAAY,CAAC,CAAA;IAsHtB,CAAC;CAAA,CAAA;AA7HY,oCAAY;AAGd;IAFR,IAAA,gCAAsB,EAAC,MAA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D,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,+CAA+C,EAAE,CAAC;GAChE,YAAY,CA6HxB","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport { Column, Entity, Index, ManyToOne, ManyToMany, PrimaryGeneratedColumn, RelationId } from 'typeorm'\n\nimport {\n HistoryActionColumn,\n HistoryActionType,\n HistoryEntityInterface,\n HistoryOriginalIdColumn\n} from '@operato/typeorm-history'\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\nimport { config } from '@things-factory/env'\n\nimport { Board } from './board.js'\nimport { Group } from '../group/group.js'\nimport { PlayGroup } from '../play-group/play-group.js'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index('ix_board_history_0', (boardHistory: BoardHistory) => [boardHistory.originalId, boardHistory.version], {\n unique: true\n})\n@ObjectType({ description: 'Stores historical versions of board entities.' })\nexport class BoardHistory implements HistoryEntityInterface<Board> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the board history record.' })\n readonly id: string\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true, description: 'The version number of this board history record.' })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain this board belonged to.' })\n domain?: Domain\n\n @RelationId((board: Board) => board.domain)\n domainId?: string\n\n @Column()\n @Field({ description: 'The name of the board at this point in history.' })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The description of the board at this point in history.' })\n description?: string\n\n @Column({ nullable: true, default: 'main' })\n @Field({\n nullable: true,\n description: \"The type of the board at this point in history, can be 'main', 'sub', or 'popup'.\"\n })\n type?: 'main' | 'sub' | 'popup'\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 of the board at this point in history.' })\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: 'The base64 encoded thumbnail image of the board at this point in history.' })\n thumbnail?: string\n\n @ManyToOne(type => Group, group => group.boards)\n @Field(type => Group, { nullable: true, description: 'The group the board belonged to at this point in history.' })\n group?: Group\n\n @RelationId((board: Board) => board.group)\n groupId?: string\n\n @ManyToMany(type => PlayGroup, playGroup => playGroup.boards)\n @Field(type => [PlayGroup], {\n nullable: true,\n description: 'The play groups the board was part of at this point in history.'\n })\n playGroups?: PlayGroup[]\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The creation timestamp of the original board.' })\n createdAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The last update timestamp of the board at this point in history.' })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who created the original board.' })\n creator?: User\n\n @RelationId((board: Board) => board.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who made the changes recorded in this history entry.' })\n updater?: User\n\n @RelationId((board: Board) => board.updater)\n updaterId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The deletion timestamp of the board, if applicable.' })\n deletedAt?: Date\n\n @HistoryOriginalIdColumn()\n @Field({ description: 'The ID of the original board entity this history record belongs to.' })\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n enum:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? HistoryActionType\n : undefined,\n length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10\n })\n @Field(type => String, {\n description: 'The action that created this history record (e.g., created, updated, deleted).'\n })\n public action!: HistoryActionType\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FileUpload } from 'graphql-upload/GraphQLUpload.js';
|
|
2
|
-
import { Board } from './board';
|
|
3
|
-
import { BoardPatch, NewBoard } from './board-type';
|
|
2
|
+
import { Board } from './board.js';
|
|
3
|
+
import { BoardPatch, NewBoard } from './board-type.js';
|
|
4
4
|
export declare class BoardMutation {
|
|
5
5
|
createBoard(board: NewBoard, context: ResolverContext): Promise<Board>;
|
|
6
6
|
cloneBoard(id: string, patch: BoardPatch, targetSubdomain: string, targetGroupId: string, context: ResolverContext): Promise<Board>;
|