@things-factory/dataset 9.0.1 → 9.0.3
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/service/data-archive/data-archive-mutation.js +18 -6
- package/dist-server/service/data-archive/data-archive-mutation.js.map +1 -1
- package/dist-server/service/data-archive/data-archive-query.js +15 -5
- package/dist-server/service/data-archive/data-archive-query.js.map +1 -1
- package/dist-server/service/data-archive/data-archive-type.js +11 -8
- package/dist-server/service/data-archive/data-archive-type.js.map +1 -1
- package/dist-server/service/data-archive/data-archive.js +10 -5
- package/dist-server/service/data-archive/data-archive.js.map +1 -1
- package/dist-server/service/data-key-set/data-key-item-type.js +10 -8
- 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 +18 -6
- 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 +19 -6
- 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 +17 -11
- 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 +8 -3
- package/dist-server/service/data-key-set/data-key-set.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-mutation.js +6 -2
- package/dist-server/service/data-ooc/data-ooc-mutation.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-query.js +27 -9
- package/dist-server/service/data-ooc/data-ooc-query.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-subscription.d.ts +5 -0
- package/dist-server/service/data-ooc/data-ooc-subscription.js +15 -1
- package/dist-server/service/data-ooc/data-ooc-subscription.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-type.js +29 -20
- package/dist-server/service/data-ooc/data-ooc-type.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc.js +11 -6
- package/dist-server/service/data-ooc/data-ooc.js.map +1 -1
- package/dist-server/service/data-sample/data-sample-mutation.js +3 -1
- package/dist-server/service/data-sample/data-sample-mutation.js.map +1 -1
- package/dist-server/service/data-sample/data-sample-query.js +24 -8
- package/dist-server/service/data-sample/data-sample-query.js.map +1 -1
- package/dist-server/service/data-sample/data-sample-type.js +13 -13
- package/dist-server/service/data-sample/data-sample-type.js.map +1 -1
- package/dist-server/service/data-sample/data-sample.js +11 -6
- package/dist-server/service/data-sample/data-sample.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor-mutation.js +15 -5
- package/dist-server/service/data-sensor/data-sensor-mutation.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor-query.js +24 -8
- package/dist-server/service/data-sensor/data-sensor-query.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor-type.js +19 -19
- package/dist-server/service/data-sensor/data-sensor-type.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor.js +11 -9
- package/dist-server/service/data-sensor/data-sensor.js.map +1 -1
- package/dist-server/service/data-set/data-set-mutation.js +25 -9
- package/dist-server/service/data-set/data-set-mutation.js.map +1 -1
- package/dist-server/service/data-set/data-set-query.js +24 -8
- package/dist-server/service/data-set/data-set-query.js.map +1 -1
- package/dist-server/service/data-set/data-set-type.js +3 -1
- package/dist-server/service/data-set/data-set-type.js.map +1 -1
- package/dist-server/service/data-set-history/data-set-history-type.js +3 -3
- 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 +56 -37
- package/dist-server/service/data-set-history/data-set-history.js.map +1 -1
- package/dist-server/service/data-spec/data-spec.js +24 -14
- package/dist-server/service/data-spec/data-spec.js.map +1 -1
- package/dist-server/service/data-summary/data-summary-mutation.js +6 -2
- package/dist-server/service/data-summary/data-summary-mutation.js.map +1 -1
- package/dist-server/service/data-summary/data-summary-query.js +25 -8
- package/dist-server/service/data-summary/data-summary-query.js.map +1 -1
- package/dist-server/service/data-summary/data-summary-type.js +25 -23
- package/dist-server/service/data-summary/data-summary-type.js.map +1 -1
- package/dist-server/service/data-summary/data-summary.js +8 -6
- package/dist-server/service/data-summary/data-summary.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -11
@@ -25,7 +25,7 @@ let DataSample = class DataSample {
|
|
25
25
|
exports.DataSample = DataSample;
|
26
26
|
tslib_1.__decorate([
|
27
27
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
28
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
28
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier for the data sample.' }),
|
29
29
|
tslib_1.__metadata("design:type", String)
|
30
30
|
], DataSample.prototype, "id", void 0);
|
31
31
|
tslib_1.__decorate([
|
@@ -78,12 +78,15 @@ tslib_1.__decorate([
|
|
78
78
|
], DataSample.prototype, "dataSetVersion", void 0);
|
79
79
|
tslib_1.__decorate([
|
80
80
|
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
81
|
-
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
81
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true, description: 'The actual collected data values for this sample.' }),
|
82
82
|
tslib_1.__metadata("design:type", Object)
|
83
83
|
], DataSample.prototype, "data", void 0);
|
84
84
|
tslib_1.__decorate([
|
85
85
|
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
86
|
-
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
|
86
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
|
87
|
+
nullable: true,
|
88
|
+
description: 'Quality judgment results for this sample, including pass/fail status and any automated analysis results.'
|
89
|
+
}),
|
87
90
|
tslib_1.__metadata("design:type", Object)
|
88
91
|
], DataSample.prototype, "judgment", void 0);
|
89
92
|
tslib_1.__decorate([
|
@@ -113,12 +116,12 @@ tslib_1.__decorate([
|
|
113
116
|
], DataSample.prototype, "source", void 0);
|
114
117
|
tslib_1.__decorate([
|
115
118
|
(0, typeorm_1.Column)({ nullable: true }),
|
116
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
119
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Indicates if this sample is out of control (OOC).' }),
|
117
120
|
tslib_1.__metadata("design:type", Boolean)
|
118
121
|
], DataSample.prototype, "ooc", void 0);
|
119
122
|
tslib_1.__decorate([
|
120
123
|
(0, typeorm_1.Column)({ nullable: true }),
|
121
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
124
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Indicates if this sample is out of specification (OOS).' }),
|
122
125
|
tslib_1.__metadata("design:type", Boolean)
|
123
126
|
], DataSample.prototype, "oos", void 0);
|
124
127
|
tslib_1.__decorate([
|
@@ -216,6 +219,8 @@ exports.DataSample = DataSample = tslib_1.__decorate([
|
|
216
219
|
unique: false
|
217
220
|
}),
|
218
221
|
(0, typeorm_1.Index)('ix_data_sample_1', (dataSample) => [dataSample.domain, dataSample.dataSet, dataSample.collectedAt], { unique: false }),
|
219
|
-
(0, type_graphql_1.ObjectType)({
|
222
|
+
(0, type_graphql_1.ObjectType)({
|
223
|
+
description: 'Represents a single collected data sample, including values, metadata, judgment results, and links to the dataset and workflow activities.'
|
224
|
+
})
|
220
225
|
], DataSample);
|
221
226
|
//# sourceMappingURL=data-sample.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-sample.js","sourceRoot":"","sources":["../../../server/service/data-sample/data-sample.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAWgB;AAEhB,yDAAgD;AAChD,6CAA4C;AAC5C,iDAA8E;AAC9E,uDAA2D;AAE3D,qEAAwD;AACxD,yDAAiD;AACjD,yDAAiD;AAEjD,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAqB7B,IAAM,UAAU,GAAhB,MAAM,UAAU;IAAh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AAC,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,EAC3F,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;GACxC,UAAU,CAmJtB","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n JoinColumn,\n ManyToOne,\n OneToOne,\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, json5Transformer } from '@things-factory/shell'\nimport { ActivityInstance } from '@things-factory/worklist'\n\nimport { DataItem } from '../data-set/data-item-type.js'\nimport { DataSet } from '../data-set/data-set.js'\nimport { DataOoc } from '../data-ooc/data-ooc.js'\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 {\n unique: false\n }\n)\n@Index(\n 'ix_data_sample_1',\n (dataSample: DataSample) => [dataSample.domain, dataSample.dataSet, dataSample.collectedAt],\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(type => Domain)\n domain?: Domain\n\n @RelationId((dataSample: DataSample) => dataSample.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n type?: string\n\n @Column({ nullable: true })\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 : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n length: DATABASE_TYPE == 'mssql' ? 'MAX' : undefined,\n transformer: json5Transformer\n })\n @Field({ nullable: true })\n rawData?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n source?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n ooc?: boolean\n\n @Column({ nullable: true })\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 @OneToOne(type => ActivityInstance, { nullable: true })\n @JoinColumn()\n @Field({ nullable: true })\n reviewActivityInstance?: ActivityInstance\n\n @RelationId((dataSample: DataSample) => dataSample.reviewActivityInstance)\n reviewActivityInstanceId?: string\n\n @OneToOne(type => DataOoc, dataOoc => dataOoc.dataSample, { nullable: true })\n @Field(type => DataOoc, { nullable: true })\n dataOoc?: DataOoc\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, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((dataSample: DataSample) => dataSample.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((dataSample: DataSample) => dataSample.updater)\n updaterId?: string\n}\n"]}
|
1
|
+
{"version":3,"file":"data-sample.js","sourceRoot":"","sources":["../../../server/service/data-sample/data-sample.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAWgB;AAEhB,yDAAgD;AAChD,6CAA4C;AAC5C,iDAA8E;AAC9E,uDAA2D;AAE3D,qEAAwD;AACxD,yDAAiD;AACjD,yDAAiD;AAEjD,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAwB7B,IAAM,UAAU,GAAhB,MAAM,UAAU;IAAhB;QAwFL,UAAK,GAAY,EAAE,CAAA;QAInB,UAAK,GAAY,EAAE,CAAA;QAInB,UAAK,GAAY,EAAE,CAAA;QAInB,UAAK,GAAY,EAAE,CAAA;QAInB,UAAK,GAAY,EAAE,CAAA;IA+CrB,CAAC;CAAA,CAAA;AAvJY,gCAAU;AAGZ;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;;sCAC1D;AAInB;IAFC,IAAA,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, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n JoinColumn,\n ManyToOne,\n OneToOne,\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, json5Transformer } from '@things-factory/shell'\nimport { ActivityInstance } from '@things-factory/worklist'\n\nimport { DataItem } from '../data-set/data-item-type.js'\nimport { DataSet } from '../data-set/data-set.js'\nimport { DataOoc } from '../data-ooc/data-ooc.js'\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 {\n unique: false\n }\n)\n@Index(\n 'ix_data_sample_1',\n (dataSample: DataSample) => [dataSample.domain, dataSample.dataSet, dataSample.collectedAt],\n { unique: false }\n)\n@ObjectType({\n description:\n 'Represents a single collected data sample, including values, metadata, judgment results, and links to the dataset and workflow activities.'\n})\nexport class DataSample {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the data sample.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((dataSample: DataSample) => dataSample.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n type?: string\n\n @Column({ nullable: true })\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, description: 'The actual collected data values for this sample.' })\n data?: any\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, {\n nullable: true,\n description:\n 'Quality judgment results for this sample, including pass/fail status and any automated analysis results.'\n })\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 : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n length: DATABASE_TYPE == 'mssql' ? 'MAX' : undefined,\n transformer: json5Transformer\n })\n @Field({ nullable: true })\n rawData?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n source?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Indicates if this sample is out of control (OOC).' })\n ooc?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Indicates if this sample is out of specification (OOS).' })\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 @OneToOne(type => ActivityInstance, { nullable: true })\n @JoinColumn()\n @Field({ nullable: true })\n reviewActivityInstance?: ActivityInstance\n\n @RelationId((dataSample: DataSample) => dataSample.reviewActivityInstance)\n reviewActivityInstanceId?: string\n\n @OneToOne(type => DataOoc, dataOoc => dataOoc.dataSample, { nullable: true })\n @Field(type => DataOoc, { nullable: true })\n dataOoc?: DataOoc\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, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((dataSample: DataSample) => dataSample.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((dataSample: DataSample) => dataSample.updater)\n updaterId?: string\n}\n"]}
|
@@ -77,7 +77,9 @@ let DataSensorMutation = class DataSensorMutation {
|
|
77
77
|
exports.DataSensorMutation = DataSensorMutation;
|
78
78
|
tslib_1.__decorate([
|
79
79
|
(0, type_graphql_1.Directive)('@transaction'),
|
80
|
-
(0, type_graphql_1.Mutation)(returns => data_sensor_js_1.DataSensor, {
|
80
|
+
(0, type_graphql_1.Mutation)(returns => data_sensor_js_1.DataSensor, {
|
81
|
+
description: 'Creates a new data sensor configuration for automated data collection. This mutation sets up the connection between hardware devices and datasets.'
|
82
|
+
}),
|
81
83
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('dataSensor')),
|
82
84
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
83
85
|
tslib_1.__metadata("design:type", Function),
|
@@ -86,7 +88,9 @@ tslib_1.__decorate([
|
|
86
88
|
], DataSensorMutation.prototype, "createDataSensor", null);
|
87
89
|
tslib_1.__decorate([
|
88
90
|
(0, type_graphql_1.Directive)('@transaction'),
|
89
|
-
(0, type_graphql_1.Mutation)(returns => data_sensor_js_1.DataSensor, {
|
91
|
+
(0, type_graphql_1.Mutation)(returns => data_sensor_js_1.DataSensor, {
|
92
|
+
description: 'Updates a data sensor configuration including connection parameters and data mapping settings.'
|
93
|
+
}),
|
90
94
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
91
95
|
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
92
96
|
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
@@ -96,7 +100,9 @@ tslib_1.__decorate([
|
|
96
100
|
], DataSensorMutation.prototype, "updateDataSensor", null);
|
97
101
|
tslib_1.__decorate([
|
98
102
|
(0, type_graphql_1.Directive)('@transaction'),
|
99
|
-
(0, type_graphql_1.Mutation)(returns => [data_sensor_js_1.DataSensor], {
|
103
|
+
(0, type_graphql_1.Mutation)(returns => [data_sensor_js_1.DataSensor], {
|
104
|
+
description: 'Updates multiple data sensor configurations in a single operation. This mutation supports batch processing for efficient sensor management.'
|
105
|
+
}),
|
100
106
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [data_sensor_type_js_1.DataSensorPatch])),
|
101
107
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
102
108
|
tslib_1.__metadata("design:type", Function),
|
@@ -105,7 +111,9 @@ tslib_1.__decorate([
|
|
105
111
|
], DataSensorMutation.prototype, "updateMultipleDataSensor", null);
|
106
112
|
tslib_1.__decorate([
|
107
113
|
(0, type_graphql_1.Directive)('@transaction'),
|
108
|
-
(0, type_graphql_1.Mutation)(returns => Boolean, {
|
114
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, {
|
115
|
+
description: 'Deletes a data sensor configuration and removes the connection between hardware devices and datasets.'
|
116
|
+
}),
|
109
117
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
110
118
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
111
119
|
tslib_1.__metadata("design:type", Function),
|
@@ -114,7 +122,9 @@ tslib_1.__decorate([
|
|
114
122
|
], DataSensorMutation.prototype, "deleteDataSensor", null);
|
115
123
|
tslib_1.__decorate([
|
116
124
|
(0, type_graphql_1.Directive)('@transaction'),
|
117
|
-
(0, type_graphql_1.Mutation)(returns => Boolean, {
|
125
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, {
|
126
|
+
description: 'Deletes multiple data sensor configurations in a single operation. This mutation supports batch deletion for efficient sensor cleanup.'
|
127
|
+
}),
|
118
128
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
119
129
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
120
130
|
tslib_1.__metadata("design:type", Function),
|
@@ -1 +1 @@
|
|
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,qDAA6C;AAC7C,+DAAsE;AAG/D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;
|
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,qDAA6C;AAC7C,+DAAsE;AAG/D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAMvB,AAAN,KAAK,CAAC,gBAAgB,CACD,UAAyB,EACrC,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,2BAAU,CAAC,CAAC,IAAI,CAAC;YAC7C,GAAG,UAAU;YACb,MAAM;YACN,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;SACd,CAAC,CAAA;IACJ,CAAC;IAMK,AAAN,KAAK,CAAC,gBAAgB,CACT,EAAU,EACP,KAAsB,EAC7B,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,2BAAU,CAAC,CAAA;QAC/C,MAAM,UAAU,GAA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AA,IAAA,kBAAG,GAAE,CAAA;;;;0DAKnD;AAOK;IALL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAC5B,WAAW,EACT,wIAAwI;KAC3I,CAAC;IAEC,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;2DAUP;6BAxHU,kBAAkB;IAD9B,IAAA,uBAAQ,EAAC,2BAAU,CAAC;GACR,kBAAkB,CAyH9B","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { DataSensor } from './data-sensor.js'\nimport { DataSensorPatch, NewDataSensor } from './data-sensor-type.js'\n\n@Resolver(DataSensor)\nexport class DataSensorMutation {\n @Directive('@transaction')\n @Mutation(returns => DataSensor, {\n description:\n 'Creates a new data sensor configuration for automated data collection. This mutation sets up the connection between hardware devices and datasets.'\n })\n async createDataSensor(\n @Arg('dataSensor') dataSensor: NewDataSensor,\n @Ctx() context: ResolverContext\n ): 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, {\n description: 'Updates a data sensor configuration including connection parameters and data mapping settings.'\n })\n async updateDataSensor(\n @Arg('id') id: string,\n @Arg('patch') patch: DataSensorPatch,\n @Ctx() context: ResolverContext\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: domain.id }, 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], {\n description:\n 'Updates multiple data sensor configurations in a single operation. This mutation supports batch processing for efficient sensor management.'\n })\n async updateMultipleDataSensor(\n @Arg('patches', type => [DataSensorPatch]) patches: DataSensorPatch[],\n @Ctx() context: ResolverContext\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.findOneBy({ id: 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, {\n description: 'Deletes a data sensor configuration and removes the connection between hardware devices and datasets.'\n })\n async deleteDataSensor(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(DataSensor).delete({ domain: { id: domain.id }, id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, {\n description:\n 'Deletes multiple data sensor configurations in a single operation. This mutation supports batch deletion for efficient sensor cleanup.'\n })\n async deleteDataSensors(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(DataSensor).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|
@@ -52,7 +52,9 @@ let DataSensorQuery = class DataSensorQuery {
|
|
52
52
|
};
|
53
53
|
exports.DataSensorQuery = DataSensorQuery;
|
54
54
|
tslib_1.__decorate([
|
55
|
-
(0, type_graphql_1.Query)(returns => data_sensor_js_1.DataSensor, {
|
55
|
+
(0, type_graphql_1.Query)(returns => data_sensor_js_1.DataSensor, {
|
56
|
+
description: 'Retrieves a single data sensor by its unique identifier. This query fetches detailed information about a sensor including its device configuration, data collection settings, and associated dataset information.'
|
57
|
+
}),
|
56
58
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
57
59
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
58
60
|
tslib_1.__metadata("design:type", Function),
|
@@ -60,7 +62,9 @@ tslib_1.__decorate([
|
|
60
62
|
tslib_1.__metadata("design:returntype", Promise)
|
61
63
|
], DataSensorQuery.prototype, "dataSensor", null);
|
62
64
|
tslib_1.__decorate([
|
63
|
-
(0, type_graphql_1.Query)(returns => data_sensor_type_js_1.DataSensorList, {
|
65
|
+
(0, type_graphql_1.Query)(returns => data_sensor_type_js_1.DataSensorList, {
|
66
|
+
description: 'Retrieves multiple data sensors with pagination and filtering support. This query allows searching sensors by name, description, device ID, and tag, and is used for listing and managing automated data collection devices across all datasets.'
|
67
|
+
}),
|
64
68
|
tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
|
65
69
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
66
70
|
tslib_1.__metadata("design:type", Function),
|
@@ -68,42 +72,54 @@ tslib_1.__decorate([
|
|
68
72
|
tslib_1.__metadata("design:returntype", Promise)
|
69
73
|
], DataSensorQuery.prototype, "dataSensors", null);
|
70
74
|
tslib_1.__decorate([
|
71
|
-
(0, type_graphql_1.FieldResolver)(type => auth_base_1.Appliance
|
75
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.Appliance, {
|
76
|
+
description: 'Retrieves the appliance (device) associated with this data sensor. This field resolver provides access to the hardware device configuration and settings that the sensor is connected to.'
|
77
|
+
}),
|
72
78
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
73
79
|
tslib_1.__metadata("design:type", Function),
|
74
80
|
tslib_1.__metadata("design:paramtypes", [data_sensor_js_1.DataSensor]),
|
75
81
|
tslib_1.__metadata("design:returntype", Promise)
|
76
82
|
], DataSensorQuery.prototype, "appliance", null);
|
77
83
|
tslib_1.__decorate([
|
78
|
-
(0, type_graphql_1.FieldResolver)(type => data_set_js_1.DataSet
|
84
|
+
(0, type_graphql_1.FieldResolver)(type => data_set_js_1.DataSet, {
|
85
|
+
description: 'Retrieves the dataset that this data sensor is configured to collect data for. This field resolver provides access to the dataset configuration and settings associated with the sensor.'
|
86
|
+
}),
|
79
87
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
80
88
|
tslib_1.__metadata("design:type", Function),
|
81
89
|
tslib_1.__metadata("design:paramtypes", [data_sensor_js_1.DataSensor]),
|
82
90
|
tslib_1.__metadata("design:returntype", Promise)
|
83
91
|
], DataSensorQuery.prototype, "dataSet", null);
|
84
92
|
tslib_1.__decorate([
|
85
|
-
(0, type_graphql_1.FieldResolver)(type => integration_base_1.Scenario
|
93
|
+
(0, type_graphql_1.FieldResolver)(type => integration_base_1.Scenario, {
|
94
|
+
description: 'Retrieves the decoder scenario associated with this data sensor. This field resolver provides access to the data processing and transformation logic that converts raw sensor data into structured format.'
|
95
|
+
}),
|
86
96
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
87
97
|
tslib_1.__metadata("design:type", Function),
|
88
98
|
tslib_1.__metadata("design:paramtypes", [data_sensor_js_1.DataSensor]),
|
89
99
|
tslib_1.__metadata("design:returntype", Promise)
|
90
100
|
], DataSensorQuery.prototype, "decoder", null);
|
91
101
|
tslib_1.__decorate([
|
92
|
-
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain
|
102
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain, {
|
103
|
+
description: 'Retrieves the domain that this data sensor belongs to. This field resolver provides access to the organizational context and settings associated with the sensor.'
|
104
|
+
}),
|
93
105
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
94
106
|
tslib_1.__metadata("design:type", Function),
|
95
107
|
tslib_1.__metadata("design:paramtypes", [data_sensor_js_1.DataSensor]),
|
96
108
|
tslib_1.__metadata("design:returntype", Promise)
|
97
109
|
], DataSensorQuery.prototype, "domain", null);
|
98
110
|
tslib_1.__decorate([
|
99
|
-
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User
|
111
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, {
|
112
|
+
description: 'Retrieves the user who last updated this data sensor. This field resolver identifies the person responsible for the most recent modifications to the sensor configuration.'
|
113
|
+
}),
|
100
114
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
101
115
|
tslib_1.__metadata("design:type", Function),
|
102
116
|
tslib_1.__metadata("design:paramtypes", [data_sensor_js_1.DataSensor]),
|
103
117
|
tslib_1.__metadata("design:returntype", Promise)
|
104
118
|
], DataSensorQuery.prototype, "updater", null);
|
105
119
|
tslib_1.__decorate([
|
106
|
-
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User
|
120
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, {
|
121
|
+
description: 'Retrieves the user who created this data sensor. This field resolver identifies the person responsible for initially configuring the sensor and its data collection settings.'
|
122
|
+
}),
|
107
123
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
108
124
|
tslib_1.__metadata("design:type", Function),
|
109
125
|
tslib_1.__metadata("design:paramtypes", [data_sensor_js_1.DataSensor]),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-sensor-query.js","sourceRoot":"","sources":["../../../server/service/data-sensor/data-sensor-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AAEnF,yDAA2D;AAC3D,iDAAuG;AACvG,uEAA2D;AAE3D,yDAAiD;AACjD,qDAA6C;AAC7C,+DAAsD;AAG/C,IAAM,eAAe,GAArB,MAAM,eAAe;
|
1
|
+
{"version":3,"file":"data-sensor-query.js","s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,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QAC3B,WAAW,EACT,+KAA+K;KAClL,CAAC;IACa,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,2BAAU;;8CAE3C;0BAvFU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,2BAAU,CAAC;GACR,eAAe,CAwF3B","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\n\nimport { Appliance, User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { Scenario } from '@things-factory/integration-base'\n\nimport { DataSet } from '../data-set/data-set.js'\nimport { DataSensor } from './data-sensor.js'\nimport { DataSensorList } from './data-sensor-type.js'\n\n@Resolver(DataSensor)\nexport class DataSensorQuery {\n @Query(returns => DataSensor, {\n description:\n 'Retrieves a single data sensor by its unique identifier. This query fetches detailed information about a sensor including its device configuration, data collection settings, and associated dataset information.'\n })\n async dataSensor(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<DataSensor> {\n const { domain } = context.state\n\n return await getRepository(DataSensor).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => DataSensorList, {\n description:\n 'Retrieves multiple data sensors with pagination and filtering support. This query allows searching sensors by name, description, device ID, and tag, and is used for listing and managing automated data collection devices across all datasets.'\n })\n async dataSensors(\n @Args(type => ListParam) params: ListParam,\n @Ctx() context: ResolverContext\n ): Promise<DataSensorList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(DataSensor),\n params,\n domain,\n searchables: ['name', 'description', 'deviceId', 'tag']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Appliance, {\n description:\n 'Retrieves the appliance (device) associated with this data sensor. This field resolver provides access to the hardware device configuration and settings that the sensor is connected to.'\n })\n async appliance(@Root() dataSensor: DataSensor): Promise<Appliance> {\n return dataSensor.applianceId && (await getRepository(Appliance).findOneBy({ id: dataSensor.applianceId }))\n }\n\n @FieldResolver(type => DataSet, {\n description:\n 'Retrieves the dataset that this data sensor is configured to collect data for. This field resolver provides access to the dataset configuration and settings associated with the sensor.'\n })\n async dataSet(@Root() dataSensor: DataSensor): Promise<DataSet> {\n return dataSensor.dataSetId && (await getRepository(DataSet).findOneBy({ id: dataSensor.dataSetId }))\n }\n\n @FieldResolver(type => Scenario, {\n description:\n 'Retrieves the decoder scenario associated with this data sensor. This field resolver provides access to the data processing and transformation logic that converts raw sensor data into structured format.'\n })\n async decoder(@Root() dataSensor: DataSensor): Promise<Scenario> {\n return (\n dataSensor.decoder ||\n (dataSensor.decoderId &&\n (await getRepository(Scenario).findOneBy({\n id: dataSensor.decoderId\n })))\n )\n }\n\n @FieldResolver(type => Domain, {\n description:\n 'Retrieves the domain that this data sensor belongs to. This field resolver provides access to the organizational context and settings associated with the sensor.'\n })\n async domain(@Root() dataSensor: DataSensor): Promise<Domain> {\n return dataSensor.domainId && (await getRepository(Domain).findOneBy({ id: dataSensor.domainId }))\n }\n\n @FieldResolver(type => User, {\n description:\n 'Retrieves the user who last updated this data sensor. This field resolver identifies the person responsible for the most recent modifications to the sensor configuration.'\n })\n async updater(@Root() dataSensor: DataSensor): Promise<User> {\n return dataSensor.updaterId && (await getRepository(User).findOneBy({ id: dataSensor.updaterId }))\n }\n\n @FieldResolver(type => User, {\n description:\n 'Retrieves the user who created this data sensor. This field resolver identifies the person responsible for initially configuring the sensor and its data collection settings.'\n })\n async creator(@Root() dataSensor: DataSensor): Promise<User> {\n return dataSensor.creatorId && (await getRepository(User).findOneBy({ id: dataSensor.creatorId }))\n }\n}\n"]}
|
@@ -9,7 +9,7 @@ let NewDataSensor = class NewDataSensor {
|
|
9
9
|
};
|
10
10
|
exports.NewDataSensor = NewDataSensor;
|
11
11
|
tslib_1.__decorate([
|
12
|
-
(0, type_graphql_1.Field)(),
|
12
|
+
(0, type_graphql_1.Field)({ description: 'Name of the data sensor for identification.' }),
|
13
13
|
tslib_1.__metadata("design:type", String)
|
14
14
|
], NewDataSensor.prototype, "name", void 0);
|
15
15
|
tslib_1.__decorate([
|
@@ -83,63 +83,63 @@ tslib_1.__decorate([
|
|
83
83
|
tslib_1.__metadata("design:type", String)
|
84
84
|
], DataSensorPatch.prototype, "name", void 0);
|
85
85
|
tslib_1.__decorate([
|
86
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
86
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Description of the data sensor configuration.' }),
|
87
87
|
tslib_1.__metadata("design:type", String)
|
88
88
|
], DataSensorPatch.prototype, "description", void 0);
|
89
89
|
tslib_1.__decorate([
|
90
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
90
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Indicates if the data sensor is active.' }),
|
91
91
|
tslib_1.__metadata("design:type", Boolean)
|
92
92
|
], DataSensorPatch.prototype, "active", void 0);
|
93
93
|
tslib_1.__decorate([
|
94
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
94
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Unique identifier of the hardware device connected to this sensor.' }),
|
95
95
|
tslib_1.__metadata("design:type", String)
|
96
96
|
], DataSensorPatch.prototype, "deviceId", void 0);
|
97
97
|
tslib_1.__decorate([
|
98
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
98
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Serial number of the hardware device.' }),
|
99
99
|
tslib_1.__metadata("design:type", String)
|
100
100
|
], DataSensorPatch.prototype, "serialNo", void 0);
|
101
101
|
tslib_1.__decorate([
|
102
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
102
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Brand name of the hardware device.' }),
|
103
103
|
tslib_1.__metadata("design:type", String)
|
104
104
|
], DataSensorPatch.prototype, "brand", void 0);
|
105
105
|
tslib_1.__decorate([
|
106
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
106
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Model name of the hardware device.' }),
|
107
107
|
tslib_1.__metadata("design:type", String)
|
108
108
|
], DataSensorPatch.prototype, "model", void 0);
|
109
109
|
tslib_1.__decorate([
|
110
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
110
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Network mask for the sensor connection.' }),
|
111
111
|
tslib_1.__metadata("design:type", String)
|
112
112
|
], DataSensorPatch.prototype, "netmask", void 0);
|
113
113
|
tslib_1.__decorate([
|
114
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
114
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Tag for categorizing the sensor.' }),
|
115
115
|
tslib_1.__metadata("design:type", String)
|
116
116
|
], DataSensorPatch.prototype, "tag", void 0);
|
117
117
|
tslib_1.__decorate([
|
118
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
118
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Capacity or measurement range of the sensor.' }),
|
119
119
|
tslib_1.__metadata("design:type", Number)
|
120
120
|
], DataSensorPatch.prototype, "capacity", void 0);
|
121
121
|
tslib_1.__decorate([
|
122
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
122
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Unit of measurement for the sensor capacity.' }),
|
123
123
|
tslib_1.__metadata("design:type", String)
|
124
124
|
], DataSensorPatch.prototype, "unit", void 0);
|
125
125
|
tslib_1.__decorate([
|
126
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
126
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Reference identifier for the sensor.' }),
|
127
127
|
tslib_1.__metadata("design:type", String)
|
128
128
|
], DataSensorPatch.prototype, "refBy", void 0);
|
129
129
|
tslib_1.__decorate([
|
130
|
-
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
130
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Reference to the appliance this sensor is connected to.' }),
|
131
131
|
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
132
132
|
], DataSensorPatch.prototype, "appliance", void 0);
|
133
133
|
tslib_1.__decorate([
|
134
|
-
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
134
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Reference to the dataset this sensor collects data for.' }),
|
135
135
|
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
136
136
|
], DataSensorPatch.prototype, "dataSet", void 0);
|
137
137
|
tslib_1.__decorate([
|
138
|
-
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
138
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Reference to the decoder scenario for this sensor.' }),
|
139
139
|
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
140
140
|
], DataSensorPatch.prototype, "decoder", void 0);
|
141
141
|
tslib_1.__decorate([
|
142
|
-
(0, type_graphql_1.Field)(),
|
142
|
+
(0, type_graphql_1.Field)({ description: 'Create/Update flag for batch operations.' }),
|
143
143
|
tslib_1.__metadata("design:type", String)
|
144
144
|
], DataSensorPatch.prototype, "cuFlag", void 0);
|
145
145
|
exports.DataSensorPatch = DataSensorPatch = tslib_1.__decorate([
|
@@ -149,14 +149,14 @@ let DataSensorList = class DataSensorList {
|
|
149
149
|
};
|
150
150
|
exports.DataSensorList = DataSensorList;
|
151
151
|
tslib_1.__decorate([
|
152
|
-
(0, type_graphql_1.Field)(type => [data_sensor_js_1.DataSensor]),
|
152
|
+
(0, type_graphql_1.Field)(type => [data_sensor_js_1.DataSensor], { description: 'List of data sensors.' }),
|
153
153
|
tslib_1.__metadata("design:type", Array)
|
154
154
|
], DataSensorList.prototype, "items", void 0);
|
155
155
|
tslib_1.__decorate([
|
156
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
156
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Total number of data sensors in the list.' }),
|
157
157
|
tslib_1.__metadata("design:type", Number)
|
158
158
|
], DataSensorList.prototype, "total", void 0);
|
159
159
|
exports.DataSensorList = DataSensorList = tslib_1.__decorate([
|
160
|
-
(0, type_graphql_1.ObjectType)()
|
160
|
+
(0, type_graphql_1.ObjectType)({ description: 'Represents a paginated list of data sensors.' })
|
161
161
|
], DataSensorList);
|
162
162
|
//# sourceMappingURL=data-sensor-type.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-sensor-type.js","sourceRoot":"","sources":["../../../server/service/data-sensor/data-sensor-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iDAAiD;AAEjD,qDAA6C;AAGtC,IAAM,aAAa,GAAnB,MAAM,aAAa;CA6CzB,CAAA;AA7CY,sCAAa;AAExB;IADC,IAAA,oBAAK,
|
1
|
+
{"version":3,"file":"data-sensor-type.js","sourceRoot":"","sources":["../../../server/service/data-sensor/data-sensor-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iDAAiD;AAEjD,qDAA6C;AAGtC,IAAM,aAAa,GAAnB,MAAM,aAAa;CA6CzB,CAAA;AA7CY,sCAAa;AAExB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,6CAA6C,EAAE,CAAC;;2CAC1D;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACZ;AAGd;IADC,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AAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,yDAAyD,EAAE,CAAC;sCAC3G,iBAAS;gDAAA;AAGnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,oDAAoD,EAAE,CAAC;sCACtG,iBAAS;gDAAA;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;;+CACrD;0BAlDH,eAAe;IAD3B,IAAA,wBAAS,GAAE;GACC,eAAe,CAmD3B;AAGM,IAAM,cAAc,GAApB,MAAM,cAAc;CAM1B,CAAA;AANY,wCAAc;AAEzB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,2BAAU,CAAC,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;6CACnD;AAGnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,2CAA2C,EAAE,CAAC;;6CACpE;yBALF,cAAc;IAD1B,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;GAC/D,cAAc,CAM1B","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { DataSensor } from './data-sensor.js'\n\n@InputType()\nexport class NewDataSensor {\n @Field({ description: 'Name of the data sensor for identification.' })\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n deviceId?: string\n\n @Field({ nullable: true })\n serialNo?: string\n\n @Field({ nullable: true })\n brand?: string\n\n @Field({ nullable: true })\n model?: string\n\n @Field({ nullable: true })\n netmask?: string\n\n @Field({ nullable: true })\n tag?: string\n\n @Field({ nullable: true })\n capacity?: number\n\n @Field({ nullable: true })\n unit?: string\n\n @Field({ nullable: true })\n refBy?: string\n\n @Field(type => ObjectRef, { nullable: true })\n appliance?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n dataSet?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n decoder?: ObjectRef\n}\n\n@InputType()\nexport class DataSensorPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true, description: 'Description of the data sensor configuration.' })\n description?: string\n\n @Field({ nullable: true, description: 'Indicates if the data sensor is active.' })\n active?: boolean\n\n @Field({ nullable: true, description: 'Unique identifier of the hardware device connected to this sensor.' })\n deviceId?: string\n\n @Field({ nullable: true, description: 'Serial number of the hardware device.' })\n serialNo?: string\n\n @Field({ nullable: true, description: 'Brand name of the hardware device.' })\n brand?: string\n\n @Field({ nullable: true, description: 'Model name of the hardware device.' })\n model?: string\n\n @Field({ nullable: true, description: 'Network mask for the sensor connection.' })\n netmask?: string\n\n @Field({ nullable: true, description: 'Tag for categorizing the sensor.' })\n tag?: string\n\n @Field({ nullable: true, description: 'Capacity or measurement range of the sensor.' })\n capacity?: number\n\n @Field({ nullable: true, description: 'Unit of measurement for the sensor capacity.' })\n unit?: string\n\n @Field({ nullable: true, description: 'Reference identifier for the sensor.' })\n refBy?: string\n\n @Field(type => ObjectRef, { nullable: true, description: 'Reference to the appliance this sensor is connected to.' })\n appliance?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true, description: 'Reference to the dataset this sensor collects data for.' })\n dataSet?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true, description: 'Reference to the decoder scenario for this sensor.' })\n decoder?: ObjectRef\n\n @Field({ description: 'Create/Update flag for batch operations.' })\n cuFlag: string\n}\n\n@ObjectType({ description: 'Represents a paginated list of data sensors.' })\nexport class DataSensorList {\n @Field(type => [DataSensor], { description: 'List of data sensors.' })\n items: DataSensor[]\n\n @Field(type => Int, { description: 'Total number of data sensors in the list.' })\n total: number\n}\n"]}
|
@@ -13,7 +13,7 @@ let DataSensor = class DataSensor {
|
|
13
13
|
exports.DataSensor = DataSensor;
|
14
14
|
tslib_1.__decorate([
|
15
15
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
16
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
16
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier for the data sensor.' }),
|
17
17
|
tslib_1.__metadata("design:type", String)
|
18
18
|
], DataSensor.prototype, "id", void 0);
|
19
19
|
tslib_1.__decorate([
|
@@ -27,12 +27,12 @@ tslib_1.__decorate([
|
|
27
27
|
], DataSensor.prototype, "domainId", void 0);
|
28
28
|
tslib_1.__decorate([
|
29
29
|
(0, typeorm_1.Column)(),
|
30
|
-
(0, type_graphql_1.Field)(),
|
30
|
+
(0, type_graphql_1.Field)({ description: 'Name of the data sensor for identification.' }),
|
31
31
|
tslib_1.__metadata("design:type", String)
|
32
32
|
], DataSensor.prototype, "name", void 0);
|
33
33
|
tslib_1.__decorate([
|
34
34
|
(0, typeorm_1.Column)({ nullable: true }),
|
35
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
35
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Description of the data sensor configuration.' }),
|
36
36
|
tslib_1.__metadata("design:type", String)
|
37
37
|
], DataSensor.prototype, "description", void 0);
|
38
38
|
tslib_1.__decorate([
|
@@ -42,7 +42,7 @@ tslib_1.__decorate([
|
|
42
42
|
], DataSensor.prototype, "active", void 0);
|
43
43
|
tslib_1.__decorate([
|
44
44
|
(0, typeorm_1.Column)({ nullable: true }),
|
45
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
45
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Unique identifier of the hardware device connected to this sensor.' }),
|
46
46
|
tslib_1.__metadata("design:type", String)
|
47
47
|
], DataSensor.prototype, "deviceId", void 0);
|
48
48
|
tslib_1.__decorate([
|
@@ -52,12 +52,12 @@ tslib_1.__decorate([
|
|
52
52
|
], DataSensor.prototype, "serialNo", void 0);
|
53
53
|
tslib_1.__decorate([
|
54
54
|
(0, typeorm_1.Column)({ nullable: true }),
|
55
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
55
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Brand name of the hardware device.' }),
|
56
56
|
tslib_1.__metadata("design:type", String)
|
57
57
|
], DataSensor.prototype, "brand", void 0);
|
58
58
|
tslib_1.__decorate([
|
59
59
|
(0, typeorm_1.Column)({ nullable: true }),
|
60
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
60
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Model name of the hardware device.' }),
|
61
61
|
tslib_1.__metadata("design:type", String)
|
62
62
|
], DataSensor.prototype, "model", void 0);
|
63
63
|
tslib_1.__decorate([
|
@@ -72,12 +72,12 @@ tslib_1.__decorate([
|
|
72
72
|
], DataSensor.prototype, "tag", void 0);
|
73
73
|
tslib_1.__decorate([
|
74
74
|
(0, typeorm_1.Column)({ type: 'float', nullable: true, comment: '용량', transformer: shell_1.roundTransformer }),
|
75
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
75
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Capacity or measurement range of the sensor.' }),
|
76
76
|
tslib_1.__metadata("design:type", Number)
|
77
77
|
], DataSensor.prototype, "capacity", void 0);
|
78
78
|
tslib_1.__decorate([
|
79
79
|
(0, typeorm_1.Column)({ nullable: true, comment: '용량 단위' }),
|
80
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
80
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Unit of measurement for the sensor capacity.' }),
|
81
81
|
tslib_1.__metadata("design:type", String)
|
82
82
|
], DataSensor.prototype, "unit", void 0);
|
83
83
|
tslib_1.__decorate([
|
@@ -153,6 +153,8 @@ exports.DataSensor = DataSensor = tslib_1.__decorate([
|
|
153
153
|
(0, typeorm_1.Index)('ix_data_sensor_3', (dataSensor) => [dataSensor.domain, dataSensor.serialNo], {
|
154
154
|
unique: false
|
155
155
|
}),
|
156
|
-
(0, type_graphql_1.ObjectType)({
|
156
|
+
(0, type_graphql_1.ObjectType)({
|
157
|
+
description: 'Represents a data sensor configuration that connects hardware devices to datasets for automated data collection. This entity manages the communication protocol and data mapping.'
|
158
|
+
})
|
157
159
|
], DataSensor);
|
158
160
|
//# sourceMappingURL=data-sensor.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-sensor.js","sourceRoot":"","sources":["../../../server/service/data-sensor/data-sensor.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCASgB;AAEhB,iDAAgE;AAChE,yDAA2D;AAC3D,uEAA2D;AAE3D,yDAAiD;
|
1
|
+
{"version":3,"file":"data-sensor.js","sourceRoot":"","sources":["../../../server/service/data-sensor/data-sensor.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCASgB;AAEhB,iDAAgE;AAChE,yDAA2D;AAC3D,uEAA2D;AAE3D,yDAAiD;AAe1C,IAAM,UAAU,GAAhB,MAAM,UAAU;CAyGtB,CAAA;AAzGY,gCAAU;AAGZ;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;;sCAC1D;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;sCACb,cAAM;0CAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;;4CACzC;AAIjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,6CAA6C,EAAE,CAAC;;wCACzD;AAIb;IAFC,IAAA,g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AE,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC7G,IAAA,eAAK,EAAC,kBAAkB,EAAE,CAAC,UAAsB,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC9F,IAAA,eAAK,EAAC,kBAAkB,EAAE,CAAC,UAAsB,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE;QAC5F,MAAM,EAAE,KAAK;KACd,CAAC;IACD,IAAA,eAAK,EAAC,kBAAkB,EAAE,CAAC,UAAsB,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC/F,MAAM,EAAE,KAAK;KACd,CAAC;IACD,IAAA,yBAAU,EAAC;QACV,WAAW,EACT,mLAAmL;KACtL,CAAC;GACW,UAAU,CAyGtB","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 { Domain, roundTransformer } from '@things-factory/shell'\nimport { Appliance, User } from '@things-factory/auth-base'\nimport { Scenario } from '@things-factory/integration-base'\n\nimport { DataSet } from '../data-set/data-set.js'\n\n@Entity()\n@Index('ix_data_sensor_0', (dataSensor: DataSensor) => [dataSensor.domain, dataSensor.name], { unique: true })\n@Index('ix_data_sensor_1', (dataSensor: DataSensor) => [dataSensor.deviceId], { unique: true })\n@Index('ix_data_sensor_2', (dataSensor: DataSensor) => [dataSensor.domain, dataSensor.refBy], {\n unique: false\n})\n@Index('ix_data_sensor_3', (dataSensor: DataSensor) => [dataSensor.domain, dataSensor.serialNo], {\n unique: false\n})\n@ObjectType({\n description:\n 'Represents a data sensor configuration that connects hardware devices to datasets for automated data collection. This entity manages the communication protocol and data mapping.'\n})\nexport class DataSensor {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the data sensor.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((dataSensor: DataSensor) => dataSensor.domain)\n domainId?: string\n\n @Column()\n @Field({ description: 'Name of the data sensor for identification.' })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Description of the data sensor configuration.' })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Unique identifier of the hardware device connected to this sensor.' })\n deviceId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n serialNo?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Brand name of the hardware device.' })\n brand?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Model name of the hardware device.' })\n model?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n netmask?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n tag?: string\n\n @Column({ type: 'float', nullable: true, comment: '용량', transformer: roundTransformer })\n @Field({ nullable: true, description: 'Capacity or measurement range of the sensor.' })\n capacity?: number\n\n @Column({ nullable: true, comment: '용량 단위' })\n @Field({ nullable: true, description: 'Unit of measurement for the sensor capacity.' })\n unit?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n refBy?: string\n\n @ManyToOne(type => Appliance, { nullable: true })\n @Field({ nullable: true })\n appliance?: Appliance\n\n @RelationId((dataSensor: DataSensor) => dataSensor.appliance)\n applianceId?: string\n\n @ManyToOne(type => DataSet, { nullable: true })\n @Field({ nullable: true })\n dataSet?: DataSet\n\n @RelationId((dataSensor: DataSensor) => dataSensor.dataSet)\n dataSetId?: string\n\n @ManyToOne(type => Scenario, { nullable: true })\n @Field(type => Scenario, {\n nullable: true,\n description: 'The decoder scenario that automatically executes based on the trigger of raw data collection'\n })\n decoder?: Scenario\n\n @RelationId((dataSensor: DataSensor) => dataSensor.decoder)\n decoderId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((dataSensor: DataSensor) => dataSensor.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((dataSensor: DataSensor) => dataSensor.updater)\n updaterId?: string\n}\n"]}
|