@things-factory/dataset 5.0.7 → 5.0.11
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/client/pages/data-key-set/data-key-set-list-page.js +1 -1
- package/dist-server/controllers/create-data-sample.js +2 -5
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/controllers/data-use-case.js.map +1 -1
- package/dist-server/controllers/index.js +3 -16
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/controllers/jasper-report.js +3 -5
- package/dist-server/controllers/jasper-report.js.map +1 -1
- package/dist-server/index.js +6 -19
- 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/data-item/data-item.js +49 -57
- package/dist-server/service/data-item/data-item.js.map +1 -1
- package/dist-server/service/data-item/index.js.map +1 -1
- package/dist-server/service/data-key-set/data-key-item-type.js +19 -27
- package/dist-server/service/data-key-set/data-key-item-type.js.map +1 -1
- package/dist-server/service/data-key-set/data-key-set-mutation.js +39 -50
- package/dist-server/service/data-key-set/data-key-set-mutation.js.map +1 -1
- package/dist-server/service/data-key-set/data-key-set-query.js +34 -45
- package/dist-server/service/data-key-set/data-key-set-query.js.map +1 -1
- package/dist-server/service/data-key-set/data-key-set-type.js +33 -44
- package/dist-server/service/data-key-set/data-key-set-type.js.map +1 -1
- package/dist-server/service/data-key-set/data-key-set.js +30 -38
- package/dist-server/service/data-key-set/data-key-set.js.map +1 -1
- package/dist-server/service/data-key-set/index.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-mutation.js +15 -26
- package/dist-server/service/data-ooc/data-ooc-mutation.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-query.js +39 -50
- package/dist-server/service/data-ooc/data-ooc-query.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-subscription.js +11 -24
- package/dist-server/service/data-ooc/data-ooc-subscription.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-type.js +43 -51
- package/dist-server/service/data-ooc/data-ooc-type.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc.js +79 -87
- package/dist-server/service/data-ooc/data-ooc.js.map +1 -1
- package/dist-server/service/data-ooc/index.js.map +1 -1
- package/dist-server/service/data-sample/data-sample-mutation.js +9 -21
- package/dist-server/service/data-sample/data-sample-mutation.js.map +1 -1
- package/dist-server/service/data-sample/data-sample-query.js +46 -57
- package/dist-server/service/data-sample/data-sample-query.js.map +1 -1
- package/dist-server/service/data-sample/data-sample-type.js +28 -36
- package/dist-server/service/data-sample/data-sample-type.js.map +1 -1
- package/dist-server/service/data-sample/data-sample.js +67 -75
- package/dist-server/service/data-sample/data-sample.js.map +1 -1
- package/dist-server/service/data-sample/index.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor-mutation.js +33 -44
- package/dist-server/service/data-sensor/data-sensor-mutation.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor-query.js +39 -50
- package/dist-server/service/data-sensor/data-sensor-query.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor-type.js +60 -68
- package/dist-server/service/data-sensor/data-sensor-type.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor.js +48 -56
- package/dist-server/service/data-sensor/data-sensor.js.map +1 -1
- package/dist-server/service/data-sensor/index.js.map +1 -1
- package/dist-server/service/data-set/data-item-type.js +43 -52
- package/dist-server/service/data-set/data-item-type.js.map +1 -1
- package/dist-server/service/data-set/data-set-mutation.js +45 -56
- package/dist-server/service/data-set/data-set-mutation.js.map +1 -1
- package/dist-server/service/data-set/data-set-query.js +91 -102
- package/dist-server/service/data-set/data-set-query.js.map +1 -1
- package/dist-server/service/data-set/data-set-type.js +90 -101
- package/dist-server/service/data-set/data-set-type.js.map +1 -1
- package/dist-server/service/data-set/data-set.js +67 -75
- package/dist-server/service/data-set/data-set.js.map +1 -1
- package/dist-server/service/data-set/index.js.map +1 -1
- package/dist-server/service/data-set-history/data-set-history-query.js +75 -72
- package/dist-server/service/data-set-history/data-set-history-query.js.map +1 -1
- package/dist-server/service/data-set-history/data-set-history-type.js +6 -14
- package/dist-server/service/data-set-history/data-set-history-type.js.map +1 -1
- package/dist-server/service/data-set-history/data-set-history.js +77 -75
- package/dist-server/service/data-set-history/data-set-history.js.map +1 -1
- package/dist-server/service/data-set-history/event-subscriber.js +2 -7
- package/dist-server/service/data-set-history/event-subscriber.js.map +1 -1
- package/dist-server/service/data-set-history/index.js.map +1 -1
- package/dist-server/service/data-spec/data-spec-manager.js.map +1 -1
- package/dist-server/service/data-spec/data-spec-query.js +11 -22
- package/dist-server/service/data-spec/data-spec-query.js.map +1 -1
- package/dist-server/service/data-spec/data-spec.js +26 -35
- package/dist-server/service/data-spec/data-spec.js.map +1 -1
- package/dist-server/service/data-spec/index.js.map +1 -1
- package/dist-server/service/index.js +9 -22
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +7 -7
- package/server/controllers/create-data-sample.ts +0 -2
- package/server/controllers/data-use-case.ts +2 -1
- package/server/routes.ts +0 -2
- package/server/service/data-item/data-item.ts +5 -4
- package/server/service/data-ooc/data-ooc-subscription.ts +6 -8
- package/server/service/data-ooc/data-ooc-type.ts +1 -1
- package/server/service/data-ooc/data-ooc.ts +4 -4
- package/server/service/data-sample/data-sample-mutation.ts +1 -4
- package/server/service/data-sample/data-sample-type.ts +1 -1
- package/server/service/data-sample/data-sample.ts +3 -3
- package/server/service/data-set/data-item-type.ts +4 -4
- package/server/service/data-set/data-set-type.ts +2 -2
- package/server/service/data-set/data-set.ts +2 -2
- package/server/service/data-set-history/data-set-history-query.ts +13 -2
- package/server/service/data-set-history/data-set-history.ts +9 -1
- package/server/service/data-spec/data-spec.ts +3 -2
- package/yarn-error.log +23244 -0
@@ -1,76 +1,68 @@
|
|
1
1
|
"use strict";
|
2
|
-
var
|
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 _a, _b;
|
2
|
+
var _a;
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
4
|
exports.DataSampleList = exports.NewDataSample = 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 data_sample_1 = require("./data-sample");
|
17
9
|
let NewDataSample = class NewDataSample {
|
18
10
|
};
|
19
|
-
__decorate([
|
11
|
+
tslib_1.__decorate([
|
20
12
|
(0, type_graphql_1.Field)({ nullable: true }),
|
21
|
-
__metadata("design:type", String)
|
13
|
+
tslib_1.__metadata("design:type", String)
|
22
14
|
], NewDataSample.prototype, "name", 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
|
], NewDataSample.prototype, "description", 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 (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
|
21
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
|
30
22
|
], NewDataSample.prototype, "dataSet", void 0);
|
31
|
-
__decorate([
|
23
|
+
tslib_1.__decorate([
|
32
24
|
(0, type_graphql_1.Field)({ nullable: true }),
|
33
|
-
__metadata("design:type", Number)
|
25
|
+
tslib_1.__metadata("design:type", Number)
|
34
26
|
], NewDataSample.prototype, "dataSetVersion", void 0);
|
35
|
-
__decorate([
|
27
|
+
tslib_1.__decorate([
|
36
28
|
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
37
|
-
__metadata("design:type",
|
29
|
+
tslib_1.__metadata("design:type", Object)
|
38
30
|
], NewDataSample.prototype, "data", 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
|
], NewDataSample.prototype, "rawData", void 0);
|
43
|
-
__decorate([
|
35
|
+
tslib_1.__decorate([
|
44
36
|
(0, type_graphql_1.Field)({ nullable: true }),
|
45
|
-
__metadata("design:type", String)
|
37
|
+
tslib_1.__metadata("design:type", String)
|
46
38
|
], NewDataSample.prototype, "source", void 0);
|
47
|
-
__decorate([
|
39
|
+
tslib_1.__decorate([
|
48
40
|
(0, type_graphql_1.Field)({ nullable: true }),
|
49
|
-
__metadata("design:type", String)
|
41
|
+
tslib_1.__metadata("design:type", String)
|
50
42
|
], NewDataSample.prototype, "workDate", void 0);
|
51
|
-
__decorate([
|
43
|
+
tslib_1.__decorate([
|
52
44
|
(0, type_graphql_1.Field)({ nullable: true }),
|
53
|
-
__metadata("design:type", String)
|
45
|
+
tslib_1.__metadata("design:type", String)
|
54
46
|
], NewDataSample.prototype, "workShift", void 0);
|
55
|
-
__decorate([
|
47
|
+
tslib_1.__decorate([
|
56
48
|
(0, type_graphql_1.Field)({ nullable: true }),
|
57
|
-
__metadata("design:type", Date)
|
49
|
+
tslib_1.__metadata("design:type", Date)
|
58
50
|
], NewDataSample.prototype, "collectedAt", void 0);
|
59
|
-
NewDataSample = __decorate([
|
51
|
+
NewDataSample = tslib_1.__decorate([
|
60
52
|
(0, type_graphql_1.InputType)()
|
61
53
|
], NewDataSample);
|
62
54
|
exports.NewDataSample = NewDataSample;
|
63
55
|
let DataSampleList = class DataSampleList {
|
64
56
|
};
|
65
|
-
__decorate([
|
57
|
+
tslib_1.__decorate([
|
66
58
|
(0, type_graphql_1.Field)(type => [data_sample_1.DataSample]),
|
67
|
-
__metadata("design:type", Array)
|
59
|
+
tslib_1.__metadata("design:type", Array)
|
68
60
|
], DataSampleList.prototype, "items", void 0);
|
69
|
-
__decorate([
|
61
|
+
tslib_1.__decorate([
|
70
62
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
71
|
-
__metadata("design:type", Number)
|
63
|
+
tslib_1.__metadata("design:type", Number)
|
72
64
|
], DataSampleList.prototype, "total", void 0);
|
73
|
-
DataSampleList = __decorate([
|
65
|
+
DataSampleList = tslib_1.__decorate([
|
74
66
|
(0, type_graphql_1.ObjectType)()
|
75
67
|
], DataSampleList);
|
76
68
|
exports.DataSampleList = DataSampleList;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-sample-type.js","sourceRoot":"","sources":["../../../server/service/data-sample/data-sample-type.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"data-sample-type.js","sourceRoot":"","sources":["../../../server/service/data-sample/data-sample-type.ts"],"names":[],"mappings":";;;;;AAAA,+CAAgE;AAEhE,iDAA+D;AAE/D,+CAA0C;AAG1C,IAAa,aAAa,GAA1B,MAAa,aAAa;CA8BzB,CAAA;AA5BC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DACnC,iBAAS,oBAAT,iBAAS;8CAAA;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACH;AAGvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACtC;AAGV;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACX;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACR;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACZ,IAAI;kDAAA;AA7BP,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CA8BzB;AA9BY,sCAAa;AAiC1B,IAAa,cAAc,GAA3B,MAAa,cAAc;CAM1B,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,wBAAU,CAAC,CAAC;;6CACT;AAGnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;6CACN;AALF,cAAc;IAD1B,IAAA,yBAAU,GAAE;GACA,cAAc,CAM1B;AANY,wCAAc","sourcesContent":["import { Field, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\n\nimport { DataSample } from './data-sample'\n\n@InputType()\nexport class NewDataSample {\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => ObjectRef, { nullable: true })\n dataSet?: ObjectRef\n\n @Field({ nullable: true })\n dataSetVersion?: number\n\n @Field(type => ScalarObject, { nullable: true })\n data?: any\n\n @Field({ nullable: true })\n rawData?: string\n\n @Field({ nullable: true })\n source?: string\n\n @Field({ nullable: true })\n workDate?: string\n\n @Field({ nullable: true })\n workShift?: string\n\n @Field({ nullable: true })\n collectedAt?: Date\n}\n\n@ObjectType()\nexport class DataSampleList {\n @Field(type => [DataSample])\n items: DataSample[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
@@ -1,16 +1,8 @@
|
|
1
1
|
"use strict";
|
2
|
-
var
|
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 _a, _b, _c, _d, _e, _f;
|
2
|
+
var _a, _b, _c;
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
4
|
exports.DataSample = void 0;
|
5
|
+
const tslib_1 = require("tslib");
|
14
6
|
const type_graphql_1 = require("type-graphql");
|
15
7
|
const typeorm_1 = require("typeorm");
|
16
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
@@ -29,80 +21,80 @@ let DataSample = class DataSample {
|
|
29
21
|
this.key05 = '';
|
30
22
|
}
|
31
23
|
};
|
32
|
-
__decorate([
|
24
|
+
tslib_1.__decorate([
|
33
25
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
34
26
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
35
|
-
__metadata("design:type", String)
|
27
|
+
tslib_1.__metadata("design:type", String)
|
36
28
|
], DataSample.prototype, "id", void 0);
|
37
|
-
__decorate([
|
29
|
+
tslib_1.__decorate([
|
38
30
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
39
31
|
(0, type_graphql_1.Field)({ nullable: true }),
|
40
|
-
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
32
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
41
33
|
], DataSample.prototype, "domain", void 0);
|
42
|
-
__decorate([
|
34
|
+
tslib_1.__decorate([
|
43
35
|
(0, typeorm_1.RelationId)((dataSample) => dataSample.domain),
|
44
|
-
__metadata("design:type", String)
|
36
|
+
tslib_1.__metadata("design:type", String)
|
45
37
|
], DataSample.prototype, "domainId", void 0);
|
46
|
-
__decorate([
|
38
|
+
tslib_1.__decorate([
|
47
39
|
(0, typeorm_1.Column)(),
|
48
40
|
(0, type_graphql_1.Field)(),
|
49
|
-
__metadata("design:type", String)
|
41
|
+
tslib_1.__metadata("design:type", String)
|
50
42
|
], DataSample.prototype, "name", void 0);
|
51
|
-
__decorate([
|
43
|
+
tslib_1.__decorate([
|
52
44
|
(0, typeorm_1.Column)({
|
53
45
|
nullable: true
|
54
46
|
}),
|
55
47
|
(0, type_graphql_1.Field)({ nullable: true }),
|
56
|
-
__metadata("design:type", String)
|
48
|
+
tslib_1.__metadata("design:type", String)
|
57
49
|
], DataSample.prototype, "description", void 0);
|
58
|
-
__decorate([
|
50
|
+
tslib_1.__decorate([
|
59
51
|
(0, typeorm_1.Column)({
|
60
52
|
nullable: true
|
61
53
|
}),
|
62
54
|
(0, type_graphql_1.Field)({ nullable: true }),
|
63
|
-
__metadata("design:type", String)
|
55
|
+
tslib_1.__metadata("design:type", String)
|
64
56
|
], DataSample.prototype, "type", void 0);
|
65
|
-
__decorate([
|
57
|
+
tslib_1.__decorate([
|
66
58
|
(0, typeorm_1.Column)({
|
67
59
|
nullable: true
|
68
60
|
}),
|
69
61
|
(0, type_graphql_1.Field)({ nullable: true }),
|
70
|
-
__metadata("design:type", String)
|
62
|
+
tslib_1.__metadata("design:type", String)
|
71
63
|
], DataSample.prototype, "useCase", void 0);
|
72
|
-
__decorate([
|
64
|
+
tslib_1.__decorate([
|
73
65
|
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
74
66
|
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
75
|
-
__metadata("design:type",
|
67
|
+
tslib_1.__metadata("design:type", Object)
|
76
68
|
], DataSample.prototype, "partitionKeys", void 0);
|
77
|
-
__decorate([
|
69
|
+
tslib_1.__decorate([
|
78
70
|
(0, typeorm_1.ManyToOne)(type => data_set_1.DataSet),
|
79
71
|
(0, type_graphql_1.Field)(type => data_set_1.DataSet, { nullable: false }),
|
80
|
-
__metadata("design:type", data_set_1.DataSet)
|
72
|
+
tslib_1.__metadata("design:type", data_set_1.DataSet)
|
81
73
|
], DataSample.prototype, "dataSet", void 0);
|
82
|
-
__decorate([
|
74
|
+
tslib_1.__decorate([
|
83
75
|
(0, typeorm_1.RelationId)((dataSample) => dataSample.dataSet),
|
84
|
-
__metadata("design:type", String)
|
76
|
+
tslib_1.__metadata("design:type", String)
|
85
77
|
], DataSample.prototype, "dataSetId", void 0);
|
86
|
-
__decorate([
|
78
|
+
tslib_1.__decorate([
|
87
79
|
(0, typeorm_1.Column)({ nullable: true }),
|
88
80
|
(0, type_graphql_1.Field)({ nullable: true }),
|
89
|
-
__metadata("design:type", Number)
|
81
|
+
tslib_1.__metadata("design:type", Number)
|
90
82
|
], DataSample.prototype, "dataSetVersion", void 0);
|
91
|
-
__decorate([
|
83
|
+
tslib_1.__decorate([
|
92
84
|
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
93
85
|
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
94
|
-
__metadata("design:type",
|
86
|
+
tslib_1.__metadata("design:type", Object)
|
95
87
|
], DataSample.prototype, "data", void 0);
|
96
|
-
__decorate([
|
88
|
+
tslib_1.__decorate([
|
97
89
|
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
98
90
|
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
99
|
-
__metadata("design:type",
|
91
|
+
tslib_1.__metadata("design:type", Object)
|
100
92
|
], DataSample.prototype, "judgment", void 0);
|
101
|
-
__decorate([
|
93
|
+
tslib_1.__decorate([
|
102
94
|
(0, type_graphql_1.Field)(type => [data_item_type_1.DataItem], { nullable: true }),
|
103
|
-
__metadata("design:type", Array)
|
95
|
+
tslib_1.__metadata("design:type", Array)
|
104
96
|
], DataSample.prototype, "dataItems", void 0);
|
105
|
-
__decorate([
|
97
|
+
tslib_1.__decorate([
|
106
98
|
(0, typeorm_1.Column)({
|
107
99
|
nullable: true,
|
108
100
|
type: DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
|
@@ -112,102 +104,102 @@ __decorate([
|
|
112
104
|
: 'varchar'
|
113
105
|
}),
|
114
106
|
(0, type_graphql_1.Field)({ nullable: true }),
|
115
|
-
__metadata("design:type", String)
|
107
|
+
tslib_1.__metadata("design:type", String)
|
116
108
|
], DataSample.prototype, "rawData", void 0);
|
117
|
-
__decorate([
|
109
|
+
tslib_1.__decorate([
|
118
110
|
(0, typeorm_1.Column)({
|
119
111
|
nullable: true
|
120
112
|
}),
|
121
113
|
(0, type_graphql_1.Field)({ nullable: true }),
|
122
|
-
__metadata("design:type", String)
|
114
|
+
tslib_1.__metadata("design:type", String)
|
123
115
|
], DataSample.prototype, "source", void 0);
|
124
|
-
__decorate([
|
116
|
+
tslib_1.__decorate([
|
125
117
|
(0, typeorm_1.Column)({
|
126
118
|
nullable: true
|
127
119
|
}),
|
128
120
|
(0, type_graphql_1.Field)({ nullable: true }),
|
129
|
-
__metadata("design:type", Boolean)
|
121
|
+
tslib_1.__metadata("design:type", Boolean)
|
130
122
|
], DataSample.prototype, "ooc", void 0);
|
131
|
-
__decorate([
|
123
|
+
tslib_1.__decorate([
|
132
124
|
(0, typeorm_1.Column)({
|
133
125
|
nullable: true
|
134
126
|
}),
|
135
127
|
(0, type_graphql_1.Field)({ nullable: true }),
|
136
|
-
__metadata("design:type", Boolean)
|
128
|
+
tslib_1.__metadata("design:type", Boolean)
|
137
129
|
], DataSample.prototype, "oos", void 0);
|
138
|
-
__decorate([
|
130
|
+
tslib_1.__decorate([
|
139
131
|
(0, typeorm_1.Column)({ nullable: true, default: '' }),
|
140
132
|
(0, type_graphql_1.Field)({ nullable: true }),
|
141
|
-
__metadata("design:type", String)
|
133
|
+
tslib_1.__metadata("design:type", String)
|
142
134
|
], DataSample.prototype, "key01", void 0);
|
143
|
-
__decorate([
|
135
|
+
tslib_1.__decorate([
|
144
136
|
(0, typeorm_1.Column)({ nullable: true, default: '' }),
|
145
137
|
(0, type_graphql_1.Field)({ nullable: true }),
|
146
|
-
__metadata("design:type", String)
|
138
|
+
tslib_1.__metadata("design:type", String)
|
147
139
|
], DataSample.prototype, "key02", void 0);
|
148
|
-
__decorate([
|
140
|
+
tslib_1.__decorate([
|
149
141
|
(0, typeorm_1.Column)({ nullable: true, default: '' }),
|
150
142
|
(0, type_graphql_1.Field)({ nullable: true }),
|
151
|
-
__metadata("design:type", String)
|
143
|
+
tslib_1.__metadata("design:type", String)
|
152
144
|
], DataSample.prototype, "key03", void 0);
|
153
|
-
__decorate([
|
145
|
+
tslib_1.__decorate([
|
154
146
|
(0, typeorm_1.Column)({ nullable: true, default: '' }),
|
155
147
|
(0, type_graphql_1.Field)({ nullable: true }),
|
156
|
-
__metadata("design:type", String)
|
148
|
+
tslib_1.__metadata("design:type", String)
|
157
149
|
], DataSample.prototype, "key04", void 0);
|
158
|
-
__decorate([
|
150
|
+
tslib_1.__decorate([
|
159
151
|
(0, typeorm_1.Column)({ nullable: true, default: '' }),
|
160
152
|
(0, type_graphql_1.Field)({ nullable: true }),
|
161
|
-
__metadata("design:type", String)
|
153
|
+
tslib_1.__metadata("design:type", String)
|
162
154
|
], DataSample.prototype, "key05", void 0);
|
163
|
-
__decorate([
|
155
|
+
tslib_1.__decorate([
|
164
156
|
(0, typeorm_1.Column)({ nullable: true }),
|
165
157
|
(0, type_graphql_1.Field)({ nullable: true }),
|
166
|
-
__metadata("design:type", String)
|
158
|
+
tslib_1.__metadata("design:type", String)
|
167
159
|
], DataSample.prototype, "workDate", void 0);
|
168
|
-
__decorate([
|
160
|
+
tslib_1.__decorate([
|
169
161
|
(0, typeorm_1.Column)({ nullable: true }),
|
170
162
|
(0, type_graphql_1.Field)({ nullable: true }),
|
171
|
-
__metadata("design:type", String)
|
163
|
+
tslib_1.__metadata("design:type", String)
|
172
164
|
], DataSample.prototype, "workShift", void 0);
|
173
|
-
__decorate([
|
165
|
+
tslib_1.__decorate([
|
174
166
|
(0, typeorm_1.Column)({ nullable: true }),
|
175
167
|
(0, type_graphql_1.Field)({ nullable: true }),
|
176
|
-
__metadata("design:type", Date)
|
168
|
+
tslib_1.__metadata("design:type", Date)
|
177
169
|
], DataSample.prototype, "collectedAt", void 0);
|
178
|
-
__decorate([
|
170
|
+
tslib_1.__decorate([
|
179
171
|
(0, typeorm_1.CreateDateColumn)(),
|
180
172
|
(0, type_graphql_1.Field)({ nullable: true }),
|
181
|
-
__metadata("design:type", Date)
|
173
|
+
tslib_1.__metadata("design:type", Date)
|
182
174
|
], DataSample.prototype, "createdAt", void 0);
|
183
|
-
__decorate([
|
175
|
+
tslib_1.__decorate([
|
184
176
|
(0, typeorm_1.UpdateDateColumn)(),
|
185
177
|
(0, type_graphql_1.Field)({ nullable: true }),
|
186
|
-
__metadata("design:type", Date)
|
178
|
+
tslib_1.__metadata("design:type", Date)
|
187
179
|
], DataSample.prototype, "updatedAt", void 0);
|
188
|
-
__decorate([
|
180
|
+
tslib_1.__decorate([
|
189
181
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
190
182
|
nullable: true
|
191
183
|
}),
|
192
184
|
(0, type_graphql_1.Field)({ nullable: true }),
|
193
|
-
__metadata("design:type", typeof (
|
185
|
+
tslib_1.__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
|
194
186
|
], DataSample.prototype, "creator", void 0);
|
195
|
-
__decorate([
|
187
|
+
tslib_1.__decorate([
|
196
188
|
(0, typeorm_1.RelationId)((dataSample) => dataSample.creator),
|
197
|
-
__metadata("design:type", String)
|
189
|
+
tslib_1.__metadata("design:type", String)
|
198
190
|
], DataSample.prototype, "creatorId", void 0);
|
199
|
-
__decorate([
|
191
|
+
tslib_1.__decorate([
|
200
192
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
201
193
|
nullable: true
|
202
194
|
}),
|
203
195
|
(0, type_graphql_1.Field)({ nullable: true }),
|
204
|
-
__metadata("design:type", typeof (
|
196
|
+
tslib_1.__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
205
197
|
], DataSample.prototype, "updater", void 0);
|
206
|
-
__decorate([
|
198
|
+
tslib_1.__decorate([
|
207
199
|
(0, typeorm_1.RelationId)((dataSample) => dataSample.creator),
|
208
|
-
__metadata("design:type", String)
|
200
|
+
tslib_1.__metadata("design:type", String)
|
209
201
|
], DataSample.prototype, "updaterId", void 0);
|
210
|
-
DataSample = __decorate([
|
202
|
+
DataSample = tslib_1.__decorate([
|
211
203
|
(0, typeorm_1.Entity)(),
|
212
204
|
(0, typeorm_1.Index)('ix_data_sample_0', (dataSample) => [
|
213
205
|
dataSample.domain,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-sample.js","sourceRoot":"","sources":["../../../server/service/data-sample/data-sample.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"data-sample.js","sourceRoot":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UAAU,CAAC,OAAO,CAAC;;6CACzC;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;2CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;;6CACzC;AAlJP,UAAU;IAbtB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,kBAAkB,EAClB,CAAC,UAAsB,EAAE,EAAE,CAAC;QAC1B,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,WAAW;KACvB,EACD,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;GACxC,UAAU,CAmJtB;AAnJY,gCAAU","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { Domain, ScalarObject } from '@things-factory/shell'\n\nimport { DataItem } from '../data-set/data-item-type'\nimport { DataSet } from '../data-set/data-set'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n@Entity()\n@Index(\n 'ix_data_sample_0',\n (dataSample: DataSample) => [\n dataSample.domain,\n dataSample.dataSet,\n dataSample.workDate,\n dataSample.workShift,\n dataSample.collectedAt\n ],\n { unique: false }\n)\n@ObjectType({ description: 'Entity for DataSample' })\nexport class DataSample {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((dataSample: DataSample) => dataSample.domain)\n domainId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n type?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n useCase?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true })\n partitionKeys?: { [key: string]: any }\n\n @ManyToOne(type => DataSet)\n @Field(type => DataSet, { nullable: false })\n dataSet?: DataSet\n\n @RelationId((dataSample: DataSample) => dataSample.dataSet)\n dataSetId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n dataSetVersion?: number\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true })\n data?: any\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true })\n judgment?: any\n\n @Field(type => [DataItem], { nullable: true })\n dataItems?: DataItem[]\n\n @Column({\n nullable: true,\n type:\n DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'longtext'\n : DATABASE_TYPE == 'oracle'\n ? 'clob'\n : 'varchar'\n })\n @Field({ nullable: true })\n rawData?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n source?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n ooc?: boolean\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n oos?: boolean\n\n @Column({ nullable: true, default: '' })\n @Field({ nullable: true })\n key01?: string = ''\n\n @Column({ nullable: true, default: '' })\n @Field({ nullable: true })\n key02?: string = ''\n\n @Column({ nullable: true, default: '' })\n @Field({ nullable: true })\n key03?: string = ''\n\n @Column({ nullable: true, default: '' })\n @Field({ nullable: true })\n key04?: string = ''\n\n @Column({ nullable: true, default: '' })\n @Field({ nullable: true })\n key05?: string = ''\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n workDate?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n workShift?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n collectedAt?: Date\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((dataSample: DataSample) => dataSample.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((dataSample: DataSample) => dataSample.creator)\n updaterId?: string\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/data-sample/index.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAC1C,2DAAqD;AACrD,iEAA2D;AAE9C,QAAA,QAAQ,GAAG,CAAC,wBAAU,CAAC,CAAA;AACvB,QAAA,SAAS,GAAG,CAAC,mCAAe,EAAE,yCAAkB,CAAC,CAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/data-sample/index.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAC1C,2DAAqD;AACrD,iEAA2D;AAE9C,QAAA,QAAQ,GAAG,CAAC,wBAAU,CAAC,CAAA;AACvB,QAAA,SAAS,GAAG,CAAC,mCAAe,EAAE,yCAAkB,CAAC,CAAA","sourcesContent":["import { DataSample } from './data-sample'\nimport { DataSampleQuery } from './data-sample-query'\nimport { DataSampleMutation } from './data-sample-mutation'\n\nexport const entities = [DataSample]\nexport const resolvers = [DataSampleQuery, DataSampleMutation]\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.DataSensorMutation = 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 data_sensor_1 = require("./data-sensor");
|
@@ -67,53 +56,53 @@ let DataSensorMutation = class DataSensorMutation {
|
|
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 => data_sensor_1.DataSensor, { description: 'To create new DataSensor' }),
|
73
|
-
__param(0, (0, type_graphql_1.Arg)('dataSensor')),
|
74
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
75
|
-
__metadata("design:type", Function),
|
76
|
-
__metadata("design:paramtypes", [data_sensor_type_1.NewDataSensor, Object]),
|
77
|
-
__metadata("design:returntype", Promise)
|
62
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('dataSensor')),
|
63
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
64
|
+
tslib_1.__metadata("design:type", Function),
|
65
|
+
tslib_1.__metadata("design:paramtypes", [data_sensor_type_1.NewDataSensor, Object]),
|
66
|
+
tslib_1.__metadata("design:returntype", Promise)
|
78
67
|
], DataSensorMutation.prototype, "createDataSensor", null);
|
79
|
-
__decorate([
|
68
|
+
tslib_1.__decorate([
|
80
69
|
(0, type_graphql_1.Directive)('@transaction'),
|
81
70
|
(0, type_graphql_1.Mutation)(returns => data_sensor_1.DataSensor, { description: 'To modify DataSensor 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, data_sensor_type_1.DataSensorPatch, 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, data_sensor_type_1.DataSensorPatch, Object]),
|
76
|
+
tslib_1.__metadata("design:returntype", Promise)
|
88
77
|
], DataSensorMutation.prototype, "updateDataSensor", null);
|
89
|
-
__decorate([
|
78
|
+
tslib_1.__decorate([
|
90
79
|
(0, type_graphql_1.Directive)('@transaction'),
|
91
80
|
(0, type_graphql_1.Mutation)(returns => [data_sensor_1.DataSensor], { description: "To modify multiple DataSensors' information" }),
|
92
|
-
__param(0, (0, type_graphql_1.Arg)('patches', type => [data_sensor_type_1.DataSensorPatch])),
|
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 => [data_sensor_type_1.DataSensorPatch])),
|
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
|
], DataSensorMutation.prototype, "updateMultipleDataSensor", 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 DataSensor' }),
|
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
|
], DataSensorMutation.prototype, "deleteDataSensor", 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 dataSensors' }),
|
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
|
], DataSensorMutation.prototype, "deleteDataSensors", null);
|
116
|
-
DataSensorMutation = __decorate([
|
105
|
+
DataSensorMutation = tslib_1.__decorate([
|
117
106
|
(0, type_graphql_1.Resolver)(data_sensor_1.DataSensor)
|
118
107
|
], DataSensorMutation);
|
119
108
|
exports.DataSensorMutation = DataSensorMutation;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-sensor-mutation.js","sourceRoot":"","sources":["../../../server/service/data-sensor/data-sensor-mutation.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"data-sensor-mutation.js","sourceRoot":"","sources":["../../../server/service/data-sensor/data-sensor-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,+CAA0C;AAC1C,yDAAmE;AAGnE,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;IAG7B,KAAK,CAAC,gBAAgB,CAAoB,UAAyB,EAAS,OAAY;QACtF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,wBAAU,CAAC,CAAC,IAAI,iCACzC,UAAU,KACb,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAID,KAAK,CAAC,gBAAgB,CACT,EAAU,EACP,KAAsB,EAC7B,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,wBAAU,CAAC,CAAA;QAC/C,MAAM,UAAU,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CA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type-graphql'\nimport { In } from 'typeorm'\n\nimport { DataSensor } from './data-sensor'\nimport { DataSensorPatch, NewDataSensor } from './data-sensor-type'\n\n@Resolver(DataSensor)\nexport class DataSensorMutation {\n @Directive('@transaction')\n @Mutation(returns => DataSensor, { description: 'To create new DataSensor' })\n async createDataSensor(@Arg('dataSensor') dataSensor: NewDataSensor, @Ctx() context: any): Promise<DataSensor> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(DataSensor).save({\n ...dataSensor,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => DataSensor, { description: 'To modify DataSensor information' })\n async updateDataSensor(\n @Arg('id') id: string,\n @Arg('patch') patch: DataSensorPatch,\n @Ctx() context: any\n ): Promise<DataSensor> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(DataSensor)\n const dataSensor = await repository.findOne({\n where: { domain, id }\n })\n\n return await repository.save({\n ...dataSensor,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [DataSensor], { description: \"To modify multiple DataSensors' information\" })\n async updateMultipleDataSensor(\n @Arg('patches', type => [DataSensorPatch]) patches: DataSensorPatch[],\n @Ctx() context: any\n ): Promise<DataSensor[]> {\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 dataSensorRepo = tx.getRepository(DataSensor)\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 dataSensorRepo.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 dataSensor = await dataSensorRepo.findOne(newRecord.id)\n\n const result = await dataSensorRepo.save({\n ...dataSensor,\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 DataSensor' })\n async deleteDataSensor(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(DataSensor).delete({ domain, id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple dataSensors' })\n async deleteDataSensors(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(DataSensor).delete({\n domain,\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|