@things-factory/dataset 8.0.21 → 8.0.27

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": "8.0.21",
3
+ "version": "8.0.27",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -40,21 +40,21 @@
40
40
  "@operato/shell": "^8.0.0",
41
41
  "@operato/styles": "^8.0.0",
42
42
  "@operato/utils": "^8.0.0",
43
- "@things-factory/auth-base": "^8.0.20",
44
- "@things-factory/aws-base": "^8.0.20",
45
- "@things-factory/board-service": "^8.0.20",
43
+ "@things-factory/auth-base": "^8.0.26",
44
+ "@things-factory/aws-base": "^8.0.26",
45
+ "@things-factory/board-service": "^8.0.26",
46
46
  "@things-factory/env": "^8.0.15",
47
- "@things-factory/integration-base": "^8.0.20",
48
- "@things-factory/organization": "^8.0.20",
49
- "@things-factory/personalization": "^8.0.20",
50
- "@things-factory/scheduler-client": "^8.0.20",
47
+ "@things-factory/integration-base": "^8.0.26",
48
+ "@things-factory/organization": "^8.0.26",
49
+ "@things-factory/personalization": "^8.0.26",
50
+ "@things-factory/scheduler-client": "^8.0.26",
51
51
  "@things-factory/shell": "^8.0.20",
52
- "@things-factory/work-shift": "^8.0.20",
53
- "@things-factory/worklist": "^8.0.20",
52
+ "@things-factory/work-shift": "^8.0.26",
53
+ "@things-factory/worklist": "^8.0.26",
54
54
  "cron-parser": "^4.3.0",
55
55
  "moment-timezone": "^0.5.45",
56
56
  "simple-statistics": "^7.8.3",
57
57
  "statistics": "^3.3.0"
58
58
  },
59
- "gitHead": "39f3317b34ecbb6841840832d211c0f41d189153"
59
+ "gitHead": "ad1cb2df1afbb4f19303f32e4928324122b8f676"
60
60
  }
@@ -207,7 +207,7 @@ export class DataSetMutation {
207
207
  async deleteDataSet(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {
208
208
  const { domain, tx } = context.state
209
209
 
210
- await getRepository(DataSet, tx).delete({ domain: { id: domain.id }, id })
210
+ await getRepository(DataSet, tx).softDelete({ domain: { id: domain.id }, id })
211
211
  await deleteAttachmentsByRef(null, { refBys: [`report-${id}`] }, context)
212
212
 
213
213
  return true
@@ -219,7 +219,7 @@ export class DataSetMutation {
219
219
  async deleteDataSets(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {
220
220
  const { domain, tx } = context.state
221
221
 
222
- await getRepository(DataSet, tx).delete({
222
+ await getRepository(DataSet, tx).softDelete({
223
223
  domain: { id: domain.id },
224
224
  id: In(ids)
225
225
  })
@@ -8,6 +8,7 @@ import {
8
8
  PrimaryGeneratedColumn,
9
9
  RelationId,
10
10
  UpdateDateColumn,
11
+ DeleteDateColumn,
11
12
  VersionColumn
12
13
  } from 'typeorm'
13
14
 
@@ -310,6 +311,10 @@ export class DataSet {
310
311
  @Field({ nullable: true, description: 'The date and time the dataset was last updated' })
311
312
  updatedAt?: Date
312
313
 
314
+ @DeleteDateColumn()
315
+ @Field({ nullable: true, description: 'The date and time the dataset was deleted' })
316
+ deletedAt?: Date
317
+
313
318
  @ManyToOne(type => User, { nullable: true })
314
319
  @Field({ nullable: true, description: 'The user who created the dataset' })
315
320
  creator?: User