forged 0.4.0

Client API for forged.dev and device provisioning processes
Documentation
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
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
# This file was automatically generated by the backend
# Manual edits will not be persisted.

type AppConfig {
	name: String!
	apiUrl: String!
	frontendUrl: String!
}

type Artifact {
	name: String!
	url: String!
	signature: String
}

type Attachment {
	id: UUID!
	runId: UUID!
	name: String!
	mimeType: String!
	data: [Int!]!
	run: Run!
}

type Binary {
	id: UUID!
	creationDate: DateTime!
	deletionDate: DateTime
	chipId: UUID!
	chip: Chip!
	version: String!
	versionMajor: Int!
	versionMinor: Int!
	versionPatch: Int!
	analysis: BinaryAnalysis
	active: Boolean!
	parts: [BinaryPart!]!
}

type BinaryAnalysis {
	nvmSize: Int!
}

enum BinaryKind {
	ELF
	HEX
	BIN
}

type BinaryPart {
	id: UUID!
	name: String
	binaryId: UUID!
	kind: BinaryKind!
	memoryOffset: Int
	imageHash: [Int!]!
	analysis: BinaryPartAnalysis
	creationDate: NaiveDateTime!
	changeDate: NaiveDateTime!
}

type BinaryPartAnalysis {
	rtt: RttAnalysis!
	nvmSize: Int!
}

type Block {
	"""
	The globally unique ID of this block.
	"""
	id: UUID!
	"""
	The device this block belongs to.
	"""
	run: Run!
	"""
	The schema of the block.
	
	The schema is a contract that has to be fulfilled for the block to be created.
	"""
	schema: BlockSchema!
	"""
	The data this block stores, in JSON format.
	"""
	dataDecoded: JSON!
	"""
	The data this block stores, in a continuous byte slice.
	
	This automatically transfers the stored data into a slice of bytes which can be written
	to device memory.
	"""
	byteSlice(chipId: UUID!): [Int!]!
}

type BlockSchema {
	id: UUID!
	isDeviceIdentifier: Boolean!
	projectId: UUID!
	name: String!
	displayName: String!
	schema: String!
	generator: String
	memorySource: MemoryEndpoint
	memorySink(chipId: UUID!): MemoryEndpoint!
	memorySinks: [MemoryEndpoint!]!
	creationDate: DateTime!
	active: Boolean!
	deletionDate: DateTime
	"""
	Determine if this schema can be used for requirements.
	"""
	supportsRequirements: Boolean!
	requirements: [Requirement!]!
}


type Chip {
	id: UUID!
	projectId: UUID!
	name: String!
	partNumber: String!
	nvmSize: Int
	active: Boolean!
	creationDate: DateTime!
	changeDate: DateTime!
	deletionDate: DateTime
	"""
	Returns true if the chip part number is natively supported by probe-rs.
	"""
	isSupported: Boolean!
	"""
	Returns the newest binary for given project id according to semver.
	"""
	binaryNewest: Binary
	binaries: [Binary!]!
	binary(id: UUID!): Binary!
}

input ChipEndpoint {
	chipId: UUID!
	address: Int!
	length: Int!
	transform: String!
}

type DataBlock {
	blockSchema: BlockSchema!
}

"""
Implement the DateTime<Utc> scalar

The input/output is a string in RFC3339 format.
"""
scalar DateTime

type Device {
	id: UUID!
	name: String
	projectId: UUID!
	creationDate: DateTime!
	changeDate: DateTime!
	project: Project!
	runs: [Run!]!
	"""
	The run with given UUID.
	
	If no UUID is given, the most recent run is returned.
	"""
	run(id: UUID): Run!
	"""
	Whether or not the device is active.
	"""
	active: Boolean!
	"""
	The date when the device was deactivated.
	"""
	deletionDate: DateTime
}

type DeviceConnection {
	"""
	Information to aid in pagination.
	"""
	pageInfo: PageInfo!
	"""
	A list of edges.
	"""
	edges: [DeviceEdge!]!
	"""
	A list of nodes.
	"""
	nodes: [Device!]!
	numDevices: Int!
}

"""
An edge in a connection.
"""
type DeviceEdge {
	"""
	The item at the end of the edge
	"""
	node: Device!
	"""
	A cursor for use in pagination
	"""
	cursor: String!
}

type Family {
	id: UUID!
	definition: String!
	owner: Owner!
}

