-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathschema.gql
170 lines (151 loc) · 3.86 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
158
159
160
161
162
163
164
165
166
167
168
169
170
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type Webhook {
_id: ID!
url: String!
events: [String!]!
filter: JSONObject
}
"""
The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
"""
scalar JSONObject @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
type Tag {
_id: ID!
title: String!
status: String!
tagGroup: TagGroup!
}
type TagGroup {
_id: ID!
title: String!
metalevel: String!
applicationID: String!
status: String!
tags: [Tag!]!
}
type WhispAttachment {
"""Mapping of the file to a location in the data attribute"""
dataMappingPath: String
"""Key in S3-Bucket. Call via API: <whispr-Backend>/file/<S3-Key>"""
file: String!
}
type Whisp {
_id: ID!
readableID: String
type: String
severity: Int
description: String
closed: Boolean
applicationID: String
plantID: String
locationID: String
manual: Boolean
openedBy: String
openedById: String
closedBy: String
closedById: String
timestamp: DateTime
updated: DateTime
expirationDate: DateTime
timeToLiveSec: Float
tags: [Tag!]
data: JSONObject
attachments: [WhispAttachment!]
dataIndexKey: String
}
"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime
type WhispCount {
_id: JSONObject
count: Int!
}
type Query {
whispById(id: String!): Whisp
whisps(filter: JSONObject, sort: JSONObject, limit: Int): [Whisp!]
whispsAuthBeta(filter: JSONObject, sort: JSONObject, limit: Int): [Whisp!]
countWhisps(filter: [JSONObject!], group: JSONObject): [WhispCount!]!
webhooks: [Webhook!]
tagGroups(tagGroup: TagGroupInputType!): [TagGroup!]
tagGroupById(id: String!): TagGroup
tags(tag: TagInputType!): [Tag!]
tagById(id: String!): Tag
}
"""New Tag Group"""
input TagGroupInputType {
_id: String
title: String
metalevel: String
applicationID: String
status: String
}
"""New Tag"""
input TagInputType {
_id: String
title: String
status: String
tagGroup: TagGroupInputType
}
type Mutation {
createWhisp(whisp: WhispInputType!): Whisp!
updateWhisp(id: String!, whisp: WhispInputType!): Whisp!
replaceWhisp(id: String!, whisp: WhispInputType!): Whisp!
deleteWhisp(id: String!): Boolean!
createWebhook(webhook: WebhookInputType!): Webhook!
deleteWebhook(id: String!): Boolean!
createTagGroup(tagGroup: TagGroupInputType!): TagGroup!
updateTagGroup(id: String!, tagGroup: TagGroupInputType!): TagGroup!
replaceTagGroup(id: String!, tagGroup: TagGroupInputType!): TagGroup!
deleteTagGroup(id: String!): Boolean!
createTag(tag: TagInputType!): Tag!
updateTag(id: String!, tag: TagInputType!): Tag!
replaceTag(id: String!, tag: TagInputType!): Tag!
deleteTag(id: String!): Boolean!
}
"""New whisp data"""
input WhispInputType {
_id: String
readableID: String
type: String
severity: Int
description: String
closed: Boolean
applicationID: String
plantID: String
locationID: String
dataIndexKey: String
manual: Boolean
openedBy: String
openedById: String
closedBy: String
closedById: String
timestamp: DateTime
updated: DateTime
data: JSONObject
attachments: [WhispAttachmentInput!]
tags: [TagInputType!]
timeToLive: String
expirationDate: DateTime
}
input WhispAttachmentInput {
"""Mapping of the file to a location in the data attribute"""
dataMappingPath: String
file: WhispFileUpload!
}
input WhispFileUpload {
oldFile: String
newFile: Upload
}
"""The `Upload` scalar type represents a file upload."""
scalar Upload
input WebhookInputType {
url: String!
events: [String!]!
filter: JSONObject
}
type Subscription {
whispAdded(filter: JSONObject!): Whisp!
}