Compare commits
12
Commits
d736e1ef77
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5839001e82 | ||
|
|
ea7b21dee3 | ||
|
|
b4691b029a | ||
|
|
4f6c30e249 | ||
|
|
03c3c7ab21 | ||
|
|
156dad59dc | ||
|
|
2db78e6bec | ||
|
|
046d36302a | ||
|
|
f74e74a45b | ||
|
|
bf90e8d242 | ||
|
|
68bb1d62cd | ||
|
|
da07bdc8c8 |
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
* /test 페이지 + 향후 E2E·부하 테스트용 목업 병원 URL 데이터.
|
* /test 페이지 + 향후 E2E·부하 테스트용 목업 병원 URL 데이터.
|
||||||
*
|
*
|
||||||
* 7개 채널: homepage, youtube, instagram, facebook, naverPlace, naverBlog, gangnamUnni
|
* 7개 채널: homepage, youtube, instagram, facebook, naverPlace, naverBlog, gangnamUnni
|
||||||
* 빈 채널은 분석에서 제외됨. naverPlace는 수동 확인 필요(숫자 ID 기반).
|
* 빈 채널은 분석에서 제외됨.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export interface ChannelUrls {
|
export interface ChannelUrls {
|
||||||
@@ -24,121 +24,109 @@ export const CLINICS: ClinicFixture[] = [
|
|||||||
{
|
{
|
||||||
label: '뷰성형외과',
|
label: '뷰성형외과',
|
||||||
urls: {
|
urls: {
|
||||||
homepage: 'viewclinic.com',
|
homepage: 'https://www.viewclinic.com',
|
||||||
youtube: 'youtube.com/channel/UCQqqH3Klj2HQSHNNSVug-CQ',
|
youtube: 'https://www.youtube.com/@ViewclinicKR',
|
||||||
instagram: 'instagram.com/viewplastic',
|
instagram: 'https://www.instagram.com/viewplastic/',
|
||||||
facebook: 'facebook.com/viewps1',
|
facebook: 'https://www.facebook.com/viewps1/',
|
||||||
naverPlace: 'https://naver.me/x9BxGXkK',
|
naverPlace: 'https://m.place.naver.com/hospital/11709005',
|
||||||
naverBlog: 'blog.naver.com/viewclinicps',
|
naverBlog: 'https://blog.naver.com/viewclinicps',
|
||||||
gangnamUnni: 'gangnamunni.com/hospitals/189',
|
gangnamUnni: 'https://www.gangnamunni.com/hospitals/189',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '바노바기성형외과',
|
label: '바노바기성형외과',
|
||||||
urls: {
|
urls: {
|
||||||
homepage: 'banobagi.com',
|
homepage: 'https://www.banobagi.com',
|
||||||
youtube: 'youtube.com/c/banobagips',
|
youtube: 'https://www.youtube.com/c/banobagips',
|
||||||
instagram: 'instagram.com/banobagi_ps',
|
instagram: 'https://www.instagram.com/banobagi_ps/',
|
||||||
facebook: 'facebook.com/BanobagiPlasticSurgery',
|
facebook: 'https://www.facebook.com/BanobagiPlasticSurgery',
|
||||||
naverPlace: 'https://naver.me/xxY2yLr5',
|
naverPlace: 'https://m.place.naver.com/hospital/21033469',
|
||||||
naverBlog: 'blog.naver.com/banobagiprs',
|
naverBlog: 'https://blog.naver.com/banobagips',
|
||||||
gangnamUnni: 'gangnamunni.com/hospitals/23',
|
gangnamUnni: 'https://www.gangnamunni.com/hospitals/23',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'ID 성형외과',
|
label: '아이디병원',
|
||||||
urls: {
|
urls: {
|
||||||
homepage: 'idhospital.com',
|
homepage: 'https://www.idhospital.com',
|
||||||
youtube: 'youtube.com/user/IDhospital',
|
youtube: 'https://www.youtube.com/user/IDhospital',
|
||||||
instagram: 'instagram.com/idhospital',
|
instagram: 'https://www.instagram.com/idhospital',
|
||||||
facebook: 'facebook.com/idhospital0050',
|
facebook: 'https://www.facebook.com/idhospital0050',
|
||||||
naverPlace: 'https://naver.me/GtURpCEn',
|
naverPlace: 'https://m.place.naver.com/hospital/11548359',
|
||||||
naverBlog: '',
|
naverBlog: 'https://blog.naver.com/idfacial',
|
||||||
gangnamUnni: 'gangnamunni.com/hospitals/257',
|
gangnamUnni: 'https://www.gangnamunni.com/hospitals/257',
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'JK 성형외과',
|
|
||||||
urls: {
|
|
||||||
homepage: 'jkplastic.com',
|
|
||||||
youtube: 'youtube.com/channel/UC5F8dEt32hdp3cTeFyls4qg',
|
|
||||||
instagram: 'instagram.com/jkplasticsurgery_kr',
|
|
||||||
facebook: 'facebook.com/jkmedicalgroup',
|
|
||||||
naverPlace: 'https://naver.me/x67y6cAc',
|
|
||||||
naverBlog: 'blog.naver.com/jkstory1',
|
|
||||||
gangnamUnni: 'gangnamunni.com/hospitals/858',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '그랜드성형외과',
|
label: '그랜드성형외과',
|
||||||
urls: {
|
urls: {
|
||||||
homepage: 'grandsurgery.com',
|
homepage: 'https://www.grandsurgery.com',
|
||||||
youtube: 'youtube.com/channel/UCU2o_aHqsNFuqwtdzVM3xbQ',
|
youtube: 'https://www.youtube.com/channel/UCU2o_aHqsNFuqwtdzVM3xbQ',
|
||||||
instagram: 'instagram.com/grand_korea',
|
instagram: 'https://www.instagram.com/grand_korea/',
|
||||||
facebook: 'facebook.com/grandps.korea',
|
facebook: 'https://www.facebook.com/grandps.korea',
|
||||||
naverPlace: 'https://naver.me/Fw7MYKWK',
|
naverPlace: 'https://m.place.naver.com/hospital/12322994',
|
||||||
naverBlog: 'blog.naver.com/grandprs',
|
naverBlog: 'https://blog.naver.com/grandprs',
|
||||||
gangnamUnni: 'gangnamunni.com/hospitals/62',
|
gangnamUnni: 'https://www.gangnamunni.com/hospitals/62',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'BK 성형외과',
|
label: '원진성형외과',
|
||||||
urls: {
|
urls: {
|
||||||
homepage: 'bkhospital.com',
|
homepage: 'https://www.k-wonjin.co.kr',
|
||||||
youtube: 'youtube.com/channel/UChJONft3hemy5DGbXUveTFg',
|
youtube: 'https://www.youtube.com/@wjwonjin',
|
||||||
instagram: 'instagram.com/bkhospital_korea',
|
instagram: 'https://www.instagram.com/wonjin_official/',
|
||||||
facebook: '',
|
facebook: 'https://www.facebook.com/KwonjinPS',
|
||||||
naverPlace: 'https://naver.me/517CTH3W',
|
naverPlace: 'https://m.place.naver.com/hospital/11887873',
|
||||||
naverBlog: '',
|
naverBlog: 'https://blog.naver.com/popokpop',
|
||||||
gangnamUnni: '',
|
gangnamUnni: 'https://www.gangnamunni.com/hospitals/2500',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '톡스앤필',
|
label: '디에이성형외과',
|
||||||
urls: {
|
urls: {
|
||||||
homepage: 'toxnfill.com',
|
homepage: 'https://daprs.com',
|
||||||
youtube: 'youtube.com/channel/UCFpFZkm7mclD-z_-j7FTUag',
|
youtube: 'https://www.youtube.com/channel/UC0wlA-w5JIt0G0EeWQf65AQ',
|
||||||
instagram: 'instagram.com/toxnfill_official',
|
instagram: 'https://www.instagram.com/da_plastic_surgery',
|
||||||
facebook: 'facebook.com/toxnfill.official',
|
facebook: 'https://www.facebook.com/daprs/',
|
||||||
naverPlace: 'https://naver.me/FvEmJIHA',
|
naverPlace: 'https://m.place.naver.com/hospital/33084820',
|
||||||
naverBlog: 'blog.naver.com/toxnfill',
|
naverBlog: 'https://blog.naver.com/daprs',
|
||||||
gangnamUnni: 'gangnamunni.com/hospitals/3702',
|
gangnamUnni: 'https://www.gangnamunni.com/hospitals/250',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '더 압구정 성형외과',
|
label: '노트성형외과',
|
||||||
urls: {
|
urls: {
|
||||||
homepage: 'theclinic.co.kr',
|
homepage: 'http://notebreast.com',
|
||||||
youtube: 'youtube.com/user/theplasticsurgery1',
|
youtube: 'https://www.youtube.com/channel/UC2OIyb2serotqDyEzQYyCtA',
|
||||||
instagram: 'instagram.com/the_plasticsurgery',
|
instagram: 'https://www.instagram.com/note.prs/',
|
||||||
facebook: 'facebook.com/THEPS16445998',
|
facebook: 'https://www.facebook.com/noteprs2/',
|
||||||
naverPlace: '',
|
naverPlace: 'https://m.place.naver.com/hospital/1572670484',
|
||||||
naverBlog: 'blog.naver.com/with_theps',
|
naverBlog: 'https://blog.naver.com/noteprs01',
|
||||||
gangnamUnni: 'gangnamunni.com/hospitals/30',
|
gangnamUnni: 'https://www.gangnamunni.com/hospitals/2186',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '라마르 성형외과',
|
label: '에이비성형외과',
|
||||||
urls: {
|
urls: {
|
||||||
homepage: 'lamarps.com',
|
homepage: 'https://www.abps.co.kr',
|
||||||
youtube: '',
|
youtube: 'https://www.youtube.com/@abplasticsurgery',
|
||||||
instagram: '',
|
instagram: 'https://www.instagram.com/ab_plasticsurgery_kr/',
|
||||||
facebook: '',
|
facebook: 'https://www.facebook.com/profile.php?id=100063560996454',
|
||||||
naverPlace: '',
|
naverPlace: 'https://m.place.naver.com/hospital/1304260302',
|
||||||
naverBlog: '',
|
naverBlog: 'https://blog.naver.com/abps20',
|
||||||
gangnamUnni: '',
|
gangnamUnni: 'https://www.gangnamunni.com/hospitals/3004',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '오라클 성형외과',
|
label: '제이준성형외과',
|
||||||
urls: {
|
urls: {
|
||||||
homepage: 'oracleclinic.com',
|
homepage: 'http://www.jjprs.com',
|
||||||
youtube: 'youtube.com/@oracle_medical_group',
|
youtube: 'https://www.youtube.com/channel/UC1p4msJnetDKeOW-B4nlwZA',
|
||||||
instagram: 'instagram.com/oraclemedicalgroup',
|
instagram: 'https://www.instagram.com/jayjunps/',
|
||||||
facebook: 'facebook.com/oracleclinickr',
|
facebook: 'https://www.facebook.com/jayjunps',
|
||||||
naverPlace: 'https://naver.me/GhbU3VtK',
|
naverPlace: 'https://m.place.naver.com/hospital/36294945',
|
||||||
naverBlog: '',
|
naverBlog: 'https://blog.naver.com/gusrlf00',
|
||||||
gangnamUnni: 'gangnamunni.com/hospitals/125',
|
gangnamUnni: 'https://www.gangnamunni.com/hospitals/139',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -1,159 +0,0 @@
|
|||||||
/**
|
|
||||||
* Dev: 클리닉 리스트 페이지.
|
|
||||||
*
|
|
||||||
* 백엔드 `GET /api/clinics` (getClinics) 응답을 표로 확인하는 개발용 화면.
|
|
||||||
* 운영 도메인 노출 방지는 라우트 단의 DevOnly 가드에 위임.
|
|
||||||
*/
|
|
||||||
import { useState } from 'react';
|
|
||||||
import { Link } from 'react-router';
|
|
||||||
import { useGetClinics } from '@/shared/api/generated/clinics/clinics';
|
|
||||||
import { PageContainer } from '@/shared/ui/page-container';
|
|
||||||
import { Spinner } from '@/shared/ui/spinner';
|
|
||||||
import { EmptyState } from '@/shared/ui/empty-state';
|
|
||||||
import { Button } from '@/shared/ui/button';
|
|
||||||
|
|
||||||
const PAGE_SIZE = 50;
|
|
||||||
|
|
||||||
function formatDate(raw: string): string {
|
|
||||||
try {
|
|
||||||
return new Date(raw).toLocaleString('ko-KR', {
|
|
||||||
year: 'numeric',
|
|
||||||
month: '2-digit',
|
|
||||||
day: '2-digit',
|
|
||||||
hour: '2-digit',
|
|
||||||
minute: '2-digit',
|
|
||||||
});
|
|
||||||
} catch {
|
|
||||||
return raw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function ClinicsPage() {
|
|
||||||
const [offset, setOffset] = useState(0);
|
|
||||||
|
|
||||||
const { data, isLoading, error, refetch, isFetching } = useGetClinics(
|
|
||||||
{ limit: PAGE_SIZE, offset },
|
|
||||||
{ query: { staleTime: 0 } },
|
|
||||||
);
|
|
||||||
|
|
||||||
const items = data?.status === 200 ? data.data.items : [];
|
|
||||||
const total = data?.status === 200 ? data.data.total : 0;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="pt-20 pb-16">
|
|
||||||
<PageContainer>
|
|
||||||
<header className="flex items-end justify-between mb-6 gap-4">
|
|
||||||
<div>
|
|
||||||
<p className="text-xs font-semibold text-[#6C5CE7] tracking-widest uppercase mb-2">
|
|
||||||
Dev · Clinics
|
|
||||||
</p>
|
|
||||||
<h1 className="font-serif text-3xl font-bold text-[#0A1128]">
|
|
||||||
클리닉 리스트
|
|
||||||
</h1>
|
|
||||||
<p className="text-sm text-slate-500 mt-1">
|
|
||||||
GET /api/clinics · limit={PAGE_SIZE} · offset={offset} · total={total}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<Button
|
|
||||||
variant="outline"
|
|
||||||
size="sm"
|
|
||||||
onClick={() => refetch()}
|
|
||||||
disabled={isFetching}
|
|
||||||
>
|
|
||||||
{isFetching ? <Spinner size="xs" /> : null}
|
|
||||||
새로고침
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{isLoading ? (
|
|
||||||
<div className="flex items-center justify-center py-20">
|
|
||||||
<Spinner size="lg" className="text-[#6C5CE7]" />
|
|
||||||
</div>
|
|
||||||
) : error ? (
|
|
||||||
<div className="rounded-xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700">
|
|
||||||
클리닉 리스트 조회 실패: {String((error as Error)?.message ?? error)}
|
|
||||||
</div>
|
|
||||||
) : items.length === 0 ? (
|
|
||||||
<EmptyState size="lg" hint="등록된 클리닉이 없습니다." />
|
|
||||||
) : (
|
|
||||||
<div className="overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-[3px_4px_12px_rgba(0,0,0,0.04)]">
|
|
||||||
<table className="w-full text-sm">
|
|
||||||
<thead className="bg-slate-50 text-slate-600">
|
|
||||||
<tr>
|
|
||||||
<th className="text-left px-4 py-3 font-medium">병원명</th>
|
|
||||||
<th className="text-left px-4 py-3 font-medium">EN</th>
|
|
||||||
<th className="text-left px-4 py-3 font-medium">상태</th>
|
|
||||||
<th className="text-left px-4 py-3 font-medium">URL</th>
|
|
||||||
<th className="text-left px-4 py-3 font-medium">주소</th>
|
|
||||||
<th className="text-left px-4 py-3 font-medium">생성일</th>
|
|
||||||
<th className="text-left px-4 py-3 font-medium font-mono text-xs">hospital_id</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody className="divide-y divide-slate-100">
|
|
||||||
{items.map((c) => (
|
|
||||||
<tr key={c.hospital_id} className="hover:bg-slate-50/50">
|
|
||||||
<td className="px-4 py-3 font-medium text-[#0A1128]">
|
|
||||||
<Link
|
|
||||||
to={`/clinics/${c.hospital_id}`}
|
|
||||||
className="text-[#0A1128] hover:text-[#6C5CE7] hover:underline"
|
|
||||||
>
|
|
||||||
{c.hospital_name}
|
|
||||||
</Link>
|
|
||||||
</td>
|
|
||||||
<td className="px-4 py-3 text-slate-600">{c.hospital_name_en ?? '—'}</td>
|
|
||||||
<td className="px-4 py-3">
|
|
||||||
<span className="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-slate-100 text-slate-700">
|
|
||||||
{c.status}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td className="px-4 py-3 text-slate-600 max-w-[240px] truncate">
|
|
||||||
{c.url ? (
|
|
||||||
<a
|
|
||||||
href={c.url}
|
|
||||||
target="_blank"
|
|
||||||
rel="noreferrer"
|
|
||||||
className="text-[#6C5CE7] hover:underline"
|
|
||||||
>
|
|
||||||
{c.url}
|
|
||||||
</a>
|
|
||||||
) : (
|
|
||||||
'—'
|
|
||||||
)}
|
|
||||||
</td>
|
|
||||||
<td className="px-4 py-3 text-slate-600 max-w-[260px] truncate">{c.road_address ?? '—'}</td>
|
|
||||||
<td className="px-4 py-3 text-slate-500 whitespace-nowrap">{formatDate(c.created_at)}</td>
|
|
||||||
<td className="px-4 py-3 font-mono text-xs text-slate-400">{c.hospital_id}</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="flex items-center justify-end gap-2 mt-4">
|
|
||||||
<span className="text-xs text-slate-500 mr-2">
|
|
||||||
{total > 0 ? `${offset + 1}-${Math.min(offset + items.length, total)} / ${total}` : ''}
|
|
||||||
</span>
|
|
||||||
<Button
|
|
||||||
variant="outline"
|
|
||||||
size="sm"
|
|
||||||
onClick={() => setOffset((o) => Math.max(0, o - PAGE_SIZE))}
|
|
||||||
disabled={offset === 0 || isFetching}
|
|
||||||
>
|
|
||||||
이전
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
variant="outline"
|
|
||||||
size="sm"
|
|
||||||
onClick={() => setOffset((o) => o + PAGE_SIZE)}
|
|
||||||
disabled={offset + items.length >= total || isFetching}
|
|
||||||
>
|
|
||||||
다음
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</PageContainer>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,24 +1,26 @@
|
|||||||
/**
|
/**
|
||||||
* /test — 랜덤 병원 fixture를 디폴트로 채워 분석 플로우를 빠르게 검증하는 dev 페이지.
|
* /test — 고정 병원 fixture 를 디폴트로 채워 분석 플로우를 빠르게 검증하는 dev 페이지.
|
||||||
*
|
*
|
||||||
* - 진입 시 CLINICS 중 1개를 랜덤 선택해 form prefill
|
* - 상단 칩 그룹으로 10개 fixture 중 선택 (디폴트 PINNED_LABEL)
|
||||||
* - "다른 병원 랜덤" 버튼으로 재선택 가능
|
* - 선택 변경 시 MultiChannelInput 을 `key` 로 강제 리마운트 → 깔끔 prefill
|
||||||
* - DevOnly 가드 아래 등록되어 localhost 에서만 접근
|
* - DevOnly 가드 아래 등록되어 localhost 에서만 접근
|
||||||
*/
|
*/
|
||||||
import { useMemo, useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useNavigate } from 'react-router'
|
import { useNavigate } from 'react-router'
|
||||||
import MultiChannelInput, { type AnalyzePayload } from '@/features/channels/components/MultiChannelInput'
|
import MultiChannelInput, { type AnalyzePayload } from '@/features/channels/components/MultiChannelInput'
|
||||||
import { CLINICS } from '../fixtures/mockUrls'
|
import { CLINICS } from '../fixtures/mockUrls'
|
||||||
|
|
||||||
function pickRandomIndex(): number {
|
const PINNED_LABEL = '뷰성형외과'
|
||||||
return Math.floor(Math.random() * CLINICS.length)
|
|
||||||
|
function pickInitialIndex(): number {
|
||||||
|
const i = CLINICS.findIndex((c) => c.label === PINNED_LABEL)
|
||||||
|
return i >= 0 ? i : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function TestPrefillPage() {
|
export default function TestPrefillPage() {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const [seed, setSeed] = useState(0)
|
const [selectedIdx, setSelectedIdx] = useState<number>(pickInitialIndex)
|
||||||
const index = useMemo(() => pickRandomIndex(), [seed])
|
const clinic = CLINICS[selectedIdx]
|
||||||
const clinic = CLINICS[index]
|
|
||||||
|
|
||||||
const handleAnalyze = (payload: AnalyzePayload) => {
|
const handleAnalyze = (payload: AnalyzePayload) => {
|
||||||
navigate('/report/loading', {
|
navigate('/report/loading', {
|
||||||
@@ -32,31 +34,42 @@ export default function TestPrefillPage() {
|
|||||||
return (
|
return (
|
||||||
<section className="min-h-screen pt-28 pb-12 px-6 bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50">
|
<section className="min-h-screen pt-28 pb-12 px-6 bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50">
|
||||||
<div className="max-w-4xl mx-auto">
|
<div className="max-w-4xl mx-auto">
|
||||||
<div className="mb-8 flex items-center justify-between gap-4">
|
<div className="mb-8">
|
||||||
<div>
|
|
||||||
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-amber-100 text-amber-800 text-xs font-medium mb-3">
|
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-amber-100 text-amber-800 text-xs font-medium mb-3">
|
||||||
DEV · /test
|
DEV · /test
|
||||||
</div>
|
</div>
|
||||||
<h1 className="text-3xl font-bold text-primary-900">
|
<h1 className="text-3xl font-bold text-primary-900">
|
||||||
랜덤 병원 분석 테스트
|
prefill 테스트
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-2 text-sm text-slate-600">
|
<p className="mt-2 text-sm text-slate-600">
|
||||||
선택된 병원: <span className="font-semibold text-primary-900">{clinic.label}</span>
|
병원을 선택하면 아래 입력 폼이 해당 fixture URL 로 자동 채워집니다.
|
||||||
{' '}<span className="text-slate-400">({index + 1} / {CLINICS.length})</span>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="mb-6 flex flex-wrap gap-2" role="tablist" aria-label="병원 fixture 선택">
|
||||||
|
{CLINICS.map((c, i) => {
|
||||||
|
const active = i === selectedIdx
|
||||||
|
return (
|
||||||
<button
|
<button
|
||||||
|
key={c.label}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setSeed((s) => s + 1)}
|
role="tab"
|
||||||
className="px-4 py-2 rounded-lg bg-white border border-slate-200 text-sm font-medium text-slate-700 hover:bg-slate-50 shadow-sm"
|
aria-selected={active}
|
||||||
|
onClick={() => setSelectedIdx(i)}
|
||||||
|
className={
|
||||||
|
active
|
||||||
|
? 'px-3 py-1.5 rounded-full text-xs font-medium bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-sm'
|
||||||
|
: 'px-3 py-1.5 rounded-full text-xs font-medium bg-white/80 backdrop-blur-sm text-slate-700 border border-slate-200 hover:border-slate-300 hover:bg-white transition'
|
||||||
|
}
|
||||||
>
|
>
|
||||||
다른 병원 랜덤
|
{c.label}
|
||||||
</button>
|
</button>
|
||||||
|
)
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* key={seed} 로 강제 remount — initialUrls는 mount 시점 1회만 반영되기 때문 */}
|
|
||||||
<MultiChannelInput
|
<MultiChannelInput
|
||||||
key={seed}
|
key={clinic.label}
|
||||||
variant="hero"
|
variant="hero"
|
||||||
initialUrls={clinic.urls}
|
initialUrls={clinic.urls}
|
||||||
onAnalyze={handleAnalyze}
|
onAnalyze={handleAnalyze}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { lazy } from 'react'
|
|||||||
import DevOnly from './components/DevOnly'
|
import DevOnly from './components/DevOnly'
|
||||||
|
|
||||||
const ComponentsPage = lazy(() => import('./pages/ComponentsPage'))
|
const ComponentsPage = lazy(() => import('./pages/ComponentsPage'))
|
||||||
const ClinicsPage = lazy(() => import('./pages/ClinicsPage'))
|
|
||||||
const TestPrefillPage = lazy(() => import('./pages/TestPrefillPage'))
|
const TestPrefillPage = lazy(() => import('./pages/TestPrefillPage'))
|
||||||
|
|
||||||
// `/dev/*` 와 `/test` 는 DevOnly 가드를 거쳐 로컬호스트에서만 접근 가능.
|
// `/dev/*` 와 `/test` 는 DevOnly 가드를 거쳐 로컬호스트에서만 접근 가능.
|
||||||
@@ -11,7 +10,6 @@ export const devRoutes = [
|
|||||||
element: <DevOnly />,
|
element: <DevOnly />,
|
||||||
children: [
|
children: [
|
||||||
{ path: 'dev/components', element: <ComponentsPage /> },
|
{ path: 'dev/components', element: <ComponentsPage /> },
|
||||||
{ path: 'dev/clinics', element: <ClinicsPage /> },
|
|
||||||
{ path: 'test', element: <TestPrefillPage /> },
|
{ path: 'test', element: <TestPrefillPage /> },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ export default function AssetCollection({ data }: AssetCollectionProps) {
|
|||||||
<h3 className="font-serif text-2xl font-bold text-brand-navy mb-4">
|
<h3 className="font-serif text-2xl font-bold text-brand-navy mb-4">
|
||||||
YouTube Top Videos for Repurposing
|
YouTube Top Videos for Repurposing
|
||||||
</h3>
|
</h3>
|
||||||
<div className="flex overflow-x-auto gap-4 pb-4 scrollbar-hide" style={{ scrollbarWidth: 'none' }}>
|
<div className="flex overflow-x-auto gap-4 pb-4">
|
||||||
{data.youtubeRepurpose.map((video, i) => (
|
{data.youtubeRepurpose.map((video, i) => (
|
||||||
<motion.div
|
<motion.div
|
||||||
key={video.title}
|
key={video.title}
|
||||||
|
|||||||
@@ -439,17 +439,23 @@ function BrandConsistencyTab({ inconsistencies }: { inconsistencies: BrandIncons
|
|||||||
onClick={() => setExpanded(expanded === i ? null : i)}
|
onClick={() => setExpanded(expanded === i ? null : i)}
|
||||||
className="w-full flex items-center justify-between p-5 h-auto text-left hover:bg-slate-50/50 rounded-none"
|
className="w-full flex items-center justify-between p-5 h-auto text-left hover:bg-slate-50/50 rounded-none"
|
||||||
>
|
>
|
||||||
|
{(() => {
|
||||||
|
const mismatchCount = item.values.filter((v) => !v.isCorrect).length;
|
||||||
|
const isAllConsistent = mismatchCount === 0;
|
||||||
|
return (
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<div className="w-8 h-8 rounded-lg bg-brand-navy flex items-center justify-center text-white text-xs font-bold">
|
<div className={`w-8 h-8 rounded-lg flex items-center justify-center text-white text-xs font-bold ${isAllConsistent ? 'bg-brand-purple-soft' : 'bg-brand-navy'}`}>
|
||||||
{item.values.filter((v) => !v.isCorrect).length}
|
{isAllConsistent ? <CheckFilled size={14} /> : mismatchCount}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="font-semibold text-brand-navy">{item.field}</p>
|
<p className="font-semibold text-brand-navy">{item.field}</p>
|
||||||
<p className="text-xs text-slate-500">
|
<p className="text-xs text-slate-500">
|
||||||
{item.values.filter((v) => !v.isCorrect).length}개 채널 불일치
|
{isAllConsistent ? '전 채널 일치' : `${mismatchCount}개 채널 불일치`}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
<ArrowRight
|
<ArrowRight
|
||||||
size={16}
|
size={16}
|
||||||
className={`text-slate-400 transition-transform ${
|
className={`text-slate-400 transition-transform ${
|
||||||
|
|||||||
@@ -201,17 +201,23 @@ function BrandConsistencyMap({ inconsistencies }: { inconsistencies: BrandIncons
|
|||||||
onClick={() => setExpanded(expanded === i ? null : i)}
|
onClick={() => setExpanded(expanded === i ? null : i)}
|
||||||
className="w-full flex items-center justify-between p-5 h-auto text-left hover:bg-slate-50/50 rounded-none"
|
className="w-full flex items-center justify-between p-5 h-auto text-left hover:bg-slate-50/50 rounded-none"
|
||||||
>
|
>
|
||||||
|
{(() => {
|
||||||
|
const mismatchCount = item.values.filter(v => !v.isCorrect).length;
|
||||||
|
const isAllConsistent = mismatchCount === 0;
|
||||||
|
return (
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<div className="w-8 h-8 rounded-lg bg-primary-900 flex items-center justify-center text-white text-xs font-bold">
|
<div className={`w-8 h-8 rounded-lg flex items-center justify-center text-white text-xs font-bold ${isAllConsistent ? 'bg-brand-purple-soft' : 'bg-primary-900'}`}>
|
||||||
{item.values.filter(v => !v.isCorrect).length}
|
{isAllConsistent ? <CheckCircle2 size={14} /> : mismatchCount}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="font-semibold text-brand-navy">{item.field}</p>
|
<p className="font-semibold text-brand-navy">{item.field}</p>
|
||||||
<p className="text-xs text-slate-500">
|
<p className="text-xs text-slate-500">
|
||||||
{item.values.filter(v => !v.isCorrect).length}개 채널 불일치
|
{isAllConsistent ? '전 채널 일치' : `${mismatchCount}개 채널 불일치`}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
<ArrowRight
|
<ArrowRight
|
||||||
size={16}
|
size={16}
|
||||||
className={`text-slate-400 transition-transform ${expanded === i ? 'rotate-90' : ''}`}
|
className={`text-slate-400 transition-transform ${expanded === i ? 'rotate-90' : ''}`}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { motion } from 'motion/react';
|
import { motion } from 'motion/react';
|
||||||
import { Instagram, AlertCircle, FileText, Users, Eye, ExternalLink } from 'lucide-react';
|
import { Instagram, ExternalLink } from 'lucide-react';
|
||||||
import { SectionWrapper } from './ui/SectionWrapper';
|
import { SectionWrapper } from './ui/SectionWrapper';
|
||||||
import { EmptyState } from './ui/EmptyState';
|
import { EmptyState } from './ui/EmptyState';
|
||||||
import { MetricCard } from './ui/MetricCard';
|
|
||||||
import { DiagnosisRow } from './ui/DiagnosisRow';
|
import { DiagnosisRow } from './ui/DiagnosisRow';
|
||||||
import type { InstagramAudit as InstagramAuditType, InstagramAccount } from '@/features/report/types/report';
|
import type { InstagramAudit as InstagramAuditType, InstagramAccount } from '@/features/report/types/report';
|
||||||
|
|
||||||
@@ -68,25 +67,12 @@ function AccountCard({ account, index }: { key?: string | number; account: Insta
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Format & reels */}
|
{/* Format */}
|
||||||
<div className="space-y-2 mb-4">
|
<div className="space-y-2 mb-4">
|
||||||
<div className="flex items-center justify-between text-sm">
|
<div className="flex items-center justify-between text-sm">
|
||||||
<span className="text-slate-500">콘텐츠 포맷</span>
|
<span className="text-slate-500">콘텐츠 포맷</span>
|
||||||
<span className="font-medium text-[#0A1128]">{account.contentFormat}</span>
|
<span className="font-medium text-[#0A1128]">{account.contentFormat}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-between text-sm">
|
|
||||||
<span className="text-slate-500">릴스 수</span>
|
|
||||||
<span className={`font-medium ${account.reelsCount === 0 ? 'text-[#7C3A4B]' : 'text-[#0A1128]'}`}>
|
|
||||||
{account.reelsCount === 0 ? (
|
|
||||||
<span className="inline-flex items-center gap-1">
|
|
||||||
<AlertCircle size={14} className="text-[#D4889A]" />
|
|
||||||
0 (미운영)
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
account.reelsCount
|
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Highlights */}
|
{/* Highlights */}
|
||||||
|
|||||||
@@ -86,13 +86,14 @@ export default function OtherChannels({ channels, website }: OtherChannelsProps)
|
|||||||
<div className="mt-2 space-y-1">
|
<div className="mt-2 space-y-1">
|
||||||
{website.additionalDomains.map((d) => (
|
{website.additionalDomains.map((d) => (
|
||||||
<p key={d.domain} className="text-sm text-slate-600">
|
<p key={d.domain} className="text-sm text-slate-600">
|
||||||
{d.domain} — <span className="text-slate-400">{d.purpose}</span>
|
{d.domain}
|
||||||
|
{d.purpose && <> — <span className="text-slate-400">{d.purpose}</span></>}
|
||||||
</p>
|
</p>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<p className="text-sm text-slate-500 mt-2">
|
<p className="text-sm text-slate-500 mt-2">
|
||||||
주요 CTA: <span className="font-medium text-[#0A1128]">{website.mainCTA}</span>
|
주요 CTA: <span className="font-medium text-[#0A1128]">{website.mainCta}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,24 @@ function nonEmpty<T>(arr: T[] | null | undefined): arr is T[] {
|
|||||||
return Array.isArray(arr) && arr.length > 0;
|
return Array.isArray(arr) && arr.length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hasClinicSnapshotData(s: MarketingReport['clinicSnapshot'] | null | undefined): boolean {
|
||||||
|
if (!s) return false;
|
||||||
|
return !!(
|
||||||
|
s.name ||
|
||||||
|
s.nameEn ||
|
||||||
|
s.location ||
|
||||||
|
s.phone ||
|
||||||
|
s.domain ||
|
||||||
|
s.established ||
|
||||||
|
(s.staffCount ?? 0) > 0 ||
|
||||||
|
(s.overallRating ?? 0) > 0 ||
|
||||||
|
(s.totalReviews ?? 0) > 0 ||
|
||||||
|
s.leadDoctor?.name ||
|
||||||
|
nonEmpty(s.certifications) ||
|
||||||
|
s.registryData
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export default function ReportBody({ data }: ReportBodyProps) {
|
export default function ReportBody({ data }: ReportBodyProps) {
|
||||||
// 각 audit에서 핸들 끌어와 헤더의 바로가기 버튼에 전달
|
// 각 audit에서 핸들 끌어와 헤더의 바로가기 버튼에 전달
|
||||||
const socialHandles = {
|
const socialHandles = {
|
||||||
@@ -56,7 +74,7 @@ export default function ReportBody({ data }: ReportBodyProps) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<SectionErrorBoundary>
|
<SectionErrorBoundary>
|
||||||
{hasValue(data.clinicSnapshot) && data.clinicSnapshot.name ? (
|
{hasClinicSnapshotData(data.clinicSnapshot) ? (
|
||||||
<ClinicSnapshot data={data.clinicSnapshot} targetUrl={data.targetUrl} socialHandles={socialHandles} />
|
<ClinicSnapshot data={data.clinicSnapshot} targetUrl={data.targetUrl} socialHandles={socialHandles} />
|
||||||
) : (
|
) : (
|
||||||
<EmptySection id="clinic-snapshot" title="Clinic Overview" subtitle="병원 기본 정보" />
|
<EmptySection id="clinic-snapshot" title="Clinic Overview" subtitle="병원 기본 정보" />
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { motion } from 'motion/react';
|
import { motion } from 'motion/react';
|
||||||
import { Youtube, Users, Video, Eye, TrendingUp, ExternalLink, Play } from 'lucide-react';
|
import { Youtube, Users, Video, Eye, TrendingUp, ExternalLink } from 'lucide-react';
|
||||||
import { SectionWrapper } from './ui/SectionWrapper';
|
import { SectionWrapper } from './ui/SectionWrapper';
|
||||||
import { EmptyState } from './ui/EmptyState';
|
import { EmptyState } from './ui/EmptyState';
|
||||||
import { MetricCard } from './ui/MetricCard';
|
import { MetricCard } from './ui/MetricCard';
|
||||||
@@ -33,7 +33,7 @@ export default function YouTubeAudit({ data }: YouTubeAuditProps) {
|
|||||||
label="구독자"
|
label="구독자"
|
||||||
value={formatNumber(data.subscribers)}
|
value={formatNumber(data.subscribers)}
|
||||||
icon={<Users size={20} />}
|
icon={<Users size={20} />}
|
||||||
subtext={data.subscriberRank}
|
subtext={data.subscriberRank ?? undefined}
|
||||||
/>
|
/>
|
||||||
<MetricCard
|
<MetricCard
|
||||||
label="총 영상 수"
|
label="총 영상 수"
|
||||||
@@ -45,13 +45,22 @@ export default function YouTubeAudit({ data }: YouTubeAuditProps) {
|
|||||||
value={formatNumber(data.totalViews)}
|
value={formatNumber(data.totalViews)}
|
||||||
icon={<Eye size={20} />}
|
icon={<Eye size={20} />}
|
||||||
/>
|
/>
|
||||||
|
{data.weeklyViewGrowth ? (
|
||||||
<MetricCard
|
<MetricCard
|
||||||
label="주간 성장"
|
label="주간 성장"
|
||||||
value={`+${formatNumber(data.weeklyViewGrowth.absolute)}`}
|
value={`${data.weeklyViewGrowth.absolute >= 0 ? '+' : ''}${formatNumber(data.weeklyViewGrowth.absolute)}`}
|
||||||
icon={<TrendingUp size={20} />}
|
icon={<TrendingUp size={20} />}
|
||||||
subtext={`${data.weeklyViewGrowth.percentage > 0 ? '+' : ''}${data.weeklyViewGrowth.percentage}%`}
|
subtext={`${data.weeklyViewGrowth.percentage > 0 ? '+' : ''}${data.weeklyViewGrowth.percentage}%`}
|
||||||
trend={data.weeklyViewGrowth.percentage > 0 ? 'up' : data.weeklyViewGrowth.percentage < 0 ? 'down' : 'neutral'}
|
trend={data.weeklyViewGrowth.percentage > 0 ? 'up' : data.weeklyViewGrowth.percentage < 0 ? 'down' : 'neutral'}
|
||||||
/>
|
/>
|
||||||
|
) : (
|
||||||
|
<MetricCard
|
||||||
|
label="주간 성장"
|
||||||
|
value="-"
|
||||||
|
icon={<TrendingUp size={20} />}
|
||||||
|
subtext="데이터 없음"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Channel info card */}
|
{/* Channel info card */}
|
||||||
@@ -86,8 +95,8 @@ export default function YouTubeAudit({ data }: YouTubeAuditProps) {
|
|||||||
<p className="text-sm text-slate-600 mb-4">{data.channelDescription}</p>
|
<p className="text-sm text-slate-600 mb-4">{data.channelDescription}</p>
|
||||||
<div className="flex flex-wrap gap-3 text-sm text-slate-500">
|
<div className="flex flex-wrap gap-3 text-sm text-slate-500">
|
||||||
<span>개설일: {data.channelCreatedDate}</span>
|
<span>개설일: {data.channelCreatedDate}</span>
|
||||||
<span>평균 영상 길이: {data.avgVideoLength}</span>
|
<span>평균 영상 길이: {data.avgVideoLength ?? '-'}</span>
|
||||||
<span>업로드 빈도: {data.uploadFrequency}</span>
|
<span>업로드 빈도: {data.uploadFrequency ?? '-'}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Linked URLs */}
|
{/* Linked URLs */}
|
||||||
@@ -123,9 +132,8 @@ export default function YouTubeAudit({ data }: YouTubeAuditProps) {
|
|||||||
{data.playlists.map((pl) => (
|
{data.playlists.map((pl) => (
|
||||||
<span
|
<span
|
||||||
key={pl}
|
key={pl}
|
||||||
className="inline-flex items-center gap-1.5 rounded-full bg-rose-50 border border-rose-200 px-3 py-1 text-sm font-medium text-rose-700"
|
className="rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 text-sm font-medium text-slate-700"
|
||||||
>
|
>
|
||||||
<Play size={12} className="text-rose-500 fill-rose-500" />
|
|
||||||
{pl}
|
{pl}
|
||||||
</span>
|
</span>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -82,6 +82,11 @@ export function useAnalysisPipeline(): UseAnalysisPipelineResult {
|
|||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const { reportId: urlReportId } = useParams<{ reportId?: string }>();
|
const { reportId: urlReportId } = useParams<{ reportId?: string }>();
|
||||||
|
|
||||||
|
// ?run_id= 쿼리로 진입하면 createClinic/startAnalysis 건너뛰고 폴링부터 시작.
|
||||||
|
// path 파라미터(/report/loading/:reportId) 와 동일 의미로 취급.
|
||||||
|
const queryRunId = new URLSearchParams(location.search).get('run_id');
|
||||||
|
const resumeRunId = urlReportId || queryRunId || undefined;
|
||||||
|
|
||||||
const locState = (location.state as { url?: string; manualChannels?: ManualChannels }) ?? {};
|
const locState = (location.state as { url?: string; manualChannels?: ManualChannels }) ?? {};
|
||||||
const url = locState.url;
|
const url = locState.url;
|
||||||
const manualChannels = locState.manualChannels;
|
const manualChannels = locState.manualChannels;
|
||||||
@@ -137,7 +142,9 @@ export function useAnalysisPipeline(): UseAnalysisPipelineResult {
|
|||||||
reportId = runId; // 백엔드: analysis_run_id 가 report 조회 키와 동일
|
reportId = runId; // 백엔드: analysis_run_id 가 report 조회 키와 동일
|
||||||
|
|
||||||
saveSession({ reportId, clinicId, runId, url: startUrl });
|
saveSession({ reportId, clinicId, runId, url: startUrl });
|
||||||
window.history.replaceState(null, '', `/report/loading/${reportId}`);
|
// 새로고침·공유 시 createClinic/startAnalysis 재호출 없이 폴링만 재개되도록
|
||||||
|
// run_id 를 쿼리 파라미터로 URL 에 박아둔다.
|
||||||
|
window.history.replaceState(null, '', `/report/loading?run_id=${reportId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!runId) throw new Error('runId 없음');
|
if (!runId) throw new Error('runId 없음');
|
||||||
@@ -203,17 +210,17 @@ export function useAnalysisPipeline(): UseAnalysisPipelineResult {
|
|||||||
if (hasStarted.current) return;
|
if (hasStarted.current) return;
|
||||||
hasStarted.current = true;
|
hasStarted.current = true;
|
||||||
|
|
||||||
// 1. URL 파라미터 resume (예: /report/loading/abc-123)
|
// 1. URL 파라미터/쿼리 resume (예: /report/loading/abc-123 또는 /report/loading?run_id=abc-123)
|
||||||
if (urlReportId) {
|
if (resumeRunId) {
|
||||||
setPhase('resuming');
|
setPhase('resuming');
|
||||||
const session = loadSession();
|
const session = loadSession();
|
||||||
const runId = session.runId || urlReportId;
|
const runId = session.runId || resumeRunId;
|
||||||
getAnalysisStatus(runId)
|
getAnalysisStatus(runId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status !== 200) throw new Error('status fetch failed');
|
if (res.status !== 200) throw new Error('status fetch failed');
|
||||||
const status = res.data;
|
const status = res.data;
|
||||||
if (status.status === AnalysisStatus.completed) {
|
if (status.status === AnalysisStatus.completed) {
|
||||||
navigate(`/report/${urlReportId}`, { replace: true });
|
navigate(`/report/${resumeRunId}`, { replace: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (status.status === AnalysisStatus.failed) {
|
if (status.status === AnalysisStatus.failed) {
|
||||||
@@ -222,13 +229,13 @@ export function useAnalysisPipeline(): UseAnalysisPipelineResult {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
saveSession({
|
saveSession({
|
||||||
reportId: urlReportId,
|
reportId: resumeRunId,
|
||||||
clinicId: session.clinicId || undefined,
|
clinicId: session.clinicId || undefined,
|
||||||
runId,
|
runId,
|
||||||
url: session.url || undefined,
|
url: session.url || undefined,
|
||||||
});
|
});
|
||||||
runPipeline(undefined, {
|
runPipeline(undefined, {
|
||||||
reportId: urlReportId,
|
reportId: resumeRunId,
|
||||||
clinicId: session.clinicId || undefined,
|
clinicId: session.clinicId || undefined,
|
||||||
runId,
|
runId,
|
||||||
});
|
});
|
||||||
@@ -274,7 +281,7 @@ export function useAnalysisPipeline(): UseAnalysisPipelineResult {
|
|||||||
|
|
||||||
// 4. 신규 분석 시작
|
// 4. 신규 분석 시작
|
||||||
runPipeline(url);
|
runPipeline(url);
|
||||||
}, [url, urlReportId, navigate, runPipeline]);
|
}, [url, resumeRunId, navigate, runPipeline]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
phase,
|
phase,
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ function buildReportCsv(report: MarketingReport): string {
|
|||||||
title: 'Website Audit',
|
title: 'Website Audit',
|
||||||
rows: [
|
rows: [
|
||||||
['Primary Domain', 'Main CTA', 'SNS Links On Site'],
|
['Primary Domain', 'Main CTA', 'SNS Links On Site'],
|
||||||
[w.primaryDomain, w.mainCTA, w.snsLinksOnSite ? 'Y' : 'N'],
|
[w.primaryDomain, w.mainCta, w.snsLinksOnSite ? 'Y' : 'N'],
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
if (w.trackingPixels?.length) {
|
if (w.trackingPixels?.length) {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ interface ApiReport {
|
|||||||
trackingPixels?: { name: string; installed: boolean }[];
|
trackingPixels?: { name: string; installed: boolean }[];
|
||||||
snsLinksOnSite?: boolean;
|
snsLinksOnSite?: boolean;
|
||||||
additionalDomains?: { domain: string; purpose: string }[];
|
additionalDomains?: { domain: string; purpose: string }[];
|
||||||
mainCTA?: string;
|
mainCta?: string;
|
||||||
}>;
|
}>;
|
||||||
competitors?: {
|
competitors?: {
|
||||||
name: string;
|
name: string;
|
||||||
@@ -663,7 +663,7 @@ export function transformApiReport(
|
|||||||
name: (p as { name?: string }).name || '',
|
name: (p as { name?: string }).name || '',
|
||||||
installed: (p as { installed?: boolean }).installed ?? false,
|
installed: (p as { installed?: boolean }).installed ?? false,
|
||||||
})),
|
})),
|
||||||
mainCTA: r.channelAnalysis?.website?.mainCTA || '',
|
mainCta: r.channelAnalysis?.website?.mainCta || '',
|
||||||
},
|
},
|
||||||
|
|
||||||
problemDiagnosis: buildDiagnosis(r),
|
problemDiagnosis: buildDiagnosis(r),
|
||||||
|
|||||||
@@ -87,12 +87,12 @@ export interface YouTubeAudit {
|
|||||||
subscribers: number;
|
subscribers: number;
|
||||||
totalVideos: number;
|
totalVideos: number;
|
||||||
totalViews: number;
|
totalViews: number;
|
||||||
weeklyViewGrowth: { absolute: number; percentage: number };
|
weeklyViewGrowth: { absolute: number; percentage: number } | null;
|
||||||
estimatedMonthlyRevenue: { min: number; max: number };
|
estimatedMonthlyRevenue: { min: number; max: number } | null;
|
||||||
avgVideoLength: string;
|
avgVideoLength: string | null;
|
||||||
uploadFrequency: string;
|
uploadFrequency: string | null;
|
||||||
channelCreatedDate: string;
|
channelCreatedDate: string;
|
||||||
subscriberRank: string;
|
subscriberRank: string | null;
|
||||||
channelDescription: string;
|
channelDescription: string;
|
||||||
linkedUrls: { label: string; url: string }[];
|
linkedUrls: { label: string; url: string }[];
|
||||||
playlists: string[];
|
playlists: string[];
|
||||||
@@ -174,7 +174,7 @@ export interface WebsiteAudit {
|
|||||||
snsLinksOnSite: boolean;
|
snsLinksOnSite: boolean;
|
||||||
snsLinksDetail?: { platform: string; url: string; location: string }[];
|
snsLinksDetail?: { platform: string; url: string; location: string }[];
|
||||||
trackingPixels: TrackingPixel[];
|
trackingPixels: TrackingPixel[];
|
||||||
mainCTA: string;
|
mainCta: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AsIsToBeItem {
|
export interface AsIsToBeItem {
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ import ky, { type KyInstance } from 'ky'
|
|||||||
const API_BASE_URL = (__VITE_API_BASE_URL__ ?? '').replace(/\/$/, '')
|
const API_BASE_URL = (__VITE_API_BASE_URL__ ?? '').replace(/\/$/, '')
|
||||||
|
|
||||||
export const kyInstance: KyInstance = ky.create({
|
export const kyInstance: KyInstance = ky.create({
|
||||||
timeout: 60_000,
|
// createClinic·startAnalysis 처럼 백엔드가 외부 크롤·LLM 을 호출하는 동기 엔드포인트는
|
||||||
|
// 60s 안에 끝난다는 보장이 없어 클라이언트 타임아웃은 끈다. 폴링 호출은 어차피 짧다.
|
||||||
|
timeout: false,
|
||||||
retry: 1,
|
retry: 1,
|
||||||
// orval generated 타입이 4xx/5xx 응답도 data로 받아오므로 throw 비활성
|
// orval generated 타입이 4xx/5xx 응답도 data로 받아오므로 throw 비활성
|
||||||
throwHttpErrors: false,
|
throwHttpErrors: false,
|
||||||
|
|||||||
@@ -27,9 +27,7 @@ import type {
|
|||||||
ClinicCreate,
|
ClinicCreate,
|
||||||
ClinicCreateResponse,
|
ClinicCreateResponse,
|
||||||
ClinicHistoryResponse,
|
ClinicHistoryResponse,
|
||||||
ClinicListResponse,
|
|
||||||
ClinicResponse,
|
ClinicResponse,
|
||||||
GetClinicsParams,
|
|
||||||
HTTPValidationError
|
HTTPValidationError
|
||||||
} from '../../model';
|
} 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
|
* @summary Create Clinic
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,5 +12,5 @@ export type ChannelBrandingRuleCurrentStatus = typeof ChannelBrandingRuleCurrent
|
|||||||
export const ChannelBrandingRuleCurrentStatus = {
|
export const ChannelBrandingRuleCurrentStatus = {
|
||||||
correct: 'correct',
|
correct: 'correct',
|
||||||
incorrect: 'incorrect',
|
incorrect: 'incorrect',
|
||||||
missing: 'missing',
|
'N/A': 'N/A',
|
||||||
} as const;
|
} as const;
|
||||||
@@ -10,7 +10,7 @@ export interface ChannelScore {
|
|||||||
channel: string;
|
channel: string;
|
||||||
icon: string;
|
icon: string;
|
||||||
score: number;
|
score: number;
|
||||||
maxScore: number;
|
maxScore?: number;
|
||||||
status: Severity;
|
status: Severity;
|
||||||
headline: string;
|
headline: string;
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,11 @@ import type { ChannelsInstagram } from './channelsInstagram';
|
|||||||
import type { ChannelsFacebook } from './channelsFacebook';
|
import type { ChannelsFacebook } from './channelsFacebook';
|
||||||
import type { ChannelsNaverBlog } from './channelsNaverBlog';
|
import type { ChannelsNaverBlog } from './channelsNaverBlog';
|
||||||
import type { ChannelsGangnamUnni } from './channelsGangnamUnni';
|
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 {
|
export interface Channels {
|
||||||
youtube?: ChannelsYoutube;
|
youtube?: ChannelsYoutube;
|
||||||
@@ -16,4 +21,9 @@ export interface Channels {
|
|||||||
facebook?: ChannelsFacebook;
|
facebook?: ChannelsFacebook;
|
||||||
naver_blog?: ChannelsNaverBlog;
|
naver_blog?: ChannelsNaverBlog;
|
||||||
gangnam_unni?: ChannelsGangnamUnni;
|
gangnam_unni?: ChannelsGangnamUnni;
|
||||||
|
tiktok?: ChannelsTiktok;
|
||||||
|
instagram_en?: ChannelsInstagramEn;
|
||||||
|
facebook_en?: ChannelsFacebookEn;
|
||||||
|
kakao_talk?: ChannelsKakaoTalk;
|
||||||
|
naver_cafe?: ChannelsNaverCafe;
|
||||||
}
|
}
|
||||||
+1
-1
@@ -5,4 +5,4 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type FacebookPageEngagement = string | null;
|
export type ChannelsFacebookEn = string | null;
|
||||||
+1
-1
@@ -5,4 +5,4 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type ClinicListItemRoadAddress = string | null;
|
export type ChannelsInstagramEn = string | null;
|
||||||
+1
-1
@@ -5,4 +5,4 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type ClinicListItemUrl = string | null;
|
export type ChannelsKakaoTalk = string | null;
|
||||||
+1
-1
@@ -5,4 +5,4 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type ClinicResponseUrl = string | null;
|
export type ChannelsNaverCafe = string | null;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -6,17 +6,13 @@
|
|||||||
*/
|
*/
|
||||||
import type { ClinicResponseHospitalNameEn } from './clinicResponseHospitalNameEn';
|
import type { ClinicResponseHospitalNameEn } from './clinicResponseHospitalNameEn';
|
||||||
import type { ClinicResponseRoadAddress } from './clinicResponseRoadAddress';
|
import type { ClinicResponseRoadAddress } from './clinicResponseRoadAddress';
|
||||||
import type { ClinicResponseUrl } from './clinicResponseUrl';
|
|
||||||
import type { ClinicResponseRawData } from './clinicResponseRawData';
|
|
||||||
|
|
||||||
export interface ClinicResponse {
|
export interface ClinicResponse {
|
||||||
hospital_id: string;
|
hospital_id: string;
|
||||||
hospital_name: string;
|
hospital_name: string;
|
||||||
hospital_name_en: ClinicResponseHospitalNameEn;
|
hospital_name_en: ClinicResponseHospitalNameEn;
|
||||||
road_address: ClinicResponseRoadAddress;
|
road_address: ClinicResponseRoadAddress;
|
||||||
url: ClinicResponseUrl;
|
|
||||||
status: string;
|
status: string;
|
||||||
raw_data: ClinicResponseRawData;
|
|
||||||
created_at: string;
|
created_at: string;
|
||||||
updated_at: string;
|
updated_at: string;
|
||||||
}
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/**
|
|
||||||
* Generated by orval v7.21.0 🍺
|
|
||||||
* Do not edit manually.
|
|
||||||
* FastAPI
|
|
||||||
* OpenAPI spec version: 0.1.0
|
|
||||||
*/
|
|
||||||
import type { ClinicResponseRawDataAnyOf } from './clinicResponseRawDataAnyOf';
|
|
||||||
|
|
||||||
export type ClinicResponseRawData = ClinicResponseRawDataAnyOf | null;
|
|
||||||
@@ -4,30 +4,31 @@
|
|||||||
* FastAPI
|
* FastAPI
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { LeadDoctor } from './leadDoctor';
|
import type { ClinicSnapshotName } from './clinicSnapshotName';
|
||||||
import type { PriceRange } from './priceRange';
|
import type { ClinicSnapshotNameEn } from './clinicSnapshotNameEn';
|
||||||
|
import type { ClinicSnapshotStaffCount } from './clinicSnapshotStaffCount';
|
||||||
|
import type { ClinicSnapshotLeadDoctor } from './clinicSnapshotLeadDoctor';
|
||||||
|
import type { ClinicSnapshotOverallRating } from './clinicSnapshotOverallRating';
|
||||||
|
import type { ClinicSnapshotTotalReviews } from './clinicSnapshotTotalReviews';
|
||||||
|
import type { ClinicSnapshotLocation } from './clinicSnapshotLocation';
|
||||||
|
import type { ClinicSnapshotPhone } from './clinicSnapshotPhone';
|
||||||
|
import type { ClinicSnapshotDomain } from './clinicSnapshotDomain';
|
||||||
import type { ClinicSnapshotLogoImages } from './clinicSnapshotLogoImages';
|
import type { ClinicSnapshotLogoImages } from './clinicSnapshotLogoImages';
|
||||||
import type { ClinicSnapshotBrandColors } from './clinicSnapshotBrandColors';
|
import type { ClinicSnapshotBrandColors } from './clinicSnapshotBrandColors';
|
||||||
import type { ClinicSnapshotSource } from './clinicSnapshotSource';
|
import type { ClinicSnapshotSource } from './clinicSnapshotSource';
|
||||||
import type { ClinicSnapshotRegistryData } from './clinicSnapshotRegistryData';
|
import type { ClinicSnapshotRegistryData } from './clinicSnapshotRegistryData';
|
||||||
|
|
||||||
export interface ClinicSnapshot {
|
export interface ClinicSnapshot {
|
||||||
name: string;
|
name?: ClinicSnapshotName;
|
||||||
nameEn: string;
|
nameEn?: ClinicSnapshotNameEn;
|
||||||
established: string;
|
staffCount?: ClinicSnapshotStaffCount;
|
||||||
yearsInBusiness: number;
|
leadDoctor?: ClinicSnapshotLeadDoctor;
|
||||||
staffCount: number;
|
overallRating?: ClinicSnapshotOverallRating;
|
||||||
leadDoctor: LeadDoctor;
|
totalReviews?: ClinicSnapshotTotalReviews;
|
||||||
overallRating: number;
|
certifications?: string[];
|
||||||
totalReviews: number;
|
location?: ClinicSnapshotLocation;
|
||||||
priceRange: PriceRange;
|
phone?: ClinicSnapshotPhone;
|
||||||
certifications: string[];
|
domain?: ClinicSnapshotDomain;
|
||||||
mediaAppearances: string[];
|
|
||||||
medicalTourism: string[];
|
|
||||||
location: string;
|
|
||||||
nearestStation: string;
|
|
||||||
phone: string;
|
|
||||||
domain: string;
|
|
||||||
logoImages?: ClinicSnapshotLogoImages;
|
logoImages?: ClinicSnapshotLogoImages;
|
||||||
brandColors?: ClinicSnapshotBrandColors;
|
brandColors?: ClinicSnapshotBrandColors;
|
||||||
source?: ClinicSnapshotSource;
|
source?: ClinicSnapshotSource;
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* FastAPI
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ClinicSnapshotDomain = string | null;
|
||||||
+2
-1
@@ -4,5 +4,6 @@
|
|||||||
* FastAPI
|
* FastAPI
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
import type { LeadDoctor } from './leadDoctor';
|
||||||
|
|
||||||
export type ClinicListItemHospitalNameEn = string | null;
|
export type ClinicSnapshotLeadDoctor = LeadDoctor | null;
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* FastAPI
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ClinicSnapshotLocation = string | null;
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* FastAPI
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ClinicSnapshotName = string | null;
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* FastAPI
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ClinicSnapshotNameEn = string | null;
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* FastAPI
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ClinicSnapshotOverallRating = number | null;
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* FastAPI
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ClinicSnapshotPhone = string | null;
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* FastAPI
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ClinicSnapshotStaffCount = number | null;
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* FastAPI
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ClinicSnapshotTotalReviews = number | null;
|
||||||
@@ -7,10 +7,11 @@
|
|||||||
import type { FacebookPage } from './facebookPage';
|
import type { FacebookPage } from './facebookPage';
|
||||||
import type { DiagnosisItem } from './diagnosisItem';
|
import type { DiagnosisItem } from './diagnosisItem';
|
||||||
import type { BrandInconsistency } from './brandInconsistency';
|
import type { BrandInconsistency } from './brandInconsistency';
|
||||||
|
import type { FacebookAuditConsolidationRecommendation } from './facebookAuditConsolidationRecommendation';
|
||||||
|
|
||||||
export interface FacebookAudit {
|
export interface FacebookAudit {
|
||||||
pages: FacebookPage[];
|
pages?: FacebookPage[];
|
||||||
diagnosis: DiagnosisItem[];
|
diagnosis?: DiagnosisItem[];
|
||||||
brandInconsistencies: BrandInconsistency[];
|
brandInconsistencies?: BrandInconsistency[];
|
||||||
consolidationRecommendation: string;
|
consolidationRecommendation?: FacebookAuditConsolidationRecommendation;
|
||||||
}
|
}
|
||||||
+1
-1
@@ -5,4 +5,4 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type ClinicResponseRawDataAnyOf = { [key: string]: unknown };
|
export type FacebookAuditConsolidationRecommendation = string | null;
|
||||||
@@ -5,9 +5,8 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { Language } from './language';
|
import type { Language } from './language';
|
||||||
import type { FacebookPagePostFrequency } from './facebookPagePostFrequency';
|
import type { FacebookPageHasWhatsapp } from './facebookPageHasWhatsapp';
|
||||||
import type { FacebookPageTopContentType } from './facebookPageTopContentType';
|
import type { FacebookPageTopContentType } from './facebookPageTopContentType';
|
||||||
import type { FacebookPageEngagement } from './facebookPageEngagement';
|
|
||||||
|
|
||||||
export interface FacebookPage {
|
export interface FacebookPage {
|
||||||
url: string;
|
url: string;
|
||||||
@@ -24,8 +23,8 @@ export interface FacebookPage {
|
|||||||
linkedDomain: string;
|
linkedDomain: string;
|
||||||
reviews: number;
|
reviews: number;
|
||||||
recentPostAge: string;
|
recentPostAge: string;
|
||||||
hasWhatsapp: boolean;
|
hasWhatsapp?: FacebookPageHasWhatsapp;
|
||||||
postFrequency?: FacebookPagePostFrequency;
|
postFrequency: string;
|
||||||
topContentType?: FacebookPageTopContentType;
|
topContentType?: FacebookPageTopContentType;
|
||||||
engagement?: FacebookPageEngagement;
|
engagement: string;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* FastAPI
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type FacebookPageHasWhatsapp = boolean | null;
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/**
|
|
||||||
* Generated by orval v7.21.0 🍺
|
|
||||||
* Do not edit manually.
|
|
||||||
* FastAPI
|
|
||||||
* OpenAPI spec version: 0.1.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
export type FacebookPagePostFrequency = string | null;
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
/**
|
|
||||||
* Generated by orval v7.21.0 🍺
|
|
||||||
* Do not edit manually.
|
|
||||||
* FastAPI
|
|
||||||
* OpenAPI spec version: 0.1.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
export type GetClinicsParams = {
|
|
||||||
limit?: number;
|
|
||||||
offset?: number;
|
|
||||||
};
|
|
||||||
@@ -46,30 +46,36 @@ export * from './channelStrategyCardCustomerJourneyStage';
|
|||||||
export * from './channelStrategyCardPriority';
|
export * from './channelStrategyCardPriority';
|
||||||
export * from './channels';
|
export * from './channels';
|
||||||
export * from './channelsFacebook';
|
export * from './channelsFacebook';
|
||||||
|
export * from './channelsFacebookEn';
|
||||||
export * from './channelsGangnamUnni';
|
export * from './channelsGangnamUnni';
|
||||||
export * from './channelsInstagram';
|
export * from './channelsInstagram';
|
||||||
|
export * from './channelsInstagramEn';
|
||||||
|
export * from './channelsKakaoTalk';
|
||||||
export * from './channelsNaverBlog';
|
export * from './channelsNaverBlog';
|
||||||
|
export * from './channelsNaverCafe';
|
||||||
|
export * from './channelsTiktok';
|
||||||
export * from './channelsYoutube';
|
export * from './channelsYoutube';
|
||||||
export * from './clinicCreate';
|
export * from './clinicCreate';
|
||||||
export * from './clinicCreateResponse';
|
export * from './clinicCreateResponse';
|
||||||
export * from './clinicHistoryResponse';
|
export * from './clinicHistoryResponse';
|
||||||
export * from './clinicHistoryResponseMetricsTimeseries';
|
export * from './clinicHistoryResponseMetricsTimeseries';
|
||||||
export * from './clinicListItem';
|
|
||||||
export * from './clinicListItemHospitalNameEn';
|
|
||||||
export * from './clinicListItemRoadAddress';
|
|
||||||
export * from './clinicListItemUrl';
|
|
||||||
export * from './clinicListResponse';
|
|
||||||
export * from './clinicResponse';
|
export * from './clinicResponse';
|
||||||
export * from './clinicResponseHospitalNameEn';
|
export * from './clinicResponseHospitalNameEn';
|
||||||
export * from './clinicResponseRawData';
|
|
||||||
export * from './clinicResponseRawDataAnyOf';
|
|
||||||
export * from './clinicResponseRoadAddress';
|
export * from './clinicResponseRoadAddress';
|
||||||
export * from './clinicResponseUrl';
|
|
||||||
export * from './clinicSnapshot';
|
export * from './clinicSnapshot';
|
||||||
export * from './clinicSnapshotBrandColors';
|
export * from './clinicSnapshotBrandColors';
|
||||||
|
export * from './clinicSnapshotDomain';
|
||||||
|
export * from './clinicSnapshotLeadDoctor';
|
||||||
|
export * from './clinicSnapshotLocation';
|
||||||
export * from './clinicSnapshotLogoImages';
|
export * from './clinicSnapshotLogoImages';
|
||||||
|
export * from './clinicSnapshotName';
|
||||||
|
export * from './clinicSnapshotNameEn';
|
||||||
|
export * from './clinicSnapshotOverallRating';
|
||||||
|
export * from './clinicSnapshotPhone';
|
||||||
export * from './clinicSnapshotRegistryData';
|
export * from './clinicSnapshotRegistryData';
|
||||||
export * from './clinicSnapshotSource';
|
export * from './clinicSnapshotSource';
|
||||||
|
export * from './clinicSnapshotStaffCount';
|
||||||
|
export * from './clinicSnapshotTotalReviews';
|
||||||
export * from './colorSwatch';
|
export * from './colorSwatch';
|
||||||
export * from './contentCountSummary';
|
export * from './contentCountSummary';
|
||||||
export * from './contentCountSummaryType';
|
export * from './contentCountSummaryType';
|
||||||
@@ -81,9 +87,9 @@ export * from './diagnosisItem';
|
|||||||
export * from './diagnosisItemEvidenceIds';
|
export * from './diagnosisItemEvidenceIds';
|
||||||
export * from './estimatedRevenue';
|
export * from './estimatedRevenue';
|
||||||
export * from './facebookAudit';
|
export * from './facebookAudit';
|
||||||
|
export * from './facebookAuditConsolidationRecommendation';
|
||||||
export * from './facebookPage';
|
export * from './facebookPage';
|
||||||
export * from './facebookPageEngagement';
|
export * from './facebookPageHasWhatsapp';
|
||||||
export * from './facebookPagePostFrequency';
|
|
||||||
export * from './facebookPageTopContentType';
|
export * from './facebookPageTopContentType';
|
||||||
export * from './fileListItem';
|
export * from './fileListItem';
|
||||||
export * from './fileListItemSizeBytes';
|
export * from './fileListItemSizeBytes';
|
||||||
@@ -91,7 +97,6 @@ export * from './fileType';
|
|||||||
export * from './fileUploadResponse';
|
export * from './fileUploadResponse';
|
||||||
export * from './fileUploadResponseSizeBytes';
|
export * from './fileUploadResponseSizeBytes';
|
||||||
export * from './fontSpec';
|
export * from './fontSpec';
|
||||||
export * from './getClinicsParams';
|
|
||||||
export * from './hTTPValidationError';
|
export * from './hTTPValidationError';
|
||||||
export * from './instagramAccount';
|
export * from './instagramAccount';
|
||||||
export * from './instagramAudit';
|
export * from './instagramAudit';
|
||||||
@@ -116,7 +121,6 @@ export * from './planApiResponseClinicName';
|
|||||||
export * from './planApiResponseClinicNameEn';
|
export * from './planApiResponseClinicNameEn';
|
||||||
export * from './planApiResponseRepurposingProposals';
|
export * from './planApiResponseRepurposingProposals';
|
||||||
export * from './platformStrategy';
|
export * from './platformStrategy';
|
||||||
export * from './priceRange';
|
|
||||||
export * from './registryData';
|
export * from './registryData';
|
||||||
export * from './registryDataBranches';
|
export * from './registryDataBranches';
|
||||||
export * from './registryDataBrandGroup';
|
export * from './registryDataBrandGroup';
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ import type { InstagramAccount } from './instagramAccount';
|
|||||||
import type { DiagnosisItem } from './diagnosisItem';
|
import type { DiagnosisItem } from './diagnosisItem';
|
||||||
|
|
||||||
export interface InstagramAudit {
|
export interface InstagramAudit {
|
||||||
accounts: InstagramAccount[];
|
accounts?: InstagramAccount[];
|
||||||
diagnosis: DiagnosisItem[];
|
diagnosis?: DiagnosisItem[];
|
||||||
}
|
}
|
||||||
@@ -12,4 +12,5 @@ export type Language = typeof Language[keyof typeof Language];
|
|||||||
export const Language = {
|
export const Language = {
|
||||||
KR: 'KR',
|
KR: 'KR',
|
||||||
EN: 'EN',
|
EN: 'EN',
|
||||||
|
WW: 'WW',
|
||||||
} as const;
|
} as const;
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/**
|
|
||||||
* Generated by orval v7.21.0 🍺
|
|
||||||
* Do not edit manually.
|
|
||||||
* FastAPI
|
|
||||||
* OpenAPI spec version: 0.1.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface PriceRange {
|
|
||||||
min: string;
|
|
||||||
max: string;
|
|
||||||
currency: string;
|
|
||||||
}
|
|
||||||
@@ -10,7 +10,7 @@ import type { TrackingPixel } from './trackingPixel';
|
|||||||
|
|
||||||
export interface WebsiteAudit {
|
export interface WebsiteAudit {
|
||||||
primaryDomain: string;
|
primaryDomain: string;
|
||||||
additionalDomains: AdditionalDomain[];
|
additionalDomains?: AdditionalDomain[];
|
||||||
snsLinksOnSite: boolean;
|
snsLinksOnSite: boolean;
|
||||||
snsLinksDetail?: WebsiteAuditSnsLinksDetail;
|
snsLinksDetail?: WebsiteAuditSnsLinksDetail;
|
||||||
trackingPixels: TrackingPixel[];
|
trackingPixels: TrackingPixel[];
|
||||||
|
|||||||
@@ -21,10 +21,9 @@ export interface YouTubeAudit {
|
|||||||
avgVideoLength: string;
|
avgVideoLength: string;
|
||||||
uploadFrequency: string;
|
uploadFrequency: string;
|
||||||
channelCreatedDate: string;
|
channelCreatedDate: string;
|
||||||
subscriberRank: string;
|
|
||||||
channelDescription: string;
|
channelDescription: string;
|
||||||
linkedUrls: LinkedUrl[];
|
linkedUrls: LinkedUrl[];
|
||||||
playlists: string[];
|
playlists: string[];
|
||||||
topVideos: TopVideo[];
|
topVideos?: TopVideo[];
|
||||||
diagnosis: DiagnosisItem[];
|
diagnosis: DiagnosisItem[];
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user