-
-
setApiQuery( prev => ({ ...prev, authorizationName: e.target.value }))}
- placeholder="API 명 입력"
- />
+
+ {/* API 역할 다이얼로그 */}
+
setApiRoleDialog({ isOpen: false, api: null })}
+ onSave={handleSaveRoles}
+ />
+
+
+
-
-
-
-
-
-
-
-
-
- setApiQuery({ ...apiQuery, useYn: value === "ALL" ? "" : value })}
- >
-
-
-
-
- 전체
- 사용
- 미사용
-
-
-
-
-
-
-
-
+
+ setApiQuery( prev => ({ ...prev, authorizationName: e.target.value }))}
+ placeholder="API 명 입력"
+ />
+
+
+
-
-
-
- 총 {apiList?.totalElements || 0}건
-
-
-
+
+
+
모듈API 목록
+
+
-
- {apiList && apiList.totalElements > 0 && (
-
-
setApiQuery({ ...apiQuery, page })}
- />
-
- setApiQuery(prev => ({ ...prev, page: 0, size: Number(value) }))
- }
- >
-
-
-
-
- {[2,10, 20, 30, 40, 50,100].map((pageSize) => (
-
- {pageSize}
-
- ))}
-
-
-
- )}
+
+
+
+ 총 {apiList?.totalElements ?? 0} 건
+
+
+ setApiQuery(prev => ({ ...prev, page: page - 1 }))
+ }
+ />
+
+ setApiQuery(prev => ({ ...prev, page: 0, size: Number(value) }))
+ }
+ >
+
+
+
+
+ {[2,10, 20, 30, 40, 50].map((pageSize) => (
+
+ {pageSize}
+
+ ))}
+
+
+
);
diff --git a/apps/cs/src/pages/apiman/ui/create-page.tsx b/apps/cs/src/pages/apiman/ui/create-page.tsx
index 2e93b6143..69f774765 100644
--- a/apps/cs/src/pages/apiman/ui/create-page.tsx
+++ b/apps/cs/src/pages/apiman/ui/create-page.tsx
@@ -18,7 +18,7 @@ const apiFormSchema = z.object({
urlPatternValue: z.string().min(1, "URL 패턴을 입력해주세요"),
httpMethodCode: z.string().min(1, "HTTP 메소드를 선택해주세요"),
sortSeq: z.number().min(0, "정렬 순서는 0 이상이어야 합니다"),
- useYn: z.string(),
+ useYn: z.string(),
});
function CreatePage() {
@@ -56,7 +56,7 @@ function CreatePage() {
urlPatternValue: "",
httpMethodCode: "",
sortSeq: 0,
- useYn: "Y"
+ useYn: "Y"
}
});
diff --git a/apps/cs/src/pages/apiman/ui/modify-page.tsx b/apps/cs/src/pages/apiman/ui/modify-page.tsx
index 242aeccf8..a6185e8d0 100644
--- a/apps/cs/src/pages/apiman/ui/modify-page.tsx
+++ b/apps/cs/src/pages/apiman/ui/modify-page.tsx
@@ -18,7 +18,7 @@ const apiFormSchema = z.object({
urlPatternValue: z.string().min(1, "URL 패턴을 입력해주세요"),
httpMethodCode: z.string().min(1, "HTTP 메소드를 선택해주세요"),
sortSeq: z.number(),
- useYn: z.string(),
+ useYn: z.string(),
});
function ModifyPage({ authorizationNo }: { authorizationNo: number }) {
@@ -91,7 +91,10 @@ function ModifyPage({ authorizationNo }: { authorizationNo: number }) {
{
+ await updateApi(data);
+ return;
+ }}
handleDelete={deleteApi}
/>
diff --git a/apps/cs/src/pages/apirole/api/apirole-api.ts b/apps/cs/src/pages/apirole/api/apirole-api.ts
new file mode 100644
index 000000000..c525c9a6a
--- /dev/null
+++ b/apps/cs/src/pages/apirole/api/apirole-api.ts
@@ -0,0 +1,77 @@
+import type { Page } from "@/shared/types";
+import { client } from "@/shared/api";
+import { ENDPOINT } from "@/shared/config";
+
+export interface ApiRole {
+ roleId?: string;
+ /** @format int64 */
+ authorizationNo?: number;
+ authorizationName?: string;
+ urlPatternValue?: string;
+ httpMethodCode?: string;
+ /** @format int32 */
+ sortSeq?: number;
+ createdAt?: boolean;
+}
+/** API 에서 역할 추가 (API에 대한 역할) */
+export interface ApiRoleByApi {
+ roleId?: string;
+ roleName?: string;
+ roleContent?: string;
+ useYn?: string;
+ /** @format int64 */
+ authorizationNo?: number;
+ mode?:string;
+}
+
+export interface ApiRoleParams {
+ authorizationNo?: number; // API 일련번호 검색
+ roleId?: string; // API 역할 검색
+ page?: number; // 페이지 번호
+ size?: number; // 페이지 크기
+}
+
+export interface ApiRoleFormData {
+ authorizationNo: number | null; // API 일련번호 (신규 등록 시 null)
+ authorizationName: string; // API 명
+ urlPatternValue: string; // URL 패턴
+ httpMethodCode: string; // HTTP 메소드
+ sortSeq: number; // 정렬 순서
+ useYn: string; // 사용 여부
+}
+
+export const ApiRoleApi = {
+ getApiRoleList: async (params: ApiRoleParams) => {
+ const { data } = await client.get