input FinishStepData {
	binaryId: UUID
}

type FlashChip {
	chipId: UUID!
	command: String
	chip: Chip!
}


type Group {
	id: UUID!
	name: String!
	users: [User!]!
	creationDate: DateTime!
	changeDate: DateTime!
	projects: [Project!]!
}


input InputDataBlock {
	blockSchemaId: UUID
}

input InputFlashChip {
	chipId: UUID
	command: String
}

input InputIntegrationsSettings {
	telegram: InputTelegramSettings!
	matrix: InputMatrixSettings!
}

input InputMatrixSettings {
	rooms: [String!]!
}

input InputPlaybook {
	version: Int
	stations: [InputStation!]!
}

input InputProjectSettings {
	integrations: InputIntegrationsSettings!
}

input InputRunCommand {
	command: String
	directory: String
}

input InputStation {
	name: String
	color: String
	steps: [InputStep!]!
}

input InputStep {
	id: UUID!
	label: String
	kind: InputStepKind!
}

input InputStepKind {
	dataBlock: InputDataBlock
	flashChip: InputFlashChip
	runCommand: InputRunCommand
}

input InputTelegramSettings {
	chatIds: [Int!]!
}

input InsertBinaryPart {
	name: String
	kind: BinaryKind!
	memoryOffset: Int
	image: Upload!
}


type IntegrationsSettings {
	telegram: TelegramSettings!
	matrix: MatrixSettings!
}

"""
A scalar that can represent any JSON value.
"""
scalar JSON

type Log {
	id: UUID!
	runId: UUID!
	level: String!
	message: String!
	creationDate: DateTime!
	run: Run!
}

type MatrixSettings {
	rooms: [String!]!
}

scalar MemoryAddress

type MemoryEndpoint {
	id: UUID!
	schema: BlockSchema!
	chip: Chip!
	sink: Boolean!
	address: MemoryAddress!
	length: Int!
	creationDate: DateTime!
	active: Boolean!
	deletionDate: DateTime
}

