Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion docs/api/frontend-api-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ AI MD ์ถ”์ฒœ์€ ์•„๋ž˜ ๊ธฐ์ค€์„ ํ•จ๊ป˜ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
- AI MD ์ƒํ’ˆ ์ถ”์ฒœ์€ BE๊ฐ€ ์‚ฌ์šฉ์ž ์Šคํƒ€์ผ ์ ์ˆ˜์™€ ์™ธ๋ถ€ ์ƒํ’ˆ ๋‹ค์–‘์„ฑ ๊ธฐ์ค€์„ ๋ฐ˜์˜ํ•ด ๋‚ด๋ ค์ค€ ๊ฒฐ๊ณผ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.
- ์ƒ์„ธ ์—ฐ๋™ ๊ธฐ์ค€์ด ํ•„์š”ํ•˜๋ฉด BE `docs/api/ai-md-api-spec.md`์™€ `docs/api/similar-product-api-spec.md`๋ฅผ ์›๋ณธ์œผ๋กœ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

`RECO-005` `match` ์ƒ์„ธ์—์„œ ๊ตฌ๋งค ๋งํฌ ํด๋ฆญ ํ›„ **์ƒ€์–ด์š”** ์„ ํƒ ์‹œ FE๋Š” `POST /api/users/{userId}/wishlist-clothes`(ํ•„์š” ์‹œ)์™€ `PATCH /api/clothes/{id}/convert-to-owned`๋กœ ๋ณด์œ  ์˜ท์žฅ ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค. ํ๋ฆ„ ์ƒ์„ธ๋Š” [home-recommendation.md](../features/home-recommendation.md)๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.
`RECO-005` `match` ์ƒ์„ธ์—์„œ ๊ตฌ๋งค ๋งํฌ ํด๋ฆญ ํ›„ **์ƒ€์–ด์š”** ์„ ํƒ ์‹œ FE๋Š” `POST /api/users/{userId}/wishlist-clothes`(ํ•„์š” ์‹œ)์™€ `PATCH /api/v1/clothes/{id}/convert-to-owned`๋กœ ๋ณด์œ  ์˜ท์žฅ ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค. ํ๋ฆ„ ์ƒ์„ธ๋Š” [home-recommendation.md](../features/home-recommendation.md)๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.

๋‚ ์”จ, ์ง€์—ญ, ์ฒด๊ฐ์˜จ๋„ ์ •๋ณด(`EXT-004`~`EXT-006`)๋Š” ๋…๋ฆฝ ์ถ”์ฒœ ๊ธฐ๋Šฅ์ด ์•„๋‹ˆ๋ผ `RECO-001`, `RECO-002` ๋“ฑ ์ถ”์ฒœ ๊ธฐ๋Šฅ์˜ ๋ณด์กฐ ์กฐ๊ฑด์ž…๋‹ˆ๋‹ค. `/api/weather`๋Š” ์ถ”์ฒœ ๋ณด์กฐ ์ •๋ณด API๋กœ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.

