forked from dungeon-revealer/dungeon-revealer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype-definitions.graphql
786 lines (656 loc) · 13.4 KB
/
type-definitions.graphql
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
### THIS FILE IS AUTO GENERATED
"""
Instruction for establishing a live connection that is updated once the underlying data changes.
"""
directive @live(
"""
Whether the query should be live or not.
"""
if: Boolean = true
"""
Propose a desired throttle interval ot the server in order to receive updates to at most once per "throttle" milliseconds. The server must not accept this value.
"""
throttle: Int
) on QUERY
type DiceRollOperatorNode implements DiceRollDetail {
content: String!
}
interface DiceRollDetail {
content: String!
}
type DiceRollConstantNode implements DiceRollDetail {
content: String!
}
type DiceRollDiceRollNode implements DiceRollDetail {
content: String!
min: Float!
max: Float!
rollResults: [DiceRollResult!]!
}
type DiceRollResult {
dice: String!
result: Float!
category: DiceRollCategory!
crossedOut: Boolean!
}
enum DiceRollCategory {
DEFAULT
MAX
MIN
}
type DiceRollOpenParenNode implements DiceRollDetail {
content: String!
}
type DiceRollCloseParenNode implements DiceRollDetail {
content: String!
}
"""
A chat message
"""
type UserChatMessage implements ChatMessage & TextChatMessage {
id: ID!
authorName: String!
content: String!
diceRolls: [DiceRoll!]!
referencedDiceRolls: [DiceRoll!]!
createdAt: String!
containsDiceRoll: Boolean!
}
interface ChatMessage {
id: ID!
}
interface TextChatMessage implements ChatMessage {
id: ID!
content: String!
createdAt: String!
containsDiceRoll: Boolean!
}
type DiceRoll {
result: Float!
detail: [DiceRollDetail!]!
rollId: String!
}
type OperationalChatMessage implements ChatMessage & TextChatMessage {
id: ID!
content: String!
createdAt: String!
containsDiceRoll: Boolean!
}
type SharedResourceChatMessage implements ChatMessage {
id: ID!
authorName: String!
resource: SharedResource
}
union SharedResource = Note | Image
type Note implements Node {
id: ID!
documentId: ID!
title: String!
content: String!
contentPreview: String!
createdAt: Int!
viewerCanEdit: Boolean!
viewerCanShare: Boolean!
access: String!
isEntryPoint: Boolean!
updatedAt: Int!
}
interface Node {
id: ID!
}
type Image implements Node {
id: ID!
imageId: ID!
url: String!
}
type Query {
chat(first: Int, after: ID): ChatMessageConnection!
sharedSplashImage: Image
users(first: Int, after: ID): ConnectedUserConnection!
usersCount: Int!
me: User!
notes(first: Int, after: String, filter: NotesFilter): NoteConnection!
notesSearch(first: Int, after: String, query: String): NoteSearchConnection!
note(documentId: ID!): Note
tokenImages(
first: Int
after: String
sourceImageSha256: String
titleFilter: String
): TokenImageConnection
"""
A connection of all available maps within the library
"""
maps(
"""
The amount of items to fetch.
"""
first: Int
"""
Cursor after which items should be fetched.
"""
after: String
"""
Needle for filtering the items.
"""
titleNeedle: String
): MapsConnection!
"""
The active map that is shared with the players.
"""
activeMap: Map
"""
Get a map by id.
"""
map(id: ID!): Map
node(id: ID!): Node
}
type ChatMessageConnection {
edges: [ChatMessageEdge!]!
pageInfo: PageInfo!
}
type ChatMessageEdge {
cursor: String!
node: ChatMessage!
}
type PageInfo {
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: String!
endCursor: String!
}
type ConnectedUserConnection {
edges: [ConnectedUserEdge!]!
pageInfo: PageInfo!
}
type ConnectedUserEdge {
cursor: String!
node: User!
}
type User {
id: ID!
name: String!
}
type NoteConnection {
edges: [NoteEdge!]!
pageInfo: PageInfo!
}
type NoteEdge {
cursor: String!
node: Note!
}
"""
A filter that can be applied to the paginated notes.
"""
enum NotesFilter {
"""
Only return notes that are marked as entrypoints.
"""
Entrypoint
"""
Return all notes.
"""
All
}
type NoteSearchConnection {
pageInfo: PageInfo
edges: [NoteSearchEdgeType!]!
}
type NoteSearchEdgeType {
cursor: String!
node: NoteSearchResultType!
}
type NoteSearchResultType {
noteId: ID!
documentId: ID!
title: String!
preview: String!
}
type TokenImageConnection {
edges: [TokenImageEdge!]!
pageInfo: PageInfo!
}
type TokenImageEdge {
cursor: String!
node: TokenImage!
}
"""
A entity that can be attached to an image.
"""
type TokenImage implements Node {
id: ID!
title: String!
url: String!
}
"""
A connection of maps.
"""
type MapsConnection {
edges: [MapEdge!]!
pageInfo: PageInfo!
}
type MapEdge {
cursor: String!
node: Map!
}
"""
A map entity.
"""
type Map {
"""
The unique ID of a map.
"""
id: ID!
"""
The title of the map.
"""
title: String!
"""
The URL of the map image.
"""
mapImageUrl: String!
"""
The URL of the fog progress image that is only accessible to the DM.
"""
fogProgressImageUrl: String
"""
The URL of the fog live image, that is shown to players.
"""
fogLiveImageUrl: String
"""
The grid of the map. Is 'null' if no grid has been configured.
"""
grid: MapGrid
showGrid: Boolean!
showGridToPlayers: Boolean!
tokens: [MapToken!]!
}
type MapGrid {
color: String!
offsetX: Float!
offsetY: Float!
columnWidth: Float!
columnHeight: Float!
}
"""
A token on the map.
"""
type MapToken {
id: ID!
x: Float!
y: Float!
rotation: Float!
radius: Float!
color: String!
label: String!
isVisibleForPlayers: Boolean!
isMovableByPlayers: Boolean!
isLocked: Boolean!
tokenImage: TokenImage
referenceId: ID
}
type Mutation {
logIn(input: LogInInput): LogInResult!
changeName(input: ChangeNameInput!): ChangeNameResult!
chatMessageCreate(input: ChatMessageCreateInput!): ChatMessageCreateResult!
shareResource(input: ShareResourceInput!): Boolean
shareImage(input: ShareImageInput!): Boolean
splashShareImage(input: SplashShareImageInput!): Boolean
noteCreate(input: NoteCreateInput!): NoteCreateResult!
noteDelete(input: NoteDeleteInput!): NoteDeleteResult!
noteUpdateContent(input: NoteUpdateContentInput!): NoteUpdateResult!
noteUpdateTitle(input: NoteUpdateTitleInput!): NoteUpdateResult!
noteUpdateAccess(input: NoteUpdateAccessInput!): NoteUpdateResult!
noteUpdateIsEntryPoint(input: NoteUpdateIsEntryPointInput!): NoteUpdateResult!
requestTokenImageUpload(
input: RequestTokenImageUploadInput!
): RequestImageTokenUploadResult!
tokenImageCreate(input: TokenImageCreateInput!): TokenImageCreateResult!
mapTokenUpdateMany(input: MapTokenUpdateManyInput!): Boolean
mapTokenRemoveMany(input: MapTokenRemoveManyInput!): Boolean
"""
Add token to a map
"""
mapTokenAddMany(input: MapTokenAddManyInput!): Boolean
"""
Request the upload of a token image.
"""
mapImageRequestUpload(
input: MapImageRequestUploadInput!
): MapImageRequestUploadResult!
"""
Create a new map.
"""
mapCreate(input: MapCreateInput!): MapCreateResult!
"""
Delete a map.
"""
mapDelete(input: MapDeleteInput!): Boolean!
"""
Update the title of a map.
"""
mapUpdateTitle(input: MapUpdateTitleInput!): MapUpdateTitleResult!
"""
Update the grid of a map.
"""
mapUpdateGrid(input: MapUpdateGridInput!): MapUpdateGridResult!
"""
Ping a point on the map.
"""
mapPing(input: MapPingInput!): Boolean
}
type LogInResult {
user: User!
}
input LogInInput {
id: String!
name: String!
}
type ChangeNameResult {
me: User!
}
input ChangeNameInput {
name: String!
}
type ChatMessageCreateResult {
error: ChatMessageCreateResultError
success: ChatMessageCreateResultSuccess
}
type ChatMessageCreateResultError {
reason: String!
}
type ChatMessageCreateResultSuccess {
_: Boolean
}
input ChatMessageCreateInput {
rawContent: String!
variables: String
}
input ShareResourceInput {
contentId: ID!
}
input ShareImageInput {
imageId: ID!
}
input SplashShareImageInput {
imageId: ID
}
type NoteCreateResult {
note: Note!
}
input NoteCreateInput {
title: String!
content: String!
isEntryPoint: Boolean!
}
type NoteDeleteResult {
success: Boolean!
deletedNoteId: ID!
}
input NoteDeleteInput {
noteId: String!
}
type NoteUpdateResult {
note: Note
}
input NoteUpdateContentInput {
id: String!
content: String!
}
input NoteUpdateTitleInput {
id: String!
title: String!
}
input NoteUpdateAccessInput {
id: String!
access: String!
}
input NoteUpdateIsEntryPointInput {
id: String!
isEntryPoint: Boolean!
}
union RequestImageTokenUploadResult =
RequestTokenImageUploadDuplicate
| RequestTokenImageUploadUrl
"""
A image with the given SHA-256 does already exist.
"""
type RequestTokenImageUploadDuplicate {
"""
The TokenImage that already exists for the given hash.
"""
tokenImage: TokenImage!
}
type RequestTokenImageUploadUrl {
uploadUrl: String!
}
input RequestTokenImageUploadInput {
"""
The SHA256 of the file that is going to be uploaded in hexadecimal form.
"""
sha256: String!
"""
The extension of the file thats is going to be uploaded.
"""
extension: String!
}
union TokenImageCreateResult = TokenImageCreateSuccess | TokenImageCreateError
type TokenImageCreateSuccess {
createdTokenImage: TokenImage!
}
type TokenImageCreateError {
reason: String!
}
input TokenImageCreateInput {
"""
The title of the token image.
"""
title: String!
"""
The SHA256 of the file that has been uploaded in hexadecimal form.
"""
sha256: String!
"""
The SHA256 of the file the image got cut out from in hexadecimal form.
"""
sourceSha256: String
}
input MapTokenUpdateManyInput {
"""
The id of the map the token belong to.
"""
mapId: ID!
"""
The token ids that should be updated.
"""
tokenIds: [ID!]!
"""
The properties that should be updated on the affected tokens.
"""
properties: MapTokenUpdateManyPropertiesInput!
}
"""
The properties on the tokens that should be updated. Properties that are not provided will remain untouched.
"""
input MapTokenUpdateManyPropertiesInput {
"""
Color to be updated. Will not be updated if null is provided.
"""
color: String
"""
Color to be updated. Will not be updated if null is provided.
"""
isVisibleForPlayers: Boolean
"""
Color to be updated. Will not be updated if null is provided.
"""
isMovableByPlayers: Boolean
"""
Token image id to be updated. Will be updated if null is provided.
"""
tokenImageId: ID
"""
Rotation to be updated. Will not be updated if null is provided.
"""
rotation: Float
}
input MapTokenRemoveManyInput {
"""
The id of the map the token belong to.
"""
mapId: ID!
"""
The ids of the token that should be removed.
"""
tokenIds: [ID!]!
}
input MapTokenAddManyInput {
mapId: ID!
tokens: [MapTokenAddManyTokenInput!]!
}
input MapTokenAddManyTokenInput {
x: Float!
y: Float!
color: String!
label: String!
radius: Float
rotation: Float
isVisibleForPlayers: Boolean
isMovableByPlayers: Boolean
isLocked: Boolean
tokenImageId: ID
}
type MapImageRequestUploadResult {
"""
The id of the map image upload request.
"""
id: ID!
"""
The URL that should be used for uploading the image
"""
uploadUrl: String!
}
input MapImageRequestUploadInput {
"""
The SHA256 of the file that is going to be uploaded in hexadecimal form.
"""
sha256: String!
"""
The extension of the file thats is going to be uploaded.
"""
extension: String!
}
union MapCreateResult = MapCreateError | MapCreateSuccess
type MapCreateError {
"""
The reason on why the map creation failed.
"""
reason: String
}
type MapCreateSuccess {
createdMap: Map!
}
input MapCreateInput {
"""
The id of the map upload request received via 'Mutation.mapImageRequestUpload'.
"""
mapImageUploadId: ID!
title: String!
}
input MapDeleteInput {
"""
The id of the map that should be deleted.
"""
mapId: String!
}
type MapUpdateTitleResult {
updatedMap: Map!
}
input MapUpdateTitleInput {
mapId: ID!
newTitle: String!
}
type MapUpdateGridResult {
updatedMap: Map!
}
input MapUpdateGridInput {
mapId: ID!
grid: GridInput!
showGrid: Boolean!
showGridToPlayers: Boolean!
}
input GridInput {
color: String!
offsetX: Float!
offsetY: Float!
columnWidth: Float!
columnHeight: Float!
}
input MapPingInput {
mapId: ID!
x: Float!
y: Float!
}
type Subscription {
userUpdate: UserUpdateSubscription!
chatMessagesAdded: ChatMessagesAddedSubscription!
notesUpdates(
filter: NotesFilter
endCursor: String!
hasNextPage: Boolean!
): NotesUpdates!
mapPing(mapId: ID!): MapPing!
}
union UserUpdateSubscription =
UserAddUpdate
| UserRemoveUpdate
| UserChangeUpdate
type UserAddUpdate {
user: User!
usersCount: Int!
}
type UserRemoveUpdate {
userId: ID!
usersCount: Int!
}
type UserChangeUpdate {
user: User!
}
type ChatMessagesAddedSubscription {
messages: [ChatMessage!]!
}
"""
Describes update instructions for the NoteConnection type.
"""
type NotesUpdates {
"""
A node that was added to the connection.
"""
addedNode: NotesConnectionEdgeInsertionUpdate
"""
A note that was updated.
"""
updatedNote: Note
"""
A note that was removed.
"""
removedNoteId: ID
}
"""
Describes where a edge should be inserted inside a NotesConnection.
"""
type NotesConnectionEdgeInsertionUpdate {
"""
The cursor of the item before which the node should be inserted.
"""
previousCursor: String
"""
The edge that should be inserted.
"""
edge: NoteEdge
}
type MapPing {
id: ID!
x: Float!
y: Float!
}