import { File, MetadataTemplateFieldTypeEnum } from '../../types/openapi'; export type EmbedLocation = 'ui_app' | 'canvas' | 'dsr' | 'admin_instance' | 'overlay_app' | 'canvas_section_execution' | 'canvas_drawer'; export type ModuleSettingsOption = { label: string; value: string; }; export type ModuleSettingsField = { type: MetadataTemplateFieldTypeEnum; name: string; label: string; help_text?: string; is_required?: boolean; options?: ModuleSettingsOption[]; }; export type ModuleSettingsSection = { label?: string; fields: ModuleSettingsField[]; }; export type ModuleSettings = { sections: ModuleSettingsSection[]; }; export type EmbeddedLocationProperties = { start_in_loading_mode?: boolean; }; export type EmbeddedAppShortcut = { id: string; order_override?: number; icon?: string; tooltip?: string; }; export type EmbeddedAppShortcutsDict = { fullscreen: EmbeddedAppShortcut[]; presentation: EmbeddedAppShortcut[]; edit: EmbeddedAppShortcut[]; }; export type Module = { enabled: boolean; headless?: boolean; auto_install?: boolean; entry?: string; settings?: ModuleSettings; defaults: { dimensions?: { width?: string; height?: string; }; settings?: Record; }; shortcuts: EmbeddedAppShortcutsDict; } & EmbeddedLocationProperties; type AppTypeJsonOptions = { dimensions?: { width?: number | string; height?: number | string; }; placement?: 'top-left' | 'top-center' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; mode_config?: { fullscreen?: { show?: boolean; icon?: string; order_override?: number; }; presentation?: { show?: boolean; icon?: string; order_override?: number; }; edit?: { show?: boolean; icon?: string; order_override?: number; }; }; }; export type AppJson = { name: string; display_name: string; icon?: string; type?: 'web'; provide?: ('ui' | 'account_browser' | 'scheduler' | 'postcall' | 'crm_shape' | 'multimedia_selector')[]; require?: 'crm'[]; version: string; description?: string; authors?: string[]; module: Record; app_type?: 'canvas-popup' | 'section-selector' | 'sharebox'; app_options?: AppTypeJsonOptions; order_override?: number; }; export type AppFile = File & { app_metadata?: AppJson; }; export type PitcherInfo = { accessToken: string; instanceId: string; apiOrigin: string; isAnyTypeOfAdmin: boolean; platform?: 'impact' | 'admin'; isOrgAdmin?: boolean; } | undefined; export {};