-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.ts
More file actions
4756 lines (4473 loc) · 137 KB
/
index.ts
File metadata and controls
4756 lines (4473 loc) · 137 KB
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
import gql from "graphql-tag"
import * as Urql from "urql"
export type Maybe<T> = T | null
export type InputMaybe<T> = Maybe<T>
export type Exact<T extends { [key: string]: unknown }> = {
[K in keyof T]: T[K]
}
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
[SubKey in K]?: Maybe<T[SubKey]>
}
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
[SubKey in K]: Maybe<T[SubKey]>
}
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: string
String: string
Boolean: boolean
Int: number
Float: number
/** A scalar that can represent any JSON value. */
JSON: any
/**
* 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)
*/
UUID: any
}
export type AddDocumentPayload = {
readonly __typename?: "AddDocumentPayload"
readonly chapterSlug: Scalars["String"]
readonly collectionSlug: Scalars["String"]
readonly id: Scalars["UUID"]
readonly slug: Scalars["String"]
readonly title: Scalars["String"]
}
export type AnnotatedDoc = {
readonly __typename?: "AnnotatedDoc"
/** When the document was bookmarked by the current user, if it was. */
readonly bookmarkedOn: Maybe<Date>
/** Collection chapters that contain this document. */
readonly chapters: Maybe<ReadonlyArray<CollectionChapter>>
/** Where the source document came from, maybe the name of a collection */
readonly collection: Maybe<DocumentCollection>
/**
* The people involved in producing this document, including the original
* author, translators, and annotators
*/
readonly contributors: ReadonlyArray<Contributor>
/** Creators of this document */
readonly creators: ReadonlyArray<Creator>
/** Date and time this document was written or created */
readonly date: Maybe<Date>
/**
* A slices of audio associated with this word in the context of a document.
* This audio has been selected by an editor from contributions, or is the
* same as the ingested audio track, if one is available.
*/
readonly editedAudio: ReadonlyArray<AudioSlice>
readonly formCount: Scalars["Int"]
/** The format of the original artifact */
readonly format: Maybe<Format>
/**
* All the words contained in this document, dropping structural formatting
* like line and page breaks.
*/
readonly forms: ReadonlyArray<AnnotatedForm>
/** The genre of the document */
readonly genre: Maybe<Genre>
/** Official short identifier for this document */
readonly id: Scalars["UUID"]
/** The audio for this document that was ingested from GoogleSheets, if there is any. */
readonly ingestedAudioTrack: Maybe<AudioSlice>
/**
* Is this document a reference source (unstructured list of words)?
* Otherwise, it is considered a structured document with a translation.
*/
readonly isReference: Scalars["Boolean"]
/** Key terms associated with a document */
readonly keywords: ReadonlyArray<Keyword>
/** The languages present in this document */
readonly languages: ReadonlyArray<Language>
/**
* Arbitrary number used for manually ordering documents in a collection.
* For collections without manual ordering, use zero here.
*/
readonly orderIndex: Scalars["Int"]
/** Images of each source document page, in order */
readonly pageImages: Maybe<IiifImages>
/** URL-ready slug for this document, generated from the title */
readonly slug: Scalars["String"]
/** The original source(s) of this document, the most important first. */
readonly sources: ReadonlyArray<SourceAttribution>
/** The locations associated with this document */
readonly spatialCoverage: ReadonlyArray<SpatialCoverage>
/** Terms that that reflects Indigenous knowledge practices associated with a document */
readonly subjectHeadings: ReadonlyArray<SubjectHeading>
/** Full title of the document */
readonly title: Scalars["String"]
/** Segments of the document paired with their respective rough translations */
readonly translatedPages: Maybe<ReadonlyArray<DocumentPage>>
/**
* All words in the document that have unanalyzed or unfamiliar parts.
* These words need to be corrected or reviewed further.
*/
readonly unresolvedForms: ReadonlyArray<AnnotatedForm>
/**
* Audio for this word that has been recorded by community members. Will be
* empty if user does not have access to uncurated contributions.
* TODO! User guard for contributors only
*/
readonly userContributedAudio: ReadonlyArray<AudioSlice>
}
export type AnnotatedDocFormsArgs = {
end: InputMaybe<Scalars["Int"]>
start: InputMaybe<Scalars["Int"]>
}
/**
* A single word in an annotated document.
* One word contains several layers of interpretation, including the original
* source text, multiple layers of linguistic annotation, and annotator notes.
* TODO Split into two types, one for migration and one for SQL + GraphQL
*/
export type AnnotatedForm = {
readonly __typename?: "AnnotatedForm"
/** Further details about the annotation layers, including uncertainty */
readonly commentary: Maybe<Scalars["String"]>
/** Get comments on this word */
readonly comments: ReadonlyArray<Comment>
/** The date and time this form was recorded */
readonly dateRecorded: Maybe<Date>
/** The document that contains this word. */
readonly document: Maybe<AnnotatedDoc>
/** Unique identifier of the containing document */
readonly documentId: Scalars["UUID"]
/**
* A slices of audio associated with this word in the context of a document.
* This audio has been selected by an editor from contributions, or is the
* same as the ingested audio track, if one is available.
*/
readonly editedAudio: ReadonlyArray<AudioSlice>
/** English gloss for the whole word */
readonly englishGloss: ReadonlyArray<Scalars["String"]>
/** Unique identifier of this form */
readonly id: Scalars["UUID"]
/** Number of words preceding this one in the containing document */
readonly index: Scalars["Int"]
/** The audio for this word that was ingested from GoogleSheets, if there is any. */
readonly ingestedAudioTrack: Maybe<AudioSlice>
/** The character index of a mid-word line break, if there is one */
readonly lineBreak: Maybe<Scalars["Int"]>
/** A normalized version of the word */
readonly normalizedSource: Maybe<Scalars["String"]>
/** The character index of a mid-word page break, if there is one */
readonly pageBreak: Maybe<Scalars["Int"]>
/** Underlying phonemic representation of this word */
readonly phonemic: Maybe<Scalars["String"]>
/** Position of the form within the context of its parent document */
readonly position: PositionInDocument
readonly romanizedSource: Maybe<Scalars["String"]>
/**
* The root morpheme of the word.
* For example, a verb form glossed as "he catches" might have a root morpheme
* corresponding to "catch."
*/
readonly root: Maybe<WordSegment>
readonly segments: ReadonlyArray<WordSegment>
/** All other observed words with the same root morpheme as this word. */
readonly similarForms: ReadonlyArray<AnnotatedForm>
/** Original source text */
readonly source: Scalars["String"]
/**
* Audio for this word that has been recorded by community members. Will be
* empty if user does not have access to uncurated contributions.
* TODO! User guard for contributors only
*/
readonly userContributedAudio: ReadonlyArray<AudioSlice>
}
/**
* A single word in an annotated document.
* One word contains several layers of interpretation, including the original
* source text, multiple layers of linguistic annotation, and annotator notes.
* TODO Split into two types, one for migration and one for SQL + GraphQL
*/
export type AnnotatedFormRomanizedSourceArgs = {
system: CherokeeOrthography
}
/**
* A single word in an annotated document.
* One word contains several layers of interpretation, including the original
* source text, multiple layers of linguistic annotation, and annotator notes.
* TODO Split into two types, one for migration and one for SQL + GraphQL
*/
export type AnnotatedFormSegmentsArgs = {
system: CherokeeOrthography
}
/**
* A single word in an annotated document that can be edited.
* All fields except id are optional.
*/
export type AnnotatedFormUpdate = {
/** Possible update to commentary */
readonly commentary: InputMaybe<Scalars["String"]>
/** Possible updated english gloss */
readonly englishGloss: InputMaybe<Scalars["String"]>
/** Unique identifier of the form */
readonly id: Scalars["UUID"]
/** Possible update to normalized source content */
readonly romanizedSource: InputMaybe<Scalars["String"]>
/** Updated segments */
readonly segments: InputMaybe<ReadonlyArray<MorphemeSegmentUpdate>>
/** Possible update to source content */
readonly source: InputMaybe<Scalars["String"]>
}
/** Element within a spreadsheet before being transformed into a full document. */
export type AnnotatedSeg = AnnotatedForm | LineBreak
/** Represents the status of a suggestion made by a contributor */
export enum ApprovalStatus {
Approved = "APPROVED",
Pending = "PENDING",
Rejected = "REJECTED",
}
/** Request to attach user-recorded audio to a document */
export type AttachAudioToDocumentInput = {
/**
* A URL to a Cloudfront-proxied user-recorded reading of a document.
* A new resource will be created to represent the recording if one does not exist already
*/
readonly contributorAudioUrl: Scalars["String"]
/** Document to bind audio to */
readonly documentId: Scalars["UUID"]
}
/** Request to attach user-recorded audio to a word */
export type AttachAudioToWordInput = {
/**
* A URL to a Cloudfront-proxied user-recorded pronunciation of a word.
* A new resource will be created to represent the recording if one does not exist already
*/
readonly contributorAudioUrl: Scalars["String"]
/** Word to bind audio to */
readonly wordId: Scalars["UUID"]
}
/**
* A segment of audio representing a document, word, phrase,
* or other audio unit
*/
export type AudioSlice = {
readonly __typename?: "AudioSlice"
/** Last Editor to decide if audio should be included in edited collection. */
readonly editedBy: Maybe<User>
/** The time (in seconds) in the parent track where this slice ends. */
readonly endTime: Maybe<Scalars["Int"]>
/** True if audio should be shown to Readers. */
readonly includeInEditedCollection: Scalars["Boolean"]
/** This slice's relative position to other slices within an audio resource */
readonly index: Scalars["Int"]
/** An audio slice this slice is a subunit of, if there is one */
readonly parentTrack: Maybe<Scalars["String"]>
/** When the track was recorded, if available */
readonly recordedAt: Maybe<Date>
/** Which user recorded the tracked, if uploaded by a user */
readonly recordedBy: Maybe<User>
/** The audio resource this audio slice is taken from, generally pulled from the DRS API */
readonly resourceUrl: Scalars["String"]
/** The unique id for this audio slice. Will not be present if audio has not been inserted */
readonly sliceId: Maybe<Scalars["String"]>
/** The time (in seconds) in the parent track where this slice begins. */
readonly startTime: Maybe<Scalars["Int"]>
}
/** Enum to represent whether a chapter in a collection's table of contents is a page or a document */
export enum ChapterContents {
Document = "DOCUMENT",
Page = "PAGE",
Unknown = "UNKNOWN",
}
/**
* One representation of Cherokee phonology.
* There are several different writing systems for Cherokee phonology and we
* want to convert between them.
* This type enumerates all of the systems that we support and provides
* conversion from our internal orthography into any of these.
*/
export enum CherokeeOrthography {
Crg = "CRG",
Learner = "LEARNER",
Taoc = "TAOC",
}
/** Structure to represent a single chapter. Used to send data to the front end. */
export type CollectionChapter = {
readonly __typename?: "CollectionChapter"
/** Breadcrumbs from the top-level archive down to where this document lives. */
readonly breadcrumbs: ReadonlyArray<DocumentCollection>
readonly contentType: ChapterContents
readonly document: Maybe<AnnotatedDoc>
/** UUID for the chapter */
readonly id: Scalars["UUID"]
/** Order within the parent chapter or collection */
readonly indexInParent: Scalars["Int"]
/** Full path of the chapter */
readonly path: ReadonlyArray<Scalars["String"]>
/** Whether the chapter is an "Intro" or "Body" chapter */
readonly section: CollectionSection
readonly slug: Scalars["String"]
/** Full title of the chapter */
readonly title: Scalars["String"]
/** ID of WordPress page with text of the chapter */
readonly wordpressId: Maybe<Scalars["Int"]>
}
/** Enum to represent the sections in an edited collection */
export enum CollectionSection {
Body = "BODY",
Credit = "CREDIT",
Intro = "INTRO",
}
/** A comment a user has made on some piece of a document. */
export type Comment = {
readonly __typename?: "Comment"
/** An optional classification of the comment's content */
readonly commentType: Maybe<CommentType>
/** Whether the comment has been edited since it was posted */
readonly edited: Scalars["Boolean"]
/** Unique identifier of this comment */
readonly id: Scalars["UUID"]
/** When the comment was posted */
readonly postedAt: DateTime
/** Who posted the comment */
readonly postedBy: User
/** The text of the comment */
readonly textContent: Scalars["String"]
}
/** Type representing the object that a comment is attached to */
export type CommentParent = AnnotatedForm | DocumentParagraph
/** An enum listing the possible types that a comment could be attached to */
export enum CommentParentType {
Paragraph = "PARAGRAPH",
Word = "WORD",
}
/** A type describing the kind of comment being made */
export enum CommentType {
Question = "QUESTION",
Story = "STORY",
Suggestion = "SUGGESTION",
}
/**
* Used for updating comments.
* All fields except id are optional.
*/
export type CommentUpdate = {
/** The type of content in this comment. See dailp::comment::CommentType. */
readonly commentType: InputMaybe<CommentType>
/** Whether this comment has been edited in the past */
readonly edited: Scalars["Boolean"]
/** The UUID of the comment to perform this operation on. */
readonly id: Scalars["UUID"]
/** The text of the comment. */
readonly textContent: InputMaybe<Scalars["String"]>
}
/**
* A block of content, which may be one of several types.
* Each page contains several blocks.
*
* This type is intended to enable a custom page builder on the front-end for
* content editors.
*/
export type ContentBlock = Gallery | Markdown
/**
* An individual or organization that contributed to the creation or analysis
* of a particular document or source. Each contributor has a name and a role
* that specifies the type of their contributions.
*/
export type Contributor = {
readonly __typename?: "Contributor"
readonly details: Maybe<ContributorDetails>
/** UUID of the contributor */
readonly id: Scalars["UUID"]
/** Full name of the contributor */
readonly name: Scalars["String"]
/** The role that defines most of their contributions to the associated item */
readonly role: Maybe<ContributorRole>
}
export type ContributorAttributionInput = {
readonly name: Scalars["String"]
readonly role: InputMaybe<ContributorRole>
}
/**
* Basic personal details of an individual contributor, which can be retrieved
* from a particular instance of [`Contributor`].
*
* They may have transcribed a handwritten manuscript, translated it into
* English, or analyzed it for linguistic information.
* This information can be used to track who contributed to the development of
* each individual document, and track contributions to the archive as a whole.
*/
export type ContributorDetails = {
readonly __typename?: "ContributorDetails"
/**
* Alternate name of this person, may be in a different language or writing
* system. Used only for descriptive purposes.
*/
readonly alternateName: Maybe<Scalars["String"]>
/** The optional date that this contributor was born on. */
readonly birthDate: Maybe<Date>
/**
* Full name of this person, this exact string must be used to identify
* them elsewhere, like in the attribution for a particular document.
*/
readonly fullName: Scalars["String"]
/** Whether or not the contributor's profile is linked to their contributions */
readonly isVisible: Scalars["Boolean"]
}
/**
* A contributor can have to any number of roles, which define most of their
* contributions to the associated item (add or revise as needed)
*/
export enum ContributorRole {
Annotator = "ANNOTATOR",
Author = "AUTHOR",
CulturalAdvisor = "CULTURAL_ADVISOR",
Editor = "EDITOR",
Transcriber = "TRANSCRIBER",
Translator = "TRANSLATOR",
}
export type CreateDocumentFromFormInput = {
readonly collectionId: Scalars["UUID"]
readonly documentName: Scalars["String"]
readonly englishTranslationLines: ReadonlyArray<
ReadonlyArray<Scalars["String"]>
>
readonly rawTextLines: ReadonlyArray<ReadonlyArray<Scalars["String"]>>
readonly sourceName: Scalars["String"]
readonly sourceUrl: Scalars["String"]
readonly unresolvedWords: ReadonlyArray<Scalars["String"]>
}
/** Input for creating an edited collection */
export type CreateEditedCollectionInput = {
/** Description of the collection */
readonly description: Scalars["String"]
/** URL of the thumbnail image for the collection */
readonly thumbnailUrl: Scalars["String"]
/** The title of the collection */
readonly title: Scalars["String"]
}
/** The creator of a document */
export type Creator = {
readonly __typename?: "Creator"
/** UUID of the creator */
readonly id: Scalars["UUID"]
/** Name of the creator */
readonly name: Scalars["String"]
}
export type CreatorUpdate = {
/** UUID for the creator */
readonly id: Scalars["UUID"]
/** Name of the creator */
readonly name: Scalars["String"]
}
/** Request to update if a piece of document audio should be included in an edited collection */
export type CurateDocumentAudioInput = {
/** Audio to include/exclude */
readonly audioSliceId: Scalars["UUID"]
/** Document audio is attached to */
readonly documentId: Scalars["UUID"]
/** New value */
readonly includeInEditedCollection: Scalars["Boolean"]
}
/** Request to update if a piece of word audio should be included in an edited collection */
export type CurateWordAudioInput = {
/** Audio to include/exclude */
readonly audioSliceId: Scalars["UUID"]
/** New value */
readonly includeInEditedCollection: Scalars["Boolean"]
/** Word audio is attached to */
readonly wordId: Scalars["UUID"]
}
export type Date = {
readonly __typename?: "Date"
/** The day of this date */
readonly day: Scalars["Int"]
/** Formatted version of the date for humans to read */
readonly formattedDate: Scalars["String"]
/** The month of this date */
readonly month: Scalars["Int"]
/** The year of this date */
readonly year: Scalars["Int"]
}
/** GraphQL input type for dates */
export type DateInput = {
readonly day: Scalars["Int"]
readonly month: Scalars["Int"]
readonly year: Scalars["Int"]
}
export type DateTime = {
readonly __typename?: "DateTime"
/** Just the Date component of this DateTime, useful for user-facing display */
readonly date: Date
/** UNIX timestamp of the datetime, useful for sorting */
readonly timestamp: Scalars["Int"]
}
/** Input object for deleting an existing comment */
export type DeleteCommentInput = {
/** ID of the comment to delete */
readonly commentId: Scalars["UUID"]
}
/** Delete a contributor attribution for a document based on the two ids */
export type DeleteContributorAttribution = {
/** The UUID of the contributor to remove from this document's attributions */
readonly contributorId: Scalars["UUID"]
/** The document to perform this operation on */
readonly documentId: Scalars["UUID"]
}
export type DocumentCollection = {
readonly __typename?: "DocumentCollection"
/**
* All documents that are part of this collection
* TODO Try to unify this return type into AnnotatedDoc
* This probably requires adding a document_ids field so that we can just
* pass that to the dataloader below.
*/
readonly documents: ReadonlyArray<DocumentReference>
/** Database ID for this collection */
readonly id: Maybe<Scalars["UUID"]>
/** Full name of this collection */
readonly name: Scalars["String"]
/** URL-ready slug for this collection, generated from the name */
readonly slug: Scalars["String"]
}
/**
* Used for updating document metadata.
* All fields except id are optional.
*/
export type DocumentMetadataUpdate = {
/** The editors, translators, etc. of the document */
readonly contributors: InputMaybe<ReadonlyArray<ContributorAttributionInput>>
/** The creator(s) of the document */
readonly creators: InputMaybe<ReadonlyArray<CreatorUpdate>>
/** The format of the original artifact */
readonly format: InputMaybe<FormatUpdate>
/** Term that contextualizes the social practice surrounding the document */
readonly genre: InputMaybe<GenreUpdate>
/** The ID of the document to update */
readonly id: Scalars["UUID"]
/** The key terms associated with the document */
readonly keywords: InputMaybe<ReadonlyArray<KeywordUpdate>>
/** The languages present in the document */
readonly languages: InputMaybe<ReadonlyArray<LanguageUpdate>>
/** The physical locations associated with a document (e.g. where it was written, found) */
readonly spatialCoverage: InputMaybe<ReadonlyArray<SpatialCoverageUpdate>>
/** Terms that reflect Indigenous knowledge practices associated with the document */
readonly subjectHeadings: InputMaybe<ReadonlyArray<SubjectHeadingUpdate>>
/** An updated title for this document, or nothing (if title is unchanged) */
readonly title: InputMaybe<Scalars["String"]>
/** The date this document was written, or nothing (if unchanged or not applicable) */
readonly writtenAt: InputMaybe<DateInput>
}
export type DocumentPage = {
readonly __typename?: "DocumentPage"
/** Scan of this page as a IIIF resource, if there is one */
readonly image: Maybe<PageImage>
/** One-indexed page number */
readonly pageNumber: Scalars["String"]
/** Contents of this page as a list of paragraphs */
readonly paragraphs: ReadonlyArray<DocumentParagraph>
}
/** One paragraph within a [`DocumentPage`] */
export type DocumentParagraph = {
readonly __typename?: "DocumentParagraph"
/** Get comments on this paragraph */
readonly comments: ReadonlyArray<Comment>
/** Unique identifier for this paragraph */
readonly id: Scalars["UUID"]
/** 1-indexed position of this paragraph in a document */
readonly index: Scalars["Int"]
/** Source text of the paragraph broken down into words */
readonly source: ReadonlyArray<AnnotatedSeg>
/** English translation of the whole paragraph */
readonly translation: Scalars["String"]
}
/**
* Reference to a document with a limited subset of fields, namely no contents
* of the document.
*/
export type DocumentReference = {
readonly __typename?: "DocumentReference"
/** Date the document was produced (or `None` if unknown) */
readonly date: Maybe<Date>
/** Database ID for the document */
readonly id: Scalars["UUID"]
/** Index of the document within its group, used purely for ordering */
readonly orderIndex: Scalars["Int"]
/** Unique short name */
readonly shortName: Scalars["String"]
/** URL slug for this document */
readonly slug: Scalars["String"]
/** Long title of the document */
readonly title: Scalars["String"]
}
/**
* The kind of a document in terms of what body it lives within. A reference
* document is a dictionary or grammar for example, while a corpus document
* might be a letter, journal, or notice.
*/
export enum DocumentType {
Corpus = "CORPUS",
Reference = "REFERENCE",
}
/**
* Structure to represent an edited collection. Missing certain fields and chapters in it.
* Used for sending data to the front end
*/
export type EditedCollection = {
readonly __typename?: "EditedCollection"
readonly chapters: Maybe<ReadonlyArray<CollectionChapter>>
/** Description of the collection (optional) */
readonly description: Maybe<Scalars["String"]>
/** UUID for the collection */
readonly id: Scalars["UUID"]
/** URL slug for the collection, like "cwkw" */
readonly slug: Scalars["String"]
/** Cover image URL */
readonly thumbnailUrl: Maybe<Scalars["String"]>
/** Full title of the collection */
readonly title: Scalars["String"]
/** ID of WordPress menu for navigating the collection */
readonly wordpressMenuId: Maybe<Scalars["Int"]>
}
/** Stores the physical or digital medium associated with a document */
export type Format = {
readonly __typename?: "Format"
/** UUID for the format */
readonly id: Scalars["UUID"]
/** Name of the format */
readonly name: Scalars["String"]
/** Status (pending, approved, rejected) of a format */
readonly status: ApprovalStatus
}
export type FormatUpdate = {
/** UUID for the format */
readonly id: Scalars["UUID"]
/** Name of the format */
readonly name: Scalars["String"]
}
export type FormsInTime = {
readonly __typename?: "FormsInTime"
readonly end: Maybe<Date>
readonly forms: ReadonlyArray<AnnotatedForm>
readonly start: Maybe<Date>
}
/** A gallery of images, which may be rendered as a slideshow or lightbox. */
export type Gallery = {
readonly __typename?: "Gallery"
readonly mediaUrls: ReadonlyArray<Scalars["String"]>
}
/** Stores the genre associated with a document */
export type Genre = {
readonly __typename?: "Genre"
/** UUID for the genre */
readonly id: Scalars["UUID"]
/** Name of the genre */
readonly name: Scalars["String"]
/** Status (pending, approved, rejected) of a genre */
readonly status: ApprovalStatus
}
export type GenreUpdate = {
/** UUID for the genre */
readonly id: Scalars["UUID"]
/** Name of the genre */
readonly name: Scalars["String"]
}
/**
* A rectangle slice of something, usually a large document image.
*
* Units are a percentage of the containing document.
* This is more useful than pixels because we can more easily compare
* geometries between images of different resolutions. For example, we could identify
* all items in any bottom-right corner with Geometry(90%, 90%, 100%, 100%).
* Physical units would be better, but IIIF only allows pixels and percentages.
*
* Potential use case:
* Each document is represented by an ordered list of [AnnotatedForm]s. Each
* form has some geometry on the source image. There are a bunch of other
* annotations on the source image that are unordered. These may be specific
* syllabary characters, notes about the handwriting, etc. Using MongoDB
* comparison queries, we can request a list of all spatial annotations
* on the same document that lie within or around the geometry of this specific word.
*/
export type Geometry = {
readonly __typename?: "Geometry"
readonly xMax: Scalars["Float"]
readonly xMin: Scalars["Float"]
readonly yMax: Scalars["Float"]
readonly yMin: Scalars["Float"]
}
export type IiifImages = {
readonly __typename?: "IiifImages"
/** Information about the data source for this set of images */
readonly source: ImageSource
/** List of urls for all the images in this collection */
readonly urls: ReadonlyArray<Scalars["String"]>
}
export type ImageSource = {
readonly __typename?: "ImageSource"
/** Base URL for the IIIF server */
readonly url: Scalars["String"]
}
/** Record to store a keyword associated with a document */
export type Keyword = {
readonly __typename?: "Keyword"
/** UUID for the keyword */
readonly id: Scalars["UUID"]
/** Name of the keyword */
readonly name: Scalars["String"]
/** Status (pending, approved, rejected) of a keyword */
readonly status: ApprovalStatus
}
export type KeywordUpdate = {
/** UUID for the keyword */
readonly id: Scalars["UUID"]
/** Name of the keyword */
readonly name: Scalars["String"]
}
/** Stores a language associated with a document */
export type Language = {
readonly __typename?: "Language"
/** UUID for the language */
readonly id: Scalars["UUID"]
/** Name of the language */
readonly name: Scalars["String"]
/** Status (pending, approved, rejected) of a language */
readonly status: ApprovalStatus
}
/** For updating languages */
export type LanguageUpdate = {
/** UUID for the language */
readonly id: Scalars["UUID"]
/** Name of the language */
readonly name: Scalars["String"]
}
/** Start of a new line */
export type LineBreak = {
readonly __typename?: "LineBreak"
/**
* Index of this line break within the document. i.e. Indicates the start
* of line X.
*/
readonly index: Scalars["Int"]
}
/** A block of prose content, formatted with [Markdown](https://commonmark.org/). */
export type Markdown = {
readonly __typename?: "Markdown"
readonly content: Scalars["String"]
}
/** Menu object representing the navbar menu that can be edited. */
export type Menu = {
readonly __typename?: "Menu"
/** Id for menu. */
readonly id: Scalars["UUID"]
/** Menu items. */
readonly items: ReadonlyArray<MenuItem>
/** Name for the menu. */
readonly name: Scalars["String"]
/** Slug for the menu. */
readonly slug: Scalars["String"]
}
/** A single item in the menu. */
export type MenuItem = {
readonly __typename?: "MenuItem"
/** Child items (dropdown), optional. */
readonly items: Maybe<ReadonlyArray<MenuItem>>
/** Display label. */
readonly label: Scalars["String"]
/** Destination path. */
readonly path: Scalars["String"]
}
/** Input for a single menu item. */
export type MenuItemInput = {
/** Child items (dropdown), optional. */
readonly items: InputMaybe<ReadonlyArray<MenuItemInput>>
/** Display label. */
readonly label: Scalars["String"]
/** Destination path. */
readonly path: Scalars["String"]
}
/** Input for updating a menu. */
export type MenuUpdate = {
/** Menu id. */
readonly id: Scalars["UUID"]
/** New menu items (optional). */
readonly items: InputMaybe<ReadonlyArray<MenuItemInput>>
/** New name (optional). */
readonly name: InputMaybe<Scalars["String"]>
}
/** One particular morpheme and all the known words that contain that exact morpheme. */
export type MorphemeReference = {
readonly __typename?: "MorphemeReference"
/** List of words that contain this morpheme. */
readonly forms: ReadonlyArray<AnnotatedForm>
/** Phonemic shape of the morpheme. */
readonly morpheme: Scalars["String"]
}
/** A single unit of meaning and its gloss which can be edited. */
export type MorphemeSegmentUpdate = {
/** Target language representation of this segment. */
readonly gloss: Scalars["String"]
/** Source language representation of this segment. */
readonly morpheme: Scalars["String"]
/**
* This field determines what character should separate this segment from
* the next one when reconstituting the full segmentation string.
*/
readonly role: WordSegmentRole
/** Which Cherokee representation system is this segment written with? */
readonly system: InputMaybe<CherokeeOrthography>
}
/** A concrete representation of a particular functional morpheme. */
export type MorphemeTag = {
readonly __typename?: "MorphemeTag"
/**
* A prose description of what this morpheme means and how it works in
* context.
*/
readonly definition: Scalars["String"]
/** URL to an external page with more details about this morpheme. */
readonly detailsUrl: Maybe<Scalars["String"]>
/**
* Internal representation of this functional item, which may be one or
* more word parts in the raw annotation. For example, ["X", "Y"] could map
* to "Z" in a particular display format.
*/
readonly internalTags: ReadonlyArray<Scalars["String"]>
/**
* What kind of morpheme is this? Examples are "Prepronominal Prefix" or
* "Aspectual Suffix"
*/
readonly morphemeType: Scalars["String"]
/** Overrides the segment type of instances of this tag. */
readonly roleOverride: Maybe<WordSegmentRole>
/** How this morpheme looks in original language data */
readonly shape: Maybe<Scalars["String"]>
/** How this morpheme is represented in a gloss */
readonly tag: Scalars["String"]
/** Plain English title of the morpheme tag */
readonly title: Scalars["String"]
}
export type Mutation = {
readonly __typename?: "Mutation"
/** Adds a bookmark to the user's list of bookmarks. */
readonly addBookmark: AnnotatedDoc
/** Minimal mutation to add a document with only essential fields */
readonly addDocument: AddDocumentPayload
/**
* Mutation must have at least one visible field for introspection to work
* correctly, so we just provide an API version which might be useful in
* the future.
*/
readonly apiVersion: Scalars["String"]
/**
* Attach audio that has already been uploaded to S3 to a particular document
* Assumes user requesting mutation recorded the audio
*/
readonly attachAudioToDocument: AnnotatedDoc
/**
* Attach audio that has already been uploaded to S3 to a particular word
* Assumes user requesting mutation recoreded the audio
*/
readonly attachAudioToWord: AnnotatedForm
readonly createEditedCollection: Scalars["String"]
/** Decide if a piece of document audio should be included in edited collection */
readonly curateDocumentAudio: AnnotatedDoc
/** Decide if a piece of word audio should be included in edited collection */
readonly curateWordAudio: AnnotatedForm
/**
* Delete a comment.
* Will fail if the user making the request is not the poster.
*/
readonly deleteComment: CommentParent
/** Mutation for deleting contributor attributions */
readonly deleteContributorAttribution: Scalars["UUID"]
readonly insertCustomMorphemeTag: Scalars["Boolean"]
/** Post a new comment on a given object */
readonly postComment: CommentParent
/** Removes a bookmark from a user's list of bookmarks */
readonly removeBookmark: AnnotatedDoc
readonly updateAnnotation: Scalars["Boolean"]
/** Update a comment */
readonly updateComment: CommentParent
/** Mutation for adding/changing contributor attributions */
readonly updateContributorAttribution: Scalars["UUID"]
readonly updateDocumentMetadata: Scalars["UUID"]
readonly updateMenu: Menu
readonly updatePage: Scalars["Boolean"]
/** Mutation for paragraph and translation editing */
readonly updateParagraph: DocumentParagraph
/** Updates a dailp_user's information */
readonly updateUser: User
readonly updateWord: AnnotatedForm
readonly upsertPage: Scalars["String"]
readonly validateTurnstileToken: Scalars["Boolean"]
}
export type MutationAddBookmarkArgs = {
documentId: Scalars["UUID"]
}
export type MutationAddDocumentArgs = {
input: CreateDocumentFromFormInput
}
export type MutationAttachAudioToDocumentArgs = {
input: AttachAudioToDocumentInput
}
export type MutationAttachAudioToWordArgs = {
input: AttachAudioToWordInput
}
export type MutationCreateEditedCollectionArgs = {
input: CreateEditedCollectionInput
}
export type MutationCurateDocumentAudioArgs = {
input: CurateDocumentAudioInput
}
export type MutationCurateWordAudioArgs = {
input: CurateWordAudioInput