@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
package/dist-server/index.js
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
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 });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
17
4
|
require("./routes");
|
|
18
|
-
__exportStar(require("./migrations"), exports);
|
|
19
|
-
__exportStar(require("./middlewares"), exports);
|
|
20
|
-
__exportStar(require("./service"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./migrations"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./middlewares"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./service"), exports);
|
|
21
8
|
//# sourceMappingURL=index.js.map
|
package/dist-server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,oBAAiB;AAEjB,uDAA4B;AAC5B,wDAA6B;AAC7B,oDAAyB","sourcesContent":["import './routes'\n\nexport * from './migrations'\nexport * from './middlewares'\nexport * from './service'\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,GAAG;IACjC,kCAAkC;AACpC,CAAC;AAFD,0CAEC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,GAAG;IACjC,kCAAkC;AACpC,CAAC;AAFD,0CAEC","sourcesContent":["export function initMiddlewares(app) {\n /* can add middlewares into app */\n}\n"]}
|
|
@@ -1 +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"}
|
|
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","sourcesContent":["const glob = require('glob')\nconst path = require('path')\n\nexport var migrations = []\n\nglob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {\n if (file.indexOf('index.js') !== -1) return\n migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])\n})\n"]}
|
package/dist-server/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;;;;OAKG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,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":["process.on('bootstrap-module-global-public-route' as any, (app, 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\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})\n"]}
|
|
@@ -1,39 +1,26 @@
|
|
|
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.schema = exports.entities = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
18
5
|
const operation_1 = require("./operation");
|
|
19
6
|
const routing_1 = require("./routing");
|
|
20
7
|
const routing_item_1 = require("./routing-item");
|
|
21
8
|
/* EXPORT ENTITY TYPES */
|
|
22
|
-
__exportStar(require("./routing/routing"), exports);
|
|
23
|
-
__exportStar(require("./routing-item/routing-item"), exports);
|
|
24
|
-
__exportStar(require("./operation/operation"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./routing/routing"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./routing-item/routing-item"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./operation/operation"), exports);
|
|
25
12
|
/* EXPORT TYPES */
|
|
26
|
-
__exportStar(require("./routing/routing-type"), exports);
|
|
27
|
-
__exportStar(require("./operation/operation-type"), exports);
|
|
28
|
-
__exportStar(require("./routing-item/routing-item-type"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./routing/routing-type"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./operation/operation-type"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./routing-item/routing-item-type"), exports);
|
|
29
16
|
/* EXPORT MUTAIONS */
|
|
30
|
-
__exportStar(require("./routing/routing-mutation"), exports);
|
|
31
|
-
__exportStar(require("./operation/operation-mutation"), exports);
|
|
32
|
-
__exportStar(require("./routing-item/routing-item-mutation"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./routing/routing-mutation"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./operation/operation-mutation"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./routing-item/routing-item-mutation"), exports);
|
|
33
20
|
/* EXPORT QUERIES */
|
|
34
|
-
__exportStar(require("./routing/routing-query"), exports);
|
|
35
|
-
__exportStar(require("./operation/operation-query"), exports);
|
|
36
|
-
__exportStar(require("./routing-item/routing-item-query"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./routing/routing-query"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./operation/operation-query"), exports);
|
|
23
|
+
tslib_1.__exportStar(require("./routing-item/routing-item-query"), exports);
|
|
37
24
|
exports.entities = [
|
|
38
25
|
/* ENTITIES */
|
|
39
26
|
...routing_1.entities,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,2CAGoB;AACpB,uCAGkB;AAClB,iDAGuB;AAEvB,yBAAyB;AACzB,4DAAiC;AACjC,sEAA2C;AAC3C,gEAAqC;AAErC,kBAAkB;AAClB,iEAAsC;AACtC,qEAA0C;AAC1C,2EAAgD;AAEhD,qBAAqB;AACrB,qEAA0C;AAC1C,yEAA8C;AAC9C,+EAAoD;AAEpD,oBAAoB;AACpB,kEAAuC;AACvC,sEAA2C;AAC3C,4EAAiD;AAEpC,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,kBAAe;IAClB,GAAG,uBAAmB;IACtB,GAAG,oBAAiB;CACrB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE,CAAC,GAAG,mBAAgB,EAAE,GAAG,wBAAoB,EAAE,GAAG,qBAAkB,CAAC;CACvF,CAAA","sourcesContent":["import {\n entities as OperationEntities,\n resolvers as OperationResolvers\n} from './operation'\nimport {\n entities as RoutingEntities,\n resolvers as RoutingResolvers\n} from './routing'\nimport {\n entities as RoutingItemEntities,\n resolvers as RoutingItemResolvers\n} from './routing-item'\n\n/* EXPORT ENTITY TYPES */\nexport * from './routing/routing'\nexport * from './routing-item/routing-item'\nexport * from './operation/operation'\n\n/* EXPORT TYPES */\nexport * from './routing/routing-type'\nexport * from './operation/operation-type'\nexport * from './routing-item/routing-item-type'\n\n/* EXPORT MUTAIONS */\nexport * from './routing/routing-mutation'\nexport * from './operation/operation-mutation'\nexport * from './routing-item/routing-item-mutation'\n\n/* EXPORT QUERIES */\nexport * from './routing/routing-query'\nexport * from './operation/operation-query'\nexport * from './routing-item/routing-item-query'\n\nexport const entities = [\n /* ENTITIES */\n ...RoutingEntities,\n ...RoutingItemEntities,\n ...OperationEntities\n]\n\nexport const schema = {\n resolverClasses: [...RoutingResolvers, ...RoutingItemResolvers, ...OperationResolvers]\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 operation_1 = require("./operation");
|
|
19
6
|
const operation_mutation_1 = require("./operation-mutation");
|
|
20
7
|
const operation_query_1 = require("./operation-query");
|
|
21
8
|
exports.entities = [operation_1.Operation];
|
|
22
9
|
exports.resolvers = [operation_query_1.OperationQuery, operation_mutation_1.OperationMutation];
|
|
23
|
-
__exportStar(require("./operation-query"), exports);
|
|
24
|
-
__exportStar(require("./operation-mutation"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./operation-query"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./operation-mutation"), exports);
|
|
25
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/operation/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/operation/index.ts"],"names":[],"mappings":";;;;AAAA,2CAAuC;AACvC,6DAAwD;AACxD,uDAAkD;AAErC,QAAA,QAAQ,GAAG,CAAC,qBAAS,CAAC,CAAA;AACtB,QAAA,SAAS,GAAG,CAAC,gCAAc,EAAE,sCAAiB,CAAC,CAAA;AAE5D,4DAAiC;AACjC,+DAAoC","sourcesContent":["import { Operation } from './operation'\nimport { OperationMutation } from './operation-mutation'\nimport { OperationQuery } from './operation-query'\n\nexport const entities = [Operation]\nexport const resolvers = [OperationQuery, OperationMutation]\n\nexport * from './operation-query'\nexport * from './operation-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.OperationMutation = 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 attachment_base_1 = require("@things-factory/attachment-base");
|
|
@@ -111,53 +100,53 @@ let OperationMutation = class OperationMutation {
|
|
|
111
100
|
return true;
|
|
112
101
|
}
|
|
113
102
|
};
|
|
114
|
-
__decorate([
|
|
103
|
+
tslib_1.__decorate([
|
|
115
104
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
116
105
|
(0, type_graphql_1.Mutation)(returns => operation_1.Operation, { description: 'To create new Operation' }),
|
|
117
|
-
__param(0, (0, type_graphql_1.Arg)('operation')),
|
|
118
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
119
|
-
__metadata("design:type", Function),
|
|
120
|
-
__metadata("design:paramtypes", [operation_type_1.NewOperation, Object]),
|
|
121
|
-
__metadata("design:returntype", Promise)
|
|
106
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('operation')),
|
|
107
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
108
|
+
tslib_1.__metadata("design:type", Function),
|
|
109
|
+
tslib_1.__metadata("design:paramtypes", [operation_type_1.NewOperation, Object]),
|
|
110
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
122
111
|
], OperationMutation.prototype, "createOperation", null);
|
|
123
|
-
__decorate([
|
|
112
|
+
tslib_1.__decorate([
|
|
124
113
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
125
114
|
(0, type_graphql_1.Mutation)(returns => operation_1.Operation, { description: 'To modify Operation information' }),
|
|
126
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
127
|
-
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
128
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
129
|
-
__metadata("design:type", Function),
|
|
130
|
-
__metadata("design:paramtypes", [String, operation_type_1.OperationPatch, Object]),
|
|
131
|
-
__metadata("design:returntype", Promise)
|
|
115
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
116
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
117
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
118
|
+
tslib_1.__metadata("design:type", Function),
|
|
119
|
+
tslib_1.__metadata("design:paramtypes", [String, operation_type_1.OperationPatch, Object]),
|
|
120
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
132
121
|
], OperationMutation.prototype, "updateOperation", null);
|
|
133
|
-
__decorate([
|
|
122
|
+
tslib_1.__decorate([
|
|
134
123
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
135
124
|
(0, type_graphql_1.Mutation)(returns => [operation_1.Operation], { description: "To modify multiple Operations' information" }),
|
|
136
|
-
__param(0, (0, type_graphql_1.Arg)('patches', type => [operation_type_1.OperationPatch])),
|
|
137
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
138
|
-
__metadata("design:type", Function),
|
|
139
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
140
|
-
__metadata("design:returntype", Promise)
|
|
125
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [operation_type_1.OperationPatch])),
|
|
126
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
127
|
+
tslib_1.__metadata("design:type", Function),
|
|
128
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
129
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
141
130
|
], OperationMutation.prototype, "updateMultipleOperation", null);
|
|
142
|
-
__decorate([
|
|
131
|
+
tslib_1.__decorate([
|
|
143
132
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
144
133
|
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete Operation' }),
|
|
145
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
146
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
147
|
-
__metadata("design:type", Function),
|
|
148
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
149
|
-
__metadata("design:returntype", Promise)
|
|
134
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
135
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
136
|
+
tslib_1.__metadata("design:type", Function),
|
|
137
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
138
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
150
139
|
], OperationMutation.prototype, "deleteOperation", null);
|
|
151
|
-
__decorate([
|
|
140
|
+
tslib_1.__decorate([
|
|
152
141
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
153
142
|
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple operations' }),
|
|
154
|
-
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
155
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
156
|
-
__metadata("design:type", Function),
|
|
157
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
158
|
-
__metadata("design:returntype", Promise)
|
|
143
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
144
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
145
|
+
tslib_1.__metadata("design:type", Function),
|
|
146
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
147
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
159
148
|
], OperationMutation.prototype, "deleteOperations", null);
|
|
160
|
-
OperationMutation = __decorate([
|
|
149
|
+
OperationMutation = tslib_1.__decorate([
|
|
161
150
|
(0, type_graphql_1.Resolver)(operation_1.Operation)
|
|
162
151
|
], OperationMutation);
|
|
163
152
|
exports.OperationMutation = OperationMutation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-mutation.js","sourceRoot":"","sources":["../../../server/service/operation/operation-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,qEAA0F;AAE1F,2CAAuC;AACvC,qDAA+D;AAG/D,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAG5B,KAAK,CAAC,eAAe,CAAmB,SAAuB,EAAS,OAAY;QAClF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,qBAAS,CAAC,CAAC,IAAI,iCAChD,SAAS,KACZ,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,IAAI,SAAS,CAAC,SAAS,EAAE;YACvB,MAAM,IAAA,kCAAgB,EACpB,IAAI,EACJ;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,SAAS,CAAC,SAAS;oBACzB,OAAO,EAAE,qBAAS,CAAC,IAAI;oBACvB,KAAK,EAAE,MAAM,CAAC,EAAE;iBACjB;aACF,EACD,OAAO,CACR,CAAA;SACF;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAID,KAAK,CAAC,eAAe,CACR,EAAU,EACP,KAAqB,EAC5B,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,qBAAS,CAAC,CAAA;QAC9C,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACzC,K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,iBAAiB,CAyK7B;AAzKY,8CAAiB"}
|
|
1
|
+
{"version":3,"file":"operation-mutation.js","sourceRoot":"","sources":["../../../server/service/operation/operation-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,qEAA0F;AAE1F,2CAAuC;AACvC,qDAA+D;AAG/D,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAG5B,KAAK,CAAC,eAAe,CAAmB,SAAuB,EAAS,OAAY;QAClF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,qBAAS,CAAC,CAAC,IAAI,iCAChD,SAAS,KACZ,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,IAAI,SAAS,CAAC,SAAS,EAAE;YACvB,MAAM,IAAA,kCAAgB,EACpB,IAAI,EACJ;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,SAAS,CAAC,SAAS;oBACzB,OAAO,EAAE,qBAAS,CAAC,IAAI;oBACvB,KAAK,EAAE,MAAM,CAAC,EAAE;iBACjB;aACF,EACD,OAAO,CACR,CAAA;SACF;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAID,KAAK,CAAC,eAAe,CACR,EAAU,EACP,KAAqB,EAC5B,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,qBAAS,CAAC,CAAA;QAC9C,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACzC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;QAEF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,+CAC/B,SAAS,GACT,KA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ment, deleteAttachmentsByRef } from '@things-factory/attachment-base'\n\nimport { Operation } from './operation'\nimport { NewOperation, OperationPatch } from './operation-type'\n\n@Resolver(Operation)\nexport class OperationMutation {\n @Directive('@transaction')\n @Mutation(returns => Operation, { description: 'To create new Operation' })\n async createOperation(@Arg('operation') operation: NewOperation, @Ctx() context: any): Promise<Operation> {\n const { domain, user, tx } = context.state\n\n const result = await tx.getRepository(Operation).save({\n ...operation,\n domain,\n creator: user,\n updater: user\n })\n\n if (operation.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: operation.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => Operation, { description: 'To modify Operation information' })\n async updateOperation(\n @Arg('id') id: string,\n @Arg('patch') patch: OperationPatch,\n @Ctx() context: any\n ): Promise<Operation> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Operation)\n const operation = await repository.findOne({\n where: { domain, id }\n })\n\n const result = await repository.save({\n ...operation,\n ...patch,\n updater: user\n })\n\n if (patch.thumbnail) {\n // ?? { refBys: [operation.id] }\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: patch.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Operation], { description: \"To modify multiple Operations' information\" })\n async updateMultipleOperation(\n @Arg('patches', type => [OperationPatch]) patches: OperationPatch[],\n @Ctx() context: any\n ): Promise<Operation[]> {\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 operationRepo = tx.getRepository(Operation)\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 operationRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n if (newRecord.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: newRecord.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\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 operation = await operationRepo.findOne(newRecord.id)\n\n const result = await operationRepo.save({\n ...operation,\n ...newRecord,\n updater: user\n })\n\n if (newRecord.thumbnail) {\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: newRecord.thumbnail,\n refType: Operation.name,\n refBy: result.id\n }\n },\n context\n )\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 Operation' })\n async deleteOperation(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Operation).delete({ domain, id })\n await deleteAttachmentsByRef(null, { refBys: [id] }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple operations' })\n async deleteOperations(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Operation).delete({\n domain,\n id: In(ids)\n })\n\n await deleteAttachmentsByRef(null, { refBys: ids }, context)\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.OperationQuery = 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 attachment_base_1 = require("@things-factory/attachment-base");
|
|
@@ -58,51 +47,51 @@ let OperationQuery = class OperationQuery {
|
|
|
58
47
|
return attachment === null || attachment === void 0 ? void 0 : attachment.fullpath;
|
|
59
48
|
}
|
|
60
49
|
};
|
|
61
|
-
__decorate([
|
|
50
|
+
tslib_1.__decorate([
|
|
62
51
|
(0, type_graphql_1.Query)(returns => operation_1.Operation, { description: 'To fetch a Operation' }),
|
|
63
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
64
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
65
|
-
__metadata("design:type", Function),
|
|
66
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
67
|
-
__metadata("design:returntype", Promise)
|
|
52
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
53
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
54
|
+
tslib_1.__metadata("design:type", Function),
|
|
55
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
56
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
68
57
|
], OperationQuery.prototype, "operation", null);
|
|
69
|
-
__decorate([
|
|
58
|
+
tslib_1.__decorate([
|
|
70
59
|
(0, type_graphql_1.Query)(returns => operation_type_1.OperationList, { description: 'To fetch multiple Operations' }),
|
|
71
|
-
__param(0, (0, type_graphql_1.Args)()),
|
|
72
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
73
|
-
__metadata("design:type", Function),
|
|
74
|
-
__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
75
|
-
__metadata("design:returntype", Promise)
|
|
60
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
61
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
62
|
+
tslib_1.__metadata("design:type", Function),
|
|
63
|
+
tslib_1.__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
64
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
76
65
|
], OperationQuery.prototype, "operations", null);
|
|
77
|
-
__decorate([
|
|
66
|
+
tslib_1.__decorate([
|
|
78
67
|
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
79
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
80
|
-
__metadata("design:type", Function),
|
|
81
|
-
__metadata("design:paramtypes", [operation_1.Operation]),
|
|
82
|
-
__metadata("design:returntype", Promise)
|
|
68
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
69
|
+
tslib_1.__metadata("design:type", Function),
|
|
70
|
+
tslib_1.__metadata("design:paramtypes", [operation_1.Operation]),
|
|
71
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
83
72
|
], OperationQuery.prototype, "domain", null);
|
|
84
|
-
__decorate([
|
|
73
|
+
tslib_1.__decorate([
|
|
85
74
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
86
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
87
|
-
__metadata("design:type", Function),
|
|
88
|
-
__metadata("design:paramtypes", [operation_1.Operation]),
|
|
89
|
-
__metadata("design:returntype", Promise)
|
|
75
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
76
|
+
tslib_1.__metadata("design:type", Function),
|
|
77
|
+
tslib_1.__metadata("design:paramtypes", [operation_1.Operation]),
|
|
78
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
90
79
|
], OperationQuery.prototype, "updater", null);
|
|
91
|
-
__decorate([
|
|
80
|
+
tslib_1.__decorate([
|
|
92
81
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
93
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
94
|
-
__metadata("design:type", Function),
|
|
95
|
-
__metadata("design:paramtypes", [operation_1.Operation]),
|
|
96
|
-
__metadata("design:returntype", Promise)
|
|
82
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
83
|
+
tslib_1.__metadata("design:type", Function),
|
|
84
|
+
tslib_1.__metadata("design:paramtypes", [operation_1.Operation]),
|
|
85
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
97
86
|
], OperationQuery.prototype, "creator", null);
|
|
98
|
-
__decorate([
|
|
87
|
+
tslib_1.__decorate([
|
|
99
88
|
(0, type_graphql_1.FieldResolver)(type => String),
|
|
100
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
101
|
-
__metadata("design:type", Function),
|
|
102
|
-
__metadata("design:paramtypes", [operation_1.Operation]),
|
|
103
|
-
__metadata("design:returntype", Promise)
|
|
89
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
90
|
+
tslib_1.__metadata("design:type", Function),
|
|
91
|
+
tslib_1.__metadata("design:paramtypes", [operation_1.Operation]),
|
|
92
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
104
93
|
], OperationQuery.prototype, "thumbnail", null);
|
|
105
|
-
OperationQuery = __decorate([
|
|
94
|
+
OperationQuery = tslib_1.__decorate([
|
|
106
95
|
(0, type_graphql_1.Resolver)(operation_1.Operation)
|
|
107
96
|
], OperationQuery);
|
|
108
97
|
exports.OperationQuery = OperationQuery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-query.js","sourceRoot":"","sources":["../../../server/service/operation/operation-query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"operation-query.js","sourceRoot":"","sources":["../../../server/service/operation/operation-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,qEAA4D;AAC5D,yDAAgD;AAChD,iDAAwF;AAExF,2CAAuC;AACvC,qDAAgD;AAGhD,IAAa,cAAc,GAA3B,MAAa,cAAc;IAEzB,KAAK,CAAC,SAAS,CAAY,EAAU,EAAS,OAAY;QACxD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;IACJ,CAAC;IAGD,KAAK,CAAC,UAAU,CAAS,MAAiB,EAAS,OAAY;QAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,UAAU,EAAE,IAAA,uBAAa,EAAC,qBAAS,CAAC;YACpC,MAAM;YACN,MAAM;YACN,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGD,KAAK,CAAC,MAAM,CAAS,SAAoB;QACvC,OAAO,MAAM,IAAA,uBAAa,EAAC,cAAM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AY,qBAAS;;4CAExC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;6CAEzC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;6CAEzC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;+CAS3C;AAnDU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,qBAAS,CAAC;GACP,cAAc,CAoD1B;AApDY,wCAAc","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { Attachment } from '@things-factory/attachment-base'\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\n\nimport { Operation } from './operation'\nimport { OperationList } from './operation-type'\n\n@Resolver(Operation)\nexport class OperationQuery {\n @Query(returns => Operation, { description: 'To fetch a Operation' })\n async operation(@Arg('id') id: string, @Ctx() context: any): Promise<Operation> {\n const { domain } = context.state\n\n return await getRepository(Operation).findOne({\n where: { domain, id }\n })\n }\n\n @Query(returns => OperationList, { description: 'To fetch multiple Operations' })\n async operations(@Args() params: ListParam, @Ctx() context: any): Promise<OperationList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(Operation),\n params,\n domain,\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() operation: Operation): Promise<Domain> {\n return await getRepository(Domain).findOne(operation.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() operation: Operation): Promise<User> {\n return await getRepository(User).findOne(operation.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() operation: Operation): Promise<User> {\n return await getRepository(User).findOne(operation.creatorId)\n }\n\n @FieldResolver(type => String)\n async thumbnail(@Root() operation: Operation): Promise<string | undefined> {\n const attachment: Attachment = await getRepository(Attachment).findOne({\n where: {\n domain: operation.domainId,\n refBy: operation.id\n }\n })\n\n return attachment?.fullpath\n }\n}\n"]}
|
|
@@ -1,108 +1,97 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
3
|
exports.OperationList = exports.OperationPatch = exports.NewOperation = void 0;
|
|
16
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const GraphQLUpload_js_1 = tslib_1.__importDefault(require("graphql-upload/GraphQLUpload.js"));
|
|
17
6
|
const type_graphql_1 = require("type-graphql");
|
|
18
7
|
const operation_1 = require("./operation");
|
|
19
8
|
let NewOperation = class NewOperation {
|
|
20
9
|
};
|
|
21
|
-
__decorate([
|
|
10
|
+
tslib_1.__decorate([
|
|
22
11
|
(0, type_graphql_1.Field)({ nullable: false }),
|
|
23
|
-
__metadata("design:type", String)
|
|
12
|
+
tslib_1.__metadata("design:type", String)
|
|
24
13
|
], NewOperation.prototype, "name", void 0);
|
|
25
|
-
__decorate([
|
|
14
|
+
tslib_1.__decorate([
|
|
26
15
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
27
|
-
__metadata("design:type", String)
|
|
16
|
+
tslib_1.__metadata("design:type", String)
|
|
28
17
|
], NewOperation.prototype, "description", void 0);
|
|
29
|
-
__decorate([
|
|
18
|
+
tslib_1.__decorate([
|
|
30
19
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
31
|
-
__metadata("design:type", String)
|
|
20
|
+
tslib_1.__metadata("design:type", String)
|
|
32
21
|
], NewOperation.prototype, "type", void 0);
|
|
33
|
-
__decorate([
|
|
22
|
+
tslib_1.__decorate([
|
|
34
23
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
35
|
-
__metadata("design:type", String)
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
36
25
|
], NewOperation.prototype, "operationStdChart", void 0);
|
|
37
|
-
__decorate([
|
|
26
|
+
tslib_1.__decorate([
|
|
38
27
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
39
|
-
__metadata("design:type", String)
|
|
28
|
+
tslib_1.__metadata("design:type", String)
|
|
40
29
|
], NewOperation.prototype, "operationStdTime", void 0);
|
|
41
|
-
__decorate([
|
|
30
|
+
tslib_1.__decorate([
|
|
42
31
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
43
|
-
__metadata("design:type", Boolean)
|
|
32
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
44
33
|
], NewOperation.prototype, "active", void 0);
|
|
45
|
-
__decorate([
|
|
34
|
+
tslib_1.__decorate([
|
|
46
35
|
(0, type_graphql_1.Field)(type => GraphQLUpload_js_1.default, { nullable: true }),
|
|
47
|
-
__metadata("design:type", Object)
|
|
36
|
+
tslib_1.__metadata("design:type", Object)
|
|
48
37
|
], NewOperation.prototype, "thumbnail", void 0);
|
|
49
|
-
NewOperation = __decorate([
|
|
38
|
+
NewOperation = tslib_1.__decorate([
|
|
50
39
|
(0, type_graphql_1.InputType)()
|
|
51
40
|
], NewOperation);
|
|
52
41
|
exports.NewOperation = NewOperation;
|
|
53
42
|
let OperationPatch = class OperationPatch {
|
|
54
43
|
};
|
|
55
|
-
__decorate([
|
|
44
|
+
tslib_1.__decorate([
|
|
56
45
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
57
|
-
__metadata("design:type", String)
|
|
46
|
+
tslib_1.__metadata("design:type", String)
|
|
58
47
|
], OperationPatch.prototype, "id", void 0);
|
|
59
|
-
__decorate([
|
|
48
|
+
tslib_1.__decorate([
|
|
60
49
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
61
|
-
__metadata("design:type", String)
|
|
50
|
+
tslib_1.__metadata("design:type", String)
|
|
62
51
|
], OperationPatch.prototype, "name", void 0);
|
|
63
|
-
__decorate([
|
|
52
|
+
tslib_1.__decorate([
|
|
64
53
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
65
|
-
__metadata("design:type", String)
|
|
54
|
+
tslib_1.__metadata("design:type", String)
|
|
66
55
|
], OperationPatch.prototype, "description", void 0);
|
|
67
|
-
__decorate([
|
|
56
|
+
tslib_1.__decorate([
|
|
68
57
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
69
|
-
__metadata("design:type", String)
|
|
58
|
+
tslib_1.__metadata("design:type", String)
|
|
70
59
|
], OperationPatch.prototype, "type", void 0);
|
|
71
|
-
__decorate([
|
|
60
|
+
tslib_1.__decorate([
|
|
72
61
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
-
__metadata("design:type", String)
|
|
62
|
+
tslib_1.__metadata("design:type", String)
|
|
74
63
|
], OperationPatch.prototype, "operationStdChart", void 0);
|
|
75
|
-
__decorate([
|
|
64
|
+
tslib_1.__decorate([
|
|
76
65
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
77
|
-
__metadata("design:type", String)
|
|
66
|
+
tslib_1.__metadata("design:type", String)
|
|
78
67
|
], OperationPatch.prototype, "operationStdTime", void 0);
|
|
79
|
-
__decorate([
|
|
68
|
+
tslib_1.__decorate([
|
|
80
69
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
81
|
-
__metadata("design:type", Boolean)
|
|
70
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
82
71
|
], OperationPatch.prototype, "active", void 0);
|
|
83
|
-
__decorate([
|
|
72
|
+
tslib_1.__decorate([
|
|
84
73
|
(0, type_graphql_1.Field)(type => GraphQLUpload_js_1.default, { nullable: true }),
|
|
85
|
-
__metadata("design:type", Object)
|
|
74
|
+
tslib_1.__metadata("design:type", Object)
|
|
86
75
|
], OperationPatch.prototype, "thumbnail", void 0);
|
|
87
|
-
__decorate([
|
|
76
|
+
tslib_1.__decorate([
|
|
88
77
|
(0, type_graphql_1.Field)(),
|
|
89
|
-
__metadata("design:type", String)
|
|
78
|
+
tslib_1.__metadata("design:type", String)
|
|
90
79
|
], OperationPatch.prototype, "cuFlag", void 0);
|
|
91
|
-
OperationPatch = __decorate([
|
|
80
|
+
OperationPatch = tslib_1.__decorate([
|
|
92
81
|
(0, type_graphql_1.InputType)()
|
|
93
82
|
], OperationPatch);
|
|
94
83
|
exports.OperationPatch = OperationPatch;
|
|
95
84
|
let OperationList = class OperationList {
|
|
96
85
|
};
|
|
97
|
-
__decorate([
|
|
86
|
+
tslib_1.__decorate([
|
|
98
87
|
(0, type_graphql_1.Field)(type => [operation_1.Operation]),
|
|
99
|
-
__metadata("design:type", Array)
|
|
88
|
+
tslib_1.__metadata("design:type", Array)
|
|
100
89
|
], OperationList.prototype, "items", void 0);
|
|
101
|
-
__decorate([
|
|
90
|
+
tslib_1.__decorate([
|
|
102
91
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
103
|
-
__metadata("design:type", Number)
|
|
92
|
+
tslib_1.__metadata("design:type", Number)
|
|
104
93
|
], OperationList.prototype, "total", void 0);
|
|
105
|
-
OperationList = __decorate([
|
|
94
|
+
OperationList = tslib_1.__decorate([
|
|
106
95
|
(0, type_graphql_1.ObjectType)()
|
|
107
96
|
], OperationList);
|
|
108
97
|
exports.OperationList = OperationList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-type.js","sourceRoot":"","sources":["../../../server/service/operation/operation-type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"operation-type.js","sourceRoot":"","sources":["../../../server/service/operation/operation-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAoE;AAEpE,2CAAuC;AAGvC,IAAa,YAAY,GAAzB,MAAa,YAAY;CAqBxB,CAAA;AAnBC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;0CACf;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACA;AAG1B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACD;AAGzB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACV;AAGhB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,0BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC3B;AApBX,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAqBxB;AArBY,oCAAY;AAwBzB,IAAa,cAAc,GAA3B,MAAa,cAAc;CA2B1B,CAAA;AAzBC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACd;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACA;AAG1B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACD;AAGzB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACV;AAGhB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,0BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAC3B;AAGtB;IADC,IAAA,oBAAK,GAAE;;8CACM;AA1BH,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CA2B1B;AA3BY,wCAAc;AA8B3B,IAAa,aAAa,GAA1B,MAAa,aAAa;CAMzB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAS,CAAC,CAAC;;4CACT;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;4CACN;AALF,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB;AANY,sCAAa","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Operation } from './operation'\n\n@InputType()\nexport class NewOperation {\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n type?: string\n\n @Field({ nullable: true })\n operationStdChart?: string\n\n @Field({ nullable: true })\n operationStdTime?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n}\n\n@InputType()\nexport class OperationPatch {\n @Field(type => ID, { nullable: true })\n id!: string\n\n @Field({ nullable: true })\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n type?: string\n\n @Field({ nullable: true })\n operationStdChart?: string\n\n @Field({ nullable: true })\n operationStdTime?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class OperationList {\n @Field(type => [Operation])\n items: Operation[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|