Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
728 changes: 728 additions & 0 deletions apps/web/src/apis/.bruno-cache/hashes.json

Large diffs are not rendered by default.

90 changes: 74 additions & 16 deletions apps/web/src/apis/Admin/api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
import { axiosInstance } from "@/utils/axiosInstance";

export type ๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆResponse = void;

export type ๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆRequest = Record<string, never>;

export type ๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒResponse = void;

export type ๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌResponse = void;

export type ๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌRequest = Record<string, never>;

export type ๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘Response = void;

export type ๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘Request = Record<string, never>;

export type ๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒResponse = void;

export type ๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒResponse = void;

export interface VerifyLanguageTestResponse {
id: number;
languageTestType: string;
Expand Down Expand Up @@ -143,34 +161,74 @@ export interface GpaListResponse {
}

export const adminApi = {
putVerifyLanguageTest: async (params: {
languageTestScoreId: string | number;
data?: VerifyLanguageTestRequest;
}): Promise<VerifyLanguageTestResponse> => {
post๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆ: async (params: { mentorApplicationId: string | number, data?: ๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆRequest }): Promise<๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆResponse> => {
const res = await axiosInstance.post<๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆResponse>(
`/admin/mentor-applications/${params.mentorApplicationId}/reject`, params?.data
);
return res.data;
},

get๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒ: async (params: { params?: Record<string, any> }): Promise<๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒResponse> => {
const res = await axiosInstance.get<๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒResponse>(
`/admin/mentor-applications?page=2&size=10&mentorApplicationStatus=PENDING&nickname&createdAt=2025-11-14`, { params: params?.params }
);
return res.data;
},

post๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌ: async (params: { mentorApplicationId: string | number, data?: ๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌRequest }): Promise<๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌResponse> => {
const res = await axiosInstance.post<๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌResponse>(
`/admin/mentor-applications/${params.mentorApplicationId}/approve`, params?.data
);
return res.data;
},

post๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘: async (params: { mentorApplicationId: string | number, data?: ๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘Request }): Promise<๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘Response> => {
const res = await axiosInstance.post<๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘Response>(
`/admin/mentor-applications/${params.mentorApplicationId}/assign-university`, params?.data
);
return res.data;
},

get๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒ: async (params: { params?: Record<string, any> }): Promise<๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒResponse> => {
const res = await axiosInstance.get<๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒResponse>(
`/admin/mentor-applications/count`, { params: params?.params }
);
return res.data;
},

get๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒ: async (params: { site_user_id: string | number, params?: Record<string, any> }): Promise<๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒResponse> => {
const res = await axiosInstance.get<๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒResponse>(
`/admin/mentor-applications/${params.site_user_id}/history`, { params: params?.params }
);
return res.data;
},

putVerifyLanguageTest: async (params: { languageTestScoreId: string | number, data?: VerifyLanguageTestRequest }): Promise<VerifyLanguageTestResponse> => {
const res = await axiosInstance.put<VerifyLanguageTestResponse>(
`/admin/scores/language-tests/${params.languageTestScoreId}`,
params?.data,
`/admin/scores/language-tests/${params.languageTestScoreId}`, params?.data
);
return res.data;
},

getLanguageTestList: async (params: { params?: Record<string, any> }): Promise<LanguageTestListResponse> => {
const res = await axiosInstance.get<LanguageTestListResponse>(`/admin/scores/language-tests?page=1&size=10`, {
params: params?.params,
});
const res = await axiosInstance.get<LanguageTestListResponse>(
`/admin/scores/language-tests?page=1&size=10`, { params: params?.params }
);
return res.data;
},

putVerifyGpa: async (params: {
gpaScoreId: string | number;
data?: VerifyGpaRequest;
}): Promise<VerifyGpaResponse> => {
const res = await axiosInstance.put<VerifyGpaResponse>(`/admin/scores/gpas/${params.gpaScoreId}`, params?.data);
putVerifyGpa: async (params: { gpaScoreId: string | number, data?: VerifyGpaRequest }): Promise<VerifyGpaResponse> => {
const res = await axiosInstance.put<VerifyGpaResponse>(
`/admin/scores/gpas/${params.gpaScoreId}`, params?.data
);
return res.data;
},

getGpaList: async (params: { params?: Record<string, any> }): Promise<GpaListResponse> => {
const res = await axiosInstance.get<GpaListResponse>(`/admin/scores/gpas`, { params: params?.params });
const res = await axiosInstance.get<GpaListResponse>(
`/admin/scores/gpas`, { params: params?.params }
);
return res.data;
},
};

};
6 changes: 3 additions & 3 deletions apps/web/src/apis/Admin/getGpaList.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AxiosError } from "axios";
import { useQuery } from "@tanstack/react-query";
import type { AxiosError } from "axios";
import { adminApi, GpaListResponse } from "./api";
import { QueryKeys } from "../queryKeys";
import { adminApi, type GpaListResponse } from "./api";

const useGetGpaList = (params?: Record<string, any>) => {
return useQuery<GpaListResponse, AxiosError>({
Expand All @@ -10,4 +10,4 @@ const useGetGpaList = (params?: Record<string, any>) => {
});
};

export default useGetGpaList;
export default useGetGpaList;
6 changes: 3 additions & 3 deletions apps/web/src/apis/Admin/getLanguageTestList.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AxiosError } from "axios";
import { useQuery } from "@tanstack/react-query";
import type { AxiosError } from "axios";
import { adminApi, LanguageTestListResponse } from "./api";
import { QueryKeys } from "../queryKeys";
import { adminApi, type LanguageTestListResponse } from "./api";

const useGetLanguageTestList = (params?: Record<string, any>) => {
return useQuery<LanguageTestListResponse, AxiosError>({
Expand All @@ -10,4 +10,4 @@ const useGetLanguageTestList = (params?: Record<string, any>) => {
});
};

export default useGetLanguageTestList;
export default useGetLanguageTestList;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { AxiosError } from "axios";
import { useQuery } from "@tanstack/react-query";
import { adminApi, ๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒResponse } from "./api";
import { QueryKeys } from "../queryKeys";

const useGet๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒ = (params?: Record<string, any>) => {
return useQuery<๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒResponse, AxiosError>({
queryKey: [QueryKeys.Admin.๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒ, params],
queryFn: () => adminApi.get๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒ(params ? { params } : {}),
});
};

export default useGet๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒ;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { AxiosError } from "axios";
import { useQuery } from "@tanstack/react-query";
import { adminApi, ๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒResponse } from "./api";
import { QueryKeys } from "../queryKeys";

const useGet๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒ = (params?: Record<string, any>) => {
return useQuery<๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒResponse, AxiosError>({
queryKey: [QueryKeys.Admin.๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒ, params],
queryFn: () => adminApi.get๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒ(params ? { params } : {}),
});
};

export default useGet๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒ;
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { AxiosError } from "axios";
import { useQuery } from "@tanstack/react-query";
import { adminApi, ๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒResponse } from "./api";
import { QueryKeys } from "../queryKeys";

const useGet๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒ = (site_user_id: string | number, params?: Record<string, any>) => {
return useQuery<๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒResponse, AxiosError>({
queryKey: [QueryKeys.Admin.๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒ, site_user_id, params],
queryFn: () => adminApi.get๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒ({ site_user_id, params }),
enabled: !!site_user_id,
});
};

export default useGet๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒ;
16 changes: 11 additions & 5 deletions apps/web/src/apis/Admin/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
export { adminApi } from "./api";
export { default as getGpaList } from "./getGpaList";
export { default as getLanguageTestList } from "./getLanguageTestList";
export { default as putVerifyGpa } from "./putVerifyGpa";
export { default as putVerifyLanguageTest } from "./putVerifyLanguageTest";
export { adminApi } from './api';
export { default as getGpaList } from './getGpaList';
export { default as getLanguageTestList } from './getLanguageTestList';
export { default as get๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒ } from './get๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๋‚ด์—ญ ์กฐํšŒ';
export { default as get๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒ } from './get๋ฉ˜ํ†  ์ง€์›์„œ ์ƒํƒœ๋ณ„ ๊ฐœ์ˆ˜ ์กฐํšŒ';
export { default as get๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒ } from './get๋ฉ˜ํ†  ์ง€์›์„œ ์ด๋ ฅ ์กฐํšŒ';
export { default as post๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆ } from './post๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆ';
export { default as post๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌ } from './post๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌ';
export { default as post๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘ } from './post๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘';
export { default as putVerifyGpa } from './putVerifyGpa';
export { default as putVerifyLanguageTest } from './putVerifyLanguageTest';
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { AxiosError } from "axios";
import { useMutation } from "@tanstack/react-query";
import { adminApi, ๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆResponse, ๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆRequest } from "./api";

const usePost๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆ = () => {
return useMutation<๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆResponse, AxiosError, { mentorApplicationId: string | number; data: ๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆRequest }>({
mutationFn: (variables) => adminApi.post๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆ(variables),
});
};

export default usePost๋ฉ˜ํ†  ์Šน๊ฒฉ ์š”์ฒญ ๊ฑฐ์ ˆ;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { AxiosError } from "axios";
import { useMutation } from "@tanstack/react-query";
import { adminApi, ๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌResponse, ๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌRequest } from "./api";

const usePost๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌ = () => {
return useMutation<๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌResponse, AxiosError, { mentorApplicationId: string | number; data: ๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌRequest }>({
mutationFn: (variables) => adminApi.post๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌ(variables),
});
};

export default usePost๋ฉ˜ํ†  ์š”์ฒญ ์Šน๊ฒฉ ์ฒ˜๋ฆฌ;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { AxiosError } from "axios";
import { useMutation } from "@tanstack/react-query";
import { adminApi, ๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘Response, ๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘Request } from "./api";

const usePost๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘ = () => {
return useMutation<๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘Response, AxiosError, { mentorApplicationId: string | number; data: ๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘Request }>({
mutationFn: (variables) => adminApi.post๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘(variables),
});
};

export default usePost๋ฉ˜ํ†  ์ง€์›์„œ ๋Œ€ํ•™ ๋งคํ•‘;
6 changes: 3 additions & 3 deletions apps/web/src/apis/Admin/putVerifyGpa.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AxiosError } from "axios";
import { useMutation } from "@tanstack/react-query";
import type { AxiosError } from "axios";
import { adminApi, type VerifyGpaRequest, type VerifyGpaResponse } from "./api";
import { adminApi, VerifyGpaResponse, VerifyGpaRequest } from "./api";

const usePutVerifyGpa = () => {
return useMutation<VerifyGpaResponse, AxiosError, { gpaScoreId: string | number; data: VerifyGpaRequest }>({
mutationFn: (variables) => adminApi.putVerifyGpa(variables),
});
};

export default usePutVerifyGpa;
export default usePutVerifyGpa;
12 changes: 4 additions & 8 deletions apps/web/src/apis/Admin/putVerifyLanguageTest.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import { AxiosError } from "axios";
import { useMutation } from "@tanstack/react-query";
import type { AxiosError } from "axios";
import { adminApi, type VerifyLanguageTestRequest, type VerifyLanguageTestResponse } from "./api";
import { adminApi, VerifyLanguageTestResponse, VerifyLanguageTestRequest } from "./api";

const usePutVerifyLanguageTest = () => {
return useMutation<
VerifyLanguageTestResponse,
AxiosError,
{ languageTestScoreId: string | number; data: VerifyLanguageTestRequest }
>({
return useMutation<VerifyLanguageTestResponse, AxiosError, { languageTestScoreId: string | number; data: VerifyLanguageTestRequest }>({
mutationFn: (variables) => adminApi.putVerifyLanguageTest(variables),
});
};

export default usePutVerifyLanguageTest;
export default usePutVerifyLanguageTest;
Loading
Loading