type MutationRoot {
	"""
	Creates a new device for given `project_id` and returns the device.
	"""
	deviceCreate: Device!
	"""
	Delete a device, making it no longer appear as being linked to the project.
	"""
	deviceDelete(id: UUID!): UUID!
	signIn(email: String!, password: String!): String!
	"""
	Sign in with a given OAuth provider.
	
	# Arguments
	* `provider`: The provider to be used e.g. `google` or `github`.
	* `code`: The code that was returned from the request we sent to the provider.
	For more info see documentation on OAuth CSRF attack mitigation.
	* `nonce`: The nonce that was sent to the OIDC provider to mitigate replay attacks.
	This nonce is only required for real OIDC providers and not all OAuth providers.
	"""
	signInWithOauth(provider: String!, code: String!, csrfToken: String, nonce: String): String!
	refresh(token: String!, impersonate: UUID): String!
	userCreate(email: String!, password: String!): User!
	userConfirm(token: String!): Boolean!
	userApprove(id: UUID!): UUID!
	userResendConfirmCode(email: String!): Boolean!
	userRequestPasswordReset(email: String!): Boolean!
	userResetPassword(token: String!, newPassword: String!): Boolean!
	"""
	Change the current user's password.
	"""
	changePassword(currentPassword: String!, newPassword: String!): Boolean!
	"""
	Creates a new binary with the specified chip
	"""
	binaryCreate(chipId: UUID!, version: String!, parts: [InsertBinaryPart!]!): Binary!
	"""
	Delete a binary, making it no longer appear as being linked to the project.
	"""
	binaryDelete(id: UUID!): UUID!
	"""
	Creates a new project for a user and returns the project upon successful creation.
	"""
	projectCreate(name: String!, groupOwner: UUID): Project!
	"""
	Delete a project, making it no longer appear as being linked to the user.
	"""
	projectDelete(id: UUID!): UUID!
	"""
	Change the owner of a project to a new user or group
	"""
	projectTransfer(id: UUID!, ownerId: UUID!): UUID!
	"""
	Update settings on a project.
	"""
	projectSettingsUpdate(id: UUID!, settings: InputProjectSettings!): UUID!
	provisionerCreate(name: String!, station: String!, projectId: UUID!): Provisioner!
	provisionerRename(id: UUID!, name: String!): Provisioner!
	provisionerAssignStation(id: UUID!, station: String!): Provisioner!
	"""
	Delete a provisioner, making it no longer appear as being linked to the project.
	"""
	provisionerDelete(id: UUID!): UUID!
	provisionerRegenerateToken(id: UUID!): Provisioner!
	"""
	Creates a new log for given `project_id` and returns the log.
	"""
	logCreate(level: String!, message: String!): Log!
	"""
	Updates the subscription for the current user.
	"""
	subscriptionUpdate(tier: Tier!, paymentMethod: String): String
	"""
	Updates the subscription for the current user.
	"""
	paymentMethodCreate(number: String!, expMonth: Int!, expYear: Int!, cvc: String!): PaymentMethod!
	"""
	Creates a new family for a user and returns the family upon successful creation.
	"""
	familyCreate(definition: String!): Family!
	"""
	Creates a new attachment record and returns the ID of the created record.
	"""
	attachmentCreate(data: Upload!): Attachment!
	"""
	Creates a new block_schema and returns the block_schema.
	"""
	blockSchemaCreate(projectId: UUID!, name: String!, schema: String!, generator: String, memorySource: ChipEndpoint, memorySinks: [ChipEndpoint!]!, isDeviceIdentifier: Boolean!): BlockSchema!
	"""
	Re-name a block schema
	"""
	blockSchemaRename(id: UUID!, name: String!): UUID!
	blockSchemaSetIdentifier(id: UUID!, identifier: Boolean!): UUID!
	"""
	Delete a block schema, making it no longer appear as being linked to the project.
	"""
	blockSchemaDelete(id: UUID!): UUID!
	"""
	Creates a new block for given `project_id` and returns the block.
	"""
	blockCreate(schemaName: String!, data: JSON!): Block!
	blockCreateFromBytes(schemaName: String!, data: [Int!]!): Block!
	"""
	Creates a new run for the currently in-session device and returns the run.
	"""
	runCreate(station: String!): Run!
	"""
	Creates a new run for an existing device and returns the run.
	"""
	runCreateFor(identifier: String!, station: String!): Run!
	"""
	Finish provisioning for a run.
	"""
	runFinish: UUID!
	"""
	Start a provisioning step on the currently-active run.
	"""
	startStep(description: String!): UUID!
	"""
	Start a provisioning step on the currently-active run.
	"""
	finishStep(passed: Boolean!, data: FinishStepData): UUID!
	"""
	Create a new requirement for given `project_id`.
	"""
	requirementCreate(projectId: UUID!, schemaId: UUID!, name: String!, description: String, lowerLimit: Float, inclusiveLower: Boolean!, upperLimit: Float, inclusiveUpper: Boolean!): Requirement!
	"""
	Delete a requirement,making it no longer linked to the project.
	"""
	requirementDelete(id: UUID!): UUID!
	"""
	Updates the draft playbook with the given new playbook.
	"""
	playbookUpdate(projectId: UUID!, playbook: InputPlaybook!): Boolean!
	playbookSave(projectId: UUID!): Int!
	"""
	Creates a new project for a user and returns the project upon successful creation.
	"""
	chipCreate(projectId: UUID!, name: String!, partNumber: String!): Chip!
	"""
	Delete a chip, making it no longer appear as being linked to the project.
	"""
	chipDelete(id: UUID!): UUID!
	groupCreate(name: String!): Group!
	groupAddUser(groupId: UUID!, userEmail: String!): UUID!
	groupRemoveUser(groupId: UUID!, userId: UUID!): UUID!
}

"""
ISO 8601 combined date and time without timezone.

# Examples

* `2015-07-01T08:59:60.123`,
"""
scalar NaiveDateTime

type Notification {
	id: UUID!
	projectId: UUID
	event: JSON!
	retry: Int!
	creationDate: DateTime!
	deliveryDate: DateTime
	project: Project
}

type NotificationConnection {
	"""
	Information to aid in pagination.
	"""
	pageInfo: PageInfo!
	"""
	A list of edges.
	"""
	edges: [NotificationEdge!]!
	"""
	A list of nodes.
	"""
	nodes: [Notification!]!
	numNotifications: Int!
}

"""
An edge in a connection.
"""
type NotificationEdge {
	"""
	The item at the end of the edge
	"""
	node: Notification!
	"""
	A cursor for use in pagination
	"""
	cursor: String!
}

