Skip to content

Commit c6e02d1

Browse files
add types & utils
1 parent 5338d65 commit c6e02d1

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

app/src/types/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
export * from './tickets'
2+
3+
export * from './threads'
4+
5+
export interface Metadata {
6+
createdBy: string
7+
createdAt: string
8+
lastUpdatedBy: string
9+
lastUpdatedAt: string
10+
}

app/src/types/threads.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { FragmentPartDto } from '~/tickets/thread/_dto/parts/fragment.part.dto'
2+
import { Metadata } from './'
3+
4+
export interface Threads {
5+
[date: string]: Thread[]
6+
}
7+
8+
export interface Thread {
9+
_id: string
10+
metadata: Metadata
11+
ticketId: string
12+
fragments: Fragments
13+
}
14+
15+
export interface Fragments {
16+
raw?: FragmentPartDto[]
17+
file?: FragmentPartDto[]
18+
}
19+
20+
export interface File {
21+
id: string
22+
disposition: string
23+
message: string
24+
filestorage: Filestorage
25+
}
26+
27+
export interface Filestorage {
28+
id: string
29+
name: string
30+
namespace: string
31+
path: string
32+
mime: string
33+
}
34+
35+
export interface Raw {
36+
id: string
37+
disposition: string
38+
message: string
39+
}

app/src/utils/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './statics'
2+
export * from './mongoId'

app/src/utils/statics.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@ export const lifeSteps = [
77
{ label: 'Ouvert', value: 1, group: 'lifestep', icon: 'mdi-circle', color: 'green' },
88
{ label: 'Clos', value: 0, group: 'lifestep', icon: 'mdi-circle', color: 'red' },
99
]
10+
11+
export enum ThreadType {
12+
SYSTEM = 1,
13+
INTERNAL = 2,
14+
EXTERNAL = 3,
15+
INCOMING = 4,
16+
OUTGOING = 5,
17+
}

0 commit comments

Comments
 (0)