@literary-universe/sdk 0.3.0 → 0.3.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.
package/README.md CHANGED
@@ -483,3 +483,35 @@ schema and the four MCP annotations; results carry `structuredContent` and a
483
483
  text form; API errors come back as `isError` text `CODE: message (request id)`,
484
484
  with the input schema appended for BAD_USER_INPUT. Resources `lu://story/{id}`
485
485
  and `lu://chapter/{id}/draft` return the same data as the tools.
486
+
487
+ ## Blog pages and menus
488
+
489
+ `client.blogPages({blogId, first?, after?})` lists private pages, including drafts
490
+ and translations, sorted by ID. Use the last returned ID as `after` and stop on a
491
+ short or empty batch. `client.blogMenus({blogId})` returns the three stored menu
492
+ locations. Both return documents with `id`, opaque `version`, and JSON `data`.
493
+ They require `blog:read` and management access to that blog.
494
+
495
+ `client.mutateBlog(input)` requires `blog:write`. Its `action` is `savePage`,
496
+ `translatePage`, `publishPage`, `saveMenu` or `translateMenu`. Supply `blogId`,
497
+ `operationId` and `expectedVersion` on every request. Use null for a new page or
498
+ menu and the latest returned version for edits. Keep the full request unchanged
499
+ when retrying a lost response; the SDK preserves it on transport retries.
500
+ Organization keys may manage only their own enabled organization blog. Restricted
501
+ story/universe keys cannot access blogs. The deployment's author write rollout
502
+ must also permit writes.
503
+
504
+ ```ts
505
+ const page = await client.mutateBlog({
506
+ blogId: 'BLOG_ID', action: 'savePage', operationId: 'author-page-1',
507
+ expectedVersion: null, page: {title: 'Author', slug: 'author', language: 'en'},
508
+ })
509
+ await client.mutateBlog({
510
+ blogId: 'BLOG_ID', action: 'publishPage', pageId: page.id,
511
+ operationId: 'author-publish-1', expectedVersion: page.version, published: true,
512
+ })
513
+ ```
514
+
515
+ Edits to published pages and saved menus are live immediately. A stale version
516
+ fails with `VERSION_CONFLICT`; read again and review the changes. System pages,
517
+ deletions, unpublishing and homepage changes remain web-editor actions.
@@ -144,6 +144,20 @@ export type AuthorStoryUpdateInput = {
144
144
  /** Another universe needs edit rights on it; null makes the story standalone. */
145
145
  universeId?: string | number | null | undefined;
146
146
  };
147
+ export type AuthorBlogMutationInput = {
148
+ blogId: string | number;
149
+ operationId: string;
150
+ expectedVersion?: string | null | undefined;
151
+ action: string;
152
+ pageId?: string | number | null | undefined;
153
+ location?: string | null | undefined;
154
+ language?: string | null | undefined;
155
+ page?: JsonValue | null | undefined;
156
+ published?: boolean | null | undefined;
157
+ items?: Array<JsonValue> | null | undefined;
158
+ settings?: JsonValue | null | undefined;
159
+ entries?: JsonValue | null | undefined;
160
+ };
147
161
  export type LuIdentityQueryVariables = Exact<{
148
162
  [key: string]: never;
149
163
  }>;
@@ -791,6 +805,38 @@ export type LuImagePolicyQueryVariables = Exact<{
791
805
  export type LuImagePolicyQuery = {
792
806
  result: JsonValue;
793
807
  };
808
+ export type LuBlogPagesQueryVariables = Exact<{
809
+ blogId: string | number;
810
+ first?: number | null | undefined;
811
+ after?: string | number | null | undefined;
812
+ }>;
813
+ export type LuBlogPagesQuery = {
814
+ result: Array<{
815
+ id: string;
816
+ version: string;
817
+ data: JsonValue;
818
+ }>;
819
+ };
820
+ export type LuBlogMenusQueryVariables = Exact<{
821
+ blogId: string | number;
822
+ }>;
823
+ export type LuBlogMenusQuery = {
824
+ result: Array<{
825
+ id: string;
826
+ version: string;
827
+ data: JsonValue;
828
+ }>;
829
+ };
830
+ export type LuMutateBlogMutationVariables = Exact<{
831
+ input: AuthorBlogMutationInput;
832
+ }>;
833
+ export type LuMutateBlogMutation = {
834
+ result: {
835
+ id: string;
836
+ version: string;
837
+ data: JsonValue;
838
+ };
839
+ };
794
840
  export declare const 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}";
