Skip to content

Commit

Permalink
#7 Add interfaces for profile
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTheTruth committed May 9, 2021
1 parent 4b8659e commit 6d2d04f
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
Empty file removed apps/client/interfaces/.gitkeep
Empty file.
13 changes: 13 additions & 0 deletions apps/client/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { RequestProps } from './request'
import { ResponseSuccessHandler, ResponseErrorHandler } from './response'
import { Token } from './token'
import { KakaoProfile, User } from './user'

export type {
ResponseSuccessHandler,
ResponseErrorHandler,
RequestProps,
Token,
KakaoProfile,
User,
}
5 changes: 5 additions & 0 deletions apps/client/interfaces/response.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { AxiosError, AxiosResponse } from 'axios'

export type ResponseSuccessHandler<T = unknown> = (res: AxiosResponse<T>) => Promise<void> | void

export type ResponseErrorHandler<T = unknown> = (err: AxiosError<T>) => Promise<void> | void
8 changes: 8 additions & 0 deletions apps/client/interfaces/token.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export interface Token {
access_token: string
expires_in: number
refresh_token: string
refresh_token_expires_in: number
scope: string
token_type: string
}
10 changes: 10 additions & 0 deletions apps/client/interfaces/user.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export interface KakaoProfile {
nickname: string
profile_image: string
thumbnail_image: string
}

export interface User {
nickname: string
profileImage: string
}

0 comments on commit 6d2d04f

Please sign in to comment.