@literary-universe/sdk 0.1.0 → 0.2.0

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.
package/README.md CHANGED
@@ -83,10 +83,13 @@ try {
83
83
  | `story({id})` | `story:read` | Story metadata and author notes |
84
84
  | `chapters({storyId, language, first, after})` | `story:read` | Chapter headers without bodies |
85
85
  | `draft({id, language})` | `story:read` | Stored working draft, including JSON, HTML/text/legacy representations and notes/counters |
86
+ | `encyclopediaEntries({universeId, first, after})` | `universe:read` | Paginated entry headers of a universe, drafts included |
87
+ | `encyclopediaEntry({id, language})` | `universe:read` | An entry with its summary, links and fields as plain text, in the original or a translated edition |
88
+ | `series({universeId})` | `universe:read` | The universe's saved series, each with its `version` and its stories in reading order |
86
89
 
87
- Read access requires the person's current `draft.read` capability on the work or inherited universe. Personal credentials use current organization roles, including read-only view-all; removing a role affects subsequent requests. Organization-owned catalog credentials remain guests and cannot use author reads. Fan fiction is readable by its author and that story's own team; the team of the universe it is set in does not inherit it.
90
+ Read access requires the person's current `draft.read` capability on the work or inherited universe. Personal credentials use current organization roles, including read-only view-all; removing a role affects subsequent requests. Organization keys are described under [Organization keys](#organization-keys). Fan fiction is readable by its author and that story's own team; the team of the universe it is set in does not inherit it.
88
91
 
89
- Draft language defaults to the chapter's original language. An explicit translation returns that stored edition; a missing edition or unavailable permission returns `NOT_FOUND`. Draft JSON preserves editor nodes and marks without conversion. Titles, descriptions and `html` are returned as the app displays them, with the stored entity encoding removed. `text` and `markdown` are returned as stored, where a literal `<` or `>` is `&lt;` or `&gt;`. `updatedAt` is existing metadata, not an atomic write-precondition version. Draft reads return a server version. Versioned content saves, validation, recovery, chapter creation, publication, and universe translations are available. Encyclopedia editing is later work.
92
+ Draft language defaults to the chapter's original language. An explicit translation returns that stored edition; a missing edition or unavailable permission returns `NOT_FOUND`. Draft JSON preserves editor nodes and marks without conversion. Titles, descriptions and `html` are returned as the app displays them, with the stored entity encoding removed. `text` and `markdown` are returned as stored, where a literal `<` or `>` is `&lt;` or `&gt;`. `updatedAt` is existing metadata, not an atomic write-precondition version. Draft reads return a server version. Versioned content saves, validation, recovery, chapter creation, publication, universe translations, story and universe details, chapter structure, encyclopedia entries and series are available.
90
93
 
91
94
  Chapter headers include `hasDraft` for the requested edition. When a translation has not been created, its header retains the source title as a label, has `hasDraft: false`, and does not inherit the original's publication timestamp.
92
95
 
@@ -105,6 +108,65 @@ A translation is the universe's title and description in another language. Who m
105
108
 
106
109
  Writes are never retried, whatever `maxRetries` says: a lost response to an applied update would come back from a retry as a conflict. A resource-restricted credential can write to the universes it selects.
107
110
 
111
+ ## Organization keys
112
+
113
+ An organization admin creates organization keys in the organization's settings, on the API keys tab, which the organization's `api` add-on opens. With `organization:read` alone a key reads the organization's public catalogue as a guest, for display on another site. With work scopes (`story:read`, `story:write`, `story:publish`, `universe:read`, `universe:write`, `universe:translate`) it acts as the organization itself: it has an organization admin's rights over the stories and universes the organization owns, and over the stories set in those universes, and over nothing else. It keeps working when the admin who created it leaves; revoke it to stop it. `identity()` reports it as `ORGANIZATION_API_KEY` with its `organizationId` and no `userId`. What it creates is recorded under the owner of the work it writes into, and the audit log names the key.
114
+
115
+ Organization keys cannot upload covers or chapter images yet; use a personal key for those.
116
+
117
+ ## Story details and visibility
118
+
119
+ | Method | Scope | Result |
120
+ | --- | --- | --- |
121
+ | `updateStory({storyId, input})` | `story:write` | The story header after the change |
122
+ | `setStoryVisibility({storyId, visibility})` | `story:write` | The story header; `privateAt` is set while it is hidden |
123
+
124
+ `input` takes `title`, `description`, `genres`, `tags`, `rating`, `license`, `language` and `universeId`; only the fields you give change. Moving a story to another universe takes the story owner's rights (the owner or an admin of the owning organization) and edit rights on the target universe, as the workshop does; `universeId: null` makes it standalone. A rating under staff review stays as it is (`FAILED_PRECONDITION`).
125
+
126
+ `PRIVATE` hides a published story from readers and its universe's story count; `PUBLIC` shows it again. A story that was never published fails with `BAD_USER_INPUT`.
127
+
128
+ ## Chapter structure
129
+
130
+ | Method | Scope | Result |
131
+ | --- | --- | --- |
132
+ | `renameChapter({id, language?, title})` | `story:write` | The chapter header with its new title |
133
+ | `reorderChapters({storyId, chapterIds})` | `story:write` | `{storyId, chapterIds}` in the new order |
134
+ | `removeChapter({id})` | `story:write` | `{id, storyId}` of the removed unpublished chapter |
135
+
136
+ Renaming and reordering apply to published chapters too, and readers see the change at once. A `language` renames that translation's title; without it the original is renamed, together with the story's list of chapters. `chapterIds` names every chapter of the story exactly once. Only a chapter never published, in any language or to beta readers, can be removed (`FAILED_PRECONDITION` otherwise); the chapters after it are renumbered. The only chapter of a story cannot be removed. A story whose arcs or free preview chapters count chapters keeps its structure: removal and reordering fail with `FAILED_PRECONDITION`. `removeChapter` is never retried.
137
+
138
+ ## Universe details
139
+
140
+ | Method | Scope | Result |
141
+ | --- | --- | --- |
142
+ | `updateUniverse({universeId, input})` | `universe:write` | The universe header after the change |
143
+
144
+ `input` takes `title`, `slug`, `description`, `genre`, `rating`, `license` and `language`. A `slug` is lowercase letters, digits and single hyphens; one in use by another universe fails with `CONFLICT`. `genre` is a genre value such as `fantasy`. A rating under staff review does not change (`FAILED_PRECONDITION`). Translations of the title and description go through `updateUniverseTranslation`.
145
+
146
+ ## Encyclopedia
147
+
148
+ | Method | Scope | Result |
149
+ | --- | --- | --- |
150
+ | `createEncyclopediaEntry({universeId, name, categoryTitle, ...})` | `universe:write` | The new draft entry |
151
+ | `updateEncyclopediaEntry({id, changes})` | `universe:write` | The entry after the change |
152
+ | `translateEncyclopediaEntry({id, language, ...})` | `universe:translate` or `universe:write` | The entry's edition in that language |
153
+ | `setEncyclopediaEntryPublication({id, published})` | `universe:write` | The entry, published or back to draft |
154
+ | `deleteEncyclopediaEntry({id})` | `universe:write` | `{id, universeId}` of the deleted entry |
155
+
156
+ A new entry is a draft in a category the universe offers, named by its title, and starts with the category's template fields. It can carry its first text right away: `pronunciation`, `tags`, `summary`, `parentName`, `relatedAdd`, and `fields` and `timeFields` by title. Other entries are named by their names. A name the universe already has fails with `CONFLICT`, and the error's `resourceId` is the existing entry. The plan of the universe's owner caps the number of entries (`FAILED_PRECONDITION`). Creation and deletion are never retried.
157
+
158
+ `changes` sets the same values in the original language and may also change `name` and `categoryTitle`, remove links with `relatedRemove`, and clear the parent with `parentName: null`. Text is plain; the server turns it into the editor's format. A text field of a new title is added; a field that holds something other than text is refused. `translateEncyclopediaEntry` writes an edition in a language the universe is translated into (`FAILED_PRECONDITION` otherwise): `name`, `pronunciation`, `summary` and `fields`, each named by its original title with an optional `translatedTitle`. A new edition starts as a copy of the original.
159
+
160
+ Publishing shows the entry to readers; unpublishing returns it to a draft. Deletion can be undone by staff and removes the entry from the parent and related links of the universe's other entries.
161
+
162
+ ## Series
163
+
164
+ | Method | Scope | Result |
165
+ | --- | --- | --- |
166
+ | `saveSeries({universeId, seriesId?, expectedVersion, title, storyIds})` | `universe:write` | The saved series with its new `version` |
167
+
168
+ A series is the reading order of stories in a universe. `storyIds` lists stories of the universe, not fan fiction, in order; the series workshop shows them in a row. Leave out `seriesId` and pass `expectedVersion: 0` to create one; to replace one, pass the `version` read from `series({universeId})`. A series changed since then fails with `VERSION_CONFLICT` and changes nothing. Saves are never retried. A universe holds up to 50 series.
169
+
108
170
  ## Resource restrictions
109
171
 
110
172
  Restricted credentials can be issued through the existing authenticated browser method; the resource picker belongs to the later developer-settings milestone:
@@ -125,7 +187,7 @@ Restricted credentials are denied on legacy GraphQL operations and HTTP text exp
125
187
 
126
188
  ## Errors and limits
127
189
 
128
- `LiteraryUniverseApiError` provides `code`, a safe message, optional `requestId`, HTTP `status`, `retryAfterSeconds`, and `currentRevision` with `VERSION_CONFLICT`. Partial GraphQL data is rejected whenever the response contains errors. Missing and inaccessible resources both return `NOT_FOUND`. Common server codes include `UNAUTHENTICATED`, `FORBIDDEN`, `BAD_USER_INPUT`, `GRAPHQL_VALIDATION_FAILED`, `NOT_FOUND`, `VERSION_CONFLICT`, `PAYLOAD_TOO_LARGE`, and `INTERNAL_SERVER_ERROR`. Client/transport codes include `INVALID_CONFIGURATION`, `INVALID_RESPONSE`, `REDIRECTED`, `NETWORK_ERROR`, `RATE_LIMITED`, `SERVICE_UNAVAILABLE`, `TIMEOUT` and `CANCELLED`. An HTTP failure without a GraphQL error, such as a 404 from a wrong mount prefix, is `INVALID_RESPONSE`.
190
+ `LiteraryUniverseApiError` provides `code`, a safe message, optional `requestId`, HTTP `status`, `retryAfterSeconds`, `currentRevision` with `VERSION_CONFLICT`, and `resourceId` with `CONFLICT`. Partial GraphQL data is rejected whenever the response contains errors. Missing and inaccessible resources both return `NOT_FOUND`. Common server codes include `UNAUTHENTICATED`, `FORBIDDEN`, `BAD_USER_INPUT`, `GRAPHQL_VALIDATION_FAILED`, `NOT_FOUND`, `CONFLICT`, `FAILED_PRECONDITION`, `VERSION_CONFLICT`, `PAYLOAD_TOO_LARGE`, and `INTERNAL_SERVER_ERROR`. Client/transport codes include `INVALID_CONFIGURATION`, `INVALID_RESPONSE`, `REDIRECTED`, `NETWORK_ERROR`, `RATE_LIMITED`, `SERVICE_UNAVAILABLE`, `TIMEOUT` and `CANCELLED`. An HTTP failure without a GraphQL error, such as a 404 from a wrong mount prefix, is `INVALID_RESPONSE`.
129
191
 
130
192
  Requests retain the 1 MiB JSON ceiling. A draft pull is limited to 8 MiB; requests containing author operations have a 16 MiB response ceiling. The SDK also stops reading at 16 MiB. IP/batch protection remains. Deployed API-key traffic also consumes atomic per-key and owner budgets shared across instances. GraphQL development skips limits except in E2E mode; image transfers always consume shared credential quotas. Top-level aliases are charged as operations; a single query is limited to 20 roots.
131
193
 
@@ -38,6 +38,108 @@ export type AuthorChapterPublishInput = {
38
38
  publishAt?: string | null | undefined;
39
39
  audience?: AuthorPublicationAudience | null | undefined;
40
40
  };
41
+ export type AuthorStoryVisibility = 'PUBLIC' | 'PRIVATE';
42
+ export type AuthorChapterRenameInput = {
43
+ id: string | number;
44
+ /** A translation's language renames that edition; the original otherwise. */
45
+ language?: string | null | undefined;
46
+ title: string;
47
+ };
48
+ export type AuthorChapterRemoveInput = {
49
+ id: string | number;
50
+ };
51
+ export type AuthorChapterReorderInput = {
52
+ storyId: string | number;
53
+ /** Every chapter of the story, each once, in the new reading order. */
54
+ chapterIds: Array<string | number>;
55
+ };
56
+ /** Only the given fields change. */
57
+ export type AuthorUniverseUpdateInput = {
58
+ title?: string | null | undefined;
59
+ /** The address segment: lowercase letters, digits and single hyphens. */
60
+ slug?: string | null | undefined;
61
+ description?: string | null | undefined;
62
+ /** A genre value, as the genre list names it. */
63
+ genre?: string | null | undefined;
64
+ rating?: string | null | undefined;
65
+ license?: string | null | undefined;
66
+ language?: string | null | undefined;
67
+ };
68
+ /** A field by its title; a new title adds a text field. */
69
+ export type AuthorEncyclopediaTextFieldInput = {
70
+ title: string;
71
+ text: string;
72
+ };
73
+ /** A date like 1402-03-01, or HH:MM in a clock field. */
74
+ export type AuthorEncyclopediaTimeFieldInput = {
75
+ title: string;
76
+ value: string;
77
+ };
78
+ /** Only the given values change. Entries are named by their names. */
79
+ export type AuthorEncyclopediaEntryChangesInput = {
80
+ name?: string | null | undefined;
81
+ pronunciation?: string | null | undefined;
82
+ tags?: Array<string> | null | undefined;
83
+ categoryTitle?: string | null | undefined;
84
+ /** null removes the parent. */
85
+ parentName?: string | null | undefined;
86
+ relatedAdd?: Array<string> | null | undefined;
87
+ relatedRemove?: Array<string> | null | undefined;
88
+ summary?: string | null | undefined;
89
+ fields?: Array<AuthorEncyclopediaTextFieldInput> | null | undefined;
90
+ timeFields?: Array<AuthorEncyclopediaTimeFieldInput> | null | undefined;
91
+ };
92
+ export type AuthorEncyclopediaEntryCreateInput = {
93
+ universeId: string | number;
94
+ name: string;
95
+ /** A category available in the universe, by title. */
96
+ categoryTitle: string;
97
+ pronunciation?: string | null | undefined;
98
+ tags?: Array<string> | null | undefined;
99
+ parentName?: string | null | undefined;
100
+ relatedAdd?: Array<string> | null | undefined;
101
+ summary?: string | null | undefined;
102
+ fields?: Array<AuthorEncyclopediaTextFieldInput> | null | undefined;
103
+ timeFields?: Array<AuthorEncyclopediaTimeFieldInput> | null | undefined;
104
+ };
105
+ export type AuthorEncyclopediaFieldTranslationInput = {
106
+ /** The field's title in the original language. */
107
+ title: string;
108
+ translatedTitle?: string | null | undefined;
109
+ text: string;
110
+ };
111
+ export type AuthorEncyclopediaEntryTranslationInput = {
112
+ id: string | number;
113
+ /** A language the universe is translated into. */
114
+ language: string;
115
+ name?: string | null | undefined;
116
+ pronunciation?: string | null | undefined;
117
+ summary?: string | null | undefined;
118
+ fields?: Array<AuthorEncyclopediaFieldTranslationInput> | null | undefined;
119
+ };
120
+ export type AuthorSeriesSaveInput = {
121
+ universeId: string | number;
122
+ /** Leave out to create a series. */
123
+ seriesId?: string | number | null | undefined;
124
+ /** The version read with the series; 0 for a new one. */
125
+ expectedVersion: number;
126
+ title: string;
127
+ /** Stories of the universe, not fan fiction, in reading order. */
128
+ storyIds: Array<string | number>;
129
+ };
130
+ /** Only the given fields change. */
131
+ export type AuthorStoryUpdateInput = {
132
+ title?: string | null | undefined;
133
+ description?: string | null | undefined;
134
+ /** Genre values, as the genre list names them. */
135
+ genres?: Array<string> | null | undefined;
136
+ tags?: Array<string> | null | undefined;
137
+ rating?: string | null | undefined;
138
+ license?: string | null | undefined;
139
+ language?: string | null | undefined;
140
+ /** Another universe needs edit rights on it; null makes the story standalone. */
141
+ universeId?: string | number | null | undefined;
142
+ };
41
143
  export type LuIdentityQueryVariables = Exact<{
42
144
  [key: string]: never;
43
145
  }>;
@@ -352,6 +454,333 @@ export type LuUpdateUniverseTranslationMutation = {
352
454
  revision: number;
353
455
  };
354
456
  };