795
841
  export declare const LuProfileDocument: "query LuProfile {\n result: apiIdentity {\n userId\n username\n }\n}";
796
842
  export declare const 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}";
@@ -822,4 +868,7 @@ export declare const LuDeleteEncyclopediaEntryDocument: "mutation LuDeleteEncycl
822
868
  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}";
823
869
  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}";
824
870
  export declare const LuImagePolicyDocument: "query LuImagePolicy {\n result: authorImagePolicy\n}";
871
+ export declare const LuBlogPagesDocument: "query LuBlogPages($blogId: ID!, $first: Int, $after: ID) {\n result: authorBlogPages(blogId: $blogId, first: $first, after: $after) {\n id\n version\n data\n }\n}";
872
+ export declare const LuBlogMenusDocument: "query LuBlogMenus($blogId: ID!) {\n result: authorBlogMenus(blogId: $blogId) {\n id\n version\n data\n }\n}";
873
+ export declare const LuMutateBlogDocument: "mutation LuMutateBlog($input: AuthorBlogMutationInput!) {\n result: mutateAuthorBlog(input: $input) {\n id\n version\n data\n }\n}";
825
874
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.LuMutateBlogDocument = exports.LuBlogMenusDocument = exports.LuBlogPagesDocument = 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}";
@@ -32,3 +32,6 @@ exports.LuDeleteEncyclopediaEntryDocument = "mutation LuDeleteEncyclopediaEntry(
32
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
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}";
34
34
  exports.LuImagePolicyDocument = "query LuImagePolicy {\n result: authorImagePolicy\n}";
35
+ exports.LuBlogPagesDocument = "query LuBlogPages($blogId: ID!, $first: Int, $after: ID) {\n result: authorBlogPages(blogId: $blogId, first: $first, after: $after) {\n id\n version\n data\n }\n}";
36
+ exports.LuBlogMenusDocument = "query LuBlogMenus($blogId: ID!) {\n result: authorBlogMenus(blogId: $blogId) {\n id\n version\n data\n }\n}";
37
+ exports.LuMutateBlogDocument = "mutation LuMutateBlog($input: AuthorBlogMutationInput!) {\n result: mutateAuthorBlog(input: $input) {\n id\n version\n data\n }\n}";
@@ -1,4 +1,4 @@
1
- import { type AuthorChapterCreateInput, type AuthorChapterPublishInput, type AuthorChapterRemoveInput, type AuthorChapterRenameInput, type AuthorChapterReorderInput, type AuthorDraftSaveInput, type AuthorEncyclopediaEntryCreateInput, type AuthorEncyclopediaEntryTranslationInput, type AuthorSeriesSaveInput, type LuChaptersQueryVariables, type LuCreateUniverseTranslationMutationVariables, type LuDeleteEncyclopediaEntryMutationVariables, type LuDraftQueryVariables, type LuDraftRecoveryQueryVariables, type LuEncyclopediaEntriesQueryVariables, type LuEncyclopediaEntryQueryVariables, type LuSeriesQueryVariables, type LuSetEncyclopediaEntryPublicationMutationVariables, type LuSetStoryVisibilityMutationVariables, type LuStoriesQueryVariables, type LuStoryQueryVariables, type LuUniverseQueryVariables, type LuUniversesQueryVariables, type LuUpdateEncyclopediaEntryMutationVariables, type LuUpdateStoryMutationVariables, type LuUpdateUniverseMutationVariables, type LuUpdateUniverseTranslationMutationVariables } from './generated.js';
1
+ import { type AuthorBlogMutationInput, type AuthorChapterCreateInput, type AuthorChapterPublishInput, type AuthorChapterRemoveInput, type AuthorChapterRenameInput, type AuthorChapterReorderInput, type AuthorDraftSaveInput, type AuthorEncyclopediaEntryCreateInput, type AuthorEncyclopediaEntryTranslationInput, type AuthorSeriesSaveInput, type LuBlogMenusQueryVariables, type LuBlogPagesQueryVariables, type LuChaptersQueryVariables, type LuCreateUniverseTranslationMutationVariables, type LuDeleteEncyclopediaEntryMutationVariables, type LuDraftQueryVariables, type LuDraftRecoveryQueryVariables, type LuEncyclopediaEntriesQueryVariables, type LuEncyclopediaEntryQueryVariables, type LuSeriesQueryVariables, type LuSetEncyclopediaEntryPublicationMutationVariables, type LuSetStoryVisibilityMutationVariables, type LuStoriesQueryVariables, type LuStoryQueryVariables, type LuUniverseQueryVariables, type LuUniversesQueryVariables, type LuUpdateEncyclopediaEntryMutationVariables, type LuUpdateStoryMutationVariables, type LuUpdateUniverseMutationVariables, type LuUpdateUniverseTranslationMutationVariables } from './generated.js';
2
2
  export type * from './generated.js';
