@things-factory/resource-base 4.3.671 → 4.3.673

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist-server/index.js +19 -0
  2. package/dist-server/index.js.map +1 -0
  3. package/dist-server/migrations/index.js +12 -0
  4. package/dist-server/migrations/index.js.map +1 -0
  5. package/dist-server/service/entity/entity-mutation.js +81 -0
  6. package/dist-server/service/entity/entity-mutation.js.map +1 -0
  7. package/dist-server/service/entity/entity-query.js +129 -0
  8. package/dist-server/service/entity/entity-query.js.map +1 -0
  9. package/dist-server/service/entity/entity-type.js +193 -0
  10. package/dist-server/service/entity/entity-type.js.map +1 -0
  11. package/dist-server/service/entity/entity.js +203 -0
  12. package/dist-server/service/entity/entity.js.map +1 -0
  13. package/dist-server/service/entity/index.js +9 -0
  14. package/dist-server/service/entity/index.js.map +1 -0
  15. package/dist-server/service/entity-column/entity-column-mutation.js +76 -0
  16. package/dist-server/service/entity-column/entity-column-mutation.js.map +1 -0
  17. package/dist-server/service/entity-column/entity-column-query.js +98 -0
  18. package/dist-server/service/entity-column/entity-column-query.js.map +1 -0
  19. package/dist-server/service/entity-column/entity-column-type.js +313 -0
  20. package/dist-server/service/entity-column/entity-column-type.js.map +1 -0
  21. package/dist-server/service/entity-column/entity-column.js +316 -0
  22. package/dist-server/service/entity-column/entity-column.js.map +1 -0
  23. package/dist-server/service/entity-column/index.js +9 -0
  24. package/dist-server/service/entity-column/index.js.map +1 -0
  25. package/dist-server/service/entity-metadata/entity-metadata-query.js +36 -0
  26. package/dist-server/service/entity-metadata/entity-metadata-query.js.map +1 -0
  27. package/dist-server/service/entity-metadata/entity-metadata.js +125 -0
  28. package/dist-server/service/entity-metadata/entity-metadata.js.map +1 -0
  29. package/dist-server/service/entity-metadata/index.js +8 -0
  30. package/dist-server/service/entity-metadata/index.js.map +1 -0
  31. package/dist-server/service/index.js +39 -0
  32. package/dist-server/service/index.js.map +1 -0
  33. package/package.json +3 -3
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./service"), exports);
18
+ __exportStar(require("./migrations"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,+CAA4B"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrations = void 0;
4
+ const glob = require('glob');
5
+ const path = require('path');
6
+ exports.migrations = [];
7
+ glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function (file) {
8
+ if (file.indexOf('index.js') !== -1)
9
+ return;
10
+ exports.migrations = exports.migrations.concat(Object.values(require(path.resolve(file))) || []);
11
+ });
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.EntityMutation = void 0;
16
+ const type_graphql_1 = require("type-graphql");
17
+ const entity_1 = require("./entity");
18
+ const entity_type_1 = require("./entity-type");
19
+ let EntityMutation = class EntityMutation {
20
+ async createEntity(entity, context) {
21
+ const { domain, user, tx } = context.state;
22
+ const repository = tx.getRepository(entity_1.Entity);
23
+ if (entity.master) {
24
+ entity.master = await repository.findOne({ where: { id: entity.master } });
25
+ }
26
+ return await repository.save(Object.assign(Object.assign({}, entity), { domain, creator: user, updater: user }));
27
+ }
28
+ async updateEntity(name, patch, context) {
29
+ const { domain, user, tx } = context.state;
30
+ const repository = tx.getRepository(entity_1.Entity);
31
+ const entity = repository.findOne({
32
+ where: { domain: context.state.domain, name },
33
+ relations: ['master', 'children']
34
+ });
35
+ if (patch.master) {
36
+ patch.master = await repository.findOne({ where: { domain: context.state.domain, id: patch.master } });
37
+ }
38
+ if (patch.children && patch.children.length) {
39
+ patch.children = await repository.findByIds(patch.children);
40
+ }
41
+ return await repository.save(Object.assign(Object.assign(Object.assign({}, entity), patch), { updater: context.state.user }));
42
+ }
43
+ async deleteEntity(name, context) {
44
+ const { domain, tx } = context.state;
45
+ await tx.getRepository(entity_1.Entity).delete({ domain, name });
46
+ return true;
47
+ }
48
+ };
49
+ __decorate([
50
+ (0, type_graphql_1.Directive)('@transaction'),
51
+ (0, type_graphql_1.Mutation)(returns => entity_1.Entity, { description: 'To create new Entity' }),
52
+ __param(0, (0, type_graphql_1.Arg)('entity')),
53
+ __param(1, (0, type_graphql_1.Ctx)()),
54
+ __metadata("design:type", Function),
55
+ __metadata("design:paramtypes", [entity_type_1.NewEntity, Object]),
56
+ __metadata("design:returntype", Promise)
57
+ ], EntityMutation.prototype, "createEntity", null);
58
+ __decorate([
59
+ (0, type_graphql_1.Directive)('@transaction'),
60
+ (0, type_graphql_1.Mutation)(returns => entity_1.Entity, { description: "To modify Entity' information" }),
61
+ __param(0, (0, type_graphql_1.Arg)('name', type => String)),
62
+ __param(1, (0, type_graphql_1.Arg)('patch', type => entity_type_1.EntityPatch)),
63
+ __param(2, (0, type_graphql_1.Ctx)()),
64
+ __metadata("design:type", Function),
65
+ __metadata("design:paramtypes", [String, entity_type_1.EntityPatch, Object]),
66
+ __metadata("design:returntype", Promise)
67
+ ], EntityMutation.prototype, "updateEntity", null);
68
+ __decorate([
69
+ (0, type_graphql_1.Directive)('@transaction'),
70
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete Entity' }),
71
+ __param(0, (0, type_graphql_1.Arg)('name')),
72
+ __param(1, (0, type_graphql_1.Ctx)()),
73
+ __metadata("design:type", Function),
74
+ __metadata("design:paramtypes", [String, Object]),
75
+ __metadata("design:returntype", Promise)
76
+ ], EntityMutation.prototype, "deleteEntity", null);
77
+ EntityMutation = __decorate([
78
+ (0, type_graphql_1.Resolver)(entity_1.Entity)
79
+ ], EntityMutation);
80
+ exports.EntityMutation = EntityMutation;
81
+ //# sourceMappingURL=entity-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-mutation.js","sourceRoot":"","sources":["../../../server/service/entity/entity-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AAEtE,qCAAiC;AACjC,+CAAsD;AAG/C,IAAM,cAAc,GAApB,MAAM,cAAc;IAGnB,AAAN,KAAK,CAAC,YAAY,CAAgB,MAAiB,EAAS,OAAY;QACtE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,eAAM,CAAC,CAAA;QAE3C,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,MAAM,CAAC,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;SAC3E;QAED,OAAO,MAAM,UAAU,CAAC,IAAI,iCACvB,MAAM,KACT,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,YAAY,CACa,IAAY,EACN,KAAkB,EAC9C,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG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G,EAAC,QAAQ,CAAC,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;qCAAjB,uBAAS;;kDAelD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,eAAM,EAAE,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;IAE3E,WAAA,IAAA,kBAAG,EAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;IAC3B,WAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,yBAAW,CAAC,CAAA;IACjC,WAAA,IAAA,kBAAG,GAAE,CAAA;;6CADoC,yBAAW;;kDAwBtD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAC9C,WAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IAAgB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;kDAMnD;AA1DU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,eAAM,CAAC;GACJ,cAAc,CA2D1B;AA3DY,wCAAc"}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var _a;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.EntityQuery = void 0;
17
+ const type_graphql_1 = require("type-graphql");
18
+ const typeorm_1 = require("typeorm");
19
+ const auth_base_1 = require("@things-factory/auth-base");
20
+ const shell_1 = require("@things-factory/shell");
21
+ const entity_column_1 = require("../entity-column/entity-column");
22
+ const entity_1 = require("./entity");
23
+ const entity_type_1 = require("./entity-type");
24
+ let EntityQuery = class EntityQuery {
25
+ async entity(name, context) {
26
+ const { domain } = context.state;
27
+ return await (0, typeorm_1.getRepository)(entity_1.Entity).findOne({
28
+ where: { domain, name }
29
+ });
30
+ }
31
+ async entities(params, context) {
32
+ const { domain } = context.state;
33
+ const convertedParams = (0, shell_1.convertListParams)(params, domain.id);
34
+ const [items, total] = await (0, typeorm_1.getRepository)(entity_1.Entity).findAndCount(convertedParams);
35
+ return { items, total };
36
+ }
37
+ async master(entity) {
38
+ return await (0, typeorm_1.getRepository)(entity_1.Entity).findOne(entity.masterId);
39
+ }
40
+ async children(entity) {
41
+ return await (0, typeorm_1.getRepository)(entity_1.Entity).find({
42
+ where: {
43
+ master: entity
44
+ }
45
+ });
46
+ }
47
+ async columns(entity) {
48
+ return await (0, typeorm_1.getRepository)(entity_column_1.EntityColumn).find({
49
+ where: {
50
+ entity
51
+ },
52
+ order: {
53
+ rank: 'ASC'
54
+ }
55
+ });
56
+ }
57
+ async domain(entity) {
58
+ return await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(entity.domainId);
59
+ }
60
+ async updater(entity) {
61
+ return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(entity.updaterId);
62
+ }
63
+ async creator(entity) {
64
+ return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(entity.creatorId);
65
+ }
66
+ };
67
+ __decorate([
68
+ (0, type_graphql_1.Query)(returns => entity_1.Entity, { description: 'To fetch a Entity' }),
69
+ __param(0, (0, type_graphql_1.Arg)('name')),
70
+ __param(1, (0, type_graphql_1.Ctx)()),
71
+ __metadata("design:type", Function),
72
+ __metadata("design:paramtypes", [String, Object]),
73
+ __metadata("design:returntype", Promise)
74
+ ], EntityQuery.prototype, "entity", null);
75
+ __decorate([
76
+ (0, type_graphql_1.Query)(returns => entity_type_1.EntityList, { description: 'To fetch multiple Entities' }),
77
+ __param(0, (0, type_graphql_1.Args)()),
78
+ __param(1, (0, type_graphql_1.Ctx)()),
79
+ __metadata("design:type", Function),
80
+ __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
81
+ __metadata("design:returntype", Promise)
82
+ ], EntityQuery.prototype, "entities", null);
83
+ __decorate([
84
+ (0, type_graphql_1.FieldResolver)(type => entity_1.Entity),
85
+ __param(0, (0, type_graphql_1.Root)()),
86
+ __metadata("design:type", Function),
87
+ __metadata("design:paramtypes", [entity_1.Entity]),
88
+ __metadata("design:returntype", Promise)
89
+ ], EntityQuery.prototype, "master", null);
90
+ __decorate([
91
+ (0, type_graphql_1.FieldResolver)(type => [entity_1.Entity]),
92
+ __param(0, (0, type_graphql_1.Root)()),
93
+ __metadata("design:type", Function),
94
+ __metadata("design:paramtypes", [entity_1.Entity]),
95
+ __metadata("design:returntype", Promise)
96
+ ], EntityQuery.prototype, "children", null);
97
+ __decorate([
98
+ (0, type_graphql_1.FieldResolver)(type => [entity_column_1.EntityColumn]),
99
+ __param(0, (0, type_graphql_1.Root)()),
100
+ __metadata("design:type", Function),
101
+ __metadata("design:paramtypes", [entity_1.Entity]),
102
+ __metadata("design:returntype", Promise)
103
+ ], EntityQuery.prototype, "columns", null);
104
+ __decorate([
105
+ (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
106
+ __param(0, (0, type_graphql_1.Root)()),
107
+ __metadata("design:type", Function),
108
+ __metadata("design:paramtypes", [entity_1.Entity]),
109
+ __metadata("design:returntype", Promise)
110
+ ], EntityQuery.prototype, "domain", null);
111
+ __decorate([
112
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
113
+ __param(0, (0, type_graphql_1.Root)()),
114
+ __metadata("design:type", Function),
115
+ __metadata("design:paramtypes", [entity_1.Entity]),
116
+ __metadata("design:returntype", Promise)
117
+ ], EntityQuery.prototype, "updater", null);
118
+ __decorate([
119
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
120
+ __param(0, (0, type_graphql_1.Root)()),
121
+ __metadata("design:type", Function),
122
+ __metadata("design:paramtypes", [entity_1.Entity]),
123
+ __metadata("design:returntype", Promise)
124
+ ], EntityQuery.prototype, "creator", null);
125
+ EntityQuery = __decorate([
126
+ (0, type_graphql_1.Resolver)(entity_1.Entity)
127
+ ], EntityQuery);
128
+ exports.EntityQuery = EntityQuery;
129
+ //# sourceMappingURL=entity-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-query.js","sourceRoot":"","sources":["../../../server/service/entity/entity-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAA4E;AAE5E,kEAA6D;AAC7D,qCAAiC;AACjC,+CAA0C;AAGnC,IAAM,WAAW,GAAjB,MAAM,WAAW;IAEhB,AAAN,KAAK,CAAC,MAAM,CAAc,IAAY,EAAS,OAAY;QACzD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,eAAM,CAAC,CAAC,OAAO,CAAC;YACzC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;SACxB,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,QAAQ,CAAS,MAAiB,EAAS,OAAY;QAC3D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,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AA,mBAAI,GAAE,CAAA;;qCAAS,eAAM;;0CAEnC;AA3DU,WAAW;IADvB,IAAA,uBAAQ,EAAC,eAAM,CAAC;GACJ,WAAW,CA4DvB;AA5DY,kCAAW"}
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.EntityList = exports.EntityPatch = exports.NewEntity = void 0;
13
+ const type_graphql_1 = require("type-graphql");
14
+ const entity_1 = require("./entity");
15
+ let NewEntity = class NewEntity {
16
+ };
17
+ __decorate([
18
+ (0, type_graphql_1.Field)(),
19
+ __metadata("design:type", String)
20
+ ], NewEntity.prototype, "name", void 0);
21
+ __decorate([
22
+ (0, type_graphql_1.Field)({ nullable: true }),
23
+ __metadata("design:type", String)
24
+ ], NewEntity.prototype, "description", void 0);
25
+ __decorate([
26
+ (0, type_graphql_1.Field)(),
27
+ __metadata("design:type", String)
28
+ ], NewEntity.prototype, "bundle", void 0);
29
+ __decorate([
30
+ (0, type_graphql_1.Field)(),
31
+ __metadata("design:type", String)
32
+ ], NewEntity.prototype, "tableName", void 0);
33
+ __decorate([
34
+ (0, type_graphql_1.Field)({ nullable: true }),
35
+ __metadata("design:type", String)
36
+ ], NewEntity.prototype, "searchUrl", void 0);
37
+ __decorate([
38
+ (0, type_graphql_1.Field)({ nullable: true }),
39
+ __metadata("design:type", String)
40
+ ], NewEntity.prototype, "multiSaveUrl", void 0);
41
+ __decorate([
42
+ (0, type_graphql_1.Field)({ nullable: true }),
43
+ __metadata("design:type", String)
44
+ ], NewEntity.prototype, "idType", void 0);
45
+ __decorate([
46
+ (0, type_graphql_1.Field)({ nullable: true }),
47
+ __metadata("design:type", String)
48
+ ], NewEntity.prototype, "idField", void 0);
49
+ __decorate([
50
+ (0, type_graphql_1.Field)({ nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], NewEntity.prototype, "titleField", void 0);
53
+ __decorate([
54
+ (0, type_graphql_1.Field)({ nullable: true }),
55
+ __metadata("design:type", String)
56
+ ], NewEntity.prototype, "master", void 0);
57
+ __decorate([
58
+ (0, type_graphql_1.Field)({ nullable: true }),
59
+ __metadata("design:type", String)
60
+ ], NewEntity.prototype, "association", void 0);
61
+ __decorate([
62
+ (0, type_graphql_1.Field)({ nullable: true }),
63
+ __metadata("design:type", String)
64
+ ], NewEntity.prototype, "dataProp", void 0);
65
+ __decorate([
66
+ (0, type_graphql_1.Field)({ nullable: true }),
67
+ __metadata("design:type", String)
68
+ ], NewEntity.prototype, "refField", void 0);
69
+ __decorate([
70
+ (0, type_graphql_1.Field)({ nullable: true }),
71
+ __metadata("design:type", String)
72
+ ], NewEntity.prototype, "delStrategy", void 0);
73
+ __decorate([
74
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
75
+ __metadata("design:type", Number)
76
+ ], NewEntity.prototype, "fixedColumns", void 0);
77
+ __decorate([
78
+ (0, type_graphql_1.Field)({ nullable: true }),
79
+ __metadata("design:type", Boolean)
80
+ ], NewEntity.prototype, "active", void 0);
81
+ __decorate([
82
+ (0, type_graphql_1.Field)({ nullable: true }),
83
+ __metadata("design:type", Boolean)
84
+ ], NewEntity.prototype, "extEntity", void 0);
85
+ __decorate([
86
+ (0, type_graphql_1.Field)(type => [String], { nullable: true }),
87
+ __metadata("design:type", Array)
88
+ ], NewEntity.prototype, "columns", void 0);
89
+ NewEntity = __decorate([
90
+ (0, type_graphql_1.InputType)()
91
+ ], NewEntity);
92
+ exports.NewEntity = NewEntity;
93
+ let EntityPatch = class EntityPatch {
94
+ };
95
+ __decorate([
96
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
97
+ __metadata("design:type", String)
98
+ ], EntityPatch.prototype, "id", void 0);
99
+ __decorate([
100
+ (0, type_graphql_1.Field)({ nullable: true }),
101
+ __metadata("design:type", String)
102
+ ], EntityPatch.prototype, "name", void 0);
103
+ __decorate([
104
+ (0, type_graphql_1.Field)({ nullable: true }),
105
+ __metadata("design:type", String)
106
+ ], EntityPatch.prototype, "description", void 0);
107
+ __decorate([
108
+ (0, type_graphql_1.Field)({ nullable: true }),
109
+ __metadata("design:type", String)
110
+ ], EntityPatch.prototype, "bundle", void 0);
111
+ __decorate([
112
+ (0, type_graphql_1.Field)({ nullable: true }),
113
+ __metadata("design:type", String)
114
+ ], EntityPatch.prototype, "tableName", void 0);
115
+ __decorate([
116
+ (0, type_graphql_1.Field)({ nullable: true }),
117
+ __metadata("design:type", String)
118
+ ], EntityPatch.prototype, "searchUrl", void 0);
119
+ __decorate([
120
+ (0, type_graphql_1.Field)({ nullable: true }),
121
+ __metadata("design:type", String)
122
+ ], EntityPatch.prototype, "multiSaveUrl", void 0);
123
+ __decorate([
124
+ (0, type_graphql_1.Field)({ nullable: true }),
125
+ __metadata("design:type", String)
126
+ ], EntityPatch.prototype, "idType", void 0);
127
+ __decorate([
128
+ (0, type_graphql_1.Field)({ nullable: true }),
129
+ __metadata("design:type", String)
130
+ ], EntityPatch.prototype, "idField", void 0);
131
+ __decorate([
132
+ (0, type_graphql_1.Field)({ nullable: true }),
133
+ __metadata("design:type", String)
134
+ ], EntityPatch.prototype, "titleField", void 0);
135
+ __decorate([
136
+ (0, type_graphql_1.Field)({ nullable: true }),
137
+ __metadata("design:type", String)
138
+ ], EntityPatch.prototype, "master", void 0);
139
+ __decorate([
140
+ (0, type_graphql_1.Field)({ nullable: true }),
141
+ __metadata("design:type", String)
142
+ ], EntityPatch.prototype, "association", void 0);
143
+ __decorate([
144
+ (0, type_graphql_1.Field)({ nullable: true }),
145
+ __metadata("design:type", String)
146
+ ], EntityPatch.prototype, "dataProp", void 0);
147
+ __decorate([
148
+ (0, type_graphql_1.Field)({ nullable: true }),
149
+ __metadata("design:type", String)
150
+ ], EntityPatch.prototype, "refField", void 0);
151
+ __decorate([
152
+ (0, type_graphql_1.Field)({ nullable: true }),
153
+ __metadata("design:type", String)
154
+ ], EntityPatch.prototype, "delStrategy", void 0);
155
+ __decorate([
156
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
157
+ __metadata("design:type", Number)
158
+ ], EntityPatch.prototype, "fixedColumns", void 0);
159
+ __decorate([
160
+ (0, type_graphql_1.Field)({ nullable: true }),
161
+ __metadata("design:type", Boolean)
162
+ ], EntityPatch.prototype, "active", void 0);
163
+ __decorate([
164
+ (0, type_graphql_1.Field)({ nullable: true }),
165
+ __metadata("design:type", Boolean)
166
+ ], EntityPatch.prototype, "extEntity", void 0);
167
+ __decorate([
168
+ (0, type_graphql_1.Field)(type => [String], { nullable: true }),
169
+ __metadata("design:type", Array)
170
+ ], EntityPatch.prototype, "columns", void 0);
171
+ __decorate([
172
+ (0, type_graphql_1.Field)(type => [String], { nullable: true }),
173
+ __metadata("design:type", Array)
174
+ ], EntityPatch.prototype, "children", void 0);
175
+ EntityPatch = __decorate([
176
+ (0, type_graphql_1.InputType)()
177
+ ], EntityPatch);
178
+ exports.EntityPatch = EntityPatch;
179
+ let EntityList = class EntityList {
180
+ };
181
+ __decorate([
182
+ (0, type_graphql_1.Field)(type => [entity_1.Entity]),
183
+ __metadata("design:type", Array)
184
+ ], EntityList.prototype, "items", void 0);
185
+ __decorate([
186
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
187
+ __metadata("design:type", Number)
188
+ ], EntityList.prototype, "total", void 0);
189
+ EntityList = __decorate([
190
+ (0, type_graphql_1.ObjectType)()
191
+ ], EntityList);
192
+ exports.EntityList = EntityList;
193
+ //# sourceMappingURL=entity-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-type.js","sourceRoot":"","sources":["../../../server/service/entity/entity-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoE;AAEpE,qCAAiC;AAG1B,IAAM,SAAS,GAAf,MAAM,SAAS;CAsDrB,CAAA;AArDC;IAAC,IAAA,oBAAK,GAAE;;uCACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACN;AAEpB;IAAC,IAAA,oBAAK,GAAE;;yCACM;AAEd;IAAC,IAAA,oBAAK,GAAE;;4CACS;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACR;AAElB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACL;AAErB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACX;AAEf;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACV;AAEhB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACP;AAEnB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACX;AAEf;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACT;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACT;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,E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AC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;yCACN;AALF,UAAU;IADtB,IAAA,yBAAU,GAAE;GACA,UAAU,CAMtB;AANY,gCAAU"}
@@ -0,0 +1,203 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var Entity_1;
12
+ var _a, _b, _c;
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Entity = void 0;
15
+ const type_graphql_1 = require("type-graphql");
16
+ const typeorm_1 = require("typeorm");
17
+ const auth_base_1 = require("@things-factory/auth-base");
18
+ const shell_1 = require("@things-factory/shell");
19
+ const entity_column_1 = require("../entity-column/entity-column");
20
+ let Entity = Entity_1 = class Entity {
21
+ };
22
+ __decorate([
23
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
24
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
25
+ __metadata("design:type", String)
26
+ ], Entity.prototype, "id", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
29
+ (0, type_graphql_1.Field)({ nullable: true }),
30
+ __metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
31
+ ], Entity.prototype, "domain", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.RelationId)((entity) => entity.domain),
34
+ __metadata("design:type", String)
35
+ ], Entity.prototype, "domainId", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)(),
38
+ (0, type_graphql_1.Field)(),
39
+ __metadata("design:type", String)
40
+ ], Entity.prototype, "name", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({
43
+ nullable: true
44
+ }),
45
+ (0, type_graphql_1.Field)({ nullable: true }),
46
+ __metadata("design:type", String)
47
+ ], Entity.prototype, "description", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)(),
50
+ (0, type_graphql_1.Field)(),
51
+ __metadata("design:type", String)
52
+ ], Entity.prototype, "bundle", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)(),
55
+ (0, type_graphql_1.Field)(),
56
+ __metadata("design:type", String)
57
+ ], Entity.prototype, "tableName", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.Column)({
60
+ nullable: true
61
+ }),
62
+ (0, type_graphql_1.Field)({ nullable: true }),
63
+ __metadata("design:type", String)
64
+ ], Entity.prototype, "searchUrl", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({
67
+ nullable: true
68
+ }),
69
+ (0, type_graphql_1.Field)({ nullable: true }),
70
+ __metadata("design:type", String)
71
+ ], Entity.prototype, "multiSaveUrl", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({
74
+ nullable: true
75
+ }),
76
+ (0, type_graphql_1.Field)({ nullable: true }),
77
+ __metadata("design:type", String)
78
+ ], Entity.prototype, "idType", void 0);
79
+ __decorate([
80
+ (0, typeorm_1.Column)({
81
+ nullable: true
82
+ }),
83
+ (0, type_graphql_1.Field)({ nullable: true }),
84
+ __metadata("design:type", String)
85
+ ], Entity.prototype, "idField", void 0);
86
+ __decorate([
87
+ (0, typeorm_1.Column)({
88
+ nullable: true
89
+ }),
90
+ (0, type_graphql_1.Field)({ nullable: true }),
91
+ __metadata("design:type", String)
92
+ ], Entity.prototype, "titleField", void 0);
93
+ __decorate([
94
+ (0, typeorm_1.ManyToOne)(type => Entity_1, master => master.children),
95
+ (0, type_graphql_1.Field)(type => Entity_1, { nullable: true }),
96
+ __metadata("design:type", Entity)
97
+ ], Entity.prototype, "master", void 0);
98
+ __decorate([
99
+ (0, typeorm_1.RelationId)((entity) => entity.master),
100
+ __metadata("design:type", String)
101
+ ], Entity.prototype, "masterId", void 0);
102
+ __decorate([
103
+ (0, typeorm_1.OneToMany)(type => Entity_1, child => child.master),
104
+ (0, type_graphql_1.Field)(type => [Entity_1], { nullable: true }),
105
+ __metadata("design:type", Array)
106
+ ], Entity.prototype, "children", void 0);
107
+ __decorate([
108
+ (0, typeorm_1.Column)({
109
+ nullable: true
110
+ }),
111
+ (0, type_graphql_1.Field)({ nullable: true }),
112
+ __metadata("design:type", String)
113
+ ], Entity.prototype, "association", void 0);
114
+ __decorate([
115
+ (0, typeorm_1.Column)({
116
+ nullable: true
117
+ }),
118
+ (0, type_graphql_1.Field)({ nullable: true }),
119
+ __metadata("design:type", String)
120
+ ], Entity.prototype, "dataProp", void 0);
121
+ __decorate([
122
+ (0, typeorm_1.Column)({
123
+ nullable: true
124
+ }),
125
+ (0, type_graphql_1.Field)({ nullable: true }),
126
+ __metadata("design:type", String)
127
+ ], Entity.prototype, "refField", void 0);
128
+ __decorate([
129
+ (0, typeorm_1.Column)({
130
+ nullable: true
131
+ }),
132
+ (0, type_graphql_1.Field)({ nullable: true }),
133
+ __metadata("design:type", String)
134
+ ], Entity.prototype, "delStrategy", void 0);
135
+ __decorate([
136
+ (0, typeorm_1.Column)('int', {
137
+ nullable: true
138
+ }),
139
+ (0, type_graphql_1.Field)({ nullable: true }),
140
+ __metadata("design:type", Number)
141
+ ], Entity.prototype, "fixedColumns", void 0);
142
+ __decorate([
143
+ (0, typeorm_1.Column)({
144
+ nullable: true,
145
+ default: true
146
+ }),
147
+ (0, type_graphql_1.Field)({ nullable: true }),
148
+ __metadata("design:type", Boolean)
149
+ ], Entity.prototype, "active", void 0);
150
+ __decorate([
151
+ (0, typeorm_1.Column)({
152
+ nullable: true
153
+ }),
154
+ (0, type_graphql_1.Field)({ nullable: true }),
155
+ __metadata("design:type", Boolean)
156
+ ], Entity.prototype, "extEntity", void 0);
157
+ __decorate([
158
+ (0, typeorm_1.OneToMany)(type => entity_column_1.EntityColumn, entityColumn => entityColumn.entity),
159
+ (0, type_graphql_1.Field)(type => [entity_column_1.EntityColumn], { nullable: true }),
160
+ __metadata("design:type", Array)
161
+ ], Entity.prototype, "columns", void 0);
162
+ __decorate([
163
+ (0, typeorm_1.CreateDateColumn)(),
164
+ (0, type_graphql_1.Field)({ nullable: true }),
165
+ __metadata("design:type", Date)
166
+ ], Entity.prototype, "createdAt", void 0);
167
+ __decorate([
168
+ (0, typeorm_1.UpdateDateColumn)(),
169
+ (0, type_graphql_1.Field)({ nullable: true }),
170
+ __metadata("design:type", Date)
171
+ ], Entity.prototype, "updatedAt", void 0);
172
+ __decorate([
173
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
174
+ nullable: true
175
+ }),
176
+ (0, type_graphql_1.Field)({ nullable: true }),
177
+ __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
178
+ ], Entity.prototype, "creator", void 0);
179
+ __decorate([
180
+ (0, typeorm_1.RelationId)((entity) => entity.creator),
181
+ __metadata("design:type", String)
182
+ ], Entity.prototype, "creatorId", void 0);
183
+ __decorate([
184
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
185
+ nullable: true
186
+ }),
187
+ (0, type_graphql_1.Field)({ nullable: true }),
188
+ __metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
189
+ ], Entity.prototype, "updater", void 0);
190
+ __decorate([
191
+ (0, typeorm_1.RelationId)((entity) => entity.creator),
192
+ __metadata("design:type", String)
193
+ ], Entity.prototype, "updaterId", void 0);
194
+ Entity = Entity_1 = __decorate([
195
+ (0, typeorm_1.Entity)(),
196
+ (0, typeorm_1.Index)('ix_entity_0', (entity) => [entity.domain, entity.name], { unique: true }),
197
+ (0, typeorm_1.Index)('ix_entity_1', (entity) => [entity.domain]),
198
+ (0, typeorm_1.Index)('ix_entity_2', (entity) => [entity.bundle]),
199
+ (0, typeorm_1.Index)('ix_entity_3', (entity) => [entity.domain, entity.master]),
200
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for Entity' })
201
+ ], Entity);
202
+ exports.Entity = Entity;
203
+ //# sourceMappingURL=entity.js.map