457
+ export type LuUpdateStoryMutationVariables = Exact<{
458
+ storyId: string | number;
459
+ input: AuthorStoryUpdateInput;
460
+ }>;
461
+ export type LuUpdateStoryMutation = {
462
+ result: {
463
+ id: string;
464
+ title: string;
465
+ slug: string | null;
466
+ language: string;
467
+ universeId: string | null;
468
+ organizationId: string | null;
469
+ createdAt: string | null;
470
+ updatedAt: string | null;
471
+ publishedAt: string | null;
472
+ privateAt: string | null;
473
+ state: AuthorWorkState;
474
+ };
475
+ };
476
+ export type LuSetStoryVisibilityMutationVariables = Exact<{
477
+ storyId: string | number;
478
+ visibility: AuthorStoryVisibility;
479
+ }>;
480
+ export type LuSetStoryVisibilityMutation = {
481
+ result: {
482
+ id: string;
483
+ title: string;
484
+ slug: string | null;
485
+ language: string;
486
+ universeId: string | null;
487
+ organizationId: string | null;
488
+ createdAt: string | null;
489
+ updatedAt: string | null;
490
+ publishedAt: string | null;
491
+ privateAt: string | null;
492
+ state: AuthorWorkState;
493
+ };
494
+ };
495
+ export type LuRenameChapterMutationVariables = Exact<{
496
+ input: AuthorChapterRenameInput;
497
+ }>;
498
+ export type LuRenameChapterMutation = {
499
+ result: {
500
+ id: string;
501
+ storyId: string;
502
+ sequence: number;
503
+ title: string;
504
+ language: string;
505
+ hasDraft: boolean;
506
+ updatedAt: string | null;
507
+ publishedAt: string | null;
508
+ };
509
+ };
510
+ export type LuRemoveChapterMutationVariables = Exact<{
511
+ input: AuthorChapterRemoveInput;
512
+ }>;
513
+ export type LuRemoveChapterMutation = {
514
+ result: {
515
+ id: string;
516
+ storyId: string;
517
+ };
518
+ };
519
+ export type LuReorderChaptersMutationVariables = Exact<{
520
+ input: AuthorChapterReorderInput;
521
+ }>;
522
+ export type LuReorderChaptersMutation = {
523
+ result: {
524
+ storyId: string;
525
+ chapterIds: Array<string>;
526
+ };
527
+ };
528
+ export type LuUpdateUniverseMutationVariables = Exact<{
529
+ universeId: string | number;
530
+ input: AuthorUniverseUpdateInput;
531
+ }>;
532
+ export type LuUpdateUniverseMutation = {
533
+ result: {
534
+ id: string;
535
+ title: string;
536
+ slug: string | null;
537
+ language: string;
538
+ organizationId: string | null;
539
+ createdAt: string | null;
540
+ updatedAt: string | null;
541
+ publishedAt: string | null;
542
+ privateAt: string | null;
543
+ state: AuthorWorkState;
544
+ };
545
+ };
546
+ export type LuEncyclopediaEntriesQueryVariables = Exact<{
547
+ universeId: string | number;
548
+ first?: number | null | undefined;
549
+ after?: string | null | undefined;
550
+ }>;
551
+ export type LuEncyclopediaEntriesQuery = {
552
+ result: {
553
+ nodes: Array<{
554
+ id: string;
555
+ universeId: string;
556
+ name: string;
557
+ categoryId: string;
558
+ categoryTitle: string | null;
559
+ language: string;
560
+ wip: boolean;
561
+ publishedAt: string | null;
562
+ updatedAt: string | null;
563
+ translations: Array<string>;
564
+ }>;
565
+ pageInfo: {
566
+ endCursor: string | null;
567
+ hasNextPage: boolean;
568
+ };
569
+ };
570
+ };
571
+ export type LuEncyclopediaEntryQueryVariables = Exact<{
572
+ id: string | number;
573
+ language?: string | null | undefined;
574
+ }>;
575
+ export type LuEncyclopediaEntryQuery = {
576
+ result: {
577
+ id: string;
578
+ universeId: string;
579
+ name: string;
580
+ categoryId: string;
581
+ categoryTitle: string | null;
582
+ language: string;
583
+ wip: boolean;
584
+ publishedAt: string | null;
585
+ updatedAt: string | null;
586
+ translations: Array<string>;
587
+ pronunciation: string | null;
588
+ tags: Array<string>;
589
+ summary: string | null;
590
+ parent: {
591
+ id: string | null;
592
+ name: string;
593
+ } | null;
594
+ related: Array<{
595
+ id: string | null;
596
+ name: string;
597
+ }>;
598
+ fields: Array<{
599
+ id: string;
600
+ title: string;
601
+ type: string;
602
+ private: boolean;
603
+ text: string | null;
604
+ }>;
605
+ } | null;
606
+ };
607
+ export type LuCreateEncyclopediaEntryMutationVariables = Exact<{
608
+ input: AuthorEncyclopediaEntryCreateInput;
609
+ }>;
610
+ export type LuCreateEncyclopediaEntryMutation = {
611
+ result: {
612
+ id: string;
613
+ universeId: string;
614
+ name: string;
615
+ categoryId: string;
616
+ categoryTitle: string | null;
617
+ language: string;
618
+ wip: boolean;
619
+ publishedAt: string | null;
620
+ updatedAt: string | null;
621
+ translations: Array<string>;
622
+ pronunciation: string | null;
623
+ tags: Array<string>;
624
+ summary: string | null;
625
+ parent: {
626
+ id: string | null;
627
+ name: string;
628
+ } | null;
629
+ related: Array<{
630
+ id: string | null;
631
+ name: string;
632
+ }>;
633
+ fields: Array<{
634
+ id: string;
635
+ title: string;
636
+ type: string;
637
+ private: boolean;
638
+ text: string | null;
639
+ }>;
640
+ };
641
+ };
642
+ export type LuUpdateEncyclopediaEntryMutationVariables = Exact<{
643
+ id: string | number;
644
+ changes: AuthorEncyclopediaEntryChangesInput;
645
+ }>;
646
+ export type LuUpdateEncyclopediaEntryMutation = {
647
+ result: {
648
+ id: string;
649
+ universeId: string;
650
+ name: string;
651
+ categoryId: string;
652
+ categoryTitle: string | null;
653
+ language: string;
654
+ wip: boolean;
655
+ publishedAt: string | null;
656
+ updatedAt: string | null;
657
+ translations: Array<string>;
658
+ pronunciation: string | null;
659
+ tags: Array<string>;
660
+ summary: string | null;
661
+ parent: {
662
+ id: string | null;
663
+ name: string;
664
+ } | null;
665
+ related: Array<{
666
+ id: string | null;
667
+ name: string;
668
+ }>;
669
+ fields: Array<{
670
+ id: string;
671
+ title: string;
672
+ type: string;
673
+ private: boolean;
674
+ text: string | null;
675
+ }>;
676
+ };
677
+ };
678
+ export type LuTranslateEncyclopediaEntryMutationVariables = Exact<{
679
+ input: AuthorEncyclopediaEntryTranslationInput;
680
+ }>;
681
+ export type LuTranslateEncyclopediaEntryMutation = {
682
+ result: {
683
+ id: string;
684
+ universeId: string;
685
+ name: string;
686
+ categoryId: string;
687
+ categoryTitle: string | null;
688
+ language: string;
689
+ wip: boolean;
690
+ publishedAt: string | null;
691
+ updatedAt: string | null;
692
+ translations: Array<string>;
693
+ pronunciation: string | null;
694
+ tags: Array<string>;
695
+ summary: string | null;
696
+ parent: {
697
+ id: string | null;
698
+ name: string;
699
+ } | null;
700
+ related: Array<{
701
+ id: string | null;
702
+ name: string;
703
+ }>;
704
+ fields: Array<{
705
+ id: string;
706
+ title: string;
707
+ type: string;
708
+ private: boolean;
709
+ text: string | null;
710
+ }>;
711
+ };
712
+ };
713
+ export type LuSetEncyclopediaEntryPublicationMutationVariables = Exact<{
714
+ id: string | number;
715
+ published: boolean;
716
+ }>;
717
+ export type LuSetEncyclopediaEntryPublicationMutation = {
718
+ result: {
719
+ id: string;
720
+ universeId: string;
721
+ name: string;
722
+ categoryId: string;
723
+ categoryTitle: string | null;
724
+ language: string;
725
+ wip: boolean;
726
+ publishedAt: string | null;
727
+ updatedAt: string | null;
728
+ translations: Array<string>;
729
+ pronunciation: string | null;
730
+ tags: Array<string>;
731
+ summary: string | null;
732
+ parent: {
733
+ id: string | null;
734
+ name: string;
735
+ } | null;
736
+ related: Array<{
737
+ id: string | null;
738
+ name: string;
739
+ }>;
740
+ fields: Array<{
741
+ id: string;
742
+ title: string;
743
+ type: string;
744
+ private: boolean;
745
+ text: string | null;
746
+ }>;
747
+ };
748
+ };
749
+ export type LuDeleteEncyclopediaEntryMutationVariables = Exact<{
750
+ id: string | number;
751
+ }>;
752
+ export type LuDeleteEncyclopediaEntryMutation = {
753
+ result: {
754
+ id: string;
755
+ universeId: string;
756
+ };
757
+ };
758
+ export type LuSeriesQueryVariables = Exact<{
759
+ universeId: string | number;
760
+ }>;
761
+ export type LuSeriesQuery = {
762
+ result: Array<{
763
+ id: string;
764
+ universeId: string;
765
+ title: string;
766
+ version: number;
767
+ storyIds: Array<string>;
768
+ updatedAt: string | null;
769
+ }>;
770
+ };
771
+ export type LuSaveSeriesMutationVariables = Exact<{
772
+ input: AuthorSeriesSaveInput;
773
+ }>;
774
+ export type LuSaveSeriesMutation = {
775
+ result: {
776
+ id: string;
777
+ universeId: string;
778
+ title: string;
779
+ version: number;
780
+ storyIds: Array<string>;
781
+ updatedAt: string | null;
782
+ };
783
+ };
355
784
  export type LuImagePolicyQueryVariables = Exact<{
356
785
  [key: string]: never;
357
786
  }>;
