@vigilkids/cms-client 0.3.2 → 0.3.3
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 +13 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/types.d.mts +49 -2
- package/dist/types.d.ts +49 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ 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.3] - 2026-06-16
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Added localized author profile contract fields for reusable CMS author pages.
|
|
13
|
+
- Added typed site runtime route policy and redirect match rule metadata for CMS delivery consumers.
|
|
14
|
+
|
|
15
|
+
## [0.3.2] - 2026-06-14
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Added optional author profile content types for reusable author pages across CMS consumers.
|
|
20
|
+
|
|
8
21
|
## [0.3.1] - 2026-06-05
|
|
9
22
|
|
|
10
23
|
### 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, SiteConfigQuery, SiteConfig, Series } from './types.mjs';
|
|
2
|
-
export { HreflangEntry, ListResponse, LocalizedOgMetaMap, LocalizedSeoMetaMap, LocalizedString, LocalizedTwitterMetaMap, OgMeta, PaginationMeta, RevalidatePayload, SeoMeta, SitemapImageEntry, TwitterMeta, WebhookEventType } from './types.mjs';
|
|
2
|
+
export { AuthorProfile, AuthorProfileCta, AuthorProfileQuestion, AuthorProfileSection, AuthorProfileStat, AuthorSocialLink, HreflangEntry, ListResponse, LocalizedOgMetaMap, LocalizedSeoMetaMap, LocalizedString, LocalizedTwitterMetaMap, OgMeta, PaginationMeta, RedirectMatchType, RevalidatePayload, SeoMeta, SitemapImageEntry, TwitterMeta, WebhookEventType } from './types.mjs';
|
|
3
3
|
export { BuildRoutePathOptions, BuildRouteUrlOptions, DEFAULT_ROUTE_RESOURCES, ResolvedRouteLocalePolicy, ResolvedRoutePolicy, RouteLocalePolicy, RouteParams, RoutePolicy, RoutePolicyConfig, RouteResourceDefaults, RouteResources, buildRoutePath, buildRouteUrl, extractRouteParams, extractSourceRouteParams, formatRoutePolicy, hasCustomArticleRoute, isRoutePolicy, mergeRouteParams, resolveRoutePolicy } from './routes.mjs';
|
|
4
4
|
|
|
5
5
|
/** CMS 客户端配置 */
|
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, SiteConfigQuery, SiteConfig, Series } from './types.js';
|
|
2
|
-
export { HreflangEntry, ListResponse, LocalizedOgMetaMap, LocalizedSeoMetaMap, LocalizedString, LocalizedTwitterMetaMap, OgMeta, PaginationMeta, RevalidatePayload, SeoMeta, SitemapImageEntry, TwitterMeta, WebhookEventType } from './types.js';
|
|
2
|
+
export { AuthorProfile, AuthorProfileCta, AuthorProfileQuestion, AuthorProfileSection, AuthorProfileStat, AuthorSocialLink, HreflangEntry, ListResponse, LocalizedOgMetaMap, LocalizedSeoMetaMap, LocalizedString, LocalizedTwitterMetaMap, OgMeta, PaginationMeta, RedirectMatchType, RevalidatePayload, SeoMeta, SitemapImageEntry, TwitterMeta, WebhookEventType } from './types.js';
|
|
3
3
|
export { BuildRoutePathOptions, BuildRouteUrlOptions, DEFAULT_ROUTE_RESOURCES, ResolvedRouteLocalePolicy, ResolvedRoutePolicy, RouteLocalePolicy, RouteParams, RoutePolicy, RoutePolicyConfig, RouteResourceDefaults, RouteResources, buildRoutePath, buildRouteUrl, extractRouteParams, extractSourceRouteParams, formatRoutePolicy, hasCustomArticleRoute, isRoutePolicy, mergeRouteParams, resolveRoutePolicy } from './routes.js';
|
|
4
4
|
|
|
5
5
|
/** CMS 客户端配置 */
|
package/dist/types.d.mts
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
import { RoutePolicy } from './routes.mjs';
|
|
2
2
|
export { BuildRoutePathOptions, ResolvedRouteLocalePolicy, ResolvedRoutePolicy, RouteLocalePolicy, RouteParams, RoutePolicyConfig, RouteResourceDefaults, RouteResources } from './routes.mjs';
|
|
3
3
|
|
|
4
|
+
/** 作者社交链接 */
|
|
5
|
+
interface AuthorSocialLink {
|
|
6
|
+
kind?: string;
|
|
7
|
+
label: string;
|
|
8
|
+
href: string;
|
|
9
|
+
handle?: string;
|
|
10
|
+
}
|
|
11
|
+
/** 作者资料统计项 */
|
|
12
|
+
interface AuthorProfileStat {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
}
|
|
17
|
+
/** 作者资料问答项 */
|
|
18
|
+
interface AuthorProfileQuestion {
|
|
19
|
+
label?: string;
|
|
20
|
+
text: string;
|
|
21
|
+
}
|
|
22
|
+
/** 作者资料内容分区 */
|
|
23
|
+
interface AuthorProfileSection {
|
|
24
|
+
key: string;
|
|
25
|
+
eyebrow: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
paragraphs?: string[];
|
|
28
|
+
questions?: AuthorProfileQuestion[];
|
|
29
|
+
}
|
|
30
|
+
/** 作者资料行动入口 */
|
|
31
|
+
interface AuthorProfileCta {
|
|
32
|
+
label: string;
|
|
33
|
+
href: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
}
|
|
37
|
+
/** 作者资料内容 */
|
|
38
|
+
interface AuthorProfile {
|
|
39
|
+
eyebrow?: string;
|
|
40
|
+
role?: string;
|
|
41
|
+
role_line?: string;
|
|
42
|
+
lede?: string;
|
|
43
|
+
socials?: AuthorSocialLink[];
|
|
44
|
+
stats?: AuthorProfileStat[];
|
|
45
|
+
sections?: AuthorProfileSection[];
|
|
46
|
+
tags?: string[];
|
|
47
|
+
cta?: AuthorProfileCta;
|
|
48
|
+
}
|
|
4
49
|
/** 作者信息 (Go: delivery.DeliveryAuthorResponse) */
|
|
5
50
|
interface Author {
|
|
6
51
|
id: number;
|
|
@@ -14,6 +59,7 @@ interface Author {
|
|
|
14
59
|
twitter_meta?: Partial<TwitterMeta>;
|
|
15
60
|
available_locales?: string[];
|
|
16
61
|
localized_slugs?: Record<string, string>;
|
|
62
|
+
profile?: AuthorProfile;
|
|
17
63
|
}
|
|
18
64
|
|
|
19
65
|
/** 多语言字符串 (Go: domain.LocalizedString = map[string]string) */
|
|
@@ -175,11 +221,12 @@ interface CreateCommentPayload {
|
|
|
175
221
|
}
|
|
176
222
|
|
|
177
223
|
/** 重定向规则 (Go: delivery.RedirectRuleResponse) */
|
|
224
|
+
type RedirectMatchType = 'exact' | 'prefix' | 'regex';
|
|
178
225
|
interface RedirectRule {
|
|
179
226
|
source_path: string;
|
|
180
227
|
destination_path: string;
|
|
181
228
|
status_code: number;
|
|
182
|
-
match_type:
|
|
229
|
+
match_type: RedirectMatchType;
|
|
183
230
|
priority: number;
|
|
184
231
|
}
|
|
185
232
|
|
|
@@ -240,4 +287,4 @@ interface RevalidatePayload {
|
|
|
240
287
|
}
|
|
241
288
|
|
|
242
289
|
export { RoutePolicy };
|
|
243
|
-
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, SiteConfig, SiteConfigQuery, SitemapEntry, SitemapImageEntry, TwitterMeta, WebhookEventType };
|
|
290
|
+
export type { ArticleDetail, ArticleListItem, ArticleListParams, ArticleSearchParams, ArticleSearchResultItem, Author, AuthorProfile, AuthorProfileCta, AuthorProfileQuestion, AuthorProfileSection, AuthorProfileStat, AuthorSocialLink, CategoryNode, Comment, CreateCommentPayload, HreflangEntry, ListResponse, LocalizedOgMetaMap, LocalizedSeoMetaMap, LocalizedString, LocalizedTwitterMetaMap, OgMeta, Paginated, PaginationMeta, PaginationParams, RedirectMatchType, RedirectRule, RevalidatePayload, SeoMeta, Series, SiteConfig, SiteConfigQuery, SitemapEntry, SitemapImageEntry, TwitterMeta, WebhookEventType };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
import { RoutePolicy } from './routes.js';
|
|
2
2
|
export { BuildRoutePathOptions, ResolvedRouteLocalePolicy, ResolvedRoutePolicy, RouteLocalePolicy, RouteParams, RoutePolicyConfig, RouteResourceDefaults, RouteResources } from './routes.js';
|
|
3
3
|
|
|
4
|
+
/** 作者社交链接 */
|
|
5
|
+
interface AuthorSocialLink {
|
|
6
|
+
kind?: string;
|
|
7
|
+
label: string;
|
|
8
|
+
href: string;
|
|
9
|
+
handle?: string;
|
|
10
|
+
}
|
|
11
|
+
/** 作者资料统计项 */
|
|
12
|
+
interface AuthorProfileStat {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
}
|
|
17
|
+
/** 作者资料问答项 */
|
|
18
|
+
interface AuthorProfileQuestion {
|
|
19
|
+
label?: string;
|
|
20
|
+
text: string;
|
|
21
|
+
}
|
|
22
|
+
/** 作者资料内容分区 */
|
|
23
|
+
interface AuthorProfileSection {
|
|
24
|
+
key: string;
|
|
25
|
+
eyebrow: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
paragraphs?: string[];
|
|
28
|
+
questions?: AuthorProfileQuestion[];
|
|
29
|
+
}
|
|
30
|
+
/** 作者资料行动入口 */
|
|
31
|
+
interface AuthorProfileCta {
|
|
32
|
+
label: string;
|
|
33
|
+
href: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
}
|
|
37
|
+
/** 作者资料内容 */
|
|
38
|
+
interface AuthorProfile {
|
|
39
|
+
eyebrow?: string;
|
|
40
|
+
role?: string;
|
|
41
|
+
role_line?: string;
|
|
42
|
+
lede?: string;
|
|
43
|
+
socials?: AuthorSocialLink[];
|
|
44
|
+
stats?: AuthorProfileStat[];
|
|
45
|
+
sections?: AuthorProfileSection[];
|
|
46
|
+
tags?: string[];
|
|
47
|
+
cta?: AuthorProfileCta;
|
|
48
|
+
}
|
|
4
49
|
/** 作者信息 (Go: delivery.DeliveryAuthorResponse) */
|
|
5
50
|
interface Author {
|
|
6
51
|
id: number;
|
|
@@ -14,6 +59,7 @@ interface Author {
|
|
|
14
59
|
twitter_meta?: Partial<TwitterMeta>;
|
|
15
60
|
available_locales?: string[];
|
|
16
61
|
localized_slugs?: Record<string, string>;
|
|
62
|
+
profile?: AuthorProfile;
|
|
17
63
|
}
|
|
18
64
|
|
|
19
65
|
/** 多语言字符串 (Go: domain.LocalizedString = map[string]string) */
|
|
@@ -175,11 +221,12 @@ interface CreateCommentPayload {
|
|
|
175
221
|
}
|
|
176
222
|
|
|
177
223
|
/** 重定向规则 (Go: delivery.RedirectRuleResponse) */
|
|
224
|
+
type RedirectMatchType = 'exact' | 'prefix' | 'regex';
|
|
178
225
|
interface RedirectRule {
|
|
179
226
|
source_path: string;
|
|
180
227
|
destination_path: string;
|
|
181
228
|
status_code: number;
|
|
182
|
-
match_type:
|
|
229
|
+
match_type: RedirectMatchType;
|
|
183
230
|
priority: number;
|
|
184
231
|
}
|
|
185
232
|
|
|
@@ -240,4 +287,4 @@ interface RevalidatePayload {
|
|
|
240
287
|
}
|
|
241
288
|
|
|
242
289
|
export { RoutePolicy };
|
|
243
|
-
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, SiteConfig, SiteConfigQuery, SitemapEntry, SitemapImageEntry, TwitterMeta, WebhookEventType };
|
|
290
|
+
export type { ArticleDetail, ArticleListItem, ArticleListParams, ArticleSearchParams, ArticleSearchResultItem, Author, AuthorProfile, AuthorProfileCta, AuthorProfileQuestion, AuthorProfileSection, AuthorProfileStat, AuthorSocialLink, CategoryNode, Comment, CreateCommentPayload, HreflangEntry, ListResponse, LocalizedOgMetaMap, LocalizedSeoMetaMap, LocalizedString, LocalizedTwitterMetaMap, OgMeta, Paginated, PaginationMeta, PaginationParams, RedirectMatchType, RedirectRule, RevalidatePayload, SeoMeta, Series, SiteConfig, SiteConfigQuery, SitemapEntry, SitemapImageEntry, TwitterMeta, WebhookEventType };
|