Expand Down
2 changes: 1 addition & 1 deletion docs/features/home-recommendation.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ FE๋Š” ์นดํ…Œ๊ณ ๋ฆฌ๋‹น ์ตœ๋Œ€ 50๊ฑด์„ ์š”์ฒญํ•ฉ๋‹ˆ๋‹ค. BE API ๊ณ„์•ฝ๋„ `limitPe
**์ƒ€์–ด์š”** BE ํ˜ธ์ถœ ์ˆœ์„œ:

1. ์œ„์‹œ๋ฆฌ์ŠคํŠธ์— ์—†์œผ๋ฉด `POST /api/users/{userId}/wishlist-clothes` (์ถ”์ฒœ item body, `REC-{clothesId}` productCode)
2. `PATCH /api/clothes/{clothesId}/convert-to-owned` ๋กœ `WISHLIST` โ†’ `OWNED` ์ „ํ™˜
2. `PATCH /api/v1/clothes/{clothesId}/convert-to-owned` ๋กœ `WISHLIST` โ†’ `OWNED` ์ „ํ™˜

์ด๋ฏธ ๋ณด์œ  ์˜ท์žฅ์— ์žˆ์œผ๋ฉด API ํ˜ธ์ถœ ์—†์ด ์•ˆ๋‚ด ํ† ์ŠคํŠธ๋งŒ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค. ์„ฑ๊ณต ์‹œ ์˜ท์žฅ ๋ชฉ๋ก refresh ์ฝœ๋ฐฑ(`onRefreshWardrobe`)์„ ํ˜ธ์ถœํ•ฉ๋‹ˆ๋‹ค.

Expand Down
6 changes: 3 additions & 3 deletions docs/frontend/implementation-gaps.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ last_updated: 2026-06-17
- AI MD ์ฑ„ํŒ…(`RECO-007`): `/api/chat-gamyagi` mock ๊ฒฝ๋กœ ์‚ฌ์šฉ ์ค‘. `/api/v1/users/{userId}/recommendations/ai-md/personas/{personaId}/chat` ๊ณ„์•ฝ์œผ๋กœ ์ „ํ™˜ ํ•„์š”
- AI MD ์ƒํ’ˆ/์ฝ”๋”” ์ €์žฅ, ์™ธ๋ถ€ ์ƒํ’ˆ ์ €์žฅ์ฒ˜๋Ÿผ ์ถ”์ฒœ๊ณผ ์—ฐ๊ฒฐ๋˜๋Š” ์„ธ๋ถ€ ์•ก์…˜์ด `RECO-013`~`RECO-014` ํ”ผ๋“œ๋ฐฑ์œผ๋กœ๋„ ๊ธฐ๋ก๋˜์–ด์•ผ ํ•˜๋Š”์ง€ ๊ธฐ์ค€ ํ™•์ธ ํ•„์š”

### `RECO-005` ์ถ”์ฒœ ์ƒ์„ธ โ€” ๊ตฌ๋งค ํ›„ ๋ณด์œ  ์˜ท์žฅ ๋“ฑ๋ก
### `RECO-005` ์ถ”์ฒœ ์ƒ์„ธ โ€” ๊ตฌ๋งค ํ›„ ๋ณด์œ  ์˜ท์žฅ ๋“ฑ๋ก ํ”ผ๋“œ๋ฐฑ ๋ฒ”์œ„

`RecommendProductDetailModal` + `useRecommendWishlistToggle.addPurchasedToCloset` ํ๋ฆ„:

1. ๋„ค์ด๋ฒ„์‡ผํ•‘ ๊ตฌ๋งค ๋งํฌ ์ƒˆ ํƒญ ์˜คํ”ˆ
2. ํ™•์ธ ๋ชจ๋‹ฌ(ใ€Œ์˜ท์ด ๋งˆ์Œ์— ๋“œ์…จ๋‚˜์š”?ใ€)์—์„œ **์ƒ€์–ด์š”** / **์•ˆ ์ƒ€์–ด์š”**
3. **์ƒ€์–ด์š”**: ํ•„์š” ์‹œ `POST /api/users/{userId}/wishlist-clothes` โ†’ `PATCH /api/clothes/{id}/convert-to-owned`
3. **์ƒ€์–ด์š”**: ํ•„์š” ์‹œ `POST /api/users/{userId}/wishlist-clothes` โ†’ `PATCH /api/v1/clothes/{id}/convert-to-owned`
4. **์•ˆ ์ƒ€์–ด์š”**: ๋ชจ๋‹ฌ๋งŒ ๋‹ซ์Œ

๊ธฐ์ค€ ๋ฌธ์„œ: [home-recommendation.md](../features/home-recommendation.md) ใ€Œ์ถ”์ฒœ ์ƒ์„ธ โ€” ๊ตฌ๋งค ํ›„ ๋ณด์œ  ์˜ท์žฅ ๋“ฑ๋กใ€. ์ด ํ๋ฆ„์€ `RECO-013` ํ”ผ๋“œ๋ฐฑ API์™€ ๋ณ„๊ฐœ์ด๋ฉฐ, ์ถ”์ฒœ ํ”ผ๋“œ๋ฐฑ ๊ธฐ๋ก ๋ฒ”์œ„ ํ™•์ธ gap๊ณผ๋Š” ๋…๋ฆฝ์ž…๋‹ˆ๋‹ค.
๊ธฐ์ค€ ๋ฌธ์„œ: [home-recommendation.md](../features/home-recommendation.md) ใ€Œ์ถ”์ฒœ ์ƒ์„ธ โ€” ๊ตฌ๋งค ํ›„ ๋ณด์œ  ์˜ท์žฅ ๋“ฑ๋กใ€. ๋ณด์œ  ์ „ํ™˜ ๊ฒฝ๋กœ๋Š” ๊ณต์‹ `/api/v1` ๊ฒฝ๋กœ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉฐ, ๋‚จ์€ gap์€ ์ด ํ๋ฆ„์„ `RECO-013` ํ”ผ๋“œ๋ฐฑ API๋กœ๋„ ๊ธฐ๋กํ•ด์•ผ ํ•˜๋Š”์ง€ ์—ฌ๋ถ€์ž…๋‹ˆ๋‹ค.

ํ˜„์žฌ `HomeTab`, `MatchRecommendationByCategory`, `RecommendProductDetailModal`, `OutfitDetailModal`์€ ์‹ซ์–ด์š”/์ถ”์ฒœ ์ œ์™ธ์™€ ์ผ๋ถ€ ์ €์žฅ ์•ก์…˜์—์„œ `POST /api/v1/users/{userId}/recommendations/feedback`์„ ํ˜ธ์ถœํ•ฉ๋‹ˆ๋‹ค.

Expand Down
15 changes: 11 additions & 4 deletions src/api/similarProducts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ async function unwrap<T>(
export async function getBaseClothesForSimilarProducts(
userId: number,
): Promise<ClothesResponse[]> {
const clothes = await unwrap(
const baseClothes = await unwrap(
api.get<BeApiResponse<ClothesResponse[]>>(
`/api/v1/users/${userId}/clothes`,
),
)
return clothes.filter((item) =>
item.ownershipStatus === 'OWNED' || item.ownershipStatus === 'WISHLIST',
)
const clothesById = new Map<number, ClothesResponse>()

baseClothes.forEach((item) => {
if (item.ownershipStatus !== 'OWNED' && item.ownershipStatus !== 'WISHLIST') {
return
}
clothesById.set(item.clothesId, item)
})

return Array.from(clothesById.values())
}

export async function getSimilarProducts(
Expand Down
14 changes: 13 additions & 1 deletion src/api/wardrobe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export async function convertWishlistToOwned(
): Promise<Garment> {
const updated = await unwrap(
api.patch<BeApiResponse<ClothesResponse>>(
`/api/clothes/${clothesId}/convert-to-owned`,
`/api/v1/clothes/${clothesId}/convert-to-owned`,
payload,
),
)
Expand All @@ -203,3 +203,15 @@ export async function createWishlistClothes(
)
return mapClothesToGarment(data)
}

export async function connectWishlistClothes(
userId: number,
clothesId: number,
): Promise<Garment> {
const data = await unwrap(
api.post<BeApiResponse<ClothesResponse>>(
`${wishlistClothesPath(userId)}/${clothesId}`,
),
)
return mapClothesToGarment(data)
}
Loading
Loading