@@ -373,5 +802,20 @@ export declare const LuCreateChapterDocument: "mutation LuCreateChapter($input:
373
802
  export declare const LuPublishChapterDocument: "mutation LuPublishChapter($input: AuthorChapterPublishInput!) {\n result: authorPublishChapter(input: $input) {\n id\n storyId\n language\n revisionId\n version\n audience\n publishedAt\n chapterPublishedAt\n warnings {\n code\n path\n message\n }\n }\n}";
374
803
  export declare const LuCreateUniverseTranslationDocument: "mutation LuCreateUniverseTranslation($universeId: ID!, $language: Locale!, $input: AuthorUniverseTranslationInput) {\n result: createAuthorUniverseTranslation(\n universeId: $universeId\n language: $language\n input: $input\n ) {\n created\n translation {\n language\n title\n description\n revision\n }\n }\n}";
375
804
  export declare const LuUpdateUniverseTranslationDocument: "mutation LuUpdateUniverseTranslation($universeId: ID!, $language: Locale!, $expectedRevision: Int!, $input: AuthorUniverseTranslationInput!) {\n result: updateAuthorUniverseTranslation(\n universeId: $universeId\n language: $language\n expectedRevision: $expectedRevision\n input: $input\n ) {\n language\n title\n description\n revision\n }\n}";
