@neopress/mcp 1.3.0 → 1.4.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/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { z } from "zod";
3
+ import { AddressInfo } from "node:net";
3
4
  import { Server } from "node:http";
5
+ import { Redis } from "@upstash/redis";
4
6
  import { ServerNotification, ServerRequest } from "@modelcontextprotocol/sdk/types.js";
5
7
  import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
6
- import { AddressInfo } from "node:net";
7
- //#region ../sdk/dist/types.d.ts
8
+ //#region ../sdk/src/types.d.ts
8
9
  /**
9
10
  * @neopress/sdk — First-party API types
10
11
  *
@@ -50,6 +51,8 @@ interface Template {
50
51
  referenceUrl: string;
51
52
  previewImgUrls: string[] | null;
52
53
  previewVideoUrl: string | null;
54
+ /** Primary language of the template's content, as an ISO 639-1 code (ko/en/es). */
55
+ language: string | null;
53
56
  createdAt: string | null;
54
57
  }
55
58
  interface TemplateListItem {
@@ -60,6 +63,7 @@ interface TemplateListItem {
60
63
  referenceUrl: string;
61
64
  previewImgUrls: string[] | null;
62
65
  description: string | null;
66
+ language: string | null;
63
67
  createdAt: string;
64
68
  }
65
69
  interface Page {
@@ -286,7 +290,7 @@ interface SearchConsoleQueryResult {
286
290
  error?: string;
287
291
  }
288
292
  //#endregion
289
- //#region ../sdk/dist/endpoints/pages.d.ts
293
+ //#region ../sdk/src/endpoints/pages.d.ts
290
294
  interface PageListParams {
291
295
  page?: number;
292
296
  limit?: number;
@@ -336,7 +340,7 @@ declare class PagesEndpoint {
336
340
  }>;
337
341
  }
338
342
  //#endregion
339
- //#region ../sdk/dist/endpoints/collections.d.ts
343
+ //#region ../sdk/src/endpoints/collections.d.ts
340
344
  interface CollectionCreateParams {
341
345
  name: string;
342
346
  presetType?: string;
@@ -369,7 +373,7 @@ declare class CollectionsEndpoint {
369
373
  }>;
370
374
  }
371
375
  //#endregion
372
- //#region ../sdk/dist/endpoints/entries.d.ts
376
+ //#region ../sdk/src/endpoints/entries.d.ts
373
377
  interface EntryListParams {
374
378
  page?: number;
375
379
  limit?: number;
@@ -419,7 +423,7 @@ declare class EntriesEndpoint {
419
423
  }>;
420
424
  }
421
425
  //#endregion
422
- //#region ../sdk/dist/endpoints/forms.d.ts
426
+ //#region ../sdk/src/endpoints/forms.d.ts
423
427
  interface FormCreateParams {
424
428
  name: string;
425
429
  draftSchema?: unknown;
@@ -459,7 +463,7 @@ declare class FormsEndpoint {
459
463
  deleteResponse(formId: number, responseId: number): Promise<void>;
460
464
  }
461
465
  //#endregion
462
- //#region ../sdk/dist/endpoints/assets.d.ts
466
+ //#region ../sdk/src/endpoints/assets.d.ts
463
467
  interface AssetRegisterParams {
464
468
  assetUrl: string;
465
469
  displayName?: string;
@@ -496,7 +500,7 @@ declare class AssetsEndpoint {
496
500
  }>;
497
501
  }
498
502
  //#endregion
499
- //#region ../sdk/dist/endpoints/site.d.ts
503
+ //#region ../sdk/src/endpoints/site.d.ts
500
504
  interface SiteWithRole extends Site {
501
505
  role: string;
502
506
  }
@@ -531,7 +535,7 @@ declare class SiteEndpoint {
531
535
  }>;
532
536
  }
533
537
  //#endregion
534
- //#region ../sdk/dist/endpoints/redirects.d.ts
538
+ //#region ../sdk/src/endpoints/redirects.d.ts
535
539
  interface RedirectCreateParams {
536
540
  source: string;
537
541
  destination: string;
@@ -553,7 +557,7 @@ declare class RedirectsEndpoint {
553
557
  delete(ruleId: number): Promise<void>;
554
558
  }
555
559
  //#endregion
556
- //#region ../sdk/dist/endpoints/publish.d.ts
560
+ //#region ../sdk/src/endpoints/publish.d.ts
557
561
  declare class PublishEndpoint {
558
562
  private readonly client;
559
563
  constructor(client: NeopressClient);
@@ -561,7 +565,7 @@ declare class PublishEndpoint {
561
565
  site(): Promise<unknown>;
562
566
  }
563
567
  //#endregion
564
- //#region ../sdk/dist/endpoints/entry-references.d.ts
568
+ //#region ../sdk/src/endpoints/entry-references.d.ts
565
569
  interface EntryReferenceListParams {
566
570
  fromEntryId?: number;
567
571
  toEntryId?: number;
@@ -581,7 +585,7 @@ declare class EntryReferencesEndpoint {
581
585
  delete(referenceId: number): Promise<void>;
582
586
  }
583
587
  //#endregion
584
- //#region ../sdk/dist/endpoints/analytics.d.ts
588
+ //#region ../sdk/src/endpoints/analytics.d.ts
585
589
  declare class AnalyticsEndpoint {
586
590
  private readonly client;
587
591
  constructor(client: NeopressClient);
@@ -596,7 +600,7 @@ declare class AnalyticsEndpoint {
596
600
  searchConsole(params: SearchConsoleQueryParams): Promise<SearchConsoleQueryResult>;
597
601
  }
598
602
  //#endregion
599
- //#region ../sdk/dist/endpoints/templates.d.ts
603
+ //#region ../sdk/src/endpoints/templates.d.ts
600
604
  interface TemplateMarkParams {
601
605
  name: string;
602
606
  description?: string | null;
@@ -606,6 +610,11 @@ interface TemplateMarkParams {
606
610
  * card cross-fades from poster to video, so the poster must be the video's
607
611
  * first frame. Omit to leave an existing value untouched; `null` clears it. */
608
612
  previewVideoUrl?: string | null;
613
+ /** Primary language of the template's content — required, ISO 639-1 lowercase
614
+ * two-letter code (`ko`, `en`, `es`). Region-qualified locales (`en-US`) are
615
+ * rejected: the gallery filters on this key and must not see one language
616
+ * under two spellings. */
617
+ language: string;
609
618
  }
610
619
  interface TemplateDeleteResult {
611
620
  siteId: number;
@@ -632,7 +641,7 @@ declare class TemplatesEndpoint {
632
641
  }): Promise<TemplateListItem[]>;
633
642
  }
634
643
  //#endregion
635
- //#region ../sdk/dist/endpoints/headshots.d.ts
644
+ //#region ../sdk/src/endpoints/headshots.d.ts
636
645
  type HeadshotAgeBand = 'young' | 'middle';
637
646
  type HeadshotGender = 'male' | 'female';
638
647
  type HeadshotEthnicity = 'asian' | 'white' | 'black' | 'latino';
@@ -699,7 +708,7 @@ declare class HeadshotsEndpoint {
699
708
  delete(id: number): Promise<HeadshotDeleteResult>;
700
709
  }
701
710
  //#endregion
702
- //#region ../sdk/dist/endpoints/logos.d.ts
711
+ //#region ../sdk/src/endpoints/logos.d.ts
703
712
  type LogoType = 'wordmark' | 'lockup' | 'signature';
704
713
  type LogoTone = 'playful' | 'neutral' | 'serious';
705
714
  interface LogoListParams {
@@ -770,7 +779,7 @@ declare class LogosEndpoint {
770
779
  delete(id: number): Promise<LogoDeleteResult>;
771
780
  }
772
781
  //#endregion
773
- //#region ../sdk/dist/client.d.ts
782
+ //#region ../sdk/src/client.d.ts
774
783
  interface NeopressClientOptions {
775
784
  /** OAuth access token */
776
785
  accessToken?: string;
@@ -850,7 +859,7 @@ interface ToolContext {
850
859
  size: number;
851
860
  };
852
861
  fetch: typeof fetch;
853
- setActiveSiteId(siteId: number, extra?: ToolRequestExtra): void;
862
+ setActiveSiteId(siteId: number, extra?: ToolRequestExtra): Promise<void>;
854
863
  getBaseUrl(): string;
855
864
  }
856
865
  interface NeopressToolDefinition {
@@ -875,8 +884,8 @@ declare function createNeopressMcpServer(options?: NeopressMcpServerOptions): Mc
875
884
  //#endregion
876
885
  //#region src/remote/context.d.ts
877
886
  interface RemoteSiteSelectionStore {
878
- get(userKey: string): number | undefined;
879
- set(userKey: string, siteId: number): void;
887
+ get(userKey: string): Promise<number | undefined>;
888
+ set(userKey: string, siteId: number): Promise<void>;
880
889
  }
881
890
  interface RemoteToolContextOptions {
882
891
  baseUrl: string;
@@ -893,8 +902,7 @@ interface NeopressMcpHttpServerOptions {
893
902
  corsOrigins?: string[] | '*';
894
903
  fetch?: typeof fetch;
895
904
  host?: string;
896
- oauthClientSecret?: string;
897
- oauthProvider?: string;
905
+ openaiAppsChallengeToken?: string;
898
906
  port?: number;
899
907
  publicUrl?: string;
900
908
  siteSelectionStore?: RemoteSiteSelectionStore;