feat: 댓글 신고·차단·약관 동의(관리 스크립트 포함), 구글 로그인(서버·웹·안드로이드 앱), 앱 패키지 kr.o2o.nalssigak·versionCode 1000
This commit is contained in:
1 parent
fbebdcb796
commit
3f3a3ea039
35 files changed
+1723
-115
No files matched your search
@@ -3,8 +3,8 @@
|
||||
import { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/react-query';
|
||||
|
||||
import { client } from '../client.gen';
|
||||
import { addComment, deleteComment, getArticle, getFeed, getImage, getIndex, getPost, getSeasonWeek, getSky, getSkyRanking, getTodayPage, getWatchSummary, getWeatherNow, getWeatherToday, getWeek, getWeekRanking, healthzHealthzGet, likeComment, likePost, listArticles, listComments, listEvents, listIndices, listPlaces, listRegions, listSaved, login, logout, me, nearestRegion, type Options, refresh, savePost, signup, unlikeComment, unlikePost, unsavePost, updateMe, withdraw } from '../sdk.gen';
|
||||
import type { AddCommentData, AddCommentError, AddCommentResponse, DeleteCommentData, DeleteCommentError, DeleteCommentResponse, GetArticleData, GetArticleError, GetArticleResponse, GetFeedData, GetFeedError, GetFeedResponse, GetImageData, GetImageError, GetIndexData, GetIndexError, GetIndexResponse, GetPostData, GetPostError, GetPostResponse, GetSeasonWeekData, GetSeasonWeekResponse, GetSkyData, GetSkyError, GetSkyRankingData, GetSkyRankingResponse, GetSkyResponse, GetTodayPageData, GetTodayPageError, GetTodayPageResponse, GetWatchSummaryData, GetWatchSummaryError, GetWatchSummaryResponse, GetWeatherNowData, GetWeatherNowError, GetWeatherNowResponse, GetWeatherTodayData, GetWeatherTodayError, GetWeatherTodayResponse, GetWeekData, GetWeekError, GetWeekRankingData, GetWeekRankingResponse, GetWeekResponse, HealthzHealthzGetData, HealthzHealthzGetResponse, LikeCommentData, LikeCommentError, LikeCommentResponse, LikePostData, LikePostError, LikePostResponse, ListArticlesData, ListArticlesError, ListArticlesResponse, ListCommentsData, ListCommentsError, ListCommentsResponse, ListEventsData, ListEventsError, ListEventsResponse, ListIndicesData, ListIndicesError, ListIndicesResponse, ListPlacesData, ListPlacesError, ListPlacesResponse, ListRegionsData, ListRegionsError, ListRegionsResponse, ListSavedData, ListSavedError, ListSavedResponse, LoginData, LoginError, LoginResponse, LogoutData, LogoutError, LogoutResponse, MeData, MeError, MeResponse, NearestRegionData, NearestRegionError, NearestRegionResponse, RefreshData, RefreshError, RefreshResponse, SavePostData, SavePostError, SavePostResponse, SignupData, SignupError, SignupResponse, UnlikeCommentData, UnlikeCommentError, UnlikeCommentResponse, UnlikePostData, UnlikePostError, UnlikePostResponse, UnsavePostData, UnsavePostError, UnsavePostResponse, UpdateMeData, UpdateMeError, UpdateMeResponse, WithdrawData, WithdrawError, WithdrawResponse } from '../types.gen';
|
||||
import { addComment, agreeTerms, authConfig, blockAuthor, deleteComment, getArticle, getFeed, getImage, getIndex, getPost, getSeasonWeek, getSky, getSkyRanking, getTodayPage, getWatchSummary, getWeatherNow, getWeatherToday, getWeek, getWeekRanking, googleLogin, healthzHealthzGet, likeComment, likePost, listArticles, listBlocked, listComments, listEvents, listIndices, listPlaces, listRegions, listSaved, login, logout, me, nearestRegion, type Options, refresh, reportComment, savePost, signup, unblock, unlikeComment, unlikePost, unsavePost, updateMe, withdraw } from '../sdk.gen';
|
||||
import type { AddCommentData, AddCommentError, AddCommentResponse, AgreeTermsData, AgreeTermsError, AgreeTermsResponse, AuthConfigData, AuthConfigResponse, BlockAuthorData, BlockAuthorError, BlockAuthorResponse, DeleteCommentData, DeleteCommentError, DeleteCommentResponse, GetArticleData, GetArticleError, GetArticleResponse, GetFeedData, GetFeedError, GetFeedResponse, GetImageData, GetImageError, GetIndexData, GetIndexError, GetIndexResponse, GetPostData, GetPostError, GetPostResponse, GetSeasonWeekData, GetSeasonWeekResponse, GetSkyData, GetSkyError, GetSkyRankingData, GetSkyRankingResponse, GetSkyResponse, GetTodayPageData, GetTodayPageError, GetTodayPageResponse, GetWatchSummaryData, GetWatchSummaryError, GetWatchSummaryResponse, GetWeatherNowData, GetWeatherNowError, GetWeatherNowResponse, GetWeatherTodayData, GetWeatherTodayError, GetWeatherTodayResponse, GetWeekData, GetWeekError, GetWeekRankingData, GetWeekRankingResponse, GetWeekResponse, GoogleLoginData, GoogleLoginError, GoogleLoginResponse, HealthzHealthzGetData, HealthzHealthzGetResponse, LikeCommentData, LikeCommentError, LikeCommentResponse, LikePostData, LikePostError, LikePostResponse, ListArticlesData, ListArticlesError, ListArticlesResponse, ListBlockedData, ListBlockedError, ListBlockedResponse, ListCommentsData, ListCommentsError, ListCommentsResponse, ListEventsData, ListEventsError, ListEventsResponse, ListIndicesData, ListIndicesError, ListIndicesResponse, ListPlacesData, ListPlacesError, ListPlacesResponse, ListRegionsData, ListRegionsError, ListRegionsResponse, ListSavedData, ListSavedError, ListSavedResponse, LoginData, LoginError, LoginResponse, LogoutData, LogoutError, LogoutResponse, MeData, MeError, MeResponse, NearestRegionData, NearestRegionError, NearestRegionResponse, RefreshData, RefreshError, RefreshResponse, ReportCommentData, ReportCommentError, ReportCommentResponse, SavePostData, SavePostError, SavePostResponse, SignupData, SignupError, SignupResponse, UnblockData, UnblockError, UnblockResponse, UnlikeCommentData, UnlikeCommentError, UnlikeCommentResponse, UnlikePostData, UnlikePostError, UnlikePostResponse, UnsavePostData, UnsavePostError, UnsavePostResponse, UpdateMeData, UpdateMeError, UpdateMeResponse, WithdrawData, WithdrawError, WithdrawResponse } from '../types.gen';
|
||||
|
||||
export type QueryKey<TOptions extends Options> = [
|
||||
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
||||
@@ -379,6 +379,41 @@ export const loginMutation = (options?: Partial<Options<LoginData>>): UseMutatio
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* 구글 로그인 (처음이면 자동 닉네임으로 가입)
|
||||
*/
|
||||
export const googleLoginMutation = (options?: Partial<Options<GoogleLoginData>>): UseMutationOptions<GoogleLoginResponse, GoogleLoginError, Options<GoogleLoginData>> => {
|
||||
const mutationOptions: UseMutationOptions<GoogleLoginResponse, GoogleLoginError, Options<GoogleLoginData>> = {
|
||||
mutationFn: async (fnOptions) => {
|
||||
const { data } = await googleLogin({
|
||||
...options,
|
||||
...fnOptions,
|
||||
throwOnError: true
|
||||
});
|
||||
return data;
|
||||
}
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const authConfigQueryKey = (options?: Options<AuthConfigData>) => createQueryKey('authConfig', options);
|
||||
|
||||
/**
|
||||
* 로그인 화면 설정 (구글 클라이언트 ID)
|
||||
*/
|
||||
export const authConfigOptions = (options?: Options<AuthConfigData>) => queryOptions<AuthConfigResponse, DefaultError, AuthConfigResponse, ReturnType<typeof authConfigQueryKey>>({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await authConfig({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: authConfigQueryKey(options)
|
||||
});
|
||||
|
||||
/**
|
||||
* 토큰 재발급
|
||||
*/
|
||||
@@ -465,6 +500,23 @@ export const updateMeMutation = (options?: Partial<Options<UpdateMeData>>): UseM
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* 이용약관 동의 (댓글 쓰기 전에 한 번)
|
||||
*/
|
||||
export const agreeTermsMutation = (options?: Partial<Options<AgreeTermsData>>): UseMutationOptions<AgreeTermsResponse, AgreeTermsError, Options<AgreeTermsData>> => {
|
||||
const mutationOptions: UseMutationOptions<AgreeTermsResponse, AgreeTermsError, Options<AgreeTermsData>> = {
|
||||
mutationFn: async (fnOptions) => {
|
||||
const { data } = await agreeTerms({
|
||||
...options,
|
||||
...fnOptions,
|
||||
throwOnError: true
|
||||
});
|
||||
return data;
|
||||
}
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* 좋아요 취소
|
||||
*/
|
||||
@@ -659,7 +711,7 @@ export const listCommentsInfiniteOptions = (options: Options<ListCommentsData>)
|
||||
};
|
||||
|
||||
/**
|
||||
* 댓글 쓰기 (60자)
|
||||
* 댓글 쓰기 (60자, 이용약관 동의 전이면 TERMS_REQUIRED)
|
||||
*/
|
||||
export const addCommentMutation = (options?: Partial<Options<AddCommentData>>): UseMutationOptions<AddCommentResponse, AddCommentError, Options<AddCommentData>> => {
|
||||
const mutationOptions: UseMutationOptions<AddCommentResponse, AddCommentError, Options<AddCommentData>> = {
|
||||
@@ -726,6 +778,75 @@ export const likeCommentMutation = (options?: Partial<Options<LikeCommentData>>)
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* 남의 댓글 신고 (신고한 사람에겐 바로 안 보이고, 3건이면 모두에게 숨김)
|
||||
*/
|
||||
export const reportCommentMutation = (options?: Partial<Options<ReportCommentData>>): UseMutationOptions<ReportCommentResponse, ReportCommentError, Options<ReportCommentData>> => {
|
||||
const mutationOptions: UseMutationOptions<ReportCommentResponse, ReportCommentError, Options<ReportCommentData>> = {
|
||||
mutationFn: async (fnOptions) => {
|
||||
const { data } = await reportComment({
|
||||
...options,
|
||||
...fnOptions,
|
||||
throwOnError: true
|
||||
});
|
||||
return data;
|
||||
}
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* 이 댓글 쓴 사람 차단 (그 사람 댓글이 내게 안 보임)
|
||||
*/
|
||||
export const blockAuthorMutation = (options?: Partial<Options<BlockAuthorData>>): UseMutationOptions<BlockAuthorResponse, BlockAuthorError, Options<BlockAuthorData>> => {
|
||||
const mutationOptions: UseMutationOptions<BlockAuthorResponse, BlockAuthorError, Options<BlockAuthorData>> = {
|
||||
mutationFn: async (fnOptions) => {
|
||||
const { data } = await blockAuthor({
|
||||
...options,
|
||||
...fnOptions,
|
||||
throwOnError: true
|
||||
});
|
||||
return data;
|
||||
}
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const listBlockedQueryKey = (options?: Options<ListBlockedData>) => createQueryKey('listBlocked', options);
|
||||
|
||||
/**
|
||||
* 내가 차단한 사람
|
||||
*/
|
||||
export const listBlockedOptions = (options?: Options<ListBlockedData>) => queryOptions<ListBlockedResponse, ListBlockedError, ListBlockedResponse, ReturnType<typeof listBlockedQueryKey>>({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await listBlocked({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: listBlockedQueryKey(options)
|
||||
});
|
||||
|
||||
/**
|
||||
* 차단 풀기
|
||||
*/
|
||||
export const unblockMutation = (options?: Partial<Options<UnblockData>>): UseMutationOptions<UnblockResponse, UnblockError, Options<UnblockData>> => {
|
||||
const mutationOptions: UseMutationOptions<UnblockResponse, UnblockError, Options<UnblockData>> = {
|
||||
mutationFn: async (fnOptions) => {
|
||||
const { data } = await unblock({
|
||||
...options,
|
||||
...fnOptions,
|
||||
throwOnError: true
|
||||
});
|
||||
return data;
|
||||
}
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const getWatchSummaryQueryKey = (options: Options<GetWatchSummaryData>) => createQueryKey('getWatchSummary', options);
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
export { addComment, deleteComment, getArticle, getFeed, getImage, getIndex, getPost, getSeasonWeek, getSky, getSkyRanking, getTodayPage, getWatchSummary, getWeatherNow, getWeatherToday, getWeek, getWeekRanking, healthzHealthzGet, likeComment, likePost, listArticles, listComments, listEvents, listIndices, listPlaces, listRegions, listSaved, login, logout, me, nearestRegion, type Options, refresh, savePost, signup, unlikeComment, unlikePost, unsavePost, updateMe, withdraw } from './sdk.gen';
|
||||
export { type AddCommentData, type AddCommentError, type AddCommentErrors, type AddCommentResponse, type AddCommentResponses, type AirData, AirGrade, ArticleCategory, type ArticleSummary, AuthProvider, type BandArticle, type BandEvent, type Bands, type BestTime, type ClientOptions, type CommentData, type CommuteData, Confidence, type Cut, type DayData, type DeleteCommentData, type DeleteCommentError, type DeleteCommentErrors, type DeleteCommentResponse, type DeleteCommentResponses, type ErrorInfo, type EventData, type Factor, type GakSlide, type GetArticleData, type GetArticleError, type GetArticleErrors, type GetArticleResponse, type GetArticleResponses, type GetFeedData, type GetFeedError, type GetFeedErrors, type GetFeedResponse, type GetFeedResponses, 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 GetSeasonWeekData, type GetSeasonWeekResponse, type GetSeasonWeekResponses, type GetSkyData, type GetSkyError, type GetSkyErrors, type GetSkyRankingData, type GetSkyRankingResponse, type GetSkyRankingResponses, type GetSkyResponse, type GetSkyResponses, type GetTodayPageData, type GetTodayPageError, type GetTodayPageErrors, type GetTodayPageResponse, type GetTodayPageResponses, 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 HealthzHealthzGetData, type HealthzHealthzGetResponse, type HealthzHealthzGetResponses, type Hero, type HeroStat, type HourCell, type HoursSlide, type HttpValidationError, IndexCategory, type IndexSummary, type LikeCommentData, type LikeCommentError, type LikeCommentErrors, type LikeCommentResponse, type LikeCommentResponses, type LikePostData, type LikePostError, type LikePostErrors, type LikePostResponse, type LikePostResponses, type ListArticlesData, type ListArticlesError, type ListArticlesErrors, type ListArticlesResponse, type ListArticlesResponses, type ListCommentsData, type ListCommentsError, type ListCommentsErrors, type ListCommentsResponse, type ListCommentsResponses, type ListEventsData, type ListEventsError, type ListEventsErrors, type ListEventsResponse, type ListEventsResponses, type ListIndicesData, type ListIndicesError, type ListIndicesErrors, type ListIndicesResponse, type ListIndicesResponses, type ListPlacesData, type ListPlacesError, type ListPlacesErrors, type ListPlacesResponse, type ListPlacesResponses, type ListRegionsData, type ListRegionsError, type ListRegionsErrors, type ListRegionsResponse, type ListRegionsResponses, type ListSavedData, type ListSavedError, type ListSavedErrors, type ListSavedResponse, type ListSavedResponses, type LoginData, type LoginError, type LoginErrors, type LoginResponse, type LoginResponses, type LogoutData, type LogoutError, type LogoutErrors, type LogoutResponse, type LogoutResponses, type Me, type MeData, type MeError, type MeErrors, type MeResponse, type MeResponses, type NearestRegionData, type NearestRegionError, type NearestRegionErrors, type NearestRegionResponse, type NearestRegionResponses, type PlaceData, type PlanSlide, type PlanSpot, type PlanStep, type PostData, PostType, type Rain2h, type RainHourData, RainType, type RankData, type RefreshData, type RefreshError, type RefreshErrors, type RefreshResponse, type RefreshResponses, type RegionData, type ReqComment, type ReqLogin, type ReqRefresh, type ReqSignup, type ReqUpdateMe, type ResArticle, type ResArticleList, type ResAuth, type ResComment, type ResCommentLike, type ResCommentList, type ResEventList, type ResFeed, type ResHealth, type ResIndexDetail, type ResIndexList, type ResLogout, type ResMe, type ResPlaceList, type ResPost, type ResPostLike, type ResPostSave, type ResRegion, type ResRegionList, type ResSavedList, type ResSeasonWeek, type ResSky, type ResSkyRanking, type ResWatchSummary, type ResWeatherNow, type ResWeatherToday, type ResWebPacketProtocol, type ResWeek, type ResWeekRanking, type ResWithdraw, type Row, type RowsSlide, type SavedPost, type SavePostData, type SavePostError, type SavePostErrors, type SavePostResponse, type SavePostResponses, type ScoreBand, type SignupData, type SignupError, type SignupErrors, type SignupResponse, type SignupResponses, Sky, SkyGrade, type SkyPlanData, type SkyScoreData, SkySituation, SkyType, type SlotPoint, SlotTone, typLine truncated
|
||||
export { addComment, agreeTerms, authConfig, blockAuthor, deleteComment, getArticle, getFeed, getImage, getIndex, getPost, getSeasonWeek, getSky, getSkyRanking, getTodayPage, getWatchSummary, getWeatherNow, getWeatherToday, getWeek, getWeekRanking, googleLogin, healthzHealthzGet, likeComment, likePost, listArticles, listBlocked, listComments, listEvents, listIndices, listPlaces, listRegions, listSaved, login, logout, me, nearestRegion, type Options, refresh, reportComment, savePost, signup, unblock, unlikeComment, unlikePost, unsavePost, updateMe, withdraw } from './sdk.gen';
|
||||
export { type AddCommentData, type AddCommentError, type AddCommentErrors, type AddCommentResponse, type AddCommentResponses, type AgreeTermsData, type AgreeTermsError, type AgreeTermsErrors, type AgreeTermsResponse, type AgreeTermsResponses, type AirData, AirGrade, ArticleCategory, type ArticleSummary, 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 ClientOptions, type CommentData, type CommuteData, Confidence, type Cut, type DayData, type DeleteCommentData, type DeleteCommentError, type DeleteCommentErrors, type DeleteCommentResponse, type DeleteCommentResponses, type ErrorInfo, type EventData, type Factor, type GakSlide, type GetArticleData, type GetArticleError, type GetArticleErrors, type GetArticleResponse, type GetArticleResponses, type GetFeedData, type GetFeedError, type GetFeedErrors, type GetFeedResponse, type GetFeedResponses, 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 GetSeasonWeekData, type GetSeasonWeekResponse, type GetSeasonWeekResponses, type GetSkyData, type GetSkyError, type GetSkyErrors, type GetSkyRankingData, type GetSkyRankingResponse, type GetSkyRankingResponses, type GetSkyResponse, type GetSkyResponses, type GetTodayPageData, type GetTodayPageError, type GetTodayPageErrors, type GetTodayPageResponse, type GetTodayPageResponses, 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 HeroStat, type HourCell, type HoursSlide, type HttpValidationError, IndexCategory, type IndexSummary, type LikeCommentData, type LikeCommentError, type LikeCommentErrors, type LikeCommentResponse, type LikeCommentResponses, type LikePostData, type LikePostError, type LikePostErrors, type LikePostResponse, type LikePostResponses, type ListArticlesData, type ListArticlesError, type ListArticlesErrors, type ListArticlesResponse, type ListArticlesResponses, type ListBlockedData, type ListBlockedError, type ListBlockedErrors, type ListBlockedResponse, type ListBlockedResponses, type ListCommentsData, type ListCommentsError, type ListCommentsErrors, type ListCommentsResponse, type ListCommentsResponses, type ListEventsData, type ListEventsError, type ListEventsErrors, type ListEventsResponse, type ListEventsResponses, type ListIndicesData, type ListIndicesError, type ListIndicesErrors, type ListIndicesResponse, type ListIndicesResponses, type ListPlacesData, type ListPlacesError, type ListPlacesErrors, type ListPlacesResponse, type ListPlacesResponses, type ListRegionsData, type ListRegionsError, type ListRegionsErrors, type ListRegionsResponse, type ListRegionsResponses, type ListSavedData, type ListSavedError, type ListSavedErrors, type ListSavedResponse, type ListSavedResponses, type LoginData, type LoginError, type LoginErrors, type LoginResponse, type LoginResponses, type LogoutData, type LogoutError, type LogoutErrors, type LogoutResponse, type LogoutResponses, type Me, type MeData, type MeError, type MeErrors, type MeResponse, type MeResponses, type NearestRegionData, type NearestRegionError, type NearestRegionErrors, type NearestRegionResponse, type NearestRegionResponses, type PlaceData, type PlanSlide, type PlanSpot, type PlanStep, type PostData, PostType, type Rain2h, type RainHourData, RainType, type RankData, type RefreshData, type RefreshError, type RefreshErrors, type RefreshResponse, type RefreshResponses, type RegionData, type ReportCommentData, type ReportCommentError, type ReportCommentErrors, type ReportCommentResponse, type ReportCommentResponses, ReportReason, type ReqComment, type ReqGoogle, type ReqLogin, type ReqRefresh, type ReqReport, type ReqSignup, type ReqUpdateMe, type ResArticle, type ResArticleList, type ResAuth, type ResAuthConfig, type ResBlockedList, type ResComment, type ResCommentLike, type ResCommentList, type ResEvenLine truncated
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';
|
||||
import { client } from './client.gen';
|
||||
import type { AddCommentData, AddCommentErrors, AddCommentResponses, DeleteCommentData, DeleteCommentErrors, DeleteCommentResponses, GetArticleData, GetArticleErrors, GetArticleResponses, GetFeedData, GetFeedErrors, GetFeedResponses, GetImageData, GetImageErrors, GetImageResponses, GetIndexData, GetIndexErrors, GetIndexResponses, GetPostData, GetPostErrors, GetPostResponses, GetSeasonWeekData, GetSeasonWeekResponses, GetSkyData, GetSkyErrors, GetSkyRankingData, GetSkyRankingResponses, GetSkyResponses, GetTodayPageData, GetTodayPageErrors, GetTodayPageResponses, GetWatchSummaryData, GetWatchSummaryErrors, GetWatchSummaryResponses, GetWeatherNowData, GetWeatherNowErrors, GetWeatherNowResponses, GetWeatherTodayData, GetWeatherTodayErrors, GetWeatherTodayResponses, GetWeekData, GetWeekErrors, GetWeekRankingData, GetWeekRankingResponses, GetWeekResponses, HealthzHealthzGetData, HealthzHealthzGetResponses, LikeCommentData, LikeCommentErrors, LikeCommentResponses, LikePostData, LikePostErrors, LikePostResponses, ListArticlesData, ListArticlesErrors, ListArticlesResponses, ListCommentsData, ListCommentsErrors, ListCommentsResponses, ListEventsData, ListEventsErrors, ListEventsResponses, ListIndicesData, ListIndicesErrors, ListIndicesResponses, ListPlacesData, ListPlacesErrors, ListPlacesResponses, ListRegionsData, ListRegionsErrors, ListRegionsResponses, ListSavedData, ListSavedErrors, ListSavedResponses, LoginData, LoginErrors, LoginResponses, LogoutData, LogoutErrors, LogoutResponses, MeData, MeErrors, MeResponses, NearestRegionData, NearestRegionErrors, NearestRegionResponses, RefreshData, RefreshErrors, RefreshResponses, SavePostData, SavePostErrors, SavePostResponses, SignupData, SignupErrors, SignupResponses, UnlikeCommentData, UnlikeCommentErrors, UnlikeCommentResponses, UnlikePostData, UnlikePostErrors, UnlikePostResponses, UnsavePostData, UnsavePostErrors, UnsavePostResponses, UpdateMeData, UpdateMeErrors, UpdateMeResponses, WithdrawData, WithdrawErrors, WithdrawResponses } from './types.gen';
|
||||
import type { AddCommentData, AddCommentErrors, AddCommentResponses, AgreeTermsData, AgreeTermsErrors, AgreeTermsResponses, AuthConfigData, AuthConfigResponses, BlockAuthorData, BlockAuthorErrors, BlockAuthorResponses, DeleteCommentData, DeleteCommentErrors, DeleteCommentResponses, GetArticleData, GetArticleErrors, GetArticleResponses, GetFeedData, GetFeedErrors, GetFeedResponses, GetImageData, GetImageErrors, GetImageResponses, GetIndexData, GetIndexErrors, GetIndexResponses, GetPostData, GetPostErrors, GetPostResponses, GetSeasonWeekData, GetSeasonWeekResponses, GetSkyData, GetSkyErrors, GetSkyRankingData, GetSkyRankingResponses, GetSkyResponses, GetTodayPageData, GetTodayPageErrors, GetTodayPageResponses, GetWatchSummaryData, GetWatchSummaryErrors, GetWatchSummaryResponses, GetWeatherNowData, GetWeatherNowErrors, GetWeatherNowResponses, GetWeatherTodayData, GetWeatherTodayErrors, GetWeatherTodayResponses, GetWeekData, GetWeekErrors, GetWeekRankingData, GetWeekRankingResponses, GetWeekResponses, GoogleLoginData, GoogleLoginErrors, GoogleLoginResponses, HealthzHealthzGetData, HealthzHealthzGetResponses, LikeCommentData, LikeCommentErrors, LikeCommentResponses, LikePostData, LikePostErrors, LikePostResponses, ListArticlesData, ListArticlesErrors, ListArticlesResponses, ListBlockedData, ListBlockedErrors, ListBlockedResponses, ListCommentsData, ListCommentsErrors, ListCommentsResponses, ListEventsData, ListEventsErrors, ListEventsResponses, ListIndicesData, ListIndicesErrors, ListIndicesResponses, ListPlacesData, ListPlacesErrors, ListPlacesResponses, ListRegionsData, ListRegionsErrors, ListRegionsResponses, ListSavedData, ListSavedErrors, ListSavedResponses, LoginData, LoginErrors, LoginResponses, LogoutData, LogoutErrors, LogoutResponses, MeData, MeErrors, MeResponses, NearestRegionData, NearestRegionErrors, NearestRegionResponses, RefreshData, RefreshErrors, RefreshResponses, ReportCommentData, ReportCommentErrors, ReportCommentResponses, SavePostData, SavePostErrors, SavePostResponses, SignupData, SignupErrors, SignupResponses, UnblockData, UnblockErrors, UnblockResponses, UnlikeCommentData, UnlikeCommentErrors, UnlikeCommentResponses, UnlikePostData, UnlikePostErrors, UnlikePostResponses, UnsavePostData, UnsavePostErrors, UnsavePostResponses, UpdateMeData, UpdateMeErrors, UpdateMeResponses, WithdrawData, WithdrawErrors, WithdrawResponses } from './types.gen';
|
||||
|
||||
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
||||
/**
|
||||
@@ -127,6 +127,23 @@ export const login = <ThrowOnError extends boolean = true>(options: Options<Logi
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 구글 로그인 (처음이면 자동 닉네임으로 가입)
|
||||
*/
|
||||
export const googleLogin = <ThrowOnError extends boolean = true>(options: Options<GoogleLoginData, ThrowOnError>): RequestResult<GoogleLoginResponses, GoogleLoginErrors, ThrowOnError> => (options.client ?? client).post<GoogleLoginResponses, GoogleLoginErrors, ThrowOnError>({
|
||||
url: '/v1/auth/google',
|
||||
...options,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
...options.headers
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 로그인 화면 설정 (구글 클라이언트 ID)
|
||||
*/
|
||||
export const authConfig = <ThrowOnError extends boolean = true>(options?: Options<AuthConfigData, ThrowOnError>): RequestResult<AuthConfigResponses, unknown, ThrowOnError> => (options?.client ?? client).get<AuthConfigResponses, unknown, ThrowOnError>({ url: '/v1/auth/config', ...options });
|
||||
|
||||
/**
|
||||
* 토큰 재발급
|
||||
*/
|
||||
@@ -166,6 +183,11 @@ export const updateMe = <ThrowOnError extends boolean = true>(options: Options<U
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 이용약관 동의 (댓글 쓰기 전에 한 번)
|
||||
*/
|
||||
export const agreeTerms = <ThrowOnError extends boolean = true>(options?: Options<AgreeTermsData, ThrowOnError>): RequestResult<AgreeTermsResponses, AgreeTermsErrors, ThrowOnError> => (options?.client ?? client).post<AgreeTermsResponses, AgreeTermsErrors, ThrowOnError>({ url: '/v1/auth/terms', ...options });
|
||||
|
||||
/**
|
||||
* 좋아요 취소
|
||||
*/
|
||||
@@ -197,7 +219,7 @@ export const listSaved = <ThrowOnError extends boolean = true>(options?: Options
|
||||
export const listComments = <ThrowOnError extends boolean = true>(options: Options<ListCommentsData, ThrowOnError>): RequestResult<ListCommentsResponses, ListCommentsErrors, ThrowOnError> => (options.client ?? client).get<ListCommentsResponses, ListCommentsErrors, ThrowOnError>({ url: '/v1/reaction/post/{post_id}/comment/list', ...options });
|
||||
|
||||
/**
|
||||
* 댓글 쓰기 (60자)
|
||||
* 댓글 쓰기 (60자, 이용약관 동의 전이면 TERMS_REQUIRED)
|
||||
*/
|
||||
export const addComment = <ThrowOnError extends boolean = true>(options: Options<AddCommentData, ThrowOnError>): RequestResult<AddCommentResponses, AddCommentErrors, ThrowOnError> => (options.client ?? client).post<AddCommentResponses, AddCommentErrors, ThrowOnError>({
|
||||
url: '/v1/reaction/post/{post_id}/comment',
|
||||
@@ -223,6 +245,33 @@ export const unlikeComment = <ThrowOnError extends boolean = true>(options: Opti
|
||||
*/
|
||||
export const likeComment = <ThrowOnError extends boolean = true>(options: Options<LikeCommentData, ThrowOnError>): RequestResult<LikeCommentResponses, LikeCommentErrors, ThrowOnError> => (options.client ?? client).post<LikeCommentResponses, LikeCommentErrors, ThrowOnError>({ url: '/v1/reaction/comment/{comment_id}/like', ...options });
|
||||
|
||||
/**
|
||||
* 남의 댓글 신고 (신고한 사람에겐 바로 안 보이고, 3건이면 모두에게 숨김)
|
||||
*/
|
||||
export const reportComment = <ThrowOnError extends boolean = true>(options: Options<ReportCommentData, ThrowOnError>): RequestResult<ReportCommentResponses, ReportCommentErrors, ThrowOnError> => (options.client ?? client).post<ReportCommentResponses, ReportCommentErrors, ThrowOnError>({
|
||||
url: '/v1/reaction/comment/{comment_id}/report',
|
||||
...options,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
...options.headers
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 이 댓글 쓴 사람 차단 (그 사람 댓글이 내게 안 보임)
|
||||
*/
|
||||
export const blockAuthor = <ThrowOnError extends boolean = true>(options: Options<BlockAuthorData, ThrowOnError>): RequestResult<BlockAuthorResponses, BlockAuthorErrors, ThrowOnError> => (options.client ?? client).post<BlockAuthorResponses, BlockAuthorErrors, ThrowOnError>({ url: '/v1/reaction/comment/{comment_id}/block', ...options });
|
||||
|
||||
/**
|
||||
* 내가 차단한 사람
|
||||
*/
|
||||
export const listBlocked = <ThrowOnError extends boolean = true>(options?: Options<ListBlockedData, ThrowOnError>): RequestResult<ListBlockedResponses, ListBlockedErrors, ThrowOnError> => (options?.client ?? client).get<ListBlockedResponses, ListBlockedErrors, ThrowOnError>({ url: '/v1/reaction/block/list', ...options });
|
||||
|
||||
/**
|
||||
* 차단 풀기
|
||||
*/
|
||||
export const unblock = <ThrowOnError extends boolean = true>(options: Options<UnblockData, ThrowOnError>): RequestResult<UnblockResponses, UnblockErrors, ThrowOnError> => (options.client ?? client).delete<UnblockResponses, UnblockErrors, ThrowOnError>({ url: '/v1/reaction/block/{user_id}', ...options });
|
||||
|
||||
/**
|
||||
* 워치 한 번에: 지금 날씨, 각 1~7위·내 각, 노을, 남은 3시간 칸, 컴플리케이션 시간표
|
||||
*/
|
||||
|
||||
@@ -238,6 +238,28 @@ export type BestTime = {
|
||||
end?: string | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* BlockedUser
|
||||
*/
|
||||
export type BlockedUser = {
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id: string;
|
||||
/**
|
||||
* Nickname
|
||||
*/
|
||||
nickname: string;
|
||||
/**
|
||||
* Character
|
||||
*/
|
||||
character: string;
|
||||
/**
|
||||
* Color
|
||||
*/
|
||||
color: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* CommentData
|
||||
*/
|
||||
@@ -828,6 +850,10 @@ export type Me = {
|
||||
*/
|
||||
mood?: string | null;
|
||||
provider: AuthProvider;
|
||||
/**
|
||||
* Terms Agreed
|
||||
*/
|
||||
terms_agreed?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1195,6 +1221,33 @@ export type RegionData = {
|
||||
lon: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* ReportReason
|
||||
*/
|
||||
export const ReportReason = {
|
||||
/**
|
||||
* ABUSE
|
||||
*/
|
||||
ABUSE: 1,
|
||||
/**
|
||||
* AD
|
||||
*/
|
||||
AD: 2,
|
||||
/**
|
||||
* PRIVACY
|
||||
*/
|
||||
PRIVACY: 3,
|
||||
/**
|
||||
* OTHER
|
||||
*/
|
||||
OTHER: 4
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* ReportReason
|
||||
*/
|
||||
export type ReportReason = typeof ReportReason[keyof typeof ReportReason];
|
||||
|
||||
/**
|
||||
* Req_Comment
|
||||
*/
|
||||
@@ -1205,6 +1258,18 @@ export type ReqComment = {
|
||||
body: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Req_Google
|
||||
*/
|
||||
export type ReqGoogle = {
|
||||
/**
|
||||
* Credential
|
||||
*
|
||||
* 구글 로그인 버튼이 준 ID 토큰
|
||||
*/
|
||||
credential: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Req_Login
|
||||
*/
|
||||
@@ -1229,6 +1294,13 @@ export type ReqRefresh = {
|
||||
refresh_token: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Req_Report
|
||||
*/
|
||||
export type ReqReport = {
|
||||
reason: ReportReason;
|
||||
};
|
||||
|
||||
/**
|
||||
* Req_Signup
|
||||
*/
|
||||
@@ -1320,6 +1392,38 @@ export type ResAuth = {
|
||||
me?: Me | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Res_AuthConfig
|
||||
*/
|
||||
export type ResAuthConfig = {
|
||||
result?: ErrorInfo;
|
||||
/**
|
||||
* Msg
|
||||
*/
|
||||
msg?: string | null;
|
||||
/**
|
||||
* Google Client Id
|
||||
*
|
||||
* 구글 로그인 버튼에 쓸 OAuth 클라이언트 ID. 없으면 구글 로그인을 숨긴다
|
||||
*/
|
||||
google_client_id?: string | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Res_BlockedList
|
||||
*/
|
||||
export type ResBlockedList = {
|
||||
result?: ErrorInfo;
|
||||
/**
|
||||
* Msg
|
||||
*/
|
||||
msg?: string | null;
|
||||
/**
|
||||
* Users
|
||||
*/
|
||||
users?: Array<BlockedUser>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Res_Comment
|
||||
*/
|
||||
@@ -3487,6 +3591,47 @@ export type LoginResponses = {
|
||||
|
||||
export type LoginResponse = LoginResponses[keyof LoginResponses];
|
||||
|
||||
export type GoogleLoginData = {
|
||||
body: ReqGoogle;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/v1/auth/google';
|
||||
};
|
||||
|
||||
export type GoogleLoginErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type GoogleLoginError = GoogleLoginErrors[keyof GoogleLoginErrors];
|
||||
|
||||
export type GoogleLoginResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: ResAuth;
|
||||
};
|
||||
|
||||
export type GoogleLoginResponse = GoogleLoginResponses[keyof GoogleLoginResponses];
|
||||
|
||||
export type AuthConfigData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/v1/auth/config';
|
||||
};
|
||||
|
||||
export type AuthConfigResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: ResAuthConfig;
|
||||
};
|
||||
|
||||
export type AuthConfigResponse = AuthConfigResponses[keyof AuthConfigResponses];
|
||||
|
||||
export type RefreshData = {
|
||||
body: ReqRefresh;
|
||||
path?: never;
|
||||
@@ -3636,6 +3781,37 @@ export type UpdateMeResponses = {
|
||||
|
||||
export type UpdateMeResponse = UpdateMeResponses[keyof UpdateMeResponses];
|
||||
|
||||
export type AgreeTermsData = {
|
||||
body?: never;
|
||||
headers?: {
|
||||
/**
|
||||
* Authorization
|
||||
*/
|
||||
authorization?: string | null;
|
||||
};
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/v1/auth/terms';
|
||||
};
|
||||
|
||||
export type AgreeTermsErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type AgreeTermsError = AgreeTermsErrors[keyof AgreeTermsErrors];
|
||||
|
||||
export type AgreeTermsResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: ResMe;
|
||||
};
|
||||
|
||||
export type AgreeTermsResponse = AgreeTermsResponses[keyof AgreeTermsResponses];
|
||||
|
||||
export type UnlikePostData = {
|
||||
body?: never;
|
||||
headers?: {
|
||||
@@ -4001,6 +4177,145 @@ export type LikeCommentResponses = {
|
||||
|
||||
export type LikeCommentResponse = LikeCommentResponses[keyof LikeCommentResponses];
|
||||
|
||||
export type ReportCommentData = {
|
||||
body: ReqReport;
|
||||
headers?: {
|
||||
/**
|
||||
* Authorization
|
||||
*/
|
||||
authorization?: string | null;
|
||||
};
|
||||
path: {
|
||||
/**
|
||||
* Comment Id
|
||||
*/
|
||||
comment_id: number;
|
||||
};
|
||||
query?: never;
|
||||
url: '/v1/reaction/comment/{comment_id}/report';
|
||||
};
|
||||
|
||||
export type ReportCommentErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type ReportCommentError = ReportCommentErrors[keyof ReportCommentErrors];
|
||||
|
||||
export type ReportCommentResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: ResWebPacketProtocol;
|
||||
};
|
||||
|
||||
export type ReportCommentResponse = ReportCommentResponses[keyof ReportCommentResponses];
|
||||
|
||||
export type BlockAuthorData = {
|
||||
body?: never;
|
||||
headers?: {
|
||||
/**
|
||||
* Authorization
|
||||
*/
|
||||
authorization?: string | null;
|
||||
};
|
||||
path: {
|
||||
/**
|
||||
* Comment Id
|
||||
*/
|
||||
comment_id: number;
|
||||
};
|
||||
query?: never;
|
||||
url: '/v1/reaction/comment/{comment_id}/block';
|
||||
};
|
||||
|
||||
export type BlockAuthorErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type BlockAuthorError = BlockAuthorErrors[keyof BlockAuthorErrors];
|
||||
|
||||
export type BlockAuthorResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: ResWebPacketProtocol;
|
||||
};
|
||||
|
||||
export type BlockAuthorResponse = BlockAuthorResponses[keyof BlockAuthorResponses];
|
||||
|
||||
export type ListBlockedData = {
|
||||
body?: never;
|
||||
headers?: {
|
||||
/**
|
||||
* Authorization
|
||||
*/
|
||||
authorization?: string | null;
|
||||
};
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/v1/reaction/block/list';
|
||||
};
|
||||
|
||||
export type ListBlockedErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type ListBlockedError = ListBlockedErrors[keyof ListBlockedErrors];
|
||||
|
||||
export type ListBlockedResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: ResBlockedList;
|
||||
};
|
||||
|
||||
export type ListBlockedResponse = ListBlockedResponses[keyof ListBlockedResponses];
|
||||
|
||||
export type UnblockData = {
|
||||
body?: never;
|
||||
headers?: {
|
||||
/**
|
||||
* Authorization
|
||||
*/
|
||||
authorization?: string | null;
|
||||
};
|
||||
path: {
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id: string;
|
||||
};
|
||||
query?: never;
|
||||
url: '/v1/reaction/block/{user_id}';
|
||||
};
|
||||
|
||||
export type UnblockErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type UnblockError = UnblockErrors[keyof UnblockErrors];
|
||||
|
||||
export type UnblockResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: ResWebPacketProtocol;
|
||||
};
|
||||
|
||||
export type UnblockResponse = UnblockResponses[keyof UnblockResponses];
|
||||
|
||||
export type GetWatchSummaryData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
|
||||
Reference in new issue
Block a user