feat(editor): Add What's New notification callout (#16718)

This commit is contained in:
Jaakko Husso
2025-06-27 17:42:05 +03:00
committed by GitHub
parent 5fe68f38df
commit 1934e6fc0f
11 changed files with 518 additions and 198 deletions

View File

@@ -29,15 +29,22 @@ export interface Version {
securityIssueFixVersion: string;
}
export interface WhatsNewSection {
title: string;
calloutText: string;
footer: string;
items: WhatsNewArticle[];
createdAt: string;
updatedAt: string | null;
}
export interface WhatsNewArticle {
id: number;
title: string;
createdAt: string;
updatedAt: string | null;
publishedAt: string;
title: string;
content: string;
calloutTitle: string;
calloutText: string;
}
export async function getNextVersions(
@@ -49,11 +56,11 @@ export async function getNextVersions(
return await get(endpoint, currentVersion, {}, headers);
}
export async function getWhatsNewArticles(
export async function getWhatsNewSection(
endpoint: string,
currentVersion: string,
instanceId: string,
): Promise<WhatsNewArticle[]> {
): Promise<WhatsNewSection> {
const headers = {
[INSTANCE_ID_HEADER as string]: instanceId,
[INSTANCE_VERSION_HEADER as string]: currentVersion,