@things-factory/dataset 7.0.1-alpha.77 → 7.0.1-alpha.79

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/dataset",
3
- "version": "7.0.1-alpha.77",
3
+ "version": "7.0.1-alpha.79",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -39,21 +39,21 @@
39
39
  "@operato/shell": "^2.0.0-alpha.0",
40
40
  "@operato/styles": "^2.0.0-alpha.0",
41
41
  "@operato/utils": "^2.0.0-alpha.0",
42
- "@things-factory/auth-base": "^7.0.1-alpha.77",
43
- "@things-factory/aws-base": "^7.0.1-alpha.77",
44
- "@things-factory/board-service": "^7.0.1-alpha.77",
42
+ "@things-factory/auth-base": "^7.0.1-alpha.78",
43
+ "@things-factory/aws-base": "^7.0.1-alpha.78",
44
+ "@things-factory/board-service": "^7.0.1-alpha.79",
45
45
  "@things-factory/env": "^7.0.1-alpha.71",
46
- "@things-factory/integration-base": "^7.0.1-alpha.77",
47
- "@things-factory/organization": "^7.0.1-alpha.77",
48
- "@things-factory/personalization": "^7.0.1-alpha.77",
49
- "@things-factory/scheduler-client": "^7.0.1-alpha.77",
46
+ "@things-factory/integration-base": "^7.0.1-alpha.79",
47
+ "@things-factory/organization": "^7.0.1-alpha.78",
48
+ "@things-factory/personalization": "^7.0.1-alpha.78",
49
+ "@things-factory/scheduler-client": "^7.0.1-alpha.78",
50
50
  "@things-factory/shell": "^7.0.1-alpha.71",
51
- "@things-factory/work-shift": "^7.0.1-alpha.77",
52
- "@things-factory/worklist": "^7.0.1-alpha.77",
51
+ "@things-factory/work-shift": "^7.0.1-alpha.78",
52
+ "@things-factory/worklist": "^7.0.1-alpha.79",
53
53
  "cron-parser": "^4.3.0",
54
54
  "moment-timezone": "^0.5.45",
55
55
  "simple-statistics": "^7.8.3",
56
56
  "statistics": "^3.3.0"
57
57
  },
58
- "gitHead": "e65893063c79d82a3c67233eac2295de2bae8397"
58
+ "gitHead": "b5b88ed7abdb33839beecf802f85976bc39dfaa1"
59
59
  }