805
+ export declare const LuUpdateStoryDocument: "mutation LuUpdateStory($storyId: ID!, $input: AuthorStoryUpdateInput!) {\n result: updateAuthorStory(storyId: $storyId, input: $input) {\n id\n title\n slug\n language\n universeId\n organizationId\n createdAt\n updatedAt\n publishedAt\n privateAt\n state\n }\n}";
806
+ export declare const LuSetStoryVisibilityDocument: "mutation LuSetStoryVisibility($storyId: ID!, $visibility: AuthorStoryVisibility!) {\n result: setAuthorStoryVisibility(storyId: $storyId, visibility: $visibility) {\n id\n title\n slug\n language\n universeId\n organizationId\n createdAt\n updatedAt\n publishedAt\n privateAt\n state\n }\n}";
807
+ export declare const LuRenameChapterDocument: "mutation LuRenameChapter($input: AuthorChapterRenameInput!) {\n result: renameAuthorChapter(input: $input) {\n id\n storyId\n sequence\n title\n language\n hasDraft\n updatedAt\n publishedAt\n }\n}";
808
+ export declare const LuRemoveChapterDocument: "mutation LuRemoveChapter($input: AuthorChapterRemoveInput!) {\n result: removeAuthorChapter(input: $input) {\n id\n storyId\n }\n}";
809
+ export declare const LuReorderChaptersDocument: "mutation LuReorderChapters($input: AuthorChapterReorderInput!) {\n result: reorderAuthorChapters(input: $input) {\n storyId\n chapterIds\n }\n}";
810
+ export declare const LuUpdateUniverseDocument: "mutation LuUpdateUniverse($universeId: ID!, $input: AuthorUniverseUpdateInput!) {\n result: updateAuthorUniverse(universeId: $universeId, input: $input) {\n id\n title\n slug\n language\n organizationId\n createdAt\n updatedAt\n publishedAt\n privateAt\n state\n }\n}";
811
+ export declare const LuEncyclopediaEntriesDocument: "query LuEncyclopediaEntries($universeId: ID!, $first: Int, $after: String) {\n result: authorEncyclopediaEntries(\n universeId: $universeId\n first: $first\n after: $after\n ) {\n nodes {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}";
812
+ export declare const LuEncyclopediaEntryDocument: "query LuEncyclopediaEntry($id: ID!, $language: Locale) {\n result: authorEncyclopediaEntry(id: $id, language: $language) {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n pronunciation\n tags\n summary\n parent {\n id\n name\n }\n related {\n id\n name\n }\n fields {\n id\n title\n type\n private\n text\n }\n }\n}";
813
+ export declare const LuCreateEncyclopediaEntryDocument: "mutation LuCreateEncyclopediaEntry($input: AuthorEncyclopediaEntryCreateInput!) {\n result: createAuthorEncyclopediaEntry(input: $input) {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n pronunciation\n tags\n summary\n parent {\n id\n name\n }\n related {\n id\n name\n }\n fields {\n id\n title\n type\n private\n text\n }\n }\n}";
814
+ export declare const LuUpdateEncyclopediaEntryDocument: "mutation LuUpdateEncyclopediaEntry($id: ID!, $changes: AuthorEncyclopediaEntryChangesInput!) {\n result: updateAuthorEncyclopediaEntry(id: $id, changes: $changes) {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n pronunciation\n tags\n summary\n parent {\n id\n name\n }\n related {\n id\n name\n }\n fields {\n id\n title\n type\n private\n text\n }\n }\n}";
815
+ export declare const LuTranslateEncyclopediaEntryDocument: "mutation LuTranslateEncyclopediaEntry($input: AuthorEncyclopediaEntryTranslationInput!) {\n result: translateAuthorEncyclopediaEntry(input: $input) {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n pronunciation\n tags\n summary\n parent {\n id\n name\n }\n related {\n id\n name\n }\n fields {\n id\n title\n type\n private\n text\n }\n }\n}";
816
+ export declare const LuSetEncyclopediaEntryPublicationDocument: "mutation LuSetEncyclopediaEntryPublication($id: ID!, $published: Boolean!) {\n result: setAuthorEncyclopediaEntryPublication(id: $id, published: $published) {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n pronunciation\n tags\n summary\n parent {\n id\n name\n }\n related {\n id\n name\n }\n fields {\n id\n title\n type\n private\n text\n }\n }\n}";
817
+ export declare const LuDeleteEncyclopediaEntryDocument: "mutation LuDeleteEncyclopediaEntry($id: ID!) {\n result: deleteAuthorEncyclopediaEntry(id: $id) {\n id\n universeId\n }\n}";
818
+ export declare const LuSeriesDocument: "query LuSeries($universeId: ID!) {\n result: authorSeries(universeId: $universeId) {\n id\n universeId\n title\n version\n storyIds\n updatedAt\n }\n}";
819
+ export declare const LuSaveSeriesDocument: "mutation LuSaveSeries($input: AuthorSeriesSaveInput!) {\n result: saveAuthorSeries(input: $input) {\n id\n universeId\n title\n version\n storyIds\n updatedAt\n }\n}";
376
820
  export declare const LuImagePolicyDocument: "query LuImagePolicy {\n result: authorImagePolicy\n}";