3
3
  export type { JsonValue } from './json.js';
4
4
  import type { ImagePolicy, ImagePurpose } from './imagePolicy.js';
@@ -493,6 +493,21 @@ export declare class LiteraryUniverseClient {
493
493
  counters: import("./json.js").JsonValue | null;
494
494
  };
495
495
  }>;
496
+ blogPages(input: LuBlogPagesQueryVariables, options?: RequestOptions): Promise<{
497
+ id: string;
498
+ version: string;
499
+ data: import("./json.js").JsonValue;
500
+ }[]>;
501
+ blogMenus(input: LuBlogMenusQueryVariables, options?: RequestOptions): Promise<{
502
+ id: string;
503
+ version: string;
504
+ data: import("./json.js").JsonValue;
505
+ }[]>;
506
+ mutateBlog(input: AuthorBlogMutationInput, options?: RequestOptions): Promise<{
507
+ id: string;
508
+ version: string;
509
+ data: import("./json.js").JsonValue;
510
+ }>;
496
511
  createChapter(input: AuthorChapterCreateInput, options?: RequestOptions): Promise<{
497
512
  id: string;
498
513
  storyId: string;
package/dist/cjs/index.js CHANGED
@@ -169,6 +169,15 @@ class LiteraryUniverseClient {
169
169
  saveDraft(input, options) {
170
170
  return this.read(generated_js_1.LuSaveDraftDocument, 'LuSaveDraft', { input }, options);
171
171
  }
172
+ blogPages(input, options) {
173
+ return this.read(generated_js_1.LuBlogPagesDocument, 'LuBlogPages', input, options);
174
+ }
175
+ blogMenus(input, options) {
176
+ return this.read(generated_js_1.LuBlogMenusDocument, 'LuBlogMenus', input, options);
177
+ }
178
+ mutateBlog(input, options) {
179
+ return this.read(generated_js_1.LuMutateBlogDocument, 'LuMutateBlog', { input }, options);
180
+ }
172
181
  createChapter(input, options) {
173
182
  return this.read(generated_js_1.LuCreateChapterDocument, 'LuCreateChapter', { input }, options);
174
183
  }
@@ -144,6 +144,20 @@ export type AuthorStoryUpdateInput = {
144
144
  /** Another universe needs edit rights on it; null makes the story standalone. */
145
145
  universeId?: string | number | null | undefined;
146
146
  };
147
+ export type AuthorBlogMutationInput = {
148
+ blogId: string | number;
149
+ operationId: string;
150
+ expectedVersion?: string | null | undefined;
151
+ action: string;
152
+ pageId?: string | number | null | undefined;
153
+ location?: string | null | undefined;
154
+ language?: string | null | undefined;
155
+ page?: JsonValue | null | undefined;
156
+ published?: boolean | null | undefined;
157
+ items?: Array<JsonValue> | null | undefined;
158
+ settings?: JsonValue | null | undefined;
159
+ entries?: JsonValue | null | undefined;
160
+ };
147
161
  export type LuIdentityQueryVariables = Exact<{
148
162
  [key: string]: never;
149
163
  }>;
@@ -791,6 +805,38 @@ export type LuImagePolicyQueryVariables = Exact<{
791
805
  export type LuImagePolicyQuery = {
792
806
  result: JsonValue;
793
807
  };
808
+ export type LuBlogPagesQueryVariables = Exact<{
809
+ blogId: string | number;
810
+ first?: number | null | undefined;
811
+ after?: string | number | null | undefined;
812
+ }>;
813
+ export type LuBlogPagesQuery = {
814
+ result: Array<{
815
+ id: string;
816
+ version: string;
817
+ data: JsonValue;
818
+ }>;
819
+ };
820
+ export type LuBlogMenusQueryVariables = Exact<{
821
+ blogId: string | number;
822
+ }>;
823
+ export type LuBlogMenusQuery = {
824
+ result: Array<{
825
+ id: string;
826
+ version: string;
827
+ data: JsonValue;
828
+ }>;
829
+ };
830
+ export type LuMutateBlogMutationVariables = Exact<{
831
+ input: AuthorBlogMutationInput;
832
+ }>;
833
+ export type LuMutateBlogMutation = {
834
+ result: {
835
+ id: string;
836
+ version: string;
837
+ data: JsonValue;
838
+ };
839
+ };
794
840
  export declare const 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}";
795
841
  export declare const LuProfileDocument: "query LuProfile {\n result: apiIdentity {\n userId\n username\n }\n}";
796
842
  export declare const 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}";
@@ -822,4 +868,7 @@ export declare const LuDeleteEncyclopediaEntryDocument: "mutation LuDeleteEncycl
822
868
  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}";
