ручной рефакторинг
This commit is contained in:
@@ -1,92 +0,0 @@
|
||||
/**
|
||||
* Типы для API формул электронных таблиц
|
||||
*/
|
||||
|
||||
export interface FormulaApiConfig {
|
||||
baseUrl: string
|
||||
apiKey?: string
|
||||
timeout?: number
|
||||
}
|
||||
|
||||
export interface FormulaApiError {
|
||||
code: string
|
||||
message: string
|
||||
timestamp: string
|
||||
}
|
||||
|
||||
export interface FormulaApiEvent {
|
||||
type:
|
||||
| 'SAVE_START'
|
||||
| 'SAVE_SUCCESS'
|
||||
| 'SAVE_ERROR'
|
||||
| 'LOAD_START'
|
||||
| 'LOAD_SUCCESS'
|
||||
| 'LOAD_ERROR'
|
||||
templateId: string
|
||||
version?: number
|
||||
error?: FormulaApiError
|
||||
}
|
||||
|
||||
export interface SaveFormulasRequest {
|
||||
templateId: string
|
||||
formulaData: Record<string, Record<string, any>>
|
||||
timestamp: string
|
||||
}
|
||||
|
||||
export interface SaveFormulasResponse {
|
||||
success: boolean
|
||||
templateId: string
|
||||
version: number
|
||||
timestamp: string
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface LoadFormulasRequest {
|
||||
templateId: string
|
||||
version?: number
|
||||
}
|
||||
|
||||
export interface LoadFormulasResponse {
|
||||
success: boolean
|
||||
notFound?: boolean
|
||||
data?: TemplateFormulaData
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface FormulaHistoryRequest {
|
||||
templateId: string
|
||||
limit?: number
|
||||
}
|
||||
|
||||
export interface FormulaHistoryResponse {
|
||||
success: boolean
|
||||
history: Array<{
|
||||
version: number
|
||||
timestamp: string
|
||||
description?: string
|
||||
}>
|
||||
}
|
||||
|
||||
export interface SyncStatus {
|
||||
templateId: string
|
||||
lastSync: string
|
||||
isOnline: boolean
|
||||
pendingChanges: number
|
||||
}
|
||||
|
||||
export interface TemplateFormulaData {
|
||||
templateId: string
|
||||
version: number
|
||||
sheets: Record<string, SheetFormulaData>
|
||||
timestamp: string
|
||||
}
|
||||
|
||||
export interface SheetFormulaData {
|
||||
sheetName: string
|
||||
cells: Record<string, any>
|
||||
metadata: {
|
||||
rowCount: number
|
||||
columnCount: number
|
||||
lastCalculated: string
|
||||
}
|
||||
}
|
||||
25
src/type/imports.d.ts
vendored
25
src/type/imports.d.ts
vendored
@@ -1,25 +0,0 @@
|
||||
// Типы для контроля импортов между слоями архитектуры
|
||||
declare module 'app/*' {
|
||||
const content: any
|
||||
export default content
|
||||
}
|
||||
|
||||
declare module 'page/*' {
|
||||
const content: any
|
||||
export default content
|
||||
}
|
||||
|
||||
declare module 'feature/*' {
|
||||
const content: any
|
||||
export default content
|
||||
}
|
||||
|
||||
declare module 'entitiy/*' {
|
||||
const content: any
|
||||
export default content
|
||||
}
|
||||
|
||||
declare module 'shared/*' {
|
||||
const content: any
|
||||
export default content
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Типы элементов интерфейса
|
||||
|
||||
// Импортируем ElementType из interface.ts
|
||||
import type { ElementType } from '@/entitiy/element/model/interface'
|
||||
import type { ElementType } from '@/entity/element/model/interface'
|
||||
|
||||
export interface ElementOption {
|
||||
value: string
|
||||
@@ -80,19 +80,6 @@ export interface TemplateAttributeDetail {
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
// Для совместимости со старым кодом - алиас
|
||||
export type CategoryField = Attribute
|
||||
export type CategoryFieldType = 'text' | 'select' | 'number' | 'textarea'
|
||||
export interface CategoryFieldOption {
|
||||
id: string
|
||||
value: string
|
||||
label: string
|
||||
}
|
||||
export interface CategoryFieldValue {
|
||||
fieldId: string
|
||||
value: string | number
|
||||
}
|
||||
|
||||
// Типы шаблонов
|
||||
export interface Template {
|
||||
id: string
|
||||
@@ -106,10 +93,3 @@ export interface Template {
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
|
||||
// Типы для работы с данными
|
||||
export interface TemplateData {
|
||||
templateId: string
|
||||
values: Record<string, any> // elementId -> value
|
||||
calculatedCells?: Record<string, any> // cellName -> value
|
||||
}
|
||||
|
||||
2
src/type/vite-env.d.ts
vendored
2
src/type/vite-env.d.ts
vendored
@@ -1 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
Reference in New Issue
Block a user