@things-factory/attachment-base 7.0.1-beta.1 → 7.0.1-beta.12
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/attachment-const.d.ts +3 -0
- package/dist-server/awb-storage-s3.d.ts +1 -0
- package/dist-server/awb-storage-s3.js.map +1 -1
- package/dist-server/index.d.ts +7 -0
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/routes.d.ts +4 -0
- package/dist-server/service/attachment/attachment-mutation.d.ts +46 -0
- package/dist-server/service/attachment/attachment-mutation.js +2 -2
- package/dist-server/service/attachment/attachment-mutation.js.map +1 -1
- package/dist-server/service/attachment/attachment-query.d.ts +11 -0
- package/dist-server/service/attachment/attachment-query.js +2 -2
- package/dist-server/service/attachment/attachment-query.js.map +1 -1
- package/dist-server/service/attachment/attachment-types.d.ts +27 -0
- package/dist-server/service/attachment/attachment-types.js +8 -8
- package/dist-server/service/attachment/attachment-types.js.map +1 -1
- package/dist-server/service/attachment/attachment.d.ts +25 -0
- package/dist-server/service/attachment/attachment.js +2 -2
- package/dist-server/service/attachment/attachment.js.map +1 -1
- package/dist-server/service/attachment/index.d.ts +5 -0
- package/dist-server/service/index.d.ts +6 -0
- package/dist-server/storage-azure-blob.d.ts +1 -0
- package/dist-server/storage-azure-blob.js.map +1 -1
- package/dist-server/storage-database.d.ts +1 -0
- package/dist-server/storage-database.js +4 -9
- package/dist-server/storage-database.js.map +1 -1
- package/dist-server/storage-file.d.ts +1 -0
- package/dist-server/storage-file.js.map +1 -1
- package/dist-server/storage-s3.d.ts +1 -0
- package/dist-server/storage-s3.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/dist-server/util/index.d.ts +1 -0
- package/dist-server/util/upload-awb.d.ts +2 -0
- package/package.json +6 -6
- package/server/service/attachment/attachment.ts +21 -21
@@ -0,0 +1 @@
|
|
1
|
+
export * from './upload-awb';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/attachment-base",
|
3
|
-
"version": "7.0.1-beta.
|
3
|
+
"version": "7.0.1-beta.12",
|
4
4
|
"main": "dist-server/index.js",
|
5
5
|
"browser": "client/index.js",
|
6
6
|
"things-factory": true,
|
@@ -27,13 +27,13 @@
|
|
27
27
|
"@aws-sdk/client-s3": "^3.46.0",
|
28
28
|
"@aws-sdk/lib-storage": "^3.46.0",
|
29
29
|
"@aws-sdk/s3-presigned-post": "^3.46.0",
|
30
|
-
"@azure/storage-blob": "^12.
|
30
|
+
"@azure/storage-blob": "^12.18.0",
|
31
31
|
"@koa/multer": "^3.0.0",
|
32
|
-
"@things-factory/auth-base": "^7.0.1-beta.
|
33
|
-
"@things-factory/env": "^7.0.1-beta.
|
34
|
-
"@things-factory/shell": "^7.0.1-beta.
|
32
|
+
"@things-factory/auth-base": "^7.0.1-beta.12",
|
33
|
+
"@things-factory/env": "^7.0.1-beta.6",
|
34
|
+
"@things-factory/shell": "^7.0.1-beta.12",
|
35
35
|
"mime": "^3.0.0",
|
36
36
|
"multer": "^1.4.5-lts.1"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "67cd821227d77dea748ef46dbc54b0f9858e312c"
|
39
39
|
}
|
@@ -34,50 +34,50 @@ const DATABASE_TYPE = ORMCONFIG.type
|
|
34
34
|
export class Attachment {
|
35
35
|
@PrimaryGeneratedColumn('uuid')
|
36
36
|
@Field(type => ID)
|
37
|
-
readonly id
|
37
|
+
readonly id?: string
|
38
38
|
|
39
39
|
@ManyToOne(type => Domain, { nullable: false })
|
40
40
|
@Field(type => Domain)
|
41
|
-
domain
|
41
|
+
domain?: Domain
|
42
42
|
|
43
43
|
@RelationId((attachment: Attachment) => attachment.domain)
|
44
|
-
domainId
|
44
|
+
domainId?: string
|
45
45
|
|
46
46
|
@Column()
|
47
47
|
@Field()
|
48
|
-
name
|
48
|
+
name?: string
|
49
49
|
|
50
50
|
@Column({ nullable: true })
|
51
51
|
@Field({ nullable: true })
|
52
|
-
description
|
52
|
+
description?: string
|
53
53
|
|
54
54
|
@Column()
|
55
55
|
@Field()
|
56
|
-
mimetype
|
56
|
+
mimetype?: string
|
57
57
|
|
58
58
|
@Column()
|
59
59
|
@Field()
|
60
|
-
encoding
|
60
|
+
encoding?: string
|
61
61
|
|
62
62
|
@Column({ nullable: true })
|
63
63
|
@Field({ nullable: true })
|
64
|
-
category
|
64
|
+
category?: string
|
65
65
|
|
66
66
|
@Column({ nullable: true, default: '' })
|
67
67
|
@Field({ nullable: true })
|
68
|
-
refType
|
68
|
+
refType?: string = ''
|
69
69
|
|
70
70
|
@Column({ nullable: true })
|
71
71
|
@Field({ nullable: true })
|
72
|
-
refBy
|
72
|
+
refBy?: string
|
73
73
|
|
74
74
|
@Column()
|
75
75
|
@Field()
|
76
|
-
path
|
76
|
+
path?: string
|
77
77
|
|
78
78
|
@Column()
|
79
79
|
@Field()
|
80
|
-
size
|
80
|
+
size?: string
|
81
81
|
|
82
82
|
@Column({
|
83
83
|
nullable: true,
|
@@ -85,32 +85,32 @@ export class Attachment {
|
|
85
85
|
DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
|
86
86
|
? 'longblob'
|
87
87
|
: DATABASE_TYPE == 'postgres'
|
88
|
-
|
89
|
-
|
88
|
+
? 'bytea'
|
89
|
+
: 'blob'
|
90
90
|
})
|
91
|
-
contents
|
91
|
+
contents?: Buffer
|
92
92
|
|
93
93
|
@CreateDateColumn()
|
94
94
|
@Field()
|
95
|
-
createdAt
|
95
|
+
createdAt?: Date
|
96
96
|
|
97
97
|
@UpdateDateColumn()
|
98
98
|
@Field()
|
99
|
-
updatedAt
|
99
|
+
updatedAt?: Date
|
100
100
|
|
101
101
|
@ManyToOne(type => User)
|
102
102
|
@Field(type => User, { nullable: true })
|
103
|
-
creator
|
103
|
+
creator?: User
|
104
104
|
|
105
105
|
@RelationId((attachment: Attachment) => attachment.creator)
|
106
|
-
creatorId
|
106
|
+
creatorId?: string
|
107
107
|
|
108
108
|
@ManyToOne(type => User)
|
109
109
|
@Field(type => User, { nullable: true })
|
110
|
-
updater
|
110
|
+
updater?: User
|
111
111
|
|
112
112
|
@RelationId((attachment: Attachment) => attachment.updater)
|
113
|
-
updaterId
|
113
|
+
updaterId?: string
|
114
114
|
|
115
115
|
@Field()
|
116
116
|
get fullpath(): string {
|