@things-factory/board-service 7.0.1-beta.1 → 7.0.1-beta.12
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/constants/error-code.d.ts +2 -0
- package/dist-server/controllers/analyzer/analyze-integration.d.ts +5 -0
- package/dist-server/controllers/analyzer/analyze-integration.js.map +1 -1
- package/dist-server/controllers/fonts.d.ts +9 -0
- package/dist-server/controllers/fonts.js.map +1 -1
- package/dist-server/controllers/headless-model.d.ts +6 -0
- package/dist-server/controllers/headless-model.js.map +1 -1
- package/dist-server/controllers/headless-playlist.d.ts +5 -0
- package/dist-server/controllers/headless-playlist.js.map +1 -1
- package/dist-server/controllers/headless-pool-for-board.d.ts +1 -0
- package/dist-server/controllers/headless-pool-for-board.js.map +1 -1
- package/dist-server/controllers/headless-pool-for-label.d.ts +1 -0
- package/dist-server/controllers/headless-pool-for-label.js +3 -8
- package/dist-server/controllers/headless-pool-for-label.js.map +1 -1
- package/dist-server/controllers/index.d.ts +26 -0
- package/dist-server/controllers/label-command.d.ts +19 -0
- package/dist-server/controllers/label-command.js.map +1 -1
- package/dist-server/controllers/pdf.d.ts +9 -0
- package/dist-server/controllers/pdf.js.map +1 -1
- package/dist-server/controllers/print.d.ts +21 -0
- package/dist-server/controllers/print.js.map +1 -1
- package/dist-server/controllers/screenshot.d.ts +11 -0
- package/dist-server/controllers/screenshot.js.map +1 -1
- package/dist-server/controllers/thumbnail.d.ts +7 -0
- package/dist-server/errors/index.d.ts +1 -0
- package/dist-server/errors/license-error.d.ts +11 -0
- package/dist-server/index.d.ts +5 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/migrations/1556862253000-SeedGroup.d.ts +5 -0
- package/dist-server/migrations/1556862253000-SeedGroup.js.map +1 -1
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/routers/board-print-router.d.ts +1 -0
- package/dist-server/routers/internal-board-view-router.d.ts +1 -0
- package/dist-server/routers/internal-board-view-router.js.map +1 -1
- package/dist-server/routers/standalone-board-service-router.d.ts +1 -0
- package/dist-server/routers/standalone-board-service-router.js.map +1 -1
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/analysis/analysis-query.d.ts +3 -0
- 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 +2 -0
- package/dist-server/service/board/board-history.d.ts +28 -0
- package/dist-server/service/board/board-history.js +2 -2
- package/dist-server/service/board/board-history.js.map +1 -1
- package/dist-server/service/board/board-mutation.d.ts +12 -0
- package/dist-server/service/board/board-mutation.js +2 -2
- package/dist-server/service/board/board-mutation.js.map +1 -1
- package/dist-server/service/board/board-query.d.ts +20 -0
- package/dist-server/service/board/board-query.js +2 -2
- package/dist-server/service/board/board-query.js.map +1 -1
- package/dist-server/service/board/board-subscription.d.ts +6 -0
- package/dist-server/service/board/board-subscription.js +2 -2
- package/dist-server/service/board/board-subscription.js.map +1 -1
- package/dist-server/service/board/board-type.d.ts +24 -0
- package/dist-server/service/board/board-type.js +8 -8
- package/dist-server/service/board/board-type.js.map +1 -1
- package/dist-server/service/board/board.d.ts +25 -0
- package/dist-server/service/board/board.js +2 -2
- package/dist-server/service/board/board.js.map +1 -1
- package/dist-server/service/board/event-subscriber.d.ts +15 -0
- package/dist-server/service/board/event-subscriber.js +4 -4
- package/dist-server/service/board/event-subscriber.js.map +1 -1
- package/dist-server/service/board/index.d.ts +9 -0
- package/dist-server/service/board-favorite/board-favorite-query.d.ts +5 -0
- package/dist-server/service/board-favorite/board-favorite-query.js +2 -2
- package/dist-server/service/board-favorite/board-favorite-query.js.map +1 -1
- package/dist-server/service/board-favorite/board-favorite-type.d.ts +8 -0
- package/dist-server/service/board-favorite/board-favorite-type.js +4 -4
- package/dist-server/service/board-favorite/board-favorite-type.js.map +1 -1
- package/dist-server/service/board-favorite/index.d.ts +3 -0
- package/dist-server/service/board-template/board-template-mutation.d.ts +8 -0
- package/dist-server/service/board-template/board-template-mutation.js +2 -2
- package/dist-server/service/board-template/board-template-mutation.js.map +1 -1
- package/dist-server/service/board-template/board-template-query.d.ts +13 -0
- package/dist-server/service/board-template/board-template-query.js +2 -2
- package/dist-server/service/board-template/board-template-query.js.map +1 -1
- package/dist-server/service/board-template/board-template-type.d.ts +21 -0
- package/dist-server/service/board-template/board-template-type.js +6 -6
- package/dist-server/service/board-template/board-template-type.js.map +1 -1
- package/dist-server/service/board-template/board-template.d.ts +23 -0
- package/dist-server/service/board-template/board-template.js +3 -3
- package/dist-server/service/board-template/board-template.js.map +1 -1
- package/dist-server/service/board-template/index.d.ts +6 -0
- package/dist-server/service/group/group-mutation.d.ts +8 -0
- package/dist-server/service/group/group-mutation.js +2 -2
- package/dist-server/service/group/group-mutation.js.map +1 -1
- package/dist-server/service/group/group-query.d.ts +13 -0
- package/dist-server/service/group/group-query.js +2 -2
- package/dist-server/service/group/group-query.js.map +1 -1
- package/dist-server/service/group/group-type.d.ts +13 -0
- package/dist-server/service/group/group-type.js +6 -6
- package/dist-server/service/group/group-type.js.map +1 -1
- package/dist-server/service/group/group.d.ts +17 -0
- package/dist-server/service/group/group.js +2 -2
- package/dist-server/service/group/group.js.map +1 -1
- package/dist-server/service/group/index.d.ts +5 -0
- package/dist-server/service/index.d.ts +10 -0
- package/dist-server/service/permission/domain-permission-subscriber.d.ts +9 -0
- package/dist-server/service/permission/domain-permission-subscriber.js +2 -2
- package/dist-server/service/permission/domain-permission-subscriber.js.map +1 -1
- package/dist-server/service/permission/index.d.ts +2 -0
- package/dist-server/service/play-group/event-subscriber.d.ts +6 -0
- package/dist-server/service/play-group/event-subscriber.js +2 -2
- package/dist-server/service/play-group/event-subscriber.js.map +1 -1
- package/dist-server/service/play-group/index.d.ts +8 -0
- package/dist-server/service/play-group/play-group-mutation.d.ts +10 -0
- package/dist-server/service/play-group/play-group-mutation.js +2 -2
- package/dist-server/service/play-group/play-group-mutation.js.map +1 -1
- package/dist-server/service/play-group/play-group-query.d.ts +14 -0
- package/dist-server/service/play-group/play-group-query.js +2 -2
- package/dist-server/service/play-group/play-group-query.js.map +1 -1
- package/dist-server/service/play-group/play-group-subscription.d.ts +6 -0
- package/dist-server/service/play-group/play-group-subscription.js +2 -2
- package/dist-server/service/play-group/play-group-subscription.js.map +1 -1
- package/dist-server/service/play-group/play-group-type.d.ts +13 -0
- package/dist-server/service/play-group/play-group-type.js +6 -6
- package/dist-server/service/play-group/play-group-type.js.map +1 -1
- package/dist-server/service/play-group/play-group.d.ts +18 -0
- package/dist-server/service/play-group/play-group.js +2 -2
- package/dist-server/service/play-group/play-group.js.map +1 -1
- package/dist-server/service/theme/index.d.ts +6 -0
- package/dist-server/service/theme/theme-mutation.d.ts +10 -0
- package/dist-server/service/theme/theme-mutation.js +2 -2
- package/dist-server/service/theme/theme-mutation.js.map +1 -1
- package/dist-server/service/theme/theme-query.d.ts +11 -0
- package/dist-server/service/theme/theme-query.js +2 -2
- package/dist-server/service/theme/theme-query.js.map +1 -1
- package/dist-server/service/theme/theme-type.d.ts +21 -0
- package/dist-server/service/theme/theme-type.js +6 -6
- package/dist-server/service/theme/theme-type.js.map +1 -1
- package/dist-server/service/theme/theme.d.ts +25 -0
- package/dist-server/service/theme/theme.js +2 -2
- package/dist-server/service/theme/theme.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/server/controllers/fonts.ts +1 -1
|
@@ -11,6 +11,7 @@ let PlayGroupSubscription = class PlayGroupSubscription {
|
|
|
11
11
|
return payload.playGroup;
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
+
exports.PlayGroupSubscription = PlayGroupSubscription;
|
|
14
15
|
tslib_1.__decorate([
|
|
15
16
|
(0, type_graphql_1.Subscription)({
|
|
16
17
|
subscribe: ({ args, context, info }) => {
|
|
@@ -42,8 +43,7 @@ tslib_1.__decorate([
|
|
|
42
43
|
tslib_1.__metadata("design:paramtypes", [Object, String]),
|
|
43
44
|
tslib_1.__metadata("design:returntype", play_group_1.PlayGroup)
|
|
44
45
|
], PlayGroupSubscription.prototype, "playGroup", null);
|
|
45
|
-
PlayGroupSubscription = tslib_1.__decorate([
|
|
46
|
+
exports.PlayGroupSubscription = PlayGroupSubscription = tslib_1.__decorate([
|
|
46
47
|
(0, type_graphql_1.Resolver)(play_group_1.PlayGroup)
|
|
47
48
|
], PlayGroupSubscription);
|
|
48
|
-
exports.PlayGroupSubscription = PlayGroupSubscription;
|
|
49
49
|
//# sourceMappingURL=play-group-subscription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play-group-subscription.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-subscription.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,+CAA2C;AAC3C,iDAA8C;AAC9C,6CAAwC;AAGjC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAiChC,SAAS,CAAS,OAAiC,EAAa,EAAU;QACxE,OAAO,OAAO,CAAC,SAAS,CAAA;IAC1B,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"play-group-subscription.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-subscription.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,+CAA2C;AAC3C,iDAA8C;AAC9C,6CAAwC;AAGjC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAiChC,SAAS,CAAS,OAAiC,EAAa,EAAU;QACxE,OAAO,OAAO,CAAC,SAAS,CAAA;IAC1B,CAAC;CACF,CAAA;AApCY,sDAAqB;AAiChC;IAhCC,IAAA,2BAAY,EAAC;QACZ,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;;YACrC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;YACtC,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAA;YACnB,MAAM,SAAS,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAA;YAEnC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;YACpC,CAAC;YAED,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAA,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;gBACnG,MAAM,IAAI,KAAK,CAAC,UAAU,SAAS,6BAA6B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAA;YACjF,CAAC;YAED,OAAO,IAAA,mBAAI,EACT,cAAM,CAAC,SAAS,CAAC,YAAY,CAAC,EAC9B,IAAA,qBAAM,EAAC,CAAC,OAAiC,EAAE,EAAE;gBAC3C,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,SAAS,CAAA;gBAEvD,IAAI,QAAQ,KAAK,MAAM,CAAC,EAAE,EAAE,CAAC;oBAC3B,OAAO,KAAK,CAAA;gBACd,CAAC;gBAED,IAAI,EAAE,KAAK,WAAW,EAAE,CAAC;oBACvB,OAAO,KAAK,CAAA;gBACd,CAAC;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CAAC,CACH,CAAA;QACH,CAAC;KACF,CAAC;IACS,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqC,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;;;4CAAc,sBAAS;sDAErF;gCAnCU,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,sBAAS,CAAC;GACP,qBAAqB,CAoCjC","sourcesContent":["import { Resolver, Subscription, Root, Arg } from 'type-graphql'\nimport { filter, pipe } from 'graphql-yoga'\nimport { pubsub } from '@things-factory/shell'\nimport { PlayGroup } from './play-group'\n\n@Resolver(PlayGroup)\nexport class PlayGroupSubscription {\n @Subscription({\n subscribe: ({ args, context, info }) => {\n const { domain, user } = context.state\n const { id } = args\n const subdomain = domain?.subdomain\n\n if (!domain) {\n throw new Error('domain required')\n }\n\n if (!user.domains?.find(d => d.subdomain === subdomain) && !process.superUserGranted(domain, user)) {\n throw new Error(`domain(${subdomain}) is not working for user(${user.email}).`)\n }\n\n return pipe(\n pubsub.subscribe('play-group'),\n filter((payload: { playGroup: PlayGroup }) => {\n const { id: playGroupId, domainId } = payload.playGroup\n\n if (domainId !== domain.id) {\n return false\n }\n\n if (id !== playGroupId) {\n return false\n }\n\n return true\n })\n )\n }\n })\n playGroup(@Root() payload: { playGroup: PlayGroup }, @Arg('id') id: string): PlayGroup {\n return payload.playGroup\n }\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PlayGroup } from './play-group';
|
|
2
|
+
export declare class NewPlayGroup {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class PlayGroupPatch {
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class PlayGroupList {
|
|
11
|
+
items: PlayGroup[];
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
@@ -6,6 +6,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const play_group_1 = require("./play-group");
|
|
7
7
|
let NewPlayGroup = class NewPlayGroup {
|
|
8
8
|
};
|
|
9
|
+
exports.NewPlayGroup = NewPlayGroup;
|
|
9
10
|
tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Field)(),
|
|
11
12
|
tslib_1.__metadata("design:type", String)
|
|
@@ -14,12 +15,12 @@ tslib_1.__decorate([
|
|
|
14
15
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
15
16
|
tslib_1.__metadata("design:type", String)
|
|
16
17
|
], NewPlayGroup.prototype, "description", void 0);
|
|
17
|
-
NewPlayGroup = tslib_1.__decorate([
|
|
18
|
+
exports.NewPlayGroup = NewPlayGroup = tslib_1.__decorate([
|
|
18
19
|
(0, type_graphql_1.InputType)()
|
|
19
20
|
], NewPlayGroup);
|
|
20
|
-
exports.NewPlayGroup = NewPlayGroup;
|
|
21
21
|
let PlayGroupPatch = class PlayGroupPatch {
|
|
22
22
|
};
|
|
23
|
+
exports.PlayGroupPatch = PlayGroupPatch;
|
|
23
24
|
tslib_1.__decorate([
|
|
24
25
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
25
26
|
tslib_1.__metadata("design:type", String)
|
|
@@ -28,12 +29,12 @@ tslib_1.__decorate([
|
|
|
28
29
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
29
30
|
tslib_1.__metadata("design:type", String)
|
|
30
31
|
], PlayGroupPatch.prototype, "description", void 0);
|
|
31
|
-
PlayGroupPatch = tslib_1.__decorate([
|
|
32
|
+
exports.PlayGroupPatch = PlayGroupPatch = tslib_1.__decorate([
|
|
32
33
|
(0, type_graphql_1.InputType)()
|
|
33
34
|
], PlayGroupPatch);
|
|
34
|
-
exports.PlayGroupPatch = PlayGroupPatch;
|
|
35
35
|
let PlayGroupList = class PlayGroupList {
|
|
36
36
|
};
|
|
37
|
+
exports.PlayGroupList = PlayGroupList;
|
|
37
38
|
tslib_1.__decorate([
|
|
38
39
|
(0, type_graphql_1.Field)(type => [play_group_1.PlayGroup]),
|
|
39
40
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -42,8 +43,7 @@ tslib_1.__decorate([
|
|
|
42
43
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
43
44
|
tslib_1.__metadata("design:type", Number)
|
|
44
45
|
], PlayGroupList.prototype, "total", void 0);
|
|
45
|
-
PlayGroupList = tslib_1.__decorate([
|
|
46
|
+
exports.PlayGroupList = PlayGroupList = tslib_1.__decorate([
|
|
46
47
|
(0, type_graphql_1.ObjectType)()
|
|
47
48
|
], PlayGroupList);
|
|
48
|
-
exports.PlayGroupList = PlayGroupList;
|
|
49
49
|
//# sourceMappingURL=play-group-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play-group-type.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,6CAAwC;AAGjC,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;
|
|
1
|
+
{"version":3,"file":"play-group-type.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,6CAAwC;AAGjC,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AANY,oCAAY;AAEvB;IADC,IAAA,oBAAK,GAAE;;0CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;uBALT,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAMxB;AAGM,IAAM,cAAc,GAApB,MAAM,cAAc;CAM1B,CAAA;AANY,wCAAc;AAEzB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACd;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;yBALT,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAM1B;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAMzB,CAAA;AANY,sCAAa;AAExB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,sBAAS,CAAC,CAAC;;4CACT;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;4CACN;wBALF,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { PlayGroup } from './play-group'\n\n@InputType()\nexport class NewPlayGroup {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@InputType()\nexport class PlayGroupPatch {\n @Field({ nullable: true })\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@ObjectType()\nexport class PlayGroupList {\n @Field(type => [PlayGroup])\n items: PlayGroup[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { Domain } from '@things-factory/shell';
|
|
3
|
+
import { Board } from '../board/board';
|
|
4
|
+
export declare class PlayGroup {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
domain?: Domain;
|
|
7
|
+
domainId?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
boards: Board[];
|
|
11
|
+
order: any;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
creator?: User;
|
|
15
|
+
creatorId?: string;
|
|
16
|
+
updater?: User;
|
|
17
|
+
updaterId?: string;
|
|
18
|
+
}
|
|
@@ -9,6 +9,7 @@ const shell_1 = require("@things-factory/shell");
|
|
|
9
9
|
const board_1 = require("../board/board");
|
|
10
10
|
let PlayGroup = class PlayGroup {
|
|
11
11
|
};
|
|
12
|
+
exports.PlayGroup = PlayGroup;
|
|
12
13
|
tslib_1.__decorate([
|
|
13
14
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
14
15
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -73,10 +74,9 @@ tslib_1.__decorate([
|
|
|
73
74
|
(0, typeorm_1.RelationId)((playGroup) => playGroup.updater),
|
|
74
75
|
tslib_1.__metadata("design:type", String)
|
|
75
76
|
], PlayGroup.prototype, "updaterId", void 0);
|
|
76
|
-
PlayGroup = tslib_1.__decorate([
|
|
77
|
+
exports.PlayGroup = PlayGroup = tslib_1.__decorate([
|
|
77
78
|
(0, typeorm_1.Entity)(),
|
|
78
79
|
(0, typeorm_1.Index)('ix_play_group_0', (playGroup) => [playGroup.domain, playGroup.name], { unique: true }),
|
|
79
80
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Board PlayGroup' })
|
|
80
81
|
], PlayGroup);
|
|
81
|
-
exports.PlayGroup = PlayGroup;
|
|
82
82
|
//# sourceMappingURL=play-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play-group.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAWgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,0CAAsC;AAK/B,IAAM,SAAS,GAAf,MAAM,SAAS;CAmDrB,CAAA;
|
|
1
|
+
{"version":3,"file":"play-group.js","sourceRoot":"","sources":["../../../server/service/play-group/play-group.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAWgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,0CAAsC;AAK/B,IAAM,SAAS,GAAf,MAAM,SAAS;CAmDrB,CAAA;AAnDY,8BAAS;AAGX;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;qCACC;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,CAAC;sCACjC,cAAM;yCAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC;;2CACtC;AAIjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;uCACI;AAMZ;IAJC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;IACD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0CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;4CACtC;oBAlDP,SAAS;IAHrB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,iBAAiB,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACxG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;GAC7C,SAAS,CAmDrB","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n JoinTable,\n ManyToMany,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { Board } from '../board/board'\n\n@Entity()\n@Index('ix_play_group_0', (playGroup: PlayGroup) => [playGroup.domain, playGroup.name], { unique: true })\n@ObjectType({ description: 'Entity for Board PlayGroup' })\nexport class PlayGroup {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((playGroup: PlayGroup) => playGroup.domain)\n domainId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @ManyToMany(type => Board, board => board.playGroups)\n @JoinTable({ name: 'play_groups_boards' })\n @Field(type => [Board], { nullable: true })\n boards: Board[]\n\n @Column('simple-json', { nullable: true })\n order: any\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((playGroup: PlayGroup) => playGroup.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((playGroup: PlayGroup) => playGroup.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Theme } from './theme';
|
|
2
|
+
import { ThemeQuery } from './theme-query';
|
|
3
|
+
import { ThemeMutation } from './theme-mutation';
|
|
4
|
+
export declare const entities: (typeof Theme)[];
|
|
5
|
+
export declare const resolvers: (typeof ThemeQuery | typeof ThemeMutation)[];
|
|
6
|
+
export declare const subscribers: any[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Theme } from './theme';
|
|
2
|
+
import { NewTheme, ThemePatch } from './theme-type';
|
|
3
|
+
export declare class ThemeMutation {
|
|
4
|
+
createTheme(theme: NewTheme, context: ResolverContext): Promise<Theme>;
|
|
5
|
+
updateTheme(id: string, patch: ThemePatch, context: ResolverContext): Promise<Theme>;
|
|
6
|
+
updateMultipleTheme(patches: ThemePatch[], context: ResolverContext): Promise<Theme[]>;
|
|
7
|
+
deleteTheme(id: string, context: ResolverContext): Promise<boolean>;
|
|
8
|
+
deleteThemes(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
9
|
+
importThemes(themes: ThemePatch[], context: ResolverContext): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -63,6 +63,7 @@ let ThemeMutation = class ThemeMutation {
|
|
|
63
63
|
return true;
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
+
exports.ThemeMutation = ThemeMutation;
|
|
66
67
|
tslib_1.__decorate([
|
|
67
68
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
68
69
|
(0, type_graphql_1.Mutation)(returns => theme_1.Theme, { description: 'To create new Theme' }),
|
|
@@ -118,8 +119,7 @@ tslib_1.__decorate([
|
|
|
118
119
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
119
120
|
tslib_1.__metadata("design:returntype", Promise)
|
|
120
121
|
], ThemeMutation.prototype, "importThemes", null);
|
|
121
|
-
ThemeMutation = tslib_1.__decorate([
|
|
122
|
+
exports.ThemeMutation = ThemeMutation = tslib_1.__decorate([
|
|
122
123
|
(0, type_graphql_1.Resolver)(theme_1.Theme)
|
|
123
124
|
], ThemeMutation);
|
|
124
|
-
exports.ThemeMutation = ThemeMutation;
|
|
125
125
|
//# sourceMappingURL=theme-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-mutation.js","sourceRoot":"","sources":["../../../server/service/theme/theme-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,mCAA+B;AAC/B,6CAAmD;AAG5C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGlB,AAAN,KAAK,CAAC,WAAW,CAAe,KAAe,EAAS,OAAwB;QAC9E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,aAAK,CAAC,CAAC,IAAI,iCACpC,KAAK,KACR,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,WAAW,CACJ,EAAU,EACP,KAAiB,EACxB,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,aAAK,CAAC,CAAA;QAC1C,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACrC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACv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} from './theme-type'\n\n@Resolver(Theme)\nexport class ThemeMutation {\n @Directive('@transaction')\n @Mutation(returns => Theme, { description: 'To create new Theme' })\n async createTheme(@Arg('theme') theme: NewTheme, @Ctx() context: ResolverContext): Promise<Theme> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(Theme).save({\n ...theme,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Theme, { description: 'To modify Theme information' })\n async updateTheme(\n @Arg('id') id: string,\n @Arg('patch') patch: ThemePatch,\n @Ctx() context: ResolverContext\n ): Promise<Theme> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Theme)\n const theme = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n return await repository.save({\n ...theme,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Theme], { description: \"To modify multiple Themes' information\" })\n async updateMultipleTheme(\n @Arg('patches', type => [ThemePatch]) patches: ThemePatch[],\n @Ctx() context: ResolverContext\n ): Promise<Theme[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const themeRepo = tx.getRepository(Theme)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await themeRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const theme = await themeRepo.findOneBy({ id: updateRecord.id })\n\n const result = await themeRepo.save({\n ...theme,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete Theme' })\n async deleteTheme(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Theme).delete({ domain: { id: domain.id }, id })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Themes' })\n async deleteThemes(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Theme).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple Themes' })\n async importThemes(\n @Arg('themes', type => [ThemePatch]) themes: ThemePatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n themes.map(async (theme: ThemePatch) => {\n const createdTheme: Theme = await tx.getRepository(Theme).save({ domain, ...theme })\n })\n )\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Domain, ListParam } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { Theme } from './theme';
|
|
4
|
+
import { ThemeList } from './theme-type';
|
|
5
|
+
export declare class ThemeQuery {
|
|
6
|
+
theme(id: string, context: ResolverContext): Promise<Theme>;
|
|
7
|
+
themes(params: ListParam, context: ResolverContext): Promise<ThemeList>;
|
|
8
|
+
domain(theme: Theme): Promise<Domain>;
|
|
9
|
+
updater(theme: Theme): Promise<User>;
|
|
10
|
+
creator(theme: Theme): Promise<User>;
|
|
11
|
+
}
|
|
@@ -35,6 +35,7 @@ let ThemeQuery = class ThemeQuery {
|
|
|
35
35
|
return theme.creatorId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: theme.creatorId }));
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
+
exports.ThemeQuery = ThemeQuery;
|
|
38
39
|
tslib_1.__decorate([
|
|
39
40
|
(0, type_graphql_1.Query)(returns => theme_1.Theme, { nullable: true, description: 'To fetch a Theme' }),
|
|
40
41
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -72,8 +73,7 @@ tslib_1.__decorate([
|
|
|
72
73
|
tslib_1.__metadata("design:paramtypes", [theme_1.Theme]),
|
|
73
74
|
tslib_1.__metadata("design:returntype", Promise)
|
|
74
75
|
], ThemeQuery.prototype, "creator", null);
|
|
75
|
-
ThemeQuery = tslib_1.__decorate([
|
|
76
|
+
exports.ThemeQuery = ThemeQuery = tslib_1.__decorate([
|
|
76
77
|
(0, type_graphql_1.Resolver)(theme_1.Theme)
|
|
77
78
|
], ThemeQuery);
|
|
78
|
-
exports.ThemeQuery = ThemeQuery;
|
|
79
79
|
//# sourceMappingURL=theme-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-query.js","sourceRoot":"","sources":["../../../server/service/theme/theme-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,mCAA+B;AAC/B,6CAAwC;AAGjC,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,aAAK,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,CAAS,MAAiB,EAAS,OAAwB;QACrE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,E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AC,CAAC,CAAA;IAC1F,CAAC;CACF,CAAA;AAxCY,gCAAU;AAEf;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,aAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;IACjE,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uCAMxC;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,sBAAS,EAAE,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IAC3D,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;wCAarC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;wCAEhC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;yCAEjC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;yCAEjC;qBAvCU,UAAU;IADtB,IAAA,uBAAQ,EAAC,aAAK,CAAC;GACH,UAAU,CAwCtB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Theme } from './theme'\nimport { ThemeList } from './theme-type'\n\n@Resolver(Theme)\nexport class ThemeQuery {\n @Query(returns => Theme!, { nullable: true, description: 'To fetch a Theme' })\n async theme(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Theme> {\n const { domain } = context.state\n\n return await getRepository(Theme).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => ThemeList, { description: 'To fetch multiple Themes' })\n async themes(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ThemeList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(Theme),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() theme: Theme): Promise<Domain> {\n return theme.domainId && (await getRepository(Domain).findOneBy({ id: theme.domainId }))\n }\n\n @FieldResolver(type => User)\n async updater(@Root() theme: Theme): Promise<User> {\n return theme.updaterId && (await getRepository(User).findOneBy({ id: theme.updaterId }))\n }\n\n @FieldResolver(type => User)\n async creator(@Root() theme: Theme): Promise<User> {\n return theme.creatorId && (await getRepository(User).findOneBy({ id: theme.creatorId }))\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Theme } from './theme';
|
|
2
|
+
export declare class NewTheme {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
type?: string;
|
|
7
|
+
value?: any;
|
|
8
|
+
}
|
|
9
|
+
export declare class ThemePatch {
|
|
10
|
+
id?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
active?: boolean;
|
|
14
|
+
type?: string;
|
|
15
|
+
value?: any;
|
|
16
|
+
cuFlag?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class ThemeList {
|
|
19
|
+
items: Theme[];
|
|
20
|
+
total: number;
|
|
21
|
+
}
|
|
@@ -7,6 +7,7 @@ const shell_1 = require("@things-factory/shell");
|
|
|
7
7
|
const theme_1 = require("./theme");
|
|
8
8
|
let NewTheme = class NewTheme {
|
|
9
9
|
};
|
|
10
|
+
exports.NewTheme = NewTheme;
|
|
10
11
|
tslib_1.__decorate([
|
|
11
12
|
(0, type_graphql_1.Field)(),
|
|
12
13
|
tslib_1.__metadata("design:type", String)
|
|
@@ -27,12 +28,12 @@ tslib_1.__decorate([
|
|
|
27
28
|
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
28
29
|
tslib_1.__metadata("design:type", Object)
|
|
29
30
|
], NewTheme.prototype, "value", void 0);
|
|
30
|
-
NewTheme = tslib_1.__decorate([
|
|
31
|
+
exports.NewTheme = NewTheme = tslib_1.__decorate([
|
|
31
32
|
(0, type_graphql_1.InputType)()
|
|
32
33
|
], NewTheme);
|
|
33
|
-
exports.NewTheme = NewTheme;
|
|
34
34
|
let ThemePatch = class ThemePatch {
|
|
35
35
|
};
|
|
36
|
+
exports.ThemePatch = ThemePatch;
|
|
36
37
|
tslib_1.__decorate([
|
|
37
38
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
38
39
|
tslib_1.__metadata("design:type", String)
|
|
@@ -61,12 +62,12 @@ tslib_1.__decorate([
|
|
|
61
62
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
62
63
|
tslib_1.__metadata("design:type", String)
|
|
63
64
|
], ThemePatch.prototype, "cuFlag", void 0);
|
|
64
|
-
ThemePatch = tslib_1.__decorate([
|
|
65
|
+
exports.ThemePatch = ThemePatch = tslib_1.__decorate([
|
|
65
66
|
(0, type_graphql_1.InputType)()
|
|
66
67
|
], ThemePatch);
|
|
67
|
-
exports.ThemePatch = ThemePatch;
|
|
68
68
|
let ThemeList = class ThemeList {
|
|
69
69
|
};
|
|
70
|
+
exports.ThemeList = ThemeList;
|
|
70
71
|
tslib_1.__decorate([
|
|
71
72
|
(0, type_graphql_1.Field)(type => [theme_1.Theme]),
|
|
72
73
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -75,8 +76,7 @@ tslib_1.__decorate([
|
|
|
75
76
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
76
77
|
tslib_1.__metadata("design:type", Number)
|
|
77
78
|
], ThemeList.prototype, "total", void 0);
|
|
78
|
-
ThemeList = tslib_1.__decorate([
|
|
79
|
+
exports.ThemeList = ThemeList = tslib_1.__decorate([
|
|
79
80
|
(0, type_graphql_1.ObjectType)()
|
|
80
81
|
], ThemeList);
|
|
81
|
-
exports.ThemeList = ThemeList;
|
|
82
82
|
//# sourceMappingURL=theme-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-type.js","sourceRoot":"","sources":["../../../server/service/theme/theme-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iDAAoD;AACpD,mCAA+B;AAGxB,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAepB,CAAA;
|
|
1
|
+
{"version":3,"file":"theme-type.js","sourceRoot":"","sources":["../../../server/service/theme/theme-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iDAAoD;AACpD,mCAA+B;AAGxB,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAepB,CAAA;AAfY,4BAAQ;AAEnB;IADC,IAAA,oBAAK,GAAE;;sCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACb;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACrC;mBAdA,QAAQ;IADpB,IAAA,wBAAS,GAAE;GACC,QAAQ,CAepB;AAGM,IAAM,UAAU,GAAhB,MAAM,UAAU;CAqBtB,CAAA;AArBY,gCAAU;AAErB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACb;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACrC;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACX;qBApBJ,UAAU;IADtB,IAAA,wBAAS,GAAE;GACC,UAAU,CAqBtB;AAGM,IAAM,SAAS,GAAf,MAAM,SAAS;CAMrB,CAAA;AANY,8BAAS;AAEpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,aAAK,CAAC,CAAC;;wCACT;AAGd;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;wCACN;oBALF,SAAS;IADrB,IAAA,yBAAU,GAAE;GACA,SAAS,CAMrB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\n\nimport { ScalarObject } from '@things-factory/shell'\nimport { Theme } from './theme'\n\n@InputType()\nexport class NewTheme {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n type?: string\n\n @Field(type => ScalarObject, { nullable: true })\n value?: any\n}\n\n@InputType()\nexport class ThemePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n type?: string\n\n @Field(type => ScalarObject, { nullable: true })\n value?: any\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ThemeList {\n @Field(type => [Theme])\n items: Theme[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Domain } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
export interface ThemeType {
|
|
4
|
+
name: string;
|
|
5
|
+
propType: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class Theme {
|
|
8
|
+
static registerThemeType(themeType: ThemeType): void;
|
|
9
|
+
static getThemeType(name: string): ThemeType;
|
|
10
|
+
readonly id: string;
|
|
11
|
+
domain?: Domain;
|
|
12
|
+
domainId?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
active: boolean;
|
|
16
|
+
type?: string;
|
|
17
|
+
value?: any;
|
|
18
|
+
createdAt?: Date;
|
|
19
|
+
updatedAt?: Date;
|
|
20
|
+
deletedAt?: Date;
|
|
21
|
+
creator?: User;
|
|
22
|
+
creatorId?: string;
|
|
23
|
+
updater?: User;
|
|
24
|
+
updaterId?: string;
|
|
25
|
+
}
|
|
@@ -20,6 +20,7 @@ let Theme = class Theme {
|
|
|
20
20
|
return ThemeTypes[name];
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
+
exports.Theme = Theme;
|
|
23
24
|
tslib_1.__decorate([
|
|
24
25
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
25
26
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -92,10 +93,9 @@ tslib_1.__decorate([
|
|
|
92
93
|
(0, typeorm_1.RelationId)((theme) => theme.updater),
|
|
93
94
|
tslib_1.__metadata("design:type", String)
|
|
94
95
|
], Theme.prototype, "updaterId", void 0);
|
|
95
|
-
Theme = tslib_1.__decorate([
|
|
96
|
+
exports.Theme = Theme = tslib_1.__decorate([
|
|
96
97
|
(0, typeorm_1.Entity)(),
|
|
97
98
|
(0, typeorm_1.Index)('ix_theme_0', (theme) => [theme.domain, theme.name, theme.deletedAt], { unique: true }),
|
|
98
99
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Theme' })
|
|
99
100
|
], Theme);
|
|
100
|
-
exports.Theme = Theme;
|
|
101
101
|
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../server/service/theme/theme.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAAoD;AAEpD,iDAA4D;AAC5D,yDAAgD;AAOhD,IAAI,UAAU,GAAkC;IAC9C,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,QAAQ;KACnB;CACF,CAAA;AAKM,IAAM,KAAK,GAAX,MAAM,KAAK;IAChB,MAAM,CAAC,iBAAiB,CAAC,SAAoB;QAC3C,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;IACxC,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,IAAY;QAC9B,OAAO,UAAU,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;CA0DF,CAAA;
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../server/service/theme/theme.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAAoD;AAEpD,iDAA4D;AAC5D,yDAAgD;AAOhD,IAAI,UAAU,GAAkC;IAC9C,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,QAAQ;KACnB;CACF,CAAA;AAKM,IAAM,KAAK,GAAX,MAAM,KAAK;IAChB,MAAM,CAAC,iBAAiB,CAAC,SAAoB;QAC3C,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;IACxC,CA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AE,CAAC;GACnC,KAAK,CAiEjB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\n\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport interface ThemeType {\n name: string\n propType: string\n}\n\nvar ThemeTypes: { [name: string]: ThemeType } = {\n Legend: {\n name: 'Legend',\n propType: 'legend'\n }\n}\n\n@Entity()\n@Index('ix_theme_0', (theme: Theme) => [theme.domain, theme.name, theme.deletedAt], { unique: true })\n@ObjectType({ description: 'Entity for Theme' })\nexport class Theme {\n static registerThemeType(themeType: ThemeType) {\n ThemeTypes[themeType.name] = themeType\n }\n\n static getThemeType(name: string) {\n return ThemeTypes[name]\n }\n\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((theme: Theme) => theme.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n type?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true })\n value?: any\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((theme: Theme) => theme.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((theme: Theme) => theme.updater)\n updaterId?: string\n}\n"]}
|