chore(api): orval 재생성 — 채널 5종(tiktok·instagram_en·facebook_en·kakao_talk·naver_cafe) 추가, clinic list 엔드포인트 제거, missing→N/A

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
main
Mina Choi 2026-05-29 10:49:53 +09:00
parent 046d36302a
commit 2db78e6bec
11 changed files with 28 additions and 174 deletions

View File

@ -27,9 +27,7 @@ import type {
ClinicCreate,
ClinicCreateResponse,
ClinicHistoryResponse,
ClinicListResponse,
ClinicResponse,
GetClinicsParams,
HTTPValidationError
} from '../../model';
@ -40,132 +38,6 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
/**
* @summary Get Clinics
*/
export type getClinicsResponse200 = {
data: ClinicListResponse
status: 200
}
export type getClinicsResponse422 = {
data: HTTPValidationError
status: 422
}
export type getClinicsResponseSuccess = (getClinicsResponse200) & {
headers: Headers;
};
export type getClinicsResponseError = (getClinicsResponse422) & {
headers: Headers;
};
export type getClinicsResponse = (getClinicsResponseSuccess | getClinicsResponseError)
export const getGetClinicsUrl = (params?: GetClinicsParams,) => {
const normalizedParams = new URLSearchParams();
Object.entries(params || {}).forEach(([key, value]) => {
if (value !== undefined) {
normalizedParams.append(key, value === null ? 'null' : value.toString())
}
});
const stringifiedParams = normalizedParams.toString();
return stringifiedParams.length > 0 ? `/api/clinics?${stringifiedParams}` : `/api/clinics`
}
export const getClinics = async (params?: GetClinicsParams, options?: RequestInit): Promise<getClinicsResponse> => {
return customFetcher<getClinicsResponse>(getGetClinicsUrl(params),
{
...options,
method: 'GET'
}
);}
export const getGetClinicsQueryKey = (params?: GetClinicsParams,) => {
return [
`/api/clinics`, ...(params ? [params]: [])
] as const;
}
export const getGetClinicsQueryOptions = <TData = Awaited<ReturnType<typeof getClinics>>, TError = HTTPValidationError>(params?: GetClinicsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getClinics>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
) => {
const {query: queryOptions, request: requestOptions} = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetClinicsQueryKey(params);
const queryFn: QueryFunction<Awaited<ReturnType<typeof getClinics>>> = () => getClinics(params, requestOptions);
return { queryKey, queryFn, staleTime: 60000, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getClinics>>, TError, TData> & { queryKey: DataTag<QueryKey, TData> }
}
export type GetClinicsQueryResult = NonNullable<Awaited<ReturnType<typeof getClinics>>>
export type GetClinicsQueryError = HTTPValidationError
export function useGetClinics<TData = Awaited<ReturnType<typeof getClinics>>, TError = HTTPValidationError>(
params: undefined | GetClinicsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getClinics>>, TError, TData>> & Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof getClinics>>,
TError,
Awaited<ReturnType<typeof getClinics>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useGetClinics<TData = Awaited<ReturnType<typeof getClinics>>, TError = HTTPValidationError>(
params?: GetClinicsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getClinics>>, TError, TData>> & Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof getClinics>>,
TError,
Awaited<ReturnType<typeof getClinics>>
> , 'initialData'
>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
export function useGetClinics<TData = Awaited<ReturnType<typeof getClinics>>, TError = HTTPValidationError>(
params?: GetClinicsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getClinics>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> }
/**
* @summary Get Clinics
*/
export function useGetClinics<TData = Awaited<ReturnType<typeof getClinics>>, TError = HTTPValidationError>(
params?: GetClinicsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getClinics>>, TError, TData>>, request?: SecondParameter<typeof customFetcher>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {
const queryOptions = getGetClinicsQueryOptions(params,options)
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };
query.queryKey = queryOptions.queryKey ;
return query;
}
/**
* @summary Create Clinic
*/

View File

@ -12,5 +12,5 @@ export type ChannelBrandingRuleCurrentStatus = typeof ChannelBrandingRuleCurrent
export const ChannelBrandingRuleCurrentStatus = {
correct: 'correct',
incorrect: 'incorrect',
missing: 'missing',
'N/A': 'N/A',
} as const;

View File

@ -9,6 +9,11 @@ import type { ChannelsInstagram } from './channelsInstagram';
import type { ChannelsFacebook } from './channelsFacebook';
import type { ChannelsNaverBlog } from './channelsNaverBlog';
import type { ChannelsGangnamUnni } from './channelsGangnamUnni';
import type { ChannelsTiktok } from './channelsTiktok';
import type { ChannelsInstagramEn } from './channelsInstagramEn';
import type { ChannelsFacebookEn } from './channelsFacebookEn';
import type { ChannelsKakaoTalk } from './channelsKakaoTalk';
import type { ChannelsNaverCafe } from './channelsNaverCafe';
export interface Channels {
youtube?: ChannelsYoutube;
@ -16,4 +21,9 @@ export interface Channels {
facebook?: ChannelsFacebook;
naver_blog?: ChannelsNaverBlog;
gangnam_unni?: ChannelsGangnamUnni;
tiktok?: ChannelsTiktok;
instagram_en?: ChannelsInstagramEn;
facebook_en?: ChannelsFacebookEn;
kakao_talk?: ChannelsKakaoTalk;
naver_cafe?: ChannelsNaverCafe;
}

View File

@ -5,4 +5,4 @@
* OpenAPI spec version: 0.1.0
*/
export type ClinicListItemRoadAddress = string | null;
export type ChannelsFacebookEn = string | null;

View File

@ -5,4 +5,4 @@
* OpenAPI spec version: 0.1.0
*/
export type ClinicListItemHospitalNameEn = string | null;
export type ChannelsInstagramEn = string | null;

View File

@ -5,4 +5,4 @@
* OpenAPI spec version: 0.1.0
*/
export type ClinicListItemUrl = string | null;
export type ChannelsKakaoTalk = string | null;

View File

@ -5,7 +5,4 @@
* OpenAPI spec version: 0.1.0
*/
export type GetClinicsParams = {
limit?: number;
offset?: number;
};
export type ChannelsNaverCafe = string | null;

View File

@ -0,0 +1,8 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
export type ChannelsTiktok = string | null;

View File

@ -1,20 +0,0 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ClinicListItemHospitalNameEn } from './clinicListItemHospitalNameEn';
import type { ClinicListItemRoadAddress } from './clinicListItemRoadAddress';
import type { ClinicListItemUrl } from './clinicListItemUrl';
export interface ClinicListItem {
hospital_id: string;
hospital_name: string;
hospital_name_en: ClinicListItemHospitalNameEn;
road_address: ClinicListItemRoadAddress;
url: ClinicListItemUrl;
status: string;
created_at: string;
updated_at: string;
}

View File

@ -1,12 +0,0 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* FastAPI
* OpenAPI spec version: 0.1.0
*/
import type { ClinicListItem } from './clinicListItem';
export interface ClinicListResponse {
items: ClinicListItem[];
total: number;
}

View File

@ -46,19 +46,19 @@ export * from './channelStrategyCardCustomerJourneyStage';
export * from './channelStrategyCardPriority';
export * from './channels';
export * from './channelsFacebook';
export * from './channelsFacebookEn';
export * from './channelsGangnamUnni';
export * from './channelsInstagram';
export * from './channelsInstagramEn';
export * from './channelsKakaoTalk';
export * from './channelsNaverBlog';
export * from './channelsNaverCafe';
export * from './channelsTiktok';
export * from './channelsYoutube';
export * from './clinicCreate';
export * from './clinicCreateResponse';
export * from './clinicHistoryResponse';
export * from './clinicHistoryResponseMetricsTimeseries';
export * from './clinicListItem';
export * from './clinicListItemHospitalNameEn';
export * from './clinicListItemRoadAddress';
export * from './clinicListItemUrl';
export * from './clinicListResponse';
export * from './clinicResponse';
export * from './clinicResponseHospitalNameEn';
export * from './clinicResponseRawData';
@ -91,7 +91,6 @@ export * from './fileType';
export * from './fileUploadResponse';
export * from './fileUploadResponseSizeBytes';
export * from './fontSpec';
export * from './getClinicsParams';
export * from './hTTPValidationError';
export * from './instagramAccount';
export * from './instagramAudit';