CLI: storebound apps list | check (apps on a store account, account health with fixes); serve apps.list, account.check and store-only apps through a generated config

This commit is contained in:
CRTkafa 2026-10-10 19:53:52 +00:00
parent 1eb3f0768d
commit dbde48d33c
6 changed files with 697 additions and 13 deletions

View file

@ -29,7 +29,7 @@ export interface MethodDescriptor {
method: string;
title: string;
description: string;
kind: 'read' | 'write' | 'session' | 'system' | 'portfolio';
kind: 'read' | 'write' | 'session' | 'system' | 'portfolio' | 'account';
/** Talks to a store API or the internet. */
network: boolean;
/** Replaces existing data on a store (screenshots, whole forms). */
@ -154,6 +154,8 @@ export interface AppStatus {
/** Release trains; `source: none` offline (no store data read). `all`: every store release read (live only). */
release: { source: 'none' | 'live'; current: ReleaseTrain | null; next: ReleaseTrain | null; all?: StoreRelease[] };
catalog: CatalogParity | null;
/** A store-only app read through a generated config (no app folder). */
virtual?: boolean;
/** live only: per-platform read errors ("unknown, never false"). */
storeErrors: { ios?: string; android?: string };
errors: string[];
@ -204,3 +206,44 @@ export interface DraftsResult { dir: string; drafts: ReplyDraft[]; problems: str
/** project.icon: the icon as a data: URL (PNG / JPEG / WebP / SVG, at most 1.5 MB), or null. */
export interface IconResult { path: string | null; dataUrl: string | null }
// ---- Store accounts and the apps on them (D3: many studios, many accounts) ----
/** One app record on a store, as `storebound apps list` reads it. */
export interface StoreApp {
store: 'ios' | 'android';
/** App Store Connect app id (numeric) / Play package name. */
id: string;
/** iOS bundle id / Android package name. */
bundleId: string;
name: string;
/** App Store version platforms (IOS, MAC_OS, TV_OS, VISION_OS); ["ANDROID"] on Play. */
platforms: string[];
sku?: string | null;
primaryLocale?: string | null;
/** Newest App Store version and its state (App Store only). */
latest?: { version: string; state: string; platform?: string | null } | null;
/** 128 px icon as a data: URL (with --icons), else null. */
icon?: string | null;
}
export interface AppsListResult { store: 'ios' | 'android'; apps: StoreApp[]; warnings: string[]; at: string }
/** Health of one store account: does the key work, and can it see apps. */
export interface AccountCheck {
store: 'ios' | 'android';
status: 'ok' | 'no-apps' | 'permission' | 'revoked' | 'api-disabled' | 'error';
/** Play: the service account email (to invite in Play Console). Never a secret. */
principal: string | null;
apps: number | null;
message: string;
/** What to do, in words. */
fix: string | null;
docs: string | null;
}
/**
* A store-only app (no app folder yet): the sidecar reads it through a generated minimal config (store ids only) in
* its temp folder. Read methods only.
*/
export interface VirtualProject { name: string; apple?: { bundleId: string; appId?: string | null } | null; play?: { packageName: string } | null }