@things-factory/routing-base 5.0.2 → 5.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/index.js +4 -17
- package/dist-server/index.js.map +1 -1
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/routes.js +0 -1
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/index.js +13 -26
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/operation/index.js +3 -16
- package/dist-server/service/operation/index.js.map +1 -1
- package/dist-server/service/operation/operation-mutation.js +33 -44
- package/dist-server/service/operation/operation-mutation.js.map +1 -1
- package/dist-server/service/operation/operation-query.js +34 -45
- package/dist-server/service/operation/operation-query.js.map +1 -1
- package/dist-server/service/operation/operation-type.js +41 -52
- package/dist-server/service/operation/operation-type.js.map +1 -1
- package/dist-server/service/operation/operation.js +34 -42
- package/dist-server/service/operation/operation.js.map +1 -1
- package/dist-server/service/routing/index.js +3 -16
- package/dist-server/service/routing/index.js.map +1 -1
- package/dist-server/service/routing/routing-mutation.js +33 -44
- package/dist-server/service/routing/routing-mutation.js.map +1 -1
- package/dist-server/service/routing/routing-query.js +29 -40
- package/dist-server/service/routing/routing-query.js.map +1 -1
- package/dist-server/service/routing/routing-type.js +28 -36
- package/dist-server/service/routing/routing-type.js.map +1 -1
- package/dist-server/service/routing/routing.js +28 -36
- package/dist-server/service/routing/routing.js.map +1 -1
- package/dist-server/service/routing-item/index.js +3 -16
- package/dist-server/service/routing-item/index.js.map +1 -1
- package/dist-server/service/routing-item/routing-item-mutation.js +33 -44
- package/dist-server/service/routing-item/routing-item-mutation.js.map +1 -1
- package/dist-server/service/routing-item/routing-item-query.js +34 -45
- package/dist-server/service/routing-item/routing-item-query.js.map +1 -1
- package/dist-server/service/routing-item/routing-item-type.js +40 -48
- package/dist-server/service/routing-item/routing-item-type.js.map +1 -1
- package/dist-server/service/routing-item/routing-item.js +38 -46
- package/dist-server/service/routing-item/routing-item.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +5 -5
- package/server/routes.ts +0 -2
- package/server/service/routing-item/routing-item-query.ts +3 -3
|
@@ -1,16 +1,8 @@
|
|
|
1
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
2
|
var _a, _b, _c;
|
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
4
|
exports.Routing = exports.RoutingStatus = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
14
6
|
const typeorm_1 = require("typeorm");
|
|
15
7
|
const type_graphql_1 = require("type-graphql");
|
|
16
8
|
const shell_1 = require("@things-factory/shell");
|
|
@@ -26,79 +18,79 @@ var RoutingStatus;
|
|
|
26
18
|
});
|
|
27
19
|
let Routing = class Routing {
|
|
28
20
|
};
|
|
29
|
-
__decorate([
|
|
21
|
+
tslib_1.__decorate([
|
|
30
22
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
31
23
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: false }),
|
|
32
|
-
__metadata("design:type", String)
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
33
25
|
], Routing.prototype, "id", void 0);
|
|
34
|
-
__decorate([
|
|
26
|
+
tslib_1.__decorate([
|
|
35
27
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain, { nullable: false }),
|
|
36
28
|
(0, type_graphql_1.Field)({ nullable: false }),
|
|
37
|
-
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
29
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
38
30
|
], Routing.prototype, "domain", void 0);
|
|
39
|
-
__decorate([
|
|
31
|
+
tslib_1.__decorate([
|
|
40
32
|
(0, typeorm_1.RelationId)((routing) => routing.domain),
|
|
41
|
-
__metadata("design:type", String)
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
42
34
|
], Routing.prototype, "domainId", void 0);
|
|
43
|
-
__decorate([
|
|
35
|
+
tslib_1.__decorate([
|
|
44
36
|
(0, typeorm_1.Column)({ nullable: false }),
|
|
45
37
|
(0, type_graphql_1.Field)({ nullable: false }),
|
|
46
|
-
__metadata("design:type", String)
|
|
38
|
+
tslib_1.__metadata("design:type", String)
|
|
47
39
|
], Routing.prototype, "name", void 0);
|
|
48
|
-
__decorate([
|
|
40
|
+
tslib_1.__decorate([
|
|
49
41
|
(0, typeorm_1.Column)({
|
|
50
42
|
nullable: true
|
|
51
43
|
}),
|
|
52
44
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
53
|
-
__metadata("design:type", String)
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
54
46
|
], Routing.prototype, "description", void 0);
|
|
55
|
-
__decorate([
|
|
47
|
+
tslib_1.__decorate([
|
|
56
48
|
(0, typeorm_1.Column)({
|
|
57
49
|
nullable: true
|
|
58
50
|
}),
|
|
59
51
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
60
|
-
__metadata("design:type", Boolean)
|
|
52
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
61
53
|
], Routing.prototype, "createdLot", void 0);
|
|
62
|
-
__decorate([
|
|
54
|
+
tslib_1.__decorate([
|
|
63
55
|
(0, typeorm_1.Column)({
|
|
64
56
|
nullable: true
|
|
65
57
|
}),
|
|
66
58
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
67
|
-
__metadata("design:type", Boolean)
|
|
59
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
68
60
|
], Routing.prototype, "active", void 0);
|
|
69
|
-
__decorate([
|
|
61
|
+
tslib_1.__decorate([
|
|
70
62
|
(0, typeorm_1.CreateDateColumn)(),
|
|
71
63
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
72
|
-
__metadata("design:type", Date)
|
|
64
|
+
tslib_1.__metadata("design:type", Date)
|
|
73
65
|
], Routing.prototype, "createdAt", void 0);
|
|
74
|
-
__decorate([
|
|
66
|
+
tslib_1.__decorate([
|
|
75
67
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
76
68
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
77
|
-
__metadata("design:type", Date)
|
|
69
|
+
tslib_1.__metadata("design:type", Date)
|
|
78
70
|
], Routing.prototype, "updatedAt", void 0);
|
|
79
|
-
__decorate([
|
|
71
|
+
tslib_1.__decorate([
|
|
80
72
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
81
73
|
nullable: true
|
|
82
74
|
}),
|
|
83
75
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
84
|
-
__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
|
|
76
|
+
tslib_1.__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
|
|
85
77
|
], Routing.prototype, "creator", void 0);
|
|
86
|
-
__decorate([
|
|
78
|
+
tslib_1.__decorate([
|
|
87
79
|
(0, typeorm_1.RelationId)((routing) => routing.creator),
|
|
88
|
-
__metadata("design:type", String)
|
|
80
|
+
tslib_1.__metadata("design:type", String)
|
|
89
81
|
], Routing.prototype, "creatorId", void 0);
|
|
90
|
-
__decorate([
|
|
82
|
+
tslib_1.__decorate([
|
|
91
83
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
92
84
|
nullable: true
|
|
93
85
|
}),
|
|
94
86
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
95
|
-
__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
87
|
+
tslib_1.__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
96
88
|
], Routing.prototype, "updater", void 0);
|
|
97
|
-
__decorate([
|
|
89
|
+
tslib_1.__decorate([
|
|
98
90
|
(0, typeorm_1.RelationId)((routing) => routing.creator),
|
|
99
|
-
__metadata("design:type", String)
|
|
91
|
+
tslib_1.__metadata("design:type", String)
|
|
100
92
|
], Routing.prototype, "updaterId", void 0);
|
|
101
|
-
Routing = __decorate([
|
|
93
|
+
Routing = tslib_1.__decorate([
|
|
102
94
|
(0, typeorm_1.Entity)(),
|
|
103
95
|
(0, typeorm_1.Index)('ix_routing_0', (routing) => [routing.domain, routing.name], { unique: true }),
|
|
104
96
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Routing' })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../../server/service/routing/routing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../../server/service/routing/routing.ts"],"names":[],"mappings":";;;;;AAAA,qCASgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,sCAAqB,CAAA;AACvB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAG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,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;0CAAA;AAIhB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;0CAAA;AAMhB;IAJC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAChB,gBAAI,oBAAJ,gBAAI;wCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;0CAChC;AAMlB;IAJC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAChB,gBAAI,oBAAJ,gBAAI;wCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;;0CAChC;AA1DP,OAAO;IAHnB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,cAAc,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC7F,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;GACrC,OAAO,CA2DnB;AA3DY,0BAAO","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport enum RoutingStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(RoutingStatus, {\n name: 'RoutingStatus',\n description: 'state enumeration of a routing'\n})\n\n@Entity()\n@Index('ix_routing_0', (routing: Routing) => [routing.domain, routing.name], { unique: true })\n@ObjectType({ description: 'Entity for Routing' })\nexport class Routing {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { nullable: false })\n readonly id: string\n\n @ManyToOne(type => Domain, { nullable: false })\n @Field({ nullable: false })\n domain?: Domain\n\n @RelationId((routing: Routing) => routing.domain)\n domainId?: string\n\n @Column({ nullable: false })\n @Field({ nullable: false })\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n createdLot?: boolean\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n active?: boolean\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, {\n nullable: true\n })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((routing: Routing) => routing.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((routing: Routing) => routing.creator)\n updaterId?: string\n}\n"]}
|
|
@@ -1,25 +1,12 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
3
|
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
18
5
|
const routing_item_1 = require("./routing-item");
|
|
19
6
|
const routing_item_mutation_1 = require("./routing-item-mutation");
|
|
20
7
|
const routing_item_query_1 = require("./routing-item-query");
|
|
21
8
|
exports.entities = [routing_item_1.RoutingItem];
|
|
22
9
|
exports.resolvers = [routing_item_query_1.RoutingItemQuery, routing_item_mutation_1.RoutingItemMutation];
|
|
23
|
-
__exportStar(require("./routing-item-query"), exports);
|
|
24
|
-
__exportStar(require("./routing-item-mutation"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./routing-item-query"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./routing-item-mutation"), exports);
|
|
25
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/routing-item/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/routing-item/index.ts"],"names":[],"mappings":";;;;AAAA,iDAA4C;AAC5C,mEAA6D;AAC7D,6DAAuD;AAE1C,QAAA,QAAQ,GAAG,CAAC,0BAAW,CAAC,CAAA;AACxB,QAAA,SAAS,GAAG,CAAC,qCAAgB,EAAE,2CAAmB,CAAC,CAAA;AAEhE,+DAAoC;AACpC,kEAAuC","sourcesContent":["import { RoutingItem } from './routing-item'\nimport { RoutingItemMutation } from './routing-item-mutation'\nimport { RoutingItemQuery } from './routing-item-query'\n\nexport const entities = [RoutingItem]\nexport const resolvers = [RoutingItemQuery, RoutingItemMutation]\n\nexport * from './routing-item-query'\nexport * from './routing-item-mutation'\n"]}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
3
|
exports.RoutingItemMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
16
5
|
const type_graphql_1 = require("type-graphql");
|
|
17
6
|
const typeorm_1 = require("typeorm");
|
|
18
7
|
const routing_item_1 = require("./routing-item");
|
|
@@ -67,53 +56,53 @@ let RoutingItemMutation = class RoutingItemMutation {
|
|
|
67
56
|
return true;
|
|
68
57
|
}
|
|
69
58
|
};
|
|
70
|
-
__decorate([
|
|
59
|
+
tslib_1.__decorate([
|
|
71
60
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
72
61
|
(0, type_graphql_1.Mutation)(returns => routing_item_1.RoutingItem, { description: 'To create new RoutingItem' }),
|
|
73
|
-
__param(0, (0, type_graphql_1.Arg)('routingItem')),
|
|
74
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
75
|
-
__metadata("design:type", Function),
|
|
76
|
-
__metadata("design:paramtypes", [routing_item_type_1.NewRoutingItem, Object]),
|
|
77
|
-
__metadata("design:returntype", Promise)
|
|
62
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('routingItem')),
|
|
63
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
64
|
+
tslib_1.__metadata("design:type", Function),
|
|
65
|
+
tslib_1.__metadata("design:paramtypes", [routing_item_type_1.NewRoutingItem, Object]),
|
|
66
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
78
67
|
], RoutingItemMutation.prototype, "createRoutingItem", null);
|
|
79
|
-
__decorate([
|
|
68
|
+
tslib_1.__decorate([
|
|
80
69
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
81
70
|
(0, type_graphql_1.Mutation)(returns => routing_item_1.RoutingItem, { description: 'To modify RoutingItem information' }),
|
|
82
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
83
|
-
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
84
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
85
|
-
__metadata("design:type", Function),
|
|
86
|
-
__metadata("design:paramtypes", [String, routing_item_type_1.RoutingItemPatch, Object]),
|
|
87
|
-
__metadata("design:returntype", Promise)
|
|
71
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
72
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
73
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
74
|
+
tslib_1.__metadata("design:type", Function),
|
|
75
|
+
tslib_1.__metadata("design:paramtypes", [String, routing_item_type_1.RoutingItemPatch, Object]),
|
|
76
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
88
77
|
], RoutingItemMutation.prototype, "updateRoutingItem", null);
|
|
89
|
-
__decorate([
|
|
78
|
+
tslib_1.__decorate([
|
|
90
79
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
91
80
|
(0, type_graphql_1.Mutation)(returns => [routing_item_1.RoutingItem], { description: "To modify multiple RoutingItems' information" }),
|
|
92
|
-
__param(0, (0, type_graphql_1.Arg)('patches', type => [routing_item_type_1.RoutingItemPatch])),
|
|
93
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
94
|
-
__metadata("design:type", Function),
|
|
95
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
96
|
-
__metadata("design:returntype", Promise)
|
|
81
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [routing_item_type_1.RoutingItemPatch])),
|
|
82
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
83
|
+
tslib_1.__metadata("design:type", Function),
|
|
84
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
85
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
97
86
|
], RoutingItemMutation.prototype, "updateMultipleRoutingItem", null);
|
|
98
|
-
__decorate([
|
|
87
|
+
tslib_1.__decorate([
|
|
99
88
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
100
89
|
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete RoutingItem' }),
|
|
101
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
102
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
103
|
-
__metadata("design:type", Function),
|
|
104
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
105
|
-
__metadata("design:returntype", Promise)
|
|
90
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
91
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
92
|
+
tslib_1.__metadata("design:type", Function),
|
|
93
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
94
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
106
95
|
], RoutingItemMutation.prototype, "deleteRoutingItem", null);
|
|
107
|
-
__decorate([
|
|
96
|
+
tslib_1.__decorate([
|
|
108
97
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
109
98
|
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple routingItems' }),
|
|
110
|
-
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
111
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
112
|
-
__metadata("design:type", Function),
|
|
113
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
114
|
-
__metadata("design:returntype", Promise)
|
|
99
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
100
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
101
|
+
tslib_1.__metadata("design:type", Function),
|
|
102
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
103
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
115
104
|
], RoutingItemMutation.prototype, "deleteRoutingItems", null);
|
|
116
|
-
RoutingItemMutation = __decorate([
|
|
105
|
+
RoutingItemMutation = tslib_1.__decorate([
|
|
117
106
|
(0, type_graphql_1.Resolver)(routing_item_1.RoutingItem)
|
|
118
107
|
], RoutingItemMutation);
|
|
119
108
|
exports.RoutingItemMutation = RoutingItemMutation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-item-mutation.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-mutation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routing-item-mutation.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAMqB;AACrB,qCAA4B;AAE5B,iDAA4C;AAC5C,2DAG4B;AAG5B,IAAa,mBAAmB,GAAhC,MAAa,mBAAmB;IAG9B,KAAK,CAAC,iBAAiB,CAAqB,WAA2B,EAAS,OAAY;QAC1F,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,O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AAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DAKpD;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAS3E;AArGU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,0BAAW,CAAC;GACT,mBAAmB,CAsG/B;AAtGY,kDAAmB","sourcesContent":["import {\n Arg,\n Ctx,\n Directive,\n Mutation,\n Resolver\n} from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { RoutingItem } from './routing-item'\nimport {\n NewRoutingItem,\n RoutingItemPatch\n} from './routing-item-type'\n\n@Resolver(RoutingItem)\nexport class RoutingItemMutation {\n @Directive('@transaction')\n @Mutation(returns => RoutingItem, { description: 'To create new RoutingItem' })\n async createRoutingItem(@Arg('routingItem') routingItem: NewRoutingItem, @Ctx() context: any): Promise<RoutingItem> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(RoutingItem).save({\n ...routingItem,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => RoutingItem, { description: 'To modify RoutingItem information' })\n async updateRoutingItem(\n @Arg('id') id: string,\n @Arg('patch') patch: RoutingItemPatch,\n @Ctx() context: any\n ): Promise<RoutingItem> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(RoutingItem)\n const routingItem = await repository.findOne({\n where: { domain, id }\n })\n\n return await repository.save({\n ...routingItem,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [RoutingItem], { description: \"To modify multiple RoutingItems' information\" })\n async updateMultipleRoutingItem(\n @Arg('patches', type => [RoutingItemPatch]) patches: RoutingItemPatch[],\n @Ctx() context: any\n ): Promise<RoutingItem[]> {\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 routingItemRepo = tx.getRepository(RoutingItem)\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 routingItemRepo.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 newRecord = _updateRecords[i]\n const routingItem = await routingItemRepo.findOne(newRecord.id)\n\n const result = await routingItemRepo.save({\n ...routingItem,\n ...newRecord,\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 RoutingItem' })\n async deleteRoutingItem(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(RoutingItem).delete({ domain, id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple routingItems' })\n async deleteRoutingItems(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(RoutingItem).delete({\n domain,\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
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
2
|
var _a;
|
|
15
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
4
|
exports.RoutingItemQuery = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
17
6
|
const type_graphql_1 = require("type-graphql");
|
|
18
7
|
const typeorm_1 = require("typeorm");
|
|
19
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
@@ -54,50 +43,50 @@ let RoutingItemQuery = class RoutingItemQuery {
|
|
|
54
43
|
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(routingItem.creatorId);
|
|
55
44
|
}
|
|
56
45
|
};
|
|
57
|
-
__decorate([
|
|
46
|
+
tslib_1.__decorate([
|
|
58
47
|
(0, type_graphql_1.Query)(returns => routing_item_type_1.RoutingItemList, { description: 'To fetch multiple RoutingItems' }),
|
|
59
|
-
__param(0, (0, type_graphql_1.Args)()),
|
|
60
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
61
|
-
__metadata("design:type", Function),
|
|
62
|
-
__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
63
|
-
__metadata("design:returntype", Promise)
|
|
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", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
52
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
64
53
|
], RoutingItemQuery.prototype, "routingItems", null);
|
|
65
|
-
__decorate([
|
|
54
|
+
tslib_1.__decorate([
|
|
66
55
|
(0, type_graphql_1.FieldResolver)(type => routing_1.Routing),
|
|
67
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
68
|
-
__metadata("design:type", Function),
|
|
69
|
-
__metadata("design:paramtypes", [routing_item_1.RoutingItem]),
|
|
70
|
-
__metadata("design:returntype", Promise)
|
|
56
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
57
|
+
tslib_1.__metadata("design:type", Function),
|
|
58
|
+
tslib_1.__metadata("design:paramtypes", [routing_item_1.RoutingItem]),
|
|
59
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
71
60
|
], RoutingItemQuery.prototype, "routing", null);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, type_graphql_1.FieldResolver)(type =>
|
|
74
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
75
|
-
__metadata("design:type", Function),
|
|
76
|
-
__metadata("design:paramtypes", [routing_item_1.RoutingItem]),
|
|
77
|
-
__metadata("design:returntype", Promise)
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, type_graphql_1.FieldResolver)(type => operation_1.Operation),
|
|
63
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
64
|
+
tslib_1.__metadata("design:type", Function),
|
|
65
|
+
tslib_1.__metadata("design:paramtypes", [routing_item_1.RoutingItem]),
|
|
66
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
78
67
|
], RoutingItemQuery.prototype, "operation", null);
|
|
79
|
-
__decorate([
|
|
68
|
+
tslib_1.__decorate([
|
|
80
69
|
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
81
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
82
|
-
__metadata("design:type", Function),
|
|
83
|
-
__metadata("design:paramtypes", [routing_item_1.RoutingItem]),
|
|
84
|
-
__metadata("design:returntype", Promise)
|
|
70
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
71
|
+
tslib_1.__metadata("design:type", Function),
|
|
72
|
+
tslib_1.__metadata("design:paramtypes", [routing_item_1.RoutingItem]),
|
|
73
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
85
74
|
], RoutingItemQuery.prototype, "domain", null);
|
|
86
|
-
__decorate([
|
|
75
|
+
tslib_1.__decorate([
|
|
87
76
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
88
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
89
|
-
__metadata("design:type", Function),
|
|
90
|
-
__metadata("design:paramtypes", [routing_item_1.RoutingItem]),
|
|
91
|
-
__metadata("design:returntype", Promise)
|
|
77
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
78
|
+
tslib_1.__metadata("design:type", Function),
|
|
79
|
+
tslib_1.__metadata("design:paramtypes", [routing_item_1.RoutingItem]),
|
|
80
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
92
81
|
], RoutingItemQuery.prototype, "updater", null);
|
|
93
|
-
__decorate([
|
|
82
|
+
tslib_1.__decorate([
|
|
94
83
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
95
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
96
|
-
__metadata("design:type", Function),
|
|
97
|
-
__metadata("design:paramtypes", [routing_item_1.RoutingItem]),
|
|
98
|
-
__metadata("design:returntype", Promise)
|
|
84
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
85
|
+
tslib_1.__metadata("design:type", Function),
|
|
86
|
+
tslib_1.__metadata("design:paramtypes", [routing_item_1.RoutingItem]),
|
|
87
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
99
88
|
], RoutingItemQuery.prototype, "creator", null);
|
|
100
|
-
RoutingItemQuery = __decorate([
|
|
89
|
+
RoutingItemQuery = tslib_1.__decorate([
|
|
101
90
|
(0, type_graphql_1.Resolver)(routing_item_1.RoutingItem)
|
|
102
91
|
], RoutingItemQuery);
|
|
103
92
|
exports.RoutingItemQuery = RoutingItemQuery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-item-query.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routing-item-query.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAA8E;AAC9E,qCAAuC;AAEvC,yDAAgD;AAChD,iDAAwF;AAExF,sDAAkD;AAClD,gDAA4C;AAC5C,iDAA4C;AAC5C,2DAAqD;AAGrD,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAE3B,KAAK,CAAC,YAAY,CAAS,MAAiB,EAAS,OAAY;QAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,UAAU,EAAE,IAAA,uBAAa,EAAC,0BAAW,CAAC;YACtC,MAAM;YACN,MAAM;YACN,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY;aACtC,iBAAiB,CAAC,YAAY,EAAE,SAAS,CAAC;aAC1C,iBAAiB,CAAC,cAAc,EAAE,WAAW,CAAC;aAC9C,eAAe,EAAE,CAAA;QAEpB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGD,KAAK,CAAC,OAAO,CAAS,WAAwB;QAC5C,OAAO,WAAW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,CAAA;;6CAAc,0BAAW;;iDAE/C;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,0BAAW;;8CAE5C;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,0BAAW;;+CAE7C;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAc,0BAAW;;+CAE7C;AA5CU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,0BAAW,CAAC;GACT,gBAAgB,CA6C5B;AA7CY,4CAAgB","sourcesContent":["import { Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\n\nimport { Operation } from '../operation/operation'\nimport { Routing } from '../routing/routing'\nimport { RoutingItem } from './routing-item'\nimport { RoutingItemList } from './routing-item-type'\n\n@Resolver(RoutingItem)\nexport class RoutingItemQuery {\n @Query(returns => RoutingItemList, { description: 'To fetch multiple RoutingItems' })\n async routingItems(@Args() params: ListParam, @Ctx() context: any): Promise<RoutingItemList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(RoutingItem),\n params,\n domain,\n alias: 'ri',\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder\n .leftJoinAndSelect('ri.routing', 'routing')\n .leftJoinAndSelect('ri.operation', 'operation')\n .getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Routing)\n async routing(@Root() routingItem: RoutingItem): Promise<Routing> {\n return routingItem.routing || (await getRepository(Routing).findOne(routingItem.routingId))\n }\n\n @FieldResolver(type => Operation)\n async operation(@Root() routingItem: RoutingItem): Promise<Operation> {\n return routingItem.operation || (await getRepository(Operation).findOne(routingItem.operationId))\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() routingItem: RoutingItem): Promise<Domain> {\n return await getRepository(Domain).findOne(routingItem.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() routingItem: RoutingItem): Promise<User> {\n return await getRepository(User).findOne(routingItem.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() routingItem: RoutingItem): Promise<User> {\n return await getRepository(User).findOne(routingItem.creatorId)\n }\n}\n"]}
|
|
@@ -1,106 +1,98 @@
|
|
|
1
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
2
|
var _a, _b, _c, _d;
|
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
4
|
exports.RoutingItemList = exports.RoutingItemPatch = exports.NewRoutingItem = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
14
6
|
const type_graphql_1 = require("type-graphql");
|
|
15
7
|
const shell_1 = require("@things-factory/shell");
|
|
16
8
|
const routing_item_1 = require("./routing-item");
|
|
17
9
|
let NewRoutingItem = class NewRoutingItem {
|
|
18
10
|
};
|
|
19
|
-
__decorate([
|
|
11
|
+
tslib_1.__decorate([
|
|
20
12
|
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
21
|
-
__metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
|
|
13
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
|
|
22
14
|
], NewRoutingItem.prototype, "routing", void 0);
|
|
23
|
-
__decorate([
|
|
15
|
+
tslib_1.__decorate([
|
|
24
16
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", String)
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
26
18
|
], NewRoutingItem.prototype, "rank", void 0);
|
|
27
|
-
__decorate([
|
|
19
|
+
tslib_1.__decorate([
|
|
28
20
|
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
29
|
-
__metadata("design:type", typeof (_b = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _b : Object)
|
|
21
|
+
tslib_1.__metadata("design:type", typeof (_b = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _b : Object)
|
|
30
22
|
], NewRoutingItem.prototype, "operation", void 0);
|
|
31
|
-
__decorate([
|
|
23
|
+
tslib_1.__decorate([
|
|
32
24
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
33
|
-
__metadata("design:type", String)
|
|
25
|
+
tslib_1.__metadata("design:type", String)
|
|
34
26
|
], NewRoutingItem.prototype, "startedTransaction", void 0);
|
|
35
|
-
__decorate([
|
|
27
|
+
tslib_1.__decorate([
|
|
36
28
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
37
|
-
__metadata("design:type", Boolean)
|
|
29
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
38
30
|
], NewRoutingItem.prototype, "isStock", void 0);
|
|
39
|
-
__decorate([
|
|
31
|
+
tslib_1.__decorate([
|
|
40
32
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
41
|
-
__metadata("design:type", String)
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
42
34
|
], NewRoutingItem.prototype, "operatorViewId", void 0);
|
|
43
|
-
__decorate([
|
|
35
|
+
tslib_1.__decorate([
|
|
44
36
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
45
|
-
__metadata("design:type", Boolean)
|
|
37
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
46
38
|
], NewRoutingItem.prototype, "active", void 0);
|
|
47
|
-
NewRoutingItem = __decorate([
|
|
39
|
+
NewRoutingItem = tslib_1.__decorate([
|
|
48
40
|
(0, type_graphql_1.InputType)()
|
|
49
41
|
], NewRoutingItem);
|
|
50
42
|
exports.NewRoutingItem = NewRoutingItem;
|
|
51
43
|
let RoutingItemPatch = class RoutingItemPatch {
|
|
52
44
|
};
|
|
53
|
-
__decorate([
|
|
45
|
+
tslib_1.__decorate([
|
|
54
46
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
55
|
-
__metadata("design:type", String)
|
|
47
|
+
tslib_1.__metadata("design:type", String)
|
|
56
48
|
], RoutingItemPatch.prototype, "id", void 0);
|
|
57
|
-
__decorate([
|
|
49
|
+
tslib_1.__decorate([
|
|
58
50
|
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
59
|
-
__metadata("design:type", typeof (_c = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _c : Object)
|
|
51
|
+
tslib_1.__metadata("design:type", typeof (_c = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _c : Object)
|
|
60
52
|
], RoutingItemPatch.prototype, "routing", void 0);
|
|
61
|
-
__decorate([
|
|
53
|
+
tslib_1.__decorate([
|
|
62
54
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
63
|
-
__metadata("design:type", String)
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
64
56
|
], RoutingItemPatch.prototype, "rank", void 0);
|
|
65
|
-
__decorate([
|
|
57
|
+
tslib_1.__decorate([
|
|
66
58
|
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
67
|
-
__metadata("design:type", typeof (_d = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _d : Object)
|
|
59
|
+
tslib_1.__metadata("design:type", typeof (_d = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _d : Object)
|
|
68
60
|
], RoutingItemPatch.prototype, "operation", void 0);
|
|
69
|
-
__decorate([
|
|
61
|
+
tslib_1.__decorate([
|
|
70
62
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
71
|
-
__metadata("design:type", String)
|
|
63
|
+
tslib_1.__metadata("design:type", String)
|
|
72
64
|
], RoutingItemPatch.prototype, "startedTransaction", void 0);
|
|
73
|
-
__decorate([
|
|
65
|
+
tslib_1.__decorate([
|
|
74
66
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
75
|
-
__metadata("design:type", Boolean)
|
|
67
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
76
68
|
], RoutingItemPatch.prototype, "isStock", void 0);
|
|
77
|
-
__decorate([
|
|
69
|
+
tslib_1.__decorate([
|
|
78
70
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
79
|
-
__metadata("design:type", String)
|
|
71
|
+
tslib_1.__metadata("design:type", String)
|
|
80
72
|
], RoutingItemPatch.prototype, "operatorViewId", void 0);
|
|
81
|
-
__decorate([
|
|
73
|
+
tslib_1.__decorate([
|
|
82
74
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
83
|
-
__metadata("design:type", Boolean)
|
|
75
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
84
76
|
], RoutingItemPatch.prototype, "active", void 0);
|
|
85
|
-
__decorate([
|
|
77
|
+
tslib_1.__decorate([
|
|
86
78
|
(0, type_graphql_1.Field)(),
|
|
87
|
-
__metadata("design:type", String)
|
|
79
|
+
tslib_1.__metadata("design:type", String)
|
|
88
80
|
], RoutingItemPatch.prototype, "cuFlag", void 0);
|
|
89
|
-
RoutingItemPatch = __decorate([
|
|
81
|
+
RoutingItemPatch = tslib_1.__decorate([
|
|
90
82
|
(0, type_graphql_1.InputType)()
|
|
91
83
|
], RoutingItemPatch);
|
|
92
84
|
exports.RoutingItemPatch = RoutingItemPatch;
|
|
93
85
|
let RoutingItemList = class RoutingItemList {
|
|
94
86
|
};
|
|
95
|
-
__decorate([
|
|
87
|
+
tslib_1.__decorate([
|
|
96
88
|
(0, type_graphql_1.Field)(type => [routing_item_1.RoutingItem]),
|
|
97
|
-
__metadata("design:type", Array)
|
|
89
|
+
tslib_1.__metadata("design:type", Array)
|
|
98
90
|
], RoutingItemList.prototype, "items", void 0);
|
|
99
|
-
__decorate([
|
|
91
|
+
tslib_1.__decorate([
|
|
100
92
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
101
|
-
__metadata("design:type", Number)
|
|
93
|
+
tslib_1.__metadata("design:type", Number)
|
|
102
94
|
], RoutingItemList.prototype, "total", void 0);
|
|
103
|
-
RoutingItemList = __decorate([
|
|
95
|
+
RoutingItemList = tslib_1.__decorate([
|
|
104
96
|
(0, type_graphql_1.ObjectType)()
|
|
105
97
|
], RoutingItemList);
|
|
106
98
|
exports.RoutingItemList = RoutingItemList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-item-type.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routing-item-type.js","sourceRoot":"","sources":["../../../server/service/routing-item/routing-item-type.ts"],"names":[],"mappings":";;;;;AAAA,+CAAsF;AACtF,iDAAiD;AAEjD,iDAA4C;AAG5C,IAAa,cAAc,GAA3B,MAAa,cAAc;CAqB1B,CAAA;AAnBC;IADC,IAAA,oBAAK,EAAC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AAA;AAGrB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACC;AAG3B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACH;AAGvB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACV;AAGhB;IADC,IAAA,oBAAK,GAAE;;gDACM;AA1BH,gBAAgB;IAD5B,IAAA,wBAAS,GAAE;GACC,gBAAgB,CA2B5B;AA3BY,4CAAgB;AA8B7B,IAAa,eAAe,GAA5B,MAAa,eAAe;CAM3B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,0BAAW,CAAC,CAAC;;8CACT;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;8CACN;AALF,eAAe;IAD3B,IAAA,yBAAU,GAAE;GACA,eAAe,CAM3B;AANY,0CAAe","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { RoutingItem } from './routing-item'\n\n@InputType()\nexport class NewRoutingItem {\n @Field(type => ObjectRef, { nullable: true })\n routing: ObjectRef\n\n @Field({ nullable: true })\n rank: string\n\n @Field(type => ObjectRef, { nullable: true })\n operation: ObjectRef\n\n @Field({ nullable: true })\n startedTransaction?: string\n\n @Field({ nullable: true })\n isStock?: boolean\n\n @Field({ nullable: true })\n operatorViewId?: string\n\n @Field({ nullable: true })\n active?: boolean\n}\n\n@InputType()\nexport class RoutingItemPatch {\n @Field(type => ID, { nullable: true })\n id: string\n\n @Field(type => ObjectRef, { nullable: true })\n routing: ObjectRef\n\n @Field({ nullable: true })\n rank: string\n\n @Field(type => ObjectRef, { nullable: true })\n operation?: ObjectRef\n\n @Field({ nullable: true })\n startedTransaction?: string\n\n @Field({ nullable: true })\n isStock?: boolean\n\n @Field({ nullable: true })\n operatorViewId?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class RoutingItemList {\n @Field(type => [RoutingItem])\n items: RoutingItem[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|