[feat] negodata/front: 프론트 초기 구축 (Vite+React, orval API 클라이언트, 견적/상품/협력사 페이지)
- 라우팅 react-router v7, 서버상태 TanStack Query - orval 자동 생성 API 클라이언트(src/api/generated) - 견적/상품/협력사/견적설정 페이지, shadcn UI, 토큰(tokens.css) - 실행: 루트 docker compose (front :3001), README 그에 맞게 정리 - AI Studio 스캐폴드 잔재 제거(metadata.json, 중복 DESIGN_TOKENS.md), 타이틀 NegoData, vite.config 죽은코드 제거 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a6731dcb07
commit
87524bf6e8
6
negodata/front/.dockerignore
Normal file
6
negodata/front/.dockerignore
Normal file
@ -0,0 +1,6 @@
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
.git/
|
||||
.DS_Store
|
||||
*.log
|
||||
1
negodata/front/.env.example
Normal file
1
negodata/front/.env.example
Normal file
@ -0,0 +1 @@
|
||||
VITE_API_BASE_URL=http://localhost:9400
|
||||
8
negodata/front/.gitignore
vendored
Normal file
8
negodata/front/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
node_modules/
|
||||
build/
|
||||
dist/
|
||||
coverage/
|
||||
.DS_Store
|
||||
*.log
|
||||
.env*
|
||||
!.env.example
|
||||
14
negodata/front/Dockerfile
Normal file
14
negodata/front/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 의존성 먼저 설치 (레이어 캐시)
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
# vite dev — --host 0.0.0.0 로 컨테이너 외부 노출 (package.json scripts.dev)
|
||||
CMD ["npm", "run", "dev"]
|
||||
@ -1 +1,111 @@
|
||||
마지막 내 도리는 하자 .
|
||||
# negodata 프론트엔드
|
||||
|
||||
negosium/negodata 협상 플랫폼의 웹 프론트엔드.
|
||||
|
||||
## 스택
|
||||
|
||||
- **빌드 / 런타임**: Vite 6 + React 19 + TypeScript
|
||||
- **라우팅**: react-router v7 (`createBrowserRouter`)
|
||||
- **서버 상태**: TanStack Query (React Query)
|
||||
- **UI**: Tailwind CSS v4 + shadcn/ui, lucide-react, sonner
|
||||
- **폼 / 검증**: react-hook-form + zod
|
||||
- **전역 상태**: zustand
|
||||
- **API 클라이언트**: orval (백엔드 OpenAPI → 타입·React Query 훅 자동생성)
|
||||
|
||||
## 실행
|
||||
|
||||
이 프론트는 단독으로 띄우지 않는다. **최상위 `negosium` 폴더(저장소 루트)의 docker compose** 로 DB·백엔드와 함께 기동한다.
|
||||
|
||||
```bash
|
||||
# 저장소 루트(o2o-negosium)에서 — 전체 스택(DB + 백엔드 2개 + 프론트)
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
- 프론트: **http://localhost:3001** (compose 가 컨테이너 `:3000` → 호스트 `:3001` 로 매핑)
|
||||
- 소스를 바인드마운트하므로 코드 수정은 HMR 로 자동 반영된다.
|
||||
|
||||
### 프론트만 단독 개발 (선택)
|
||||
|
||||
도커 없이 이 폴더만 띄울 때:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
cp .env.example .env # 환경변수 (아래 표)
|
||||
npm run dev # http://localhost:3000
|
||||
```
|
||||
|
||||
## 환경변수 (.env)
|
||||
|
||||
`.env.example` 을 복사해서 만든다. 실제 `.env` 는 git 에 안 올라간다(`.gitignore`).
|
||||
|
||||
| 변수 | 기본값 | 설명 |
|
||||
| --- | --- | --- |
|
||||
| `VITE_API_BASE_URL` | `http://localhost:9400` | 백엔드 API 주소. 빌드 시 정적으로 구워진다(운영 빌드는 build arg 로도 전달). |
|
||||
|
||||
> `ORVAL_INPUT` 은 `.env` 가 아니라 orval 실행 시 쓰는 셸 환경변수다 (아래 참고).
|
||||
|
||||
## 스크립트
|
||||
|
||||
| 명령 | 설명 |
|
||||
| --- | --- |
|
||||
| `npm run dev` | 개발 서버 (vite, :3000) |
|
||||
| `npm run build` | 프로덕션 빌드 |
|
||||
| `npm run preview` | 빌드 결과 미리보기 |
|
||||
| `npm run lint` | 타입 체크 (`tsc --noEmit`) |
|
||||
| `npm run orval` | 백엔드 OpenAPI 로 API 클라이언트 재생성 (아래) |
|
||||
|
||||
## API 클라이언트 생성 (orval)
|
||||
|
||||
백엔드 FastAPI 의 OpenAPI 스펙을 읽어 `src/api/generated` 에 React Query 훅 + 타입을 생성한다. 설정은 [orval.config.ts](orval.config.ts).
|
||||
|
||||
```bash
|
||||
# 기본: 백엔드를 :9400 으로 띄운 뒤 라이브 스펙에서 생성
|
||||
npm run orval
|
||||
|
||||
# 백엔드 없이: 저장된 openapi.json 파일을 가리켜 생성
|
||||
ORVAL_INPUT=../backend/openapi.json npm run orval
|
||||
```
|
||||
|
||||
- 입력: `http://localhost:9400/openapi.json` (또는 `ORVAL_INPUT` 으로 지정한 파일)
|
||||
- 출력: `src/api/generated/**` (tags-split, 모델은 `generated/model`)
|
||||
- 산출물은 **자동생성물 — 직접 수정 금지.** 백엔드 API 가 바뀌면 다시 실행한다.
|
||||
- 모든 생성 호출은 공통 mutator [src/api/mutator/custom-fetch.ts](src/api/mutator/custom-fetch.ts) 를 통과한다 (baseURL·토큰·에러 처리). baseURL 은 `VITE_API_BASE_URL` 을 쓴다.
|
||||
- FastAPI operationId(`list_items_v1_item_list_get`)는 `_v1_` 앞부분만 취해 camelCase 로 정리 → `listItems` / `useListItems` 형태가 된다.
|
||||
|
||||
## 디렉토리 구조
|
||||
|
||||
```
|
||||
src/
|
||||
app/ # 엔트리(main), router, provider
|
||||
api/
|
||||
generated/ # orval 자동생성 (직접 수정 금지)
|
||||
mutator/ # custom-fetch (요청 공통 로직: baseURL·토큰·에러)
|
||||
features/ # 도메인별: auth, products(상품), partners(협력사), quotations(견적), cards
|
||||
components/ # ui(shadcn), layout
|
||||
pages/ # 화면
|
||||
stores/ # zustand 스토어
|
||||
lib/ # 공용 유틸
|
||||
```
|
||||
|
||||
## 코딩 컨벤션
|
||||
|
||||
### 에러 처리 규칙
|
||||
|
||||
에러는 **던지는 곳(service/hook)** 과 **잡는 곳(UI)** 을 분리한다.
|
||||
|
||||
- **service / hook 계층** — 에러를 처리하지 않는다. 실패하면 `throw` 로 위로 전파만 한다.
|
||||
화면을 모르므로 "에러를 어떻게 보여줄지" 를 결정하지 않는다.
|
||||
- 단, 사람이 읽을 수 있는 메시지로 **가공한 뒤 다시 throw** 하는 건 허용
|
||||
(예: `features/auth/service.ts` 의 `callAuth` — `ApiError` → `Error(error_message)`).
|
||||
- **UI 계층(페이지/컴포넌트)** — `try/catch` 로 잡아서 화면에 반영한다
|
||||
(예: `pages/login.tsx` 의 `handleSubmit` → `setError(...)`).
|
||||
|
||||
예외: 에러를 **무시해도 되는 동작은 그 자리에서 삼킨다**.
|
||||
예) `service.ts` 의 `logout` — 서버 호출이 실패해도 로컬 토큰만 정리하면 되므로 UI까지 올리지 않는다.
|
||||
|
||||
| 계층 | 에러 태도 |
|
||||
| --- | --- |
|
||||
| orval / API 호출 | 실패 발생 (raw) |
|
||||
| `callAuth` 같은 래퍼 | 잡아서 **다듬고 다시 throw** |
|
||||
| service / hook | **그냥 통과** (안 잡음) |
|
||||
| UI (페이지) | **catch → 화면 표시** |
|
||||
|
||||
25
negodata/front/components.json
Normal file
25
negodata/front/components.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "https://ui.shadcn.com/schema.json",
|
||||
"style": "base-nova",
|
||||
"rsc": false,
|
||||
"tsx": true,
|
||||
"tailwind": {
|
||||
"config": "",
|
||||
"css": "src/index.css",
|
||||
"baseColor": "neutral",
|
||||
"cssVariables": true,
|
||||
"prefix": ""
|
||||
},
|
||||
"iconLibrary": "lucide",
|
||||
"rtl": false,
|
||||
"aliases": {
|
||||
"components": "@/components",
|
||||
"utils": "@/lib/utils",
|
||||
"ui": "@/components/ui",
|
||||
"lib": "@/lib",
|
||||
"hooks": "@/hooks"
|
||||
},
|
||||
"menuColor": "default",
|
||||
"menuAccent": "subtle",
|
||||
"registries": {}
|
||||
}
|
||||
13
negodata/front/index.html
Normal file
13
negodata/front/index.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>NegoData</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/app/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
50
negodata/front/orval.config.ts
Normal file
50
negodata/front/orval.config.ts
Normal file
@ -0,0 +1,50 @@
|
||||
import { defineConfig } from 'orval';
|
||||
|
||||
/**
|
||||
* Orval config
|
||||
*
|
||||
* Backend: FastAPI (Negodata BackOffice API) — exposes the OpenAPI schema at
|
||||
* `${BACKEND_URL}/openapi.json` automatically.
|
||||
*
|
||||
* Generates a React Query client using the native `fetch` API (no axios needed).
|
||||
* Run with: `npm run orval` (see package.json script).
|
||||
*/
|
||||
export default defineConfig({
|
||||
negodata: {
|
||||
input: {
|
||||
// Live FastAPI schema (negodata 백엔드 9400). ORVAL_INPUT 로 저장 파일 지정 가능
|
||||
// (예: 백엔드의 openapi.json — 서버 안 띄우고도 생성).
|
||||
target: process.env.ORVAL_INPUT ?? 'http://localhost:9400/openapi.json',
|
||||
},
|
||||
output: {
|
||||
mode: 'tags-split',
|
||||
target: './src/api/generated',
|
||||
schemas: './src/api/generated/model',
|
||||
client: 'react-query',
|
||||
// httpClient: 'fetch' 를 쓰면 오퍼레이션마다 Response200/404/Success/Error/Response
|
||||
// 상태코드별 유니온 타입이 강제로 쏟아진다. 우리 mutator는 본문(data)만 반환하므로
|
||||
// 기본 mutator 방식(config-object)으로 두어 함수가 본문 타입을 바로 반환하게 한다.
|
||||
clean: true,
|
||||
prettier: true,
|
||||
override: {
|
||||
// FastAPI 기본 operationId("list_items_v1_item_list_get")에서 "_v1_" 앞부분만 취해
|
||||
// camelCase 로 정리 → listItems/useListItems 등 기존 함수명 복원(백엔드 무수정).
|
||||
operationName: (operation) => {
|
||||
const id = operation.operationId ?? '';
|
||||
const base = id.split('_v1_')[0] || id;
|
||||
return base.replace(/_([a-z])/g, (_m, c) => c.toUpperCase());
|
||||
},
|
||||
// 모든 생성 호출을 공통 fetch mutator로 통과시킨다(토큰/에러/baseURL 처리).
|
||||
mutator: {
|
||||
path: './src/api/mutator/custom-fetch.ts',
|
||||
name: 'customFetch',
|
||||
},
|
||||
query: {
|
||||
useQuery: true,
|
||||
useInfinite: false,
|
||||
signal: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
11748
negodata/front/package-lock.json
generated
Normal file
11748
negodata/front/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
54
negodata/front/package.json
Normal file
54
negodata/front/package.json
Normal file
@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "react-example",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --port=3000 --host=0.0.0.0",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"clean": "rm -rf dist server.js",
|
||||
"lint": "tsc --noEmit",
|
||||
"orval": "orval --config ./orval.config.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@base-ui/react": "^1.5.0",
|
||||
"@fontsource-variable/geist": "^5.2.9",
|
||||
"@google/genai": "^2.4.0",
|
||||
"@hookform/resolvers": "^5.4.0",
|
||||
"@tailwindcss/vite": "^4.1.14",
|
||||
"@tanstack/react-query": "^5.62.0",
|
||||
"@vitejs/plugin-react": "^5.0.4",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"dotenv": "^17.2.3",
|
||||
"express": "^4.21.2",
|
||||
"lucide-react": "^0.546.0",
|
||||
"motion": "^12.23.24",
|
||||
"react": "^19.0.1",
|
||||
"react-dom": "^19.0.1",
|
||||
"react-hook-form": "^7.79.0",
|
||||
"react-router": "^7.17.0",
|
||||
"shadcn": "^4.11.0",
|
||||
"sonner": "^2.0.7",
|
||||
"tailwind-merge": "^3.6.0",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"vaul": "^1.1.2",
|
||||
"vite": "^6.2.3",
|
||||
"zod": "^4.4.3",
|
||||
"zustand": "^5.0.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/react": "^19.2.17",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"esbuild": "^0.25.0",
|
||||
"orval": "^7.3.0",
|
||||
"tailwindcss": "^4.1.14",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "~5.8.2",
|
||||
"vite": "^6.2.3"
|
||||
}
|
||||
}
|
||||
BIN
negodata/front/public/fonts/PretendardVariable.woff2
Normal file
BIN
negodata/front/public/fonts/PretendardVariable.woff2
Normal file
Binary file not shown.
419
negodata/front/src/api/generated/auth/auth.ts
Normal file
419
negodata/front/src/api/generated/auth/auth.ts
Normal file
@ -0,0 +1,419 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
ReqCreateAccount,
|
||||
ReqLogin,
|
||||
ResCreateAccount,
|
||||
ResLogin,
|
||||
ResMe,
|
||||
ResRefreshToken,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator/custom-fetch";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* id/pw 로 로그인하고 JWT 토큰을 발급한다.
|
||||
* @summary 로그인
|
||||
*/
|
||||
export const login = (
|
||||
reqLogin: ReqLogin,
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResLogin>(
|
||||
{
|
||||
url: `/v1/auth/login`,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
data: reqLogin,
|
||||
signal,
|
||||
},
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getLoginMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof login>>,
|
||||
TError,
|
||||
{ data: ReqLogin },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof login>>,
|
||||
TError,
|
||||
{ data: ReqLogin },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["login"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof login>>,
|
||||
{ data: ReqLogin }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return login(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type LoginMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof login>>
|
||||
>;
|
||||
export type LoginMutationBody = ReqLogin;
|
||||
export type LoginMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 로그인
|
||||
*/
|
||||
export const useLogin = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof login>>,
|
||||
TError,
|
||||
{ data: ReqLogin },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof login>>,
|
||||
TError,
|
||||
{ data: ReqLogin },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getLoginMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* company_id 하위로 유저를 생성한다(시드/관리자용).
|
||||
* @summary 계정 생성
|
||||
*/
|
||||
export const createAccount = (
|
||||
reqCreateAccount: ReqCreateAccount,
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResCreateAccount>(
|
||||
{
|
||||
url: `/v1/auth/create`,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
data: reqCreateAccount,
|
||||
signal,
|
||||
},
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getCreateAccountMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createAccount>>,
|
||||
TError,
|
||||
{ data: ReqCreateAccount },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createAccount>>,
|
||||
TError,
|
||||
{ data: ReqCreateAccount },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["createAccount"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createAccount>>,
|
||||
{ data: ReqCreateAccount }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return createAccount(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type CreateAccountMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof createAccount>>
|
||||
>;
|
||||
export type CreateAccountMutationBody = ReqCreateAccount;
|
||||
export type CreateAccountMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 계정 생성
|
||||
*/
|
||||
export const useCreateAccount = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createAccount>>,
|
||||
TError,
|
||||
{ data: ReqCreateAccount },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createAccount>>,
|
||||
TError,
|
||||
{ data: ReqCreateAccount },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getCreateAccountMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* refresh 토큰으로 access 토큰을 재발급한다.
|
||||
* @summary 액세스 토큰 갱신
|
||||
*/
|
||||
export const refreshToken = (
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResRefreshToken>(
|
||||
{ url: `/v1/auth/refresh_token`, method: "POST", signal },
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getRefreshTokenMutationOptions = <
|
||||
TError = void,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof refreshToken>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof refreshToken>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["refreshToken"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof refreshToken>>,
|
||||
void
|
||||
> = () => {
|
||||
return refreshToken(requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type RefreshTokenMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof refreshToken>>
|
||||
>;
|
||||
|
||||
export type RefreshTokenMutationError = void;
|
||||
|
||||
/**
|
||||
* @summary 액세스 토큰 갱신
|
||||
*/
|
||||
export const useRefreshToken = <TError = void, TContext = unknown>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof refreshToken>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof refreshToken>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getRefreshTokenMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* 유효한 access 토큰이 있어야 호출 가능. 토큰의 유저+소속사 정보를 반환한다.
|
||||
* @summary 내 정보
|
||||
*/
|
||||
export const me = (
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResMe>(
|
||||
{ url: `/v1/auth/me`, method: "GET", signal },
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getMeQueryKey = () => {
|
||||
return [`/v1/auth/me`] as const;
|
||||
};
|
||||
|
||||
export const getMeQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof me>>,
|
||||
TError = void,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getMeQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof me>>> = ({ signal }) =>
|
||||
me(requestOptions, signal);
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof me>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type MeQueryResult = NonNullable<Awaited<ReturnType<typeof me>>>;
|
||||
export type MeQueryError = void;
|
||||
|
||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof me>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof me>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof me>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof me>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary 내 정보
|
||||
*/
|
||||
|
||||
export function useMe<TData = Awaited<ReturnType<typeof me>>, TError = void>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof me>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getMeQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
176
negodata/front/src/api/generated/default/default.ts
Normal file
176
negodata/front/src/api/generated/default/default.ts
Normal file
@ -0,0 +1,176 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import { customFetch } from "../../mutator/custom-fetch";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Healthz
|
||||
*/
|
||||
export const healthzHealthzGet = (
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<unknown>(
|
||||
{ url: `/healthz`, method: "GET", signal },
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getHealthzHealthzGetQueryKey = () => {
|
||||
return [`/healthz`] as const;
|
||||
};
|
||||
|
||||
export const getHealthzHealthzGetQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError = void,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getHealthzHealthzGetQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||
> = ({ signal }) => healthzHealthzGet(requestOptions, signal);
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type HealthzHealthzGetQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||
>;
|
||||
export type HealthzHealthzGetQueryError = void;
|
||||
|
||||
export function useHealthzHealthzGet<
|
||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError = void,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useHealthzHealthzGet<
|
||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError = void,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useHealthzHealthzGet<
|
||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError = void,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Healthz
|
||||
*/
|
||||
|
||||
export function useHealthzHealthzGet<
|
||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError = void,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getHealthzHealthzGetQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
918
negodata/front/src/api/generated/item/item.ts
Normal file
918
negodata/front/src/api/generated/item/item.ts
Normal file
@ -0,0 +1,918 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type {
|
||||
BodyUploadItemsExcelV1ItemUploadExcelPost,
|
||||
HTTPValidationError,
|
||||
ListItemsParams,
|
||||
ReqCreateItem,
|
||||
ReqUpdateItem,
|
||||
ResDeleteItem,
|
||||
ResExcelUpload,
|
||||
ResItem,
|
||||
ResItemList,
|
||||
ResLowestPriceResult,
|
||||
ResLowestPriceTrigger,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator/custom-fetch";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary 상품 목록
|
||||
*/
|
||||
export const listItems = (
|
||||
params?: ListItemsParams,
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResItemList>(
|
||||
{ url: `/v1/item/list`, method: "GET", params, signal },
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getListItemsQueryKey = (params?: ListItemsParams) => {
|
||||
return [`/v1/item/list`, ...(params ? [params] : [])] as const;
|
||||
};
|
||||
|
||||
export const getListItemsQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof listItems>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
params?: ListItemsParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof listItems>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getListItemsQueryKey(params);
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listItems>>> = ({
|
||||
signal,
|
||||
}) => listItems(params, requestOptions, signal);
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listItems>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type ListItemsQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof listItems>>
|
||||
>;
|
||||
export type ListItemsQueryError = void | HTTPValidationError;
|
||||
|
||||
export function useListItems<
|
||||
TData = Awaited<ReturnType<typeof listItems>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
params: undefined | ListItemsParams,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof listItems>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listItems>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listItems>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListItems<
|
||||
TData = Awaited<ReturnType<typeof listItems>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
params?: ListItemsParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof listItems>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listItems>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listItems>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListItems<
|
||||
TData = Awaited<ReturnType<typeof listItems>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
params?: ListItemsParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof listItems>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary 상품 목록
|
||||
*/
|
||||
|
||||
export function useListItems<
|
||||
TData = Awaited<ReturnType<typeof listItems>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
params?: ListItemsParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof listItems>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getListItemsQueryOptions(params, options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary 상품 등록
|
||||
*/
|
||||
export const createItem = (
|
||||
reqCreateItem: ReqCreateItem,
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResItem>(
|
||||
{
|
||||
url: `/v1/item/create`,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
data: reqCreateItem,
|
||||
signal,
|
||||
},
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getCreateItemMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createItem>>,
|
||||
TError,
|
||||
{ data: ReqCreateItem },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createItem>>,
|
||||
TError,
|
||||
{ data: ReqCreateItem },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["createItem"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createItem>>,
|
||||
{ data: ReqCreateItem }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return createItem(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type CreateItemMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof createItem>>
|
||||
>;
|
||||
export type CreateItemMutationBody = ReqCreateItem;
|
||||
export type CreateItemMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 상품 등록
|
||||
*/
|
||||
export const useCreateItem = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createItem>>,
|
||||
TError,
|
||||
{ data: ReqCreateItem },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createItem>>,
|
||||
TError,
|
||||
{ data: ReqCreateItem },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getCreateItemMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 엑셀 일괄 등록(스텁)
|
||||
*/
|
||||
export const uploadItemsExcel = (
|
||||
bodyUploadItemsExcelV1ItemUploadExcelPost: BodyUploadItemsExcelV1ItemUploadExcelPost,
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
const formData = new FormData();
|
||||
formData.append(`file`, bodyUploadItemsExcelV1ItemUploadExcelPost.file);
|
||||
|
||||
return customFetch<ResExcelUpload>(
|
||||
{
|
||||
url: `/v1/item/upload-excel`,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
data: formData,
|
||||
signal,
|
||||
},
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getUploadItemsExcelMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof uploadItemsExcel>>,
|
||||
TError,
|
||||
{ data: BodyUploadItemsExcelV1ItemUploadExcelPost },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof uploadItemsExcel>>,
|
||||
TError,
|
||||
{ data: BodyUploadItemsExcelV1ItemUploadExcelPost },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["uploadItemsExcel"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof uploadItemsExcel>>,
|
||||
{ data: BodyUploadItemsExcelV1ItemUploadExcelPost }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return uploadItemsExcel(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type UploadItemsExcelMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof uploadItemsExcel>>
|
||||
>;
|
||||
export type UploadItemsExcelMutationBody =
|
||||
BodyUploadItemsExcelV1ItemUploadExcelPost;
|
||||
export type UploadItemsExcelMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 엑셀 일괄 등록(스텁)
|
||||
*/
|
||||
export const useUploadItemsExcel = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof uploadItemsExcel>>,
|
||||
TError,
|
||||
{ data: BodyUploadItemsExcelV1ItemUploadExcelPost },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof uploadItemsExcel>>,
|
||||
TError,
|
||||
{ data: BodyUploadItemsExcelV1ItemUploadExcelPost },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getUploadItemsExcelMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 상품 조회
|
||||
*/
|
||||
export const getItem = (
|
||||
itemId: string,
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResItem>(
|
||||
{ url: `/v1/item/${itemId}`, method: "GET", signal },
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetItemQueryKey = (itemId?: string) => {
|
||||
return [`/v1/item/${itemId}`] as const;
|
||||
};
|
||||
|
||||
export const getGetItemQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getItem>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
itemId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getItem>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetItemQueryKey(itemId);
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getItem>>> = ({
|
||||
signal,
|
||||
}) => getItem(itemId, requestOptions, signal);
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!itemId,
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<Awaited<ReturnType<typeof getItem>>, TError, TData> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetItemQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getItem>>
|
||||
>;
|
||||
export type GetItemQueryError = void | HTTPValidationError;
|
||||
|
||||
export function useGetItem<
|
||||
TData = Awaited<ReturnType<typeof getItem>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
itemId: string,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getItem>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getItem>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getItem>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetItem<
|
||||
TData = Awaited<ReturnType<typeof getItem>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
itemId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getItem>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getItem>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getItem>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetItem<
|
||||
TData = Awaited<ReturnType<typeof getItem>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
itemId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getItem>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary 상품 조회
|
||||
*/
|
||||
|
||||
export function useGetItem<
|
||||
TData = Awaited<ReturnType<typeof getItem>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
itemId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getItem>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetItemQueryOptions(itemId, options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary 상품 수정
|
||||
*/
|
||||
export const updateItem = (
|
||||
itemId: string,
|
||||
reqUpdateItem: ReqUpdateItem,
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
) => {
|
||||
return customFetch<ResItem>(
|
||||
{
|
||||
url: `/v1/item/update/${itemId}`,
|
||||
method: "PATCH",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
data: reqUpdateItem,
|
||||
},
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getUpdateItemMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateItem>>,
|
||||
TError,
|
||||
{ itemId: string; data: ReqUpdateItem },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateItem>>,
|
||||
TError,
|
||||
{ itemId: string; data: ReqUpdateItem },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["updateItem"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateItem>>,
|
||||
{ itemId: string; data: ReqUpdateItem }
|
||||
> = (props) => {
|
||||
const { itemId, data } = props ?? {};
|
||||
|
||||
return updateItem(itemId, data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type UpdateItemMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof updateItem>>
|
||||
>;
|
||||
export type UpdateItemMutationBody = ReqUpdateItem;
|
||||
export type UpdateItemMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 상품 수정
|
||||
*/
|
||||
export const useUpdateItem = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateItem>>,
|
||||
TError,
|
||||
{ itemId: string; data: ReqUpdateItem },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateItem>>,
|
||||
TError,
|
||||
{ itemId: string; data: ReqUpdateItem },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getUpdateItemMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 상품 삭제
|
||||
*/
|
||||
export const deleteItem = (
|
||||
itemId: string,
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
) => {
|
||||
return customFetch<ResDeleteItem>(
|
||||
{ url: `/v1/item/delete/${itemId}`, method: "DELETE" },
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getDeleteItemMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteItem>>,
|
||||
TError,
|
||||
{ itemId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteItem>>,
|
||||
TError,
|
||||
{ itemId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["deleteItem"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteItem>>,
|
||||
{ itemId: string }
|
||||
> = (props) => {
|
||||
const { itemId } = props ?? {};
|
||||
|
||||
return deleteItem(itemId, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type DeleteItemMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof deleteItem>>
|
||||
>;
|
||||
|
||||
export type DeleteItemMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 상품 삭제
|
||||
*/
|
||||
export const useDeleteItem = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteItem>>,
|
||||
TError,
|
||||
{ itemId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteItem>>,
|
||||
TError,
|
||||
{ itemId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getDeleteItemMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 최저가 수집 요청(스텁)
|
||||
*/
|
||||
export const triggerLowestPrice = (
|
||||
itemId: string,
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResLowestPriceTrigger>(
|
||||
{ url: `/v1/item/${itemId}/lowest-price`, method: "POST", signal },
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getTriggerLowestPriceMutationOptions = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof triggerLowestPrice>>,
|
||||
TError,
|
||||
{ itemId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof triggerLowestPrice>>,
|
||||
TError,
|
||||
{ itemId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["triggerLowestPrice"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof triggerLowestPrice>>,
|
||||
{ itemId: string }
|
||||
> = (props) => {
|
||||
const { itemId } = props ?? {};
|
||||
|
||||
return triggerLowestPrice(itemId, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type TriggerLowestPriceMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof triggerLowestPrice>>
|
||||
>;
|
||||
|
||||
export type TriggerLowestPriceMutationError = void | HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary 최저가 수집 요청(스텁)
|
||||
*/
|
||||
export const useTriggerLowestPrice = <
|
||||
TError = void | HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof triggerLowestPrice>>,
|
||||
TError,
|
||||
{ itemId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof triggerLowestPrice>>,
|
||||
TError,
|
||||
{ itemId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getTriggerLowestPriceMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary 최저가 수집 결과(스텁)
|
||||
*/
|
||||
export const getLowestPrice = (
|
||||
itemId: string,
|
||||
options?: SecondParameter<typeof customFetch>,
|
||||
signal?: AbortSignal,
|
||||
) => {
|
||||
return customFetch<ResLowestPriceResult>(
|
||||
{ url: `/v1/item/${itemId}/lowest-price`, method: "GET", signal },
|
||||
options,
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetLowestPriceQueryKey = (itemId?: string) => {
|
||||
return [`/v1/item/${itemId}/lowest-price`] as const;
|
||||
};
|
||||
|
||||
export const getGetLowestPriceQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getLowestPrice>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
itemId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getLowestPrice>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetLowestPriceQueryKey(itemId);
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getLowestPrice>>> = ({
|
||||
signal,
|
||||
}) => getLowestPrice(itemId, requestOptions, signal);
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!itemId,
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getLowestPrice>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetLowestPriceQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getLowestPrice>>
|
||||
>;
|
||||
export type GetLowestPriceQueryError = void | HTTPValidationError;
|
||||
|
||||
export function useGetLowestPrice<
|
||||
TData = Awaited<ReturnType<typeof getLowestPrice>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
itemId: string,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getLowestPrice>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getLowestPrice>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getLowestPrice>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetLowestPrice<
|
||||
TData = Awaited<ReturnType<typeof getLowestPrice>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
itemId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getLowestPrice>>, TError, TData>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getLowestPrice>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getLowestPrice>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetLowestPrice<
|
||||
TData = Awaited<ReturnType<typeof getLowestPrice>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
itemId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getLowestPrice>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary 최저가 수집 결과(스텁)
|
||||
*/
|
||||
|
||||
export function useGetLowestPrice<
|
||||
TData = Awaited<ReturnType<typeof getLowestPrice>>,
|
||||
TError = void | HTTPValidationError,
|
||||
>(
|
||||
itemId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getLowestPrice>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetLowestPriceQueryOptions(itemId, options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
11
negodata/front/src/api/generated/model/asyncJob.ts
Normal file
11
negodata/front/src/api/generated/model/asyncJob.ts
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface AsyncJob {
|
||||
status?: string;
|
||||
message?: string;
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface BodyUploadItemsExcelV1ItemUploadExcelPost {
|
||||
file: string;
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface BodyUploadSuppliersExcelV1SupplierUploadExcelPost {
|
||||
file: string;
|
||||
}
|
||||
22
negodata/front/src/api/generated/model/chatMessageData.ts
Normal file
22
negodata/front/src/api/generated/model/chatMessageData.ts
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ChatMessageDataCardId } from "./chatMessageDataCardId";
|
||||
import type { ChatMessageDataCardUsedYn } from "./chatMessageDataCardUsedYn";
|
||||
import type { ChatMessageDataIndicatorValue } from "./chatMessageDataIndicatorValue";
|
||||
import type { ChatMessageDataCardType } from "./chatMessageDataCardType";
|
||||
|
||||
export interface ChatMessageData {
|
||||
chat_id: string;
|
||||
session_id: string;
|
||||
card_id?: ChatMessageDataCardId;
|
||||
index: number;
|
||||
sender: number;
|
||||
target_price: number;
|
||||
card_used_yn?: ChatMessageDataCardUsedYn;
|
||||
indicator_value?: ChatMessageDataIndicatorValue;
|
||||
card_type?: ChatMessageDataCardType;
|
||||
}
|
||||
@ -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 ChatMessageDataCardId = 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 ChatMessageDataCardType = number | 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 ChatMessageDataCardUsedYn = boolean | 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 ChatMessageDataIndicatorValue = number | null;
|
||||
11
negodata/front/src/api/generated/model/companyBrief.ts
Normal file
11
negodata/front/src/api/generated/model/companyBrief.ts
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface CompanyBrief {
|
||||
company_id?: string;
|
||||
name?: string;
|
||||
}
|
||||
18
negodata/front/src/api/generated/model/errorInfo.ts
Normal file
18
negodata/front/src/api/generated/model/errorInfo.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ErrorInfoSuccess } from "./errorInfoSuccess";
|
||||
import type { ErrorInfoCode } from "./errorInfoCode";
|
||||
import type { ErrorInfoDesc } from "./errorInfoDesc";
|
||||
|
||||
/**
|
||||
* 모든 응답에 공통으로 실리는 결과 정보. result.success / code / desc 로 내려간다.
|
||||
*/
|
||||
export interface ErrorInfo {
|
||||
success?: ErrorInfoSuccess;
|
||||
code?: ErrorInfoCode;
|
||||
desc?: ErrorInfoDesc;
|
||||
}
|
||||
8
negodata/front/src/api/generated/model/errorInfoCode.ts
Normal file
8
negodata/front/src/api/generated/model/errorInfoCode.ts
Normal file
@ -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 ErrorInfoCode = number | null;
|
||||
8
negodata/front/src/api/generated/model/errorInfoDesc.ts
Normal file
8
negodata/front/src/api/generated/model/errorInfoDesc.ts
Normal file
@ -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 ErrorInfoDesc = 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 ErrorInfoSuccess = boolean | null;
|
||||
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ValidationError } from "./validationError";
|
||||
|
||||
export interface HTTPValidationError {
|
||||
detail?: ValidationError[];
|
||||
}
|
||||
209
negodata/front/src/api/generated/model/index.ts
Normal file
209
negodata/front/src/api/generated/model/index.ts
Normal file
@ -0,0 +1,209 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export * from "./asyncJob";
|
||||
export * from "./bodyUploadItemsExcelV1ItemUploadExcelPost";
|
||||
export * from "./bodyUploadSuppliersExcelV1SupplierUploadExcelPost";
|
||||
export * from "./chatMessageData";
|
||||
export * from "./chatMessageDataCardId";
|
||||
export * from "./chatMessageDataCardType";
|
||||
export * from "./chatMessageDataCardUsedYn";
|
||||
export * from "./chatMessageDataIndicatorValue";
|
||||
export * from "./companyBrief";
|
||||
export * from "./errorInfo";
|
||||
export * from "./errorInfoCode";
|
||||
export * from "./errorInfoDesc";
|
||||
export * from "./errorInfoSuccess";
|
||||
export * from "./hTTPValidationError";
|
||||
export * from "./itemData";
|
||||
export * from "./itemDataCategory";
|
||||
export * from "./itemDataCode";
|
||||
export * from "./itemDataCreatedAt";
|
||||
export * from "./itemDataDeliveryFeeYn";
|
||||
export * from "./itemDataDeliveryType";
|
||||
export * from "./itemDataImageUrl";
|
||||
export * from "./itemDataLeadTime";
|
||||
export * from "./itemDataMadeIn";
|
||||
export * from "./itemDataManufacturer";
|
||||
export * from "./itemDataModelName";
|
||||
export * from "./itemDataMoq";
|
||||
export * from "./itemDataPrice";
|
||||
export * from "./itemDataQuantityUnit";
|
||||
export * from "./itemDataSpec";
|
||||
export * from "./itemDataUpdatedAt";
|
||||
export * from "./itemDataVatYn";
|
||||
export * from "./listItemsParams";
|
||||
export * from "./listQuotationsParams";
|
||||
export * from "./listSuppliersParams";
|
||||
export * from "./quotationCardData";
|
||||
export * from "./quotationCardDataName";
|
||||
export * from "./quotationCardDataNegoCardId";
|
||||
export * from "./quotationCardDataQtId";
|
||||
export * from "./quotationCardDataScript";
|
||||
export * from "./quotationCardDataType";
|
||||
export * from "./quotationCardDataWildCardId";
|
||||
export * from "./quotationData";
|
||||
export * from "./quotationDataCreatedAt";
|
||||
export * from "./quotationDataEqualBidData";
|
||||
export * from "./quotationDataEqualBidYn";
|
||||
export * from "./quotationDataManagerContactNumber";
|
||||
export * from "./quotationDataManagerEmail";
|
||||
export * from "./quotationDataManagerName";
|
||||
export * from "./quotationDataMemo";
|
||||
export * from "./quotationDataPreferredSpId";
|
||||
export * from "./quotationDataPreferredSpName";
|
||||
export * from "./quotationDataPreferredSpYn";
|
||||
export * from "./quotationDataUpdatedAt";
|
||||
export * from "./quotationSettingData";
|
||||
export * from "./quotationSettingDataCreatedAt";
|
||||
export * from "./quotationSettingDataUpdatedAt";
|
||||
export * from "./quotationSettingDataUserId";
|
||||
export * from "./reqCreateAccount";
|
||||
export * from "./reqCreateItem";
|
||||
export * from "./reqCreateItemCategory";
|
||||
export * from "./reqCreateItemCode";
|
||||
export * from "./reqCreateItemDeliveryFeeYn";
|
||||
export * from "./reqCreateItemDeliveryType";
|
||||
export * from "./reqCreateItemImageUrl";
|
||||
export * from "./reqCreateItemLeadTime";
|
||||
export * from "./reqCreateItemMadeIn";
|
||||
export * from "./reqCreateItemManufacturer";
|
||||
export * from "./reqCreateItemModelName";
|
||||
export * from "./reqCreateItemMoq";
|
||||
export * from "./reqCreateItemPrice";
|
||||
export * from "./reqCreateItemQuantityUnit";
|
||||
export * from "./reqCreateItemSpec";
|
||||
export * from "./reqCreateItemVatYn";
|
||||
export * from "./reqCreateQuotation";
|
||||
export * from "./reqCreateQuotationManagerContactNumber";
|
||||
export * from "./reqCreateQuotationManagerEmail";
|
||||
export * from "./reqCreateQuotationManagerName";
|
||||
export * from "./reqCreateQuotationMemo";
|
||||
export * from "./reqCreateQuotationSetting";
|
||||
export * from "./reqCreateSupplier";
|
||||
export * from "./reqCreateSupplierCode";
|
||||
export * from "./reqCreateSupplierManagerContactNumber";
|
||||
export * from "./reqCreateSupplierManagerEmail";
|
||||
export * from "./reqCreateSupplierManagerName";
|
||||
export * from "./reqCreateSupplierPriority";
|
||||
export * from "./reqLogin";
|
||||
export * from "./reqUpdateItem";
|
||||
export * from "./reqUpdateItemCategory";
|
||||
export * from "./reqUpdateItemCategoryType";
|
||||
export * from "./reqUpdateItemCode";
|
||||
export * from "./reqUpdateItemDeliveryFeeYn";
|
||||
export * from "./reqUpdateItemDeliveryType";
|
||||
export * from "./reqUpdateItemImageUrl";
|
||||
export * from "./reqUpdateItemInternetLowestPriceYn";
|
||||
export * from "./reqUpdateItemLeadTime";
|
||||
export * from "./reqUpdateItemMadeIn";
|
||||
export * from "./reqUpdateItemManufacturer";
|
||||
export * from "./reqUpdateItemModelName";
|
||||
export * from "./reqUpdateItemMoq";
|
||||
export * from "./reqUpdateItemName";
|
||||
export * from "./reqUpdateItemPrice";
|
||||
export * from "./reqUpdateItemQuantityUnit";
|
||||
export * from "./reqUpdateItemSpec";
|
||||
export * from "./reqUpdateItemVatYn";
|
||||
export * from "./reqUpdateQuotationSetting";
|
||||
export * from "./reqUpdateQuotationSettingAnchoringValue";
|
||||
export * from "./reqUpdateQuotationSettingCardCount";
|
||||
export * from "./reqUpdateQuotationSettingTargetMarginRate";
|
||||
export * from "./reqUpdateSupplier";
|
||||
export * from "./reqUpdateSupplierCode";
|
||||
export * from "./reqUpdateSupplierManagerContactNumber";
|
||||
export * from "./reqUpdateSupplierManagerEmail";
|
||||
export * from "./reqUpdateSupplierManagerName";
|
||||
export * from "./reqUpdateSupplierName";
|
||||
export * from "./reqUpdateSupplierPriority";
|
||||
export * from "./resCreateAccount";
|
||||
export * from "./resCreateAccountMsg";
|
||||
export * from "./resCreateQuotation";
|
||||
export * from "./resCreateQuotationAsyncJob";
|
||||
export * from "./resCreateQuotationMsg";
|
||||
export * from "./resCreateQuotationQuotation";
|
||||
export * from "./resDeleteItem";
|
||||
export * from "./resDeleteItemMsg";
|
||||
export * from "./resDeleteQuotation";
|
||||
export * from "./resDeleteQuotationMsg";
|
||||
export * from "./resDeleteQuotationSetting";
|
||||
export * from "./resDeleteQuotationSettingMsg";
|
||||
export * from "./resDeleteSupplier";
|
||||
export * from "./resDeleteSupplierMsg";
|
||||
export * from "./resExcelUpload";
|
||||
export * from "./resExcelUploadMsg";
|
||||
export * from "./resExcelUploadReceivedFilename";
|
||||
export * from "./resItem";
|
||||
export * from "./resItemItem";
|
||||
export * from "./resItemList";
|
||||
export * from "./resItemListMsg";
|
||||
export * from "./resItemMsg";
|
||||
export * from "./resLogin";
|
||||
export * from "./resLoginMsg";
|
||||
export * from "./resLowestPriceResult";
|
||||
export * from "./resLowestPriceResultMsg";
|
||||
export * from "./resLowestPriceTrigger";
|
||||
export * from "./resLowestPriceTriggerMsg";
|
||||
export * from "./resMe";
|
||||
export * from "./resMeCompany";
|
||||
export * from "./resMeContactNumber";
|
||||
export * from "./resMeEmail";
|
||||
export * from "./resMeMsg";
|
||||
export * from "./resMeName";
|
||||
export * from "./resQuotation";
|
||||
export * from "./resQuotationCards";
|
||||
export * from "./resQuotationCardsMsg";
|
||||
export * from "./resQuotationCardsQtId";
|
||||
export * from "./resQuotationList";
|
||||
export * from "./resQuotationListMsg";
|
||||
export * from "./resQuotationMsg";
|
||||
export * from "./resQuotationQuotation";
|
||||
export * from "./resQuotationResult";
|
||||
export * from "./resQuotationResultEqualBidData";
|
||||
export * from "./resQuotationResultIsEqualBid";
|
||||
export * from "./resQuotationResultMsg";
|
||||
export * from "./resQuotationResultQtId";
|
||||
export * from "./resQuotationResultWinnerSupplierId";
|
||||
export * from "./resQuotationResultWinnerSupplierName";
|
||||
export * from "./resQuotationSessions";
|
||||
export * from "./resQuotationSessionsMsg";
|
||||
export * from "./resQuotationSessionsQtId";
|
||||
export * from "./resQuotationSetting";
|
||||
export * from "./resQuotationSettingList";
|
||||
export * from "./resQuotationSettingListMsg";
|
||||
export * from "./resQuotationSettingMsg";
|
||||
export * from "./resQuotationSettingSetting";
|
||||
export * from "./resQuotationStatus";
|
||||
export * from "./resQuotationStatusMsg";
|
||||
export * from "./resQuotationStatusQtId";
|
||||
export * from "./resRefreshToken";
|
||||
export * from "./resRefreshTokenMsg";
|
||||
export * from "./resSessionChat";
|
||||
export * from "./resSessionChatMsg";
|
||||
export * from "./resSessionChatSessionId";
|
||||
export * from "./resSupplier";
|
||||
export * from "./resSupplierList";
|
||||
export * from "./resSupplierListMsg";
|
||||
export * from "./resSupplierMsg";
|
||||
export * from "./resSupplierSupplier";
|
||||
export * from "./sessionData";
|
||||
export * from "./sessionDataBidAt";
|
||||
export * from "./sessionDataBidPrice";
|
||||
export * from "./sessionDataRejectDeliveryType";
|
||||
export * from "./sessionDataRejectPrice";
|
||||
export * from "./sessionDataRejectReason";
|
||||
export * from "./supplierData";
|
||||
export * from "./supplierDataCode";
|
||||
export * from "./supplierDataCreatedAt";
|
||||
export * from "./supplierDataManagerContactNumber";
|
||||
export * from "./supplierDataManagerEmail";
|
||||
export * from "./supplierDataManagerName";
|
||||
export * from "./supplierDataPriority";
|
||||
export * from "./supplierDataUpdatedAt";
|
||||
export * from "./validationError";
|
||||
export * from "./validationErrorCtx";
|
||||
export * from "./validationErrorLocItem";
|
||||
47
negodata/front/src/api/generated/model/itemData.ts
Normal file
47
negodata/front/src/api/generated/model/itemData.ts
Normal file
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ItemDataCode } from "./itemDataCode";
|
||||
import type { ItemDataCategory } from "./itemDataCategory";
|
||||
import type { ItemDataImageUrl } from "./itemDataImageUrl";
|
||||
import type { ItemDataModelName } from "./itemDataModelName";
|
||||
import type { ItemDataSpec } from "./itemDataSpec";
|
||||
import type { ItemDataManufacturer } from "./itemDataManufacturer";
|
||||
import type { ItemDataMadeIn } from "./itemDataMadeIn";
|
||||
import type { ItemDataPrice } from "./itemDataPrice";
|
||||
import type { ItemDataMoq } from "./itemDataMoq";
|
||||
import type { ItemDataLeadTime } from "./itemDataLeadTime";
|
||||
import type { ItemDataQuantityUnit } from "./itemDataQuantityUnit";
|
||||
import type { ItemDataDeliveryType } from "./itemDataDeliveryType";
|
||||
import type { ItemDataVatYn } from "./itemDataVatYn";
|
||||
import type { ItemDataDeliveryFeeYn } from "./itemDataDeliveryFeeYn";
|
||||
import type { ItemDataCreatedAt } from "./itemDataCreatedAt";
|
||||
import type { ItemDataUpdatedAt } from "./itemDataUpdatedAt";
|
||||
|
||||
export interface ItemData {
|
||||
item_id: string;
|
||||
company_id: string;
|
||||
user_id: string;
|
||||
name: string;
|
||||
code?: ItemDataCode;
|
||||
category?: ItemDataCategory;
|
||||
category_type?: number;
|
||||
image_url?: ItemDataImageUrl;
|
||||
model_name?: ItemDataModelName;
|
||||
spec?: ItemDataSpec;
|
||||
manufacturer?: ItemDataManufacturer;
|
||||
made_in?: ItemDataMadeIn;
|
||||
price?: ItemDataPrice;
|
||||
internet_lowest_price_yn?: boolean;
|
||||
moq?: ItemDataMoq;
|
||||
lead_time?: ItemDataLeadTime;
|
||||
quantity_unit?: ItemDataQuantityUnit;
|
||||
delivery_type?: ItemDataDeliveryType;
|
||||
vat_yn?: ItemDataVatYn;
|
||||
delivery_fee_yn?: ItemDataDeliveryFeeYn;
|
||||
created_at?: ItemDataCreatedAt;
|
||||
updated_at?: ItemDataUpdatedAt;
|
||||
}
|
||||
@ -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 ItemDataCategory = string | null;
|
||||
8
negodata/front/src/api/generated/model/itemDataCode.ts
Normal file
8
negodata/front/src/api/generated/model/itemDataCode.ts
Normal file
@ -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 ItemDataCode = 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 ItemDataCreatedAt = 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 ItemDataDeliveryFeeYn = boolean | 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 ItemDataDeliveryType = 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 ItemDataImageUrl = 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 ItemDataLeadTime = number | null;
|
||||
8
negodata/front/src/api/generated/model/itemDataMadeIn.ts
Normal file
8
negodata/front/src/api/generated/model/itemDataMadeIn.ts
Normal file
@ -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 ItemDataMadeIn = 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 ItemDataManufacturer = 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 ItemDataModelName = string | null;
|
||||
8
negodata/front/src/api/generated/model/itemDataMoq.ts
Normal file
8
negodata/front/src/api/generated/model/itemDataMoq.ts
Normal file
@ -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 ItemDataMoq = string | null;
|
||||
8
negodata/front/src/api/generated/model/itemDataPrice.ts
Normal file
8
negodata/front/src/api/generated/model/itemDataPrice.ts
Normal file
@ -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 ItemDataPrice = number | 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 ItemDataQuantityUnit = number | null;
|
||||
8
negodata/front/src/api/generated/model/itemDataSpec.ts
Normal file
8
negodata/front/src/api/generated/model/itemDataSpec.ts
Normal file
@ -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 ItemDataSpec = 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 ItemDataUpdatedAt = string | null;
|
||||
8
negodata/front/src/api/generated/model/itemDataVatYn.ts
Normal file
8
negodata/front/src/api/generated/model/itemDataVatYn.ts
Normal file
@ -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 ItemDataVatYn = boolean | null;
|
||||
26
negodata/front/src/api/generated/model/listItemsParams.ts
Normal file
26
negodata/front/src/api/generated/model/listItemsParams.ts
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListItemsParams = {
|
||||
/**
|
||||
* 상품명/상품코드 검색
|
||||
*/
|
||||
search?: string | null;
|
||||
/**
|
||||
* 카테고리 필터
|
||||
*/
|
||||
category?: string | null;
|
||||
/**
|
||||
* @minimum 1
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 100
|
||||
*/
|
||||
size?: number;
|
||||
};
|
||||
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListQuotationsParams = {
|
||||
/**
|
||||
* 상태 필터(정확히 일치)
|
||||
*/
|
||||
status?: string | null;
|
||||
/**
|
||||
* 유형 필터(정확히 일치)
|
||||
*/
|
||||
type?: string | null;
|
||||
/**
|
||||
* 시작일시 이후(ISO)
|
||||
*/
|
||||
start_from?: string | null;
|
||||
/**
|
||||
* 시작일시 이전(ISO)
|
||||
*/
|
||||
start_to?: string | null;
|
||||
/**
|
||||
* @minimum 1
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 100
|
||||
*/
|
||||
size?: number;
|
||||
};
|
||||
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListSuppliersParams = {
|
||||
/**
|
||||
* 협력사명/코드/담당자명 검색
|
||||
*/
|
||||
search?: string | null;
|
||||
/**
|
||||
* @minimum 1
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 100
|
||||
*/
|
||||
size?: number;
|
||||
};
|
||||
22
negodata/front/src/api/generated/model/quotationCardData.ts
Normal file
22
negodata/front/src/api/generated/model/quotationCardData.ts
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { QuotationCardDataQtId } from "./quotationCardDataQtId";
|
||||
import type { QuotationCardDataNegoCardId } from "./quotationCardDataNegoCardId";
|
||||
import type { QuotationCardDataWildCardId } from "./quotationCardDataWildCardId";
|
||||
import type { QuotationCardDataType } from "./quotationCardDataType";
|
||||
import type { QuotationCardDataName } from "./quotationCardDataName";
|
||||
import type { QuotationCardDataScript } from "./quotationCardDataScript";
|
||||
|
||||
export interface QuotationCardData {
|
||||
session_card_id: string;
|
||||
qt_id?: QuotationCardDataQtId;
|
||||
nego_card_id?: QuotationCardDataNegoCardId;
|
||||
wild_card_id?: QuotationCardDataWildCardId;
|
||||
type?: QuotationCardDataType;
|
||||
name?: QuotationCardDataName;
|
||||
script?: QuotationCardDataScript;
|
||||
}
|
||||
@ -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 QuotationCardDataName = 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 QuotationCardDataNegoCardId = 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 QuotationCardDataQtId = 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 QuotationCardDataScript = 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 QuotationCardDataType = number | 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 QuotationCardDataWildCardId = string | null;
|
||||
43
negodata/front/src/api/generated/model/quotationData.ts
Normal file
43
negodata/front/src/api/generated/model/quotationData.ts
Normal file
@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { QuotationDataManagerName } from "./quotationDataManagerName";
|
||||
import type { QuotationDataManagerEmail } from "./quotationDataManagerEmail";
|
||||
import type { QuotationDataManagerContactNumber } from "./quotationDataManagerContactNumber";
|
||||
import type { QuotationDataMemo } from "./quotationDataMemo";
|
||||
import type { QuotationDataPreferredSpYn } from "./quotationDataPreferredSpYn";
|
||||
import type { QuotationDataPreferredSpId } from "./quotationDataPreferredSpId";
|
||||
import type { QuotationDataPreferredSpName } from "./quotationDataPreferredSpName";
|
||||
import type { QuotationDataEqualBidYn } from "./quotationDataEqualBidYn";
|
||||
import type { QuotationDataEqualBidData } from "./quotationDataEqualBidData";
|
||||
import type { QuotationDataCreatedAt } from "./quotationDataCreatedAt";
|
||||
import type { QuotationDataUpdatedAt } from "./quotationDataUpdatedAt";
|
||||
|
||||
export interface QuotationData {
|
||||
qt_id: string;
|
||||
user_id: string;
|
||||
qt_setting_id: string;
|
||||
version_id: string;
|
||||
name: string;
|
||||
number: string;
|
||||
type: number;
|
||||
round?: number;
|
||||
status: number;
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
manager_name?: QuotationDataManagerName;
|
||||
manager_email?: QuotationDataManagerEmail;
|
||||
manager_contact_number?: QuotationDataManagerContactNumber;
|
||||
memo?: QuotationDataMemo;
|
||||
iteration?: number;
|
||||
preferred_sp_yn?: QuotationDataPreferredSpYn;
|
||||
preferred_sp_id?: QuotationDataPreferredSpId;
|
||||
preferred_sp_name?: QuotationDataPreferredSpName;
|
||||
equal_bid_yn?: QuotationDataEqualBidYn;
|
||||
equal_bid_data?: QuotationDataEqualBidData;
|
||||
created_at?: QuotationDataCreatedAt;
|
||||
updated_at?: QuotationDataUpdatedAt;
|
||||
}
|
||||
@ -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 QuotationDataCreatedAt = 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 QuotationDataEqualBidData = unknown | 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 QuotationDataEqualBidYn = boolean | 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 QuotationDataManagerContactNumber = 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 QuotationDataManagerEmail = 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 QuotationDataManagerName = 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 QuotationDataMemo = 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 QuotationDataPreferredSpId = 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 QuotationDataPreferredSpName = 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 QuotationDataPreferredSpYn = boolean | 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 QuotationDataUpdatedAt = string | null;
|
||||
@ -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 { QuotationSettingDataUserId } from "./quotationSettingDataUserId";
|
||||
import type { QuotationSettingDataCreatedAt } from "./quotationSettingDataCreatedAt";
|
||||
import type { QuotationSettingDataUpdatedAt } from "./quotationSettingDataUpdatedAt";
|
||||
|
||||
export interface QuotationSettingData {
|
||||
qt_setting_id: string;
|
||||
user_id?: QuotationSettingDataUserId;
|
||||
target_margin_rate: number;
|
||||
anchoring_value: number;
|
||||
card_count: number;
|
||||
created_at?: QuotationSettingDataCreatedAt;
|
||||
updated_at?: QuotationSettingDataUpdatedAt;
|
||||
}
|
||||
@ -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 QuotationSettingDataCreatedAt = 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 QuotationSettingDataUpdatedAt = 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 QuotationSettingDataUserId = string | null;
|
||||
16
negodata/front/src/api/generated/model/reqCreateAccount.ts
Normal file
16
negodata/front/src/api/generated/model/reqCreateAccount.ts
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface ReqCreateAccount {
|
||||
id?: string;
|
||||
password?: string;
|
||||
company_id?: string;
|
||||
name?: string;
|
||||
email?: string;
|
||||
contact_number?: string;
|
||||
role?: number;
|
||||
}
|
||||
40
negodata/front/src/api/generated/model/reqCreateItem.ts
Normal file
40
negodata/front/src/api/generated/model/reqCreateItem.ts
Normal file
@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ReqCreateItemCode } from "./reqCreateItemCode";
|
||||
import type { ReqCreateItemCategory } from "./reqCreateItemCategory";
|
||||
import type { ReqCreateItemImageUrl } from "./reqCreateItemImageUrl";
|
||||
import type { ReqCreateItemModelName } from "./reqCreateItemModelName";
|
||||
import type { ReqCreateItemSpec } from "./reqCreateItemSpec";
|
||||
import type { ReqCreateItemManufacturer } from "./reqCreateItemManufacturer";
|
||||
import type { ReqCreateItemMadeIn } from "./reqCreateItemMadeIn";
|
||||
import type { ReqCreateItemPrice } from "./reqCreateItemPrice";
|
||||
import type { ReqCreateItemMoq } from "./reqCreateItemMoq";
|
||||
import type { ReqCreateItemLeadTime } from "./reqCreateItemLeadTime";
|
||||
import type { ReqCreateItemQuantityUnit } from "./reqCreateItemQuantityUnit";
|
||||
import type { ReqCreateItemDeliveryType } from "./reqCreateItemDeliveryType";
|
||||
import type { ReqCreateItemVatYn } from "./reqCreateItemVatYn";
|
||||
import type { ReqCreateItemDeliveryFeeYn } from "./reqCreateItemDeliveryFeeYn";
|
||||
|
||||
export interface ReqCreateItem {
|
||||
name?: string;
|
||||
code?: ReqCreateItemCode;
|
||||
category?: ReqCreateItemCategory;
|
||||
category_type?: number;
|
||||
image_url?: ReqCreateItemImageUrl;
|
||||
model_name?: ReqCreateItemModelName;
|
||||
spec?: ReqCreateItemSpec;
|
||||
manufacturer?: ReqCreateItemManufacturer;
|
||||
made_in?: ReqCreateItemMadeIn;
|
||||
price?: ReqCreateItemPrice;
|
||||
internet_lowest_price_yn?: boolean;
|
||||
moq?: ReqCreateItemMoq;
|
||||
lead_time?: ReqCreateItemLeadTime;
|
||||
quantity_unit?: ReqCreateItemQuantityUnit;
|
||||
delivery_type?: ReqCreateItemDeliveryType;
|
||||
vat_yn?: ReqCreateItemVatYn;
|
||||
delivery_fee_yn?: ReqCreateItemDeliveryFeeYn;
|
||||
}
|
||||
@ -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 ReqCreateItemCategory = 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 ReqCreateItemCode = 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 ReqCreateItemDeliveryFeeYn = boolean | 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 ReqCreateItemDeliveryType = 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 ReqCreateItemImageUrl = 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 ReqCreateItemLeadTime = number | 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 ReqCreateItemMadeIn = 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 ReqCreateItemManufacturer = 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 ReqCreateItemModelName = 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 ReqCreateItemMoq = 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 ReqCreateItemPrice = number | 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 ReqCreateItemQuantityUnit = number | 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 ReqCreateItemSpec = 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 ReqCreateItemVatYn = boolean | null;
|
||||
26
negodata/front/src/api/generated/model/reqCreateQuotation.ts
Normal file
26
negodata/front/src/api/generated/model/reqCreateQuotation.ts
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ReqCreateQuotationManagerName } from "./reqCreateQuotationManagerName";
|
||||
import type { ReqCreateQuotationManagerEmail } from "./reqCreateQuotationManagerEmail";
|
||||
import type { ReqCreateQuotationManagerContactNumber } from "./reqCreateQuotationManagerContactNumber";
|
||||
import type { ReqCreateQuotationMemo } from "./reqCreateQuotationMemo";
|
||||
|
||||
export interface ReqCreateQuotation {
|
||||
qt_setting_id: string;
|
||||
version_id: string;
|
||||
name?: string;
|
||||
number?: string;
|
||||
type?: number;
|
||||
status?: number;
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
round?: number;
|
||||
manager_name?: ReqCreateQuotationManagerName;
|
||||
manager_email?: ReqCreateQuotationManagerEmail;
|
||||
manager_contact_number?: ReqCreateQuotationManagerContactNumber;
|
||||
memo?: ReqCreateQuotationMemo;
|
||||
}
|
||||
@ -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 ReqCreateQuotationManagerContactNumber = 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 ReqCreateQuotationManagerEmail = 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 ReqCreateQuotationManagerName = 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 ReqCreateQuotationMemo = string | null;
|
||||
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface ReqCreateQuotationSetting {
|
||||
target_margin_rate: number;
|
||||
anchoring_value?: number;
|
||||
card_count?: number;
|
||||
}
|
||||
20
negodata/front/src/api/generated/model/reqCreateSupplier.ts
Normal file
20
negodata/front/src/api/generated/model/reqCreateSupplier.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ReqCreateSupplierCode } from "./reqCreateSupplierCode";
|
||||
import type { ReqCreateSupplierManagerName } from "./reqCreateSupplierManagerName";
|
||||
import type { ReqCreateSupplierManagerEmail } from "./reqCreateSupplierManagerEmail";
|
||||
import type { ReqCreateSupplierManagerContactNumber } from "./reqCreateSupplierManagerContactNumber";
|
||||
import type { ReqCreateSupplierPriority } from "./reqCreateSupplierPriority";
|
||||
|
||||
export interface ReqCreateSupplier {
|
||||
name?: string;
|
||||
code?: ReqCreateSupplierCode;
|
||||
manager_name?: ReqCreateSupplierManagerName;
|
||||
manager_email?: ReqCreateSupplierManagerEmail;
|
||||
manager_contact_number?: ReqCreateSupplierManagerContactNumber;
|
||||
priority?: ReqCreateSupplierPriority;
|
||||
}
|
||||
@ -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 ReqCreateSupplierCode = 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 ReqCreateSupplierManagerContactNumber = 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 ReqCreateSupplierManagerEmail = 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 ReqCreateSupplierManagerName = 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 ReqCreateSupplierPriority = string | null;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user