823
869
  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}";
824
870
  export declare const LuImagePolicyDocument: "query LuImagePolicy {\n result: authorImagePolicy\n}";
871
+ export declare const LuBlogPagesDocument: "query LuBlogPages($blogId: ID!, $first: Int, $after: ID) {\n result: authorBlogPages(blogId: $blogId, first: $first, after: $after) {\n id\n version\n data\n }\n}";
872
+ export declare const LuBlogMenusDocument: "query LuBlogMenus($blogId: ID!) {\n result: authorBlogMenus(blogId: $blogId) {\n id\n version\n data\n }\n}";
873
+ export declare const LuMutateBlogDocument: "mutation LuMutateBlog($input: AuthorBlogMutationInput!) {\n result: mutateAuthorBlog(input: $input) {\n id\n version\n data\n }\n}";
825
874
  export {};
@@ -29,3 +29,6 @@ export const LuDeleteEncyclopediaEntryDocument = "mutation LuDeleteEncyclopediaE
29
29
  export 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}";
30
30
  export 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}";
31
31
  export const LuImagePolicyDocument = "query LuImagePolicy {\n result: authorImagePolicy\n}";
32
+ export const LuBlogPagesDocument = "query LuBlogPages($blogId: ID!, $first: Int, $after: ID) {\n result: authorBlogPages(blogId: $blogId, first: $first, after: $after) {\n id\n version\n data\n }\n}";
33
+ export const LuBlogMenusDocument = "query LuBlogMenus($blogId: ID!) {\n result: authorBlogMenus(blogId: $blogId) {\n id\n version\n data\n }\n}";
34
+ export const LuMutateBlogDocument = "mutation LuMutateBlog($input: AuthorBlogMutationInput!) {\n result: mutateAuthorBlog(input: $input) {\n id\n version\n data\n }\n}";
@@ -1,4 +1,4 @@
1
- import { type AuthorChapterCreateInput, type AuthorChapterPublishInput, type AuthorChapterRemoveInput, type AuthorChapterRenameInput, type AuthorChapterReorderInput, type AuthorDraftSaveInput, type AuthorEncyclopediaEntryCreateInput, type AuthorEncyclopediaEntryTranslationInput, type AuthorSeriesSaveInput, type LuChaptersQueryVariables, type LuCreateUniverseTranslationMutationVariables, type LuDeleteEncyclopediaEntryMutationVariables, type LuDraftQueryVariables, type LuDraftRecoveryQueryVariables, type LuEncyclopediaEntriesQueryVariables, type LuEncyclopediaEntryQueryVariables, type LuSeriesQueryVariables, type LuSetEncyclopediaEntryPublicationMutationVariables, type LuSetStoryVisibilityMutationVariables, type LuStoriesQueryVariables, type LuStoryQueryVariables, type LuUniverseQueryVariables, type LuUniversesQueryVariables, type LuUpdateEncyclopediaEntryMutationVariables, type LuUpdateStoryMutationVariables, type LuUpdateUniverseMutationVariables, type LuUpdateUniverseTranslationMutationVariables } from './generated.js';
1
+ import { type AuthorBlogMutationInput, type AuthorChapterCreateInput, type AuthorChapterPublishInput, type AuthorChapterRemoveInput, type AuthorChapterRenameInput, type AuthorChapterReorderInput, type AuthorDraftSaveInput, type AuthorEncyclopediaEntryCreateInput, type AuthorEncyclopediaEntryTranslationInput, type AuthorSeriesSaveInput, type LuBlogMenusQueryVariables, type LuBlogPagesQueryVariables, type LuChaptersQueryVariables, type LuCreateUniverseTranslationMutationVariables, type LuDeleteEncyclopediaEntryMutationVariables, type LuDraftQueryVariables, type LuDraftRecoveryQueryVariables, type LuEncyclopediaEntriesQueryVariables, type LuEncyclopediaEntryQueryVariables, type LuSeriesQueryVariables, type LuSetEncyclopediaEntryPublicationMutationVariables, type LuSetStoryVisibilityMutationVariables, type LuStoriesQueryVariables, type LuStoryQueryVariables, type LuUniverseQueryVariables, type LuUniversesQueryVariables, type LuUpdateEncyclopediaEntryMutationVariables, type LuUpdateStoryMutationVariables, type LuUpdateUniverseMutationVariables, type LuUpdateUniverseTranslationMutationVariables } from './generated.js';
2
2
  export type * from './generated.js';
