import { Build, SubbuildStatus } from '@hubspot/local-dev-lib/types/Build'; import { Deploy, SubdeployStatus } from '@hubspot/local-dev-lib/types/Deploy'; import { appComponent, marketplaceDistribution, oAuth, privateDistribution, staticAuth } from '../lib/constants.js'; export type ProjectTemplate = { name: string; label: string; path: string; }; export type ComponentTemplate = { path: string; label: string; type: string; cliSelector?: string; parentComponent?: string; supportedAuthTypes?: string[]; supportedDistributions?: string[]; }; export type ComponentTemplateChoice = { name: string; value: ComponentTemplate; disabled?: string | boolean; }; export type ProjectConfig = { name: string; srcDir: string; platformVersion: string; }; export type ProjectTaskStates = { BUILDING?: string; ENQUEUED?: string; DEPLOYING?: string; FAILURE: string; PENDING: string; SUCCESS: string; }; export type ProjectTask = Build | Deploy; export type ProjectSubtask = SubbuildStatus | SubdeployStatus; export type ProjectPollStatusFunctionText = { STATES: ProjectTaskStates; STATUS_TEXT: string; TYPE_KEY: string; SUBTASK_NAME_KEY: string; }; export type ParentComponent = { label: string; type: typeof appComponent; authType: typeof staticAuth | typeof oAuth; distribution: typeof privateDistribution | typeof marketplaceDistribution; path: string; }; export type ProjectTemplateRepoConfig = { projects?: ProjectTemplate[]; components?: ComponentTemplate[]; defaultFiles?: string; parentComponents?: ParentComponent[]; }; export type ProjectPollResult = { succeeded: boolean; buildId: number; buildResult: Build; deployResult: Deploy | null; }; export type PrivateAppComponentConfig = { name: string; description: string; uid: string; scopes: Array; public: boolean; extensions?: { crm: { cards: Array<{ file: string; }>; }; }; }; export type PublicAppComponentConfig = { name: string; uid: string; description: string; allowedUrls: Array; auth: { redirectUrls: Array; requiredScopes: Array; optionalScopes: Array; conditionallyRequiredScopes: Array; }; support: { supportEmail: string; documentationUrl: string; supportUrl: string; supportPhone: string; }; extensions?: { crm: { cards: Array<{ file: string; }>; }; }; webhooks?: { file: string; }; }; export type AppCardComponentConfig = { type: 'crm-card'; data: { title: string; uid: string; location: string; module: { file: string; }; objectTypes: Array<{ name: string; }>; }; }; export type GenericComponentConfig = PublicAppComponentConfig | PrivateAppComponentConfig | AppCardComponentConfig; export type ProjectInfo = { projectName: string; platformVersion: string; projectId: number; deployedBuildId: number; autoDeployEnabled: boolean; projectUrl?: string; app?: { name: string; id: number; uid: string; authType?: string; distributionType?: string; }; components: { uid: string; type: string; }[]; }; export declare enum ComponentTypes { PrivateApp = "private-app", PublicApp = "public-app", HublTheme = "hubl-theme" } export type Component = { type: ComponentTypes; config: T; runnable: boolean; path: string; };