@@ -23,7 +23,7 @@ export class DataArchive {
23
23
  readonly id: string
24
24
 
25
25
  @ManyToOne(type => Domain)
26
- @Field({ nullable: true })
26
+ @Field(type => Domain)
27
27
  domain?: Domain
28
28
 
29
29
  @RelationId((dataArchive: DataArchive) => dataArchive.domain)
@@ -25,7 +25,7 @@ export class DataKeySet {
25
25
  readonly id: string
26
26
 
27
27
  @ManyToOne(type => Domain)
28
- @Field({ nullable: true })
28
+ @Field(type => Domain)
29
29
  domain?: Domain
30
30
 
31
31
  @RelationId((dataKeySet: DataKeySet) => dataKeySet.domain)
@@ -1,5 +1,16 @@
1
1
  import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'
2
- import { Column, CreateDateColumn, Entity, Index, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
2
+ import {
3
+ Column,
4
+ CreateDateColumn,
5
+ Entity,
6
+ Index,
7
+ JoinColumn,
8
+ ManyToOne,
9
+ OneToOne,
10
+ PrimaryGeneratedColumn,
11
+ RelationId,
12
+ UpdateDateColumn
13
+ } from 'typeorm'
3
14
 
4
15
  import { User } from '@things-factory/auth-base'
5
16
  import { config } from '@things-factory/env'
@@ -33,7 +44,7 @@ export class DataOoc {
33
44
  readonly id: string
34
45
 
35
46
  @ManyToOne(type => Domain)
36
- @Field({ nullable: true })
47
+ @Field(type => Domain)
37
48
  domain?: Domain
38
49
 
39
50
  @RelationId((dataOoc: DataOoc) => dataOoc.domain)
@@ -72,14 +83,24 @@ export class DataOoc {
72
83
 
73
84
  @Column({
74
85
  nullable: true,
75
- type: DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? 'longtext' : DATABASE_TYPE == 'oracle' ? 'clob' : 'varchar'
86
+ type:
87
+ DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
88
+ ? 'longtext'
89
+ : DATABASE_TYPE == 'oracle'
90
+ ? 'clob'
91
+ : 'varchar'
76
92
  })
77
93
  @Field({ nullable: true })
78
94
  correctiveInstruction?: string
79
95
 
80
96
  @Column({
81
97
  nullable: true,
82
- type: DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? 'longtext' : DATABASE_TYPE == 'oracle' ? 'clob' : 'varchar'
98
+ type:
99
+ DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
100
+ ? 'longtext'
101
+ : DATABASE_TYPE == 'oracle'
102
+ ? 'clob'
103
+ : 'varchar'
83
104
  })
84
105
  @Field({ nullable: true })
85
106
  correctiveAction?: string
@@ -133,7 +154,12 @@ export class DataOoc {
133
154
 
134
155
  @Column({
135
156
  nullable: true,
136
- type: DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? 'longtext' : DATABASE_TYPE == 'oracle' ? 'clob' : 'varchar'
157
+ type:
158
+ DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
159
+ ? 'longtext'
160
+ : DATABASE_TYPE == 'oracle'
161
+ ? 'clob'
162
+ : 'varchar'
137
163
  })
138
164
  @Field({ nullable: true })
139
165
  rawData?: string
@@ -1,5 +1,16 @@
1
1
  import { Field, ID, ObjectType } from 'type-graphql'
2
- import { Column, CreateDateColumn, Entity, Index, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
2
+ import {
3
+ Column,
4
+ CreateDateColumn,
5
+ Entity,
6
+ Index,
7
+ JoinColumn,
8
+ ManyToOne,
9
+ OneToOne,
10
+ PrimaryGeneratedColumn,
11
+ RelationId,
12
+ UpdateDateColumn
13
+ } from 'typeorm'
3
14
 
4
15
  import { User } from '@things-factory/auth-base'
5
16
  import { config } from '@things-factory/env'
@@ -13,10 +24,24 @@ import { DataOoc } from '../data-ooc/data-ooc'
13
24
  const ORMCONFIG = config.get('ormconfig', {})
14
25
  const DATABASE_TYPE = ORMCONFIG.type
15
26
  @Entity()
16
- @Index('ix_data_sample_0', (dataSample: DataSample) => [dataSample.domain, dataSample.dataSet, dataSample.workDate, dataSample.workShift, dataSample.collectedAt], {
17
- unique: false
18
- })
19
- @Index('ix_data_sample_1', (dataSample: DataSample) => [dataSample.domain, dataSample.dataSet, dataSample.collectedAt], { unique: false })
27
+ @Index(
28
+ 'ix_data_sample_0',
29
+ (dataSample: DataSample) => [
30
+ dataSample.domain,
31
+ dataSample.dataSet,
32
+ dataSample.workDate,
33
+ dataSample.workShift,
34
+ dataSample.collectedAt
35
+ ],
36
+ {
37
+ unique: false
38
+ }
39
+ )
40
+ @Index(
41
+ 'ix_data_sample_1',
42
+ (dataSample: DataSample) => [dataSample.domain, dataSample.dataSet, dataSample.collectedAt],
43
+ { unique: false }
44
+ )
20
45
  @ObjectType({ description: 'Entity for DataSample' })
21
46
  export class DataSample {
22
47
  @PrimaryGeneratedColumn('uuid')
@@ -24,7 +49,7 @@ export class DataSample {
24
49
  readonly id: string
25
50
 
26
51
  @ManyToOne(type => Domain)
27
- @Field({ nullable: true })
52
+ @Field(type => Domain)
28
53
  domain?: Domain
29
54
 
30
55
  @RelationId((dataSample: DataSample) => dataSample.domain)
@@ -74,7 +99,12 @@ export class DataSample {
74
99
 
75
100
  @Column({
76
101
  nullable: true,
77
- type: DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? 'longtext' : DATABASE_TYPE == 'oracle' ? 'clob' : 'varchar',
102
+ type:
103
+ DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
104
+ ? 'longtext'
105
+ : DATABASE_TYPE == 'oracle'
106
+ ? 'clob'
107
+ : 'varchar',
78
108
  transformer: json5Transformer
79
109
  })
80
110
  @Field({ nullable: true })
@@ -1,5 +1,14 @@
1
1
  import { Field, ID, ObjectType } from 'type-graphql'
2
- import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
2
+ import {
3
+ Column,
4
+ CreateDateColumn,
5
+ Entity,
6
+ Index,
7
+ ManyToOne,
8
+ PrimaryGeneratedColumn,
9
+ RelationId,
10
+ UpdateDateColumn
11
+ } from 'typeorm'
3
12
 
4
13
  import { Domain } from '@things-factory/shell'
5
14
  import { Appliance, User } from '@things-factory/auth-base'
@@ -23,7 +32,7 @@ export class DataSensor {
23
32
  readonly id: string
24
33
 
25
34
  @ManyToOne(type => Domain)
26
- @Field({ nullable: true })
35
+ @Field(type => Domain)
27
36
  domain?: Domain
28
37
 
29
38
  @RelationId((dataSensor: DataSensor) => dataSensor.domain)
@@ -47,7 +47,7 @@ export class DataSetHistory implements HistoryEntityInterface<DataSet> {
47
47
  readonly version: number = 1
48
48
 
49
49
  @ManyToOne(type => Domain)
50
- @Field({ nullable: true })
50
+ @Field(type => Domain)
51
51
  domain?: Domain
52
52
 
53
53
  @RelationId((dataSetHistory: DataSetHistory) => dataSetHistory.domain)
@@ -203,8 +203,8 @@ export class DataSetHistory implements HistoryEntityInterface<DataSet> {
203
203
  DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
204
204
  ? 'enum'
205
205
  : DATABASE_TYPE == 'oracle'
206
- ? 'varchar2'
207
- : 'smallint',
206
+ ? 'varchar2'
207
+ : 'smallint',
208
208
  enum: HistoryActionType
209
209
  })
210
210
  public action!: HistoryActionType
@@ -1,4 +1,13 @@
1
- import { CreateDateColumn, UpdateDateColumn, Entity, Index, Column, RelationId, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'
1
+ import {
2
+ CreateDateColumn,
3
+ UpdateDateColumn,
4
+ Entity,
5
+ Index,
6
+ Column,
7
+ RelationId,
8
+ ManyToOne,
9
+ PrimaryGeneratedColumn
10
+ } from 'typeorm'
2
11
  import { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'
3
12
 
4
13
  import { Domain, ScalarObject } from '@things-factory/shell'
@@ -23,7 +32,11 @@ import { DataSet, DataSetSummaryPeriodType } from '../data-set/data-set'
23
32
  ],
24
33
  { unique: true }
25
34
  )
26
- @Index('ix_data_summary_1', (dataSummary: DataSummary) => [dataSummary.domain, dataSummary.dataSet, dataSummary.date, dataSummary.period], { unique: false })
35
+ @Index(
36
+ 'ix_data_summary_1',
37
+ (dataSummary: DataSummary) => [dataSummary.domain, dataSummary.dataSet, dataSummary.date, dataSummary.period],
38
+ { unique: false }
39
+ )
27
40
  @ObjectType({ description: 'Entity for DataSummary' })
28
41
  export class DataSummary {
29
42
  @PrimaryGeneratedColumn('uuid')
@@ -31,7 +44,7 @@ export class DataSummary {
31
44
  readonly id: string
32
45
 
33
46
  @ManyToOne(type => Domain)
34
- @Field({ nullable: true })
47
+ @Field(type => Domain)
35
48
  domain?: Domain
36
49
 
37
50
  @RelationId((dataSummary: DataSummary) => dataSummary.domain)