-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
1898 lines (1676 loc) · 36.4 KB
/
schema.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
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
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
schema {
query: Query
mutation: Mutation
}
"""
Indicates that a position is semantically non null: it is only null if there is a matching error in the `errors` array.
In all other cases, the position is non-null.
Tools doing code generation may use this information to generate the position as non-null if field errors are handled out of band:
```graphql
type User {
# email is semantically non-null and can be generated as non-null by error-handling clients.
email: String @semanticNonNull
}
```
The `levels` argument indicates what levels are semantically non null in case of lists:
```graphql
type User {
# friends is semantically non null
friends: [User] @semanticNonNull # same as @semanticNonNull(levels: [0])
# every friends[k] is semantically non null
friends: [User] @semanticNonNull(levels: [1])
# friends as well as every friends[k] is semantically non null
friends: [User] @semanticNonNull(levels: [0, 1])
}
```
`levels` are zero indexed.
Passing a negative level or a level greater than the list dimension is an error.
"""
directive @semanticNonNull(levels: [Int] = [0]) on FIELD_DEFINITION
input AcceptInvitationInput {
authenticationIdentityId: ID!
workerId: ID!
}
"""
Identifies an entity as being either "active" or "inactive".
Activatable entities have two operations: activate and deactivate.
"""
interface Activatable implements Component {
active: Active @semanticNonNull
id: ID!
}
type ActivationStatus {
activatedAt: String
active: Boolean!
deactivatedAt: String
}
"""
TODO
"""
type Active {
active: Boolean!
updatedAt: Temporal @semanticNonNull
}
"""
TODO
"""
input ActiveInput {
active: Boolean!
updatedAt: TemporalInput
}
input AdvanceFsmOptions {
fsm: AdvanceTaskOptions!
task: AdvanceTaskOptions!
}
input AdvanceTaskOptions {
"""
This should be the Task's current hash (as far as you know) as it was
returned to you when first querying for the Task in question.
"""
hash: String!
id: ID!
overrides: [FieldInput!]
}
type AdvanceTaskStateMachineResult {
diagnostics: [Diagnostic!]
instantiations: [TaskEdge!]
root: Task @semanticNonNull
}
type Aggregate {
"""
The group, or bucket, that uniquely identifies this aggregate.
For example, this will be one of the `groupByTag`s passed to `trackingAgg`.
"""
group: String @semanticNonNull
"""
The computed aggregate value.
Currently, this will always be a string value representing a duration in
seconds, e.g. "360" -> 360 seconds. `null` will be returned when no such
aggregate can be computed, e.g. "time in planned downtime" when no "planned
downtime" events exist.
"""
value: String
}
enum ApplicationType {
Checklist
}
"""
Identifies an Entity as being assignable to another Entity.
"""
interface Assignable implements Component {
id: ID!
}
type AssignableConnection {
edges: [AssignableEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type AssignableEdge {
cursor: String!
node: Assignable!
}
"""
TODO
"""
type Assignee implements Component {
assignedAt: Temporal!
assignedTo: Assignable!
id: ID!
}
type AssigneeConnection {
edges: [AssigneeEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type AssigneeEdge {
cursor: String!
node: Assignee!
}
"""
TODO
"""
input AssigneeInput {
assignAt: TemporalInput!
assignTo: ID!
id: ID!
}
"""
Encapsulates the "who" and "when" associated with the act of "assignment".
For example, both Tasks and Workers implement Assignable and therefore a Task
can be assigned to a Worker and vice versa ("assignment" is commutative). In
this example, the "who" will always be the Worker and the "when" will be the
timestamp when these two Entities were assigned.
"""
type Assignment implements Node {
"""
NOT YET IMPLEMENTED - will always return null!
"""
assignedAt: TimestampOverridable
assignedTo: Assignable
"""
A globally unique opaque identifier for a node.
"""
id: ID!
}
type AssignmentConnection {
edges: [AssignmentEdge!] @semanticNonNull
pageInfo: PageInfo @semanticNonNull
totalCount: Int @semanticNonNull
}
type AssignmentEdge {
cursor: String @semanticNonNull
node: Assignment @semanticNonNull
}
input AssignmentInput {
assignedTo: ID!
}
type AssignmentPayload {
assignedTo: Assignable! @deprecated
assignee: AssigneeEdge!
entity: Assignable!
}
"""
TODO
"""
type Attachment implements Component & Node {
attachedBy: Identity
attachedOn: Temporal @semanticNonNull
attachment: URL!
id: ID!
}
type AttachmentConnection {
edges: [AttachmentEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type AttachmentEdge {
cursor: String!
node: Attachment!
}
"""
TODO
"""
type Auditable implements Component {
auditable: Boolean!
id: ID!
}
"""
TODO
"""
input AuditableInput {
enabled: Boolean!
id: ID!
}
type AuthenticationStatus {
canLogin: Boolean!
invitation: Invitation
}
type BooleanValue {
boolean: Boolean
}
type BooleanWidget implements Component {
checked: Boolean
id: ID!
}
"""
TODO
"""
input BooleanWidgetInput {
value: Boolean
}
"""
TODO
"""
enum CalendarNameOptions {
"""
TODO
"""
always
"""
TODO
"""
auto
"""
TODO
"""
critical
"""
TODO
"""
never
}
"""
TODO
"""
type CheckboxWidget implements Component {
checked: Boolean
id: ID!
}
"""
TODO
"""
input CheckboxWidgetInput {
value: Boolean
}
type Checklist implements Activatable & Assignable & Component & Node {
active: Active @semanticNonNull
assignees(
after: String
before: String
first: Int
last: Int
): AssigneeConnection!
attachments(
after: String
before: String
first: Int
last: Int
): AttachmentConnection!
auditable: Auditable
chain: ChecklistChain
children(
after: String
before: String
first: Int
last: Int
search: ChecklistSearchOptions
): ChecklistConnection!
description: Description
id: ID!
items(
after: String
before: String
first: Int
last: Int
withActive: Boolean
): ChecklistItemConnection!
metadata: Metadata!
name: DisplayName!
parent: Checklist
@deprecated(
reason: "Use Checklist.chain to inspect the chain, if that is what you are after. In the future, this will return a *Node* representing ownership."
)
required: Boolean
schedule: Schedule
sop: Sop
status: ChecklistStatus
}
type ChecklistAggregate {
assignedTo(assignees: [ID!]!, parent: ID!): Int @semanticNonNull
dueOn(input: TemporalRangeInput!, parent: ID!): Int @semanticNonNull
}
type ChecklistChain {
prev: Checklist
root: Checklist
}
type ChecklistClosed implements State {
closedAt: Temporal!
closedBecause: ChecklistClosedReason
closedBy: Identity
dueAt: Temporal
inProgressAt: Temporal
openedAt: Temporal!
tag: String
}
input ChecklistClosedInput {
at: TemporalInput!
because: ChecklistClosedReasonInput
by: ID
}
type ChecklistClosedReason {
code: ChecklistClosedReasonCode!
note: DynamicString
}
enum ChecklistClosedReasonCode {
cancel
error
success
}
input ChecklistClosedReasonInput {
code: ChecklistClosedReasonCode!
note: DynamicStringInput
}
type ChecklistConnection {
edges: [ChecklistEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type ChecklistEdge {
cursor: String!
node: Checklist!
}
type ChecklistInProgress implements State {
dueAt: Temporal
inProgressAt: Temporal!
inProgressBy: Identity
openedAt: Temporal!
tag: String
}
input ChecklistInProgressInput {
at: TemporalInput!
by: ID
}
input ChecklistInput {
active: ActiveInput
assignees: [AssigneeInput!]
auditable: AuditableInput
customerId: ID!
description: DescriptionInput
id: ID!
items: [ChecklistItemInput!]
name: DisplayNameInput!
required: Boolean
schedule: ScheduleInput
sop: SopInput
status: ChecklistStatusInput
}
union ChecklistItem = Checklist | ChecklistResult
type ChecklistItemConnection {
edges: [ChecklistItemEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type ChecklistItemEdge {
cursor: String!
node: ChecklistItem!
}
input ChecklistItemInput @oneOf {
checklist: ChecklistInput
result: ChecklistResultInput
}
type ChecklistOpen implements State {
dueAt: Temporal
openedAt: Temporal!
openedBy: Identity
tag: String
}
input ChecklistOpenInput {
at: TemporalInput!
by: ID
}
"""
TODO
"""
type ChecklistResult implements Activatable & Component & Node {
active: Active @semanticNonNull
assignees(
after: String
before: String
first: Int
last: Int
): AssigneeConnection!
attachments(
after: String
before: String
first: Int
last: Int
): AttachmentConnection!
auditable: Auditable
id: ID!
name: DisplayName!
order: Int!
parent: Checklist!
required: Boolean
status: ChecklistStatus
widget: Widget!
}
"""
TODO
"""
input ChecklistResultInput {
assignees: [AssigneeInput!]
auditable: AuditableInput
id: ID!
name: DisplayNameInput!
order: Int!
required: Boolean
status: ChecklistStatusInput
widget: WidgetInput!
}
input ChecklistSearchOptions {
active: Boolean
displayName: String
status: [ChecklistStatusStates!]
}
input ChecklistSortOrder @oneOf {
name: SortOrder
status: SortOrder
}
union ChecklistStatus = ChecklistClosed | ChecklistInProgress | ChecklistOpen
input ChecklistStatusInput @oneOf {
closed: ChecklistClosedInput
inProgress: ChecklistInProgressInput
open: ChecklistOpenInput
}
enum ChecklistStatusStates {
closed
inProgress
open
}
"""
TODO
"""
type ClickerWidget implements Component {
id: ID!
number: Int
}
"""
TODO
"""
input ClickerWidgetInput {
value: Int
}
type Closed {
closedAt: TimestampOverridable @semanticNonNull
closedBecause: String
closedBy: Assignable
inProgressAt: TimestampOverridable
inProgressBy: Assignable
openedAt: TimestampOverridable @semanticNonNull
openedBy: Assignable
}
"""
Components characterize Entities as possessing a particular trait.
They are just simple structs, holding all data necessary to model that trait.
"""
interface Component {
id: ID!
}
type ComponentConnection {
edges: [ComponentEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type ComponentEdge {
cursor: String!
debug: DebugInfo!
node: Component!
}
input CopyFromOptions {
withAssignee: [ID!]
withStatus: ChecklistStatusStates
}
type CopyFromPayload {
edge: ChecklistEdge!
}
"""
Data type for tracking an incrementable/decrementable integer value.
Counters have two operations: increment and decrement.
"""
type Counter {
count: Int
}
input CreateInvitationInput {
emailAddress: String!
orgId: ID!
redirectUrl: String
workerId: ID!
}
input CreateLocationInput {
category: String!
name: String!
parent: ID!
scanCode: String
timeZone: String!
}
input CreateNameInput {
active: Boolean!
id: ID
languageId: ID!
value: String!
}
input CreateUserInput {
active: Boolean!
displayName: String
firstName: String!
identityId: String!
lastName: String!
username: String
}
input CreateWorkerInput {
active: Boolean!
displayName: String
firstName: String!
id: ID
languageId: ID!
lastName: String!
orgId: ID!
roleId: ID!
scanCode: ID
userId: ID
}
"""
A string representing a cron schedule expression
"""
scalar CronExpression
"""
Schedule implementation using cron expressions
"""
type CronSchedule {
cron: CronExpression!
}
type DebugInfo {
createdAt: String!
updatedAt: String!
updatedBy: Identity
}
"""
TODO
"""
type Description implements Component {
description: DynamicString!
id: ID!
}
"""
TODO
"""
input DescriptionInput {
id: ID!
value: DynamicStringInput!
}
type Diagnostic {
code: DiagnosticKind @semanticNonNull
}
enum DiagnosticKind {
candidate_change_discarded
candidate_choice_unavailable
"""
Indicates that an operation expected an instance type to be provided but
received a template type.
"""
expected_instance_got_template
"""
Indicates that an operation expected a template type to be provided but
received an instance type.
"""
expected_template_got_instance
feature_not_available
"""
Some operations accept an optional hash. This is misleading. You should
_always_ pass a hash for operations that accept them.
"""
hash_is_required
"""
Diagnostics of this kind indicates that the requested operation is no longer
a valid operation due to a state change that has not yet been observed by
the client. Typically this is due to data staleness but may also occur for
the _loser_ of a race under concurrency.
Hashes are opaque. Clients should not attempt to derive any meaning from them.
"""
hash_mismatch_precludes_operation
"""
Indicates that an operation received a type that it is not allowed to
operate on.
"""
invalid_type
"""
When you operate on a StateMachine<T>, there must obviously be a state
machine to operate *on*. This diagnostic is returned when no such state
machine exists.
"""
no_associated_fsm
}
type DisplayName implements Component & Node {
"""
A globally unique opaque identifier for a node.
"""
id: ID!
name: DynamicString @semanticNonNull
}
"""
TODO
"""
input DisplayNameInput {
id: ID!
value: DynamicStringInput!
}
"""
Duration represented in seconds
"""
scalar Duration
"""
TODO
"""
type DurationWidget implements Component {
duration: Duration
id: ID!
}
"""
TODO
"""
input DurationWidgetInput {
value: Duration
}
"""
Plain text content that has been (potentially) translated into different
languages as specified by the user's configuration.
"""
type DynamicString {
locale: Locale @semanticNonNull
value: String @semanticNonNull
}
input DynamicStringInput {
locale: Locale!
value: String!
}
type EnabledLanguage implements Node {
active: ActivationStatus!
id: ID!
language: Language!
languageId: ID!
primary: Boolean!
}
type EnabledLanguageConnection {
edges: [EnabledLanguageEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type EnabledLanguageEdge {
cursor: String!
node: EnabledLanguage!
}
input EnabledLanguageSearchOptions {
active: Boolean
primary: Boolean
}
type EntityConnection {
components(
after: String
before: String
first: Int
last: Int
): ComponentConnection!
entity: ID!
}
type EntityValue {
entity: Component
}
type Field {
"""
Unique identifier for this Field.
"""
id: ID @semanticNonNull
"""
Display name for a Field.
"""
name: DisplayName @semanticNonNull
"""
The value for this Field, if any. This field will always be present (when
requested) for the given Field so as to convey the underlying data type of
the (raw data) value. The underlying (raw data) value can be `null`.
"""
value: Value @semanticNonNull
"""
The type of data underlying `value`. This is provided as a convenience when
interacting with field-level edits through other apis.
"""
valueType: ValueType @semanticNonNull
}
type FieldConnection {
edges: [FieldEdge!] @semanticNonNull
pageInfo: PageInfo @semanticNonNull
totalCount: Int @semanticNonNull
}
type FieldEdge {
cursor: String @semanticNonNull
node: Field @semanticNonNull
}
input FieldInput {
field: ID!
value: ValueInput
"""
Must match the type of the `value`, e.g.:
```typescript
if (field.valueType === "string") {
assert("string" in field.value);
}
```
"""
valueType: ValueType!
}
"""
Data type for tracking Boolean-like values in the form of "enabled" or
"disabled".
Flags only support two operations: enable and disable.
"""
type Flag {
enabled: Boolean
}
type Geofence {
latitude: String!
longitude: String!
radius: Float!
}
input GeofenceInput {
latitude: String
longitude: String
radius: Float
}
type Geography {
geog: String
}
interface Identity implements Component {
id: ID!
}
type InProgress {
inProgressAt: TimestampOverridable @semanticNonNull
inProgressBy: Assignable
openedAt: TimestampOverridable @semanticNonNull
openedBy: String
}
"""
Fixed point in time (i.e. "exact time") without regard to calendar or location
"""
type Instant implements Temporal {
"""
Milliseconds since the UNIX epoch of 1/1/1970 00:00+00
"""
epochMilliseconds: String!
"""
Convert an Instant to a ZonedDateTime
"""
toZonedDateTime(timeZone: TimeZone!): ZonedDateTime @semanticNonNull
}
input InstantToStringOptions {
"""
How many digits to print after the decimal point in the output string
"""
fractionalSecondDigits: Int
"""
How to handle the remainder
"""
roundingMode: RoundingMode
"""
The smallest unit of time to include in the output string
"""
smallestUnit: SmallestTimeUnit
"""
The time zone to express the Instant/ZonedDateTime in
"""
timeZone: TimeZone
}
type Invitation {
createdAt: String!
emailAddress: String!
id: ID!
status: InvitationStatus!
updatedAt: String!
workerId: ID!
}
enum InvitationStatus {
accepted
expired
pending
revoked
}
type Language {
code: String!
id: ID!
name: Name!
nameId: ID!
}
"""
A language tag in the format of a BCP 47 (RFC 5646) standard string.
"""
scalar Locale @specifiedBy(url: "https://www.rfc-editor.org/rfc/rfc5646.html")
type Location implements Component & Node & Referenceable & Trackable {
active: ActivationStatus!
children(options: LocationsQueryOptions): [Location!]!
geofence: Geofence
"""
A globally unique opaque identifier for a node.
"""
id: ID!
name: Name!
nameId: ID!
parent: Location
parentId: ID
scanCode: ID
site: Location!
siteId: ID!
tags: [Tag!]!
"""
IANA time zone identifier for this Location.
"""
timeZone: String! @semanticNonNull
"""
Entrypoint into the "tracking system(s)" for the given Location.
"""
tracking(after: ID, first: Int): TrackableConnection @semanticNonNull
}
type LocationConnection {
edges: [LocationEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type LocationEdge {
cursor: String!
node: Location!
}
input LocationSearchOptions {
active: Boolean
isSite: Boolean
}
input LocationsQueryOptions {
cornerstone: Boolean
site: Boolean
}
"""
Metadata pertaining to an individual Entity, e.g. when it was last updated and
by whom.
"""
type Metadata {
updatedAt: Temporal!
updatedBy: Identity
}
"""
TODO
"""
type MultilineStringWidget implements Component {
id: ID!
string: String
}