Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
fe8c545
feat(web): 통계 페이지 API 연결 (#165)
yumin-kim2 Jul 13, 2026
79e1c44
refactor(web): 통계 API 쿼리 훅 분리 (#165)
yumin-kim2 Jul 13, 2026
f2b5d68
refactor(web): 영어 날짜 표시 형식 수정 (#165)
yumin-kim2 Jul 13, 2026
117b953
refactor(web): 통계 캘린더 선택 날짜로 표시 방식 수정 (#165)
yumin-kim2 Jul 13, 2026
0f8f789
Merge branch 'develop' into feat/web/165-statistics-page-api
yumin-kim2 Jul 13, 2026
ec73b7b
fix(web): 통계 캘린더 충돌 해결 후 CI 오류 수정 (#165)
yumin-kim2 Jul 13, 2026
f6b33c7
refactor(web): 목데이터 삭제 (#165)
yumin-kim2 Jul 14, 2026
f7267f3
refactor(web): container 구조 분리 (#186)
yumin-kim2 Jul 14, 2026
08e3104
Merge remote-tracking branch 'origin/develop' into feat/web/186-todo-…
yumin-kim2 Jul 14, 2026
874f2ba
feat(web): todo 상세 조회 api 연결 (#186)
yumin-kim2 Jul 14, 2026
b0924f5
fix(web): 투두 상세 모달 날짜 요일 표시 수정 (#186)
yumin-kim2 Jul 14, 2026
e11cf4f
feat(web): todo 삭제 api 연결 (#186)
yumin-kim2 Jul 14, 2026
6920a54
fix(web): 플레이 버튼 클릭 시 상세 모달 열림 방지 (#186)
yumin-kim2 Jul 14, 2026
d6779d5
fix(web): 상세 모달 태그 목록 및 다국어 표시 수정 (#186)
yumin-kim2 Jul 14, 2026
9a82258
feat(web): 상세 모달 저장 기능 및 수정 API 연결
yumin-kim2 Jul 14, 2026
f81b863
refactor(web): 투두 모달 훅 구조 정리 (#186)
yumin-kim2 Jul 14, 2026
f33e51b
Merge remote-tracking branch 'origin/develop' into feat/web/186-todo-…
yumin-kim2 Jul 14, 2026
628637d
fix(web): check-types 에러 해결 (#186)
yumin-kim2 Jul 14, 2026
6107153
refactor(web): 월 변경 요일 초기화 수정 (#165)
yumin-kim2 Jul 14, 2026
3fe8c0b
feat(web): 통계 캘린더 에러/로딩 상태 처리 (#165)
yumin-kim2 Jul 14, 2026
07ad194
fix(web): 에러/로딩 메세지 추가 (#165)
yumin-kim2 Jul 14, 2026
09c3e8a
fix(web): 통계 캘린더 날짜 파싱 수정 (#165)
yumin-kim2 Jul 14, 2026
c9bc8b7
fix(web): 통계 캘린더 기본 날짜 선택 상태 분리 (#165)
yumin-kim2 Jul 14, 2026
58953fa
Merge remote-tracking branch 'origin/develop' into feat/web/186-todo-…
yumin-kim2 Jul 14, 2026
dfbfb55
fix(web): 메모 typo, 글자 색 수정 (#186)
yumin-kim2 Jul 14, 2026
62d9c39
refactor(web): 상세 모달 구조 리뷰 반영 (#186)
yumin-kim2 Jul 14, 2026
b59931a
fix(web): 모달 레이아웃 수정 (#186)
yumin-kim2 Jul 14, 2026
e028815
feat(web): Add task 버튼에 투두 20개 제한 토스트를 추가한다 (#196)
kimminna Jul 14, 2026
842debf
style(web): 생성 모달 체크박스의 클릭 불가 커서를 수정한다 (#196)
kimminna Jul 14, 2026
d8ee8dc
refactor(web): 상세 모달 수정 요청 생성 로직 정리 (#186)
yumin-kim2 Jul 14, 2026
4de92ea
Merge pull request #197 from Team-Timo/feat/web/196-todo-limit-toast
kimminna Jul 14, 2026
6d97ff4
feat(web): 상세 모달 즉시 수정 저장 연결 (#186)
yumin-kim2 Jul 14, 2026
2bc8ac4
feat(web): 상세 모달 텍스트 수정 디바운스 저장 연결 (#186)
yumin-kim2 Jul 14, 2026
fff3ab7
fix(web): 타이머 진행 중 상세 모달 수정 방지 (#186)
yumin-kim2 Jul 14, 2026
e2f7eea
Merge remote-tracking branch 'origin/develop' into feat/web/186-todo-…
yumin-kim2 Jul 14, 2026
5b65dd0
Merge pull request #183 from Team-Timo/feat/web/165-statistics-page-api
kimminna Jul 14, 2026
2e73a47
fix(web): 수정 실패 토스트 서버 메시지 표시 (#186)
yumin-kim2 Jul 14, 2026
acf2a2e
Merge pull request #190 from Team-Timo/feat/web/186-todo-modal-api
kimminna Jul 14, 2026
8683dc8
chore(web): 약관 API 스펙 변경에 맞춰 orval 코드를 재생성한다 (#195)
jjangminii Jul 14, 2026
cfbba4a
fix(web): 약관 조회 로직을 변경된 API 스펙에 맞게 수정한다 (#195)
jjangminii Jul 14, 2026
a5349df
feat(web): 로그인 가드에서 사용자 시간대 감지 후 서버 동기화 (#199)
kimminna Jul 14, 2026
8723ac7
fix(web): 수정 모달 재생 버튼 클릭 시 모달이 닫히는 문제 수정 (#200)
jjangminii Jul 14, 2026
ffac8dc
fix(web): 수정 모달 재생 버튼 아이콘이 타이머 상태와 동기화되지 않는 문제 수정 (#200)
jjangminii Jul 14, 2026
0f331fe
fix(web): 수정 모달 완료 체크박스가 타이머 실행 중 비활성화·미반영되는 문제 수정 (#200)
jjangminii Jul 14, 2026
8806763
fix(web): 새로고침 시 타임존 동기화 재호출되던 문제 수정 (#199)
kimminna Jul 14, 2026
8220d09
feat(web): 오늘 탭 완료 체크박스·재생 버튼을 홈/포커스탭과 동일한 실제 API 동작으로 연결 (#200)
jjangminii Jul 14, 2026
e997be2
Merge pull request #198 from Team-Timo/fix/web/195-terms-api-schema-u…
jjangminii Jul 14, 2026
0b523cc
feat(web): 프로필 조회 화면에 profileImageUrl 표시 (#204)
kimminna Jul 14, 2026
30deebd
fix(web): 오늘 탭 카드 최소 크기와 체크박스 흔들림을 수정한다 (#200)
jjangminii Jul 14, 2026
d445011
fix(web): 프로필 이미지에 priority prop을 추가한다 (#204)
kimminna Jul 14, 2026
a27f84b
refactor(web): 공통 투두 타입 import를 home 배럴 대신 원본 경로로 정리한다 (#200)
jjangminii Jul 14, 2026
b86a779
refactor(web): Home 전용 중지·완료 모달 컨테이너를 공용 경로로 이동한다 (#200)
jjangminii Jul 14, 2026
b93bcfa
Merge pull request #205 from Team-Timo/feat/web/204-show-profile-imag…
kimminna Jul 14, 2026
1f04405
fix(ui): 모달이 중첩될 때 아래 모달의 패널도 오버레이로 덮이도록 z-index를 스택 깊이만큼 올린다
jjangminii Jul 14, 2026
3cc1dfa
Merge pull request #203 from Team-Timo/feat/web/200-sync-timer-in-edi…
kimminna Jul 14, 2026
532534b
fix(web): 재생 API 실패 시 에러 토스트를 표시한다 (#206)
kimminna Jul 14, 2026
342b730
fix(web): 토스트 종료 애니메이션 중 텍스트가 먼저 사라지는 문제를 수정한다 (#206)
kimminna Jul 14, 2026
11e3e0b
refactor(web): 상세 투두 모달을 overlay 기반 API 컨테이너로 분리 (#202)
yumin-kim2 Jul 14, 2026
fef23fd
refactor(web): 상세 투두 수정 요청을 변경 필드 단위로 전송 (#202)
yumin-kim2 Jul 14, 2026
365352f
fix(web): 재생 API 실패 시 에러 메시지를 응답 인터셉터가 반환하는 ApiError에서 읽는다
kimminna Jul 14, 2026
73e92b7
fix(web): 상세 투두 텍스트 수정 후 모달 닫을 때 변경사항을 반영 (#202)
yumin-kim2 Jul 14, 2026
6a7a9f9
fix(web): 다른 투두에 활성 타이머가 있으면 재생 버튼 색을 낮춰 구분한다
jjangminii Jul 14, 2026
6c5ca60
Merge pull request #207 from Team-Timo/fix/web/206-play-error-toast-n…
kimminna Jul 14, 2026
e46922b
Merge pull request #201 from Team-Timo/feat/web/199-sync-timezone-on-…
kimminna Jul 14, 2026
72428d7
chore(web): isPlayHighlighted 주석을 제거한다
jjangminii Jul 14, 2026
3de47bc
fix(web): 홈 투두 카드 플레이 버튼이 드래그 이벤트에 막히지 않도록 수정 (#202)
yumin-kim2 Jul 15, 2026
b0c0e9a
fix(web): 상세 투두 아이콘 선택 후 확정 시에만 수정 요청 전송 (#202)
yumin-kim2 Jul 15, 2026
6b133bc
fix(web): 상세 투두 모달에 활성 타이머 상태 반영 (#202)
yumin-kim2 Jul 15, 2026
8d7cd00
fix(web): 투두 플레이 버튼 클릭 이벤트 전파 방지 (#202)
yumin-kim2 Jul 15, 2026
0cb5616
Merge remote-tracking branch 'origin/develop' into fix/web/202-todo-d…
yumin-kim2 Jul 15, 2026
3338080
fix(web): 상세 투두 조회/수정/삭제 실패 토스트 처리 추가 (#202)
yumin-kim2 Jul 15, 2026
b7694bc
refactor(web): 상세 투두 모달 수정 로직을 훅으로 분리 (#202)
yumin-kim2 Jul 15, 2026
2585b13
fix(web): 상세 투두 수정 시 Today 쿼리를 invalidate한다 (#211)
ehye1 Jul 15, 2026
add69b6
fix(web): 상세 투두 삭제 시 Today 쿼리를 invalidate한다 (#211)
ehye1 Jul 15, 2026
6c5deb8
Merge pull request #209 from Team-Timo/feat/web/208-pause-icon-color
kimminna Jul 15, 2026
658b5f9
fix(web): Today 서브태스크 완료 시 API를 호출한다 (#211)
ehye1 Jul 15, 2026
50e9816
fix(web): Today 카드 완료 및 서브태스크 완료 시 즉시 dimmed 처리한다 (#211)
ehye1 Jul 15, 2026
3cca2a5
Merge pull request #212 from Team-Timo/fix/web/211-today-todo-card-no…
kimminna Jul 15, 2026
541d6b9
fix(web): 상세 투두 시간 표시와 전송 형식 분리 (#202)
yumin-kim2 Jul 15, 2026
bde7dcd
Merge remote-tracking branch 'origin/develop' into fix/web/202-todo-d…
yumin-kim2 Jul 15, 2026
80d5d93
refactor(web): 투두 카드 이벤트 처리 정리 (#202)
yumin-kim2 Jul 15, 2026
99ca997
feat(web): 설정 페이지 확인 모달 개선 (#213)
ehye1 Jul 15, 2026
ee30b57
fix(web): import 순서 lint 오류 수정 (#213)
ehye1 Jul 15, 2026
43e27ad
fix(web): 상세 투두 수정 성공 후 폼 상태 반영 (#202)
yumin-kim2 Jul 15, 2026
64fa49d
feat(web): 파비콘 및 로케일별 SEO 메타데이터를 설정한다 (#215)
kimminna Jul 15, 2026
ebfa649
docs(root): 아키텍처·컨벤션·디자인 토큰 문서를 실제 구현 기준으로 동기화한다 (#215)
kimminna Jul 15, 2026
e5073a2
fix(web): 리치 텍스트 태그가 포함된 번역 문자열의 포맷팅 에러를 수정한다 (#213)
jjangminii Jul 15, 2026
0c0f440
Merge pull request #214 from Team-Timo/feat/web/213-settings-confirm-…
ehye1 Jul 15, 2026
2b9cc88
fix(web): 루트 레이아웃 메타데이터에서 경로 종속 필드를 제거한다 (#215)
kimminna Jul 15, 2026
61acec5
feat(web): 인증 라우트 그룹을 비공개 처리하고 로그인·약관 페이지에 메타데이터를 추가한다 (#215)
kimminna Jul 15, 2026
fef3dcb
Merge pull request #216 from Team-Timo/feat/web/215-favicon-seo-metadata
kimminna Jul 15, 2026
bcb3be5
refactor(web): 폴더 구조 재정리 및 쿼리/뮤테이션 훅 네이밍 컨벤션 적용 (#217)
kimminna Jul 15, 2026
faa3f1d
docs(root): 쿼리/뮤테이션 훅 네이밍 컨벤션을 문서화했습니다 (#217)
kimminna Jul 15, 2026
155f618
fix(ui): 캘린더 팝업 하단 날짜 잘림 수정 (#218)
yumin-kim2 Jul 15, 2026
8285644
Merge pull request #220 from Team-Timo/fix/ui/218-calendar-popup-clip…
kimminna Jul 15, 2026
f589d7f
Merge pull request #219 from Team-Timo/refactor/web/217-query-naming-…
kimminna Jul 15, 2026
144d973
Merge remote-tracking branch 'origin/develop' into fix/web/202-todo-d…
yumin-kim2 Jul 15, 2026
4a572f5
Merge pull request #210 from Team-Timo/fix/web/202-todo-detail-api
kimminna Jul 15, 2026
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
30 changes: 28 additions & 2 deletions .agents/skills/api/timo-api-integration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@

### Phase 3 — `_queries/` 훅 작성

- 위치: `app/(domain)/_queries/use-xxx.ts`
- 위치: `app/(domain)/_queries/use-xxx-query.ts` (조회) / `use-xxx-mutation.ts` (변경)
- 네이밍: 파일명은 `-query.ts`/`-mutation.ts`로, export하는 함수명은 `~Query`/`~Mutation`으로 끝낸다. 파일당 훅 1개가 기본이다. → `docs/conventions/naming.md` 참조
- `useSuspenseQuery`를 쓸지 `useQuery`를 쓸지는 컴포넌트가 `AsyncBoundary`(Suspense) 안에 있는지로 결정한다. `AsyncBoundary`로 감싸져 있으면 `useSuspenseQuery`를 쓴다.
- **주의**: 생성된 `getGetXxxQueryOptions()` 팩토리를 그대로 `useSuspenseQuery`에 스프레드하면 `UseQueryOptions`가 허용하는 `skipToken`과 `UseSuspenseQueryOptions`가 타입 충돌을 일으킨다. `queryKey`/`queryFn`은 생성된 `getGetXxxQueryKey` + 원본 fetcher 함수로 직접 조립한다.
- `select`에서 `BaseResponse.data`를 언랩하고 로컬 zod 스키마로 `.parse()`해서 반환한다.

조회 훅 예시 (`_queries/use-home-view-query.ts`):

```ts
"use client";

Expand All @@ -54,14 +57,36 @@ import {
} from "@/api/generated/endpoints/home/home";
import { homeViewDataSchema } from "@/app/[locale]/(main)/(with-time-sidebar)/home/_types/home-view-type";

export const useHomeView = ({ filter, baseDate }: GetHomeViewParams) =>
export const useHomeViewQuery = ({ filter, baseDate }: GetHomeViewParams) =>
useSuspenseQuery({
queryKey: getGetHomeQueryKey({ filter, baseDate }),
queryFn: ({ signal }) => getHome({ filter, baseDate }, undefined, signal),
select: ({ data }) => homeViewDataSchema.parse(data),
});
```

변경 훅 예시 (`_queries/use-withdraw-mutation.ts`):

```ts
"use client";

import { useMutation } from "@tanstack/react-query";

import { withdraw } from "@/api/generated/endpoints/auth/auth";
import { useClearSession } from "@/app/[locale]/(main)/settings/_hooks/use-clear-session";

export const useWithdrawMutation = () => {
const clearSession = useClearSession();

return useMutation({
mutationFn: () => withdraw(),
onSuccess: () => {
clearSession();
},
});
};
```

### Phase 4 — 컨테이너 연결

- mock 함수 import를 제거하고 새 훅으로 교체한다.
Expand All @@ -70,6 +95,7 @@ export const useHomeView = ({ filter, baseDate }: GetHomeViewParams) =>

### Phase 5 — 자가 검토

- [ ] 훅 파일명/함수명이 `-query`/`~Query`, `-mutation`/`~Mutation` 컨벤션을 따르는가
- [ ] `api/generated/` 내부 파일을 직접 수정하지 않았는가 (재생성 시 사라짐)
- [ ] 응답을 로컬 zod 스키마로 `.parse()`해서 검증했는가 (gen 응답 스키마를 그대로 UI까지 노출하지 않았는가)
- [ ] `useSuspenseQuery` 사용 시 `queryKey`/`queryFn`을 직접 조립해 타입 충돌을 피했는가
Expand Down
108 changes: 65 additions & 43 deletions apps/timo-web/api/generated/endpoints/terms/terms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { customInstance } from "../../../client/custom-instance";

import type { ErrorType } from "../../../client/custom-instance";
import type {
BaseResponseTermsListResponse,
BaseResponseTermsDetailResponse,
ErrorDto,
GetTermsParams,
GetTermsByConditionParams,
} from "../../models";
import type {
DataTag,
Expand Down Expand Up @@ -48,71 +48,81 @@ const withQueryKey = <T extends object, K>(
};

/**
* 서비스 이용약관 및 개인정보 처리방침을 조회합니다.
* type을 지정하지 않으면 전체 약관을 조회하고, SERVICE 또는 PRIVACY를 지정하면 해당 약관만 조회합니다.
* @summary 약관 내용 조회
* 약관 타입과 언어 기준으로 최신 약관 1건을 조회합니다.
* @summary 약관 조건 조회
*/
export const getTerms = (
params?: GetTermsParams,
export const getTermsByCondition = (
params: GetTermsByConditionParams,
options?: SecondParameter<typeof customInstance>,
signal?: AbortSignal,
) => {
return customInstance<BaseResponseTermsListResponse>(
return customInstance<BaseResponseTermsDetailResponse>(
{ url: `/api/v1/terms`, method: "GET", params, signal },
options,
);
};

export const getGetTermsQueryKey = (params?: GetTermsParams) => {
export const getGetTermsByConditionQueryKey = (
params?: GetTermsByConditionParams,
) => {
return [`/api/v1/terms`, ...(params ? [params] : [])] as const;
};

export const getGetTermsQueryOptions = <
TData = Awaited<ReturnType<typeof getTerms>>,
export const getGetTermsByConditionQueryOptions = <
TData = Awaited<ReturnType<typeof getTermsByCondition>>,
TError = ErrorType<ErrorDto>,
>(
params?: GetTermsParams,
params: GetTermsByConditionParams,
options?: {
query?: Partial<
UseQueryOptions<Awaited<ReturnType<typeof getTerms>>, TError, TData>
UseQueryOptions<
Awaited<ReturnType<typeof getTermsByCondition>>,
TError,
TData
>
>;
request?: SecondParameter<typeof customInstance>;
},
) => {
const { query: queryOptions, request: requestOptions } = options ?? {};

const queryKey = queryOptions?.queryKey ?? getGetTermsQueryKey(params);
const queryKey =
queryOptions?.queryKey ?? getGetTermsByConditionQueryKey(params);

const queryFn: QueryFunction<Awaited<ReturnType<typeof getTerms>>> = ({
signal,
}) => getTerms(params, requestOptions, signal);
const queryFn: QueryFunction<
Awaited<ReturnType<typeof getTermsByCondition>>
> = ({ signal }) => getTermsByCondition(params, requestOptions, signal);

return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited<ReturnType<typeof getTerms>>,
Awaited<ReturnType<typeof getTermsByCondition>>,
TError,
TData
> & { queryKey: DataTag<QueryKey, TData, TError> };
};

export type GetTermsQueryResult = NonNullable<
Awaited<ReturnType<typeof getTerms>>
export type GetTermsByConditionQueryResult = NonNullable<
Awaited<ReturnType<typeof getTermsByCondition>>
>;
export type GetTermsQueryError = ErrorType<ErrorDto>;
export type GetTermsByConditionQueryError = ErrorType<ErrorDto>;

export function useGetTerms<
TData = Awaited<ReturnType<typeof getTerms>>,
export function useGetTermsByCondition<
TData = Awaited<ReturnType<typeof getTermsByCondition>>,
TError = ErrorType<ErrorDto>,
>(
params: undefined | GetTermsParams,
params: GetTermsByConditionParams,
options: {
query: Partial<
UseQueryOptions<Awaited<ReturnType<typeof getTerms>>, TError, TData>
UseQueryOptions<
Awaited<ReturnType<typeof getTermsByCondition>>,
TError,
TData
>
> &
Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof getTerms>>,
Awaited<ReturnType<typeof getTermsByCondition>>,
TError,
Awaited<ReturnType<typeof getTerms>>
Awaited<ReturnType<typeof getTermsByCondition>>
>,
"initialData"
>;
Expand All @@ -122,20 +132,24 @@ export function useGetTerms<
): DefinedUseQueryResult<TData, TError> & {
queryKey: DataTag<QueryKey, TData, TError>;
};
export function useGetTerms<
TData = Awaited<ReturnType<typeof getTerms>>,
export function useGetTermsByCondition<
TData = Awaited<ReturnType<typeof getTermsByCondition>>,
TError = ErrorType<ErrorDto>,
>(
params?: GetTermsParams,
params: GetTermsByConditionParams,
options?: {
query?: Partial<
UseQueryOptions<Awaited<ReturnType<typeof getTerms>>, TError, TData>
UseQueryOptions<
Awaited<ReturnType<typeof getTermsByCondition>>,
TError,
TData
>
> &
Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof getTerms>>,
Awaited<ReturnType<typeof getTermsByCondition>>,
TError,
Awaited<ReturnType<typeof getTerms>>
Awaited<ReturnType<typeof getTermsByCondition>>
>,
"initialData"
>;
Expand All @@ -145,14 +159,18 @@ export function useGetTerms<
): UseQueryResult<TData, TError> & {
queryKey: DataTag<QueryKey, TData, TError>;
};
export function useGetTerms<
TData = Awaited<ReturnType<typeof getTerms>>,
export function useGetTermsByCondition<
TData = Awaited<ReturnType<typeof getTermsByCondition>>,
TError = ErrorType<ErrorDto>,
>(
params?: GetTermsParams,
params: GetTermsByConditionParams,
options?: {
query?: Partial<
UseQueryOptions<Awaited<ReturnType<typeof getTerms>>, TError, TData>
UseQueryOptions<
Awaited<ReturnType<typeof getTermsByCondition>>,
TError,
TData
>
>;
request?: SecondParameter<typeof customInstance>;
},
Expand All @@ -161,25 +179,29 @@ export function useGetTerms<
queryKey: DataTag<QueryKey, TData, TError>;
};
/**
* @summary 약관 내용 조회
* @summary 약관 조건 조회
*/

export function useGetTerms<
TData = Awaited<ReturnType<typeof getTerms>>,
export function useGetTermsByCondition<
TData = Awaited<ReturnType<typeof getTermsByCondition>>,
TError = ErrorType<ErrorDto>,
>(
params?: GetTermsParams,
params: GetTermsByConditionParams,
options?: {
query?: Partial<
UseQueryOptions<Awaited<ReturnType<typeof getTerms>>, TError, TData>
UseQueryOptions<
Awaited<ReturnType<typeof getTermsByCondition>>,
TError,
TData
>
>;
request?: SecondParameter<typeof customInstance>;
},
queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
queryKey: DataTag<QueryKey, TData, TError>;
} {
const queryOptions = getGetTermsQueryOptions(params, options);
const queryOptions = getGetTermsByConditionQueryOptions(params, options);

const query = useQuery(queryOptions, queryClient) as UseQueryResult<
TData,
Expand Down
27 changes: 11 additions & 16 deletions apps/timo-web/api/generated/endpoints/terms/terms.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,24 @@
import * as zod from "zod";

/**
* 서비스 이용약관 및 개인정보 처리방침을 조회합니다.
* type을 지정하지 않으면 전체 약관을 조회하고, SERVICE 또는 PRIVACY를 지정하면 해당 약관만 조회합니다.
* @summary 약관 내용 조회
* 약관 타입과 언어 기준으로 최신 약관 1건을 조회합니다.
* @summary 약관 조건 조회
*/
export const GetTermsQueryParams = zod.object({
type: zod.string().optional().describe("약관 타입(SERVICE, PRIVACY)"),
export const GetTermsByConditionQueryParams = zod.object({
type: zod.string().describe("약관 타입"),
language: zod.string().describe("약관 언어"),
});

export const GetTermsResponse = zod.object({
export const GetTermsByConditionResponse = zod.object({
status: zod.number().optional(),
message: zod.string().optional(),
data: zod
.object({
terms: zod
.array(
zod.object({
termsId: zod.number().describe("약관 ID"),
type: zod.string().describe("약관 타입"),
title: zod.string().describe("약관 제목"),
content: zod.string().describe("약관 전문"),
}),
)
.describe("약관 목록"),
type: zod.string().optional().describe("약관 타입"),
language: zod.string().optional().describe("약관 언어"),
version: zod.string().optional().describe("약관 버전"),
title: zod.string().optional().describe("약관 제목"),
content: zod.string().optional().describe("약관 전문"),
})
.optional(),
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* Timo 서버 API 명세서
* OpenAPI spec version: v1
*/
import type { TermsListResponse } from "./termsListResponse";
import type { TermsDetailResponse } from "./termsDetailResponse";

export interface BaseResponseTermsListResponse {
export interface BaseResponseTermsDetailResponse {
status?: number;
message?: string;
data?: TermsListResponse;
data?: TermsDetailResponse;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
* OpenAPI spec version: v1
*/

export interface GetTermsParams {
export interface GetTermsByConditionParams {
/**
* 약관 타입(SERVICE, PRIVACY)
* 약관 타입
*/
type?: string;
type: string;
/**
* 약관 언어
*/
language: string;
}
7 changes: 3 additions & 4 deletions apps/timo-web/api/generated/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export * from "./baseResponseStatisticsSummaryResponse";
export * from "./baseResponseSubtaskStatusChangeResponse";
export * from "./baseResponseTagCreateResponse";
export * from "./baseResponseTagListResponse";
export * from "./baseResponseTermsListResponse";
export * from "./baseResponseTermsDetailResponse";
export * from "./baseResponseTimerActiveResponse";
export * from "./baseResponseTimerExtendResponse";
export * from "./baseResponseTimerFinishResponse";
Expand All @@ -50,7 +50,7 @@ export * from "./getCalendarParams";
export * from "./getDailyParams";
export * from "./getHomeParams";
export * from "./getSummaryParams";
export * from "./getTermsParams";
export * from "./getTermsByConditionParams";
export * from "./getTimeBoxesParams";
export * from "./getTodoDetailParams";
export * from "./homeResponse";
Expand All @@ -71,8 +71,7 @@ export * from "./tagCreateRequest";
export * from "./tagCreateResponse";
export * from "./tagListResponse";
export * from "./tagResponse";
export * from "./termsListResponse";
export * from "./termsResponse";
export * from "./termsDetailResponse";
export * from "./timeBoxResponse";
export * from "./timeBoxResponseEndAction";
export * from "./timeBoxResponseStartAction";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
* OpenAPI spec version: v1
*/

export interface TermsResponse {
/** 약관 ID */
termsId: number;
export interface TermsDetailResponse {
/** 약관 타입 */
type: string;
type?: string;
/** 약관 언어 */
language?: string;
/** 약관 버전 */
version?: string;
/** 약관 제목 */
title: string;
title?: string;
/** 약관 전문 */
content: string;
content?: string;
}
Loading
Loading