@vigilkids/cms-client 0.2.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.0] - 2026-06-03
9
+
10
+ ### Added
11
+
12
+ - Added localized category SEO, Open Graph, and Twitter Card metadata map types.
13
+ - Added category node metadata fields for CMS taxonomy landing pages.
14
+
8
15
  ## [0.2.0] - 2026-06-03
9
16
 
10
17
  ### Added
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ArticleListParams, Paginated, ArticleListItem, ArticleDetail, ArticleSearchParams, ArticleSearchResultItem, PaginationParams, Author, CategoryNode, Comment, CreateCommentPayload, SitemapEntry, RedirectRule, Series } from './types.mjs';
2
- export { HreflangEntry, ListResponse, LocalizedString, OgMeta, PaginationMeta, RevalidatePayload, SeoMeta, SitemapImageEntry, TwitterMeta, WebhookEventType } from './types.mjs';
2
+ export { HreflangEntry, ListResponse, LocalizedOgMetaMap, LocalizedSeoMetaMap, LocalizedString, LocalizedTwitterMetaMap, OgMeta, PaginationMeta, RevalidatePayload, SeoMeta, SitemapImageEntry, TwitterMeta, WebhookEventType } from './types.mjs';
3
3
 
4
4
  /** CMS 客户端配置 */
5
5
  interface CmsClientConfig {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ArticleListParams, Paginated, ArticleListItem, ArticleDetail, ArticleSearchParams, ArticleSearchResultItem, PaginationParams, Author, CategoryNode, Comment, CreateCommentPayload, SitemapEntry, RedirectRule, Series } from './types.js';
2
- export { HreflangEntry, ListResponse, LocalizedString, OgMeta, PaginationMeta, RevalidatePayload, SeoMeta, SitemapImageEntry, TwitterMeta, WebhookEventType } from './types.js';
2
+ export { HreflangEntry, ListResponse, LocalizedOgMetaMap, LocalizedSeoMetaMap, LocalizedString, LocalizedTwitterMetaMap, OgMeta, PaginationMeta, RevalidatePayload, SeoMeta, SitemapImageEntry, TwitterMeta, WebhookEventType } from './types.js';
3
3
 
4
4
  /** CMS 客户端配置 */
5
5
  interface CmsClientConfig {
package/dist/types.d.mts CHANGED
@@ -129,12 +129,21 @@ interface TwitterMeta {
129
129
  image: string | null;
130
130
  }
131
131
 
132
+ /** 本地化 SEO 元信息 */
133
+ type LocalizedSeoMetaMap = Record<string, Partial<SeoMeta>>;
134
+ /** 本地化 Open Graph 元信息 */
135
+ type LocalizedOgMetaMap = Record<string, Partial<OgMeta>>;
136
+ /** 本地化 Twitter Card 元信息 */
137
+ type LocalizedTwitterMetaMap = Record<string, Partial<TwitterMeta>>;
132
138
  /** 分类树节点 (Go: delivery.CategoryNodeResponse) */
133
139
  interface CategoryNode {
134
140
  id: number;
135
141
  slug: string;
136
142
  name: LocalizedString;
137
143
  description: LocalizedString;
144
+ seo_meta?: LocalizedSeoMetaMap;
145
+ og_meta?: LocalizedOgMetaMap;
146
+ twitter_meta?: LocalizedTwitterMetaMap;
138
147
  article_count: number;
139
148
  article_counts?: Record<string, number>;
140
149
  children?: CategoryNode[];
@@ -209,4 +218,4 @@ interface RevalidatePayload {
209
218
  category_slug?: string;
210
219
  }
211
220
 
212
- export type { ArticleDetail, ArticleListItem, ArticleListParams, ArticleSearchParams, ArticleSearchResultItem, Author, CategoryNode, Comment, CreateCommentPayload, HreflangEntry, ListResponse, LocalizedString, OgMeta, Paginated, PaginationMeta, PaginationParams, RedirectRule, RevalidatePayload, SeoMeta, Series, SitemapEntry, SitemapImageEntry, TwitterMeta, WebhookEventType };
221
+ export type { ArticleDetail, ArticleListItem, ArticleListParams, ArticleSearchParams, ArticleSearchResultItem, Author, CategoryNode, Comment, CreateCommentPayload, HreflangEntry, ListResponse, LocalizedOgMetaMap, LocalizedSeoMetaMap, LocalizedString, LocalizedTwitterMetaMap, OgMeta, Paginated, PaginationMeta, PaginationParams, RedirectRule, RevalidatePayload, SeoMeta, Series, SitemapEntry, SitemapImageEntry, TwitterMeta, WebhookEventType };
package/dist/types.d.ts CHANGED
@@ -129,12 +129,21 @@ interface TwitterMeta {
129
129
  image: string | null;
130
130
  }
131
131
 
132
+ /** 本地化 SEO 元信息 */
133
+ type LocalizedSeoMetaMap = Record<string, Partial<SeoMeta>>;
134
+ /** 本地化 Open Graph 元信息 */
135
+ type LocalizedOgMetaMap = Record<string, Partial<OgMeta>>;
136
+ /** 本地化 Twitter Card 元信息 */
137
+ type LocalizedTwitterMetaMap = Record<string, Partial<TwitterMeta>>;
132
138
  /** 分类树节点 (Go: delivery.CategoryNodeResponse) */
133
139
  interface CategoryNode {
134
140
  id: number;
135
141
  slug: string;
136
142
  name: LocalizedString;
137
143
  description: LocalizedString;
144
+ seo_meta?: LocalizedSeoMetaMap;
145
+ og_meta?: LocalizedOgMetaMap;
146
+ twitter_meta?: LocalizedTwitterMetaMap;
138
147
  article_count: number;
139
148
  article_counts?: Record<string, number>;
140
149
  children?: CategoryNode[];
@@ -209,4 +218,4 @@ interface RevalidatePayload {
209
218
  category_slug?: string;
210
219
  }
211
220
 
212
- export type { ArticleDetail, ArticleListItem, ArticleListParams, ArticleSearchParams, ArticleSearchResultItem, Author, CategoryNode, Comment, CreateCommentPayload, HreflangEntry, ListResponse, LocalizedString, OgMeta, Paginated, PaginationMeta, PaginationParams, RedirectRule, RevalidatePayload, SeoMeta, Series, SitemapEntry, SitemapImageEntry, TwitterMeta, WebhookEventType };
221
+ export type { ArticleDetail, ArticleListItem, ArticleListParams, ArticleSearchParams, ArticleSearchResultItem, Author, CategoryNode, Comment, CreateCommentPayload, HreflangEntry, ListResponse, LocalizedOgMetaMap, LocalizedSeoMetaMap, LocalizedString, LocalizedTwitterMetaMap, OgMeta, Paginated, PaginationMeta, PaginationParams, RedirectRule, RevalidatePayload, SeoMeta, Series, SitemapEntry, SitemapImageEntry, TwitterMeta, WebhookEventType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vigilkids/cms-client",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Framework-agnostic TypeScript client for OnEx CMS Public API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",