Merge remote-tracking branch 'origin/main' into feat/weather-saju

# Conflicts:
#	shared/api/client/@tanstack/react-query.gen.ts
#	shared/api/client/index.ts
#	shared/api/client/sdk.gen.ts
This commit is contained in:
minaChoi committed 2026-10-28 17:17:57 +09:00
commit c61d488794
17 files changed
+469 -126

No files matched your search

+1 -2
View File
@@ -14,10 +14,9 @@ INSTAGRAM_USER_ID=
PUBLIC_BASE_URL=https://weather.o2o.kr
IMAGE_PROXY_HOSTS=tong.visitkorea.or.kr,www.culture.go.kr,culture.seoul.go.kr
# 오늘 화면 쇼츠 줄 (YouTube Data API v3 키, console.cloud.google.com/apis/credentials 에서 발급·YouTube Data API v3 만 허용).
# 비우면 채널 쇼츠를 자동으로 못 받고 YOUTUBE_SHORTS(영상 ID, 쉼표로 구분, 최신순)만 보여 준다. 둘 다 비우면 기본값(영상 3개)
# 비우면 채널 쇼츠 RSS(키 없음, 최신 15개)로 받는다
YOUTUBE_API_KEY=
YOUTUBE_CHANNEL_ID=UCWdesmwvHFsnjMUWNcDaA9w
YOUTUBE_SHORTS=
# ── 백엔드: DB·Redis (네이티브 실행 기준. compose 안에서는 compose.yaml 이 host·port 를 덮어쓴다)
DB_HOST=localhost
+3 -2
View File
@@ -59,7 +59,7 @@
| [ ] | 단풍 지도 '첫 단풍'은 절정 14일 전부터로 추정(발표에 시작일 없음). 예측 지점이 아닌 명소 32곳은 가장 가까운 예측 지점 날짜를 빌림(예: 남산공원·창덕궁 ← 수리산). 실제 관측과 다를 수 있음 | 사용자 결정 10/21 | `frontend/seo/foliage_2026.json` |
| [ ] | 토스 미니앱 최신 버전 재등록 — 웹이 바뀌면 자동 반영 안 됨 | 10/21 회의 | |
| [ ] | 유튜브 숏폼 자동화 진행 방안 협의 (김성경, 10/22) | 10/21 회의 | |
| [ ] | 오늘 화면 쇼츠 줄 — YouTube Data API 키(`YOUTUBE_API_KEY`) 발급해 운영 .env 에 넣기. 없으면 `youtube_shorts`(영상 ID 3개 고정)만 나와 새 쇼츠가 자동으로 안 붙음 (https://console.cloud.google.com/apis/library/youtube.googleapis.com) | 채널 RSS가 404라 키 없이 채널 목록을 못 받음 | `backend/config/settings.py`, `backend/services/shorts_service.py` |
| [x] | 오늘 화면 쇼츠 줄 — 영상 ID 고정 목록(`youtube_shorts`) 없앰. API 키가 없으면 채널 쇼츠 RSS(`UUSH…` 재생목록, 키 없음)로 자동으로 받음. 키(`YOUTUBE_API_KEY`)를 운영 .env 에 넣으면 Data API 로 바뀌어 퍼가기·길이까지 거름 (https://console.cloud.google.com/apis/library/youtube.googleapis.com) | 10/28 운영에 키가 없어 고정 목록만 나와 새 쇼츠가 안 붙음. 채널 RSS가 다시 200 | `backend/services/external/youtube.py`, `backend/services/shorts_service.py` |
| [ ] | **[결정 필요]** 쇼츠 문구 검토: '소리 켜기'/'소리 끄기' (줄 제목은 없앰) | 화면 문구 규칙 | `frontend/src/b/Shorts.tsx` |
| [ ] | 쇼츠를 올린 직후 목록 갱신(`ShortsService.refresh`) 부르기 — 지금은 워커가 07·12·18시 10분에만 받아 18시 넘어 올리면 다음 날 아침에 뜸. 자동 업로드면 끝난 뒤 호출, 손으로 올리면 관리자 갱신 API | 올리는 방식 확인 필요 | `backend/services/shorts_service.py`, `backend/worker_main.py` |
| [ ] | 쇼츠 API 실패·빈 목록일 때 공유 링크로 들어오면 남색 빈 화면만 보임 — 그 영상 ID 하나라도 띄우거나 × 버튼·안내 문구 보이기 | 10/27 QA 실패 (`items` 가 비면 빈 div 만 그림) | `frontend/src/b/Shorts.tsx` |
@@ -383,4 +383,5 @@
| [ ] | 오늘의 판(모두 같은 순서)·구별 순위·구 대항전·공유 카드·판 깨면 각 카드 열기 — 백엔드 필요, 재미 확인 뒤 | 기획 v2 DAU 장치 | — |
| [ ] | **[결정 필요]** 앱인토스에 넣으면 게임물 등급분류·게임 카테고리 재등록 대상인지 토스에 확인 | 앱인토스 8월 공지 | — |
| [ ] | 들어가는 길 — 지금은 `/game` 주소로만 열림. 피드 카드·메뉴 노출 여부 결정 | 사용자 선택 (10/28) | `frontend/src/App.tsx` |
| [ ] | 라운드 목표 점수(200 + 라운드마다 80, 60초) — 아무 데나 1초에 1번 떨어뜨리는 시뮬레이션 4판으로만 정함(넘침 3판 4~6라운드, 시간 끝 1판 8라운드). 실제 사람 플레이 보고 조정 | 시간 제한 라운드 추가 (10/28) | `frontend/src/b/cloudMerge.ts` `roundTarget` |
| [ ] | 라운드 목표 점수(200 + 라운드마다 80) — 시간 제한은 없앰(사용자 10/28). 1초에 1번 아무 데나 떨어뜨리면 4~13라운드에서 넘침. 실제 사람 플레이 보고 조정 | 라운드 추가 (10/28) | `frontend/src/b/cloudMerge.ts` `roundTarget` |
| [x] | 라운드 각 — 라운드를 깰 때마다 2각, 하루 20각(사용자 결정 10/28). 로그인한 사람만, 판 시작 표(서명)로 남의 판·위조 거절, 라운드당 15초 안 지나면 거절. 레벨업 창은 판이 끝난 뒤에 | 계정 레벨과 연결 (10/28) | `backend/services/level_service.py` `game_token`, `frontend/src/b/CloudMergePage.tsx` `claimRound` |
+1 -2
View File
@@ -51,10 +51,9 @@ class Settings(BaseSettings):
azure_blob_base_url: str = ""
azure_blob_sas_token: str = ""
# 오늘 화면 쇼츠 줄. API 키가 있으면 채널의 쇼츠를 받고, 없으면 youtube_shorts(영상 ID, 쉼표로 구분, 최신순)를 보여 준다
# 오늘 화면 쇼츠 줄. API 키가 있으면 Data API 로(공개·퍼가기 허용·3분 이하), 없으면 채널 쇼츠 RSS 로 받는다
youtube_api_key: str = ""
youtube_channel_id: str = "UCWdesmwvHFsnjMUWNcDaA9w"
youtube_shorts: str = "kpp6WFEi4Nk,Wdv-e_DdQFY,WmbOEhi91IM"
# 구글 로그인 OAuth 클라이언트 ID (공개값). 비면 구글 로그인을 받지 않는다
google_client_id: str = ""
+11 -1
View File
@@ -4,7 +4,7 @@ from common.auth import current_user
from common.database.model.models import User
from common.enums import ErrorType
from common.models.errors import error_info
from router.v1.level.protocol import LevelAction, LevelStep, LevelUnlock, Res_Level
from router.v1.level.protocol import LevelAction, LevelStep, LevelUnlock, Req_GameRound, Res_GameStart, Res_Level
from services.level_service import LEVELS, LevelService, Status
router = APIRouter(prefix="/v1/level", tags=["level"])
@@ -33,3 +33,13 @@ async def attend(user: User = Depends(current_user), service: LevelService = Dep
@router.post("/share", response_model=Res_Level, response_model_exclude_none=True, summary="공유를 마쳤을 때 (하루 한 번 각)")
async def shared(user: User = Depends(current_user), service: LevelService = Depends()) -> Res_Level:
return _res(*await service.share(user))
@router.post("/game/start", response_model=Res_GameStart, response_model_exclude_none=True, summary="날씨게임 한 판 시작 (라운드 각을 받을 표)")
async def game_start(user: User = Depends(current_user), service: LevelService = Depends()) -> Res_GameStart:
return Res_GameStart(play=service.game_start(user))
@router.post("/game/round", response_model=Res_Level, response_model_exclude_none=True, summary="날씨게임 라운드를 깼을 때 (2각, 하루 20각)")
async def game_round(req: Req_GameRound, user: User = Depends(current_user), service: LevelService = Depends()) -> Res_Level:
return _res(*await service.game_round(user, req.play, req.round))
+10 -1
View File
@@ -2,7 +2,7 @@ from typing import Optional
from pydantic import Field
from common.models.gmodel import Res_WebPacketProtocol, WebPacketProtocol
from common.models.gmodel import Req_WebPacketProtocol, Res_WebPacketProtocol, WebPacketProtocol
class LevelAction(WebPacketProtocol):
@@ -36,3 +36,12 @@ class Res_Level(Res_WebPacketProtocol):
today: list[LevelAction] = []
unlocks: list[LevelUnlock] = []
levels: list[LevelStep] = Field([], description="레벨 전체 (이름·필요한 각)")
class Res_GameStart(Res_WebPacketProtocol):
play: Optional[str] = Field(None, description="판 시작 표. 라운드를 깰 때 그대로 보낸다")
class Req_GameRound(Req_WebPacketProtocol):
play: str = Field(max_length=40)
round: int = Field(description="방금 깬 라운드 (1부터)")
+19
View File
@@ -1,4 +1,6 @@
import asyncio
import re
import xml.etree.ElementTree as ET
from typing import Optional
import httpx
@@ -7,6 +9,9 @@ import httpx
API_URL = "https://www.googleapis.com/youtube/v3"
# 키 없이 영상 제목만 받을 때
OEMBED_URL = "https://www.youtube.com/oembed"
# 키 없이 채널 쇼츠 목록을 받을 때: 채널 ID의 UC 를 UUSH 로 바꾼 재생목록이 그 채널의 쇼츠만 모은 목록이다
FEED_URL = "https://www.youtube.com/feeds/videos.xml"
_NS = {"a": "http://www.w3.org/2005/Atom", "yt": "http://www.youtube.com/xml/schemas/2015"}
SHORT_MAX_SEC = 180 # 쇼츠는 3분 이하
_DURATION = re.compile(r"^PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?$")
@@ -53,3 +58,17 @@ async def video_title(client: httpx.AsyncClient, video_id: str) -> Optional[str]
return None
res.raise_for_status()
return res.json().get("title")
async def feed_shorts(client: httpx.AsyncClient, channel_id: str, limit: int) -> list[dict]:
"""키 없이 채널의 공개 쇼츠 [{id, title, published}], 최신순. 퍼가기를 막은 영상은 뺀다."""
res = await client.get(FEED_URL, params={"playlist_id": "UUSH" + channel_id.removeprefix("UC")})
res.raise_for_status()
root = ET.fromstring(res.text)
entries = [
{"id": e.findtext("yt:videoId", namespaces=_NS), "title": e.findtext("a:title", namespaces=_NS), "published": e.findtext("a:published", namespaces=_NS)}
for e in root.findall("a:entry", _NS)
]
entries = sorted((e for e in entries if e["id"] and e["title"]), key=lambda e: e["published"] or "", reverse=True)[:limit]
embeddable = await asyncio.gather(*(video_title(client, e["id"]) for e in entries))
return [e for e, ok in zip(entries, embeddable) if ok]
+31
View File
@@ -1,3 +1,6 @@
import hashlib
import hmac
import time
import uuid
from dataclasses import dataclass
from datetime import date, timedelta
@@ -10,6 +13,7 @@ from common.database.model.models import User
from common.enums import ErrorType
from common.logger import LOG
from common.utils.kma_time import now_kst
from config.settings import settings
from crud.level_crud import LevelCRUD
# 계정 레벨: 모은 각 총량으로 정한다 (쓰는 기능이 생겨도 레벨은 안 내려간다). 사용자 결정 10/28
@@ -24,9 +28,14 @@ ACTIONS: dict[str, tuple[int, int, str]] = {
"talk": (20, 20, "동네 이야기 글쓰기"),
"checkin": (10, 10, "저녁 체크인"),
"share": (10, 10, "공유하기"),
"game": (2, 20, "날씨게임 라운드 깨기"),
"streak": (50, 50, "7일 연속 출석"),
}
STREAK_DAYS = 7
# 날씨게임 점수는 폰에서 계산해 조작될 수 있다. 하루 한도로 막고, 판 시작부터 라운드당 이만큼은 지나야 받는다
GAME_ROUND_MIN_SEC = 15
GAME_MAX_SEC = 3 * 60 * 60
GAME_MAX_ROUND = 100
STREAK_LOOKBACK = 60
# 레벨로 열리는 것: 새로 생기는 것만 잠근다 (지금 있는 기능·캐릭터·색·기분은 그대로)
@@ -52,6 +61,20 @@ def is_unlocked(points: int, key: str) -> bool:
return level_of(points) >= unlock_level(key)
def game_token(user_id: uuid.UUID, ts: int) -> str:
"""판 시작 표: 시작 시각과 서명. 그 사람만 쓸 수 있다"""
sig = hmac.new(settings.jwt_access_secret.encode(), f"game:{user_id}:{ts}".encode(), hashlib.sha256).hexdigest()[:16]
return f"{ts}.{sig}"
def game_round_ok(user_id: uuid.UUID, play: str, round_no: int, now: int) -> bool:
ts, _, _ = play.partition(".")
if not ts.isdigit() or not hmac.compare_digest(game_token(user_id, int(ts)), play):
return False
elapsed = now - int(ts)
return 1 <= round_no <= GAME_MAX_ROUND and round_no * GAME_ROUND_MIN_SEC <= elapsed <= GAME_MAX_SEC
def streak(days: set[date], today: date) -> int:
"""오늘부터 거꾸로 이어 출석한 날 수"""
n = 0
@@ -139,3 +162,11 @@ class LevelService:
async def share(self, user: User) -> tuple[ErrorType, Optional[Status]]:
await award(user.user_id, "share")
return await self.status(user)
def game_start(self, user: User) -> str:
return game_token(user.user_id, int(time.time()))
async def game_round(self, user: User, play: str, round_no: int) -> tuple[ErrorType, Optional[Status]]:
if game_round_ok(user.user_id, play, round_no, int(time.time())):
await award(user.user_id, "game", f"{play}:{round_no}")
return await self.status(user)
+6 -7
View File
@@ -1,5 +1,5 @@
import asyncio
import json
import xml.etree.ElementTree as ET
import httpx
from redis.exceptions import RedisError
@@ -29,11 +29,11 @@ class ShortsService:
return await self.refresh()
async def refresh(self) -> tuple[ErrorType, list[dict]]:
"""유튜브에서 새로 받아 캐시에 둔다. API 키가 있으면 채널에서, 없으면 설정의 영상 ID 목록으로."""
"""유튜브에서 새로 받아 캐시에 둔다. API 키가 있으면 Data API 로, 없으면 채널 쇼츠 RSS 로."""
try:
async with httpx.AsyncClient(timeout=10) as client:
items = await self._fetch(client)
except (httpx.HTTPError, KeyError, ValueError) as e:
except (httpx.HTTPError, KeyError, ValueError, ET.ParseError) as e:
LOG.error(f"[shorts] fetch: {e}")
return ErrorType.EXTERNAL_API_ERROR, []
try:
@@ -45,7 +45,6 @@ class ShortsService:
async def _fetch(self, client: httpx.AsyncClient) -> list[dict]:
if settings.youtube_api_key:
found = await youtube.channel_shorts(client, settings.youtube_api_key, settings.youtube_channel_id, MAX_ITEMS)
return [{"id": v["id"], "title": v["title"]} for v in found]
ids = [i.strip() for i in settings.youtube_shorts.split(",") if i.strip()][:MAX_ITEMS]
titles = await asyncio.gather(*(youtube.video_title(client, i) for i in ids))
return [{"id": i, "title": t} for i, t in zip(ids, titles) if t]
else:
found = await youtube.feed_shorts(client, settings.youtube_channel_id, MAX_ITEMS)
return [{"id": v["id"], "title": v["title"]} for v in found]
+39
View File
@@ -102,3 +102,42 @@ async def test_seven_day_attendance_bonus(offline):
me = (await c.post("/v1/level/attend", headers=h)).json()
# 지난 6일은 장부만 넣어 총량엔 없다: 오늘 출석 10 + 7일 연속 50
assert me["streak"] == 7 and me["points"] == 60
@pytest.mark.anyio
async def test_game_rounds_award_two_each_up_to_twenty(offline):
import time
from services.level_service import GAME_ROUND_MIN_SEC, game_token
async with client() as c:
h = await _login(c, "level_03")
other = await _login(c, "level_04")
uid = await DB_SESSION_MNG.execute_lambda(lambda s: s.scalar(select(User.user_id).where(User.login_id == "level_03")))
uid = uid[1]
play = (await c.post("/v1/level/game/start", headers=h)).json()["play"]
# 시작하자마자 깬 라운드는 받지 않는다
me = (await c.post("/v1/level/game/round", json={"play": play, "round": 1}, headers=h)).json()
assert _earned(me, "game") == 0
# 충분히 지난 판: 라운드마다 2각, 같은 라운드는 한 번
old = game_token(uid, int(time.time()) - GAME_ROUND_MIN_SEC * 30)
await c.post("/v1/level/game/round", json={"play": old, "round": 1}, headers=h)
me = (await c.post("/v1/level/game/round", json={"play": old, "round": 1}, headers=h)).json()
assert _earned(me, "game") == 2 and me["points"] == 2
# 남의 판·위조한 판은 받지 않는다
me = (await c.post("/v1/level/game/round", json={"play": old, "round": 2}, headers=other)).json()
assert _earned(me, "game") == 0
forged = old.split(".")[0] + ".0000000000000000"
me = (await c.post("/v1/level/game/round", json={"play": forged, "round": 2}, headers=h)).json()
assert _earned(me, "game") == 2
# 하루 20각까지
for r in range(2, 15):
me = (await c.post("/v1/level/game/round", json={"play": old, "round": r}, headers=h)).json()
assert _earned(me, "game") == 20 and me["points"] == 20
# 로그인 안 하면 판을 열 수 없다
assert (await c.post("/v1/level/game/start")).status_code == 401
+27 -1
View File
@@ -6,7 +6,7 @@ import pytest
from common.cache.redis_client import REDIS
from common.enums import ErrorType
from services import shorts_service
from services.external.youtube import channel_shorts, seconds, video_title
from services.external.youtube import channel_shorts, feed_shorts, seconds, video_title
from services.shorts_service import CACHE_KEY, ShortsService
@@ -58,6 +58,32 @@ async def test_video_title_none_when_embedding_blocked():
assert await video_title(client, "blocked") is None
def _feed(entries: list[tuple[str, str]]) -> str:
items = "".join(
f"<entry><yt:videoId>{vid}</yt:videoId><title>제목 {vid}</title><published>{published}</published></entry>" for vid, published in entries
)
return f'<feed xmlns="http://www.w3.org/2005/Atom" xmlns:yt="http://www.youtube.com/xml/schemas/2015">{items}</feed>'
@pytest.mark.anyio
async def test_feed_shorts_reads_channel_shorts_feed_newest_first_without_blocked():
seen = {}
def handle(req: httpx.Request) -> httpx.Response:
if req.url.path.endswith("/feeds/videos.xml"):
seen["playlist"] = req.url.params["playlist_id"]
return httpx.Response(200, text=_feed([("old", "2026-10-20T00:00:00+00:00"), ("new", "2026-10-28T00:00:00+00:00"), ("blocked", "2026-10-27T00:00:00+00:00")]))
if "blocked" in req.url.params["url"]:
return httpx.Response(401)
return httpx.Response(200, content=json.dumps({"title": "x"}))
async with httpx.AsyncClient(transport=httpx.MockTransport(handle)) as client:
found = await feed_shorts(client, "UCtest", 10)
assert seen["playlist"] == "UUSHtest"
assert [v["id"] for v in found] == ["new", "old"]
assert found[0]["title"] == "제목 new"
@pytest.mark.anyio
async def test_items_reads_cache_and_fetches_only_when_missing(monkeypatch):
calls = []
+164 -95
View File
@@ -1,16 +1,34 @@
import { useEffect, useRef, useState, type PointerEvent } from 'react'
import { createPortal } from 'react-dom'
import { useNavigate } from 'react-router'
import { useQuery } from '@tanstack/react-query'
import { getWeatherTodayOptions } from '@nalssigak/shared/api/client/@tanstack/react-query.gen'
import { useQuery, useQueryClient } from '@tanstack/react-query'
import { getWeatherTodayOptions, myLevelQueryKey } from '@nalssigak/shared/api/client/@tanstack/react-query.gen'
import { gameRound, gameStart } from '@nalssigak/shared/api/client/sdk.gen'
import type { ResLevel } from '@nalssigak/shared/api/client/types.gen'
import { kst } from '@nalssigak/shared/lib'
import { slotAt } from '@nalssigak/shared/lib/weatherText'
import { cx } from '../lib/utils'
import { createGame, DROP_Y, H, LEVELS, LINE_Y, loadBest, randomLevel, ROUND_MS, roundTarget, saveBest, W, windDir, type Game } from './cloudMerge'
import { useAuth } from './authContext'
import { createGame, DROP_Y, H, LEVELS, LINE_Y, loadBest, randomLevel, roundTarget, saveBest, W, windDir, type Game } from './cloudMerge'
import { useLevel } from './level'
import { iconSrc } from './lib'
import { useRegion } from './regionContext'
import { useSheet } from './sheetContext'
import { Ic, TAP44 } from './ui'
const gameEarned = (l: ResLevel | undefined) => l?.today?.find((a) => a.action === 'game')
/** 라운드를 깨면 서버에 알려 각을 받는다. 내 레벨은 판이 끝날 때 한 번에 바꿔, 게임 중에 레벨업 창이 뜨지 않게 한다 */
async function claimRound(play: string, round: number) {
try {
const { data } = await gameRound({ body: { play, round } })
return data.result?.success ? data : undefined
} catch (e) {
console.warn('[game] 라운드 각을 받지 못함', e)
return undefined
}
}
const images = LEVELS.map((l) => {
const img = new Image()
img.src = iconSrc(l.icon) ?? ''
@@ -67,6 +85,15 @@ export function CloudMergePage() {
const navigate = useNavigate()
const { region } = useRegion()
const { open } = useSheet()
const { loggedIn } = useAuth()
const queryClient = useQueryClient()
const level = useLevel().data
const [earned, setEarned] = useState<number | null>(null)
const [gain, setGain] = useState(0)
const baseRef = useRef<number | undefined>(undefined)
useEffect(() => {
baseRef.current = gameEarned(level)?.earned
}, [level])
const today = useQuery(getWeatherTodayOptions({ query: { region: region.code } }))
const [now] = useState(() => kst(new Date()))
const slots = today.data?.slots ?? []
@@ -81,11 +108,10 @@ export function CloudMergePage() {
const coolRef = useRef(0)
const [score, setScore] = useState(0)
const [best, setBest] = useState(loadBest)
const [over, setOver] = useState<'full' | 'time' | null>(null)
const [over, setOver] = useState(false)
const [play, setPlay] = useState(0)
const [round, setRound] = useState(1)
const [roundGot, setRoundGot] = useState(0)
const [leftSec, setLeftSec] = useState(ROUND_MS / 1000)
const [flash, setFlash] = useState(false)
useEffect(() => {
@@ -99,20 +125,45 @@ export function CloudMergePage() {
ctx.scale(ratio, ratio)
let roundNo = 1
let base = 0
let left = ROUND_MS
let flashTimer: ReturnType<typeof setTimeout> | undefined
let ticket: Promise<string | undefined> = Promise.resolve(undefined)
let lastLevel: ResLevel | undefined
let gotSoFar = baseRef.current
const settle = () => {
if (lastLevel) queryClient.setQueryData(myLevelQueryKey(), lastLevel)
lastLevel = undefined
}
if (loggedIn) {
ticket = gameStart()
.then(({ data }) => data.play ?? undefined)
.catch((e: unknown) => {
console.warn('[game] 판을 열지 못함', e)
return undefined
})
}
const claim = async (round: number) => {
const token = await ticket
if (!token) return
const res = await claimRound(token, round)
const now = gameEarned(res)?.earned
if (!res || now == null) return
lastLevel = res
if (gotSoFar != null && now > gotSoFar) setGain(now - gotSoFar)
gotSoFar = now
setEarned(now)
}
const game = createGame(windMs, dir, {
onScore: (s) => {
setScore(s)
if (s - base >= roundTarget(roundNo)) {
roundNo += 1
base = s
left = ROUND_MS
setRound(roundNo)
setLeftSec(ROUND_MS / 1000)
setFlash(true)
setGain(0)
clearTimeout(flashTimer)
flashTimer = setTimeout(() => setFlash(false), 1200)
flashTimer = setTimeout(() => setFlash(false), 1400)
void claim(roundNo - 1)
}
setRoundGot(s - base)
if (s > loadBest()) {
@@ -120,22 +171,16 @@ export function CloudMergePage() {
setBest(s)
}
},
onOver: () => setOver('full'),
onOver: () => {
setOver(true)
settle()
},
})
gameRef.current = game
let last = performance.now()
let raf = 0
const loop = (t: number) => {
game.step(t - last, t)
if (left > 0 && !game.isOver()) {
const sec = Math.ceil(left / 1000)
left -= t - last
if (left <= 0) {
game.end()
setLeftSec(0)
setOver((o) => o ?? 'time')
} else if (Math.ceil(left / 1000) !== sec) setLeftSec(Math.ceil(left / 1000))
}
last = t
draw(ctx, game, aimRef.current, nextRef.current, game.danger())
raf = requestAnimationFrame(loop)
@@ -145,9 +190,10 @@ export function CloudMergePage() {
cancelAnimationFrame(raf)
clearTimeout(flashTimer)
game.destroy()
settle()
gameRef.current = null
}
}, [today.isSuccess, windMs, dir, play])
}, [today.isSuccess, windMs, dir, play, loggedIn, queryClient])
const toX = (e: PointerEvent<HTMLCanvasElement>) => {
const rect = e.currentTarget.getBoundingClientRect()
@@ -167,90 +213,113 @@ export function CloudMergePage() {
const restart = () => {
setScore(0)
setOver(null)
setOver(false)
setRound(1)
setRoundGot(0)
setLeftSec(ROUND_MS / 1000)
setPlay((n) => n + 1)
}
const cap = gameEarned(level)?.cap ?? 20
const todayGak = earned ?? gameEarned(level)?.earned ?? 0
const back = () => (window.history.state?.idx > 0 ? navigate(-1) : navigate('/'))
const windText = windMs < 0.5 ? '바람 없음' : `${dir > 0 ? '→' : '←'} 초속 ${windMs.toFixed(1)}m`
return (
<div className="pb-6">
<div className="flex items-start gap-1 px-3 pt-1">
<button type="button" onClick={back} aria-label="뒤로" className={cx('relative mt-0.5 grid size-9 shrink-0 cursor-pointer place-items-center rounded-full bg-white/80 text-[22px] font-bold shadow-[0_4px_10px_rgb(40_48_74/0.08)]', TAP44)}>
‹
</button>
<div className="min-w-0 flex-1 px-1">
<p className="m-0 flex items-center gap-1 text-[13px] font-extrabold opacity-75">
<Ic name="cloud" className="size-4" />
날씨게임 · {region.short_name} {windText}
</p>
<h2 className="m-0 mt-0.5 font-jua text-[26px] leading-tight font-normal">구름 합치기</h2>
</div>
<button type="button" onClick={() => open({ type: 'gameHelp' })} aria-label="게임 방법" className={cx('relative mt-0.5 grid size-9 shrink-0 cursor-pointer place-items-center rounded-full bg-white/80 text-[18px] font-extrabold text-(--ink2) shadow-[0_4px_10px_rgb(40_48_74/0.08)]', TAP44)}>
?
</button>
</div>
<div className="mx-3 mt-3 flex items-center justify-between text-[14px] font-extrabold">
<span className="rounded-full bg-(--ink) px-3 py-1 text-[13px] text-white">{round}라운드</span>
<span className={cx('font-jua text-[26px] leading-none font-normal tabular-nums', leftSec <= 10 ? 'text-[#e5484d]' : 'text-(--ink)')}>
{Math.floor(leftSec / 60)}:{String(leftSec % 60).padStart(2, '0')}
</span>
<span className="flex items-center gap-1 opacity-75">
다음 <Ic name={LEVELS[next].icon} className="size-6" />
</span>
</div>
<div className="mx-3 mt-2">
<div className="h-2.5 overflow-hidden rounded-full bg-white/80">
<i className="block h-full rounded-full bg-(--orange) transition-[width]" style={{ width: `${Math.min(100, (roundGot / roundTarget(round)) * 100)}%` }} />
</div>
<p className="m-0 mt-1 flex justify-between text-[12px] font-bold opacity-75">
<span>
목표 {roundGot} / {roundTarget(round)}
</span>
<span>
총점 {score} · 최고 {best}
</span>
</p>
</div>
{/* 하단 탭에 가리지 않게 화면 높이에 맞춰 폭을 줄인다 (위 머리말 약 210px + 아래 순서·탭 약 120px) */}
<div className="relative mx-auto mt-2" style={{ width: 'min(100% - 24px, (100dvh - 330px) * 2 / 3)' }}>
<canvas
ref={canvasRef}
onPointerMove={onMove}
onPointerDown={onMove}
onPointerUp={onUp}
className="block aspect-[360/540] w-full touch-none rounded-[22px] bg-gradient-to-b from-[#cfe8ff] to-[#f3f9ff] shadow-[0_4px_14px_rgb(40_48_74/0.08)]"
/>
{!today.isSuccess && <p className="absolute inset-0 m-0 grid place-items-center text-[14px] font-bold opacity-60">{today.isError ? '날씨를 불러오지 못했어요' : '오늘 바람 불러오는 중…'}</p>}
{flash && !over && <p className="pointer-events-none absolute inset-x-0 top-[30%] m-0 text-center font-jua text-[34px] text-(--orange) drop-shadow-[0_2px_0_white]">{round}라운드!</p>}
{over && (
<div className="absolute inset-0 grid place-items-center rounded-[22px] bg-white/75">
<div className="text-center">
<p className="m-0 font-jua text-[28px]">{over === 'time' ? '시간 끝!' : '넘쳤어요!'}</p>
<p className="m-0 mt-1 text-[15px] font-bold">
{round}라운드 · 총 {score}점{score >= best && score > 0 ? ' · 최고 기록' : ''}
</p>
<button type="button" onClick={restart} className="mt-4 cursor-pointer rounded-full bg-(--orange) px-6 py-2.5 text-[15px] font-extrabold text-white">
다시 하기
</button>
</div>
// 스택 화면: 머리줄·탭을 덮게 body 로 띄운다(main 이 쌓임 순서를 가둬서). b-app 의 낮 색을 그대로 써 밤에도 밝은 바탕
return createPortal(
<div className="b-app fixed inset-0 z-[45] touch-none bg-[linear-gradient(#d9edff,#f5faff)]">
<div className="mx-auto flex h-full max-w-[440px] flex-col pt-[env(safe-area-inset-top,0px)] pb-[calc(10px+env(safe-area-inset-bottom,0px))] text-(--ink)">
<div className="flex items-center gap-1 px-3 pt-2">
<button type="button" onClick={back} aria-label="뒤로" className={cx('relative grid size-9 shrink-0 cursor-pointer place-items-center rounded-full bg-white/80 text-[22px] font-bold shadow-[0_4px_10px_rgb(40_48_74/0.08)]', TAP44)}>
‹
</button>
<div className="min-w-0 flex-1 px-1">
<h2 className="m-0 font-jua text-[22px] leading-tight font-normal">구름 합치기</h2>
<p className="m-0 flex items-center gap-1 text-[12px] font-extrabold opacity-75">
<Ic name="cloud" className="size-4" />
{region.short_name} {windText}
</p>
</div>
)}
</div>
<div className="mx-3 mt-3 flex flex-wrap items-center justify-center gap-x-1 gap-y-1 text-[12px] font-bold opacity-70">
{LEVELS.map((l, i) => (
<span key={l.icon} className="flex items-center gap-0.5">
<Ic name={l.icon} className="size-5" />
{i < LEVELS.length - 1 && '›'}
<button type="button" onClick={() => open({ type: 'gameHelp' })} aria-label="게임 방법" className={cx('relative grid size-9 shrink-0 cursor-pointer place-items-center rounded-full bg-white/80 text-[18px] font-extrabold text-(--ink2) shadow-[0_4px_10px_rgb(40_48_74/0.08)]', TAP44)}>
?
</button>
</div>
<div className="mx-3 mt-2.5 flex items-center gap-2.5 text-[13px] font-extrabold">
<span className="shrink-0 rounded-full bg-(--ink) px-3 py-1 text-white">{round}라운드</span>
<div className="min-w-0 flex-1">
<div className="h-2.5 overflow-hidden rounded-full bg-white/80">
<i className="block h-full rounded-full bg-(--orange) transition-[width]" style={{ width: `${Math.min(100, (roundGot / roundTarget(round)) * 100)}%` }} />
</div>
<p className="m-0 mt-0.5 text-[11px] font-bold opacity-75">
다음 라운드까지 {roundGot} / {roundTarget(round)}
</p>
</div>
<span className="flex shrink-0 items-center gap-1 opacity-75">
다음 <Ic name={LEVELS[next].icon} className="size-6" />
</span>
))}
</div>
<p className="mx-3 mt-1 mb-0 flex justify-between text-[12px] font-bold">
<span>
점수 <b className="text-[16px] text-(--orange)">{score}</b> <span className="opacity-60">· 최고 {best}</span>
</span>
{loggedIn ? (
<span className="opacity-75">
오늘 게임 각 {todayGak} / {cap}
</span>
) : (
<button type="button" onClick={() => open({ type: 'login' })} className="cursor-pointer p-0 text-[12px] font-extrabold text-(--orange-deep) underline underline-offset-2">
로그인하면 라운드마다 +2각
</button>
)}
</p>
{/* 남은 높이를 다 쓰되 2:3 비율은 지킨다 */}
<div className="mt-2 grid min-h-0 flex-1 place-items-center px-3 [container-type:size]">
<div className="relative aspect-[2/3]" style={{ width: 'min(100cqw, 100cqh * 2 / 3)' }}>
<canvas
ref={canvasRef}
onPointerMove={onMove}
onPointerDown={onMove}
onPointerUp={onUp}
className="block size-full touch-none rounded-[22px] bg-gradient-to-b from-[#cfe8ff] to-[#f3f9ff] shadow-[0_4px_14px_rgb(40_48_74/0.08)]"
/>
{!today.isSuccess && <p className="absolute inset-0 m-0 grid place-items-center text-[14px] font-bold opacity-60">{today.isError ? '날씨를 불러오지 못했어요' : '오늘 바람 불러오는 중…'}</p>}
{flash && !over && (
<p className="pointer-events-none absolute inset-x-0 top-[30%] m-0 text-center font-jua text-[34px] leading-tight text-(--orange) drop-shadow-[0_2px_0_white]">
{round}라운드!
{gain > 0 && <span className="block text-[22px] text-(--ink)">+{gain}각</span>}
</p>
)}
{over && (
<div className="absolute inset-0 grid place-items-center rounded-[22px] bg-white/75">
<div className="text-center">
<p className="m-0 font-jua text-[28px]">넘쳤어요!</p>
<p className="m-0 mt-1 text-[15px] font-bold">
{round}라운드 · 총 {score}점{score >= best && score > 0 ? ' · 최고 기록' : ''}
</p>
{loggedIn && (
<p className="m-0 mt-1 text-[13px] font-bold opacity-75">
오늘 게임 각 {todayGak} / {cap}
</p>
)}
<button type="button" onClick={restart} className="mt-4 cursor-pointer rounded-full bg-(--orange) px-6 py-2.5 text-[15px] font-extrabold text-white">
다시 하기
</button>
</div>
</div>
)}
</div>
</div>
<div className="mx-3 mt-2 flex items-center justify-center gap-x-1 text-[12px] font-bold opacity-70">
{LEVELS.map((l, i) => (
<span key={l.icon} className="flex items-center gap-0.5">
<Ic name={l.icon} className="size-5" />
{i < LEVELS.length - 1 && '›'}
</span>
))}
</div>
</div>
</div>
</div>,
document.body,
)
}
+3 -2
View File
@@ -552,12 +552,13 @@ function ArticleSheet({ articleId, onTitle }: { articleId: number; onTitle: (t:
/* ---------- 이번 주 특집 ---------- */
const GAME_STEPS = [
'라운드마다 60초 안에 목표 점수를 채우면 다음 라운드로 넘어가요. 라운드가 오를수록 목표가 높아져요.',
'목표 점수를 채우면 다음 라운드로 넘어가요. 라운드가 오를수록 목표가 높아져요.',
'손가락을 좌우로 움직여 떨어뜨릴 자리를 고르고, 손을 떼면 떨어져요.',
'떨어지는 동안 오늘 우리 동네 바람만큼 옆으로 밀려요. 바람 방향을 보고 조금 비켜 떨어뜨리세요.',
'같은 그림끼리 닿으면 한 단계 큰 그림으로 합쳐지고 점수가 올라요.',
'해 둘이 만나면 사라지면서 보너스 점수!',
'시간 안에 목표를 못 채우거나, 쌓인 그림이 위쪽 점선을 넘은 채로 잠깐 있으면 끝나요. 판은 다음 라운드로 그대로 이어져요.',
'쌓인 그림이 위쪽 점선을 넘은 채로 잠깐 있으면 끝나요. 판은 다음 라운드로 그대로 이어져요.',
'로그인하면 라운드를 깰 때마다 2각을 받아요. 하루 20각까지예요.',
]
function GameHelpSheet() {
+3 -8
View File
@@ -25,8 +25,7 @@ const MAX_WIND = 12
/** 처음 떨어뜨리는 건 작은 4단계 중에서 */
const SPAWN_MAX = 3
const SUN_BONUS = 66
/** 라운드마다 주어지는 시간. 그 안에 목표 점수를 넘기면 다음 라운드, 못 넘기면 끝 */
export const ROUND_MS = 60_000
/** 라운드마다 이만큼 점수를 더 내면 다음 라운드 */
export const roundTarget = (round: number) => 200 + 80 * (round - 1)
export const pointsFor = (level: number) => ((level + 1) * (level + 2)) / 2
@@ -89,7 +88,7 @@ export function createGame(windMs: number, dir: number, ev: GameEvents) {
const step = (dt: number, now: number) => {
if (over) return
Matter.Engine.update(engine, Math.min(dt, 1000 / 30))
Matter.Engine.update(engine, Math.min(dt, 1000 / 60))
for (const p of pieces()) {
const above = !p.falling && p.position.y - LEVELS[p.level].r < LINE_Y
p.overSince = above ? (p.overSince ?? now) : null
@@ -111,11 +110,7 @@ export function createGame(windMs: number, dir: number, ev: GameEvents) {
/** 위험선 근처에 있는지: 선을 빨갛게 보여 줄 때 */
const danger = () => pieces().some((p) => !p.falling && p.position.y - LEVELS[p.level].r < LINE_Y + 40)
const end = () => {
over = true
}
return { step, drop, end, isOver: () => over, pieces, danger, wind, destroy: () => Matter.Engine.clear(engine) }
return { step, drop, pieces, danger, wind, destroy: () => Matter.Engine.clear(engine) }
}
export type Game = ReturnType<typeof createGame>
+36 -2
View File
@@ -3,8 +3,8 @@
import { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/react-query';
import { client } from '../client.gen';
import { addComment, addMyGak, addTalk, agreeTerms, attend, authConfig, blockAuthor, blockTalkAuthor, createCard, createReel, deleteBirth, deleteComment, deleteMyGak, deleteTalk, drawFortune, getArticle, getBirth, getCardImage, getFeed, getFortuneToday, getImage, getIndex, getPost, getReelCover, getReelVideo, getSeasonWeek, getSky, getSkyRanking, getTalkImage, getTodayGuPage, getTodayPage, getTomorrowGuPage, getTomorrowPage, getWatchSummary, getWeatherNow, getWeatherToday, getWeek, getWeekRanking, googleLogin, healthzHealthzGet, importFortune, likeComment, likePost, likeTalk, listArticles, listBlocked, listCards, listComments, listEvents, listIndices, listMyGak, listMyTalks, listPlaces, listPresets, listReels, listRegions, listSaved, listShorts, listTalks, login, logout, match, me, myLevel, nearestRegion, type Options, publishCard, publishInstagram, publishInstagram2, putBirth, reading, refresh, rejectCard, reportComment, reportTalk, saveDayLog, savePost, scoreMyGak, searchFortunePlaces, shared, signup, talkGroups, toss, tossUnlink, unblock, unlikeComment, unlikePost, unlikeTalk, unsavePost, updateMe, uploadTalkImage, withdraw } from '../sdk.gen';
import type { AddCommentData, AddCommentError, AddCommentResponse, AddMyGakData, AddMyGakError, AddMyGakResponse, AddTalkData, AddTalkError, AddTalkResponse, AgreeTermsData, AgreeTermsError, AgreeTermsResponse, AttendData, AttendError, AttendResponse, AuthConfigData, AuthConfigResponse, BlockAuthorData, BlockAuthorError, BlockAuthorResponse, BlockTalkAuthorData, BlockTalkAuthorError, BlockTalkAuthorResponse, CreateCardData, CreateCardError, CreateCardResponse, CreateReelData, CreateReelError, CreateReelResponse, DeleteBirthData, DeleteBirthError, DeleteBirthResponse, DeleteCommentData, DeleteCommentError, DeleteCommentResponse, DeleteMyGakData, DeleteMyGakError, DeleteMyGakResponse, DeleteTalkData, DeleteTalkError, DeleteTalkResponse, DrawFortuneData, DrawFortuneError, DrawFortuneResponse, GetArticleData, GetArticleError, GetArticleResponse, GetBirthData, GetBirthError, GetBirthResponse, GetCardImageData, GetCardImageError, GetFeedData, GetFeedError, GetFeedResponse, GetFortuneTodayData, GetFortuneTodayError, GetFortuneTodayResponse, GetImageData, GetImageError, GetIndexData, GetIndexError, GetIndexResponse, GetPostData, GetPostError, GetPostResponse, GetReelCoverData, GetReelCoverError, GetReelVideoData, GetReelVideoError, GetSeasonWeekData, GetSeasonWeekResponse, GetSkyData, GetSkyError, GetSkyRankingData, GetSkyRankingResponse, GetSkyResponse, GetTalkImageData, GetTalkImageError, GetTodayGuPageData, GetTodayGuPageError, GetTodayGuPageResponse, GetTodayPageData, GetTodayPageError, GetTodayPageResponse, GetTomorrowGuPageData, GetTomorrowGuPageError, GetTomorrowGuPageResponse, GetTomorrowPageData, GetTomorrowPageError, GetTomorrowPageResponse, GetWatchSummaryData, GetWatchSummaryError, GetWatchSummaryResponse, GetWeatherNowData, GetWeatherNowError, GetWeatherNowResponse, GetWeatherTodayData, GetWeatherTodayError, GetWeatherTodayResponse, GetWeekData, GetWeekError, GetWeekRankingData, GetWeekRankingResponse, GetWeekResponse, GoogleLoginData, GoogleLoginError, GoogleLoginResponse, HealthzHealthzGetData, HealthzHealthzGetResponse, ImportFortuneData, ImportFortuneError, ImportFortuneResponse, LikeCommentData, LikeCommentError, LikeCommentResponse, LikePostData, LikePostError, LikePostResponse, LikeTalkData, LikeTalkError, LikeTalkResponse, ListArticlesData, ListArticlesError, ListArticlesResponse, ListBlockedData, ListBlockedError, ListBlockedResponse, ListCardsData, ListCardsError, ListCardsResponse, ListCommentsData, ListCommentsError, ListCommentsResponse, ListEventsData, ListEventsError, ListEventsResponse, ListIndicesData, ListIndicesError, ListIndicesResponse, ListMyGakData, ListMyGakError, ListMyGakResponse, ListMyTalksData, ListMyTalksError, ListMyTalksResponse, ListPlacesData, ListPlacesError, ListPlacesResponse, ListPresetsData, ListPresetsResponse, ListReelsData, ListReelsError, ListReelsResponse, ListRegionsData, ListRegionsError, ListRegionsResponse, ListSavedData, ListSavedError, ListSavedResponse, ListShortsData, ListShortsResponse, ListTalksData, ListTalksError, ListTalksResponse, LoginData, LoginError, LoginResponse, LogoutData, LogoutError, LogoutResponse, MatchData, MatchError, MatchResponse, MeData, MeError, MeResponse, MyLevelData, MyLevelError, MyLevelResponse, NearestRegionData, NearestRegionError, NearestRegionResponse, PublishCardData, PublishCardError, PublishCardResponse, PublishInstagram2Data, PublishInstagram2Error, PublishInstagram2Response, PublishInstagramData, PublishInstagramError, PublishInstagramResponse, PutBirthData, PutBirthError, PutBirthResponse, ReadingData, ReadingError, ReadingResponse, RefreshData, RefreshError, RefreshResponse, RejectCardData, RejectCardError, RejectCardResponse, ReportCommentData, ReportCommentError, ReportCommentResponse, ReportTalkData, ReportTalkError, ReportTalkResponse, SaveDayLogData, SaveDayLogError, SaveDayLogResponse, SavePostData, SavePostError, SavePostResponse, ScoreMyGakData, ScoreMyGakError, ScoreMyGakResponse, SearchFortunePlacesData, SearchFortunePlacesError, SearchFortunePlacesResponse, SharedData, SharedError, SharedResponse, SignupData, SignupError, SignupResponse, TalkGroupsData, TalkGroupsError, TalkGroupsResponse, TossData, TossError, TossResponse, TossUnlinkData, TossUnlinkError, TossUnlinkResponse, UnblockData, UnblockError, UnblockResponse, UnlikeCommentData, UnlikeCommentError, UnlikeCommentResponse, UnlikePostData, UnlikePostError, UnlikePostResponse, UnlikeTalkData, UnlikeTalkError, UnlikeTalkResponse, UnsavePostData, UnsavePostError, UnsavePostResponse, UpdateMeData, UpdateMeError, UpdateMeResponse, UploadTalkImageData, UploadTalkImageError, UploadTalkImageResponse, WithdrawData, WithdrawError, WithdrawResponse } from '../types.gen';
import { addComment, addMyGak, addTalk, agreeTerms, attend, authConfig, blockAuthor, blockTalkAuthor, createCard, createReel, deleteBirth, deleteComment, deleteMyGak, deleteTalk, drawFortune, gameRound, gameStart, getArticle, getBirth, getCardImage, getFeed, getFortuneToday, getImage, getIndex, getPost, getReelCover, getReelVideo, getSeasonWeek, getSky, getSkyRanking, getTalkImage, getTodayGuPage, getTodayPage, getTomorrowGuPage, getTomorrowPage, getWatchSummary, getWeatherNow, getWeatherToday, getWeek, getWeekRanking, googleLogin, healthzHealthzGet, importFortune, likeComment, likePost, likeTalk, listArticles, listBlocked, listCards, listComments, listEvents, listIndices, listMyGak, listMyTalks, listPlaces, listPresets, listReels, listRegions, listSaved, listShorts, listTalks, login, logout, match, me, myLevel, nearestRegion, type Options, publishCard, publishInstagram, publishInstagram2, putBirth, reading, refresh, rejectCard, reportComment, reportTalk, saveDayLog, savePost, scoreMyGak, searchFortunePlaces, shared, signup, talkGroups, toss, tossUnlink, unblock, unlikeComment, unlikePost, unlikeTalk, unsavePost, updateMe, uploadTalkImage, withdraw } from '../sdk.gen';
import type { AddCommentData, AddCommentError, AddCommentResponse, AddMyGakData, AddMyGakError, AddMyGakResponse, AddTalkData, AddTalkError, AddTalkResponse, AgreeTermsData, AgreeTermsError, AgreeTermsResponse, AttendData, AttendError, AttendResponse, AuthConfigData, AuthConfigResponse, BlockAuthorData, BlockAuthorError, BlockAuthorResponse, BlockTalkAuthorData, BlockTalkAuthorError, BlockTalkAuthorResponse, CreateCardData, CreateCardError, CreateCardResponse, CreateReelData, CreateReelError, CreateReelResponse, DeleteBirthData, DeleteBirthError, DeleteBirthResponse, DeleteCommentData, DeleteCommentError, DeleteCommentResponse, DeleteMyGakData, DeleteMyGakError, DeleteMyGakResponse, DeleteTalkData, DeleteTalkError, DeleteTalkResponse, DrawFortuneData, DrawFortuneError, DrawFortuneResponse, GameRoundData, GameRoundError, GameRoundResponse, GameStartData, GameStartError, GameStartResponse, GetArticleData, GetArticleError, GetArticleResponse, GetBirthData, GetBirthError, GetBirthResponse, GetCardImageData, GetCardImageError, GetFeedData, GetFeedError, GetFeedResponse, GetFortuneTodayData, GetFortuneTodayError, GetFortuneTodayResponse, GetImageData, GetImageError, GetIndexData, GetIndexError, GetIndexResponse, GetPostData, GetPostError, GetPostResponse, GetReelCoverData, GetReelCoverError, GetReelVideoData, GetReelVideoError, GetSeasonWeekData, GetSeasonWeekResponse, GetSkyData, GetSkyError, GetSkyRankingData, GetSkyRankingResponse, GetSkyResponse, GetTalkImageData, GetTalkImageError, GetTodayGuPageData, GetTodayGuPageError, GetTodayGuPageResponse, GetTodayPageData, GetTodayPageError, GetTodayPageResponse, GetTomorrowGuPageData, GetTomorrowGuPageError, GetTomorrowGuPageResponse, GetTomorrowPageData, GetTomorrowPageError, GetTomorrowPageResponse, GetWatchSummaryData, GetWatchSummaryError, GetWatchSummaryResponse, GetWeatherNowData, GetWeatherNowError, GetWeatherNowResponse, GetWeatherTodayData, GetWeatherTodayError, GetWeatherTodayResponse, GetWeekData, GetWeekError, GetWeekRankingData, GetWeekRankingResponse, GetWeekResponse, GoogleLoginData, GoogleLoginError, GoogleLoginResponse, HealthzHealthzGetData, HealthzHealthzGetResponse, ImportFortuneData, ImportFortuneError, ImportFortuneResponse, LikeCommentData, LikeCommentError, LikeCommentResponse, LikePostData, LikePostError, LikePostResponse, LikeTalkData, LikeTalkError, LikeTalkResponse, ListArticlesData, ListArticlesError, ListArticlesResponse, ListBlockedData, ListBlockedError, ListBlockedResponse, ListCardsData, ListCardsError, ListCardsResponse, ListCommentsData, ListCommentsError, ListCommentsResponse, ListEventsData, ListEventsError, ListEventsResponse, ListIndicesData, ListIndicesError, ListIndicesResponse, ListMyGakData, ListMyGakError, ListMyGakResponse, ListMyTalksData, ListMyTalksError, ListMyTalksResponse, ListPlacesData, ListPlacesError, ListPlacesResponse, ListPresetsData, ListPresetsResponse, ListReelsData, ListReelsError, ListReelsResponse, ListRegionsData, ListRegionsError, ListRegionsResponse, ListSavedData, ListSavedError, ListSavedResponse, ListShortsData, ListShortsResponse, ListTalksData, ListTalksError, ListTalksResponse, LoginData, LoginError, LoginResponse, LogoutData, LogoutError, LogoutResponse, MatchData, MatchError, MatchResponse, MeData, MeError, MeResponse, MyLevelData, MyLevelError, MyLevelResponse, NearestRegionData, NearestRegionError, NearestRegionResponse, PublishCardData, PublishCardError, PublishCardResponse, PublishInstagram2Data, PublishInstagram2Error, PublishInstagram2Response, PublishInstagramData, PublishInstagramError, PublishInstagramResponse, PutBirthData, PutBirthError, PutBirthResponse, ReadingData, ReadingError, ReadingResponse, RefreshData, RefreshError, RefreshResponse, RejectCardData, RejectCardError, RejectCardResponse, ReportCommentData, ReportCommentError, ReportCommentResponse, ReportTalkData, ReportTalkError, ReportTalkResponse, SaveDayLogData, SaveDayLogError, SaveDayLogResponse, SavePostData, SavePostError, SavePostResponse, ScoreMyGakData, ScoreMyGakError, ScoreMyGakResponse, SearchFortunePlacesData, SearchFortunePlacesError, SearchFortunePlacesResponse, SharedData, SharedError, SharedResponse, SignupData, SignupError, SignupResponse, TalkGroupsData, TalkGroupsError, TalkGroupsResponse, TossData, TossError, TossResponse, TossUnlinkData, TossUnlinkError, TossUnlinkResponse, UnblockData, UnblockError, UnblockResponse, UnlikeCommentData, UnlikeCommentError, UnlikeCommentResponse, UnlikePostData, UnlikePostError, UnlikePostResponse, UnlikeTalkData, UnlikeTalkError, UnlikeTalkResponse, UnsavePostData, UnsavePostError, UnsavePostResponse, UpdateMeData, UpdateMeError, UpdateMeResponse, UploadTalkImageData, UploadTalkImageError, UploadTalkImageResponse, WithdrawData, WithdrawError, WithdrawResponse } from '../types.gen';
export type QueryKey<TOptions extends Options> = [
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
@@ -1107,6 +1107,40 @@ export const sharedMutation = (options?: Partial<Options<SharedData>>): UseMutat
return mutationOptions;
};
/**
* 날씨게임 한 판 시작 (라운드 각을 받을 표)
*/
export const gameStartMutation = (options?: Partial<Options<GameStartData>>): UseMutationOptions<GameStartResponse, GameStartError, Options<GameStartData>> => {
const mutationOptions: UseMutationOptions<GameStartResponse, GameStartError, Options<GameStartData>> = {
mutationFn: async (fnOptions) => {
const { data } = await gameStart({
...options,
...fnOptions,
throwOnError: true
});
return data;
}
};
return mutationOptions;
};
/**
* 날씨게임 라운드를 깼을 때 (2각, 하루 20각)
*/
export const gameRoundMutation = (options?: Partial<Options<GameRoundData>>): UseMutationOptions<GameRoundResponse, GameRoundError, Options<GameRoundData>> => {
const mutationOptions: UseMutationOptions<GameRoundResponse, GameRoundError, Options<GameRoundData>> = {
mutationFn: async (fnOptions) => {
const { data } = await gameRound({
...options,
...fnOptions,
throwOnError: true
});
return data;
}
};
return mutationOptions;
};
/**
* 날씨 사주: 내 기운, 오늘 점수(사주+날씨 궁합)와 할 일, 레벨로 열리는 이번 주·금전·연애·이달·올해. 생년월일은 저장하지 않는다
*/
+2 -2
View File
@@ -1,4 +1,4 @@
// This file is auto-generated by @hey-api/openapi-ts
export { addComment, addMyGak, addTalk, agreeTerms, attend, authConfig, blockAuthor, blockTalkAuthor, createCard, createReel, deleteBirth, deleteComment, deleteMyGak, deleteTalk, drawFortune, getArticle, getBirth, getCardImage, getFeed, getFortuneToday, getImage, getIndex, getPost, getReelCover, getReelVideo, getSeasonWeek, getSky, getSkyRanking, getTalkImage, getTodayGuPage, getTodayPage, getTomorrowGuPage, getTomorrowPage, getWatchSummary, getWeatherNow, getWeatherToday, getWeek, getWeekRanking, googleLogin, healthzHealthzGet, importFortune, likeComment, likePost, likeTalk, listArticles, listBlocked, listCards, listComments, listEvents, listIndices, listMyGak, listMyTalks, listPlaces, listPresets, listReels, listRegions, listSaved, listShorts, listTalks, login, logout, match, me, myLevel, nearestRegion, type Options, publishCard, publishInstagram, publishInstagram2, putBirth, reading, refresh, rejectCard, reportComment, reportTalk, saveDayLog, savePost, scoreMyGak, searchFortunePlaces, shared, signup, talkGroups, toss, tossUnlink, unblock, unlikeComment, unlikePost, unlikeTalk, unsavePost, updateMe, uploadTalkImage, withdraw } from './sdk.gen';
export { type AddCommentData, type AddCommentError, type AddCommentErrors, type AddCommentResponse, type AddCommentResponses, type AddMyGakData, type AddMyGakError, type AddMyGakErrors, type AddMyGakResponse, type AddMyGakResponses, type AddTalkData, type AddTalkError, type AddTalkErrors, type AddTalkResponse, type AddTalkResponses, type AgreeTermsData, type AgreeTermsError, type AgreeTermsErrors, type AgreeTermsResponse, type AgreeTermsResponses, type AirData, AirGrade, ArticleCategory, type ArticleSummary, type AttendData, type AttendError, type AttendErrors, type AttendResponse, type AttendResponses, type AuthConfigData, type AuthConfigResponse, type AuthConfigResponses, AuthProvider, type BandArticle, type BandEvent, type Bands, type BestTime, type BlockAuthorData, type BlockAuthorError, type BlockAuthorErrors, type BlockAuthorResponse, type BlockAuthorResponses, type BlockedUser, type BlockTalkAuthorData, type BlockTalkAuthorError, type BlockTalkAuthorErrors, type BlockTalkAuthorResponse, type BlockTalkAuthorResponses, type BodyUploadTalkImageV1TalkImagePost, type CardItem, CardStatus, type ClientOptions, type CommentData, type CommuteData, Confidence, type CreateCardData, type CreateCardError, type CreateCardErrors, type CreateCardResponse, type CreateCardResponses, type CreateReelData, type CreateReelError, type CreateReelErrors, type CreateReelResponse, type CreateReelResponses, type Cut, type DayData, type DayLogData, type DeleteBirthData, type DeleteBirthError, type DeleteBirthErrors, type DeleteBirthResponse, type DeleteBirthResponses, type DeleteCommentData, type DeleteCommentError, type DeleteCommentErrors, type DeleteCommentResponse, type DeleteCommentResponses, type DeleteMyGakData, type DeleteMyGakError, type DeleteMyGakErrors, type DeleteMyGakResponse, type DeleteMyGakResponses, type DeleteTalkData, type DeleteTalkError, type DeleteTalkErrors, type DeleteTalkResponse, type DeleteTalkResponses, type DrawFortuneData, type DrawFortuneError, type DrawFortuneErrors, type DrawFortuneResponse, type DrawFortuneResponses, type ErrorInfo, type EventData, type Factor, type FortuneCard, type FortuneLuck, type FortunePlace, type GakSlide, type GetArticleData, type GetArticleError, type GetArticleErrors, type GetArticleResponse, type GetArticleResponses, type GetBirthData, type GetBirthError, type GetBirthErrors, type GetBirthResponse, type GetBirthResponses, type GetCardImageData, type GetCardImageError, type GetCardImageErrors, type GetCardImageResponses, type GetFeedData, type GetFeedError, type GetFeedErrors, type GetFeedResponse, type GetFeedResponses, type GetFortuneTodayData, type GetFortuneTodayError, type GetFortuneTodayErrors, type GetFortuneTodayResponse, type GetFortuneTodayResponses, type GetImageData, type GetImageError, type GetImageErrors, type GetImageResponses, type GetIndexData, type GetIndexError, type GetIndexErrors, type GetIndexResponse, type GetIndexResponses, type GetPostData, type GetPostError, type GetPostErrors, type GetPostResponse, type GetPostResponses, type GetReelCoverData, type GetReelCoverError, type GetReelCoverErrors, type GetReelCoverResponses, type GetReelVideoData, type GetReelVideoError, type GetReelVideoErrors, type GetReelVideoResponses, type GetSeasonWeekData, type GetSeasonWeekResponse, type GetSeasonWeekResponses, type GetSkyData, type GetSkyError, type GetSkyErrors, type GetSkyRankingData, type GetSkyRankingResponse, type GetSkyRankingResponses, type GetSkyResponse, type GetSkyResponses, type GetTalkImageData, type GetTalkImageError, type GetTalkImageErrors, type GetTalkImageResponses, type GetTodayGuPageData, type GetTodayGuPageError, type GetTodayGuPageErrors, type GetTodayGuPageResponse, type GetTodayGuPageResponses, type GetTodayPageData, type GetTodayPageError, type GetTodayPageErrors, type GetTodayPageResponse, type GetTodayPageResponses, type GetTomorrowGuPageData, type GetTomorrowGuPageError, type GetTomorrowGuPageErrors, type GetTomorrowGuPageResponse, type GetTomorrowGuPageResponses, type GetTomorrowPageData, type GetTomorrowPageError, type GetTomorrowPageErrors, type GetTomorrowPageResponse, type GetTomorrowPageResponses, type GetWatchSummaryData, type GetWatchSummaryError, type GetWatchSummaryErrors, type GetWatchSummaryResponse, type GetWatchSummaryResponses, type GetWeatherNowData, type GetWeatherNowError, type GetWeatherNowErrors, type GetWeatherNowResponse, type GetWeatherNowResponses, type GetWeatherTodayData, type GetWeatherTodayError, type GetWeatherTodayErrors, type GetWeatherTodayResponse, type GetWeatherTodayResponses, type GetWeekData, type GetWeekError, type GetWeekErrors, type GetWeekRankingData, type GetWeekRankingResponse, type GetWeekRankingResponses, type GetWeekResponse, type GetWeekResponses, type GoogleLoginData, type GoogleLoginError, type GoogleLoginErrors, type GoogleLoginResponse, type GoogleLoginResponses, type HealthzHealthzGetData, type HealthzHealthzGetResponse, type HealthzHealthzGetResponses, type Hero, type HeroStaLine truncated
export { addComment, addMyGak, addTalk, agreeTerms, attend, authConfig, blockAuthor, blockTalkAuthor, createCard, createReel, deleteBirth, deleteComment, deleteMyGak, deleteTalk, drawFortune, gameRound, gameStart, getArticle, getBirth, getCardImage, getFeed, getFortuneToday, getImage, getIndex, getPost, getReelCover, getReelVideo, getSeasonWeek, getSky, getSkyRanking, getTalkImage, getTodayGuPage, getTodayPage, getTomorrowGuPage, getTomorrowPage, getWatchSummary, getWeatherNow, getWeatherToday, getWeek, getWeekRanking, googleLogin, healthzHealthzGet, importFortune, likeComment, likePost, likeTalk, listArticles, listBlocked, listCards, listComments, listEvents, listIndices, listMyGak, listMyTalks, listPlaces, listPresets, listReels, listRegions, listSaved, listShorts, listTalks, login, logout, match, me, myLevel, nearestRegion, type Options, publishCard, publishInstagram, publishInstagram2, putBirth, reading, refresh, rejectCard, reportComment, reportTalk, saveDayLog, savePost, scoreMyGak, searchFortunePlaces, shared, signup, talkGroups, toss, tossUnlink, unblock, unlikeComment, unlikePost, unlikeTalk, unsavePost, updateMe, uploadTalkImage, withdraw } from './sdk.gen';
export { type AddCommentData, type AddCommentError, type AddCommentErrors, type AddCommentResponse, type AddCommentResponses, type AddMyGakData, type AddMyGakError, type AddMyGakErrors, type AddMyGakResponse, type AddMyGakResponses, type AddTalkData, type AddTalkError, type AddTalkErrors, type AddTalkResponse, type AddTalkResponses, type AgreeTermsData, type AgreeTermsError, type AgreeTermsErrors, type AgreeTermsResponse, type AgreeTermsResponses, type AirData, AirGrade, ArticleCategory, type ArticleSummary, type AttendData, type AttendError, type AttendErrors, type AttendResponse, type AttendResponses, type AuthConfigData, type AuthConfigResponse, type AuthConfigResponses, AuthProvider, type BandArticle, type BandEvent, type Bands, type BestTime, type BlockAuthorData, type BlockAuthorError, type BlockAuthorErrors, type BlockAuthorResponse, type BlockAuthorResponses, type BlockedUser, type BlockTalkAuthorData, type BlockTalkAuthorError, type BlockTalkAuthorErrors, type BlockTalkAuthorResponse, type BlockTalkAuthorResponses, type BodyUploadTalkImageV1TalkImagePost, type CardItem, CardStatus, type ClientOptions, type CommentData, type CommuteData, Confidence, type CreateCardData, type CreateCardError, type CreateCardErrors, type CreateCardResponse, type CreateCardResponses, type CreateReelData, type CreateReelError, type CreateReelErrors, type CreateReelResponse, type CreateReelResponses, type Cut, type DayData, type DayLogData, type DeleteBirthData, type DeleteBirthError, type DeleteBirthErrors, type DeleteBirthResponse, type DeleteBirthResponses, type DeleteCommentData, type DeleteCommentError, type DeleteCommentErrors, type DeleteCommentResponse, type DeleteCommentResponses, type DeleteMyGakData, type DeleteMyGakError, type DeleteMyGakErrors, type DeleteMyGakResponse, type DeleteMyGakResponses, type DeleteTalkData, type DeleteTalkError, type DeleteTalkErrors, type DeleteTalkResponse, type DeleteTalkResponses, type DrawFortuneData, type DrawFortuneError, type DrawFortuneErrors, type DrawFortuneResponse, type DrawFortuneResponses, type ErrorInfo, type EventData, type Factor, type FortuneCard, type FortuneLuck, type FortunePlace, type GakSlide, type GameRoundData, type GameRoundError, type GameRoundErrors, type GameRoundResponse, type GameRoundResponses, type GameStartData, type GameStartError, type GameStartErrors, type GameStartResponse, type GameStartResponses, type GetArticleData, type GetArticleError, type GetArticleErrors, type GetArticleResponse, type GetArticleResponses, type GetBirthData, type GetBirthError, type GetBirthErrors, type GetBirthResponse, type GetBirthResponses, type GetCardImageData, type GetCardImageError, type GetCardImageErrors, type GetCardImageResponses, type GetFeedData, type GetFeedError, type GetFeedErrors, type GetFeedResponse, type GetFeedResponses, type GetFortuneTodayData, type GetFortuneTodayError, type GetFortuneTodayErrors, type GetFortuneTodayResponse, type GetFortuneTodayResponses, type GetImageData, type GetImageError, type GetImageErrors, type GetImageResponses, type GetIndexData, type GetIndexError, type GetIndexErrors, type GetIndexResponse, type GetIndexResponses, type GetPostData, type GetPostError, type GetPostErrors, type GetPostResponse, type GetPostResponses, type GetReelCoverData, type GetReelCoverError, type GetReelCoverErrors, type GetReelCoverResponses, type GetReelVideoData, type GetReelVideoError, type GetReelVideoErrors, type GetReelVideoResponses, type GetSeasonWeekData, type GetSeasonWeekResponse, type GetSeasonWeekResponses, type GetSkyData, type GetSkyError, type GetSkyErrors, type GetSkyRankingData, type GetSkyRankingResponse, type GetSkyRankingResponses, type GetSkyResponse, type GetSkyResponses, type GetTalkImageData, type GetTalkImageError, type GetTalkImageErrors, type GetTalkImageResponses, type GetTodayGuPageData, type GetTodayGuPageError, type GetTodayGuPageErrors, type GetTodayGuPageResponse, type GetTodayGuPageResponses, type GetTodayPageData, type GetTodayPageError, type GetTodayPageErrors, type GetTodayPageResponse, type GetTodayPageResponses, type GetTomorrowGuPageData, type GetTomorrowGuPageError, type GetTomorrowGuPageErrors, type GetTomorrowGuPageResponse, type GetTomorrowGuPageResponses, type GetTomorrowPageData, type GetTomorrowPageError, type GetTomorrowPageErrors, type GetTomorrowPageResponse, type GetTomorrowPageResponses, type GetWatchSummaryData, type GetWatchSummaryError, type GetWatchSummaryErrors, type GetWatchSummaryResponse, type GetWatchSummaryResponses, type GetWeatherNowData, type GetWeatherNowError, type GetWeatherNowErrors, type GetWeatherNowResponse, type GetWeatherNowResponses, type GetWeatherTodayData, type GetWeatherTodayError, type GetWeatherTodayErrors, type GetWeatherTodayResponse, type GetWeatherTodayResponses, type GetWeekData, type GetWeekError, type GetWeekErrors, type GetWeekRankingData, type GetWeekRankingResponse, type GetWeekRankingResponses, type GetWeekResponse, type GetWeekResponses, type GoogleLogLine truncated
+18 -1
View File
@@ -2,7 +2,7 @@
import { type Client, type ClientMeta, formDataBodySerializer, type Options as Options2, type RequestResult, type TDataShape } from './client';
import { client } from './client.gen';
import type { AddCommentData, AddCommentErrors, AddCommentResponses, AddMyGakData, AddMyGakErrors, AddMyGakResponses, AddTalkData, AddTalkErrors, AddTalkResponses, AgreeTermsData, AgreeTermsErrors, AgreeTermsResponses, AttendData, AttendErrors, AttendResponses, AuthConfigData, AuthConfigResponses, BlockAuthorData, BlockAuthorErrors, BlockAuthorResponses, BlockTalkAuthorData, BlockTalkAuthorErrors, BlockTalkAuthorResponses, CreateCardData, CreateCardErrors, CreateCardResponses, CreateReelData, CreateReelErrors, CreateReelResponses, DeleteBirthData, DeleteBirthErrors, DeleteBirthResponses, DeleteCommentData, DeleteCommentErrors, DeleteCommentResponses, DeleteMyGakData, DeleteMyGakErrors, DeleteMyGakResponses, DeleteTalkData, DeleteTalkErrors, DeleteTalkResponses, DrawFortuneData, DrawFortuneErrors, DrawFortuneResponses, GetArticleData, GetArticleErrors, GetArticleResponses, GetBirthData, GetBirthErrors, GetBirthResponses, GetCardImageData, GetCardImageErrors, GetCardImageResponses, GetFeedData, GetFeedErrors, GetFeedResponses, GetFortuneTodayData, GetFortuneTodayErrors, GetFortuneTodayResponses, GetImageData, GetImageErrors, GetImageResponses, GetIndexData, GetIndexErrors, GetIndexResponses, GetPostData, GetPostErrors, GetPostResponses, GetReelCoverData, GetReelCoverErrors, GetReelCoverResponses, GetReelVideoData, GetReelVideoErrors, GetReelVideoResponses, GetSeasonWeekData, GetSeasonWeekResponses, GetSkyData, GetSkyErrors, GetSkyRankingData, GetSkyRankingResponses, GetSkyResponses, GetTalkImageData, GetTalkImageErrors, GetTalkImageResponses, GetTodayGuPageData, GetTodayGuPageErrors, GetTodayGuPageResponses, GetTodayPageData, GetTodayPageErrors, GetTodayPageResponses, GetTomorrowGuPageData, GetTomorrowGuPageErrors, GetTomorrowGuPageResponses, GetTomorrowPageData, GetTomorrowPageErrors, GetTomorrowPageResponses, GetWatchSummaryData, GetWatchSummaryErrors, GetWatchSummaryResponses, GetWeatherNowData, GetWeatherNowErrors, GetWeatherNowResponses, GetWeatherTodayData, GetWeatherTodayErrors, GetWeatherTodayResponses, GetWeekData, GetWeekErrors, GetWeekRankingData, GetWeekRankingResponses, GetWeekResponses, GoogleLoginData, GoogleLoginErrors, GoogleLoginResponses, HealthzHealthzGetData, HealthzHealthzGetResponses, ImportFortuneData, ImportFortuneErrors, ImportFortuneResponses, LikeCommentData, LikeCommentErrors, LikeCommentResponses, LikePostData, LikePostErrors, LikePostResponses, LikeTalkData, LikeTalkErrors, LikeTalkResponses, ListArticlesData, ListArticlesErrors, ListArticlesResponses, ListBlockedData, ListBlockedErrors, ListBlockedResponses, ListCardsData, ListCardsErrors, ListCardsResponses, ListCommentsData, ListCommentsErrors, ListCommentsResponses, ListEventsData, ListEventsErrors, ListEventsResponses, ListIndicesData, ListIndicesErrors, ListIndicesResponses, ListMyGakData, ListMyGakErrors, ListMyGakResponses, ListMyTalksData, ListMyTalksErrors, ListMyTalksResponses, ListPlacesData, ListPlacesErrors, ListPlacesResponses, ListPresetsData, ListPresetsResponses, ListReelsData, ListReelsErrors, ListReelsResponses, ListRegionsData, ListRegionsErrors, ListRegionsResponses, ListSavedData, ListSavedErrors, ListSavedResponses, ListShortsData, ListShortsResponses, ListTalksData, ListTalksErrors, ListTalksResponses, LoginData, LoginErrors, LoginResponses, LogoutData, LogoutErrors, LogoutResponses, MatchData, MatchErrors, MatchResponses, MeData, MeErrors, MeResponses, MyLevelData, MyLevelErrors, MyLevelResponses, NearestRegionData, NearestRegionErrors, NearestRegionResponses, PublishCardData, PublishCardErrors, PublishCardResponses, PublishInstagram2Data, PublishInstagram2Errors, PublishInstagram2Responses, PublishInstagramData, PublishInstagramErrors, PublishInstagramResponses, PutBirthData, PutBirthErrors, PutBirthResponses, ReadingData, ReadingErrors, ReadingResponses, RefreshData, RefreshErrors, RefreshResponses, RejectCardData, RejectCardErrors, RejectCardResponses, ReportCommentData, ReportCommentErrors, ReportCommentResponses, ReportTalkData, ReportTalkErrors, ReportTalkResponses, SaveDayLogData, SaveDayLogErrors, SaveDayLogResponses, SavePostData, SavePostErrors, SavePostResponses, ScoreMyGakData, ScoreMyGakErrors, ScoreMyGakResponses, SearchFortunePlacesData, SearchFortunePlacesErrors, SearchFortunePlacesResponses, SharedData, SharedErrors, SharedResponses, SignupData, SignupErrors, SignupResponses, TalkGroupsData, TalkGroupsErrors, TalkGroupsResponses, TossData, TossErrors, TossResponses, TossUnlinkData, TossUnlinkErrors, TossUnlinkResponses, UnblockData, UnblockErrors, UnblockResponses, UnlikeCommentData, UnlikeCommentErrors, UnlikeCommentResponses, UnlikePostData, UnlikePostErrors, UnlikePostResponses, UnlikeTalkData, UnlikeTalkErrors, UnlikeTalkResponses, UnsavePostData, UnsavePostErrors, UnsavePostResponses, UpdateMeData, UpdateMeErrors, UpdateMeResponses, UploadTalkImageData, UploadTalkImageErrors, UploadTalkImageResponses, WithdrawData, WithdrawErrors, WithdrawResponses } from './types.gen';
import type { AddCommentData, AddCommentErrors, AddCommentResponses, AddMyGakData, AddMyGakErrors, AddMyGakResponses, AddTalkData, AddTalkErrors, AddTalkResponses, AgreeTermsData, AgreeTermsErrors, AgreeTermsResponses, AttendData, AttendErrors, AttendResponses, AuthConfigData, AuthConfigResponses, BlockAuthorData, BlockAuthorErrors, BlockAuthorResponses, BlockTalkAuthorData, BlockTalkAuthorErrors, BlockTalkAuthorResponses, CreateCardData, CreateCardErrors, CreateCardResponses, CreateReelData, CreateReelErrors, CreateReelResponses, DeleteBirthData, DeleteBirthErrors, DeleteBirthResponses, DeleteCommentData, DeleteCommentErrors, DeleteCommentResponses, DeleteMyGakData, DeleteMyGakErrors, DeleteMyGakResponses, DeleteTalkData, DeleteTalkErrors, DeleteTalkResponses, DrawFortuneData, DrawFortuneErrors, DrawFortuneResponses, GameRoundData, GameRoundErrors, GameRoundResponses, GameStartData, GameStartErrors, GameStartResponses, GetArticleData, GetArticleErrors, GetArticleResponses, GetBirthData, GetBirthErrors, GetBirthResponses, GetCardImageData, GetCardImageErrors, GetCardImageResponses, GetFeedData, GetFeedErrors, GetFeedResponses, GetFortuneTodayData, GetFortuneTodayErrors, GetFortuneTodayResponses, GetImageData, GetImageErrors, GetImageResponses, GetIndexData, GetIndexErrors, GetIndexResponses, GetPostData, GetPostErrors, GetPostResponses, GetReelCoverData, GetReelCoverErrors, GetReelCoverResponses, GetReelVideoData, GetReelVideoErrors, GetReelVideoResponses, GetSeasonWeekData, GetSeasonWeekResponses, GetSkyData, GetSkyErrors, GetSkyRankingData, GetSkyRankingResponses, GetSkyResponses, GetTalkImageData, GetTalkImageErrors, GetTalkImageResponses, GetTodayGuPageData, GetTodayGuPageErrors, GetTodayGuPageResponses, GetTodayPageData, GetTodayPageErrors, GetTodayPageResponses, GetTomorrowGuPageData, GetTomorrowGuPageErrors, GetTomorrowGuPageResponses, GetTomorrowPageData, GetTomorrowPageErrors, GetTomorrowPageResponses, GetWatchSummaryData, GetWatchSummaryErrors, GetWatchSummaryResponses, GetWeatherNowData, GetWeatherNowErrors, GetWeatherNowResponses, GetWeatherTodayData, GetWeatherTodayErrors, GetWeatherTodayResponses, GetWeekData, GetWeekErrors, GetWeekRankingData, GetWeekRankingResponses, GetWeekResponses, GoogleLoginData, GoogleLoginErrors, GoogleLoginResponses, HealthzHealthzGetData, HealthzHealthzGetResponses, ImportFortuneData, ImportFortuneErrors, ImportFortuneResponses, LikeCommentData, LikeCommentErrors, LikeCommentResponses, LikePostData, LikePostErrors, LikePostResponses, LikeTalkData, LikeTalkErrors, LikeTalkResponses, ListArticlesData, ListArticlesErrors, ListArticlesResponses, ListBlockedData, ListBlockedErrors, ListBlockedResponses, ListCardsData, ListCardsErrors, ListCardsResponses, ListCommentsData, ListCommentsErrors, ListCommentsResponses, ListEventsData, ListEventsErrors, ListEventsResponses, ListIndicesData, ListIndicesErrors, ListIndicesResponses, ListMyGakData, ListMyGakErrors, ListMyGakResponses, ListMyTalksData, ListMyTalksErrors, ListMyTalksResponses, ListPlacesData, ListPlacesErrors, ListPlacesResponses, ListPresetsData, ListPresetsResponses, ListReelsData, ListReelsErrors, ListReelsResponses, ListRegionsData, ListRegionsErrors, ListRegionsResponses, ListSavedData, ListSavedErrors, ListSavedResponses, ListShortsData, ListShortsResponses, ListTalksData, ListTalksErrors, ListTalksResponses, LoginData, LoginErrors, LoginResponses, LogoutData, LogoutErrors, LogoutResponses, MatchData, MatchErrors, MatchResponses, MeData, MeErrors, MeResponses, MyLevelData, MyLevelErrors, MyLevelResponses, NearestRegionData, NearestRegionErrors, NearestRegionResponses, PublishCardData, PublishCardErrors, PublishCardResponses, PublishInstagram2Data, PublishInstagram2Errors, PublishInstagram2Responses, PublishInstagramData, PublishInstagramErrors, PublishInstagramResponses, PutBirthData, PutBirthErrors, PutBirthResponses, ReadingData, ReadingErrors, ReadingResponses, RefreshData, RefreshErrors, RefreshResponses, RejectCardData, RejectCardErrors, RejectCardResponses, ReportCommentData, ReportCommentErrors, ReportCommentResponses, ReportTalkData, ReportTalkErrors, ReportTalkResponses, SaveDayLogData, SaveDayLogErrors, SaveDayLogResponses, SavePostData, SavePostErrors, SavePostResponses, ScoreMyGakData, ScoreMyGakErrors, ScoreMyGakResponses, SearchFortunePlacesData, SearchFortunePlacesErrors, SearchFortunePlacesResponses, SharedData, SharedErrors, SharedResponses, SignupData, SignupErrors, SignupResponses, TalkGroupsData, TalkGroupsErrors, TalkGroupsResponses, TossData, TossErrors, TossResponses, TossUnlinkData, TossUnlinkErrors, TossUnlinkResponses, UnblockData, UnblockErrors, UnblockResponses, UnlikeCommentData, UnlikeCommentErrors, UnlikeCommentResponses, UnlikePostData, UnlikePostErrors, UnlikePostResponses, UnlikeTalkData, UnlikeTalkErrors, UnlikeTalkResponses, UnsavePostData, UnsavePostErrors, UnsavePostResponses, UpdateMeData, UpdateMeErrors, UpdateMeResponses, UploadTalkImageData, UploadTalkImageErrors, UpLine truncated
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
/**
@@ -396,6 +396,23 @@ export const attend = <ThrowOnError extends boolean = true>(options?: Options<At
*/
export const shared = <ThrowOnError extends boolean = true>(options?: Options<SharedData, ThrowOnError>): RequestResult<SharedResponses, SharedErrors, ThrowOnError> => (options?.client ?? client).post<SharedResponses, SharedErrors, ThrowOnError>({ url: '/v1/level/share', ...options });
/**
* 날씨게임 한 판 시작 (라운드 각을 받을 표)
*/
export const gameStart = <ThrowOnError extends boolean = true>(options?: Options<GameStartData, ThrowOnError>): RequestResult<GameStartResponses, GameStartErrors, ThrowOnError> => (options?.client ?? client).post<GameStartResponses, GameStartErrors, ThrowOnError>({ url: '/v1/level/game/start', ...options });
/**
* 날씨게임 라운드를 깼을 때 (2각, 하루 20각)
*/
export const gameRound = <ThrowOnError extends boolean = true>(options: Options<GameRoundData, ThrowOnError>): RequestResult<GameRoundResponses, GameRoundErrors, ThrowOnError> => (options.client ?? client).post<GameRoundResponses, GameRoundErrors, ThrowOnError>({
url: '/v1/level/game/round',
...options,
headers: {
'Content-Type': 'application/json',
...options.headers
}
});
/**
* 날씨 사주: 내 기운, 오늘 점수(사주+날씨 궁합)와 할 일, 레벨로 열리는 이번 주·금전·연애·이달·올해. 생년월일은 저장하지 않는다
*/
+95
View File
@@ -1997,6 +1997,22 @@ export type ReqFortuneImport = {
logs?: Array<LocalLog>;
};
/**
* Req_GameRound
*/
export type ReqGameRound = {
/**
* Play
*/
play: string;
/**
* Round
*
* 방금 깬 라운드 (1부터)
*/
round: number;
};
/**
* Req_Google
*/
@@ -2574,6 +2590,23 @@ export type ResFortuneToday = {
log?: DayLogData | null;
};
/**
* Res_GameStart
*/
export type ResGameStart = {
result?: ErrorInfo;
/**
* Msg
*/
msg?: string | null;
/**
* Play
*
* 판 시작 표. 라운드를 깰 때 그대로 보낸다
*/
play?: string | null;
};
/**
* Res_Health
*/
@@ -6766,6 +6799,68 @@ export type SharedResponses = {
export type SharedResponse = SharedResponses[keyof SharedResponses];
export type GameStartData = {
body?: never;
headers?: {
/**
* Authorization
*/
authorization?: string | null;
};
path?: never;
query?: never;
url: '/v1/level/game/start';
};
export type GameStartErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type GameStartError = GameStartErrors[keyof GameStartErrors];
export type GameStartResponses = {
/**
* Successful Response
*/
200: ResGameStart;
};
export type GameStartResponse = GameStartResponses[keyof GameStartResponses];
export type GameRoundData = {
body: ReqGameRound;
headers?: {
/**
* Authorization
*/
authorization?: string | null;
};
path?: never;
query?: never;
url: '/v1/level/game/round';
};
export type GameRoundErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type GameRoundError = GameRoundErrors[keyof GameRoundErrors];
export type GameRoundResponses = {
/**
* Successful Response
*/
200: ResLevel;
};
export type GameRoundResponse = GameRoundResponses[keyof GameRoundResponses];
export type ReadingData = {
body: ReqSaju;
headers?: {