type OauthData {
	authUrl: String!
	csrfToken: String!
	nonce: String
}

type OauthUser {
	subject: String!
	provider: String!
}

union Owner = User | Group

"""
Information about pagination in a connection
"""
type PageInfo {
	"""
	When paginating backwards, are there more items?
	"""
	hasPreviousPage: Boolean!
	"""
	When paginating forwards, are there more items?
	"""
	hasNextPage: Boolean!
	"""
	When paginating backwards, the cursor to continue.
	"""
	startCursor: String
	"""
	When paginating forwards, the cursor to continue.
	"""
	endCursor: String
}

type PaymentMethod {
	id: String!
}

type Playbook {
	projectId: UUID!
	version: Int
	stations: [Station!]!
	station(name: String!): Station
	project: Project!
}

type Project {
	id: UUID!
	name: String!
	active: Boolean!
	settings: ProjectSettings!
	creationDate: DateTime!
	changeDate: DateTime!
	deletionDate: DateTime
	chip(id: UUID!): Chip!
	"""
	Get the currently-active playbook for the project.
	"""
	playbook: Playbook!
	"""
	Get all playbooks registered with the project.
	"""
	playbooks: [Playbook!]!
	chips: [Chip!]!
	device(id: UUID!): Device!
	devices(after: String, first: Int, filter: String): DeviceConnection!
	owner: Owner!
	provisioner(id: UUID!): Provisioner!
	provisioners: [Provisioner!]!
	blockSchemas: [BlockSchema!]!
	blockSchema(id: UUID!): BlockSchema!
	requirements: [Requirement!]!
	requirement(id: UUID!): Requirement!
	notifications(after: String, first: Int, filter: String): NotificationConnection!
}

type ProjectSettings {
	integrations: IntegrationsSettings!
}

type Provisioner {
	id: UUID!
	projectId: UUID!
	currentDeviceId: UUID
	name: String!
	token: String
	active: Boolean!
	creationDate: DateTime!
	changeDate: DateTime!
	project: Project!
	currentDevice: Device
	currentRun: Run
	station: String!
	steps: [Step!]!
}

type ProvisionerReleases {
	ui: [Release!]!
}

type QueryRoot {
	"""
	Returns the data that is required for the frontend to work.
	"""
	config: AppConfig!
	currentUser: User!
	usersPendingApproval: [User!]!
	users: [User!]!
	"""
	Lists all projects.
	"""
	projects: [Project!]!
	"""
	Returns a project with a certain `id`.
	"""
	project(id: UUID!): Project!
	"""
	Returns all available targets.
	"""
	availableTargets(targetFiles: [String!]): [Target!]!
	currentProvisioner: Provisioner!
	ping: Boolean!
	"""
	Returns a subscription with a certain `id`.
	"""
	subscription(id: String!): Subscription!
	"""
	Returns the data that is required for stripe to work in the frontend.
	"""
	stripeData: StripeData!
	"""
	Returns a subscription with a certain `id`.
	"""
	paymentMethod(id: String!): PaymentMethod!
	paymentMethods: [PaymentMethod!]!
	oauthUrl(provider: String!): OauthData!
	"""
	Returns a family with a certain `id`.
	"""
	family(id: UUID!): Family!
	"""
	Returns the data that is required for the frontend to work.
	"""
	provisionerReleases: ProvisionerReleases!
	group(id: UUID!): Group!
}

type Release {
	version: String!
	name: String
	releaseNotes: String!
	artifacts: [Artifact!]!
}

type Requirement {
	"""
	The ID of the requirement.
	"""
	id: UUID!
	"""
	The name of the requirement.
	"""
	name: String!
	"""
	The description of the requirement.
	"""
	description: String
	"""
	The date that the requirement was created.
	"""
	creationDate: DateTime!
	"""
	The date when the requirement was deactivated.
	"""
	deletionDate: DateTime
	"""
	Whether or not the requirement is active.
	"""
	active: Boolean!
	"""
	The ID of the [`BlockSchema`] used as the source of the requirement data.
	"""
	schemaId: UUID!
	"""
	The lower bounds limit of the requirement.
	"""
	lowerLimit: Float
	"""
	The upper bounds limit of the requirement.
	"""
	upperLimit: Float
	"""
	Indicates if the lower bound is inclusive or exclusive.
	"""
	inclusiveLower: Boolean!
	"""
	Indicates if the upper bound is inclusive or exclusive.
	"""
	inclusiveUpper: Boolean!
	"""
	The [`BlockSchema`] associated with the requirement's input data.
	"""
	schema: BlockSchema!
}

