-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.gql
157 lines (132 loc) · 2.68 KB
/
schema.gql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
directive @extends on INTERFACE | OBJECT
directive @external on FIELD_DEFINITION | OBJECT
directive @key(fields: String!) on INTERFACE | OBJECT
directive @provides(fields: String!) on FIELD_DEFINITION
directive @requires(fields: String!) on FIELD_DEFINITION
type AppModel {
status: Int!
}
type FileDurationMetaDTO {
hour: Float!
minute: Float!
original: String!
second: Float!
}
type FileMetaDTO {
bitrate: Float
codec: String
contentType: String!
duration: FileDurationMetaDTO
extension: String!
fps: Float
height: Float!
sha1: String
size: Float!
width: Float!
}
type FileModelDTO {
_id: String!
createAt: String!
meta: FileMetaDTO!
original_filename: String!
owner: String!
type: FileTypeEnum!
updateAt: String!
uri: String!
zone: ZoneEnum!
}
enum FileTypeEnum {
Image
ImageThumbnail
Video
VideoThumbnail
}
type Mutation {
CreateUser(UserRegisterInput: UserRegisterInput!): UserWithId!
Login(UserLoginInputDTO: UserLoginInputDTO!): UserSessionDTO!
Logout: String
RefreshToken: String
UpdateUser(UserUpdateInput: UserUpdateInput!): UserWithId!
}
type Query {
GetFileById(id: String!): FileModelDTO!
GetRecentFiles(limit: Int = 1000, skip: Int = 0): RecentFiles!
GetUserBySession: UserWithId
ServerStatus: AppModel!
User(id: String!): UserWithId
Users(limit: Int = 1000, skip: Int = 0): [UserWithId!]!
}
type RecentFile {
createAt: String!
original_filename: String!
type: String!
updateAt: String!
uri: String!
uri_thumbnail: String!
}
type RecentFiles {
result: [RecentPreviews!]!
}
type RecentPreviews {
date: String!
files: [RecentFile!]
}
input UserLoginInputDTO {
email: String!
password: String!
}
enum UserPackageEnumSession {
freeUser
paidUser
}
input UserRegisterInput {
mainEmail: String!
name: String!
password: String!
}
enum UserRoleEnumSession {
admin
staff
user
}
type UserSessionDTO {
_id: String!
mainEmail: String!
name: String!
package: UserPackageEnumSession!
role: UserRoleEnumSession!
zone: UserZoneEnumSession!
}
type UserToken {
provider: String!
token: String!
}
input UserUpdateInput {
id: String!
mainEmail: String
name: String
}
type UserWithId {
_id: String!
createAt: String!
deactivate: Boolean
email: [String!]!
mainEmail: String!
name: String
oauth: UserToken!
package: UserPackageEnumSession!
password: String!
role: UserRoleEnumSession!
updateAt: String!
zone: UserZoneEnumSession!
}
enum UserZoneEnumSession {
TH1
TH2
}
enum ZoneEnum {
TH
}