377
821
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LuImagePolicyDocument = exports.LuUpdateUniverseTranslationDocument = exports.LuCreateUniverseTranslationDocument = exports.LuPublishChapterDocument = exports.LuCreateChapterDocument = exports.LuDraftRecoveryDocument = exports.LuValidateDraftDocument = exports.LuSaveDraftDocument = exports.LuDraftDocument = exports.LuChaptersDocument = exports.LuUniverseDocument = exports.LuUniversesDocument = exports.LuStoryDocument = exports.LuStoriesDocument = exports.LuProfileDocument = exports.LuIdentityDocument = void 0;
3
+ exports.LuImagePolicyDocument = exports.LuSaveSeriesDocument = exports.LuSeriesDocument = exports.LuDeleteEncyclopediaEntryDocument = exports.LuSetEncyclopediaEntryPublicationDocument = exports.LuTranslateEncyclopediaEntryDocument = exports.LuUpdateEncyclopediaEntryDocument = exports.LuCreateEncyclopediaEntryDocument = exports.LuEncyclopediaEntryDocument = exports.LuEncyclopediaEntriesDocument = exports.LuUpdateUniverseDocument = exports.LuReorderChaptersDocument = exports.LuRemoveChapterDocument = exports.LuRenameChapterDocument = exports.LuSetStoryVisibilityDocument = exports.LuUpdateStoryDocument = exports.LuUpdateUniverseTranslationDocument = exports.LuCreateUniverseTranslationDocument = exports.LuPublishChapterDocument = exports.LuCreateChapterDocument = exports.LuDraftRecoveryDocument = exports.LuValidateDraftDocument = exports.LuSaveDraftDocument = exports.LuDraftDocument = exports.LuChaptersDocument = exports.LuUniverseDocument = exports.LuUniversesDocument = exports.LuStoryDocument = exports.LuStoriesDocument = exports.LuProfileDocument = exports.LuIdentityDocument = void 0;
4
4
  exports.LuIdentityDocument = "query LuIdentity {\n result: apiIdentity {\n version\n kind\n userId\n organizationId\n credentialId\n scopes\n expiresAt\n resourceRestrictions {\n universeIds\n storyIds\n }\n deploymentUrl\n environment\n limits {\n defaultPageSize\n maxPageSize\n maxRequestBytes\n maxDraftBytes\n maxResponseBytes\n }\n }\n}";
