@uniai-fe/util-api 0.1.1 → 0.1.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.
@@ -3,7 +3,7 @@
3
3
  * @property {string} field_name 에러 필드 이름
4
4
  * @property {string} message 에러 메시지
5
5
  */
6
- interface API_Res_Error {
6
+ interface API_Res_Error extends Record<string, string> {
7
7
  /**
8
8
  * 에러 필드 이름
9
9
  */
@@ -21,12 +21,13 @@ interface API_Res_Error {
21
21
  type API_Res_Status = "success" | "fail" | "timeout" | string;
22
22
  /**
23
23
  * API Response Types; Base 응답 구조
24
+ * @template {unknown} ResultDataType
24
25
  * @property {API_Res_Status} status 통신 상태
25
- * @property {ResultDataType} data 요청 응답 데이터
26
+ * @property {ResultDataType | null} data 요청 응답 데이터
26
27
  * @property {API_Res_Error[]} errors 에러 목록
27
28
  * @property {string} [timestamp] 응답 시간(UTC ISO 문자열)
28
29
  * @example
29
- * type API_Res_User = API_Res_Base<{ user_id: number } | null>;
30
+ * type API_Res_User = API_Res_Base<{ user_id: number }>;
30
31
  */
31
32
  interface API_Res_Base<ResultDataType> {
32
33
  /**
@@ -36,7 +37,7 @@ interface API_Res_Base<ResultDataType> {
36
37
  /**
37
38
  * 요청 응답 데이터
38
39
  */
39
- data: ResultDataType;
40
+ data: ResultDataType | null;
40
41
  /**
41
42
  * 에러 목록
42
43
  */
@@ -3,7 +3,7 @@
3
3
  * @property {string} field_name 에러 필드 이름
4
4
  * @property {string} message 에러 메시지
5
5
  */
6
- interface API_Res_Error {
6
+ interface API_Res_Error extends Record<string, string> {
7
7
  /**
8
8
  * 에러 필드 이름
9
9
  */
@@ -21,12 +21,13 @@ interface API_Res_Error {
21
21
  type API_Res_Status = "success" | "fail" | "timeout" | string;
22
22
  /**
23
23
  * API Response Types; Base 응답 구조
24
+ * @template {unknown} ResultDataType
24
25
  * @property {API_Res_Status} status 통신 상태
25
- * @property {ResultDataType} data 요청 응답 데이터
26
+ * @property {ResultDataType | null} data 요청 응답 데이터
26
27
  * @property {API_Res_Error[]} errors 에러 목록
27
28
  * @property {string} [timestamp] 응답 시간(UTC ISO 문자열)
28
29
  * @example
29
- * type API_Res_User = API_Res_Base<{ user_id: number } | null>;
30
+ * type API_Res_User = API_Res_Base<{ user_id: number }>;
30
31
  */
31
32
  interface API_Res_Base<ResultDataType> {
32
33
  /**
@@ -36,7 +37,7 @@ interface API_Res_Base<ResultDataType> {
36
37
  /**
37
38
  * 요청 응답 데이터
38
39
  */
39
- data: ResultDataType;
40
+ data: ResultDataType | null;
40
41
  /**
41
42
  * 에러 목록
42
43
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/util-api",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "API contract types and framework-agnostic utilities for UNIAI FE projects",
5
5
  "type": "module",
6
6
  "private": false,
@@ -10,7 +10,7 @@
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
- "packageManager": "pnpm@10.28.2",
13
+ "packageManager": "pnpm@10.30.2",
14
14
  "engines": {
15
15
  "node": ">=24",
16
16
  "pnpm": ">=10"