diff --git a/hwe/sammo/API/Message/GetContactList.php b/hwe/sammo/API/Message/GetContactList.php new file mode 100644 index 00000000..61777705 --- /dev/null +++ b/hwe/sammo/API/Message/GetContactList.php @@ -0,0 +1,35 @@ +generalID){ + return [ + "nation"=>[] + ]; + } + + //NOTE: 모든 국가, 모든 장수에 대해서 같은 결과라면 캐싱 가능하지 않을까? + + return [ + "nation"=>getMailboxList() + ]; + } +} \ No newline at end of file diff --git a/hwe/ts/SammoAPI.ts b/hwe/ts/SammoAPI.ts index aa67cc19..757e62b5 100644 --- a/hwe/ts/SammoAPI.ts +++ b/hwe/ts/SammoAPI.ts @@ -32,7 +32,7 @@ GetRecentRecordResponse, import type { CachedMapResult, GeneralListResponse, ItemTypeKey, MapResult } from "./defs"; import type { VoteDetailResult, VoteListResult } from "./defs/API/Vote"; import type { ActiveResourceAuctionList, OpenAuctionResponse, UniqueItemAuctionDetail, UniqueItemAuctionList } from "./defs/API/Auction"; -import type { MsgResponse, MsgType } from "./defs/API/Message"; +import type { MabilboxListResponse, MsgResponse, MsgType } from "./defs/API/Message"; const apiRealPath = { Auction: { @@ -172,6 +172,7 @@ const apiRealPath = { }, InheritLogResponse> }, Message: { + GetContactList: GET as APICallT, GetRecentMessage: GET as APICallT<{ sequence?: number; }, MsgResponse>, diff --git a/hwe/ts/defs/API/Message.ts b/hwe/ts/defs/API/Message.ts index 05725661..39fb51f9 100644 --- a/hwe/ts/defs/API/Message.ts +++ b/hwe/ts/defs/API/Message.ts @@ -49,4 +49,19 @@ export type MsgResponse = { nationID: number; generalName: string; sequence: number; -}; \ No newline at end of file +}; + +export type MailboxItem = { + id: number, + mailbox: number, + color: string, + name: string, + nationID: number, + //nation: string, + general: [number, string, number][] +} + +export type MabilboxListResponse = { + result: true, + nation: MailboxItem[] +} \ No newline at end of file