5
5
  exports.LuProfileDocument = "query LuProfile {\n result: apiIdentity {\n userId\n username\n }\n}";
6
6
  exports.LuStoriesDocument = "query LuStories($first: Int, $after: String) {\n result: authorStories(first: $first, after: $after) {\n nodes {\n id\n title\n slug\n language\n universeId\n organizationId\n createdAt\n updatedAt\n publishedAt\n privateAt\n state\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}";
@@ -16,4 +16,19 @@ exports.LuCreateChapterDocument = "mutation LuCreateChapter($input: AuthorChapte
16
16
  exports.LuPublishChapterDocument = "mutation LuPublishChapter($input: AuthorChapterPublishInput!) {\n result: authorPublishChapter(input: $input) {\n id\n storyId\n language\n revisionId\n version\n audience\n publishedAt\n chapterPublishedAt\n warnings {\n code\n path\n message\n }\n }\n}";
17
17
  exports.LuCreateUniverseTranslationDocument = "mutation LuCreateUniverseTranslation($universeId: ID!, $language: Locale!, $input: AuthorUniverseTranslationInput) {\n result: createAuthorUniverseTranslation(\n universeId: $universeId\n language: $language\n input: $input\n ) {\n created\n translation {\n language\n title\n description\n revision\n }\n }\n}";
