Merge branch 'main' of https://gitea.o2o.kr/Negosium/o2o-negosium
This commit is contained in:
commit
f924c0aa59
@ -61,8 +61,8 @@ class users(MainTableMixin, MAIN_BASE):
|
|||||||
email = Column(String(255), nullable=True)
|
email = Column(String(255), nullable=True)
|
||||||
contact_number = Column(String(20), nullable=True)
|
contact_number = Column(String(20), nullable=True)
|
||||||
last_accessed_at = Column(DateTime, nullable=False, server_default=_utc_now_sql())
|
last_accessed_at = Column(DateTime, nullable=False, server_default=_utc_now_sql())
|
||||||
status = Column(SmallInteger, nullable=False, default=UserStatus.ACTIVE.value) # UserStatus
|
status = Column(SmallInteger, nullable=False, default=UserStatus.ACTIVE.value)
|
||||||
role = Column(SmallInteger, nullable=False, default=UserRole.USER.value) # UserRole
|
role = Column(SmallInteger, nullable=False, default=UserRole.USER.value)
|
||||||
|
|
||||||
|
|
||||||
class items(MainTableMixin, MAIN_BASE):
|
class items(MainTableMixin, MAIN_BASE):
|
||||||
|
|||||||
@ -53,6 +53,11 @@ class ErrorType(Enum):
|
|||||||
# 협상카드 관련 에러
|
# 협상카드 관련 에러
|
||||||
CARD_NOT_FOUND = 1700
|
CARD_NOT_FOUND = 1700
|
||||||
|
|
||||||
|
# 이미지 업로드 관련 에러
|
||||||
|
IMAGE_INVALID_TYPE = 1800
|
||||||
|
IMAGE_TOO_LARGE = auto()
|
||||||
|
IMAGE_UPLOAD_FAILED = auto()
|
||||||
|
|
||||||
|
|
||||||
# ErrorType 의 HTTP_* 값과 status_code 를 맞춰 router 단에서 raise 한다.
|
# ErrorType 의 HTTP_* 값과 status_code 를 맞춰 router 단에서 raise 한다.
|
||||||
EXCEPTION_INVALID_CLIENT_REQUEST = HTTPException(status_code=ErrorType.HTTP_INVALID_CLIENT_REQUEST.value, detail=ErrorType.HTTP_INVALID_CLIENT_REQUEST.name)
|
EXCEPTION_INVALID_CLIENT_REQUEST = HTTPException(status_code=ErrorType.HTTP_INVALID_CLIENT_REQUEST.value, detail=ErrorType.HTTP_INVALID_CLIENT_REQUEST.name)
|
||||||
@ -110,25 +115,27 @@ class QuotationType(Enum):
|
|||||||
class QuotationStatus(Enum):
|
class QuotationStatus(Enum):
|
||||||
"""quotations.status 코드값(SMALLINT). 프론트 견적상태 뱃지와 매핑된다."""
|
"""quotations.status 코드값(SMALLINT). 프론트 견적상태 뱃지와 매핑된다."""
|
||||||
|
|
||||||
CREATED = 1 # 견적생성
|
CREATED = 1
|
||||||
ACTIVE = 2 # 견적진행중
|
ACTIVE = 2
|
||||||
CLOSED = 3 # 견적마감
|
CLOSED = 3
|
||||||
ON_HOLD = 4 # 협상보류
|
ON_HOLD = 4
|
||||||
|
|
||||||
|
|
||||||
class SessionStatus(Enum):
|
class SessionStatus(Enum):
|
||||||
"""negotiation.sessions.status 코드값. 협력사별 협상 세션 진행 상태."""
|
"""negotiation.sessions.status 코드값. 협력사별 협상 세션 진행 상태."""
|
||||||
|
|
||||||
NEGOTIATING = 1 # 협상중
|
CREATED = 1
|
||||||
COMPLETED = 2 # 협상종료
|
IN_PROGRESS = 2
|
||||||
REJECTED = 3 # 협상거부
|
DONE = 3
|
||||||
|
NOT_PARTICIPATED = 4
|
||||||
|
REJECTED = 5
|
||||||
|
|
||||||
|
|
||||||
class ChatSender(Enum):
|
class ChatSender(Enum):
|
||||||
"""negotiation.chats.sender 코드값. 채팅 발신 주체."""
|
"""negotiation.chats.sender 코드값. 채팅 발신 주체."""
|
||||||
|
|
||||||
BOT = 1 # 구매대행 봇
|
BOT = 1
|
||||||
PARTNER = 2 # 협력사
|
USER = 2
|
||||||
|
|
||||||
|
|
||||||
class DeliveryType(Enum):
|
class DeliveryType(Enum):
|
||||||
@ -160,11 +167,13 @@ ENUM_LABELS = {
|
|||||||
QuotationStatus.ACTIVE: "견적진행중",
|
QuotationStatus.ACTIVE: "견적진행중",
|
||||||
QuotationStatus.CLOSED: "견적마감",
|
QuotationStatus.CLOSED: "견적마감",
|
||||||
QuotationStatus.ON_HOLD: "협상보류",
|
QuotationStatus.ON_HOLD: "협상보류",
|
||||||
SessionStatus.NEGOTIATING: "협상중",
|
SessionStatus.CREATED: "협상생성",
|
||||||
SessionStatus.COMPLETED: "협상종료",
|
SessionStatus.IN_PROGRESS: "협상중",
|
||||||
|
SessionStatus.DONE: "협상완료",
|
||||||
|
SessionStatus.NOT_PARTICIPATED: "미참여",
|
||||||
SessionStatus.REJECTED: "협상거부",
|
SessionStatus.REJECTED: "협상거부",
|
||||||
ChatSender.BOT: "봇",
|
ChatSender.BOT: "봇",
|
||||||
ChatSender.PARTNER: "협력사",
|
ChatSender.USER: "협력사",
|
||||||
DeliveryType.PARTNER: "협력사배송",
|
DeliveryType.PARTNER: "협력사배송",
|
||||||
DeliveryType.COURIER: "지정택배배송",
|
DeliveryType.COURIER: "지정택배배송",
|
||||||
DeliveryType.PICKUP: "픽업배송",
|
DeliveryType.PICKUP: "픽업배송",
|
||||||
|
|||||||
@ -36,3 +36,12 @@ access_key = "<JWT_ACCESS_SECRET>"
|
|||||||
refresh_key = "<JWT_REFRESH_SECRET>"
|
refresh_key = "<JWT_REFRESH_SECRET>"
|
||||||
access_expire_min = 30
|
access_expire_min = 30
|
||||||
refresh_expire_day = 7
|
refresh_expire_day = 7
|
||||||
|
|
||||||
|
# 상품 이미지 업로드 대상(Azure Blob Storage).
|
||||||
|
# infinith 와 동일 계정/컨테이너 SAS 를 그대로 복사해 쓰고, blob_root 로 디렉터리만 분리한다.
|
||||||
|
# 값 출처: o2o-infinith-backend/.env 의 AZURE_BLOB_BASE_URL / AZURE_BLOB_SAS_TOKEN
|
||||||
|
[StorageConfig]
|
||||||
|
azure_blob_base_url = "<AZURE_BLOB_BASE_URL>"
|
||||||
|
azure_blob_sas_token = "<AZURE_BLOB_SAS_TOKEN>"
|
||||||
|
blob_root = "negodata"
|
||||||
|
max_image_mb = 4
|
||||||
|
|||||||
@ -42,3 +42,13 @@ class JwtToken(ConfigModel):
|
|||||||
refresh_key: str = ""
|
refresh_key: str = ""
|
||||||
access_expire_min: int = 30
|
access_expire_min: int = 30
|
||||||
refresh_expire_day: int = 7
|
refresh_expire_day: int = 7
|
||||||
|
|
||||||
|
|
||||||
|
# 정적 파일(상품 이미지 등) 저장소 = Azure Blob Storage.
|
||||||
|
# infinith 와 같은 계정/컨테이너 SAS 를 그대로 쓰고, blob_root 로 디렉터리만 분리한다.
|
||||||
|
# SDK 없이 SAS 토큰을 URL 에 붙여 httpx 로 PUT 한다(services/azure_blob_client.py).
|
||||||
|
class StorageConfig(ConfigModel):
|
||||||
|
azure_blob_base_url: str = "" # https://<account>.blob.core.windows.net/<container>
|
||||||
|
azure_blob_sas_token: str = "" # SAS 토큰(쿼리스트링). 만료 있음 — 만료되면 업로드 실패
|
||||||
|
blob_root: str = "negodata" # 컨테이너 내 최상위 디렉터리(infinith 파일과 분리)
|
||||||
|
max_image_mb: int = 4 # 업로드 허용 최대 크기(MB). 프론트 ImageDropzone 와 일치
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from config.config_loader import Configs
|
from config.config_loader import Configs
|
||||||
from config.config_models import WebServerConfig, LogConfig, MainDBConfig, JwtToken
|
from config.config_models import WebServerConfig, LogConfig, MainDBConfig, JwtToken, StorageConfig
|
||||||
|
|
||||||
# 실행 환경 결정 (기본 local). 환경변수 APP_ENV 로 변경.
|
# 실행 환경 결정 (기본 local). 환경변수 APP_ENV 로 변경.
|
||||||
APP_ENV = os.environ.get("APP_ENV", "local")
|
APP_ENV = os.environ.get("APP_ENV", "local")
|
||||||
@ -19,6 +19,7 @@ web_server_config: WebServerConfig = configs.get(WebServerConfig)
|
|||||||
log_config: LogConfig = configs.get(LogConfig)
|
log_config: LogConfig = configs.get(LogConfig)
|
||||||
main_db_config: MainDBConfig = configs.get(MainDBConfig)
|
main_db_config: MainDBConfig = configs.get(MainDBConfig)
|
||||||
jwt_token_config: JwtToken = configs.get(JwtToken)
|
jwt_token_config: JwtToken = configs.get(JwtToken)
|
||||||
|
storage_config: StorageConfig = configs.get(StorageConfig)
|
||||||
|
|
||||||
|
|
||||||
# DB 접속 env override (config.local.toml 유지, 도커에서 host 만 교체). 로컬은 env 미설정 → toml 그대로.
|
# DB 접속 env override (config.local.toml 유지, 도커에서 host 만 교체). 로컬은 env 미설정 → toml 그대로.
|
||||||
|
|||||||
@ -48,6 +48,10 @@ class IQuotationCRUD(ABC):
|
|||||||
async def list_used_cards(self, cdb: AsyncSession, qt_id) -> Tuple[ErrorType, list]:
|
async def list_used_cards(self, cdb: AsyncSession, qt_id) -> Tuple[ErrorType, list]:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
async def session_counts(self, cdb: AsyncSession, qt_ids) -> Tuple[ErrorType, dict]:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class QuotationCRUD(IQuotationCRUD):
|
class QuotationCRUD(IQuotationCRUD):
|
||||||
async def search(
|
async def search(
|
||||||
@ -88,6 +92,24 @@ class QuotationCRUD(IQuotationCRUD):
|
|||||||
LOG.e_no_callstack(ex)
|
LOG.e_no_callstack(ex)
|
||||||
return ErrorType.DB_RUN_FAILED, [], 0
|
return ErrorType.DB_RUN_FAILED, [], 0
|
||||||
|
|
||||||
|
async def session_counts(self, cdb: AsyncSession, qt_ids) -> Tuple[ErrorType, dict]:
|
||||||
|
"""견적 id 목록에 대해 참여 협력사 수(distinct supplier)를 한 번에 센다. {qt_id: count}."""
|
||||||
|
try:
|
||||||
|
if not qt_ids:
|
||||||
|
return ErrorType.SUCCESS, {}
|
||||||
|
query = (
|
||||||
|
select(sessions.quotation_id, func.count(func.distinct(sessions.supplier_id)))
|
||||||
|
.where(sessions.quotation_id.in_(qt_ids), sessions.deleted == False) # noqa: E712
|
||||||
|
.group_by(sessions.quotation_id)
|
||||||
|
)
|
||||||
|
err_type, rows = await DB_SESSION_MNG.execute(cdb, query)
|
||||||
|
if err_type != ErrorType.SUCCESS:
|
||||||
|
return err_type, {}
|
||||||
|
return ErrorType.SUCCESS, {r[0]: int(r[1] or 0) for r in rows}
|
||||||
|
except Exception as ex:
|
||||||
|
LOG.e_no_callstack(ex)
|
||||||
|
return ErrorType.DB_RUN_FAILED, {}
|
||||||
|
|
||||||
async def get_by_id(self, cdb: AsyncSession, qt_id) -> Tuple[ErrorType, quotations]:
|
async def get_by_id(self, cdb: AsyncSession, qt_id) -> Tuple[ErrorType, quotations]:
|
||||||
try:
|
try:
|
||||||
query = select(quotations).where(quotations.qt_id == qt_id, quotations.deleted == False).limit(1) # noqa: E712
|
query = select(quotations).where(quotations.qt_id == qt_id, quotations.deleted == False).limit(1) # noqa: E712
|
||||||
@ -159,16 +181,21 @@ class QuotationCRUD(IQuotationCRUD):
|
|||||||
|
|
||||||
async def list_used_cards(self, cdb: AsyncSession, qt_id) -> Tuple[ErrorType, list]:
|
async def list_used_cards(self, cdb: AsyncSession, qt_id) -> Tuple[ErrorType, list]:
|
||||||
"""견적의 세션들에서 실제 사용된 카드(chats.card_used_yn)를 카드 카탈로그와 조인.
|
"""견적의 세션들에서 실제 사용된 카드(chats.card_used_yn)를 카드 카탈로그와 조인.
|
||||||
반환: [(chat_row, card_id, name, script), ...].
|
반환: [(chat_row, card_id, number, name, script, edit_script, condition, memo), ...].
|
||||||
card_type 1=nego_cards / 2=wild_cards 양쪽을 LEFT JOIN 해서 어느 쪽이든 잡는다.
|
card_type 1=nego_cards / 2=wild_cards 양쪽을 LEFT JOIN 해서 어느 쪽이든 잡는다.
|
||||||
|
condition/memo 는 wild_cards 에만 있는 컬럼이라 nego 카드면 NULL 로 나온다.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
query = (
|
query = (
|
||||||
select(
|
select(
|
||||||
chats,
|
chats,
|
||||||
func.coalesce(nego_cards.nego_card_id, wild_cards.wild_card_id).label("card_pk"),
|
func.coalesce(nego_cards.nego_card_id, wild_cards.wild_card_id).label("card_pk"),
|
||||||
|
func.coalesce(nego_cards.number, wild_cards.number).label("card_number"),
|
||||||
func.coalesce(nego_cards.name, wild_cards.name).label("card_name"),
|
func.coalesce(nego_cards.name, wild_cards.name).label("card_name"),
|
||||||
func.coalesce(nego_cards.script, wild_cards.script).label("card_script"),
|
func.coalesce(nego_cards.script, wild_cards.script).label("card_script"),
|
||||||
|
func.coalesce(nego_cards.edit_script, wild_cards.edit_script).label("card_edit_script"),
|
||||||
|
wild_cards.condition.label("card_condition"),
|
||||||
|
wild_cards.memo.label("card_memo"),
|
||||||
)
|
)
|
||||||
.join(sessions, sessions.session_id == chats.session_id)
|
.join(sessions, sessions.session_id == chats.session_id)
|
||||||
.outerjoin(nego_cards, and_(nego_cards.nego_card_id == chats.card_id, chats.card_type == 1))
|
.outerjoin(nego_cards, and_(nego_cards.nego_card_id == chats.card_id, chats.card_type == 1))
|
||||||
|
|||||||
148
negodata/backend/docs/image-upload-design.md
Normal file
148
negodata/backend/docs/image-upload-design.md
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
# 상품 이미지 업로드 설계 보고서
|
||||||
|
|
||||||
|
대상: `negodata/backend` (+ `negodata/front` 연동)
|
||||||
|
작성일: 2026-06-18
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 0. 결론
|
||||||
|
|
||||||
|
1. **별도 엔드포인트 `POST /v1/item/image` 를 신설한다.** create/update 와 합치지 않는다.
|
||||||
|
2. create/update 는 지금처럼 **JSON 바디** 그대로 두고 `image_url`(짧은 URL 문자열)만 받는다.
|
||||||
|
3. 저장은 **로컬디스크 + StaticFiles** 로 시작하고, 업로드 로직을 service 로 추상화해 추후 S3 로 교체한다.
|
||||||
|
4. DB 스키마(`items.image_url String(255)`) **변경 불필요** — 반환 URL이 짧은 경로이므로 그대로 들어간다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. 현재 상태 — 무엇이 되어 있고 무엇이 깨졌나
|
||||||
|
|
||||||
|
| 계층 | 현재 | 비고 |
|
||||||
|
|---|---|---|
|
||||||
|
| DB | `items.image_url = Column(String(255), nullable=True)` | URL **문자열 255자**만 수용 |
|
||||||
|
| protocol | `image_url: Optional[str]` (Create/Update/Data) | [protocol.py:19](../router/v1/item/protocol.py#L19) |
|
||||||
|
| front 컴포넌트 | `ImageDropzone` 가 파일 → `readAsDataURL` → **base64 data URL** 생성 | [ImageDropzone.tsx:50](../../front/src/components/ImageDropzone.tsx#L50) |
|
||||||
|
| front 제출 | `image_url: v.imageUrl \|\| 'https://...unsplash'` | [ProductFormSheet.tsx:154](../../front/src/features/products/components/ProductFormSheet.tsx#L154) |
|
||||||
|
| 저장 인프라 | StaticFiles mount / S3 / upload dir 설정 **전무** | [router.py:61](../router/router.py#L61) 라우터만 include |
|
||||||
|
|
||||||
|
**왜 "구현 안 됨" 인가:**
|
||||||
|
이미지를 실제로 드롭하면 수십 KB짜리 base64 문자열을 `String(255)` 칸에 insert → 길이 초과로 실패/잘림.
|
||||||
|
드롭하지 않으면 unsplash 플레이스홀더가 박힘. 즉 **UI(dropzone)는 있으나 바이너리를 받아 저장하고 짧은 URL을 돌려줄 백엔드 조각이 없다.**
|
||||||
|
|
||||||
|
현재 `UploadFile` 사용처는 엑셀 스텁 2개뿐 — [item.py:54](../router/v1/item/item.py#L54), [supplier.py:54](../router/v1/supplier/supplier.py#L54).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. 핵심 결정 — 왜 별도 엔드포인트인가
|
||||||
|
|
||||||
|
| 기준 | create 와 합치기 (multipart 한 방) | **별도 엔드포인트 (권장)** |
|
||||||
|
|---|---|---|
|
||||||
|
| 요청 형식 | `multipart/form-data` 강제 → 모든 필드를 `Form()` 수동 파싱 | create/update 는 **JSON pydantic 유지** |
|
||||||
|
| 기존 패턴 | `Req_CreateItem.model_dump(exclude_unset=True)` 흐름 파괴 | 그대로 보존 |
|
||||||
|
| 생성 전 업로드 | 불가 (아이템이 있어야 첨부) | **신규 폼에서 먼저 업로드 → URL 확보** 가능 |
|
||||||
|
| 재사용 | create/update 마다 multipart 중복 | **업로드 1곳**, 협력사 로고 등 확장 |
|
||||||
|
| 생성 클라이언트(orval) | 혼합 바디라 타입 지저분 | 깔끔히 분리 생성 |
|
||||||
|
|
||||||
|
이 코드베이스는 이미 "JSON 바디"와 "multipart 파일"을 **엔드포인트 단위로 분리**해 둠(엑셀 업로드). 동일 원칙을 따른다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. 제안 API 계약
|
||||||
|
|
||||||
|
### 3.1 신규 엔드포인트
|
||||||
|
|
||||||
|
```
|
||||||
|
POST /v1/item/image
|
||||||
|
- auth: IsValidAccessToken (company_id 스코프)
|
||||||
|
- body: multipart/form-data, field "file": UploadFile
|
||||||
|
- 검증: content-type image/*, 용량 ≤ 4MB (front ImageDropzone 와 동일 한계)
|
||||||
|
- 동작: 저장 → 짧은 public URL 생성
|
||||||
|
- response_model: Res_ItemImage { image_url: str, ... }
|
||||||
|
```
|
||||||
|
|
||||||
|
create/update 는 **변경 없음** — front 가 위에서 받은 `image_url` 문자열을 기존 JSON 바디에 실어 보낸다.
|
||||||
|
|
||||||
|
### 3.2 protocol 추가 (주석 금지·auth 스타일 유지)
|
||||||
|
|
||||||
|
```python
|
||||||
|
# router/v1/item/protocol.py
|
||||||
|
class Res_ItemImage(Res_WebPacketProtocol):
|
||||||
|
image_url: Optional[str] = None
|
||||||
|
filename: Optional[str] = None
|
||||||
|
size: Optional[int] = None
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.3 router 스케치
|
||||||
|
|
||||||
|
```python
|
||||||
|
# router/v1/item/item.py
|
||||||
|
@router.post(path="/image", response_model=Res_ItemImage, summary="상품 이미지 업로드")
|
||||||
|
async def upload_item_image(
|
||||||
|
service: ItemService = Depends(),
|
||||||
|
user_info: UserInfo = Depends(IsValidAccessToken),
|
||||||
|
file: UploadFile = File(...),
|
||||||
|
):
|
||||||
|
return RemoveNoneResponse(await service.upload_image(user_info.company_id, file))
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.4 service 스케치 (저장 추상화 — 여기만 갈아끼우면 S3 전환)
|
||||||
|
|
||||||
|
```python
|
||||||
|
# services/item_service.py
|
||||||
|
async def upload_image(self, company_id: str, file: UploadFile) -> Res_ItemImage:
|
||||||
|
res = Res_ItemImage()
|
||||||
|
# 1) 검증: content_type.startswith("image/"), size ≤ 4MB → 실패 시 res.result.SetResult(...)
|
||||||
|
# 2) 저장: 키 = f"{company_id}/{uuid4()}.{ext}" ← 회사별 디렉터리로 격리
|
||||||
|
# storage.save(key, await file.read()) # 로컬: upload_dir/key, S3: put_object
|
||||||
|
# 3) res.image_url = f"{static_base_url}/items/{key}" ← String(255) 안에 들어가는 짧은 경로
|
||||||
|
return res
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. 저장 방식
|
||||||
|
|
||||||
|
| 방식 | 지금 채택 | 비고 |
|
||||||
|
|---|---|---|
|
||||||
|
| **A. 로컬디스크 + StaticFiles** | ✅ now | `app.mount("/static", StaticFiles(directory=upload_dir))` 한 줄. 단일 서버/데모에 충분 |
|
||||||
|
| B. S3 / MinIO / GCS | later | `boto3` 미설치. service 의 `storage.save` 만 교체하면 됨 (CDN URL 반환) |
|
||||||
|
|
||||||
|
> 멀티워커(`process_count`)·다중 인스턴스로 가면 로컬디스크는 인스턴스마다 갈라지므로 **그 시점에 B로 전환**해야 한다. 지금 단계에서는 A로 충분.
|
||||||
|
|
||||||
|
### 4.1 config 추가 제안
|
||||||
|
|
||||||
|
```python
|
||||||
|
# config/config_models.py — 신규 섹션
|
||||||
|
class StorageConfig(ConfigModel):
|
||||||
|
upload_dir: str = "./uploads" # 로컬 저장 루트
|
||||||
|
static_base_url: str = "" # 예: "http://localhost:8000/static"
|
||||||
|
max_image_mb: int = 4 # front ImageDropzone(4MB)와 일치
|
||||||
|
```
|
||||||
|
|
||||||
|
`client_url`(CORS, [config_models.py:10](../config/config_models.py#L10))과 동일하게 `config.local.toml` 에 값을 채운다. `.example` 에도 키 추가.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. 변경 체크리스트
|
||||||
|
|
||||||
|
**backend**
|
||||||
|
- [ ] `config_models.py` 에 `StorageConfig` 추가 + `config.local.toml(.example)` 키 채움
|
||||||
|
- [ ] `router.py` 에 `app.mount("/static", StaticFiles(...))` (방식 A)
|
||||||
|
- [ ] `protocol.py` 에 `Res_ItemImage` 추가
|
||||||
|
- [ ] `item.py` 에 `POST /v1/item/image` 라우트
|
||||||
|
- [ ] `item_service.py` 에 `upload_image()` + storage 추상화(local 구현)
|
||||||
|
- [ ] 검증 실패용 `ErrorType` (예: `IMAGE_INVALID_TYPE`, `IMAGE_TOO_LARGE`) 추가
|
||||||
|
- [ ] 테스트: `tests/test_item.py` 에 업로드 정상/타입오류/용량초과
|
||||||
|
|
||||||
|
**front**
|
||||||
|
- [ ] orval 재생성 → `POST /v1/item/image` 클라이언트 확보
|
||||||
|
- [ ] `ImageDropzone` 가 base64 대신 **선택 파일을 업로드 호출 → 반환 `image_url`** 을 form `imageUrl` 에 세팅 (미리보기는 로컬 objectURL 유지 가능)
|
||||||
|
- [ ] `ProductFormSheet.tsx:154` 의 unsplash 플레이스홀더 폴백 제거/정리
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. 결정 필요 (열린 질문)
|
||||||
|
|
||||||
|
1. **저장 위치**: 로컬디스크(A)로 시작 확정? 아니면 처음부터 S3? — 권장: A.
|
||||||
|
2. **접근 제어**: `/static` 을 완전 public 으로 둘지, 서명 URL/인증 프록시로 막을지. 상품 이미지가 민감하지 않다면 public 로 충분.
|
||||||
|
3. **이미지 가공**: 업로드 시 리사이즈/webp 변환/썸네일 생성 할지(목록 성능). 1차는 원본 저장만 권장.
|
||||||
|
4. **고아 파일 정리**: 생성 전 업로드 후 폼 취소 시 남는 파일 — 1차는 방치, 추후 배치 정리.
|
||||||
@ -9,3 +9,4 @@ orjson
|
|||||||
pydantic>=2.0
|
pydantic>=2.0
|
||||||
python-multipart
|
python-multipart
|
||||||
openpyxl
|
openpyxl
|
||||||
|
httpx
|
||||||
|
|||||||
@ -33,7 +33,7 @@ class Req_UpdateCard(CardProtocol):
|
|||||||
memo: Optional[str] = None
|
memo: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
# 통합 카드 표현(nego_cards + wild_cards 공통). nego_card_id 는 출처 테이블의 PK 를 그대로 담는다.
|
# 통합 카드 표현(nego_cards + wild_cards 공통).
|
||||||
class CardData(WebPacketProtocol):
|
class CardData(WebPacketProtocol):
|
||||||
model_config = ConfigDict(from_attributes=True)
|
model_config = ConfigDict(from_attributes=True)
|
||||||
|
|
||||||
|
|||||||
@ -11,9 +11,9 @@ from .protocol import (
|
|||||||
Req_UpdateItem,
|
Req_UpdateItem,
|
||||||
Res_CheckCodes,
|
Res_CheckCodes,
|
||||||
Res_DeleteItem,
|
Res_DeleteItem,
|
||||||
Res_ExcelUpload,
|
|
||||||
Res_Item,
|
Res_Item,
|
||||||
Res_ItemCategories,
|
Res_ItemCategories,
|
||||||
|
Res_ItemImage,
|
||||||
Res_ItemList,
|
Res_ItemList,
|
||||||
Res_LowestPriceResult,
|
Res_LowestPriceResult,
|
||||||
Res_LowestPriceTrigger,
|
Res_LowestPriceTrigger,
|
||||||
@ -51,15 +51,13 @@ async def check_item_codes(req: Req_CheckCodes, service: ItemService = Depends()
|
|||||||
return RemoveNoneResponse(await service.check_codes(user_info.company_id, req.codes))
|
return RemoveNoneResponse(await service.check_codes(user_info.company_id, req.codes))
|
||||||
|
|
||||||
|
|
||||||
@router.post(path="/upload-excel", response_model=Res_ExcelUpload, summary="엑셀 일괄 등록(스텁)")
|
@router.post(path="/image", response_model=Res_ItemImage, summary="상품 이미지 업로드(Azure Blob)")
|
||||||
async def upload_items_excel(
|
async def upload_item_image(
|
||||||
service: ItemService = Depends(),
|
service: ItemService = Depends(),
|
||||||
user_info: UserInfo = Depends(IsValidAccessToken),
|
user_info: UserInfo = Depends(IsValidAccessToken),
|
||||||
file: UploadFile = File(...),
|
file: UploadFile = File(...),
|
||||||
):
|
):
|
||||||
return RemoveNoneResponse(
|
return RemoveNoneResponse(await service.upload_image(user_info.company_id, file))
|
||||||
Res_ExcelUpload(received_filename=file.filename, status="not_implemented", message="엑셀 일괄 등록은 추후 구현")
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@router.get(path="/{item_id}", response_model=Res_Item, summary="상품 조회")
|
@router.get(path="/{item_id}", response_model=Res_Item, summary="상품 조회")
|
||||||
|
|||||||
@ -107,10 +107,10 @@ class Res_DeleteItem(Res_WebPacketProtocol):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Res_ExcelUpload(Res_WebPacketProtocol):
|
class Res_ItemImage(Res_WebPacketProtocol):
|
||||||
received_filename: Optional[str] = None
|
image_url: Optional[str] = None
|
||||||
status: str = ""
|
filename: Optional[str] = None
|
||||||
message: str = ""
|
size: Optional[int] = None
|
||||||
|
|
||||||
|
|
||||||
class Res_LowestPriceTrigger(Res_WebPacketProtocol):
|
class Res_LowestPriceTrigger(Res_WebPacketProtocol):
|
||||||
|
|||||||
@ -51,6 +51,7 @@ class QuotationData(WebPacketProtocol):
|
|||||||
preferred_sp_name: Optional[str] = None
|
preferred_sp_name: Optional[str] = None
|
||||||
equal_bid_yn: Optional[bool] = None
|
equal_bid_yn: Optional[bool] = None
|
||||||
equal_bid_data: Optional[Any] = None
|
equal_bid_data: Optional[Any] = None
|
||||||
|
participation_count: int = 0 # 견적별 참여 협력사 수(세션 distinct supplier). 목록 집계로 채움.
|
||||||
created_at: Optional[datetime] = None
|
created_at: Optional[datetime] = None
|
||||||
updated_at: Optional[datetime] = None
|
updated_at: Optional[datetime] = None
|
||||||
|
|
||||||
@ -143,8 +144,12 @@ class QuotationCardData(WebPacketProtocol):
|
|||||||
nego_card_id: Optional[uuid.UUID] = None
|
nego_card_id: Optional[uuid.UUID] = None
|
||||||
wild_card_id: Optional[uuid.UUID] = None
|
wild_card_id: Optional[uuid.UUID] = None
|
||||||
type: Optional[int] = None
|
type: Optional[int] = None
|
||||||
|
number: Optional[str] = None
|
||||||
name: Optional[str] = None
|
name: Optional[str] = None
|
||||||
script: Optional[str] = None
|
script: Optional[str] = None # 협상 멘트(평문)
|
||||||
|
edit_script: Optional[Any] = None # 협상 멘트(Slate 서식본)
|
||||||
|
condition: Optional[str] = None # 와일드카드 전용: 사용 조건(트리거)
|
||||||
|
memo: Optional[str] = None # 와일드카드 전용: 메모
|
||||||
|
|
||||||
|
|
||||||
class Res_QuotationCards(Res_WebPacketProtocol):
|
class Res_QuotationCards(Res_WebPacketProtocol):
|
||||||
|
|||||||
@ -63,9 +63,3 @@ class Res_CheckCodes(Res_WebPacketProtocol):
|
|||||||
|
|
||||||
class Res_DeleteSupplier(Res_WebPacketProtocol):
|
class Res_DeleteSupplier(Res_WebPacketProtocol):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Res_ExcelUpload(Res_WebPacketProtocol):
|
|
||||||
received_filename: Optional[str] = None
|
|
||||||
status: str = ""
|
|
||||||
message: str = ""
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from fastapi import APIRouter, Depends, File, Query, UploadFile
|
from fastapi import APIRouter, Depends, Query
|
||||||
|
|
||||||
from common.models.gmodel import PageParams, UserInfo
|
from common.models.gmodel import PageParams, UserInfo
|
||||||
from router.v1.validator.dependencies import IsValidAccessToken, RemoveNoneResponse
|
from router.v1.validator.dependencies import IsValidAccessToken, RemoveNoneResponse
|
||||||
@ -11,7 +11,6 @@ from .protocol import (
|
|||||||
Req_UpdateSupplier,
|
Req_UpdateSupplier,
|
||||||
Res_CheckCodes,
|
Res_CheckCodes,
|
||||||
Res_DeleteSupplier,
|
Res_DeleteSupplier,
|
||||||
Res_ExcelUpload,
|
|
||||||
Res_Supplier,
|
Res_Supplier,
|
||||||
Res_SupplierList,
|
Res_SupplierList,
|
||||||
)
|
)
|
||||||
@ -47,17 +46,6 @@ async def check_supplier_codes(
|
|||||||
return RemoveNoneResponse(await service.check_codes(user_info.company_id, req.codes))
|
return RemoveNoneResponse(await service.check_codes(user_info.company_id, req.codes))
|
||||||
|
|
||||||
|
|
||||||
@router.post(path="/upload-excel", response_model=Res_ExcelUpload, summary="협력사 엑셀 일괄 등록(스텁)")
|
|
||||||
async def upload_suppliers_excel(
|
|
||||||
service: SupplierService = Depends(),
|
|
||||||
user_info: UserInfo = Depends(IsValidAccessToken),
|
|
||||||
file: UploadFile = File(...),
|
|
||||||
):
|
|
||||||
return RemoveNoneResponse(
|
|
||||||
Res_ExcelUpload(received_filename=file.filename, status="not_implemented", message="엑셀 일괄 등록은 추후 구현")
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@router.get(path="/{supplier_id}", response_model=Res_Supplier, summary="협력사 조회")
|
@router.get(path="/{supplier_id}", response_model=Res_Supplier, summary="협력사 조회")
|
||||||
async def get_supplier(supplier_id: UUID, service: SupplierService = Depends(), user_info: UserInfo = Depends(IsValidAccessToken)):
|
async def get_supplier(supplier_id: UUID, service: SupplierService = Depends(), user_info: UserInfo = Depends(IsValidAccessToken)):
|
||||||
return RemoveNoneResponse(await service.get_supplier(user_info.company_id, str(supplier_id)))
|
return RemoveNoneResponse(await service.get_supplier(user_info.company_id, str(supplier_id)))
|
||||||
|
|||||||
50
negodata/backend/services/azure_blob_client.py
Normal file
50
negodata/backend/services/azure_blob_client.py
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import uuid
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from config.server_configs import storage_config
|
||||||
|
|
||||||
|
# 허용 content-type -> 저장 확장자. 목록 밖이면 업로드 거부.
|
||||||
|
_EXT_BY_TYPE = {
|
||||||
|
"image/jpeg": "jpg",
|
||||||
|
"image/png": "png",
|
||||||
|
"image/gif": "gif",
|
||||||
|
"image/webp": "webp",
|
||||||
|
}
|
||||||
|
|
||||||
|
# 업로드용 공유 클라이언트(연결 풀링).
|
||||||
|
_shared_client: httpx.AsyncClient | None = None
|
||||||
|
|
||||||
|
|
||||||
|
def _get_client() -> httpx.AsyncClient:
|
||||||
|
global _shared_client
|
||||||
|
if _shared_client is None or _shared_client.is_closed:
|
||||||
|
_shared_client = httpx.AsyncClient(
|
||||||
|
timeout=httpx.Timeout(60.0, connect=10.0),
|
||||||
|
limits=httpx.Limits(max_keepalive_connections=10, max_connections=20),
|
||||||
|
)
|
||||||
|
return _shared_client
|
||||||
|
|
||||||
|
|
||||||
|
def is_allowed_image(content_type: str) -> bool:
|
||||||
|
return content_type in _EXT_BY_TYPE
|
||||||
|
|
||||||
|
|
||||||
|
async def upload_image(company_id: str, content: bytes, content_type: str) -> str:
|
||||||
|
"""Azure Blob 에 이미지를 올리고 접근 URL 을 돌려준다.
|
||||||
|
blob 경로: <blob_root>/<company_id>/items/<uuid>.<ext>
|
||||||
|
— company_id 로 멀티테넌트 격리.
|
||||||
|
실패 시 예외를 던진다(호출측에서 IMAGE_UPLOAD_FAILED 처리). 저장값은 SAS 를 뗀 public URL."""
|
||||||
|
ext = _EXT_BY_TYPE.get(content_type, "bin")
|
||||||
|
blob_path = f"{storage_config.blob_root}/{company_id}/items/{uuid.uuid4().hex}.{ext}"
|
||||||
|
|
||||||
|
base = storage_config.azure_blob_base_url.rstrip("/")
|
||||||
|
sas = storage_config.azure_blob_sas_token.strip("?'\"")
|
||||||
|
public_url = f"{base}/{blob_path}"
|
||||||
|
upload_url = f"{public_url}?{sas}"
|
||||||
|
headers = {"Content-Type": content_type, "x-ms-blob-type": "BlockBlob"}
|
||||||
|
|
||||||
|
resp = await _get_client().put(upload_url, content=content, headers=headers)
|
||||||
|
if resp.status_code not in (200, 201):
|
||||||
|
raise RuntimeError(f"Azure Blob upload failed: status={resp.status_code} body={resp.text[:200]}")
|
||||||
|
return public_url
|
||||||
@ -1,12 +1,14 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from fastapi import Depends
|
from fastapi import Depends, UploadFile
|
||||||
|
|
||||||
from common.database.db_session_manager import DB_SESSION_MNG
|
from common.database.db_session_manager import DB_SESSION_MNG
|
||||||
from common.database.model.models import items
|
from common.database.model.models import items
|
||||||
from common.enums import DBWRType, ErrorType
|
from common.enums import DBWRType, ErrorType
|
||||||
from common.logger import LOG
|
from common.logger import LOG
|
||||||
from common.models.gmodel import PageParams
|
from common.models.gmodel import PageParams
|
||||||
|
from services.azure_blob_client import is_allowed_image, upload_image as blob_upload_image
|
||||||
|
from config.server_configs import storage_config
|
||||||
from crud.item_crud import IItemCRUD, ItemCRUD
|
from crud.item_crud import IItemCRUD, ItemCRUD
|
||||||
from router.v1.item.protocol import (
|
from router.v1.item.protocol import (
|
||||||
ItemCategory,
|
ItemCategory,
|
||||||
@ -15,6 +17,7 @@ from router.v1.item.protocol import (
|
|||||||
Res_DeleteItem,
|
Res_DeleteItem,
|
||||||
Res_Item,
|
Res_Item,
|
||||||
Res_ItemCategories,
|
Res_ItemCategories,
|
||||||
|
Res_ItemImage,
|
||||||
Res_ItemList,
|
Res_ItemList,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -162,3 +165,28 @@ class ItemService:
|
|||||||
if err_type != ErrorType.SUCCESS:
|
if err_type != ErrorType.SUCCESS:
|
||||||
res.result.SetResult(err_type)
|
res.result.SetResult(err_type)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
async def upload_image(self, company_id: str, file: UploadFile) -> Res_ItemImage:
|
||||||
|
"""상품 이미지를 Azure Blob 에 올리고 image_url 을 돌려준다.
|
||||||
|
DB 는 건드리지 않는다 — 프론트가 이 URL 을 create/update 의 image_url 로 실어 보낸다."""
|
||||||
|
res = Res_ItemImage()
|
||||||
|
content_type = file.content_type or ""
|
||||||
|
if not is_allowed_image(content_type):
|
||||||
|
res.result.SetResult(ErrorType.IMAGE_INVALID_TYPE)
|
||||||
|
return res
|
||||||
|
|
||||||
|
content = await file.read()
|
||||||
|
if len(content) > storage_config.max_image_mb * 1024 * 1024:
|
||||||
|
res.result.SetResult(ErrorType.IMAGE_TOO_LARGE)
|
||||||
|
return res
|
||||||
|
|
||||||
|
try:
|
||||||
|
res.image_url = await blob_upload_image(company_id, content, content_type)
|
||||||
|
except Exception as ex:
|
||||||
|
LOG.e_no_callstack(ex)
|
||||||
|
res.result.SetResult(ErrorType.IMAGE_UPLOAD_FAILED)
|
||||||
|
return res
|
||||||
|
|
||||||
|
res.filename = file.filename
|
||||||
|
res.size = len(content)
|
||||||
|
return res
|
||||||
|
|||||||
@ -57,6 +57,21 @@ class QuotationService:
|
|||||||
if err_type != ErrorType.SUCCESS:
|
if err_type != ErrorType.SUCCESS:
|
||||||
res.result.SetResult(err_type)
|
res.result.SetResult(err_type)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
# 참여 협력사 수(세션 distinct supplier)를 이 페이지 견적들에 대해 한 방으로 세서 합친다(메인 쿼리 비건드림).
|
||||||
|
qt_ids = [r.qt_id for r in rows]
|
||||||
|
counts = {}
|
||||||
|
if qt_ids:
|
||||||
|
cnt_err, got = await DB_SESSION_MNG.execute_lambda(
|
||||||
|
quotations.DBType(),
|
||||||
|
DBWRType.DB_READ.value,
|
||||||
|
lambda s: self.quotation_crud.session_counts(s, qt_ids),
|
||||||
|
)
|
||||||
|
if cnt_err == ErrorType.SUCCESS:
|
||||||
|
counts = got
|
||||||
|
for r in rows:
|
||||||
|
r.participation_count = counts.get(r.qt_id, 0)
|
||||||
|
|
||||||
res.quotations = [QuotationData.model_validate(r) for r in rows]
|
res.quotations = [QuotationData.model_validate(r) for r in rows]
|
||||||
res.total = total
|
res.total = total
|
||||||
return res
|
return res
|
||||||
@ -247,9 +262,10 @@ class QuotationService:
|
|||||||
return res
|
return res
|
||||||
|
|
||||||
res.qt_id = quotation.qt_id
|
res.qt_id = quotation.qt_id
|
||||||
# rows = [(chat_row, nego_card_id, name, script), ...]. nego/wild 구분은 chats.card_type.
|
# rows = [(chat_row, card_id, number, name, script, edit_script, condition, memo), ...].
|
||||||
|
# nego/wild 구분은 chats.card_type. condition/memo 는 와일드카드에만 존재.
|
||||||
cards = []
|
cards = []
|
||||||
for chat_row, nc_id, nc_name, nc_script in rows:
|
for chat_row, nc_id, nc_number, nc_name, nc_script, nc_edit, wc_condition, wc_memo in rows:
|
||||||
is_wild = chat_row.card_type == 2
|
is_wild = chat_row.card_type == 2
|
||||||
cards.append(
|
cards.append(
|
||||||
QuotationCardData(
|
QuotationCardData(
|
||||||
@ -258,8 +274,12 @@ class QuotationService:
|
|||||||
nego_card_id=None if is_wild else nc_id,
|
nego_card_id=None if is_wild else nc_id,
|
||||||
wild_card_id=nc_id if is_wild else None,
|
wild_card_id=nc_id if is_wild else None,
|
||||||
type=chat_row.card_type if chat_row.card_type is not None else 1,
|
type=chat_row.card_type if chat_row.card_type is not None else 1,
|
||||||
|
number=nc_number,
|
||||||
name=nc_name,
|
name=nc_name,
|
||||||
script=nc_script,
|
script=nc_script,
|
||||||
|
edit_script=nc_edit,
|
||||||
|
condition=wc_condition if is_wild else None,
|
||||||
|
memo=wc_memo if is_wild else None,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
res.cards = cards
|
res.cards = cards
|
||||||
|
|||||||
525
negodata/front/package-lock.json
generated
525
negodata/front/package-lock.json
generated
@ -14,7 +14,6 @@
|
|||||||
"@hookform/resolvers": "^5.4.0",
|
"@hookform/resolvers": "^5.4.0",
|
||||||
"@tailwindcss/vite": "^4.1.14",
|
"@tailwindcss/vite": "^4.1.14",
|
||||||
"@tanstack/react-query": "^5.62.0",
|
"@tanstack/react-query": "^5.62.0",
|
||||||
"@tanstack/react-router": "^1.170.15",
|
|
||||||
"@vitejs/plugin-react": "^5.0.4",
|
"@vitejs/plugin-react": "^5.0.4",
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
@ -27,6 +26,10 @@
|
|||||||
"react-hook-form": "^7.79.0",
|
"react-hook-form": "^7.79.0",
|
||||||
"react-router": "^7.17.0",
|
"react-router": "^7.17.0",
|
||||||
"shadcn": "^4.11.0",
|
"shadcn": "^4.11.0",
|
||||||
|
"slate": "^0.118.1",
|
||||||
|
"slate-dom": "^0.119.0",
|
||||||
|
"slate-history": "^0.113.1",
|
||||||
|
"slate-react": "^0.119.0",
|
||||||
"sonner": "^2.0.7",
|
"sonner": "^2.0.7",
|
||||||
"tailwind-merge": "^3.6.0",
|
"tailwind-merge": "^3.6.0",
|
||||||
"tw-animate-css": "^1.4.0",
|
"tw-animate-css": "^1.4.0",
|
||||||
@ -36,8 +39,6 @@
|
|||||||
"zustand": "^5.0.14"
|
"zustand": "^5.0.14"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tanstack/router-cli": "^1.167.17",
|
|
||||||
"@tanstack/router-plugin": "^1.168.18",
|
|
||||||
"@types/express": "^4.17.21",
|
"@types/express": "^4.17.21",
|
||||||
"@types/node": "^22.14.0",
|
"@types/node": "^22.14.0",
|
||||||
"@types/react": "^19.2.17",
|
"@types/react": "^19.2.17",
|
||||||
@ -1456,6 +1457,12 @@
|
|||||||
"jsep": "^0.4.0||^1.0.0"
|
"jsep": "^0.4.0||^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@juggle/resize-observer": {
|
||||||
|
"version": "3.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz",
|
||||||
|
"integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
"node_modules/@modelcontextprotocol/sdk": {
|
"node_modules/@modelcontextprotocol/sdk": {
|
||||||
"version": "1.29.0",
|
"version": "1.29.0",
|
||||||
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.29.0.tgz",
|
||||||
@ -3533,19 +3540,6 @@
|
|||||||
"vite": "^5.2.0 || ^6 || ^7 || ^8"
|
"vite": "^5.2.0 || ^6 || ^7 || ^8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tanstack/history": {
|
|
||||||
"version": "1.162.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/history/-/history-1.162.0.tgz",
|
|
||||||
"integrity": "sha512-79pf/RkhteYZTRgcR4F9kbk84P2N8rugQJswxfIqovlbRiT3yI7eBE+5QorIrZaOKktsgzRlXh1l/du/xpl4iA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=20.19"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/query-core": {
|
"node_modules/@tanstack/query-core": {
|
||||||
"version": "5.101.0",
|
"version": "5.101.0",
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.101.0.tgz",
|
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.101.0.tgz",
|
||||||
@ -3572,269 +3566,6 @@
|
|||||||
"react": "^18 || ^19"
|
"react": "^18 || ^19"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@tanstack/react-router": {
|
|
||||||
"version": "1.170.15",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/react-router/-/react-router-1.170.15.tgz",
|
|
||||||
"integrity": "sha512-GawYz7HEjj8rTUUDoT/SemDEVm63pZUO+2mOcXHY9Jl3EwMS5gFBnPu/2UvcrwRm1jN1k79fokc0d4aFmrLatg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@tanstack/history": "1.162.0",
|
|
||||||
"@tanstack/react-store": "^0.9.3",
|
|
||||||
"@tanstack/router-core": "1.171.13",
|
|
||||||
"isbot": "^5.1.22"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=20.19"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"react": ">=18.0.0 || >=19.0.0",
|
|
||||||
"react-dom": ">=18.0.0 || >=19.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/react-store": {
|
|
||||||
"version": "0.9.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/react-store/-/react-store-0.9.3.tgz",
|
|
||||||
"integrity": "sha512-y2iHd/N9OkoQbFJLUX1T9vbc2O9tjH0pQRgTcx1/Nz4IlwLvkgpuglXUx+mXt0g5ZDFrEeDnONPqkbfxXJKwRg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@tanstack/store": "0.9.3",
|
|
||||||
"use-sync-external-store": "^1.6.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
||||||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/router-cli": {
|
|
||||||
"version": "1.167.17",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/router-cli/-/router-cli-1.167.17.tgz",
|
|
||||||
"integrity": "sha512-kws9PNdspkHbeZG6aLDjjpgH/hg7Q565BdSW9hHrjKmXPq/at7OKxQnA76aw9dJiJqy9OmST2RdOKlMEog43+g==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@tanstack/router-generator": "1.167.17",
|
|
||||||
"chokidar": "^5.0.0",
|
|
||||||
"yargs": "^17.7.2"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"tsr": "bin/tsr.cjs"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=20.19"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/router-cli/node_modules/chokidar": {
|
|
||||||
"version": "5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz",
|
|
||||||
"integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"readdirp": "^5.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 20.19.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://paulmillr.com/funding/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/router-cli/node_modules/readdirp": {
|
|
||||||
"version": "5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz",
|
|
||||||
"integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 20.19.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "individual",
|
|
||||||
"url": "https://paulmillr.com/funding/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/router-core": {
|
|
||||||
"version": "1.171.13",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/router-core/-/router-core-1.171.13.tgz",
|
|
||||||
"integrity": "sha512-+NOwEj1kO/6IGmpHRIZHasYxYWpyBQGNIZAST9aNrk9Q3YlU9SgqVnl1pbLa9qAKfeNdXQIRve0RQb/0kyDeDA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@tanstack/history": "1.162.0",
|
|
||||||
"cookie-es": "^3.0.0",
|
|
||||||
"seroval": "^1.5.4",
|
|
||||||
"seroval-plugins": "^1.5.4"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=20.19"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/router-generator": {
|
|
||||||
"version": "1.167.17",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/router-generator/-/router-generator-1.167.17.tgz",
|
|
||||||
"integrity": "sha512-xtB9tB2Ws0tWR6Pi7nc3Qk9IYgoh1mQCKWjHqIl9tf6BNUpKoqniJoPAQ4+LGrK8FeZYU0o0p/qlZEyj9FAulA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/types": "^7.28.5",
|
|
||||||
"@tanstack/router-core": "1.171.13",
|
|
||||||
"@tanstack/router-utils": "1.162.2",
|
|
||||||
"@tanstack/virtual-file-routes": "1.162.0",
|
|
||||||
"jiti": "^2.7.0",
|
|
||||||
"magic-string": "^0.30.21",
|
|
||||||
"prettier": "^3.5.0",
|
|
||||||
"zod": "^4.4.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=20.19"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/router-plugin": {
|
|
||||||
"version": "1.168.18",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/router-plugin/-/router-plugin-1.168.18.tgz",
|
|
||||||
"integrity": "sha512-MofS28/axfnfnhOD2RSgJEaU882aX5RsAzhGz5Vc4XhAmvCjy919u9JrNs4QsTWFbTD1P7IJ8WFlFVsrg0pStg==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/core": "^7.28.5",
|
|
||||||
"@babel/template": "^7.27.2",
|
|
||||||
"@babel/types": "^7.28.5",
|
|
||||||
"@tanstack/router-core": "1.171.13",
|
|
||||||
"@tanstack/router-generator": "1.167.17",
|
|
||||||
"@tanstack/router-utils": "1.162.2",
|
|
||||||
"chokidar": "^5.0.0",
|
|
||||||
"unplugin": "^3.0.0",
|
|
||||||
"zod": "^4.4.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=20.19"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@rsbuild/core": ">=1.0.2 || ^2.0.0",
|
|
||||||
"@tanstack/react-router": "^1.170.15",
|
|
||||||
"vite": ">=5.0.0 || >=6.0.0 || >=7.0.0 || >=8.0.0",
|
|
||||||
"vite-plugin-solid": "^2.11.10 || ^3.0.0-0",
|
|
||||||
"webpack": ">=5.92.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"@rsbuild/core": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@tanstack/react-router": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"vite": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"vite-plugin-solid": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"webpack": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/router-plugin/node_modules/chokidar": {
|
|
||||||
"version": "5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz",
|
|
||||||
"integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"readdirp": "^5.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 20.19.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://paulmillr.com/funding/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/router-plugin/node_modules/readdirp": {
|
|
||||||
"version": "5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz",
|
|
||||||
"integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 20.19.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "individual",
|
|
||||||
"url": "https://paulmillr.com/funding/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/router-utils": {
|
|
||||||
"version": "1.162.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/router-utils/-/router-utils-1.162.2.tgz",
|
|
||||||
"integrity": "sha512-hTWqJtqIFFdvuCl8WXNyrodp2L9zo2G37xKRrcVmVRWpAB2h+U1LuRAfS4tsFTiWOIoE/B+WDVFB8JpoEdw6jQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/generator": "^7.28.5",
|
|
||||||
"@babel/parser": "^7.28.5",
|
|
||||||
"@babel/types": "^7.28.5",
|
|
||||||
"ansis": "^4.1.0",
|
|
||||||
"babel-dead-code-elimination": "^1.0.12",
|
|
||||||
"diff": "^8.0.2",
|
|
||||||
"pathe": "^2.0.3",
|
|
||||||
"tinyglobby": "^0.2.15"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=20.19"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/store": {
|
|
||||||
"version": "0.9.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/store/-/store-0.9.3.tgz",
|
|
||||||
"integrity": "sha512-8reSzl/qGWGGVKhBoxXPMWzATSbZLZFWhwBAFO9NAyp0TxzfBP0mIrGb8CP8KrQTmvzXlR/vFPPUrHTLBGyFyw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tanstack/virtual-file-routes": {
|
|
||||||
"version": "1.162.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tanstack/virtual-file-routes/-/virtual-file-routes-1.162.0.tgz",
|
|
||||||
"integrity": "sha512-uhOeFyxLcU41HzvrxsGpiWdcMbScY1EDgbZ5K7DVRMYInbLYWAC0EA/kx9wXAoSM8q82bUG2hRl8+EAjE6XAbA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=20.19"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/tannerlinsley"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@ts-morph/common": {
|
"node_modules/@ts-morph/common": {
|
||||||
"version": "0.27.0",
|
"version": "0.27.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.27.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.27.0.tgz",
|
||||||
@ -4243,16 +3974,6 @@
|
|||||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ansis": {
|
|
||||||
"version": "4.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansis/-/ansis-4.3.1.tgz",
|
|
||||||
"integrity": "sha512-BJ8/l4R5LRE7hW9WdSuGYrLSHi2ynxeFpDFbH0K/CgNeY/tyhk+vO6TYxXC5r5CpUhNVX310xzPsN/H9lCdfOA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "ISC",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/argparse": {
|
"node_modules/argparse": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||||
@ -4411,19 +4132,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/babel-dead-code-elimination": {
|
|
||||||
"version": "1.0.12",
|
|
||||||
"resolved": "https://registry.npmjs.org/babel-dead-code-elimination/-/babel-dead-code-elimination-1.0.12.tgz",
|
|
||||||
"integrity": "sha512-GERT7L2TiYcYDtYk1IpD+ASAYXjKbLTDPhBtYj7X1NuRMDTMtAx9kyBenub1Ev41lo91OHCKdmP+egTDmfQ7Ig==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/core": "^7.23.7",
|
|
||||||
"@babel/parser": "^7.23.6",
|
|
||||||
"@babel/traverse": "^7.23.7",
|
|
||||||
"@babel/types": "^7.23.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/balanced-match": {
|
"node_modules/balanced-match": {
|
||||||
"version": "4.0.4",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
|
||||||
@ -4839,6 +4547,12 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/compute-scroll-into-view": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/concat-map": {
|
"node_modules/concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
@ -4882,12 +4596,6 @@
|
|||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/cookie-es": {
|
|
||||||
"version": "3.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-3.1.1.tgz",
|
|
||||||
"integrity": "sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/cookie-signature": {
|
"node_modules/cookie-signature": {
|
||||||
"version": "1.0.7",
|
"version": "1.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
|
||||||
@ -5236,6 +4944,19 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/direction": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/direction/-/direction-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"direction": "cli.js"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/wooorm"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/dotenv": {
|
"node_modules/dotenv": {
|
||||||
"version": "17.4.2",
|
"version": "17.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",
|
||||||
@ -6839,6 +6560,12 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-hotkey": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-hotkey/-/is-hotkey-0.2.0.tgz",
|
||||||
|
"integrity": "sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/is-in-ssh": {
|
"node_modules/is-in-ssh": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz",
|
||||||
@ -6957,6 +6684,15 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-plain-object": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/is-promise": {
|
"node_modules/is-promise": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
|
||||||
@ -7166,15 +6902,6 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/isbot": {
|
|
||||||
"version": "5.1.42",
|
|
||||||
"resolved": "https://registry.npmjs.org/isbot/-/isbot-5.1.42.tgz",
|
|
||||||
"integrity": "sha512-/SXsVh7KpPRISrD4ffrGSxnTLlUBzEQUfWIusaJPrpJ93FW1P0YEZri5vAUkFsA0m2HRUhQRQadk2wJ+EeKowQ==",
|
|
||||||
"license": "Unlicense",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/isexe": {
|
"node_modules/isexe": {
|
||||||
"version": "3.1.5",
|
"version": "3.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz",
|
||||||
@ -7684,7 +7411,6 @@
|
|||||||
"version": "4.18.1",
|
"version": "4.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
|
||||||
"integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
|
"integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/lodash.isempty": {
|
"node_modules/lodash.isempty": {
|
||||||
@ -8823,13 +8549,6 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pathe": {
|
|
||||||
"version": "2.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
|
|
||||||
"integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/picocolors": {
|
"node_modules/picocolors": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||||
@ -8937,22 +8656,6 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
|
||||||
"version": "3.8.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.4.tgz",
|
|
||||||
"integrity": "sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"bin": {
|
|
||||||
"prettier": "bin/prettier.cjs"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/pretty-ms": {
|
"node_modules/pretty-ms": {
|
||||||
"version": "9.3.0",
|
"version": "9.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz",
|
||||||
@ -9598,6 +9301,15 @@
|
|||||||
"integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
|
"integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/scroll-into-view-if-needed": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"compute-scroll-into-view": "^3.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "6.3.1",
|
"version": "6.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||||
@ -9646,27 +9358,6 @@
|
|||||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/seroval": {
|
|
||||||
"version": "1.5.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/seroval/-/seroval-1.5.4.tgz",
|
|
||||||
"integrity": "sha512-46uFvgrXTVxZcUorgSSRZ4y+ieqLLQRMlG4bnCZKW3qI6BZm7Rg4ntMW4p1mILEEBZWrFlcpp0AyIIlM6jD9iw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/seroval-plugins": {
|
|
||||||
"version": "1.5.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.5.4.tgz",
|
|
||||||
"integrity": "sha512-S0xQPhUTefAhNvNWFg0c1J8qJArHt5KdtJ/cFAofo06KD1MVSeFWyl4iiu+ApDIuw0WhjpOfCdgConOfAnLgkw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"seroval": "^1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/serve-static": {
|
"node_modules/serve-static": {
|
||||||
"version": "1.16.3",
|
"version": "1.16.3",
|
||||||
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz",
|
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz",
|
||||||
@ -9977,6 +9668,88 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/slate": {
|
||||||
|
"version": "0.118.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/slate/-/slate-0.118.1.tgz",
|
||||||
|
"integrity": "sha512-6H1DNgnSwAFhq/pIgf+tLvjNzH912M5XrKKhP9Frmbds2zFXdSJ6L/uFNyVKxQIkPzGWPD0m+wdDfmEuGFH5Tg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"immer": "^10.0.3",
|
||||||
|
"tiny-warning": "^1.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/slate-dom": {
|
||||||
|
"version": "0.119.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/slate-dom/-/slate-dom-0.119.0.tgz",
|
||||||
|
"integrity": "sha512-foc8a2NkE+1SldDIYaoqjhVKupt8RSuvHI868rfYOcypD4we5TT7qunjRKJ852EIRh/Ql8sSTepXgXKOUJnt1w==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@juggle/resize-observer": "^3.4.0",
|
||||||
|
"direction": "^1.0.4",
|
||||||
|
"is-hotkey": "^0.2.0",
|
||||||
|
"is-plain-object": "^5.0.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"scroll-into-view-if-needed": "^3.1.0",
|
||||||
|
"tiny-invariant": "1.3.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"slate": ">=0.99.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/slate-dom/node_modules/tiny-invariant": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/slate-history": {
|
||||||
|
"version": "0.113.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/slate-history/-/slate-history-0.113.1.tgz",
|
||||||
|
"integrity": "sha512-J9NSJ+UG2GxoW0lw5mloaKcN0JI0x2IA5M5FxyGiInpn+QEutxT1WK7S/JneZCMFJBoHs1uu7S7e6pxQjubHmQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"is-plain-object": "^5.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"slate": ">=0.65.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/slate-react": {
|
||||||
|
"version": "0.119.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/slate-react/-/slate-react-0.119.0.tgz",
|
||||||
|
"integrity": "sha512-snHqhQ1NkZXyuqG4JTxywRg1accho/hnioM2JIYqziaQQcgfqLi2Pe1AHL82WIC1pLWdzPjy2O7drnSbO0DBsQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@juggle/resize-observer": "^3.4.0",
|
||||||
|
"direction": "^1.0.4",
|
||||||
|
"is-hotkey": "^0.2.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"scroll-into-view-if-needed": "^3.1.0",
|
||||||
|
"tiny-invariant": "1.3.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": ">=18.2.0",
|
||||||
|
"react-dom": ">=18.2.0",
|
||||||
|
"slate": ">=0.114.0",
|
||||||
|
"slate-dom": ">=0.116.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/slate-react/node_modules/tiny-invariant": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/slate/node_modules/immer": {
|
||||||
|
"version": "10.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz",
|
||||||
|
"integrity": "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/immer"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/sonner": {
|
"node_modules/sonner": {
|
||||||
"version": "2.0.7",
|
"version": "2.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz",
|
||||||
@ -10311,6 +10084,12 @@
|
|||||||
"integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==",
|
"integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/tiny-warning": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/tinyglobby": {
|
"node_modules/tinyglobby": {
|
||||||
"version": "0.2.17",
|
"version": "0.2.17",
|
||||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
|
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
|
||||||
@ -11109,21 +10888,6 @@
|
|||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/unplugin": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@jridgewell/remapping": "^2.3.5",
|
|
||||||
"picomatch": "^4.0.3",
|
|
||||||
"webpack-virtual-modules": "^0.6.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^20.19.0 || >=22.12.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/update-browserslist-db": {
|
"node_modules/update-browserslist-db": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
|
||||||
@ -11369,13 +11133,6 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "BSD-2-Clause"
|
"license": "BSD-2-Clause"
|
||||||
},
|
},
|
||||||
"node_modules/webpack-virtual-modules": {
|
|
||||||
"version": "0.6.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
|
|
||||||
"integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/whatwg-url": {
|
"node_modules/whatwg-url": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||||
|
|||||||
@ -30,6 +30,10 @@
|
|||||||
"react-hook-form": "^7.79.0",
|
"react-hook-form": "^7.79.0",
|
||||||
"react-router": "^7.17.0",
|
"react-router": "^7.17.0",
|
||||||
"shadcn": "^4.11.0",
|
"shadcn": "^4.11.0",
|
||||||
|
"slate": "^0.118.1",
|
||||||
|
"slate-dom": "^0.119.0",
|
||||||
|
"slate-history": "^0.113.1",
|
||||||
|
"slate-react": "^0.119.0",
|
||||||
"sonner": "^2.0.7",
|
"sonner": "^2.0.7",
|
||||||
"tailwind-merge": "^3.6.0",
|
"tailwind-merge": "^3.6.0",
|
||||||
"tw-animate-css": "^1.4.0",
|
"tw-animate-css": "^1.4.0",
|
||||||
|
|||||||
@ -4,7 +4,10 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
import {
|
||||||
|
useMutation,
|
||||||
|
useQuery
|
||||||
|
} from '@tanstack/react-query';
|
||||||
import type {
|
import type {
|
||||||
DataTag,
|
DataTag,
|
||||||
DefinedInitialDataOptions,
|
DefinedInitialDataOptions,
|
||||||
@ -17,8 +20,8 @@ import type {
|
|||||||
UseMutationOptions,
|
UseMutationOptions,
|
||||||
UseMutationResult,
|
UseMutationResult,
|
||||||
UseQueryOptions,
|
UseQueryOptions,
|
||||||
UseQueryResult,
|
UseQueryResult
|
||||||
} from "@tanstack/react-query";
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
HTTPValidationError,
|
HTTPValidationError,
|
||||||
@ -27,361 +30,299 @@ import type {
|
|||||||
ResCreateAccount,
|
ResCreateAccount,
|
||||||
ResLogin,
|
ResLogin,
|
||||||
ResMe,
|
ResMe,
|
||||||
ResRefreshToken,
|
ResRefreshToken
|
||||||
} from ".././model";
|
} from '.././model';
|
||||||
|
|
||||||
|
import { customFetch } from '../../mutator/custom-fetch';
|
||||||
|
|
||||||
|
|
||||||
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||||
|
|
||||||
|
|
||||||
import { customFetch } from "../../mutator/custom-fetch";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id/pw 로 로그인하고 JWT 토큰을 발급한다.
|
* id/pw 로 로그인하고 JWT 토큰을 발급한다.
|
||||||
* @summary 로그인
|
* @summary 로그인
|
||||||
*/
|
*/
|
||||||
export const login = (reqLogin: ReqLogin, signal?: AbortSignal) => {
|
export const login = (
|
||||||
return customFetch<ResLogin>({
|
reqLogin: ReqLogin,
|
||||||
url: `/v1/auth/login`,
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
method: "POST",
|
) => {
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
data: reqLogin,
|
|
||||||
signal,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getLoginMutationOptions = <
|
|
||||||
TError = void | HTTPValidationError,
|
return customFetch<ResLogin>(
|
||||||
TContext = unknown,
|
{url: `/v1/auth/login`, method: 'POST',
|
||||||
>(options?: {
|
headers: {'Content-Type': 'application/json', },
|
||||||
mutation?: UseMutationOptions<
|
data: reqLogin, signal
|
||||||
Awaited<ReturnType<typeof login>>,
|
},
|
||||||
TError,
|
options);
|
||||||
{ data: ReqLogin },
|
}
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
}): UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof login>>,
|
export const getLoginMutationOptions = <TError = void | HTTPValidationError,
|
||||||
TError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof login>>, TError,{data: ReqLogin}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
{ data: ReqLogin },
|
): UseMutationOptions<Awaited<ReturnType<typeof login>>, TError,{data: ReqLogin}, TContext> => {
|
||||||
TContext
|
|
||||||
> => {
|
const mutationKey = ['login'];
|
||||||
const mutationKey = ["login"];
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||||
const { mutation: mutationOptions } = options
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||||
? options.mutation &&
|
options
|
||||||
"mutationKey" in options.mutation &&
|
|
||||||
options.mutation.mutationKey
|
|
||||||
? options
|
|
||||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||||
: { mutation: { mutationKey } };
|
: {mutation: { mutationKey, }, request: undefined};
|
||||||
|
|
||||||
const mutationFn: MutationFunction<
|
|
||||||
Awaited<ReturnType<typeof login>>,
|
|
||||||
{ data: ReqLogin }
|
|
||||||
> = (props) => {
|
const mutationFn: MutationFunction<Awaited<ReturnType<typeof login>>, {data: ReqLogin}> = (props) => {
|
||||||
const {data} = props ?? {};
|
const {data} = props ?? {};
|
||||||
|
|
||||||
return login(data);
|
return login(data,requestOptions)
|
||||||
};
|
}
|
||||||
|
|
||||||
return { mutationFn, ...mutationOptions };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type LoginMutationResult = NonNullable<
|
|
||||||
Awaited<ReturnType<typeof login>>
|
|
||||||
>;
|
return { mutationFn, ...mutationOptions }}
|
||||||
export type LoginMutationBody = ReqLogin;
|
|
||||||
export type LoginMutationError = void | HTTPValidationError;
|
export type LoginMutationResult = NonNullable<Awaited<ReturnType<typeof login>>>
|
||||||
|
export type LoginMutationBody = ReqLogin
|
||||||
|
export type LoginMutationError = void | HTTPValidationError
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 로그인
|
* @summary 로그인
|
||||||
*/
|
*/
|
||||||
export const useLogin = <
|
export const useLogin = <TError = void | HTTPValidationError,
|
||||||
TError = void | HTTPValidationError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof login>>, TError,{data: ReqLogin}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
TContext = unknown,
|
, queryClient?: QueryClient): UseMutationResult<
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
mutation?: UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof login>>,
|
|
||||||
TError,
|
|
||||||
{ data: ReqLogin },
|
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseMutationResult<
|
|
||||||
Awaited<ReturnType<typeof login>>,
|
Awaited<ReturnType<typeof login>>,
|
||||||
TError,
|
TError,
|
||||||
{data: ReqLogin},
|
{data: ReqLogin},
|
||||||
TContext
|
TContext
|
||||||
> => {
|
> => {
|
||||||
|
|
||||||
const mutationOptions = getLoginMutationOptions(options);
|
const mutationOptions = getLoginMutationOptions(options);
|
||||||
|
|
||||||
return useMutation(mutationOptions, queryClient);
|
return useMutation(mutationOptions, queryClient);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* 새 계정을 생성한다.
|
* 새 계정을 생성한다.
|
||||||
* @summary 계정 생성
|
* @summary 계정 생성
|
||||||
*/
|
*/
|
||||||
export const createAccount = (
|
export const createAccount = (
|
||||||
reqCreateAccount: ReqCreateAccount,
|
reqCreateAccount: ReqCreateAccount,
|
||||||
signal?: AbortSignal,
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
) => {
|
) => {
|
||||||
return customFetch<ResCreateAccount>({
|
|
||||||
url: `/v1/auth/create`,
|
|
||||||
method: "POST",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
data: reqCreateAccount,
|
|
||||||
signal,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getCreateAccountMutationOptions = <
|
|
||||||
TError = void | HTTPValidationError,
|
return customFetch<ResCreateAccount>(
|
||||||
TContext = unknown,
|
{url: `/v1/auth/create`, method: 'POST',
|
||||||
>(options?: {
|
headers: {'Content-Type': 'application/json', },
|
||||||
mutation?: UseMutationOptions<
|
data: reqCreateAccount, signal
|
||||||
Awaited<ReturnType<typeof createAccount>>,
|
},
|
||||||
TError,
|
options);
|
||||||
{ data: ReqCreateAccount },
|
}
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
}): UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof createAccount>>,
|
export const getCreateAccountMutationOptions = <TError = void | HTTPValidationError,
|
||||||
TError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAccount>>, TError,{data: ReqCreateAccount}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
{ data: ReqCreateAccount },
|
): UseMutationOptions<Awaited<ReturnType<typeof createAccount>>, TError,{data: ReqCreateAccount}, TContext> => {
|
||||||
TContext
|
|
||||||
> => {
|
const mutationKey = ['createAccount'];
|
||||||
const mutationKey = ["createAccount"];
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||||
const { mutation: mutationOptions } = options
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||||
? options.mutation &&
|
options
|
||||||
"mutationKey" in options.mutation &&
|
|
||||||
options.mutation.mutationKey
|
|
||||||
? options
|
|
||||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||||
: { mutation: { mutationKey } };
|
: {mutation: { mutationKey, }, request: undefined};
|
||||||
|
|
||||||
const mutationFn: MutationFunction<
|
|
||||||
Awaited<ReturnType<typeof createAccount>>,
|
|
||||||
{ data: ReqCreateAccount }
|
|
||||||
> = (props) => {
|
const mutationFn: MutationFunction<Awaited<ReturnType<typeof createAccount>>, {data: ReqCreateAccount}> = (props) => {
|
||||||
const {data} = props ?? {};
|
const {data} = props ?? {};
|
||||||
|
|
||||||
return createAccount(data);
|
return createAccount(data,requestOptions)
|
||||||
};
|
}
|
||||||
|
|
||||||
return { mutationFn, ...mutationOptions };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type CreateAccountMutationResult = NonNullable<
|
|
||||||
Awaited<ReturnType<typeof createAccount>>
|
|
||||||
>;
|
return { mutationFn, ...mutationOptions }}
|
||||||
export type CreateAccountMutationBody = ReqCreateAccount;
|
|
||||||
export type CreateAccountMutationError = void | HTTPValidationError;
|
export type CreateAccountMutationResult = NonNullable<Awaited<ReturnType<typeof createAccount>>>
|
||||||
|
export type CreateAccountMutationBody = ReqCreateAccount
|
||||||
|
export type CreateAccountMutationError = void | HTTPValidationError
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 계정 생성
|
* @summary 계정 생성
|
||||||
*/
|
*/
|
||||||
export const useCreateAccount = <
|
export const useCreateAccount = <TError = void | HTTPValidationError,
|
||||||
TError = void | HTTPValidationError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAccount>>, TError,{data: ReqCreateAccount}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
TContext = unknown,
|
, queryClient?: QueryClient): UseMutationResult<
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
mutation?: UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof createAccount>>,
|
|
||||||
TError,
|
|
||||||
{ data: ReqCreateAccount },
|
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseMutationResult<
|
|
||||||
Awaited<ReturnType<typeof createAccount>>,
|
Awaited<ReturnType<typeof createAccount>>,
|
||||||
TError,
|
TError,
|
||||||
{data: ReqCreateAccount},
|
{data: ReqCreateAccount},
|
||||||
TContext
|
TContext
|
||||||
> => {
|
> => {
|
||||||
|
|
||||||
const mutationOptions = getCreateAccountMutationOptions(options);
|
const mutationOptions = getCreateAccountMutationOptions(options);
|
||||||
|
|
||||||
return useMutation(mutationOptions, queryClient);
|
return useMutation(mutationOptions, queryClient);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* refresh 토큰으로 access 토큰을 재발급한다.
|
* refresh 토큰으로 access 토큰을 재발급한다.
|
||||||
* @summary 액세스 토큰 갱신
|
* @summary 액세스 토큰 갱신
|
||||||
*/
|
*/
|
||||||
export const refreshToken = (signal?: AbortSignal) => {
|
export const refreshToken = (
|
||||||
return customFetch<ResRefreshToken>({
|
|
||||||
url: `/v1/auth/refresh_token`,
|
|
||||||
method: "POST",
|
|
||||||
signal,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getRefreshTokenMutationOptions = <
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
TError = void,
|
) => {
|
||||||
TContext = unknown,
|
|
||||||
>(options?: {
|
|
||||||
mutation?: UseMutationOptions<
|
return customFetch<ResRefreshToken>(
|
||||||
Awaited<ReturnType<typeof refreshToken>>,
|
{url: `/v1/auth/refresh_token`, method: 'POST', signal
|
||||||
TError,
|
},
|
||||||
void,
|
options);
|
||||||
TContext
|
}
|
||||||
>;
|
|
||||||
}): UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof refreshToken>>,
|
|
||||||
TError,
|
export const getRefreshTokenMutationOptions = <TError = void,
|
||||||
void,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof refreshToken>>, TError,void, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
TContext
|
): UseMutationOptions<Awaited<ReturnType<typeof refreshToken>>, TError,void, TContext> => {
|
||||||
> => {
|
|
||||||
const mutationKey = ["refreshToken"];
|
const mutationKey = ['refreshToken'];
|
||||||
const { mutation: mutationOptions } = options
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||||
? options.mutation &&
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||||
"mutationKey" in options.mutation &&
|
options
|
||||||
options.mutation.mutationKey
|
|
||||||
? options
|
|
||||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||||
: { mutation: { mutationKey } };
|
: {mutation: { mutationKey, }, request: undefined};
|
||||||
|
|
||||||
const mutationFn: MutationFunction<
|
|
||||||
Awaited<ReturnType<typeof refreshToken>>,
|
|
||||||
void
|
|
||||||
> = () => {
|
|
||||||
return refreshToken();
|
|
||||||
};
|
|
||||||
|
|
||||||
return { mutationFn, ...mutationOptions };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type RefreshTokenMutationResult = NonNullable<
|
|
||||||
Awaited<ReturnType<typeof refreshToken>>
|
|
||||||
>;
|
|
||||||
|
|
||||||
export type RefreshTokenMutationError = void;
|
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 액세스 토큰 갱신
|
* @summary 액세스 토큰 갱신
|
||||||
*/
|
*/
|
||||||
export const useRefreshToken = <TError = void, TContext = unknown>(
|
export const useRefreshToken = <TError = void,
|
||||||
options?: {
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof refreshToken>>, TError,void, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
mutation?: UseMutationOptions<
|
, queryClient?: QueryClient): UseMutationResult<
|
||||||
Awaited<ReturnType<typeof refreshToken>>,
|
|
||||||
TError,
|
|
||||||
void,
|
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseMutationResult<
|
|
||||||
Awaited<ReturnType<typeof refreshToken>>,
|
Awaited<ReturnType<typeof refreshToken>>,
|
||||||
TError,
|
TError,
|
||||||
void,
|
void,
|
||||||
TContext
|
TContext
|
||||||
> => {
|
> => {
|
||||||
|
|
||||||
const mutationOptions = getRefreshTokenMutationOptions(options);
|
const mutationOptions = getRefreshTokenMutationOptions(options);
|
||||||
|
|
||||||
return useMutation(mutationOptions, queryClient);
|
return useMutation(mutationOptions, queryClient);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* 유효한 access 토큰이 있어야 호출 가능. 토큰의 유저+회사 정보를 반환한다.
|
* 유효한 access 토큰이 있어야 호출 가능. 토큰의 유저+회사 정보를 반환한다.
|
||||||
* @summary 내 정보
|
* @summary 내 정보
|
||||||
*/
|
*/
|
||||||
export const me = (signal?: AbortSignal) => {
|
export const me = (
|
||||||
return customFetch<ResMe>({ url: `/v1/auth/me`, method: "GET", signal });
|
|
||||||
};
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
|
) => {
|
||||||
|
|
||||||
|
|
||||||
|
return customFetch<ResMe>(
|
||||||
|
{url: `/v1/auth/me`, method: 'GET', signal
|
||||||
|
},
|
||||||
|
options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const getMeQueryKey = () => {
|
export const getMeQueryKey = () => {
|
||||||
return [`/v1/auth/me`] as const;
|
return [
|
||||||
};
|
`/v1/auth/me`
|
||||||
|
] as const;
|
||||||
|
}
|
||||||
|
|
||||||
export const getMeQueryOptions = <
|
|
||||||
TData = Awaited<ReturnType<typeof me>>,
|
export const getMeQueryOptions = <TData = Awaited<ReturnType<typeof me>>, TError = void>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
TError = void,
|
) => {
|
||||||
>(options?: {
|
|
||||||
query?: Partial<
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>
|
|
||||||
>;
|
|
||||||
}) => {
|
|
||||||
const { query: queryOptions } = options ?? {};
|
|
||||||
|
|
||||||
const queryKey = queryOptions?.queryKey ?? getMeQueryKey();
|
const queryKey = queryOptions?.queryKey ?? getMeQueryKey();
|
||||||
|
|
||||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof me>>> = ({ signal }) =>
|
|
||||||
me(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>>>;
|
const queryFn: QueryFunction<Awaited<ReturnType<typeof me>>> = ({ signal }) => me(requestOptions, signal);
|
||||||
export type MeQueryError = void;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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>(
|
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||||
options: {
|
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>> & Pick<
|
||||||
query: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>
|
|
||||||
> &
|
|
||||||
Pick<
|
|
||||||
DefinedInitialDataOptions<
|
DefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof me>>,
|
Awaited<ReturnType<typeof me>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof me>>
|
Awaited<ReturnType<typeof me>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
|
||||||
): DefinedUseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||||
options?: {
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>> & Pick<
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>
|
|
||||||
> &
|
|
||||||
Pick<
|
|
||||||
UndefinedInitialDataOptions<
|
UndefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof me>>,
|
Awaited<ReturnType<typeof me>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof me>>
|
Awaited<ReturnType<typeof me>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||||
options?: {
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
query?: Partial<
|
, queryClient?: QueryClient
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* @summary 내 정보
|
* @summary 내 정보
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||||
options?: {
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
query?: Partial<
|
, queryClient?: QueryClient
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
} {
|
|
||||||
const queryOptions = getMeQueryOptions(options);
|
|
||||||
|
|
||||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
const queryOptions = getMeQueryOptions(options)
|
||||||
TData,
|
|
||||||
TError
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
||||||
|
|
||||||
query.queryKey = queryOptions.queryKey ;
|
query.queryKey = queryOptions.queryKey ;
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,10 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
import {
|
||||||
|
useMutation,
|
||||||
|
useQuery
|
||||||
|
} from '@tanstack/react-query';
|
||||||
import type {
|
import type {
|
||||||
DataTag,
|
DataTag,
|
||||||
DefinedInitialDataOptions,
|
DefinedInitialDataOptions,
|
||||||
@ -17,8 +20,8 @@ import type {
|
|||||||
UseMutationOptions,
|
UseMutationOptions,
|
||||||
UseMutationResult,
|
UseMutationResult,
|
||||||
UseQueryOptions,
|
UseQueryOptions,
|
||||||
UseQueryResult,
|
UseQueryResult
|
||||||
} from "@tanstack/react-query";
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
HTTPValidationError,
|
HTTPValidationError,
|
||||||
@ -27,525 +30,388 @@ import type {
|
|||||||
ReqUpdateCard,
|
ReqUpdateCard,
|
||||||
ResCard,
|
ResCard,
|
||||||
ResCardList,
|
ResCardList,
|
||||||
ResDeleteCard,
|
ResDeleteCard
|
||||||
} from ".././model";
|
} from '.././model';
|
||||||
|
|
||||||
|
import { customFetch } from '../../mutator/custom-fetch';
|
||||||
|
|
||||||
|
|
||||||
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||||
|
|
||||||
|
|
||||||
import { customFetch } from "../../mutator/custom-fetch";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 협상카드 목록
|
* @summary 협상카드 목록
|
||||||
*/
|
*/
|
||||||
export const listCards = (params?: ListCardsParams, signal?: AbortSignal) => {
|
export const listCards = (
|
||||||
return customFetch<ResCardList>({
|
|
||||||
url: `/v1/card/list`,
|
|
||||||
method: "GET",
|
|
||||||
params,
|
|
||||||
signal,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getListCardsQueryKey = (params?: ListCardsParams) => {
|
|
||||||
return [`/v1/card/list`, ...(params ? [params] : [])] as const;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getListCardsQueryOptions = <
|
|
||||||
TData = Awaited<ReturnType<typeof listCards>>,
|
|
||||||
TError = void | HTTPValidationError,
|
|
||||||
>(
|
|
||||||
params?: ListCardsParams,
|
params?: ListCardsParams,
|
||||||
options?: {
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
) => {
|
) => {
|
||||||
const { query: queryOptions } = options ?? {};
|
|
||||||
|
|
||||||
|
return customFetch<ResCardList>(
|
||||||
|
{url: `/v1/card/list`, method: 'GET',
|
||||||
|
params, signal
|
||||||
|
},
|
||||||
|
options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export const getListCardsQueryKey = (params?: ListCardsParams,) => {
|
||||||
|
return [
|
||||||
|
`/v1/card/list`, ...(params ? [params]: [])
|
||||||
|
] as const;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const getListCardsQueryOptions = <TData = Awaited<ReturnType<typeof listCards>>, TError = void | HTTPValidationError>(params?: ListCardsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
|
) => {
|
||||||
|
|
||||||
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||||
|
|
||||||
const queryKey = queryOptions?.queryKey ?? getListCardsQueryKey(params);
|
const queryKey = queryOptions?.queryKey ?? getListCardsQueryKey(params);
|
||||||
|
|
||||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listCards>>> = ({
|
|
||||||
signal,
|
|
||||||
}) => listCards(params, signal);
|
|
||||||
|
|
||||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
|
||||||
Awaited<ReturnType<typeof listCards>>,
|
|
||||||
TError,
|
|
||||||
TData
|
|
||||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ListCardsQueryResult = NonNullable<
|
const queryFn: QueryFunction<Awaited<ReturnType<typeof listCards>>> = ({ signal }) => listCards(params, requestOptions, signal);
|
||||||
Awaited<ReturnType<typeof listCards>>
|
|
||||||
>;
|
|
||||||
export type ListCardsQueryError = void | HTTPValidationError;
|
|
||||||
|
|
||||||
export function useListCards<
|
|
||||||
TData = Awaited<ReturnType<typeof listCards>>,
|
|
||||||
TError = void | HTTPValidationError,
|
|
||||||
>(
|
|
||||||
params: undefined | ListCardsParams,
|
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
options: {
|
}
|
||||||
query: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>
|
export type ListCardsQueryResult = NonNullable<Awaited<ReturnType<typeof listCards>>>
|
||||||
> &
|
export type ListCardsQueryError = void | HTTPValidationError
|
||||||
Pick<
|
|
||||||
|
|
||||||
|
export function useListCards<TData = Awaited<ReturnType<typeof listCards>>, TError = void | HTTPValidationError>(
|
||||||
|
params: undefined | ListCardsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>> & Pick<
|
||||||
DefinedInitialDataOptions<
|
DefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof listCards>>,
|
Awaited<ReturnType<typeof listCards>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof listCards>>
|
Awaited<ReturnType<typeof listCards>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
export function useListCards<TData = Awaited<ReturnType<typeof listCards>>, TError = void | HTTPValidationError>(
|
||||||
): DefinedUseQueryResult<TData, TError> & {
|
params?: ListCardsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>> & Pick<
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
export function useListCards<
|
|
||||||
TData = Awaited<ReturnType<typeof listCards>>,
|
|
||||||
TError = void | HTTPValidationError,
|
|
||||||
>(
|
|
||||||
params?: ListCardsParams,
|
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>
|
|
||||||
> &
|
|
||||||
Pick<
|
|
||||||
UndefinedInitialDataOptions<
|
UndefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof listCards>>,
|
Awaited<ReturnType<typeof listCards>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof listCards>>
|
Awaited<ReturnType<typeof listCards>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
export function useListCards<TData = Awaited<ReturnType<typeof listCards>>, TError = void | HTTPValidationError>(
|
||||||
): UseQueryResult<TData, TError> & {
|
params?: ListCardsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
, queryClient?: QueryClient
|
||||||
};
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
export function useListCards<
|
|
||||||
TData = Awaited<ReturnType<typeof listCards>>,
|
|
||||||
TError = void | HTTPValidationError,
|
|
||||||
>(
|
|
||||||
params?: ListCardsParams,
|
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* @summary 협상카드 목록
|
* @summary 협상카드 목록
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function useListCards<
|
export function useListCards<TData = Awaited<ReturnType<typeof listCards>>, TError = void | HTTPValidationError>(
|
||||||
TData = Awaited<ReturnType<typeof listCards>>,
|
params?: ListCardsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
TError = void | HTTPValidationError,
|
, queryClient?: QueryClient
|
||||||
>(
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||||
params?: ListCardsParams,
|
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listCards>>, TError, TData>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
} {
|
|
||||||
const queryOptions = getListCardsQueryOptions(params, options);
|
|
||||||
|
|
||||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
const queryOptions = getListCardsQueryOptions(params,options)
|
||||||
TData,
|
|
||||||
TError
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
||||||
|
|
||||||
query.queryKey = queryOptions.queryKey ;
|
query.queryKey = queryOptions.queryKey ;
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 협상카드 등록
|
* @summary 협상카드 등록
|
||||||
*/
|
*/
|
||||||
export const createCard = (
|
export const createCard = (
|
||||||
reqCreateCard: ReqCreateCard,
|
reqCreateCard: ReqCreateCard,
|
||||||
signal?: AbortSignal,
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
) => {
|
) => {
|
||||||
return customFetch<ResCard>({
|
|
||||||
url: `/v1/card/create`,
|
|
||||||
method: "POST",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
data: reqCreateCard,
|
|
||||||
signal,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getCreateCardMutationOptions = <
|
|
||||||
TError = void | HTTPValidationError,
|
return customFetch<ResCard>(
|
||||||
TContext = unknown,
|
{url: `/v1/card/create`, method: 'POST',
|
||||||
>(options?: {
|
headers: {'Content-Type': 'application/json', },
|
||||||
mutation?: UseMutationOptions<
|
data: reqCreateCard, signal
|
||||||
Awaited<ReturnType<typeof createCard>>,
|
},
|
||||||
TError,
|
options);
|
||||||
{ data: ReqCreateCard },
|
}
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
}): UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof createCard>>,
|
export const getCreateCardMutationOptions = <TError = void | HTTPValidationError,
|
||||||
TError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createCard>>, TError,{data: ReqCreateCard}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
{ data: ReqCreateCard },
|
): UseMutationOptions<Awaited<ReturnType<typeof createCard>>, TError,{data: ReqCreateCard}, TContext> => {
|
||||||
TContext
|
|
||||||
> => {
|
const mutationKey = ['createCard'];
|
||||||
const mutationKey = ["createCard"];
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||||
const { mutation: mutationOptions } = options
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||||
? options.mutation &&
|
options
|
||||||
"mutationKey" in options.mutation &&
|
|
||||||
options.mutation.mutationKey
|
|
||||||
? options
|
|
||||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||||
: { mutation: { mutationKey } };
|
: {mutation: { mutationKey, }, request: undefined};
|
||||||
|
|
||||||
const mutationFn: MutationFunction<
|
|
||||||
Awaited<ReturnType<typeof createCard>>,
|
|
||||||
{ data: ReqCreateCard }
|
|
||||||
> = (props) => {
|
const mutationFn: MutationFunction<Awaited<ReturnType<typeof createCard>>, {data: ReqCreateCard}> = (props) => {
|
||||||
const {data} = props ?? {};
|
const {data} = props ?? {};
|
||||||
|
|
||||||
return createCard(data);
|
return createCard(data,requestOptions)
|
||||||
};
|
}
|
||||||
|
|
||||||
return { mutationFn, ...mutationOptions };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type CreateCardMutationResult = NonNullable<
|
|
||||||
Awaited<ReturnType<typeof createCard>>
|
|
||||||
>;
|
return { mutationFn, ...mutationOptions }}
|
||||||
export type CreateCardMutationBody = ReqCreateCard;
|
|
||||||
export type CreateCardMutationError = void | HTTPValidationError;
|
export type CreateCardMutationResult = NonNullable<Awaited<ReturnType<typeof createCard>>>
|
||||||
|
export type CreateCardMutationBody = ReqCreateCard
|
||||||
|
export type CreateCardMutationError = void | HTTPValidationError
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 협상카드 등록
|
* @summary 협상카드 등록
|
||||||
*/
|
*/
|
||||||
export const useCreateCard = <
|
export const useCreateCard = <TError = void | HTTPValidationError,
|
||||||
TError = void | HTTPValidationError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createCard>>, TError,{data: ReqCreateCard}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
TContext = unknown,
|
, queryClient?: QueryClient): UseMutationResult<
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
mutation?: UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof createCard>>,
|
|
||||||
TError,
|
|
||||||
{ data: ReqCreateCard },
|
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseMutationResult<
|
|
||||||
Awaited<ReturnType<typeof createCard>>,
|
Awaited<ReturnType<typeof createCard>>,
|
||||||
TError,
|
TError,
|
||||||
{data: ReqCreateCard},
|
{data: ReqCreateCard},
|
||||||
TContext
|
TContext
|
||||||
> => {
|
> => {
|
||||||
|
|
||||||
const mutationOptions = getCreateCardMutationOptions(options);
|
const mutationOptions = getCreateCardMutationOptions(options);
|
||||||
|
|
||||||
return useMutation(mutationOptions, queryClient);
|
return useMutation(mutationOptions, queryClient);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* @summary 협상카드 조회
|
* @summary 협상카드 조회
|
||||||
*/
|
*/
|
||||||
export const getCard = (cardId: string, signal?: AbortSignal) => {
|
export const getCard = (
|
||||||
return customFetch<ResCard>({
|
|
||||||
url: `/v1/card/${cardId}`,
|
|
||||||
method: "GET",
|
|
||||||
signal,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getGetCardQueryKey = (cardId?: string) => {
|
|
||||||
return [`/v1/card/${cardId}`] as const;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getGetCardQueryOptions = <
|
|
||||||
TData = Awaited<ReturnType<typeof getCard>>,
|
|
||||||
TError = void | HTTPValidationError,
|
|
||||||
>(
|
|
||||||
cardId: string,
|
cardId: string,
|
||||||
options?: {
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
) => {
|
) => {
|
||||||
const { query: queryOptions } = options ?? {};
|
|
||||||
|
|
||||||
|
return customFetch<ResCard>(
|
||||||
|
{url: `/v1/card/${cardId}`, method: 'GET', signal
|
||||||
|
},
|
||||||
|
options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export const getGetCardQueryKey = (cardId?: string,) => {
|
||||||
|
return [
|
||||||
|
`/v1/card/${cardId}`
|
||||||
|
] as const;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const getGetCardQueryOptions = <TData = Awaited<ReturnType<typeof getCard>>, TError = void | HTTPValidationError>(cardId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
|
) => {
|
||||||
|
|
||||||
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||||
|
|
||||||
const queryKey = queryOptions?.queryKey ?? getGetCardQueryKey(cardId);
|
const queryKey = queryOptions?.queryKey ?? getGetCardQueryKey(cardId);
|
||||||
|
|
||||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getCard>>> = ({
|
|
||||||
signal,
|
|
||||||
}) => getCard(cardId, signal);
|
|
||||||
|
|
||||||
return {
|
|
||||||
queryKey,
|
|
||||||
queryFn,
|
|
||||||
enabled: !!cardId,
|
|
||||||
...queryOptions,
|
|
||||||
} as UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export type GetCardQueryResult = NonNullable<
|
const queryFn: QueryFunction<Awaited<ReturnType<typeof getCard>>> = ({ signal }) => getCard(cardId, requestOptions, signal);
|
||||||
Awaited<ReturnType<typeof getCard>>
|
|
||||||
>;
|
|
||||||
export type GetCardQueryError = void | HTTPValidationError;
|
|
||||||
|
|
||||||
export function useGetCard<
|
|
||||||
TData = Awaited<ReturnType<typeof getCard>>,
|
|
||||||
TError = void | HTTPValidationError,
|
|
||||||
>(
|
|
||||||
cardId: string,
|
return { queryKey, queryFn, enabled: !!(cardId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
options: {
|
}
|
||||||
query: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>
|
export type GetCardQueryResult = NonNullable<Awaited<ReturnType<typeof getCard>>>
|
||||||
> &
|
export type GetCardQueryError = void | HTTPValidationError
|
||||||
Pick<
|
|
||||||
|
|
||||||
|
export function useGetCard<TData = Awaited<ReturnType<typeof getCard>>, TError = void | HTTPValidationError>(
|
||||||
|
cardId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>> & Pick<
|
||||||
DefinedInitialDataOptions<
|
DefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof getCard>>,
|
Awaited<ReturnType<typeof getCard>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof getCard>>
|
Awaited<ReturnType<typeof getCard>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
export function useGetCard<TData = Awaited<ReturnType<typeof getCard>>, TError = void | HTTPValidationError>(
|
||||||
): DefinedUseQueryResult<TData, TError> & {
|
cardId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>> & Pick<
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
export function useGetCard<
|
|
||||||
TData = Awaited<ReturnType<typeof getCard>>,
|
|
||||||
TError = void | HTTPValidationError,
|
|
||||||
>(
|
|
||||||
cardId: string,
|
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>
|
|
||||||
> &
|
|
||||||
Pick<
|
|
||||||
UndefinedInitialDataOptions<
|
UndefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof getCard>>,
|
Awaited<ReturnType<typeof getCard>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof getCard>>
|
Awaited<ReturnType<typeof getCard>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
export function useGetCard<TData = Awaited<ReturnType<typeof getCard>>, TError = void | HTTPValidationError>(
|
||||||
): UseQueryResult<TData, TError> & {
|
cardId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
, queryClient?: QueryClient
|
||||||
};
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
export function useGetCard<
|
|
||||||
TData = Awaited<ReturnType<typeof getCard>>,
|
|
||||||
TError = void | HTTPValidationError,
|
|
||||||
>(
|
|
||||||
cardId: string,
|
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* @summary 협상카드 조회
|
* @summary 협상카드 조회
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function useGetCard<
|
export function useGetCard<TData = Awaited<ReturnType<typeof getCard>>, TError = void | HTTPValidationError>(
|
||||||
TData = Awaited<ReturnType<typeof getCard>>,
|
cardId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
TError = void | HTTPValidationError,
|
, queryClient?: QueryClient
|
||||||
>(
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||||
cardId: string,
|
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof getCard>>, TError, TData>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
} {
|
|
||||||
const queryOptions = getGetCardQueryOptions(cardId, options);
|
|
||||||
|
|
||||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
const queryOptions = getGetCardQueryOptions(cardId,options)
|
||||||
TData,
|
|
||||||
TError
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
||||||
|
|
||||||
query.queryKey = queryOptions.queryKey ;
|
query.queryKey = queryOptions.queryKey ;
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 협상카드 수정
|
* @summary 협상카드 수정
|
||||||
*/
|
*/
|
||||||
export const updateCard = (cardId: string, reqUpdateCard: ReqUpdateCard) => {
|
export const updateCard = (
|
||||||
return customFetch<ResCard>({
|
cardId: string,
|
||||||
url: `/v1/card/update/${cardId}`,
|
reqUpdateCard: ReqUpdateCard,
|
||||||
method: "PATCH",
|
options?: SecondParameter<typeof customFetch>,) => {
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
data: reqUpdateCard,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getUpdateCardMutationOptions = <
|
|
||||||
TError = void | HTTPValidationError,
|
return customFetch<ResCard>(
|
||||||
TContext = unknown,
|
{url: `/v1/card/update/${cardId}`, method: 'PATCH',
|
||||||
>(options?: {
|
headers: {'Content-Type': 'application/json', },
|
||||||
mutation?: UseMutationOptions<
|
data: reqUpdateCard
|
||||||
Awaited<ReturnType<typeof updateCard>>,
|
},
|
||||||
TError,
|
options);
|
||||||
{ cardId: string; data: ReqUpdateCard },
|
}
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
}): UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof updateCard>>,
|
export const getUpdateCardMutationOptions = <TError = void | HTTPValidationError,
|
||||||
TError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateCard>>, TError,{cardId: string;data: ReqUpdateCard}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
{ cardId: string; data: ReqUpdateCard },
|
): UseMutationOptions<Awaited<ReturnType<typeof updateCard>>, TError,{cardId: string;data: ReqUpdateCard}, TContext> => {
|
||||||
TContext
|
|
||||||
> => {
|
const mutationKey = ['updateCard'];
|
||||||
const mutationKey = ["updateCard"];
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||||
const { mutation: mutationOptions } = options
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||||
? options.mutation &&
|
options
|
||||||
"mutationKey" in options.mutation &&
|
|
||||||
options.mutation.mutationKey
|
|
||||||
? options
|
|
||||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||||
: { mutation: { mutationKey } };
|
: {mutation: { mutationKey, }, request: undefined};
|
||||||
|
|
||||||
const mutationFn: MutationFunction<
|
|
||||||
Awaited<ReturnType<typeof updateCard>>,
|
|
||||||
{ cardId: string; data: ReqUpdateCard }
|
|
||||||
> = (props) => {
|
const mutationFn: MutationFunction<Awaited<ReturnType<typeof updateCard>>, {cardId: string;data: ReqUpdateCard}> = (props) => {
|
||||||
const {cardId,data} = props ?? {};
|
const {cardId,data} = props ?? {};
|
||||||
|
|
||||||
return updateCard(cardId, data);
|
return updateCard(cardId,data,requestOptions)
|
||||||
};
|
}
|
||||||
|
|
||||||
return { mutationFn, ...mutationOptions };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type UpdateCardMutationResult = NonNullable<
|
|
||||||
Awaited<ReturnType<typeof updateCard>>
|
|
||||||
>;
|
return { mutationFn, ...mutationOptions }}
|
||||||
export type UpdateCardMutationBody = ReqUpdateCard;
|
|
||||||
export type UpdateCardMutationError = void | HTTPValidationError;
|
export type UpdateCardMutationResult = NonNullable<Awaited<ReturnType<typeof updateCard>>>
|
||||||
|
export type UpdateCardMutationBody = ReqUpdateCard
|
||||||
|
export type UpdateCardMutationError = void | HTTPValidationError
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 협상카드 수정
|
* @summary 협상카드 수정
|
||||||
*/
|
*/
|
||||||
export const useUpdateCard = <
|
export const useUpdateCard = <TError = void | HTTPValidationError,
|
||||||
TError = void | HTTPValidationError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateCard>>, TError,{cardId: string;data: ReqUpdateCard}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
TContext = unknown,
|
, queryClient?: QueryClient): UseMutationResult<
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
mutation?: UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof updateCard>>,
|
|
||||||
TError,
|
|
||||||
{ cardId: string; data: ReqUpdateCard },
|
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseMutationResult<
|
|
||||||
Awaited<ReturnType<typeof updateCard>>,
|
Awaited<ReturnType<typeof updateCard>>,
|
||||||
TError,
|
TError,
|
||||||
{cardId: string;data: ReqUpdateCard},
|
{cardId: string;data: ReqUpdateCard},
|
||||||
TContext
|
TContext
|
||||||
> => {
|
> => {
|
||||||
|
|
||||||
const mutationOptions = getUpdateCardMutationOptions(options);
|
const mutationOptions = getUpdateCardMutationOptions(options);
|
||||||
|
|
||||||
return useMutation(mutationOptions, queryClient);
|
return useMutation(mutationOptions, queryClient);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* @summary 협상카드 삭제
|
* @summary 협상카드 삭제
|
||||||
*/
|
*/
|
||||||
export const deleteCard = (cardId: string) => {
|
export const deleteCard = (
|
||||||
return customFetch<ResDeleteCard>({
|
cardId: string,
|
||||||
url: `/v1/card/delete/${cardId}`,
|
options?: SecondParameter<typeof customFetch>,) => {
|
||||||
method: "DELETE",
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getDeleteCardMutationOptions = <
|
|
||||||
TError = void | HTTPValidationError,
|
return customFetch<ResDeleteCard>(
|
||||||
TContext = unknown,
|
{url: `/v1/card/delete/${cardId}`, method: 'DELETE'
|
||||||
>(options?: {
|
},
|
||||||
mutation?: UseMutationOptions<
|
options);
|
||||||
Awaited<ReturnType<typeof deleteCard>>,
|
}
|
||||||
TError,
|
|
||||||
{ cardId: string },
|
|
||||||
TContext
|
|
||||||
>;
|
export const getDeleteCardMutationOptions = <TError = void | HTTPValidationError,
|
||||||
}): UseMutationOptions<
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteCard>>, TError,{cardId: string}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
Awaited<ReturnType<typeof deleteCard>>,
|
): UseMutationOptions<Awaited<ReturnType<typeof deleteCard>>, TError,{cardId: string}, TContext> => {
|
||||||
TError,
|
|
||||||
{ cardId: string },
|
const mutationKey = ['deleteCard'];
|
||||||
TContext
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||||
> => {
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||||
const mutationKey = ["deleteCard"];
|
options
|
||||||
const { mutation: mutationOptions } = options
|
|
||||||
? options.mutation &&
|
|
||||||
"mutationKey" in options.mutation &&
|
|
||||||
options.mutation.mutationKey
|
|
||||||
? options
|
|
||||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||||
: { mutation: { mutationKey } };
|
: {mutation: { mutationKey, }, request: undefined};
|
||||||
|
|
||||||
const mutationFn: MutationFunction<
|
|
||||||
Awaited<ReturnType<typeof deleteCard>>,
|
|
||||||
{ cardId: string }
|
|
||||||
> = (props) => {
|
const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteCard>>, {cardId: string}> = (props) => {
|
||||||
const {cardId} = props ?? {};
|
const {cardId} = props ?? {};
|
||||||
|
|
||||||
return deleteCard(cardId);
|
return deleteCard(cardId,requestOptions)
|
||||||
};
|
}
|
||||||
|
|
||||||
return { mutationFn, ...mutationOptions };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type DeleteCardMutationResult = NonNullable<
|
|
||||||
Awaited<ReturnType<typeof deleteCard>>
|
|
||||||
>;
|
|
||||||
|
|
||||||
export type DeleteCardMutationError = void | HTTPValidationError;
|
|
||||||
|
return { mutationFn, ...mutationOptions }}
|
||||||
|
|
||||||
|
export type DeleteCardMutationResult = NonNullable<Awaited<ReturnType<typeof deleteCard>>>
|
||||||
|
|
||||||
|
export type DeleteCardMutationError = void | HTTPValidationError
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 협상카드 삭제
|
* @summary 협상카드 삭제
|
||||||
*/
|
*/
|
||||||
export const useDeleteCard = <
|
export const useDeleteCard = <TError = void | HTTPValidationError,
|
||||||
TError = void | HTTPValidationError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteCard>>, TError,{cardId: string}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
TContext = unknown,
|
, queryClient?: QueryClient): UseMutationResult<
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
mutation?: UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof deleteCard>>,
|
|
||||||
TError,
|
|
||||||
{ cardId: string },
|
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseMutationResult<
|
|
||||||
Awaited<ReturnType<typeof deleteCard>>,
|
Awaited<ReturnType<typeof deleteCard>>,
|
||||||
TError,
|
TError,
|
||||||
{cardId: string},
|
{cardId: string},
|
||||||
TContext
|
TContext
|
||||||
> => {
|
> => {
|
||||||
|
|
||||||
const mutationOptions = getDeleteCardMutationOptions(options);
|
const mutationOptions = getDeleteCardMutationOptions(options);
|
||||||
|
|
||||||
return useMutation(mutationOptions, queryClient);
|
return useMutation(mutationOptions, queryClient);
|
||||||
};
|
}
|
||||||
|
|
||||||
@ -4,7 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import {
|
||||||
|
useQuery
|
||||||
|
} from '@tanstack/react-query';
|
||||||
import type {
|
import type {
|
||||||
DataTag,
|
DataTag,
|
||||||
DefinedInitialDataOptions,
|
DefinedInitialDataOptions,
|
||||||
@ -14,150 +16,105 @@ import type {
|
|||||||
QueryKey,
|
QueryKey,
|
||||||
UndefinedInitialDataOptions,
|
UndefinedInitialDataOptions,
|
||||||
UseQueryOptions,
|
UseQueryOptions,
|
||||||
UseQueryResult,
|
UseQueryResult
|
||||||
} from "@tanstack/react-query";
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
|
import { customFetch } from '../../mutator/custom-fetch';
|
||||||
|
|
||||||
|
|
||||||
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||||
|
|
||||||
|
|
||||||
import { customFetch } from "../../mutator/custom-fetch";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary Healthz
|
* @summary Healthz
|
||||||
*/
|
*/
|
||||||
export const healthzHealthzGet = (signal?: AbortSignal) => {
|
export const healthzHealthzGet = (
|
||||||
return customFetch<unknown>({ url: `/healthz`, method: "GET", signal });
|
|
||||||
};
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
|
) => {
|
||||||
|
|
||||||
|
|
||||||
|
return customFetch<unknown>(
|
||||||
|
{url: `/healthz`, method: 'GET', signal
|
||||||
|
},
|
||||||
|
options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const getHealthzHealthzGetQueryKey = () => {
|
export const getHealthzHealthzGetQueryKey = () => {
|
||||||
return [`/healthz`] as const;
|
return [
|
||||||
};
|
`/healthz`
|
||||||
|
] as const;
|
||||||
|
}
|
||||||
|
|
||||||
export const getHealthzHealthzGetQueryOptions = <
|
|
||||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
export const getHealthzHealthzGetQueryOptions = <TData = Awaited<ReturnType<typeof healthzHealthzGet>>, TError = void>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
TError = void,
|
) => {
|
||||||
>(options?: {
|
|
||||||
query?: Partial<
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||||
UseQueryOptions<
|
|
||||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
|
||||||
TError,
|
|
||||||
TData
|
|
||||||
>
|
|
||||||
>;
|
|
||||||
}) => {
|
|
||||||
const { query: queryOptions } = options ?? {};
|
|
||||||
|
|
||||||
const queryKey = queryOptions?.queryKey ?? getHealthzHealthzGetQueryKey();
|
const queryKey = queryOptions?.queryKey ?? getHealthzHealthzGetQueryKey();
|
||||||
|
|
||||||
const queryFn: QueryFunction<
|
|
||||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
|
||||||
> = ({ signal }) => healthzHealthzGet(signal);
|
|
||||||
|
|
||||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
|
||||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
|
||||||
TError,
|
|
||||||
TData
|
|
||||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type HealthzHealthzGetQueryResult = NonNullable<
|
const queryFn: QueryFunction<Awaited<ReturnType<typeof healthzHealthzGet>>> = ({ signal }) => healthzHealthzGet(requestOptions, signal);
|
||||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
|
||||||
>;
|
|
||||||
export type HealthzHealthzGetQueryError = void;
|
|
||||||
|
|
||||||
export function useHealthzHealthzGet<
|
|
||||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
|
||||||
TError = void,
|
|
||||||
>(
|
|
||||||
options: {
|
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
query: Partial<
|
}
|
||||||
UseQueryOptions<
|
|
||||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
export type HealthzHealthzGetQueryResult = NonNullable<Awaited<ReturnType<typeof healthzHealthzGet>>>
|
||||||
TError,
|
export type HealthzHealthzGetQueryError = void
|
||||||
TData
|
|
||||||
>
|
|
||||||
> &
|
export function useHealthzHealthzGet<TData = Awaited<ReturnType<typeof healthzHealthzGet>>, TError = void>(
|
||||||
Pick<
|
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData>> & Pick<
|
||||||
DefinedInitialDataOptions<
|
DefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
export function useHealthzHealthzGet<TData = Awaited<ReturnType<typeof healthzHealthzGet>>, TError = void>(
|
||||||
): DefinedUseQueryResult<TData, TError> & {
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData>> & Pick<
|
||||||
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<
|
UndefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
export function useHealthzHealthzGet<TData = Awaited<ReturnType<typeof healthzHealthzGet>>, TError = void>(
|
||||||
): UseQueryResult<TData, TError> & {
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
, 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
|
|
||||||
>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* @summary Healthz
|
* @summary Healthz
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function useHealthzHealthzGet<
|
export function useHealthzHealthzGet<TData = Awaited<ReturnType<typeof healthzHealthzGet>>, TError = void>(
|
||||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof healthzHealthzGet>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
TError = void,
|
, queryClient?: QueryClient
|
||||||
>(
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<
|
|
||||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
|
||||||
TError,
|
|
||||||
TData
|
|
||||||
>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
} {
|
|
||||||
const queryOptions = getHealthzHealthzGetQueryOptions(options);
|
|
||||||
|
|
||||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
const queryOptions = getHealthzHealthzGetQueryOptions(options)
|
||||||
TData,
|
|
||||||
TError
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
||||||
|
|
||||||
query.queryKey = queryOptions.queryKey ;
|
query.queryKey = queryOptions.queryKey ;
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import {
|
||||||
|
useQuery
|
||||||
|
} from '@tanstack/react-query';
|
||||||
import type {
|
import type {
|
||||||
DataTag,
|
DataTag,
|
||||||
DefinedInitialDataOptions,
|
DefinedInitialDataOptions,
|
||||||
@ -14,132 +16,109 @@ import type {
|
|||||||
QueryKey,
|
QueryKey,
|
||||||
UndefinedInitialDataOptions,
|
UndefinedInitialDataOptions,
|
||||||
UseQueryOptions,
|
UseQueryOptions,
|
||||||
UseQueryResult,
|
UseQueryResult
|
||||||
} from "@tanstack/react-query";
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
|
import type {
|
||||||
|
ResEnums
|
||||||
|
} from '.././model';
|
||||||
|
|
||||||
|
import { customFetch } from '../../mutator/custom-fetch';
|
||||||
|
|
||||||
|
|
||||||
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||||
|
|
||||||
import type { ResEnums } from ".././model";
|
|
||||||
|
|
||||||
import { customFetch } from "../../mutator/custom-fetch";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 도메인 코드 enum 전체
|
* @summary 도메인 코드 enum 전체
|
||||||
*/
|
*/
|
||||||
export const listEnums = (signal?: AbortSignal) => {
|
export const listEnums = (
|
||||||
return customFetch<ResEnums>({ url: `/v1/enums`, method: "GET", signal });
|
|
||||||
};
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
|
) => {
|
||||||
|
|
||||||
|
|
||||||
|
return customFetch<ResEnums>(
|
||||||
|
{url: `/v1/enums`, method: 'GET', signal
|
||||||
|
},
|
||||||
|
options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const getListEnumsQueryKey = () => {
|
export const getListEnumsQueryKey = () => {
|
||||||
return [`/v1/enums`] as const;
|
return [
|
||||||
};
|
`/v1/enums`
|
||||||
|
] as const;
|
||||||
|
}
|
||||||
|
|
||||||
export const getListEnumsQueryOptions = <
|
|
||||||
TData = Awaited<ReturnType<typeof listEnums>>,
|
export const getListEnumsQueryOptions = <TData = Awaited<ReturnType<typeof listEnums>>, TError = void>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
TError = void,
|
) => {
|
||||||
>(options?: {
|
|
||||||
query?: Partial<
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData>
|
|
||||||
>;
|
|
||||||
}) => {
|
|
||||||
const { query: queryOptions } = options ?? {};
|
|
||||||
|
|
||||||
const queryKey = queryOptions?.queryKey ?? getListEnumsQueryKey();
|
const queryKey = queryOptions?.queryKey ?? getListEnumsQueryKey();
|
||||||
|
|
||||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listEnums>>> = ({
|
|
||||||
signal,
|
|
||||||
}) => listEnums(signal);
|
|
||||||
|
|
||||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
|
||||||
Awaited<ReturnType<typeof listEnums>>,
|
|
||||||
TError,
|
|
||||||
TData
|
|
||||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ListEnumsQueryResult = NonNullable<
|
const queryFn: QueryFunction<Awaited<ReturnType<typeof listEnums>>> = ({ signal }) => listEnums(requestOptions, signal);
|
||||||
Awaited<ReturnType<typeof listEnums>>
|
|
||||||
>;
|
|
||||||
export type ListEnumsQueryError = void;
|
|
||||||
|
|
||||||
export function useListEnums<
|
|
||||||
TData = Awaited<ReturnType<typeof listEnums>>,
|
|
||||||
TError = void,
|
|
||||||
>(
|
|
||||||
options: {
|
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
query: Partial<
|
}
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData>
|
|
||||||
> &
|
export type ListEnumsQueryResult = NonNullable<Awaited<ReturnType<typeof listEnums>>>
|
||||||
Pick<
|
export type ListEnumsQueryError = void
|
||||||
|
|
||||||
|
|
||||||
|
export function useListEnums<TData = Awaited<ReturnType<typeof listEnums>>, TError = void>(
|
||||||
|
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData>> & Pick<
|
||||||
DefinedInitialDataOptions<
|
DefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof listEnums>>,
|
Awaited<ReturnType<typeof listEnums>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof listEnums>>
|
Awaited<ReturnType<typeof listEnums>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
export function useListEnums<TData = Awaited<ReturnType<typeof listEnums>>, TError = void>(
|
||||||
): DefinedUseQueryResult<TData, TError> & {
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData>> & Pick<
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
export function useListEnums<
|
|
||||||
TData = Awaited<ReturnType<typeof listEnums>>,
|
|
||||||
TError = void,
|
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData>
|
|
||||||
> &
|
|
||||||
Pick<
|
|
||||||
UndefinedInitialDataOptions<
|
UndefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof listEnums>>,
|
Awaited<ReturnType<typeof listEnums>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof listEnums>>
|
Awaited<ReturnType<typeof listEnums>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
export function useListEnums<TData = Awaited<ReturnType<typeof listEnums>>, TError = void>(
|
||||||
): UseQueryResult<TData, TError> & {
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
, queryClient?: QueryClient
|
||||||
};
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
export function useListEnums<
|
|
||||||
TData = Awaited<ReturnType<typeof listEnums>>,
|
|
||||||
TError = void,
|
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* @summary 도메인 코드 enum 전체
|
* @summary 도메인 코드 enum 전체
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function useListEnums<
|
export function useListEnums<TData = Awaited<ReturnType<typeof listEnums>>, TError = void>(
|
||||||
TData = Awaited<ReturnType<typeof listEnums>>,
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
TError = void,
|
, queryClient?: QueryClient
|
||||||
>(
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listEnums>>, TError, TData>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
} {
|
|
||||||
const queryOptions = getListEnumsQueryOptions(options);
|
|
||||||
|
|
||||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
const queryOptions = getListEnumsQueryOptions(options)
|
||||||
TData,
|
|
||||||
TError
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
||||||
|
|
||||||
query.queryKey = queryOptions.queryKey ;
|
query.queryKey = queryOptions.queryKey ;
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,6 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export interface BodyUploadItemsExcelV1ItemUploadExcelPost {
|
export interface BodyUploadItemImageV1ItemImagePost {
|
||||||
file: string;
|
file: string;
|
||||||
}
|
}
|
||||||
@ -4,15 +4,15 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { CardDataUserId } from "./cardDataUserId";
|
import type { CardDataUserId } from './cardDataUserId';
|
||||||
import type { CardDataName } from "./cardDataName";
|
import type { CardDataName } from './cardDataName';
|
||||||
import type { CardDataNumber } from "./cardDataNumber";
|
import type { CardDataNumber } from './cardDataNumber';
|
||||||
import type { CardDataScript } from "./cardDataScript";
|
import type { CardDataScript } from './cardDataScript';
|
||||||
import type { CardDataEditScript } from "./cardDataEditScript";
|
import type { CardDataEditScript } from './cardDataEditScript';
|
||||||
import type { CardDataCondition } from "./cardDataCondition";
|
import type { CardDataCondition } from './cardDataCondition';
|
||||||
import type { CardDataMemo } from "./cardDataMemo";
|
import type { CardDataMemo } from './cardDataMemo';
|
||||||
import type { CardDataCreatedAt } from "./cardDataCreatedAt";
|
import type { CardDataCreatedAt } from './cardDataCreatedAt';
|
||||||
import type { CardDataUpdatedAt } from "./cardDataUpdatedAt";
|
import type { CardDataUpdatedAt } from './cardDataUpdatedAt';
|
||||||
|
|
||||||
export interface CardData {
|
export interface CardData {
|
||||||
nego_card_id: string;
|
nego_card_id: string;
|
||||||
|
|||||||
@ -4,10 +4,10 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ChatMessageDataCardId } from "./chatMessageDataCardId";
|
import type { ChatMessageDataCardId } from './chatMessageDataCardId';
|
||||||
import type { ChatMessageDataCardUsedYn } from "./chatMessageDataCardUsedYn";
|
import type { ChatMessageDataCardUsedYn } from './chatMessageDataCardUsedYn';
|
||||||
import type { ChatMessageDataIndicatorValue } from "./chatMessageDataIndicatorValue";
|
import type { ChatMessageDataIndicatorValue } from './chatMessageDataIndicatorValue';
|
||||||
import type { ChatMessageDataCardType } from "./chatMessageDataCardType";
|
import type { ChatMessageDataCardType } from './chatMessageDataCardType';
|
||||||
|
|
||||||
export interface ChatMessageData {
|
export interface ChatMessageData {
|
||||||
chat_id: string;
|
chat_id: string;
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfoSuccess } from "./errorInfoSuccess";
|
import type { ErrorInfoSuccess } from './errorInfoSuccess';
|
||||||
import type { ErrorInfoCode } from "./errorInfoCode";
|
import type { ErrorInfoCode } from './errorInfoCode';
|
||||||
import type { ErrorInfoDesc } from "./errorInfoDesc";
|
import type { ErrorInfoDesc } from './errorInfoDesc';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 모든 응답에 공통으로 실리는 결과 정보. result.success / code / desc 로 내려간다.
|
* 모든 응답에 공통으로 실리는 결과 정보. result.success / code / desc 로 내려간다.
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ValidationError } from "./validationError";
|
import type { ValidationError } from './validationError';
|
||||||
|
|
||||||
export interface HTTPValidationError {
|
export interface HTTPValidationError {
|
||||||
detail?: ValidationError[];
|
detail?: ValidationError[];
|
||||||
|
|||||||
@ -5,248 +5,253 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from "./asyncJob";
|
export * from './asyncJob';
|
||||||
export * from "./bodyUploadItemsExcelV1ItemUploadExcelPost";
|
export * from './bodyUploadItemImageV1ItemImagePost';
|
||||||
export * from "./bodyUploadSuppliersExcelV1SupplierUploadExcelPost";
|
export * from './cardData';
|
||||||
export * from "./cardData";
|
export * from './cardDataCondition';
|
||||||
export * from "./cardDataCondition";
|
export * from './cardDataCreatedAt';
|
||||||
export * from "./cardDataCreatedAt";
|
export * from './cardDataEditScript';
|
||||||
export * from "./cardDataEditScript";
|
export * from './cardDataMemo';
|
||||||
export * from "./cardDataMemo";
|
export * from './cardDataName';
|
||||||
export * from "./cardDataName";
|
export * from './cardDataNumber';
|
||||||
export * from "./cardDataNumber";
|
export * from './cardDataScript';
|
||||||
export * from "./cardDataScript";
|
export * from './cardDataUpdatedAt';
|
||||||
export * from "./cardDataUpdatedAt";
|
export * from './cardDataUserId';
|
||||||
export * from "./cardDataUserId";
|
export * from './chatMessageData';
|
||||||
export * from "./chatMessageData";
|
export * from './chatMessageDataCardId';
|
||||||
export * from "./chatMessageDataCardId";
|
export * from './chatMessageDataCardType';
|
||||||
export * from "./chatMessageDataCardType";
|
export * from './chatMessageDataCardUsedYn';
|
||||||
export * from "./chatMessageDataCardUsedYn";
|
export * from './chatMessageDataIndicatorValue';
|
||||||
export * from "./chatMessageDataIndicatorValue";
|
export * from './companyData';
|
||||||
export * from "./companyData";
|
export * from './enumOption';
|
||||||
export * from "./enumOption";
|
export * from './errorInfo';
|
||||||
export * from "./errorInfo";
|
export * from './errorInfoCode';
|
||||||
export * from "./errorInfoCode";
|
export * from './errorInfoDesc';
|
||||||
export * from "./errorInfoDesc";
|
export * from './errorInfoSuccess';
|
||||||
export * from "./errorInfoSuccess";
|
export * from './hTTPValidationError';
|
||||||
export * from "./hTTPValidationError";
|
export * from './itemCategory';
|
||||||
export * from "./itemCategory";
|
export * from './itemData';
|
||||||
export * from "./itemData";
|
export * from './itemDataCategory';
|
||||||
export * from "./itemDataCategory";
|
export * from './itemDataCode';
|
||||||
export * from "./itemDataCode";
|
export * from './itemDataCreatedAt';
|
||||||
export * from "./itemDataCreatedAt";
|
export * from './itemDataDeliveryFeeYn';
|
||||||
export * from "./itemDataDeliveryFeeYn";
|
export * from './itemDataDeliveryType';
|
||||||
export * from "./itemDataDeliveryType";
|
export * from './itemDataImageUrl';
|
||||||
export * from "./itemDataImageUrl";
|
export * from './itemDataLeadTime';
|
||||||
export * from "./itemDataLeadTime";
|
export * from './itemDataMadeIn';
|
||||||
export * from "./itemDataMadeIn";
|
export * from './itemDataManufacturer';
|
||||||
export * from "./itemDataManufacturer";
|
export * from './itemDataModelName';
|
||||||
export * from "./itemDataModelName";
|
export * from './itemDataMoq';
|
||||||
export * from "./itemDataMoq";
|
export * from './itemDataPrice';
|
||||||
export * from "./itemDataPrice";
|
export * from './itemDataQuantityUnit';
|
||||||
export * from "./itemDataQuantityUnit";
|
export * from './itemDataSpec';
|
||||||
export * from "./itemDataSpec";
|
export * from './itemDataUpdatedAt';
|
||||||
export * from "./itemDataUpdatedAt";
|
export * from './itemDataVatYn';
|
||||||
export * from "./itemDataVatYn";
|
export * from './listCardsParams';
|
||||||
export * from "./listCardsParams";
|
export * from './listItemsParams';
|
||||||
export * from "./listItemsParams";
|
export * from './listQuotationsParams';
|
||||||
export * from "./listQuotationsParams";
|
export * from './listSuppliersParams';
|
||||||
export * from "./listSuppliersParams";
|
export * from './quotationCardData';
|
||||||
export * from "./quotationCardData";
|
export * from './quotationCardDataCondition';
|
||||||
export * from "./quotationCardDataName";
|
export * from './quotationCardDataEditScript';
|
||||||
export * from "./quotationCardDataNegoCardId";
|
export * from './quotationCardDataMemo';
|
||||||
export * from "./quotationCardDataQtId";
|
export * from './quotationCardDataName';
|
||||||
export * from "./quotationCardDataScript";
|
export * from './quotationCardDataNegoCardId';
|
||||||
export * from "./quotationCardDataType";
|
export * from './quotationCardDataNumber';
|
||||||
export * from "./quotationCardDataWildCardId";
|
export * from './quotationCardDataQtId';
|
||||||
export * from "./quotationData";
|
export * from './quotationCardDataScript';
|
||||||
export * from "./quotationDataCreatedAt";
|
export * from './quotationCardDataType';
|
||||||
export * from "./quotationDataEqualBidData";
|
export * from './quotationCardDataWildCardId';
|
||||||
export * from "./quotationDataEqualBidYn";
|
export * from './quotationData';
|
||||||
export * from "./quotationDataManagerContactNumber";
|
export * from './quotationDataCreatedAt';
|
||||||
export * from "./quotationDataManagerEmail";
|
export * from './quotationDataEqualBidData';
|
||||||
export * from "./quotationDataManagerName";
|
export * from './quotationDataEqualBidYn';
|
||||||
export * from "./quotationDataMemo";
|
export * from './quotationDataManagerContactNumber';
|
||||||
export * from "./quotationDataPreferredSpId";
|
export * from './quotationDataManagerEmail';
|
||||||
export * from "./quotationDataPreferredSpName";
|
export * from './quotationDataManagerName';
|
||||||
export * from "./quotationDataPreferredSpYn";
|
export * from './quotationDataMemo';
|
||||||
export * from "./quotationDataUpdatedAt";
|
export * from './quotationDataPreferredSpId';
|
||||||
export * from "./quotationSettingData";
|
export * from './quotationDataPreferredSpName';
|
||||||
export * from "./quotationSettingDataCreatedAt";
|
export * from './quotationDataPreferredSpYn';
|
||||||
export * from "./quotationSettingDataUpdatedAt";
|
export * from './quotationDataUpdatedAt';
|
||||||
export * from "./quotationSettingDataUserId";
|
export * from './quotationSettingData';
|
||||||
export * from "./reqCheckCodes";
|
export * from './quotationSettingDataCreatedAt';
|
||||||
export * from "./reqCreateAccount";
|
export * from './quotationSettingDataUpdatedAt';
|
||||||
export * from "./reqCreateCard";
|
export * from './quotationSettingDataUserId';
|
||||||
export * from "./reqCreateCardCondition";
|
export * from './reqCheckCodes';
|
||||||
export * from "./reqCreateCardEditScript";
|
export * from './reqCreateAccount';
|
||||||
export * from "./reqCreateCardMemo";
|
export * from './reqCreateCard';
|
||||||
export * from "./reqCreateCardName";
|
export * from './reqCreateCardCondition';
|
||||||
export * from "./reqCreateCardNumber";
|
export * from './reqCreateCardEditScript';
|
||||||
export * from "./reqCreateCardScript";
|
export * from './reqCreateCardMemo';
|
||||||
export * from "./reqCreateItem";
|
export * from './reqCreateCardName';
|
||||||
export * from "./reqCreateItemCategory";
|
export * from './reqCreateCardNumber';
|
||||||
export * from "./reqCreateItemCode";
|
export * from './reqCreateCardScript';
|
||||||
export * from "./reqCreateItemDeliveryFeeYn";
|
export * from './reqCreateItem';
|
||||||
export * from "./reqCreateItemDeliveryType";
|
export * from './reqCreateItemCategory';
|
||||||
export * from "./reqCreateItemImageUrl";
|
export * from './reqCreateItemCode';
|
||||||
export * from "./reqCreateItemLeadTime";
|
export * from './reqCreateItemDeliveryFeeYn';
|
||||||
export * from "./reqCreateItemMadeIn";
|
export * from './reqCreateItemDeliveryType';
|
||||||
export * from "./reqCreateItemManufacturer";
|
export * from './reqCreateItemImageUrl';
|
||||||
export * from "./reqCreateItemModelName";
|
export * from './reqCreateItemLeadTime';
|
||||||
export * from "./reqCreateItemMoq";
|
export * from './reqCreateItemMadeIn';
|
||||||
export * from "./reqCreateItemPrice";
|
export * from './reqCreateItemManufacturer';
|
||||||
export * from "./reqCreateItemQuantityUnit";
|
export * from './reqCreateItemModelName';
|
||||||
export * from "./reqCreateItemSpec";
|
export * from './reqCreateItemMoq';
|
||||||
export * from "./reqCreateItemVatYn";
|
export * from './reqCreateItemPrice';
|
||||||
export * from "./reqCreateQuotation";
|
export * from './reqCreateItemQuantityUnit';
|
||||||
export * from "./reqCreateQuotationManagerContactNumber";
|
export * from './reqCreateItemSpec';
|
||||||
export * from "./reqCreateQuotationManagerEmail";
|
export * from './reqCreateItemVatYn';
|
||||||
export * from "./reqCreateQuotationManagerName";
|
export * from './reqCreateQuotation';
|
||||||
export * from "./reqCreateQuotationMemo";
|
export * from './reqCreateQuotationManagerContactNumber';
|
||||||
export * from "./reqCreateQuotationSetting";
|
export * from './reqCreateQuotationManagerEmail';
|
||||||
export * from "./reqCreateSupplier";
|
export * from './reqCreateQuotationManagerName';
|
||||||
export * from "./reqCreateSupplierCode";
|
export * from './reqCreateQuotationMemo';
|
||||||
export * from "./reqCreateSupplierManagerContactNumber";
|
export * from './reqCreateQuotationSetting';
|
||||||
export * from "./reqCreateSupplierManagerEmail";
|
export * from './reqCreateSupplier';
|
||||||
export * from "./reqCreateSupplierManagerName";
|
export * from './reqCreateSupplierCode';
|
||||||
export * from "./reqCreateSupplierPriority";
|
export * from './reqCreateSupplierManagerContactNumber';
|
||||||
export * from "./reqLogin";
|
export * from './reqCreateSupplierManagerEmail';
|
||||||
export * from "./reqUpdateCard";
|
export * from './reqCreateSupplierManagerName';
|
||||||
export * from "./reqUpdateCardCondition";
|
export * from './reqCreateSupplierPriority';
|
||||||
export * from "./reqUpdateCardEditScript";
|
export * from './reqLogin';
|
||||||
export * from "./reqUpdateCardMemo";
|
export * from './reqUpdateCard';
|
||||||
export * from "./reqUpdateCardName";
|
export * from './reqUpdateCardCondition';
|
||||||
export * from "./reqUpdateCardNumber";
|
export * from './reqUpdateCardEditScript';
|
||||||
export * from "./reqUpdateCardScript";
|
export * from './reqUpdateCardMemo';
|
||||||
export * from "./reqUpdateCardStatus";
|
export * from './reqUpdateCardName';
|
||||||
export * from "./reqUpdateItem";
|
export * from './reqUpdateCardNumber';
|
||||||
export * from "./reqUpdateItemCategory";
|
export * from './reqUpdateCardScript';
|
||||||
export * from "./reqUpdateItemCategoryType";
|
export * from './reqUpdateCardStatus';
|
||||||
export * from "./reqUpdateItemCode";
|
export * from './reqUpdateItem';
|
||||||
export * from "./reqUpdateItemDeliveryFeeYn";
|
export * from './reqUpdateItemCategory';
|
||||||
export * from "./reqUpdateItemDeliveryType";
|
export * from './reqUpdateItemCategoryType';
|
||||||
export * from "./reqUpdateItemImageUrl";
|
export * from './reqUpdateItemCode';
|
||||||
export * from "./reqUpdateItemInternetLowestPriceYn";
|
export * from './reqUpdateItemDeliveryFeeYn';
|
||||||
export * from "./reqUpdateItemLeadTime";
|
export * from './reqUpdateItemDeliveryType';
|
||||||
export * from "./reqUpdateItemMadeIn";
|
export * from './reqUpdateItemImageUrl';
|
||||||
export * from "./reqUpdateItemManufacturer";
|
export * from './reqUpdateItemInternetLowestPriceYn';
|
||||||
export * from "./reqUpdateItemModelName";
|
export * from './reqUpdateItemLeadTime';
|
||||||
export * from "./reqUpdateItemMoq";
|
export * from './reqUpdateItemMadeIn';
|
||||||
export * from "./reqUpdateItemName";
|
export * from './reqUpdateItemManufacturer';
|
||||||
export * from "./reqUpdateItemPrice";
|
export * from './reqUpdateItemModelName';
|
||||||
export * from "./reqUpdateItemQuantityUnit";
|
export * from './reqUpdateItemMoq';
|
||||||
export * from "./reqUpdateItemSpec";
|
export * from './reqUpdateItemName';
|
||||||
export * from "./reqUpdateItemVatYn";
|
export * from './reqUpdateItemPrice';
|
||||||
export * from "./reqUpdateQuotationSetting";
|
export * from './reqUpdateItemQuantityUnit';
|
||||||
export * from "./reqUpdateQuotationSettingAnchoringValue";
|
export * from './reqUpdateItemSpec';
|
||||||
export * from "./reqUpdateQuotationSettingCardCount";
|
export * from './reqUpdateItemVatYn';
|
||||||
export * from "./reqUpdateQuotationSettingTargetMarginRate";
|
export * from './reqUpdateQuotationSetting';
|
||||||
export * from "./reqUpdateSupplier";
|
export * from './reqUpdateQuotationSettingAnchoringValue';
|
||||||
export * from "./reqUpdateSupplierCode";
|
export * from './reqUpdateQuotationSettingCardCount';
|
||||||
export * from "./reqUpdateSupplierManagerContactNumber";
|
export * from './reqUpdateQuotationSettingTargetMarginRate';
|
||||||
export * from "./reqUpdateSupplierManagerEmail";
|
export * from './reqUpdateSupplier';
|
||||||
export * from "./reqUpdateSupplierManagerName";
|
export * from './reqUpdateSupplierCode';
|
||||||
export * from "./reqUpdateSupplierName";
|
export * from './reqUpdateSupplierManagerContactNumber';
|
||||||
export * from "./reqUpdateSupplierPriority";
|
export * from './reqUpdateSupplierManagerEmail';
|
||||||
export * from "./resCard";
|
export * from './reqUpdateSupplierManagerName';
|
||||||
export * from "./resCardCard";
|
export * from './reqUpdateSupplierName';
|
||||||
export * from "./resCardList";
|
export * from './reqUpdateSupplierPriority';
|
||||||
export * from "./resCardListMsg";
|
export * from './resCard';
|
||||||
export * from "./resCardMsg";
|
export * from './resCardCard';
|
||||||
export * from "./resCheckCodes";
|
export * from './resCardList';
|
||||||
export * from "./resCheckCodesMsg";
|
export * from './resCardListMsg';
|
||||||
export * from "./resCreateAccount";
|
export * from './resCardMsg';
|
||||||
export * from "./resCreateAccountMsg";
|
export * from './resCheckCodes';
|
||||||
export * from "./resCreateQuotation";
|
export * from './resCheckCodesMsg';
|
||||||
export * from "./resCreateQuotationAsyncJob";
|
export * from './resCreateAccount';
|
||||||
export * from "./resCreateQuotationMsg";
|
export * from './resCreateAccountMsg';
|
||||||
export * from "./resCreateQuotationQuotation";
|
export * from './resCreateQuotation';
|
||||||
export * from "./resDeleteCard";
|
export * from './resCreateQuotationAsyncJob';
|
||||||
export * from "./resDeleteCardMsg";
|
export * from './resCreateQuotationMsg';
|
||||||
export * from "./resDeleteItem";
|
export * from './resCreateQuotationQuotation';
|
||||||
export * from "./resDeleteItemMsg";
|
export * from './resDeleteCard';
|
||||||
export * from "./resDeleteQuotation";
|
export * from './resDeleteCardMsg';
|
||||||
export * from "./resDeleteQuotationMsg";
|
export * from './resDeleteItem';
|
||||||
export * from "./resDeleteQuotationSetting";
|
export * from './resDeleteItemMsg';
|
||||||
export * from "./resDeleteQuotationSettingMsg";
|
export * from './resDeleteQuotation';
|
||||||
export * from "./resDeleteSupplier";
|
export * from './resDeleteQuotationMsg';
|
||||||
export * from "./resDeleteSupplierMsg";
|
export * from './resDeleteQuotationSetting';
|
||||||
export * from "./resEnums";
|
export * from './resDeleteQuotationSettingMsg';
|
||||||
export * from "./resEnumsEnums";
|
export * from './resDeleteSupplier';
|
||||||
export * from "./resEnumsMsg";
|
export * from './resDeleteSupplierMsg';
|
||||||
export * from "./resExcelUpload";
|
export * from './resEnums';
|
||||||
export * from "./resExcelUploadMsg";
|
export * from './resEnumsEnums';
|
||||||
export * from "./resExcelUploadReceivedFilename";
|
export * from './resEnumsMsg';
|
||||||
export * from "./resItem";
|
export * from './resItem';
|
||||||
export * from "./resItemCategories";
|
export * from './resItemCategories';
|
||||||
export * from "./resItemCategoriesMsg";
|
export * from './resItemCategoriesMsg';
|
||||||
export * from "./resItemItem";
|
export * from './resItemImage';
|
||||||
export * from "./resItemList";
|
export * from './resItemImageFilename';
|
||||||
export * from "./resItemListMsg";
|
export * from './resItemImageImageUrl';
|
||||||
export * from "./resItemMsg";
|
export * from './resItemImageMsg';
|
||||||
export * from "./resLogin";
|
export * from './resItemImageSize';
|
||||||
export * from "./resLoginMsg";
|
export * from './resItemItem';
|
||||||
export * from "./resLowestPriceResult";
|
export * from './resItemList';
|
||||||
export * from "./resLowestPriceResultMsg";
|
export * from './resItemListMsg';
|
||||||
export * from "./resLowestPriceTrigger";
|
export * from './resItemMsg';
|
||||||
export * from "./resLowestPriceTriggerMsg";
|
export * from './resLogin';
|
||||||
export * from "./resMe";
|
export * from './resLoginMsg';
|
||||||
export * from "./resMeCompany";
|
export * from './resLowestPriceResult';
|
||||||
export * from "./resMeContactNumber";
|
export * from './resLowestPriceResultMsg';
|
||||||
export * from "./resMeEmail";
|
export * from './resLowestPriceTrigger';
|
||||||
export * from "./resMeMsg";
|
export * from './resLowestPriceTriggerMsg';
|
||||||
export * from "./resMeName";
|
export * from './resMe';
|
||||||
export * from "./resQuotation";
|
export * from './resMeCompany';
|
||||||
export * from "./resQuotationCards";
|
export * from './resMeContactNumber';
|
||||||
export * from "./resQuotationCardsMsg";
|
export * from './resMeEmail';
|
||||||
export * from "./resQuotationCardsQtId";
|
export * from './resMeMsg';
|
||||||
export * from "./resQuotationList";
|
export * from './resMeName';
|
||||||
export * from "./resQuotationListMsg";
|
export * from './resQuotation';
|
||||||
export * from "./resQuotationMsg";
|
export * from './resQuotationCards';
|
||||||
export * from "./resQuotationQuotation";
|
export * from './resQuotationCardsMsg';
|
||||||
export * from "./resQuotationResult";
|
export * from './resQuotationCardsQtId';
|
||||||
export * from "./resQuotationResultEqualBidData";
|
export * from './resQuotationList';
|
||||||
export * from "./resQuotationResultIsEqualBid";
|
export * from './resQuotationListMsg';
|
||||||
export * from "./resQuotationResultMsg";
|
export * from './resQuotationMsg';
|
||||||
export * from "./resQuotationResultQtId";
|
export * from './resQuotationQuotation';
|
||||||
export * from "./resQuotationResultWinnerSupplierId";
|
export * from './resQuotationResult';
|
||||||
export * from "./resQuotationResultWinnerSupplierName";
|
export * from './resQuotationResultEqualBidData';
|
||||||
export * from "./resQuotationSessions";
|
export * from './resQuotationResultIsEqualBid';
|
||||||
export * from "./resQuotationSessionsMsg";
|
export * from './resQuotationResultMsg';
|
||||||
export * from "./resQuotationSessionsQtId";
|
export * from './resQuotationResultQtId';
|
||||||
export * from "./resQuotationSetting";
|
export * from './resQuotationResultWinnerSupplierId';
|
||||||
export * from "./resQuotationSettingList";
|
export * from './resQuotationResultWinnerSupplierName';
|
||||||
export * from "./resQuotationSettingListMsg";
|
export * from './resQuotationSessions';
|
||||||
export * from "./resQuotationSettingMsg";
|
export * from './resQuotationSessionsMsg';
|
||||||
export * from "./resQuotationSettingSetting";
|
export * from './resQuotationSessionsQtId';
|
||||||
export * from "./resQuotationStatus";
|
export * from './resQuotationSetting';
|
||||||
export * from "./resQuotationStatusMsg";
|
export * from './resQuotationSettingList';
|
||||||
export * from "./resQuotationStatusQtId";
|
export * from './resQuotationSettingListMsg';
|
||||||
export * from "./resRefreshToken";
|
export * from './resQuotationSettingMsg';
|
||||||
export * from "./resRefreshTokenMsg";
|
export * from './resQuotationSettingSetting';
|
||||||
export * from "./resSessionChat";
|
export * from './resQuotationStatus';
|
||||||
export * from "./resSessionChatMsg";
|
export * from './resQuotationStatusMsg';
|
||||||
export * from "./resSessionChatSessionId";
|
export * from './resQuotationStatusQtId';
|
||||||
export * from "./resSupplier";
|
export * from './resRefreshToken';
|
||||||
export * from "./resSupplierList";
|
export * from './resRefreshTokenMsg';
|
||||||
export * from "./resSupplierListMsg";
|
export * from './resSessionChat';
|
||||||
export * from "./resSupplierMsg";
|
export * from './resSessionChatMsg';
|
||||||
export * from "./resSupplierSupplier";
|
export * from './resSessionChatSessionId';
|
||||||
export * from "./sessionData";
|
export * from './resSupplier';
|
||||||
export * from "./sessionDataBidAt";
|
export * from './resSupplierList';
|
||||||
export * from "./sessionDataBidPrice";
|
export * from './resSupplierListMsg';
|
||||||
export * from "./sessionDataRejectDeliveryType";
|
export * from './resSupplierMsg';
|
||||||
export * from "./sessionDataRejectPrice";
|
export * from './resSupplierSupplier';
|
||||||
export * from "./sessionDataRejectReason";
|
export * from './sessionData';
|
||||||
export * from "./supplierData";
|
export * from './sessionDataBidAt';
|
||||||
export * from "./supplierDataCode";
|
export * from './sessionDataBidPrice';
|
||||||
export * from "./supplierDataCreatedAt";
|
export * from './sessionDataRejectDeliveryType';
|
||||||
export * from "./supplierDataManagerContactNumber";
|
export * from './sessionDataRejectPrice';
|
||||||
export * from "./supplierDataManagerEmail";
|
export * from './sessionDataRejectReason';
|
||||||
export * from "./supplierDataManagerName";
|
export * from './supplierData';
|
||||||
export * from "./supplierDataPriority";
|
export * from './supplierDataCode';
|
||||||
export * from "./supplierDataUpdatedAt";
|
export * from './supplierDataCreatedAt';
|
||||||
export * from "./validationError";
|
export * from './supplierDataManagerContactNumber';
|
||||||
export * from "./validationErrorCtx";
|
export * from './supplierDataManagerEmail';
|
||||||
export * from "./validationErrorLocItem";
|
export * from './supplierDataManagerName';
|
||||||
|
export * from './supplierDataPriority';
|
||||||
|
export * from './supplierDataUpdatedAt';
|
||||||
|
export * from './validationError';
|
||||||
|
export * from './validationErrorCtx';
|
||||||
|
export * from './validationErrorLocItem';
|
||||||
@ -4,22 +4,22 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ItemDataCode } from "./itemDataCode";
|
import type { ItemDataCode } from './itemDataCode';
|
||||||
import type { ItemDataCategory } from "./itemDataCategory";
|
import type { ItemDataCategory } from './itemDataCategory';
|
||||||
import type { ItemDataImageUrl } from "./itemDataImageUrl";
|
import type { ItemDataImageUrl } from './itemDataImageUrl';
|
||||||
import type { ItemDataModelName } from "./itemDataModelName";
|
import type { ItemDataModelName } from './itemDataModelName';
|
||||||
import type { ItemDataSpec } from "./itemDataSpec";
|
import type { ItemDataSpec } from './itemDataSpec';
|
||||||
import type { ItemDataManufacturer } from "./itemDataManufacturer";
|
import type { ItemDataManufacturer } from './itemDataManufacturer';
|
||||||
import type { ItemDataMadeIn } from "./itemDataMadeIn";
|
import type { ItemDataMadeIn } from './itemDataMadeIn';
|
||||||
import type { ItemDataPrice } from "./itemDataPrice";
|
import type { ItemDataPrice } from './itemDataPrice';
|
||||||
import type { ItemDataMoq } from "./itemDataMoq";
|
import type { ItemDataMoq } from './itemDataMoq';
|
||||||
import type { ItemDataLeadTime } from "./itemDataLeadTime";
|
import type { ItemDataLeadTime } from './itemDataLeadTime';
|
||||||
import type { ItemDataQuantityUnit } from "./itemDataQuantityUnit";
|
import type { ItemDataQuantityUnit } from './itemDataQuantityUnit';
|
||||||
import type { ItemDataDeliveryType } from "./itemDataDeliveryType";
|
import type { ItemDataDeliveryType } from './itemDataDeliveryType';
|
||||||
import type { ItemDataVatYn } from "./itemDataVatYn";
|
import type { ItemDataVatYn } from './itemDataVatYn';
|
||||||
import type { ItemDataDeliveryFeeYn } from "./itemDataDeliveryFeeYn";
|
import type { ItemDataDeliveryFeeYn } from './itemDataDeliveryFeeYn';
|
||||||
import type { ItemDataCreatedAt } from "./itemDataCreatedAt";
|
import type { ItemDataCreatedAt } from './itemDataCreatedAt';
|
||||||
import type { ItemDataUpdatedAt } from "./itemDataUpdatedAt";
|
import type { ItemDataUpdatedAt } from './itemDataUpdatedAt';
|
||||||
|
|
||||||
export interface ItemData {
|
export interface ItemData {
|
||||||
item_id: string;
|
item_id: string;
|
||||||
|
|||||||
@ -4,12 +4,16 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { QuotationCardDataQtId } from "./quotationCardDataQtId";
|
import type { QuotationCardDataQtId } from './quotationCardDataQtId';
|
||||||
import type { QuotationCardDataNegoCardId } from "./quotationCardDataNegoCardId";
|
import type { QuotationCardDataNegoCardId } from './quotationCardDataNegoCardId';
|
||||||
import type { QuotationCardDataWildCardId } from "./quotationCardDataWildCardId";
|
import type { QuotationCardDataWildCardId } from './quotationCardDataWildCardId';
|
||||||
import type { QuotationCardDataType } from "./quotationCardDataType";
|
import type { QuotationCardDataType } from './quotationCardDataType';
|
||||||
import type { QuotationCardDataName } from "./quotationCardDataName";
|
import type { QuotationCardDataNumber } from './quotationCardDataNumber';
|
||||||
import type { QuotationCardDataScript } from "./quotationCardDataScript";
|
import type { QuotationCardDataName } from './quotationCardDataName';
|
||||||
|
import type { QuotationCardDataScript } from './quotationCardDataScript';
|
||||||
|
import type { QuotationCardDataEditScript } from './quotationCardDataEditScript';
|
||||||
|
import type { QuotationCardDataCondition } from './quotationCardDataCondition';
|
||||||
|
import type { QuotationCardDataMemo } from './quotationCardDataMemo';
|
||||||
|
|
||||||
export interface QuotationCardData {
|
export interface QuotationCardData {
|
||||||
session_card_id: string;
|
session_card_id: string;
|
||||||
@ -17,6 +21,10 @@ export interface QuotationCardData {
|
|||||||
nego_card_id?: QuotationCardDataNegoCardId;
|
nego_card_id?: QuotationCardDataNegoCardId;
|
||||||
wild_card_id?: QuotationCardDataWildCardId;
|
wild_card_id?: QuotationCardDataWildCardId;
|
||||||
type?: QuotationCardDataType;
|
type?: QuotationCardDataType;
|
||||||
|
number?: QuotationCardDataNumber;
|
||||||
name?: QuotationCardDataName;
|
name?: QuotationCardDataName;
|
||||||
script?: QuotationCardDataScript;
|
script?: QuotationCardDataScript;
|
||||||
|
edit_script?: QuotationCardDataEditScript;
|
||||||
|
condition?: QuotationCardDataCondition;
|
||||||
|
memo?: QuotationCardDataMemo;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,4 +5,4 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type ResExcelUploadReceivedFilename = string | null;
|
export type QuotationCardDataCondition = string | null;
|
||||||
@ -5,6 +5,4 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export interface BodyUploadSuppliersExcelV1SupplierUploadExcelPost {
|
export type QuotationCardDataEditScript = unknown | null;
|
||||||
file: string;
|
|
||||||
}
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* Negodata Api Server
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type QuotationCardDataMemo = string | null;
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* Negodata Api Server
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type QuotationCardDataNumber = string | null;
|
||||||
@ -4,17 +4,17 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { QuotationDataManagerName } from "./quotationDataManagerName";
|
import type { QuotationDataManagerName } from './quotationDataManagerName';
|
||||||
import type { QuotationDataManagerEmail } from "./quotationDataManagerEmail";
|
import type { QuotationDataManagerEmail } from './quotationDataManagerEmail';
|
||||||
import type { QuotationDataManagerContactNumber } from "./quotationDataManagerContactNumber";
|
import type { QuotationDataManagerContactNumber } from './quotationDataManagerContactNumber';
|
||||||
import type { QuotationDataMemo } from "./quotationDataMemo";
|
import type { QuotationDataMemo } from './quotationDataMemo';
|
||||||
import type { QuotationDataPreferredSpYn } from "./quotationDataPreferredSpYn";
|
import type { QuotationDataPreferredSpYn } from './quotationDataPreferredSpYn';
|
||||||
import type { QuotationDataPreferredSpId } from "./quotationDataPreferredSpId";
|
import type { QuotationDataPreferredSpId } from './quotationDataPreferredSpId';
|
||||||
import type { QuotationDataPreferredSpName } from "./quotationDataPreferredSpName";
|
import type { QuotationDataPreferredSpName } from './quotationDataPreferredSpName';
|
||||||
import type { QuotationDataEqualBidYn } from "./quotationDataEqualBidYn";
|
import type { QuotationDataEqualBidYn } from './quotationDataEqualBidYn';
|
||||||
import type { QuotationDataEqualBidData } from "./quotationDataEqualBidData";
|
import type { QuotationDataEqualBidData } from './quotationDataEqualBidData';
|
||||||
import type { QuotationDataCreatedAt } from "./quotationDataCreatedAt";
|
import type { QuotationDataCreatedAt } from './quotationDataCreatedAt';
|
||||||
import type { QuotationDataUpdatedAt } from "./quotationDataUpdatedAt";
|
import type { QuotationDataUpdatedAt } from './quotationDataUpdatedAt';
|
||||||
|
|
||||||
export interface QuotationData {
|
export interface QuotationData {
|
||||||
qt_id: string;
|
qt_id: string;
|
||||||
@ -38,6 +38,7 @@ export interface QuotationData {
|
|||||||
preferred_sp_name?: QuotationDataPreferredSpName;
|
preferred_sp_name?: QuotationDataPreferredSpName;
|
||||||
equal_bid_yn?: QuotationDataEqualBidYn;
|
equal_bid_yn?: QuotationDataEqualBidYn;
|
||||||
equal_bid_data?: QuotationDataEqualBidData;
|
equal_bid_data?: QuotationDataEqualBidData;
|
||||||
|
participation_count?: number;
|
||||||
created_at?: QuotationDataCreatedAt;
|
created_at?: QuotationDataCreatedAt;
|
||||||
updated_at?: QuotationDataUpdatedAt;
|
updated_at?: QuotationDataUpdatedAt;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { QuotationSettingDataUserId } from "./quotationSettingDataUserId";
|
import type { QuotationSettingDataUserId } from './quotationSettingDataUserId';
|
||||||
import type { QuotationSettingDataCreatedAt } from "./quotationSettingDataCreatedAt";
|
import type { QuotationSettingDataCreatedAt } from './quotationSettingDataCreatedAt';
|
||||||
import type { QuotationSettingDataUpdatedAt } from "./quotationSettingDataUpdatedAt";
|
import type { QuotationSettingDataUpdatedAt } from './quotationSettingDataUpdatedAt';
|
||||||
|
|
||||||
export interface QuotationSettingData {
|
export interface QuotationSettingData {
|
||||||
qt_setting_id: string;
|
qt_setting_id: string;
|
||||||
|
|||||||
@ -4,12 +4,12 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ReqCreateCardName } from "./reqCreateCardName";
|
import type { ReqCreateCardName } from './reqCreateCardName';
|
||||||
import type { ReqCreateCardNumber } from "./reqCreateCardNumber";
|
import type { ReqCreateCardNumber } from './reqCreateCardNumber';
|
||||||
import type { ReqCreateCardScript } from "./reqCreateCardScript";
|
import type { ReqCreateCardScript } from './reqCreateCardScript';
|
||||||
import type { ReqCreateCardEditScript } from "./reqCreateCardEditScript";
|
import type { ReqCreateCardEditScript } from './reqCreateCardEditScript';
|
||||||
import type { ReqCreateCardCondition } from "./reqCreateCardCondition";
|
import type { ReqCreateCardCondition } from './reqCreateCardCondition';
|
||||||
import type { ReqCreateCardMemo } from "./reqCreateCardMemo";
|
import type { ReqCreateCardMemo } from './reqCreateCardMemo';
|
||||||
|
|
||||||
export interface ReqCreateCard {
|
export interface ReqCreateCard {
|
||||||
is_wildcard?: boolean;
|
is_wildcard?: boolean;
|
||||||
|
|||||||
@ -4,20 +4,20 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ReqCreateItemCode } from "./reqCreateItemCode";
|
import type { ReqCreateItemCode } from './reqCreateItemCode';
|
||||||
import type { ReqCreateItemCategory } from "./reqCreateItemCategory";
|
import type { ReqCreateItemCategory } from './reqCreateItemCategory';
|
||||||
import type { ReqCreateItemImageUrl } from "./reqCreateItemImageUrl";
|
import type { ReqCreateItemImageUrl } from './reqCreateItemImageUrl';
|
||||||
import type { ReqCreateItemModelName } from "./reqCreateItemModelName";
|
import type { ReqCreateItemModelName } from './reqCreateItemModelName';
|
||||||
import type { ReqCreateItemSpec } from "./reqCreateItemSpec";
|
import type { ReqCreateItemSpec } from './reqCreateItemSpec';
|
||||||
import type { ReqCreateItemManufacturer } from "./reqCreateItemManufacturer";
|
import type { ReqCreateItemManufacturer } from './reqCreateItemManufacturer';
|
||||||
import type { ReqCreateItemMadeIn } from "./reqCreateItemMadeIn";
|
import type { ReqCreateItemMadeIn } from './reqCreateItemMadeIn';
|
||||||
import type { ReqCreateItemPrice } from "./reqCreateItemPrice";
|
import type { ReqCreateItemPrice } from './reqCreateItemPrice';
|
||||||
import type { ReqCreateItemMoq } from "./reqCreateItemMoq";
|
import type { ReqCreateItemMoq } from './reqCreateItemMoq';
|
||||||
import type { ReqCreateItemLeadTime } from "./reqCreateItemLeadTime";
|
import type { ReqCreateItemLeadTime } from './reqCreateItemLeadTime';
|
||||||
import type { ReqCreateItemQuantityUnit } from "./reqCreateItemQuantityUnit";
|
import type { ReqCreateItemQuantityUnit } from './reqCreateItemQuantityUnit';
|
||||||
import type { ReqCreateItemDeliveryType } from "./reqCreateItemDeliveryType";
|
import type { ReqCreateItemDeliveryType } from './reqCreateItemDeliveryType';
|
||||||
import type { ReqCreateItemVatYn } from "./reqCreateItemVatYn";
|
import type { ReqCreateItemVatYn } from './reqCreateItemVatYn';
|
||||||
import type { ReqCreateItemDeliveryFeeYn } from "./reqCreateItemDeliveryFeeYn";
|
import type { ReqCreateItemDeliveryFeeYn } from './reqCreateItemDeliveryFeeYn';
|
||||||
|
|
||||||
export interface ReqCreateItem {
|
export interface ReqCreateItem {
|
||||||
name?: string;
|
name?: string;
|
||||||
|
|||||||
@ -4,10 +4,10 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ReqCreateQuotationManagerName } from "./reqCreateQuotationManagerName";
|
import type { ReqCreateQuotationManagerName } from './reqCreateQuotationManagerName';
|
||||||
import type { ReqCreateQuotationManagerEmail } from "./reqCreateQuotationManagerEmail";
|
import type { ReqCreateQuotationManagerEmail } from './reqCreateQuotationManagerEmail';
|
||||||
import type { ReqCreateQuotationManagerContactNumber } from "./reqCreateQuotationManagerContactNumber";
|
import type { ReqCreateQuotationManagerContactNumber } from './reqCreateQuotationManagerContactNumber';
|
||||||
import type { ReqCreateQuotationMemo } from "./reqCreateQuotationMemo";
|
import type { ReqCreateQuotationMemo } from './reqCreateQuotationMemo';
|
||||||
|
|
||||||
export interface ReqCreateQuotation {
|
export interface ReqCreateQuotation {
|
||||||
qt_setting_id: string;
|
qt_setting_id: string;
|
||||||
|
|||||||
@ -4,11 +4,11 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ReqCreateSupplierCode } from "./reqCreateSupplierCode";
|
import type { ReqCreateSupplierCode } from './reqCreateSupplierCode';
|
||||||
import type { ReqCreateSupplierManagerName } from "./reqCreateSupplierManagerName";
|
import type { ReqCreateSupplierManagerName } from './reqCreateSupplierManagerName';
|
||||||
import type { ReqCreateSupplierManagerEmail } from "./reqCreateSupplierManagerEmail";
|
import type { ReqCreateSupplierManagerEmail } from './reqCreateSupplierManagerEmail';
|
||||||
import type { ReqCreateSupplierManagerContactNumber } from "./reqCreateSupplierManagerContactNumber";
|
import type { ReqCreateSupplierManagerContactNumber } from './reqCreateSupplierManagerContactNumber';
|
||||||
import type { ReqCreateSupplierPriority } from "./reqCreateSupplierPriority";
|
import type { ReqCreateSupplierPriority } from './reqCreateSupplierPriority';
|
||||||
|
|
||||||
export interface ReqCreateSupplier {
|
export interface ReqCreateSupplier {
|
||||||
name?: string;
|
name?: string;
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ReqUpdateCardName } from "./reqUpdateCardName";
|
import type { ReqUpdateCardName } from './reqUpdateCardName';
|
||||||
import type { ReqUpdateCardNumber } from "./reqUpdateCardNumber";
|
import type { ReqUpdateCardNumber } from './reqUpdateCardNumber';
|
||||||
import type { ReqUpdateCardScript } from "./reqUpdateCardScript";
|
import type { ReqUpdateCardScript } from './reqUpdateCardScript';
|
||||||
import type { ReqUpdateCardEditScript } from "./reqUpdateCardEditScript";
|
import type { ReqUpdateCardEditScript } from './reqUpdateCardEditScript';
|
||||||
import type { ReqUpdateCardStatus } from "./reqUpdateCardStatus";
|
import type { ReqUpdateCardStatus } from './reqUpdateCardStatus';
|
||||||
import type { ReqUpdateCardCondition } from "./reqUpdateCardCondition";
|
import type { ReqUpdateCardCondition } from './reqUpdateCardCondition';
|
||||||
import type { ReqUpdateCardMemo } from "./reqUpdateCardMemo";
|
import type { ReqUpdateCardMemo } from './reqUpdateCardMemo';
|
||||||
|
|
||||||
export interface ReqUpdateCard {
|
export interface ReqUpdateCard {
|
||||||
name?: ReqUpdateCardName;
|
name?: ReqUpdateCardName;
|
||||||
|
|||||||
@ -4,23 +4,23 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ReqUpdateItemName } from "./reqUpdateItemName";
|
import type { ReqUpdateItemName } from './reqUpdateItemName';
|
||||||
import type { ReqUpdateItemCode } from "./reqUpdateItemCode";
|
import type { ReqUpdateItemCode } from './reqUpdateItemCode';
|
||||||
import type { ReqUpdateItemCategory } from "./reqUpdateItemCategory";
|
import type { ReqUpdateItemCategory } from './reqUpdateItemCategory';
|
||||||
import type { ReqUpdateItemCategoryType } from "./reqUpdateItemCategoryType";
|
import type { ReqUpdateItemCategoryType } from './reqUpdateItemCategoryType';
|
||||||
import type { ReqUpdateItemImageUrl } from "./reqUpdateItemImageUrl";
|
import type { ReqUpdateItemImageUrl } from './reqUpdateItemImageUrl';
|
||||||
import type { ReqUpdateItemModelName } from "./reqUpdateItemModelName";
|
import type { ReqUpdateItemModelName } from './reqUpdateItemModelName';
|
||||||
import type { ReqUpdateItemSpec } from "./reqUpdateItemSpec";
|
import type { ReqUpdateItemSpec } from './reqUpdateItemSpec';
|
||||||
import type { ReqUpdateItemManufacturer } from "./reqUpdateItemManufacturer";
|
import type { ReqUpdateItemManufacturer } from './reqUpdateItemManufacturer';
|
||||||
import type { ReqUpdateItemMadeIn } from "./reqUpdateItemMadeIn";
|
import type { ReqUpdateItemMadeIn } from './reqUpdateItemMadeIn';
|
||||||
import type { ReqUpdateItemPrice } from "./reqUpdateItemPrice";
|
import type { ReqUpdateItemPrice } from './reqUpdateItemPrice';
|
||||||
import type { ReqUpdateItemInternetLowestPriceYn } from "./reqUpdateItemInternetLowestPriceYn";
|
import type { ReqUpdateItemInternetLowestPriceYn } from './reqUpdateItemInternetLowestPriceYn';
|
||||||
import type { ReqUpdateItemMoq } from "./reqUpdateItemMoq";
|
import type { ReqUpdateItemMoq } from './reqUpdateItemMoq';
|
||||||
import type { ReqUpdateItemLeadTime } from "./reqUpdateItemLeadTime";
|
import type { ReqUpdateItemLeadTime } from './reqUpdateItemLeadTime';
|
||||||
import type { ReqUpdateItemQuantityUnit } from "./reqUpdateItemQuantityUnit";
|
import type { ReqUpdateItemQuantityUnit } from './reqUpdateItemQuantityUnit';
|
||||||
import type { ReqUpdateItemDeliveryType } from "./reqUpdateItemDeliveryType";
|
import type { ReqUpdateItemDeliveryType } from './reqUpdateItemDeliveryType';
|
||||||
import type { ReqUpdateItemVatYn } from "./reqUpdateItemVatYn";
|
import type { ReqUpdateItemVatYn } from './reqUpdateItemVatYn';
|
||||||
import type { ReqUpdateItemDeliveryFeeYn } from "./reqUpdateItemDeliveryFeeYn";
|
import type { ReqUpdateItemDeliveryFeeYn } from './reqUpdateItemDeliveryFeeYn';
|
||||||
|
|
||||||
export interface ReqUpdateItem {
|
export interface ReqUpdateItem {
|
||||||
name?: ReqUpdateItemName;
|
name?: ReqUpdateItemName;
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ReqUpdateQuotationSettingTargetMarginRate } from "./reqUpdateQuotationSettingTargetMarginRate";
|
import type { ReqUpdateQuotationSettingTargetMarginRate } from './reqUpdateQuotationSettingTargetMarginRate';
|
||||||
import type { ReqUpdateQuotationSettingAnchoringValue } from "./reqUpdateQuotationSettingAnchoringValue";
|
import type { ReqUpdateQuotationSettingAnchoringValue } from './reqUpdateQuotationSettingAnchoringValue';
|
||||||
import type { ReqUpdateQuotationSettingCardCount } from "./reqUpdateQuotationSettingCardCount";
|
import type { ReqUpdateQuotationSettingCardCount } from './reqUpdateQuotationSettingCardCount';
|
||||||
|
|
||||||
export interface ReqUpdateQuotationSetting {
|
export interface ReqUpdateQuotationSetting {
|
||||||
target_margin_rate?: ReqUpdateQuotationSettingTargetMarginRate;
|
target_margin_rate?: ReqUpdateQuotationSettingTargetMarginRate;
|
||||||
|
|||||||
@ -4,12 +4,12 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ReqUpdateSupplierName } from "./reqUpdateSupplierName";
|
import type { ReqUpdateSupplierName } from './reqUpdateSupplierName';
|
||||||
import type { ReqUpdateSupplierCode } from "./reqUpdateSupplierCode";
|
import type { ReqUpdateSupplierCode } from './reqUpdateSupplierCode';
|
||||||
import type { ReqUpdateSupplierManagerName } from "./reqUpdateSupplierManagerName";
|
import type { ReqUpdateSupplierManagerName } from './reqUpdateSupplierManagerName';
|
||||||
import type { ReqUpdateSupplierManagerEmail } from "./reqUpdateSupplierManagerEmail";
|
import type { ReqUpdateSupplierManagerEmail } from './reqUpdateSupplierManagerEmail';
|
||||||
import type { ReqUpdateSupplierManagerContactNumber } from "./reqUpdateSupplierManagerContactNumber";
|
import type { ReqUpdateSupplierManagerContactNumber } from './reqUpdateSupplierManagerContactNumber';
|
||||||
import type { ReqUpdateSupplierPriority } from "./reqUpdateSupplierPriority";
|
import type { ReqUpdateSupplierPriority } from './reqUpdateSupplierPriority';
|
||||||
|
|
||||||
export interface ReqUpdateSupplier {
|
export interface ReqUpdateSupplier {
|
||||||
name?: ReqUpdateSupplierName;
|
name?: ReqUpdateSupplierName;
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResCardMsg } from "./resCardMsg";
|
import type { ResCardMsg } from './resCardMsg';
|
||||||
import type { ResCardCard } from "./resCardCard";
|
import type { ResCardCard } from './resCardCard';
|
||||||
|
|
||||||
export interface ResCard {
|
export interface ResCard {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,6 +4,6 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { CardData } from "./cardData";
|
import type { CardData } from './cardData';
|
||||||
|
|
||||||
export type ResCardCard = CardData | null;
|
export type ResCardCard = CardData | null;
|
||||||
|
|||||||
@ -4,15 +4,15 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResCardListMsg } from "./resCardListMsg";
|
import type { ResCardListMsg } from './resCardListMsg';
|
||||||
import type { CardData } from "./cardData";
|
import type { CardData } from './cardData';
|
||||||
|
|
||||||
export interface ResCardList {
|
export interface ResCardList {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
msg?: ResCardListMsg;
|
msg?: ResCardListMsg;
|
||||||
cards?: CardData[];
|
|
||||||
total?: number;
|
total?: number;
|
||||||
page?: number;
|
page?: number;
|
||||||
size?: number;
|
size?: number;
|
||||||
|
cards?: CardData[];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResCheckCodesMsg } from "./resCheckCodesMsg";
|
import type { ResCheckCodesMsg } from './resCheckCodesMsg';
|
||||||
|
|
||||||
export interface ResCheckCodes {
|
export interface ResCheckCodes {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResCreateAccountMsg } from "./resCreateAccountMsg";
|
import type { ResCreateAccountMsg } from './resCreateAccountMsg';
|
||||||
|
|
||||||
export interface ResCreateAccount {
|
export interface ResCreateAccount {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,10 +4,10 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResCreateQuotationMsg } from "./resCreateQuotationMsg";
|
import type { ResCreateQuotationMsg } from './resCreateQuotationMsg';
|
||||||
import type { ResCreateQuotationQuotation } from "./resCreateQuotationQuotation";
|
import type { ResCreateQuotationQuotation } from './resCreateQuotationQuotation';
|
||||||
import type { ResCreateQuotationAsyncJob } from "./resCreateQuotationAsyncJob";
|
import type { ResCreateQuotationAsyncJob } from './resCreateQuotationAsyncJob';
|
||||||
|
|
||||||
export interface ResCreateQuotation {
|
export interface ResCreateQuotation {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,6 +4,6 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { AsyncJob } from "./asyncJob";
|
import type { AsyncJob } from './asyncJob';
|
||||||
|
|
||||||
export type ResCreateQuotationAsyncJob = AsyncJob | null;
|
export type ResCreateQuotationAsyncJob = AsyncJob | null;
|
||||||
|
|||||||
@ -4,6 +4,6 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { QuotationData } from "./quotationData";
|
import type { QuotationData } from './quotationData';
|
||||||
|
|
||||||
export type ResCreateQuotationQuotation = QuotationData | null;
|
export type ResCreateQuotationQuotation = QuotationData | null;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResDeleteCardMsg } from "./resDeleteCardMsg";
|
import type { ResDeleteCardMsg } from './resDeleteCardMsg';
|
||||||
|
|
||||||
export interface ResDeleteCard {
|
export interface ResDeleteCard {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResDeleteItemMsg } from "./resDeleteItemMsg";
|
import type { ResDeleteItemMsg } from './resDeleteItemMsg';
|
||||||
|
|
||||||
export interface ResDeleteItem {
|
export interface ResDeleteItem {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResDeleteQuotationMsg } from "./resDeleteQuotationMsg";
|
import type { ResDeleteQuotationMsg } from './resDeleteQuotationMsg';
|
||||||
|
|
||||||
export interface ResDeleteQuotation {
|
export interface ResDeleteQuotation {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResDeleteQuotationSettingMsg } from "./resDeleteQuotationSettingMsg";
|
import type { ResDeleteQuotationSettingMsg } from './resDeleteQuotationSettingMsg';
|
||||||
|
|
||||||
export interface ResDeleteQuotationSetting {
|
export interface ResDeleteQuotationSetting {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResDeleteSupplierMsg } from "./resDeleteSupplierMsg";
|
import type { ResDeleteSupplierMsg } from './resDeleteSupplierMsg';
|
||||||
|
|
||||||
export interface ResDeleteSupplier {
|
export interface ResDeleteSupplier {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResEnumsMsg } from "./resEnumsMsg";
|
import type { ResEnumsMsg } from './resEnumsMsg';
|
||||||
import type { ResEnumsEnums } from "./resEnumsEnums";
|
import type { ResEnumsEnums } from './resEnumsEnums';
|
||||||
|
|
||||||
export interface ResEnums {
|
export interface ResEnums {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,6 +4,6 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { EnumOption } from "./enumOption";
|
import type { EnumOption } from './enumOption';
|
||||||
|
|
||||||
export type ResEnumsEnums = {[key: string]: EnumOption[]};
|
export type ResEnumsEnums = {[key: string]: EnumOption[]};
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
/**
|
|
||||||
* Generated by orval v7.21.0 🍺
|
|
||||||
* Do not edit manually.
|
|
||||||
* Negodata Api Server
|
|
||||||
* OpenAPI spec version: 0.1.0
|
|
||||||
*/
|
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
|
||||||
import type { ResExcelUploadMsg } from "./resExcelUploadMsg";
|
|
||||||
import type { ResExcelUploadReceivedFilename } from "./resExcelUploadReceivedFilename";
|
|
||||||
|
|
||||||
export interface ResExcelUpload {
|
|
||||||
result?: ErrorInfo;
|
|
||||||
msg?: ResExcelUploadMsg;
|
|
||||||
received_filename?: ResExcelUploadReceivedFilename;
|
|
||||||
status?: string;
|
|
||||||
message?: string;
|
|
||||||
}
|
|
||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResItemMsg } from "./resItemMsg";
|
import type { ResItemMsg } from './resItemMsg';
|
||||||
import type { ResItemItem } from "./resItemItem";
|
import type { ResItemItem } from './resItemItem';
|
||||||
|
|
||||||
export interface ResItem {
|
export interface ResItem {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResItemCategoriesMsg } from "./resItemCategoriesMsg";
|
import type { ResItemCategoriesMsg } from './resItemCategoriesMsg';
|
||||||
import type { ItemCategory } from "./itemCategory";
|
import type { ItemCategory } from './itemCategory';
|
||||||
|
|
||||||
export interface ResItemCategories {
|
export interface ResItemCategories {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
19
negodata/front/src/api/generated/model/resItemImage.ts
Normal file
19
negodata/front/src/api/generated/model/resItemImage.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* Negodata Api Server
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
import type { ErrorInfo } from './errorInfo';
|
||||||
|
import type { ResItemImageMsg } from './resItemImageMsg';
|
||||||
|
import type { ResItemImageImageUrl } from './resItemImageImageUrl';
|
||||||
|
import type { ResItemImageFilename } from './resItemImageFilename';
|
||||||
|
import type { ResItemImageSize } from './resItemImageSize';
|
||||||
|
|
||||||
|
export interface ResItemImage {
|
||||||
|
result?: ErrorInfo;
|
||||||
|
msg?: ResItemImageMsg;
|
||||||
|
image_url?: ResItemImageImageUrl;
|
||||||
|
filename?: ResItemImageFilename;
|
||||||
|
size?: ResItemImageSize;
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* Negodata Api Server
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ResItemImageFilename = string | null;
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* Negodata Api Server
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ResItemImageImageUrl = string | null;
|
||||||
@ -5,4 +5,4 @@
|
|||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type ResExcelUploadMsg = string | null;
|
export type ResItemImageMsg = string | null;
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Generated by orval v7.21.0 🍺
|
||||||
|
* Do not edit manually.
|
||||||
|
* Negodata Api Server
|
||||||
|
* OpenAPI spec version: 0.1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type ResItemImageSize = number | null;
|
||||||
@ -4,6 +4,6 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ItemData } from "./itemData";
|
import type { ItemData } from './itemData';
|
||||||
|
|
||||||
export type ResItemItem = ItemData | null;
|
export type ResItemItem = ItemData | null;
|
||||||
|
|||||||
@ -4,15 +4,15 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResItemListMsg } from "./resItemListMsg";
|
import type { ResItemListMsg } from './resItemListMsg';
|
||||||
import type { ItemData } from "./itemData";
|
import type { ItemData } from './itemData';
|
||||||
|
|
||||||
export interface ResItemList {
|
export interface ResItemList {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
msg?: ResItemListMsg;
|
msg?: ResItemListMsg;
|
||||||
items?: ItemData[];
|
|
||||||
total?: number;
|
total?: number;
|
||||||
page?: number;
|
page?: number;
|
||||||
size?: number;
|
size?: number;
|
||||||
|
items?: ItemData[];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResLoginMsg } from "./resLoginMsg";
|
import type { ResLoginMsg } from './resLoginMsg';
|
||||||
|
|
||||||
export interface ResLogin {
|
export interface ResLogin {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResLowestPriceResultMsg } from "./resLowestPriceResultMsg";
|
import type { ResLowestPriceResultMsg } from './resLowestPriceResultMsg';
|
||||||
|
|
||||||
export interface ResLowestPriceResult {
|
export interface ResLowestPriceResult {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResLowestPriceTriggerMsg } from "./resLowestPriceTriggerMsg";
|
import type { ResLowestPriceTriggerMsg } from './resLowestPriceTriggerMsg';
|
||||||
|
|
||||||
export interface ResLowestPriceTrigger {
|
export interface ResLowestPriceTrigger {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,12 +4,12 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResMeMsg } from "./resMeMsg";
|
import type { ResMeMsg } from './resMeMsg';
|
||||||
import type { ResMeName } from "./resMeName";
|
import type { ResMeName } from './resMeName';
|
||||||
import type { ResMeEmail } from "./resMeEmail";
|
import type { ResMeEmail } from './resMeEmail';
|
||||||
import type { ResMeContactNumber } from "./resMeContactNumber";
|
import type { ResMeContactNumber } from './resMeContactNumber';
|
||||||
import type { ResMeCompany } from "./resMeCompany";
|
import type { ResMeCompany } from './resMeCompany';
|
||||||
|
|
||||||
export interface ResMe {
|
export interface ResMe {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,6 +4,6 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { CompanyData } from "./companyData";
|
import type { CompanyData } from './companyData';
|
||||||
|
|
||||||
export type ResMeCompany = CompanyData | null;
|
export type ResMeCompany = CompanyData | null;
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResQuotationMsg } from "./resQuotationMsg";
|
import type { ResQuotationMsg } from './resQuotationMsg';
|
||||||
import type { ResQuotationQuotation } from "./resQuotationQuotation";
|
import type { ResQuotationQuotation } from './resQuotationQuotation';
|
||||||
|
|
||||||
export interface ResQuotation {
|
export interface ResQuotation {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,10 +4,10 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResQuotationCardsMsg } from "./resQuotationCardsMsg";
|
import type { ResQuotationCardsMsg } from './resQuotationCardsMsg';
|
||||||
import type { ResQuotationCardsQtId } from "./resQuotationCardsQtId";
|
import type { ResQuotationCardsQtId } from './resQuotationCardsQtId';
|
||||||
import type { QuotationCardData } from "./quotationCardData";
|
import type { QuotationCardData } from './quotationCardData';
|
||||||
|
|
||||||
export interface ResQuotationCards {
|
export interface ResQuotationCards {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,15 +4,15 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResQuotationListMsg } from "./resQuotationListMsg";
|
import type { ResQuotationListMsg } from './resQuotationListMsg';
|
||||||
import type { QuotationData } from "./quotationData";
|
import type { QuotationData } from './quotationData';
|
||||||
|
|
||||||
export interface ResQuotationList {
|
export interface ResQuotationList {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
msg?: ResQuotationListMsg;
|
msg?: ResQuotationListMsg;
|
||||||
quotations?: QuotationData[];
|
|
||||||
total?: number;
|
total?: number;
|
||||||
page?: number;
|
page?: number;
|
||||||
size?: number;
|
size?: number;
|
||||||
|
quotations?: QuotationData[];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,6 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { QuotationData } from "./quotationData";
|
import type { QuotationData } from './quotationData';
|
||||||
|
|
||||||
export type ResQuotationQuotation = QuotationData | null;
|
export type ResQuotationQuotation = QuotationData | null;
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResQuotationResultMsg } from "./resQuotationResultMsg";
|
import type { ResQuotationResultMsg } from './resQuotationResultMsg';
|
||||||
import type { ResQuotationResultQtId } from "./resQuotationResultQtId";
|
import type { ResQuotationResultQtId } from './resQuotationResultQtId';
|
||||||
import type { ResQuotationResultWinnerSupplierId } from "./resQuotationResultWinnerSupplierId";
|
import type { ResQuotationResultWinnerSupplierId } from './resQuotationResultWinnerSupplierId';
|
||||||
import type { ResQuotationResultWinnerSupplierName } from "./resQuotationResultWinnerSupplierName";
|
import type { ResQuotationResultWinnerSupplierName } from './resQuotationResultWinnerSupplierName';
|
||||||
import type { ResQuotationResultIsEqualBid } from "./resQuotationResultIsEqualBid";
|
import type { ResQuotationResultIsEqualBid } from './resQuotationResultIsEqualBid';
|
||||||
import type { ResQuotationResultEqualBidData } from "./resQuotationResultEqualBidData";
|
import type { ResQuotationResultEqualBidData } from './resQuotationResultEqualBidData';
|
||||||
|
|
||||||
export interface ResQuotationResult {
|
export interface ResQuotationResult {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,10 +4,10 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResQuotationSessionsMsg } from "./resQuotationSessionsMsg";
|
import type { ResQuotationSessionsMsg } from './resQuotationSessionsMsg';
|
||||||
import type { ResQuotationSessionsQtId } from "./resQuotationSessionsQtId";
|
import type { ResQuotationSessionsQtId } from './resQuotationSessionsQtId';
|
||||||
import type { SessionData } from "./sessionData";
|
import type { SessionData } from './sessionData';
|
||||||
|
|
||||||
export interface ResQuotationSessions {
|
export interface ResQuotationSessions {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResQuotationSettingMsg } from "./resQuotationSettingMsg";
|
import type { ResQuotationSettingMsg } from './resQuotationSettingMsg';
|
||||||
import type { ResQuotationSettingSetting } from "./resQuotationSettingSetting";
|
import type { ResQuotationSettingSetting } from './resQuotationSettingSetting';
|
||||||
|
|
||||||
export interface ResQuotationSetting {
|
export interface ResQuotationSetting {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResQuotationSettingListMsg } from "./resQuotationSettingListMsg";
|
import type { ResQuotationSettingListMsg } from './resQuotationSettingListMsg';
|
||||||
import type { QuotationSettingData } from "./quotationSettingData";
|
import type { QuotationSettingData } from './quotationSettingData';
|
||||||
|
|
||||||
export interface ResQuotationSettingList {
|
export interface ResQuotationSettingList {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,6 +4,6 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { QuotationSettingData } from "./quotationSettingData";
|
import type { QuotationSettingData } from './quotationSettingData';
|
||||||
|
|
||||||
export type ResQuotationSettingSetting = QuotationSettingData | null;
|
export type ResQuotationSettingSetting = QuotationSettingData | null;
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResQuotationStatusMsg } from "./resQuotationStatusMsg";
|
import type { ResQuotationStatusMsg } from './resQuotationStatusMsg';
|
||||||
import type { ResQuotationStatusQtId } from "./resQuotationStatusQtId";
|
import type { ResQuotationStatusQtId } from './resQuotationStatusQtId';
|
||||||
|
|
||||||
export interface ResQuotationStatus {
|
export interface ResQuotationStatus {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResRefreshTokenMsg } from "./resRefreshTokenMsg";
|
import type { ResRefreshTokenMsg } from './resRefreshTokenMsg';
|
||||||
|
|
||||||
export interface ResRefreshToken {
|
export interface ResRefreshToken {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,10 +4,10 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResSessionChatMsg } from "./resSessionChatMsg";
|
import type { ResSessionChatMsg } from './resSessionChatMsg';
|
||||||
import type { ResSessionChatSessionId } from "./resSessionChatSessionId";
|
import type { ResSessionChatSessionId } from './resSessionChatSessionId';
|
||||||
import type { ChatMessageData } from "./chatMessageData";
|
import type { ChatMessageData } from './chatMessageData';
|
||||||
|
|
||||||
export interface ResSessionChat {
|
export interface ResSessionChat {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResSupplierMsg } from "./resSupplierMsg";
|
import type { ResSupplierMsg } from './resSupplierMsg';
|
||||||
import type { ResSupplierSupplier } from "./resSupplierSupplier";
|
import type { ResSupplierSupplier } from './resSupplierSupplier';
|
||||||
|
|
||||||
export interface ResSupplier {
|
export interface ResSupplier {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
|
|||||||
@ -4,15 +4,15 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ErrorInfo } from "./errorInfo";
|
import type { ErrorInfo } from './errorInfo';
|
||||||
import type { ResSupplierListMsg } from "./resSupplierListMsg";
|
import type { ResSupplierListMsg } from './resSupplierListMsg';
|
||||||
import type { SupplierData } from "./supplierData";
|
import type { SupplierData } from './supplierData';
|
||||||
|
|
||||||
export interface ResSupplierList {
|
export interface ResSupplierList {
|
||||||
result?: ErrorInfo;
|
result?: ErrorInfo;
|
||||||
msg?: ResSupplierListMsg;
|
msg?: ResSupplierListMsg;
|
||||||
suppliers?: SupplierData[];
|
|
||||||
total?: number;
|
total?: number;
|
||||||
page?: number;
|
page?: number;
|
||||||
size?: number;
|
size?: number;
|
||||||
|
suppliers?: SupplierData[];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,6 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { SupplierData } from "./supplierData";
|
import type { SupplierData } from './supplierData';
|
||||||
|
|
||||||
export type ResSupplierSupplier = SupplierData | null;
|
export type ResSupplierSupplier = SupplierData | null;
|
||||||
|
|||||||
@ -4,11 +4,11 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { SessionDataBidPrice } from "./sessionDataBidPrice";
|
import type { SessionDataBidPrice } from './sessionDataBidPrice';
|
||||||
import type { SessionDataBidAt } from "./sessionDataBidAt";
|
import type { SessionDataBidAt } from './sessionDataBidAt';
|
||||||
import type { SessionDataRejectReason } from "./sessionDataRejectReason";
|
import type { SessionDataRejectReason } from './sessionDataRejectReason';
|
||||||
import type { SessionDataRejectPrice } from "./sessionDataRejectPrice";
|
import type { SessionDataRejectPrice } from './sessionDataRejectPrice';
|
||||||
import type { SessionDataRejectDeliveryType } from "./sessionDataRejectDeliveryType";
|
import type { SessionDataRejectDeliveryType } from './sessionDataRejectDeliveryType';
|
||||||
|
|
||||||
export interface SessionData {
|
export interface SessionData {
|
||||||
session_id: string;
|
session_id: string;
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { SupplierDataCode } from "./supplierDataCode";
|
import type { SupplierDataCode } from './supplierDataCode';
|
||||||
import type { SupplierDataManagerName } from "./supplierDataManagerName";
|
import type { SupplierDataManagerName } from './supplierDataManagerName';
|
||||||
import type { SupplierDataManagerEmail } from "./supplierDataManagerEmail";
|
import type { SupplierDataManagerEmail } from './supplierDataManagerEmail';
|
||||||
import type { SupplierDataManagerContactNumber } from "./supplierDataManagerContactNumber";
|
import type { SupplierDataManagerContactNumber } from './supplierDataManagerContactNumber';
|
||||||
import type { SupplierDataPriority } from "./supplierDataPriority";
|
import type { SupplierDataPriority } from './supplierDataPriority';
|
||||||
import type { SupplierDataCreatedAt } from "./supplierDataCreatedAt";
|
import type { SupplierDataCreatedAt } from './supplierDataCreatedAt';
|
||||||
import type { SupplierDataUpdatedAt } from "./supplierDataUpdatedAt";
|
import type { SupplierDataUpdatedAt } from './supplierDataUpdatedAt';
|
||||||
|
|
||||||
export interface SupplierData {
|
export interface SupplierData {
|
||||||
supplier_id: string;
|
supplier_id: string;
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import type { ValidationErrorLocItem } from "./validationErrorLocItem";
|
import type { ValidationErrorLocItem } from './validationErrorLocItem';
|
||||||
import type { ValidationErrorCtx } from "./validationErrorCtx";
|
import type { ValidationErrorCtx } from './validationErrorCtx';
|
||||||
|
|
||||||
export interface ValidationError {
|
export interface ValidationError {
|
||||||
loc: ValidationErrorLocItem[];
|
loc: ValidationErrorLocItem[];
|
||||||
|
|||||||
@ -4,7 +4,10 @@
|
|||||||
* Negodata Api Server
|
* Negodata Api Server
|
||||||
* OpenAPI spec version: 0.1.0
|
* OpenAPI spec version: 0.1.0
|
||||||
*/
|
*/
|
||||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
import {
|
||||||
|
useMutation,
|
||||||
|
useQuery
|
||||||
|
} from '@tanstack/react-query';
|
||||||
import type {
|
import type {
|
||||||
DataTag,
|
DataTag,
|
||||||
DefinedInitialDataOptions,
|
DefinedInitialDataOptions,
|
||||||
@ -17,8 +20,8 @@ import type {
|
|||||||
UseMutationOptions,
|
UseMutationOptions,
|
||||||
UseMutationResult,
|
UseMutationResult,
|
||||||
UseQueryOptions,
|
UseQueryOptions,
|
||||||
UseQueryResult,
|
UseQueryResult
|
||||||
} from "@tanstack/react-query";
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
HTTPValidationError,
|
HTTPValidationError,
|
||||||
@ -26,383 +29,295 @@ import type {
|
|||||||
ReqUpdateQuotationSetting,
|
ReqUpdateQuotationSetting,
|
||||||
ResDeleteQuotationSetting,
|
ResDeleteQuotationSetting,
|
||||||
ResQuotationSetting,
|
ResQuotationSetting,
|
||||||
ResQuotationSettingList,
|
ResQuotationSettingList
|
||||||
} from ".././model";
|
} from '.././model';
|
||||||
|
|
||||||
|
import { customFetch } from '../../mutator/custom-fetch';
|
||||||
|
|
||||||
|
|
||||||
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||||
|
|
||||||
|
|
||||||
import { customFetch } from "../../mutator/custom-fetch";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 견적 설정 목록
|
* @summary 견적 설정 목록
|
||||||
*/
|
*/
|
||||||
export const listSettings = (signal?: AbortSignal) => {
|
export const listSettings = (
|
||||||
return customFetch<ResQuotationSettingList>({
|
|
||||||
url: `/v1/quotation-setting/list`,
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
method: "GET",
|
) => {
|
||||||
signal,
|
|
||||||
});
|
|
||||||
};
|
return customFetch<ResQuotationSettingList>(
|
||||||
|
{url: `/v1/quotation-setting/list`, method: 'GET', signal
|
||||||
|
},
|
||||||
|
options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const getListSettingsQueryKey = () => {
|
export const getListSettingsQueryKey = () => {
|
||||||
return [`/v1/quotation-setting/list`] as const;
|
return [
|
||||||
};
|
`/v1/quotation-setting/list`
|
||||||
|
] as const;
|
||||||
|
}
|
||||||
|
|
||||||
export const getListSettingsQueryOptions = <
|
|
||||||
TData = Awaited<ReturnType<typeof listSettings>>,
|
export const getListSettingsQueryOptions = <TData = Awaited<ReturnType<typeof listSettings>>, TError = void>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
TError = void,
|
) => {
|
||||||
>(options?: {
|
|
||||||
query?: Partial<
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData>
|
|
||||||
>;
|
|
||||||
}) => {
|
|
||||||
const { query: queryOptions } = options ?? {};
|
|
||||||
|
|
||||||
const queryKey = queryOptions?.queryKey ?? getListSettingsQueryKey();
|
const queryKey = queryOptions?.queryKey ?? getListSettingsQueryKey();
|
||||||
|
|
||||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listSettings>>> = ({
|
|
||||||
signal,
|
|
||||||
}) => listSettings(signal);
|
|
||||||
|
|
||||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
|
||||||
Awaited<ReturnType<typeof listSettings>>,
|
|
||||||
TError,
|
|
||||||
TData
|
|
||||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ListSettingsQueryResult = NonNullable<
|
const queryFn: QueryFunction<Awaited<ReturnType<typeof listSettings>>> = ({ signal }) => listSettings(requestOptions, signal);
|
||||||
Awaited<ReturnType<typeof listSettings>>
|
|
||||||
>;
|
|
||||||
export type ListSettingsQueryError = void;
|
|
||||||
|
|
||||||
export function useListSettings<
|
|
||||||
TData = Awaited<ReturnType<typeof listSettings>>,
|
|
||||||
TError = void,
|
|
||||||
>(
|
|
||||||
options: {
|
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
query: Partial<
|
}
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData>
|
|
||||||
> &
|
export type ListSettingsQueryResult = NonNullable<Awaited<ReturnType<typeof listSettings>>>
|
||||||
Pick<
|
export type ListSettingsQueryError = void
|
||||||
|
|
||||||
|
|
||||||
|
export function useListSettings<TData = Awaited<ReturnType<typeof listSettings>>, TError = void>(
|
||||||
|
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData>> & Pick<
|
||||||
DefinedInitialDataOptions<
|
DefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof listSettings>>,
|
Awaited<ReturnType<typeof listSettings>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof listSettings>>
|
Awaited<ReturnType<typeof listSettings>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
export function useListSettings<TData = Awaited<ReturnType<typeof listSettings>>, TError = void>(
|
||||||
): DefinedUseQueryResult<TData, TError> & {
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData>> & Pick<
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
export function useListSettings<
|
|
||||||
TData = Awaited<ReturnType<typeof listSettings>>,
|
|
||||||
TError = void,
|
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData>
|
|
||||||
> &
|
|
||||||
Pick<
|
|
||||||
UndefinedInitialDataOptions<
|
UndefinedInitialDataOptions<
|
||||||
Awaited<ReturnType<typeof listSettings>>,
|
Awaited<ReturnType<typeof listSettings>>,
|
||||||
TError,
|
TError,
|
||||||
Awaited<ReturnType<typeof listSettings>>
|
Awaited<ReturnType<typeof listSettings>>
|
||||||
>,
|
> , 'initialData'
|
||||||
"initialData"
|
>, request?: SecondParameter<typeof customFetch>}
|
||||||
>;
|
, queryClient?: QueryClient
|
||||||
},
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
queryClient?: QueryClient,
|
export function useListSettings<TData = Awaited<ReturnType<typeof listSettings>>, TError = void>(
|
||||||
): UseQueryResult<TData, TError> & {
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
, queryClient?: QueryClient
|
||||||
};
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||||
export function useListSettings<
|
|
||||||
TData = Awaited<ReturnType<typeof listSettings>>,
|
|
||||||
TError = void,
|
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* @summary 견적 설정 목록
|
* @summary 견적 설정 목록
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function useListSettings<
|
export function useListSettings<TData = Awaited<ReturnType<typeof listSettings>>, TError = void>(
|
||||||
TData = Awaited<ReturnType<typeof listSettings>>,
|
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData>>, request?: SecondParameter<typeof customFetch>}
|
||||||
TError = void,
|
, queryClient?: QueryClient
|
||||||
>(
|
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||||
options?: {
|
|
||||||
query?: Partial<
|
|
||||||
UseQueryOptions<Awaited<ReturnType<typeof listSettings>>, TError, TData>
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseQueryResult<TData, TError> & {
|
|
||||||
queryKey: DataTag<QueryKey, TData, TError>;
|
|
||||||
} {
|
|
||||||
const queryOptions = getListSettingsQueryOptions(options);
|
|
||||||
|
|
||||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
const queryOptions = getListSettingsQueryOptions(options)
|
||||||
TData,
|
|
||||||
TError
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
||||||
|
|
||||||
query.queryKey = queryOptions.queryKey ;
|
query.queryKey = queryOptions.queryKey ;
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 견적 설정 등록
|
* @summary 견적 설정 등록
|
||||||
*/
|
*/
|
||||||
export const createSetting = (
|
export const createSetting = (
|
||||||
reqCreateQuotationSetting: ReqCreateQuotationSetting,
|
reqCreateQuotationSetting: ReqCreateQuotationSetting,
|
||||||
signal?: AbortSignal,
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||||
) => {
|
) => {
|
||||||
return customFetch<ResQuotationSetting>({
|
|
||||||
url: `/v1/quotation-setting/create`,
|
|
||||||
method: "POST",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
data: reqCreateQuotationSetting,
|
|
||||||
signal,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getCreateSettingMutationOptions = <
|
|
||||||
TError = void | HTTPValidationError,
|
return customFetch<ResQuotationSetting>(
|
||||||
TContext = unknown,
|
{url: `/v1/quotation-setting/create`, method: 'POST',
|
||||||
>(options?: {
|
headers: {'Content-Type': 'application/json', },
|
||||||
mutation?: UseMutationOptions<
|
data: reqCreateQuotationSetting, signal
|
||||||
Awaited<ReturnType<typeof createSetting>>,
|
},
|
||||||
TError,
|
options);
|
||||||
{ data: ReqCreateQuotationSetting },
|
}
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
}): UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof createSetting>>,
|
export const getCreateSettingMutationOptions = <TError = void | HTTPValidationError,
|
||||||
TError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createSetting>>, TError,{data: ReqCreateQuotationSetting}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
{ data: ReqCreateQuotationSetting },
|
): UseMutationOptions<Awaited<ReturnType<typeof createSetting>>, TError,{data: ReqCreateQuotationSetting}, TContext> => {
|
||||||
TContext
|
|
||||||
> => {
|
const mutationKey = ['createSetting'];
|
||||||
const mutationKey = ["createSetting"];
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||||
const { mutation: mutationOptions } = options
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||||
? options.mutation &&
|
options
|
||||||
"mutationKey" in options.mutation &&
|
|
||||||
options.mutation.mutationKey
|
|
||||||
? options
|
|
||||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||||
: { mutation: { mutationKey } };
|
: {mutation: { mutationKey, }, request: undefined};
|
||||||
|
|
||||||
const mutationFn: MutationFunction<
|
|
||||||
Awaited<ReturnType<typeof createSetting>>,
|
|
||||||
{ data: ReqCreateQuotationSetting }
|
|
||||||
> = (props) => {
|
const mutationFn: MutationFunction<Awaited<ReturnType<typeof createSetting>>, {data: ReqCreateQuotationSetting}> = (props) => {
|
||||||
const {data} = props ?? {};
|
const {data} = props ?? {};
|
||||||
|
|
||||||
return createSetting(data);
|
return createSetting(data,requestOptions)
|
||||||
};
|
}
|
||||||
|
|
||||||
return { mutationFn, ...mutationOptions };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type CreateSettingMutationResult = NonNullable<
|
|
||||||
Awaited<ReturnType<typeof createSetting>>
|
|
||||||
>;
|
return { mutationFn, ...mutationOptions }}
|
||||||
export type CreateSettingMutationBody = ReqCreateQuotationSetting;
|
|
||||||
export type CreateSettingMutationError = void | HTTPValidationError;
|
export type CreateSettingMutationResult = NonNullable<Awaited<ReturnType<typeof createSetting>>>
|
||||||
|
export type CreateSettingMutationBody = ReqCreateQuotationSetting
|
||||||
|
export type CreateSettingMutationError = void | HTTPValidationError
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 견적 설정 등록
|
* @summary 견적 설정 등록
|
||||||
*/
|
*/
|
||||||
export const useCreateSetting = <
|
export const useCreateSetting = <TError = void | HTTPValidationError,
|
||||||
TError = void | HTTPValidationError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createSetting>>, TError,{data: ReqCreateQuotationSetting}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
TContext = unknown,
|
, queryClient?: QueryClient): UseMutationResult<
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
mutation?: UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof createSetting>>,
|
|
||||||
TError,
|
|
||||||
{ data: ReqCreateQuotationSetting },
|
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseMutationResult<
|
|
||||||
Awaited<ReturnType<typeof createSetting>>,
|
Awaited<ReturnType<typeof createSetting>>,
|
||||||
TError,
|
TError,
|
||||||
{data: ReqCreateQuotationSetting},
|
{data: ReqCreateQuotationSetting},
|
||||||
TContext
|
TContext
|
||||||
> => {
|
> => {
|
||||||
|
|
||||||
const mutationOptions = getCreateSettingMutationOptions(options);
|
const mutationOptions = getCreateSettingMutationOptions(options);
|
||||||
|
|
||||||
return useMutation(mutationOptions, queryClient);
|
return useMutation(mutationOptions, queryClient);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* @summary 견적 설정 수정
|
* @summary 견적 설정 수정
|
||||||
*/
|
*/
|
||||||
export const updateSetting = (
|
export const updateSetting = (
|
||||||
qtSettingId: string,
|
qtSettingId: string,
|
||||||
reqUpdateQuotationSetting: ReqUpdateQuotationSetting,
|
reqUpdateQuotationSetting: ReqUpdateQuotationSetting,
|
||||||
) => {
|
options?: SecondParameter<typeof customFetch>,) => {
|
||||||
return customFetch<ResQuotationSetting>({
|
|
||||||
url: `/v1/quotation-setting/update/${qtSettingId}`,
|
|
||||||
method: "PATCH",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
data: reqUpdateQuotationSetting,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getUpdateSettingMutationOptions = <
|
|
||||||
TError = void | HTTPValidationError,
|
return customFetch<ResQuotationSetting>(
|
||||||
TContext = unknown,
|
{url: `/v1/quotation-setting/update/${qtSettingId}`, method: 'PATCH',
|
||||||
>(options?: {
|
headers: {'Content-Type': 'application/json', },
|
||||||
mutation?: UseMutationOptions<
|
data: reqUpdateQuotationSetting
|
||||||
Awaited<ReturnType<typeof updateSetting>>,
|
},
|
||||||
TError,
|
options);
|
||||||
{ qtSettingId: string; data: ReqUpdateQuotationSetting },
|
}
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
}): UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof updateSetting>>,
|
export const getUpdateSettingMutationOptions = <TError = void | HTTPValidationError,
|
||||||
TError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateSetting>>, TError,{qtSettingId: string;data: ReqUpdateQuotationSetting}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
{ qtSettingId: string; data: ReqUpdateQuotationSetting },
|
): UseMutationOptions<Awaited<ReturnType<typeof updateSetting>>, TError,{qtSettingId: string;data: ReqUpdateQuotationSetting}, TContext> => {
|
||||||
TContext
|
|
||||||
> => {
|
const mutationKey = ['updateSetting'];
|
||||||
const mutationKey = ["updateSetting"];
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||||
const { mutation: mutationOptions } = options
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||||
? options.mutation &&
|
options
|
||||||
"mutationKey" in options.mutation &&
|
|
||||||
options.mutation.mutationKey
|
|
||||||
? options
|
|
||||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||||
: { mutation: { mutationKey } };
|
: {mutation: { mutationKey, }, request: undefined};
|
||||||
|
|
||||||
const mutationFn: MutationFunction<
|
|
||||||
Awaited<ReturnType<typeof updateSetting>>,
|
|
||||||
{ qtSettingId: string; data: ReqUpdateQuotationSetting }
|
|
||||||
> = (props) => {
|
const mutationFn: MutationFunction<Awaited<ReturnType<typeof updateSetting>>, {qtSettingId: string;data: ReqUpdateQuotationSetting}> = (props) => {
|
||||||
const {qtSettingId,data} = props ?? {};
|
const {qtSettingId,data} = props ?? {};
|
||||||
|
|
||||||
return updateSetting(qtSettingId, data);
|
return updateSetting(qtSettingId,data,requestOptions)
|
||||||
};
|
}
|
||||||
|
|
||||||
return { mutationFn, ...mutationOptions };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type UpdateSettingMutationResult = NonNullable<
|
|
||||||
Awaited<ReturnType<typeof updateSetting>>
|
|
||||||
>;
|
return { mutationFn, ...mutationOptions }}
|
||||||
export type UpdateSettingMutationBody = ReqUpdateQuotationSetting;
|
|
||||||
export type UpdateSettingMutationError = void | HTTPValidationError;
|
export type UpdateSettingMutationResult = NonNullable<Awaited<ReturnType<typeof updateSetting>>>
|
||||||
|
export type UpdateSettingMutationBody = ReqUpdateQuotationSetting
|
||||||
|
export type UpdateSettingMutationError = void | HTTPValidationError
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 견적 설정 수정
|
* @summary 견적 설정 수정
|
||||||
*/
|
*/
|
||||||
export const useUpdateSetting = <
|
export const useUpdateSetting = <TError = void | HTTPValidationError,
|
||||||
TError = void | HTTPValidationError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateSetting>>, TError,{qtSettingId: string;data: ReqUpdateQuotationSetting}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
TContext = unknown,
|
, queryClient?: QueryClient): UseMutationResult<
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
mutation?: UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof updateSetting>>,
|
|
||||||
TError,
|
|
||||||
{ qtSettingId: string; data: ReqUpdateQuotationSetting },
|
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseMutationResult<
|
|
||||||
Awaited<ReturnType<typeof updateSetting>>,
|
Awaited<ReturnType<typeof updateSetting>>,
|
||||||
TError,
|
TError,
|
||||||
{qtSettingId: string;data: ReqUpdateQuotationSetting},
|
{qtSettingId: string;data: ReqUpdateQuotationSetting},
|
||||||
TContext
|
TContext
|
||||||
> => {
|
> => {
|
||||||
|
|
||||||
const mutationOptions = getUpdateSettingMutationOptions(options);
|
const mutationOptions = getUpdateSettingMutationOptions(options);
|
||||||
|
|
||||||
return useMutation(mutationOptions, queryClient);
|
return useMutation(mutationOptions, queryClient);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* @summary 견적 설정 삭제
|
* @summary 견적 설정 삭제
|
||||||
*/
|
*/
|
||||||
export const deleteSetting = (qtSettingId: string) => {
|
export const deleteSetting = (
|
||||||
return customFetch<ResDeleteQuotationSetting>({
|
qtSettingId: string,
|
||||||
url: `/v1/quotation-setting/delete/${qtSettingId}`,
|
options?: SecondParameter<typeof customFetch>,) => {
|
||||||
method: "DELETE",
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getDeleteSettingMutationOptions = <
|
|
||||||
TError = void | HTTPValidationError,
|
return customFetch<ResDeleteQuotationSetting>(
|
||||||
TContext = unknown,
|
{url: `/v1/quotation-setting/delete/${qtSettingId}`, method: 'DELETE'
|
||||||
>(options?: {
|
},
|
||||||
mutation?: UseMutationOptions<
|
options);
|
||||||
Awaited<ReturnType<typeof deleteSetting>>,
|
}
|
||||||
TError,
|
|
||||||
{ qtSettingId: string },
|
|
||||||
TContext
|
|
||||||
>;
|
export const getDeleteSettingMutationOptions = <TError = void | HTTPValidationError,
|
||||||
}): UseMutationOptions<
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteSetting>>, TError,{qtSettingId: string}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
Awaited<ReturnType<typeof deleteSetting>>,
|
): UseMutationOptions<Awaited<ReturnType<typeof deleteSetting>>, TError,{qtSettingId: string}, TContext> => {
|
||||||
TError,
|
|
||||||
{ qtSettingId: string },
|
const mutationKey = ['deleteSetting'];
|
||||||
TContext
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
||||||
> => {
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
||||||
const mutationKey = ["deleteSetting"];
|
options
|
||||||
const { mutation: mutationOptions } = options
|
|
||||||
? options.mutation &&
|
|
||||||
"mutationKey" in options.mutation &&
|
|
||||||
options.mutation.mutationKey
|
|
||||||
? options
|
|
||||||
: {...options, mutation: {...options.mutation, mutationKey}}
|
: {...options, mutation: {...options.mutation, mutationKey}}
|
||||||
: { mutation: { mutationKey } };
|
: {mutation: { mutationKey, }, request: undefined};
|
||||||
|
|
||||||
const mutationFn: MutationFunction<
|
|
||||||
Awaited<ReturnType<typeof deleteSetting>>,
|
|
||||||
{ qtSettingId: string }
|
|
||||||
> = (props) => {
|
const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteSetting>>, {qtSettingId: string}> = (props) => {
|
||||||
const {qtSettingId} = props ?? {};
|
const {qtSettingId} = props ?? {};
|
||||||
|
|
||||||
return deleteSetting(qtSettingId);
|
return deleteSetting(qtSettingId,requestOptions)
|
||||||
};
|
}
|
||||||
|
|
||||||
return { mutationFn, ...mutationOptions };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type DeleteSettingMutationResult = NonNullable<
|
|
||||||
Awaited<ReturnType<typeof deleteSetting>>
|
|
||||||
>;
|
|
||||||
|
|
||||||
export type DeleteSettingMutationError = void | HTTPValidationError;
|
|
||||||
|
return { mutationFn, ...mutationOptions }}
|
||||||
|
|
||||||
|
export type DeleteSettingMutationResult = NonNullable<Awaited<ReturnType<typeof deleteSetting>>>
|
||||||
|
|
||||||
|
export type DeleteSettingMutationError = void | HTTPValidationError
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary 견적 설정 삭제
|
* @summary 견적 설정 삭제
|
||||||
*/
|
*/
|
||||||
export const useDeleteSetting = <
|
export const useDeleteSetting = <TError = void | HTTPValidationError,
|
||||||
TError = void | HTTPValidationError,
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteSetting>>, TError,{qtSettingId: string}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||||
TContext = unknown,
|
, queryClient?: QueryClient): UseMutationResult<
|
||||||
>(
|
|
||||||
options?: {
|
|
||||||
mutation?: UseMutationOptions<
|
|
||||||
Awaited<ReturnType<typeof deleteSetting>>,
|
|
||||||
TError,
|
|
||||||
{ qtSettingId: string },
|
|
||||||
TContext
|
|
||||||
>;
|
|
||||||
},
|
|
||||||
queryClient?: QueryClient,
|
|
||||||
): UseMutationResult<
|
|
||||||
Awaited<ReturnType<typeof deleteSetting>>,
|
Awaited<ReturnType<typeof deleteSetting>>,
|
||||||
TError,
|
TError,
|
||||||
{qtSettingId: string},
|
{qtSettingId: string},
|
||||||
TContext
|
TContext
|
||||||
> => {
|
> => {
|
||||||
|
|
||||||
const mutationOptions = getDeleteSettingMutationOptions(options);
|
const mutationOptions = getDeleteSettingMutationOptions(options);
|
||||||
|
|
||||||
return useMutation(mutationOptions, queryClient);
|
return useMutation(mutationOptions, queryClient);
|
||||||
};
|
}
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -94,13 +94,19 @@ export const customFetch = async <T>(
|
|||||||
(url.startsWith('http') ? url : `${BASE_URL}${url}`) +
|
(url.startsWith('http') ? url : `${BASE_URL}${url}`) +
|
||||||
(queryString ? `?${queryString}` : '');
|
(queryString ? `?${queryString}` : '');
|
||||||
|
|
||||||
|
// 파일 업로드(FormData)는 ① 브라우저가 boundary 포함 Content-Type 을 직접 설정해야 하고
|
||||||
|
// ② 본문을 JSON.stringify 하면 "{}" 가 되어 파일이 통째로 누락된다. 분기 처리.
|
||||||
|
const isFormData = typeof FormData !== 'undefined' && data instanceof FormData;
|
||||||
|
|
||||||
// [요청 인터셉터] 토큰을 받아 헤더를 구성하고 한 번 호출(만료 재시도 시 새 토큰으로 재구성).
|
// [요청 인터셉터] 토큰을 받아 헤더를 구성하고 한 번 호출(만료 재시도 시 새 토큰으로 재구성).
|
||||||
const doFetch = (token: string | null) => {
|
const doFetch = (token: string | null) => {
|
||||||
const headers = new Headers(config.headers);
|
const headers = new Headers(config.headers);
|
||||||
if (options?.headers) {
|
if (options?.headers) {
|
||||||
new Headers(options.headers).forEach((v, k) => headers.set(k, v));
|
new Headers(options.headers).forEach((v, k) => headers.set(k, v));
|
||||||
}
|
}
|
||||||
if (data != null && !headers.has('Content-Type')) {
|
if (isFormData) {
|
||||||
|
headers.delete('Content-Type'); // 생성 클라이언트가 박은 boundary 없는 multipart 헤더 제거 → 브라우저가 재설정
|
||||||
|
} else if (data != null && !headers.has('Content-Type')) {
|
||||||
headers.set('Content-Type', 'application/json');
|
headers.set('Content-Type', 'application/json');
|
||||||
}
|
}
|
||||||
if (token) headers.set('Authorization', `Bearer ${token}`);
|
if (token) headers.set('Authorization', `Bearer ${token}`);
|
||||||
@ -108,7 +114,7 @@ export const customFetch = async <T>(
|
|||||||
...options,
|
...options,
|
||||||
method,
|
method,
|
||||||
headers,
|
headers,
|
||||||
body: data != null ? JSON.stringify(data) : options?.body,
|
body: data != null ? (isFormData ? data : JSON.stringify(data)) : options?.body,
|
||||||
signal,
|
signal,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import {QueryClient, QueryClientProvider} from '@tanstack/react-query';
|
import {QueryClient, QueryClientProvider} from '@tanstack/react-query';
|
||||||
import {useState, type ReactNode} from 'react';
|
import {useState, type ReactNode} from 'react';
|
||||||
import {Toaster} from 'sonner';
|
import {Toaster} from 'sonner';
|
||||||
|
import {ConfirmHost} from '@/lib/confirm';
|
||||||
|
|
||||||
export function Providers({children}: {children: ReactNode}) {
|
export function Providers({children}: {children: ReactNode}) {
|
||||||
const [queryClient] = useState(
|
const [queryClient] = useState(
|
||||||
@ -19,6 +20,7 @@ export function Providers({children}: {children: ReactNode}) {
|
|||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
{children}
|
{children}
|
||||||
<Toaster richColors position="top-center" />
|
<Toaster richColors position="top-center" />
|
||||||
|
<ConfirmHost />
|
||||||
</QueryClientProvider>
|
</QueryClientProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,41 +1,63 @@
|
|||||||
import React, { useState, useRef, DragEvent, ChangeEvent } from 'react';
|
import React, { useState, useRef, DragEvent, ChangeEvent } from 'react';
|
||||||
import { Upload, Image as ImageIcon, X, AlertCircle } from 'lucide-react';
|
import { Upload, Image as ImageIcon, X, AlertCircle, Link2, Loader2 } from 'lucide-react';
|
||||||
|
|
||||||
interface ImageDropzoneProps {
|
interface ImageDropzoneProps {
|
||||||
value: string;
|
value: string;
|
||||||
onChange: (base64Url: string) => void;
|
onChange: (url: string) => void;
|
||||||
onClear: () => void;
|
onClear: () => void;
|
||||||
|
/**
|
||||||
|
* 파일을 받아 업로드하고 저장 URL 을 돌려준다(예: Azure Blob).
|
||||||
|
* 주어지면 드롭/선택한 파일을 업로드해 그 URL 을 value 로 쓴다.
|
||||||
|
* 없으면 과거처럼 base64 data URL 로 폴백한다(재사용 컴포넌트 호환).
|
||||||
|
*/
|
||||||
|
onUpload?: (file: File) => Promise<string>;
|
||||||
label?: string;
|
label?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const MAX_SIZE = 4 * 1024 * 1024; // 백엔드 max_image_mb=4 와 일치
|
||||||
|
|
||||||
export default function ImageDropzone({
|
export default function ImageDropzone({
|
||||||
value,
|
value,
|
||||||
onChange,
|
onChange,
|
||||||
onClear,
|
onClear,
|
||||||
|
onUpload,
|
||||||
label = '상품 대표 이미지 업로드',
|
label = '상품 대표 이미지 업로드',
|
||||||
className = ''
|
className = ''
|
||||||
}: ImageDropzoneProps) {
|
}: ImageDropzoneProps) {
|
||||||
const [isDragActive, setIsDragActive] = useState(false);
|
const [isDragActive, setIsDragActive] = useState(false);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
|
const [uploading, setUploading] = useState(false);
|
||||||
|
const [urlDraft, setUrlDraft] = useState('');
|
||||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||||
|
|
||||||
const processFile = (file: File) => {
|
const processFile = async (file: File) => {
|
||||||
setError(null);
|
setError(null);
|
||||||
|
|
||||||
// Validate file type
|
|
||||||
if (!file.type.startsWith('image/')) {
|
if (!file.type.startsWith('image/')) {
|
||||||
setError('이미지 파일(*.png, *.jpg, *.jpeg, *.gif)만 업로드할 수 있습니다.');
|
setError('이미지 파일(*.png, *.jpg, *.jpeg, *.gif, *.webp)만 업로드할 수 있습니다.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (file.size > MAX_SIZE) {
|
||||||
// Validate size (e.g., max 4MB for high-fidelity base64 storage)
|
|
||||||
const maxSize = 4 * 1024 * 1024;
|
|
||||||
if (file.size > maxSize) {
|
|
||||||
setError('이미지 최댓값은 4MB입니다. 더 작고 최적화된 이미지를 권장합니다.');
|
setError('이미지 최댓값은 4MB입니다. 더 작고 최적화된 이미지를 권장합니다.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 업로드 핸들러가 있으면 서버(blob)로 올리고 URL 을 받는다.
|
||||||
|
if (onUpload) {
|
||||||
|
setUploading(true);
|
||||||
|
try {
|
||||||
|
const url = await onUpload(file);
|
||||||
|
onChange(url);
|
||||||
|
} catch (err) {
|
||||||
|
setError(err instanceof Error ? err.message : '이미지 업로드에 실패했습니다.');
|
||||||
|
} finally {
|
||||||
|
setUploading(false);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 폴백: base64 data URL.
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.onload = (e) => {
|
reader.onload = (e) => {
|
||||||
if (e.target?.result && typeof e.target.result === 'string') {
|
if (e.target?.result && typeof e.target.result === 'string') {
|
||||||
@ -44,16 +66,14 @@ export default function ImageDropzone({
|
|||||||
setError('이미지 해독 과정에 이상이 발생했습니다.');
|
setError('이미지 해독 과정에 이상이 발생했습니다.');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
reader.onerror = () => {
|
reader.onerror = () => setError('파일을 수집하지 못했습니다.');
|
||||||
setError('파일을 수집하지 못했습니다.');
|
|
||||||
};
|
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDragOver = (e: DragEvent<HTMLDivElement>) => {
|
const handleDragOver = (e: DragEvent<HTMLDivElement>) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
setIsDragActive(true);
|
if (!uploading) setIsDragActive(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDragLeave = (e: DragEvent<HTMLDivElement>) => {
|
const handleDragLeave = (e: DragEvent<HTMLDivElement>) => {
|
||||||
@ -66,20 +86,29 @@ export default function ImageDropzone({
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
setIsDragActive(false);
|
setIsDragActive(false);
|
||||||
|
if (uploading) return;
|
||||||
if (e.dataTransfer.files && e.dataTransfer.files[0]) {
|
if (e.dataTransfer.files && e.dataTransfer.files[0]) {
|
||||||
processFile(e.dataTransfer.files[0]);
|
void processFile(e.dataTransfer.files[0]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFileChange = (e: ChangeEvent<HTMLInputElement>) => {
|
const handleFileChange = (e: ChangeEvent<HTMLInputElement>) => {
|
||||||
if (e.target.files && e.target.files[0]) {
|
if (e.target.files && e.target.files[0]) {
|
||||||
processFile(e.target.files[0]);
|
void processFile(e.target.files[0]);
|
||||||
}
|
}
|
||||||
|
e.target.value = ''; // 같은 파일 재선택 허용
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleButtonClick = () => {
|
const handleButtonClick = () => {
|
||||||
fileInputRef.current?.click();
|
if (!uploading) fileInputRef.current?.click();
|
||||||
|
};
|
||||||
|
|
||||||
|
const applyUrl = () => {
|
||||||
|
const url = urlDraft.trim();
|
||||||
|
if (!url) return;
|
||||||
|
setError(null);
|
||||||
|
onChange(url);
|
||||||
|
setUrlDraft('');
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -90,7 +119,7 @@ export default function ImageDropzone({
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
{value ? (
|
{value ? (
|
||||||
// Preview Mode with image loaded
|
// 미리보기 (blob URL / 외부 URL / base64 모두 동일하게 표시)
|
||||||
<div className="relative group border border-border rounded-lg overflow-hidden bg-background h-44 flex items-center justify-center">
|
<div className="relative group border border-border rounded-lg overflow-hidden bg-background h-44 flex items-center justify-center">
|
||||||
<img
|
<img
|
||||||
src={value}
|
src={value}
|
||||||
@ -98,7 +127,6 @@ export default function ImageDropzone({
|
|||||||
referrerPolicy="no-referrer"
|
referrerPolicy="no-referrer"
|
||||||
className="h-full w-full object-contain"
|
className="h-full w-full object-contain"
|
||||||
/>
|
/>
|
||||||
{/* Hover overlay control */}
|
|
||||||
<div className="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex flex-col items-center justify-center gap-2">
|
<div className="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex flex-col items-center justify-center gap-2">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@ -118,13 +146,15 @@ export default function ImageDropzone({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
// Active Dropzone Area
|
// 드롭존
|
||||||
<div
|
<div
|
||||||
onDragOver={handleDragOver}
|
onDragOver={handleDragOver}
|
||||||
onDragLeave={handleDragLeave}
|
onDragLeave={handleDragLeave}
|
||||||
onDrop={handleDrop}
|
onDrop={handleDrop}
|
||||||
onClick={handleButtonClick}
|
onClick={handleButtonClick}
|
||||||
className={`border-2 border-dashed rounded-lg p-6 flex flex-col items-center justify-center text-center cursor-pointer min-h-44 transition-all ${
|
className={`relative border-2 border-dashed rounded-lg p-6 flex flex-col items-center justify-center text-center min-h-44 transition-all ${
|
||||||
|
uploading ? 'cursor-wait' : 'cursor-pointer'
|
||||||
|
} ${
|
||||||
isDragActive
|
isDragActive
|
||||||
? 'border-primary bg-primary/5'
|
? 'border-primary bg-primary/5'
|
||||||
: 'border-border hover:border-foreground/30 bg-muted/20'
|
: 'border-border hover:border-foreground/30 bg-muted/20'
|
||||||
@ -136,8 +166,16 @@ export default function ImageDropzone({
|
|||||||
onChange={handleFileChange}
|
onChange={handleFileChange}
|
||||||
accept="image/*"
|
accept="image/*"
|
||||||
className="hidden"
|
className="hidden"
|
||||||
|
disabled={uploading}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{uploading ? (
|
||||||
|
<div className="flex flex-col items-center gap-2 text-muted-foreground">
|
||||||
|
<Loader2 size={22} className="animate-spin text-primary" />
|
||||||
|
<p className="font-semibold text-foreground text-xs">업로드 중…</p>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
<div className="p-2.5 bg-background border border-border rounded-full shadow-xs mb-3 text-muted-foreground">
|
<div className="p-2.5 bg-background border border-border rounded-full shadow-xs mb-3 text-muted-foreground">
|
||||||
{isDragActive ? (
|
{isDragActive ? (
|
||||||
<Upload size={22} className="animate-bounce text-primary" />
|
<Upload size={22} className="animate-bounce text-primary" />
|
||||||
@ -145,18 +183,47 @@ export default function ImageDropzone({
|
|||||||
<ImageIcon size={22} />
|
<ImageIcon size={22} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<p className="font-semibold text-foreground text-xs">
|
<p className="font-semibold text-foreground text-xs">
|
||||||
{isDragActive ? '여기에 드롭하여 업로드' : '이지지 드래그 앤 드롭 또는 파일 탐색'}
|
{isDragActive ? '여기에 드롭하여 업로드' : '이미지 드래그 앤 드롭 또는 파일 탐색'}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-[10px] text-muted-foreground max-w-[280px] leading-relaxed">
|
<p className="text-[10px] text-muted-foreground max-w-[280px] leading-relaxed">
|
||||||
PNG, JPG, JPEG, GIF 파일 지원 (최대 4MB)
|
PNG, JPG, JPEG, GIF, WEBP 파일 지원 (최대 4MB)
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* 이미지 URL 직접 입력 */}
|
||||||
|
<div className="flex items-center gap-1.5 pt-1">
|
||||||
|
<div className="relative flex-1">
|
||||||
|
<Link2 size={12} className="absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground" />
|
||||||
|
<input
|
||||||
|
type="url"
|
||||||
|
value={urlDraft}
|
||||||
|
onChange={(e) => setUrlDraft(e.target.value)}
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
e.preventDefault();
|
||||||
|
applyUrl();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
placeholder="또는 이미지 URL 붙여넣기 (https://…)"
|
||||||
|
className="w-full pl-6 pr-2 py-1.5 text-[11px] rounded border border-border bg-background text-foreground placeholder:text-muted-foreground/70 focus:outline-none focus:border-primary"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={applyUrl}
|
||||||
|
disabled={!urlDraft.trim()}
|
||||||
|
className="px-2.5 py-1.5 text-[11px] font-bold rounded bg-primary text-primary-foreground hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer shrink-0"
|
||||||
|
>
|
||||||
|
적용
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
{error && (
|
{error && (
|
||||||
<div className="flex items-center gap-1.5 text-[10px] text-destructive mt-1">
|
<div className="flex items-center gap-1.5 text-[10px] text-destructive mt-1">
|
||||||
<AlertCircle size={12} />
|
<AlertCircle size={12} />
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user