decompose structure

This commit is contained in:
Первов Артем
2026-06-20 00:51:18 +03:00
parent dbda8ee613
commit 31add10e56
77 changed files with 4112 additions and 3974 deletions

8
src/entities/tag/api.ts Normal file
View File

@@ -0,0 +1,8 @@
import { getJson } from '../../shared/api/http';
import { cloudApiUrl } from '../../shared/config/env';
import type { TagResponse } from './types';
/** Загружает справочник тегов; tag.name используется как отображаемое имя. */
export function getTags(params: { edge?: string; search?: string } = {}): Promise<TagResponse> {
return getJson<TagResponse>(cloudApiUrl, '/tag', params);
}

15
src/entities/tag/types.ts Normal file
View File

@@ -0,0 +1,15 @@
export type TagItem = {
id: string;
name: string;
tagGroup: string | null;
min: number;
max: number;
comment: string;
unitOfMeasurement: string;
edgeIds: string[];
precision: number | null;
};
export type TagResponse = {
items: TagItem[];
};