18
18
  exports.LuUpdateUniverseTranslationDocument = "mutation LuUpdateUniverseTranslation($universeId: ID!, $language: Locale!, $expectedRevision: Int!, $input: AuthorUniverseTranslationInput!) {\n result: updateAuthorUniverseTranslation(\n universeId: $universeId\n language: $language\n expectedRevision: $expectedRevision\n input: $input\n ) {\n language\n title\n description\n revision\n }\n}";
19
+ exports.LuUpdateStoryDocument = "mutation LuUpdateStory($storyId: ID!, $input: AuthorStoryUpdateInput!) {\n result: updateAuthorStory(storyId: $storyId, input: $input) {\n id\n title\n slug\n language\n universeId\n organizationId\n createdAt\n updatedAt\n publishedAt\n privateAt\n state\n }\n}";
20
+ exports.LuSetStoryVisibilityDocument = "mutation LuSetStoryVisibility($storyId: ID!, $visibility: AuthorStoryVisibility!) {\n result: setAuthorStoryVisibility(storyId: $storyId, visibility: $visibility) {\n id\n title\n slug\n language\n universeId\n organizationId\n createdAt\n updatedAt\n publishedAt\n privateAt\n state\n }\n}";
21
+ exports.LuRenameChapterDocument = "mutation LuRenameChapter($input: AuthorChapterRenameInput!) {\n result: renameAuthorChapter(input: $input) {\n id\n storyId\n sequence\n title\n language\n hasDraft\n updatedAt\n publishedAt\n }\n}";
22
+ exports.LuRemoveChapterDocument = "mutation LuRemoveChapter($input: AuthorChapterRemoveInput!) {\n result: removeAuthorChapter(input: $input) {\n id\n storyId\n }\n}";
23
+ exports.LuReorderChaptersDocument = "mutation LuReorderChapters($input: AuthorChapterReorderInput!) {\n result: reorderAuthorChapters(input: $input) {\n storyId\n chapterIds\n }\n}";
24
+ exports.LuUpdateUniverseDocument = "mutation LuUpdateUniverse($universeId: ID!, $input: AuthorUniverseUpdateInput!) {\n result: updateAuthorUniverse(universeId: $universeId, input: $input) {\n id\n title\n slug\n language\n organizationId\n createdAt\n updatedAt\n publishedAt\n privateAt\n state\n }\n}";
25
+ exports.LuEncyclopediaEntriesDocument = "query LuEncyclopediaEntries($universeId: ID!, $first: Int, $after: String) {\n result: authorEncyclopediaEntries(\n universeId: $universeId\n first: $first\n after: $after\n ) {\n nodes {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}";
26
+ exports.LuEncyclopediaEntryDocument = "query LuEncyclopediaEntry($id: ID!, $language: Locale) {\n result: authorEncyclopediaEntry(id: $id, language: $language) {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n pronunciation\n tags\n summary\n parent {\n id\n name\n }\n related {\n id\n name\n }\n fields {\n id\n title\n type\n private\n text\n }\n }\n}";
27
+ exports.LuCreateEncyclopediaEntryDocument = "mutation LuCreateEncyclopediaEntry($input: AuthorEncyclopediaEntryCreateInput!) {\n result: createAuthorEncyclopediaEntry(input: $input) {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n pronunciation\n tags\n summary\n parent {\n id\n name\n }\n related {\n id\n name\n }\n fields {\n id\n title\n type\n private\n text\n }\n }\n}";
28
+ exports.LuUpdateEncyclopediaEntryDocument = "mutation LuUpdateEncyclopediaEntry($id: ID!, $changes: AuthorEncyclopediaEntryChangesInput!) {\n result: updateAuthorEncyclopediaEntry(id: $id, changes: $changes) {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n pronunciation\n tags\n summary\n parent {\n id\n name\n }\n related {\n id\n name\n }\n fields {\n id\n title\n type\n private\n text\n }\n }\n}";
29
+ exports.LuTranslateEncyclopediaEntryDocument = "mutation LuTranslateEncyclopediaEntry($input: AuthorEncyclopediaEntryTranslationInput!) {\n result: translateAuthorEncyclopediaEntry(input: $input) {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n pronunciation\n tags\n summary\n parent {\n id\n name\n }\n related {\n id\n name\n }\n fields {\n id\n title\n type\n private\n text\n }\n }\n}";
30
+ exports.LuSetEncyclopediaEntryPublicationDocument = "mutation LuSetEncyclopediaEntryPublication($id: ID!, $published: Boolean!) {\n result: setAuthorEncyclopediaEntryPublication(id: $id, published: $published) {\n id\n universeId\n name\n categoryId\n categoryTitle\n language\n wip\n publishedAt\n updatedAt\n translations\n pronunciation\n tags\n summary\n parent {\n id\n name\n }\n related {\n id\n name\n }\n fields {\n id\n title\n type\n private\n text\n }\n }\n}";
31
+ exports.LuDeleteEncyclopediaEntryDocument = "mutation LuDeleteEncyclopediaEntry($id: ID!) {\n result: deleteAuthorEncyclopediaEntry(id: $id) {\n id\n universeId\n }\n}";
32
+ exports.LuSeriesDocument = "query LuSeries($universeId: ID!) {\n result: authorSeries(universeId: $universeId) {\n id\n universeId\n title\n version\n storyIds\n updatedAt\n }\n}";
33
+ exports.LuSaveSeriesDocument = "mutation LuSaveSeries($input: AuthorSeriesSaveInput!) {\n result: saveAuthorSeries(input: $input) {\n id\n universeId\n title\n version\n storyIds\n updatedAt\n }\n}";
19
34
  exports.LuImagePolicyDocument = "query LuImagePolicy {\n result: authorImagePolicy\n}";