pabal-resource-mcp 1.9.2 → 1.9.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/dist/bin/mcp-server.js +18 -11
- package/dist/browser.d.ts +14 -5
- package/dist/browser.js +8 -2
- package/dist/chunk-I7DFQE66.js +18 -0
- package/dist/index.d.ts +2 -2
- package/dist/locale-converter-D2Sp4L1k.d.ts +830 -0
- package/package.json +1 -1
package/dist/bin/mcp-server.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
DEFAULT_APP_SLUG
|
|
4
|
-
|
|
3
|
+
DEFAULT_APP_SLUG,
|
|
4
|
+
DEVELOPER_JOURNAL_APP_SLUG,
|
|
5
|
+
DEVELOPER_TECH_APP_SLUG,
|
|
6
|
+
isDeveloperBlogAppSlug
|
|
7
|
+
} from "../chunk-I7DFQE66.js";
|
|
5
8
|
import {
|
|
6
9
|
getGeminiApiKey,
|
|
7
10
|
getKeywordResearchDir,
|
|
@@ -6230,6 +6233,9 @@ function normalizeDate(date) {
|
|
|
6230
6233
|
var toPublicBlogBase = (appSlug, slug) => `/${BLOG_ROOT}/${appSlug}/${slug}`;
|
|
6231
6234
|
function resolveCoverImagePath(appSlug, slug, coverImage) {
|
|
6232
6235
|
if (!coverImage || !coverImage.trim()) {
|
|
6236
|
+
if (isDeveloperBlogAppSlug(appSlug)) {
|
|
6237
|
+
return "/og-image.png";
|
|
6238
|
+
}
|
|
6233
6239
|
return `/products/${appSlug}/og-image.png`;
|
|
6234
6240
|
}
|
|
6235
6241
|
const cleaned = coverImage.trim();
|
|
@@ -6316,7 +6322,7 @@ function parseBlogHtml(htmlContent) {
|
|
|
6316
6322
|
const meta = JSON.parse(metaJson);
|
|
6317
6323
|
const body = htmlContent.replace(metaBlockRegex, "").trim();
|
|
6318
6324
|
return { meta, body };
|
|
6319
|
-
} catch
|
|
6325
|
+
} catch {
|
|
6320
6326
|
return { meta: null, body: htmlContent.trim() };
|
|
6321
6327
|
}
|
|
6322
6328
|
}
|
|
@@ -6347,7 +6353,7 @@ function findExistingBlogPosts({
|
|
|
6347
6353
|
publishedAt: meta.publishedAt
|
|
6348
6354
|
});
|
|
6349
6355
|
}
|
|
6350
|
-
} catch
|
|
6356
|
+
} catch {
|
|
6351
6357
|
continue;
|
|
6352
6358
|
}
|
|
6353
6359
|
}
|
|
@@ -6390,7 +6396,7 @@ var createBlogHtmlInputSchema = z13.object({
|
|
|
6390
6396
|
"Optional tags for BLOG_META. Defaults to tags derived from topic."
|
|
6391
6397
|
),
|
|
6392
6398
|
coverImage: z13.string().trim().optional().describe(
|
|
6393
|
-
"Cover image path. Relative paths rewrite to /blogs/<app>/<slug>/..., default is /products/<appSlug>/og-image.png."
|
|
6399
|
+
"Cover image path. Relative paths rewrite to /blogs/<app>/<slug>/..., default is /products/<appSlug>/og-image.png (developer slugs default to /og-image.png)."
|
|
6394
6400
|
),
|
|
6395
6401
|
publishedAt: z13.string().trim().regex(DATE_REGEX2, "publishedAt must use YYYY-MM-DD").optional().describe("Publish date (YYYY-MM-DD). Defaults to today."),
|
|
6396
6402
|
modifiedAt: z13.string().trim().regex(DATE_REGEX2, "modifiedAt must use YYYY-MM-DD").optional().describe("Last modified date (YYYY-MM-DD). Defaults to publishedAt."),
|
|
@@ -6416,16 +6422,17 @@ IMPORTANT REQUIREMENTS:
|
|
|
6416
6422
|
1. The 'locale' parameter is REQUIRED. If the user does not provide a locale, you MUST ask them to specify which language/locale they want to write the blog in (e.g., 'en-US', 'ko-KR', 'ja-JP', etc.).
|
|
6417
6423
|
2. The 'content' parameter is REQUIRED. You (the LLM) must generate the HTML content based on the 'topic' and 'locale' provided by the user. The content should be written in the language corresponding to the locale AND match the writing style of existing blog posts for that locale.
|
|
6418
6424
|
3. The 'description' parameter is REQUIRED. You (the LLM) must generate this based on the topic, locale, AND the writing style of existing blog posts.
|
|
6419
|
-
4. The 'appSlug' parameter:
|
|
6420
|
-
- If the user
|
|
6425
|
+
4. The 'appSlug' parameter:
|
|
6426
|
+
- If the user requests personal/daily/journal developer content, set appSlug to "${DEVELOPER_JOURNAL_APP_SLUG}".
|
|
6427
|
+
- If the user requests technical/engineering/devlog content, set appSlug to "${DEVELOPER_TECH_APP_SLUG}".
|
|
6421
6428
|
- If the user mentions a specific app/product, use that app's slug.
|
|
6422
|
-
- If not specified, defaults to "
|
|
6429
|
+
- If not specified, defaults to "${DEFAULT_APP_SLUG}".
|
|
6423
6430
|
|
|
6424
6431
|
Slug rules:
|
|
6425
6432
|
- slug = slugify(English title, kebab-case ASCII)
|
|
6426
6433
|
- path: public/blogs/<appSlug>/<slug>/<locale>.html
|
|
6427
|
-
- appSlug: Use "
|
|
6428
|
-
- coverImage default: /products/<appSlug>/og-image.png (relative paths are rewritten under /blogs/<app>/<slug
|
|
6434
|
+
- appSlug: Use "${DEVELOPER_JOURNAL_APP_SLUG}" for personal/journal posts, "${DEVELOPER_TECH_APP_SLUG}" for technical posts. Defaults to "${DEFAULT_APP_SLUG}" if not specified.
|
|
6435
|
+
- coverImage default: /products/<appSlug>/og-image.png (relative paths are rewritten under /blogs/<app>/<slug>/, developer slugs default to /og-image.png)
|
|
6429
6436
|
- overwrite defaults to false (throws when file exists)
|
|
6430
6437
|
|
|
6431
6438
|
HTML Structure (follows public/en-US.html pattern):
|
|
@@ -6482,7 +6489,7 @@ async function handleCreateBlogHtml(input) {
|
|
|
6482
6489
|
slug,
|
|
6483
6490
|
baseDir: path20.join(publicDir, "blogs", appSlug, slug),
|
|
6484
6491
|
files: [],
|
|
6485
|
-
coverImage: coverImage && coverImage.trim().length > 0 ? coverImage.trim() : `/products/${appSlug}/og-image.png`,
|
|
6492
|
+
coverImage: coverImage && coverImage.trim().length > 0 ? coverImage.trim() : isDeveloperBlogAppSlug(appSlug) ? "/og-image.png" : `/products/${appSlug}/og-image.png`,
|
|
6486
6493
|
metaByLocale: {}
|
|
6487
6494
|
};
|
|
6488
6495
|
const plannedFiles = targetLocales.map(
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as APP_STORE_TO_UNIFIED, Y as AppIconConfig, X as AppIconStyleConfig, F as AppMetaLinks, H as AppPageData, t as AppStoreAsoData, p as AppStoreInfoLocalization, d as AppStoreLocale, v as AppStoreMultilingualAsoData, o as AppStoreReleaseNote, r as AppStoreScreenshotDisplayType, s as AppStoreScreenshots, q as AppStoreVersionLocalization, w as AsoData, a1 as AsoLocaleContent, a0 as AsoTemplate, C as BlogArticle, z as BlogMeta, B as BlogMetaBlock, a6 as BlogMetaOutput, E as BlogSummary, a7 as CreateBlogHtmlInput, a9 as CreateBlogHtmlResult, D as DEFAULT_LOCALE, R as DeepPartial, M as FeatureItem, G as GOOGLE_PLAY_TO_UNIFIED, a8 as GeneratedBlogFile, m as GooglePlayAsoData, j as GooglePlayImageType, h as GooglePlayListing, e as GooglePlayLocale, u as GooglePlayMultilingualAsoData, n as GooglePlayReleaseNote, k as GooglePlayScreenshotType, l as GooglePlayScreenshots, I as ImageAsset, P as LandingCta, N as LandingFeatures, J as LandingHero, Q as LandingPage, V as LandingPageLocale, O as LandingReviews, K as LandingScreenshots, L as LayoutColors, a4 as LocaleDisplayInfo, $ as ProductConfig, _ as ProductContent, a2 as ProductLocale, Z as ProductMetadata, W as ProductScreenshots, a3 as SiteConfig, a5 as SiteData, S as SupportedLocale, T as Testimonial, U as UNIFIED_LOCALES, a as UNIFIED_TO_APP_STORE, b as UNIFIED_TO_GOOGLE_PLAY, c as UnifiedLocale, aj as appStoreToGooglePlay, ad as appStoreToUnified, ah as appStoreToUnifiedBatch, an as convertObjectFromAppStore, ao as convertObjectFromGooglePlay, al as convertObjectToAppStore, am as convertObjectToGooglePlay, ak as googlePlayToAppStore, ae as googlePlayToUnified, ai as googlePlayToUnifiedBatch, f as isAppStoreLocale, y as isAppStoreMultilingual, g as isGooglePlayLocale, x as isGooglePlayMultilingual, i as isSupportedLocale, aa as unifiedToAppStore, af as unifiedToAppStoreBatch, ac as unifiedToBothPlatforms, ab as unifiedToGooglePlay, ag as unifiedToGooglePlayBatch } from './locale-converter-
|
|
1
|
+
export { A as APP_STORE_TO_UNIFIED, Y as AppIconConfig, X as AppIconStyleConfig, F as AppMetaLinks, H as AppPageData, t as AppStoreAsoData, p as AppStoreInfoLocalization, d as AppStoreLocale, v as AppStoreMultilingualAsoData, o as AppStoreReleaseNote, r as AppStoreScreenshotDisplayType, s as AppStoreScreenshots, q as AppStoreVersionLocalization, w as AsoData, a1 as AsoLocaleContent, a0 as AsoTemplate, C as BlogArticle, z as BlogMeta, B as BlogMetaBlock, a6 as BlogMetaOutput, E as BlogSummary, a7 as CreateBlogHtmlInput, a9 as CreateBlogHtmlResult, D as DEFAULT_LOCALE, R as DeepPartial, M as FeatureItem, G as GOOGLE_PLAY_TO_UNIFIED, a8 as GeneratedBlogFile, m as GooglePlayAsoData, j as GooglePlayImageType, h as GooglePlayListing, e as GooglePlayLocale, u as GooglePlayMultilingualAsoData, n as GooglePlayReleaseNote, k as GooglePlayScreenshotType, l as GooglePlayScreenshots, I as ImageAsset, P as LandingCta, N as LandingFeatures, J as LandingHero, Q as LandingPage, V as LandingPageLocale, O as LandingReviews, K as LandingScreenshots, L as LayoutColors, a4 as LocaleDisplayInfo, $ as ProductConfig, _ as ProductContent, a2 as ProductLocale, Z as ProductMetadata, W as ProductScreenshots, a3 as SiteConfig, a5 as SiteData, S as SupportedLocale, T as Testimonial, U as UNIFIED_LOCALES, a as UNIFIED_TO_APP_STORE, b as UNIFIED_TO_GOOGLE_PLAY, c as UnifiedLocale, aj as appStoreToGooglePlay, ad as appStoreToUnified, ah as appStoreToUnifiedBatch, an as convertObjectFromAppStore, ao as convertObjectFromGooglePlay, al as convertObjectToAppStore, am as convertObjectToGooglePlay, ak as googlePlayToAppStore, ae as googlePlayToUnified, ai as googlePlayToUnifiedBatch, f as isAppStoreLocale, y as isAppStoreMultilingual, g as isGooglePlayLocale, x as isGooglePlayMultilingual, i as isSupportedLocale, aa as unifiedToAppStore, af as unifiedToAppStoreBatch, ac as unifiedToBothPlatforms, ab as unifiedToGooglePlay, ag as unifiedToGooglePlayBatch } from './locale-converter-D2Sp4L1k.js';
|
|
2
2
|
import '@googleapis/androidpublisher';
|
|
3
3
|
import 'appstore-connect-sdk/openapi';
|
|
4
4
|
|
|
@@ -7,9 +7,18 @@ import 'appstore-connect-sdk/openapi';
|
|
|
7
7
|
* Used for blog-related default values and configurations
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* Used when creating blog posts about the developer themselves
|
|
10
|
+
* App slug for personal/daily developer posts.
|
|
12
11
|
*/
|
|
13
|
-
declare const
|
|
12
|
+
declare const DEVELOPER_JOURNAL_APP_SLUG = "developer-journal";
|
|
13
|
+
/**
|
|
14
|
+
* App slug for technical developer posts.
|
|
15
|
+
*/
|
|
16
|
+
declare const DEVELOPER_TECH_APP_SLUG = "developer-tech";
|
|
17
|
+
/**
|
|
18
|
+
* Default app slug for developer-related blog posts.
|
|
19
|
+
* New posts default to journal.
|
|
20
|
+
*/
|
|
21
|
+
declare const DEFAULT_APP_SLUG = "developer-journal";
|
|
22
|
+
declare function isDeveloperBlogAppSlug(appSlug: string): boolean;
|
|
14
23
|
|
|
15
|
-
export { DEFAULT_APP_SLUG };
|
|
24
|
+
export { DEFAULT_APP_SLUG, DEVELOPER_JOURNAL_APP_SLUG, DEVELOPER_TECH_APP_SLUG, isDeveloperBlogAppSlug };
|
package/dist/browser.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
DEFAULT_APP_SLUG
|
|
3
|
-
|
|
2
|
+
DEFAULT_APP_SLUG,
|
|
3
|
+
DEVELOPER_JOURNAL_APP_SLUG,
|
|
4
|
+
DEVELOPER_TECH_APP_SLUG,
|
|
5
|
+
isDeveloperBlogAppSlug
|
|
6
|
+
} from "./chunk-I7DFQE66.js";
|
|
4
7
|
import {
|
|
5
8
|
APP_STORE_TO_UNIFIED,
|
|
6
9
|
DEFAULT_LOCALE,
|
|
@@ -33,6 +36,8 @@ export {
|
|
|
33
36
|
APP_STORE_TO_UNIFIED,
|
|
34
37
|
DEFAULT_APP_SLUG,
|
|
35
38
|
DEFAULT_LOCALE,
|
|
39
|
+
DEVELOPER_JOURNAL_APP_SLUG,
|
|
40
|
+
DEVELOPER_TECH_APP_SLUG,
|
|
36
41
|
GOOGLE_PLAY_TO_UNIFIED,
|
|
37
42
|
UNIFIED_LOCALES,
|
|
38
43
|
UNIFIED_TO_APP_STORE,
|
|
@@ -49,6 +54,7 @@ export {
|
|
|
49
54
|
googlePlayToUnifiedBatch,
|
|
50
55
|
isAppStoreLocale,
|
|
51
56
|
isAppStoreMultilingual,
|
|
57
|
+
isDeveloperBlogAppSlug,
|
|
52
58
|
isGooglePlayLocale,
|
|
53
59
|
isGooglePlayMultilingual,
|
|
54
60
|
isSupportedLocale,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/constants/blog.constants.ts
|
|
2
|
+
var DEVELOPER_JOURNAL_APP_SLUG = "developer-journal";
|
|
3
|
+
var DEVELOPER_TECH_APP_SLUG = "developer-tech";
|
|
4
|
+
var DEFAULT_APP_SLUG = DEVELOPER_JOURNAL_APP_SLUG;
|
|
5
|
+
var DEVELOPER_BLOG_APP_SLUGS = /* @__PURE__ */ new Set([
|
|
6
|
+
DEVELOPER_JOURNAL_APP_SLUG,
|
|
7
|
+
DEVELOPER_TECH_APP_SLUG
|
|
8
|
+
]);
|
|
9
|
+
function isDeveloperBlogAppSlug(appSlug) {
|
|
10
|
+
return DEVELOPER_BLOG_APP_SLUGS.has(appSlug);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
DEVELOPER_JOURNAL_APP_SLUG,
|
|
15
|
+
DEVELOPER_TECH_APP_SLUG,
|
|
16
|
+
DEFAULT_APP_SLUG,
|
|
17
|
+
isDeveloperBlogAppSlug
|
|
18
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { w as AsoData, $ as ProductConfig } from './locale-converter-
|
|
2
|
-
export { A as APP_STORE_TO_UNIFIED, Y as AppIconConfig, X as AppIconStyleConfig, F as AppMetaLinks, H as AppPageData, t as AppStoreAsoData, p as AppStoreInfoLocalization, d as AppStoreLocale, v as AppStoreMultilingualAsoData, o as AppStoreReleaseNote, r as AppStoreScreenshotDisplayType, s as AppStoreScreenshots, q as AppStoreVersionLocalization, a1 as AsoLocaleContent, a0 as AsoTemplate, C as BlogArticle, z as BlogMeta, B as BlogMetaBlock, a6 as BlogMetaOutput, E as BlogSummary, a7 as CreateBlogHtmlInput, a9 as CreateBlogHtmlResult, D as DEFAULT_LOCALE, R as DeepPartial, M as FeatureItem, G as GOOGLE_PLAY_TO_UNIFIED, a8 as GeneratedBlogFile, m as GooglePlayAsoData, j as GooglePlayImageType, h as GooglePlayListing, e as GooglePlayLocale, u as GooglePlayMultilingualAsoData, n as GooglePlayReleaseNote, k as GooglePlayScreenshotType, l as GooglePlayScreenshots, I as ImageAsset, P as LandingCta, N as LandingFeatures, J as LandingHero, Q as LandingPage, V as LandingPageLocale, O as LandingReviews, K as LandingScreenshots, L as LayoutColors, a4 as LocaleDisplayInfo, _ as ProductContent, a2 as ProductLocale, Z as ProductMetadata, W as ProductScreenshots, a3 as SiteConfig, a5 as SiteData, S as SupportedLocale, T as Testimonial, U as UNIFIED_LOCALES, a as UNIFIED_TO_APP_STORE, b as UNIFIED_TO_GOOGLE_PLAY, c as UnifiedLocale, aj as appStoreToGooglePlay, ad as appStoreToUnified, ah as appStoreToUnifiedBatch, an as convertObjectFromAppStore, ao as convertObjectFromGooglePlay, al as convertObjectToAppStore, am as convertObjectToGooglePlay, ak as googlePlayToAppStore, ae as googlePlayToUnified, ai as googlePlayToUnifiedBatch, f as isAppStoreLocale, y as isAppStoreMultilingual, g as isGooglePlayLocale, x as isGooglePlayMultilingual, i as isSupportedLocale, aa as unifiedToAppStore, af as unifiedToAppStoreBatch, ac as unifiedToBothPlatforms, ab as unifiedToGooglePlay, ag as unifiedToGooglePlayBatch } from './locale-converter-
|
|
1
|
+
import { w as AsoData, $ as ProductConfig } from './locale-converter-D2Sp4L1k.js';
|
|
2
|
+
export { A as APP_STORE_TO_UNIFIED, Y as AppIconConfig, X as AppIconStyleConfig, F as AppMetaLinks, H as AppPageData, t as AppStoreAsoData, p as AppStoreInfoLocalization, d as AppStoreLocale, v as AppStoreMultilingualAsoData, o as AppStoreReleaseNote, r as AppStoreScreenshotDisplayType, s as AppStoreScreenshots, q as AppStoreVersionLocalization, a1 as AsoLocaleContent, a0 as AsoTemplate, C as BlogArticle, z as BlogMeta, B as BlogMetaBlock, a6 as BlogMetaOutput, E as BlogSummary, a7 as CreateBlogHtmlInput, a9 as CreateBlogHtmlResult, D as DEFAULT_LOCALE, R as DeepPartial, M as FeatureItem, G as GOOGLE_PLAY_TO_UNIFIED, a8 as GeneratedBlogFile, m as GooglePlayAsoData, j as GooglePlayImageType, h as GooglePlayListing, e as GooglePlayLocale, u as GooglePlayMultilingualAsoData, n as GooglePlayReleaseNote, k as GooglePlayScreenshotType, l as GooglePlayScreenshots, I as ImageAsset, P as LandingCta, N as LandingFeatures, J as LandingHero, Q as LandingPage, V as LandingPageLocale, O as LandingReviews, K as LandingScreenshots, L as LayoutColors, a4 as LocaleDisplayInfo, _ as ProductContent, a2 as ProductLocale, Z as ProductMetadata, W as ProductScreenshots, a3 as SiteConfig, a5 as SiteData, S as SupportedLocale, T as Testimonial, U as UNIFIED_LOCALES, a as UNIFIED_TO_APP_STORE, b as UNIFIED_TO_GOOGLE_PLAY, c as UnifiedLocale, aj as appStoreToGooglePlay, ad as appStoreToUnified, ah as appStoreToUnifiedBatch, an as convertObjectFromAppStore, ao as convertObjectFromGooglePlay, al as convertObjectToAppStore, am as convertObjectToGooglePlay, ak as googlePlayToAppStore, ae as googlePlayToUnified, ai as googlePlayToUnifiedBatch, f as isAppStoreLocale, y as isAppStoreMultilingual, g as isGooglePlayLocale, x as isGooglePlayMultilingual, i as isSupportedLocale, aa as unifiedToAppStore, af as unifiedToAppStoreBatch, ac as unifiedToBothPlatforms, ab as unifiedToGooglePlay, ag as unifiedToGooglePlayBatch } from './locale-converter-D2Sp4L1k.js';
|
|
3
3
|
import '@googleapis/androidpublisher';
|
|
4
4
|
import 'appstore-connect-sdk/openapi';
|
|
5
5
|
|
|
@@ -0,0 +1,830 @@
|
|
|
1
|
+
import { androidpublisher_v3 } from '@googleapis/androidpublisher';
|
|
2
|
+
import { AppStoreVersionAttributes, AppStoreVersionLocalizationAttributes, AppInfoLocalizationAttributes, ScreenshotDisplayType } from 'appstore-connect-sdk/openapi';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Unified locale system for ASO (App Store Optimization)
|
|
6
|
+
* Consolidates App Store Connect and Google Play Console locale codes
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Unified locale codes used across the application
|
|
10
|
+
* These codes are used in /locales directory structure
|
|
11
|
+
*/
|
|
12
|
+
declare const UNIFIED_LOCALES: readonly ["af", "am", "ar", "az-AZ", "be", "bg-BG", "bn-BD", "ca-ES", "cs-CZ", "da-DK", "de-DE", "el-GR", "en-AU", "en-CA", "en-GB", "en-IN", "en-SG", "en-US", "en-ZA", "es-419", "es-ES", "es-US", "et-EE", "eu-ES", "fa", "fa-AE", "fa-AF", "fa-IR", "fi-FI", "fil", "fr-CA", "fr-FR", "gl-ES", "gu", "he-IL", "hi-IN", "hr-HR", "hu-HU", "hy-AM", "id-ID", "is-IS", "it-IT", "ja-JP", "ka-GE", "kk", "km-KH", "kn-IN", "ko-KR", "ky-KG", "lo-LA", "lt-LT", "lv-LV", "mk-MK", "ml-IN", "mn-MN", "mr-IN", "ms", "ms-MY", "my-MM", "ne-NP", "nl-NL", "no-NO", "pa", "pl-PL", "pt-BR", "pt-PT", "rm", "ro-RO", "ru-RU", "si-LK", "sk-SK", "sl-SI", "sq", "sr-RS", "sv-SE", "sw", "ta-IN", "te-IN", "th-TH", "tr-TR", "uk-UA", "ur", "vi-VN", "zh-HK", "zh-Hans", "zh-Hant", "zu"];
|
|
13
|
+
type UnifiedLocale = (typeof UNIFIED_LOCALES)[number];
|
|
14
|
+
/**
|
|
15
|
+
* Default locale (for fallback)
|
|
16
|
+
*/
|
|
17
|
+
declare const DEFAULT_LOCALE: UnifiedLocale;
|
|
18
|
+
/**
|
|
19
|
+
* Unified locale to App Store Connect locale mapping
|
|
20
|
+
* Maps our unified locale codes to App Store Connect API codes
|
|
21
|
+
*/
|
|
22
|
+
declare const UNIFIED_TO_APP_STORE: Record<UnifiedLocale, string | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Unified locale to Google Play Console locale mapping
|
|
25
|
+
* Maps our unified locale codes to Google Play Console API codes
|
|
26
|
+
*/
|
|
27
|
+
declare const UNIFIED_TO_GOOGLE_PLAY: Record<UnifiedLocale, string | null>;
|
|
28
|
+
/**
|
|
29
|
+
* App Store Connect locale to unified locale mapping
|
|
30
|
+
* Reverse mapping for converting App Store codes to our unified system
|
|
31
|
+
*/
|
|
32
|
+
declare const APP_STORE_TO_UNIFIED: Record<string, UnifiedLocale>;
|
|
33
|
+
/**
|
|
34
|
+
* Google Play Console locale to unified locale mapping
|
|
35
|
+
* Reverse mapping for converting Google Play codes to our unified system
|
|
36
|
+
*/
|
|
37
|
+
declare const GOOGLE_PLAY_TO_UNIFIED: Record<string, UnifiedLocale>;
|
|
38
|
+
/**
|
|
39
|
+
* Locales supported by App Store Connect
|
|
40
|
+
*/
|
|
41
|
+
declare const APP_STORE_SUPPORTED_LOCALES: ("af" | "am" | "ar" | "az-AZ" | "be" | "bg-BG" | "bn-BD" | "ca-ES" | "cs-CZ" | "da-DK" | "de-DE" | "el-GR" | "en-AU" | "en-CA" | "en-GB" | "en-IN" | "en-SG" | "en-US" | "en-ZA" | "es-419" | "es-ES" | "es-US" | "et-EE" | "eu-ES" | "fa" | "fa-AE" | "fa-AF" | "fa-IR" | "fi-FI" | "fil" | "fr-CA" | "fr-FR" | "gl-ES" | "gu" | "he-IL" | "hi-IN" | "hr-HR" | "hu-HU" | "hy-AM" | "id-ID" | "is-IS" | "it-IT" | "ja-JP" | "ka-GE" | "kk" | "km-KH" | "kn-IN" | "ko-KR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms" | "ms-MY" | "my-MM" | "ne-NP" | "nl-NL" | "no-NO" | "pa" | "pl-PL" | "pt-BR" | "pt-PT" | "rm" | "ro-RO" | "ru-RU" | "si-LK" | "sk-SK" | "sl-SI" | "sq" | "sr-RS" | "sv-SE" | "sw" | "ta-IN" | "te-IN" | "th-TH" | "tr-TR" | "uk-UA" | "ur" | "vi-VN" | "zh-HK" | "zh-Hans" | "zh-Hant" | "zu")[];
|
|
42
|
+
/**
|
|
43
|
+
* Locales supported by Google Play Console
|
|
44
|
+
*/
|
|
45
|
+
declare const GOOGLE_PLAY_SUPPORTED_LOCALES: ("af" | "am" | "ar" | "az-AZ" | "be" | "bg-BG" | "bn-BD" | "ca-ES" | "cs-CZ" | "da-DK" | "de-DE" | "el-GR" | "en-AU" | "en-CA" | "en-GB" | "en-IN" | "en-SG" | "en-US" | "en-ZA" | "es-419" | "es-ES" | "es-US" | "et-EE" | "eu-ES" | "fa" | "fa-AE" | "fa-AF" | "fa-IR" | "fi-FI" | "fil" | "fr-CA" | "fr-FR" | "gl-ES" | "gu" | "he-IL" | "hi-IN" | "hr-HR" | "hu-HU" | "hy-AM" | "id-ID" | "is-IS" | "it-IT" | "ja-JP" | "ka-GE" | "kk" | "km-KH" | "kn-IN" | "ko-KR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms" | "ms-MY" | "my-MM" | "ne-NP" | "nl-NL" | "no-NO" | "pa" | "pl-PL" | "pt-BR" | "pt-PT" | "rm" | "ro-RO" | "ru-RU" | "si-LK" | "sk-SK" | "sl-SI" | "sq" | "sr-RS" | "sv-SE" | "sw" | "ta-IN" | "te-IN" | "th-TH" | "tr-TR" | "uk-UA" | "ur" | "vi-VN" | "zh-HK" | "zh-Hans" | "zh-Hant" | "zu")[];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* ASO (App Store Optimization) data type definitions
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Unified locale type used across the application
|
|
53
|
+
* This type represents the unified locale codes used in /locales directory
|
|
54
|
+
*/
|
|
55
|
+
type SupportedLocale = UnifiedLocale;
|
|
56
|
+
/**
|
|
57
|
+
* App Store Connect specific locale type
|
|
58
|
+
*/
|
|
59
|
+
type AppStoreLocale = (typeof APP_STORE_SUPPORTED_LOCALES)[number];
|
|
60
|
+
/**
|
|
61
|
+
* Google Play Console specific locale type
|
|
62
|
+
*/
|
|
63
|
+
type GooglePlayLocale = (typeof GOOGLE_PLAY_SUPPORTED_LOCALES)[number];
|
|
64
|
+
/**
|
|
65
|
+
* Check if locale is supported by our unified system
|
|
66
|
+
*/
|
|
67
|
+
declare function isSupportedLocale(locale: string): locale is SupportedLocale;
|
|
68
|
+
/**
|
|
69
|
+
* Check if locale is supported by App Store
|
|
70
|
+
*/
|
|
71
|
+
declare function isAppStoreLocale(locale: string): locale is AppStoreLocale;
|
|
72
|
+
/**
|
|
73
|
+
* Check if locale is supported by Google Play
|
|
74
|
+
*/
|
|
75
|
+
declare function isGooglePlayLocale(locale: string): locale is GooglePlayLocale;
|
|
76
|
+
/**
|
|
77
|
+
* Google Play Android Publisher base types
|
|
78
|
+
*/
|
|
79
|
+
type GooglePlayListing = androidpublisher_v3.Schema$Listing;
|
|
80
|
+
type GooglePlayImageType = NonNullable<androidpublisher_v3.Params$Resource$Edits$Images$List["imageType"]>;
|
|
81
|
+
type GooglePlayScreenshotType = Extract<GooglePlayImageType, "phoneScreenshots" | "sevenInchScreenshots" | "tenInchScreenshots" | "tvScreenshots" | "wearScreenshots">;
|
|
82
|
+
/**
|
|
83
|
+
* Google Play screenshots keyed by Android Publisher imageType
|
|
84
|
+
* Includes legacy aliases for existing data structures
|
|
85
|
+
*/
|
|
86
|
+
interface GooglePlayScreenshots extends Partial<Record<GooglePlayScreenshotType, string[]>> {
|
|
87
|
+
phone?: string[];
|
|
88
|
+
tablet?: string[];
|
|
89
|
+
tablet7?: string[];
|
|
90
|
+
tablet10?: string[];
|
|
91
|
+
tv?: string[];
|
|
92
|
+
wear?: string[];
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Google Play Store ASO data
|
|
96
|
+
*/
|
|
97
|
+
interface GooglePlayAsoData extends Pick<GooglePlayListing, "video" | "language"> {
|
|
98
|
+
title: NonNullable<GooglePlayListing["title"]>;
|
|
99
|
+
shortDescription: NonNullable<GooglePlayListing["shortDescription"]>;
|
|
100
|
+
fullDescription: NonNullable<GooglePlayListing["fullDescription"]>;
|
|
101
|
+
screenshots: GooglePlayScreenshots;
|
|
102
|
+
featureGraphic?: string;
|
|
103
|
+
promoGraphic?: string;
|
|
104
|
+
category?: string;
|
|
105
|
+
contentRating?: string;
|
|
106
|
+
keywords?: string[];
|
|
107
|
+
contactEmail?: string;
|
|
108
|
+
contactPhone?: string;
|
|
109
|
+
contactWebsite?: string;
|
|
110
|
+
packageName: string;
|
|
111
|
+
defaultLanguage: string;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Google Play release notes (per version)
|
|
115
|
+
*/
|
|
116
|
+
type GooglePlayReleaseNote = androidpublisher_v3.Schema$TrackRelease;
|
|
117
|
+
/**
|
|
118
|
+
* App Store release notes (per version)
|
|
119
|
+
*/
|
|
120
|
+
type AppStoreReleaseNote = Pick<AppStoreVersionAttributes, "versionString" | "platform"> & {
|
|
121
|
+
releaseNotes: Record<string, NonNullable<AppStoreVersionLocalizationAttributes["whatsNew"]>>;
|
|
122
|
+
releaseDate?: string;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* App Store Connect base types
|
|
126
|
+
*/
|
|
127
|
+
type AppStoreInfoLocalization = AppInfoLocalizationAttributes;
|
|
128
|
+
type AppStoreVersionLocalization = AppStoreVersionLocalizationAttributes;
|
|
129
|
+
type AppStoreScreenshotDisplayType = ScreenshotDisplayType;
|
|
130
|
+
/**
|
|
131
|
+
* App Store screenshots keyed by official display type
|
|
132
|
+
* Includes legacy aliases used in existing data structures
|
|
133
|
+
*/
|
|
134
|
+
interface AppStoreScreenshots extends Partial<Record<AppStoreScreenshotDisplayType, string[]>> {
|
|
135
|
+
iphone65?: string[];
|
|
136
|
+
iphone61?: string[];
|
|
137
|
+
iphone58?: string[];
|
|
138
|
+
iphone55?: string[];
|
|
139
|
+
iphone47?: string[];
|
|
140
|
+
iphone40?: string[];
|
|
141
|
+
ipadPro129?: string[];
|
|
142
|
+
ipadPro11?: string[];
|
|
143
|
+
ipad105?: string[];
|
|
144
|
+
ipad97?: string[];
|
|
145
|
+
appleWatch?: string[];
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* App Store ASO data
|
|
149
|
+
*/
|
|
150
|
+
interface AppStoreAsoData {
|
|
151
|
+
name: NonNullable<AppStoreInfoLocalization["name"]>;
|
|
152
|
+
subtitle?: AppStoreInfoLocalization["subtitle"];
|
|
153
|
+
description: NonNullable<AppStoreVersionLocalization["description"]>;
|
|
154
|
+
keywords?: AppStoreVersionLocalization["keywords"];
|
|
155
|
+
promotionalText?: AppStoreVersionLocalization["promotionalText"];
|
|
156
|
+
screenshots: AppStoreScreenshots;
|
|
157
|
+
appPreview?: string[];
|
|
158
|
+
primaryCategory?: string;
|
|
159
|
+
secondaryCategory?: string;
|
|
160
|
+
contentRightId?: string;
|
|
161
|
+
supportUrl?: AppStoreVersionLocalization["supportUrl"];
|
|
162
|
+
marketingUrl?: AppStoreVersionLocalization["marketingUrl"];
|
|
163
|
+
privacyPolicyUrl?: AppStoreInfoLocalization["privacyPolicyUrl"];
|
|
164
|
+
termsUrl?: string;
|
|
165
|
+
bundleId: string;
|
|
166
|
+
locale: NonNullable<AppStoreVersionLocalization["locale"]>;
|
|
167
|
+
whatsNew?: AppStoreVersionLocalization["whatsNew"];
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Multilingual Google Play ASO data
|
|
171
|
+
*/
|
|
172
|
+
interface GooglePlayMultilingualAsoData {
|
|
173
|
+
locales: {
|
|
174
|
+
[locale: string]: GooglePlayAsoData;
|
|
175
|
+
};
|
|
176
|
+
defaultLocale?: string;
|
|
177
|
+
contactEmail?: string;
|
|
178
|
+
contactWebsite?: string;
|
|
179
|
+
youtubeUrl?: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Multilingual App Store ASO data
|
|
183
|
+
*/
|
|
184
|
+
interface AppStoreMultilingualAsoData {
|
|
185
|
+
locales: {
|
|
186
|
+
[locale: string]: AppStoreAsoData;
|
|
187
|
+
};
|
|
188
|
+
defaultLocale?: string;
|
|
189
|
+
contactEmail?: string;
|
|
190
|
+
supportUrl?: string;
|
|
191
|
+
marketingUrl?: string;
|
|
192
|
+
privacyPolicyUrl?: string;
|
|
193
|
+
termsUrl?: string;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Unified ASO data (format stored in local config.json)
|
|
197
|
+
* Supports single language (legacy compatible) or multilingual structure
|
|
198
|
+
*/
|
|
199
|
+
interface AsoData {
|
|
200
|
+
googlePlay?: GooglePlayAsoData | GooglePlayMultilingualAsoData;
|
|
201
|
+
appStore?: AppStoreAsoData | AppStoreMultilingualAsoData;
|
|
202
|
+
lastSynced?: {
|
|
203
|
+
googlePlay?: string;
|
|
204
|
+
appStore?: string;
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Check if Google Play data is multilingual structure
|
|
209
|
+
*/
|
|
210
|
+
declare function isGooglePlayMultilingual(data: GooglePlayAsoData | GooglePlayMultilingualAsoData | undefined): data is GooglePlayMultilingualAsoData;
|
|
211
|
+
/**
|
|
212
|
+
* Check if App Store data is multilingual structure
|
|
213
|
+
*/
|
|
214
|
+
declare function isAppStoreMultilingual(data: AppStoreAsoData | AppStoreMultilingualAsoData | undefined): data is AppStoreMultilingualAsoData;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Blog type definitions
|
|
218
|
+
* Used by both MCP tools and web application
|
|
219
|
+
*/
|
|
220
|
+
/**
|
|
221
|
+
* Blog Meta Block (raw from HTML comment)
|
|
222
|
+
* All fields are optional as they may be parsed from HTML or defaults
|
|
223
|
+
*/
|
|
224
|
+
interface BlogMetaBlock {
|
|
225
|
+
title: string;
|
|
226
|
+
description: string;
|
|
227
|
+
appSlug: string;
|
|
228
|
+
slug: string;
|
|
229
|
+
locale?: string;
|
|
230
|
+
coverImage?: string;
|
|
231
|
+
publishedAt?: string;
|
|
232
|
+
modifiedAt?: string;
|
|
233
|
+
tags?: string[];
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Blog Meta (resolved with UnifiedLocale)
|
|
237
|
+
* Used by web application after normalization
|
|
238
|
+
*/
|
|
239
|
+
interface BlogMeta extends BlogMetaBlock {
|
|
240
|
+
locale: UnifiedLocale;
|
|
241
|
+
coverImage?: string;
|
|
242
|
+
publishedAt?: string;
|
|
243
|
+
modifiedAt?: string;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Blog Article (complete parsed article with HTML content)
|
|
247
|
+
*/
|
|
248
|
+
interface BlogArticle {
|
|
249
|
+
appSlug: string;
|
|
250
|
+
slug: string;
|
|
251
|
+
locale: UnifiedLocale;
|
|
252
|
+
html: string;
|
|
253
|
+
meta: BlogMeta;
|
|
254
|
+
filePath: string;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Blog Summary (aggregated metadata across locales)
|
|
258
|
+
*/
|
|
259
|
+
interface BlogSummary {
|
|
260
|
+
appSlug: string;
|
|
261
|
+
slug: string;
|
|
262
|
+
title: string;
|
|
263
|
+
description: string;
|
|
264
|
+
coverImage?: string;
|
|
265
|
+
publishedAt?: string;
|
|
266
|
+
modifiedAt?: string;
|
|
267
|
+
locales: UnifiedLocale[];
|
|
268
|
+
defaultLocale: UnifiedLocale;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
interface ImageAsset {
|
|
272
|
+
src: string;
|
|
273
|
+
alt: string;
|
|
274
|
+
width?: number;
|
|
275
|
+
height?: number;
|
|
276
|
+
srcDark?: string;
|
|
277
|
+
}
|
|
278
|
+
interface LandingHero {
|
|
279
|
+
brand?: string;
|
|
280
|
+
logoPath?: string;
|
|
281
|
+
title?: string;
|
|
282
|
+
titleHighlight?: string;
|
|
283
|
+
description: string;
|
|
284
|
+
}
|
|
285
|
+
interface LandingScreenshots {
|
|
286
|
+
title?: string;
|
|
287
|
+
images: Array<{
|
|
288
|
+
imageSrc: string;
|
|
289
|
+
width?: number;
|
|
290
|
+
height?: number;
|
|
291
|
+
title: string;
|
|
292
|
+
description: string;
|
|
293
|
+
}>;
|
|
294
|
+
}
|
|
295
|
+
interface FeatureItem {
|
|
296
|
+
title: string;
|
|
297
|
+
body: string;
|
|
298
|
+
iconPath?: string;
|
|
299
|
+
iconName?: string;
|
|
300
|
+
media?: ImageAsset;
|
|
301
|
+
badge?: string;
|
|
302
|
+
}
|
|
303
|
+
interface LandingFeatures {
|
|
304
|
+
title: string;
|
|
305
|
+
items: FeatureItem[];
|
|
306
|
+
}
|
|
307
|
+
interface Testimonial {
|
|
308
|
+
authorName: string;
|
|
309
|
+
handle?: string;
|
|
310
|
+
avatarPath?: string;
|
|
311
|
+
quote: string;
|
|
312
|
+
rating?: number;
|
|
313
|
+
}
|
|
314
|
+
interface LandingReviews {
|
|
315
|
+
title?: string;
|
|
316
|
+
description?: string;
|
|
317
|
+
testimonials: Testimonial[];
|
|
318
|
+
icons?: string[];
|
|
319
|
+
rating?: number;
|
|
320
|
+
}
|
|
321
|
+
interface LandingCta {
|
|
322
|
+
headline: string;
|
|
323
|
+
icons?: string[];
|
|
324
|
+
rating?: number;
|
|
325
|
+
description?: string;
|
|
326
|
+
}
|
|
327
|
+
interface LandingPage {
|
|
328
|
+
hero: LandingHero;
|
|
329
|
+
screenshots: LandingScreenshots;
|
|
330
|
+
features: LandingFeatures;
|
|
331
|
+
reviews: LandingReviews;
|
|
332
|
+
cta: LandingCta;
|
|
333
|
+
}
|
|
334
|
+
type DeepPartial<T> = T extends (infer U)[] ? Array<DeepPartial<U>> : T extends object ? {
|
|
335
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
336
|
+
} : T;
|
|
337
|
+
type LandingPageLocale = DeepPartial<LandingPage>;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Product Config JSON file type definitions
|
|
341
|
+
* Structure for public/products/{slug}/config.json
|
|
342
|
+
*/
|
|
343
|
+
/**
|
|
344
|
+
* Screenshot metadata
|
|
345
|
+
*/
|
|
346
|
+
interface ProductScreenshots {
|
|
347
|
+
phone?: string[];
|
|
348
|
+
tablet?: string[];
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* App Icon style configuration
|
|
352
|
+
*/
|
|
353
|
+
interface AppIconStyleConfig {
|
|
354
|
+
backgroundColor?: string;
|
|
355
|
+
alignment?: "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* App Icon configuration
|
|
359
|
+
*/
|
|
360
|
+
interface AppIconConfig {
|
|
361
|
+
/** Default background color for app icons (hex format, e.g., "#FFFFFF") */
|
|
362
|
+
defaultBackgroundColor?: string;
|
|
363
|
+
/** Default logo alignment */
|
|
364
|
+
defaultAlignment?: "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
365
|
+
/** Style-specific configurations (e.g., christmas, halloween) */
|
|
366
|
+
styles?: Record<string, AppIconStyleConfig>;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Product Metadata (store-common metadata)
|
|
370
|
+
*/
|
|
371
|
+
interface ProductMetadata {
|
|
372
|
+
category?: string;
|
|
373
|
+
contactEmail?: string;
|
|
374
|
+
instagram?: string;
|
|
375
|
+
supportUrl?: string;
|
|
376
|
+
marketingUrl?: string;
|
|
377
|
+
termsUrl?: string;
|
|
378
|
+
privacyUrl?: string;
|
|
379
|
+
youtubeUrl?: string;
|
|
380
|
+
screenshots?: ProductScreenshots;
|
|
381
|
+
featureGraphic?: string;
|
|
382
|
+
/** Background color for screenshot resizing (hex format, e.g., "#FFFFFF") */
|
|
383
|
+
screenshotBgColor?: string;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Product Content settings
|
|
387
|
+
*/
|
|
388
|
+
interface ProductContent {
|
|
389
|
+
defaultLocale?: string;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Product Config (complete config.json structure)
|
|
393
|
+
*
|
|
394
|
+
* Based on actual config.json file structure,
|
|
395
|
+
* includes additional fields used by existing code.
|
|
396
|
+
*/
|
|
397
|
+
interface ProductConfig {
|
|
398
|
+
slug: string;
|
|
399
|
+
order?: number;
|
|
400
|
+
appStoreAppId?: string;
|
|
401
|
+
packageName?: string;
|
|
402
|
+
bundleId?: string;
|
|
403
|
+
isHiddenAtHomepage?: boolean;
|
|
404
|
+
layoutColors?: LayoutColors;
|
|
405
|
+
metadata?: ProductMetadata;
|
|
406
|
+
content?: ProductContent;
|
|
407
|
+
appIcon?: AppIconConfig;
|
|
408
|
+
name?: string;
|
|
409
|
+
tagline?: string;
|
|
410
|
+
webUrl?: string;
|
|
411
|
+
hasDetailPage?: boolean;
|
|
412
|
+
isDarkIcon?: boolean;
|
|
413
|
+
landing?: LandingPage;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
interface LayoutColors {
|
|
417
|
+
bg?: string;
|
|
418
|
+
fg?: string;
|
|
419
|
+
fgMuted?: string;
|
|
420
|
+
muted?: string;
|
|
421
|
+
accentGrad?: string;
|
|
422
|
+
}
|
|
423
|
+
interface AppMetaLinks {
|
|
424
|
+
privacyPath: string;
|
|
425
|
+
termsPath: string;
|
|
426
|
+
backPath: string;
|
|
427
|
+
}
|
|
428
|
+
interface AppPageData {
|
|
429
|
+
product?: ProductConfig;
|
|
430
|
+
links: AppMetaLinks;
|
|
431
|
+
privacy: string;
|
|
432
|
+
terms: string;
|
|
433
|
+
layoutColors?: LayoutColors;
|
|
434
|
+
landing?: LandingPage;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
interface AsoTemplate {
|
|
438
|
+
intro: string;
|
|
439
|
+
keyFeaturesHeading?: string;
|
|
440
|
+
featuresHeading?: string;
|
|
441
|
+
outro: string;
|
|
442
|
+
includeSupportLinks?: boolean;
|
|
443
|
+
}
|
|
444
|
+
interface AsoLocaleContent {
|
|
445
|
+
title?: string;
|
|
446
|
+
subtitle?: string;
|
|
447
|
+
shortDescription?: string;
|
|
448
|
+
keywords?: string[] | string;
|
|
449
|
+
template?: AsoTemplate;
|
|
450
|
+
}
|
|
451
|
+
interface ProductLocale {
|
|
452
|
+
aso?: AsoLocaleContent;
|
|
453
|
+
landing?: LandingPageLocale;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Site data type definitions
|
|
458
|
+
* Structure for public/site/ directory
|
|
459
|
+
* - config.json: Site configuration (supported locales, default locale)
|
|
460
|
+
* - contacts.json: Contact information
|
|
461
|
+
* - locales/en-US.json: Localized content (meta, hero, developer)
|
|
462
|
+
*/
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Site configuration for locale support
|
|
466
|
+
* Stored in public/site/config.json
|
|
467
|
+
*/
|
|
468
|
+
interface SiteConfig {
|
|
469
|
+
/** List of locales supported by this site */
|
|
470
|
+
supportedLocales: UnifiedLocale[];
|
|
471
|
+
/** Default locale for fallback */
|
|
472
|
+
defaultLocale: UnifiedLocale;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Locale display information for UI components
|
|
476
|
+
*/
|
|
477
|
+
interface LocaleDisplayInfo {
|
|
478
|
+
/** Locale code (e.g., "en-US", "ko-KR") */
|
|
479
|
+
code: UnifiedLocale;
|
|
480
|
+
/** English name of the language */
|
|
481
|
+
name: string;
|
|
482
|
+
/** Native name of the language */
|
|
483
|
+
nativeName: string;
|
|
484
|
+
/** Flag emoji */
|
|
485
|
+
flag: string;
|
|
486
|
+
}
|
|
487
|
+
interface SiteData {
|
|
488
|
+
meta: {
|
|
489
|
+
title: string;
|
|
490
|
+
description: string;
|
|
491
|
+
};
|
|
492
|
+
hero: {
|
|
493
|
+
brand: string;
|
|
494
|
+
tagline: string;
|
|
495
|
+
subtitle: string;
|
|
496
|
+
};
|
|
497
|
+
contacts: {
|
|
498
|
+
id: string;
|
|
499
|
+
label: string;
|
|
500
|
+
icon: string;
|
|
501
|
+
value: string;
|
|
502
|
+
}[];
|
|
503
|
+
developer: {
|
|
504
|
+
name: string;
|
|
505
|
+
heading: string;
|
|
506
|
+
role: string;
|
|
507
|
+
bio: string;
|
|
508
|
+
principles: string[];
|
|
509
|
+
stack: string[];
|
|
510
|
+
now: string;
|
|
511
|
+
availability: string;
|
|
512
|
+
likes: string[];
|
|
513
|
+
location?: string;
|
|
514
|
+
timezone?: string;
|
|
515
|
+
visited: {
|
|
516
|
+
countries: {
|
|
517
|
+
code: string;
|
|
518
|
+
name: string;
|
|
519
|
+
flagEmoji: string;
|
|
520
|
+
cities: string[];
|
|
521
|
+
}[];
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Types for the create-blog-html MCP tool
|
|
528
|
+
*/
|
|
529
|
+
/**
|
|
530
|
+
* BlogMetaOutput for MCP tool output
|
|
531
|
+
* All fields are required (resolved values)
|
|
532
|
+
* Note: This is separate from blog.types.ts BlogMeta which uses UnifiedLocale
|
|
533
|
+
*/
|
|
534
|
+
interface BlogMetaOutput {
|
|
535
|
+
title: string;
|
|
536
|
+
description: string;
|
|
537
|
+
appSlug: string;
|
|
538
|
+
slug: string;
|
|
539
|
+
locale: string;
|
|
540
|
+
publishedAt: string;
|
|
541
|
+
modifiedAt: string;
|
|
542
|
+
coverImage: string;
|
|
543
|
+
tags: string[];
|
|
544
|
+
}
|
|
545
|
+
interface CreateBlogHtmlInput {
|
|
546
|
+
/**
|
|
547
|
+
* Product/app slug used for paths and CTAs.
|
|
548
|
+
* Defaults to "developer-journal" when not provided.
|
|
549
|
+
*/
|
|
550
|
+
appSlug: string;
|
|
551
|
+
/**
|
|
552
|
+
* English title used for slug creation and H1
|
|
553
|
+
*/
|
|
554
|
+
title?: string;
|
|
555
|
+
/**
|
|
556
|
+
* Topic/angle to cover inside the article body
|
|
557
|
+
*/
|
|
558
|
+
topic: string;
|
|
559
|
+
/**
|
|
560
|
+
* Single locale to generate (REQUIRED). Ignored when locales[] is provided.
|
|
561
|
+
*/
|
|
562
|
+
locale: string;
|
|
563
|
+
/**
|
|
564
|
+
* Optional list of locales to generate. Each gets its own HTML file.
|
|
565
|
+
*/
|
|
566
|
+
locales?: string[];
|
|
567
|
+
/**
|
|
568
|
+
* HTML content for the blog body. REQUIRED. The LLM must generate this based on the topic and locale.
|
|
569
|
+
* Structure should follow public/en-US.html pattern.
|
|
570
|
+
*/
|
|
571
|
+
content: string;
|
|
572
|
+
/**
|
|
573
|
+
* Meta description override. If absent, a locale-aware summary is generated from topic/appSlug.
|
|
574
|
+
*/
|
|
575
|
+
description?: string;
|
|
576
|
+
/**
|
|
577
|
+
* Optional tags for BLOG_META. If absent, tags are derived from topic and appSlug.
|
|
578
|
+
*/
|
|
579
|
+
tags?: string[];
|
|
580
|
+
/**
|
|
581
|
+
* Optional cover image. Relative paths are rewritten to /blogs/<app>/<slug>/...
|
|
582
|
+
*/
|
|
583
|
+
coverImage?: string;
|
|
584
|
+
/**
|
|
585
|
+
* Include a relative image example in the body (./images/hero.png by default).
|
|
586
|
+
*/
|
|
587
|
+
includeRelativeImageExample?: boolean;
|
|
588
|
+
/**
|
|
589
|
+
* Override the relative image path used when includeRelativeImageExample is true.
|
|
590
|
+
*/
|
|
591
|
+
relativeImagePath?: string;
|
|
592
|
+
/**
|
|
593
|
+
* Publish date (YYYY-MM-DD). Defaults to today.
|
|
594
|
+
*/
|
|
595
|
+
publishedAt?: string;
|
|
596
|
+
/**
|
|
597
|
+
* Last modified date (YYYY-MM-DD). Defaults to publishedAt.
|
|
598
|
+
*/
|
|
599
|
+
modifiedAt?: string;
|
|
600
|
+
/**
|
|
601
|
+
* Overwrite existing HTML files when true (default false).
|
|
602
|
+
*/
|
|
603
|
+
overwrite?: boolean;
|
|
604
|
+
}
|
|
605
|
+
interface GeneratedBlogFile {
|
|
606
|
+
locale: string;
|
|
607
|
+
path: string;
|
|
608
|
+
}
|
|
609
|
+
interface CreateBlogHtmlResult {
|
|
610
|
+
slug: string;
|
|
611
|
+
baseDir: string;
|
|
612
|
+
files: GeneratedBlogFile[];
|
|
613
|
+
coverImage: string;
|
|
614
|
+
metaByLocale: Record<string, BlogMetaOutput>;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Locale conversion utilities for ASO platforms
|
|
619
|
+
* Handles conversion between unified locales and platform-specific locale codes
|
|
620
|
+
*/
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Convert unified locale to App Store Connect locale
|
|
624
|
+
* Returns null if the locale is not supported by App Store
|
|
625
|
+
*
|
|
626
|
+
* @param locale - Unified locale code (e.g., "ar", "zh-Hans")
|
|
627
|
+
* @returns App Store locale code (e.g., "ar-SA", "zh-Hans") or null
|
|
628
|
+
*
|
|
629
|
+
* @example
|
|
630
|
+
* unifiedToAppStore("ar") // Returns "ar-SA"
|
|
631
|
+
* unifiedToAppStore("zh-Hans") // Returns "zh-Hans"
|
|
632
|
+
* unifiedToAppStore("en-IN") // Returns null (not supported)
|
|
633
|
+
*/
|
|
634
|
+
declare function unifiedToAppStore(locale: UnifiedLocale): string | null;
|
|
635
|
+
/**
|
|
636
|
+
* Convert unified locale to Google Play Console locale
|
|
637
|
+
* Returns null if the locale is not supported by Google Play
|
|
638
|
+
*
|
|
639
|
+
* @param locale - Unified locale code (e.g., "ar", "zh-Hans")
|
|
640
|
+
* @returns Google Play locale code (e.g., "ar-SA", "zh-CN") or null
|
|
641
|
+
*
|
|
642
|
+
* @example
|
|
643
|
+
* unifiedToGooglePlay("ar") // Returns "ar-SA"
|
|
644
|
+
* unifiedToGooglePlay("zh-Hans") // Returns "zh-CN"
|
|
645
|
+
* unifiedToGooglePlay("bg-BG") // Returns "bg-BG"
|
|
646
|
+
*/
|
|
647
|
+
declare function unifiedToGooglePlay(locale: UnifiedLocale): string | null;
|
|
648
|
+
/**
|
|
649
|
+
* Convert unified locale to both platforms
|
|
650
|
+
* Returns an object with App Store and Google Play locale codes
|
|
651
|
+
*
|
|
652
|
+
* @param locale - Unified locale code
|
|
653
|
+
* @returns Object with appStore and googlePlay locale codes (or null if not supported)
|
|
654
|
+
*
|
|
655
|
+
* @example
|
|
656
|
+
* unifiedToBothPlatforms("ar")
|
|
657
|
+
* // Returns { appStore: "ar-SA", googlePlay: "ar-SA" }
|
|
658
|
+
*
|
|
659
|
+
* unifiedToBothPlatforms("zh-Hans")
|
|
660
|
+
* // Returns { appStore: "zh-Hans", googlePlay: "zh-CN" }
|
|
661
|
+
*/
|
|
662
|
+
declare function unifiedToBothPlatforms(locale: UnifiedLocale): {
|
|
663
|
+
appStore: string | null;
|
|
664
|
+
googlePlay: string | null;
|
|
665
|
+
};
|
|
666
|
+
/**
|
|
667
|
+
* Convert App Store Connect locale to unified locale
|
|
668
|
+
* Returns the default locale if the App Store locale is not recognized
|
|
669
|
+
*
|
|
670
|
+
* @param locale - App Store locale code (e.g., "ar-SA", "zh-Hans")
|
|
671
|
+
* @returns Unified locale code (e.g., "ar", "zh-Hans")
|
|
672
|
+
*
|
|
673
|
+
* @example
|
|
674
|
+
* appStoreToUnified("ar-SA") // Returns "ar"
|
|
675
|
+
* appStoreToUnified("zh-Hans") // Returns "zh-Hans"
|
|
676
|
+
* appStoreToUnified("es-MX") // Returns "es-419"
|
|
677
|
+
*/
|
|
678
|
+
declare function appStoreToUnified(locale: string): UnifiedLocale;
|
|
679
|
+
/**
|
|
680
|
+
* Convert Google Play Console locale to unified locale
|
|
681
|
+
* Returns the default locale if the Google Play locale is not recognized
|
|
682
|
+
*
|
|
683
|
+
* @param locale - Google Play locale code (e.g., "ar-SA", "zh-CN")
|
|
684
|
+
* @returns Unified locale code (e.g., "ar", "zh-Hans")
|
|
685
|
+
*
|
|
686
|
+
* @example
|
|
687
|
+
* googlePlayToUnified("ar-SA") // Returns "ar"
|
|
688
|
+
* googlePlayToUnified("zh-CN") // Returns "zh-Hans"
|
|
689
|
+
* googlePlayToUnified("zh-TW") // Returns "zh-Hant"
|
|
690
|
+
*/
|
|
691
|
+
declare function googlePlayToUnified(locale: string): UnifiedLocale;
|
|
692
|
+
/**
|
|
693
|
+
* Convert multiple unified locales to App Store locales
|
|
694
|
+
* Filters out locales not supported by App Store
|
|
695
|
+
*
|
|
696
|
+
* @param locales - Array of unified locale codes
|
|
697
|
+
* @returns Array of App Store locale codes (excluding unsupported locales)
|
|
698
|
+
*
|
|
699
|
+
* @example
|
|
700
|
+
* unifiedToAppStoreBatch(["ar", "zh-Hans", "en-IN"])
|
|
701
|
+
* // Returns ["ar-SA", "zh-Hans"] (en-IN is not supported by App Store)
|
|
702
|
+
*/
|
|
703
|
+
declare function unifiedToAppStoreBatch(locales: UnifiedLocale[]): string[];
|
|
704
|
+
/**
|
|
705
|
+
* Convert multiple unified locales to Google Play locales
|
|
706
|
+
* Filters out locales not supported by Google Play
|
|
707
|
+
*
|
|
708
|
+
* @param locales - Array of unified locale codes
|
|
709
|
+
* @returns Array of Google Play locale codes (excluding unsupported locales)
|
|
710
|
+
*
|
|
711
|
+
* @example
|
|
712
|
+
* unifiedToGooglePlayBatch(["ar", "zh-Hans", "bg-BG"])
|
|
713
|
+
* // Returns ["ar-SA", "zh-CN", "bg-BG"]
|
|
714
|
+
*/
|
|
715
|
+
declare function unifiedToGooglePlayBatch(locales: UnifiedLocale[]): string[];
|
|
716
|
+
/**
|
|
717
|
+
* Convert multiple App Store locales to unified locales
|
|
718
|
+
*
|
|
719
|
+
* @param locales - Array of App Store locale codes
|
|
720
|
+
* @returns Array of unified locale codes
|
|
721
|
+
*
|
|
722
|
+
* @example
|
|
723
|
+
* appStoreToUnifiedBatch(["ar-SA", "zh-Hans", "es-MX"])
|
|
724
|
+
* // Returns ["ar", "zh-Hans", "es-419"]
|
|
725
|
+
*/
|
|
726
|
+
declare function appStoreToUnifiedBatch(locales: string[]): UnifiedLocale[];
|
|
727
|
+
/**
|
|
728
|
+
* Convert multiple Google Play locales to unified locales
|
|
729
|
+
*
|
|
730
|
+
* @param locales - Array of Google Play locale codes
|
|
731
|
+
* @returns Array of unified locale codes
|
|
732
|
+
*
|
|
733
|
+
* @example
|
|
734
|
+
* googlePlayToUnifiedBatch(["ar-SA", "zh-CN", "zh-TW"])
|
|
735
|
+
* // Returns ["ar", "zh-Hans", "zh-Hant"]
|
|
736
|
+
*/
|
|
737
|
+
declare function googlePlayToUnifiedBatch(locales: string[]): UnifiedLocale[];
|
|
738
|
+
/**
|
|
739
|
+
* Convert App Store locale to Google Play locale
|
|
740
|
+
* Goes through unified locale as intermediate step
|
|
741
|
+
*
|
|
742
|
+
* @param locale - App Store locale code
|
|
743
|
+
* @returns Google Play locale code or null if conversion not possible
|
|
744
|
+
*
|
|
745
|
+
* @example
|
|
746
|
+
* appStoreToGooglePlay("ar-SA") // Returns "ar-SA"
|
|
747
|
+
* appStoreToGooglePlay("zh-Hans") // Returns "zh-CN"
|
|
748
|
+
* appStoreToGooglePlay("es-MX") // Returns "es-419"
|
|
749
|
+
*/
|
|
750
|
+
declare function appStoreToGooglePlay(locale: string): string | null;
|
|
751
|
+
/**
|
|
752
|
+
* Convert Google Play locale to App Store locale
|
|
753
|
+
* Goes through unified locale as intermediate step
|
|
754
|
+
*
|
|
755
|
+
* @param locale - Google Play locale code
|
|
756
|
+
* @returns App Store locale code or null if conversion not possible
|
|
757
|
+
*
|
|
758
|
+
* @example
|
|
759
|
+
* googlePlayToAppStore("ar-SA") // Returns "ar-SA"
|
|
760
|
+
* googlePlayToAppStore("zh-CN") // Returns "zh-Hans"
|
|
761
|
+
* googlePlayToAppStore("zh-TW") // Returns "zh-Hant"
|
|
762
|
+
* googlePlayToAppStore("en-IN") // Returns null (not supported by App Store)
|
|
763
|
+
*/
|
|
764
|
+
declare function googlePlayToAppStore(locale: string): string | null;
|
|
765
|
+
/**
|
|
766
|
+
* Convert an object with unified locale keys to App Store locale keys
|
|
767
|
+
* Useful for converting locale-based data structures
|
|
768
|
+
*
|
|
769
|
+
* @param data - Object with unified locale keys
|
|
770
|
+
* @returns Object with App Store locale keys (excluding unsupported locales)
|
|
771
|
+
*
|
|
772
|
+
* @example
|
|
773
|
+
* convertObjectToAppStore({
|
|
774
|
+
* "ar": "مرحبا",
|
|
775
|
+
* "zh-Hans": "你好",
|
|
776
|
+
* "en-IN": "Hello"
|
|
777
|
+
* })
|
|
778
|
+
* // Returns { "ar-SA": "مرحبا", "zh-Hans": "你好" }
|
|
779
|
+
*/
|
|
780
|
+
declare function convertObjectToAppStore<T>(data: Record<UnifiedLocale, T>): Record<string, T>;
|
|
781
|
+
/**
|
|
782
|
+
* Convert an object with unified locale keys to Google Play locale keys
|
|
783
|
+
* Useful for converting locale-based data structures
|
|
784
|
+
*
|
|
785
|
+
* @param data - Object with unified locale keys
|
|
786
|
+
* @returns Object with Google Play locale keys (excluding unsupported locales)
|
|
787
|
+
*
|
|
788
|
+
* @example
|
|
789
|
+
* convertObjectToGooglePlay({
|
|
790
|
+
* "ar": "مرحبا",
|
|
791
|
+
* "zh-Hans": "你好",
|
|
792
|
+
* "zh-Hant": "你好"
|
|
793
|
+
* })
|
|
794
|
+
* // Returns { "ar-SA": "مرحبا", "zh-CN": "你好", "zh-TW": "你好" }
|
|
795
|
+
*/
|
|
796
|
+
declare function convertObjectToGooglePlay<T>(data: Record<UnifiedLocale, T>): Record<string, T>;
|
|
797
|
+
/**
|
|
798
|
+
* Convert an object with App Store locale keys to unified locale keys
|
|
799
|
+
* Useful for converting locale-based data structures from App Store
|
|
800
|
+
*
|
|
801
|
+
* @param data - Object with App Store locale keys
|
|
802
|
+
* @returns Object with unified locale keys
|
|
803
|
+
*
|
|
804
|
+
* @example
|
|
805
|
+
* convertObjectFromAppStore({
|
|
806
|
+
* "ar-SA": "مرحبا",
|
|
807
|
+
* "zh-Hans": "你好",
|
|
808
|
+
* "es-MX": "Hola"
|
|
809
|
+
* })
|
|
810
|
+
* // Returns { "ar": "مرحبا", "zh-Hans": "你好", "es-419": "Hola" }
|
|
811
|
+
*/
|
|
812
|
+
declare function convertObjectFromAppStore<T>(data: Record<string, T>): Record<UnifiedLocale, T>;
|
|
813
|
+
/**
|
|
814
|
+
* Convert an object with Google Play locale keys to unified locale keys
|
|
815
|
+
* Useful for converting locale-based data structures from Google Play
|
|
816
|
+
*
|
|
817
|
+
* @param data - Object with Google Play locale keys
|
|
818
|
+
* @returns Object with unified locale keys
|
|
819
|
+
*
|
|
820
|
+
* @example
|
|
821
|
+
* convertObjectFromGooglePlay({
|
|
822
|
+
* "ar-SA": "مرحبا",
|
|
823
|
+
* "zh-CN": "你好",
|
|
824
|
+
* "zh-TW": "你好"
|
|
825
|
+
* })
|
|
826
|
+
* // Returns { "ar": "مرحبا", "zh-Hans": "你好", "zh-Hant": "你好" }
|
|
827
|
+
*/
|
|
828
|
+
declare function convertObjectFromGooglePlay<T>(data: Record<string, T>): Record<UnifiedLocale, T>;
|
|
829
|
+
|
|
830
|
+
export { type ProductConfig as $, APP_STORE_TO_UNIFIED as A, type BlogMetaBlock as B, type BlogArticle as C, DEFAULT_LOCALE as D, type BlogSummary as E, type AppMetaLinks as F, GOOGLE_PLAY_TO_UNIFIED as G, type AppPageData as H, type ImageAsset as I, type LandingHero as J, type LandingScreenshots as K, type LayoutColors as L, type FeatureItem as M, type LandingFeatures as N, type LandingReviews as O, type LandingCta as P, type LandingPage as Q, type DeepPartial as R, type SupportedLocale as S, type Testimonial as T, UNIFIED_LOCALES as U, type LandingPageLocale as V, type ProductScreenshots as W, type AppIconStyleConfig as X, type AppIconConfig as Y, type ProductMetadata as Z, type ProductContent as _, UNIFIED_TO_APP_STORE as a, type AsoTemplate as a0, type AsoLocaleContent as a1, type ProductLocale as a2, type SiteConfig as a3, type LocaleDisplayInfo as a4, type SiteData as a5, type BlogMetaOutput as a6, type CreateBlogHtmlInput as a7, type GeneratedBlogFile as a8, type CreateBlogHtmlResult as a9, unifiedToAppStore as aa, unifiedToGooglePlay as ab, unifiedToBothPlatforms as ac, appStoreToUnified as ad, googlePlayToUnified as ae, unifiedToAppStoreBatch as af, unifiedToGooglePlayBatch as ag, appStoreToUnifiedBatch as ah, googlePlayToUnifiedBatch as ai, appStoreToGooglePlay as aj, googlePlayToAppStore as ak, convertObjectToAppStore as al, convertObjectToGooglePlay as am, convertObjectFromAppStore as an, convertObjectFromGooglePlay as ao, UNIFIED_TO_GOOGLE_PLAY as b, type UnifiedLocale as c, type AppStoreLocale as d, type GooglePlayLocale as e, isAppStoreLocale as f, isGooglePlayLocale as g, type GooglePlayListing as h, isSupportedLocale as i, type GooglePlayImageType as j, type GooglePlayScreenshotType as k, type GooglePlayScreenshots as l, type GooglePlayAsoData as m, type GooglePlayReleaseNote as n, type AppStoreReleaseNote as o, type AppStoreInfoLocalization as p, type AppStoreVersionLocalization as q, type AppStoreScreenshotDisplayType as r, type AppStoreScreenshots as s, type AppStoreAsoData as t, type GooglePlayMultilingualAsoData as u, type AppStoreMultilingualAsoData as v, type AsoData as w, isGooglePlayMultilingual as x, isAppStoreMultilingual as y, type BlogMeta as z };
|