@uniai-fe/uds-templates 0.6.20 → 0.6.22
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.
package/package.json
CHANGED
|
@@ -419,7 +419,8 @@ export interface API_Res_LoginRole {
|
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
/**
|
|
422
|
-
* 로그인 API;
|
|
422
|
+
* 로그인 API; route 내부 세션 token 응답 데이터
|
|
423
|
+
* @deprecated Client-facing 로그인/session 상태 타입에서는 token 필드를 사용하지 않는다. 서비스 route 내부 raw backend 응답 타입은 각 서비스에서 local 선언한다.
|
|
423
424
|
* @route /auth/user/login
|
|
424
425
|
* @route /auth/user/refresh
|
|
425
426
|
* @property {string} token_type 엑세스 토큰 타입 (ex, bearer)
|
|
@@ -468,19 +469,17 @@ export interface API_Res_LoginToken {
|
|
|
468
469
|
/**
|
|
469
470
|
* 로그인 API; 응답 성공 데이터
|
|
470
471
|
* @route /auth/user/login
|
|
471
|
-
* @property {string} token_type 엑세스 토큰 타입 (ex, bearer)
|
|
472
|
-
* @property {string} access_token 엑세스 토큰
|
|
473
|
-
* @property {number} expires_in 토큰 유효기간 (초 단위)
|
|
474
|
-
* @property {string} refresh_token 리프레시 토큰
|
|
475
|
-
* @property {number} refresh_expires_in 리프레시 토큰 유효기간 (초 단위)
|
|
476
472
|
* @property {string | null} session_expires_at 세션 만료 일시
|
|
477
|
-
* @property {number | null} session_expires_in 세션 유효기간 (초 단위)
|
|
478
473
|
* @property {API_Res_LoginUserInfo} user_info 로그인 유저 정보
|
|
479
474
|
* @property {API_Res_LoginGroup[]} [groups] 소속 그룹 목록
|
|
480
475
|
* @property {API_Res_LoginGroup[]} [ancestor_groups] 상위 그룹 목록
|
|
481
476
|
* @property {API_Res_LoginRole[]} [roles] 역할 목록
|
|
482
477
|
*/
|
|
483
|
-
export interface API_Res_LoginData
|
|
478
|
+
export interface API_Res_LoginData {
|
|
479
|
+
/**
|
|
480
|
+
* 세션 만료 일시
|
|
481
|
+
*/
|
|
482
|
+
session_expires_at: string | null;
|
|
484
483
|
/**
|
|
485
484
|
* 로그인 유저 정보
|
|
486
485
|
*/
|
|
@@ -29,6 +29,7 @@ import { cctvRtcLiveRegistryAtom } from "../jotai/rtc";
|
|
|
29
29
|
* isError, // 데이터 로딩 에러 상태
|
|
30
30
|
* username, // 현재 사용자 계정 아이디
|
|
31
31
|
* searchedKeyword, // 현재 검색어
|
|
32
|
+
* selectedGroupCode, // 선택된 업체가 속한 사육그룹 코드
|
|
32
33
|
* selectedCompanyId, // 선택된 회사 ID
|
|
33
34
|
* selectedCamId, // 선택된 카메라 ID
|
|
34
35
|
* selectedCompany, // 선택된 회사 데이터
|
|
@@ -139,6 +140,9 @@ export default function useCctvContext(): UseCctvContextReturn {
|
|
|
139
140
|
[selectedCompanyId, groups],
|
|
140
141
|
);
|
|
141
142
|
|
|
143
|
+
// 현재 선택된 업체가 속한 그룹 코드를 계산한다.
|
|
144
|
+
const selectedGroupCode = selectedCompany?.group_code;
|
|
145
|
+
|
|
142
146
|
// 선택된 회사의 카메라 리스트를 평탄화해 반환한다.
|
|
143
147
|
const cams = useMemo(
|
|
144
148
|
(): CctvCompanyCameraList[] => getCamList(groups, selectedCompanyId),
|
|
@@ -179,6 +183,7 @@ export default function useCctvContext(): UseCctvContextReturn {
|
|
|
179
183
|
isError,
|
|
180
184
|
username,
|
|
181
185
|
searchedKeyword,
|
|
186
|
+
selectedGroupCode,
|
|
182
187
|
selectedCompanyId,
|
|
183
188
|
selectedCamId,
|
|
184
189
|
selectedCompany,
|
package/src/cctv/types/hook.ts
CHANGED
|
@@ -165,6 +165,7 @@ export interface UseCctvCompanyDataReturn extends Omit<
|
|
|
165
165
|
* @property {boolean} isError 데이터 로딩 에러 상태
|
|
166
166
|
* @property {string} username 현재 사용자 계정 아이디
|
|
167
167
|
* @property {string} searchedKeyword 현재 검색어
|
|
168
|
+
* @property {string | undefined} selectedGroupCode 선택된 업체가 속한 사육그룹 코드
|
|
168
169
|
* @property {string | undefined} selectedCompanyId 선택된 업체 ID
|
|
169
170
|
* @property {string | undefined} selectedCamId 선택된 카메라 ID
|
|
170
171
|
* @property {CctvCompanyGroupItems | undefined} selectedCompany 선택된 업체 데이터
|
|
@@ -194,6 +195,10 @@ export interface UseCctvContextReturn extends UseFormReturn<CctvBaseContext> {
|
|
|
194
195
|
* 현재 검색어
|
|
195
196
|
*/
|
|
196
197
|
searchedKeyword: string;
|
|
198
|
+
/**
|
|
199
|
+
* 선택된 업체가 속한 사육그룹 코드
|
|
200
|
+
*/
|
|
201
|
+
selectedGroupCode: string | undefined;
|
|
197
202
|
/**
|
|
198
203
|
* 선택된 업체 ID
|
|
199
204
|
*/
|
package/src/cctv/types/list.ts
CHANGED
|
@@ -67,6 +67,7 @@ export interface CctvCompanyCameraList extends CctvCompanyCameraData {
|
|
|
67
67
|
* @property {string} renderKey 렌더링 unique key
|
|
68
68
|
* @property {boolean} selected 업체 선택 현황
|
|
69
69
|
* @property {Function} [onSelect] 업체 선택 콜백 이벤트
|
|
70
|
+
* @property {string} group_code 업체가 속한 사육그룹 코드
|
|
70
71
|
* @property {string} company_id 업체 id코드 (a.k.a site)
|
|
71
72
|
* @property {string} company_name 업체명
|
|
72
73
|
* @property {API_Res_CctvCompanyCameraList[]} cam_list 설치된 카메라 목록
|
|
@@ -77,6 +78,10 @@ export interface CctvCompanyGroupItems extends API_Res_CctvCompanyList {
|
|
|
77
78
|
* 렌더링 unique key
|
|
78
79
|
*/
|
|
79
80
|
renderKey: string;
|
|
81
|
+
/**
|
|
82
|
+
* 업체가 속한 사육그룹 코드
|
|
83
|
+
*/
|
|
84
|
+
group_code: string;
|
|
80
85
|
/**
|
|
81
86
|
* 설치된 카메라 목록
|
|
82
87
|
*/
|