diff --git a/src/shared/api/generated/clinics/clinics.ts b/src/shared/api/generated/clinics/clinics.ts index 90ac042..5b9fd76 100644 --- a/src/shared/api/generated/clinics/clinics.ts +++ b/src/shared/api/generated/clinics/clinics.ts @@ -27,9 +27,7 @@ import type { ClinicCreate, ClinicCreateResponse, ClinicHistoryResponse, - ClinicListResponse, ClinicResponse, - GetClinicsParams, HTTPValidationError } from '../../model'; @@ -40,132 +38,6 @@ type SecondParameter unknown> = Parameters[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 => { - - return customFetcher(getGetClinicsUrl(params), - { - ...options, - method: 'GET' - - - } -);} - - - - - -export const getGetClinicsQueryKey = (params?: GetClinicsParams,) => { - return [ - `/api/clinics`, ...(params ? [params]: []) - ] as const; - } - - -export const getGetClinicsQueryOptions = >, TError = HTTPValidationError>(params?: GetClinicsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} -) => { - -const {query: queryOptions, request: requestOptions} = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetClinicsQueryKey(params); - - - - const queryFn: QueryFunction>> = () => getClinics(params, requestOptions); - - - - - - return { queryKey, queryFn, staleTime: 60000, ...queryOptions} as UseQueryOptions>, TError, TData> & { queryKey: DataTag } -} - -export type GetClinicsQueryResult = NonNullable>> -export type GetClinicsQueryError = HTTPValidationError - - -export function useGetClinics>, TError = HTTPValidationError>( - params: undefined | GetClinicsParams, options: { query:Partial>, TError, TData>> & Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - > , 'initialData' - >, request?: SecondParameter} - , queryClient?: QueryClient - ): DefinedUseQueryResult & { queryKey: DataTag } -export function useGetClinics>, TError = HTTPValidationError>( - params?: GetClinicsParams, options?: { query?:Partial>, TError, TData>> & Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - > , 'initialData' - >, request?: SecondParameter} - , queryClient?: QueryClient - ): UseQueryResult & { queryKey: DataTag } -export function useGetClinics>, TError = HTTPValidationError>( - params?: GetClinicsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} - , queryClient?: QueryClient - ): UseQueryResult & { queryKey: DataTag } -/** - * @summary Get Clinics - */ - -export function useGetClinics>, TError = HTTPValidationError>( - params?: GetClinicsParams, options?: { query?:Partial>, TError, TData>>, request?: SecondParameter} - , queryClient?: QueryClient - ): UseQueryResult & { queryKey: DataTag } { - - const queryOptions = getGetClinicsQueryOptions(params,options) - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { queryKey: DataTag }; - - query.queryKey = queryOptions.queryKey ; - - return query; -} - - - - /** * @summary Create Clinic */ diff --git a/src/shared/api/model/channelBrandingRuleCurrentStatus.ts b/src/shared/api/model/channelBrandingRuleCurrentStatus.ts index 9d8c05c..52c7789 100644 --- a/src/shared/api/model/channelBrandingRuleCurrentStatus.ts +++ b/src/shared/api/model/channelBrandingRuleCurrentStatus.ts @@ -12,5 +12,5 @@ export type ChannelBrandingRuleCurrentStatus = typeof ChannelBrandingRuleCurrent export const ChannelBrandingRuleCurrentStatus = { correct: 'correct', incorrect: 'incorrect', - missing: 'missing', + 'N/A': 'N/A', } as const; diff --git a/src/shared/api/model/channels.ts b/src/shared/api/model/channels.ts index 25f1e96..6e44866 100644 --- a/src/shared/api/model/channels.ts +++ b/src/shared/api/model/channels.ts @@ -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; } diff --git a/src/shared/api/model/clinicListItemRoadAddress.ts b/src/shared/api/model/channelsFacebookEn.ts similarity index 66% rename from src/shared/api/model/clinicListItemRoadAddress.ts rename to src/shared/api/model/channelsFacebookEn.ts index ff9dd5d..95cb109 100644 --- a/src/shared/api/model/clinicListItemRoadAddress.ts +++ b/src/shared/api/model/channelsFacebookEn.ts @@ -5,4 +5,4 @@ * OpenAPI spec version: 0.1.0 */ -export type ClinicListItemRoadAddress = string | null; +export type ChannelsFacebookEn = string | null; diff --git a/src/shared/api/model/clinicListItemHospitalNameEn.ts b/src/shared/api/model/channelsInstagramEn.ts similarity index 65% rename from src/shared/api/model/clinicListItemHospitalNameEn.ts rename to src/shared/api/model/channelsInstagramEn.ts index 83953ae..ff50596 100644 --- a/src/shared/api/model/clinicListItemHospitalNameEn.ts +++ b/src/shared/api/model/channelsInstagramEn.ts @@ -5,4 +5,4 @@ * OpenAPI spec version: 0.1.0 */ -export type ClinicListItemHospitalNameEn = string | null; +export type ChannelsInstagramEn = string | null; diff --git a/src/shared/api/model/clinicListItemUrl.ts b/src/shared/api/model/channelsKakaoTalk.ts similarity index 70% rename from src/shared/api/model/clinicListItemUrl.ts rename to src/shared/api/model/channelsKakaoTalk.ts index d22f813..ce47b74 100644 --- a/src/shared/api/model/clinicListItemUrl.ts +++ b/src/shared/api/model/channelsKakaoTalk.ts @@ -5,4 +5,4 @@ * OpenAPI spec version: 0.1.0 */ -export type ClinicListItemUrl = string | null; +export type ChannelsKakaoTalk = string | null; diff --git a/src/shared/api/model/getClinicsParams.ts b/src/shared/api/model/channelsNaverCafe.ts similarity index 61% rename from src/shared/api/model/getClinicsParams.ts rename to src/shared/api/model/channelsNaverCafe.ts index b8c3608..d9e9f1a 100644 --- a/src/shared/api/model/getClinicsParams.ts +++ b/src/shared/api/model/channelsNaverCafe.ts @@ -5,7 +5,4 @@ * OpenAPI spec version: 0.1.0 */ -export type GetClinicsParams = { -limit?: number; -offset?: number; -}; +export type ChannelsNaverCafe = string | null; diff --git a/src/shared/api/model/channelsTiktok.ts b/src/shared/api/model/channelsTiktok.ts new file mode 100644 index 0000000..1a88693 --- /dev/null +++ b/src/shared/api/model/channelsTiktok.ts @@ -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; diff --git a/src/shared/api/model/clinicListItem.ts b/src/shared/api/model/clinicListItem.ts deleted file mode 100644 index fee02b5..0000000 --- a/src/shared/api/model/clinicListItem.ts +++ /dev/null @@ -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; -} diff --git a/src/shared/api/model/clinicListResponse.ts b/src/shared/api/model/clinicListResponse.ts deleted file mode 100644 index 2415476..0000000 --- a/src/shared/api/model/clinicListResponse.ts +++ /dev/null @@ -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; -} diff --git a/src/shared/api/model/index.ts b/src/shared/api/model/index.ts index 12185b3..9b6b596 100644 --- a/src/shared/api/model/index.ts +++ b/src/shared/api/model/index.ts @@ -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';