@eightyfourthousand/client-graphql 2026.3.1 → 2026.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/index.d.ts +4 -0
  2. package/index.js +7 -0
  3. package/index.js.map +1 -0
  4. package/lib/client-ssr.d.ts +16 -0
  5. package/lib/client-ssr.js +39 -0
  6. package/lib/client-ssr.js.map +1 -0
  7. package/lib/client.d.ts +15 -0
  8. package/lib/client.js +46 -0
  9. package/lib/client.js.map +1 -0
  10. package/lib/config.d.ts +8 -0
  11. package/lib/config.js +19 -0
  12. package/lib/config.js.map +1 -0
  13. package/lib/functions/get-bibliography-entry.d.ts +9 -0
  14. package/lib/functions/get-bibliography-entry.js +27 -0
  15. package/lib/functions/get-bibliography-entry.js.map +1 -0
  16. package/lib/functions/get-glossary-instance.d.ts +9 -0
  17. package/lib/functions/get-glossary-instance.js +36 -0
  18. package/lib/functions/get-glossary-instance.js.map +1 -0
  19. package/lib/functions/get-passage.d.ts +10 -0
  20. package/lib/functions/get-passage.js +68 -0
  21. package/lib/functions/get-passage.js.map +1 -0
  22. package/lib/functions/get-term-passages.d.ts +20 -0
  23. package/lib/functions/get-term-passages.js +32 -0
  24. package/lib/functions/get-term-passages.js.map +1 -0
  25. package/lib/functions/get-translation-blocks-around.d.ts +15 -0
  26. package/lib/functions/get-translation-blocks-around.js +86 -0
  27. package/lib/functions/get-translation-blocks-around.js.map +1 -0
  28. package/lib/functions/get-translation-blocks.d.ts +25 -0
  29. package/lib/functions/get-translation-blocks.js +96 -0
  30. package/lib/functions/get-translation-blocks.js.map +1 -0
  31. package/lib/functions/get-translation-imprint.d.ts +10 -0
  32. package/lib/functions/get-translation-imprint.js +68 -0
  33. package/lib/functions/get-translation-imprint.js.map +1 -0
  34. package/lib/functions/get-translation-metadata.d.ts +16 -0
  35. package/lib/functions/get-translation-metadata.js +72 -0
  36. package/lib/functions/get-translation-metadata.js.map +1 -0
  37. package/lib/functions/get-translation-titles.d.ts +9 -0
  38. package/lib/functions/get-translation-titles.js +34 -0
  39. package/lib/functions/get-translation-titles.js.map +1 -0
  40. package/lib/functions/get-translation-toc.d.ts +9 -0
  41. package/{src/lib/functions/get-translation-toc.ts → lib/functions/get-translation-toc.js} +18 -48
  42. package/lib/functions/get-translation-toc.js.map +1 -0
  43. package/lib/functions/get-translation-uuids.d.ts +16 -0
  44. package/lib/functions/get-translation-uuids.js +40 -0
  45. package/lib/functions/get-translation-uuids.js.map +1 -0
  46. package/lib/functions/get-translations-metadata.d.ts +9 -0
  47. package/lib/functions/get-translations-metadata.js +51 -0
  48. package/lib/functions/get-translations-metadata.js.map +1 -0
  49. package/lib/functions/get-work-bibliography.d.ts +9 -0
  50. package/lib/functions/get-work-bibliography.js +33 -0
  51. package/lib/functions/get-work-bibliography.js.map +1 -0
  52. package/lib/functions/get-work-folios.d.ts +12 -0
  53. package/lib/functions/get-work-folios.js +32 -0
  54. package/lib/functions/get-work-folios.js.map +1 -0
  55. package/lib/functions/get-work-glossary-terms-around.d.ts +13 -0
  56. package/lib/functions/get-work-glossary-terms-around.js +95 -0
  57. package/lib/functions/get-work-glossary-terms-around.js.map +1 -0
  58. package/lib/functions/get-work-glossary-terms.d.ts +24 -0
  59. package/lib/functions/get-work-glossary-terms.js +104 -0
  60. package/lib/functions/get-work-glossary-terms.js.map +1 -0
  61. package/lib/functions/has-permission.d.ts +9 -0
  62. package/lib/functions/has-permission.js +15 -0
  63. package/lib/functions/has-permission.js.map +1 -0
  64. package/{src/lib/functions/index.ts → lib/functions/index.d.ts} +4 -18
  65. package/lib/functions/index.js +20 -0
  66. package/lib/functions/index.js.map +1 -0
  67. package/lib/functions/replace.d.ts +27 -0
  68. package/lib/functions/replace.js +49 -0
  69. package/lib/functions/replace.js.map +1 -0
  70. package/lib/functions/save-passages.d.ts +16 -0
  71. package/lib/functions/save-passages.js +35 -0
  72. package/lib/functions/save-passages.js.map +1 -0
  73. package/lib/generated/graphql.d.ts +1062 -0
  74. package/lib/generated/graphql.js +357 -0
  75. package/lib/generated/graphql.js.map +1 -0
  76. package/lib/mappers/alignment.d.ts +19 -0
  77. package/lib/mappers/alignment.js +19 -0
  78. package/lib/mappers/alignment.js.map +1 -0
  79. package/lib/mappers/annotation.d.ts +19 -0
  80. package/lib/mappers/annotation.js +74 -0
  81. package/lib/mappers/annotation.js.map +1 -0
  82. package/lib/mappers/imprint.d.ts +37 -0
  83. package/lib/mappers/imprint.js +44 -0
  84. package/lib/mappers/imprint.js.map +1 -0
  85. package/lib/mappers/index.js +8 -0
  86. package/lib/mappers/index.js.map +1 -0
  87. package/lib/mappers/passage.d.ts +41 -0
  88. package/lib/mappers/passage.js +39 -0
  89. package/lib/mappers/passage.js.map +1 -0
  90. package/lib/mappers/title.d.ts +18 -0
  91. package/lib/mappers/title.js +18 -0
  92. package/lib/mappers/title.js.map +1 -0
  93. package/lib/mappers/toc.d.ts +25 -0
  94. package/lib/mappers/toc.js +25 -0
  95. package/lib/mappers/toc.js.map +1 -0
  96. package/lib/mappers/work.d.ts +22 -0
  97. package/lib/mappers/work.js +22 -0
  98. package/lib/mappers/work.js.map +1 -0
  99. package/package.json +25 -3
  100. package/ssr.d.ts +4 -0
  101. package/ssr.js +7 -0
  102. package/ssr.js.map +1 -0
  103. package/README.md +0 -9
  104. package/codegen.ts +0 -34
  105. package/project.json +0 -21
  106. package/src/index.ts +0 -79
  107. package/src/lib/client-ssr.ts +0 -44
  108. package/src/lib/client.ts +0 -58
  109. package/src/lib/config.ts +0 -21
  110. package/src/lib/functions/get-bibliography-entry.ts +0 -40
  111. package/src/lib/functions/get-glossary-entry.ts +0 -136
  112. package/src/lib/functions/get-glossary-instance.ts +0 -48
  113. package/src/lib/functions/get-glossary-terms.ts +0 -44
  114. package/src/lib/functions/get-passage.ts +0 -78
  115. package/src/lib/functions/get-term-passages.ts +0 -53
  116. package/src/lib/functions/get-translation-blocks-around.ts +0 -131
  117. package/src/lib/functions/get-translation-blocks.ts +0 -160
  118. package/src/lib/functions/get-translation-imprint.ts +0 -114
  119. package/src/lib/functions/get-translation-metadata.ts +0 -99
  120. package/src/lib/functions/get-translation-passages-around.ts +0 -153
  121. package/src/lib/functions/get-translation-passages.ts +0 -168
  122. package/src/lib/functions/get-translation-titles.ts +0 -55
  123. package/src/lib/functions/get-translation-uuids.ts +0 -63
  124. package/src/lib/functions/get-translations-metadata.ts +0 -81
  125. package/src/lib/functions/get-work-bibliography.ts +0 -47
  126. package/src/lib/functions/get-work-folios.ts +0 -52
  127. package/src/lib/functions/get-work-glossary-terms-around.ts +0 -126
  128. package/src/lib/functions/get-work-glossary-terms.ts +0 -150
  129. package/src/lib/functions/get-work-glossary.ts +0 -54
  130. package/src/lib/functions/get-works.ts +0 -111
  131. package/src/lib/functions/has-permission.ts +0 -38
  132. package/src/lib/functions/save-passages.ts +0 -76
  133. package/src/lib/generated/graphql.ts +0 -1318
  134. package/src/lib/graphql/fragments/alignment.graphql +0 -7
  135. package/src/lib/graphql/fragments/annotation.graphql +0 -7
  136. package/src/lib/graphql/fragments/imprint.graphql +0 -34
  137. package/src/lib/graphql/fragments/passage.graphql +0 -29
  138. package/src/lib/graphql/fragments/title.graphql +0 -6
  139. package/src/lib/graphql/fragments/toc.graphql +0 -40
  140. package/src/lib/graphql/fragments/work.graphql +0 -10
  141. package/src/lib/graphql/queries/passages.graphql +0 -116
  142. package/src/lib/graphql/queries/work.graphql +0 -38
  143. package/src/lib/graphql/queries/works.graphql +0 -23
  144. package/src/lib/mappers/alignment.ts +0 -34
  145. package/src/lib/mappers/annotation.ts +0 -204
  146. package/src/lib/mappers/imprint.ts +0 -79
  147. package/src/lib/mappers/passage.ts +0 -80
  148. package/src/lib/mappers/title.ts +0 -35
  149. package/src/lib/mappers/toc.ts +0 -49
  150. package/src/lib/mappers/work.ts +0 -38
  151. package/src/ssr.ts +0 -73
  152. package/tsconfig.json +0 -17
  153. package/tsconfig.lib.json +0 -14
  154. /package/{src/lib/mappers/index.ts → lib/mappers/index.d.ts} +0 -0