3
3
  export type { JsonValue } from './json.js';
4
4
  import type { ImagePolicy, ImagePurpose } from './imagePolicy.js';
@@ -493,6 +493,21 @@ export declare class LiteraryUniverseClient {
493
493
  counters: import("./json.js").JsonValue | null;
494
494
  };
495
495
  }>;
496
+ blogPages(input: LuBlogPagesQueryVariables, options?: RequestOptions): Promise<{
497
+ id: string;
498
+ version: string;
499
+ data: import("./json.js").JsonValue;
500
+ }[]>;
501
+ blogMenus(input: LuBlogMenusQueryVariables, options?: RequestOptions): Promise<{
502
+ id: string;
503
+ version: string;
504
+ data: import("./json.js").JsonValue;
505
+ }[]>;
506
+ mutateBlog(input: AuthorBlogMutationInput, options?: RequestOptions): Promise<{
507
+ id: string;
508
+ version: string;
509
+ data: import("./json.js").JsonValue;
510
+ }>;
496
511
  createChapter(input: AuthorChapterCreateInput, options?: RequestOptions): Promise<{
497
512
  id: string;
498
513
  storyId: string;
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { LuChaptersDocument, LuCreateChapterDocument, LuCreateEncyclopediaEntryDocument, LuCreateUniverseTranslationDocument, LuDeleteEncyclopediaEntryDocument, LuDraftDocument, LuDraftRecoveryDocument, LuEncyclopediaEntriesDocument, LuEncyclopediaEntryDocument, LuIdentityDocument, LuImagePolicyDocument, LuProfileDocument, LuPublishChapterDocument, LuRemoveChapterDocument, LuRenameChapterDocument, LuReorderChaptersDocument, LuSaveDraftDocument, LuSaveSeriesDocument, LuSeriesDocument, LuSetEncyclopediaEntryPublicationDocument, LuSetStoryVisibilityDocument, LuStoriesDocument, LuStoryDocument, LuTranslateEncyclopediaEntryDocument, LuUniverseDocument, LuUniversesDocument, LuUpdateEncyclopediaEntryDocument, LuUpdateStoryDocument, LuUpdateUniverseDocument, LuUpdateUniverseTranslationDocument, LuValidateDraftDocument, } from './generated.js';
1
+ import { LuBlogMenusDocument, LuBlogPagesDocument, LuChaptersDocument, LuCreateChapterDocument, LuCreateEncyclopediaEntryDocument, LuCreateUniverseTranslationDocument, LuDeleteEncyclopediaEntryDocument, LuDraftDocument, LuDraftRecoveryDocument, LuEncyclopediaEntriesDocument, LuEncyclopediaEntryDocument, LuIdentityDocument, LuImagePolicyDocument, LuMutateBlogDocument, LuProfileDocument, LuPublishChapterDocument, LuRemoveChapterDocument, LuRenameChapterDocument, LuReorderChaptersDocument, LuSaveDraftDocument, LuSaveSeriesDocument, LuSeriesDocument, LuSetEncyclopediaEntryPublicationDocument, LuSetStoryVisibilityDocument, LuStoriesDocument, LuStoryDocument, LuTranslateEncyclopediaEntryDocument, LuUniverseDocument, LuUniversesDocument, LuUpdateEncyclopediaEntryDocument, LuUpdateStoryDocument, LuUpdateUniverseDocument, LuUpdateUniverseTranslationDocument, LuValidateDraftDocument, } from './generated.js';
2
2
  export { IMAGE_POLICY, } from './imagePolicy.js';
3
3
  export class LiteraryUniverseApiError extends Error {
4
4
  code;
@@ -164,6 +164,15 @@ export class LiteraryUniverseClient {
164
164
  saveDraft(input, options) {
165
165
  return this.read(LuSaveDraftDocument, 'LuSaveDraft', { input }, options);
166
166
  }
167
+ blogPages(input, options) {
168
+ return this.read(LuBlogPagesDocument, 'LuBlogPages', input, options);
169
+ }
170
+ blogMenus(input, options) {
171
+ return this.read(LuBlogMenusDocument, 'LuBlogMenus', input, options);
172
+ }
173
+ mutateBlog(input, options) {
174
+ return this.read(LuMutateBlogDocument, 'LuMutateBlog', { input }, options);
175
+ }
167
176
  createChapter(input, options) {
168
177
  return this.read(LuCreateChapterDocument, 'LuCreateChapter', { input }, options);
169
178
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@literary-universe/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Literary Universe authoring API client for Node and Bun",
5
5
  "type": "module",
6
6
  "engines": {
package/schema.graphql CHANGED
@@ -79,6 +79,8 @@ type Query {
79
79
 
80
80
  """The saved series of a universe."""
81
81
  authorSeries(universeId: ID!): [AuthorSeries!]!
82
+ authorBlogPages(blogId: ID!, first: Int = 25, after: ID): [AuthorBlogDocument!]!
83
+ authorBlogMenus(blogId: ID!): [AuthorBlogDocument!]!
82
84
  }
83
85
 
84
86
  enum AuthorWorkState {
@@ -269,6 +271,7 @@ type Mutation {
269
271
  credential cannot use, and FAILED_PRECONDITION for a rating under review.
270
272
  """
271
273
  updateAuthorStory(storyId: ID!, input: AuthorStoryUpdateInput!): AuthorStoryHeader!
274
+ mutateAuthorBlog(input: AuthorBlogMutationInput!): AuthorBlogDocument!
272
275
  }
273
276
 
274
277
  type AuthorChapterHeader {
@@ -608,6 +611,30 @@ input AuthorStoryUpdateInput {
608
611
  universeId: ID
609
612
  }
610
613
 
614
+ """
615
+ Private stored page/menu data including translations, plus an opaque concurrency token.
616
+ """
617
+ type AuthorBlogDocument {
618
+ id: ID!
619
+ version: String!
620
+ data: JSON!
621
+ }
622
+
623
+ input AuthorBlogMutationInput {
624
+ blogId: ID!
625
+ operationId: String!
626
+ expectedVersion: String
627
+ action: String!
628
+ pageId: ID
629
+ location: String
630
+ language: Locale
631
+ page: JSON
632
+ published: Boolean
633
+ items: [JSON!]
634
+ settings: JSON
635
+ entries: JSON
636
+ }
637
+
611
638
  scalar Date
612
639
 
613
640
  scalar DateTime