Files
frontend/packages/common/components/src/api/user.ts
T

46 lines
923 B
TypeScript

import { getApiClient } from "./client";
import { ENDPOINT } from "../config";
export interface IUser {
regDt: string;
mdfcnDt: string;
rgtr: string;
mdfr: string;
userUnqId: string;
userId: string;
userName: string;
email: string;
encryptedPassword: string;
refreshToken: string;
userStateCode: string;
lastLoginDate: string;
loginFailCount: number;
pswdHnt: string;
pswdAns: string;
mphn: string;
telno: string;
zip: string;
addr: string;
daddr: string;
laeSeCd: string;
ogdpSeCd: string;
aprvYn: string;
autzrId: string;
expryYmd: string;
lastPswdChgDt: string;
googleId: string;
kakaoId: string;
naverId: string;
isSocialUser: boolean;
hasPassword: boolean;
}
const client = getApiClient();
export const getUserInfo = async () => {
const response = await client.get<IUser>(
`${ENDPOINT.USER_SERVICE.USERS}/info/me`,
);
return response.data;
};