@things-factory/meta-ui 7.0.0-alpha.27 → 7.0.0-alpha.28

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.
Files changed (86) hide show
  1. package/dist-server/activity/CommonActivity.js +60 -0
  2. package/dist-server/activity/CommonActivity.js.map +1 -0
  3. package/dist-server/constants/error-code.js +6 -0
  4. package/dist-server/constants/error-code.js.map +1 -0
  5. package/dist-server/controllers/index.js +1 -0
  6. package/dist-server/controllers/index.js.map +1 -0
  7. package/dist-server/index.js +6 -0
  8. package/dist-server/index.js.map +1 -0
  9. package/dist-server/routes.js +59 -0
  10. package/dist-server/routes.js.map +1 -0
  11. package/dist-server/service/button-role/button-role-mutation.js +112 -0
  12. package/dist-server/service/button-role/button-role-mutation.js.map +1 -0
  13. package/dist-server/service/button-role/button-role-query.js +79 -0
  14. package/dist-server/service/button-role/button-role-query.js.map +1 -0
  15. package/dist-server/service/button-role/button-role-type.js +57 -0
  16. package/dist-server/service/button-role/button-role-type.js.map +1 -0
  17. package/dist-server/service/button-role/button-role.js +69 -0
  18. package/dist-server/service/button-role/button-role.js.map +1 -0
  19. package/dist-server/service/button-role/index.js +9 -0
  20. package/dist-server/service/button-role/index.js.map +1 -0
  21. package/dist-server/service/dynamic-menu/dynamic-menu-query.js +195 -0
  22. package/dist-server/service/dynamic-menu/dynamic-menu-query.js.map +1 -0
  23. package/dist-server/service/dynamic-menu/dynamic-menu-type.js +110 -0
  24. package/dist-server/service/dynamic-menu/dynamic-menu-type.js.map +1 -0
  25. package/dist-server/service/dynamic-menu/index.js +6 -0
  26. package/dist-server/service/dynamic-menu/index.js.map +1 -0
  27. package/dist-server/service/entity-event-subscriber/entity-event-subscriber.js +71 -0
  28. package/dist-server/service/entity-event-subscriber/entity-event-subscriber.js.map +1 -0
  29. package/dist-server/service/entity-event-subscriber/index.js +6 -0
  30. package/dist-server/service/entity-event-subscriber/index.js.map +1 -0
  31. package/dist-server/service/grid-personalize/grid-personalize-mutation.js +108 -0
  32. package/dist-server/service/grid-personalize/grid-personalize-mutation.js.map +1 -0
  33. package/dist-server/service/grid-personalize/grid-personalize-query.js +108 -0
  34. package/dist-server/service/grid-personalize/grid-personalize-query.js.map +1 -0
  35. package/dist-server/service/grid-personalize/grid-personalize-type.js +66 -0
  36. package/dist-server/service/grid-personalize/grid-personalize-type.js.map +1 -0
  37. package/dist-server/service/grid-personalize/grid-personalize.js +84 -0
  38. package/dist-server/service/grid-personalize/grid-personalize.js.map +1 -0
  39. package/dist-server/service/grid-personalize/index.js +9 -0
  40. package/dist-server/service/grid-personalize/index.js.map +1 -0
  41. package/dist-server/service/index.js +46 -0
  42. package/dist-server/service/index.js.map +1 -0
  43. package/dist-server/service/menu-button-auth/index.js +9 -0
  44. package/dist-server/service/menu-button-auth/index.js.map +1 -0
  45. package/dist-server/service/menu-button-auth/menu-button-auth-mutation.js +127 -0
  46. package/dist-server/service/menu-button-auth/menu-button-auth-mutation.js.map +1 -0
  47. package/dist-server/service/menu-button-auth/menu-button-auth-query.js +167 -0
  48. package/dist-server/service/menu-button-auth/menu-button-auth-query.js.map +1 -0
  49. package/dist-server/service/menu-button-auth/menu-button-auth-type.js +90 -0
  50. package/dist-server/service/menu-button-auth/menu-button-auth-type.js.map +1 -0
  51. package/dist-server/service/menu-button-auth/menu-button-auth.js +101 -0
  52. package/dist-server/service/menu-button-auth/menu-button-auth.js.map +1 -0
  53. package/dist-server/service/meta-activity/index.js +7 -0
  54. package/dist-server/service/meta-activity/index.js.map +1 -0
  55. package/dist-server/service/meta-activity/meta-activity-mutation.js +181 -0
  56. package/dist-server/service/meta-activity/meta-activity-mutation.js.map +1 -0
  57. package/dist-server/service/meta-activity/meta-activity-query.js +67 -0
  58. package/dist-server/service/meta-activity/meta-activity-query.js.map +1 -0
  59. package/dist-server/service/meta-activity/meta-activity-type.js +80 -0
  60. package/dist-server/service/meta-activity/meta-activity-type.js.map +1 -0
  61. package/dist-server/service/set-translations/index.js +6 -0
  62. package/dist-server/service/set-translations/index.js.map +1 -0
  63. package/dist-server/service/set-translations/set-translation-resolver.js +67 -0
  64. package/dist-server/service/set-translations/set-translation-resolver.js.map +1 -0
  65. package/dist-server/service/work-code/index.js +9 -0
  66. package/dist-server/service/work-code/index.js.map +1 -0
  67. package/dist-server/service/work-code/work-code-mutation.js +136 -0
  68. package/dist-server/service/work-code/work-code-mutation.js.map +1 -0
  69. package/dist-server/service/work-code/work-code-query.js +106 -0
  70. package/dist-server/service/work-code/work-code-query.js.map +1 -0
  71. package/dist-server/service/work-code/work-code-type.js +89 -0
  72. package/dist-server/service/work-code/work-code-type.js.map +1 -0
  73. package/dist-server/service/work-code/work-code.js +94 -0
  74. package/dist-server/service/work-code/work-code.js.map +1 -0
  75. package/dist-server/service/work-code-detail/index.js +9 -0
  76. package/dist-server/service/work-code-detail/index.js.map +1 -0
  77. package/dist-server/service/work-code-detail/work-code-detail-mutation.js +138 -0
  78. package/dist-server/service/work-code-detail/work-code-detail-mutation.js.map +1 -0
  79. package/dist-server/service/work-code-detail/work-code-detail-query.js +89 -0
  80. package/dist-server/service/work-code-detail/work-code-detail-query.js.map +1 -0
  81. package/dist-server/service/work-code-detail/work-code-detail-type.js +74 -0
  82. package/dist-server/service/work-code-detail/work-code-detail-type.js.map +1 -0
  83. package/dist-server/service/work-code-detail/work-code-detail.js +89 -0
  84. package/dist-server/service/work-code-detail/work-code-detail.js.map +1 -0
  85. package/dist-server/tsconfig.tsbuildinfo +1 -0
  86. package/package.json +3 -3
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.callback = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const worklist_1 = require("@things-factory/worklist");
6
+ const integration_base_1 = require("@things-factory/integration-base");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
9
+ async function callback(activityInstance, addendum, context) {
10
+ const { domain } = context.state;
11
+ const { causedBy } = addendum || {};
12
+ let instanceName = '';
13
+ let scenarioName = `${activityInstance.activity.name}-activity-callback`;
14
+ if (await existsScenario(domain, scenarioName) == false) {
15
+ return;
16
+ }
17
+ let variables = {
18
+ activityInstance,
19
+ causedBy,
20
+ post: worklist_1.post
21
+ };
22
+ await runScenario(context, instanceName, scenarioName, variables);
23
+ }
24
+ exports.callback = callback;
25
+ async function existsScenario(domain, scenarioName) {
26
+ var repository = (0, shell_1.getRepository)(integration_base_1.Scenario);
27
+ var scenario = await repository.findOne({
28
+ where: { domain: { id: domain.id }, name: scenarioName },
29
+ relations: ['domain', 'steps', 'creator', 'updater']
30
+ });
31
+ if (!scenario) {
32
+ return false;
33
+ }
34
+ return true;
35
+ }
36
+ async function runScenario(context, instanceName, scenarioName, variables) {
37
+ // await ScenarioInstanceMutation.runScenario(instanceName,scenarioName,variables,context);
38
+ var client = shell_1.GraphqlLocalClient.client;
39
+ await client.mutate({
40
+ mutation: (0, graphql_tag_1.default) `
41
+ mutation($instanceName: String, $scenarioName: String!, $variables: Object) {
42
+ runScenario(instanceName: $instanceName, scenarioName: $scenarioName, variables: $variables) {
43
+ instanceName
44
+ scenarioName
45
+ state
46
+ result
47
+ message
48
+ timestamp
49
+ }
50
+ }
51
+ `,
52
+ variables: {
53
+ instanceName,
54
+ scenarioName,
55
+ variables
56
+ },
57
+ context
58
+ });
59
+ }
60
+ //# sourceMappingURL=CommonActivity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommonActivity.js","sourceRoot":"","sources":["../../server/activity/CommonActivity.ts"],"names":[],"mappings":";;;;AAAA,uDAAwI;AACxI,uEAA2D;AAC3D,iDAAyE;AAEzE,sEAA6B;AAGtB,KAAK,UAAU,QAAQ,CAAC,gBAAkC,EAAE,QAA6C,EAAE,OAAwB;IACxI,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAChC,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,IAAI,EAAE,CAAA;I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UpdateActivityInstanceStateAddendum } from '@things-factory/worklist'\nimport { Scenario } from '@things-factory/integration-base'\nimport { getRepository, GraphqlLocalClient } from '@things-factory/shell'\n\nimport gql from 'graphql-tag'\n\n\nexport async function callback(activityInstance: ActivityInstance, addendum: UpdateActivityInstanceStateAddendum, context: ResolverContext) {\n const { domain } = context.state\n const { causedBy } = addendum || {}\n\n let instanceName = '';\n let scenarioName = `${activityInstance.activity.name}-activity-callback`;\n\n if(await existsScenario(domain, scenarioName) == false){\n return;\n }\n\n let variables = {\n activityInstance,\n causedBy,\n post\n };\n\n await runScenario(context, instanceName, scenarioName, variables);\n}\n\nasync function existsScenario(domain: any, scenarioName: String): Promise<Boolean>{\n var repository = getRepository(Scenario)\n var scenario = await repository.findOne({\n where: { domain: { id: domain.id }, name: scenarioName },\n relations: ['domain', 'steps', 'creator', 'updater']\n })\n\n if (!scenario) {\n return false;\n }\n return true;\n}\n\nasync function runScenario(context: any, instanceName: String, scenarioName: String, variables: any): Promise<void>{\n // await ScenarioInstanceMutation.runScenario(instanceName,scenarioName,variables,context);\n var client = GraphqlLocalClient.client\n\n await client.mutate({\n mutation: gql`\n mutation($instanceName: String, $scenarioName: String!, $variables: Object) {\n runScenario(instanceName: $instanceName, scenarioName: $scenarioName, variables: $variables) {\n instanceName\n scenarioName\n state\n result\n message\n timestamp\n }\n }\n `,\n variables: {\n instanceName,\n scenarioName,\n variables\n },\n context\n })\n}"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OVER_LIMIT = exports.INVALID_LICENSE = void 0;
4
+ exports.INVALID_LICENSE = 'error.invalid license key';
5
+ exports.OVER_LIMIT = 'error.page count over license limit';
6
+ //# sourceMappingURL=error-code.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-code.js","sourceRoot":"","sources":["../../server/constants/error-code.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,2BAA2B,CAAA;AAC7C,QAAA,UAAU,GAAG,qCAAqC,CAAA","sourcesContent":["export const INVALID_LICENSE = 'error.invalid license key'\nexport const OVER_LIMIT = 'error.page count over license limit'\n"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ require("./routes");
5
+ tslib_1.__exportStar(require("./service"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,oBAAiB;AAEjB,oDAAyB","sourcesContent":["import './routes'\n\nexport * from './service'\n"]}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const worklist_1 = require("@things-factory/worklist");
4
+ const shell_1 = require("@things-factory/shell");
5
+ const CommonActivity_1 = require("./activity/CommonActivity");
6
+ const path = require('path');
7
+ const { appRootPath } = require('@things-factory/env');
8
+ const debug = require('debug')('things-factory:meta-ui:routes');
9
+ const AppPackage = require(path.resolve(appRootPath, 'package.json'));
10
+ process.on('bootstrap-module-global-public-route', async (app, globalPublicRouter) => {
11
+ /*
12
+ * can add global public routes to application (auth not required, tenancy not required)
13
+ *
14
+ * ex) routes.get('/path', async(context, next) => {})
15
+ * ex) routes.post('/path', async(context, next) => {})
16
+ */
17
+ const releaseActivityTemplates = await (0, shell_1.getRepository)(worklist_1.Activity).find({
18
+ where: { state: worklist_1.ActivityStatus.released }
19
+ });
20
+ (releaseActivityTemplates || []).forEach(activity => {
21
+ if (activity.model && activity.model.some(x => x.name == 'relation-menu')) {
22
+ worklist_1.ActivityInstallations.installActivityTemplate({
23
+ name: `${activity.name}`,
24
+ release: AppPackage.version,
25
+ description: activity.description,
26
+ provider: AppPackage.provider,
27
+ category: activity.category,
28
+ activityType: activity.activityType,
29
+ priority: activity.priority,
30
+ searchKeys: [],
31
+ startable: true,
32
+ startingType: activity.startingType,
33
+ model: activity.model,
34
+ uiType: activity.uiType,
35
+ uiSource: activity.uiSource,
36
+ viewType: activity.viewType,
37
+ viewSource: activity.viewSource,
38
+ activity: activity,
39
+ callback: CommonActivity_1.callback
40
+ });
41
+ }
42
+ });
43
+ });
44
+ process.on('bootstrap-module-global-private-route', (app, globalPrivateRouter) => {
45
+ /*
46
+ * can add global private routes to application (auth required, tenancy not required)
47
+ */
48
+ });
49
+ process.on('bootstrap-module-domain-public-route', (app, domainPublicRouter) => {
50
+ /*
51
+ * can add domain public routes to application (auth not required, tenancy required)
52
+ */
53
+ });
54
+ process.on('bootstrap-module-domain-private-route', (app, domainPrivateRouter) => {
55
+ /*
56
+ * can add domain private routes to application (auth required, tenancy required)
57
+ */
58
+ });
59
+ //# sourceMappingURL=routes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;AAAA,uDAA0F;AAC1F,iDAAqD;AACrD,8DAAoD;AACpD,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAA;AACtD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,+BAA+B,CAAC,CAAA;AAC/D,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC;AAGtE,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,KAAK,EAAC,GAAO,EAAE,kBAAkB,EAAE,EAAE;IAC7F;;;;;OAKG;IAED,MAAM,wBAAwB,GAAa,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,IAAI,CAAC;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E,EAAE;IACpF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA","sourcesContent":["import { ActivityInstallations, Activity, ActivityStatus } from '@things-factory/worklist'\nimport { getRepository } from '@things-factory/shell'\nimport { callback } from './activity/CommonActivity'\nconst path = require('path')\nconst { appRootPath } = require('@things-factory/env')\nconst debug = require('debug')('things-factory:meta-ui:routes')\nconst AppPackage = require(path.resolve(appRootPath, 'package.json'));\n\n\nprocess.on('bootstrap-module-global-public-route' as any, async(app:any, globalPublicRouter) => {\n /*\n * can add global public routes to application (auth not required, tenancy not required)\n *\n * ex) routes.get('/path', async(context, next) => {})\n * ex) routes.post('/path', async(context, next) => {})\n */\n\n const releaseActivityTemplates: Activity = await getRepository(Activity).find({\n where:{state:ActivityStatus.released}\n });\n\n (releaseActivityTemplates||[]).forEach(activity => {\n\n if(activity.model && activity.model.some(x => x.name == 'relation-menu')){\n ActivityInstallations.installActivityTemplate({\n name: `${activity.name}`,\n release: AppPackage.version,\n description: activity.description,\n provider: AppPackage.provider,\n category: activity.category,\n activityType: activity.activityType,\n priority: activity.priority,\n searchKeys: [],\n startable: true,\n startingType: activity.startingType,\n model: activity.model,\n uiType: activity.uiType,\n uiSource: activity.uiSource,\n viewType: activity.viewType,\n viewSource: activity.viewSource,\n activity:activity,\n callback\n })\n }\n });\n})\n\nprocess.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {\n /*\n * can add global private routes to application (auth required, tenancy not required)\n */\n})\n\nprocess.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {\n /*\n * can add domain public routes to application (auth not required, tenancy required)\n */\n})\n\nprocess.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {\n /*\n * can add domain private routes to application (auth required, tenancy required)\n */\n})"]}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ButtonRoleMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const button_role_1 = require("./button-role");
7
+ const button_role_type_1 = require("./button-role-type");
8
+ let ButtonRoleMutation = class ButtonRoleMutation {
9
+ async createButtonRole(buttonRole, context) {
10
+ const { domain, user, tx } = context.state;
11
+ return await tx.getRepository(button_role_1.ButtonRole).save(Object.assign(Object.assign({}, buttonRole), { domain, creator: user, updater: user }));
12
+ }
13
+ async updateButtonRole(id, patch, context) {
14
+ const { domain, user, tx } = context.state;
15
+ const repository = tx.getRepository(button_role_1.ButtonRole);
16
+ const buttonRole = await repository.findOne({
17
+ where: { domain: { id: domain.id }, id },
18
+ relations: ['domain', 'updater', 'creator']
19
+ });
20
+ return await repository.save(Object.assign(Object.assign(Object.assign({}, buttonRole), patch), { updater: user }));
21
+ }
22
+ async updateMultipleButtonRole(patches, context) {
23
+ const { domain, user, tx } = context.state;
24
+ let results = [];
25
+ const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
26
+ const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
27
+ const buttonRoleRepo = tx.getRepository(button_role_1.ButtonRole);
28
+ if (_createRecords.length > 0) {
29
+ for (let i = 0; i < _createRecords.length; i++) {
30
+ const newRecord = _createRecords[i];
31
+ const result = await buttonRoleRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
32
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
33
+ }
34
+ }
35
+ if (_updateRecords.length > 0) {
36
+ for (let i = 0; i < _updateRecords.length; i++) {
37
+ const updRecord = _updateRecords[i];
38
+ const buttonRole = await buttonRoleRepo.findOne({
39
+ where: { domain: { id: domain.id }, id: updRecord.id },
40
+ relations: ['domain', 'updater', 'creator']
41
+ });
42
+ const result = await buttonRoleRepo.save(Object.assign(Object.assign(Object.assign({}, buttonRole), updRecord), { updater: user }));
43
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
44
+ }
45
+ }
46
+ return results;
47
+ }
48
+ async deleteButtonRole(id, context) {
49
+ const { domain, tx, user } = context.state;
50
+ await tx.getRepository(button_role_1.ButtonRole).remove({ domain, id, updater: user });
51
+ return true;
52
+ }
53
+ async deleteButtonRoles(ids, context) {
54
+ const { domain, tx, user } = context.state;
55
+ let delEntitis = ids.map(id => {
56
+ return { domain, id, updater: user };
57
+ });
58
+ await tx.getRepository(button_role_1.ButtonRole).remove(delEntitis);
59
+ return true;
60
+ }
61
+ };
62
+ tslib_1.__decorate([
63
+ (0, type_graphql_1.Directive)('@transaction'),
64
+ (0, type_graphql_1.Mutation)(returns => button_role_1.ButtonRole, { description: 'To create new ButtonRole' }),
65
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('buttonRole')),
66
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
67
+ tslib_1.__metadata("design:type", Function),
68
+ tslib_1.__metadata("design:paramtypes", [button_role_type_1.NewButtonRole, Object]),
69
+ tslib_1.__metadata("design:returntype", Promise)
70
+ ], ButtonRoleMutation.prototype, "createButtonRole", null);
71
+ tslib_1.__decorate([
72
+ (0, type_graphql_1.Directive)('@transaction'),
73
+ (0, type_graphql_1.Mutation)(returns => button_role_1.ButtonRole, { description: 'To modify ButtonRole information' }),
74
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
75
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
76
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
77
+ tslib_1.__metadata("design:type", Function),
78
+ tslib_1.__metadata("design:paramtypes", [String, button_role_type_1.ButtonRolePatch, Object]),
79
+ tslib_1.__metadata("design:returntype", Promise)
80
+ ], ButtonRoleMutation.prototype, "updateButtonRole", null);
81
+ tslib_1.__decorate([
82
+ (0, type_graphql_1.Directive)('@transaction'),
83
+ (0, type_graphql_1.Mutation)(returns => [button_role_1.ButtonRole], { description: "To modify multiple buttonRoles' information" }),
84
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [button_role_type_1.ButtonRolePatch])),
85
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
86
+ tslib_1.__metadata("design:type", Function),
87
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
88
+ tslib_1.__metadata("design:returntype", Promise)
89
+ ], ButtonRoleMutation.prototype, "updateMultipleButtonRole", null);
90
+ tslib_1.__decorate([
91
+ (0, type_graphql_1.Directive)('@transaction'),
92
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete ButtonRole' }),
93
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
94
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
95
+ tslib_1.__metadata("design:type", Function),
96
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
97
+ tslib_1.__metadata("design:returntype", Promise)
98
+ ], ButtonRoleMutation.prototype, "deleteButtonRole", null);
99
+ tslib_1.__decorate([
100
+ (0, type_graphql_1.Directive)('@transaction'),
101
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple ButtonRoles' }),
102
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
103
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
104
+ tslib_1.__metadata("design:type", Function),
105
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
106
+ tslib_1.__metadata("design:returntype", Promise)
107
+ ], ButtonRoleMutation.prototype, "deleteButtonRoles", null);
108
+ ButtonRoleMutation = tslib_1.__decorate([
109
+ (0, type_graphql_1.Resolver)(button_role_1.ButtonRole)
110
+ ], ButtonRoleMutation);
111
+ exports.ButtonRoleMutation = ButtonRoleMutation;
112
+ //# sourceMappingURL=button-role-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-role-mutation.js","sourceRoot":"","sources":["../../../server/service/button-role/button-role-mutation.ts"],"names":[],"mappings":";;;;AACA,+CAAsE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role'\nimport { NewButtonRole, ButtonRolePatch } from './button-role-type'\nimport { Domain, getRepository } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n@Resolver(ButtonRole)\nexport class ButtonRoleMutation {\n @Directive('@transaction')\n @Mutation(returns => ButtonRole, { description: 'To create new ButtonRole' })\n async createButtonRole(@Arg('buttonRole') buttonRole: NewButtonRole, @Ctx() context: any): Promise<ButtonRole> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(ButtonRole).save({\n ...buttonRole,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => ButtonRole, { description: 'To modify ButtonRole information' })\n async updateButtonRole(\n @Arg('id') id: string,\n @Arg('patch') patch: ButtonRolePatch,\n @Ctx() context: any\n ): Promise<ButtonRole> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(ButtonRole)\n const buttonRole = await repository.findOne(\n {\n where: { domain: { id: domain.id }, id },\n relations: ['domain','updater','creator']\n }\n )\n\n return await repository.save({\n ...buttonRole,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [ButtonRole], { description: \"To modify multiple buttonRoles' information\" })\n async updateMultipleButtonRole(\n @Arg('patches', type => [ButtonRolePatch]) patches: ButtonRolePatch[],\n @Ctx() context: any\n ): Promise<ButtonRole[]> {\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 buttonRoleRepo = tx.getRepository(ButtonRole)\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 buttonRoleRepo.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 updRecord = _updateRecords[i]\n const buttonRole = await buttonRoleRepo.findOne({\n where: { domain: { id: domain.id }, id:updRecord.id },\n relations: ['domain','updater','creator']\n })\n \n const result = await buttonRoleRepo.save({\n ...buttonRole,\n ...updRecord,\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 ButtonRole' })\n async deleteButtonRole(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx, user } = context.state\n await tx.getRepository(ButtonRole).remove({ domain, id, updater:user })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple ButtonRoles' })\n async deleteButtonRoles(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: any\n ): Promise<boolean> {\n const { domain, tx, user } = context.state\n\n let delEntitis = ids.map(id=>{\n return {domain,id,updater:user}\n })\n\n await tx.getRepository(ButtonRole).remove(delEntitis)\n\n return true\n }\n}\n"]}
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ButtonRoleQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const shell_1 = require("@things-factory/shell");
7
+ const auth_base_1 = require("@things-factory/auth-base");
8
+ const button_role_1 = require("./button-role");
9
+ const button_role_type_1 = require("./button-role-type");
10
+ let ButtonRoleQuery = class ButtonRoleQuery {
11
+ async buttonRole(id, context) {
12
+ const { domain } = context.state;
13
+ return await (0, shell_1.getRepository)(button_role_1.ButtonRole).findOne({
14
+ where: { domain, id }
15
+ });
16
+ }
17
+ async buttonRoles(params, context) {
18
+ const { domain } = context.state;
19
+ const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
20
+ domain,
21
+ params,
22
+ repository: await (0, shell_1.getRepository)(button_role_1.ButtonRole),
23
+ searchables: ['name', 'description']
24
+ });
25
+ const [items, total] = await queryBuilder.getManyAndCount();
26
+ return { items, total };
27
+ }
28
+ async domain(buttonRole) {
29
+ return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: buttonRole.domainId });
30
+ }
31
+ async updater(buttonRole) {
32
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: buttonRole.updaterId });
33
+ }
34
+ async creator(buttonRole) {
35
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: buttonRole.creatorId });
36
+ }
37
+ };
38
+ tslib_1.__decorate([
39
+ (0, type_graphql_1.Query)(returns => button_role_1.ButtonRole, { description: 'To fetch a ButtonRole' }),
40
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
41
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
42
+ tslib_1.__metadata("design:type", Function),
43
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
44
+ tslib_1.__metadata("design:returntype", Promise)
45
+ ], ButtonRoleQuery.prototype, "buttonRole", null);
46
+ tslib_1.__decorate([
47
+ (0, type_graphql_1.Query)(returns => button_role_type_1.ButtonRoleList, { description: 'To fetch a multiple ButtonRole' }),
48
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
49
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
50
+ tslib_1.__metadata("design:type", Function),
51
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
52
+ tslib_1.__metadata("design:returntype", Promise)
53
+ ], ButtonRoleQuery.prototype, "buttonRoles", null);
54
+ tslib_1.__decorate([
55
+ (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
56
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
57
+ tslib_1.__metadata("design:type", Function),
58
+ tslib_1.__metadata("design:paramtypes", [button_role_1.ButtonRole]),
59
+ tslib_1.__metadata("design:returntype", Promise)
60
+ ], ButtonRoleQuery.prototype, "domain", null);
61
+ tslib_1.__decorate([
62
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
63
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
64
+ tslib_1.__metadata("design:type", Function),
65
+ tslib_1.__metadata("design:paramtypes", [button_role_1.ButtonRole]),
66
+ tslib_1.__metadata("design:returntype", Promise)
67
+ ], ButtonRoleQuery.prototype, "updater", null);
68
+ tslib_1.__decorate([
69
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
70
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
71
+ tslib_1.__metadata("design:type", Function),
72
+ tslib_1.__metadata("design:paramtypes", [button_role_1.ButtonRole]),
73
+ tslib_1.__metadata("design:returntype", Promise)
74
+ ], ButtonRoleQuery.prototype, "creator", null);
75
+ ButtonRoleQuery = tslib_1.__decorate([
76
+ (0, type_graphql_1.Resolver)(button_role_1.ButtonRole)
77
+ ], ButtonRoleQuery);
78
+ exports.ButtonRoleQuery = ButtonRoleQuery;
79
+ //# sourceMappingURL=button-role-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-role-query.js","sourceRoot":"","sources":["../../../server/service/button-role/button-role-query.ts"],"names":[],"mappings":";;;;AACA,+CAA8F;AAC9F,iDAA0H;AAC1H,yDAAgD;AAChD,+CAA0C;AAC1C,yDAAmD;AAG5C,IAAM,eAAe,GAArB,MAAM,eAAe;IAEpB,AAAN,KAAK,CAAC,UAAU,CAAY,EAAU,EAAS,OAAY;QACzD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,OAAO,MAAM,IAAA,qBAAa,EAAC,wBAAU,CAAC,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,WAAW,CAAS,MAAiB,EAAS,OAAY;QAC9D,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,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EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;6CAE1C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AAtCU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,wBAAU,CAAC;GACR,eAAe,CAuC3B;AAvCY,0CAAe","sourcesContent":["\nimport { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, ListParam, convertListParams, getRepository, getQueryBuilderFromListParams } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ButtonRole } from './button-role'\nimport { ButtonRoleList } from './button-role-type'\n\n@Resolver(ButtonRole)\nexport class ButtonRoleQuery {\n @Query(returns => ButtonRole, { description: 'To fetch a ButtonRole' })\n async buttonRole(@Arg('id') id: string, @Ctx() context: any): Promise<ButtonRole> {\n const { domain } = context.state\n return await getRepository(ButtonRole).findOne({\n where: { domain, id }\n })\n }\n\n @Query(returns => ButtonRoleList, { description: 'To fetch a multiple ButtonRole' })\n async buttonRoles(@Args() params: ListParam, @Ctx() context: any): Promise<ButtonRoleList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(ButtonRole),\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() buttonRole: ButtonRole): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: buttonRole.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() buttonRole: ButtonRole): Promise<User> {\n return await getRepository(User).findOneBy({ id: buttonRole.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() buttonRole: ButtonRole): Promise<User> {\n return await getRepository(User).findOneBy({ id: buttonRole.creatorId })\n }\n}\n"]}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ButtonRoleList = exports.ButtonRolePatch = exports.NewButtonRole = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const button_role_1 = require("./button-role");
7
+ let NewButtonRole = class NewButtonRole {
8
+ };
9
+ tslib_1.__decorate([
10
+ (0, type_graphql_1.Field)({ nullable: false }),
11
+ tslib_1.__metadata("design:type", String)
12
+ ], NewButtonRole.prototype, "name", void 0);
13
+ tslib_1.__decorate([
14
+ (0, type_graphql_1.Field)({ nullable: true }),
15
+ tslib_1.__metadata("design:type", String)
16
+ ], NewButtonRole.prototype, "description", void 0);
17
+ NewButtonRole = tslib_1.__decorate([
18
+ (0, type_graphql_1.InputType)()
19
+ ], NewButtonRole);
20
+ exports.NewButtonRole = NewButtonRole;
21
+ let ButtonRolePatch = class ButtonRolePatch {
22
+ };
23
+ tslib_1.__decorate([
24
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
25
+ tslib_1.__metadata("design:type", String)
26
+ ], ButtonRolePatch.prototype, "id", void 0);
27
+ tslib_1.__decorate([
28
+ (0, type_graphql_1.Field)({ nullable: true }),
29
+ tslib_1.__metadata("design:type", String)
30
+ ], ButtonRolePatch.prototype, "name", void 0);
31
+ tslib_1.__decorate([
32
+ (0, type_graphql_1.Field)({ nullable: true }),
33
+ tslib_1.__metadata("design:type", String)
34
+ ], ButtonRolePatch.prototype, "description", void 0);
35
+ tslib_1.__decorate([
36
+ (0, type_graphql_1.Field)(),
37
+ tslib_1.__metadata("design:type", String)
38
+ ], ButtonRolePatch.prototype, "cuFlag", void 0);
39
+ ButtonRolePatch = tslib_1.__decorate([
40
+ (0, type_graphql_1.InputType)()
41
+ ], ButtonRolePatch);
42
+ exports.ButtonRolePatch = ButtonRolePatch;
43
+ let ButtonRoleList = class ButtonRoleList {
44
+ };
45
+ tslib_1.__decorate([
46
+ (0, type_graphql_1.Field)(type => [button_role_1.ButtonRole]),
47
+ tslib_1.__metadata("design:type", Array)
48
+ ], ButtonRoleList.prototype, "items", void 0);
49
+ tslib_1.__decorate([
50
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
51
+ tslib_1.__metadata("design:type", Number)
52
+ ], ButtonRoleList.prototype, "total", void 0);
53
+ ButtonRoleList = tslib_1.__decorate([
54
+ (0, type_graphql_1.ObjectType)()
55
+ ], ButtonRoleList);
56
+ exports.ButtonRoleList = ButtonRoleList;
57
+ //# sourceMappingURL=button-role-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-role-type.js","sourceRoot":"","sources":["../../../server/service/button-role/button-role-type.ts"],"names":[],"mappings":";;;;AACA,+CAA6F;AAG7F,+CAA0C;AAGnC,IAAM,aAAa,GAAnB,MAAM,aAAa;CAOzB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;2CACf;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AANT,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CAOzB;AAPY,sCAAa;AAUnB,IAAM,eAAe,GAArB,MAAM,eAAe;CAY3B,CAAA;AAXC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACN;AAEpB;IAAC,IAAA,oBAAK,GAAE;;+CACM;AAXH,eAAe;IAD3B,IAAA,wBAAS,GAAE;GACC,eAAe,CAY3B;AAZY,0CAAe;AAerB,IAAM,cAAc,GAApB,MAAM,cAAc;CAM1B,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,wBAAU,CAAC,CAAC;;6CACT;AAEnB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;6CACN;AALF,cAAc;IAD1B,IAAA,yBAAU,GAAE;GACA,cAAc,CAM1B;AANY,wCAAc","sourcesContent":["\nimport { ObjectType, Field, InputType, Int, ID, Float, registerEnumType } from 'type-graphql'\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { ButtonRole } from './button-role'\n\n@InputType()\nexport class NewButtonRole {\n\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: true })\n description?: string\n}\n\n@InputType()\nexport class ButtonRolePatch {\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()\n cuFlag: string\n}\n\n@ObjectType()\nexport class ButtonRoleList {\n @Field(type => [ButtonRole])\n items: ButtonRole[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ButtonRole = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const type_graphql_1 = require("type-graphql");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const auth_base_1 = require("@things-factory/auth-base");
9
+ let ButtonRole = class ButtonRole {
10
+ };
11
+ tslib_1.__decorate([
12
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
13
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
14
+ tslib_1.__metadata("design:type", String)
15
+ ], ButtonRole.prototype, "id", void 0);
16
+ tslib_1.__decorate([
17
+ (0, typeorm_1.Column)({ name: 'name', type: 'character varying', length: 100, nullable: false }),
18
+ (0, type_graphql_1.Field)({ nullable: false }),
19
+ tslib_1.__metadata("design:type", String)
20
+ ], ButtonRole.prototype, "name", void 0);
21
+ tslib_1.__decorate([
22
+ (0, typeorm_1.Column)({ name: 'description', type: 'character varying', length: 255, nullable: true }),
23
+ (0, type_graphql_1.Field)({ nullable: true }),
24
+ tslib_1.__metadata("design:type", String)
25
+ ], ButtonRole.prototype, "description", void 0);
26
+ tslib_1.__decorate([
27
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
28
+ (0, type_graphql_1.Field)({ nullable: false }),
29
+ tslib_1.__metadata("design:type", shell_1.Domain)
30
+ ], ButtonRole.prototype, "domain", void 0);
31
+ tslib_1.__decorate([
32
+ (0, typeorm_1.RelationId)((buttonRole) => buttonRole.domain),
33
+ tslib_1.__metadata("design:type", String)
34
+ ], ButtonRole.prototype, "domainId", void 0);
35
+ tslib_1.__decorate([
36
+ (0, typeorm_1.CreateDateColumn)(),
37
+ (0, type_graphql_1.Field)({ nullable: true }),
38
+ tslib_1.__metadata("design:type", Date)
39
+ ], ButtonRole.prototype, "createdAt", void 0);
40
+ tslib_1.__decorate([
41
+ (0, typeorm_1.UpdateDateColumn)(),
42
+ (0, type_graphql_1.Field)({ nullable: true }),
43
+ tslib_1.__metadata("design:type", Date)
44
+ ], ButtonRole.prototype, "updatedAt", void 0);
45
+ tslib_1.__decorate([
46
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { createForeignKeyConstraints: false, nullable: true }),
47
+ (0, type_graphql_1.Field)({ nullable: true }),
48
+ tslib_1.__metadata("design:type", auth_base_1.User)
49
+ ], ButtonRole.prototype, "creator", void 0);
50
+ tslib_1.__decorate([
51
+ (0, typeorm_1.RelationId)((buttonRole) => buttonRole.creator),
52
+ tslib_1.__metadata("design:type", String)
53
+ ], ButtonRole.prototype, "creatorId", void 0);
54
+ tslib_1.__decorate([
55
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { createForeignKeyConstraints: false, nullable: true }),
56
+ (0, type_graphql_1.Field)({ nullable: true }),
57
+ tslib_1.__metadata("design:type", auth_base_1.User)
58
+ ], ButtonRole.prototype, "updater", void 0);
59
+ tslib_1.__decorate([
60
+ (0, typeorm_1.RelationId)((buttonRole) => buttonRole.updater),
61
+ tslib_1.__metadata("design:type", String)
62
+ ], ButtonRole.prototype, "updaterId", void 0);
63
+ ButtonRole = tslib_1.__decorate([
64
+ (0, typeorm_1.Entity)('button_roles'),
65
+ (0, typeorm_1.Index)('ix_button_role_0', (buttonRole) => [buttonRole.domain, buttonRole.name], { unique: true }),
66
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for ButtonRole' })
67
+ ], ButtonRole);
68
+ exports.ButtonRole = ButtonRole;
69
+ //# sourceMappingURL=button-role.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-role.js","sourceRoot":"","sources":["../../../server/service/button-role/button-role.ts"],"names":[],"mappings":";;;;AACA,qCAUgB;AAChB,+CAAkF;AAElF,iDAA8C;AAC9C,yDAAgD;AAKzC,IAAM,UAAU,GAAhB,MAAM,UAAU;CAyCtB,CAAA;AAxCC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;sCACC;AAEnB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACjF,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;wCACf;AAEZ;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvF,IAAA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K,EAAC,kBAAkB,EAAE,CAAC,UAAsB,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC9G,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;GACxC,UAAU,CAyCtB;AAzCY,gCAAU","sourcesContent":["\nimport {\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, Float, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n@Entity('button_roles')\n@Index('ix_button_role_0', (buttonRole: ButtonRole) => [buttonRole.domain, buttonRole.name ], { unique: true })\n@ObjectType({ description: 'Entity for ButtonRole' })\nexport class ButtonRole {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ name: 'name', type: 'character varying', length: 100, nullable: false })\n @Field({ nullable: false })\n name: string\n\n @Column({ name: 'description', type: 'character varying', length: 255, nullable: true })\n @Field({ nullable: true })\n description: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: false })\n domain: Domain\n\n @RelationId((buttonRole: ButtonRole) => buttonRole.domain)\n domainId: string\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, { createForeignKeyConstraints: false, nullable: true })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((buttonRole: ButtonRole) => buttonRole.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { createForeignKeyConstraints: false, nullable: true })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((buttonRole: ButtonRole) => buttonRole.updater)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const button_role_1 = require("./button-role");
5
+ const button_role_query_1 = require("./button-role-query");
6
+ const button_role_mutation_1 = require("./button-role-mutation");
7
+ exports.entities = [button_role_1.ButtonRole];
8
+ exports.resolvers = [button_role_query_1.ButtonRoleQuery, button_role_mutation_1.ButtonRoleMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/button-role/index.ts"],"names":[],"mappings":";;;AACA,+CAA0C;AAC1C,2DAAqD;AACrD,iEAA2D;AAE9C,QAAA,QAAQ,GAAG,CAAC,wBAAU,CAAC,CAAA;AACvB,QAAA,SAAS,GAAG,CAAC,mCAAe,EAAE,yCAAkB,CAAC,CAAA","sourcesContent":["\nimport { ButtonRole } from './button-role'\nimport { ButtonRoleQuery } from './button-role-query'\nimport { ButtonRoleMutation } from './button-role-mutation'\n\nexport const entities = [ButtonRole]\nexport const resolvers = [ButtonRoleQuery, ButtonRoleMutation]\n"]}