@@ -1,1318 +0,0 @@
1
- import type { GraphQLClient, RequestOptions } from 'graphql-request';
2
- import gql from 'graphql-tag';
3
- export type Maybe<T> = T | null;
4
- export type InputMaybe<T> = Maybe<T>;
5
- export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
6
- export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
7
- export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
8
- export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
9
- export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
10
- type GraphQLClientRequestHeaders = RequestOptions['requestHeaders'];
11
- /** All built-in and custom scalars, mapped to their actual values */
12
- export type Scalars = {
13
- ID: { input: string; output: string; }
14
- String: { input: string; output: string; }
15
- Boolean: { input: boolean; output: boolean; }
16
- Int: { input: number; output: number; }
17
- Float: { input: number; output: number; }
18
- /** JSON scalar for arbitrary JSON data */
19
- JSON: { input: any; output: any; }
20
- };
21
-
22
- /** An alignment linking a passage to Tibetan source text */
23
- export type Alignment = {
24
- __typename?: 'Alignment';
25
- /** Folio number within the volume */
26
- folioNumber: Scalars['Int']['output'];
27
- /** UUID of the folio containing the Tibetan source */
28
- folioUuid: Scalars['ID']['output'];
29
- /** Tibetan source text content */
30
- tibetan: Scalars['String']['output'];
31
- /** Tohoku catalog reference (e.g., "toh123") */
32
- toh: Scalars['String']['output'];
33
- /** Volume number */
34
- volumeNumber: Scalars['Int']['output'];
35
- };
36
-
37
- /** An annotation marking up a range within a passage */
38
- export type Annotation = {
39
- __typename?: 'Annotation';
40
- /** End offset within the passage content */
41
- end: Scalars['Int']['output'];
42
- /**
43
- * Type-specific metadata. Contents vary by annotation type:
44
- * - heading: { level, class }
45
- * - link: { href, text }
46
- * - internalLink: { linkType, href, label, entity, isPending }
47
- * - span/mantra/inlineTitle: { textStyle, lang }
48
- * - audio: { src, mediaType }
49
- * - image: { src }
50
- * - list: { spacing, nesting, itemStyle }
51
- * - glossaryInstance: { glossary }
52
- * - endNoteLink: { endNote, label }
53
- * - abbreviation/hasAbbreviation: { abbreviation }
54
- * - quote/quoted: { quote }
55
- */
56
- metadata?: Maybe<Scalars['JSON']['output']>;
57
- /** Start offset within the passage content */
58
- start: Scalars['Int']['output'];
59
- /** Tohoku number associated with this annotation, if applicable */
60
- toh?: Maybe<Scalars['String']['output']>;
61
- /** Type of annotation (e.g., heading, span, link, internalLink, glossaryInstance) */
62
- type: Scalars['String']['output'];
63
- /** Unique identifier for the annotation */
64
- uuid: Scalars['ID']['output'];
65
- };
66
-
67
- /** A bibliography section with heading and entries */
68
- export type BibliographyEntry = {
69
- __typename?: 'BibliographyEntry';
70
- /** Bibliography entries in this section */
71
- entries: Array<BibliographyEntryItem>;
72
- /** Section heading */
73
- heading?: Maybe<Scalars['String']['output']>;
74
- };
75
-
76
- /** A single bibliography entry item */
77
- export type BibliographyEntryItem = {
78
- __typename?: 'BibliographyEntryItem';
79
- /** HTML content of the bibliography entry */
80
- html: Scalars['String']['output'];
81
- /** Unique identifier */
82
- uuid: Scalars['ID']['output'];
83
- /** UUID of the work this entry belongs to */
84
- workUuid?: Maybe<Scalars['ID']['output']>;
85
- };
86
-
87
- /** Currently authenticated user */
88
- export type CurrentUser = {
89
- __typename?: 'CurrentUser';
90
- /** User's email address */
91
- email: Scalars['String']['output'];
92
- /** User's unique identifier */
93
- id: Scalars['ID']['output'];
94
- /** User's role */
95
- role: UserRole;
96
- };
97
-
98
- /** A folio page from a Tibetan work */
99
- export type Folio = {
100
- __typename?: 'Folio';
101
- /** Content of the folio */
102
- content: Scalars['String']['output'];
103
- /** Folio number within the volume */
104
- folio: Scalars['Int']['output'];
105
- /** Side of the folio (a or b) */
106
- side: FolioSide;
107
- /** Unique identifier */
108
- uuid: Scalars['ID']['output'];
109
- /** Volume number */
110
- volume: Scalars['Int']['output'];
111
- };
112
-
113
- /** Folio side (recto/verso) */
114
- export type FolioSide =
115
- | 'a'
116
- | 'b';
117
-
118
- /** Related entity for a glossary entry */
119
- export type GlossaryEntity = {
120
- __typename?: 'GlossaryEntity';
121
- /** Source entity headword */
122
- sourceHeadword: Scalars['String']['output'];
123
- /** Source entity UUID */
124
- sourceUuid: Scalars['ID']['output'];
125
- /** Target entity headword */
126
- targetHeadword: Scalars['String']['output'];
127
- /** Target entity UUID */
128
- targetUuid: Scalars['ID']['output'];
129
- };
130
-
131
- /** Detailed glossary entry for the detail page */
132
- export type GlossaryEntry = {
133
- __typename?: 'GlossaryEntry';
134
- /** Authority UUID */
135
- authorityUuid: Scalars['ID']['output'];
136
- /** Chinese names */
137
- chinese: Array<Scalars['String']['output']>;
138
- /** Classifications/types */
139
- classifications: Array<Scalars['String']['output']>;
140
- /** Definition of the term */
141
- definition?: Maybe<Scalars['String']['output']>;
142
- /** English names/translations */
143
- english: Array<Scalars['String']['output']>;
144
- /** Primary headword */
145
- headword: Scalars['String']['output'];
146
- /** Primary language of the headword */
147
- language: Scalars['String']['output'];
148
- /** Pali names */
149
- pali: Array<Scalars['String']['output']>;
150
- /** Related entities */
151
- relatedEntities: Array<GlossaryEntity>;
152
- /** Related instances across works */
153
- relatedInstances: Array<GlossaryInstance>;
154
- /** Sanskrit names */
155
- sanskrit: Array<Scalars['String']['output']>;
156
- /** Tibetan names */
157
- tibetan: Array<Scalars['String']['output']>;
158
- /** XML ID from source */
159
- xmlId?: Maybe<Scalars['String']['output']>;
160
- };
161
-
162
- /** A glossary instance appearing in a specific work */
163
- export type GlossaryInstance = {
164
- __typename?: 'GlossaryInstance';
165
- /** Canon the work belongs to */
166
- canon?: Maybe<Scalars['String']['output']>;
167
- /** Chinese names */
168
- chinese: Array<Scalars['String']['output']>;
169
- /** Creators/translators */
170
- creators: Array<Scalars['String']['output']>;
171
- /** Definition for this instance */
172
- definition?: Maybe<Scalars['String']['output']>;
173
- /** English names/translations */
174
- english: Array<Scalars['String']['output']>;
175
- /** Pali names */
176
- pali: Array<Scalars['String']['output']>;
177
- /** Sanskrit names */
178
- sanskrit: Array<Scalars['String']['output']>;
179
- /** Tibetan names */
180
- tibetan: Array<Scalars['String']['output']>;
181
- /** Tohoku catalog entry */
182
- toh: Scalars['String']['output'];
183
- /** UUID of the work containing this instance */
184
- workUuid: Scalars['ID']['output'];
185
- };
186
-
187
- /** A glossary item for the landing page listing */
188
- export type GlossaryLandingItem = {
189
- __typename?: 'GlossaryLandingItem';
190
- /** Definition of the term */
191
- definition: Scalars['String']['output'];
192
- /** Primary headword for the term */
193
- headword: Scalars['String']['output'];
194
- /** Primary language of the headword */
195
- language: Scalars['String']['output'];
196
- /** Name variants for the term */
197
- nameVariants: Scalars['String']['output'];
198
- /** Number of glossary entries across works */
199
- numGlossaryEntries: Scalars['Int']['output'];
200
- /** Type/classification of the term */
201
- type: Scalars['String']['output'];
202
- /** Authority UUID */
203
- uuid: Scalars['ID']['output'];
204
- };
205
-
206
- /** Paginated passage references for a glossary term */
207
- export type GlossaryPassagesPage = {
208
- __typename?: 'GlossaryPassagesPage';
209
- /** Whether more passages exist beyond this page */
210
- hasMore: Scalars['Boolean']['output'];
211
- /** Passages in this page */
212
- items: Array<Passage>;
213
- /** Cursor for fetching the next page (offset encoded as string), null if no more */
214
- nextCursor?: Maybe<Scalars['String']['output']>;
215
- };
216
-
217
- /** A glossary term instance within a specific work */
218
- export type GlossaryTermInstance = {
219
- __typename?: 'GlossaryTermInstance';
220
- /** Authority UUID for the term */
221
- authority: Scalars['String']['output'];
222
- /** Definition of the term */
223
- definition?: Maybe<Scalars['String']['output']>;
224
- /** Names in different languages */
225
- names: GlossaryTermNames;
226
- /** Passages where this term appears */
227
- passages: Array<Passage>;
228
- /** Unique identifier */
229
- uuid: Scalars['ID']['output'];
230
- };
231
-
232
- /** Names for a glossary term instance in different languages */
233
- export type GlossaryTermNames = {
234
- __typename?: 'GlossaryTermNames';
235
- /** Chinese name */
236
- chinese?: Maybe<Scalars['String']['output']>;
237
- /** English name/translation */
238
- english?: Maybe<Scalars['String']['output']>;
239
- /** Pali name */
240
- pali?: Maybe<Scalars['String']['output']>;
241
- /** Sanskrit name */
242
- sanskrit?: Maybe<Scalars['String']['output']>;
243
- /** Tibetan name */
244
- tibetan?: Maybe<Scalars['String']['output']>;
245
- /** Wylie transliteration */
246
- wylie?: Maybe<Scalars['String']['output']>;
247
- };
248
-
249
- /** Health status response */
250
- export type HealthStatus = {
251
- __typename?: 'HealthStatus';
252
- /** Current status of the API (e.g., "ok", "degraded") */
253
- status: Scalars['String']['output'];
254
- /** ISO 8601 timestamp of the health check */
255
- timestamp: Scalars['String']['output'];
256
- };
257
-
258
- /** Publication imprint information for a work */
259
- export type Imprint = {
260
- __typename?: 'Imprint';
261
- /** Whether the authorship is contested */
262
- isAuthorContested: Scalars['Boolean']['output'];
263
- /** License information */
264
- license: License;
265
- /** Long titles by language */
266
- longTitles?: Maybe<TitlesByLanguage>;
267
- /** Main titles by language */
268
- mainTitles?: Maybe<TitlesByLanguage>;
269
- /** Year the translation was published */
270
- publishYear?: Maybe<Scalars['String']['output']>;
271
- /** Publisher statement */
272
- publisherStatement?: Maybe<Scalars['String']['output']>;
273
- /** Whether access to this work is restricted */
274
- restriction?: Maybe<Scalars['Boolean']['output']>;
275
- /** Section of the canon (e.g., "Sutra") */
276
- section?: Maybe<Scalars['String']['output']>;
277
- /** Description of the source text */
278
- sourceDescription?: Maybe<Scalars['String']['output']>;
279
- /** Names of Tibetan authors */
280
- tibetanAuthors?: Maybe<Array<Scalars['String']['output']>>;
281
- /** Names of Tibetan translators */
282
- tibetanTranslators?: Maybe<Scalars['String']['output']>;
283
- /** Tohoku catalog entry number (e.g., "toh1") */
284
- toh: Scalars['String']['output'];
285
- /** Publication version (semantic versioning) */
286
- version?: Maybe<Scalars['String']['output']>;
287
- };
288
-
289
- /** License information for a published work */
290
- export type License = {
291
- __typename?: 'License';
292
- /** Human-readable description of the license terms */
293
- description?: Maybe<Scalars['String']['output']>;
294
- /** URL to the license text */
295
- link?: Maybe<Scalars['String']['output']>;
296
- /** Name of the license (e.g., "CC BY-NC-ND 4.0") */
297
- name?: Maybe<Scalars['String']['output']>;
298
- };
299
-
300
- /** Root Mutation type - extend this in other schema files */
301
- export type Mutation = {
302
- __typename?: 'Mutation';
303
- /** Placeholder for schema validation - not used */
304
- _empty?: Maybe<Scalars['Boolean']['output']>;
305
- /**
306
- * Save one or more passages.
307
- * Requires editor.edit permission.
308
- */
309
- savePassages: SavePassagesResult;
310
- };
311
-
312
-
313
- /** Root Mutation type - extend this in other schema files */
314
- export type MutationSavePassagesArgs = {
315
- deletedUuids?: InputMaybe<Array<Scalars['ID']['input']>>;
316
- passages: Array<PassageInput>;
317
- };
318
-
319
- /**
320
- * Pagination information for connections.
321
- * Used consistently across all paginated queries.
322
- */
323
- export type PageInfo = {
324
- __typename?: 'PageInfo';
325
- /** Whether there are more items after the current page */
326
- hasMoreAfter: Scalars['Boolean']['output'];
327
- /** Whether there are more items before the current page */
328
- hasMoreBefore: Scalars['Boolean']['output'];
329
- /** Cursor for fetching the next page */
330
- nextCursor?: Maybe<Scalars['String']['output']>;
331
- /** Cursor for fetching the previous page */
332
- prevCursor?: Maybe<Scalars['String']['output']>;
333
- };
334
-
335
- /** Direction for pagination */
336
- export type PaginationDirection =
337
- /** Fetch passages around the cursor (both before and after) */
338
- | 'AROUND'
339
- /** Fetch passages before the cursor */
340
- | 'BACKWARD'
341
- /** Fetch passages after the cursor (default) */
342
- | 'FORWARD';
343
-
344
- /** A passage of text from a work */
345
- export type Passage = {
346
- __typename?: 'Passage';
347
- /** Alignments linking this passage to Tibetan source text */
348
- alignments: Array<Alignment>;
349
- /** Annotations marking up ranges within this passage */
350
- annotations: Array<Annotation>;
351
- /** Text content of the passage */
352
- content: Scalars['String']['output'];
353
- /**
354
- * TipTap editor JSON representation of this passage.
355
- * Transforms content and annotations into nested JSON structure.
356
- */
357
- json?: Maybe<Scalars['JSON']['output']>;
358
- /** Display label for the passage (e.g., "1.1") */
359
- label?: Maybe<Scalars['String']['output']>;
360
- /**
361
- * Passages that reference this endnote passage via end-note-link annotations.
362
- * Only populated for endnotes type passages; empty for all other types.
363
- */
364
- references: Array<Passage>;
365
- /** Sort order within the work */
366
- sort: Scalars['Int']['output'];
367
- /** Tohoku number associated with this passage, if applicable */
368
- toh?: Maybe<Scalars['String']['output']>;
369
- /** Type of passage content (e.g., translation, introduction, colophon) */
370
- type: Scalars['String']['output'];
371
- /** Unique identifier for the passage */
372
- uuid: Scalars['ID']['output'];
373
- /** UUID of the work this passage belongs to */
374
- workUuid: Scalars['ID']['output'];
375
- /** XML ID from the source document */
376
- xmlId?: Maybe<Scalars['String']['output']>;
377
- };
378
-
379
- /** Paginated connection of passages */
380
- export type PassageConnection = {
381
- __typename?: 'PassageConnection';
382
- /**
383
- * Whether there are more passages after the current page
384
- * @deprecated Use pageInfo.hasMoreAfter instead
385
- */
386
- hasMoreAfter: Scalars['Boolean']['output'];
387
- /**
388
- * Whether there are more passages before the current page
389
- * @deprecated Use pageInfo.hasMoreBefore instead
390
- */
391
- hasMoreBefore: Scalars['Boolean']['output'];
392
- /**
393
- * Cursor for fetching the next page
394
- * @deprecated Use pageInfo.nextCursor instead
395
- */
396
- nextCursor?: Maybe<Scalars['String']['output']>;
397
- /** List of passages */
398
- nodes: Array<Passage>;
399
- /** Pagination information */
400
- pageInfo: PageInfo;
401
- /**
402
- * Cursor for fetching the previous page
403
- * @deprecated Use pageInfo.prevCursor instead
404
- */
405
- prevCursor?: Maybe<Scalars['String']['output']>;
406
- };
407
-
408
- /** Filter options for passages */
409
- export type PassageFilter = {
410
- /** Filter by label pattern using ILIKE (e.g., "n.5%") */
411
- label?: InputMaybe<Scalars['String']['input']>;
412
- /**
413
- * Filter by passage type (e.g., translation, introduction, colophon).
414
- * Can be a single type or use LIKE pattern with %.
415
- */
416
- type?: InputMaybe<Scalars['String']['input']>;
417
- /**
418
- * Filter by multiple passage types (OR logic).
419
- * Use this instead of type when filtering by multiple types.
420
- */
421
- types?: InputMaybe<Array<Scalars['String']['input']>>;
422
- };
423
-
424
- /** Input type for saving a passage */
425
- export type PassageInput = {
426
- /** Annotations as JSON array */
427
- annotations: Scalars['JSON']['input'];
428
- /** Text content of the passage */
429
- content: Scalars['String']['input'];
430
- /** Display label for the passage */
431
- label: Scalars['String']['input'];
432
- /** Sort order within the work */
433
- sort: Scalars['Int']['input'];
434
- /** Type of passage content */
435
- type: Scalars['String']['input'];
436
- /** Unique identifier for the passage */
437
- uuid: Scalars['ID']['input'];
438
- /** UUID of the work this passage belongs to */
439
- workUuid: Scalars['ID']['input'];
440
- /** XML ID from the source document */
441
- xmlId?: InputMaybe<Scalars['String']['input']>;
442
- };
443
-
444
- /** Permission types that can be checked */
445
- export type Permission =
446
- | 'EDITOR_ADMIN'
447
- | 'EDITOR_EDIT'
448
- | 'EDITOR_READ'
449
- | 'PROJECTS_ADMIN'
450
- | 'PROJECTS_EDIT'
451
- | 'PROJECTS_READ';
452
-
453
- /** Root Query type - extend this in other schema files */
454
- export type Query = {
455
- __typename?: 'Query';
456
- /** Get a single bibliography entry by UUID */
457
- bibliographyEntry?: Maybe<BibliographyEntryItem>;
458
- /** Get a single glossary entry by UUID (for detail page) */
459
- glossaryEntry?: Maybe<GlossaryEntry>;
460
- /** Get a single glossary instance by UUID */
461
- glossaryInstance?: Maybe<GlossaryTermInstance>;
462
- /** Get paginated passage references for a glossary term (per-term, on-demand) */
463
- glossaryTermPassages: GlossaryPassagesPage;
464
- /** Get all glossary terms for the landing page */
465
- glossaryTerms: Array<GlossaryLandingItem>;
466
- /**
467
- * Check if the current user has a specific permission.
468
- * Returns false if not authenticated.
469
- */
470
- hasPermission: Scalars['Boolean']['output'];
471
- /** Health check query */
472
- health: HealthStatus;
473
- /** Get the currently authenticated user (null if not authenticated) */
474
- me?: Maybe<CurrentUser>;
475
- /** Fetch a single passage by UUID */
476
- passage?: Maybe<Passage>;
477
- /** Get the current API version */
478
- version: Scalars['String']['output'];
479
- /**
480
- * Get a single work by UUID or Tohoku catalog number.
481
- * When both uuid and toh are provided, toh acts as a composite key
482
- * and will be used as the default for nested resolvers (like imprint).
483
- */
484
- work?: Maybe<Work>;
485
- /** Get paginated published translation works */
486
- works: WorkConnection;
487
- };
488
-
489
-
490
- /** Root Query type - extend this in other schema files */
491
- export type QueryBibliographyEntryArgs = {
492
- uuid: Scalars['ID']['input'];
493
- };
494
-
495
-
496
- /** Root Query type - extend this in other schema files */
497
- export type QueryGlossaryEntryArgs = {
498
- uuid: Scalars['ID']['input'];
499
- };
500
-
501
-
502
- /** Root Query type - extend this in other schema files */
503
- export type QueryGlossaryInstanceArgs = {
504
- uuid: Scalars['ID']['input'];
505
- };
506
-
507
-
508
- /** Root Query type - extend this in other schema files */
509
- export type QueryGlossaryTermPassagesArgs = {
510
- after?: InputMaybe<Scalars['String']['input']>;
511
- first?: InputMaybe<Scalars['Int']['input']>;
512
- uuid: Scalars['ID']['input'];
513
- };
514
-
515
-
516
- /** Root Query type - extend this in other schema files */
517
- export type QueryGlossaryTermsArgs = {
518
- uuids?: InputMaybe<Array<Scalars['ID']['input']>>;
519
- };
520
-
521
-
522
- /** Root Query type - extend this in other schema files */
523
- export type QueryHasPermissionArgs = {
524
- permission: Permission;
525
- };
526
-
527
-
528
- /** Root Query type - extend this in other schema files */
529
- export type QueryPassageArgs = {
530
- uuid: Scalars['ID']['input'];
531
- };
532
-
533
-
534
- /** Root Query type - extend this in other schema files */
535
- export type QueryWorkArgs = {
536
- toh?: InputMaybe<Scalars['String']['input']>;
537
- uuid?: InputMaybe<Scalars['ID']['input']>;
538
- };
539
-
540
-
541
- /** Root Query type - extend this in other schema files */
542
- export type QueryWorksArgs = {
543
- cursor?: InputMaybe<Scalars['String']['input']>;
544
- filter?: InputMaybe<WorkFilter>;
545
- limit?: InputMaybe<Scalars['Int']['input']>;
546
- };
547
-
548
- /** Result of saving passages */
549
- export type SavePassagesResult = {
550
- __typename?: 'SavePassagesResult';
551
- /** Number of passages deleted */
552
- deletedCount?: Maybe<Scalars['Int']['output']>;
553
- /** Error message if the save failed */
554
- error?: Maybe<Scalars['String']['output']>;
555
- /** Number of passages saved */
556
- savedCount: Scalars['Int']['output'];
557
- /** Whether the save was successful */
558
- success: Scalars['Boolean']['output'];
559
- };
560
-
561
- /** A title of a work in a specific language */
562
- export type Title = {
563
- __typename?: 'Title';
564
- /** The title text content */
565
- content: Scalars['String']['output'];
566
- /** Language code (e.g., "en", "bo", "Sa-Ltn", "Bo-Ltn") */
567
- language: Scalars['String']['output'];
568
- /** Type of title (e.g., "mainTitle", "longTitle", "otherTitle", "toh", "shortcode") */
569
- type: Scalars['String']['output'];
570
- /** Unique identifier for the title */
571
- uuid: Scalars['ID']['output'];
572
- };
573
-
574
- /** Titles grouped by language */
575
- export type TitlesByLanguage = {
576
- __typename?: 'TitlesByLanguage';
577
- /** English title */
578
- english?: Maybe<Scalars['String']['output']>;
579
- /** Sanskrit title */
580
- sanskrit?: Maybe<Scalars['String']['output']>;
581
- /** Tibetan title */
582
- tibetan?: Maybe<Scalars['String']['output']>;
583
- /** Wylie transliteration of Tibetan title */
584
- wylie?: Maybe<Scalars['String']['output']>;
585
- };
586
-
587
- /** Table of contents for a work, organized by major sections */
588
- export type Toc = {
589
- __typename?: 'Toc';
590
- /** Back matter entries (endnotes, abbreviations) */
591
- backMatter: Array<TocEntry>;
592
- /** Body entries (homage, translation, colophon, etc.) */
593
- body: Array<TocEntry>;
594
- /** Front matter entries (acknowledgment, introduction, summary) */
595
- frontMatter: Array<TocEntry>;
596
- };
597
-
598
- /**
599
- * A hierarchical entry in a work's table of contents.
600
- *
601
- * This is a recursive type - each entry can contain nested children entries.
602
- * Due to GraphQL's explicit nesting requirement, queries must specify the
603
- * desired depth using fragments.
604
- *
605
- * Example query for 3 levels deep:
606
- * fragment TocFields on TocEntry {
607
- * uuid
608
- * content
609
- * label
610
- * level
611
- * }
612
- *
613
- * query {
614
- * work(uuid: "...") {
615
- * toc {
616
- * frontMatter {
617
- * ...TocFields
618
- * children {
619
- * ...TocFields
620
- * children {
621
- * ...TocFields
622
- * }
623
- * }
624
- * }
625
- * }
626
- * }
627
- * }
628
- *
629
- * Maximum query depth is limited to 12 levels.
630
- */
631
- export type TocEntry = {
632
- __typename?: 'TocEntry';
633
- /**
634
- * Child entries nested under this entry.
635
- * Must be explicitly queried to desired depth using fragments.
636
- */
637
- children: Array<TocEntry>;
638
- /** Content of the TOC entry (title/heading) */
639
- content: Scalars['String']['output'];
640
- /** Optional label for the entry */
641
- label?: Maybe<Scalars['String']['output']>;
642
- /** Nesting level (1 for top level, 2+ for nested) */
643
- level: Scalars['Int']['output'];
644
- /** Section type (e.g., "introduction", "translation", "colophon") */
645
- section: Scalars['String']['output'];
646
- /** Sort order within the section */
647
- sort: Scalars['Int']['output'];
648
- /** Unique identifier for the passage */
649
- uuid: Scalars['ID']['output'];
650
- };
651
-
652
- /** User role levels */
653
- export type UserRole =
654
- | 'ADMIN'
655
- | 'EDITOR'
656
- | 'READER'
657
- | 'SCHOLAR'
658
- | 'TRANSLATOR';
659
-
660
- /** A published translation work from the 84000 canon */
661
- export type Work = {
662
- __typename?: 'Work';
663
- /** Bibliography entries for this work, grouped by section */
664
- bibliography: Array<BibliographyEntry>;
665
- /** Folios for this work, filtered by toh and paginated */
666
- folios: Array<Folio>;
667
- /** Glossary term instances for this work */
668
- glossary: Array<GlossaryTermInstance>;
669
- /**
670
- * Publication imprint information.
671
- * If the work query specified a toh argument, that value will be used.
672
- * Otherwise, imprint for the first toh in the work is returned.
673
- */
674
- imprint?: Maybe<Imprint>;
675
- /** Number of source pages */
676
- pages: Scalars['Int']['output'];
677
- /** Paginated passages from this work */
678
- passages: PassageConnection;
679
- /** Date the work was published */
680
- publicationDate?: Maybe<Scalars['String']['output']>;
681
- /** Semantic version of the publication (e.g., "1.0.0") */
682
- publicationVersion: Scalars['String']['output'];
683
- /** Whether access to this work is restricted */
684
- restriction: Scalars['Boolean']['output'];
685
- /** Section of the canon this work belongs to */
686
- section: Scalars['String']['output'];
687
- /** Title of the work */
688
- title: Scalars['String']['output'];
689
- /** All titles associated with this work, in various languages and types */
690
- titles: Array<Title>;
691
- /**
692
- * Table of contents for the work, organized by major sections.
693
- * Returns a recursive tree structure up to 12 levels deep.
694
- * See the TocEntry type documentation for query examples.
695
- */
696
- toc?: Maybe<Toc>;
697
- /** Tohoku catalog entry numbers (e.g., ["toh1", "toh2"]) */
698
- toh: Array<Scalars['String']['output']>;
699
- /** Unique identifier for the work */
700
- uuid: Scalars['ID']['output'];
701
- };
702
-
703
-
704
- /** A published translation work from the 84000 canon */
705
- export type WorkFoliosArgs = {
706
- page?: InputMaybe<Scalars['Int']['input']>;
707
- size?: InputMaybe<Scalars['Int']['input']>;
708
- toh: Scalars['String']['input'];
709
- };
710
-
711
-
712
- /** A published translation work from the 84000 canon */
713
- export type WorkGlossaryArgs = {
714
- withAttestations?: InputMaybe<Scalars['Boolean']['input']>;
715
- };
716
-
717
-
718
- /** A published translation work from the 84000 canon */
719
- export type WorkPassagesArgs = {
720
- cursor?: InputMaybe<Scalars['String']['input']>;
721
- direction?: InputMaybe<PaginationDirection>;
722
- filter?: InputMaybe<PassageFilter>;
723
- limit?: InputMaybe<Scalars['Int']['input']>;
724
- };
725
-
726
- /** Connection type for paginated works */
727
- export type WorkConnection = {
728
- __typename?: 'WorkConnection';
729
- /** List of works in this page */
730
- items: Array<Work>;
731
- /** Pagination information */
732
- pageInfo: PageInfo;
733
- /** Total count of works matching the query */
734
- totalCount: Scalars['Int']['output'];
735
- };
736
-
737
- /** Filter criteria for works query */
738
- export type WorkFilter = {
739
- /** Maximum number of source pages (exclusive). Only return works with fewer pages than this value. */
740
- maxPages?: InputMaybe<Scalars['Int']['input']>;
741
- };
742
-
743
- export type AlignmentFieldsFragment = { __typename?: 'Alignment', folioUuid: string, toh: string, tibetan: string, folioNumber: number, volumeNumber: number };
744
-
745
- export type AnnotationFieldsFragment = { __typename?: 'Annotation', uuid: string, type: string, start: number, end: number, metadata?: any | null };
746
-
747
- export type LicenseFieldsFragment = { __typename?: 'License', name?: string | null, link?: string | null, description?: string | null };
748
-
749
- export type TitlesByLanguageFieldsFragment = { __typename?: 'TitlesByLanguage', tibetan?: string | null, english?: string | null, wylie?: string | null, sanskrit?: string | null };
750
-
751
- export type ImprintFieldsFragment = { __typename?: 'Imprint', toh: string, section?: string | null, version?: string | null, restriction?: boolean | null, publishYear?: string | null, tibetanAuthors?: Array<string> | null, isAuthorContested: boolean, sourceDescription?: string | null, publisherStatement?: string | null, tibetanTranslators?: string | null, license: (
752
- { __typename?: 'License' }
753
- & LicenseFieldsFragment
754
- ), mainTitles?: (
755
- { __typename?: 'TitlesByLanguage' }
756
- & TitlesByLanguageFieldsFragment
757
- ) | null, longTitles?: (
758
- { __typename?: 'TitlesByLanguage' }
759
- & TitlesByLanguageFieldsFragment
760
- ) | null };
761
-
762
- export type PassageFieldsFragment = { __typename?: 'Passage', uuid: string, workUuid: string, content: string, label?: string | null, sort: number, type: string, xmlId?: string | null };
763
-
764
- export type PassageWithAnnotationsFragment = (
765
- { __typename?: 'Passage', annotations: Array<(
766
- { __typename?: 'Annotation' }
767
- & AnnotationFieldsFragment
768
- )>, alignments: Array<(
769
- { __typename?: 'Alignment' }
770
- & AlignmentFieldsFragment
771
- )> }
772
- & PassageFieldsFragment
773
- );
774
-
775
- export type PassageWithJsonFragment = { __typename?: 'Passage', uuid: string, workUuid: string, label?: string | null, sort: number, type: string, xmlId?: string | null, json?: any | null };
776
-
777
- export type TitleFieldsFragment = { __typename?: 'Title', uuid: string, content: string, language: string, type: string };
778
-
779
- export type TocEntryFieldsFragment = { __typename?: 'TocEntry', uuid: string, content: string, label?: string | null, sort: number, level: number, section: string };
780
-
781
- export type TocEntryNestedFragment = (
782
- { __typename?: 'TocEntry', children: Array<(
783
- { __typename?: 'TocEntry', children: Array<(
784
- { __typename?: 'TocEntry', children: Array<(
785
- { __typename?: 'TocEntry', children: Array<(
786
- { __typename?: 'TocEntry', children: Array<(
787
- { __typename?: 'TocEntry' }
788
- & TocEntryFieldsFragment
789
- )> }
790
- & TocEntryFieldsFragment
791
- )> }
792
- & TocEntryFieldsFragment
793
- )> }
794
- & TocEntryFieldsFragment
795
- )> }
796
- & TocEntryFieldsFragment
797
- )> }
798
- & TocEntryFieldsFragment
799
- );
800
-
801
- export type TocFieldsFragment = { __typename?: 'Toc', frontMatter: Array<(
802
- { __typename?: 'TocEntry' }
803
- & TocEntryNestedFragment
804
- )>, body: Array<(
805
- { __typename?: 'TocEntry' }
806
- & TocEntryNestedFragment
807
- )>, backMatter: Array<(
808
- { __typename?: 'TocEntry' }
809
- & TocEntryNestedFragment
810
- )> };
811
-
812
- export type WorkFieldsFragment = { __typename?: 'Work', uuid: string, title: string, toh: Array<string>, publicationDate?: string | null, publicationVersion: string, pages: number, restriction: boolean, section: string };
813
-
814
- export type GetPassagesQueryVariables = Exact<{
815
- uuid: Scalars['ID']['input'];
816
- cursor?: InputMaybe<Scalars['String']['input']>;
817
- limit?: InputMaybe<Scalars['Int']['input']>;
818
- direction?: InputMaybe<PaginationDirection>;
819
- filter?: InputMaybe<PassageFilter>;
820
- }>;
821
-
822
-
823
- export type GetPassagesQuery = { __typename?: 'Query', work?: { __typename?: 'Work', uuid: string, passages: { __typename?: 'PassageConnection', nodes: Array<(
824
- { __typename?: 'Passage' }
825
- & PassageWithAnnotationsFragment
826
- )>, pageInfo: { __typename?: 'PageInfo', nextCursor?: string | null, prevCursor?: string | null, hasMoreAfter: boolean, hasMoreBefore: boolean } } } | null };
827
-
828
- export type GetPassagesBasicQueryVariables = Exact<{
829
- uuid: Scalars['ID']['input'];
830
- cursor?: InputMaybe<Scalars['String']['input']>;
831
- limit?: InputMaybe<Scalars['Int']['input']>;
832
- direction?: InputMaybe<PaginationDirection>;
833
- filter?: InputMaybe<PassageFilter>;
834
- }>;
835
-
836
-
837
- export type GetPassagesBasicQuery = { __typename?: 'Query', work?: { __typename?: 'Work', uuid: string, passages: { __typename?: 'PassageConnection', nodes: Array<(
838
- { __typename?: 'Passage' }
839
- & PassageFieldsFragment
840
- )>, pageInfo: { __typename?: 'PageInfo', nextCursor?: string | null, prevCursor?: string | null, hasMoreAfter: boolean, hasMoreBefore: boolean } } } | null };
841
-
842
- export type GetPassagesWithJsonQueryVariables = Exact<{
843
- uuid: Scalars['ID']['input'];
844
- cursor?: InputMaybe<Scalars['String']['input']>;
845
- limit?: InputMaybe<Scalars['Int']['input']>;
846
- direction?: InputMaybe<PaginationDirection>;
847
- filter?: InputMaybe<PassageFilter>;
848
- }>;
849
-
850
-
851
- export type GetPassagesWithJsonQuery = { __typename?: 'Query', work?: { __typename?: 'Work', uuid: string, passages: { __typename?: 'PassageConnection', nodes: Array<(
852
- { __typename?: 'Passage' }
853
- & PassageWithJsonFragment
854
- )>, pageInfo: { __typename?: 'PageInfo', nextCursor?: string | null, prevCursor?: string | null, hasMoreAfter: boolean, hasMoreBefore: boolean } } } | null };
855
-
856
- export type GetPassagesAroundWithJsonQueryVariables = Exact<{
857
- uuid: Scalars['ID']['input'];
858
- cursor: Scalars['String']['input'];
859
- limit?: InputMaybe<Scalars['Int']['input']>;
860
- filter?: InputMaybe<PassageFilter>;
861
- }>;
862
-
863
-
864
- export type GetPassagesAroundWithJsonQuery = { __typename?: 'Query', work?: { __typename?: 'Work', uuid: string, passages: { __typename?: 'PassageConnection', nodes: Array<(
865
- { __typename?: 'Passage' }
866
- & PassageWithJsonFragment
867
- )>, pageInfo: { __typename?: 'PageInfo', nextCursor?: string | null, prevCursor?: string | null, hasMoreAfter: boolean, hasMoreBefore: boolean } } } | null };
868
-
869
- export type GetPassageQueryVariables = Exact<{
870
- uuid: Scalars['ID']['input'];
871
- }>;
872
-
873
-
874
- export type GetPassageQuery = { __typename?: 'Query', passage?: (
875
- { __typename?: 'Passage' }
876
- & PassageWithAnnotationsFragment
877
- ) | null };
878
-
879
- export type GetWorkByUuidQueryVariables = Exact<{
880
- uuid: Scalars['ID']['input'];
881
- }>;
882
-
883
-
884
- export type GetWorkByUuidQuery = { __typename?: 'Query', work?: (
885
- { __typename?: 'Work' }
886
- & WorkFieldsFragment
887
- ) | null };
888
-
889
- export type GetWorkByTohQueryVariables = Exact<{
890
- toh: Scalars['String']['input'];
891
- }>;
892
-
893
-
894
- export type GetWorkByTohQuery = { __typename?: 'Query', work?: (
895
- { __typename?: 'Work' }
896
- & WorkFieldsFragment
897
- ) | null };
898
-
899
- export type GetWorkWithTitlesQueryVariables = Exact<{
900
- uuid: Scalars['ID']['input'];
901
- }>;
902
-
903
-
904
- export type GetWorkWithTitlesQuery = { __typename?: 'Query', work?: (
905
- { __typename?: 'Work', titles: Array<(
906
- { __typename?: 'Title' }
907
- & TitleFieldsFragment
908
- )> }
909
- & WorkFieldsFragment
910
- ) | null };
911
-
912
- export type GetWorkWithImprintQueryVariables = Exact<{
913
- uuid: Scalars['ID']['input'];
914
- toh?: InputMaybe<Scalars['String']['input']>;
915
- }>;
916
-
917
-
918
- export type GetWorkWithImprintQuery = { __typename?: 'Query', work?: (
919
- { __typename?: 'Work', imprint?: (
920
- { __typename?: 'Imprint' }
921
- & ImprintFieldsFragment
922
- ) | null }
923
- & WorkFieldsFragment
924
- ) | null };
925
-
926
- export type GetWorkWithTocQueryVariables = Exact<{
927
- uuid: Scalars['ID']['input'];
928
- }>;
929
-
930
-
931
- export type GetWorkWithTocQuery = { __typename?: 'Query', work?: (
932
- { __typename?: 'Work', toc?: (
933
- { __typename?: 'Toc' }
934
- & TocFieldsFragment
935
- ) | null }
936
- & WorkFieldsFragment
937
- ) | null };
938
-
939
- export type GetAllWorksQueryVariables = Exact<{
940
- cursor?: InputMaybe<Scalars['String']['input']>;
941
- limit?: InputMaybe<Scalars['Int']['input']>;
942
- }>;
943
-
944
-
945
- export type GetAllWorksQuery = { __typename?: 'Query', works: { __typename?: 'WorkConnection', items: Array<(
946
- { __typename?: 'Work' }
947
- & WorkFieldsFragment
948
- )>, pageInfo: { __typename?: 'PageInfo', nextCursor?: string | null, hasMoreAfter: boolean } } };
949
-
950
- export type GetWorkUuidsQueryVariables = Exact<{
951
- cursor?: InputMaybe<Scalars['String']['input']>;
952
- limit?: InputMaybe<Scalars['Int']['input']>;
953
- }>;
954
-
955
-
956
- export type GetWorkUuidsQuery = { __typename?: 'Query', works: { __typename?: 'WorkConnection', items: Array<{ __typename?: 'Work', uuid: string }>, pageInfo: { __typename?: 'PageInfo', nextCursor?: string | null, hasMoreAfter: boolean } } };
957
-
958
- export const LicenseFieldsFragmentDoc = gql`
959
- fragment LicenseFields on License {
960
- name
961
- link
962
- description
963
- }
964
- `;
965
- export const TitlesByLanguageFieldsFragmentDoc = gql`
966
- fragment TitlesByLanguageFields on TitlesByLanguage {
967
- tibetan
968
- english
969
- wylie
970
- sanskrit
971
- }
972
- `;
973
- export const ImprintFieldsFragmentDoc = gql`
974
- fragment ImprintFields on Imprint {
975
- toh
976
- section
977
- version
978
- restriction
979
- publishYear
980
- tibetanAuthors
981
- isAuthorContested
982
- sourceDescription
983
- publisherStatement
984
- tibetanTranslators
985
- license {
986
- ...LicenseFields
987
- }
988
- mainTitles {
989
- ...TitlesByLanguageFields
990
- }
991
- longTitles {
992
- ...TitlesByLanguageFields
993
- }
994
- }
995
- `;
996
- export const PassageFieldsFragmentDoc = gql`
997
- fragment PassageFields on Passage {
998
- uuid
999
- workUuid
1000
- content
1001
- label
1002
- sort
1003
- type
1004
- xmlId
1005
- }
1006
- `;
1007
- export const AnnotationFieldsFragmentDoc = gql`
1008
- fragment AnnotationFields on Annotation {
1009
- uuid
1010
- type
1011
- start
1012
- end
1013
- metadata
1014
- }
1015
- `;
1016
- export const AlignmentFieldsFragmentDoc = gql`
1017
- fragment AlignmentFields on Alignment {
1018
- folioUuid
1019
- toh
1020
- tibetan
1021
- folioNumber
1022
- volumeNumber
1023
- }
1024
- `;
1025
- export const PassageWithAnnotationsFragmentDoc = gql`
1026
- fragment PassageWithAnnotations on Passage {
1027
- ...PassageFields
1028
- annotations {
1029
- ...AnnotationFields
1030
- }
1031
- alignments {
1032
- ...AlignmentFields
1033
- }
1034
- }
1035
- `;
1036
- export const PassageWithJsonFragmentDoc = gql`
1037
- fragment PassageWithJson on Passage {
1038
- uuid
1039
- workUuid
1040
- label
1041
- sort
1042
- type
1043
- xmlId
1044
- json
1045
- }
1046
- `;
1047
- export const TitleFieldsFragmentDoc = gql`
1048
- fragment TitleFields on Title {
1049
- uuid
1050
- content
1051
- language
1052
- type
1053
- }
1054
- `;
1055
- export const TocEntryFieldsFragmentDoc = gql`
1056
- fragment TocEntryFields on TocEntry {
1057
- uuid
1058
- content
1059
- label
1060
- sort
1061
- level
1062
- section
1063
- }
1064
- `;
1065
- export const TocEntryNestedFragmentDoc = gql`
1066
- fragment TocEntryNested on TocEntry {
1067
- ...TocEntryFields
1068
- children {
1069
- ...TocEntryFields
1070
- children {
1071
- ...TocEntryFields
1072
- children {
1073
- ...TocEntryFields
1074
- children {
1075
- ...TocEntryFields
1076
- children {
1077
- ...TocEntryFields
1078
- }
1079
- }
1080
- }
1081
- }
1082
- }
1083
- }
1084
- `;
1085
- export const TocFieldsFragmentDoc = gql`
1086
- fragment TocFields on Toc {
1087
- frontMatter {
1088
- ...TocEntryNested
1089
- }
1090
- body {
1091
- ...TocEntryNested
1092
- }
1093
- backMatter {
1094
- ...TocEntryNested
1095
- }
1096
- }
1097
- `;
1098
- export const WorkFieldsFragmentDoc = gql`
1099
- fragment WorkFields on Work {
1100
- uuid
1101
- title
1102
- toh
1103
- publicationDate
1104
- publicationVersion
1105
- pages
1106
- restriction
1107
- section
1108
- }
1109
- `;
1110
- export const GetPassagesDocument = gql`
1111
- query GetPassages($uuid: ID!, $cursor: String, $limit: Int, $direction: PaginationDirection, $filter: PassageFilter) {
1112
- work(uuid: $uuid) {
1113
- uuid
1114
- passages(cursor: $cursor, limit: $limit, direction: $direction, filter: $filter) {
1115
- nodes {
1116
- ...PassageWithAnnotations
1117
- }
1118
- pageInfo {
1119
- nextCursor
1120
- prevCursor
1121
- hasMoreAfter
1122
- hasMoreBefore
1123
- }
1124
- }
1125
- }
1126
- }
1127
- ${PassageWithAnnotationsFragmentDoc}
1128
- ${PassageFieldsFragmentDoc}
1129
- ${AnnotationFieldsFragmentDoc}
1130
- ${AlignmentFieldsFragmentDoc}`;
1131
- export const GetPassagesBasicDocument = gql`
1132
- query GetPassagesBasic($uuid: ID!, $cursor: String, $limit: Int, $direction: PaginationDirection, $filter: PassageFilter) {
1133
- work(uuid: $uuid) {
1134
- uuid
1135
- passages(cursor: $cursor, limit: $limit, direction: $direction, filter: $filter) {
1136
- nodes {
1137
- ...PassageFields
1138
- }
1139
- pageInfo {
1140
- nextCursor
1141
- prevCursor
1142
- hasMoreAfter
1143
- hasMoreBefore
1144
- }
1145
- }
1146
- }
1147
- }
1148
- ${PassageFieldsFragmentDoc}`;
1149
- export const GetPassagesWithJsonDocument = gql`
1150
- query GetPassagesWithJson($uuid: ID!, $cursor: String, $limit: Int, $direction: PaginationDirection, $filter: PassageFilter) {
1151
- work(uuid: $uuid) {
1152
- uuid
1153
- passages(cursor: $cursor, limit: $limit, direction: $direction, filter: $filter) {
1154
- nodes {
1155
- ...PassageWithJson
1156
- }
1157
- pageInfo {
1158
- nextCursor
1159
- prevCursor
1160
- hasMoreAfter
1161
- hasMoreBefore
1162
- }
1163
- }
1164
- }
1165
- }
1166
- ${PassageWithJsonFragmentDoc}`;
1167
- export const GetPassagesAroundWithJsonDocument = gql`
1168
- query GetPassagesAroundWithJson($uuid: ID!, $cursor: String!, $limit: Int, $filter: PassageFilter) {
1169
- work(uuid: $uuid) {
1170
- uuid
1171
- passages(cursor: $cursor, limit: $limit, direction: AROUND, filter: $filter) {
1172
- nodes {
1173
- ...PassageWithJson
1174
- }
1175
- pageInfo {
1176
- nextCursor
1177
- prevCursor
1178
- hasMoreAfter
1179
- hasMoreBefore
1180
- }
1181
- }
1182
- }
1183
- }
1184
- ${PassageWithJsonFragmentDoc}`;
1185
- export const GetPassageDocument = gql`
1186
- query GetPassage($uuid: ID!) {
1187
- passage(uuid: $uuid) {
1188
- ...PassageWithAnnotations
1189
- }
1190
- }
1191
- ${PassageWithAnnotationsFragmentDoc}
1192
- ${PassageFieldsFragmentDoc}
1193
- ${AnnotationFieldsFragmentDoc}
1194
- ${AlignmentFieldsFragmentDoc}`;
1195
- export const GetWorkByUuidDocument = gql`
1196
- query GetWorkByUuid($uuid: ID!) {
1197
- work(uuid: $uuid) {
1198
- ...WorkFields
1199
- }
1200
- }
1201
- ${WorkFieldsFragmentDoc}`;
1202
- export const GetWorkByTohDocument = gql`
1203
- query GetWorkByToh($toh: String!) {
1204
- work(toh: $toh) {
1205
- ...WorkFields
1206
- }
1207
- }
1208
- ${WorkFieldsFragmentDoc}`;
1209
- export const GetWorkWithTitlesDocument = gql`
1210
- query GetWorkWithTitles($uuid: ID!) {
1211
- work(uuid: $uuid) {
1212
- ...WorkFields
1213
- titles {
1214
- ...TitleFields
1215
- }
1216
- }
1217
- }
1218
- ${WorkFieldsFragmentDoc}
1219
- ${TitleFieldsFragmentDoc}`;
1220
- export const GetWorkWithImprintDocument = gql`
1221
- query GetWorkWithImprint($uuid: ID!, $toh: String) {
1222
- work(uuid: $uuid, toh: $toh) {
1223
- ...WorkFields
1224
- imprint {
1225
- ...ImprintFields
1226
- }
1227
- }
1228
- }
1229
- ${WorkFieldsFragmentDoc}
1230
- ${ImprintFieldsFragmentDoc}
1231
- ${LicenseFieldsFragmentDoc}
1232
- ${TitlesByLanguageFieldsFragmentDoc}`;
1233
- export const GetWorkWithTocDocument = gql`
1234
- query GetWorkWithToc($uuid: ID!) {
1235
- work(uuid: $uuid) {
1236
- ...WorkFields
1237
- toc {
1238
- ...TocFields
1239
- }
1240
- }
1241
- }
1242
- ${WorkFieldsFragmentDoc}
1243
- ${TocFieldsFragmentDoc}
1244
- ${TocEntryNestedFragmentDoc}
1245
- ${TocEntryFieldsFragmentDoc}`;
1246
- export const GetAllWorksDocument = gql`
1247
- query GetAllWorks($cursor: String, $limit: Int) {
1248
- works(cursor: $cursor, limit: $limit) {
1249
- items {
1250
- ...WorkFields
1251
- }
1252
- pageInfo {
1253
- nextCursor
1254
- hasMoreAfter
1255
- }
1256
- }
1257
- }
1258
- ${WorkFieldsFragmentDoc}`;
1259
- export const GetWorkUuidsDocument = gql`
1260
- query GetWorkUuids($cursor: String, $limit: Int) {
1261
- works(cursor: $cursor, limit: $limit) {
1262
- items {
1263
- uuid
1264
- }
1265
- pageInfo {
1266
- nextCursor
1267
- hasMoreAfter
1268
- }
1269
- }
1270
- }
1271
- `;
1272
-
1273
- export type SdkFunctionWrapper = <T>(action: (requestHeaders?:Record<string, string>) => Promise<T>, operationName: string, operationType?: string, variables?: any) => Promise<T>;
1274
-
1275
-
1276
- const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType, _variables) => action();
1277
-
1278
- export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) {
1279
- return {
1280
- GetPassages(variables: GetPassagesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetPassagesQuery> {
1281
- return withWrapper((wrappedRequestHeaders) => client.request<GetPassagesQuery>({ document: GetPassagesDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetPassages', 'query', variables);
1282
- },
1283
- GetPassagesBasic(variables: GetPassagesBasicQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetPassagesBasicQuery> {
1284
- return withWrapper((wrappedRequestHeaders) => client.request<GetPassagesBasicQuery>({ document: GetPassagesBasicDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetPassagesBasic', 'query', variables);
1285
- },
1286
- GetPassagesWithJson(variables: GetPassagesWithJsonQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetPassagesWithJsonQuery> {
1287
- return withWrapper((wrappedRequestHeaders) => client.request<GetPassagesWithJsonQuery>({ document: GetPassagesWithJsonDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetPassagesWithJson', 'query', variables);
1288
- },
1289
- GetPassagesAroundWithJson(variables: GetPassagesAroundWithJsonQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetPassagesAroundWithJsonQuery> {
1290
- return withWrapper((wrappedRequestHeaders) => client.request<GetPassagesAroundWithJsonQuery>({ document: GetPassagesAroundWithJsonDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetPassagesAroundWithJson', 'query', variables);
1291
- },
1292
- GetPassage(variables: GetPassageQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetPassageQuery> {
1293
- return withWrapper((wrappedRequestHeaders) => client.request<GetPassageQuery>({ document: GetPassageDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetPassage', 'query', variables);
1294
- },
1295
- GetWorkByUuid(variables: GetWorkByUuidQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetWorkByUuidQuery> {
1296
- return withWrapper((wrappedRequestHeaders) => client.request<GetWorkByUuidQuery>({ document: GetWorkByUuidDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetWorkByUuid', 'query', variables);
1297
- },
1298
- GetWorkByToh(variables: GetWorkByTohQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetWorkByTohQuery> {
1299
- return withWrapper((wrappedRequestHeaders) => client.request<GetWorkByTohQuery>({ document: GetWorkByTohDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetWorkByToh', 'query', variables);
1300
- },
1301
- GetWorkWithTitles(variables: GetWorkWithTitlesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetWorkWithTitlesQuery> {
1302
- return withWrapper((wrappedRequestHeaders) => client.request<GetWorkWithTitlesQuery>({ document: GetWorkWithTitlesDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetWorkWithTitles', 'query', variables);
1303
- },
1304
- GetWorkWithImprint(variables: GetWorkWithImprintQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetWorkWithImprintQuery> {
1305
- return withWrapper((wrappedRequestHeaders) => client.request<GetWorkWithImprintQuery>({ document: GetWorkWithImprintDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetWorkWithImprint', 'query', variables);
1306
- },
1307
- GetWorkWithToc(variables: GetWorkWithTocQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetWorkWithTocQuery> {
1308
- return withWrapper((wrappedRequestHeaders) => client.request<GetWorkWithTocQuery>({ document: GetWorkWithTocDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetWorkWithToc', 'query', variables);
1309
- },
1310
- GetAllWorks(variables?: GetAllWorksQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetAllWorksQuery> {
1311
- return withWrapper((wrappedRequestHeaders) => client.request<GetAllWorksQuery>({ document: GetAllWorksDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetAllWorks', 'query', variables);
1312
- },
1313
- GetWorkUuids(variables?: GetWorkUuidsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit['signal']): Promise<GetWorkUuidsQuery> {
1314
- return withWrapper((wrappedRequestHeaders) => client.request<GetWorkUuidsQuery>({ document: GetWorkUuidsDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), 'GetWorkUuids', 'query', variables);
1315
- }
1316
- };
1317
- }
1318
- export type Sdk = ReturnType<typeof getSdk>;