이름: solution/front → solution/frontend
`backend` 옆에 `front` 가 있을 이유가 없었다. negosium 의 negodata/front 를 그대로 베꼈고 그게 왜 front 인지는 따져보지 않았다 — 근거 없이 들여온 이름이라 바로잡는다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019uYhHQdssRubirPirrdJJC
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# 관리자(빌더)가 호출할 백엔드. o2o-web4ai 백엔드 기본 포트는 9800.
|
||||
VITE_API_BASE_URL=http://localhost:9800
|
||||
|
||||
# 발행 사이트의 기본 호스트. 발행 모달이 보여줄 주소를 이걸로 만든다.
|
||||
# 커스텀 도메인이 붙기 전까지 <slug>.<이 값> 형태로 나간다.
|
||||
# ★ 로컬에서 compose 없이 띄울 때만 쓴다. compose 로 띄우면 루트 .env 의 SITE_PUBLIC_HOST 가
|
||||
# 주입돼 이 값을 덮는다 — 발행 호스트의 단일 출처는 루트 .env 다.
|
||||
VITE_PUBLISH_HOST=w4ai.o2o.kr
|
||||
|
||||
# 발행 사이트 렌더러 개발 서버. 에디터 상단 "발행본 사이트 열기" 가 이 주소를 연다.
|
||||
VITE_SITE_PREVIEW_URL=http://localhost:3000
|
||||
|
||||
# ── 개발 전용 자동 로그인(선택) ────────────────────────────
|
||||
# 값이 있으면 개발 서버에서 빌더를 열 때 이 계정으로 자동 로그인한다.
|
||||
# 운영 번들에는 들어가지 않는다. 실제 값은 .env 에만 둔다(커밋 금지).
|
||||
VITE_DEV_LOGIN_ID=
|
||||
VITE_DEV_LOGIN_PW=
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "https://ui.shadcn.com/schema.json",
|
||||
"style": "base-nova",
|
||||
"rsc": false,
|
||||
"tsx": true,
|
||||
"tailwind": {
|
||||
"config": "",
|
||||
"css": "src/index.css",
|
||||
"baseColor": "neutral",
|
||||
"cssVariables": true,
|
||||
"prefix": ""
|
||||
},
|
||||
"iconLibrary": "lucide",
|
||||
"rtl": false,
|
||||
"aliases": {
|
||||
"components": "@/components",
|
||||
"utils": "@/lib/utils",
|
||||
"ui": "@/components/ui",
|
||||
"lib": "@/lib",
|
||||
"hooks": "@/hooks"
|
||||
},
|
||||
"menuColor": "default",
|
||||
"menuAccent": "subtle",
|
||||
"registries": {}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// 최소 게이트 — 전체 스타일 린트가 아니라, tsc 가 못 잡는 런타임 크래시 버그만 막는다.
|
||||
// (negodata 보일러플레이트에서 이식. 도입 계기는 로컬 const 가 동명 import 를 가려
|
||||
// zustand 셀렉터가 TDZ 참조 → 프로덕션 크래시. 그 케이스는 tsc --noEmit 도 통과했다.)
|
||||
import tseslint from 'typescript-eslint';
|
||||
import reactHooks from 'eslint-plugin-react-hooks';
|
||||
|
||||
export default tseslint.config({
|
||||
files: ['src/**/*.{ts,tsx}'],
|
||||
ignores: ['src/api/generated/**'],
|
||||
languageOptions: {
|
||||
parser: tseslint.parser,
|
||||
},
|
||||
plugins: {
|
||||
'@typescript-eslint': tseslint.plugin,
|
||||
'react-hooks': reactHooks,
|
||||
},
|
||||
rules: {
|
||||
// 훅 호출 순서 위반은 런타임 크래시라 error, deps 누락은 기존 코드가 많아 warn.
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'react-hooks/exhaustive-deps': 'warn',
|
||||
// 선언보다 위에서 변수를 쓰는 것(TDZ) 차단. 함수/타입 호이스팅은 안전하므로 허용.
|
||||
'no-use-before-define': 'off',
|
||||
'@typescript-eslint/no-use-before-define': [
|
||||
'error',
|
||||
{functions: false, classes: false, typedefs: false, enums: false, variables: true},
|
||||
],
|
||||
// 상위 스코프(import 포함) 이름을 가리는 재선언 차단.
|
||||
'no-shadow': 'off',
|
||||
'@typescript-eslint/no-shadow': 'error',
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
||||
<!-- 관리자 화면은 색인될 이유가 없다. 발행 사이트만 색인되게 한다. -->
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<!-- self-host Pretendard 가 어떤 환경에서든 못 뜰 때 한글이 굴림/맑은고딕으로 떨어지지 않게 하는 안전망 -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300..900&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link rel="icon" type="image/svg+xml" href="/brand/favicon-w4a.svg?v=14" />
|
||||
<meta name="theme-color" content="#1463ff" />
|
||||
<title>Web4Ai · AI 웹 빌더</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/app/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,51 @@
|
||||
import {defineConfig} from 'orval';
|
||||
|
||||
/**
|
||||
* Orval config
|
||||
*
|
||||
* Backend: FastAPI (o2o-web4ai API) — OpenAPI 스키마를 `${BACKEND_URL}/openapi.json` 에 자동 노출한다.
|
||||
* 포트 9800 (negosium 9300 / negodata 9400 / agent 9500 / lps 9600 / anchoring 9700 다음 번호).
|
||||
*
|
||||
* 네이티브 `fetch` 기반 React Query 클라이언트를 만든다(axios 불필요).
|
||||
* 실행: `npm run orval`
|
||||
*
|
||||
* 서버를 안 띄우고 생성하려면 백엔드가 뽑아둔 파일을 지정한다:
|
||||
* ORVAL_INPUT=../backend/openapi.json npm run orval
|
||||
*/
|
||||
export default defineConfig({
|
||||
web4ai: {
|
||||
input: {
|
||||
target: process.env.ORVAL_INPUT ?? 'http://localhost:9800/openapi.json',
|
||||
},
|
||||
output: {
|
||||
mode: 'tags-split',
|
||||
target: './src/api/generated',
|
||||
schemas: './src/api/generated/model',
|
||||
client: 'react-query',
|
||||
// httpClient: 'fetch' 를 쓰면 오퍼레이션마다 Response200/404/Success/Error/Response
|
||||
// 상태코드별 유니온 타입이 강제로 쏟아진다. 우리 mutator 는 본문(data)만 반환하므로
|
||||
// 기본 mutator 방식(config-object)으로 두어 함수가 본문 타입을 바로 반환하게 한다.
|
||||
clean: true,
|
||||
prettier: true,
|
||||
override: {
|
||||
// FastAPI 기본 operationId("list_places_v1_place_list_get")에서 "_v1_" 앞부분만 취해
|
||||
// camelCase 로 정리 → listPlaces/useListPlaces 등으로 복원(백엔드 무수정).
|
||||
operationName: (operation) => {
|
||||
const id = operation.operationId ?? '';
|
||||
const base = id.split('_v1_')[0] || id;
|
||||
return base.replace(/_([a-z])/g, (_m, c) => c.toUpperCase());
|
||||
},
|
||||
// 모든 생성 호출을 공통 fetch mutator 로 통과시킨다(토큰/에러/baseURL 처리).
|
||||
mutator: {
|
||||
path: './src/api/mutator/custom-fetch.ts',
|
||||
name: 'customFetch',
|
||||
},
|
||||
query: {
|
||||
useQuery: true,
|
||||
useInfinite: false,
|
||||
signal: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "@o2o/front",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --port=3000 --host=0.0.0.0",
|
||||
"build": "tsc --noEmit && eslint src && vite build",
|
||||
"preview": "vite preview",
|
||||
"clean": "rm -rf dist",
|
||||
"lint": "tsc --noEmit && eslint src",
|
||||
"orval": "orval --config ./orval.config.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
"@dnd-kit/sortable": "^10.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@hookform/resolvers": "^5.4.0",
|
||||
"@o2o/shared": "*",
|
||||
"@tailwindcss/vite": "^4.1.14",
|
||||
"@tanstack/react-query": "^5.62.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"lucide-react": "^0.546.0",
|
||||
"motion": "^12.23.24",
|
||||
"react": "^19.0.1",
|
||||
"react-dom": "^19.0.1",
|
||||
"react-hook-form": "^7.79.0",
|
||||
"react-router": "^7.17.0",
|
||||
"sonner": "^2.0.7",
|
||||
"tailwind-merge": "^3.6.0",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"zod": "^4.4.3",
|
||||
"zustand": "^5.0.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/react": "^19.2.17",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^5.0.4",
|
||||
"eslint": "^9.36.0",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"orval": "^7.3.0",
|
||||
"tailwindcss": "^4.1.14",
|
||||
"typescript": "~5.8.2",
|
||||
"typescript-eslint": "^8.45.0",
|
||||
"vite": "^6.2.3"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 788 KiB |
|
After Width: | Height: | Size: 202 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 142 44" role="img" aria-labelledby="title">
|
||||
<title id="title">AI FOR WEB</title>
|
||||
<text x="2" y="29.5" fill="#111111" font-family="Pretendard, Inter, Arial, sans-serif" font-size="20" letter-spacing="-.15">
|
||||
<tspan font-weight="900">AI</tspan><tspan dx="4" font-weight="650">FOR WEB</tspan>
|
||||
</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 367 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<text x="16" y="21" text-anchor="middle" fill="#111111" font-family="Arial, Helvetica, sans-serif" font-size="12.5" font-weight="900" letter-spacing="-.8">AFW</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 236 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<path fill="#111111" stroke="#ffffff" stroke-width="1.4" stroke-linejoin="round" d="M5.2 2.8 27 15.9l-9.2 2.2 5 8.6-5 2.9-5-8.7-6.5 6.8Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 210 B |
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#111111" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Lucide WandSparkles, ISC License -->
|
||||
<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72"/>
|
||||
<path d="m14 7 3 3M5 6v4M19 14v4M10 2v2M7 8H3M21 16h-4M11 3H9"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 430 B |
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<path fill="#111111" d="M8.5 6.5C8.5 5.1 9.6 4 11 4h9c1.4 0 2.5 1.1 2.5 2.5l1.2 16H7.3Z"/>
|
||||
<path fill="#111111" d="M2.7 21h25.6c1.2 0 1.7 1.5.8 2.3C26.4 25.7 21.5 27 15.5 27S4.6 25.7 1.9 23.3C1 22.5 1.5 21 2.7 21Z"/>
|
||||
<path fill="#ffffff" stroke="#111111" stroke-width="1.4" stroke-linejoin="round" d="m15.1 3.1 11.3 10.6-5.1.7 2.9 5-3.1 1.8-2.8-5-3.2 4.1Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 433 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<path fill="#111111" d="M9 5.5c0-1.4 1.1-2.5 2.5-2.5h9C21.9 3 23 4.1 23 5.5l1.2 17H7.8Z"/>
|
||||
<path fill="#111111" d="M3.2 21h25.6c1.2 0 1.7 1.5.8 2.3-2.7 2.4-7.6 3.7-13.6 3.7S5.1 25.7 2.4 23.3c-.9-.8-.4-2.3.8-2.3Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 287 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<text x="16" y="21" text-anchor="middle" fill="#111111" font-family="Arial, Helvetica, sans-serif" font-size="12.5" font-weight="900" letter-spacing="-1">W4A</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 235 B |
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 104 44" role="img" aria-labelledby="title">
|
||||
<title id="title">Web4Ai</title>
|
||||
<text x="2" y="30" fill="#111111" font-family="Pretendard, Inter, Arial, sans-serif" font-size="22" letter-spacing="-.65">
|
||||
<tspan font-weight="850">Web</tspan><tspan font-weight="500">4</tspan><tspan font-weight="850">Ai</tspan>
|
||||
</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 384 B |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<path fill="#111111" d="M9 5.5c0-1.4 1.1-2.5 2.5-2.5h9C21.9 3 23 4.1 23 5.5l1.2 17H7.8Z"/>
|
||||
<path fill="#111111" d="M3.2 21h25.6c1.2 0 1.7 1.5.8 2.3-2.7 2.4-7.6 3.7-13.6 3.7S5.1 25.7 2.4 23.3c-.9-.8-.4-2.3.8-2.3Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 287 B |
@@ -0,0 +1,15 @@
|
||||
# fonts
|
||||
|
||||
`PretendardVariable.woff2` 를 여기 두면 한글 본문이 Pretendard 로 뜬다.
|
||||
|
||||
없어도 빌드는 깨지지 않는다 — `@font-face` 가 조용히 실패하고
|
||||
`Noto Sans KR`(구글폰트 CDN) → `system-ui` 순서로 폴백된다.
|
||||
빌드 시 "didn't resolve at build time" 경고가 뜨는 건 그 때문이고, 무해하다.
|
||||
|
||||
```bash
|
||||
curl -L -o PretendardVariable.woff2 \
|
||||
https://github.com/orioncactus/pretendard/raw/main/packages/pretendard/dist/web/variable/woff2/PretendardVariable.woff2
|
||||
```
|
||||
|
||||
★ 발행 사이트(`site/public/fonts/`)에도 같은 파일이 필요하다 —
|
||||
프리렌더가 `public/` 을 사이트 폴더로 복사하므로, 두면 자동으로 따라간다.
|
||||
@@ -0,0 +1,71 @@
|
||||
# api
|
||||
|
||||
```
|
||||
api/
|
||||
├── index.ts ★ 화면이 import 하는 단 하나의 입구
|
||||
├── generated/ orval 산출물 — 손대지 않는다
|
||||
├── mutator/custom-fetch.ts 모든 호출이 지나는 길목(토큰·에러·baseURL·434 재발급)
|
||||
└── pollJob.ts 잡 폴링(수집·비전·생성·빌드 공용)
|
||||
```
|
||||
|
||||
화면은 `@/api` 하나만 본다.
|
||||
|
||||
```ts
|
||||
import {useListPlaces, useTransitionFact, startBuild, pollJob} from '@/api';
|
||||
import type {PlaceData, FactStatus} from '@/api';
|
||||
```
|
||||
|
||||
## 재생성
|
||||
|
||||
백엔드 OpenAPI 가 바뀌면 다시 뽑는다. **`generated/` 를 손으로 고치지 않는다.**
|
||||
|
||||
```bash
|
||||
# 백엔드가 떠 있을 때
|
||||
npm run orval -w admin
|
||||
|
||||
# 서버 없이 (스펙 파일을 먼저 뽑는다)
|
||||
cd backend && python scripts/export_openapi.py
|
||||
cd ../frontend && ORVAL_INPUT=../../backend/openapi.json npm run orval -w admin
|
||||
```
|
||||
|
||||
생성되는 것 — 태그(도메인)별 훅과 모델.
|
||||
|
||||
| 태그 | 훅 |
|
||||
|---|---|
|
||||
| `auth` | `useLogin` `useRefreshToken` `useMe` `useUpdateMe` |
|
||||
| `place` | `useListPlaces` `useCreatePlace` `useGetPlace` `useUpdatePlace` `useVerifyCandidates` `useVerifyPlace` `useListUnits` `useCreateUnit` `useListLinks` `useCreateLink` `useConfirmLink` `useStartCollect` `useStartVision` `useStartCopy` |
|
||||
| `fact` | `useGetSchema` `useListFacts` `useUpsertFact` `useTransitionFact` |
|
||||
| `job` | `useGetJob` `useJobOps` `useRequeueJob` |
|
||||
| `site` | `useGetSite` `useStartBuild` `useListVersions` `useListLogs` `useChangeStatus` |
|
||||
|
||||
`orval.config.ts` 의 `operationName` 이 FastAPI 의 `list_places_v1_place_list_get` 를
|
||||
`listPlaces` 로 되돌린다 — 백엔드는 무수정이다.
|
||||
|
||||
## 규약 세 가지
|
||||
|
||||
**1. 거절도 HTTP 200 이다.** 도메인 거절은 `result.success=false` + `result.desc`(ErrorType 이름)로 온다.
|
||||
React Query 는 성공으로 보므로 `onSuccess` 안에서 직접 봐야 한다. 안 보면 저장 안 된 값이 저장된 것처럼 보인다.
|
||||
|
||||
```ts
|
||||
onSuccess: (res) => {
|
||||
if (res.result?.success === false) return notifyApiError({data: res});
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
문구 변환은 `@/lib/errorMessages` 한 곳에 있다(`PLACE_NOT_VERIFIED` → "동일 업소 검증을 먼저…").
|
||||
|
||||
**2. 응답의 `None` 필드는 키째 사라진다**(백엔드 `RemoveNoneResponse`). 게다가 백엔드가 기본값을 준
|
||||
필드는 OpenAPI 에서 required 가 아니라 생성 타입이 전부 optional 이다 — `undefined` 를 각오하고 쓴다.
|
||||
|
||||
**3. 몇 분 걸리는 일은 잡이다.** 수집·비전·생성·빌드는 `job_id` 를 받고 폴링한다.
|
||||
루프는 `pollJob()` 하나뿐이다 — 화면마다 다시 쓰지 않는다.
|
||||
|
||||
```ts
|
||||
const started = await startCollect(placeId, {});
|
||||
const outcome = await pollJob(started.job_id!, {signal, onTick: (job) => ...});
|
||||
// outcome.kind: done | dead | timeout | aborted | unreachable
|
||||
```
|
||||
|
||||
★ `done` 은 "잡이 끝났다"이지 "성공했다"가 아니다. 빌드는 게이트에 막혀도 정상 종료하고
|
||||
`job.result.gate.passed` 가 false 로 온다 — 판정은 `features/publish/usePublishSite.ts` 가 읽는다.
|
||||
@@ -0,0 +1,327 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
useMutation,
|
||||
useQuery
|
||||
} from '@tanstack/react-query';
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
ReqLogin,
|
||||
ReqUpdateMe,
|
||||
ResLogin,
|
||||
ResMe,
|
||||
ResRefreshToken
|
||||
} from '.././model';
|
||||
|
||||
import { customFetch } from '../../mutator/custom-fetch';
|
||||
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* id/pw 로 로그인하고 JWT 토큰을 발급한다.
|
||||
* @summary 로그인
|
||||
*/
|
||||
export const login = (
|
||||
reqLogin: ReqLogin,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResLogin>(
|
||||
{url: `/v1/auth/login`, method: 'POST',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqLogin, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getLoginMutationOptions = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof login>>, TError,{data: ReqLogin}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof login>>, TError,{data: ReqLogin}, TContext> => {
|
||||
|
||||
const mutationKey = ['login'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof login>>, {data: ReqLogin}> = (props) => {
|
||||
const {data} = props ?? {};
|
||||
|
||||
return login(data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type LoginMutationResult = NonNullable<Awaited<ReturnType<typeof login>>>
|
||||
export type LoginMutationBody = ReqLogin
|
||||
export type LoginMutationError = void | HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary 로그인
|
||||
*/
|
||||
export const useLogin = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof login>>, TError,{data: ReqLogin}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof login>>,
|
||||
TError,
|
||||
{data: ReqLogin},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getLoginMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* refresh 토큰으로 access 토큰을 재발급한다.
|
||||
* @summary 액세스 토큰 갱신
|
||||
*/
|
||||
export const refreshToken = (
|
||||
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResRefreshToken>(
|
||||
{url: `/v1/auth/refresh_token`, method: 'POST', signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getRefreshTokenMutationOptions = <TError = void,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof refreshToken>>, TError,void, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof refreshToken>>, TError,void, TContext> => {
|
||||
|
||||
const mutationKey = ['refreshToken'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof refreshToken>>, void> = () => {
|
||||
|
||||
|
||||
return refreshToken(requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type RefreshTokenMutationResult = NonNullable<Awaited<ReturnType<typeof refreshToken>>>
|
||||
|
||||
export type RefreshTokenMutationError = void
|
||||
|
||||
/**
|
||||
* @summary 액세스 토큰 갱신
|
||||
*/
|
||||
export const useRefreshToken = <TError = void,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof refreshToken>>, TError,void, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof refreshToken>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getRefreshTokenMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* 유효한 access 토큰이 있어야 호출 가능. 토큰의 유저+회사 정보를 반환한다.
|
||||
* @summary 내 정보
|
||||
*/
|
||||
export const me = (
|
||||
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResMe>(
|
||||
{url: `/v1/auth/me`, method: 'GET', signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getMeQueryKey = () => {
|
||||
return [
|
||||
`/v1/auth/me`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getMeQueryOptions = <TData = Awaited<ReturnType<typeof me>>, TError = void>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getMeQueryKey();
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof me>>> = ({ signal }) => me(requestOptions, signal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type MeQueryResult = NonNullable<Awaited<ReturnType<typeof me>>>
|
||||
export type MeQueryError = void
|
||||
|
||||
|
||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof me>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof me>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof me>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof me>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary 내 정보
|
||||
*/
|
||||
|
||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getMeQueryOptions(options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 본인 이름/이메일/연락처/비밀번호를 수정한다(권한·소속·ID 변경 불가).
|
||||
* @summary 내 정보 수정
|
||||
*/
|
||||
export const updateMe = (
|
||||
reqUpdateMe: ReqUpdateMe,
|
||||
options?: SecondParameter<typeof customFetch>,) => {
|
||||
|
||||
|
||||
return customFetch<ResMe>(
|
||||
{url: `/v1/auth/me`, method: 'PATCH',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqUpdateMe
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getUpdateMeMutationOptions = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateMe>>, TError,{data: ReqUpdateMe}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof updateMe>>, TError,{data: ReqUpdateMe}, TContext> => {
|
||||
|
||||
const mutationKey = ['updateMe'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof updateMe>>, {data: ReqUpdateMe}> = (props) => {
|
||||
const {data} = props ?? {};
|
||||
|
||||
return updateMe(data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type UpdateMeMutationResult = NonNullable<Awaited<ReturnType<typeof updateMe>>>
|
||||
export type UpdateMeMutationBody = ReqUpdateMe
|
||||
export type UpdateMeMutationError = void | HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary 내 정보 수정
|
||||
*/
|
||||
export const useUpdateMe = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateMe>>, TError,{data: ReqUpdateMe}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateMe>>,
|
||||
TError,
|
||||
{data: ReqUpdateMe},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getUpdateMeMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
useQuery
|
||||
} from '@tanstack/react-query';
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseQueryOptions,
|
||||
UseQueryResult
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
import { customFetch } from '../../mutator/custom-fetch';
|
||||
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @summary Healthz
|
||||
*/
|
||||
export const healthzHealthzGet = (
|
||||
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<unknown>(
|
||||
{url: `/healthz`, method: 'GET', signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getHealthzHealthzGetQueryKey = () => {
|
||||
return [
|
||||
`/healthz`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getHealthzHealthzGetQueryOptions = <TData = Awaited<ReturnType<typeof healthzHealthzGet>>, TError = void>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getHealthzHealthzGetQueryKey();
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof healthzHealthzGet>>> = ({ signal }) => healthzHealthzGet(requestOptions, signal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type HealthzHealthzGetQueryResult = NonNullable<Awaited<ReturnType<typeof healthzHealthzGet>>>
|
||||
export type HealthzHealthzGetQueryError = void
|
||||
|
||||
|
||||
export function useHealthzHealthzGet<TData = Awaited<ReturnType<typeof healthzHealthzGet>>, TError = void>(
|
||||
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useHealthzHealthzGet<TData = Awaited<ReturnType<typeof healthzHealthzGet>>, TError = void>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useHealthzHealthzGet<TData = Awaited<ReturnType<typeof healthzHealthzGet>>, TError = void>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary Healthz
|
||||
*/
|
||||
|
||||
export function useHealthzHealthzGet<TData = Awaited<ReturnType<typeof healthzHealthzGet>>, TError = void>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getHealthzHealthzGetQueryOptions(options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,438 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
useMutation,
|
||||
useQuery
|
||||
} from '@tanstack/react-query';
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
ListFactsParams,
|
||||
ReqExtractFacts,
|
||||
ReqTransitionFact,
|
||||
ReqUpsertFact,
|
||||
ResCategorySchema,
|
||||
ResExtractFacts,
|
||||
ResFact,
|
||||
ResFactList
|
||||
} from '.././model';
|
||||
|
||||
import { customFetch } from '../../mutator/custom-fetch';
|
||||
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 이 사업장의 업종에 존재하는 fact 필드 정의. 관리 화면이 입력 폼을 그리는 데 쓴다.
|
||||
* @summary 업종 fact 스키마
|
||||
*/
|
||||
export const getSchema = (
|
||||
placeId: string,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResCategorySchema>(
|
||||
{url: `/v1/place/${placeId}/fact/schema`, method: 'GET', signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetSchemaQueryKey = (placeId?: string,) => {
|
||||
return [
|
||||
`/v1/place/${placeId}/fact/schema`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetSchemaQueryOptions = <TData = Awaited<ReturnType<typeof getSchema>>, TError = void | HTTPValidationError>(placeId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetSchemaQueryKey(placeId);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({ signal }) => getSchema(placeId, requestOptions, signal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, enabled: !!(placeId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetSchemaQueryResult = NonNullable<Awaited<ReturnType<typeof getSchema>>>
|
||||
export type GetSchemaQueryError = void | HTTPValidationError
|
||||
|
||||
|
||||
export function useGetSchema<TData = Awaited<ReturnType<typeof getSchema>>, TError = void | HTTPValidationError>(
|
||||
placeId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getSchema>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getSchema>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetSchema<TData = Awaited<ReturnType<typeof getSchema>>, TError = void | HTTPValidationError>(
|
||||
placeId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getSchema>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getSchema>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetSchema<TData = Awaited<ReturnType<typeof getSchema>>, TError = void | HTTPValidationError>(
|
||||
placeId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary 업종 fact 스키마
|
||||
*/
|
||||
|
||||
export function useGetSchema<TData = Awaited<ReturnType<typeof getSchema>>, TError = void | HTTPValidationError>(
|
||||
placeId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetSchemaQueryOptions(placeId,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* publishable_only=true 면 ★ 사이트에 나갈 수 있는 것(VERIFIED·CORRECTED)만.
|
||||
* @summary fact 목록
|
||||
*/
|
||||
export const listFacts = (
|
||||
placeId: string,
|
||||
params?: ListFactsParams,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResFactList>(
|
||||
{url: `/v1/place/${placeId}/fact/list`, method: 'GET',
|
||||
params, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getListFactsQueryKey = (placeId?: string,
|
||||
params?: ListFactsParams,) => {
|
||||
return [
|
||||
`/v1/place/${placeId}/fact/list`, ...(params ? [params]: [])
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getListFactsQueryOptions = <TData = Awaited<ReturnType<typeof listFacts>>, TError = void | HTTPValidationError>(placeId: string,
|
||||
params?: ListFactsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listFacts>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getListFactsQueryKey(placeId,params);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listFacts>>> = ({ signal }) => listFacts(placeId,params, requestOptions, signal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, enabled: !!(placeId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listFacts>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type ListFactsQueryResult = NonNullable<Awaited<ReturnType<typeof listFacts>>>
|
||||
export type ListFactsQueryError = void | HTTPValidationError
|
||||
|
||||
|
||||
export function useListFacts<TData = Awaited<ReturnType<typeof listFacts>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params: undefined | ListFactsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listFacts>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listFacts>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listFacts>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListFacts<TData = Awaited<ReturnType<typeof listFacts>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params?: ListFactsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listFacts>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listFacts>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listFacts>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListFacts<TData = Awaited<ReturnType<typeof listFacts>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params?: ListFactsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listFacts>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary fact 목록
|
||||
*/
|
||||
|
||||
export function useListFacts<TData = Awaited<ReturnType<typeof listFacts>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params?: ListFactsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listFacts>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getListFactsQueryOptions(placeId,params,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 같은 key 의 활성 fact 는 EXPIRED 로 밀리고 새 행이 들어간다(값 이력 보존). ★ 자동 수집(api/crawl/llm)은 사장님 수정본(CORRECTED)을 덮어쓸 수 없다.
|
||||
* @summary fact 기록
|
||||
*/
|
||||
export const upsertFact = (
|
||||
placeId: string,
|
||||
reqUpsertFact: ReqUpsertFact,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResFact>(
|
||||
{url: `/v1/place/${placeId}/fact`, method: 'POST',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqUpsertFact, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getUpsertFactMutationOptions = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof upsertFact>>, TError,{placeId: string;data: ReqUpsertFact}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof upsertFact>>, TError,{placeId: string;data: ReqUpsertFact}, TContext> => {
|
||||
|
||||
const mutationKey = ['upsertFact'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof upsertFact>>, {placeId: string;data: ReqUpsertFact}> = (props) => {
|
||||
const {placeId,data} = props ?? {};
|
||||
|
||||
return upsertFact(placeId,data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type UpsertFactMutationResult = NonNullable<Awaited<ReturnType<typeof upsertFact>>>
|
||||
export type UpsertFactMutationBody = ReqUpsertFact
|
||||
export type UpsertFactMutationError = void | HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary fact 기록
|
||||
*/
|
||||
export const useUpsertFact = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof upsertFact>>, TError,{placeId: string;data: ReqUpsertFact}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof upsertFact>>,
|
||||
TError,
|
||||
{placeId: string;data: ReqUpsertFact},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getUpsertFactMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* 허용 전이만 통과한다(FACT_STATUS_TRANSITIONS). CORRECTED 로 갈 때는 value 가 필수다.
|
||||
* @summary 검증 상태 전이
|
||||
*/
|
||||
export const transitionFact = (
|
||||
placeId: string,
|
||||
factId: string,
|
||||
reqTransitionFact: ReqTransitionFact,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResFact>(
|
||||
{url: `/v1/place/${placeId}/fact/${factId}/transition`, method: 'POST',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqTransitionFact, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getTransitionFactMutationOptions = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof transitionFact>>, TError,{placeId: string;factId: string;data: ReqTransitionFact}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof transitionFact>>, TError,{placeId: string;factId: string;data: ReqTransitionFact}, TContext> => {
|
||||
|
||||
const mutationKey = ['transitionFact'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof transitionFact>>, {placeId: string;factId: string;data: ReqTransitionFact}> = (props) => {
|
||||
const {placeId,factId,data} = props ?? {};
|
||||
|
||||
return transitionFact(placeId,factId,data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type TransitionFactMutationResult = NonNullable<Awaited<ReturnType<typeof transitionFact>>>
|
||||
export type TransitionFactMutationBody = ReqTransitionFact
|
||||
export type TransitionFactMutationError = void | HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary 검증 상태 전이
|
||||
*/
|
||||
export const useTransitionFact = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof transitionFact>>, TError,{placeId: string;factId: string;data: ReqTransitionFact}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof transitionFact>>,
|
||||
TError,
|
||||
{placeId: string;factId: string;data: ReqTransitionFact},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getTransitionFactMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* 사장님이 붙여넣은 소개글·안내문에서 업종 스키마 fact 를 뽑는다. ★ 뽑은 값의 **근거 문장이 원문에 실제로 있는지 대조**해 통과한 것만 저장한다. 저장된 값은 전부 후보(UNVERIFIED)라 사장님이 확인해야 사이트에 나간다. 버려진 항목은 사유와 함께 돌려준다.
|
||||
* @summary 붙여넣은 텍스트에서 fact 추출
|
||||
*/
|
||||
export const extractFactsFromText = (
|
||||
placeId: string,
|
||||
reqExtractFacts: ReqExtractFacts,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResExtractFacts>(
|
||||
{url: `/v1/place/${placeId}/fact/extract`, method: 'POST',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqExtractFacts, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getExtractFactsFromTextMutationOptions = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof extractFactsFromText>>, TError,{placeId: string;data: ReqExtractFacts}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof extractFactsFromText>>, TError,{placeId: string;data: ReqExtractFacts}, TContext> => {
|
||||
|
||||
const mutationKey = ['extractFactsFromText'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof extractFactsFromText>>, {placeId: string;data: ReqExtractFacts}> = (props) => {
|
||||
const {placeId,data} = props ?? {};
|
||||
|
||||
return extractFactsFromText(placeId,data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type ExtractFactsFromTextMutationResult = NonNullable<Awaited<ReturnType<typeof extractFactsFromText>>>
|
||||
export type ExtractFactsFromTextMutationBody = ReqExtractFacts
|
||||
export type ExtractFactsFromTextMutationError = void | HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary 붙여넣은 텍스트에서 fact 추출
|
||||
*/
|
||||
export const useExtractFactsFromText = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof extractFactsFromText>>, TError,{placeId: string;data: ReqExtractFacts}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof extractFactsFromText>>,
|
||||
TError,
|
||||
{placeId: string;data: ReqExtractFacts},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getExtractFactsFromTextMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
useMutation,
|
||||
useQuery
|
||||
} from '@tanstack/react-query';
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
ListFaqsParams,
|
||||
ReqCreateFaq,
|
||||
ReqTransitionFaq,
|
||||
ResFaq,
|
||||
ResFaqList
|
||||
} from '.././model';
|
||||
|
||||
import { customFetch } from '../../mutator/custom-fetch';
|
||||
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* publishable_only=true 면 ★ 사이트에 나갈 수 있는 것(VERIFIED·CORRECTED)만. 기본은 승인 대기(UNVERIFIED)까지 함께 준다 — 승인할 대상을 봐야 하기 때문이다.
|
||||
* @summary FAQ 목록
|
||||
*/
|
||||
export const listFaqs = (
|
||||
placeId: string,
|
||||
params?: ListFaqsParams,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResFaqList>(
|
||||
{url: `/v1/place/${placeId}/faq/list`, method: 'GET',
|
||||
params, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getListFaqsQueryKey = (placeId?: string,
|
||||
params?: ListFaqsParams,) => {
|
||||
return [
|
||||
`/v1/place/${placeId}/faq/list`, ...(params ? [params]: [])
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getListFaqsQueryOptions = <TData = Awaited<ReturnType<typeof listFaqs>>, TError = void | HTTPValidationError>(placeId: string,
|
||||
params?: ListFaqsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listFaqs>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getListFaqsQueryKey(placeId,params);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listFaqs>>> = ({ signal }) => listFaqs(placeId,params, requestOptions, signal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, enabled: !!(placeId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listFaqs>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type ListFaqsQueryResult = NonNullable<Awaited<ReturnType<typeof listFaqs>>>
|
||||
export type ListFaqsQueryError = void | HTTPValidationError
|
||||
|
||||
|
||||
export function useListFaqs<TData = Awaited<ReturnType<typeof listFaqs>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params: undefined | ListFaqsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listFaqs>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listFaqs>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listFaqs>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListFaqs<TData = Awaited<ReturnType<typeof listFaqs>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params?: ListFaqsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listFaqs>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listFaqs>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listFaqs>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListFaqs<TData = Awaited<ReturnType<typeof listFaqs>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params?: ListFaqsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listFaqs>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary FAQ 목록
|
||||
*/
|
||||
|
||||
export function useListFaqs<TData = Awaited<ReturnType<typeof listFaqs>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params?: ListFaqsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listFaqs>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getListFaqsQueryOptions(placeId,params,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 사장님이 직접 쓴 FAQ. fact 의 owner 입력과 같이 바로 노출값(VERIFIED)이 된다 — 사람이 곧 출처다. 출처(generated_by)는 서버가 OWNER 로 고정한다.
|
||||
* @summary FAQ 직접 추가
|
||||
*/
|
||||
export const createFaq = (
|
||||
placeId: string,
|
||||
reqCreateFaq: ReqCreateFaq,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResFaq>(
|
||||
{url: `/v1/place/${placeId}/faq`, method: 'POST',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqCreateFaq, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getCreateFaqMutationOptions = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createFaq>>, TError,{placeId: string;data: ReqCreateFaq}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof createFaq>>, TError,{placeId: string;data: ReqCreateFaq}, TContext> => {
|
||||
|
||||
const mutationKey = ['createFaq'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof createFaq>>, {placeId: string;data: ReqCreateFaq}> = (props) => {
|
||||
const {placeId,data} = props ?? {};
|
||||
|
||||
return createFaq(placeId,data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type CreateFaqMutationResult = NonNullable<Awaited<ReturnType<typeof createFaq>>>
|
||||
export type CreateFaqMutationBody = ReqCreateFaq
|
||||
export type CreateFaqMutationError = void | HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary FAQ 직접 추가
|
||||
*/
|
||||
export const useCreateFaq = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createFaq>>, TError,{placeId: string;data: ReqCreateFaq}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createFaq>>,
|
||||
TError,
|
||||
{placeId: string;data: ReqCreateFaq},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getCreateFaqMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* 허용 전이만 통과한다(FACT_STATUS_TRANSITIONS — fact 와 같은 표). CORRECTED 로 갈 때는 고친 question/answer 중 하나 이상이 필요하고, 그 뒤로는 ★ 잠긴 상태라 재생성이 덮어쓰지 못한다.
|
||||
* @summary 검증 상태 전이(승인·정정·반려)
|
||||
*/
|
||||
export const transitionFaq = (
|
||||
placeId: string,
|
||||
faqId: string,
|
||||
reqTransitionFaq: ReqTransitionFaq,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResFaq>(
|
||||
{url: `/v1/place/${placeId}/faq/${faqId}/transition`, method: 'POST',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqTransitionFaq, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getTransitionFaqMutationOptions = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof transitionFaq>>, TError,{placeId: string;faqId: string;data: ReqTransitionFaq}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof transitionFaq>>, TError,{placeId: string;faqId: string;data: ReqTransitionFaq}, TContext> => {
|
||||
|
||||
const mutationKey = ['transitionFaq'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof transitionFaq>>, {placeId: string;faqId: string;data: ReqTransitionFaq}> = (props) => {
|
||||
const {placeId,faqId,data} = props ?? {};
|
||||
|
||||
return transitionFaq(placeId,faqId,data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type TransitionFaqMutationResult = NonNullable<Awaited<ReturnType<typeof transitionFaq>>>
|
||||
export type TransitionFaqMutationBody = ReqTransitionFaq
|
||||
export type TransitionFaqMutationError = void | HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary 검증 상태 전이(승인·정정·반려)
|
||||
*/
|
||||
export const useTransitionFaq = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof transitionFaq>>, TError,{placeId: string;faqId: string;data: ReqTransitionFaq}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof transitionFaq>>,
|
||||
TError,
|
||||
{placeId: string;faqId: string;data: ReqTransitionFaq},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getTransitionFaqMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
useMutation,
|
||||
useQuery
|
||||
} from '@tanstack/react-query';
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
ResJob,
|
||||
ResJobOps
|
||||
} from '.././model';
|
||||
|
||||
import { customFetch } from '../../mutator/custom-fetch';
|
||||
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 상태별 카운트 + 큐 지연 + 최근 1시간 DEAD + 좀비(stuck). 내부 운영 전용.
|
||||
* @summary 큐 운영 스냅샷
|
||||
*/
|
||||
export const jobOps = (
|
||||
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResJobOps>(
|
||||
{url: `/v1/job/ops`, method: 'GET', signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getJobOpsQueryKey = () => {
|
||||
return [
|
||||
`/v1/job/ops`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getJobOpsQueryOptions = <TData = Awaited<ReturnType<typeof jobOps>>, TError = void>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof jobOps>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getJobOpsQueryKey();
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof jobOps>>> = ({ signal }) => jobOps(requestOptions, signal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof jobOps>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type JobOpsQueryResult = NonNullable<Awaited<ReturnType<typeof jobOps>>>
|
||||
export type JobOpsQueryError = void
|
||||
|
||||
|
||||
export function useJobOps<TData = Awaited<ReturnType<typeof jobOps>>, TError = void>(
|
||||
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof jobOps>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof jobOps>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof jobOps>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useJobOps<TData = Awaited<ReturnType<typeof jobOps>>, TError = void>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof jobOps>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof jobOps>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof jobOps>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useJobOps<TData = Awaited<ReturnType<typeof jobOps>>, TError = void>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof jobOps>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary 큐 운영 스냅샷
|
||||
*/
|
||||
|
||||
export function useJobOps<TData = Awaited<ReturnType<typeof jobOps>>, TError = void>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof jobOps>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getJobOpsQueryOptions(options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @summary 잡 상태 조회(폴링)
|
||||
*/
|
||||
export const getJob = (
|
||||
jobId: string,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResJob>(
|
||||
{url: `/v1/job/${jobId}`, method: 'GET', signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetJobQueryKey = (jobId?: string,) => {
|
||||
return [
|
||||
`/v1/job/${jobId}`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetJobQueryOptions = <TData = Awaited<ReturnType<typeof getJob>>, TError = void | HTTPValidationError>(jobId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetJobQueryKey(jobId);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getJob>>> = ({ signal }) => getJob(jobId, requestOptions, signal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, enabled: !!(jobId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetJobQueryResult = NonNullable<Awaited<ReturnType<typeof getJob>>>
|
||||
export type GetJobQueryError = void | HTTPValidationError
|
||||
|
||||
|
||||
export function useGetJob<TData = Awaited<ReturnType<typeof getJob>>, TError = void | HTTPValidationError>(
|
||||
jobId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getJob>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getJob>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetJob<TData = Awaited<ReturnType<typeof getJob>>, TError = void | HTTPValidationError>(
|
||||
jobId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getJob>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getJob>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetJob<TData = Awaited<ReturnType<typeof getJob>>, TError = void | HTTPValidationError>(
|
||||
jobId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary 잡 상태 조회(폴링)
|
||||
*/
|
||||
|
||||
export function useGetJob<TData = Awaited<ReturnType<typeof getJob>>, TError = void | HTTPValidationError>(
|
||||
jobId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getJob>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetJobQueryOptions(jobId,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* max_attempts 를 소진해 dead-letter 로 간 잡을 다시 대기로 돌린다. 내부 운영 전용.
|
||||
* @summary DEAD 잡 재큐
|
||||
*/
|
||||
export const requeueJob = (
|
||||
jobId: string,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResJob>(
|
||||
{url: `/v1/job/${jobId}/requeue`, method: 'POST', signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getRequeueJobMutationOptions = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof requeueJob>>, TError,{jobId: string}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof requeueJob>>, TError,{jobId: string}, TContext> => {
|
||||
|
||||
const mutationKey = ['requeueJob'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof requeueJob>>, {jobId: string}> = (props) => {
|
||||
const {jobId} = props ?? {};
|
||||
|
||||
return requeueJob(jobId,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type RequeueJobMutationResult = NonNullable<Awaited<ReturnType<typeof requeueJob>>>
|
||||
|
||||
export type RequeueJobMutationError = void | HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary DEAD 잡 재큐
|
||||
*/
|
||||
export const useRequeueJob = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof requeueJob>>, TError,{jobId: string}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof requeueJob>>,
|
||||
TError,
|
||||
{jobId: string},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getRequeueJobMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,484 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
useMutation,
|
||||
useQuery
|
||||
} from '@tanstack/react-query';
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
import type {
|
||||
GetWeatherParams,
|
||||
HTTPValidationError,
|
||||
ListContentsParams,
|
||||
ReqPublishLocalContent,
|
||||
ReqSyncFestivals,
|
||||
ReqUpdateLocalContent,
|
||||
ResLocalContentList,
|
||||
ResSyncFestivals,
|
||||
ResWeather
|
||||
} from '.././model';
|
||||
|
||||
import { customFetch } from '../../mutator/custom-fetch';
|
||||
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @summary List Contents
|
||||
*/
|
||||
export const listContents = (
|
||||
params?: ListContentsParams,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResLocalContentList>(
|
||||
{url: `/v1/admin/local-content`, method: 'GET',
|
||||
params, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getListContentsQueryKey = (params?: ListContentsParams,) => {
|
||||
return [
|
||||
`/v1/admin/local-content`, ...(params ? [params]: [])
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getListContentsQueryOptions = <TData = Awaited<ReturnType<typeof listContents>>, TError = HTTPValidationError>(params?: ListContentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listContents>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getListContentsQueryKey(params);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listContents>>> = ({ signal }) => listContents(params, requestOptions, signal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listContents>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type ListContentsQueryResult = NonNullable<Awaited<ReturnType<typeof listContents>>>
|
||||
export type ListContentsQueryError = HTTPValidationError
|
||||
|
||||
|
||||
export function useListContents<TData = Awaited<ReturnType<typeof listContents>>, TError = HTTPValidationError>(
|
||||
params: undefined | ListContentsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listContents>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listContents>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listContents>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListContents<TData = Awaited<ReturnType<typeof listContents>>, TError = HTTPValidationError>(
|
||||
params?: ListContentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listContents>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listContents>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listContents>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListContents<TData = Awaited<ReturnType<typeof listContents>>, TError = HTTPValidationError>(
|
||||
params?: ListContentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listContents>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary List Contents
|
||||
*/
|
||||
|
||||
export function useListContents<TData = Awaited<ReturnType<typeof listContents>>, TError = HTTPValidationError>(
|
||||
params?: ListContentsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listContents>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getListContentsQueryOptions(params,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @summary Sync Festivals
|
||||
*/
|
||||
export const syncFestivals = (
|
||||
reqSyncFestivals: ReqSyncFestivals,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResSyncFestivals>(
|
||||
{url: `/v1/admin/local-content/sync-festivals`, method: 'POST',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqSyncFestivals, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getSyncFestivalsMutationOptions = <TError = HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof syncFestivals>>, TError,{data: ReqSyncFestivals}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof syncFestivals>>, TError,{data: ReqSyncFestivals}, TContext> => {
|
||||
|
||||
const mutationKey = ['syncFestivals'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof syncFestivals>>, {data: ReqSyncFestivals}> = (props) => {
|
||||
const {data} = props ?? {};
|
||||
|
||||
return syncFestivals(data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type SyncFestivalsMutationResult = NonNullable<Awaited<ReturnType<typeof syncFestivals>>>
|
||||
export type SyncFestivalsMutationBody = ReqSyncFestivals
|
||||
export type SyncFestivalsMutationError = HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary Sync Festivals
|
||||
*/
|
||||
export const useSyncFestivals = <TError = HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof syncFestivals>>, TError,{data: ReqSyncFestivals}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof syncFestivals>>,
|
||||
TError,
|
||||
{data: ReqSyncFestivals},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getSyncFestivalsMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* @summary Publish
|
||||
*/
|
||||
export const publish = (
|
||||
reqPublishLocalContent: ReqPublishLocalContent,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResLocalContentList>(
|
||||
{url: `/v1/admin/local-content/publish`, method: 'POST',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqPublishLocalContent, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getPublishMutationOptions = <TError = HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof publish>>, TError,{data: ReqPublishLocalContent}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof publish>>, TError,{data: ReqPublishLocalContent}, TContext> => {
|
||||
|
||||
const mutationKey = ['publish'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof publish>>, {data: ReqPublishLocalContent}> = (props) => {
|
||||
const {data} = props ?? {};
|
||||
|
||||
return publish(data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type PublishMutationResult = NonNullable<Awaited<ReturnType<typeof publish>>>
|
||||
export type PublishMutationBody = ReqPublishLocalContent
|
||||
export type PublishMutationError = HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary Publish
|
||||
*/
|
||||
export const usePublish = <TError = HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof publish>>, TError,{data: ReqPublishLocalContent}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof publish>>,
|
||||
TError,
|
||||
{data: ReqPublishLocalContent},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getPublishMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* @summary Update Content
|
||||
*/
|
||||
export const updateContent = (
|
||||
contentId: string,
|
||||
reqUpdateLocalContent: ReqUpdateLocalContent,
|
||||
options?: SecondParameter<typeof customFetch>,) => {
|
||||
|
||||
|
||||
return customFetch<ResLocalContentList>(
|
||||
{url: `/v1/admin/local-content/${contentId}`, method: 'PATCH',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqUpdateLocalContent
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getUpdateContentMutationOptions = <TError = HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateContent>>, TError,{contentId: string;data: ReqUpdateLocalContent}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof updateContent>>, TError,{contentId: string;data: ReqUpdateLocalContent}, TContext> => {
|
||||
|
||||
const mutationKey = ['updateContent'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof updateContent>>, {contentId: string;data: ReqUpdateLocalContent}> = (props) => {
|
||||
const {contentId,data} = props ?? {};
|
||||
|
||||
return updateContent(contentId,data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type UpdateContentMutationResult = NonNullable<Awaited<ReturnType<typeof updateContent>>>
|
||||
export type UpdateContentMutationBody = ReqUpdateLocalContent
|
||||
export type UpdateContentMutationError = HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary Update Content
|
||||
*/
|
||||
export const useUpdateContent = <TError = HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateContent>>, TError,{contentId: string;data: ReqUpdateLocalContent}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateContent>>,
|
||||
TError,
|
||||
{contentId: string;data: ReqUpdateLocalContent},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getUpdateContentMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* @summary End Content
|
||||
*/
|
||||
export const endContent = (
|
||||
contentId: string,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResLocalContentList>(
|
||||
{url: `/v1/admin/local-content/${contentId}/end`, method: 'POST', signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getEndContentMutationOptions = <TError = HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof endContent>>, TError,{contentId: string}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof endContent>>, TError,{contentId: string}, TContext> => {
|
||||
|
||||
const mutationKey = ['endContent'];
|
||||
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||
options
|
||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||
: {mutation: { mutationKey, }, request: undefined};
|
||||
|
||||
|
||||
|
||||
|
||||
const mutationFn: MutationFunction<Awaited<ReturnType<typeof endContent>>, {contentId: string}> = (props) => {
|
||||
const {contentId} = props ?? {};
|
||||
|
||||
return endContent(contentId,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type EndContentMutationResult = NonNullable<Awaited<ReturnType<typeof endContent>>>
|
||||
|
||||
export type EndContentMutationError = HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary End Content
|
||||
*/
|
||||
export const useEndContent = <TError = HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof endContent>>, TError,{contentId: string}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof endContent>>,
|
||||
TError,
|
||||
{contentId: string},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getEndContentMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* @summary 현재 날씨 조회 (cache-aside)
|
||||
*/
|
||||
export const getWeather = (
|
||||
params: GetWeatherParams,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResWeather>(
|
||||
{url: `/v1/local/weather`, method: 'GET',
|
||||
params, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetWeatherQueryKey = (params?: GetWeatherParams,) => {
|
||||
return [
|
||||
`/v1/local/weather`, ...(params ? [params]: [])
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetWeatherQueryOptions = <TData = Awaited<ReturnType<typeof getWeather>>, TError = HTTPValidationError>(params: GetWeatherParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getWeather>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetWeatherQueryKey(params);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getWeather>>> = ({ signal }) => getWeather(params, requestOptions, signal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getWeather>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetWeatherQueryResult = NonNullable<Awaited<ReturnType<typeof getWeather>>>
|
||||
export type GetWeatherQueryError = HTTPValidationError
|
||||
|
||||
|
||||
export function useGetWeather<TData = Awaited<ReturnType<typeof getWeather>>, TError = HTTPValidationError>(
|
||||
params: GetWeatherParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getWeather>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getWeather>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getWeather>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetWeather<TData = Awaited<ReturnType<typeof getWeather>>, TError = HTTPValidationError>(
|
||||
params: GetWeatherParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getWeather>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getWeather>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getWeather>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetWeather<TData = Awaited<ReturnType<typeof getWeather>>, TError = HTTPValidationError>(
|
||||
params: GetWeatherParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getWeather>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary 현재 날씨 조회 (cache-aside)
|
||||
*/
|
||||
|
||||
export function useGetWeather<TData = Awaited<ReturnType<typeof getWeather>>, TError = HTTPValidationError>(
|
||||
params: GetWeatherParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getWeather>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetWeatherQueryOptions(params,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
useQuery
|
||||
} from '@tanstack/react-query';
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseQueryOptions,
|
||||
UseQueryResult
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
ListMediaParams,
|
||||
ResMediaList
|
||||
} from '.././model';
|
||||
|
||||
import { customFetch } from '../../mutator/custom-fetch';
|
||||
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* publishable_only=true 면 ★ 사이트에 실제로 나갈 수 있는 것(승인 + alt 있음)만 — 빌드 스냅샷과 같은 기준이다. unit_id 를 주면 그 객실·메뉴 사진만. ★ 응답에는 항상 source_type(owner/crawl)과 origin_url 이 실린다 — 크롤링 이미지 재게시 권리가 미결이라(docs/DECISIONS.md 1-2) 결론에 따라 CRAWL 을 통째로 걸러내야 하고, 화면이 출처를 모르면 그 판단을 못 한다.
|
||||
* @summary 사진 목록
|
||||
*/
|
||||
export const listMedia = (
|
||||
placeId: string,
|
||||
params?: ListMediaParams,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResMediaList>(
|
||||
{url: `/v1/place/${placeId}/media/list`, method: 'GET',
|
||||
params, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getListMediaQueryKey = (placeId?: string,
|
||||
params?: ListMediaParams,) => {
|
||||
return [
|
||||
`/v1/place/${placeId}/media/list`, ...(params ? [params]: [])
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getListMediaQueryOptions = <TData = Awaited<ReturnType<typeof listMedia>>, TError = void | HTTPValidationError>(placeId: string,
|
||||
params?: ListMediaParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMedia>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getListMediaQueryKey(placeId,params);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listMedia>>> = ({ signal }) => listMedia(placeId,params, requestOptions, signal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, enabled: !!(placeId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listMedia>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type ListMediaQueryResult = NonNullable<Awaited<ReturnType<typeof listMedia>>>
|
||||
export type ListMediaQueryError = void | HTTPValidationError
|
||||
|
||||
|
||||
export function useListMedia<TData = Awaited<ReturnType<typeof listMedia>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params: undefined | ListMediaParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMedia>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listMedia>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listMedia>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListMedia<TData = Awaited<ReturnType<typeof listMedia>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params?: ListMediaParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMedia>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listMedia>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listMedia>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListMedia<TData = Awaited<ReturnType<typeof listMedia>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params?: ListMediaParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMedia>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary 사진 목록
|
||||
*/
|
||||
|
||||
export function useListMedia<TData = Awaited<ReturnType<typeof listMedia>>, TError = void | HTTPValidationError>(
|
||||
placeId: string,
|
||||
params?: ListMediaParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMedia>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getListMediaQueryOptions(placeId,params,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey ;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { AuditCheckDataRecommendation } from './auditCheckDataRecommendation';
|
||||
|
||||
export interface AuditCheckData {
|
||||
id: string;
|
||||
group: string;
|
||||
label: string;
|
||||
points: number;
|
||||
earned: number;
|
||||
status: string;
|
||||
detail: string;
|
||||
recommendation?: AuditCheckDataRecommendation;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type AuditCheckDataRecommendation = string | null;
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* site_versions.build_status 코드값. 정적 빌드는 개별 재빌드 단위로 돈다.
|
||||
*/
|
||||
export type BuildStatus = typeof BuildStatus[keyof typeof BuildStatus];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const BuildStatus = {
|
||||
PENDING: 1,
|
||||
BUILDING: 2,
|
||||
BUILT: 3,
|
||||
FAILED: 4,
|
||||
} as const;
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CheckSlugParams = {
|
||||
/**
|
||||
* 쓰고 싶은 주소(예: doflo)
|
||||
*/
|
||||
slug: string;
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface CompanyData {
|
||||
company_id?: string;
|
||||
name?: string;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ErrorInfoSuccess } from './errorInfoSuccess';
|
||||
import type { ErrorInfoCode } from './errorInfoCode';
|
||||
import type { ErrorInfoDesc } from './errorInfoDesc';
|
||||
|
||||
/**
|
||||
* 모든 응답에 공통으로 실리는 결과 정보. result.success / code / desc 로 내려간다.
|
||||
*/
|
||||
export interface ErrorInfo {
|
||||
success?: ErrorInfoSuccess;
|
||||
code?: ErrorInfoCode;
|
||||
desc?: ErrorInfoDesc;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ErrorInfoCode = number | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ErrorInfoDesc = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ErrorInfoSuccess = boolean | null;
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* places.external_source 코드값. 동일 업소 검증에 쓴 외부 장소 DB.
|
||||
|
||||
카카오는 안정적인 고유 place id 를 준다 → 그걸로 중복 등록을 막는다.
|
||||
네이버는 고유 id 가 없다(응답의 link 는 업체 홈페이지다) → 상호명+도로명주소로 막는다.
|
||||
*/
|
||||
export type ExternalPlaceSource = typeof ExternalPlaceSource[keyof typeof ExternalPlaceSource];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const ExternalPlaceSource = {
|
||||
KAKAO: 1,
|
||||
NAVER: 2,
|
||||
} as const;
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { FactDataUnitId } from './factDataUnitId';
|
||||
import type { FactDataValue } from './factDataValue';
|
||||
import type { FactDataUnit } from './factDataUnit';
|
||||
import type { SourceType } from './sourceType';
|
||||
import type { FactDataSourceUrl } from './factDataSourceUrl';
|
||||
import type { FactDataCollectedAt } from './factDataCollectedAt';
|
||||
import type { FactDataVerifiedBy } from './factDataVerifiedBy';
|
||||
import type { FactDataVerifiedAt } from './factDataVerifiedAt';
|
||||
import type { FactStatus } from './factStatus';
|
||||
import type { FactDataExpiresAt } from './factDataExpiresAt';
|
||||
|
||||
export interface FactData {
|
||||
fact_id: string;
|
||||
place_id: string;
|
||||
unit_id?: FactDataUnitId;
|
||||
key: string;
|
||||
value?: FactDataValue;
|
||||
unit?: FactDataUnit;
|
||||
source_type: SourceType;
|
||||
source_url?: FactDataSourceUrl;
|
||||
collected_at?: FactDataCollectedAt;
|
||||
verified_by?: FactDataVerifiedBy;
|
||||
verified_at?: FactDataVerifiedAt;
|
||||
status: FactStatus;
|
||||
expires_at?: FactDataExpiresAt;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FactDataCollectedAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FactDataExpiresAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FactDataSourceUrl = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FactDataUnit = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FactDataUnitId = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FactDataValue = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FactDataVerifiedAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FactDataVerifiedBy = string | null;
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* facts.status / faqs.status / routes.status 공용 검증 상태.
|
||||
★ VERIFIED 와 CORRECTED 만 사이트에 노출한다(PUBLISHABLE_FACT_STATUSES).
|
||||
*/
|
||||
export type FactStatus = typeof FactStatus[keyof typeof FactStatus];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const FactStatus = {
|
||||
UNVERIFIED: 1,
|
||||
PENDING_OWNER: 2,
|
||||
VERIFIED: 3,
|
||||
CORRECTED: 4,
|
||||
REJECTED: 5,
|
||||
EXPIRED: 6,
|
||||
} as const;
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* fact 기록 결과. 재수집(업데이트)이 무엇을 했는지 호출측이 알아야 한다 —
|
||||
특히 사이트 재빌드가 필요한 경우(PUBLISHED_REPLACED)를 구분해야 한다.
|
||||
*/
|
||||
export type FactWriteOutcome = typeof FactWriteOutcome[keyof typeof FactWriteOutcome];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const FactWriteOutcome = {
|
||||
PUBLISHED_CREATED: 1,
|
||||
PUBLISHED_REPLACED: 2,
|
||||
REFRESHED: 3,
|
||||
CANDIDATE_CREATED: 4,
|
||||
CANDIDATE_UPDATED: 5,
|
||||
} as const;
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { FaqDataSourceFactIds } from './faqDataSourceFactIds';
|
||||
import type { SourceType } from './sourceType';
|
||||
import type { FactStatus } from './factStatus';
|
||||
import type { FaqDataCreatedAt } from './faqDataCreatedAt';
|
||||
import type { FaqDataUpdatedAt } from './faqDataUpdatedAt';
|
||||
|
||||
export interface FaqData {
|
||||
faq_id: string;
|
||||
place_id: string;
|
||||
question: string;
|
||||
answer: string;
|
||||
source_fact_ids?: FaqDataSourceFactIds;
|
||||
generated_by: SourceType;
|
||||
status: FactStatus;
|
||||
sort_order?: number;
|
||||
created_at?: FaqDataCreatedAt;
|
||||
updated_at?: FaqDataUpdatedAt;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FaqDataCreatedAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FaqDataSourceFactIds = string[] | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FaqDataUpdatedAt = string | null;
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { FieldSpecDataUnit } from './fieldSpecDataUnit';
|
||||
|
||||
/**
|
||||
* 업종 스키마의 필드 정의 — 관리 화면이 입력 폼을 그리는 데 쓴다.
|
||||
*/
|
||||
export interface FieldSpecData {
|
||||
key: string;
|
||||
label: string;
|
||||
type: string;
|
||||
scope: string;
|
||||
required: boolean;
|
||||
critical: boolean;
|
||||
allow_llm: boolean;
|
||||
unit?: FieldSpecDataUnit;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type FieldSpecDataUnit = string | null;
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GetWeatherParams = {
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 10
|
||||
*/
|
||||
region_code: string;
|
||||
/**
|
||||
* @minimum -90
|
||||
* @maximum 90
|
||||
*/
|
||||
latitude: number;
|
||||
/**
|
||||
* @minimum -180
|
||||
* @maximum 180
|
||||
*/
|
||||
longitude: number;
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ValidationError } from './validationError';
|
||||
|
||||
export interface HTTPValidationError {
|
||||
detail?: ValidationError[];
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export * from './auditCheckData';
|
||||
export * from './auditCheckDataRecommendation';
|
||||
export * from './buildStatus';
|
||||
export * from './checkSlugParams';
|
||||
export * from './companyData';
|
||||
export * from './errorInfo';
|
||||
export * from './errorInfoCode';
|
||||
export * from './errorInfoDesc';
|
||||
export * from './errorInfoSuccess';
|
||||
export * from './externalPlaceSource';
|
||||
export * from './factData';
|
||||
export * from './factDataCollectedAt';
|
||||
export * from './factDataExpiresAt';
|
||||
export * from './factDataSourceUrl';
|
||||
export * from './factDataUnit';
|
||||
export * from './factDataUnitId';
|
||||
export * from './factDataValue';
|
||||
export * from './factDataVerifiedAt';
|
||||
export * from './factDataVerifiedBy';
|
||||
export * from './factStatus';
|
||||
export * from './factWriteOutcome';
|
||||
export * from './faqData';
|
||||
export * from './faqDataCreatedAt';
|
||||
export * from './faqDataSourceFactIds';
|
||||
export * from './faqDataUpdatedAt';
|
||||
export * from './fieldSpecData';
|
||||
export * from './fieldSpecDataUnit';
|
||||
export * from './getWeatherParams';
|
||||
export * from './hTTPValidationError';
|
||||
export * from './jobData';
|
||||
export * from './jobDataCreatedAt';
|
||||
export * from './jobDataLastError';
|
||||
export * from './jobDataResult';
|
||||
export * from './jobDataRunAfter';
|
||||
export * from './jobDataRunStartedAt';
|
||||
export * from './jobDataUpdatedAt';
|
||||
export * from './jobStatus';
|
||||
export * from './jobType';
|
||||
export * from './linkChannel';
|
||||
export * from './linkData';
|
||||
export * from './linkDataConfirmedAt';
|
||||
export * from './linkDataDiscoveredAt';
|
||||
export * from './linkDataTitle';
|
||||
export * from './listContentsParams';
|
||||
export * from './listFactsParams';
|
||||
export * from './listFaqsParams';
|
||||
export * from './listLinksParams';
|
||||
export * from './listMediaParams';
|
||||
export * from './listPlacesParams';
|
||||
export * from './localContentData';
|
||||
export * from './localContentDataBody';
|
||||
export * from './localContentDataCollectedAt';
|
||||
export * from './localContentDataDisplayEndAt';
|
||||
export * from './localContentDataDisplayStartAt';
|
||||
export * from './localContentDataExternalId';
|
||||
export * from './localContentDataPublishedAt';
|
||||
export * from './localContentDataTitle';
|
||||
export * from './localContentStatus';
|
||||
export * from './localContentType';
|
||||
export * from './localSource';
|
||||
export * from './mediaData';
|
||||
export * from './mediaDataAltText';
|
||||
export * from './mediaDataCreatedAt';
|
||||
export * from './mediaDataHeight';
|
||||
export * from './mediaDataLabel';
|
||||
export * from './mediaDataOriginUrl';
|
||||
export * from './mediaDataSourceUrl';
|
||||
export * from './mediaDataUnitId';
|
||||
export * from './mediaDataVisionConfidence';
|
||||
export * from './mediaDataWidth';
|
||||
export * from './mediaStatus';
|
||||
export * from './placeCandidate';
|
||||
export * from './placeCandidateAddress';
|
||||
export * from './placeCandidateCategoryName';
|
||||
export * from './placeCandidateExternalPlaceId';
|
||||
export * from './placeCandidateLatitude';
|
||||
export * from './placeCandidateLongitude';
|
||||
export * from './placeCandidateNaverPlaceUrl';
|
||||
export * from './placeCandidatePhone';
|
||||
export * from './placeCandidatePlaceUrl';
|
||||
export * from './placeCandidateRoadAddress';
|
||||
export * from './placeCategory';
|
||||
export * from './placeData';
|
||||
export * from './placeDataAddress';
|
||||
export * from './placeDataContentUpdatedAt';
|
||||
export * from './placeDataCreatedAt';
|
||||
export * from './placeDataExternalPlaceId';
|
||||
export * from './placeDataExternalSource';
|
||||
export * from './placeDataLatitude';
|
||||
export * from './placeDataLongitude';
|
||||
export * from './placeDataOwnerUserId';
|
||||
export * from './placeDataPhone';
|
||||
export * from './placeDataRegionCode';
|
||||
export * from './placeDataRoadAddress';
|
||||
export * from './placeDataVerifiedAt';
|
||||
export * from './placeStatus';
|
||||
export * from './publishAction';
|
||||
export * from './publishLogData';
|
||||
export * from './publishLogDataCreatedAt';
|
||||
export * from './publishLogDataDetail';
|
||||
export * from './publishLogDataRejectReason';
|
||||
export * from './publishRejectReason';
|
||||
export * from './publishResult';
|
||||
export * from './renderStatusData';
|
||||
export * from './renderStatusDataError';
|
||||
export * from './renderStatusDataRenderedAt';
|
||||
export * from './renderStatusDataRenderedVersion';
|
||||
export * from './reqCreateFaq';
|
||||
export * from './reqCreateFaqSortOrder';
|
||||
export * from './reqCreateLink';
|
||||
export * from './reqCreateLinkTitle';
|
||||
export * from './reqCreatePlace';
|
||||
export * from './reqCreatePlaceOwnerUserId';
|
||||
export * from './reqCreateUnit';
|
||||
export * from './reqExtractFacts';
|
||||
export * from './reqLogin';
|
||||
export * from './reqPublishLocalContent';
|
||||
export * from './reqSiteSlug';
|
||||
export * from './reqSiteStatus';
|
||||
export * from './reqSiteTemplate';
|
||||
export * from './reqSiteTheme';
|
||||
export * from './reqSiteThemeTheme';
|
||||
export * from './reqStartBuild';
|
||||
export * from './reqStartCollect';
|
||||
export * from './reqStartCopy';
|
||||
export * from './reqStartVision';
|
||||
export * from './reqSyncFestivals';
|
||||
export * from './reqSyncFestivalsAreaCode';
|
||||
export * from './reqSyncFestivalsStartDate';
|
||||
export * from './reqTransitionFact';
|
||||
export * from './reqTransitionFactValue';
|
||||
export * from './reqTransitionFaq';
|
||||
export * from './reqTransitionFaqAnswer';
|
||||
export * from './reqTransitionFaqQuestion';
|
||||
export * from './reqUpdateLocalContent';
|
||||
export * from './reqUpdateLocalContentBody';
|
||||
export * from './reqUpdateLocalContentBodyAnyOf';
|
||||
export * from './reqUpdateLocalContentDisplayEndAt';
|
||||
export * from './reqUpdateLocalContentDisplayStartAt';
|
||||
export * from './reqUpdateLocalContentTitle';
|
||||
export * from './reqUpdateMe';
|
||||
export * from './reqUpdateMeContactNumber';
|
||||
export * from './reqUpdateMeEmail';
|
||||
export * from './reqUpdateMeName';
|
||||
export * from './reqUpdateMePassword';
|
||||
export * from './reqUpdatePlace';
|
||||
export * from './reqUpdatePlaceName';
|
||||
export * from './reqUpdatePlaceOwnerUserId';
|
||||
export * from './reqUpdatePlaceStatus';
|
||||
export * from './reqUpsertFact';
|
||||
export * from './reqUpsertFactExpiresAt';
|
||||
export * from './reqUpsertFactSourceUrl';
|
||||
export * from './reqUpsertFactUnitId';
|
||||
export * from './reqUpsertFactValue';
|
||||
export * from './reqVerifyPlace';
|
||||
export * from './reqVerifyPlaceAddress';
|
||||
export * from './reqVerifyPlaceByUrl';
|
||||
export * from './reqVerifyPlaceLatitude';
|
||||
export * from './reqVerifyPlaceLongitude';
|
||||
export * from './reqVerifyPlacePhone';
|
||||
export * from './reqVerifyPlacePlaceUrl';
|
||||
export * from './reqVerifyPlaceRegionCode';
|
||||
export * from './reqVerifyPlaceRoadAddress';
|
||||
export * from './resCategorySchema';
|
||||
export * from './resCategorySchemaCategory';
|
||||
export * from './resCategorySchemaLabel';
|
||||
export * from './resCategorySchemaMsg';
|
||||
export * from './resExtractFacts';
|
||||
export * from './resExtractFactsMsg';
|
||||
export * from './resExtractedFact';
|
||||
export * from './resExtractedFactReason';
|
||||
export * from './resExtractedFactUnitName';
|
||||
export * from './resFact';
|
||||
export * from './resFactFact';
|
||||
export * from './resFactList';
|
||||
export * from './resFactListMsg';
|
||||
export * from './resFactMsg';
|
||||
export * from './resFactOutcome';
|
||||
export * from './resFaq';
|
||||
export * from './resFaqFaq';
|
||||
export * from './resFaqList';
|
||||
export * from './resFaqListMsg';
|
||||
export * from './resFaqMsg';
|
||||
export * from './resJob';
|
||||
export * from './resJobJob';
|
||||
export * from './resJobMsg';
|
||||
export * from './resJobOps';
|
||||
export * from './resJobOpsMsg';
|
||||
export * from './resLink';
|
||||
export * from './resLinkLink';
|
||||
export * from './resLinkList';
|
||||
export * from './resLinkListMsg';
|
||||
export * from './resLinkMsg';
|
||||
export * from './resLocalContentList';
|
||||
export * from './resLocalContentListMsg';
|
||||
export * from './resLogin';
|
||||
export * from './resLoginMsg';
|
||||
export * from './resMe';
|
||||
export * from './resMeCompany';
|
||||
export * from './resMeContactNumber';
|
||||
export * from './resMeEmail';
|
||||
export * from './resMeMsg';
|
||||
export * from './resMeName';
|
||||
export * from './resMediaList';
|
||||
export * from './resMediaListMsg';
|
||||
export * from './resPlace';
|
||||
export * from './resPlaceList';
|
||||
export * from './resPlaceListMsg';
|
||||
export * from './resPlaceMsg';
|
||||
export * from './resPlacePlace';
|
||||
export * from './resPublishLogs';
|
||||
export * from './resPublishLogsMsg';
|
||||
export * from './resRefreshToken';
|
||||
export * from './resRefreshTokenMsg';
|
||||
export * from './resSeoAudit';
|
||||
export * from './resSeoAuditMsg';
|
||||
export * from './resSeoAuditSummary';
|
||||
export * from './resSeoAuditVisibility';
|
||||
export * from './resSite';
|
||||
export * from './resSiteCurrentVersion';
|
||||
export * from './resSiteMsg';
|
||||
export * from './resSiteSite';
|
||||
export * from './resSiteSlug';
|
||||
export * from './resSiteSlugMsg';
|
||||
export * from './resSiteSlugReason';
|
||||
export * from './resSiteSlugSite';
|
||||
export * from './resSiteSlugSuggestion';
|
||||
export * from './resSiteVersions';
|
||||
export * from './resSiteVersionsMsg';
|
||||
export * from './resSlugCheck';
|
||||
export * from './resSlugCheckMsg';
|
||||
export * from './resSlugCheckReason';
|
||||
export * from './resSlugCheckSuggestion';
|
||||
export * from './resStartBuild';
|
||||
export * from './resStartBuildJobId';
|
||||
export * from './resStartBuildMsg';
|
||||
export * from './resStartBuildStatus';
|
||||
export * from './resStartCollect';
|
||||
export * from './resStartCollectJobId';
|
||||
export * from './resStartCollectMsg';
|
||||
export * from './resStartCollectStatus';
|
||||
export * from './resStartCopy';
|
||||
export * from './resStartCopyJobId';
|
||||
export * from './resStartCopyMsg';
|
||||
export * from './resStartCopyStatus';
|
||||
export * from './resStartVision';
|
||||
export * from './resStartVisionJobId';
|
||||
export * from './resStartVisionMsg';
|
||||
export * from './resStartVisionStatus';
|
||||
export * from './resSyncFestivals';
|
||||
export * from './resSyncFestivalsMsg';
|
||||
export * from './resUnit';
|
||||
export * from './resUnitList';
|
||||
export * from './resUnitListMsg';
|
||||
export * from './resUnitMsg';
|
||||
export * from './resUnitUnit';
|
||||
export * from './resVerifyCandidates';
|
||||
export * from './resVerifyCandidatesMsg';
|
||||
export * from './resVerifyCandidatesReason';
|
||||
export * from './resVerifyCandidatesSource';
|
||||
export * from './resWeather';
|
||||
export * from './resWeatherMsg';
|
||||
export * from './resWeatherWeather';
|
||||
export * from './siteData';
|
||||
export * from './siteDataCurrentVersionId';
|
||||
export * from './siteDataDomain';
|
||||
export * from './siteDataPublishedAt';
|
||||
export * from './siteDataTemplateId';
|
||||
export * from './siteDataTheme';
|
||||
export * from './siteDataThemeAnyOf';
|
||||
export * from './siteStatus';
|
||||
export * from './siteVersionData';
|
||||
export * from './siteVersionDataBuildError';
|
||||
export * from './siteVersionDataBuiltAt';
|
||||
export * from './siteVersionDataCreatedAt';
|
||||
export * from './sourceType';
|
||||
export * from './unitData';
|
||||
export * from './userRole';
|
||||
export * from './validationError';
|
||||
export * from './validationErrorCtx';
|
||||
export * from './validationErrorLocItem';
|
||||
export * from './verifyCandidatesParams';
|
||||
export * from './weatherData';
|
||||
export * from './weatherDataTimezone';
|
||||
export * from './weatherDataWindSpeed';
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { JobType } from './jobType';
|
||||
import type { JobStatus } from './jobStatus';
|
||||
import type { JobDataResult } from './jobDataResult';
|
||||
import type { JobDataLastError } from './jobDataLastError';
|
||||
import type { JobDataRunAfter } from './jobDataRunAfter';
|
||||
import type { JobDataRunStartedAt } from './jobDataRunStartedAt';
|
||||
import type { JobDataCreatedAt } from './jobDataCreatedAt';
|
||||
import type { JobDataUpdatedAt } from './jobDataUpdatedAt';
|
||||
|
||||
export interface JobData {
|
||||
job_id: string;
|
||||
job_type: JobType;
|
||||
status: JobStatus;
|
||||
attempts?: number;
|
||||
max_attempts?: number;
|
||||
result?: JobDataResult;
|
||||
last_error?: JobDataLastError;
|
||||
run_after?: JobDataRunAfter;
|
||||
run_started_at?: JobDataRunStartedAt;
|
||||
created_at?: JobDataCreatedAt;
|
||||
updated_at?: JobDataUpdatedAt;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type JobDataCreatedAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type JobDataLastError = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type JobDataResult = unknown | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type JobDataRunAfter = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type JobDataRunStartedAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type JobDataUpdatedAt = string | null;
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* jobs.status 코드값. 작업 큐 상태.
|
||||
|
||||
전이는 전부 조건부 원자 UPDATE(CAS)로만 한다. 실패는 재시도 가능하면
|
||||
PENDING(run_after=백오프)으로 되돌리고, 소진되면 DEAD(dead-letter).
|
||||
*/
|
||||
export type JobStatus = typeof JobStatus[keyof typeof JobStatus];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const JobStatus = {
|
||||
PENDING: 1,
|
||||
RUNNING: 2,
|
||||
DONE: 3,
|
||||
DEAD: 4,
|
||||
} as const;
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* jobs.job_type 코드값. 수집·비전·빌드는 몇 분씩 걸려 동기 요청으로 처리할 수 없다.
|
||||
|
||||
무거운 잡(브라우저 필요)과 가벼운 잡(HTTP API 만)을 코드로 갈라 둔다 —
|
||||
크롤링 법무 결론이 나면 무거운 잡만 별도 워커 이미지로 분리한다.
|
||||
*/
|
||||
export type JobType = typeof JobType[keyof typeof JobType];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const JobType = {
|
||||
COLLECT: 1,
|
||||
VISION: 2,
|
||||
COPY: 3,
|
||||
BUILD: 4,
|
||||
LOCAL_SYNC: 5,
|
||||
AI_CHECK: 6,
|
||||
} as const;
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* place_links.channel 코드값. Perplexity 가 발견하는 채널 종류.
|
||||
*/
|
||||
export type LinkChannel = typeof LinkChannel[keyof typeof LinkChannel];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const LinkChannel = {
|
||||
YANOLJA: 1,
|
||||
GOODCHOICE: 2,
|
||||
NAVER_PLACE: 3,
|
||||
INSTAGRAM: 4,
|
||||
OFFICIAL_SITE: 5,
|
||||
BLOG: 6,
|
||||
ETC: 99,
|
||||
} as const;
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { LinkChannel } from './linkChannel';
|
||||
import type { LinkDataTitle } from './linkDataTitle';
|
||||
import type { SourceType } from './sourceType';
|
||||
import type { LinkDataDiscoveredAt } from './linkDataDiscoveredAt';
|
||||
import type { LinkDataConfirmedAt } from './linkDataConfirmedAt';
|
||||
|
||||
export interface LinkData {
|
||||
link_id: string;
|
||||
place_id: string;
|
||||
channel: LinkChannel;
|
||||
url: string;
|
||||
title?: LinkDataTitle;
|
||||
discovered_by: SourceType;
|
||||
discovered_at?: LinkDataDiscoveredAt;
|
||||
confirmed_at?: LinkDataConfirmedAt;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type LinkDataConfirmedAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type LinkDataDiscoveredAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type LinkDataTitle = string | null;
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { LocalContentStatus } from './localContentStatus';
|
||||
|
||||
export type ListContentsParams = {
|
||||
status?: LocalContentStatus | null;
|
||||
region_code?: string | null;
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListFactsParams = {
|
||||
/**
|
||||
* 객실·메뉴·프로그램 단위 fact 만
|
||||
*/
|
||||
unit_id?: string | null;
|
||||
publishable_only?: boolean;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListFaqsParams = {
|
||||
publishable_only?: boolean;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListLinksParams = {
|
||||
confirmed_only?: boolean;
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListMediaParams = {
|
||||
/**
|
||||
* 객실·메뉴 단위 사진만
|
||||
*/
|
||||
unit_id?: string | null;
|
||||
publishable_only?: boolean;
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { PlaceCategory } from './placeCategory';
|
||||
import type { PlaceStatus } from './placeStatus';
|
||||
|
||||
export type ListPlacesParams = {
|
||||
/**
|
||||
* 상호명·주소 부분일치
|
||||
*/
|
||||
search?: string | null;
|
||||
/**
|
||||
* 업종
|
||||
*/
|
||||
category?: PlaceCategory | null;
|
||||
/**
|
||||
* 상태
|
||||
*/
|
||||
status?: PlaceStatus | null;
|
||||
/**
|
||||
* @minimum 1
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 100
|
||||
*/
|
||||
size?: number;
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { LocalContentType } from './localContentType';
|
||||
import type { LocalSource } from './localSource';
|
||||
import type { LocalContentDataExternalId } from './localContentDataExternalId';
|
||||
import type { LocalContentDataTitle } from './localContentDataTitle';
|
||||
import type { LocalContentDataBody } from './localContentDataBody';
|
||||
import type { LocalContentStatus } from './localContentStatus';
|
||||
import type { LocalContentDataCollectedAt } from './localContentDataCollectedAt';
|
||||
import type { LocalContentDataPublishedAt } from './localContentDataPublishedAt';
|
||||
import type { LocalContentDataDisplayStartAt } from './localContentDataDisplayStartAt';
|
||||
import type { LocalContentDataDisplayEndAt } from './localContentDataDisplayEndAt';
|
||||
|
||||
export interface LocalContentData {
|
||||
local_content_id: string;
|
||||
region_code: string;
|
||||
content_type: LocalContentType;
|
||||
source: LocalSource;
|
||||
external_id?: LocalContentDataExternalId;
|
||||
title?: LocalContentDataTitle;
|
||||
body: LocalContentDataBody;
|
||||
status: LocalContentStatus;
|
||||
collected_at?: LocalContentDataCollectedAt;
|
||||
published_at?: LocalContentDataPublishedAt;
|
||||
display_start_at?: LocalContentDataDisplayStartAt;
|
||||
display_end_at?: LocalContentDataDisplayEndAt;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type LocalContentDataBody = { [key: string]: unknown };
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type LocalContentDataCollectedAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type LocalContentDataDisplayEndAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type LocalContentDataDisplayStartAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type LocalContentDataExternalId = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type LocalContentDataPublishedAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type LocalContentDataTitle = string | null;
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 운영 관리자가 검수하는 지역 콘텐츠 발행 상태.
|
||||
*/
|
||||
export type LocalContentStatus = typeof LocalContentStatus[keyof typeof LocalContentStatus];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const LocalContentStatus = {
|
||||
REVIEW: 1,
|
||||
PUBLISHED: 2,
|
||||
ENDED: 3,
|
||||
} as const;
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* local_contents.content_type 코드값. 행정구역 코드 단위로 캐싱되는 지역 정보 종류.
|
||||
*/
|
||||
export type LocalContentType = typeof LocalContentType[keyof typeof LocalContentType];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const LocalContentType = {
|
||||
WEATHER: 1,
|
||||
FESTIVAL: 2,
|
||||
ATTRACTION: 3,
|
||||
RESTAURANT: 4,
|
||||
} as const;
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* local_contents.source 코드값. 어느 외부 API 에서 왔는지.
|
||||
*/
|
||||
export type LocalSource = typeof LocalSource[keyof typeof LocalSource];
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const LocalSource = {
|
||||
OPEN_METEO: 1,
|
||||
TOUR_API: 2,
|
||||
KAKAO_LOCAL: 3,
|
||||
OFFICIAL_WEB: 4,
|
||||
} as const;
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { MediaDataUnitId } from './mediaDataUnitId';
|
||||
import type { MediaDataOriginUrl } from './mediaDataOriginUrl';
|
||||
import type { SourceType } from './sourceType';
|
||||
import type { MediaDataSourceUrl } from './mediaDataSourceUrl';
|
||||
import type { MediaDataLabel } from './mediaDataLabel';
|
||||
import type { MediaDataAltText } from './mediaDataAltText';
|
||||
import type { MediaDataVisionConfidence } from './mediaDataVisionConfidence';
|
||||
import type { MediaStatus } from './mediaStatus';
|
||||
import type { MediaDataWidth } from './mediaDataWidth';
|
||||
import type { MediaDataHeight } from './mediaDataHeight';
|
||||
import type { MediaDataCreatedAt } from './mediaDataCreatedAt';
|
||||
|
||||
/**
|
||||
* 사진 1건.
|
||||
|
||||
★ source_type 과 origin_url 을 반드시 함께 내려보낸다 — 크롤링 이미지의 재게시 권리가
|
||||
아직 미결이라(docs/DECISIONS.md 1-2), 결론이 '불가'로 나면 발행에서 source_type = CRAWL 을
|
||||
통째로 제외해야 한다. 화면이 출처를 모르면 무엇이 빠질지도 미리 보여줄 수 없다.
|
||||
origin_url 은 그때 '이 사진은 어디서 왔는가'를 증명하는 유일한 근거다.
|
||||
*/
|
||||
export interface MediaData {
|
||||
media_id: string;
|
||||
place_id: string;
|
||||
unit_id?: MediaDataUnitId;
|
||||
url: string;
|
||||
origin_url?: MediaDataOriginUrl;
|
||||
source_type: SourceType;
|
||||
source_url?: MediaDataSourceUrl;
|
||||
label?: MediaDataLabel;
|
||||
alt_text?: MediaDataAltText;
|
||||
vision_confidence?: MediaDataVisionConfidence;
|
||||
status: MediaStatus;
|
||||
width?: MediaDataWidth;
|
||||
height?: MediaDataHeight;
|
||||
sort_order?: number;
|
||||
created_at?: MediaDataCreatedAt;
|
||||
publishable?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type MediaDataAltText = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type MediaDataCreatedAt = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type MediaDataHeight = number | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type MediaDataLabel = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type MediaDataOriginUrl = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type MediaDataSourceUrl = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type MediaDataUnitId = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type MediaDataVisionConfidence = string | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Web4Ai API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type MediaDataWidth = number | null;
|
||||