@literary-universe/sdk 0.3.0 → 0.3.2

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
@@ -243,11 +243,11 @@ The version covers the whole chapter, including its translations. A translation
243
243
  body save can therefore conflict with an original-language edit. Title-only and
244
244
  settings-only edits do not advance it.
245
245
 
246
- The initial write ceiling is 900,000 serialized UTF-8 bytes. In deployed builds,
247
- set server settings authorApi.draftWritesEnabled to true. Optional
248
- authorApi.allowedUserIds limits rollout to selected accounts. Development builds
249
- allow it by default; setting draftWritesEnabled false disables it there too.
250
- Production publication also requires authorApi.publicationEnabled to be true.
246
+ The write ceiling is 900,000 serialized UTF-8 bytes. Writing requires the key's
247
+ write scope and the author's current permissions on the resource. Organization
248
+ keys also require the organization's API feature and plan. Publication requires
249
+ `story:publish` and the work's publication permission. No deployment settings or
250
+ actor allowlist is required.
251
251
 
252
252
  ## Chapter lifecycle
253
253
 
@@ -417,7 +417,8 @@ decoders per server process. Body transfer has a twenty-second deadline; decodin
417
417
  has a killable ten-second deadline. Unavailable enforcement/storage fails closed.
418
418
  Transfer and intent leases renew while work is active; renewal calls are bounded
419
419
  to ten seconds and the final asset/result transaction to twenty-five seconds.
420
- Production uses the existing authorApi.draftWritesEnabled/allowedUserIds rollout.
420
+ Uploads require the purpose's write scope and current resource permissions.
421
+ Organization keys also require their organization's API feature and plan.
421
422
 
422
423
  Keep the prepared bytes and operation ID for retry. Changed input yields
423
424
  IDEMPOTENCY_CONFLICT; committed replay returns the original asset after current
@@ -431,7 +432,7 @@ collection. Storage remains public; protected comic/audio files use other contra
431
432
  For live image checks, configure an isolated local S3-compatible test endpoint in
432
433
  the test server's Backblaze settings, then run `node app/scripts/testApiImageContract.mjs` from the monorepo root with the same
433
434
  local _test database variables as test:integration. Real Backblaze verification
434
- remains a separate rollout check.
435
+ remains a separate integration check.
435
436
 
436
437
  Platform CI runs the package checks on Windows and macOS, including both Intel
437
438
  and Apple Silicon Macs. These checks cover extracted builds, packed consumers,
@@ -483,3 +484,35 @@ schema and the four MCP annotations; results carry `structuredContent` and a
483
484
  text form; API errors come back as `isError` text `CODE: message (request id)`,
484
485
  with the input schema appended for BAD_USER_INPUT. Resources `lu://story/{id}`
485
486
  and `lu://chapter/{id}/draft` return the same data as the tools.
