@uniai-fe/uds-templates 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -1
  2. package/src/types/api.ts +31 -57
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/uds-templates",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "UNIAI Design System; UI Templates Package",
5
5
  "type": "module",
6
6
  "private": false,
@@ -52,6 +52,7 @@
52
52
  "@tanstack/react-query": "^5",
53
53
  "@uniai-fe/uds-foundation": "^0.1.0",
54
54
  "@uniai-fe/uds-primitives": "^0.1.0",
55
+ "@uniai-fe/util-api": "^0.1.0",
55
56
  "@uniai-fe/util-functions": "^0.2.0",
56
57
  "@uniai-fe/util-jotai": "^0.1.5",
57
58
  "@uniai-fe/util-next": "^0.2.0",
@@ -78,6 +79,7 @@
78
79
  "@uniai-fe/tsconfig": "workspace:*",
79
80
  "@uniai-fe/uds-foundation": "workspace:*",
80
81
  "@uniai-fe/uds-primitives": "workspace:*",
82
+ "@uniai-fe/util-api": "workspace:*",
81
83
  "@uniai-fe/util-functions": "workspace:*",
82
84
  "@uniai-fe/util-jotai": "workspace:*",
83
85
  "@uniai-fe/util-next": "workspace:*",
package/src/types/api.ts CHANGED
@@ -1,65 +1,39 @@
1
+ import type {
2
+ API_Res_Base as UtilAPI_Res_Base,
3
+ API_Res_Error as UtilAPI_Res_Error,
4
+ API_Res_Pagination as UtilAPI_Res_Pagination,
5
+ API_Res_Status as UtilAPI_Res_Status,
6
+ } from "@uniai-fe/util-api";
7
+
8
+ /**
9
+ * 변경: API 공통 타입 SOT를 @uniai-fe/util-api 패키지로 단일화한다.
10
+ * 기존 templates 경로 import 호환을 위해 타입 alias를 유지한다.
11
+ * @deprecated `@uniai-fe/util-api`의 `API_Res_Error`를 직접 import 해서 사용할 것.
12
+ * @see packages/util/api/src/response/index.ts
13
+ */
14
+ export type API_Res_Error = UtilAPI_Res_Error;
15
+
1
16
  /**
2
- * API 응답; 에러 정보
3
- * @property {string} field_name - 에러 필드 이름
4
- * @property {string} message - 에러 메세지
17
+ * 변경: API 공통 타입 SOT를 @uniai-fe/util-api 패키지로 단일화한다.
18
+ * 기존 templates 경로 import 호환을 위해 타입 alias를 유지한다.
19
+ * @deprecated `@uniai-fe/util-api`의 `API_Res_Status`를 직접 import 해서 사용할 것.
20
+ * @see packages/util/api/src/response/index.ts
5
21
  */
6
- export interface API_Res_Error {
7
- /**
8
- * 에러 필드 이름
9
- */
10
- field_name: string;
11
- /**
12
- * 에러 메세지
13
- */
14
- message: string;
15
- }
22
+ export type API_Res_Status = UtilAPI_Res_Status;
16
23
 
17
24
  /**
18
- * API 응답; 기본 구조
19
- * - GET, POST, PUT, DELETE 모든 API 응답에 공통적으로 사용
20
- * @property {string} status - 통신 상태
21
- * - "success": 정상 응답
22
- * - "fail": 비정상 응답
23
- * - "timeout": 타임아웃 응답
24
- * @property {ResultDataType} data - 요청 응답 데이터
25
- * @property {API_Res_Error[]} errors - 에러 정보
25
+ * 변경: API 공통 타입 SOT를 @uniai-fe/util-api 패키지로 단일화한다.
26
+ * 기존 templates 경로 import 호환을 위해 타입 alias를 유지한다.
27
+ * @deprecated `@uniai-fe/util-api`의 `API_Res_Base`를 직접 import 해서 사용할 것.
28
+ * @see packages/util/api/src/response/index.ts
26
29
  */
27
- export interface API_Res_Base<ResultDataType> {
28
- /**
29
- * 통신 상태
30
- * - "success": 정상 응답
31
- * - "fail": 비정상 응답
32
- * - "timeout": 타임아웃 응답
33
- */
34
- status: string;
35
- /**
36
- * 요청 응답 데이터
37
- */
38
- data: ResultDataType;
39
- /**
40
- * 에러 정보
41
- */
42
- errors: API_Res_Error[];
43
- }
30
+ export type API_Res_Base<ResultDataType> = UtilAPI_Res_Base<ResultDataType>;
44
31
 
45
32
  /**
46
- * API 응답; pagination 정보
47
- * - Table, Grid 등, page 단위로 존재하는 데이터를 조회할 때 받는 응답값
48
- * @property {number} total_count 모든 item 개수
49
- * @property {number} size 화면에 표시할 item 개수
50
- * @property {Record<string, unknown>} items 각 row item 맵핑 데이터
33
+ * 변경: API 공통 타입 SOT를 @uniai-fe/util-api 패키지로 단일화한다.
34
+ * 기존 templates 경로 import 호환을 위해 타입 alias를 유지한다.
35
+ * @deprecated `@uniai-fe/util-api`의 `API_Res_Pagination`을 직접 import 해서 사용할 것.
36
+ * @see packages/util/api/src/response/index.ts
51
37
  */
52
- export interface API_Res_Pagination<ItemData extends Record<string, unknown>> {
53
- /**
54
- * 모든 item 개수
55
- */
56
- total_count: number;
57
- /*
58
- * 화면에 표시할 item 개수
59
- */
60
- size: number;
61
- /**
62
- * 각 row item 맵핑 데이터
63
- */
64
- items: ItemData;
65
- }
38
+ export type API_Res_Pagination<ItemData extends Record<string, unknown>> =
39
+ UtilAPI_Res_Pagination<ItemData>;