type RequirementCheck {
	id: UUID!
	requirementId: UUID!
	blockId: UUID
	passed: Boolean!
	checkDate: DateTime!
	runId: UUID!
	requirement: Requirement!
	block: Block
}

type RttAnalysis {
	headerLocation: Int
}

type Run {
	id: UUID!
	deviceId: UUID!
	projectId: UUID!
	provisioner: Provisioner
	station: String!
	creationDate: DateTime!
	changeDate: DateTime!
	finished: Boolean!
	device: Device!
	logs: [Log!]!
	attachments: [Attachment!]!
	blocks: [Block!]!
	block(id: UUID!): Block!
	blockForSchema(schemaId: UUID!): Block
	blockSchemas: [BlockSchema!]!
	requirementChecks: [RequirementCheck!]!
	requirements: [Requirement!]!
	"""
	Get the overall status of the run.
	"""
	runStatus: StepStatus!
	steps: [RunStep!]!
	"""
	Reports any reasons for a run failure.
	"""
	errors: [String!]!
}

type RunCommand {
	command: String
	directory: String
}

type RunStep {
	id: UUID!
	runId: UUID!
	stepId: UUID!
	status: StepStatus!
	station: String!
	creationDate: DateTime!
	changeDate: DateTime!
	data: RunStepData!
	step: Step!
}

type RunStepData {
	binaryId: UUID
	binary: Binary
}

type Station {
	name: String!
	color: String!
	steps: [Step!]!
}

type Step {
	id: UUID!
	kind: StepKind!
	position: Int!
	station: String!
	label: String
	creationDate: NaiveDateTime!
	changeDate: NaiveDateTime!
}

union StepKind = DataBlock | FlashChip | RunCommand

enum StepStatus {
	PENDING
	PASS
	FAIL
}


type StripeData {
	publicKey: String!
}

type Subscription {
	id: String!
	user: User!
}

type SubscriptionRoot {
	"""
	Yields a new device whenever a new device is created.
	"""
	createDeviceEvent(token: String!, projectId: UUID!): Device!
	"""
	Yields a new requirement whenever one is created.
	"""
	createRequirementEvent(token: String!, projectId: UUID!): Requirement!
	"""
	Yields a new device whenever a new device is created.
	"""
	logEvent(token: String!, runId: UUID!): Log!
	"""
	Yields a new block_schema whenever a new block_schema is created.
	"""
	createBlockSchemaEvent(token: String!, projectId: UUID!): BlockSchema!
	"""
	Yields a new device whenever a new device is created.
	"""
	createBlockEvent(token: String!, runId: UUID!): Block!
	"""
	Yields a new device whenever a new device is created.
	"""
	createRunEvent(token: String!, deviceId: UUID!): Run!
}

type Target {
	name: String!
}

type TelegramSettings {
	chatIds: [Int!]!
}

enum Tier {
	"""
	Only a very limited free featureset.
	"""
	FREE
	"""
	The basic service with all it's basic features.
	"""
	BASE
	"""
	The full featureset unlocked.
	"""
	FULL
}

"""
A UUID is a unique 128-bit number, stored as 16 octets. UUIDs are parsed as
Strings within GraphQL. UUIDs are used to assign unique identifiers to
entities without requiring a central allocating authority.

# References

* [Wikipedia: Universally Unique Identifier](http://en.wikipedia.org/wiki/Universally_unique_identifier)
* [RFC4122: A Universally Unique IDentifier (UUID) URN Namespace](http://tools.ietf.org/html/rfc4122)
"""
scalar UUID

scalar Upload

type User {
	id: UUID!
	stripeCustomerId: String
	email: String!
	tier: Tier!
	admin: Boolean!
	userType: UserType!
	oauthUser: OauthUser
	creationDate: DateTime!
	changeDate: DateTime!
	projects: [Project!]!
	families: [Family!]!
	groups: [Group!]!
	subscription: Subscription
}

enum UserType {
	NATIVE
	OAUTH
}

directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
schema {
	query: QueryRoot
	mutation: MutationRoot
	subscription: SubscriptionRoot
}