@things-factory/attachment-base 7.0.83 → 7.0.85

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/attachment-base",
3
- "version": "7.0.83",
3
+ "version": "7.0.85",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -29,11 +29,11 @@
29
29
  "@aws-sdk/s3-presigned-post": "^3.46.0",
30
30
  "@azure/storage-blob": "^12.18.0",
31
31
  "@koa/multer": "^3.0.0",
32
- "@things-factory/auth-base": "^7.0.83",
33
- "@things-factory/env": "^7.0.83",
34
- "@things-factory/shell": "^7.0.83",
32
+ "@things-factory/auth-base": "^7.0.85",
33
+ "@things-factory/env": "^7.0.84",
34
+ "@things-factory/shell": "^7.0.85",
35
35
  "mime": "^3.0.0",
36
36
  "multer": "^1.4.5-lts.1"
37
37
  },
38
- "gitHead": "e6ba13facd640de7cc018d8a1478e769984cd5c8"
38
+ "gitHead": "94bb34cfdcc186d316e2f509a670f84995676a46"
39
39
  }
@@ -22,7 +22,7 @@ export class AttachmentQuery {
22
22
  params,
23
23
  domain,
24
24
  alias: 'attachment',
25
- searchables: ['name', 'description']
25
+ searchables: ['id', 'name', 'description', 'tags']
26
26
  }).addSelect([
27
27
  'attachment.domain',
28
28
  'attachment.id',
@@ -2,7 +2,7 @@ import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'
2
2
  import GraphQLUpload from 'graphql-upload/GraphQLUpload.js'
3
3
  import { Field, InputType, Int, ObjectType } from 'type-graphql'
4
4
 
5
- import { ScalarAny } from '@things-factory/shell'
5
+ import { ScalarAny, ScalarObject } from '@things-factory/shell'
6
6
 
7
7
  import { Attachment } from './attachment'
8
8
 
@@ -40,6 +40,9 @@ export class NewAttachment {
40
40
 
41
41
  @Field({ nullable: true })
42
42
  refBy: string
43
+
44
+ @Field(type => ScalarObject, { nullable: true })
45
+ tags?: string[]
43
46
  }
44
47
 
45
48
  @InputType()
@@ -67,4 +70,7 @@ export class AttachmentPatch {
67
70
 
68
71
  @Field({ nullable: true })
69
72
  refBy: string
73
+
74
+ @Field(type => ScalarObject, { nullable: true })
75
+ tags?: string[]
70
76
  }
@@ -11,7 +11,7 @@ import {
11
11
  } from 'typeorm'
12
12
 
13
13
  import { User } from '@things-factory/auth-base'
14
- import { Domain } from '@things-factory/shell'
14
+ import { Domain, ScalarObject } from '@things-factory/shell'
15
15
 
16
16
  import { ATTACHMENT_PATH } from '../../attachment-const'
17
17
  import { config } from '@things-factory/env'
@@ -90,6 +90,10 @@ export class Attachment {
90
90
  })
91
91
  contents?: Buffer
92
92
 
93
+ @Column('simple-json', { nullable: true, default: null })
94
+ @Field(type => ScalarObject, { nullable: true })
95
+ tags?: string[]
96
+
93
97
  @CreateDateColumn()
94
98
  @Field()
95
99
  createdAt?: Date