@capgo/cli
Version:
A CLI to upload to capgo servers
37 lines (36 loc) • 1.52 kB
TypeScript
import type { AppTodoProgress } from '../app/todo';
import type { AgentTrial } from '../shared/agent-notices';
export type LocalOnboardingStep = 'add_code' | 'add_updater';
interface Billing {
orgId: string;
trialEndsAt: string | null;
/** Org created without a free trial (direct offer): never mention a trial. */
trialSkipped?: boolean;
plansUrl: string;
}
export type SetupNotice = {
appId: string;
secondary: string[];
} & ({
kind: 'setup';
product: string;
title?: string;
instruction?: string;
action: string;
billing?: Billing;
} | {
kind: 'plan';
completed: string[];
billing: Billing;
} | {
kind: 'trial';
billing: Billing;
});
export declare function getSetupNotice(appId: string, progress: AppTodoProgress, webHost?: string): SetupNotice | undefined;
/** The org's active free trial from an `includeBilling` progress snapshot. */
export declare function getAgentTrial(progress: AppTodoProgress, webHost?: string, now?: number): AgentTrial | undefined;
/** Agents still see an active trial when no setup notice applies. */
export declare function getTrialNotice(appId: string, progress: AppTodoProgress, webHost?: string, now?: number): SetupNotice | undefined;
export declare function formatSetupNotice(notice: SetupNotice | undefined, now?: number, agent?: boolean): string | undefined;
export declare function reconcileSetupProgress(progress: AppTodoProgress, reported: readonly LocalOnboardingStep[]): AppTodoProgress;
export {};