import { HubSpotPromise } from '@hubspot/local-dev-lib/types/Http'; import { UNMIGRATABLE_REASONS } from '@hubspot/local-dev-lib/constants/projects'; import { MIGRATION_STATUS } from '@hubspot/local-dev-lib/types/Migration'; interface BaseMigrationApp { appId: number; appName: string; isMigratable: boolean; migrationComponents: ListAppsMigrationComponent[]; projectName?: string; } export interface MigratableApp extends BaseMigrationApp { isMigratable: true; unmigratableReason?: undefined; } export declare const CLI_UNMIGRATABLE_REASONS: { readonly PART_OF_PROJECT_ALREADY: "PART_OF_PROJECT_ALREADY"; }; export interface UnmigratableApp extends BaseMigrationApp { isMigratable: false; unmigratableReason: keyof typeof UNMIGRATABLE_REASONS | keyof typeof CLI_UNMIGRATABLE_REASONS; } export type MigrationApp = MigratableApp | UnmigratableApp; export interface ListAppsResponse { migratableApps: MigratableApp[]; unmigratableApps: UnmigratableApp[]; } export interface ListThemesResponse { migratableThemes: { THEME: string[]; REACT_THEME: string[]; }; } export interface InitializeAppMigrationResponse { migrationId: number; } export interface ListAppsMigrationComponent { id: string; componentType: string; isSupported: boolean; } export type ContinueAppMigrationResponse = { migrationId: number; }; export interface MigrationBaseStatus { id: number; } export interface MigrationInProgress extends MigrationBaseStatus { status: typeof MIGRATION_STATUS.IN_PROGRESS; } export interface MigrationInputRequired extends MigrationBaseStatus { status: typeof MIGRATION_STATUS.INPUT_REQUIRED; componentsRequiringUids: Record; } export interface MigrationSuccess extends MigrationBaseStatus { status: typeof MIGRATION_STATUS.SUCCESS; buildId: number; } interface ComponentError { componentType: string; developerSymbol?: string; errorMessage: string; } export interface MigrationFailed extends MigrationBaseStatus { status: typeof MIGRATION_STATUS.FAILURE; projectErrorDetail: string; componentErrors: ComponentError[]; } export type MigrationStatus = MigrationInProgress | MigrationInputRequired | MigrationSuccess | MigrationFailed; export declare function isMigrationStatus(error: unknown): error is MigrationStatus; export declare function listAppsForMigration(accountId: number, platformVersion: string, appId: number | undefined): HubSpotPromise; export declare function initializeAppMigration(accountId: number, applicationId: number, platformVersion: string): HubSpotPromise; export declare function continueAppMigration(portalId: number, migrationId: number, componentUids: Record, projectName: string): HubSpotPromise; export declare function checkMigrationStatusV2(accountId: number, id: number): HubSpotPromise; export {};