import { ValueOf } from '../types/Utils.js'; import { STAT_TYPES, FILE_TYPES, FILE_UPLOAD_RESULT_TYPES } from '../constants/files.js'; import { CMS_PUBLISH_MODE } from '../constants/files.js'; import { HttpOptions } from './Http.js'; import { AxiosError } from 'axios'; export type StatType = ValueOf; export type FileData = { filepath: string; files?: Array; type: StatType; }; export type FileMapperNode = { name: string; createdAt: number; updatedAt: number; source: string | null; path: string; folder: boolean; children: Array; }; export type DirectoryMetaNode = { name: string; path: string; folder: boolean; children: Array; createdAt?: number; updatedAt?: number; }; export type CmsPublishMode = ValueOf; export type FileMapperOptions = Omit; export type FileMapperInputOptions = { staging?: boolean; assetVersion?: string; overwrite?: boolean; timeout?: number; }; export type FileType = ValueOf; type ResultType = ValueOf; export type UploadFolderResults = { resultType: ResultType; error: unknown; file: string; }; export type FileTree = { source?: string; path: string; children: Array; }; export type PathTypeData = { isModule: boolean; isHubspot: boolean; isFile: boolean; isRoot: boolean; isFolder: boolean; }; export type RecursiveFileMapperCallback = (node: FileMapperNode, filepath?: string, depth?: number) => boolean; export type CommandOptions = { convertFields?: boolean; fieldOptions?: string; saveOutput?: boolean; onAttemptCallback?: (file: string | undefined, destPath: string) => void; onSuccessCallback?: (file: string | undefined, destPath: string) => void; onFirstErrorCallback?: (file: string, destPath: string, error: unknown) => void; onRetryCallback?: (file: string, destPath: string) => void; onFinalErrorCallback?: (accountId: number, file: string, destPath: string, error: unknown) => void; }; export type FilePathsByType = { [key: string]: Array; }; export type UploadFileOptions = FileMapperInputOptions & { src: string; commandOptions: { convertFields?: boolean; }; fieldOptions?: string; }; export type WatchOptions = { cmsPublishMode?: CmsPublishMode; remove?: boolean; disableInitial?: boolean; notify?: string; commandOptions: { convertFields?: boolean; }; filePaths?: Array; }; export type WatchErrorHandler = (error: AxiosError) => void; export {};