487
+
488
+ ## Blog pages and menus
489
+
490
+ `client.blogPages({blogId, first?, after?})` lists private pages, including drafts
491
+ and translations, sorted by ID. Use the last returned ID as `after` and stop on a
492
+ short or empty batch. `client.blogMenus({blogId})` returns the three stored menu
493
+ locations. Both return documents with `id`, opaque `version`, and JSON `data`.
494
+ They require `blog:read` and management access to that blog.
495
+
496
+ `client.mutateBlog(input)` requires `blog:write`. Its `action` is `savePage`,
497
+ `translatePage`, `publishPage`, `saveMenu` or `translateMenu`. Supply `blogId`,
498
+ `operationId` and `expectedVersion` on every request. Use null for a new page or
499
+ menu and the latest returned version for edits. Keep the full request unchanged
500
+ when retrying a lost response; the SDK preserves it on transport retries.
501
+ Organization keys may manage only their own enabled organization blog. Restricted
502
+ story/universe keys cannot access blogs. Writes use these permissions without
503
+ deployment settings or an actor allowlist.
504
+
505
+ ```ts
506
+ const page = await client.mutateBlog({
507
+ blogId: 'BLOG_ID', action: 'savePage', operationId: 'author-page-1',
508
+ expectedVersion: null, page: {title: 'Author', slug: 'author', language: 'en'},
509
+ })
510
+ await client.mutateBlog({
511
+ blogId: 'BLOG_ID', action: 'publishPage', pageId: page.id,
512
+ operationId: 'author-publish-1', expectedVersion: page.version, published: true,
513
+ })
514
+ ```
515
+
516
+ Edits to published pages and saved menus are live immediately. A stale version
517
+ fails with `VERSION_CONFLICT`; read again and review the changes. System pages,
518
+ 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}";
@@ -5,6 +5,15 @@ export declare const IMAGE_POLICY: {
5
5
  readonly maxUploadPixels: 16000000;
6
6
  readonly processingSeconds: 10;
7
7
  readonly purposes: {
8
+ readonly "oauth-app-logo": {
9
+ readonly maxBytes: 2097152;
10
+ readonly allowedTypes: readonly ["image/jpeg", "image/png", "image/webp"];
11
+ readonly maxWidth: 512;
12
+ readonly maxHeight: 512;
13
+ readonly aspectRatio: 1;
14
+ readonly recommendedWidth: 512;
15
+ readonly recommendedHeight: 512;
16
+ };
8
17
  readonly "story-cover": {
9
18
  readonly maxBytes: 5242880;
10
19
  readonly allowedTypes: readonly ["image/jpeg", "image/png", "image/webp"];
@@ -9,6 +9,19 @@ exports.IMAGE_POLICY = {
9
9
  "maxUploadPixels": 16000000,
10
10
  "processingSeconds": 10,
11
11
  "purposes": {
12
+ "oauth-app-logo": {
13
+ "maxBytes": 2097152,
14
+ "allowedTypes": [
15
+ "image/jpeg",
16
+ "image/png",
17
+ "image/webp"
18
+ ],
19
+ "maxWidth": 512,
20
+ "maxHeight": 512,
21
+ "aspectRatio": 1,
22
+ "recommendedWidth": 512,
23
+ "recommendedHeight": 512
24
+ },
12
25
  "story-cover": {
13
26
  "maxBytes": 5242880,
14
27
  "allowedTypes": [
@@ -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}";
@@ -5,6 +5,15 @@ export declare const IMAGE_POLICY: {
5
5
  readonly maxUploadPixels: 16000000;
6
6
  readonly processingSeconds: 10;
7
7
  readonly purposes: {
8
+ readonly "oauth-app-logo": {
9
+ readonly maxBytes: 2097152;
10
+ readonly allowedTypes: readonly ["image/jpeg", "image/png", "image/webp"];
11
+ readonly maxWidth: 512;
12
+ readonly maxHeight: 512;
13
+ readonly aspectRatio: 1;
14
+ readonly recommendedWidth: 512;
15
+ readonly recommendedHeight: 512;
16
+ };
8
17
  readonly "story-cover": {
9
18
  readonly maxBytes: 5242880;
10
19
  readonly allowedTypes: readonly ["image/jpeg", "image/png", "image/webp"];
@@ -6,6 +6,19 @@ export const IMAGE_POLICY = {
6
6
  "maxUploadPixels": 16000000,
7
7
  "processingSeconds": 10,
8
8
  "purposes": {
9
+ "oauth-app-logo": {
10
+ "maxBytes": 2097152,
11
+ "allowedTypes": [
12
+ "image/jpeg",
13
+ "image/png",
14
+ "image/webp"
15
+ ],
16
+ "maxWidth": 512,
17
+ "maxHeight": 512,
18
+ "aspectRatio": 1,
19
+ "recommendedWidth": 512,
20
+ "recommendedHeight": 512
21
+ },
9
22
  "story-cover": {
10
23
  "maxBytes": 5242880,
11
24
  "allowedTypes": [
@@ -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/image-policy.json CHANGED
@@ -5,6 +5,15 @@
5
5
  "maxUploadPixels": 16000000,
6
6
  "processingSeconds": 10,
7
7
  "purposes": {
8
+ "oauth-app-logo": {
9
+ "maxBytes": 2097152,
10
+ "allowedTypes": ["image/jpeg", "image/png", "image/webp"],
11
+ "maxWidth": 512,
12
+ "maxHeight": 512,
13
+ "aspectRatio": 1,
14
+ "recommendedWidth": 512,
15
+ "recommendedHeight": 512
16
+ },
8
17
  "story-cover": {
9
18
  "maxBytes": 5242880,
10
19
  "allowedTypes": ["image/jpeg", "image/png", "image/webp"],
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.2",
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