@uniai-fe/util-api 0.1.2 → 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 }
|
|
30
|
+
* type API_Res_User = API_Res_Base<{ user_id: number }>;
|
|
30
31
|
*/
|
|
31
32
|
interface API_Res_Base<ResultDataType> {
|
|
32
33
|
/**
|
package/dist/response/index.d.ts
CHANGED
|
@@ -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 }
|
|
30
|
+
* type API_Res_User = API_Res_Base<{ user_id: number }>;
|
|
30
31
|
*/
|
|
31
32
|
interface API_Res_Base<ResultDataType> {
|
|
32
33
|
/**
|